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