: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
t = doc.createElement('tb-'+model.type+'-bar'),
actionWrap=actionBar.tfClass('tb_action_wrap')[0];
if(model.isEmpty===true){
cl+=' tb_disabled_module';
else if(model.isSubCol===true){
cl+=' tb_bar_sub_column';
if(model.el.classList.contains('tb-page-break')){
last=p.lastElementChild.previousElementSibling;
while(!last.classList.contains('module_row')){
last=last.previousElementSibling;
if(el===p.firstElementChild){
if(api.activeBreakPoint!=='desktop'){
cl+=' tb_bar_responsive_mode';
//actionBar.style.marginTop='';
actionBar.id='tb_component_bar';
actionWrap?.replaceWith(t) || actionBar.appendChild(t);
api.Utils.addViewPortClass(t.shadowRoot.querySelector('.dropdown'));
if (model.type === 'module') {
const rect = el.getBoundingClientRect();
const cl = t.shadowRoot.querySelector('.wrap,.dropdown').classList,
a_top = actionBar.getBoundingClientRect().top;
//cl.toggle('small_bottom',!(a_top < 40 || (a_top - api.Builder.get().el.getBoundingClientRect().top) < 40));
api.EdgeDrag.addEdges(model);
if (api.isPreview || this.disable === true || e.target.closest('.tb_disable_sorting,.tb_grid_drag')!==null) {
el = target.closest('[data-cid]');
if(!el || (target.tagName.indexOf('-')!==-1 && !target.closest('.module'))){
const model = Registry.get(el.dataset.cid);
if(model && model.isEmpty!==true){
if(e.ctrlKey===true || e.metaKey===true){
el.classList.toggle('tb_element_clicked');
else if ((e.type==='dblclick' || api.isDocked) && !el.classList.contains('tb_active_layout_part')) {
clearTimeout(clickTimer);
const isSame=api.activeModel?.id===model.id;
clickTimer=setTimeout(()=>{
const repeatEl=target.closest('.tb_is_repeat');
let index=repeatEl.dataset.swiperSlideIndex;
index=index!=='' && index!==undefined?~~index:Themify.convert(repeatEl.parentNode.children).indexOf(repeatEl);
if((!isSame && index>0) || (isSame && index!==-1)){
const lb=api.LightBox.el.querySelector('#tb_lightbox_container'),
row=lb.tfClass('tb_repeatable_field')[index];
lb.style.scrollBehavior = 'auto';
lb.style.scrollBehavior = '';
if(this.disableClear!==true){
for(let bars = api.Builder.get().el.querySelectorAll('#tb_component_bar'),i=bars.length-1;i>-1;--i){
let last=bars[i].lastChild;
bars[i].removeAttribute('id');
if(last.tagName!=='SVG'){
if(this.disableClear!==true){
for (let selected = api.Builder.get().el.querySelectorAll('.tb_element_clicked,.tb_current_module'),i = selected.length - 1; i > -1; --i) {
selected[i].classList.remove('tb_element_clicked','tb_current_module');
Themify.on('tb_toolbar_loaded', () => {
}, true,api.ToolBar?.isLoaded===true);
})(tb_app,_CLICK_,topWindowDoc);