@creaditor/web-starterkit 1.0.16 → 1.0.18

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),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`
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:"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")},onRemoveBackground:()=>{this.background="",this.backgroundVideo="",this.backgroundInstance={},a.Ay.store().execCommand("background",null),a.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&&(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:"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})}_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;">
@@ -33,7 +33,7 @@
33
33
  ></lang-text></paper-button>
34
34
  <paper-button
35
35
  class="backgrounds"
36
- @click=${()=>a.A.dispatch("open_add_menu",{type:"backgrounds",disabledOptions:!0,target:n.Ay.components[0]})}
36
+ @click=${()=>n.A.dispatch("open_add_menu",{type:"backgrounds",disabledOptions:!0,target:a.Ay.components[0]})}
37
37
  ><lang-text
38
38
  text="backgrounds"
39
39
  ></lang-text></paper-button>
@@ -295,7 +295,7 @@
295
295
  paper-button.backgrounds:hover {
296
296
  background: #eaeaed;
297
297
  }
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`
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:()=>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`
299
299
  <div class="${t}">
300
300
  ${(this.items||[]).map((t,e)=>r.qy`
301
301
  <div class="swatch-item" @click=${()=>this.openPicker(e)}>
@@ -319,7 +319,7 @@
319
319
  </div>
320
320
  `)}
321
321
  </div>
322
- `}}n.styles=[i.L,r.AH`
322
+ `}}a.styles=[i.L,r.AH`
323
323
  :host {
324
324
  display: block;
325
325
  direction: var(--direction-locale, ltr);
@@ -367,12 +367,12 @@
367
367
  clip: rect(0,0,0,0);
368
368
  pointer-events: none;
369
369
  }
370
- `],n.properties={items:{type:Array},columns:{type:Number}},customElements.define("cdtr-color-swatch-group",n);const a=t=>r.qy`
370
+ `],a.properties={items:{type:Array},columns:{type:Number}},customElements.define("cdtr-color-swatch-group",a);const n=t=>r.qy`
371
371
  <cdtr-color-swatch-group
372
372
  .items=${t.items}
373
373
  .columns=${t.columns||2}
374
374
  ></cdtr-color-swatch-group>
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`
375
+ `},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`
376
376
  <div class="section">
377
377
  <div class="header" @click=${this.toggle}>
378
378
  <span class="title"><lang-text text="${this.label}"></lang-text></span>
@@ -386,7 +386,7 @@
386
386
  </div>
387
387
  </div>
388
388
  </div>
389
- `}}n.styles=r.AH`
389
+ `}}a.styles=r.AH`
390
390
  :host {
391
391
  display: block;
392
392
  direction: var(--direction-locale, ltr);
@@ -434,7 +434,7 @@
434
434
  .content-inner {
435
435
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-4);
436
436
  }
437
- `,n.properties={label:{type:String},open:{type:Boolean},persistKey:{type:String}},customElements.define("cdtr-editor-section",n);const a=(t,e)=>r.qy`
437
+ `,a.properties={label:{type:String,reflect:!0,attribute:"data-label"},open:{type:Boolean,reflect:!0},persistKey:{type:String}},customElements.define("cdtr-editor-section",a);const n=(t,e)=>r.qy`
438
438
  <cdtr-editor-section
439
439
  .label=${t.label}
440
440
  .open=${!1!==t.open}
@@ -442,4 +442,4 @@
442
442
  >
443
443
  ${e}
444
444
  </cdtr-editor-section>
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)}}}]);
445
+ `}}]);
Binary file
@@ -308,7 +308,7 @@
308
308
  .content-inner {
309
309
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-4);
310
310
  }
311
- `,i.properties={label:{type:String},open:{type:Boolean},persistKey:{type:String}},customElements.define("cdtr-editor-section",i);const s=(t,e)=>r.qy`
311
+ `,i.properties={label:{type:String,reflect:!0,attribute:"data-label"},open:{type:Boolean,reflect:!0},persistKey:{type:String}},customElements.define("cdtr-editor-section",i);const s=(t,e)=>r.qy`
312
312
  <cdtr-editor-section
313
313
  .label=${t.label}
314
314
  .open=${!1!==t.open}
@@ -727,7 +727,7 @@
727
727
  .icon="${this.isLocked?"lock":"unlock"}"
728
728
  ></cdtr-icon>
729
729
  </cdtr-button>
730
- </cdtr-row>`}}N.properties={value:{type:Number},json:{type:Object},onChange:{type:Function},borderTopRightRadius:{type:Number},borderTopLeftRadius:{type:Number},borderBottomRightRadius:{type:Number},borderBottomLeftRadius:{type:Number},isLocked:{type:Boolean},elementId:{type:String},radiusKey:{type:String}},customElements.define("cdtr-radius-editor",N);const O=t=>r.qy` <cdtr-editor-container>
730
+ </cdtr-row>`}}N.properties={value:{type:Number},json:{type:Object},onChange:{type:Function},borderTopRightRadius:{type:Number},borderTopLeftRadius:{type:Number},borderBottomRightRadius:{type:Number},borderBottomLeftRadius:{type:Number},isLocked:{type:Boolean},elementId:{type:String},radiusKey:{type:String}},customElements.define("cdtr-radius-editor",N);const D=t=>r.qy` <cdtr-editor-container>
731
731
  <cdtr-row>
732
732
  <cdtr-title><lang-text text="${t.title}"></lang-text></cdtr-title>
733
733
  </cdtr-row>
@@ -740,7 +740,7 @@
740
740
  .borderBottomRightRadius=${t.borderBottomRightRadius||t.value||0}
741
741
  .borderBottomLeftRadius=${t.borderBottomLeftRadius||t.value||0}
742
742
  ></cdtr-radius-editor>
743
- </cdtr-editor-container>`,D=t=>r.qy` <cdtr-editor-container>
743
+ </cdtr-editor-container>`,U=t=>r.qy` <cdtr-editor-container>
744
744
  <cdtr-title class="dir-lang"
745
745
  ><lang-text text="choose_your_duo_date"></lang-text
746
746
  ></cdtr-title>
@@ -748,7 +748,7 @@
748
748
  @change=${t.onChange}
749
749
  .value="${t.value}"
750
750
  ></cdtr-datetimepicker>
751
- </cdtr-editor-container>`,U=t=>{let e="";return t.bgColor&&(e+=`background:${t.bgColor};`),t.color&&(e+=`color:${t.color};`),r.qy` <cdtr-editor-container>
751
+ </cdtr-editor-container>`,O=t=>{let e="";return t.bgColor&&(e+=`background:${t.bgColor};`),t.color&&(e+=`color:${t.color};`),r.qy` <cdtr-editor-container>
752
752
  <paper-button fullwidth style=${e} @click=${t.onClick}
753
753
  ><lang-text text="${t.text}"></lang-text>${t.icon?r.qy`${" "}<cdtr-icon
754
754
  style="margin-right:5px;display:block;font-size:12px;"
@@ -1167,7 +1167,7 @@
1167
1167
  `:null}
1168
1168
  </cdtr-row>
1169
1169
  </cdtr-editor-container>
1170
- `;a.e(4217).then(a.bind(a,94217));a(45888);Promise.resolve().then(a.bind(a,58691));class pt extends r.WF{constructor(){super(),this.editor={},this.tabName="",this.factory=this.factory.bind(this),this.execCommandWrapper=this.execCommandWrapper.bind(this),this.connectWith=this.connectWith.bind(this),this.changeTab=this.changeTab.bind(this),this.$select=this.$select.bind(this),this.$update=this.$update.bind(this),this.handleJustifyContent=this.handleJustifyContent.bind(this),this.handleAlignItems=this.handleAlignItems.bind(this),this._onToggleAll=this._onToggleAll.bind(this),this._sectionsExpanded=!1}$select(){this.editor&&this.editor.select&&this.editor.select({changeTab:this.changeTab,tab:this.tabName}),this.connectWith("select")}$update(){this.connectWith("update")}_onToggleAll(){this._sectionsExpanded=!this._sectionsExpanded,this.querySelectorAll("cdtr-editor-section").forEach(t=>{t.open=this._sectionsExpanded,(0,lt.Q)(t.persistKey,t.open)})}_sectionScope(){return`${this.type||""}:${this.tabName||""}`}_applyPersistedOpen(t){const e=this._sectionScope();for(const a of t)if(a&&"section"===a.type){a.persistKey=`${e}::${a.label}`;const t=(0,lt.i)(a.persistKey);void 0!==t&&(a.open=t)}return t}connectedCallback(){super.connectedCallback(),l.Ay.on("update",this.$update),l.Ay.on("select",this.$select),this.addEventListener("toggle-all-sections",this._onToggleAll),this.connectWith("load")}disconnectedCallback(){super.disconnectedCallback(),l.Ay.off("update",this.$update),l.Ay.off("select",this.$select),this.removeEventListener("toggle-all-sections",this._onToggleAll)}connectWith(){const t=new UIEvent(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"update",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t);const e=l.Ay.components.find(t=>t.type===this.type);e&&"function"==typeof e.createEditor&&(this.component={...e},this.props=e.props,this.editor=e.createEditor(this.commandsBuilder()))}factory(t,e){if("function"==typeof t&&(t=t()),t.debug,"boolean"==typeof t.active&&!t.active)return null;if("function"==typeof t.active){if(!1===t.active())return null}const a=t.type;switch(a){case"background":return dt(t);case"datetime":return D(t);case"radius":return O(t);case"justifyContent":case"alignItems":return P(t,a);case"node":case"lit":case"custom":return t.node();case"button":return U(t);case"borderpicker":return j(t);case"linkpicker":return F(t);case"input":return s(t);case"dropdown":return n(t);case"fontSize":return d(t);case"fontFamily":return c(t);case"mergeTags":return G(t);case"boxShadow":return x(t);case"colorpicker":return p(t);case"slider":return h(t);case"divider":return w(t);case"heading":return v(t);case"option":return $(t);case"checkbox":return z(t);case"stringListBuilder":return _(t);case"chipsInput":return L(t);case"typography":return H(t);case"icons":return r.qy`<icons-gallery
1170
+ `;a.e(4217).then(a.bind(a,94217));a(45888);Promise.resolve().then(a.bind(a,58691));class pt extends r.WF{constructor(){super(),this.editor={},this.tabName="",this.factory=this.factory.bind(this),this.execCommandWrapper=this.execCommandWrapper.bind(this),this.connectWith=this.connectWith.bind(this),this.changeTab=this.changeTab.bind(this),this.$select=this.$select.bind(this),this.$update=this.$update.bind(this),this.handleJustifyContent=this.handleJustifyContent.bind(this),this.handleAlignItems=this.handleAlignItems.bind(this),this._onToggleAll=this._onToggleAll.bind(this),this._sectionsExpanded=!1}$select(){this.editor&&this.editor.select&&this.editor.select({changeTab:this.changeTab,tab:this.tabName}),this.connectWith("select")}$update(){this.connectWith("update")}_onToggleAll(){this._sectionsExpanded=!this._sectionsExpanded,this.querySelectorAll("cdtr-editor-section").forEach(t=>{t.open=this._sectionsExpanded,(0,lt.Q)(t.persistKey,t.open)})}_sectionScope(){return`${this.type||""}:${this.tabName||""}`}_applyPersistedOpen(t){const e=this._sectionScope();for(const a of t)if(a&&"section"===a.type){a.persistKey=`${e}::${a.label}`;const t=(0,lt.i)(a.persistKey);void 0!==t&&(a.open=t)}return t}connectedCallback(){super.connectedCallback(),l.Ay.on("update",this.$update),l.Ay.on("select",this.$select),this.addEventListener("toggle-all-sections",this._onToggleAll),this.connectWith("load")}disconnectedCallback(){super.disconnectedCallback(),l.Ay.off("update",this.$update),l.Ay.off("select",this.$select),this.removeEventListener("toggle-all-sections",this._onToggleAll)}connectWith(){const t=new UIEvent(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"update",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t);const e=l.Ay.components.find(t=>t.type===this.type);e&&"function"==typeof e.createEditor&&(this.component={...e},this.props=e.props,this.editor=e.createEditor(this.commandsBuilder()))}factory(t,e){if("function"==typeof t&&(t=t()),t.debug,"boolean"==typeof t.active&&!t.active)return null;if("function"==typeof t.active){if(!1===t.active())return null}const a=t.type;switch(a){case"background":return dt(t);case"datetime":return U(t);case"radius":return D(t);case"justifyContent":case"alignItems":return P(t,a);case"node":case"lit":case"custom":return t.node();case"button":return O(t);case"borderpicker":return j(t);case"linkpicker":return F(t);case"input":return s(t);case"dropdown":return n(t);case"fontSize":return d(t);case"fontFamily":return c(t);case"mergeTags":return G(t);case"boxShadow":return x(t);case"colorpicker":return p(t);case"slider":return h(t);case"divider":return w(t);case"heading":return v(t);case"option":return $(t);case"checkbox":return z(t);case"stringListBuilder":return _(t);case"chipsInput":return L(t);case"typography":return H(t);case"icons":return r.qy`<icons-gallery
1171
1171
  .selectedIcon=${t.selectedIcon}
1172
1172
  .useIconsApi=${!0===t.useIconsApi}
1173
1173
  .iconColor=${t.iconColor??"000000"}
@@ -1220,7 +1220,7 @@
1220
1220
  background: BLACK;
1221
1221
  color: #fff;
1222
1222
  }
1223
- `,pt.properties={type:{type:String},editor:{},tabName:{type:String},tabs:{type:Array},_sectionsExpanded:{type:Boolean,state:!0}},customElements.define("cdtr-editor-builder",pt)},40648(t,e,a){a.d(e,{Q:()=>s,i:()=>i});const r="cdtr:section-open";function o(){try{const t=localStorage.getItem(r);return t?JSON.parse(t):{}}catch(t){return{}}}function i(t){if(!t)return;const e=o();return Object.prototype.hasOwnProperty.call(e,t)?!!e[t]:void 0}function s(t,e){if(!t)return;const a=o();a[t]=!!e,function(t){try{localStorage.setItem(r,JSON.stringify(t))}catch(t){}}(a)}},92384(t,e,a){a.r(e),a.d(e,{FONT_WEIGHTS:()=>s,FontFamilyEditor:()=>n});var r=a(59929),o=a(40120),i=a(86319);const s=[{name:"Thin",value:100},{name:"Light",value:300},{name:"Regular",value:400},{name:"Medium",value:500},{name:"SemiBold",value:600},{name:"Bold",value:700},{name:"Black",value:900}];class n extends r.WF{constructor(){super(),this.onchangeFontWeight=t=>{const e=parseInt(t.target.value,10);Number.isNaN(e)||(this.weight=e,this.dispatchEvent(new CustomEvent("weightchange",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:e}})))},this.onchangeFontFamily=t=>{const e=t.target.value,a=this.fontFamilies.find(t=>t.name===e);if(!a)return void console.error("cant set font family, font family not founded..");(0,o.sw)(a),this.value=a.cssRule,this.name=e;const r=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(r)},this.onFilteredFonts=t=>{const e=t.target.value;this.filteredFonts=this.fontFamilies.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()))},this.filteredFonts=[],this.fontFamilies=[],this.showWeight=!1}async connectedCallback(){super.connectedCallback();const t=await(0,o.VH)(),e=Array.isArray(t)?t:[];this.filteredFonts=this.fontFamilies=e,e.forEach(t=>{t&&t.url&&t.id&&function(t){if(document.getElementById(t.id))return;const e=document.createElement("link");e.href=t.url,e.id=t.id,e.setAttribute("data-name",t.name),e.rel="stylesheet",e.type="text/css",document.head.appendChild(e)}(t)})}disconnectedCallback(){super.disconnectedCallback()}render(){const t=this.fontFamilies.find(t=>"string"==typeof t?.cssRule&&(-1!==t.cssRule.indexOf(this.value||"")||-1!==t.cssRule.indexOf(this.name||"")));t&&(this.name=t.name);const e=r.qy`<cdtr-dropdown
1223
+ `,pt.properties={type:{type:String},editor:{},tabName:{type:String},tabs:{type:Array},_sectionsExpanded:{type:Boolean,state:!0}},customElements.define("cdtr-editor-builder",pt)},92384(t,e,a){a.r(e),a.d(e,{FONT_WEIGHTS:()=>s,FontFamilyEditor:()=>n});var r=a(59929),o=a(40120),i=a(86319);const s=[{name:"Thin",value:100},{name:"Light",value:300},{name:"Regular",value:400},{name:"Medium",value:500},{name:"SemiBold",value:600},{name:"Bold",value:700},{name:"Black",value:900}];class n extends r.WF{constructor(){super(),this.onchangeFontWeight=t=>{const e=parseInt(t.target.value,10);Number.isNaN(e)||(this.weight=e,this.dispatchEvent(new CustomEvent("weightchange",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:e}})))},this.onchangeFontFamily=t=>{const e=t.target.value,a=this.fontFamilies.find(t=>t.name===e);if(!a)return void console.error("cant set font family, font family not founded..");(0,o.sw)(a),this.value=a.cssRule,this.name=e;const r=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(r)},this.onFilteredFonts=t=>{const e=t.target.value;this.filteredFonts=this.fontFamilies.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()))},this.filteredFonts=[],this.fontFamilies=[],this.showWeight=!1}async connectedCallback(){super.connectedCallback();const t=await(0,o.VH)(),e=Array.isArray(t)?t:[];this.filteredFonts=this.fontFamilies=e,e.forEach(t=>{t&&t.url&&t.id&&function(t){if(document.getElementById(t.id))return;const e=document.createElement("link");e.href=t.url,e.id=t.id,e.setAttribute("data-name",t.name),e.rel="stylesheet",e.type="text/css",document.head.appendChild(e)}(t)})}disconnectedCallback(){super.disconnectedCallback()}render(){const t=this.fontFamilies.find(t=>"string"==typeof t?.cssRule&&(-1!==t.cssRule.indexOf(this.value||"")||-1!==t.cssRule.indexOf(this.name||"")));t&&(this.name=t.name);const e=r.qy`<cdtr-dropdown
1224
1224
  style="width:100%"
1225
1225
  .value="${this.name}"
1226
1226
  @change=${this.onchangeFontFamily}
Binary file
@@ -1,11 +1,11 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5119],{15119(e,t,o){o.d(t,{default:()=>W});var n=o(96374),r=o(86319),l=o(59929);const a=e=>{{const{component:t,commands:o,helpers:a}=e;return{select:e=>{let{changeTab:t,tab:o}=e},tabs:e=>{const t=[{text:"style",selected:!0},{text:"interactions"},..."web"===r.M.get("config","channel")?[{text:"animations"}]:[],{text:"settings"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:a,changeTab:i,tabs:d}=e;const s=(r.M.get("components")||[]).filter(e=>e&&"block"===e.type&&e.props?.modalable),c=[{value:"",label:"modal_none"},...s.map((e,t)=>({value:e.id,label:e.props?.modalName||`modal ${t+1}`}))],p=t.props.modalBlockId||"",b=c.find(e=>e.value===p)?.label||"modal_none",u=[{type:"heading",level:6,text:"presets",active:()=>"style"===a.text&&"web"===r.M.get("config","channel")},{type:"custom",active:()=>"style"===a.text&&"web"===r.M.get("config","channel"),node:()=>{const e="web"===r.M.get("config","channel"),n={cart:"http://app.creaditor.com/assets/bullets/images/cart-icon.png",arrowRight:"http://app.creaditor.com/assets/bullets/images/1469020585_ic_keyboard_arrow_right_48px.png"},a=[{category:"Basic",presets:[{name:"Solid",style:{background:"#111111",color:"#ffffff",borderRadius:"6px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Pill",style:{background:"#2563eb",color:"#ffffff",borderRadius:"999px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Outline",style:{background:"transparent",color:"#111111",borderRadius:"6px",border:"1px solid #111111",borderWidth:"1px",borderColor:"#111111",boxShadow:null}},{name:"Soft",style:{background:"#eef2ff",color:"#3730a3",borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}}]},{category:"Gradients",presets:[{name:"Sunset",style:{background:"linear-gradient(135deg,#ff6a00,#ee0979)",color:"#ffffff",borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Ocean",style:{background:"linear-gradient(135deg,#2193b0,#6dd5ed)",color:"#ffffff",borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Grape",webOnly:!0,style:{background:"linear-gradient(135deg,#7b2ff7,#f107a3)",color:"#ffffff",borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Lime",webOnly:!0,style:{background:"linear-gradient(135deg,#11998e,#38ef7d)",color:"#ffffff",borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}}]},{category:"3D blocks",presets:[{name:"Orange",webOnly:!0,style:{background:"#ed8936",color:"#ffffff",borderRadius:"10px",padding:"14px 22px",fontWeight:700,border:"none",borderWidth:null,borderColor:null,boxShadow:"0px 5px 0px 0px #b45309"}},{name:"Green",webOnly:!0,style:{background:"#38a169",color:"#ffffff",borderRadius:"10px",padding:"14px 22px",fontWeight:700,border:"none",borderWidth:null,borderColor:null,boxShadow:"0px 5px 0px 0px #276749"}},{name:"Blue",webOnly:!0,style:{background:"#3182ce",color:"#ffffff",borderRadius:"10px",padding:"14px 22px",fontWeight:700,border:"none",borderWidth:null,borderColor:null,boxShadow:"0px 5px 0px 0px #2151a1"}},{name:"Red",webOnly:!0,style:{background:"#e53e3e",color:"#ffffff",borderRadius:"10px",padding:"14px 22px",fontWeight:700,border:"none",borderWidth:null,borderColor:null,boxShadow:"0px 5px 0px 0px #9b2c2c"}},{name:"Purple",webOnly:!0,style:{background:"#805ad5",color:"#ffffff",borderRadius:"10px",padding:"14px 22px",fontWeight:700,border:"none",borderWidth:null,borderColor:null,boxShadow:"0px 5px 0px 0px #553c9a"}},{name:"Dark",webOnly:!0,style:{background:"#2d3748",color:"#ffffff",borderRadius:"10px",padding:"14px 22px",fontWeight:700,border:"none",borderWidth:null,borderColor:null,boxShadow:"0px 5px 0px 0px #1a202c"}}]},{category:"Effects",presets:[{name:"Neon",webOnly:!0,style:{background:"#0a0a0a",color:"#39ff14",borderRadius:"8px",border:"1px solid #39ff14",borderWidth:"1px",borderColor:"#39ff14",boxShadow:"0 0 10px #39ff14, 0 0 22px rgba(57,255,20,0.5)"}},{name:"Glow",webOnly:!0,style:{background:"#7b2ff7",color:"#ffffff",borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 8px 24px rgba(123,47,247,0.55)"}},{name:"Glass",webOnly:!0,style:{background:"rgba(255,255,255,0.18)",color:"#111111",borderRadius:"12px",border:"1px solid rgba(255,255,255,0.6)",borderWidth:"1px",borderColor:"rgba(255,255,255,0.6)",backdropFilter:"blur(8px)",boxShadow:"0 4px 30px rgba(0,0,0,0.1)"}},{name:"Shadow",webOnly:!0,style:{background:"#ffffff",color:"#111111",borderRadius:"12px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 10px 24px rgba(0,0,0,0.18)"}},{name:"Emboss",webOnly:!0,style:{background:"#e2e8f0",color:"#2d3748",borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:"inset 0 2px 4px rgba(255,255,255,0.9), inset 0 -2px 4px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.1)"}}]},{category:"Premium gradients",presets:[{name:"Aurora",webOnly:!0,style:{background:"linear-gradient(135deg,#667eea,#764ba2)",color:"#ffffff",borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 8px 20px rgba(118,75,162,0.4)"}},{name:"Peach",webOnly:!0,style:{background:"linear-gradient(135deg,#ff9a9e,#fecfef)",color:"#7a2e3a",borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 8px 20px rgba(255,154,158,0.45)"}},{name:"Gold",webOnly:!0,style:{background:"linear-gradient(135deg,#f6d365,#fda085)",color:"#5a3a1a",borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 8px 20px rgba(253,160,133,0.45)"}},{name:"Midnight",webOnly:!0,style:{background:"linear-gradient(135deg,#0f2027,#203a43,#2c5364)",color:"#ffffff",borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 8px 20px rgba(15,32,39,0.5)"}},{name:"Candy",webOnly:!0,style:{background:"linear-gradient(135deg,#f093fb,#f5576c)",color:"#ffffff",borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 8px 20px rgba(245,87,108,0.45)"}}]},{category:"With icon",presets:[{name:"Buy now",icon:{src:n.cart,direction:"left",size:18},style:{background:"#16a34a",color:"#ffffff",borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Continue",icon:{src:n.arrowRight,direction:"right",size:18},style:{background:"linear-gradient(135deg,#2563eb,#1e3a8a)",color:"#ffffff",borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}}]}].map(t=>({...t,presets:t.presets.filter(t=>e||!t.webOnly)})).filter(e=>e.presets.length>0),i=t.props.text||"Button",d=e=>e.icon?l.qy`<img
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5119],{15119(e,t,n){n.d(t,{default:()=>S});var o=n(96374),r=n(86319),l=n(59929);const a=e=>{{const{component:t,commands:n,helpers:a}=e;return{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=[{text:"style",selected:!0},{text:"interactions"},..."web"===r.M.get("config","channel")?[{text:"animations"}]:[],{text:"settings"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:a,changeTab:i,tabs:s}=e;const c=(r.M.get("components")||[]).filter(e=>e&&"block"===e.type&&e.props?.modalable),d=[{value:"",label:"modal_none"},...c.map((e,t)=>({value:e.id,label:e.props?.modalName||`modal ${t+1}`}))],p=t.props.modalBlockId||"",u=d.find(e=>e.value===p)?.label||"modal_none",g=[{type:"heading",level:6,text:"presets",active:()=>"style"===a.text&&"web"===r.M.get("config","channel")},{type:"custom",active:()=>"style"===a.text&&"web"===r.M.get("config","channel"),node:()=>{const e="web"===r.M.get("config","channel"),o={cart:"http://app.creaditor.com/assets/bullets/images/cart-icon.png",arrowRight:"http://app.creaditor.com/assets/bullets/images/1469020585_ic_keyboard_arrow_right_48px.png"},a="var(--cdtr-primary, #2563eb)",i="var(--cdtr-primary-contrast, #ffffff)",s=e=>`color-mix(in srgb, ${a}, #000 ${e})`,c=[{category:"Basic",presets:[{name:"Solid",style:{background:a,color:i,borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Pill",style:{background:a,color:i,borderRadius:"999px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Outline",style:{background:"transparent",color:a,borderRadius:"8px",border:`1px solid ${a}`,borderWidth:"1px",borderColor:a,boxShadow:null}},{name:"Soft",webOnly:!0,style:{background:`color-mix(in srgb, ${a} 12%, #ffffff)`,color:a,borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}}]},{category:"Effects",presets:[{name:"Gradient",webOnly:!0,style:{background:`linear-gradient(135deg, ${a}, ${s("35%")})`,color:i,borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"3D",webOnly:!0,style:{background:a,color:i,borderRadius:"10px",padding:"14px 22px",fontWeight:700,border:"none",borderWidth:null,borderColor:null,boxShadow:`0px 5px 0px 0px ${s("30%")}`}},{name:"Glow",webOnly:!0,style:{background:a,color:i,borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 8px 24px "+(d="55%",`color-mix(in srgb, ${a}, transparent ${d})`)}},{name:"Glass",webOnly:!0,style:{background:"rgba(255,255,255,0.18)",color:"#111111",borderRadius:"12px",border:"1px solid rgba(255,255,255,0.6)",borderWidth:"1px",borderColor:"rgba(255,255,255,0.6)",backdropFilter:"blur(8px)",boxShadow:"0 4px 30px rgba(0,0,0,0.1)"}},{name:"Shadow",webOnly:!0,style:{background:"#ffffff",color:"#111111",borderRadius:"12px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 10px 24px rgba(0,0,0,0.18)"}}]},{category:"With icon",presets:[{name:"Buy now",icon:{src:o.cart,direction:"left",size:18},style:{background:a,color:i,borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Continue",webOnly:!0,icon:{src:o.arrowRight,direction:"right",size:18},style:{background:`linear-gradient(135deg, ${a}, ${s("35%")})`,color:i,borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}}]}].map(t=>({...t,presets:t.presets.filter(t=>e||!t.webOnly)})).filter(e=>e.presets.length>0);var d;const p=t.props.text||"Button",u=e=>e.icon?l.qy`<img
2
2
  src="${e.icon.src}"
3
3
  style="width:16px;height:16px;object-fit:contain;vertical-align:middle;${"right"===e.icon.direction?"margin-left:6px;order:2;":"margin-right:6px;"}"
4
- />`:"",s=e=>l.qy`
4
+ />`:"",g=e=>l.qy`
5
5
  <button
6
6
  type="button"
7
7
  title="${e.name}"
8
- @click=${()=>(e=>{o.execCommand("style",{...e.style}),e.icon&&(o.execCommand("hasIcon",!0),o.execCommand("iconUrl",e.icon.src),o.execCommand("iconDirection",e.icon.direction||"left"),o.execCommand("iconSize",e.icon.size||18))})(e)}
8
+ @click=${()=>(e=>{n.execCommand("style",{...e.style}),e.icon&&(n.execCommand("hasIcon",!0),n.execCommand("iconUrl",e.icon.src),n.execCommand("iconDirection",e.icon.direction||"left"),n.execCommand("iconSize",e.icon.size||18))})(e)}
9
9
  style="display:flex;align-items:center;justify-content:center;width:100%;cursor:pointer;padding:12px 14px;font-size:13px;overflow:hidden;white-space:nowrap;
10
10
  background:${e.style.background};
11
11
  color:${e.style.color};
@@ -14,21 +14,21 @@
14
14
  font-weight:${e.style.fontWeight||400};
15
15
  box-shadow:${e.style.boxShadow||"none"};"
16
16
  >
17
- ${e.icon&&"right"!==e.icon.direction?d(e):""}
18
- <span style="overflow:hidden;text-overflow:ellipsis;">${i}</span>
19
- ${e.icon&&"right"===e.icon.direction?d(e):""}
17
+ ${e.icon&&"right"!==e.icon.direction?u(e):""}
18
+ <span style="overflow:hidden;text-overflow:ellipsis;">${p}</span>
19
+ ${e.icon&&"right"===e.icon.direction?u(e):""}
20
20
  </button>
21
21
  `;return l.qy`
22
22
  <cdtr-editor-container pt="0">
23
23
  <div style="display:flex;flex-direction:column;gap:10px;padding:8px 16px;">
24
- ${a.map(e=>l.qy`
24
+ ${c.map(e=>l.qy`
25
25
  <div
26
26
  style="margin-top:6px;font-size:11px;font-weight:600;letter-spacing:0.04em;text-transform:uppercase;color:#888;"
27
27
  >
28
28
  ${e.category}
29
29
  </div>
30
- ${e.presets.map(e=>s(e))}
30
+ ${e.presets.map(e=>g(e))}
31
31
  `)}
32
32
  </div>
33
33
  </cdtr-editor-container>
34
- `}}];return[{type:"heading",level:6,text:"text",active:()=>"style"===a.text},{type:"input",title:"whatTheBtnSays",mergeTags:!0,emoji:!0,active:()=>"style"===a.text,value:t.props.text||"",onInput:e=>{const t=e.target.value;o.execCommand("text",t)}},{type:"heading",level:6,text:"colors",active:()=>"style"===a.text},{type:"colorSwatchGroup",active:()=>"style"===a.text,columns:2,items:[{title:"button_background",allowGradient:!0,value:t.props.style.background||"#000000",onChange:e=>{const r=e.target.value;if(!r.includes("gradient(")){const e=(0,n.w)(t.props.style.color,r);o.execCommand("style",{color:e})}o.execCommand("style",{background:r,backgroundColor:null})}},{title:"font_color",value:t.props.style.color||"#ffffff",onChange:e=>{const t=e.target.value;o.execCommand("style",{color:t})}}]},{type:"heading",level:6,text:"typography",active:()=>"style"===a.text},{type:"typography",active:()=>"style"===a.text,bold:700===t.props.style.fontWeight,italic:"italic"===t.props.style.fontStyle,underline:"underline"===t.props.style.textDecoration,onChange:e=>{switch(e){case"bold":const e=700===t.props.style.fontWeight?400:700;o.execCommand("style",{fontWeight:e});break;case"italic":const n="italic"===t.props.style.fontStyle?"normal":"italic";o.execCommand("style",{fontStyle:n});break;case"underline":const r="underline"===t.props.style.textDecoration?"none":"underline";o.execCommand("style",{textDecoration:r})}}},{type:"fontFamily",active:()=>"style"===a.text,value:t.props.style.fontFamily,weight:"web"===r.M.get("config","channel"),weightValue:t.props.style.fontWeight,onChange:e=>{const t=e.target.value;o.execCommand("style",{fontFamily:t})},onWeightChange:e=>{o.execCommand("style",{fontWeight:e.detail.value})}},{type:"slider",title:"fontSize",step:1,min:8,max:50,active:()=>"style"===a.text,value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;o.execCommand("style",{fontSize:t+"px",height:"auto"})}},{type:"heading",level:6,text:"dimensions",active:()=>"style"===a.text},{type:"slider",title:"width",min:10,max:500,active:()=>"style"===a.text,value:parseInt(t.props.style.width),onInput:e=>{const t=e.target.value;o.execCommand("style",{width:t+"px",minWidth:null})}},{type:"heading",level:6,text:"border_design",active:()=>"style"===a.text},{type:"slider",title:"radius",min:0,max:100,active:()=>"style"===a.text,value:parseInt(t.props.style.borderRadius),onInput:e=>{const t=e.target.value;o.execCommand("style",{borderRadius:t+"px"})}},{type:"borderpicker",title:"border",active:()=>"style"===a.text,value:t.props.style.border,onChange:e=>{const t=e.target.value;o.execCommand("style",{border:t})}},{type:"slider",title:"borderWidth",active:()=>"style"===a.text,value:t.props.style.borderWidth,onInput:e=>{const t=e.target.value;o.execCommand("style",{borderWidth:t+"px"})}},{type:"colorpicker",title:"borderColor",active:()=>"style"===a.text,value:t.props.style.borderColor,onChange:e=>{const t=e.target.value;o.execCommand("style",{borderColor:t})}},{type:"heading",level:6,text:"shadow",active:()=>"style"===a.text},{type:"boxShadow",active:()=>"style"===a.text,value:t.props.style.boxShadow,onChange:e=>{o.execCommand("style",{boxShadow:e})}},{type:"heading",level:6,text:"link",active:()=>"interactions"===a.text},{type:"linkpicker",href:t.props.onClick?.link,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,autofocus:!0,active:()=>"interactions"===a.text,onChange:e=>{const t={link:e.target.value};o.execCommand("onClick",t)}},{type:"heading",level:6,text:"open_modal",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel")},{type:"info",text:s.length?"modal_pick_hint":"modal_none_hint",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel")},{type:"dropdown",title:"modal_block",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel"),value:b,selected:p,items:c,onChange:e=>{o.execCommand("modalBlockId",e.target.value)}},{type:"heading",level:6,text:"icons",active:()=>"style"===a.text},{type:"checkbox",title:"hasIcon",useIconsApi:!0,checked:!!t.props.hasIcon,active:()=>"style"===a.text,onChange:e=>{const t=e.target.checked;o.execCommand("hasIcon",t),o.execCommand("iconDirection","left")}},{type:"dropdown",active:()=>"style"===a.text&&!0===t.props.hasIcon,title:"iconDirection",value:t.props.iconDirection,onChange:e=>{const t=e.target.value;o.execCommand("iconDirection",t)},items:[{value:"left",label:"left"},{value:"right",label:"right"}]},{type:"slider",title:"size",min:10,max:100,active:()=>"style"===a.text&&!0===t.props.hasIcon,value:t.props.iconSize||16,onInput:e=>{const t=e.target.value;o.execCommand("iconSize",t)}},{type:"icons",active:()=>"style"===a.text&&!0===t.props.hasIcon,selectedIcon:t.props.iconUrl,onChange:e=>{const t=e.detail;o.execCommand("iconUrl",t.src)}},{type:"heading",level:6,text:"spacing",active:()=>"style"===a.text},{type:"spacingPicker",active:()=>"style"===a.text,hasLeft:!1,hasRight:!1,value:{top:parseInt(t.props.style.paddingTop)||0,bottom:parseInt(t.props.style.paddingBottom)||0,left:parseInt(t.props.style.paddingLeft)||0,right:parseInt(t.props.style.paddingRight)||0},onChange:e=>{e.target.value;const t=e.target.topValue,n=e.target.bottomValue,r=e.target.leftValue,l=e.target.rightValue;o.execCommand("style",{paddingTop:t+"px",paddingBottom:n+"px",paddingLeft:r+"px",paddingRight:l+"px",padding:null})}},...u]}}}},i=e=>{let{helpers:t,editor:o,getFocused:n}=e;return{set:(e,r,l)=>{switch(r){case"style":return e[r]=t.deepMerge(e[r],l),!0;case"text":return e.text=l,n()||o.chain().setContent(l).run(),!0;case"ripple":case"rippleColor":case"scaleOnHover":case"hasIcon":case"iconUrl":case"iconSize":case"iconDirection":case"modalBlockId":return e[r]=l,!0;case"onClick":if(l.link)return e[r]=l,!0}}}};var d=o(72591),s=o.n(d),c=o(88639),p=o.n(c),b=o(88128),u=o.n(b),x=o(30855),g=o.n(x),f=o(93051),h=o.n(f),y=o(49536),m={};m.setAttributes=g(),m.insert=u().bind(null,"head"),m.domAPI=p(),m.insertStyleElement=h();s()(y.A,m);const A=y.A&&y.A.locals?y.A.locals:void 0;var C=o(81318),v=o(1366),w=o(67291),k=o(85194),S=o(28396);const E=C.YY.create({addKeyboardShortcuts:()=>({Enter:()=>!0})});const W=()=>{const e="button";return{name:e,create:t=>{const{createElement:o,compose:n,helpers:r}=t,{arrayToString:l,mergeDiff:d}=r;let s=!1;const c=document.createElement("div"),p=document.createElement("div"),{editor:b}=function(e){let{content:t,element:o}=e;return{element:o,editor:new C.KE({element:o,extensions:[v.A,w.A,S.A,k.Ay,E],content:t})}}({content:n.props.text,element:p});c.appendChild(p);return b.view.dom.setAttribute("dir","auto"),b.on("update",e=>{let{editor:t}=e;const o=t.getText();n.editor.store().updateComponent(n,"text",o)}),b.on("focus",e=>{let{event:t,editor:o}=e;s=!0}),b.on("blur",e=>{let{event:t,editor:o}=e;s=!1}),c.className=A.button,o({name:e,id:n.id,template:c,commands:{insertContent:e=>{b.commands.insertContent(e),b.chain().focus()}},defaultProps:{style:{height:"auto",width:"200px",padding:"10px",borderRadius:"5px",fontFamily:"Arial",fontSize:"16px"},text:"button"},render:()=>{try{n.props.style.display="",n.props.style.direction=""}catch(e){console.error(e)}d(c,{style:n.props.style}),c.style.height="auto";const e=n.props.hasIcon,t=n.props.iconUrl,o=n.props.iconDirection,r=n.props.iconSize,l="icon_in_button";let a=c.querySelector(`.${l}`)||document.createElement("img");e&&t?(a.className=l,a.src=t,a.style.width=(r||16)+"px",a.style.height=(r||16)+"px",a.style.marginRight="8px",a.style.marginLeft="8px","left"===o?c.insertBefore(a,c.firstChild):c.appendChild(a)):a.remove()},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>c,handleBar:!0,validator:i({template:c,helpers:r,editor:b,getFocused:function(){return s}}),schema:n.schema,onSelect:e=>{c.classList.add(e)},onDeselect:e=>{c.classList.remove(e)},elementProps:n,destroy:()=>{b.destroy()},remove:()=>{c.remove()},createEditor:a})}}}},49536(e,t,o){o.d(t,{A:()=>i});var n=o(82001),r=o.n(n),l=o(40935),a=o.n(l)()(r());a.push([e.id,".BEr8unIfy4OEGYhlHclN {\n cursor: text !important;\n}\n.BEr8unIfy4OEGYhlHclN {\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.BEr8unIfy4OEGYhlHclN p {\n margin: 0;\n line-height: 1;\n}\n.cI3RTMAdk9qoZ8mu9Sm9 {\n width: 100%;\n}\n.VSumPf0Ui7b1pl8cMATP {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.Vo2Ewnq6ekWFdNMjxBIB {\n left: -8px;\n cursor: w-resize;\n}\n.WLZC84sb1rfaRnHCDyj8 {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.BEr8unIfy4OEGYhlHclN .VSumPf0Ui7b1pl8cMATP {\n display: none;\n}\n.BEr8unIfy4OEGYhlHclN.Qh20ei1Fa8QUbGinFFbw .VSumPf0Ui7b1pl8cMATP {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n","",{version:3,sources:["webpack://./../web-editors/button-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,uBAAuB;AAOzB;AARA;EAEE,eAAe;EACf,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,kBAAkB;EAClB,YAAY;AACd;AACA;EACE,SAAS;EACT,cAAc;AAChB;AACA;EACE,WAAW;AACb;AACA;EACE,kBAAkB;EAClB,UAAU;EACV,UAAU;EACV,WAAW;EACX,gCAAgC;EAChC,mBAAmB;AACrB;AACA;EACE,UAAU;EACV,gBAAgB;AAClB;AACA;EACE,sBAAsB;EACtB,gBAAgB;AAClB;;AAEA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;;;;;GAKG",sourcesContent:[".button {\n cursor: text !important;\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.button p {\n margin: 0;\n line-height: 1;\n}\n.contentEditable {\n width: 100%;\n}\n.margin {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.marginLeft {\n left: -8px;\n cursor: w-resize;\n}\n.marginRight {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.button .margin {\n display: none;\n}\n.button.selected .margin {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n"],sourceRoot:""}]),a.locals={button:"BEr8unIfy4OEGYhlHclN",contentEditable:"cI3RTMAdk9qoZ8mu9Sm9",margin:"VSumPf0Ui7b1pl8cMATP",marginLeft:"Vo2Ewnq6ekWFdNMjxBIB",marginRight:"WLZC84sb1rfaRnHCDyj8",selected:"Qh20ei1Fa8QUbGinFFbw"};const i=a},67291(e,t,o){o.d(t,{A:()=>r});var n=o(81318);const r=n.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,n.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})}}]);
34
+ `}}];return[{type:"heading",level:6,text:"text",active:()=>"style"===a.text},{type:"input",title:"whatTheBtnSays",mergeTags:!0,emoji:!0,active:()=>"style"===a.text,value:t.props.text||"",onInput:e=>{const t=e.target.value;n.execCommand("text",t)}},{type:"heading",level:6,text:"colors",active:()=>"style"===a.text},{type:"colorSwatchGroup",active:()=>"style"===a.text,columns:2,items:[{title:"button_background",allowGradient:!0,value:t.props.style.background||"#000000",onChange:e=>{const r=e.target.value;if(!r.includes("gradient(")){const e=(0,o.w)(t.props.style.color,r);n.execCommand("style",{color:e})}n.execCommand("style",{background:r,backgroundColor:null})}},{title:"font_color",value:t.props.style.color||"#ffffff",onChange:e=>{const t=e.target.value;n.execCommand("style",{color:t})}}]},{type:"heading",level:6,text:"typography",active:()=>"style"===a.text},{type:"typography",active:()=>"style"===a.text,bold:700===t.props.style.fontWeight,italic:"italic"===t.props.style.fontStyle,underline:"underline"===t.props.style.textDecoration,onChange:e=>{switch(e){case"bold":const e=700===t.props.style.fontWeight?400:700;n.execCommand("style",{fontWeight:e});break;case"italic":const o="italic"===t.props.style.fontStyle?"normal":"italic";n.execCommand("style",{fontStyle:o});break;case"underline":const r="underline"===t.props.style.textDecoration?"none":"underline";n.execCommand("style",{textDecoration:r})}}},{type:"fontFamily",active:()=>"style"===a.text,value:t.props.style.fontFamily,weight:"web"===r.M.get("config","channel"),weightValue:t.props.style.fontWeight,onChange:e=>{const t=e.target.value;n.execCommand("style",{fontFamily:t})},onWeightChange:e=>{n.execCommand("style",{fontWeight:e.detail.value})}},{type:"slider",title:"fontSize",step:1,min:8,max:50,active:()=>"style"===a.text,value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;n.execCommand("style",{fontSize:t+"px",height:"auto"})}},{type:"heading",level:6,text:"dimensions",active:()=>"style"===a.text},{type:"slider",title:"width",min:10,max:500,active:()=>"style"===a.text,value:parseInt(t.props.style.width),onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px",minWidth:null})}},{type:"heading",level:6,text:"border_design",active:()=>"style"===a.text},{type:"slider",title:"radius",min:0,max:100,active:()=>"style"===a.text,value:parseInt(t.props.style.borderRadius),onInput:e=>{const t=e.target.value;n.execCommand("style",{borderRadius:t+"px"})}},{type:"borderpicker",title:"border",active:()=>"style"===a.text,value:t.props.style.border,onChange:e=>{const t=e.target.value;n.execCommand("style",{border:t})}},{type:"slider",title:"borderWidth",active:()=>"style"===a.text,value:t.props.style.borderWidth,onInput:e=>{const t=e.target.value;n.execCommand("style",{borderWidth:t+"px"})}},{type:"colorpicker",title:"borderColor",active:()=>"style"===a.text,value:t.props.style.borderColor,onChange:e=>{const t=e.target.value;n.execCommand("style",{borderColor:t})}},{type:"heading",level:6,text:"shadow",active:()=>"style"===a.text},{type:"boxShadow",active:()=>"style"===a.text,value:t.props.style.boxShadow,onChange:e=>{n.execCommand("style",{boxShadow:e})}},{type:"heading",level:6,text:"link",active:()=>"interactions"===a.text},{type:"linkpicker",href:t.props.onClick?.link,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,autofocus:!0,active:()=>"interactions"===a.text,onChange:e=>{const t={link:e.target.value};n.execCommand("onClick",t)}},{type:"heading",level:6,text:"open_modal",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel")},{type:"info",text:c.length?"modal_pick_hint":"modal_none_hint",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel")},{type:"dropdown",title:"modal_block",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel"),value:u,selected:p,items:d,onChange:e=>{n.execCommand("modalBlockId",e.target.value)}},{type:"heading",level:6,text:"icons",active:()=>"style"===a.text},{type:"checkbox",title:"hasIcon",useIconsApi:!0,checked:!!t.props.hasIcon,active:()=>"style"===a.text,onChange:e=>{const t=e.target.checked;n.execCommand("hasIcon",t),n.execCommand("iconDirection","left")}},{type:"dropdown",active:()=>"style"===a.text&&!0===t.props.hasIcon,title:"iconDirection",value:t.props.iconDirection,onChange:e=>{const t=e.target.value;n.execCommand("iconDirection",t)},items:[{value:"left",label:"left"},{value:"right",label:"right"}]},{type:"slider",title:"size",min:10,max:100,active:()=>"style"===a.text&&!0===t.props.hasIcon,value:t.props.iconSize||16,onInput:e=>{const t=e.target.value;n.execCommand("iconSize",t)}},{type:"icons",active:()=>"style"===a.text&&!0===t.props.hasIcon,selectedIcon:t.props.iconUrl,onChange:e=>{const t=e.detail;n.execCommand("iconUrl",t.src)}},{type:"heading",level:6,text:"spacing",active:()=>"style"===a.text},{type:"spacingPicker",active:()=>"style"===a.text,hasLeft:!1,hasRight:!1,value:{top:parseInt(t.props.style.paddingTop)||0,bottom:parseInt(t.props.style.paddingBottom)||0,left:parseInt(t.props.style.paddingLeft)||0,right:parseInt(t.props.style.paddingRight)||0},onChange:e=>{e.target.value;const t=e.target.topValue,o=e.target.bottomValue,r=e.target.leftValue,l=e.target.rightValue;n.execCommand("style",{paddingTop:t+"px",paddingBottom:o+"px",paddingLeft:r+"px",paddingRight:l+"px",padding:null})}},...g]}}}},i=e=>{let{helpers:t,editor:n,getFocused:o}=e;return{set:(e,r,l)=>{switch(r){case"style":return e[r]=t.deepMerge(e[r],l),!0;case"text":return e.text=l,o()||n.chain().setContent(l).run(),!0;case"ripple":case"rippleColor":case"scaleOnHover":case"hasIcon":case"iconUrl":case"iconSize":case"iconDirection":case"modalBlockId":return e[r]=l,!0;case"onClick":if(l.link)return e[r]=l,!0}}}};var s=n(72591),c=n.n(s),d=n(88639),p=n.n(d),u=n(88128),g=n.n(u),m=n(30855),b=n.n(m),h=n(93051),y=n.n(h),x=n(49536),A={};A.setAttributes=b(),A.insert=g().bind(null,"head"),A.domAPI=p(),A.insertStyleElement=y();c()(x.A,A);const f=x.A&&x.A.locals?x.A.locals:void 0;var C=n(81318),v=n(1366),w=n(67291),k=n(85194),E=n(28396);const B=C.YY.create({addKeyboardShortcuts:()=>({Enter:()=>!0})});const S=()=>{const e="button";return{name:e,create:t=>{const{createElement:n,compose:o,helpers:r}=t,{arrayToString:l,mergeDiff:s}=r;let c=!1;const d=document.createElement("div"),p=document.createElement("div"),{editor:u}=function(e){let{content:t,element:n}=e;return{element:n,editor:new C.KE({element:n,extensions:[v.A,w.A,E.A,k.Ay,B],content:t})}}({content:o.props.text,element:p});d.appendChild(p);return u.view.dom.setAttribute("dir","auto"),u.on("update",e=>{let{editor:t}=e;const n=t.getText();o.editor.store().updateComponent(o,"text",n)}),u.on("focus",e=>{let{event:t,editor:n}=e;c=!0}),u.on("blur",e=>{let{event:t,editor:n}=e;c=!1}),d.className=f.button,n({name:e,id:o.id,template:d,commands:{insertContent:e=>{u.commands.insertContent(e),u.chain().focus()}},defaultProps:{style:{height:"auto",width:"200px",padding:"10px",borderRadius:"5px",fontFamily:"Arial",fontSize:"16px"},text:"button"},render:()=>{try{o.props.style.display="",o.props.style.direction=""}catch(e){console.error(e)}s(d,{style:o.props.style}),d.style.height="auto";const e=o.props.hasIcon,t=o.props.iconUrl,n=o.props.iconDirection,r=o.props.iconSize,l="icon_in_button";let a=d.querySelector(`.${l}`)||document.createElement("img");e&&t?(a.className=l,a.src=t,a.style.width=(r||16)+"px",a.style.height=(r||16)+"px",a.style.marginRight="8px",a.style.marginLeft="8px","left"===n?d.insertBefore(a,d.firstChild):d.appendChild(a)):a.remove()},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>d,handleBar:!0,validator:i({template:d,helpers:r,editor:u,getFocused:function(){return c}}),schema:o.schema,onSelect:e=>{d.classList.add(e)},onDeselect:e=>{d.classList.remove(e)},elementProps:o,destroy:()=>{u.destroy()},remove:()=>{d.remove()},createEditor:a})}}}},49536(e,t,n){n.d(t,{A:()=>i});var o=n(82001),r=n.n(o),l=n(40935),a=n.n(l)()(r());a.push([e.id,".BEr8unIfy4OEGYhlHclN {\n cursor: text !important;\n}\n.BEr8unIfy4OEGYhlHclN {\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.BEr8unIfy4OEGYhlHclN p {\n margin: 0;\n line-height: 1;\n}\n.cI3RTMAdk9qoZ8mu9Sm9 {\n width: 100%;\n}\n.VSumPf0Ui7b1pl8cMATP {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.Vo2Ewnq6ekWFdNMjxBIB {\n left: -8px;\n cursor: w-resize;\n}\n.WLZC84sb1rfaRnHCDyj8 {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.BEr8unIfy4OEGYhlHclN .VSumPf0Ui7b1pl8cMATP {\n display: none;\n}\n.BEr8unIfy4OEGYhlHclN.Qh20ei1Fa8QUbGinFFbw .VSumPf0Ui7b1pl8cMATP {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n","",{version:3,sources:["webpack://./../web-editors/button-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,uBAAuB;AAOzB;AARA;EAEE,eAAe;EACf,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,kBAAkB;EAClB,YAAY;AACd;AACA;EACE,SAAS;EACT,cAAc;AAChB;AACA;EACE,WAAW;AACb;AACA;EACE,kBAAkB;EAClB,UAAU;EACV,UAAU;EACV,WAAW;EACX,gCAAgC;EAChC,mBAAmB;AACrB;AACA;EACE,UAAU;EACV,gBAAgB;AAClB;AACA;EACE,sBAAsB;EACtB,gBAAgB;AAClB;;AAEA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;;;;;GAKG",sourcesContent:[".button {\n cursor: text !important;\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.button p {\n margin: 0;\n line-height: 1;\n}\n.contentEditable {\n width: 100%;\n}\n.margin {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.marginLeft {\n left: -8px;\n cursor: w-resize;\n}\n.marginRight {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.button .margin {\n display: none;\n}\n.button.selected .margin {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n"],sourceRoot:""}]),a.locals={button:"BEr8unIfy4OEGYhlHclN",contentEditable:"cI3RTMAdk9qoZ8mu9Sm9",margin:"VSumPf0Ui7b1pl8cMATP",marginLeft:"Vo2Ewnq6ekWFdNMjxBIB",marginRight:"WLZC84sb1rfaRnHCDyj8",selected:"Qh20ei1Fa8QUbGinFFbw"};const i=a},67291(e,t,n){n.d(t,{A:()=>r});var o=n(81318);const r=o.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,o.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})}}]);
Binary file
@@ -4,7 +4,7 @@
4
4
  d="M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z"
5
5
  />
6
6
  </svg>
7
- `;class p extends s.WF{constructor(){super(),this.resolver=null,this.onCancel=()=>{this.loading||this.close(null)},this.onKeywordKeydown=e=>{"Enter"===e.key||","===e.key?(e.preventDefault(),this.commitDraftKeyword()):"Backspace"===e.key&&""===this.keywordDraft&&this.keywordList.length&&(this.keywordList=this.keywordList.slice(0,-1))},this.generateField=async e=>{if(this.loading||this.generatingField)return;const t=function(){const e=document.getElementById("main-page-wrapper");return(e?.innerText||"").trim()}();if(t){this.generatingField=e;try{const i="rtl"===this.direction?"he":"en",s=await this.requestSeo(e,t,i);if("keywords"===e){const e=(Array.isArray(s)?s:String(s).split(",")).map(e=>e.trim()).filter(Boolean),t=[...this.keywordList];for(const i of e)t.includes(i)||t.push(i);this.keywordList=t}else"title"===e?this.title=String(s).slice(0,100):this.description=String(s).slice(0,255)}catch(e){console.error("[seo-generate] failed:",e),this.snackbar(this.t("seo_generate_failed","Couldn't generate. Please try again."))}finally{this.generatingField=""}}else this.snackbar(this.t("seo_generate_empty","Add some content to the page first."))},this.onPublish=()=>{this.loading||(this.commitDraftKeyword(),this.loading=!0,this.close({title:this.title.trim(),description:this.description.trim(),keywords:this.keywordList.join(",")}))},this.loading=!1,this.title="",this.description="",this.keywordList=[],this.keywordDraft="",this.keywordsFocused=!1,this.generatingField=""}static open(){const e=document.createElement("cdtr-publish-seo"),t=o.M.get("app","seo")||{};return e.title=t.title||"",e.description=t.description||"",e.keywordList=(Array.isArray(t.keywords)?t.keywords:String(t.keywords||"").split(",")).map(e=>String(e).trim()).filter(Boolean),document.body.appendChild(e),e.waitForChoice()}waitForChoice(){return new Promise(e=>{this.resolver=e})}t(e,t){return o.M.get("lang",e)||t}get direction(){const e=o.M.get("theme");return e?.direction||"rtl"}close(e){this.resolver&&(this.resolver(e),this.resolver=null),this.isConnected&&this.remove()}commitDraftKeyword(){const e=this.keywordDraft.split(",").map(e=>e.trim()).filter(Boolean);if(!e.length)return;const t=[...this.keywordList];for(const i of e)t.includes(i)||t.push(i);this.keywordList=t,this.keywordDraft=""}removeKeyword(e){this.keywordList=this.keywordList.filter((t,i)=>i!==e)}snackbar(e){const t=o.M.get("commands");t?.snackbar?.(e)}async requestSeo(e,t,i){const s=async s=>{const o=await async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=l.Ay;if("function"==typeof t.studioTokenProvider)try{const i=await t.studioTokenProvider({forceRefresh:e});if("string"==typeof i&&i.length>0)return i}catch{}return"string"==typeof t.studioToken&&t.studioToken.length>0?t.studioToken:null}(s),r={"Content-Type":"application/json",Accept:"application/json"};return o&&(r.Authorization=`Bearer ${o}`),fetch(c,{method:"POST",headers:r,body:JSON.stringify({content:t,field:e,language:i})})};let o=await s(!1);if(401===o.status&&(o=await s(!0)),!o.ok)throw new Error(`HTTP ${o.status}`);const r=await o.json();if(!r.ok||void 0===r.value)throw new Error("bad response");return r.value}magicButton(e){const t=this.generatingField===e;return s.qy`
7
+ `;class p extends s.WF{constructor(){super(),this.resolver=null,this.onCancel=()=>{this.loading||this.close(null)},this.onKeywordKeydown=e=>{"Enter"===e.key||","===e.key?(e.preventDefault(),this.commitDraftKeyword()):"Backspace"===e.key&&""===this.keywordDraft&&this.keywordList.length&&(this.keywordList=this.keywordList.slice(0,-1))},this.generateField=async e=>{if(this.loading||this.generatingField)return;const t=function(){const e=document.getElementById("main-page-wrapper");return(e?.innerText||"").trim()}();if(t){this.generatingField=e;try{const i="rtl"===this.direction?"he":"en",s=await this.requestSeo(e,t,i);if("keywords"===e){const e=(Array.isArray(s)?s:String(s).split(",")).map(e=>e.trim()).filter(Boolean),t=[...this.keywordList];for(const i of e)t.includes(i)||t.push(i);this.keywordList=t}else"title"===e?this.title=String(s).slice(0,100):this.description=String(s).slice(0,255)}catch(e){console.error("[seo-generate] failed:",e),this.snackbar(this.t("seo_generate_failed","Couldn't generate. Please try again."))}finally{this.generatingField=""}}else this.snackbar(this.t("seo_generate_empty","Add some content to the page first."))},this.onPublish=()=>{this.loading||(this.commitDraftKeyword(),this.loading=!0,this.close({title:this.title.trim(),description:this.description.trim(),keywords:[...this.keywordList]}))},this.loading=!1,this.title="",this.description="",this.keywordList=[],this.keywordDraft="",this.keywordsFocused=!1,this.generatingField=""}static open(){const e=document.createElement("cdtr-publish-seo"),t=o.M.get("app","seo")||{};return e.title=t.title||"",e.description=t.description||"",e.keywordList=(Array.isArray(t.keywords)?t.keywords:String(t.keywords||"").split(",")).map(e=>String(e).trim()).filter(Boolean),document.body.appendChild(e),e.waitForChoice()}waitForChoice(){return new Promise(e=>{this.resolver=e})}t(e,t){return o.M.get("lang",e)||t}get direction(){const e=o.M.get("theme");return e?.direction||"rtl"}close(e){this.resolver&&(this.resolver(e),this.resolver=null),this.isConnected&&this.remove()}commitDraftKeyword(){const e=this.keywordDraft.split(",").map(e=>e.trim()).filter(Boolean);if(!e.length)return;const t=[...this.keywordList];for(const i of e)t.includes(i)||t.push(i);this.keywordList=t,this.keywordDraft=""}removeKeyword(e){this.keywordList=this.keywordList.filter((t,i)=>i!==e)}snackbar(e){const t=o.M.get("commands");t?.snackbar?.(e)}async requestSeo(e,t,i){const s=async s=>{const o=await async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=l.Ay;if("function"==typeof t.studioTokenProvider)try{const i=await t.studioTokenProvider({forceRefresh:e});if("string"==typeof i&&i.length>0)return i}catch{}return"string"==typeof t.studioToken&&t.studioToken.length>0?t.studioToken:null}(s),r={"Content-Type":"application/json",Accept:"application/json"};return o&&(r.Authorization=`Bearer ${o}`),fetch(c,{method:"POST",headers:r,body:JSON.stringify({content:t,field:e,language:i})})};let o=await s(!1);if(401===o.status&&(o=await s(!0)),!o.ok)throw new Error(`HTTP ${o.status}`);const r=await o.json();if(!r.ok||void 0===r.value)throw new Error("bad response");return r.value}magicButton(e){const t=this.generatingField===e;return s.qy`
8
8
  <button
9
9
  class="magic"
10
10
  type="button"
@@ -244,7 +244,11 @@
244
244
  display: inline-flex;
245
245
  align-items: center;
246
246
  gap: 6px;
247
- background: color-mix(in srgb, var(--primary, #6c5ce7) 12%, #fff);
247
+ /* Solid fallback first: if --primary carries a value color-mix can't
248
+ parse (e.g. a bare RGB triplet), the mix declaration is dropped and
249
+ this fixed tint keeps the chip visible. */
250
+ background: #eceafc;
251
+ background: color-mix(in srgb, var(--primary, #6c5ce7) 15%, #fff);
248
252
  color: var(--primary, #6c5ce7);
249
253
  border-radius: 6px;
250
254
  padding: 5px 8px 5px 10px;
Binary file
@@ -1,10 +1,10 @@
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>
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 a=o(59929),i=o(36565);o.e(7937).then(o.bind(o,67937));class s extends a.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,a=[...this.tabs],i=a.findIndex(t=>t.text===o);-1!==i&&(a.forEach(t=>{t.selected=!1}),a[i].selected=!0),this.tabs=a;const s=new UIEvent("tabChanged",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(s)}firstUpdated(){super.firstUpdated()}updated(){this.setAttribute("data-active-tab",this.value||"")}onConnected(t){let{name:e}=t;this.onClickItem({target:{value:e}})}onArrowNavigation(t){const{key:e,currentIcon:o}=t.detail,a=this.tabs.findIndex(t=>t.text===o);if(-1===a)return;let i=a;switch(e){case"ArrowUp":case"ArrowLeft":i=a>0?a-1:this.tabs.length-1;break;case"ArrowDown":case"ArrowRight":i=a<this.tabs.length-1?a+1:0;break;default:return}const s=this.tabs[i];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(),i.Ay.on("editor-tabs",this.onConnected)}disconnectedCallback(){super.disconnectedCallback(),i.Ay.off("editor-tabs",this.onConnected)}renderContent(){switch(this.value){case"animations":return o.e(3553).then(o.bind(o,3553)),a.qy`<cdtr-animations-editor>
2
2
  <cdtr-block-loader></cdtr-block-loader
3
- ></cdtr-animations-editor>`;case"settings":case"setting":return o.e(7654).then(o.bind(o,37654)),i.qy`<cdtr-setting-editor>
3
+ ></cdtr-animations-editor>`;case"settings":case"setting":return o.e(7654).then(o.bind(o,37654)),a.qy`<cdtr-setting-editor>
4
4
  <cdtr-block-loader></cdtr-block-loader
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`
5
+ ></cdtr-setting-editor>`;default:return a.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),a.qy`
6
6
  <div class="tabs-row" @arrow-navigation=${this.onArrowNavigation}>
7
- ${this.tabs.map(t=>i.qy`<cdtr-editor-tab-item
7
+ ${this.tabs.map(t=>a.qy`<cdtr-editor-tab-item
8
8
  tabindex="0"
9
9
  @change=${this.onClickItem}
10
10
  icon=${t.text}
@@ -13,7 +13,7 @@
13
13
  ></cdtr-editor-tab-item>`)}
14
14
  </div>
15
15
  <div class="content">${this.renderContent()}</div>
16
- `}}s.styles=i.AH`
16
+ `}}s.styles=a.AH`
17
17
  :host {
18
18
  height: 100%;
19
19
  display: flex;
@@ -54,5 +54,9 @@
54
54
  overflow-y: auto;
55
55
  overflow-x: hidden;
56
56
  padding-top: var(--space-3, 12px);
57
+ /* Clear the absolutely-positioned Creaditor logo footer (~35px tall,
58
+ offset below the sidebar) so the last accordion can scroll fully into
59
+ view instead of staying trapped behind it. */
60
+ padding-bottom: 60px;
57
61
  }
58
62
  `,s.properties={tabs:{type:Array},value:{type:String}},customElements.define("cdtr-editor-tabs",s)}}]);
Binary file
@@ -1,4 +1,4 @@
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`
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:()=>r});var n=o(59929),s=o(40648);class i 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
2
  <div class="section">
3
3
  <div class="header" @click=${this.toggle}>
4
4
  <span class="title"><lang-text text="${this.label}"></lang-text></span>
@@ -12,7 +12,7 @@
12
12
  </div>
13
13
  </div>
14
14
  </div>
15
- `}}r.styles=n.AH`
15
+ `}}i.styles=n.AH`
16
16
  :host {
17
17
  display: block;
18
18
  direction: var(--direction-locale, ltr);
@@ -60,7 +60,7 @@
60
60
  .content-inner {
61
61
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-4);
62
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`
63
+ `,i.properties={label:{type:String,reflect:!0,attribute:"data-label"},open:{type:Boolean,reflect:!0},persistKey:{type:String}},customElements.define("cdtr-editor-section",i);const r=(e,t)=>n.qy`
64
64
  <cdtr-editor-section
65
65
  .label=${e.label}
66
66
  .open=${!1!==e.open}
@@ -68,8 +68,8 @@
68
68
  >
69
69
  ${t}
70
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}>
71
+ `},37654(e,t,o){o.r(t),o.d(t,{SettingEditor:()=>c});var n=o(59929),s=o(86319),i=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"/>`,a=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"/>`,l=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)=>{i.Ay.store().execCommand(`show_on_${e}`,t),this[`show_on_${e}`]=t},onChangeElementID(e){i.Ay.store().execCommand("element_ID",e.target.value)},onChangeName(e){i.Ay.store().execCommand("name",e.target.value)}}}onInspect(){if(i.Ay.components.length>0){const e=i.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(),i.Ay.on("select",this.onInspect),i.Ay.on("update",this.onInspect),this.onInspect()}disconnectedCallback(){super.disconnectedCallback(),i.Ay.off("select",this.onInspect),i.Ay.off("update",this.onInspect)}render(){const e=i.Ay.getSelectedComponent();if(!e||0===e.length)return n.qy``;const t="block"===e[0].type,o="web"===s.M.get("config","channel")||t;return n.qy`
72
+ ${o?n.qy`<cdtr-editor-section label="display_mode" .open=${!0}>
73
73
  <div class="device-toggle-row">
74
74
  <div
75
75
  class="device-toggle-btn ${this.show_on_desktop?"active":""}"
@@ -82,14 +82,14 @@
82
82
  class="device-toggle-btn ${this.show_on_tablet?"active":""}"
83
83
  @click=${()=>this.cmds.onToggleDisplayMode("tablet",!this.show_on_tablet)}
84
84
  >
85
- <svg width="14" height="14" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">${i}</svg>
85
+ <svg width="14" height="14" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">${a}</svg>
86
86
  <lang-text text="tablet"></lang-text>
87
87
  </div>
88
88
  <div
89
89
  class="device-toggle-btn ${this.show_on_mobile?"active":""}"
90
90
  @click=${()=>this.cmds.onToggleDisplayMode("mobile",!this.show_on_mobile)}
91
91
  >
92
- <svg width="14" height="14" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">${a}</svg>
92
+ <svg width="14" height="14" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">${l}</svg>
93
93
  <lang-text text="mobile"></lang-text>
94
94
  </div>
95
95
  </div>
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