@claspo/components 1.2.0 → 1.2.1
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.
- package/SysButtonComponent/SysButtonComponent.js +1 -1
- package/SysCalendarComponent/SysCalendarComponent.js +1 -1
- package/SysCheckboxListComponent/SysCheckboxListComponent.js +1 -1
- package/SysChoiceButtonsComponent/SysChoiceButtonsComponent.js +1 -1
- package/SysColumnComponent/SysColumnComponent.js +1 -1
- package/SysColumnsComponent/SysColumnsComponent.js +1 -1
- package/SysConsentComponent/SysConsentComponent.js +1 -1
- package/SysContainerComponent/SysContainerComponent.js +1 -1
- package/SysCountdownTimerComponent/SysCountdownTimerComponent.js +1 -1
- package/SysDateComponent/SysDateComponent.js +1 -1
- package/SysDropdownInputComponent/SysDropdownInputComponent.js +1 -1
- package/SysImageComponent/SysImageComponent.js +1 -1
- package/SysInAppColumnsComponent/SysInAppColumnsComponent.js +1 -1
- package/SysInputComponent/SysInputComponent.js +1 -1
- package/SysPhoneInputComponent/SysPhoneInputComponent.js +1 -1
- package/SysPromoCodeComponent/SysPromoCodeComponent.js +1 -1
- package/SysRadioGroupComponent/SysRadioGroupComponent.js +1 -1
- package/SysSlideComponent/SysSlideComponent.js +1 -1
- package/SysSliderComponent/SysSliderComponent.js +1 -1
- package/SysSocialComponent/SysSocialComponent.js +1 -1
- package/SysTextAreaComponent/SysTextAreaComponent.js +1 -1
- package/SysTextComponent/SysTextComponent.js +1 -1
- package/SysVideoComponent/SysVideoComponent.js +1 -1
- package/package.json +5 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const t={DESKTOP:"desktop",MOBILE:"mobile"};function e(e){return Object.values(t).map((t=>({type:"GROUP",propPath:["adaptiveStyles",t],children:e})))}const n={name:"SysContainerComponent",componentType:"CONTAINER",version:"1.0.0",contextMenuModel:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT",params:{hideForEntryType:"VIEW"}}],floatingControlsModel:e([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0,displayCondition:"return sdk.component.type === 'VIEW' ? (sdk.appConfig.allowBackdropFilterOnView ?? true) : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType === 'BUILT_IN' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0,displayCondition:"return sdk.component.type === 'VIEW' ? (sdk.appConfig.allowBackdropFilterOnView ?? true) : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType === 'BUILT_IN' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0},displayCondition:"return sdk.widgetType !== 'TEASER'"}]},events:{dispatch:[],listen:[]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!1},displayCondition:"return sdk.widgetType !== 'TEASER'"}]},i18nPropPaths:["handlers,[id],actions,[id],params,link","handlers,[id],actions,[id],params,customData"],props:{styles:[{element:"host",styleAttributes:{overflow:"visible",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"},classes:""}],adaptiveStyles:{desktop:[{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:"min-content",height:"auto",minHeight:null,flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,background:"rgba(0, 0, 0, 0.06)"},classes:""}],mobile:[{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:"min-content",height:"auto",minHeight:null,flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,background:"rgba(0, 0, 0, 0.06)"},classes:""}]}},metaDescription:{icon:"/SysContainerComponent/assets/img/component-icon.svg",label:{en:"Container",ru:"Контейнер",uk:"Контейнер",es:"Envase",fr:"Récipient",de:"Container",it:"Contenitore",pt:"Embalagem",ro:"Container",bg:"Контейнер",cs:"Kontejner",el:"Περιέκτης",nl:"Container",pl:"Kontener",sv:"Behållare",tr:"Konteyner",ar:"الحاوية",zh:"容器",da:"Beholder",he:"קונטיינר",fi:"Säiliö",hi:"कंटेनर",hr:"Kontejner",hu:"Tárhely",id:"Kontainer",ja:"コンテナ",ko:"컨테이너",no:"Container",sk:"Krabica",sl:"Rezervoar",sr:"Kontejner"}},waitForResourcesLoad:!0,resourcesPropPaths:[["adaptiveStyles",":ENV","styleAttributes","background"]],syncEnabled:!0,stylesImitationEnabled:!0},o="cl-";function i(t){return o+t}function r(t){return"cl-"+t}function s(t,e,n){var o;return null===(o=null==t?void 0:t[e])||void 0===o?void 0:o.find((t=>t.element===n))}function l(t=[]){return t.map((t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)})))}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return(e=function(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const d=p(p({},n),{},{name:"SysColumnComponent",componentType:"COLUMN",preventDraggable:!1,focusParentOnClick:!1,recursiveRemove:!0,version:"1.0.0",props:p(p({},n.props),{},{styles:[{element:"host",styleAttributes:{position:"relative",width:"auto",minWidth:"min-content",height:"100%",borderStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none",flexBasis:"0"},classes:""}],adaptiveStyles:(h=[{element:"host",styleAttributes:{display:"inline-flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""}],Object.values(t).reduce(((t,e)=>Object.assign(t,{[e]:l(h)})),{desktop:[],mobile:[]})),content:{size:1}}),propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"},hideSyncSelect:!0},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",hideSyncSelect:!0},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",hideSyncSelect:!0},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},hideSyncSelect:!0}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"},hideSyncSelect:!0},{type:"CONTROL",name:"DISPLAY",elementProp:"styleAttributes",elementSubProp:"display",element:"host",params:{label:"DOCUMENT_DISPLAY_ON_MOBILE",displayPropertyValue:"inline-flex"},displayCondition:"return (sdk.appConfig.columnsOptions?.allowHideColumnOnMobile ?? true) === true"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",hideSyncSelect:!0},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",hideSyncSelect:!0},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},hideSyncSelect:!0}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0}}]},floatingControlsModel:e([{type:"CONTROL",name:"COLUMNS_PROPORTIONS",propPath:["content","size"]},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"}},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),contextMenuModel:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT",params:{hideForEntryType:"VIEW"}}],metaDescription:{label:{en:"Column",ru:"Колонка",uk:"Колонка",es:"Columna",fr:"Colonne",de:"Spalte",it:"Colonna",pt:"Coluna",ro:"Coloană",bg:"Колона",cs:"Column",el:"Column",nl:"Column",pl:"Column",sv:"Column",tr:"Column",ar:"Column",zh:"Column",da:"Column",he:"Column",fi:"Column",hi:"Column",hr:"Column",hu:"Column",id:"Column",ja:"Column",ko:"Column",no:"Column",sk:"Column",sl:"Column",sr:"Column"}},syncEnabled:!0,stylesImitationEnabled:!0});var h;const m="VIEW",y="MODULE",g="CONTAINER",E="INPUT",b="BUTTON",O="CONSENT",f="COLUMN";var T,v;(v=T||(T={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",v.REQUEST="REQUEST",v.DISPATCH_EVENT="DISPATCH_EVENT",v.GO_TO_VIEW="GO_TO_VIEW",v.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",v.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",v.SHOW_WIDGET="SHOW_WIDGET",v.OPEN_LINK="OPEN_LINK",v.CLOSE_WIDGET="CLOSE_WIDGET",v.CLICK="CLICK";const C=T;var S,R;class N{static sortActions(t){const e={[C.CLOSE_WIDGET]:-1,[C.OPEN_LINK]:-2,[C.SHOW_WIDGET]:1,[C.SUBSCRIBE_CONTACT]:2,[C.REQUEST]:3},n=t=>void 0!==e[t.type]?e[t.type]:0;return[...t].sort(((t,e)=>n(t)>n(e)?-1:n(t)<n(e)?1:0))}constructor(t,e){this.config=t,this.actions=N.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const o=n(),i=o.getAttribute(r("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(r("type"))));let n=0;for(;e[n]&&e[n].getAttribute(r("id"))!==i;){let t=e[n].getAttribute(r("type"));if(N.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;n++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((o.shadowRoot||o).querySelectorAll(this.config.relativeSelector)):[o],this.targetElements.forEach((t=>{t.addEventListener("click",this.listener)}))}async execute(){var t,e,n,o;try{for(var i,r=!0,s=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},o("next"),o("throw"),o("return"),e[Symbol.asyncIterator]=function(){return this},e);function o(n){e[n]=t[n]&&function(e){return new Promise((function(o,i){!function(t,e,n,o){Promise.resolve(o).then((function(e){t({value:e,done:n})}),e)}(o,i,(e=t[n](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(i=await s.next()).done);r=!0){o=i.value,r=!1;const{event:t}=o;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}}catch(t){e={error:t}}finally{try{r||t||!(n=s.return)||await n.call(s)}finally{if(e)throw e.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach((t=>{t.removeEventListener("click",this.listener)})),this.targetElements=[])}}N.IGNORING_VIEW_ENTRY_TYPES=[b,O,E],(R=S||(S={})).CLICK="CLICK",R.COMPONENT_EVENT="COMPONENT_EVENT";class A{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){this.componentEmitterListener=e.on(this.config.eventName,(()=>{this.actions.forEach((e=>e.execute(t.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class _{constructor(t,e){this.actionFactory=t,this.actionRegister=e}get(t){const e=t.actions.map((t=>this.actionFactory.get(t)));switch(e.forEach((t=>this.actionRegister.register(t))),t.type){case S.CLICK:return new N(t,e);case S.COMPONENT_EVENT:return new A(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class L{static generate(){let t,e="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(e+="-"),t=Math.floor(16*Math.random()).toString(16).toUpperCase(),e+=t;return e}}class I{constructor(){this.listeners=I.createDefaultListenersState()}emit(t,e,n=null){const o=this.listeners[t];o&&Object.values(o).forEach((o=>o(e,t,n))),Object.values(this.listeners["*"]).forEach((o=>o(e,t,n)))}on(t,e){const n=L.generate(),o=this.listeners[t];return o?o[n]=e:this.listeners[t]={[n]:e},{off:()=>{var e,o;(null===(o=null===(e=this.listeners)||void 0===e?void 0:e[t])||void 0===o?void 0:o[n])&&delete this.listeners[t][n]}}}destroy(){this.listeners=I.createDefaultListenersState()}}I.createDefaultListenersState=()=>({"*":{}});const P=I,D=(t,e,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:r,addEventListener:s}=i;(r||s).call(t,e,n,o)};class k{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class M{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===y?Object.assign(Object.assign({},t),M.moduleToContainerParams):t));return Object.assign(Object.assign({},t),{children:e})}));return Object.assign(Object.assign({},t),{views:e})}static sort(t,e){return t.index>e.index?1:-1}static reIndex(t,e){return Object.assign(Object.assign({},t),{index:e+t.index})}}var w,x,j,U,B,W,F,G,V,H,K,$,z;M.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(x=w||(w={})).VIEW="VIEW",x.CONTAINER="CONTAINER",x.TEXT="TEXT",x.INPUT="INPUT",x.BUTTON="BUTTON",x.IMAGE="IMAGE",x.CONSENT="CONSENT",x.COUNTDOWN_TIMER="COUNTDOWN_TIMER",x.PROMO_CODE="PROMO_CODE",x.MULTIPLE_INPUT="MULTIPLE_INPUT",x.VIDEO="VIDEO",x.SLIDER="SLIDER",x.SLIDE="SLIDE",x.SOCIAL="SOCIAL",x.COLUMNS="COLUMNS",x.COLUMN="COLUMN",x.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(j||(j={})).CLICK="CLICK",function(t){t.SHOW_WIDGET="SHOW_WIDGET",t.OPEN_LINK="OPEN_LINK",t.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",t.REQUEST="REQUEST",t.CLOSE_WIDGET="CLOSE_WIDGET",t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.CLICK="CLICK"}(U||(U={})),function(t){t.SELF="_self",t.BLANK="_blank"}(B||(B={})),(W||(W={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(F||(F={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(G||(G={})),function(t){t.SLIDE_TO_TOP="SLIDE_TO_TOP",t.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",t.SLIDE_TO_LEFT="SLIDE_TO_LEFT",t.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(V||(V={})),function(t){t.PULSE="PULSE",t.VIBRATE="VIBRATE",t.WOBBLE="WOBBLE",t.SHAKE="SHAKE",t.JELLO="JELLO",t.BOUNCE="BOUNCE",t.BLINK="BLINK",t.FLICKER="FLICKER",t.PING="PING"}(H||(H={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(K||(K={})),(z=$||($={})).BEFORE="BEFORE",z.AFTER="AFTER",z.INSIDE="INSIDE",z.INSTEAD="INSTEAD";class Q extends P{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(Q.changeEventName,this._isMobile)}))}handleMobileBreakpoint(t){this.mobileBreakpointWidth=t;const e=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${e})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(Q.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(Q.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}Q.changeEventName="CHANGE";const Y=Q;class X{static set(t,e){const n=t[X.accumulatorPropertyName]||{};t[X.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[X.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}X.accumulatorPropertyName="clStyleAttributes";const J=X;var Z;!function(t){t.BUILT_IN="BUILT_IN",t.DETACHED="DETACHED",t.FLOATING_BOX="FLOATING_BOX",t.FLOATING_BAR="FLOATING_BAR",t.LAUNCHER="LAUNCHER",t.CONTENT_LOCKER="CONTENT_LOCKER"}(Z||(Z={}));class q{static applyHostStyles(t,e,n=null,o){var i,r,s;const l=null===(r=null===(i=null==n?void 0:n.props)||void 0===i?void 0:i.handlers)||void 0===r?void 0:r.find((t=>"CLICK"===t.type));l&&(null===(s=l.actions)||void 0===s?void 0:s.length)&&(e.style.cursor="pointer"),t!==m&&t!==g&&t!==f||(e.style.display=o===Z.CONTENT_LOCKER&&t===m?"flex":"inline-flex",e.style.position="relative"),e.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(t=""){this.styles=`${this.styles} ${t}`}getStyles(){return this.styles}}class tt{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class et{constructor(t,e,n,o,i,r){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=i,this.httpClient=r,this.schemaSubscription=null,this.themeSubscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(t){const e=String(t||"");if(e.includes("url")){const[t,n]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((n=>{var o,i,r,s,l;const a=null===(i=null===(o=e.adaptiveStyles)||void 0===o?void 0:o[t])||void 0===i?void 0:i.find((t=>t.element===n)),c=(null===(r=e.styles)||void 0===r?void 0:r.find((t=>t.element===n)))||{},p=(null===(s=null==c?void 0:c.styleAttributes)||void 0===s?void 0:s.background)||(null===(l=null==a?void 0:a.styleAttributes)||void 0===l?void 0:l.background),u=this.parseBackground(p);u.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:u.url,inlineSvgString:null,positionOptions:u.positionOptions})})),Promise.all([...this.envUrlMaps[t].entries()].map((([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((t=>t.text())).then((o=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))))).then((()=>{var e;const n=this.getSharedCb();return Object.keys((null===(e=n.theme)||void 0===e?void 0:e.schema)||{}).length>0?this._applyHostElementBackgroundFromTheme(this.envUrlMaps[t].get("host"),n.theme.schema):this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[t].get("host"),n.cssVars)})).catch((t=>{console.error(t),tt.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.schemaSubscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",(t=>{this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[this.getEnvCb()].get("host"),t)})),this.themeSubscription=this.documentModel.on("THEME_UPDATE",(t=>{this._applyHostElementBackgroundFromTheme(this.envUrlMaps[this.getEnvCb()].get("host"),t.schema)})),this}_applyHostElementBackgroundFromCssVars(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromCssVars(t,e))}_applyHostElementBackgroundFromTheme(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromTheme(t,e))}_buildBackgroundUrlFromCssVars(t,e){const n=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}_buildBackgroundUrlFromTheme(t,e){const n=t.inlineSvgString.trim();let o=n;return[...n.matchAll(/var\(--cl-schema-([^)]+)\)/g)].forEach((t=>{const n=function(t=""){return t.replace(/var\(\s*(--[^,\s)]+).*\)/,"$1").replace("--cl-schema-","")}(t[1]);var i;o=o.replace(`var(--${i=n,`cl-schema-${i}`})`,e[n])})),`url('data:image/svg+xml,${encodeURIComponent(o)}')${t.positionOptions}`}off(){var t,e;null===(t=this.schemaSubscription)||void 0===t||t.off(),null===(e=this.themeSubscription)||void 0===e||e.off()}}const nt=new class{execute(t,e="GET",n=null,o,i){const r={method:e,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:i};return n&&(r.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,r)}};function ot(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class it{static camelCaseToDashCase(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}static camelCaseToUpperSnakeCase(t){return t.replace(/[A-Z]/g,(t=>"_"+t)).toUpperCase()}}class rt{constructor(t){this._count=0,this.onUpdateCb=t}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}var st;!function(t){t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.COMPONENT_RESOURCES_LOADED="COMPONENT_RESOURCES_LOADED",t.FAILED_TO_LOAD_COMPONENT_RESOURCE="FAILED_TO_LOAD_COMPONENT_RESOURCE",t.EXECUTE_ACTION_BY_PREDICATE="EXECUTE_ACTION_BY_PREDICATE"}(st||(st={}));const lt=st;class at{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(lt.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(lt.FAILED_TO_LOAD_COMPONENT_RESOURCE,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=n,this.counters={pending:new rt(this.onCounterStateUpdate)}}}const ct=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>ct(...t)}},pt=ct,ut="props",dt="shared",ht="environment";function mt(t,e,n,o){const i=t=>{let r=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return r&&(o&&"function"==typeof o?o(r.getAttribute(e)):(null===(s=null==r?void 0:r.getAttribute)||void 0===s?void 0:s.call(r,e))===n)?r:r&&r.parentNode&&i(r.parentNode)||null;var s};return i(t)}const yt="SUBMIT";function gt(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{if("element"===n||"classes"===n)return;const o=e[n];o&&"object"==typeof o&&!Array.isArray(o)?t[n]=Object.assign(Object.assign({},t[n]||{}),o):t[n]=o})),t):t}function Et(t){const{element:e,html:n,appendHtml:o}=t,i=function(t){if(null==t)return"";if("string"!=typeof t)return String(t);if(""===t)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(t))return t;const e=(new DOMParser).parseFromString(t,"text/html");return e.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach((t=>t.remove())),e.querySelectorAll("*").forEach((t=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach((e=>t.removeAttribute(e))),Array.from(t.attributes).forEach((e=>{e.name.startsWith("on")&&t.removeAttribute(e.name)})),"A"===t.tagName||"AREA"===t.tagName){const e=t.getAttribute("href");e&&(e.startsWith("javascript:")||e.startsWith("data:"))&&t.removeAttribute("href")}if("IMG"===t.tagName||"IFRAME"===t.tagName){const e=t.getAttribute("src");e&&(e.startsWith("javascript:")||e.startsWith("data:text/html"))&&t.removeAttribute("src")}if("FORM"===t.tagName){const e=t.getAttribute("action");e&&e.startsWith("javascript:")&&t.removeAttribute("action")}})),e.body.innerHTML}(n);o?e.innerHTML+=i:e.innerHTML=i}class bt extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}var Ot;!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(Ot||(Ot={}));class ft extends HTMLElement{constructor(){var t;super(),this.construct=()=>{let t;const e=this.getAttribute(r("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${r("widget-id")}]`);let i;o&&(i=o.getAttribute(r("widget-id")));let s=new bt("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(r("path")),id:e,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(s),t=s.detail.props,Object.assign(this,t),this.observers=pt(ut,dt,ht),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(t){this.subscriptions.push(t)}off(){this.subscriptions.forEach((t=>null==t?void 0:t.off()))}},this.state=new k({}),this.componentEventEmitter=new P,this.componentResourceManager=new at(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new _(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,(t=>{this.model.props=t,this.observers.get(ut).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=r("floating");t.floating&&!e.getAttribute(n)?e.setAttribute(n,"true"):!t.floating&&e.getAttribute(n)&&e.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(t=>{Object.assign(this.model,t)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(dt).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new et(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),nt),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(Y.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(ht).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===Ot.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===Ot.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(ut).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(dt).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(ht).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${r("element")}]`)).filter((t=>!t.hasAttribute(r("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute(r("element"))===t&&n.id===e:n.getAttribute(r("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const n=this.getElements();if(!n.length)return;const o=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach((t=>{const e=t.element;let o=!1,i=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(gt(n,t),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(gt(n,t),i=!0)})),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!i&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e),i=r("type"),l="element-styles";let a=this.getRootElement().querySelector(`style[${i}="${l}"]`);a||(a=document.createElement("style"),a.setAttribute(i,l),this.getRootElement().appendChild(a)),Et({element:a,html:""}),n.forEach((t=>{let e=t.getAttribute(r("element"));const n=this.getEnvironment();let i=s(o,n,e);if(i){if(this.resizeListener.isMobile()){const t=s(o,"desktop",e);t&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),i.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(i),a)}})),this._addLinkColor(a,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,o]of Object.entries(e))t.style[n]=o;return!0},this.applyStylesToElement=(t,e,n)=>{var o,i;const s=[];"host"===(e=ft._resolveTogglableStylesForElementModel(e)).element&&(q.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),s.push("background")));let l=e.styleAttributes.background,a=l&&l.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&a){this.componentResourceManager.getPending().increment();const t=new Image;t.src=a[1],D(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),D(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:ot(e.styleAttributes,s)});if(J.set(t,c),this._setClassAttributes(t,e),n){if(e.hoverStyleAttributes){let o=Object.assign({},e.hoverStyleAttributes);if("FILL_UP"===e.hoverAnimationType){t.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",t.style.overflow="hidden";const n=t.tagName.toLowerCase(),i=`flip-up-animation-${e.element}`;let r=this.getRootElement().querySelector(`#${i}`);r||(r=document.createElement("style"),r.id=i,t.appendChild(r)),Et({element:r,html:`\n ${n}::before {\n content: '';\n background: ${o.background};\n position: absolute;\n left: 0;\n top: ${t.getBoundingClientRect().height}px;\n height: ${t.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${n}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),o=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}o.borderTopWidth&&"0px"!==o.borderTopWidth||delete o.borderTopColor,o.borderBottomWidth&&"0px"!==o.borderBottomWidth||delete o.borderBottomColor,o.borderLeftWidth&&"0px"!==o.borderLeftWidth||delete o.borderLeftColor,o.borderRightWidth&&"0px"!==o.borderRightWidth||delete o.borderRightColor,this._addStylesToStyleElement(n,e.element,o,`:not(.${r("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(n,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(t,e,n)}},this.applySharedClassesToElementModel=t=>function(t,e){let n=t;return(n.classes||"").split(" ").filter((t=>t.startsWith(o))).forEach((t=>{var o;let i=null===(o=e.textClasses)||void 0===o?void 0:o[t];i&&(i.styleAttributes.fontFamily||(i.isHeader&&e.headerFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.headerFontFamily})})),!i.isHeader&&e.textFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.textFontFamily})}))),n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},n.placeholderStyleAttributes),i.placeholderStyleAttributes)}))})),n.styleAttributes.fontFamily||(n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),{fontFamily:e.textFontFamily})})),n}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",i)=>{const s=Object.keys(n).reduce(((t,e)=>t+` ${it.camelCaseToDashCase(e)}: ${n[e]}${i?" !important;":";"}`),"");Et({element:t,html:`[${r("element")}="${e}"]${o} { ${s} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{Et({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,r;e.linkColor&&Et({element:t,html:`a {color: ${e.linkColor}}, a:visited {color: ${e.linkColor}}`,appendHtml:!0}),(null===(n=e.linkParams)||void 0===n?void 0:n.color)&&Et({element:t,html:`a {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(i=e.linkParams)||void 0===i?void 0:i.color}}`,appendHtml:!0}),(null===(r=e.linkParams)||void 0===r?void 0:r.removeUnderline)&&Et({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(t,e)=>{Array.from(t.classList).filter((t=>t!==i("hovered")&&t!==i("focused"))).forEach((e=>{e.startsWith(o)&&t.classList.remove(e)}));const n=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",n)},this.getParentComponent=()=>mt(this.parentNode,r("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(r("path"));return t&&1===t.split(",").length?this.parentNode:mt(this.parentNode,r("path"),void 0,(t=>t&&1===t.split(",").length))},this.getWidgetLanguages=()=>function(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>function(t,e){return e.reduce(((e,n)=>{if(e)return e;const o=function(t,e){if(!t)return null;if(e[t])return{translations:e[t],language:t};const n=function(t){return t.includes("-")?t.split("-")[0].toLowerCase():t.includes("_")?t.split("_")[0].toLowerCase():t}(t);return e[n]?{translations:e[n],language:n}:null}(n,t);return o||null}),null)}(t,this.getWidgetLanguages()),this.stylesAppliedToElement=(t,e,n)=>{},this.updateContext=()=>{var t;const e=this.getModel();this.services.context.updateRecord(e.id,{label:this.getContextRecordLabel(e.props),viewIndex:null===(t=e.path)||void 0===t?void 0:t[0]})},this.addContextRecord=()=>{var t;const e=this.getModel();this.services.context.addRecord(e.id,{recordKey:e.id,id:e.props.control.name,label:this.getContextRecordLabel(e.props),value:e.props.control.defaultValue||"",viewIndex:null===(t=e.path)||void 0===t?void 0:t[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(e.props)}})},this.getContextRecordLabel=t=>{var e,n,o,i,r,s;const l=t.control.name;if(["email","first_name","last_name"].includes(l))return l.toUpperCase();if((null===(e=t.content)||void 0===e?void 0:e.label)&&(null===(i=null===(o=null===(n=t.adaptiveStyles)||void 0===n?void 0:n.desktop.find((t=>"label"===t.element)))||void 0===o?void 0:o.params)||void 0===i?void 0:i.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(r=t.content)||void 0===r?void 0:r.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(s=t.control)||void 0===s?void 0:s.integrationName)?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{var e;switch(null===(e=t.control)||void 0===e?void 0:e.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find((t=>t.category===yt));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:C.REQUEST}).execute(void 0,void 0,!0,e)},this.getHandlers=()=>{var t;return(null===(t=this.getProps())||void 0===t?void 0:t.handlers)&&this.getProps().handlers.length?[...this.getProps().handlers]:[]},this.assets=(t="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${t?`/${t}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(t=this.constructor.define)||void 0===t?void 0:t.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}))}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}}ft._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=ft._resolveTogglableStyles(e[t]))})),e},ft._resolveTogglableStyles=t=>{const e=Object.assign({},t),n=(t,n,o)=>{n in e&&(t.forEach((t=>{t in e&&(e[t]=e[n]?e[t]:o)})),delete e[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e};const Tt=ft;function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function Ct(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,It(o.key),o)}}function St(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(St=function(){return!!t})()}function Rt(t,e,n,o){var i=Nt(At(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function Nt(){return Nt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=At(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Nt.apply(null,arguments)}function At(t){return At=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},At(t)}function _t(t,e){return _t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_t(t,e)}function Lt(t,e,n){return(e=It(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function It(t){var e=function(t){if("object"!=vt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=vt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vt(e)?e:e+""}var Pt=function(){function t(){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Lt(e=function(t,e,n){return e=At(e),function(t,e){if(e&&("object"==vt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,St()?Reflect.construct(e,n||[],At(t).constructor):e.apply(t,n))}(this,t,[].concat(o)),"manifest",{name:"SysContainerComponent"}),Lt(e,"getComponentName",(function(){return e.manifest.name})),Lt(e,"processStyles",(function(){e.innerHTML+='\n <style>\n [cl-component="'.concat(e.getComponentName(),'"] {\n position: relative;\n min-width: 50px;\n min-height: 50px;\n }\n </style>')})),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_t(t,e)}(t,Tt),function(t,e){return e&&Ct(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;Rt(t,"connectedCallback",this,3)([]),this.processStyles(),this.observeProps((function(t,n){e.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles)}))}},{key:"disconnectedCallback",value:function(){Rt(t,"disconnectedCallback",this,3)([])}}])}();function Dt(t){return Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dt(t)}function kt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function Mt(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,Ft(o.key),o)}}function wt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wt=function(){return!!t})()}function xt(t,e,n,o){var i=jt(Ut(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function jt(){return jt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ut(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},jt.apply(null,arguments)}function Ut(t){return Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ut(t)}function Bt(t,e){return Bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bt(t,e)}function Wt(t,e,n){return(e=Ft(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ft(t){var e=function(t){if("object"!=Dt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Dt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dt(e)?e:e+""}var Gt=function(){function t(){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Wt(e=function(t,e,n){return e=Ut(e),function(t,e){if(e&&("object"==Dt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,wt()?Reflect.construct(e,n||[],Ut(t).constructor):e.apply(t,n))}(this,t,[].concat(o)),"updateResponsiveStyles",(function(){var t,n,o=null===(t=e.getParentComponent())||void 0===t||null===(t=t.getProps())||void 0===t?void 0:t.isResponsive,i=(n=e.shadowRoot.children,function(t){if(Array.isArray(t))return kt(t)}(n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return kt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kt(t,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(t){return t.hasAttribute("cl-element")})),r=e.getHostElement().style;i.length?r.minWidth="min-content":(["paddingTop","paddingBottom","paddingLeft","paddingRight","padding"].map((function(t){return r[t]})).map((function(t){return t&&parseFloat(t)})).some(Boolean)&&(r.minWidth="min-content"),r.minWidth="20px"),"mobile"===e.getEnvironment()&&o&&(i.length?r.minHeight="auto":r.background.includes("url")?r.minHeight="150px":i.length||(r.minHeight="50px"))})),Wt(e,"updateEmptyState",(function(){var t=!(Array.from(e.getRootElement().children).filter((function(t){return"STYLE"!==t.tagName&&"SCRIPT"!==t.tagName}))||[]).length;e.setAttribute(r("empty"),t)})),Wt(e,"watchChildren",(function(){var t=e;e.mutationObserver=new MutationObserver((function(){t.updateEmptyState(),t.updateResponsiveStyles()})),e.mutationObserver.observe(e.getRootElement(),{childList:!0})})),Wt(e,"processSize",(function(t){var n,o="flexGrow",i=null!==(n=null!=t?t:e.style[o])&&void 0!==n?n:"1";e.style[o]=i})),Wt(e,"processStyles",(function(){e.innerHTML+='\n <style>\n [cl-component="'.concat(e.getComponentName(),'"] {\n position: relative;\n min-width: 50px;\n min-height: 50px;\n }\n </style>')})),Wt(e,"manifest",d),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bt(t,e)}(t,Pt),function(t,e){return e&&Mt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e,n=this;xt(t,"connectedCallback",this,3)([]),this.updateEmptyState(),this.watchChildren(),this.observeEnvironment((function(){n.updateResponsiveStyles()})),this.observeProps((function(t,e){var o;n.updateResponsiveStyles(),n.processSize(null===(o=e.content)||void 0===o?void 0:o.size)})),null===(e=this.getParentComponent())||void 0===e||e.observeProps((function(){n.updateResponsiveStyles()}))}},{key:"disconnectedCallback",value:function(){var e;xt(t,"disconnectedCallback",this,3)([]),null===(e=this.mutationObserver)||void 0===e||e.disconnect()}}])}();Wt(Gt,"define",{name:"sys-column",model:d.name,manifest:d});export{Gt as default};window.clComponentClass_SysColumnComponent=Gt;
|
|
1
|
+
const t={DESKTOP:"desktop",MOBILE:"mobile"};function e(e){return Object.values(t).map((t=>({type:"GROUP",propPath:["adaptiveStyles",t],children:e})))}const n={name:"SysContainerComponent",componentType:"CONTAINER",version:"1.0.0",contextMenuModel:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT",params:{hideForEntryType:"VIEW"}}],floatingControlsModel:e([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0,displayCondition:"return sdk.component.type === 'VIEW' ? (sdk.appConfig.allowBackdropFilterOnView ?? true) : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType === 'BUILT_IN' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0,displayCondition:"return sdk.component.type === 'VIEW' ? (sdk.appConfig.allowBackdropFilterOnView ?? true) : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType === 'BUILT_IN' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0},displayCondition:"return sdk.widgetType !== 'TEASER'"}]},events:{dispatch:[],listen:[]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!1},displayCondition:"return sdk.widgetType !== 'TEASER'"}]},i18nPropPaths:["handlers,[id],actions,[id],params,link","handlers,[id],actions,[id],params,customData"],props:{styles:[{element:"host",styleAttributes:{overflow:"visible",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"},classes:""}],adaptiveStyles:{desktop:[{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:"min-content",height:"auto",minHeight:null,flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,background:"rgba(0, 0, 0, 0.06)"},classes:""}],mobile:[{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:"min-content",height:"auto",minHeight:null,flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,background:"rgba(0, 0, 0, 0.06)"},classes:""}]}},metaDescription:{icon:"/SysContainerComponent/assets/img/component-icon.svg",label:{en:"Container",ru:"Контейнер",uk:"Контейнер",es:"Envase",fr:"Récipient",de:"Container",it:"Contenitore",pt:"Embalagem",ro:"Container",bg:"Контейнер",cs:"Kontejner",el:"Περιέκτης",nl:"Container",pl:"Kontener",sv:"Behållare",tr:"Konteyner",ar:"الحاوية",zh:"容器",da:"Beholder",he:"קונטיינר",fi:"Säiliö",hi:"कंटेनर",hr:"Kontejner",hu:"Tárhely",id:"Kontainer",ja:"コンテナ",ko:"컨테이너",no:"Container",sk:"Krabica",sl:"Rezervoar",sr:"Kontejner"}},waitForResourcesLoad:!0,resourcesPropPaths:[["adaptiveStyles",":ENV","styleAttributes","background"]],syncEnabled:!0,stylesImitationEnabled:!0},o="cl-";function i(t){return o+t}function s(t){return"cl-"+t}function r(t,e,n){var o;return null===(o=null==t?void 0:t[e])||void 0===o?void 0:o.find((t=>t.element===n))}function l(t=[]){return t.map((t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)})))}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return(e=function(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const d=p(p({},n),{},{name:"SysColumnComponent",componentType:"COLUMN",preventDraggable:!1,focusParentOnClick:!1,recursiveRemove:!0,version:"1.0.0",props:p(p({},n.props),{},{styles:[{element:"host",styleAttributes:{position:"relative",width:"auto",minWidth:"min-content",height:"100%",borderStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none",flexBasis:"0"},classes:""}],adaptiveStyles:(h=[{element:"host",styleAttributes:{display:"inline-flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""}],Object.values(t).reduce(((t,e)=>Object.assign(t,{[e]:l(h)})),{desktop:[],mobile:[]})),content:{size:1}}),propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"},hideSyncSelect:!0},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",hideSyncSelect:!0},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",hideSyncSelect:!0},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},hideSyncSelect:!0}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"},hideSyncSelect:!0},{type:"CONTROL",name:"DISPLAY",elementProp:"styleAttributes",elementSubProp:"display",element:"host",params:{label:"DOCUMENT_DISPLAY_ON_MOBILE",displayPropertyValue:"inline-flex"},displayCondition:"return (sdk.appConfig.columnsOptions?.allowHideColumnOnMobile ?? true) === true"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",hideSyncSelect:!0},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",hideSyncSelect:!0},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},hideSyncSelect:!0}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0}}]},floatingControlsModel:e([{type:"CONTROL",name:"COLUMNS_PROPORTIONS",propPath:["content","size"]},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"}},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),contextMenuModel:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT",params:{hideForEntryType:"VIEW"}}],metaDescription:{label:{en:"Column",ru:"Колонка",uk:"Колонка",es:"Columna",fr:"Colonne",de:"Spalte",it:"Colonna",pt:"Coluna",ro:"Coloană",bg:"Колона",cs:"Column",el:"Column",nl:"Column",pl:"Column",sv:"Column",tr:"Column",ar:"Column",zh:"Column",da:"Column",he:"Column",fi:"Column",hi:"Column",hr:"Column",hu:"Column",id:"Column",ja:"Column",ko:"Column",no:"Column",sk:"Column",sl:"Column",sr:"Column"}},syncEnabled:!0,stylesImitationEnabled:!0});var h;const m="VIEW",y="MODULE",g="CONTAINER",E="INPUT",b="BUTTON",O="CONSENT",f="COLUMN";var T,v;(v=T||(T={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",v.REQUEST="REQUEST",v.DISPATCH_EVENT="DISPATCH_EVENT",v.GO_TO_VIEW="GO_TO_VIEW",v.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",v.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",v.SHOW_WIDGET="SHOW_WIDGET",v.OPEN_LINK="OPEN_LINK",v.CLOSE_WIDGET="CLOSE_WIDGET",v.CLICK="CLICK";const C=T;var S,R;class N{static sortActions(t){const e={[C.CLOSE_WIDGET]:-1,[C.OPEN_LINK]:-2,[C.SHOW_WIDGET]:1,[C.SUBSCRIBE_CONTACT]:2,[C.REQUEST]:3},n=t=>void 0!==e[t.type]?e[t.type]:0;return[...t].sort(((t,e)=>n(t)>n(e)?-1:n(t)<n(e)?1:0))}constructor(t,e){this.config=t,this.actions=N.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const o=n(),i=o.getAttribute(s("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(s("type"))));let n=0;for(;e[n]&&e[n].getAttribute(s("id"))!==i;){let t=e[n].getAttribute(s("type"));if(N.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;n++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((o.shadowRoot||o).querySelectorAll(this.config.relativeSelector)):[o],this.targetElements.forEach((t=>{t.addEventListener("click",this.listener)}))}async execute(){var t,e,n,o;try{for(var i,s=!0,r=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},o("next"),o("throw"),o("return"),e[Symbol.asyncIterator]=function(){return this},e);function o(n){e[n]=t[n]&&function(e){return new Promise((function(o,i){!function(t,e,n,o){Promise.resolve(o).then((function(e){t({value:e,done:n})}),e)}(o,i,(e=t[n](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(i=await r.next()).done);s=!0){o=i.value,s=!1;const{event:t}=o;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}}catch(t){e={error:t}}finally{try{s||t||!(n=r.return)||await n.call(r)}finally{if(e)throw e.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach((t=>{t.removeEventListener("click",this.listener)})),this.targetElements=[])}}N.IGNORING_VIEW_ENTRY_TYPES=[b,O,E],(R=S||(S={})).CLICK="CLICK",R.COMPONENT_EVENT="COMPONENT_EVENT";class A{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){this.componentEmitterListener=e.on(this.config.eventName,(()=>{this.actions.forEach((e=>e.execute(t.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class _{constructor(t,e){this.actionFactory=t,this.actionRegister=e}get(t){const e=t.actions.map((t=>this.actionFactory.get(t)));switch(e.forEach((t=>this.actionRegister.register(t))),t.type){case S.CLICK:return new N(t,e);case S.COMPONENT_EVENT:return new A(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class L{static generate(){let t,e="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(e+="-"),t=Math.floor(16*Math.random()).toString(16).toUpperCase(),e+=t;return e}}class I{constructor(){this.listeners=I.createDefaultListenersState()}emit(t,e,n=null){const o=this.listeners[t];o&&Object.values(o).forEach((o=>o(e,t,n))),Object.values(this.listeners["*"]).forEach((o=>o(e,t,n)))}on(t,e){const n=L.generate(),o=this.listeners[t];return o?o[n]=e:this.listeners[t]={[n]:e},{off:()=>{var e,o;(null===(o=null===(e=this.listeners)||void 0===e?void 0:e[t])||void 0===o?void 0:o[n])&&delete this.listeners[t][n]}}}destroy(){this.listeners=I.createDefaultListenersState()}}I.createDefaultListenersState=()=>({"*":{}});const P=I,k=(t,e,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:s,addEventListener:r}=i;(s||r).call(t,e,n,o)};class D{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class M{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===y?Object.assign(Object.assign({},t),M.moduleToContainerParams):t));return Object.assign(Object.assign({},t),{children:e})}));return Object.assign(Object.assign({},t),{views:e})}static sort(t,e){return t.index>e.index?1:-1}static reIndex(t,e){return Object.assign(Object.assign({},t),{index:e+t.index})}}var w,x,j,B,U,W,F,G,V,H,K,$,z;M.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(x=w||(w={})).VIEW="VIEW",x.CONTAINER="CONTAINER",x.TEXT="TEXT",x.INPUT="INPUT",x.BUTTON="BUTTON",x.IMAGE="IMAGE",x.CONSENT="CONSENT",x.COUNTDOWN_TIMER="COUNTDOWN_TIMER",x.PROMO_CODE="PROMO_CODE",x.MULTIPLE_INPUT="MULTIPLE_INPUT",x.VIDEO="VIDEO",x.SLIDER="SLIDER",x.SLIDE="SLIDE",x.SOCIAL="SOCIAL",x.COLUMNS="COLUMNS",x.COLUMN="COLUMN",x.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(j||(j={})).CLICK="CLICK",function(t){t.SHOW_WIDGET="SHOW_WIDGET",t.OPEN_LINK="OPEN_LINK",t.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",t.REQUEST="REQUEST",t.CLOSE_WIDGET="CLOSE_WIDGET",t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.CLICK="CLICK"}(B||(B={})),function(t){t.SELF="_self",t.BLANK="_blank"}(U||(U={})),(W||(W={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(F||(F={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(G||(G={})),function(t){t.SLIDE_TO_TOP="SLIDE_TO_TOP",t.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",t.SLIDE_TO_LEFT="SLIDE_TO_LEFT",t.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(V||(V={})),function(t){t.PULSE="PULSE",t.VIBRATE="VIBRATE",t.WOBBLE="WOBBLE",t.SHAKE="SHAKE",t.JELLO="JELLO",t.BOUNCE="BOUNCE",t.BLINK="BLINK",t.FLICKER="FLICKER",t.PING="PING"}(H||(H={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(K||(K={})),(z=$||($={})).BEFORE="BEFORE",z.AFTER="AFTER",z.INSIDE="INSIDE",z.INSTEAD="INSTEAD";class Q extends P{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(Q.changeEventName,this._isMobile)}))}handleMobileBreakpoint(t){this.mobileBreakpointWidth=t;const e=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${e})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(Q.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(Q.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}Q.changeEventName="CHANGE";const Y=Q;class X{static set(t,e){const n=t[X.accumulatorPropertyName]||{};t[X.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[X.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}X.accumulatorPropertyName="clStyleAttributes";const J=X;var Z;!function(t){t.BUILT_IN="BUILT_IN",t.DETACHED="DETACHED",t.FLOATING_BOX="FLOATING_BOX",t.FLOATING_BAR="FLOATING_BAR",t.LAUNCHER="LAUNCHER",t.CONTENT_LOCKER="CONTENT_LOCKER"}(Z||(Z={}));class q{static applyHostStyles(t,e,n=null,o){var i,s,r;const l=null===(s=null===(i=null==n?void 0:n.props)||void 0===i?void 0:i.handlers)||void 0===s?void 0:s.find((t=>"CLICK"===t.type));l&&(null===(r=l.actions)||void 0===r?void 0:r.length)&&(e.style.cursor="pointer"),t!==m&&t!==g&&t!==f||(e.style.display=o===Z.CONTENT_LOCKER&&t===m?"flex":"inline-flex",e.style.position="relative"),e.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(t=""){this.styles=`${this.styles} ${t}`}getStyles(){return this.styles}}class tt{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class et{constructor(t,e,n,o,i,s){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=i,this.httpClient=s,this.schemaSubscription=null,this.themeSubscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(t){const e=String(t||"");if(e.includes("url")){const[t,n]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((n=>{var o,i,s,r,l;const a=null===(i=null===(o=e.adaptiveStyles)||void 0===o?void 0:o[t])||void 0===i?void 0:i.find((t=>t.element===n)),c=(null===(s=e.styles)||void 0===s?void 0:s.find((t=>t.element===n)))||{},p=(null===(r=null==c?void 0:c.styleAttributes)||void 0===r?void 0:r.background)||(null===(l=null==a?void 0:a.styleAttributes)||void 0===l?void 0:l.background),u=this.parseBackground(p);u.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:u.url,inlineSvgString:null,positionOptions:u.positionOptions})})),Promise.all([...this.envUrlMaps[t].entries()].map((([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((t=>t.text())).then((o=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))))).then((()=>{var e;const n=this.getSharedCb();return Object.keys((null===(e=n.theme)||void 0===e?void 0:e.schema)||{}).length>0?this._applyHostElementBackgroundFromTheme(this.envUrlMaps[t].get("host"),n.theme.schema):this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[t].get("host"),n.cssVars)})).catch((t=>{console.error(t),tt.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.schemaSubscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",(t=>{this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[this.getEnvCb()].get("host"),t)})),this.themeSubscription=this.documentModel.on("THEME_UPDATE",(t=>{this._applyHostElementBackgroundFromTheme(this.envUrlMaps[this.getEnvCb()].get("host"),t.schema)})),this}_applyHostElementBackgroundFromCssVars(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromCssVars(t,e))}_applyHostElementBackgroundFromTheme(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromTheme(t,e))}_buildBackgroundUrlFromCssVars(t,e){const n=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}_buildBackgroundUrlFromTheme(t,e){const n=t.inlineSvgString.trim();let o=n;return[...n.matchAll(/var\(--cl-schema-([^)]+)\)/g)].forEach((t=>{const n=function(t=""){return t.replace(/var\(\s*(--[^,\s)]+).*\)/,"$1").replace("--cl-schema-","")}(t[1]);var i;o=o.replace(`var(--${i=n,`cl-schema-${i}`})`,e[n])})),`url('data:image/svg+xml,${encodeURIComponent(o)}')${t.positionOptions}`}off(){var t,e;null===(t=this.schemaSubscription)||void 0===t||t.off(),null===(e=this.themeSubscription)||void 0===e||e.off()}}const nt=new class{execute(t,e="GET",n=null,o,i){const s={method:e,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:i};return n&&(s.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,s)}};function ot(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class it{static camelCaseToDashCase(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}static camelCaseToUpperSnakeCase(t){return t.replace(/[A-Z]/g,(t=>"_"+t)).toUpperCase()}}class st{constructor(t){this._count=0,this.onUpdateCb=t}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}var rt;!function(t){t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.COMPONENT_RESOURCES_LOADED="COMPONENT_RESOURCES_LOADED",t.FAILED_TO_LOAD_COMPONENT_RESOURCE="FAILED_TO_LOAD_COMPONENT_RESOURCE",t.EXECUTE_ACTION_BY_PREDICATE="EXECUTE_ACTION_BY_PREDICATE"}(rt||(rt={}));const lt=rt;class at{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(lt.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(lt.FAILED_TO_LOAD_COMPONENT_RESOURCE,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=n,this.counters={pending:new st(this.onCounterStateUpdate)}}}const ct=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>ct(...t)}},pt=ct,ut="props",dt="shared",ht="environment";function mt(t,e,n,o){const i=t=>{let s=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return s&&(o&&"function"==typeof o?o(s.getAttribute(e)):(null===(r=null==s?void 0:s.getAttribute)||void 0===r?void 0:r.call(s,e))===n)?s:s&&s.parentNode&&i(s.parentNode)||null;var r};return i(t)}const yt="SUBMIT";function gt(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{if("element"===n||"classes"===n)return;const o=e[n];o&&"object"==typeof o&&!Array.isArray(o)?t[n]=Object.assign(Object.assign({},t[n]||{}),o):t[n]=o})),t):t}function Et(t){const{element:e,html:n,appendHtml:o}=t,i=function(t){if(null==t)return"";if("string"!=typeof t)return String(t);if(""===t)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(t))return t;const e=(new DOMParser).parseFromString(t,"text/html");return e.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach((t=>t.remove())),e.querySelectorAll("*").forEach((t=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach((e=>t.removeAttribute(e))),Array.from(t.attributes).forEach((e=>{e.name.startsWith("on")&&t.removeAttribute(e.name)})),"A"===t.tagName||"AREA"===t.tagName){const e=t.getAttribute("href");e&&(e.startsWith("javascript:")||e.startsWith("data:"))&&t.removeAttribute("href")}if("IMG"===t.tagName||"IFRAME"===t.tagName){const e=t.getAttribute("src");e&&(e.startsWith("javascript:")||e.startsWith("data:text/html"))&&t.removeAttribute("src")}if("FORM"===t.tagName){const e=t.getAttribute("action");e&&e.startsWith("javascript:")&&t.removeAttribute("action")}})),e.body.innerHTML}(n);o?e.innerHTML+=i:e.innerHTML=i}class bt extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}var Ot;!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(Ot||(Ot={}));class ft extends HTMLElement{constructor(){var t;super(),this.skipGameBlur=!0,this.construct=()=>{let t;const e=this.getAttribute(s("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${s("widget-id")}]`);let i;o&&(i=o.getAttribute(s("widget-id")));let r=new bt("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(s("path")),id:e,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(r),t=r.detail.props,Object.assign(this,t),this.observers=pt(ut,dt,ht),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(t){this.subscriptions.push(t)}off(){this.subscriptions.forEach((t=>null==t?void 0:t.off()))}},this.state=new D({}),this.componentEventEmitter=new P,this.componentResourceManager=new at(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new _(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,(t=>{this.model.props=t,this.observers.get(ut).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=s("floating");t.floating&&!e.getAttribute(n)?e.setAttribute(n,"true"):!t.floating&&e.getAttribute(n)&&e.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(t=>{Object.assign(this.model,t)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(dt).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new et(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),nt),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(Y.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(ht).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t}))),this.subscriptions.push(this.services.eventEmitter.on("GAME_PHASE_READY_TO_PLAY",(()=>{this.skipGameBlur||this.getHostElement().classList.add("cl-game-spotlight-component")}))),this.subscriptions.push(this.services.eventEmitter.on("GAME_PHASE_COMPLETED",(()=>{this.skipGameBlur||this.getHostElement().classList.remove("cl-game-spotlight-component")})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===Ot.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===Ot.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(ut).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(dt).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(ht).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${s("element")}]`)).filter((t=>!t.hasAttribute(s("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute(s("element"))===t&&n.id===e:n.getAttribute(s("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const n=this.getElements();if(!n.length)return;const o=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach((t=>{const e=t.element;let o=!1,i=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(gt(n,t),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(gt(n,t),i=!0)})),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!i&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e),i=s("type"),l="element-styles";let a=this.getRootElement().querySelector(`style[${i}="${l}"]`);a||(a=document.createElement("style"),a.setAttribute(i,l),this.getRootElement().appendChild(a)),Et({element:a,html:""}),n.forEach((t=>{let e=t.getAttribute(s("element"));const n=this.getEnvironment();let i=r(o,n,e);if(i){if(this.resizeListener.isMobile()){const t=r(o,"desktop",e);t&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),i.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(i),a)}})),this._addLinkColor(a,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,o]of Object.entries(e))t.style[n]=o;return!0},this.applyStylesToElement=(t,e,n)=>{var o,i;const r=[];"host"===(e=ft._resolveTogglableStylesForElementModel(e)).element&&(q.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),r.push("background")));let l=e.styleAttributes.background,a=l&&l.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&a){this.componentResourceManager.getPending().increment();const t=new Image;t.src=a[1],k(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),k(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:ot(e.styleAttributes,r)});if(J.set(t,c),this._setClassAttributes(t,e),n){if(e.hoverStyleAttributes){let o=Object.assign({},e.hoverStyleAttributes);if("FILL_UP"===e.hoverAnimationType){t.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",t.style.overflow="hidden";const n=t.tagName.toLowerCase(),i=`flip-up-animation-${e.element}`;let s=this.getRootElement().querySelector(`#${i}`);s||(s=document.createElement("style"),s.id=i,t.appendChild(s)),Et({element:s,html:`\n ${n}::before {\n content: '';\n background: ${o.background};\n position: absolute;\n left: 0;\n top: ${t.getBoundingClientRect().height}px;\n height: ${t.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${n}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),o=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}o.borderTopWidth&&"0px"!==o.borderTopWidth||delete o.borderTopColor,o.borderBottomWidth&&"0px"!==o.borderBottomWidth||delete o.borderBottomColor,o.borderLeftWidth&&"0px"!==o.borderLeftWidth||delete o.borderLeftColor,o.borderRightWidth&&"0px"!==o.borderRightWidth||delete o.borderRightColor,this._addStylesToStyleElement(n,e.element,o,`:not(.${s("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(n,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(t,e,n)}},this.applySharedClassesToElementModel=t=>function(t,e){let n=t;return(n.classes||"").split(" ").filter((t=>t.startsWith(o))).forEach((t=>{var o;let i=null===(o=e.textClasses)||void 0===o?void 0:o[t];i&&(i.styleAttributes.fontFamily||(i.isHeader&&e.headerFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.headerFontFamily})})),!i.isHeader&&e.textFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.textFontFamily})}))),n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},n.placeholderStyleAttributes),i.placeholderStyleAttributes)}))})),n.styleAttributes.fontFamily||(n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),{fontFamily:e.textFontFamily})})),n}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",i)=>{const r=Object.keys(n).reduce(((t,e)=>t+` ${it.camelCaseToDashCase(e)}: ${n[e]}${i?" !important;":";"}`),"");Et({element:t,html:`[${s("element")}="${e}"]${o} { ${r} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{Et({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,s;e.linkColor&&Et({element:t,html:`a {color: ${e.linkColor}}, a:visited {color: ${e.linkColor}}`,appendHtml:!0}),(null===(n=e.linkParams)||void 0===n?void 0:n.color)&&Et({element:t,html:`a {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(i=e.linkParams)||void 0===i?void 0:i.color}}`,appendHtml:!0}),(null===(s=e.linkParams)||void 0===s?void 0:s.removeUnderline)&&Et({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(t,e)=>{Array.from(t.classList).filter((t=>t!==i("hovered")&&t!==i("focused"))).forEach((e=>{e.startsWith(o)&&t.classList.remove(e)}));const n=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",n)},this.getParentComponent=()=>mt(this.parentNode,s("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(s("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:mt(this.parentNode,s("path"),void 0,(t=>1===(null==t?void 0:t.split(",").length)))},this.getWidgetLanguages=()=>function(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>function(t,e){return e.reduce(((e,n)=>{if(e)return e;const o=function(t,e){if(!t)return null;if(e[t])return{translations:e[t],language:t};const n=function(t){return t.includes("-")?t.split("-")[0].toLowerCase():t.includes("_")?t.split("_")[0].toLowerCase():t}(t);return e[n]?{translations:e[n],language:n}:null}(n,t);return o||null}),null)}(t,this.getWidgetLanguages()),this.stylesAppliedToElement=(t,e,n)=>{},this.updateContext=()=>{var t;const e=this.getModel();this.services.context.updateRecord(e.id,{label:this.getContextRecordLabel(e.props),viewIndex:null===(t=e.path)||void 0===t?void 0:t[0]})},this.addContextRecord=()=>{var t;const e=this.getModel();this.services.context.addRecord(e.id,{recordKey:e.id,id:e.props.control.name,label:this.getContextRecordLabel(e.props),value:e.props.control.defaultValue||"",viewIndex:null===(t=e.path)||void 0===t?void 0:t[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(e.props)}})},this.getContextRecordLabel=t=>{var e,n,o,i,s,r;const l=t.control.name;if(["email","first_name","last_name"].includes(l))return l.toUpperCase();if((null===(e=t.content)||void 0===e?void 0:e.label)&&(null===(i=null===(o=null===(n=t.adaptiveStyles)||void 0===n?void 0:n.desktop.find((t=>"label"===t.element)))||void 0===o?void 0:o.params)||void 0===i?void 0:i.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(s=t.content)||void 0===s?void 0:s.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(r=t.control)||void 0===r?void 0:r.integrationName)?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{var e;switch(null===(e=t.control)||void 0===e?void 0:e.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find((t=>t.category===yt));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:C.REQUEST}).execute(void 0,void 0,!0,e)},this.getHandlers=()=>{var t;return(null===(t=this.getProps())||void 0===t?void 0:t.handlers)&&this.getProps().handlers.length?[...this.getProps().handlers]:[]},this.assets=(t="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${t?`/${t}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(t=this.constructor.define)||void 0===t?void 0:t.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}));const t=document.createElement("style");t.textContent='\n :host(.cl-game-spotlight-component)::after {\n content: "";\n position: absolute;\n background-size: 100% 100%;\n background-repeat: no-repeat;\n overflow: visible;\n \n backdrop-filter: blur(4px);\n \n inset: -30px;\n mask-image: \n linear-gradient(to bottom, transparent, grey 30px, grey calc(100% - 30px), transparent),\n linear-gradient(to right, transparent, grey 30px, grey calc(100% - 30px), transparent);\n mask-composite: intersect;\n -webkit-mask-composite: source-in; /* for Chrome/Safari */\n \n transition: opacity 0.35s ease;\n pointer-events: auto;\n }\n ',this.getRootElement().prepend(t)}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}}ft._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=ft._resolveTogglableStyles(e[t]))})),e},ft._resolveTogglableStyles=t=>{const e=Object.assign({},t),n=(t,n,o)=>{n in e&&(t.forEach((t=>{t in e&&(e[t]=e[n]?e[t]:o)})),delete e[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e};const Tt=ft;function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function Ct(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,It(o.key),o)}}function St(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(St=function(){return!!t})()}function Rt(t,e,n,o){var i=Nt(At(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function Nt(){return Nt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=At(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Nt.apply(null,arguments)}function At(t){return At=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},At(t)}function _t(t,e){return _t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_t(t,e)}function Lt(t,e,n){return(e=It(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function It(t){var e=function(t){if("object"!=vt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=vt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vt(e)?e:e+""}var Pt=function(){function t(){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Lt(e=function(t,e,n){return e=At(e),function(t,e){if(e&&("object"==vt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,St()?Reflect.construct(e,n||[],At(t).constructor):e.apply(t,n))}(this,t,[].concat(o)),"manifest",{name:"SysContainerComponent"}),Lt(e,"getComponentName",(function(){return e.manifest.name})),Lt(e,"processStyles",(function(){e.innerHTML+='\n <style>\n [cl-component="'.concat(e.getComponentName(),'"] {\n position: relative;\n min-width: 50px;\n min-height: 50px;\n }\n </style>')})),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_t(t,e)}(t,Tt),function(t,e){return e&&Ct(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;Rt(t,"connectedCallback",this,3)([]),this.processStyles(),this.observeProps((function(t,n){e.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles)}))}},{key:"disconnectedCallback",value:function(){Rt(t,"disconnectedCallback",this,3)([])}}])}();function kt(t){return kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kt(t)}function Dt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function Mt(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,Ft(o.key),o)}}function wt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wt=function(){return!!t})()}function xt(t,e,n,o){var i=jt(Bt(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function jt(){return jt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Bt(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},jt.apply(null,arguments)}function Bt(t){return Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Bt(t)}function Ut(t,e){return Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ut(t,e)}function Wt(t,e,n){return(e=Ft(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ft(t){var e=function(t){if("object"!=kt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=kt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kt(e)?e:e+""}var Gt=function(){function t(){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Wt(e=function(t,e,n){return e=Bt(e),function(t,e){if(e&&("object"==kt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,wt()?Reflect.construct(e,n||[],Bt(t).constructor):e.apply(t,n))}(this,t,[].concat(o)),"updateResponsiveStyles",(function(){var t,n,o=null===(t=e.getParentComponent())||void 0===t||null===(t=t.getProps())||void 0===t?void 0:t.isResponsive,i=(n=e.shadowRoot.children,function(t){if(Array.isArray(t))return Dt(t)}(n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return Dt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dt(t,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(t){return t.hasAttribute("cl-element")})),s=e.getHostElement().style;i.length?s.minWidth="min-content":(["paddingTop","paddingBottom","paddingLeft","paddingRight","padding"].map((function(t){return s[t]})).map((function(t){return t&&parseFloat(t)})).some(Boolean)&&(s.minWidth="min-content"),s.minWidth="20px"),"mobile"===e.getEnvironment()&&o&&(i.length?s.minHeight="auto":s.background.includes("url")?s.minHeight="150px":i.length||(s.minHeight="50px"))})),Wt(e,"updateEmptyState",(function(){var t=!(Array.from(e.getRootElement().children).filter((function(t){return"STYLE"!==t.tagName&&"SCRIPT"!==t.tagName}))||[]).length;e.setAttribute(s("empty"),t)})),Wt(e,"watchChildren",(function(){var t=e;e.mutationObserver=new MutationObserver((function(){t.updateEmptyState(),t.updateResponsiveStyles()})),e.mutationObserver.observe(e.getRootElement(),{childList:!0})})),Wt(e,"processSize",(function(t){var n,o="flexGrow",i=null!==(n=null!=t?t:e.style[o])&&void 0!==n?n:"1";e.style[o]=i})),Wt(e,"processStyles",(function(){e.innerHTML+='\n <style>\n [cl-component="'.concat(e.getComponentName(),'"] {\n position: relative;\n min-width: 50px;\n min-height: 50px;\n }\n </style>')})),Wt(e,"manifest",d),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ut(t,e)}(t,Pt),function(t,e){return e&&Mt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e,n=this;xt(t,"connectedCallback",this,3)([]),this.updateEmptyState(),this.watchChildren(),this.observeEnvironment((function(){n.updateResponsiveStyles()})),this.observeProps((function(t,e){var o;n.updateResponsiveStyles(),n.processSize(null===(o=e.content)||void 0===o?void 0:o.size)})),null===(e=this.getParentComponent())||void 0===e||e.observeProps((function(){n.updateResponsiveStyles()}))}},{key:"disconnectedCallback",value:function(){var e;xt(t,"disconnectedCallback",this,3)([]),null===(e=this.mutationObserver)||void 0===e||e.disconnect()}}])}();Wt(Gt,"define",{name:"sys-column",model:d.name,manifest:d});export{Gt as default};window.clComponentClass_SysColumnComponent=Gt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var t={32:(t,e,n)=>{n.d(e,{A:()=>s});const s={name:"SysColumnsComponent",componentType:"COLUMNS",version:"1.0.0",contextMenuModel:[],floatingControlsModel:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host",params:{width:{minValue:50},height:{minValue:50}}},{type:"CONTROL",name:"CONTAINER_PADDING",propPathCondition:"return sdk.component.type === 'VIEW' ? {element: 'host', elementProp: 'styleAttributes'} : {propPath: ['styles', '[element=host]', 'styleAttributes']}"},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"}},{type:"CONTROL",name:"COLUMNS_PROPORTIONS",propPath:["content","size"],params:{parent:!0}}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host",params:{width:{minValue:50},height:{minValue:50}}},{type:"CONTROL",name:"CONTAINER_PADDING",propPathCondition:"return sdk.component.type === 'VIEW' ? {element: 'host', elementProp: 'styleAttributes'} : {propPath: ['styles', '[element=host]', 'styleAttributes']}"},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"COLUMNS_PROPORTIONS",propPath:["content","size"],params:{parent:!0}}]}],propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"],minValue:50},height:{options:["fixed","fill","hug"],minValue:50}},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"COLUMNS",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"SWITCH",propPath:["isResponsive"],params:{label:"ADAPTIVE_COLUMNS",boldLabel:!0}},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"INDENTATION",propPathCondition:"return sdk.component.type === 'VIEW' ? {element: 'host', elementProp: 'styleAttributes'} : {propPath: ['styles', '[element=host]', 'styleAttributes']}",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"COLUMNS",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"SWITCH",propPath:["isResponsive"],params:{label:"ADAPTIVE_COLUMNS",boldLabel:!0}},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"INDENTATION",propPathCondition:"return sdk.component.type === 'VIEW' ? {element: 'host', elementProp: 'styleAttributes'} : {propPath: ['styles', '[element=host]', 'styleAttributes']}",params:{indentationType:"PADDING"}},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0}}]},events:{dispatch:[],listen:[]},props:{styles:[{element:"host",styleAttributes:{}}],adaptiveStyles:(0,n(521).KY)([{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:"50px",height:"auto",gap:"10px"}}]),isResponsive:!0},metaDescription:{icon:"/SysColumnsComponent/assets/img/columns-component-icon.svg",label:{en:"Columns",ru:"Колонки",uk:"Колонки",es:"Columns",fr:"Columns",de:"Columns",it:"Columns",pt:"Columns",ro:"Columns",bg:"Columns",cs:"Columns",el:"Columns",nl:"Columns",pl:"Columns",sv:"Columns",tr:"Columns",ar:"Columns",zh:"Columns",da:"Columns",he:"Columns",fi:"Columns",hi:"Columns",hr:"Columns",hu:"Columns",id:"Columns",ja:"Columns",ko:"Columns",no:"Columns",sk:"Columns",sl:"Columns",sr:"Columns"},defaultPreset:"50%-50%"},waitForResourcesLoad:!0,resourcesPropPaths:[["adaptiveStyles",":ENV","styleAttributes","background"]],syncEnabled:!0,stylesImitationEnabled:!0}},360:(t,e,n)=>{n.d(e,{_N:()=>s,vi:()=>o,yU:()=>i});const s={SYSTEM_CLASS_PREFIX:"cl-",SYSTEM_ATTRIBUTE_PREFIX:"cl-"};function i(t){return s.SYSTEM_CLASS_PREFIX+t}function o(t){return s.SYSTEM_ATTRIBUTE_PREFIX+t}},390:(t,e,n)=>{n.d(e,{P:()=>s});const s={DESKTOP:"desktop",MOBILE:"mobile"};s.MOBILE},521:(t,e,n)=>{n.d(e,{KY:()=>a,MW:()=>l,xK:()=>o});var s=n(390),i=n(360);function o(t,e,n){var s;return null===(s=null==t?void 0:t[e])||void 0===s?void 0:s.find((t=>t.element===n))}function r(t=[]){return t.map((t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)})))}function a(t){return Object.values(s.P).reduce(((e,n)=>Object.assign(e,{[n]:r(t)})),{desktop:[],mobile:[]})}function l(t,e){let n=t;return(n.classes||"").split(" ").filter((t=>t.startsWith(i._N.SYSTEM_CLASS_PREFIX))).forEach((t=>{var s;let i=null===(s=e.textClasses)||void 0===s?void 0:s[t];i&&(i.styleAttributes.fontFamily||(i.isHeader&&e.headerFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.headerFontFamily})})),!i.isHeader&&e.textFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.textFontFamily})}))),n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},n.placeholderStyleAttributes),i.placeholderStyleAttributes)}))})),n.styleAttributes.fontFamily||(n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),{fontFamily:e.textFontFamily})})),n}}},e={};function n(s){var i=e[s];if(void 0!==i)return i.exports;var o=e[s]={exports:{}};return t[s](o,o.exports,n),o.exports}n.d=(t,e)=>{for(var s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s={};n.d(s,{A:()=>Rt});var i=n(32),o=n(360);const r="VIEW",a="MODULE",l="CONTAINER",c="INPUT",h="BUTTON",u="CONSENT",p="COLUMN";var d,m;(m=d||(d={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",m.REQUEST="REQUEST",m.DISPATCH_EVENT="DISPATCH_EVENT",m.GO_TO_VIEW="GO_TO_VIEW",m.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",m.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",m.SHOW_WIDGET="SHOW_WIDGET",m.OPEN_LINK="OPEN_LINK",m.CLOSE_WIDGET="CLOSE_WIDGET",m.CLICK="CLICK";const E=d;var y,g;class O{static sortActions(t){const e={[E.CLOSE_WIDGET]:-1,[E.OPEN_LINK]:-2,[E.SHOW_WIDGET]:1,[E.SUBSCRIBE_CONTACT]:2,[E.REQUEST]:3},n=t=>void 0!==e[t.type]?e[t.type]:0;return[...t].sort(((t,e)=>n(t)>n(e)?-1:n(t)<n(e)?1:0))}constructor(t,e){this.config=t,this.actions=O.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const s=n(),i=s.getAttribute((0,o.vi)("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute((0,o.vi)("type"))));let n=0;for(;e[n]&&e[n].getAttribute((0,o.vi)("id"))!==i;){let t=e[n].getAttribute((0,o.vi)("type"));if(O.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;n++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((s.shadowRoot||s).querySelectorAll(this.config.relativeSelector)):[s],this.targetElements.forEach((t=>{t.addEventListener("click",this.listener)}))}async execute(){var t,e,n,s;try{for(var i,o=!0,r=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},s("next"),s("throw"),s("return"),e[Symbol.asyncIterator]=function(){return this},e);function s(n){e[n]=t[n]&&function(e){return new Promise((function(s,i){!function(t,e,n,s){Promise.resolve(s).then((function(e){t({value:e,done:n})}),e)}(s,i,(e=t[n](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(i=await r.next()).done);o=!0){s=i.value,o=!1;const{event:t}=s;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}}catch(t){e={error:t}}finally{try{o||t||!(n=r.return)||await n.call(r)}finally{if(e)throw e.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach((t=>{t.removeEventListener("click",this.listener)})),this.targetElements=[])}}O.IGNORING_VIEW_ENTRY_TYPES=[h,u,c],(g=y||(y={})).CLICK="CLICK",g.COMPONENT_EVENT="COMPONENT_EVENT";class v{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){this.componentEmitterListener=e.on(this.config.eventName,(()=>{this.actions.forEach((e=>e.execute(t.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class b{constructor(t,e){this.actionFactory=t,this.actionRegister=e}get(t){const e=t.actions.map((t=>this.actionFactory.get(t)));switch(e.forEach((t=>this.actionRegister.register(t))),t.type){case y.CLICK:return new O(t,e);case y.COMPONENT_EVENT:return new v(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class T{static generate(){let t,e="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(e+="-"),t=Math.floor(16*Math.random()).toString(16).toUpperCase(),e+=t;return e}}class C{constructor(){this.listeners=C.createDefaultListenersState()}emit(t,e,n=null){const s=this.listeners[t];s&&Object.values(s).forEach((s=>s(e,t,n))),Object.values(this.listeners["*"]).forEach((s=>s(e,t,n)))}on(t,e){const n=T.generate(),s=this.listeners[t];return s?s[n]=e:this.listeners[t]={[n]:e},{off:()=>{var e,s;(null===(s=null===(e=this.listeners)||void 0===e?void 0:e[t])||void 0===s?void 0:s[n])&&delete this.listeners[t][n]}}}destroy(){this.listeners=C.createDefaultListenersState()}}C.createDefaultListenersState=()=>({"*":{}});const f=C,S=(t,e,n,s)=>{const i=EventTarget.prototype,{addEventListenerBase:o,addEventListener:r}=i;(o||r).call(t,e,n,s)};class _{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class N{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===a?Object.assign(Object.assign({},t),N.moduleToContainerParams):t));return Object.assign(Object.assign({},t),{children:e})}));return Object.assign(Object.assign({},t),{views:e})}static sort(t,e){return t.index>e.index?1:-1}static reIndex(t,e){return Object.assign(Object.assign({},t),{index:e+t.index})}}var A,R,I,L,P,M,D,w,k,U,W,x,V;N.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(R=A||(A={})).VIEW="VIEW",R.CONTAINER="CONTAINER",R.TEXT="TEXT",R.INPUT="INPUT",R.BUTTON="BUTTON",R.IMAGE="IMAGE",R.CONSENT="CONSENT",R.COUNTDOWN_TIMER="COUNTDOWN_TIMER",R.PROMO_CODE="PROMO_CODE",R.MULTIPLE_INPUT="MULTIPLE_INPUT",R.VIDEO="VIDEO",R.SLIDER="SLIDER",R.SLIDE="SLIDE",R.SOCIAL="SOCIAL",R.COLUMNS="COLUMNS",R.COLUMN="COLUMN",R.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(I||(I={})).CLICK="CLICK",function(t){t.SHOW_WIDGET="SHOW_WIDGET",t.OPEN_LINK="OPEN_LINK",t.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",t.REQUEST="REQUEST",t.CLOSE_WIDGET="CLOSE_WIDGET",t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.CLICK="CLICK"}(L||(L={})),function(t){t.SELF="_self",t.BLANK="_blank"}(P||(P={})),(M||(M={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(D||(D={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(w||(w={})),function(t){t.SLIDE_TO_TOP="SLIDE_TO_TOP",t.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",t.SLIDE_TO_LEFT="SLIDE_TO_LEFT",t.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(k||(k={})),function(t){t.PULSE="PULSE",t.VIBRATE="VIBRATE",t.WOBBLE="WOBBLE",t.SHAKE="SHAKE",t.JELLO="JELLO",t.BOUNCE="BOUNCE",t.BLINK="BLINK",t.FLICKER="FLICKER",t.PING="PING"}(U||(U={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(W||(W={})),(V=x||(x={})).BEFORE="BEFORE",V.AFTER="AFTER",V.INSIDE="INSIDE",V.INSTEAD="INSTEAD";const B="ENVIRONMENT_UPDATE";class F extends f{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on(B,(({isMobileEnv:t})=>{this._isMobile=t,this.emit(F.changeEventName,this._isMobile)}))}handleMobileBreakpoint(t){this.mobileBreakpointWidth=t;const e=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${e})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(F.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(F.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}F.changeEventName="CHANGE";const j=F;class G{static set(t,e){const n=t[G.accumulatorPropertyName]||{};t[G.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[G.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}G.accumulatorPropertyName="clStyleAttributes";const H=G;var $;!function(t){t.BUILT_IN="BUILT_IN",t.DETACHED="DETACHED",t.FLOATING_BOX="FLOATING_BOX",t.FLOATING_BAR="FLOATING_BAR",t.LAUNCHER="LAUNCHER",t.CONTENT_LOCKER="CONTENT_LOCKER"}($||($={}));class K{static applyHostStyles(t,e,n=null,s){var i,o,a;const c=null===(o=null===(i=null==n?void 0:n.props)||void 0===i?void 0:i.handlers)||void 0===o?void 0:o.find((t=>"CLICK"===t.type));c&&(null===(a=c.actions)||void 0===a?void 0:a.length)&&(e.style.cursor="pointer"),t!==r&&t!==l&&t!==p||(e.style.display=s===$.CONTENT_LOCKER&&t===r?"flex":"inline-flex",e.style.position="relative"),e.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(t=""){this.styles=`${this.styles} ${t}`}getStyles(){return this.styles}}class X{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class Y{constructor(t,e,n,s,i,o){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=s,this.getEnvCb=i,this.httpClient=o,this.schemaSubscription=null,this.themeSubscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(t){const e=String(t||"");if(e.includes("url")){const[t,n]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((n=>{var s,i,o,r,a;const l=null===(i=null===(s=e.adaptiveStyles)||void 0===s?void 0:s[t])||void 0===i?void 0:i.find((t=>t.element===n)),c=(null===(o=e.styles)||void 0===o?void 0:o.find((t=>t.element===n)))||{},h=(null===(r=null==c?void 0:c.styleAttributes)||void 0===r?void 0:r.background)||(null===(a=null==l?void 0:l.styleAttributes)||void 0===a?void 0:a.background),u=this.parseBackground(h);u.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:u.url,inlineSvgString:null,positionOptions:u.positionOptions})})),Promise.all([...this.envUrlMaps[t].entries()].map((([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((t=>t.text())).then((s=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:s}))}))))).then((()=>{var e;const n=this.getSharedCb();return Object.keys((null===(e=n.theme)||void 0===e?void 0:e.schema)||{}).length>0?this._applyHostElementBackgroundFromTheme(this.envUrlMaps[t].get("host"),n.theme.schema):this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[t].get("host"),n.cssVars)})).catch((t=>{console.error(t),X.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.schemaSubscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",(t=>{this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[this.getEnvCb()].get("host"),t)})),this.themeSubscription=this.documentModel.on("THEME_UPDATE",(t=>{this._applyHostElementBackgroundFromTheme(this.envUrlMaps[this.getEnvCb()].get("host"),t.schema)})),this}_applyHostElementBackgroundFromCssVars(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromCssVars(t,e))}_applyHostElementBackgroundFromTheme(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromTheme(t,e))}_buildBackgroundUrlFromCssVars(t,e){const n=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}_buildBackgroundUrlFromTheme(t,e){const n=t.inlineSvgString.trim();let s=n;return[...n.matchAll(/var\(--cl-schema-([^)]+)\)/g)].forEach((t=>{const n=function(t=""){return t.replace(/var\(\s*(--[^,\s)]+).*\)/,"$1").replace("--cl-schema-","")}(t[1]);var i;s=s.replace(`var(--${i=n,`cl-schema-${i}`})`,e[n])})),`url('data:image/svg+xml,${encodeURIComponent(s)}')${t.positionOptions}`}off(){var t,e;null===(t=this.schemaSubscription)||void 0===t||t.off(),null===(e=this.themeSubscription)||void 0===e||e.off()}}const z=new class{execute(t,e="GET",n=null,s,i){const o={method:e,headers:Object.assign({"Content-Type":"text/plain"},s||{}),credentials:"same-origin",body:null,signal:i};return n&&(o.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,o)}};function Q(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class q{static camelCaseToDashCase(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}static camelCaseToUpperSnakeCase(t){return t.replace(/[A-Z]/g,(t=>"_"+t)).toUpperCase()}}class Z{constructor(t){this._count=0,this.onUpdateCb=t}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}var J;!function(t){t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.COMPONENT_RESOURCES_LOADED="COMPONENT_RESOURCES_LOADED",t.FAILED_TO_LOAD_COMPONENT_RESOURCE="FAILED_TO_LOAD_COMPONENT_RESOURCE",t.EXECUTE_ACTION_BY_PREDICATE="EXECUTE_ACTION_BY_PREDICATE"}(J||(J={}));const tt=J;class et{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(tt.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(tt.FAILED_TO_LOAD_COMPONENT_RESOURCE,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=n,this.counters={pending:new Z(this.onCounterStateUpdate)}}}const nt=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>nt(...t)}},st=nt,it="props",ot="shared",rt="environment";function at(t,e,n,s){const i=t=>{let o=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return o&&(s&&"function"==typeof s?s(o.getAttribute(e)):(null===(r=null==o?void 0:o.getAttribute)||void 0===r?void 0:r.call(o,e))===n)?o:o&&o.parentNode&&i(o.parentNode)||null;var r};return i(t)}const lt="SUBMIT";function ct(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{if("element"===n||"classes"===n)return;const s=e[n];s&&"object"==typeof s&&!Array.isArray(s)?t[n]=Object.assign(Object.assign({},t[n]||{}),s):t[n]=s})),t):t}var ht,ut=n(521);function pt(t){const{element:e,html:n,appendHtml:s}=t,i=function(t){if(null==t)return"";if("string"!=typeof t)return String(t);if(""===t)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(t))return t;const e=(new DOMParser).parseFromString(t,"text/html");return e.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach((t=>t.remove())),e.querySelectorAll("*").forEach((t=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach((e=>t.removeAttribute(e))),Array.from(t.attributes).forEach((e=>{e.name.startsWith("on")&&t.removeAttribute(e.name)})),"A"===t.tagName||"AREA"===t.tagName){const e=t.getAttribute("href");e&&(e.startsWith("javascript:")||e.startsWith("data:"))&&t.removeAttribute("href")}if("IMG"===t.tagName||"IFRAME"===t.tagName){const e=t.getAttribute("src");e&&(e.startsWith("javascript:")||e.startsWith("data:text/html"))&&t.removeAttribute("src")}if("FORM"===t.tagName){const e=t.getAttribute("action");e&&e.startsWith("javascript:")&&t.removeAttribute("action")}})),e.body.innerHTML}(n);s?e.innerHTML+=i:e.innerHTML=i}class dt extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(ht||(ht={}));class mt extends HTMLElement{constructor(){var t;super(),this.construct=()=>{let t;const e=this.getAttribute((0,o.vi)("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const s=n.closest(`[${(0,o.vi)("widget-id")}]`);let i;s&&(i=s.getAttribute((0,o.vi)("widget-id")));let r=new dt("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute((0,o.vi)("path")),id:e,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(r),t=r.detail.props,Object.assign(this,t),this.observers=st(it,ot,rt),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(t){this.subscriptions.push(t)}off(){this.subscriptions.forEach((t=>null==t?void 0:t.off()))}},this.state=new _({}),this.componentEventEmitter=new f,this.componentResourceManager=new et(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new b(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,(t=>{this.model.props=t,this.observers.get(it).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=(0,o.vi)("floating");t.floating&&!e.getAttribute(n)?e.setAttribute(n,"true"):!t.floating&&e.getAttribute(n)&&e.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(t=>{Object.assign(this.model,t)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(ot).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new Y(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),z),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(j.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(rt).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===ht.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===ht.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(it).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(ot).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(rt).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${(0,o.vi)("element")}]`)).filter((t=>!t.hasAttribute((0,o.vi)("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute((0,o.vi)("element"))===t&&n.id===e:n.getAttribute((0,o.vi)("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const n=this.getElements();if(!n.length)return;const s=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach((t=>{const e=t.element;let s=!1,i=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(ct(n,t),s=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(ct(n,t),i=!0)})),!s&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!i&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e),i=(0,o.vi)("type"),r="element-styles";let a=this.getRootElement().querySelector(`style[${i}="${r}"]`);a||(a=document.createElement("style"),a.setAttribute(i,r),this.getRootElement().appendChild(a)),pt({element:a,html:""}),n.forEach((t=>{let e=t.getAttribute((0,o.vi)("element"));const n=this.getEnvironment();let i=(0,ut.xK)(s,n,e);if(i){if(this.resizeListener.isMobile()){const t=(0,ut.xK)(s,"desktop",e);t&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),i.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(i),a)}})),this._addLinkColor(a,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,s]of Object.entries(e))t.style[n]=s;return!0},this.applyStylesToElement=(t,e,n)=>{var s,i;const r=[];"host"===(e=mt._resolveTogglableStylesForElementModel(e)).element&&(K.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(s=this.model.props.backgroundDynamicInlineSVGElements)||void 0===s?void 0:s.desktop)||"mobile"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),r.push("background")));let a=e.styleAttributes.background,l=a&&a.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&l){this.componentResourceManager.getPending().increment();const t=new Image;t.src=l[1],S(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),S(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:Q(e.styleAttributes,r)});if(H.set(t,c),this._setClassAttributes(t,e),n){if(e.hoverStyleAttributes){let s=Object.assign({},e.hoverStyleAttributes);if("FILL_UP"===e.hoverAnimationType){t.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",t.style.overflow="hidden";const n=t.tagName.toLowerCase(),i=`flip-up-animation-${e.element}`;let o=this.getRootElement().querySelector(`#${i}`);o||(o=document.createElement("style"),o.id=i,t.appendChild(o)),pt({element:o,html:`\n ${n}::before {\n content: '';\n background: ${s.background};\n position: absolute;\n left: 0;\n top: ${t.getBoundingClientRect().height}px;\n height: ${t.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${n}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),s=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}s.borderTopWidth&&"0px"!==s.borderTopWidth||delete s.borderTopColor,s.borderBottomWidth&&"0px"!==s.borderBottomWidth||delete s.borderBottomColor,s.borderLeftWidth&&"0px"!==s.borderLeftWidth||delete s.borderLeftColor,s.borderRightWidth&&"0px"!==s.borderRightWidth||delete s.borderRightColor,this._addStylesToStyleElement(n,e.element,s,`:not(.${(0,o.vi)("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(n,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(t,e,n)}},this.applySharedClassesToElementModel=t=>{const e=this.documentModel.getShared();return(0,ut.MW)(t,e)},this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,s="",i)=>{const r=Object.keys(n).reduce(((t,e)=>t+` ${q.camelCaseToDashCase(e)}: ${n[e]}${i?" !important;":";"}`),"");pt({element:t,html:`[${(0,o.vi)("element")}="${e}"]${s} { ${r} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{pt({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,s,i,o;e.linkColor&&pt({element:t,html:`a {color: ${e.linkColor}}, a:visited {color: ${e.linkColor}}`,appendHtml:!0}),(null===(n=e.linkParams)||void 0===n?void 0:n.color)&&pt({element:t,html:`a {color: ${null===(s=e.linkParams)||void 0===s?void 0:s.color}}, a:visited {color: ${null===(i=e.linkParams)||void 0===i?void 0:i.color}}`,appendHtml:!0}),(null===(o=e.linkParams)||void 0===o?void 0:o.removeUnderline)&&pt({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(t,e)=>{Array.from(t.classList).filter((t=>t!==(0,o.yU)("hovered")&&t!==(0,o.yU)("focused"))).forEach((e=>{e.startsWith(o._N.SYSTEM_CLASS_PREFIX)&&t.classList.remove(e)}));const n=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",n)},this.getParentComponent=()=>at(this.parentNode,(0,o.vi)("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute((0,o.vi)("path"));return t&&1===t.split(",").length?this.parentNode:at(this.parentNode,(0,o.vi)("path"),void 0,(t=>t&&1===t.split(",").length))},this.getWidgetLanguages=()=>function(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>function(t,e){return e.reduce(((e,n)=>{if(e)return e;const s=function(t,e){if(!t)return null;if(e[t])return{translations:e[t],language:t};const n=function(t){return t.includes("-")?t.split("-")[0].toLowerCase():t.includes("_")?t.split("_")[0].toLowerCase():t}(t);return e[n]?{translations:e[n],language:n}:null}(n,t);return s||null}),null)}(t,this.getWidgetLanguages()),this.stylesAppliedToElement=(t,e,n)=>{},this.updateContext=()=>{var t;const e=this.getModel();this.services.context.updateRecord(e.id,{label:this.getContextRecordLabel(e.props),viewIndex:null===(t=e.path)||void 0===t?void 0:t[0]})},this.addContextRecord=()=>{var t;const e=this.getModel();this.services.context.addRecord(e.id,{recordKey:e.id,id:e.props.control.name,label:this.getContextRecordLabel(e.props),value:e.props.control.defaultValue||"",viewIndex:null===(t=e.path)||void 0===t?void 0:t[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(e.props)}})},this.getContextRecordLabel=t=>{var e,n,s,i,o,r;const a=t.control.name;if(["email","first_name","last_name"].includes(a))return a.toUpperCase();if((null===(e=t.content)||void 0===e?void 0:e.label)&&(null===(i=null===(s=null===(n=t.adaptiveStyles)||void 0===n?void 0:n.desktop.find((t=>"label"===t.element)))||void 0===s?void 0:s.params)||void 0===i?void 0:i.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(o=t.content)||void 0===o?void 0:o.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(r=t.control)||void 0===r?void 0:r.integrationName)?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{var e;switch(null===(e=t.control)||void 0===e?void 0:e.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find((t=>t.category===lt));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:E.REQUEST}).execute(void 0,void 0,!0,e)},this.getHandlers=()=>{var t;return(null===(t=this.getProps())||void 0===t?void 0:t.handlers)&&this.getProps().handlers.length?[...this.getProps().handlers]:[]},this.assets=(t="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${t?`/${t}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(t=this.constructor.define)||void 0===t?void 0:t.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}))}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}}mt._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=mt._resolveTogglableStyles(e[t]))})),e},mt._resolveTogglableStyles=t=>{const e=Object.assign({},t),n=(t,n,s)=>{n in e&&(t.forEach((t=>{t in e&&(e[t]=e[n]?e[t]:s)})),delete e[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e};const Et=mt,yt=()=>{const t=window.screen,e=t.orientation||t.mozOrientation||t.msOrientation;if(e)return e.type.includes("portrait")?"PORTRAIT":"LANDSCAPE";if(void 0!==window.orientation){if(0===window.orientation||180===window.orientation)return"PORTRAIT";if(90===window.orientation||-90===window.orientation)return"LANDSCAPE"}return"PORTRAIT"},gt=()=>/iPhone/i.test(navigator.userAgent)||/iPad/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;class Ot extends f{constructor(t,e){var n;super(),this.documentModel=t,this._orientation=null!==(n=e.config.defaultOrientation)&&void 0!==n?n:yt(),this.documentModel.on(B,(t=>{t.orientation&&(this._orientation=t.orientation,this.emit(Ot.changeEventName,this._orientation))})),this.handleOrientationChangeBound=this.handleOrientationChange.bind(this),this.addOrientationChangeListener()}isPortrait(){return"PORTRAIT"===this._orientation}handleOrientationChange(t){var e,n;this._orientation=null!==(n=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.orientation)&&void 0!==n?n:yt(),this.emit(Ot.changeEventName,this._orientation)}addOrientationChangeListener(){!gt()&&window.screen.orientation?window.screen.orientation.addEventListener("change",this.handleOrientationChangeBound):"orientation"in window&&window.addEventListener("orientationchange",this.handleOrientationChangeBound)}removeOrientationChangeListener(){!gt()&&window.screen.orientation?window.screen.orientation.removeEventListener("change",this.handleOrientationChangeBound):"orientation"in window&&window.removeEventListener("orientationchange",this.handleOrientationChangeBound)}destroy(){super.destroy(),this.removeOrientationChangeListener()}}Ot.changeEventName="CHANGE";const vt=Ot;function bt(t){return bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bt(t)}function Tt(t,e){for(var n=0;n<e.length;n++){var s=e[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,At(s.key),s)}}function Ct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ct=function(){return!!t})()}function ft(){return ft="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var s=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=St(t)););return t}(t,e);if(s){var i=Object.getOwnPropertyDescriptor(s,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ft.apply(null,arguments)}function St(t){return St=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},St(t)}function _t(t,e){return _t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_t(t,e)}function Nt(t,e,n){return(e=At(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function At(t){var e=function(t){if("object"!=bt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=bt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bt(e)?e:e+""}var Rt=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Nt(e=function(t,e,n){return e=St(e),function(t,e){if(e&&("object"==bt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ct()?Reflect.construct(e,n||[],St(t).constructor):e.apply(t,n))}(this,t),"updateResponsiveStyles",(function(){e.getProps().isResponsive&&"mobile"===e.getEnvironment()&&e.mobileDeviceOrientationListener.isPortrait()?e.getRootElement().querySelector(".columns-container").style.flexDirection="column":e.getRootElement().querySelector(".columns-container").style.flexDirection="row"})),Nt(e,"manifest",i.A),e.getRootElement().innerHTML="\n ".concat("\n <style>\n :host {\n position: relative;\n min-width: 50px;\n min-height: 50px; \n display:flex;\n }\n\n .columns-container {\n height: auto;\n min-height: 50px; \n width: 100%;\n min-width: 50px;\n display: flex;\n gap: inherit;\n }\n </style>\n ","\n <div ").concat((0,o.vi)("render-outlet"),' class="columns-container"></div>\n '),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_t(t,e)}(t,Et),function(t,e){return e&&Tt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;!function(t,e,n){var s=ft(St(t.prototype),"connectedCallback",n);return"function"==typeof s?function(t){return s.apply(n,t)}:s}(t,0,this)([]),this.observeProps((function(t,n){e.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles),e.updateResponsiveStyles()})),this.observeEnvironment((function(t,n){e.updateResponsiveStyles()})),this.subscriptions.push(this.mobileDeviceOrientationListener.on(vt.changeEventName,(function(){e.updateResponsiveStyles()})))}}])}();Nt(Rt,"define",{name:"sys-columns",model:i.A.name,manifest:i.A});const It=s.A;export{It as default};window.clComponentClass_SysColumnsComponent=Rt;
|
|
1
|
+
var t={32:(t,e,n)=>{n.d(e,{A:()=>s});const s={name:"SysColumnsComponent",componentType:"COLUMNS",version:"1.0.0",contextMenuModel:[],floatingControlsModel:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host",params:{width:{minValue:50},height:{minValue:50}}},{type:"CONTROL",name:"CONTAINER_PADDING",propPathCondition:"return sdk.component.type === 'VIEW' ? {element: 'host', elementProp: 'styleAttributes'} : {propPath: ['styles', '[element=host]', 'styleAttributes']}"},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"}},{type:"CONTROL",name:"COLUMNS_PROPORTIONS",propPath:["content","size"],params:{parent:!0}}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host",params:{width:{minValue:50},height:{minValue:50}}},{type:"CONTROL",name:"CONTAINER_PADDING",propPathCondition:"return sdk.component.type === 'VIEW' ? {element: 'host', elementProp: 'styleAttributes'} : {propPath: ['styles', '[element=host]', 'styleAttributes']}"},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"COLUMNS_PROPORTIONS",propPath:["content","size"],params:{parent:!0}}]}],propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"],minValue:50},height:{options:["fixed","fill","hug"],minValue:50}},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"COLUMNS",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"SWITCH",propPath:["isResponsive"],params:{label:"ADAPTIVE_COLUMNS",boldLabel:!0}},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"INDENTATION",propPathCondition:"return sdk.component.type === 'VIEW' ? {element: 'host', elementProp: 'styleAttributes'} : {propPath: ['styles', '[element=host]', 'styleAttributes']}",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"COLUMNS",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"SWITCH",propPath:["isResponsive"],params:{label:"ADAPTIVE_COLUMNS",boldLabel:!0}},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"INDENTATION",propPathCondition:"return sdk.component.type === 'VIEW' ? {element: 'host', elementProp: 'styleAttributes'} : {propPath: ['styles', '[element=host]', 'styleAttributes']}",params:{indentationType:"PADDING"}},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0}}]},events:{dispatch:[],listen:[]},props:{styles:[{element:"host",styleAttributes:{}}],adaptiveStyles:(0,n(521).KY)([{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:"50px",height:"auto",gap:"10px"}}]),isResponsive:!0},metaDescription:{icon:"/SysColumnsComponent/assets/img/columns-component-icon.svg",label:{en:"Columns",ru:"Колонки",uk:"Колонки",es:"Columns",fr:"Columns",de:"Columns",it:"Columns",pt:"Columns",ro:"Columns",bg:"Columns",cs:"Columns",el:"Columns",nl:"Columns",pl:"Columns",sv:"Columns",tr:"Columns",ar:"Columns",zh:"Columns",da:"Columns",he:"Columns",fi:"Columns",hi:"Columns",hr:"Columns",hu:"Columns",id:"Columns",ja:"Columns",ko:"Columns",no:"Columns",sk:"Columns",sl:"Columns",sr:"Columns"},defaultPreset:"50%-50%"},waitForResourcesLoad:!0,resourcesPropPaths:[["adaptiveStyles",":ENV","styleAttributes","background"]],syncEnabled:!0,stylesImitationEnabled:!0}},360:(t,e,n)=>{n.d(e,{_N:()=>s,vi:()=>o,yU:()=>i});const s={SYSTEM_CLASS_PREFIX:"cl-",SYSTEM_ATTRIBUTE_PREFIX:"cl-"};function i(t){return s.SYSTEM_CLASS_PREFIX+t}function o(t){return s.SYSTEM_ATTRIBUTE_PREFIX+t}},390:(t,e,n)=>{n.d(e,{P:()=>s});const s={DESKTOP:"desktop",MOBILE:"mobile"};s.MOBILE},521:(t,e,n)=>{n.d(e,{KY:()=>a,MW:()=>l,xK:()=>o});var s=n(390),i=n(360);function o(t,e,n){var s;return null===(s=null==t?void 0:t[e])||void 0===s?void 0:s.find((t=>t.element===n))}function r(t=[]){return t.map((t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)})))}function a(t){return Object.values(s.P).reduce(((e,n)=>Object.assign(e,{[n]:r(t)})),{desktop:[],mobile:[]})}function l(t,e){let n=t;return(n.classes||"").split(" ").filter((t=>t.startsWith(i._N.SYSTEM_CLASS_PREFIX))).forEach((t=>{var s;let i=null===(s=e.textClasses)||void 0===s?void 0:s[t];i&&(i.styleAttributes.fontFamily||(i.isHeader&&e.headerFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.headerFontFamily})})),!i.isHeader&&e.textFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.textFontFamily})}))),n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},n.placeholderStyleAttributes),i.placeholderStyleAttributes)}))})),n.styleAttributes.fontFamily||(n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),{fontFamily:e.textFontFamily})})),n}}},e={};function n(s){var i=e[s];if(void 0!==i)return i.exports;var o=e[s]={exports:{}};return t[s](o,o.exports,n),o.exports}n.d=(t,e)=>{for(var s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s={};n.d(s,{A:()=>Rt});var i=n(32),o=n(360);const r="VIEW",a="MODULE",l="CONTAINER",c="INPUT",p="BUTTON",h="CONSENT",u="COLUMN";var d,m;(m=d||(d={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",m.REQUEST="REQUEST",m.DISPATCH_EVENT="DISPATCH_EVENT",m.GO_TO_VIEW="GO_TO_VIEW",m.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",m.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",m.SHOW_WIDGET="SHOW_WIDGET",m.OPEN_LINK="OPEN_LINK",m.CLOSE_WIDGET="CLOSE_WIDGET",m.CLICK="CLICK";const E=d;var y,g;class O{static sortActions(t){const e={[E.CLOSE_WIDGET]:-1,[E.OPEN_LINK]:-2,[E.SHOW_WIDGET]:1,[E.SUBSCRIBE_CONTACT]:2,[E.REQUEST]:3},n=t=>void 0!==e[t.type]?e[t.type]:0;return[...t].sort(((t,e)=>n(t)>n(e)?-1:n(t)<n(e)?1:0))}constructor(t,e){this.config=t,this.actions=O.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const s=n(),i=s.getAttribute((0,o.vi)("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute((0,o.vi)("type"))));let n=0;for(;e[n]&&e[n].getAttribute((0,o.vi)("id"))!==i;){let t=e[n].getAttribute((0,o.vi)("type"));if(O.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;n++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((s.shadowRoot||s).querySelectorAll(this.config.relativeSelector)):[s],this.targetElements.forEach((t=>{t.addEventListener("click",this.listener)}))}async execute(){var t,e,n,s;try{for(var i,o=!0,r=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},s("next"),s("throw"),s("return"),e[Symbol.asyncIterator]=function(){return this},e);function s(n){e[n]=t[n]&&function(e){return new Promise((function(s,i){!function(t,e,n,s){Promise.resolve(s).then((function(e){t({value:e,done:n})}),e)}(s,i,(e=t[n](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(i=await r.next()).done);o=!0){s=i.value,o=!1;const{event:t}=s;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}}catch(t){e={error:t}}finally{try{o||t||!(n=r.return)||await n.call(r)}finally{if(e)throw e.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach((t=>{t.removeEventListener("click",this.listener)})),this.targetElements=[])}}O.IGNORING_VIEW_ENTRY_TYPES=[p,h,c],(g=y||(y={})).CLICK="CLICK",g.COMPONENT_EVENT="COMPONENT_EVENT";class v{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){this.componentEmitterListener=e.on(this.config.eventName,(()=>{this.actions.forEach((e=>e.execute(t.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class b{constructor(t,e){this.actionFactory=t,this.actionRegister=e}get(t){const e=t.actions.map((t=>this.actionFactory.get(t)));switch(e.forEach((t=>this.actionRegister.register(t))),t.type){case y.CLICK:return new O(t,e);case y.COMPONENT_EVENT:return new v(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class C{static generate(){let t,e="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(e+="-"),t=Math.floor(16*Math.random()).toString(16).toUpperCase(),e+=t;return e}}class T{constructor(){this.listeners=T.createDefaultListenersState()}emit(t,e,n=null){const s=this.listeners[t];s&&Object.values(s).forEach((s=>s(e,t,n))),Object.values(this.listeners["*"]).forEach((s=>s(e,t,n)))}on(t,e){const n=C.generate(),s=this.listeners[t];return s?s[n]=e:this.listeners[t]={[n]:e},{off:()=>{var e,s;(null===(s=null===(e=this.listeners)||void 0===e?void 0:e[t])||void 0===s?void 0:s[n])&&delete this.listeners[t][n]}}}destroy(){this.listeners=T.createDefaultListenersState()}}T.createDefaultListenersState=()=>({"*":{}});const f=T,S=(t,e,n,s)=>{const i=EventTarget.prototype,{addEventListenerBase:o,addEventListener:r}=i;(o||r).call(t,e,n,s)};class _{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class A{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===a?Object.assign(Object.assign({},t),A.moduleToContainerParams):t));return Object.assign(Object.assign({},t),{children:e})}));return Object.assign(Object.assign({},t),{views:e})}static sort(t,e){return t.index>e.index?1:-1}static reIndex(t,e){return Object.assign(Object.assign({},t),{index:e+t.index})}}var N,R,L,I,P,M,D,k,w,U,x,W,V;A.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(R=N||(N={})).VIEW="VIEW",R.CONTAINER="CONTAINER",R.TEXT="TEXT",R.INPUT="INPUT",R.BUTTON="BUTTON",R.IMAGE="IMAGE",R.CONSENT="CONSENT",R.COUNTDOWN_TIMER="COUNTDOWN_TIMER",R.PROMO_CODE="PROMO_CODE",R.MULTIPLE_INPUT="MULTIPLE_INPUT",R.VIDEO="VIDEO",R.SLIDER="SLIDER",R.SLIDE="SLIDE",R.SOCIAL="SOCIAL",R.COLUMNS="COLUMNS",R.COLUMN="COLUMN",R.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(L||(L={})).CLICK="CLICK",function(t){t.SHOW_WIDGET="SHOW_WIDGET",t.OPEN_LINK="OPEN_LINK",t.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",t.REQUEST="REQUEST",t.CLOSE_WIDGET="CLOSE_WIDGET",t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.CLICK="CLICK"}(I||(I={})),function(t){t.SELF="_self",t.BLANK="_blank"}(P||(P={})),(M||(M={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(D||(D={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(k||(k={})),function(t){t.SLIDE_TO_TOP="SLIDE_TO_TOP",t.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",t.SLIDE_TO_LEFT="SLIDE_TO_LEFT",t.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(w||(w={})),function(t){t.PULSE="PULSE",t.VIBRATE="VIBRATE",t.WOBBLE="WOBBLE",t.SHAKE="SHAKE",t.JELLO="JELLO",t.BOUNCE="BOUNCE",t.BLINK="BLINK",t.FLICKER="FLICKER",t.PING="PING"}(U||(U={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(x||(x={})),(V=W||(W={})).BEFORE="BEFORE",V.AFTER="AFTER",V.INSIDE="INSIDE",V.INSTEAD="INSTEAD";const B="ENVIRONMENT_UPDATE";class F extends f{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on(B,(({isMobileEnv:t})=>{this._isMobile=t,this.emit(F.changeEventName,this._isMobile)}))}handleMobileBreakpoint(t){this.mobileBreakpointWidth=t;const e=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${e})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(F.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(F.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}F.changeEventName="CHANGE";const j=F;class G{static set(t,e){const n=t[G.accumulatorPropertyName]||{};t[G.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[G.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}G.accumulatorPropertyName="clStyleAttributes";const H=G;var $;!function(t){t.BUILT_IN="BUILT_IN",t.DETACHED="DETACHED",t.FLOATING_BOX="FLOATING_BOX",t.FLOATING_BAR="FLOATING_BAR",t.LAUNCHER="LAUNCHER",t.CONTENT_LOCKER="CONTENT_LOCKER"}($||($={}));class K{static applyHostStyles(t,e,n=null,s){var i,o,a;const c=null===(o=null===(i=null==n?void 0:n.props)||void 0===i?void 0:i.handlers)||void 0===o?void 0:o.find((t=>"CLICK"===t.type));c&&(null===(a=c.actions)||void 0===a?void 0:a.length)&&(e.style.cursor="pointer"),t!==r&&t!==l&&t!==u||(e.style.display=s===$.CONTENT_LOCKER&&t===r?"flex":"inline-flex",e.style.position="relative"),e.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(t=""){this.styles=`${this.styles} ${t}`}getStyles(){return this.styles}}class Y{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class z{constructor(t,e,n,s,i,o){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=s,this.getEnvCb=i,this.httpClient=o,this.schemaSubscription=null,this.themeSubscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(t){const e=String(t||"");if(e.includes("url")){const[t,n]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((n=>{var s,i,o,r,a;const l=null===(i=null===(s=e.adaptiveStyles)||void 0===s?void 0:s[t])||void 0===i?void 0:i.find((t=>t.element===n)),c=(null===(o=e.styles)||void 0===o?void 0:o.find((t=>t.element===n)))||{},p=(null===(r=null==c?void 0:c.styleAttributes)||void 0===r?void 0:r.background)||(null===(a=null==l?void 0:l.styleAttributes)||void 0===a?void 0:a.background),h=this.parseBackground(p);h.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:h.url,inlineSvgString:null,positionOptions:h.positionOptions})})),Promise.all([...this.envUrlMaps[t].entries()].map((([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((t=>t.text())).then((s=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:s}))}))))).then((()=>{var e;const n=this.getSharedCb();return Object.keys((null===(e=n.theme)||void 0===e?void 0:e.schema)||{}).length>0?this._applyHostElementBackgroundFromTheme(this.envUrlMaps[t].get("host"),n.theme.schema):this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[t].get("host"),n.cssVars)})).catch((t=>{console.error(t),Y.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.schemaSubscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",(t=>{this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[this.getEnvCb()].get("host"),t)})),this.themeSubscription=this.documentModel.on("THEME_UPDATE",(t=>{this._applyHostElementBackgroundFromTheme(this.envUrlMaps[this.getEnvCb()].get("host"),t.schema)})),this}_applyHostElementBackgroundFromCssVars(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromCssVars(t,e))}_applyHostElementBackgroundFromTheme(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromTheme(t,e))}_buildBackgroundUrlFromCssVars(t,e){const n=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}_buildBackgroundUrlFromTheme(t,e){const n=t.inlineSvgString.trim();let s=n;return[...n.matchAll(/var\(--cl-schema-([^)]+)\)/g)].forEach((t=>{const n=function(t=""){return t.replace(/var\(\s*(--[^,\s)]+).*\)/,"$1").replace("--cl-schema-","")}(t[1]);var i;s=s.replace(`var(--${i=n,`cl-schema-${i}`})`,e[n])})),`url('data:image/svg+xml,${encodeURIComponent(s)}')${t.positionOptions}`}off(){var t,e;null===(t=this.schemaSubscription)||void 0===t||t.off(),null===(e=this.themeSubscription)||void 0===e||e.off()}}const X=new class{execute(t,e="GET",n=null,s,i){const o={method:e,headers:Object.assign({"Content-Type":"text/plain"},s||{}),credentials:"same-origin",body:null,signal:i};return n&&(o.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,o)}};function Q(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class q{static camelCaseToDashCase(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}static camelCaseToUpperSnakeCase(t){return t.replace(/[A-Z]/g,(t=>"_"+t)).toUpperCase()}}class Z{constructor(t){this._count=0,this.onUpdateCb=t}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}var J;!function(t){t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.COMPONENT_RESOURCES_LOADED="COMPONENT_RESOURCES_LOADED",t.FAILED_TO_LOAD_COMPONENT_RESOURCE="FAILED_TO_LOAD_COMPONENT_RESOURCE",t.EXECUTE_ACTION_BY_PREDICATE="EXECUTE_ACTION_BY_PREDICATE"}(J||(J={}));const tt=J;class et{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(tt.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(tt.FAILED_TO_LOAD_COMPONENT_RESOURCE,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=n,this.counters={pending:new Z(this.onCounterStateUpdate)}}}const nt=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>nt(...t)}},st=nt,it="props",ot="shared",rt="environment";function at(t,e,n,s){const i=t=>{let o=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return o&&(s&&"function"==typeof s?s(o.getAttribute(e)):(null===(r=null==o?void 0:o.getAttribute)||void 0===r?void 0:r.call(o,e))===n)?o:o&&o.parentNode&&i(o.parentNode)||null;var r};return i(t)}const lt="SUBMIT";function ct(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{if("element"===n||"classes"===n)return;const s=e[n];s&&"object"==typeof s&&!Array.isArray(s)?t[n]=Object.assign(Object.assign({},t[n]||{}),s):t[n]=s})),t):t}var pt,ht=n(521);function ut(t){const{element:e,html:n,appendHtml:s}=t,i=function(t){if(null==t)return"";if("string"!=typeof t)return String(t);if(""===t)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(t))return t;const e=(new DOMParser).parseFromString(t,"text/html");return e.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach((t=>t.remove())),e.querySelectorAll("*").forEach((t=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach((e=>t.removeAttribute(e))),Array.from(t.attributes).forEach((e=>{e.name.startsWith("on")&&t.removeAttribute(e.name)})),"A"===t.tagName||"AREA"===t.tagName){const e=t.getAttribute("href");e&&(e.startsWith("javascript:")||e.startsWith("data:"))&&t.removeAttribute("href")}if("IMG"===t.tagName||"IFRAME"===t.tagName){const e=t.getAttribute("src");e&&(e.startsWith("javascript:")||e.startsWith("data:text/html"))&&t.removeAttribute("src")}if("FORM"===t.tagName){const e=t.getAttribute("action");e&&e.startsWith("javascript:")&&t.removeAttribute("action")}})),e.body.innerHTML}(n);s?e.innerHTML+=i:e.innerHTML=i}class dt extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(pt||(pt={}));class mt extends HTMLElement{constructor(){var t;super(),this.skipGameBlur=!0,this.construct=()=>{let t;const e=this.getAttribute((0,o.vi)("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const s=n.closest(`[${(0,o.vi)("widget-id")}]`);let i;s&&(i=s.getAttribute((0,o.vi)("widget-id")));let r=new dt("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute((0,o.vi)("path")),id:e,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(r),t=r.detail.props,Object.assign(this,t),this.observers=st(it,ot,rt),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(t){this.subscriptions.push(t)}off(){this.subscriptions.forEach((t=>null==t?void 0:t.off()))}},this.state=new _({}),this.componentEventEmitter=new f,this.componentResourceManager=new et(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new b(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,(t=>{this.model.props=t,this.observers.get(it).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=(0,o.vi)("floating");t.floating&&!e.getAttribute(n)?e.setAttribute(n,"true"):!t.floating&&e.getAttribute(n)&&e.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(t=>{Object.assign(this.model,t)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(ot).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new z(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),X),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(j.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(rt).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t}))),this.subscriptions.push(this.services.eventEmitter.on("GAME_PHASE_READY_TO_PLAY",(()=>{this.skipGameBlur||this.getHostElement().classList.add("cl-game-spotlight-component")}))),this.subscriptions.push(this.services.eventEmitter.on("GAME_PHASE_COMPLETED",(()=>{this.skipGameBlur||this.getHostElement().classList.remove("cl-game-spotlight-component")})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===pt.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===pt.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(it).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(ot).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(rt).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${(0,o.vi)("element")}]`)).filter((t=>!t.hasAttribute((0,o.vi)("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute((0,o.vi)("element"))===t&&n.id===e:n.getAttribute((0,o.vi)("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const n=this.getElements();if(!n.length)return;const s=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach((t=>{const e=t.element;let s=!1,i=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(ct(n,t),s=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(ct(n,t),i=!0)})),!s&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!i&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e),i=(0,o.vi)("type"),r="element-styles";let a=this.getRootElement().querySelector(`style[${i}="${r}"]`);a||(a=document.createElement("style"),a.setAttribute(i,r),this.getRootElement().appendChild(a)),ut({element:a,html:""}),n.forEach((t=>{let e=t.getAttribute((0,o.vi)("element"));const n=this.getEnvironment();let i=(0,ht.xK)(s,n,e);if(i){if(this.resizeListener.isMobile()){const t=(0,ht.xK)(s,"desktop",e);t&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),i.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(i),a)}})),this._addLinkColor(a,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,s]of Object.entries(e))t.style[n]=s;return!0},this.applyStylesToElement=(t,e,n)=>{var s,i;const r=[];"host"===(e=mt._resolveTogglableStylesForElementModel(e)).element&&(K.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(s=this.model.props.backgroundDynamicInlineSVGElements)||void 0===s?void 0:s.desktop)||"mobile"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),r.push("background")));let a=e.styleAttributes.background,l=a&&a.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&l){this.componentResourceManager.getPending().increment();const t=new Image;t.src=l[1],S(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),S(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:Q(e.styleAttributes,r)});if(H.set(t,c),this._setClassAttributes(t,e),n){if(e.hoverStyleAttributes){let s=Object.assign({},e.hoverStyleAttributes);if("FILL_UP"===e.hoverAnimationType){t.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",t.style.overflow="hidden";const n=t.tagName.toLowerCase(),i=`flip-up-animation-${e.element}`;let o=this.getRootElement().querySelector(`#${i}`);o||(o=document.createElement("style"),o.id=i,t.appendChild(o)),ut({element:o,html:`\n ${n}::before {\n content: '';\n background: ${s.background};\n position: absolute;\n left: 0;\n top: ${t.getBoundingClientRect().height}px;\n height: ${t.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${n}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),s=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}s.borderTopWidth&&"0px"!==s.borderTopWidth||delete s.borderTopColor,s.borderBottomWidth&&"0px"!==s.borderBottomWidth||delete s.borderBottomColor,s.borderLeftWidth&&"0px"!==s.borderLeftWidth||delete s.borderLeftColor,s.borderRightWidth&&"0px"!==s.borderRightWidth||delete s.borderRightColor,this._addStylesToStyleElement(n,e.element,s,`:not(.${(0,o.vi)("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(n,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(t,e,n)}},this.applySharedClassesToElementModel=t=>{const e=this.documentModel.getShared();return(0,ht.MW)(t,e)},this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,s="",i)=>{const r=Object.keys(n).reduce(((t,e)=>t+` ${q.camelCaseToDashCase(e)}: ${n[e]}${i?" !important;":";"}`),"");ut({element:t,html:`[${(0,o.vi)("element")}="${e}"]${s} { ${r} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{ut({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,s,i,o;e.linkColor&&ut({element:t,html:`a {color: ${e.linkColor}}, a:visited {color: ${e.linkColor}}`,appendHtml:!0}),(null===(n=e.linkParams)||void 0===n?void 0:n.color)&&ut({element:t,html:`a {color: ${null===(s=e.linkParams)||void 0===s?void 0:s.color}}, a:visited {color: ${null===(i=e.linkParams)||void 0===i?void 0:i.color}}`,appendHtml:!0}),(null===(o=e.linkParams)||void 0===o?void 0:o.removeUnderline)&&ut({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(t,e)=>{Array.from(t.classList).filter((t=>t!==(0,o.yU)("hovered")&&t!==(0,o.yU)("focused"))).forEach((e=>{e.startsWith(o._N.SYSTEM_CLASS_PREFIX)&&t.classList.remove(e)}));const n=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",n)},this.getParentComponent=()=>at(this.parentNode,(0,o.vi)("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute((0,o.vi)("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:at(this.parentNode,(0,o.vi)("path"),void 0,(t=>1===(null==t?void 0:t.split(",").length)))},this.getWidgetLanguages=()=>function(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>function(t,e){return e.reduce(((e,n)=>{if(e)return e;const s=function(t,e){if(!t)return null;if(e[t])return{translations:e[t],language:t};const n=function(t){return t.includes("-")?t.split("-")[0].toLowerCase():t.includes("_")?t.split("_")[0].toLowerCase():t}(t);return e[n]?{translations:e[n],language:n}:null}(n,t);return s||null}),null)}(t,this.getWidgetLanguages()),this.stylesAppliedToElement=(t,e,n)=>{},this.updateContext=()=>{var t;const e=this.getModel();this.services.context.updateRecord(e.id,{label:this.getContextRecordLabel(e.props),viewIndex:null===(t=e.path)||void 0===t?void 0:t[0]})},this.addContextRecord=()=>{var t;const e=this.getModel();this.services.context.addRecord(e.id,{recordKey:e.id,id:e.props.control.name,label:this.getContextRecordLabel(e.props),value:e.props.control.defaultValue||"",viewIndex:null===(t=e.path)||void 0===t?void 0:t[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(e.props)}})},this.getContextRecordLabel=t=>{var e,n,s,i,o,r;const a=t.control.name;if(["email","first_name","last_name"].includes(a))return a.toUpperCase();if((null===(e=t.content)||void 0===e?void 0:e.label)&&(null===(i=null===(s=null===(n=t.adaptiveStyles)||void 0===n?void 0:n.desktop.find((t=>"label"===t.element)))||void 0===s?void 0:s.params)||void 0===i?void 0:i.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(o=t.content)||void 0===o?void 0:o.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(r=t.control)||void 0===r?void 0:r.integrationName)?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{var e;switch(null===(e=t.control)||void 0===e?void 0:e.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find((t=>t.category===lt));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:E.REQUEST}).execute(void 0,void 0,!0,e)},this.getHandlers=()=>{var t;return(null===(t=this.getProps())||void 0===t?void 0:t.handlers)&&this.getProps().handlers.length?[...this.getProps().handlers]:[]},this.assets=(t="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${t?`/${t}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(t=this.constructor.define)||void 0===t?void 0:t.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}));const t=document.createElement("style");t.textContent='\n :host(.cl-game-spotlight-component)::after {\n content: "";\n position: absolute;\n background-size: 100% 100%;\n background-repeat: no-repeat;\n overflow: visible;\n \n backdrop-filter: blur(4px);\n \n inset: -30px;\n mask-image: \n linear-gradient(to bottom, transparent, grey 30px, grey calc(100% - 30px), transparent),\n linear-gradient(to right, transparent, grey 30px, grey calc(100% - 30px), transparent);\n mask-composite: intersect;\n -webkit-mask-composite: source-in; /* for Chrome/Safari */\n \n transition: opacity 0.35s ease;\n pointer-events: auto;\n }\n ',this.getRootElement().prepend(t)}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}}mt._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=mt._resolveTogglableStyles(e[t]))})),e},mt._resolveTogglableStyles=t=>{const e=Object.assign({},t),n=(t,n,s)=>{n in e&&(t.forEach((t=>{t in e&&(e[t]=e[n]?e[t]:s)})),delete e[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e};const Et=mt,yt=()=>{const t=window.screen,e=t.orientation||t.mozOrientation||t.msOrientation;if(e)return e.type.includes("portrait")?"PORTRAIT":"LANDSCAPE";if(void 0!==window.orientation){if(0===window.orientation||180===window.orientation)return"PORTRAIT";if(90===window.orientation||-90===window.orientation)return"LANDSCAPE"}return"PORTRAIT"},gt=()=>/iPhone/i.test(navigator.userAgent)||/iPad/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;class Ot extends f{constructor(t,e){var n;super(),this.documentModel=t,this._orientation=null!==(n=e.config.defaultOrientation)&&void 0!==n?n:yt(),this.documentModel.on(B,(t=>{t.orientation&&(this._orientation=t.orientation,this.emit(Ot.changeEventName,this._orientation))})),this.handleOrientationChangeBound=this.handleOrientationChange.bind(this),this.addOrientationChangeListener()}isPortrait(){return"PORTRAIT"===this._orientation}handleOrientationChange(t){var e,n;this._orientation=null!==(n=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.orientation)&&void 0!==n?n:yt(),this.emit(Ot.changeEventName,this._orientation)}addOrientationChangeListener(){!gt()&&window.screen.orientation?window.screen.orientation.addEventListener("change",this.handleOrientationChangeBound):"orientation"in window&&window.addEventListener("orientationchange",this.handleOrientationChangeBound)}removeOrientationChangeListener(){!gt()&&window.screen.orientation?window.screen.orientation.removeEventListener("change",this.handleOrientationChangeBound):"orientation"in window&&window.removeEventListener("orientationchange",this.handleOrientationChangeBound)}destroy(){super.destroy(),this.removeOrientationChangeListener()}}Ot.changeEventName="CHANGE";const vt=Ot;function bt(t){return bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bt(t)}function Ct(t,e){for(var n=0;n<e.length;n++){var s=e[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,Nt(s.key),s)}}function Tt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tt=function(){return!!t})()}function ft(){return ft="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var s=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=St(t)););return t}(t,e);if(s){var i=Object.getOwnPropertyDescriptor(s,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ft.apply(null,arguments)}function St(t){return St=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},St(t)}function _t(t,e){return _t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_t(t,e)}function At(t,e,n){return(e=Nt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Nt(t){var e=function(t){if("object"!=bt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=bt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bt(e)?e:e+""}var Rt=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),At(e=function(t,e,n){return e=St(e),function(t,e){if(e&&("object"==bt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Tt()?Reflect.construct(e,n||[],St(t).constructor):e.apply(t,n))}(this,t),"updateResponsiveStyles",(function(){e.getProps().isResponsive&&"mobile"===e.getEnvironment()&&e.mobileDeviceOrientationListener.isPortrait()?e.getRootElement().querySelector(".columns-container").style.flexDirection="column":e.getRootElement().querySelector(".columns-container").style.flexDirection="row"})),At(e,"manifest",i.A),e.getRootElement().innerHTML="\n ".concat("\n <style>\n :host {\n position: relative;\n min-width: 50px;\n min-height: 50px; \n display:flex;\n }\n\n .columns-container {\n height: auto;\n min-height: 50px; \n width: 100%;\n min-width: 50px;\n display: flex;\n gap: inherit;\n }\n </style>\n ","\n <div ").concat((0,o.vi)("render-outlet"),' class="columns-container"></div>\n '),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_t(t,e)}(t,Et),function(t,e){return e&&Ct(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;!function(t,e,n){var s=ft(St(t.prototype),"connectedCallback",n);return"function"==typeof s?function(t){return s.apply(n,t)}:s}(t,0,this)([]),this.observeProps((function(t,n){e.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles),e.updateResponsiveStyles()})),this.observeEnvironment((function(t,n){e.updateResponsiveStyles()})),this.subscriptions.push(this.mobileDeviceOrientationListener.on(vt.changeEventName,(function(){e.updateResponsiveStyles()})))}}])}();At(Rt,"define",{name:"sys-columns",model:i.A.name,manifest:i.A});const Lt=s.A;export{Lt as default};window.clComponentClass_SysColumnsComponent=Rt;
|