!function(){"use strict";window.SR7??={},window._tpt??={},SR7.F??={},SR7.D??={},void 0===SR7.F.saveAll&&(SR7.F.saveAll=function(t){var e={settings:{},slides:{}};let s=[];var i,n,l,a,r;for(r in SR7.M[t].migrate=!1,e.settings=SR7.F.removeMatching(SR7.D.moduleObj(t),SR7.M[t].settings),e.settings.addOns)_tpt.hop(e.settings.addOns,r)&&e.settings.addOns[r].u&&-1==s.indexOf(r)&&s.push(r);for(l in SR7.M[t].slides)if(_tpt.hop(SR7.M[t].slides,l)){for(r in a=SR7.M[t].slides[l],e.slides[l]={slide:SR7.F.removeMatching(SR7.D.slideObj(t),a.slide),layers:{}},a.slide.addOns)_tpt.hop(a.slide.addOns,r)&&a.slide.addOns[r].u&&-1==s.indexOf(r)&&s.push(r);for(n in a.layers){if(!_tpt.hop(a.layers,n))continue;i=a.layers[n].type;let s=Object.keys(a.layers[n].addOns);e.slides[l].layers[n]=SR7.F.removeMatching(SR7.D.layerObject({id:t,obj:{},layertype:i,msource:SR7.M[t].settings.source,ISEMPTY:!0,useAddons:s}),a.layers[n]);let r=SR7.D.hasActionLike(t,l,n,"link");if(r&&"a"==r.ltype){let t=e.slides[l].layers[n];t.tag="a",t.target=Array.isArray(r.target)?r.target[0]:r.target??"_blank",t.href=r.link??"","nofollow"==r.flw&&(t.rel="nofollow"),"_blank"==r.target&&(t.rel=(t.rel??"")+(void 0!==t.rel&&t.rel.length>0?" ":"")+"noopener")}e.slides[l].layers[n].type=i}1==a.slide.order&&(e.settings.thumb=""!==(a.slide.thumb?.admin??"")?a.slide.thumb.admin:""!==(a.slide.thumb?.src??"")?a.slide.thumb.src:a.slide.thumb?.default?.image?.src??(a.slide.thumb?.default?.color?a.slide.thumb?.default:void 0),void 0!==e.settings.thumb&&"#"==e.settings.thumb[e.settings.thumb.length-1]&&delete e.settings.thumb),a.slide?.attr?.deepLink&&(e.settings.deepLinks??={},e.settings.deepLinks[a.slide.attr.deepLink]=l)}return e.settings.aU=s,delete e.settings.imgs,e},SR7.F.removeMatching=function(t,e){let s={};for(let i in e)if(!_tpt.hop(t,i)||t[i]instanceof HTMLElement)_tpt.hop(t,i)||(s[i]=e[i]);else if(Array.isArray(e[i])&&Array.isArray(t[i])){e[i].length===t[i].length&&e[i].every(((e,s)=>e===t[i][s]))||(s[i]=e[i])}else if("object"==typeof e[i]&&"object"==typeof t[i]){let n=SR7.F.removeMatching(t[i],e[i]);Object.keys(n).length>0&&(s[i]=n)}else e[i]!==t[i]&&(s[i]=e[i]);return s},SR7.F.collectImageSources=function(t){t.settings.imgs=[];const e=e=>t.settings.imgs.findIndex((t=>t.src===e));return t.settings.bg?.image?.src&&-1===e(t.settings.bg.image.src)&&t.settings.imgs.push(t.settings.bg.image),Object.values(t.slides).forEach((s=>{Object.values(s.layers).forEach((s=>{["bg","content"].forEach((i=>{const n=s[i]?.image||s[i];n&&n.src&&((s,i)=>{let n={lib_id:s.lib_id,lib:s.lib,src:s.src};i&&(n.a="fn"==i.aO?"#fn":"c"==i.aO&&i.a||"",n.t="fn"==i.tO?"#fn":"c"==i.tO&&i.t||"",""===n.a&&delete n.a,""===n.t&&delete n.t);const l=e(s.src);-1===l?t.settings.imgs.push(n):("a"in n&&!("a"in t.settings.imgs[l])&&(t.settings.imgs[l].a=n.a),"t"in n&&!("t"in t.settings.imgs[l])&&(t.settings.imgs[l].t=n.t))})(n,s.attr),t.settings.hasYT=t.settings.hasYT||"youtube"===s[i]?.video?.type}))}))})),t},SR7.F.saveSliderDatas=function(t,e,s){t=SR7.F.collectImageSources(t),_tpt.ajax({action:"save_slider_v7",data:{fromSR6:s,id:t.id,alias:t.settings.alias,title:t.settings.title,settings:JSON.stringify(t.settings),slides:JSON.stringify(t.slides)},callBack:t=>{e()}})},_tpt.R??={},_tpt.R.save=_tpt.extend?_tpt.extend(_tpt.R.save,{status:2,version:"1.0"}):{status:2,version:"1.0"})}();