@creaditor/web-starterkit 1.0.14 → 1.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1260],{91260(t,e,o){o.r(e),o.d(e,{BlockEditor:()=>g});var r=o(59929),i=o(86319),a=o(36565),n=o(49937),s=o(83235);const d=JSON.parse('["3g2","3gp","aaf","asf","avchd","avi","drc","flv","m2v","m3u8","m4p","m4v","mkv","mng","mov","mp2","mp4","mpe","mpeg","mpg","mpv","mxf","nsv","ogg","ogv","qt","rm","rmvb","roq","svi","vob","webm","wmv","yuv"]');var l=o(9334),c=o(96374);const p=[{id:"video-background",name:"video",thumb:"https://i.ytimg.com/vi/RhlQvbvMg-0/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLCKBaHlpHj3ghOXWjB2br9kHjPg7w",group:["section-component"],type:"video",preset:{installed:!1,component:"cdtr-background-video",properties:{type:"video",url:"https://www.youtube.com/watch?v=RhlQvbvMg-0",loop:!0,volume:0,controls:0,muted:!0,playing:!0,config:{playerVars:{showinfo:0,controls:0,playsinline:0}},style:{zIndex:0,width:window.innerWidth+500,height:window.innerWidth-560,pointerEvents:"none",transform:"translate(-10%,-0%)"}}}},{id:"images-background",name:"some-images",thumb:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg",group:["section-component"],type:"images",preset:{tags:[],installed:!1,type:"images",component:"cdtr-images-preset",properties:{src:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg,https://images.pexels.com/photos/1408221/pexels-photo-1408221.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",style:{backgroundAttachment:"local",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}}}];o(12258),o(15155);o.e(4217).then(o.bind(o,94217));class g extends r.WF{constructor(t){super(),this.onChangeBakgroundExpanding=t=>{const e=t.target.checked;a.Ay.store().execCommand("expand_image_for_outlook",!e)},this.getInnerBlocks=()=>{const t=[],e=this.component.parent();return e&&"section"===e.type?(e.children.forEach(e=>{const o=i.M.get("components",e);o&&"block"===o.type&&t.push(o)}),t):[this.component]},this.onChangeWidth=this.onChangeWidth.bind(this),this.getInnerBlocks=this.getInnerBlocks.bind(this),this.isBackgroundImage=!1,this.backgroundVideo="",this.galleryOpened=!1,this._sectionsExpanded=!1,this.onChangeBakgroundExpanding=this.onChangeBakgroundExpanding.bind(this);const e=i.M.get("config","channel");this.tabs=[{text:"background"},{text:"style",selected:!0},..."web"===e?[{text:"animations"}]:[],{text:"settings"}],this.tabName="style",this.maxWidth=0,this.background="",this.padding={topValue:0,bottomValue:0,leftValue:0,rightValue:0},this.margin={topValue:0,bottomValue:0},this.borderStyle="solid",this.borderWidth=0,this.borderColor="#000",this.theme=i.M.get("theme"),this.connectWith=this.connectWith.bind(this),this.cmds={onchangeRadius:t=>{a.Ay.store().execCommand("style",{...t.target.json})},toggleResponsive:t=>{this.noResponsive=!t.target.checked,a.Ay.store().execCommand("noResponsive",this.noResponsive)},onChangeBorderStyle:t=>{this.borderStyle=t.target.borderStyle||"",this.borderWidth=t.target.borderWidth||1,this.borderColor=t.target.borderColor||"#000",this.borderRadius=t.target.borderRadius||0;t.target.json;a.Ay.store().execCommand("style",{borderStyle:this.borderStyle,borderColor:this.borderColor,borderTopWidth:t.target.borderTopWidth||"0px",borderBottomWidth:t.target.borderBottomWidth||"0px",borderLeftWidth:t.target.borderLeftWidth||"0px",borderRightWidth:t.target.borderRightWidth||"0px",borderTopRightRadius:parseInt(t.target.borderTopRightRadius||0)+"px",borderTopLeftRadius:parseInt(t.target.borderTopLeftRadius||0)+"px",borderBottomRightRadius:parseInt(t.target.borderBottomRightRadius||0)+"px",borderBottomLeftRadius:parseInt(t.target.borderBottomLeftRadius||0)+"px",borderRadius:null})},onRemoveBackgroundVideo:()=>{this.backgroundVideo="",this.backgroundInstance={},a.Ay.store().execCommand("background","transparent")},onChangeBackgroundVideo:t=>{const e=t.target.value;let o;if((0,s.A)(e)){const t=p.find(t=>"images"===t.type);t.preset.properties.src=e,o=t.preset}else if(function(t){const e=(/(?:\.([^.]+))?$/.exec(t.toLowerCase())??[])[1]??"";return-1!==d.findIndex(t=>t===e)}(e));else if(function(t){if(t&&t.match(/^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/))return!0;return!1}(e)){const t=p.find(t=>"video"===t.type);t.preset.properties.url=e,delete t.preset.properties.videoPath,o=t.preset}o&&(a.Ay.store().execCommand("background",JSON.parse(JSON.stringify(o))),a.Ay.store().execCommand("style",{background:null})),this.backgroundVideo=e},onChangeImage:t=>{const e=t.detail,o=[];Array.isArray(e)?e.forEach(t=>o.push(t.src)):o.push(e.src),this.cmds.onChangeBackgroundVideo({target:{value:o.join(",")}}),this.galleryOpened=!1},onChangeHeight:t=>{const e=t.target.value;a.Ay.store().execCommand("style",{height:e+"%"}),this.height=e},onChangeMargin:t=>{const e=t.target.value,o=t.target.direction;"all"===o?(a.Ay.store().execCommand("style",{marginTop:e+"px",marginBottom:e+"px"}),this.margin={topValue:e,bottomValue:e}):a.Ay.store().execCommand("style",{[(0,l.A)(`margin-${o.toLowerCase()}`)]:e+"px"})},onChangePadding:t=>{const e=t.target.value,o=t.target.direction,r=(0,l.A)(`padding-${o.toLowerCase()}`);"all"===o?(a.Ay.store().execCommand("style",{padding:null,"padding-top":null,"padding-bottom":null,"padding-left":null,"padding-right":null,paddingTop:e+"px",paddingBottom:e+"px",paddingLeft:e+"px",paddingRight:e+"px","padding-right":null,"padding-left":null,"padding-top":null,"padding-bottom":null}),this.padding={topValue:e,bottomValue:e,leftValue:e,rightValue:e}):(a.Ay.store().execCommand("style",{[r]:e+"px",[`padding-${o.toLowerCase()}`]:null}),this.props.style={[r]:e+"px"},this[`padding${o.toLowerCase()}`]=e)},onChangebackground(t){const e=t.target.value;this.background=e;a.Ay.components.forEach(t=>{const o=t.find("text");if(o&&!o.closest("card")){let t=o.tiptap.getAttributes("textStyle").color;if(!t){const e=o.element.querySelector("p,h1,h2,h3,h4,h5,h6");e&&(t=window.getComputedStyle(e).color)}if(t){if("transparent"===t)return;if(!t.includes("var(--")&&!e.includes("var(--")&&"transparent"!==e&&"rgba(0, 0, 0, 0)"!==e&&"rgb(0, 0, 0)"!==e){const r=(0,c.w)(t,e);o.tiptap.chain().selectAll().setColor(r).run()}}}}),a.Ay.store().execCommand("style",{background:e,backgroundColor:null});"web"!==i.M.get("config","channel")&&a.Ay.store().execCommand("background",null)}}}onChangeImageBackgroundProp(t){const e=t.detail,{key:o,value:r}=e;if(this.props.background){const t=JSON.parse(JSON.stringify(this.props.background)),e=t.properties;if(!e.style[o])throw new Error(`${o} is not a valid property`);e.style[o]=r,a.Ay.store().execCommand("background",t)}}connectedCallback(){super.connectedCallback(),this.connectWith(),a.Ay.on("update",this.connectWith)}disconnectedCallback(){super.disconnectedCallback(),a.Ay.off("update",this.connectWith)}onChangeWidth(t){let e=t.target.value;e<500&&(e=500),e>1e3&&(e=1e3);const o=this.getInnerBlocks();a.Ay.store().execCommand2({transactions:[{key:"style",value:{width:e+"px",maxWidth:"100%"}}],update:[...o]}),this.maxWidth=e}connectWith(){const t=a.Ay.components[a.Ay.components.length-1];if(this.component=t,t&&"block"===t.type){this.props=t.props;let{style:e}=this.props;e||(e={}),t.props||(t.props={}),t.props.style||(t.props.style={}),this.expand_image_for_outlook=!!t.props.expand_image_for_outlook,this.boxShadow=t.props.style.boxShadow,this.borderStyle=t.props.style.borderStyle,this.borderWidth=t.props.style.borderWidth,this.borderTopRightRadius=parseInt(t.props.style.borderTopRightRadius),this.borderTopLeftRadius=parseInt(t.props.style.borderTopLeftRadius),this.borderBottomRightRadius=parseInt(t.props.style.borderBottomRightRadius),this.borderBottomLeftRadius=parseInt(t.props.style.borderBottomLeftRadius),this.borderTopWidth=parseInt(t.props.style.borderTopWidth),this.borderBottomWidth=parseInt(t.props.style.borderBottomWidth),this.borderLeftWidth=parseInt(t.props.style.borderLeftWidth),this.borderRightWidth=parseInt(t.props.style.borderRightWidth),this.borderColor=t.props.style.borderColor;const o=t.props.background;if(this.isBackgroundImage="images"===o?.type,this.noResponsive=!!t.props.noResponsive,this.modalable=!!t.props.modalable,this.modalName=t.props.modalName||"",this.popupTrigger=t.props.popupTrigger||"button",this.popupDelay=null==t.props.popupDelay?3:t.props.popupDelay,this._rebuildTabs(),this.isBackgroundImage){const t=o.properties;this.backgroundAttachment=t.style.backgroundAttachment,this.backgroundPosition=t.style.backgroundPosition,this.backgroundRepeat=t.style.backgroundRepeat,this.backgroundSize=t.style.backgroundSize}this.backgroundInstance=o,this.backgroundVideo=o?.properties?.src||o?.properties?.url||"";const r=t.element,i=window.getComputedStyle(r);this.maxWidth=parseInt(i.width),this.width=parseInt(e.width,10)||this.maxWidth,this.background=e.background||e.backgroundImage||i.backgroundColor,e.backgroundImage&&(this.background=`url(${e.backgroundImage})`),this.padding={topValue:parseInt(i.paddingTop),bottomValue:parseInt(i.paddingBottom),leftValue:parseInt(i.paddingLeft),rightValue:parseInt(i.paddingRight)},this.margin={topValue:parseInt(i.marginTop),bottomValue:parseInt(i.marginBottom)}}}changeTab(t){this.tabName=t.target.value}_toggleModalable(t){this.modalable=t,a.Ay.store().execCommand("modalable",this.modalable),this.tabName=t?"popup":"style",this._rebuildTabs()}_rebuildTabs(){const t=i.M.get("config","channel"),e="web"===t&&this.modalable,o=[{text:"background"},{text:"style"},..."web"===t?[{text:"animations"}]:[],{text:"settings"},...e?[{text:"popup"}]:[]];let r=this.tabName;o.some(t=>t.text===r)||(r=e?"popup":"style"),o.forEach(t=>t.selected=t.text===r),this.tabName=r,this.tabs=o}_setModalName(t){this.modalName=t,a.Ay.store().execCommand("modalName",t)}_setPopupTrigger(t){this.popupTrigger=t,a.Ay.store().execCommand("popupTrigger",t)}_setPopupDelay(t){const e=Math.max(0,parseInt(t,10)||0);this.popupDelay=e,a.Ay.store().execCommand("popupDelay",e)}_onToggleAll(){this._sectionsExpanded=!this._sectionsExpanded,this.shadowRoot.querySelectorAll("cdtr-editor-section").forEach(t=>{t.open=this._sectionsExpanded})}render(){const t=i.M.get("config","channel");return r.qy`
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1260],{91260(t,e,o){o.r(e),o.d(e,{BlockEditor:()=>g});var r=o(59929),i=o(86319),n=o(36565),a=o(49937),s=o(83235);const d=JSON.parse('["3g2","3gp","aaf","asf","avchd","avi","drc","flv","m2v","m3u8","m4p","m4v","mkv","mng","mov","mp2","mp4","mpe","mpeg","mpg","mpv","mxf","nsv","ogg","ogv","qt","rm","rmvb","roq","svi","vob","webm","wmv","yuv"]');var l=o(9334),c=o(96374);const p=[{id:"video-background",name:"video",thumb:"https://i.ytimg.com/vi/RhlQvbvMg-0/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLCKBaHlpHj3ghOXWjB2br9kHjPg7w",group:["section-component"],type:"video",preset:{installed:!1,component:"cdtr-background-video",properties:{type:"video",url:"https://www.youtube.com/watch?v=RhlQvbvMg-0",loop:!0,volume:0,controls:0,muted:!0,playing:!0,config:{playerVars:{showinfo:0,controls:0,playsinline:0}},style:{zIndex:0,width:window.innerWidth+500,height:window.innerWidth-560,pointerEvents:"none",transform:"translate(-10%,-0%)"}}}},{id:"images-background",name:"some-images",thumb:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg",group:["section-component"],type:"images",preset:{tags:[],installed:!1,type:"images",component:"cdtr-images-preset",properties:{src:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg,https://images.pexels.com/photos/1408221/pexels-photo-1408221.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",style:{backgroundAttachment:"local",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}}}];o(12258),o(15155);o.e(4217).then(o.bind(o,94217));class g extends r.WF{constructor(t){super(),this.onChangeBakgroundExpanding=t=>{const e=t.target.checked;n.Ay.store().execCommand("expand_image_for_outlook",!e)},this.getInnerBlocks=()=>{const t=[],e=this.component.parent();return e&&"section"===e.type?(e.children.forEach(e=>{const o=i.M.get("components",e);o&&"block"===o.type&&t.push(o)}),t):[this.component]},this.onChangeWidth=this.onChangeWidth.bind(this),this.getInnerBlocks=this.getInnerBlocks.bind(this),this.isBackgroundImage=!1,this.backgroundVideo="",this.galleryOpened=!1,this._sectionsExpanded=!1,this.onChangeBakgroundExpanding=this.onChangeBakgroundExpanding.bind(this);const e=i.M.get("config","channel");this.tabs=[{text:"style",selected:!0},..."web"===e?[{text:"animations"}]:[],{text:"settings"}],this.tabName="style",this.maxWidth=0,this.background="",this.padding={topValue:0,bottomValue:0,leftValue:0,rightValue:0},this.margin={topValue:0,bottomValue:0},this.borderStyle="solid",this.borderWidth=0,this.borderColor="#000",this.theme=i.M.get("theme"),this.connectWith=this.connectWith.bind(this),this.cmds={onchangeRadius:t=>{n.Ay.store().execCommand("style",{...t.target.json})},toggleResponsive:t=>{this.noResponsive=!t.target.checked,n.Ay.store().execCommand("noResponsive",this.noResponsive)},onChangeBorderStyle:t=>{this.borderStyle=t.target.borderStyle||"",this.borderWidth=t.target.borderWidth||1,this.borderColor=t.target.borderColor||"#000",this.borderRadius=t.target.borderRadius||0;t.target.json;n.Ay.store().execCommand("style",{borderStyle:this.borderStyle,borderColor:this.borderColor,borderTopWidth:t.target.borderTopWidth||"0px",borderBottomWidth:t.target.borderBottomWidth||"0px",borderLeftWidth:t.target.borderLeftWidth||"0px",borderRightWidth:t.target.borderRightWidth||"0px",borderTopRightRadius:parseInt(t.target.borderTopRightRadius||0)+"px",borderTopLeftRadius:parseInt(t.target.borderTopLeftRadius||0)+"px",borderBottomRightRadius:parseInt(t.target.borderBottomRightRadius||0)+"px",borderBottomLeftRadius:parseInt(t.target.borderBottomLeftRadius||0)+"px",borderRadius:null})},onRemoveBackgroundVideo:()=>{this.backgroundVideo="",this.backgroundInstance={},n.Ay.store().execCommand("background","transparent")},onRemoveBackground:()=>{this.background="",this.backgroundVideo="",this.backgroundInstance={},n.Ay.store().execCommand("background",null),n.Ay.store().execCommand("style",{background:"",backgroundColor:null,backgroundImage:null})},onChangeBackgroundVideo:t=>{const e=t.target.value;let o;if((0,s.A)(e)){const t=p.find(t=>"images"===t.type);t.preset.properties.src=e,o=t.preset}else if(function(t){const e=(/(?:\.([^.]+))?$/.exec(t.toLowerCase())??[])[1]??"";return-1!==d.findIndex(t=>t===e)}(e));else if(function(t){if(t&&t.match(/^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/))return!0;return!1}(e)){const t=p.find(t=>"video"===t.type);t.preset.properties.url=e,delete t.preset.properties.videoPath,o=t.preset}o&&(n.Ay.store().execCommand("background",JSON.parse(JSON.stringify(o))),n.Ay.store().execCommand("style",{background:null})),this.backgroundVideo=e},onChangeImage:t=>{const e=t.detail,o=[];Array.isArray(e)?e.forEach(t=>o.push(t.src)):o.push(e.src),this.cmds.onChangeBackgroundVideo({target:{value:o.join(",")}}),this.galleryOpened=!1},onChangeHeight:t=>{const e=t.target.value;n.Ay.store().execCommand("style",{height:e+"%"}),this.height=e},onChangeMargin:t=>{const e=t.target.value,o=t.target.direction;"all"===o?(n.Ay.store().execCommand("style",{marginTop:e+"px",marginBottom:e+"px"}),this.margin={topValue:e,bottomValue:e}):n.Ay.store().execCommand("style",{[(0,l.A)(`margin-${o.toLowerCase()}`)]:e+"px"})},onChangePadding:t=>{const e=t.target.value,o=t.target.direction,r=(0,l.A)(`padding-${o.toLowerCase()}`);"all"===o?(n.Ay.store().execCommand("style",{padding:null,"padding-top":null,"padding-bottom":null,"padding-left":null,"padding-right":null,paddingTop:e+"px",paddingBottom:e+"px",paddingLeft:e+"px",paddingRight:e+"px","padding-right":null,"padding-left":null,"padding-top":null,"padding-bottom":null}),this.padding={topValue:e,bottomValue:e,leftValue:e,rightValue:e}):(n.Ay.store().execCommand("style",{[r]:e+"px",[`padding-${o.toLowerCase()}`]:null}),this.props.style={[r]:e+"px"},this[`padding${o.toLowerCase()}`]=e)},onChangebackground(t){const e=t.target.value;this.background=e;n.Ay.components.forEach(t=>{const o=t.find("text");if(o&&!o.closest("card")){let t=o.tiptap.getAttributes("textStyle").color;if(!t){const e=o.element.querySelector("p,h1,h2,h3,h4,h5,h6");e&&(t=window.getComputedStyle(e).color)}if(t){if("transparent"===t)return;if(!t.includes("var(--")&&!e.includes("var(--")&&"transparent"!==e&&"rgba(0, 0, 0, 0)"!==e&&"rgb(0, 0, 0)"!==e){const r=(0,c.w)(t,e);o.tiptap.chain().selectAll().setColor(r).run()}}}}),n.Ay.store().execCommand("style",{background:e,backgroundColor:null});"web"!==i.M.get("config","channel")&&n.Ay.store().execCommand("background",null)}}}onChangeImageBackgroundProp(t){const e=t.detail,{key:o,value:r}=e;if(this.props.background){const t=JSON.parse(JSON.stringify(this.props.background)),e=t.properties;if(!e.style[o])throw new Error(`${o} is not a valid property`);e.style[o]=r,n.Ay.store().execCommand("background",t)}}connectedCallback(){super.connectedCallback(),this.connectWith(),n.Ay.on("update",this.connectWith)}disconnectedCallback(){super.disconnectedCallback(),n.Ay.off("update",this.connectWith)}onChangeWidth(t){let e=t.target.value;e<500&&(e=500),e>1e3&&(e=1e3);const o=this.getInnerBlocks();n.Ay.store().execCommand2({transactions:[{key:"style",value:{width:e+"px",maxWidth:"100%"}}],update:[...o]}),this.maxWidth=e}connectWith(){const t=n.Ay.components[n.Ay.components.length-1];if(this.component=t,t&&"block"===t.type){this.props=t.props;let{style:e}=this.props;e||(e={}),t.props||(t.props={}),t.props.style||(t.props.style={}),this.expand_image_for_outlook=!!t.props.expand_image_for_outlook,this.boxShadow=t.props.style.boxShadow,this.borderStyle=t.props.style.borderStyle,this.borderWidth=t.props.style.borderWidth,this.borderTopRightRadius=parseInt(t.props.style.borderTopRightRadius),this.borderTopLeftRadius=parseInt(t.props.style.borderTopLeftRadius),this.borderBottomRightRadius=parseInt(t.props.style.borderBottomRightRadius),this.borderBottomLeftRadius=parseInt(t.props.style.borderBottomLeftRadius),this.borderTopWidth=parseInt(t.props.style.borderTopWidth),this.borderBottomWidth=parseInt(t.props.style.borderBottomWidth),this.borderLeftWidth=parseInt(t.props.style.borderLeftWidth),this.borderRightWidth=parseInt(t.props.style.borderRightWidth),this.borderColor=t.props.style.borderColor;const o=t.props.background;if(this.isBackgroundImage="images"===o?.type,this.noResponsive=!!t.props.noResponsive,this.modalable=!!t.props.modalable,this.modalName=t.props.modalName||"",this.popupTrigger=t.props.popupTrigger||"button",this.popupDelay=null==t.props.popupDelay?3:t.props.popupDelay,this._rebuildTabs(),this.isBackgroundImage){const t=o.properties;this.backgroundAttachment=t.style.backgroundAttachment,this.backgroundPosition=t.style.backgroundPosition,this.backgroundRepeat=t.style.backgroundRepeat,this.backgroundSize=t.style.backgroundSize}this.backgroundInstance=o,this.backgroundVideo=o?.properties?.src||o?.properties?.url||"";const r=t.element,i=window.getComputedStyle(r);this.maxWidth=parseInt(i.width),this.width=parseInt(e.width,10)||this.maxWidth,this.background=e.background||e.backgroundImage||i.backgroundColor,e.backgroundImage&&(this.background=`url(${e.backgroundImage})`),this.padding={topValue:parseInt(i.paddingTop),bottomValue:parseInt(i.paddingBottom),leftValue:parseInt(i.paddingLeft),rightValue:parseInt(i.paddingRight)},this.margin={topValue:parseInt(i.marginTop),bottomValue:parseInt(i.marginBottom)}}}changeTab(t){this.tabName=t.target.value}_toggleModalable(t){this.modalable=t,n.Ay.store().execCommand("modalable",this.modalable),this.tabName=t?"popup":"style",this._rebuildTabs()}_rebuildTabs(){const t=i.M.get("config","channel"),e="web"===t&&this.modalable,o=[{text:"style"},..."web"===t?[{text:"animations"}]:[],{text:"settings"},...e?[{text:"popup"}]:[]];let r=this.tabName;o.some(t=>t.text===r)||(r=e?"popup":"style"),o.forEach(t=>t.selected=t.text===r),this.tabName=r,this.tabs=o}_setModalName(t){this.modalName=t,n.Ay.store().execCommand("modalName",t)}_setPopupTrigger(t){this.popupTrigger=t,n.Ay.store().execCommand("popupTrigger",t)}_setPopupDelay(t){const e=Math.max(0,parseInt(t,10)||0);this.popupDelay=e,n.Ay.store().execCommand("popupDelay",e)}_onToggleAll(){this._sectionsExpanded=!this._sectionsExpanded,this.shadowRoot.querySelectorAll("cdtr-editor-section").forEach(t=>{t.open=this._sectionsExpanded})}_hasBackground(){if(this.backgroundInstance&&this.backgroundInstance.component)return!0;const t=(this.background||"").trim();return!!t&&"transparent"!==t&&"rgba(0, 0, 0, 0)"!==t&&"none"!==t}render(){const t=i.M.get("config","channel");return r.qy`
2
2
  <cdtr-editor-tabs .tabs=${this.tabs} @tabChanged=${this.changeTab}>
3
3
  <div slot="content">
4
4
  <div style="display:flex;justify-content:flex-start;padding:12px 16px 4px;">
@@ -15,7 +15,7 @@
15
15
  </svg>
16
16
  </span>
17
17
  </div>
18
- ${"background"===this.tabName?r.qy`
18
+ ${"style"===this.tabName?r.qy`
19
19
  <cdtr-editor-section label="backgroundColor" .open=${!0}>
20
20
  <cdtr-color-swatch-group
21
21
  .columns=${1}
@@ -33,7 +33,7 @@
33
33
  ></lang-text></paper-button>
34
34
  <paper-button
35
35
  class="backgrounds"
36
- @click=${()=>n.A.dispatch("open_add_menu",{type:"backgrounds",disabledOptions:!0,target:a.Ay.components[0]})}
36
+ @click=${()=>a.A.dispatch("open_add_menu",{type:"backgrounds",disabledOptions:!0,target:n.Ay.components[0]})}
37
37
  ><lang-text
38
38
  text="backgrounds"
39
39
  ></lang-text></paper-button>
@@ -46,6 +46,11 @@
46
46
  backgroundSize=${this.backgroundSize}
47
47
  @change=${this.onChangeImageBackgroundProp}
48
48
  ></background-editor-plugin>`:null}
49
+ ${this._hasBackground()?r.qy`<paper-button
50
+ style="font-size:12px;padding:0;margin-top:8px;text-align:var(--text-align-locale);direction:var(--direction-locale);justify-content:flex-start;color:red;text-transform:none;"
51
+ @click=${this.cmds.onRemoveBackground}
52
+ ><lang-text text="remove_background"></lang-text
53
+ ></paper-button>`:null}
49
54
  </cdtr-editor-section>
50
55
 
51
56
  <cdtr-editor-section label="add_urlAddress_from_media_site" .open=${!1}>
@@ -79,13 +84,6 @@
79
84
  </h6>
80
85
  </cdtr-editor-section>`:null}
81
86
  ${"style"===this.tabName?r.qy`
82
- <cdtr-editor-section label="backgroundColor" .open=${!0}>
83
- <cdtr-color-swatch-group
84
- .columns=${1}
85
- .items=${[{title:"backgroundColor",allowGradient:"web"===t,value:this.background||"#ffffff",onChange:t=>this.cmds.onChangebackground(t)}]}
86
- ></cdtr-color-swatch-group>
87
- </cdtr-editor-section>
88
-
89
87
  <cdtr-editor-section label="width" .open=${!0}>
90
88
  <cdtr-width-editor
91
89
  text="width"
@@ -297,7 +295,7 @@
297
295
  paper-button.backgrounds:hover {
298
296
  background: #eaeaed;
299
297
  }
300
- `,g.properties={maxWidth:{type:Number},backgroundInstance:{type:Object},padding:{type:Object},margin:{type:Object},tabs:{type:Array},tabName:{type:String},galleryOpened:{type:Boolean},backgroundVideo:{type:String,reflect:!0},isBackgroundImage:{type:Boolean},backgroundAttachment:{type:String},backgroundPosition:{type:String},backgroundRepeat:{type:String},backgroundSize:{type:String},noResponsive:{type:Boolean},modalable:{type:Boolean},modalName:{type:String},popupTrigger:{type:String},popupDelay:{type:Number},borderStyle:{type:String},borderWidth:{type:Number},borderColor:{type:String},borderTopRightRadius:{type:Number},borderTopLeftRadius:{type:Number},borderBottomRightRadius:{type:Number},borderBottomLeftRadius:{type:Number},borderTopWidth:{type:Number},borderBottomWidth:{type:Number},borderLeftWidth:{type:Number},borderRightWidth:{type:Number},_sectionsExpanded:{type:Boolean,state:!0}},customElements.define("block-editor",g)},15155(t,e,o){o.d(e,{A:()=>n});var r=o(59929),i=o(57176);class a extends r.WF{constructor(){super(),this.items=[],this.columns=2}async openPicker(t){const e=this.shadowRoot.querySelector(`#picker-${t}`);if(!e)return;await e.updateComplete;const o=e.shadowRoot?.querySelector("color-playground");if(o)if(await o.updateComplete,"function"==typeof o.openColorpicker)o.openColorpicker();else{(o.shadowRoot?.querySelector('[role="button"]')||o.shadowRoot?.querySelector("div")||o).click()}}render(){const t=1===this.columns?"grid single-col":"grid";return r.qy`
298
+ `,g.properties={maxWidth:{type:Number},backgroundInstance:{type:Object},padding:{type:Object},margin:{type:Object},tabs:{type:Array},tabName:{type:String},galleryOpened:{type:Boolean},backgroundVideo:{type:String,reflect:!0},isBackgroundImage:{type:Boolean},backgroundAttachment:{type:String},backgroundPosition:{type:String},backgroundRepeat:{type:String},backgroundSize:{type:String},noResponsive:{type:Boolean},modalable:{type:Boolean},modalName:{type:String},popupTrigger:{type:String},popupDelay:{type:Number},borderStyle:{type:String},borderWidth:{type:Number},borderColor:{type:String},borderTopRightRadius:{type:Number},borderTopLeftRadius:{type:Number},borderBottomRightRadius:{type:Number},borderBottomLeftRadius:{type:Number},borderTopWidth:{type:Number},borderBottomWidth:{type:Number},borderLeftWidth:{type:Number},borderRightWidth:{type:Number},_sectionsExpanded:{type:Boolean,state:!0}},customElements.define("block-editor",g)},15155(t,e,o){o.d(e,{A:()=>a});var r=o(59929),i=o(57176);class n extends r.WF{constructor(){super(),this.items=[],this.columns=2}async openPicker(t){const e=this.shadowRoot.querySelector(`#picker-${t}`);if(!e)return;await e.updateComplete;const o=e.shadowRoot?.querySelector("color-playground");if(o)if(await o.updateComplete,"function"==typeof o.openColorpicker)o.openColorpicker();else{(o.shadowRoot?.querySelector('[role="button"]')||o.shadowRoot?.querySelector("div")||o).click()}}render(){const t=1===this.columns?"grid single-col":"grid";return r.qy`
301
299
  <div class="${t}">
302
300
  ${(this.items||[]).map((t,e)=>r.qy`
303
301
  <div class="swatch-item" @click=${()=>this.openPicker(e)}>
@@ -321,7 +319,7 @@
321
319
  </div>
322
320
  `)}
323
321
  </div>
324
- `}}a.styles=[i.L,r.AH`
322
+ `}}n.styles=[i.L,r.AH`
325
323
  :host {
326
324
  display: block;
327
325
  direction: var(--direction-locale, ltr);
@@ -369,12 +367,12 @@
369
367
  clip: rect(0,0,0,0);
370
368
  pointer-events: none;
371
369
  }
372
- `],a.properties={items:{type:Array},columns:{type:Number}},customElements.define("cdtr-color-swatch-group",a);const n=t=>r.qy`
370
+ `],n.properties={items:{type:Array},columns:{type:Number}},customElements.define("cdtr-color-swatch-group",n);const a=t=>r.qy`
373
371
  <cdtr-color-swatch-group
374
372
  .items=${t.items}
375
373
  .columns=${t.columns||2}
376
374
  ></cdtr-color-swatch-group>
377
- `},12258(t,e,o){o.d(e,{A:()=>n});var r=o(59929),i=o(40648);class a extends r.WF{constructor(){super(),this.label="",this.open=!0,this.persistKey=""}toggle(){this.open=!this.open,(0,i.Q)(this.persistKey,this.open)}render(){return r.qy`
375
+ `},12258(t,e,o){o.d(e,{A:()=>a});var r=o(59929),i=o(40648);class n extends r.WF{constructor(){super(),this.label="",this.open=!0,this.persistKey=""}toggle(){this.open=!this.open,(0,i.Q)(this.persistKey,this.open)}render(){return r.qy`
378
376
  <div class="section">
379
377
  <div class="header" @click=${this.toggle}>
380
378
  <span class="title"><lang-text text="${this.label}"></lang-text></span>
@@ -388,7 +386,7 @@
388
386
  </div>
389
387
  </div>
390
388
  </div>
391
- `}}a.styles=r.AH`
389
+ `}}n.styles=r.AH`
392
390
  :host {
393
391
  display: block;
394
392
  direction: var(--direction-locale, ltr);
@@ -436,7 +434,7 @@
436
434
  .content-inner {
437
435
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-4);
438
436
  }
439
- `,a.properties={label:{type:String},open:{type:Boolean},persistKey:{type:String}},customElements.define("cdtr-editor-section",a);const n=(t,e)=>r.qy`
437
+ `,n.properties={label:{type:String},open:{type:Boolean},persistKey:{type:String}},customElements.define("cdtr-editor-section",n);const a=(t,e)=>r.qy`
440
438
  <cdtr-editor-section
441
439
  .label=${t.label}
442
440
  .open=${!1!==t.open}
@@ -444,4 +442,4 @@
444
442
  >
445
443
  ${e}
446
444
  </cdtr-editor-section>
447
- `},40648(t,e,o){o.d(e,{Q:()=>n,i:()=>a});const r="cdtr:section-open";function i(){try{const t=localStorage.getItem(r);return t?JSON.parse(t):{}}catch(t){return{}}}function a(t){if(!t)return;const e=i();return Object.prototype.hasOwnProperty.call(e,t)?!!e[t]:void 0}function n(t,e){if(!t)return;const o=i();o[t]=!!e,function(t){try{localStorage.setItem(r,JSON.stringify(t))}catch(t){}}(o)}}}]);
445
+ `},40648(t,e,o){o.d(e,{Q:()=>a,i:()=>n});const r="cdtr:section-open";function i(){try{const t=localStorage.getItem(r);return t?JSON.parse(t):{}}catch(t){return{}}}function n(t){if(!t)return;const e=i();return Object.prototype.hasOwnProperty.call(e,t)?!!e[t]:void 0}function a(t,e){if(!t)return;const o=i();o[t]=!!e,function(t){try{localStorage.setItem(r,JSON.stringify(t))}catch(t){}}(o)}}}]);
Binary file
@@ -1,6 +1,6 @@
1
1
  "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5926],{83545(t,e,o){o.r(e),o.d(e,{EditorTabs:()=>s});var i=o(59929),n=o(36565);o.e(7937).then(o.bind(o,67937));class s extends i.WF{constructor(){super(),this.onConnected=this.onConnected.bind(this),this.onArrowNavigation=this.onArrowNavigation.bind(this),this.tabs=[]}onClickItem(t){let{target:e}=t;const o=this.value=e.value,i=[...this.tabs],n=i.findIndex(t=>t.text===o);-1!==n&&(i.forEach(t=>{t.selected=!1}),i[n].selected=!0),this.tabs=i;const s=new UIEvent("tabChanged",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(s)}firstUpdated(){super.firstUpdated()}onConnected(t){let{name:e}=t;this.onClickItem({target:{value:e}})}onArrowNavigation(t){const{key:e,currentIcon:o}=t.detail,i=this.tabs.findIndex(t=>t.text===o);if(-1===i)return;let n=i;switch(e){case"ArrowUp":case"ArrowLeft":n=i>0?i-1:this.tabs.length-1;break;case"ArrowDown":case"ArrowRight":n=i<this.tabs.length-1?i+1:0;break;default:return}const s=this.tabs[n];s&&(this.onClickItem({target:{value:s.text}}),this.updateComplete.then(()=>{const t=this.shadowRoot.querySelector(`cdtr-editor-tab-item[icon="${s.text}"]`);t&&t.focus()}))}connectedCallback(){super.connectedCallback(),n.Ay.on("editor-tabs",this.onConnected)}disconnectedCallback(){super.disconnectedCallback(),n.Ay.off("editor-tabs",this.onConnected)}renderContent(){switch(this.value){case"animations":return o.e(3553).then(o.bind(o,3553)),i.qy`<cdtr-animations-editor>
2
2
  <cdtr-block-loader></cdtr-block-loader
3
- ></cdtr-animations-editor>`;case"settings":case"setting":return o.e(5340).then(o.bind(o,45340)),i.qy`<cdtr-setting-editor>
3
+ ></cdtr-animations-editor>`;case"settings":case"setting":return o.e(7654).then(o.bind(o,37654)),i.qy`<cdtr-setting-editor>
4
4
  <cdtr-block-loader></cdtr-block-loader
5
5
  ></cdtr-setting-editor>`;default:return i.qy`<slot name="content"></slot>`}}render(){return this.tabs.length>0&&!this.tabs.some(t=>t.selected)&&(this.tabs[0].selected=!0,this.value=this.tabs[0].text),i.qy`
6
6
  <div class="tabs-row" @arrow-navigation=${this.onArrowNavigation}>
Binary file
@@ -0,0 +1,157 @@
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7654],{12258(e,t,o){o.d(t,{A:()=>i});var n=o(59929),s=o(40648);class r extends n.WF{constructor(){super(),this.label="",this.open=!0,this.persistKey=""}toggle(){this.open=!this.open,(0,s.Q)(this.persistKey,this.open)}render(){return n.qy`
2
+ <div class="section">
3
+ <div class="header" @click=${this.toggle}>
4
+ <span class="title"><lang-text text="${this.label}"></lang-text></span>
5
+ <svg class="chevron ${this.open?"open":""}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
6
+ <polyline points="6 9 12 15 18 9"></polyline>
7
+ </svg>
8
+ </div>
9
+ <div class="content ${this.open?"open":""}">
10
+ <div class="content-inner">
11
+ <slot></slot>
12
+ </div>
13
+ </div>
14
+ </div>
15
+ `}}r.styles=n.AH`
16
+ :host {
17
+ display: block;
18
+ direction: var(--direction-locale, ltr);
19
+ --editor-container-inline-padding: 0;
20
+ }
21
+ .section {
22
+ border-bottom: 1px solid var(--color-border);
23
+ }
24
+ .header {
25
+ display: flex;
26
+ align-items: center;
27
+ justify-content: space-between;
28
+ padding: var(--space-3) var(--space-4);
29
+ cursor: pointer;
30
+ user-select: none;
31
+ }
32
+ .title {
33
+ font-size: var(--text-md);
34
+ font-weight: 600;
35
+ color: var(--color-text);
36
+ letter-spacing: 0.01em;
37
+ }
38
+ .chevron {
39
+ width: 16px;
40
+ height: 16px;
41
+ transition: transform var(--duration-normal) var(--ease-default), color var(--duration-fast) var(--ease-default);
42
+ color: var(--color-text-faint);
43
+ }
44
+ .header:hover .chevron {
45
+ color: var(--color-text-muted);
46
+ }
47
+ .chevron.open {
48
+ transform: rotate(180deg);
49
+ }
50
+ .content {
51
+ overflow: hidden;
52
+ transition: max-height var(--duration-normal) var(--ease-default), opacity var(--duration-fast) var(--ease-default);
53
+ max-height: 0;
54
+ opacity: 0;
55
+ }
56
+ .content.open {
57
+ max-height: 1200px;
58
+ opacity: 1;
59
+ }
60
+ .content-inner {
61
+ padding: var(--space-3) var(--space-4) var(--space-3) var(--space-4);
62
+ }
63
+ `,r.properties={label:{type:String},open:{type:Boolean},persistKey:{type:String}},customElements.define("cdtr-editor-section",r);const i=(e,t)=>n.qy`
64
+ <cdtr-editor-section
65
+ .label=${e.label}
66
+ .open=${!1!==e.open}
67
+ .persistKey=${e.persistKey||""}
68
+ >
69
+ ${t}
70
+ </cdtr-editor-section>
71
+ `},40648(e,t,o){o.d(t,{Q:()=>i,i:()=>r});const n="cdtr:section-open";function s(){try{const e=localStorage.getItem(n);return e?JSON.parse(e):{}}catch(e){return{}}}function r(e){if(!e)return;const t=s();return Object.prototype.hasOwnProperty.call(t,e)?!!t[e]:void 0}function i(e,t){if(!e)return;const o=s();o[e]=!!t,function(e){try{localStorage.setItem(n,JSON.stringify(e))}catch(e){}}(o)}},37654(e,t,o){o.r(t),o.d(t,{SettingEditor:()=>c});var n=o(59929),s=o(36565);o(12258);const r=n.JW`<path d="M4 16H20V5H4V16ZM13 18V20H17V22H7V20H11V18H2.99C2.44 18 2 17.55 2 17V4.01C2 3.45 2.46 3 2.99 3H21.01C21.56 3 22 3.45 22 4.01V17C22 17.55 21.54 18 21.01 18H13Z"/>`,i=n.JW`<path d="M4 6H20V18H4V6ZM2 5C2 4.45 2.45 4 3 4H21C21.55 4 22 4.45 22 5V19C22 19.55 21.55 20 21 20H3C2.45 20 2 19.55 2 19V5ZM17 11C17 11.55 17.45 12 18 12C18.55 12 19 11.55 19 11C19 10.45 18.55 10 18 10C17.45 10 17 10.45 17 11Z"/>`,a=n.JW`<path d="M7 4V20H17V4H7ZM6 2H18C18.55 2 19 2.45 19 3V21C19 21.55 18.55 22 18 22H6C5.45 22 5 21.55 5 21V3C5 2.45 5.45 2 6 2ZM12 17C12.55 17 13 17.45 13 18C13 18.55 12.55 19 12 19C11.45 19 11 18.55 11 18C11 17.45 11.45 17 12 17Z"/>`;class c extends n.WF{constructor(){super(),this.onInspect=this.onInspect.bind(this),this.name="",this.element_ID=" ",this.cmds={onToggleDisplayMode:(e,t)=>{s.Ay.store().execCommand(`show_on_${e}`,t),this[`show_on_${e}`]=t},onChangeElementID(e){s.Ay.store().execCommand("element_ID",e.target.value)},onChangeName(e){s.Ay.store().execCommand("name",e.target.value)}}}onInspect(){if(s.Ay.components.length>0){const e=s.Ay.components[0].props;this.show_on_desktop=!!e.show_on_desktop,this.show_on_tablet=!!e.show_on_tablet,this.show_on_mobile=!!e.show_on_mobile,this.name=e.name||"",this.element_ID=e.element_ID||""}}connectedCallback(){super.connectedCallback(),s.Ay.on("select",this.onInspect),s.Ay.on("update",this.onInspect),this.onInspect()}disconnectedCallback(){super.disconnectedCallback(),s.Ay.off("select",this.onInspect),s.Ay.off("update",this.onInspect)}render(){const e="block"===s.Ay.getSelectedComponent()[0].type;return n.qy`
72
+ ${e?n.qy`<cdtr-editor-section label="display_mode" .open=${!0}>
73
+ <div class="device-toggle-row">
74
+ <div
75
+ class="device-toggle-btn ${this.show_on_desktop?"active":""}"
76
+ @click=${()=>this.cmds.onToggleDisplayMode("desktop",!this.show_on_desktop)}
77
+ >
78
+ <svg width="14" height="14" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">${r}</svg>
79
+ <lang-text text="desktop"></lang-text>
80
+ </div>
81
+ <div
82
+ class="device-toggle-btn ${this.show_on_tablet?"active":""}"
83
+ @click=${()=>this.cmds.onToggleDisplayMode("tablet",!this.show_on_tablet)}
84
+ >
85
+ <svg width="14" height="14" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">${i}</svg>
86
+ <lang-text text="tablet"></lang-text>
87
+ </div>
88
+ <div
89
+ class="device-toggle-btn ${this.show_on_mobile?"active":""}"
90
+ @click=${()=>this.cmds.onToggleDisplayMode("mobile",!this.show_on_mobile)}
91
+ >
92
+ <svg width="14" height="14" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">${a}</svg>
93
+ <lang-text text="mobile"></lang-text>
94
+ </div>
95
+ </div>
96
+ </cdtr-editor-section>`:n.qy``}
97
+ <cdtr-editor-section label="properties" .open=${!0}>
98
+ <cdtr-row mt="1">
99
+ <cdtr-title><lang-text text="name"></lang-text></cdtr-title>
100
+ </cdtr-row>
101
+ <cdtr-row>
102
+ <cdtr-input
103
+ max="30"
104
+ @change=${this.cmds.onChangeName}
105
+ .value=${this.name}
106
+ style="width:100%"
107
+ ></cdtr-input>
108
+ </cdtr-row>
109
+ <cdtr-row mt="1">
110
+ <cdtr-title
111
+ ><lang-text text="ID_with_description"></lang-text
112
+ ></cdtr-title>
113
+ </cdtr-row>
114
+ <cdtr-row>
115
+ <cdtr-input
116
+ max="50"
117
+ @change=${this.cmds.onChangeElementID}
118
+ .value=${this.element_ID}
119
+ style="width:100%"
120
+ ></cdtr-input>
121
+ </cdtr-row>
122
+ </cdtr-editor-section>
123
+ `}}c.properties={name:{},element_ID:{},show_on_desktop:{},show_on_tablet:{},show_on_mobile:{}},c.styles=n.AH`
124
+ :host {
125
+ direction: var(--direction-locale);
126
+ }
127
+ .device-toggle-row {
128
+ display: flex;
129
+ gap: var(--space-2, 8px);
130
+ }
131
+ .device-toggle-btn {
132
+ display: flex;
133
+ align-items: center;
134
+ gap: var(--space-1, 4px);
135
+ padding: var(--space-2, 8px) var(--space-3, 12px);
136
+ border: none;
137
+ border-radius: var(--radius-sm, 6px);
138
+ cursor: pointer;
139
+ color: var(--color-text-faint, #bbb);
140
+ background: var(--color-bg-muted, #f4f4f6);
141
+ transition: background var(--duration-fast, 120ms) var(--ease-default, ease),
142
+ color var(--duration-fast, 120ms) var(--ease-default, ease);
143
+ font-size: var(--text-xs, 12px);
144
+ }
145
+ .device-toggle-btn:hover {
146
+ background: #eaeaed;
147
+ color: var(--color-text-muted, #888);
148
+ }
149
+ .device-toggle-btn svg {
150
+ fill: currentColor;
151
+ flex-shrink: 0;
152
+ }
153
+ .device-toggle-btn.active {
154
+ background: var(--color-primary-soft, rgba(99, 102, 241, 0.08));
155
+ color: var(--color-primary, #6366f1);
156
+ }
157
+ `,customElements.define("cdtr-setting-editor",c)}}]);
Binary file
@@ -0,0 +1 @@
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7918],{47918(e,n,t){t.d(n,{default:()=>R});let o=!0;const a=e=>{{const{component:n,commands:t,helpers:a}=e,i=n.parent("col"),r=e=>"style"===e.text;return{select:e=>{let{changeTab:n,tab:t}=e;t.text||n("style")},tabs:e=>{const n=[{text:"style",selected:!0},{text:"interactions"},{text:"settings"}];return e?(n.forEach(n=>n.selected=n.text===e),n):n},layout:e=>{const{tab:a,changeTab:s,tabs:l}=e;return[{type:"heading",level:6,text:"image",active:()=>r(a)},{type:"gallery",active:()=>r(a),src:n.props.src,hasPreview:!0,previewWidth:n.props.style?.width,text:"openGalleryImage",justify:"flex-start",onChange:e=>{let n=e.detail;Array.isArray(n)&&(n=n[0]),t.execCommand("src",n.src)}},{type:"input",title:"altText",active:()=>r(a),value:n.props.alt||"",onChange:e=>{const n=e.target.value;t.execCommand("alt",n)}},{type:"input",title:"add_urlAddress_from_media_site",active:()=>r(a),value:n.props.src||"",onChange:e=>{const n=e.target.value;t.execCommand("src",n)}},{type:"checkbox",title:"fullWidthOnMobile",checked:!!n.props.isFullWidthOnMobile,active:()=>r(a),onChange:e=>{const n=e.target.checked;t.execCommand("isFullWidthOnMobile",n)}},{type:"heading",level:6,text:"size",active:()=>r(a)},{type:"checkbox",title:"keep_ratio",checked:!!o,active:()=>r(a),onChange:e=>{o=!o,s("style")}},{type:"slider",min:10,title:"size",active:()=>r(a)&&o,max:o?1e3:i?.element?.offsetWidth,value:parseInt(n.props.style.width),onInput:e=>{const n=e.target.value;t.execCommand("style",{width:n+"px",height:"auto"})}},{type:"slider",min:10,title:"width",active:()=>r(a)&&!o,max:o?1e3:i?.element?.offsetWidth,value:parseInt(n.props.style.width),onInput:e=>{const o=e.target.value,a=n.atomElement.getBoundingClientRect().height;t.execCommand("style",{width:o+"px",height:a+"px"})}},{type:"slider",min:10,title:"height",active:()=>r(a)&&!o,max:2*i?.element?.offsetWidth,value:parseInt(n.props.style.height),onInput:e=>{const o=e.target.value,a=n.atomElement.getBoundingClientRect().width;t.execCommand("style",{height:o+"px",width:a+"px"})}},{type:"heading",level:6,text:"border_design",active:()=>r(a)},{type:"radius",title:"radius",active:()=>r(a),min:0,max:parseInt(n.props.style.width)/2,value:parseInt(n.props.style.borderRadius),elementId:n.id,borderTopRightRadius:parseInt(n.props.style.borderTopRightRadius),borderTopLeftRadius:parseInt(n.props.style.borderTopLeftRadius),borderBottomRightRadius:parseInt(n.props.style.borderBottomRightRadius),borderBottomLeftRadius:parseInt(n.props.style.borderBottomLeftRadius),onInput:e=>{const n=e.target.json;t.execCommand("style",{borderTopRightRadius:n.borderTopRightRadius+"px",borderTopLeftRadius:n.borderTopLeftRadius+"px",borderBottomRightRadius:n.borderBottomRightRadius+"px",borderBottomLeftRadius:n.borderBottomLeftRadius+"px",borderRadius:null})}},{type:"heading",level:6,text:"alignment",active:()=>r(a)},{type:"dropdown",title:"horizontal_align",active:()=>r(a),value:"auto"===n.props.style.marginLeft&&"auto"===n.props.style.marginRight?"center":"auto"===n.props.style.marginLeft?"right":"left",items:[{value:"left",label:"left"},{value:"center",label:"center"},{value:"right",label:"right"}],onChange:e=>{const n=e.target.value,o={marginLeft:null,marginRight:null};"center"===n?(o.marginLeft="auto",o.marginRight="auto"):"right"===n?(o.marginLeft="auto",o.marginRight="0"):(o.marginLeft="0",o.marginRight="auto"),t.execCommand("style",o)}},{type:"dropdown",title:"vertical_align",active:()=>r(a),value:n.props.style.verticalAlign||"top",items:[{value:"top",label:"top"},{value:"middle",label:"middle"},{value:"bottom",label:"bottom"}],onChange:e=>{const n=e.target.value;t.execCommand("style",{verticalAlign:n})}},{type:"heading",level:6,text:"ai",active:()=>r(a)},{type:"imagePrompt",active:()=>r(a),onChange:e=>{e.target.value}},{type:"heading",level:6,text:"link",active:()=>"interactions"===a.text},{type:"linkpicker",href:n.props.onClick?.link,protocol:n.props.onClick?.link?.protocol,target:n.props.onClick?.link?.target,autofocus:!0,active:()=>"interactions"===a.text,onChange:e=>{const n={link:e.target.value};t.execCommand("onClick",n)}}]}}}};var i=t(52144);const r=()=>({set:(e,n,t)=>{switch(n){case"src":case"isFullWidthOnMobile":case"isOpenWithModal":case"isCircle":case"alt":case"onClick":return e[n]=t,!0;case"style":if("object"==typeof t)return e[n]=(0,i.A)(e[n],t),!0}}});var s=t(72591),l=t.n(s),c=t(88639),d=t.n(c),p=t(88128),A=t.n(p),u=t(30855),m=t.n(u),g=t(93051),h=t.n(g),y=t(98481),E={};E.setAttributes=m(),E.insert=A().bind(null,"head"),E.domAPI=d(),E.insertStyleElement=h();l()(y.A,E);const f=y.A&&y.A.locals?y.A.locals:void 0;function v(e){const n=document.createElement("div");n.className=f.wrapper;const t=document.createElement("div");t.className=f.skeleton;const o=document.createElement("div");o.className=f.shimmer,t.appendChild(o);const a=document.createElement("div");a.className=f.scanline,t.appendChild(a);const i=document.createElement("div");i.className=f.imageContainer,i.appendChild(e);let r=!1;function s(){if(!r)return;r=!1,n.classList.remove(f.loading),n.classList.add(f.revealed),e.classList.remove(f.imageHidden),e.classList.add(f.imageRevealed);const t=()=>{n.classList.remove(f.revealed),e.classList.remove(f.imageRevealed),e.removeEventListener("animationend",t)};e.addEventListener("animationend",t)}return e.addEventListener("load",s),e.addEventListener("error",s),{wrapper:n,showLoader:function(){(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||e.src&&!e.complete)&&(r=!0,n.classList.add(f.loading),e.classList.add(f.imageHidden))},hideLoader:s,wrap:function(e){n.appendChild(t),n.appendChild(i),e.appendChild(n)},skeleton:t}}var C=t(13681),b=t(86319);const w=(e,n)=>b.M.get("lang",e)||n;function x(e){const n=e?.props?.src;if(!n)return;const t=new Image;t.crossOrigin="anonymous";let o=!1;t.addEventListener("load",()=>o=!0),t.src=n;const a=document.createElement("div");a.style.cssText="\n position: fixed; inset: 0; z-index: 10000;\n display: flex; flex-direction: column; align-items: center; justify-content: center;\n gap: 16px; background: rgba(0,0,0,0.7);\n font-family: var(--font-family, Arial, Helvetica, sans-serif);\n ";const i=document.createElement("div");i.style.cssText="position: relative; line-height: 0; touch-action: none;";const r=document.createElement("img");r.src=n,r.draggable=!1,r.style.cssText="display: block; user-select: none; pointer-events: none; -webkit-user-drag: none;";const s=document.createElement("div");s.style.cssText="\n position: absolute; box-sizing: border-box;\n border: 1px solid #fff; cursor: move;\n box-shadow: 0 0 0 9999px rgba(0,0,0,0.5);\n ";const l=["nw","ne","sw","se"],c={};l.forEach(e=>{const n=document.createElement("div"),t="n"===e[0]?"top: -6px;":"bottom: -6px;",o="w"===e[1]?"left: -6px;":"right: -6px;",a="nw"===e||"se"===e?"nwse-resize":"nesw-resize";n.style.cssText=`\n position: absolute; width: 12px; height: 12px; ${t} ${o}\n background: #fff; border-radius: 2px; cursor: ${a};\n `,n.dataset.corner=e,s.appendChild(n),c[e]=n});const d=document.createElement("div");d.style.cssText="position: relative; z-index: 1; display: flex; gap: 12px;";const p=(e,n)=>{const t=document.createElement("button");return t.type="button",t.textContent=e,t.style.cssText=`\n padding: 8px 20px; border-radius: 8px; border: none; cursor: pointer;\n font-family: inherit; font-size: 14px; font-weight: 600;\n ${n?"background: #6b4eff; color: #fff;":"background: rgba(255,255,255,0.15); color: #fff;"}\n `,t},A=p(w("cancel","Cancel"),!1),u=p(w("apply","Apply"),!0);d.append(A,u);const m=document.createElement("div");m.style.cssText="\n width: 44px; height: 44px; border-radius: 50%;\n border: 3px solid rgba(255,255,255,0.25); border-top-color: #fff;\n ";const g=m.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:800,iterations:1/0});i.style.visibility="hidden",u.disabled=!0,u.style.opacity="0.5",u.style.cursor="default";const h={x:0,y:0,w:0,h:0};let y=0,E=0;function f(){s.style.left=`${h.x}px`,s.style.top=`${h.y}px`,s.style.width=`${h.w}px`,s.style.height=`${h.h}px`}const v=(e,n,t)=>Math.max(n,Math.min(t,e));let b=null,x=0,k=0,B=null;function L(e,n){e.preventDefault(),e.stopPropagation(),b=n,x=e.clientX,k=e.clientY,B={...h},window.addEventListener("pointermove",R),window.addEventListener("pointerup",S)}function R(e){if(!b)return;const n=e.clientX-x,t=e.clientY-k;if("move"===b)h.x=v(B.x+n,0,y-h.w),h.y=v(B.y+t,0,E-h.h);else{const e=B.x+B.w,o=B.y+B.h;b.includes("w")&&(h.x=v(B.x+n,0,e-24),h.w=e-h.x),b.includes("e")&&(h.w=v(B.w+n,24,y-h.x)),b.includes("n")&&(h.y=v(B.y+t,0,o-24),h.h=o-h.y),b.includes("s")&&(h.h=v(B.h+t,24,E-h.y))}f()}function S(){b=null,window.removeEventListener("pointermove",R),window.removeEventListener("pointerup",S)}function M(){window.removeEventListener("pointermove",R),window.removeEventListener("pointerup",S),document.removeEventListener("keydown",D),a.remove()}function D(e){"Escape"===e.key&&M()}s.addEventListener("pointerdown",e=>L(e,"move")),l.forEach(e=>c[e].addEventListener("pointerdown",n=>L(n,c[e].dataset.corner))),A.addEventListener("click",M),u.addEventListener("click",function(){const e=r.naturalWidth/y,n=o?t:r,a=Math.round(h.x*e),i=Math.round(h.y*e),s=Math.max(1,Math.round(h.w*e)),l=Math.max(1,Math.round(h.h*e)),c=document.createElement("canvas");let d;c.width=s,c.height=l,c.getContext("2d").drawImage(n,a,i,s,l,0,0,s,l);try{d=c.toDataURL("image/png")}catch(e){return console.error("Crop export failed (tainted canvas / CORS):",e),void alert(w("crop_cors_error","This image can’t be cropped in the browser because it’s served without CORS headers. Re-upload it through the gallery and try again."))}C.vP.dispatch("on:upload-file",{image:d,type:"base64"}),M()}),a.addEventListener("pointerdown",e=>{e.target===a&&M()}),document.addEventListener("keydown",D),r.addEventListener("load",()=>{const e=r.naturalWidth,n=r.naturalHeight,t=Math.min(.8*window.innerWidth,e),o=.7*window.innerHeight,a=Math.min(t/e,o/n,1);y=Math.round(e*a),E=Math.round(n*a),r.style.width=`${y}px`,r.style.height=`${E}px`,h.x=Math.round(.1*y),h.y=Math.round(.1*E),h.w=Math.round(.8*y),h.h=Math.round(.8*E),f(),g.cancel(),m.remove(),i.style.visibility="visible",u.disabled=!1,u.style.opacity="",u.style.cursor="pointer"}),r.addEventListener("error",()=>{console.error("Cropper: failed to load image",n),M()}),i.append(r,s),a.append(i,m,d),document.body.appendChild(a),r.complete&&r.naturalWidth&&r.dispatchEvent(new Event("load"))}var k=t(44217),B={};B.setAttributes=m(),B.insert=A().bind(null,"head"),B.domAPI=d(),B.insertStyleElement=h();l()(k.A,B);const L=k.A&&k.A.locals?k.A.locals:void 0,R=()=>{const e="image";return{name:e,create:n=>{const{createElement:t,compose:o,helpers:i}=n,{arrayToString:s,mergeDiff:l}=i,c=document.createElement("img"),d=document.createElement("div");o.props.style&&!parseInt(o.props.style.height)&&(o.props.style.height="auto"),c.addEventListener("drop",e=>{e.preventDefault();var n=e.dataTransfer.getData("text/html");const t=document.createElement("div");t.innerHTML=n;const a=t.querySelector("img");a&&a.src&&o.editor.store().updateComponent(o,"src",a.src)}),c.draggable=!0,c.src=o.props.src;const p=s(o.classList);c.className=s(p,"editor-image",L.image),d.append(c);const A=v(c);A.wrap(d);let u=o.props.src;o.props.src&&A.showLoader();const m=document.createElement("button");m.type="button",m.className=f.cropButton;const g=b.M.get("lang","crop_image")||"Crop image";function h(e){const n=e.target;n.classList.contains("amazingbar-content-wrapper")&&"INPUT"!==n.tagName&&"TEXTAREA"!==n.tagName&&("Delete"!==e.key&&"Backspace"!==e.key||y.commands.remove())}m.title=g,m.setAttribute("aria-label",g),m.innerHTML='<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 2v14a2 2 0 0 0 2 2h14"/><path d="M18 22V8a2 2 0 0 0-2-2H2"/></svg>',m.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),x(o)}),A.wrapper.appendChild(m),c.addEventListener("dblclick",()=>{const e=document.createElement("cdtr-gallery");e.opened=!0,e.multi=!0,document.body.append(e),e.addEventListener("file",n=>{let t=n.detail;Array.isArray(t)&&(t=t[0]),o.editor.store().execCommands([{key:"src",value:t.src},{key:"style",value:{height:"auto"}}]),e.opened=!1,setTimeout(()=>{e.remove()},1500)}),e.addEventListener("close",()=>{e.remove()})});const y=t({name:e,id:o.id,template:d,defaultProps:{style:{height:"auto",width:"200px"}},draggable:{group:"element"},droppable:{group:"element"},render:()=>{l(c,{style:o.props.style}),c.width=o.props.width||o.props.style.width,c.height=o.props.height||o.props.style.height,o.props.src&&o.props.src!==u&&(u=o.props.src,A.showLoader(!0)),l(c,{src:o.props.src}),l(c,{alt:o.props.alt})},resizeable:()=>d,handleBar:!0,validator:r(),schema:o.schema,onSelect:e=>{c.classList.add(e),document.addEventListener("keyup",h)},onDeselect:e=>{c.classList.remove(e),document.removeEventListener("keyup",h)},elementProps:o,remove:()=>{d.remove()},createEditor:a});let E=0,C=0,w=!1,k=!1,B=!1,R=!1;return c.addEventListener("dragover",e=>{e.preventDefault()}),c.addEventListener("dragstart",e=>{E=e.clientX,C=e.clientY,w=!0,k=!1,B=!1,R=!1}),c.addEventListener("drag",e=>{if(!w)return;const n=c.closest(".block-component")||c.closest("[data-block]")||c.parentElement;if(!n)return;const t=n.getBoundingClientRect(),o=t.width,a=t.left,i=e.clientX-a,r=.3*o,s=.7*o;if(i<r&&!k){k=!0,R=!1,B=!1;const e=y.parent("col");e&&e.commands.execCommand("justify","start")}else if(i>s&&!B){B=!0,R=!1,k=!1;const e=y.parent("col");e&&e.commands.execCommand("justify","end")}else if(i>=r&&i<=s&&!R){R=!0,k=!1,B=!1;const e=y.closest("col");e&&e.commands.execCommand("justify","center")}}),c.addEventListener("dragend",e=>{w=!1,k=!1,B=!1,R=!1}),y}}}},98481(e,n,t){t.d(n,{A:()=>s});var o=t(82001),a=t.n(o),i=t(40935),r=t.n(i)()(a());r.push([e.id,".lohuqKHS721dHgrbXSxR {\n position: relative;\n display: inline-block;\n overflow: hidden;\n}\n\n.svsvvszZebJje0J5_aR0 {\n position: relative;\n display: block;\n line-height: 0;\n}\n\n/* Crop / edit-image button — appears on hover over the image */\n.pQ89uz0UlGnGPEecwX2t {\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: 2;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n border-radius: 8px;\n color: #fff;\n background: rgba(0, 0, 0, 0.55);\n cursor: pointer;\n opacity: 0;\n transition: opacity 0.15s ease-out, background 0.15s ease-out;\n}\n\n.lohuqKHS721dHgrbXSxR:hover .pQ89uz0UlGnGPEecwX2t {\n opacity: 1;\n}\n\n.pQ89uz0UlGnGPEecwX2t:hover {\n background: rgba(0, 0, 0, 0.75);\n}\n\n.X_p_Nfsu3cFahVFu4_Bw {\n opacity: 0;\n transition: opacity 0.15s ease-out;\n}\n\n._6bzBNhs7hY6_EZJBee1 {\n animation: RDp05pdkytBCK3jwjH1H 0.4s ease-out forwards;\n}\n\n@keyframes RDp05pdkytBCK3jwjH1H {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n/* Skeleton overlay - light purple placeholder */\n.gT24aWaYLc3ogXj85wMz {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background: linear-gradient(\n 110deg,\n #e8e4f0 8%,\n #f0ecf8 18%,\n #e8e4f0 33%\n );\n background-size: 200% 100%;\n animation: _Mzf8MsKMSARt4xYISlA 1.5s ease-in-out infinite;\n pointer-events: none;\n}\n\n.lohuqKHS721dHgrbXSxR.MhfE6WSo5ganwIXH6eLf .gT24aWaYLc3ogXj85wMz {\n opacity: 1;\n z-index: 1;\n}\n\n.lohuqKHS721dHgrbXSxR:not(.MhfE6WSo5ganwIXH6eLf) .gT24aWaYLc3ogXj85wMz {\n opacity: 0;\n pointer-events: none;\n z-index: -1;\n transition: opacity 0.2s ease-out;\n}\n\n.lohuqKHS721dHgrbXSxR.MsTRDhZG2BCJz9_2FibU .gT24aWaYLc3ogXj85wMz {\n animation: j0DUaUfa5Px2EIxpK3zU 0.4s ease-out forwards;\n}\n\n@keyframes _Mzf8MsKMSARt4xYISlA {\n 0% {\n background-position: 200% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n}\n\n@keyframes j0DUaUfa5Px2EIxpK3zU {\n to {\n opacity: 0;\n }\n}\n\n/* Shimmer highlight sweep */\n.EcbfYuWAe3Ej6GnLZxPW {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background: linear-gradient(\n 90deg,\n transparent 0%,\n rgba(255, 255, 255, 0.4) 50%,\n transparent 100%\n );\n background-size: 50% 100%;\n animation: dOhdOxhPYbAyl0kAuAmR 2s ease-in-out infinite;\n}\n\n@keyframes dOhdOxhPYbAyl0kAuAmR {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(200%);\n }\n}\n\n/* Print-style scanline */\n.ixwwhz1RPbWh52COfXpg {\n position: absolute;\n left: 0;\n right: 0;\n height: 2px;\n background: linear-gradient(\n to bottom,\n transparent,\n rgba(255, 255, 255, 0.6),\n transparent\n );\n animation: qDDvb69LDcaVxWWlah1p 1.2s ease-in-out infinite;\n box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);\n}\n\n@keyframes qDDvb69LDcaVxWWlah1p {\n 0% {\n top: 0;\n opacity: 1;\n }\n 90% {\n top: 100%;\n opacity: 0.8;\n }\n 100% {\n top: 100%;\n opacity: 0;\n }\n}\n","",{version:3,sources:["webpack://./../web-editors/image-editor-component/lib/image-loader.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,qBAAqB;EACrB,gBAAgB;AAClB;;AAEA;EACE,kBAAkB;EAClB,cAAc;EACd,cAAc;AAChB;;AAEA,+DAA+D;AAC/D;EACE,kBAAkB;EAClB,QAAQ;EACR,UAAU;EACV,UAAU;EACV,oBAAoB;EACpB,mBAAmB;EACnB,uBAAuB;EACvB,WAAW;EACX,YAAY;EACZ,UAAU;EACV,YAAY;EACZ,kBAAkB;EAClB,WAAW;EACX,+BAA+B;EAC/B,eAAe;EACf,UAAU;EACV,6DAA6D;AAC/D;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,+BAA+B;AACjC;;AAEA;EACE,UAAU;EACV,kCAAkC;AACpC;;AAEA;EACE,sDAA6C;AAC/C;;AAEA;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,gDAAgD;AAChD;EACE,kBAAkB;EAClB,MAAQ;EAAR,QAAQ;EAAR,SAAQ;EAAR,OAAQ;EACR;;;;;GAKC;EACD,0BAA0B;EAC1B,yDAAoD;EACpD,oBAAoB;AACtB;;AAEA;EACE,UAAU;EACV,UAAU;AACZ;;AAEA;EACE,UAAU;EACV,oBAAoB;EACpB,WAAW;EACX,iCAAiC;AACnC;;AAEA;EACE,sDAAiD;AACnD;;AAEA;EACE;IACE,2BAA2B;EAC7B;EACA;IACE,4BAA4B;EAC9B;AACF;;AAEA;EACE;IACE,UAAU;EACZ;AACF;;AAEA,4BAA4B;AAC5B;EACE,kBAAkB;EAClB,MAAQ;EAAR,QAAQ;EAAR,SAAQ;EAAR,OAAQ;EACR;;;;;GAKC;EACD,yBAAyB;EACzB,uDAA+C;AACjD;;AAEA;EACE;IACE,4BAA4B;EAC9B;EACA;IACE,2BAA2B;EAC7B;AACF;;AAEA,yBAAyB;AACzB;EACE,kBAAkB;EAClB,OAAO;EACP,QAAQ;EACR,WAAW;EACX;;;;;GAKC;EACD,yDAAiD;EACjD,4CAA4C;AAC9C;;AAEA;EACE;IACE,MAAM;IACN,UAAU;EACZ;EACA;IACE,SAAS;IACT,YAAY;EACd;EACA;IACE,SAAS;IACT,UAAU;EACZ;AACF",sourcesContent:[".wrapper {\n position: relative;\n display: inline-block;\n overflow: hidden;\n}\n\n.imageContainer {\n position: relative;\n display: block;\n line-height: 0;\n}\n\n/* Crop / edit-image button — appears on hover over the image */\n.cropButton {\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: 2;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n border-radius: 8px;\n color: #fff;\n background: rgba(0, 0, 0, 0.55);\n cursor: pointer;\n opacity: 0;\n transition: opacity 0.15s ease-out, background 0.15s ease-out;\n}\n\n.wrapper:hover .cropButton {\n opacity: 1;\n}\n\n.cropButton:hover {\n background: rgba(0, 0, 0, 0.75);\n}\n\n.imageHidden {\n opacity: 0;\n transition: opacity 0.15s ease-out;\n}\n\n.imageRevealed {\n animation: imageFadeIn 0.4s ease-out forwards;\n}\n\n@keyframes imageFadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n/* Skeleton overlay - light purple placeholder */\n.skeleton {\n position: absolute;\n inset: 0;\n background: linear-gradient(\n 110deg,\n #e8e4f0 8%,\n #f0ecf8 18%,\n #e8e4f0 33%\n );\n background-size: 200% 100%;\n animation: skeletonShimmer 1.5s ease-in-out infinite;\n pointer-events: none;\n}\n\n.wrapper.loading .skeleton {\n opacity: 1;\n z-index: 1;\n}\n\n.wrapper:not(.loading) .skeleton {\n opacity: 0;\n pointer-events: none;\n z-index: -1;\n transition: opacity 0.2s ease-out;\n}\n\n.wrapper.revealed .skeleton {\n animation: skeletonFadeOut 0.4s ease-out forwards;\n}\n\n@keyframes skeletonShimmer {\n 0% {\n background-position: 200% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n}\n\n@keyframes skeletonFadeOut {\n to {\n opacity: 0;\n }\n}\n\n/* Shimmer highlight sweep */\n.shimmer {\n position: absolute;\n inset: 0;\n background: linear-gradient(\n 90deg,\n transparent 0%,\n rgba(255, 255, 255, 0.4) 50%,\n transparent 100%\n );\n background-size: 50% 100%;\n animation: shimmerSweep 2s ease-in-out infinite;\n}\n\n@keyframes shimmerSweep {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(200%);\n }\n}\n\n/* Print-style scanline */\n.scanline {\n position: absolute;\n left: 0;\n right: 0;\n height: 2px;\n background: linear-gradient(\n to bottom,\n transparent,\n rgba(255, 255, 255, 0.6),\n transparent\n );\n animation: scanlineMove 1.2s ease-in-out infinite;\n box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);\n}\n\n@keyframes scanlineMove {\n 0% {\n top: 0;\n opacity: 1;\n }\n 90% {\n top: 100%;\n opacity: 0.8;\n }\n 100% {\n top: 100%;\n opacity: 0;\n }\n}\n"],sourceRoot:""}]),r.locals={wrapper:"lohuqKHS721dHgrbXSxR",imageContainer:"svsvvszZebJje0J5_aR0",cropButton:"pQ89uz0UlGnGPEecwX2t",imageHidden:"X_p_Nfsu3cFahVFu4_Bw",imageRevealed:"_6bzBNhs7hY6_EZJBee1",imageFadeIn:"RDp05pdkytBCK3jwjH1H",skeleton:"gT24aWaYLc3ogXj85wMz",skeletonShimmer:"_Mzf8MsKMSARt4xYISlA",loading:"MhfE6WSo5ganwIXH6eLf",revealed:"MsTRDhZG2BCJz9_2FibU",skeletonFadeOut:"j0DUaUfa5Px2EIxpK3zU",shimmer:"EcbfYuWAe3Ej6GnLZxPW",shimmerSweep:"dOhdOxhPYbAyl0kAuAmR",scanline:"ixwwhz1RPbWh52COfXpg",scanlineMove:"qDDvb69LDcaVxWWlah1p"};const s=r},44217(e,n,t){t.d(n,{A:()=>s});var o=t(82001),a=t.n(o),i=t(40935),r=t.n(i)()(a());r.push([e.id,".YbsG1_k3QD06_W0gNo53{\n display: block;\n max-width: 100%;\n}","",{version:3,sources:["webpack://./../web-editors/image-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;IACI,cAAc;IACd,eAAe;AACnB",sourcesContent:[".image{\n display: block;\n max-width: 100%;\n}"],sourceRoot:""}]),r.locals={image:"YbsG1_k3QD06_W0gNo53"};const s=r},13681(e,n,t){t.d(n,{vP:()=>d});const o=window.cdtrSignalKey||`___${Math.random().toString(36).substr(2,9)}`;window.cdtrSignalKey=o,window[o]||(window[o]={});const a=window[o],i=window.__cdtrEvents||{};function r(e){return crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e)).then(e=>Array.from(new Uint8Array(e)).map(e=>e.toString(16).padStart(2,"0")).join(""))}function s(e){if(e.length%2!=0)throw new Error("Invalid hex string");const n=new Uint8Array(e.length/2);for(let t=0;t<e.length;t+=2)n[t/2]=parseInt(e.substr(t,2),16);return n}async function l(e){const n=await r(e),t=a[n];if(t){const e=await crypto.subtle.importKey("raw",s(n),{name:"AES-GCM"},!1,["encrypt","decrypt"]),o=await async function(e,n,t){const o=await crypto.subtle.decrypt({name:"AES-GCM",iv:n},e,t);return(new TextDecoder).decode(o)}(e,t.iv,t.encrypted);return JSON.parse(o)}return null}function c(e,n){if(i[e])for(const t in i[e])Object.prototype.hasOwnProperty.call(i[e],t)&&i[e][t].forEach(e=>e(n));Array.isArray(i["*"])&&i["*"].forEach(e=>e(n))}window.__cdtrEvents=i;const d={set:async function(e,n){const t=JSON.parse(JSON.stringify(n)),o=await r(e),l=await crypto.subtle.importKey("raw",s(o),{name:"AES-GCM"},!1,["encrypt","decrypt"]),d=await async function(e,n){const t=crypto.getRandomValues(new Uint8Array(12)),o=(new TextEncoder).encode(n),a=await crypto.subtle.encrypt({name:"AES-GCM",iv:t},e,o);return{iv:t,encrypted:new Uint8Array(a)}}(l,JSON.stringify(t));a[o]=d,i.set&&i.set[o]&&i.set[o].forEach(e=>e(t)),Array.isArray(i["*"])&&i["*"].forEach(e=>e(t)),c(e,t)},get:l,remove:async function(e){const n=await r(e);delete a[n]},on:async function(e,n,t){i[e]||(i[e]={});const o=await r(n);i[e][o]||(i[e][o]=[]),i[e][o].push(e=>{!function(){const e=(new Error).stack;if(e&&e.indexOf(" at <anonymous>:1")>-1)throw console.warn("Function call blocked: Detected console execution."),new Error("Function call blocked: Detected console execution.")}(),t(e)});const a=await l(n);return a&&t(a),o},off:function(e,n){i[e]&&i[e][n]&&delete i[e][n]},dispatch:c,OPTIONS:{SET:"set"}}}}]);
Binary file
@@ -1,17 +1,14 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7937],{67937(t,e,n){n.r(e),n.d(e,{EditorTabItem:()=>o});var i=n(59929);class o extends i.WF{constructor(){super()}focus(){const t=this.shadowRoot.querySelector(".tab-btn");t?t.focus():super.focus()}onClickItem(t){this.value=t,this.dispatchEvent(new UIEvent("change",{view:window,bubbles:!0,cancelable:!0}))}handleKeyDown(t){if("Enter"===t.key||" "===t.key)return t.preventDefault(),t.stopPropagation(),void this.onClickItem(this.icon);["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.dispatchEvent(new CustomEvent("arrow-navigation",{detail:{key:t.key,currentIcon:this.icon},bubbles:!0,cancelable:!0})))}factory(){let t="fill:currentColor;color:inherit;width:18px;height:18px;";switch(this.icon){case"box-shadow":return n.e(1456).then(n.bind(n,11456)),i.qy`<cdtr-box-shadow-icon iconStyle=${t}></cdtr-box-shadow-icon>`;case"design":case"style":return n.e(9162).then(n.bind(n,59162)),i.qy`<cdtr-design-icon iconStyle=${t}></cdtr-design-icon>`;case"text":case"typography":return n.e(9089).then(n.bind(n,59089)),i.qy`<cdtr-text-icon iconStyle=${t}></cdtr-text-icon>`;case"animations":return n.e(9184).then(n.bind(n,29184)),i.qy`<cdtr-animation-icon iconStyle=${t}></cdtr-animation-icon>`;case"settings":return n.e(4114).then(n.bind(n,84114)),i.qy`<cdtr-setting-icon iconStyle=${t}></cdtr-setting-icon>`;case"qr":return i.qy`<img style="width:16px;height:16px;" alt="qr" width="16" height="16" src="https://img.creaditor.ai/images/qr?link=https%3A%2F%2Fexample.com&size=20" />`;case"link":case"interactions":return n.e(5428).then(n.bind(n,85428)),i.qy`<cdtr-link-icon iconStyle=${t}></cdtr-link-icon>`;case"spacing":return n.e(365).then(n.bind(n,50365)),i.qy`<cdtr-spacing-icon iconStyle=${t}></cdtr-spacing-icon>`;case"background":case"image":case"giphy":return n.e(1452).then(n.bind(n,61452)),i.qy`<cdtr-background-icon iconStyle=${t}></cdtr-background-icon>`;case"video":return n.e(7759).then(n.bind(n,97759)),i.qy`<cdtr-video-icon iconStyle=${t}></cdtr-video-icon>`;case"list-check":return n.e(6459).then(n.bind(n,16459)),i.qy`<cdtr-list-check-icon iconStyle=${t}></cdtr-list-check-icon>`;case"time":return n.e(307).then(n.bind(n,307)),i.qy`<cdtr-time-icon iconStyle=${t}></cdtr-time-icon>`;case"icons":return i.qy`<cdtr-icon icon="emoji" .width=${18} .height=${18} color="currentColor"></cdtr-icon>`;case"business":return i.qy`<cdtr-icon icon="business" .width=${18} .height=${18} color="currentColor"></cdtr-icon>`;case"modal":return i.qy`<cdtr-icon icon="page" .width=${18} .height=${18} color="currentColor"></cdtr-icon>`;case"popup":return i.qy`<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM7 6H11V10H7V6ZM7 12H17V14H7V12ZM7 16H17V18H7V16ZM13 7H17V9H13V7Z"></path></svg>`;case"list-settings":return n.e(8676).then(n.bind(n,48676)),i.qy`<cdtr-list-settings-icon iconStyle=${t}></cdtr-list-settings-icon>`;case"automations":return n.e(8305).then(n.bind(n,58305)),i.qy`<cdtr-automation-icon iconStyle=${t}></cdtr-automation-icon>`;case"ai":return i.qy`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20.25 21" preserveAspectRatio="xMidYMid meet">
2
- <defs><clippath id="ai-clip"><path d="M 0 0.375 L 19.527344 0.375 L 19.527344 19.902344 L 0 19.902344 Z" clip-rule="nonzero"></path></clippath></defs>
3
- <g clip-path="url(#ai-clip)"><path fill="#9747ff" d="M 12.316406 0.679688 C 12.160156 0.382812 11.734375 0.382812 11.574219 0.679688 L 11.132812 1.507812 C 11.09375 1.582031 11.035156 1.640625 10.960938 1.679688 L 10.128906 2.117188 C 9.828125 2.277344 9.828125 2.699219 10.128906 2.855469 L 10.960938 3.296875 C 11.035156 3.335938 11.09375 3.394531 11.132812 3.46875 L 11.574219 4.296875 C 11.734375 4.59375 12.160156 4.59375 12.316406 4.296875 L 12.757812 3.46875 C 12.800781 3.394531 12.859375 3.335938 12.933594 3.296875 L 13.765625 2.855469 C 14.0625 2.699219 14.0625 2.277344 13.765625 2.117188 L 12.933594 1.679688 C 12.859375 1.640625 12.800781 1.582031 12.757812 1.507812 Z M 15.167969 16.96875 L 16.875 17.617188 L 16.226562 15.917969 Z M 16.882812 13.496094 L 5.136719 1.816406 C 4.15625 0.839844 2.558594 0.839844 1.574219 1.816406 L 0.984375 2.40625 C 0 3.382812 0 4.96875 0.984375 5.949219 L 12.730469 17.625 C 12.929688 17.824219 13.273438 18.039062 13.542969 18.140625 L 17.152344 19.507812 C 18.167969 19.890625 19.164062 18.902344 18.777344 17.890625 L 17.402344 14.300781 C 17.300781 14.035156 17.085938 13.695312 16.882812 13.496094 Z M 15.316406 14.296875 L 5.730469 4.769531 L 3.953125 6.535156 L 13.535156 16.066406 Z M 3.949219 3 L 4.542969 3.585938 L 2.765625 5.355469 L 2.171875 4.765625 C 1.84375 4.441406 1.84375 3.910156 2.171875 3.585938 L 2.761719 3 C 3.089844 2.671875 3.621094 2.671875 3.949219 3 Z M 4.550781 12.996094 C 4.390625 12.699219 3.964844 12.699219 3.808594 12.996094 L 3 14.503906 C 2.960938 14.578125 2.902344 14.640625 2.828125 14.679688 L 1.308594 15.480469 C 1.011719 15.636719 1.011719 16.058594 1.308594 16.214844 L 2.828125 17.015625 C 2.902344 17.054688 2.960938 17.117188 3 17.191406 L 3.808594 18.699219 C 3.964844 18.996094 4.390625 18.996094 4.550781 18.699219 L 5.355469 17.191406 C 5.394531 17.117188 5.453125 17.054688 5.527344 17.015625 L 7.046875 16.214844 C 7.34375 16.058594 7.34375 15.636719 7.046875 15.480469 L 5.527344 14.679688 C 5.453125 14.640625 5.394531 14.578125 5.355469 14.503906 Z M 17.355469 5.480469 C 17.199219 5.183594 16.773438 5.183594 16.613281 5.480469 L 16.027344 6.582031 C 15.988281 6.65625 15.929688 6.714844 15.855469 6.753906 L 14.746094 7.335938 C 14.449219 7.496094 14.449219 7.917969 14.746094 8.074219 L 15.855469 8.660156 C 15.929688 8.699219 15.988281 8.757812 16.027344 8.832031 L 16.613281 9.933594 C 16.773438 10.230469 17.199219 10.230469 17.355469 9.933594 L 17.945312 8.832031 C 17.984375 8.757812 18.042969 8.699219 18.117188 8.660156 L 19.226562 8.074219 C 19.523438 7.917969 19.523438 7.496094 19.226562 7.335938 L 18.117188 6.753906 C 18.042969 6.714844 17.984375 6.65625 17.945312 6.582031 Z" fill-opacity="1" fill-rule="evenodd"></path></g>
4
- </svg>`;default:return null}}render(){return i.qy`
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7937],{67937(e,t,o){o.r(t),o.d(t,{EditorTabItem:()=>a});var n=o(59929);class a extends n.WF{focus(){const e=this.shadowRoot.querySelector(".tab-btn");e?e.focus():super.focus()}onClickItem(e){this.value=e,this.dispatchEvent(new UIEvent("change",{view:window,bubbles:!0,cancelable:!0}))}handleKeyDown(e){if("Enter"===e.key||" "===e.key)return e.preventDefault(),e.stopPropagation(),void this.onClickItem(this.icon);["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new CustomEvent("arrow-navigation",{detail:{key:e.key,currentIcon:this.icon},bubbles:!0,cancelable:!0})))}render(){return n.qy`
5
2
  <button
6
3
  class="tab-btn ${this.selected?"selected":""}"
7
4
  data-icon="${this.icon}"
8
5
  tabindex="0"
9
- @keydown=${t=>this.handleKeyDown(t)}
6
+ @keydown=${e=>this.handleKeyDown(e)}
10
7
  @click=${()=>this.onClickItem(this.icon)}
11
8
  >
12
9
  <span class="label"><lang-text text="${this.icon}"></lang-text></span>
13
10
  </button>
14
- `}}o.styles=i.AH`
11
+ `}}a.styles=n.AH`
15
12
  :host {
16
13
  display: block;
17
14
  }
@@ -51,4 +48,4 @@
51
48
  color: var(--color-primary, #6366f1);
52
49
  font-weight: 600;
53
50
  }
54
- `,o.properties={icon:{},labelMode:{},selected:{}},customElements.define("cdtr-editor-tab-item",o)}}]);
51
+ `,a.properties={icon:{},selected:{}},customElements.define("cdtr-editor-tab-item",a)}}]);
Binary file