@claspo/components 1.9.0 → 1.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- const t="validationStatusChanged",e="touchedStatusChanged",n="cl-";function o(t){return n+t}function r(t){return"cl-"+t}class i{static size(t){return{width:this.width(t),height:this.height(t)}}static width(t){var e;const n=t||document;return Math.max(n.documentElement.clientWidth,(null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)}static height(t){var e;const n=t||document;return Math.max(n.documentElement.clientHeight,(null===(e=n.defaultView)||void 0===e?void 0:e.innerHeight)||0)}static scrollbarWidth(t){var e;const n=t||document;return((null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)-n.documentElement.clientWidth}}var a={transparent:"#0000"},l=function(t,e,n,o){return null!=o&&""!==o||(o=1),t=parseFloat(t),e=parseFloat(e),n=parseFloat(n),o=parseFloat(o),t<=255&&t>=0&&e<=255&&e>=0&&n<=255&&n>=0&&o<=1&&o>=0?[Math.round(t),Math.round(e),Math.round(n),o]:null},s=[];for(var c in a)s.push(c);var d="\\s*([.\\d%]+)\\s*",u="\\("+[d,d,d]+"(?:,\\s*([.\\d]+)\\s*)?\\)",p="(?:rgb)a?",h="("+s.join("|")+")",E=RegExp(p+u,"i"),m=function(t,e){if(null==t)return null;t=(t+"").replace(/\s+/,"");var n=a[t];return n?m(n,e):(n=t.match(E))&&(t=n.slice(1))&&(t=l.apply(null,t))?e?t:(1===t[3]&&t.splice(3,1),"rgb"+(4===t.length?"a":"")+"("+t+")"):null};RegExp([h,"(?:#([a-f0-9]{3,8}))",p+u,"(?:hsl)a?"+u].join("|"),"gi");const v=m;class g{ratio(t,e,n){return t=this.getRgbTriplet(t,n),e=this.getRgbTriplet(e,n),this.wcagRgb(t,e)}isNotTransparent(t,e){e=e||{};const n=(t=v(t)).match(/\((.*)\)/)[1].split(",");if(4!=n.length||"0"!=n[3]||e.ignoreAlpha)return t;throw new TypeError("get-contrast cannot contrast transparent colors")}getRgbTriplet(t,e){if("string"!=typeof t)throw new TypeError("get-contrast expects colors as strings");let n=t.toLowerCase();return n=this.isNotTransparent(n,e),n.match(/\((.*)\)/)[1].split(",").slice(0,3)}wcagRgb(t,e){return this.luminance(this.relativeLuminance(t),this.relativeLuminance(e))}luminance(t,e){return(Math.max(t,e)+.05)/(Math.min(t,e)+.05)}relativeLuminance(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,r=1/12.92;function i(t){return Math.pow((t+.055)/1.055,2.4)}return.2126*(e<=.03928?e*r:i(e))+.7152*(n<=.03928?n*r:i(n))+.0722*(o<=.03928?o*r:i(o))}}function b(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}var f=Array.prototype.concat,y=Array.prototype.slice,T=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var r=t[n];b(r)?e=f.call(e,y.call(r)):e.push(r)}return e};T.wrap=function(t){return function(){return t(T(arguments))}};const R=T;var O={},_=Object.hasOwnProperty,A=Object.create(null);for(var I in O)_.call(O,I)&&(A[O[I]]=I);var S={to:{},get:{}};function D(t,e,n){return Math.min(Math.max(e,t),n)}S.get=function(t){var e,n;return"hsl"===t.substring(0,3).toLowerCase()?(e=S.get.hsl(t),n="hsl"):(e=S.get.rgb(t),n="rgb"),e?{model:n,value:e}:null},S.get.rgb=function(t){if(!t)return null;var e,n,o,r=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=e[2],e=e[1],n=0;n<3;n++){var i=2*n;r[n]=parseInt(e.slice(i,i+2),16)}o&&(r[3]=parseInt(o,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(o=(e=e[1])[3],n=0;n<3;n++)r[n]=parseInt(e[n]+e[n],16);o&&(r[3]=parseInt(o+o,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)r[n]=parseInt(e[n+1],0);e[4]&&(e[5]?r[3]=.01*parseFloat(e[4]):r[3]=parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:_.call(O,e[1])?((r=O[e[1]])[3]=1,r):null:null;for(n=0;n<3;n++)r[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?r[3]=.01*parseFloat(e[4]):r[3]=parseFloat(e[4]))}for(n=0;n<3;n++)r[n]=D(r[n],0,255);return r[3]=D(r[3],0,1),r},S.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,D(parseFloat(e[2]),0,100),D(parseFloat(e[3]),0,100),D(isNaN(n)?1:n,0,1)]}return null},S.to.rgb=function(){var t=R(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},S.to.hsl=function(){var t=R(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};const C=S,L={},N={};for(const t of Object.keys(L))N[L[t]]=t;const w={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"}};Math.pow(6/29,3);for(const t of Object.keys(w)){if(!("channels"in w[t]))throw new Error("missing channels property: "+t);if(!("labels"in w[t]))throw new Error("missing channel labels property: "+t);if(w[t].labels.length!==w[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=w[t];delete w[t].channels,delete w[t].labels,Object.defineProperty(w[t],"channels",{value:e}),Object.defineProperty(w[t],"labels",{value:n})}w.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,r=Math.min(e,n,o),i=Math.max(e,n,o),a=i-r;let l,s;i===r?l=0:e===i?l=(n-o)/a:n===i?l=2+(o-e)/a:o===i&&(l=4+(e-n)/a),l=Math.min(60*l,360),l<0&&(l+=360);const c=(r+i)/2;return s=i===r?0:c<=.5?a/(i+r):a/(2-i-r),[l,100*s,100*c]},w.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let r,i,a;if(0===n)return a=255*o,[a,a,a];r=o<.5?o*(1+n):o+n-o*n;const l=2*o-r,s=[0,0,0];for(let t=0;t<3;t++)i=e+1/3*-(t-1),i<0&&i++,i>1&&i--,a=6*i<1?l+6*(r-l)*i:2*i<1?r:3*i<2?l+(r-l)*(2/3-i)*6:l,s[t]=255*a;return s};const x=w;function P(t,e){return function(n){return e(t(n))}}function M(t,e){const n=[e[t].parent,t];let o=x[e[t].parent][t],r=e[t].parent;for(;e[r].parent;)n.unshift(e[r].parent),o=P(x[e[r].parent][r],o),r=e[r].parent;return o.conversion=n,o}const k={};Object.keys(x).forEach((t=>{k[t]={},Object.defineProperty(k[t],"channels",{value:x[t].channels}),Object.defineProperty(k[t],"labels",{value:x[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(x);for(let n=e.length,o=0;o<n;o++)t[e[o]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;){const t=n.pop(),o=Object.keys(x[t]);for(let r=o.length,i=0;i<r;i++){const r=o[i],a=e[r];-1===a.distance&&(a.distance=e[t].distance+1,a.parent=t,n.unshift(r))}}return e}(t),n={},o=Object.keys(e);for(let t=o.length,r=0;r<t;r++){const t=o[r];null!==e[t].parent&&(n[t]=M(t,e))}return n}(t);Object.keys(e).forEach((n=>{const o=e[n];k[t][n]=function(t){const e=function(...e){const n=e[0];if(null==n)return n;n.length>1&&(e=n);const o=t(e);if("object"==typeof o)for(let t=o.length,e=0;e<t;e++)o[e]=Math.round(o[e]);return o};return"conversion"in t&&(e.conversion=t.conversion),e}(o),k[t][n].raw=function(t){const e=function(...e){const n=e[0];return null==n?n:(n.length>1&&(e=n),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(o)}))}));const V=k,j=["keyword","gray","hex"],U={};for(const t of Object.keys(V))U[[...V[t].labels].sort().join("")]=t;const B={};function F(t,e){if(!(this instanceof F))return new F(t,e);if(e&&e in j&&(e=null),e&&!(e in V))throw new Error("Unknown model: "+e);let n,o;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof F)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=C.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,o=V[this.model].channels,this.color=e.value.slice(0,o),this.valpha="number"==typeof e.value[o]?e.value[o]:1}else if(t.length>0){this.model=e||"rgb",o=V[this.model].channels;const n=Array.prototype.slice.call(t,0,o);this.color=H(n,o),this.valpha="number"==typeof t[o]?t[o]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const o=e.sort().join("");if(!(o in U))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=U[o];const{labels:r}=V[this.model],i=[];for(n=0;n<r.length;n++)i.push(t[r[n]]);this.color=H(i)}if(B[this.model])for(o=V[this.model].channels,n=0;n<o;n++){const t=B[this.model][n];t&&(this.color[n]=t(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}F.prototype={toString(){return this.string()},string(t){let e=this.model in C.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return C.to[e.model](n)},round(t){return t=Math.max(t||0,0),new F([...this.color.map(X(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new F([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e}};for(const t of Object.keys(V)){if(j.includes(t))continue;const{channels:e}=V[t];F.prototype[t]=function(...e){return this.model===t?new F(this):e.length>0?new F(e,t):new F([...W(V[this.model][t].raw(this.color)),this.valpha],t)},F[t]=function(...n){let o=n[0];return"number"==typeof o&&(o=H(n,e)),new F(o,t)}}function X(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function W(t){return Array.isArray(t)?t:[t]}function H(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}const Y=F,G="rgb(255, 255, 255)",K="rgb(0, 0, 0)";function $(t,e){return Y(t).alpha(e).string()}function q(t,e){try{return Y(t).lighten(e).rgb().string()}catch(e){return console.warn("ColorUtils.lighten:",e),t}}function z(t,e){try{return Y(t).darken(e).rgb().string()}catch(e){return console.warn("ColorUtils.darken:",e),t}}function Q(t,e){try{return(new g).ratio(t,e)}catch(n){return console.warn(`ColorUtils.getContrastRatio: transparent colors were used ${t}, ${e}`),0}}function Z(t){const{element:e,html:n,appendHtml:o}=t,r=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+=r:e.innerHTML=r}function J(t,e){Object.keys(e).forEach((n=>{t.style[n]=e[n]}))}function tt(t,e){const n=window.getComputedStyle(t);return e.reduce(((t,e)=>(t[e]=n.getPropertyValue(e),t)),{})}function et(t,e){var n,o;let r;return t.styles&&(r=null===(n=t.styles.find((t=>"label"===t.element)))||void 0===n?void 0:n.params),t.adaptiveStyles&&!r&&(r=null===(o=t.adaptiveStyles[e].find((t=>"label"===t.element)))||void 0===o?void 0:o.params),r}function nt(t,e,n,o){var r;const i=n.querySelector(o),a=n.querySelector(".label"),l=et(t,e);a&&function(t,e){if(!e)return;t.id||(t.id=((t="cl-a11y")=>`${t}-${Math.random().toString(36).slice(2,10)}`)("cl-label"));const n=e.getAttribute("role"),o="group"===n||"radiogroup"===n?e:e.querySelector('[cl-element="input"]');if(!o)return;const r=(o.getAttribute("aria-labelledby")||"").split(" ").filter(Boolean);r.includes(t.id)||(r.push(t.id),o.setAttribute("aria-labelledby",r.join(" ")))}(a,i),l&&a&&(Z({element:a,html:(null===(r=t.content)||void 0===r?void 0:r.label)||""}),"TOP"===l.position?(i.style.flexDirection="column",i.style.alignItems="unset",J(a,{marginRight:"0",marginBottom:`${l.margin}px`})):(i.style.flexDirection="row",i.style.alignItems="center",J(a,{marginRight:`${l.margin}px`,marginBottom:"0"})),l.enabled?a.style.display="":a.style.display="none")}function ot(t,e,n){const o=function(t,e){const n=getComputedStyle(t)[e]||t.style.getPropertyValue(e);if(n&&n.includes("rgb")&&(!(n.split("rgb").length>2)||n.includes("#")))return n}(e,n);if(o){const e=$(o,.5);return t.classList.add("focus-outline-defined"),t.style.setProperty("--clFocusOutline",`3px solid ${e}`),e}return null}function rt(){return o("overlay-menu-content")}function it(t,e,n,o,r,a){const l=function(t,e,n,o,r){const a=function(t,e,n,o){const r=i.width(o),{right:a}=t.getBoundingClientRect(),l=r-n-a-i.scrollbarWidth(o);return{horizontalOffset:n,contentWidth:at(e).width,availableSpaceToTheLeftSideOfTheTrigger:a-n,availableSpaceToTheRightSideOfTheTrigger:l}}(t,e,n,r),l=function(t,e,n,o){const r=i.height(o),{top:a,bottom:l}=t.getBoundingClientRect();return{verticalOffset:n,contentHeight:at(e).height,availableSpaceAboveTriggerElem:a-n,availableSpaceBelowTriggerElem:r-l-n}}(t,e,n,r);let s="undefined";const c={bottom:l.availableSpaceBelowTriggerElem>=l.contentHeight,top:l.availableSpaceAboveTriggerElem>=l.contentHeight,right:a.availableSpaceToTheRightSideOfTheTrigger>=a.contentWidth,left:a.availableSpaceToTheLeftSideOfTheTrigger>=a.contentWidth};if(c.top?s="top":c.bottom?s="bottom":c.right?s="right":c.left&&(s="left"),o&&c[o]&&(s=o),"undefined"===s){const t=Math.max(l.availableSpaceBelowTriggerElem,l.availableSpaceAboveTriggerElem,a.availableSpaceToTheRightSideOfTheTrigger,a.availableSpaceToTheLeftSideOfTheTrigger);t===l.availableSpaceBelowTriggerElem?s="bottom":t===l.availableSpaceAboveTriggerElem?s="top":t===a.availableSpaceToTheRightSideOfTheTrigger?s="right":t===a.availableSpaceToTheLeftSideOfTheTrigger&&(s="left")}return Object.assign(Object.assign(Object.assign({},l),a),{position:s})}(t,e,n,o,a=a||document);return function(t,e){const{marginBottom:n,marginTop:o}=window.getComputedStyle(e);if("top"===t.position)J(e,{"margin-top":`${parseInt(o,10)+parseInt(n,10)}px`}),J(e,{"margin-bottom":"0px"});else if("bottom"===t.position)J(e,{"margin-bottom":`${parseInt(n,10)+parseInt(o,10)}px`}),J(e,{"margin-top":"0px"});else{const t=(parseInt(n,10)+parseInt(o,10))/2+"px";J(e,{"margin-top":t,"margin-bottom":t})}}(l,e),{coordinates:lt(l,t.getBoundingClientRect(),e.getBoundingClientRect(),r,a),position:l.position}}function at(t){const{width:e,height:n}=t.getBoundingClientRect(),{marginBottom:o,marginTop:r,marginLeft:i,marginRight:a}=window.getComputedStyle(t);return{width:e+parseInt(i,10)+parseInt(a,10),height:n+parseInt(r,10)+parseInt(o,10)}}function lt(t,e,n,o,r){switch(t.position){case"top":return{left:`${st(e,n,o,r)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${st(e,n,o,r)}px`,bottom:t.availableSpaceBelowTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"left":return{left:t.availableSpaceToTheLeftSideOfTheTrigger-e.width-t.contentWidth-t.horizontalOffset+"px",top:`${ct(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${ct(0,t)}px`}}}function st(t,e,n,o){let r=n?t.x+t.width/2-e.width/2:t.x;return r<0&&(r=0),r+e.width>i.width(o)&&(r-=r+e.width-i.width(o)),r}function ct(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}function dt(t,e){return t.startsWith("transparent")||t.startsWith("none")||!t.startsWith("rgb")||1!==(n=t.slice(0,t.match(/\)/).index+1),Y(n).alpha())?Q(e,G)>Q(e,K)?G:K:t;var n}function ut(t){const e=Q(t,G),n=Q(t,K);let o,r;if(e>n)for(o=G,r=e;r>5;)o=z(o,.1),r=Q(t,o);else for(o="rgb(10, 10, 10)",r=n;r>5;)o=q(o,.1),r=Q(t,o);return $(o,.2)}const pt="cl-tooltip-text-styles",ht=`\n .cl-tooltip-text {\n z-index: ${Number.MAX_SAFE_INTEGER};\n width: max-content;\n height: fit-content;\n visibility: hidden;\n background-color: white;\n color: #000;\n border: 1px solid rgb(194, 194, 194);\n border-radius: 5px;\n padding: 5px 10px;\n position: fixed;\n max-width: 300px;\n max-height: 100vh;\n box-shadow: 0 1px 5px rgba(0,0,0,.28);\n font-size: 14px;\n }\n\n .cl-tooltip-text[cl-tooltip-position='top']:before {\n content: "";\n position: absolute;\n top: 100%;\n left: calc(50% - 13px);\n border-width: 12px;\n border-style: solid;\n border-color: rgb(194, 194, 194) transparent transparent transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='top']:after {\n content: "";\n position: absolute;\n top: 100%;\n left: calc(50% - 5px);\n margin-left: -8px;\n margin-top: -2px;\n border-width: 12px;\n border-style: solid;\n border-color: white transparent transparent transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='bottom']:before {\n content: "";\n position: absolute;\n top: -24px;\n left: calc(50% - 9px);\n border-width: 12px;\n border-style: solid;\n border-color: transparent transparent rgb(194, 194, 194) transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='bottom']:after {\n content: "";\n position: absolute;\n top: -22px;\n left: calc(50% - 4px);\n margin-left: -5px;\n margin-bottom: -2px;\n border-width: 12px;\n border-style: solid;\n border-color: transparent transparent white transparent;\n }\n`;function Et(t,e,n,o){o=o||document;let r=null;t&&(t.classList.add("invalid"),t.setAttribute("aria-invalid","true")),e&&(e.style.visibility="visible"),e&&(e.onmouseenter=()=>{(function(t){if((t=t||document).head.querySelector(`#${pt}`))return;const e=document.createElement("style");e.setAttribute("id",pt),Z({element:e,html:ht}),t.head.appendChild(e)})(o),r=function(t){const e="cl-overlay-tooltip-text",n=document.getElementById(e)||document.createElement("div");return n.classList.add("cl-tooltip-text"),n.textContent!==t&&(n.textContent=t,n.style=null),n.id||(n.id=e),n}(n),o.body.append(r),r.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:n,offset:o=10,htmlDocumentObject:r}=t,i=it(e,n,o,"top",!0,r);n.setAttribute("cl-tooltip-position",i.position),J(n,i.coordinates)}({triggerElement:e,tooltipElement:r,htmlDocumentObject:o})},e.onmouseleave=()=>{r&&(r.remove(),function(t){const e=(t=t||document).head.querySelector(`#${pt}`);e&&e.remove()}(o))})}function mt(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}function vt(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=gt(t);return e[n]?{translations:e[n],language:n}:null}(n,t);return o||null}),null)}function gt(t){return t.includes("-")?t.split("-")[0].toLowerCase():t.includes("_")?t.split("_")[0].toLowerCase():t}function bt(t,e,n){const o=vt(e,mt(t));if(!o)return n;const r=o.translations,i=Object.keys(r).find((t=>t.includes(n)));return i?r[i]:n}const ft="VIEW",yt="MODULE",Tt="CONTAINER",Rt="INPUT",Ot="BUTTON",_t="CONSENT",At="COLUMN";var It,St;(St=It||(It={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",St.REQUEST="REQUEST",St.DISPATCH_EVENT="DISPATCH_EVENT",St.GO_TO_VIEW="GO_TO_VIEW",St.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",St.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",St.SHOW_WIDGET="SHOW_WIDGET",St.OPEN_LINK="OPEN_LINK",St.CLOSE_WIDGET="CLOSE_WIDGET",St.CLICK="CLICK";const Dt=It;var Ct,Lt;class Nt{static sortActions(t){const e={[Dt.CLOSE_WIDGET]:-1,[Dt.OPEN_LINK]:-2,[Dt.SHOW_WIDGET]:1,[Dt.SUBSCRIBE_CONTACT]:2,[Dt.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=Nt.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(Nt.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 r,i=!0,a=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,r){!function(t,e,n,o){Promise.resolve(o).then((function(e){t({value:e,done:n})}),e)}(o,r,(e=t[n](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(r=await a.next()).done);i=!0){o=r.value,i=!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{i||t||!(n=a.return)||await n.call(a)}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=[])}}Nt.IGNORING_VIEW_ENTRY_TYPES=[Ot,_t,Rt],(Lt=Ct||(Ct={})).CLICK="CLICK",Lt.COMPONENT_EVENT="COMPONENT_EVENT";class wt{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 xt{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 Ct.CLICK:return new Nt(t,e);case Ct.COMPONENT_EVENT:return new wt(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class Pt{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 Mt{constructor(){this.listeners=Mt.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=Pt.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=Mt.createDefaultListenersState()}}Mt.createDefaultListenersState=()=>({"*":{}});const kt=Mt,Vt=(t,e,n,o)=>{const r=EventTarget.prototype,{addEventListenerBase:i,addEventListener:a}=r;(i||a).call(t,e,n,o)};class jt{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class Ut{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===yt?Object.assign(Object.assign({},t),Ut.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 Bt,Ft,Xt,Wt,Ht,Yt,Gt,Kt,$t,qt,zt,Qt,Zt;Ut.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(Ft=Bt||(Bt={})).VIEW="VIEW",Ft.CONTAINER="CONTAINER",Ft.TEXT="TEXT",Ft.INPUT="INPUT",Ft.BUTTON="BUTTON",Ft.IMAGE="IMAGE",Ft.CONSENT="CONSENT",Ft.COUNTDOWN_TIMER="COUNTDOWN_TIMER",Ft.PROMO_CODE="PROMO_CODE",Ft.MULTIPLE_INPUT="MULTIPLE_INPUT",Ft.VIDEO="VIDEO",Ft.SLIDER="SLIDER",Ft.SLIDE="SLIDE",Ft.SOCIAL="SOCIAL",Ft.COLUMNS="COLUMNS",Ft.COLUMN="COLUMN",Ft.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(Xt||(Xt={})).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"}(Wt||(Wt={})),function(t){t.SELF="_self",t.BLANK="_blank"}(Ht||(Ht={})),(Yt||(Yt={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(Gt||(Gt={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(Kt||(Kt={})),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"}($t||($t={})),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"}(qt||(qt={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(zt||(zt={})),(Zt=Qt||(Qt={})).BEFORE="BEFORE",Zt.AFTER="AFTER",Zt.INSIDE="INSIDE",Zt.INSTEAD="INSTEAD";class Jt extends kt{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(Jt.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(Jt.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(Jt.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}Jt.changeEventName="CHANGE";const te=Jt;class ee{static set(t,e){const n=t[ee.accumulatorPropertyName]||{};t[ee.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[ee.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}ee.accumulatorPropertyName="clStyleAttributes";const ne=ee;var oe;!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"}(oe||(oe={}));class re{static applyHostStyles(t,e,n=null,o){var r,i,a;const l=null===(i=null===(r=null==n?void 0:n.props)||void 0===r?void 0:r.handlers)||void 0===i?void 0:i.find((t=>"CLICK"===t.type));l&&(null===(a=l.actions)||void 0===a?void 0:a.length)&&(e.style.cursor="pointer"),t!==ft&&t!==Tt&&t!==At||(e.style.display=o===oe.CONTENT_LOCKER&&t===ft?"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 ie{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class ae{constructor(t,e,n,o,r,i){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=r,this.httpClient=i,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,r,i,a,l;const s=null===(r=null===(o=e.adaptiveStyles)||void 0===o?void 0:o[t])||void 0===r?void 0:r.find((t=>t.element===n)),c=(null===(i=e.styles)||void 0===i?void 0:i.find((t=>t.element===n)))||{},d=(null===(a=null==c?void 0:c.styleAttributes)||void 0===a?void 0:a.background)||(null===(l=null==s?void 0:s.styleAttributes)||void 0===l?void 0:l.background),u=this.parseBackground(d);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),ie.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 r;o=o.replace(`var(--${r=n,`cl-schema-${r}`})`,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 le=new class{execute(t,e="GET",n=null,o,r){const i={method:e,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:r};return n&&(i.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,i)}};function se(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class ce{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 de{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 ue;!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.SUBMIT_REQUEST_STARTED="SUBMIT_REQUEST_STARTED",t.SUBMIT_REQUEST_FINISHED="SUBMIT_REQUEST_FINISHED",t.PROMO_CODE_SHOWN="PROMO_CODE_SHOWN"}(ue||(ue={}));const pe=ue;class he{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(pe.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(pe.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 de(this.onCounterStateUpdate)}}}const Ee=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>Ee(...t)}},me=Ee,ve="props",ge="shared",be="environment";function fe(t,e,n,o){const r=t=>{let i=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return i&&(o&&"function"==typeof o?o(i.getAttribute(e)):(null===(a=null==i?void 0:i.getAttribute)||void 0===a?void 0:a.call(i,e))===n)?i:i&&i.parentNode&&r(i.parentNode)||null;var a};return r(t)}const ye="SUBMIT";function Te(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}const Re={DESKTOP:"desktop",MOBILE:"mobile"};function Oe(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 _e(t=[]){return t.map((t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)})))}function Ae(t,e,o){var r;let i="rgb(0, 0, 0)";const a=t.adaptiveStyles[e].find((t=>"input"===t.element));if(!a)return i;if(a.placeholderStyleAttributes&&a.placeholderStyleAttributes.color)return a.placeholderStyleAttributes.color;const l=(a.classes||"").split(" ").filter((t=>t.startsWith(n)));if(!l.length)return i;let s=null===(r=o.textClasses)||void 0===r?void 0:r[l[0]];return s&&s.placeholderStyleAttributes&&s.placeholderStyleAttributes.color?s.placeholderStyleAttributes.color:i}class Ie extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}var Se;!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(Se||(Se={}));class De extends HTMLElement{constructor(){var t;super(),this.skipGameBlur=!0,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 a=new Ie("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(r("path")),id:e,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(a),t=a.detail.props,Object.assign(this,t),this.observers=me(ve,ge,be),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 jt({}),this.componentEventEmitter=new kt,this.componentResourceManager=new he(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new xt(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(ve).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(ge).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new ae(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),le),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(te.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(be).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")===Se.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===Se.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(ve).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(ge).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(be).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,r=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(Te(n,t),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(Te(n,t),r=!0)})),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!r&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e),i=r("type"),a="element-styles";let l=this.getRootElement().querySelector(`style[${i}="${a}"]`);l||(l=document.createElement("style"),l.setAttribute(i,a),this.getRootElement().appendChild(l)),Z({element:l,html:""}),n.forEach((t=>{let e=t.getAttribute(r("element"));const n=this.getEnvironment();let i=Oe(o,n,e);if(i){if(this.resizeListener.isMobile()){const t=Oe(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),l)}})),this._addLinkColor(l,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 a=[];"host"===(e=De._resolveTogglableStylesForElementModel(e)).element&&(re.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()),a.push("background")));let l=e.styleAttributes.background,s=l&&l.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&s){this.componentResourceManager.getPending().increment();const t=new Image;t.src=s[1],Vt(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),Vt(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:se(e.styleAttributes,a)});if(ne.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(),r=`flip-up-animation-${e.element}`;let i=this.getRootElement().querySelector(`#${r}`);i||(i=document.createElement("style"),i.id=r,t.appendChild(i)),Z({element:i,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 o=t;return(o.classes||"").split(" ").filter((t=>t.startsWith(n))).forEach((t=>{var n;let r=null===(n=e.textClasses)||void 0===n?void 0:n[t];r&&(r.styleAttributes.fontFamily||(r.isHeader&&e.headerFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:e.headerFontFamily})})),!r.isHeader&&e.textFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:e.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),r.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),r.placeholderStyleAttributes)}))})),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:e.textFontFamily})})),o}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",i)=>{const a=Object.keys(n).reduce(((t,e)=>t+` ${ce.camelCaseToDashCase(e)}: ${n[e]}${i?" !important;":";"}`),"");Z({element:t,html:`[${r("element")}="${e}"]${o} { ${a} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{Z({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,r,i;e.linkColor&&Z({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)&&Z({element:t,html:`a {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(r=e.linkParams)||void 0===r?void 0:r.color}}`,appendHtml:!0}),(null===(i=e.linkParams)||void 0===i?void 0:i.removeUnderline)&&Z({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!==o("hovered")&&t!==o("focused"))).forEach((e=>{e.startsWith(n)&&t.classList.remove(e)}));const r=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",r)},this.getParentComponent=()=>fe(this.parentNode,r("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(r("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:fe(this.parentNode,r("path"),void 0,(t=>1===(null==t?void 0:t.split(",").length)))},this.getWidgetLanguages=()=>mt(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>vt(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,r,i,a;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===(r=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===r?void 0:r.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(i=t.content)||void 0===i?void 0:i.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(a=t.control)||void 0===a?void 0:a.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===ye));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:Dt.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()}}De._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=De._resolveTogglableStyles(e[t]))})),e},De._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 Ce=De,Le=Symbol("required");var Ne=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n};function we(){}const xe="pending",Pe="valid",Me="invalid";class ke extends Ce{constructor(){super(...arguments),this._createControl=(t={},...e)=>{const{element:n}=t,o=Ne(t,["element"]),r=this.getProps(),i=this.getModel(),a=Object.assign(Object.assign(Object.assign({},r.control),{componentId:i.id,viewIdx:i.path[0]}),o),l=this.services.form,s=[a,n,...e];return l.hasControl(r.control.name)?l.updateControl(...s):l.registerControl(...s)},this.createControlWithValidation=(t=[],e={})=>{const{element:n=this.getElement("input"),tooltipElement:o=this.getRootElement().querySelector(".input-tooltip"),validCallback:r=we,invalidCallback:i=we,pendingCallback:a=we,elementToListen:l=n,validationMap:s={},listenStatusChange:c=!0}=e,d=Ne(e,["element","tooltipElement","validCallback","invalidCallback","pendingCallback","elementToListen","validationMap","listenStatusChange"]);if(o&&(o.style.visibility="hidden"),!t||!Array.isArray(t))throw new Error("Validators should be an array");const u=this.getProps().control.validation,p=(null==u?void 0:u.validator)?s[u.validator]:void 0,h=t.some((t=>t[Le])),E=!!(null==u?void 0:u.required),m=E||h,v=[...t];E&&!h&&v.unshift(function(t="REQUIRED"){const e=e=>{let n;switch(typeof e){case"string":n=e&&e.length>0;break;case"boolean":n=e;break;case"number":n=!isNaN(e);break;default:n=!!e}return{isValid:n,errorKey:n?null:t}};return e[Le]=!0,e}()),p&&v.push(p);const g=this._prepareAsyncValidators(v),b=this._createControl({element:n,validation:{validator:"custom",required:m}},void 0,g);return c&&this._handleControlStatusChange(Object.assign({control:b,element:l,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:r,invalidCallback:i,pendingCallback:a},d)),b},this._prepareAsyncValidators=(t=[])=>t.reduce(((t,e,n)=>"function"!=typeof e?(console.warn(`Validator ${n} should be a function, so it will be skipped`),t):(t[`custom_${n}`]=async(...t)=>{const n=await Promise.resolve(e(...t));return"object"==typeof n&&"isValid"in n?Object.assign(Object.assign({},n),{errorKey:n.isValid?null:n.errorKey}):{isValid:!1,errorKey:"INVALID_VALIDATOR_RESPONSE"}},t)),{}),this._handleControlStatusChange=n=>{n.control.on(t,(t=>{this._handleValidationStatus(n,t)})),n.control.on(e,(()=>{let t=xe;switch(!0){case n.control.pending:t=xe;break;case n.control.valid:t=Pe;break;default:t=Me}this._handleValidationStatus(n,t)}))},this._handleValidationStatus=(t,e)=>{const{control:n,element:o,tooltipElement:r,validCallback:i,invalidCallback:a,errorMessageMapper:l,pendingCallback:s}=t,c=this.services.config,d=this.manifest.i18n;switch(e){case Pe:(function(t,e){t&&(t.classList.remove("invalid"),t.setAttribute("aria-invalid","false")),e&&(e.style.visibility="hidden")})(o,r),i&&i();break;case Me:if(n.touched){const t=n.getErrorKeys();if(!t)break;const e=t[0];let i=bt(c,d,e);l&&(i=l(e,i)),Et(o,r,i,this.htmlDocumentObject),a&&a()}break;case xe:n.touched&&(function(t,e){e&&(e.style.visibility="hidden"),t&&t.classList.contains("invalid")&&(t.classList.remove("invalid"),t.removeAttribute("aria-invalid"))}(o,r),s&&s())}}}}function Ve(t){return Object.values(Re).map((e=>({type:"GROUP",propPath:["adaptiveStyles",e],children:t})))}const je={name:"SysDateComponent",componentType:"INPUT",version:"1.0.0",mappingTypes:["DATE"],contextMenuModel:Ve([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),floatingControlsModel:Ve([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"input",params:{width:{getValueFromElement:"host"},height:{getValueFromElement:"host"}}},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:Ve([{type:"CONTROL",name:"SIZE",element:"input",elementProp:"styleAttributes",params:{width:{options:["fixed","fill"]},height:{options:["fixed","fill"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"input",showPlaceholderControl:!0},{element:"label"}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"INPUT_LABEL",propPath:["styles","[element=label]","params"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"input",params:{indentationType:"PADDING",horizontalOnly:!0}},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]),general:[{type:"CONTROL",name:"DATE_FORMAT",propPath:["content","askYear"],displayCondition:function(t){return!t.editorConfig.useContactFields}},{type:"CONTROL",name:"INTEGRATION_FIELD_MAPPING",params:{integrationNamePropPath:["control","integrationName"],groupNamePropPath:["control","groupName"],fieldNamePropPath:["control","fieldName"],fieldTypePropPath:["control","fieldType"],validationPropPath:["control","validation"],placeholderPropPath:["content","placeholder"],labelPropPath:["content","label"],optionsPropPath:["control","options"]}},{type:"CONTROL",name:"INPUT_VALIDATION",params:{validationPropPath:["control","validation"],fieldTypePropPath:["control","fieldType"],required:!0}}]},autoContrast:[{slave:{element:"input",elementProp:"styleAttributes",elementSubProp:"color"},master:{element:"input",propPath:["styles","[element=input]","styleAttributes","background"]},enabledPropPath:["content","textContrastEnabled"]},{slave:{element:"input",elementProp:"placeholderStyleAttributes",elementSubProp:"color",dimmed:!0},master:{element:"input",propPath:["styles","[element=input]","styleAttributes","background"]},enabledPropPath:["content","placeholderTextContrastEnabled"]}],focusableElements:["input","label"],events:{dispatch:[],listen:[]},i18nPropPaths:["content,label"],i18n:{en:{"control,validation,validationErrors,REQUIRED":"Required field","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Only integers, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Only integers, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Invalid date","content,label":"Title"},ru:{"control,validation,validationErrors,REQUIRED":"Обязательное поле","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Только целые числа, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Только целые числа, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Недействительная дата","content,label":"Заголовок"},uk:{"control,validation,validationErrors,REQUIRED":"Обов'язкове поле","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Тільки цілі числа, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Тільки цілі числа, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Недійсна дата","content,label":"Заголовок"},es:{"control,validation,validationErrors,REQUIRED":"Campo obligatorio","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Solo enteros, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Solo enteros, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Fecha invalida","content,label":"Título"},de:{"control,validation,validationErrors,REQUIRED":"Pflichtfeld","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Nur ganze Zahlen, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Nur ganze Zahlen, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Ungültiges Datum","content,label":"Titel"},fr:{"control,validation,validationErrors,REQUIRED":"Champs requis","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Seuls les entiers, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Seuls les entiers, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Date invalide","content,label":"Titre"},it:{"control,validation,validationErrors,REQUIRED":"Campo obbligatorio","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Solo numeri interi, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Solo numeri interi, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Data non valida","content,label":"Titolo"},pt:{"control,validation,validationErrors,REQUIRED":"Campo obrigatório","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Apenas integrais, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Apenas integrais, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Data inválida","content,label":"Título"},ro:{"control,validation,validationErrors,REQUIRED":"Câmp obligatoriu","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Numai numere întregi, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Numai numere întregi, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Data nevalidă","content,label":"Titlu"},bg:{"control,validation,validationErrors,REQUIRED":"Изисквано поле","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Само цели числа, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Само цели числа, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Невалидна дата","content,label":"Заглавие"},cs:{"control,validation,validationErrors,REQUIRED":"Vyžadované pole","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Jen celá čísla, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Jen celá čísla, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Neplatné datum","content,label":"Titul"},el:{"control,validation,validationErrors,REQUIRED":"Απαιτητό πεδίο","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Μόνο ακέραιοι αριθμοί, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Μόνο ακέραιοι αριθμοί, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Άκυρη ημερομηνία","content,label":"Τίτλος"},nl:{"control,validation,validationErrors,REQUIRED":"Verplicht veld","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Alleen gehele getallen, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Alleen gehele getallen, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Ongeldige datum","content,label":"Titel"},pl:{"control,validation,validationErrors,REQUIRED":"Wymagane pole","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Tylko liczby całkowite, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Tylko liczby całkowite, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Nieprawidłowa data","content,label":"Tytuł"},sv:{"control,validation,validationErrors,REQUIRED":"Obligatoriskt fält","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Endast heltal, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Endast heltal, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Ogiltigt datum","content,label":"Tytuł"},tr:{"control,validation,validationErrors,REQUIRED":"Gerekli alan","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Yalnızca tam sayılar, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Yalnızca tam sayılar, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Geçersiz tarih","content,label":"Başlık"},ar:{"control,validation,validationErrors,REQUIRED":"الحقل المطلوب","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":'"الأعداد الصحيحة فقط, 1 - 31',"control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":'"الأعداد الصحيحة فقط, 0 - 3000',"control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"تاريخ غير صالح","content,label":"عنوان"},zh:{"control,validation,validationErrors,REQUIRED":"必填字段","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"仅限整数, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"仅限整数, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"无效日期","content,label":"Title"},da:{"control,validation,validationErrors,REQUIRED":"Påkrævet felt","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Kun heltal, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Kun heltal, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Ugyldig dato","content,label":"Titel"},he:{"control,validation,validationErrors,REQUIRED":"שדה נדרש","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"רק מספרים שלמים ,1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"רק מספרים שלמים ,0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"תאריך לא תקין","content,label":"Title"},fi:{"control,validation,validationErrors,REQUIRED":"Vaadittu kenttä","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Vain kokonaisluvut, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Vain kokonaisluvut, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Virheellinen päivämäärä","content,label":"Title"},hi:{"control,validation,validationErrors,REQUIRED":"आवश्यक फील्ड","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"केवल पूर्णांक, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"केवल पूर्णांक, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"अमान्य तारीख़","content,label":"Title"},hr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Samo cijeli brojevi, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Samo cijeli brojevi, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Nevažeći datum","content,label":"Title"},hu:{"control,validation,validationErrors,REQUIRED":"Kötelező mező","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Csak egész számok, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Csak egész számok, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Érvénytelen dátum","content,label":"Title"},id:{"control,validation,validationErrors,REQUIRED":"Bidang yang wajib diisi","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Hanya bilangan bulat, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Hanya bilangan bulat, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Tanggal tidak valid","content,label":"Title"},ja:{"control,validation,validationErrors,REQUIRED":"必須フィールド","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"整数のみ, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"整数のみ, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"日付が無効です","content,label":"Title"},ko:{"control,validation,validationErrors,REQUIRED":"필수 칸","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"정수만, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"정수만, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"유효하지 않은 날짜","content,label":"Title"},no:{"control,validation,validationErrors,REQUIRED":"Obligatorisk felt","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Bare heltall, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Bare heltall, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Ugyldig dato","content,label":"Title"},sk:{"control,validation,validationErrors,REQUIRED":"Povinné pole","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Iba celé čísla, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Iba celé čísla, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Neplatný dátum","content,label":"Title"},sl:{"control,validation,validationErrors,REQUIRED":"Obvezno polje","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Samo cela števila, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Samo cela števila, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Neveljaven datum","content,label":"Title"},sr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Samo celi brojevi, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Samo celi brojevi, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Nevažeći datum","content,label":"Title"}},props:{content:{label:"Title",askYear:!0,textContrastEnabled:!0,placeholderTextContrastEnabled:!0},control:{name:"date",integrationName:"date",defaultValue:null,validation:{required:!0,validator:"SYS_DATE"}},styles:[{element:"input",styleAttributes:{background:"rgb(255, 255, 255)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"1px",borderTopColor:"rgba(0, 0, 0, 0.1)",borderBottomWidth:"1px",borderBottomColor:"rgba(0, 0, 0, 0.1)",borderLeftWidth:"1px",borderLeftColor:"rgba(0, 0, 0, 0.1)",borderRightWidth:"1px",borderRightColor:"rgba(0, 0, 0, 0.1)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"}},{element:"label",params:{enabled:!1,position:"TOP",margin:5}}],adaptiveStyles:(Ue=[{element:"host",styleAttributes:{marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"input",styleAttributes:{width:"100%",minWidth:null,height:"35px",minHeight:"35px",color:"var(--cl-schema-text, rgb(0, 0, 0))",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none"},placeholderStyleAttributes:{color:"rgb(81, 81, 81)"},classes:""},{element:"label",styleAttributes:{color:"var(--cl-schema-text, rgb(0, 0, 0))",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none"},classes:""}],Object.values(Re).reduce(((t,e)=>Object.assign(t,{[e]:_e(Ue)})),{desktop:[],mobile:[]}))},metaDescription:{icon:"/SysDateComponent/assets/img/component-icon.svg",label:{en:"Date",ru:"Дата",uk:"Дата",es:"Fecha",fr:"Date",de:"Datum",it:"Data",pt:"Data",ro:"Data",bg:"Дата",cs:"Datum",el:"Ημερομηνία",nl:"Datum",pl:"Data",sv:"Datum",tr:"Tarih",ar:"التاريخ",zh:"日期",da:"Dato",he:"תאריך",fi:"Päivämäärä",hi:"तारीख़ ",hr:"Datum",hu:"Dátum",id:"Tanggal",ja:"日付",ko:"날짜",no:"Dato",sk:"Dátum",sl:"Datum",sr:"Datum"}},syncEnabled:!0,stylesImitationEnabled:!0,showIntegrationFieldMappingPropertyPaneOnInsert:!0};var Ue;function Be(t){return Be="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},Be(t)}function Fe(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,He(o.key),o)}}function Xe(t,e,n){return e&&Fe(t.prototype,e),n&&Fe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function We(t,e,n){return(e=He(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function He(t){var e=function(t){if("object"!=Be(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Be(e)?e:e+""}var Ye=Xe((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}));function Ge(t){return Ge="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},Ge(t)}function Ke(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,$e(o.key),o)}}function $e(t){var e=function(t){if("object"!=Ge(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ge(e)?e:e+""}We(Ye,"validationErrorKeys",{REQUIRED:"REQUIRED",DAY_INVALID_ERROR_TEXT:"DAY_INVALID_ERROR_TEXT",YEAR_INVALID_ERROR_TEXT:"YEAR_INVALID_ERROR_TEXT",DATE_INVALID_ERROR_TEXT:"DATE_INVALID_ERROR_TEXT"}),We(Ye,"DAY_PLACEHOLDER",{en:"Day",ru:"День",uk:"День",es:"Día",de:"Tag",fr:"Jour",it:"Giorno",pt:"Dia",ro:"Gün",bg:"Ден",cs:"Den",el:"Ημέρα",nl:"Dag",pl:"Dzień",sv:"Dag",tr:"Gün",ar:"اليوم"}),We(Ye,"MONTH_DROPDOWN_PLACEHOLDER",{en:"Month",ru:"Месяц",uk:"Мicяць",es:"Mes",de:"Monat",fr:"Mois",it:"Mese",pt:"Mês",ro:"Ay",bg:"Месец",cs:"Měsíc",el:"Μήνας",nl:"Maand",pl:"Miesiąc",sv:"Månad",tr:"Ay",ar:"الشهر"}),We(Ye,"YEAR_PLACEHOLDER",{en:"Year",ru:"Год",uk:"Рiк",es:"Año",de:"Jahr",fr:"Année",it:"Anno",pt:"Ano",ro:"Yıl",bg:"Година",cs:"Rok",el:"Έτος",nl:"Jaar",pl:"Rok",sv:"År",tr:"Yıl",ar:"السنة"});var qe=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return function(t,e,n){return n&&Ke(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,0,[{key:"getDatePartsOrder",value:function(t){return new Intl.DateTimeFormat(t).formatToParts().filter((function(t){return["year","month","day"].includes(t.type)})).map((function(t){return t.type}))}},{key:"convertMonthToNumeric",value:function(e,n){return t.getAllMonthsByLanguage("short",n).findIndex((function(t){return t===e}))+1}},{key:"convertNumericToMonth",value:function(e,n){return t.getAllMonthsByLanguage("short",n)[e-1]}},{key:"getAllMonthsByLanguage",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"short",e=gt(arguments.length>1?arguments[1]:void 0);return new Array(12).fill(0).map((function(n,o){return new Date(2e3,o,1).toLocaleDateString(e,{month:t})})).map((function(t){return t.charAt(0).toUpperCase()+t.slice(1)}))}},{key:"convertDashedStringDateIntoDate",value:function(t){var e=+t.split("-")[2],n=+t.split("-")[1],o=+t.split("-")[0];return new Date(new Date(2e3,n-1,e).setFullYear(o))}},{key:"convertToDoubleDigit",value:function(t){return t?+t<10?"0".concat(t):t:"00"}},{key:"normalizeYearInput",value:function(t){return"0"===t?"0000":t?"".concat(+t).padStart(4,"0"):""}}])}();function ze(t){const{element:e,html:n,appendHtml:o}=t,r=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+=r:e.innerHTML=r}function Qe(t){return Qe="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},Qe(t)}function Ze(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 Je(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ze(Object(n),!0).forEach((function(e){un(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function tn(t){return function(t){if(Array.isArray(t))return on(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||nn(t)||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.")}()}function en(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,r,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(o=i.call(n)).done)&&(l.push(o.value),l.length!==e);s=!0);}catch(t){c=!0,r=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return l}}(t,e)||nn(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nn(t,e){if(t){if("string"==typeof t)return on(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)?on(t,e):void 0}}function on(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 rn(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,pn(o.key),o)}}function an(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(an=function(){return!!t})()}function ln(t,e,n,o){var r=sn(cn(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof r?function(t){return r.apply(n,t)}:r}function sn(){return sn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=cn(t)););return t}(t,e);if(o){var r=Object.getOwnPropertyDescriptor(o,e);return r.get?r.get.call(arguments.length<3?t:n):r.value}},sn.apply(null,arguments)}function cn(t){return cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},cn(t)}function dn(t,e){return dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},dn(t,e)}function un(t,e,n){return(e=pn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pn(t){var e=function(t){if("object"!=Qe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qe(e)?e:e+""}var hn=function(){function e(){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),un(n=function(t,e,n){return e=cn(e),function(t,e){if(e&&("object"==Qe(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,an()?Reflect.construct(e,n||[],cn(t).constructor):e.apply(t,n))}(this,e),"setControlsOrder",(function(t){var e=n.getPreferredWidgetLanguage(),o=qe.getDatePartsOrder(e),r=n.getControlElementNodes(t),i=r.dayInputContainerElement,a=r.monthInputContainerElement,l=r.yearInputContainerElement,s=[];s[o.indexOf("day")]=i,s[o.indexOf("month")]=a,s[o.indexOf("year")]=l;var c=n.getRootElement().querySelector(".controls-container");ze({element:c,html:""}),s.forEach((function(t){return c.appendChild(t)}))})),un(n,"setControlValueProxy",(function(t,e){var o=n.getDateValueAsString();if(o||t)return n.getProps().content.askYear||(o="-".concat(o)),n.registeredControl.setValue(t||o,e)})),un(n,"dateValidation",(function(){var t=n.getRootElement(),e=qe.convertDashedStringDateIntoDate(n.getDateValueAsString()),o=n.getDateValueAsString(),r=n.getControlElementNodes(t),i=r.dayInputElement,a=r.yearInputElement,l=i.value,s=+i.value,c=+o.split("-")[1],d=a.value,u=+a.value;return+l<0||isNaN(s)||"0"===l||s&&(s>31||s<1)?{isValid:!1,errorKey:n.validationErrorKeys.DAY_INVALID_ERROR_TEXT}:+d<0||isNaN(u)||u>3e3||u<0?{isValid:!1,errorKey:n.validationErrorKeys.YEAR_INVALID_ERROR_TEXT}:s&&c&&(isNaN(e.getTime())||!n.isCurrentDateExist())?{isValid:!1,errorKey:n.validationErrorKeys.DATE_INVALID_ERROR_TEXT}:!s&&!isNaN(s)||!c||n.getProps().content.askYear&&!d?{isValid:!1,errorKey:n.validationErrorKeys.REQUIRED}:{isValid:!0}})),un(n,"isCurrentDateExist",(function(){var t=n.getDateValueAsString(),e=+t.split("-")[2],o=+t.split("-")[1],r=+t.split("-")[0],i=qe.convertDashedStringDateIntoDate(t);return i.getDate()===e&&i.getMonth()+1===o&&i.getFullYear()===r})),un(n,"getDateValueAsString",(function(){var t=n.getRootElement(),e=t.querySelector("#cl-day-input").value,o=t.querySelector("#cl-month-dropdown").innerText,r=t.querySelector("#cl-year-input").value;n.isMonthUnselected(o)&&(o=null),+e<0&&(e=""),+r<0&&(r="");var i=n.getPreferredWidgetLanguage(),a=qe.convertToDoubleDigit(qe.convertMonthToNumeric(o,i));return"".concat(qe.normalizeYearInput(r),"-").concat(a,"-").concat(qe.convertToDoubleDigit("".concat(+e)))})),un(n,"setStringDateValue",(function(t){var e=en(t.split("-"),3),o=e[0],r=e[1],i=e[2],a=n.getPreferredWidgetLanguage(),l=n.getRootElement();l.querySelector("#cl-day-input").value=i,l.querySelector("#cl-month-dropdown").innerText=qe.convertNumericToMonth(r,a),l.querySelector("#cl-year-input").value=+o,n.registeredControl.setValue(t)})),un(n,"getOptions",(function(){var t={};return qe.getAllMonthsByLanguage("short",n.getPreferredWidgetLanguage()).forEach((function(e,n){return t["month-".concat(n+1)]={label:e,id:n}})),t})),un(n,"createDropdownButtonMenuComponent",(function(t,e,n,o){var r=document.createElement("div");r.classList.add("option-wrapper"),r.setAttribute("role","option"),r.setAttribute("tabindex",e?"0":"-1"),r.setAttribute("aria-selected",e?"true":"false");var i=document.createElement("span");return i.textContent=t.label,J(i,n),e&&(r.style.backgroundColor=ut(o)),r.appendChild(i),r})),un(n,"focusMonthOption",(function(t,e){t&&e&&(tn(e.children).forEach((function(e){e.setAttribute("tabindex",e===t?"0":"-1")})),t.focus())})),un(n,"focusSelectedMonthAfterOverlayOpen",(function(){var t,e=null===(t=n.overlayBackdrop)||void 0===t?void 0:t.querySelector('[role="listbox"]'),o=e?tn(e.querySelectorAll(".option-wrapper")):[];if(o.length){var r=o.find((function(t){return"true"===t.getAttribute("aria-selected")}));n.focusMonthOption(r||o[0],e)}})),un(n,"restoreFocusToMonthTrigger",(function(t){t&&setTimeout((function(){t.focus()}),0)})),un(n,"armEscapeKeyupGuard",(function(){n.removeEscapeKeyupGuard(),n.boundEscapeKeyupGuard=function(t){var e,o;"Escape"===t.key&&(null===(e=t.preventDefault)||void 0===e||e.call(t),null===(o=t.stopImmediatePropagation)||void 0===o||o.call(t),n.removeEscapeKeyupGuard())},window.addEventListener("keyup",n.boundEscapeKeyupGuard,!0)})),un(n,"removeEscapeKeyupGuard",(function(){n.boundEscapeKeyupGuard&&(window.removeEventListener("keyup",n.boundEscapeKeyupGuard,!0),n.boundEscapeKeyupGuard=null)})),un(n,"handleMonthOptionKeydown",(function(t,e,o,r,i){var a,l=tn(o.children),s=l.indexOf(e);return"Enter"===t.key||" "===t.key?(t.preventDefault(),void r()):"Escape"===t.key?(t.preventDefault(),null===(a=t.stopPropagation)||void 0===a||a.call(t),n.armEscapeKeyupGuard(),void(null==i||i())):"ArrowDown"===t.key?(t.preventDefault(),void n.focusMonthOption(l[s+1]||l[0],o)):void("ArrowUp"===t.key&&(t.preventDefault(),n.focusMonthOption(l[s-1]||l[l.length-1],o)))})),un(n,"getCurrentSelectedMonthValue",(function(){var t=n.getRootElement().querySelector("#cl-month-dropdown").innerText;return n.isMonthUnselected(t)?null:qe.convertMonthToNumeric(t,n.getPreferredWidgetLanguage())})),un(n,"isMonthUnselected",(function(t){return t===n.getTranslationsMap(n.MONTH_DROPDOWN_PLACEHOLDER).translations})),un(n,"createOverlayContent",(function(t,e){var o=n.services.form.getControl(n.getProps().control.name),r=n.getRootElement().querySelector("#cl-month-dropdown"),i=tt(r,n.dropdownMenuOptionLabelStyles),a=tt(r,n.overlayContentStyles);a.background=dt(a.background,i.color);var l=function(t,e){return Math.min(Math.floor(parseInt(String(t))/2),parseInt(e.borderTopLeftRadius),parseInt(e.borderTopRightRadius),parseInt(e.borderBottomLeftRadius),parseInt(e.borderBottomRightRadius))}(tt(r,["height"]).height,a);J(e,Je(Je({},a),{},{"border-top-left-radius":"".concat(l,"px"),"border-top-right-radius":"".concat(l,"px"),"border-bottom-left-radius":"".concat(l,"px"),"border-bottom-right-radius":"".concat(l,"px")}));var s,c=n.getCurrentSelectedMonthValue(),d=n.getOptions(),u=document.createElement("div");u.setAttribute("role","listbox");var p=function(e){r.textContent=e.label,t.click(),n.setControlValueProxy(),o.emit("RUN_SINGLE_ELEMENT_VALIDATION",r)};Object.entries(d).forEach((function(e){var o=en(e,1)[0],r=d[o],l="month-".concat(c)===o,h=n.createDropdownButtonMenuComponent(r,l,i,a.background);l&&(s=h),h.addEventListener("click",(function(){return p(r)})),h.addEventListener("keydown",(function(e){n.handleMonthOptionKeydown(e,h,u,(function(){return p(r)}),(function(){return t.click()}))})),u.appendChild(h)})),e.appendChild(u),setTimeout((function(){n.focusMonthOption(s||u.firstElementChild,u)}),0)})),un(n,"createOverlay",(function(){n.overlayBackdrop&&n.overlayBackdrop.click();var t=n.getRootElement().querySelector("#cl-month-dropdown");t.setAttribute("aria-expanded","true");var e,o,r,i,a,l,s=function(t){const{triggerElement:e,overlayStyles:n,createOverlayContent:o,overlayWidth:r,overlayHeight:i,offset:a,onDestroy:l,positionByDefault:s,isHorizontallyCentered:c,isBackdropDisabledOnUI:d}=t,u=t.htmlDocumentObject||document,p=function(t){const e=document.createElement("div");return e.style.position="fixed",e.style.zIndex=String(Number.MAX_SAFE_INTEGER-1),e.style.top="0",e.style.left="0",e.style.width=t?"0px":"100%",e.style.height=t?"0px":"100%",e}(d),h=document.createElement("div");h.style.position="fixed",h.style.display="block",h.style.zIndex=String(Number.MAX_SAFE_INTEGER),r&&(h.style.width=`${r}px`),i&&(h.style.height=`${i}px`);const E=h.attachShadow({mode:"open"}),m=document.createElement("style");Z({element:m,html:n}),E.append(m);const v=document.createElement("div");v.classList.add(rt()),u.body.append(p),u.body.append(h),E.append(v),o(p,v),(()=>{const t=it(e,v,function(t){return null!=t?t:5}(a),s,c,u);(function(t,e){t.setAttribute("cl-overlay-position",e)})(v,t.position),J(h,t.coordinates)})(),h.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault()}));const g=t=>{p.remove(),h.remove(),l&&l(),window.removeEventListener("keyup",t,!0)},b=t=>{"Escape"===t.key&&(t.preventDefault(),t.stopImmediatePropagation(),g(b))};return p.addEventListener("click",(()=>g(b))),window.addEventListener("keyup",b,!0),{backdrop:p,overlay:h}}({triggerElement:t,overlayStyles:(e=n.getRootElement(),o=n.overlayContentStyles,r=n.dropdownMenuOptionLabelStyles,i=rt(),a=e.querySelector("#cl-month-dropdown"),l=dt(tt(a,o).background,tt(a,r).color),"\n .".concat(i," {\n height: 196px;\n width: 199px;\n box-shadow: 0 1px 5px rgba(0, 0, 0, 0.28);\n border-radius: 4px;\n background-color: #fff;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-width: fit-content;\n }\n \n .").concat(i," div {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n row-gap: 9px;\n padding: 10px 15px 10px;\n }\n \n .").concat(i," div {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n row-gap: 9px;\n padding: 10px 14px 10px;\n }\n \n .option-wrapper {\n border: 0;\n align-items: center;\n font-size: 16px;\n padding: 10px 20px;\n outline: 0;\n cursor: pointer;\n text-align: left;\n }\n \n .option-wrapper span {\n word-break: keep-all;\n }\n \n .option-wrapper:hover {\n background-color: ").concat(ut(l),";\n }\n ")),createOverlayContent:function(t,e){n.createOverlayContent(t,e)},overlayWidth:n.getRootElement().querySelector("#cl-month-dropdown").getBoundingClientRect().width,onDestroy:function(){n.overlayBackdrop=null,t.setAttribute("aria-expanded","false"),n.restoreFocusToMonthTrigger(t)},htmlDocumentObject:n.htmlDocumentObject});n.overlayBackdrop=s.backdrop;var c=function(){return n.focusSelectedMonthAfterOverlayOpen()};window.requestAnimationFrame?window.requestAnimationFrame((function(){return setTimeout(c,0)})):setTimeout(c,0)})),un(n,"applyControlsDisplayRules",(function(t){var e=n.getRootElement();t.content.askYear?e.querySelector(".year-input-with-tooltip").style.display="block":e.querySelector(".year-input-with-tooltip").style.display="none"})),un(n,"getControlElementNodes",(function(t){return{dayInputElement:t.querySelector("#cl-day-input"),dayTooltipElement:t.querySelector(".day-input-with-tooltip .input-tooltip"),dayInputContainerElement:t.querySelector(".day-input-with-tooltip"),monthInputElement:t.querySelector("#cl-month-dropdown"),monthTooltipElement:t.querySelector(".month-dropdown-input .input-tooltip"),monthInputContainerElement:t.querySelector(".month-dropdown-input"),yearInputElement:t.querySelector("#cl-year-input"),yearTooltipElement:t.querySelector(".year-input-with-tooltip .input-tooltip"),yearInputContainerElement:t.querySelector(".year-input-with-tooltip")}})),un(n,"setPlaceholders",(function(t,e){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(n.isUpdatingRenderMode()||o)&&(n.setDayPlaceholder(),n.setMonthPlaceholder(),n.setYearPlaceholder(),n.applyPlaceholdersColor(t,e))})),un(n,"applyPlaceholdersColor",(function(t,e){var o=Ae(t,e,n.getShared());n.getHostElement().style.setProperty("--cl-date-input-placeholder-color",o)})),un(n,"setDayPlaceholder",(function(){var t=n.getRootElement().querySelector("#cl-day-input");t&&(t.placeholder=n.getTranslationsMap(n.DAY_PLACEHOLDER).translations)})),un(n,"setMonthPlaceholder",(function(){var t=n.getRootElement().querySelector("#cl-month-dropdown");if(t){var e=n.getTranslationsMap(n.MONTH_DROPDOWN_PLACEHOLDER).translations,o=document.createElement("div");o.classList.add("dropdown-placeholder"),o.style.color="var(--cl-date-input-placeholder-color)",o.textContent=e,ze({element:t,html:""}),t.appendChild(o)}})),un(n,"setYearPlaceholder",(function(){var t=n.getRootElement().querySelector("#cl-year-input");t&&(t.placeholder=n.getTranslationsMap(n.YEAR_PLACEHOLDER).translations)})),un(n,"getTranslatedKey",(function(t){return bt(n.services.config,n.manifest.i18n,t)})),un(n,"setInvalidStyleToElement",(function(t,e,o,r){r&&e!==r||Et(e,o,t,n.htmlDocumentObject)})),un(n,"registerControl",(function(e){var o=n.getHostElement(),r=n.getControlElementNodes(e),i=r.dayInputElement,a=r.dayTooltipElement,l=r.monthInputElement,s=r.monthTooltipElement,c=r.yearInputElement,d=r.yearTooltipElement,u={SYS_DATE:function(){return n.dateValidation()}};function p(t){return t===i||t===c?!t.value:t===l&&this.isMonthUnselected(l.textContent)}function h(t){var e=this;this.registeredControl.validate().then((function(){var n=e.registeredControl.getErrorKeys();if(n){var o=n[0];o===e.validationErrorKeys.REQUIRED&&p.call(e,t)&&(o=n[1]||n[0]);var r=e.getTranslatedKey(o);b.call(e,r,o,!1,t)}}))}function E(t,e){return e===i?m.call(this):e===l?v.call(this):e===c?g.call(this):void(t&&(m.call(this),v.call(this),g.call(this)))}function m(){i.classList.contains("invalid")&&i.classList.remove("invalid"),a.style.visibility="hidden"}function v(){l.classList.contains("invalid")&&l.classList.remove("invalid"),s.style.visibility="hidden"}function g(){c.classList.contains("invalid")&&c.classList.remove("invalid"),d.style.visibility="hidden"}function b(t,e,n,o){return o?E.call(this,!1,o):E.call(this,!0),e===this.validationErrorKeys.YEAR_INVALID_ERROR_TEXT?this.setInvalidStyleToElement(t,c,d,o):e===this.validationErrorKeys.DAY_INVALID_ERROR_TEXT?this.setInvalidStyleToElement(t,i,a,o):e===this.validationErrorKeys.DATE_INVALID_ERROR_TEXT?this.setInvalidStyleToElement(t,i,a):void(e===this.validationErrorKeys.REQUIRED&&(i.value||o!==i&&!n||this.setInvalidStyleToElement(t,i,a,o),this.isMonthUnselected(l.textContent)&&(o===l||n)&&this.setInvalidStyleToElement(t,l,s,o),c.value||o!==c&&!n||this.setInvalidStyleToElement(t,c,d,o)))}function f(){s.style.visibility="hidden",l.classList.contains("invalid")&&l.classList.remove("invalid")}n.registeredControl=n.createControlWithValidation([],{element:o,listenStatusChange:!1,validationMap:u}),o.addEventListener("input",(function(t){n.registeredControl.emit("RUN_SINGLE_ELEMENT_VALIDATION",t.composedPath()[0]),n.setControlValueProxy()})),n.services.eventEmitter.on("INVALID_CONTACT_DATA_SUBMIT_ATTEMPT",(function(){var t=n.registeredControl.getErrorKeys();if(t){var e=n.getTranslatedKey(t[0]);b.call(n,e,t[0],!0)}})),n.registeredControl.on("RUN_SINGLE_ELEMENT_VALIDATION",(function(t){h.call(n,t)})),n.registeredControl.on(t,(function(t){switch(t){case"valid":E.call(n,!0);break;case"pending":f.call(n)}}))})),un(n,"setArrowIconStyles",(function(){n.getRootElement().querySelector(".dropdown-input-select-button").style.color=Ae(n.getProps(),n.getEnvironment(),n.getShared())})),un(n,"setInputHostSize",(function(t,e){var o=t.adaptiveStyles[e].find((function(t){return"input"===t.element})).styleAttributes,r=n.getHostElement(),i=n.getRootElement().querySelectorAll('[cl-element="input"]'),a=n.getElement("label"),l=et(t,e),s=a&&l.enabled&&"TOP"===l.position?a.getBoundingClientRect().height+l.margin:0,c="".concat(parseFloat(o.height)+s,"px");r.style.width=o.width,r.style.minWidth=o.minWidth,r.style.height=c,r.style.minHeight=c,i.forEach((function(t){t.style.width="",t.style.minWidth="",t.style.height="",t.style.minHeight=""}))})),un(n,"manifest",je),un(n,"registeredControl",void 0),un(n,"overlayBackdrop",void 0),un(n,"boundEscapeKeyupGuard",null),un(n,"DAY_PLACEHOLDER",Ye.DAY_PLACEHOLDER),un(n,"MONTH_DROPDOWN_PLACEHOLDER",Ye.MONTH_DROPDOWN_PLACEHOLDER),un(n,"YEAR_PLACEHOLDER",Ye.YEAR_PLACEHOLDER),un(n,"validationErrorKeys",Ye.validationErrorKeys),un(n,"dropdownMenuOptionLabelStyles",["color","font-family","font-size","letter-spacing","text-shadow","font-weight","line-height","text-align"]),un(n,"overlayContentStyles",["background","border-style","border-top-width","border-top-color","border-bottom-width","border-bottom-color","border-left-width","border-left-color","border-right-width","border-right-color","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius"]),un(n,"openMonthDropdown",(function(){setTimeout((function(){return n.createOverlay()}),50)})),un(n,"handleMonthDropdownKeydown",(function(t){["Enter"," ","ArrowDown"].includes(t.key)&&(t.preventDefault(),n.openMonthDropdown())})),n.getRootElement().innerHTML="\n ".concat("\n <style>\n .main-container {\n height: 100%;\n }\n \n .label-and-controls-container {\n height: 100%;\n display: flex;\n }\n \n .controls-container {\n position: relative;\n height: 100%;\n min-height: 15px;\n width: 100%;\n display: flex;\n gap: 5px;\n }\n \n .label {\n min-height: 10px;\n }\n \n .label.cl-focused {\n min-height: auto;\n }\n \n .dropdown-placeholder {\n width: calc(100% - 15px);\n text-overflow: ellipsis;\n overflow: hidden;\n }\n \n .day-input-with-tooltip {\n min-width: 54px;\n height: inherit;\n }\n \n .month-dropdown-input {\n position: relative;\n display: flex;\n height: inherit;\n width: 100%;\n cursor: pointer;\n min-width: 82px;\n }\n \n .year-input-with-tooltip {\n min-width: 56px;\n height: 100%;\n }\n \n .cl-date-input-control {\n position: relative;\n width: 100%;\n }\n \n .cl-date-input-control input {\n width: 100%;\n height: 100%;\n }\n \n .cl-date-input-control input::placeholder {\n color: var(--cl-date-input-placeholder-color);\n opacity: 1;\n }\n \n .cl-date-input-control input::-ms-input-placeholder {\n color: var(--cl-date-input-placeholder-color);\n opacity: 1;\n }\n \n .cl-date-input-control .month-dropdown-input .dropdown-input-select-button {\n bottom: calc(50% - 17px);\n }\n \n .invalid {\n border: 1px solid #ff0000 !important;\n }\n \n .input-tooltip {\n visibility: hidden;\n position: absolute;\n right: -10px;\n top: -10px;\n z-index: 1;\n border-radius: 100%;\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Chrome/Safari/Opera */\n -khtml-user-select: none; /* Konqueror */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n }\n \n .dropdown-label {\n display: flex;\n align-items: center;\n position: absolute;\n height: 100%;\n width: 100%;\n padding: 0 35px 0 20px;\n cursor: pointer;\n }\n \n .dropdown-input-select-button {\n background: transparent;\n border: none;\n min-width: max-content;\n width: 24px;\n height: 100%;\n display: flex;\n align-items: center;\n position: absolute;\n right: 0;\n z-index: 2;\n }\n \n .label-and-controls-container.focus-outline-defined input:focus, .dropdown-label:focus {\n outline: var(--clFocusOutline);\n }\n </style>\n ","\n ").concat('\n <div class="main-container">\n <div class="label-and-controls-container">\n \n <div cl-element="label"\n cl-inline-edit="content, label"\n class="label"\n id="cl-date-label">\n </div>\n \n <div class="controls-container"\n role="group"\n aria-labelledby="cl-date-label">\n \n <div class="cl-date-input-control day-input-with-tooltip">\n <input cl-element="input"\n id="cl-day-input"\n type="text"\n name="day"\n aria-labelledby="cl-date-label">\n <div class="input-tooltip" aria-hidden="true">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">\n <path d="M1.5 13.0604C1.5 19.4116 6.6481 24.5605 13.0075 24.5605C19.353 24.5605 24.5 19.4107 24.5 13.0604C24.5 6.70865 19.3531 1.55909 13.0075 1.55908C6.64806 1.55908 1.5 6.7077 1.5 13.0604ZM12.9775 17.9668C12.7032 17.9668 12.4807 17.7443 12.4807 17.47C12.4807 17.1956 12.7032 16.9732 12.9775 16.9732C13.2519 16.9732 13.4743 17.1956 13.4743 17.47C13.4743 17.7443 13.2519 17.9668 12.9775 17.9668ZM12.9775 13.4764C12.7032 13.4764 12.4807 13.254 12.4807 12.9796L12.4807 8.48924C12.4807 8.21487 12.7032 7.99245 12.9775 7.99245C13.2519 7.99245 13.4743 8.21487 13.4743 8.48924L13.4743 12.9796C13.4743 13.254 13.2519 13.4764 12.9775 13.4764Z" fill="#FF0000" stroke="white" stroke-width="2"></path>\n </svg>\n </div>\n </div>\n \n <div class="cl-date-input-control month-dropdown-input">\n <div class="dropdown-input-select-button">\n <svg width="11" height="7" viewBox="0 0 11 7" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M10.5248 1.90196L9.57381 2.71322L6.05712 5.71322L5.24395 6.40691L4.4324 5.71132L0.949088 2.72576L0 1.91229L1.62694 0.0141139L2.57603 0.827583L5.24778 3.11756L7.9513 0.811257L8.90228 0L10.5248 1.90196Z"\n fill="currentColor"/>\n </svg>\n </div>\n <button cl-element="input"\n class="dropdown-label"\n id="cl-month-dropdown"\n type="button"\n aria-haspopup="listbox"\n aria-expanded="false"\n aria-labelledby="cl-date-label">\n <div class="dropdown-placeholder">placeholder</div>\n </button>\n <div class="input-tooltip" aria-hidden="true">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">\n <path d="M1.5 13.0604C1.5 19.4116 6.6481 24.5605 13.0075 24.5605C19.353 24.5605 24.5 19.4107 24.5 13.0604C24.5 6.70865 19.3531 1.55909 13.0075 1.55908C6.64806 1.55908 1.5 6.7077 1.5 13.0604ZM12.9775 17.9668C12.7032 17.9668 12.4807 17.7443 12.4807 17.47C12.4807 17.1956 12.7032 16.9732 12.9775 16.9732C13.2519 16.9732 13.4743 17.1956 13.4743 17.47C13.4743 17.7443 13.2519 17.9668 12.9775 17.9668ZM12.9775 13.4764C12.7032 13.4764 12.4807 13.254 12.4807 12.9796L12.4807 8.48924C12.4807 8.21487 12.7032 7.99245 12.9775 7.99245C13.2519 7.99245 13.4743 8.21487 13.4743 8.48924L13.4743 12.9796C13.4743 13.254 13.2519 13.4764 12.9775 13.4764Z" fill="#FF0000" stroke="white" stroke-width="2"></path>\n </svg>\n </div>\n </div>\n \n <div class="cl-date-input-control year-input-with-tooltip">\n <input cl-element="input"\n id="cl-year-input"\n type="text"\n name="fname"\n aria-labelledby="cl-date-label">\n <div class="input-tooltip" aria-hidden="true">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">\n <path d="M1.5 13.0604C1.5 19.4116 6.6481 24.5605 13.0075 24.5605C19.353 24.5605 24.5 19.4107 24.5 13.0604C24.5 6.70865 19.3531 1.55909 13.0075 1.55908C6.64806 1.55908 1.5 6.7077 1.5 13.0604ZM12.9775 17.9668C12.7032 17.9668 12.4807 17.7443 12.4807 17.47C12.4807 17.1956 12.7032 16.9732 12.9775 16.9732C13.2519 16.9732 13.4743 17.1956 13.4743 17.47C13.4743 17.7443 13.2519 17.9668 12.9775 17.9668ZM12.9775 13.4764C12.7032 13.4764 12.4807 13.254 12.4807 12.9796L12.4807 8.48924C12.4807 8.21487 12.7032 7.99245 12.9775 7.99245C13.2519 7.99245 13.4743 8.21487 13.4743 8.48924L13.4743 12.9796C13.4743 13.254 13.2519 13.4764 12.9775 13.4764Z" fill="#FF0000" stroke="white" stroke-width="2"></path>\n </svg>\n </div>\n </div>\n \n </div>\n \n </div>\n </div>\n ',"\n "),n}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&&dn(t,e)}(e,ke),function(t,e){return e&&rn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"connectedCallback",value:function(){var t,n=this;ln(e,"connectedCallback",this,3)([]);var o=this.getRootElement(),r=this.getProps();this.registerControl(o);var i=(null===(t=this.registeredControl)||void 0===t?void 0:t.value)||null;this.setControlsOrder(o),i?this.setStringDateValue(i):this.setPlaceholders(r,this.getEnvironment(),!0),this.observeProps((function(t,e){n.applyAutoAdaptiveStyles(e.adaptiveStyles,e.styles);var r=n.getEnvironment();nt(e,r,o,".label-and-controls-container"),n.setInputHostSize(e,r),n.applyControlsDisplayRules(e),n.setPlaceholders(e,r),n.setArrowIconStyles(),function(t,e){let n=null;const o=e||t,r=["transparent","initial"];t&&(t.style.borderColor&&!r.includes(t.style.borderColor)&&(parseFloat(t.style.borderWidth)||parseFloat(t.style.borderBottomWidth))&&(n=ot(o,t,"borderColor")),!n&&t.style.getPropertyValue("--borderBottomColor")&&!r.includes(t.style.getPropertyValue("--borderBottomColor"))&&parseFloat(t.style.getPropertyValue("--borderBottomWidth"))&&(n=ot(o,t,"--borderBottomColor")),n||!t.style.backgroundColor||r.includes(t.style.backgroundColor)||(n=ot(o,t,"backgroundColor")),n||!t.style.color||r.includes(t.style.color)||(n=ot(o,t,"color")),n||o.classList.remove("focus-outline-defined"))}(n.getElement("input"),o.querySelector(".label-and-controls-container"))})),this.observeShared((function(){var t=n.getProps(),e=n.getEnvironment();n.setPlaceholders(t,e),n.setInputHostSize(t,e),n.setArrowIconStyles()})),this.observeEnvironment((function(t,e){var r=n.getProps();nt(r,e,o,".label-and-controls-container"),n.setInputHostSize(r,e),n.setPlaceholders(r,e),n.setArrowIconStyles()}));var a=o.querySelector("#cl-month-dropdown");a.addEventListener("click",this.openMonthDropdown),a.addEventListener("keydown",this.handleMonthDropdownKeydown)}},{key:"disconnectedCallback",value:function(){ln(e,"disconnectedCallback",this,3)([]),this.removeEscapeKeyupGuard();var t=this.getRootElement().querySelector("#cl-month-dropdown");null==t||t.removeEventListener("click",this.openMonthDropdown),null==t||t.removeEventListener("keydown",this.handleMonthDropdownKeydown)}}])}();un(hn,"define",{name:"sys-date",model:je.name,manifest:je});export{hn as default};window.clComponentClass_SysDateComponent=hn;
1
+ const t="validationStatusChanged",e="touchedStatusChanged",n="cl-";function o(t){return n+t}function r(t){return"cl-"+t}class i{static size(t){return{width:this.width(t),height:this.height(t)}}static width(t){var e;const n=t||document;return Math.max(n.documentElement.clientWidth,(null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)}static height(t){var e;const n=t||document;return Math.max(n.documentElement.clientHeight,(null===(e=n.defaultView)||void 0===e?void 0:e.innerHeight)||0)}static scrollbarWidth(t){var e;const n=t||document;return((null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)-n.documentElement.clientWidth}}var a={transparent:"#0000"},l=function(t,e,n,o){return null!=o&&""!==o||(o=1),t=parseFloat(t),e=parseFloat(e),n=parseFloat(n),o=parseFloat(o),t<=255&&t>=0&&e<=255&&e>=0&&n<=255&&n>=0&&o<=1&&o>=0?[Math.round(t),Math.round(e),Math.round(n),o]:null},s=[];for(var c in a)s.push(c);var d="\\s*([.\\d%]+)\\s*",u="\\("+[d,d,d]+"(?:,\\s*([.\\d]+)\\s*)?\\)",p="(?:rgb)a?",h="("+s.join("|")+")",E=RegExp(p+u,"i"),m=function(t,e){if(null==t)return null;t=(t+"").replace(/\s+/,"");var n=a[t];return n?m(n,e):(n=t.match(E))&&(t=n.slice(1))&&(t=l.apply(null,t))?e?t:(1===t[3]&&t.splice(3,1),"rgb"+(4===t.length?"a":"")+"("+t+")"):null};RegExp([h,"(?:#([a-f0-9]{3,8}))",p+u,"(?:hsl)a?"+u].join("|"),"gi");const v=m;class g{ratio(t,e,n){return t=this.getRgbTriplet(t,n),e=this.getRgbTriplet(e,n),this.wcagRgb(t,e)}isNotTransparent(t,e){e=e||{};const n=(t=v(t)).match(/\((.*)\)/)[1].split(",");if(4!=n.length||"0"!=n[3]||e.ignoreAlpha)return t;throw new TypeError("get-contrast cannot contrast transparent colors")}getRgbTriplet(t,e){if("string"!=typeof t)throw new TypeError("get-contrast expects colors as strings");let n=t.toLowerCase();return n=this.isNotTransparent(n,e),n.match(/\((.*)\)/)[1].split(",").slice(0,3)}wcagRgb(t,e){return this.luminance(this.relativeLuminance(t),this.relativeLuminance(e))}luminance(t,e){return(Math.max(t,e)+.05)/(Math.min(t,e)+.05)}relativeLuminance(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,r=1/12.92;function i(t){return Math.pow((t+.055)/1.055,2.4)}return.2126*(e<=.03928?e*r:i(e))+.7152*(n<=.03928?n*r:i(n))+.0722*(o<=.03928?o*r:i(o))}}function b(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}var f=Array.prototype.concat,y=Array.prototype.slice,T=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var r=t[n];b(r)?e=f.call(e,y.call(r)):e.push(r)}return e};T.wrap=function(t){return function(){return t(T(arguments))}};const R=T;var O={},_=Object.hasOwnProperty,A=Object.create(null);for(var I in O)_.call(O,I)&&(A[O[I]]=I);var S={to:{},get:{}};function D(t,e,n){return Math.min(Math.max(e,t),n)}S.get=function(t){var e,n;return"hsl"===t.substring(0,3).toLowerCase()?(e=S.get.hsl(t),n="hsl"):(e=S.get.rgb(t),n="rgb"),e?{model:n,value:e}:null},S.get.rgb=function(t){if(!t)return null;var e,n,o,r=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=e[2],e=e[1],n=0;n<3;n++){var i=2*n;r[n]=parseInt(e.slice(i,i+2),16)}o&&(r[3]=parseInt(o,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(o=(e=e[1])[3],n=0;n<3;n++)r[n]=parseInt(e[n]+e[n],16);o&&(r[3]=parseInt(o+o,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)r[n]=parseInt(e[n+1],0);e[4]&&(e[5]?r[3]=.01*parseFloat(e[4]):r[3]=parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:_.call(O,e[1])?((r=O[e[1]])[3]=1,r):null:null;for(n=0;n<3;n++)r[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?r[3]=.01*parseFloat(e[4]):r[3]=parseFloat(e[4]))}for(n=0;n<3;n++)r[n]=D(r[n],0,255);return r[3]=D(r[3],0,1),r},S.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,D(parseFloat(e[2]),0,100),D(parseFloat(e[3]),0,100),D(isNaN(n)?1:n,0,1)]}return null},S.to.rgb=function(){var t=R(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},S.to.hsl=function(){var t=R(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};const C=S,L={},N={};for(const t of Object.keys(L))N[L[t]]=t;const w={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"}};Math.pow(6/29,3);for(const t of Object.keys(w)){if(!("channels"in w[t]))throw new Error("missing channels property: "+t);if(!("labels"in w[t]))throw new Error("missing channel labels property: "+t);if(w[t].labels.length!==w[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=w[t];delete w[t].channels,delete w[t].labels,Object.defineProperty(w[t],"channels",{value:e}),Object.defineProperty(w[t],"labels",{value:n})}w.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,r=Math.min(e,n,o),i=Math.max(e,n,o),a=i-r;let l,s;i===r?l=0:e===i?l=(n-o)/a:n===i?l=2+(o-e)/a:o===i&&(l=4+(e-n)/a),l=Math.min(60*l,360),l<0&&(l+=360);const c=(r+i)/2;return s=i===r?0:c<=.5?a/(i+r):a/(2-i-r),[l,100*s,100*c]},w.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let r,i,a;if(0===n)return a=255*o,[a,a,a];r=o<.5?o*(1+n):o+n-o*n;const l=2*o-r,s=[0,0,0];for(let t=0;t<3;t++)i=e+1/3*-(t-1),i<0&&i++,i>1&&i--,a=6*i<1?l+6*(r-l)*i:2*i<1?r:3*i<2?l+(r-l)*(2/3-i)*6:l,s[t]=255*a;return s};const x=w;function P(t,e){return function(n){return e(t(n))}}function M(t,e){const n=[e[t].parent,t];let o=x[e[t].parent][t],r=e[t].parent;for(;e[r].parent;)n.unshift(e[r].parent),o=P(x[e[r].parent][r],o),r=e[r].parent;return o.conversion=n,o}const k={};Object.keys(x).forEach((t=>{k[t]={},Object.defineProperty(k[t],"channels",{value:x[t].channels}),Object.defineProperty(k[t],"labels",{value:x[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(x);for(let n=e.length,o=0;o<n;o++)t[e[o]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;){const t=n.pop(),o=Object.keys(x[t]);for(let r=o.length,i=0;i<r;i++){const r=o[i],a=e[r];-1===a.distance&&(a.distance=e[t].distance+1,a.parent=t,n.unshift(r))}}return e}(t),n={},o=Object.keys(e);for(let t=o.length,r=0;r<t;r++){const t=o[r];null!==e[t].parent&&(n[t]=M(t,e))}return n}(t);Object.keys(e).forEach((n=>{const o=e[n];k[t][n]=function(t){const e=function(...e){const n=e[0];if(null==n)return n;n.length>1&&(e=n);const o=t(e);if("object"==typeof o)for(let t=o.length,e=0;e<t;e++)o[e]=Math.round(o[e]);return o};return"conversion"in t&&(e.conversion=t.conversion),e}(o),k[t][n].raw=function(t){const e=function(...e){const n=e[0];return null==n?n:(n.length>1&&(e=n),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(o)}))}));const V=k,j=["keyword","gray","hex"],U={};for(const t of Object.keys(V))U[[...V[t].labels].sort().join("")]=t;const B={};function F(t,e){if(!(this instanceof F))return new F(t,e);if(e&&e in j&&(e=null),e&&!(e in V))throw new Error("Unknown model: "+e);let n,o;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof F)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=C.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,o=V[this.model].channels,this.color=e.value.slice(0,o),this.valpha="number"==typeof e.value[o]?e.value[o]:1}else if(t.length>0){this.model=e||"rgb",o=V[this.model].channels;const n=Array.prototype.slice.call(t,0,o);this.color=H(n,o),this.valpha="number"==typeof t[o]?t[o]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const o=e.sort().join("");if(!(o in U))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=U[o];const{labels:r}=V[this.model],i=[];for(n=0;n<r.length;n++)i.push(t[r[n]]);this.color=H(i)}if(B[this.model])for(o=V[this.model].channels,n=0;n<o;n++){const t=B[this.model][n];t&&(this.color[n]=t(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}F.prototype={toString(){return this.string()},string(t){let e=this.model in C.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return C.to[e.model](n)},round(t){return t=Math.max(t||0,0),new F([...this.color.map(X(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new F([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e}};for(const t of Object.keys(V)){if(j.includes(t))continue;const{channels:e}=V[t];F.prototype[t]=function(...e){return this.model===t?new F(this):e.length>0?new F(e,t):new F([...W(V[this.model][t].raw(this.color)),this.valpha],t)},F[t]=function(...n){let o=n[0];return"number"==typeof o&&(o=H(n,e)),new F(o,t)}}function X(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function W(t){return Array.isArray(t)?t:[t]}function H(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}const Y=F,G="rgb(255, 255, 255)",K="rgb(0, 0, 0)";function $(t,e){return Y(t).alpha(e).string()}function q(t,e){try{return Y(t).lighten(e).rgb().string()}catch(e){return console.warn("ColorUtils.lighten:",e),t}}function z(t,e){try{return Y(t).darken(e).rgb().string()}catch(e){return console.warn("ColorUtils.darken:",e),t}}function Q(t,e){try{return(new g).ratio(t,e)}catch(n){return console.warn(`ColorUtils.getContrastRatio: transparent colors were used ${t}, ${e}`),0}}function Z(t){const{element:e,html:n,appendHtml:o}=t,r=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+=r:e.innerHTML=r}function J(t,e){Object.keys(e).forEach((n=>{t.style[n]=e[n]}))}function tt(t,e){const n=window.getComputedStyle(t);return e.reduce(((t,e)=>(t[e]=n.getPropertyValue(e),t)),{})}function et(t,e){var n,o;let r;return t.styles&&(r=null===(n=t.styles.find((t=>"label"===t.element)))||void 0===n?void 0:n.params),t.adaptiveStyles&&!r&&(r=null===(o=t.adaptiveStyles[e].find((t=>"label"===t.element)))||void 0===o?void 0:o.params),r}function nt(t,e,n,o){var r;const i=n.querySelector(o),a=n.querySelector(".label"),l=et(t,e);a&&function(t,e){if(!e)return;t.id||(t.id=((t="cl-a11y")=>`${t}-${Math.random().toString(36).slice(2,10)}`)("cl-label"));const n=e.getAttribute("role"),o="group"===n||"radiogroup"===n?e:e.querySelector('[cl-element="input"]');if(!o)return;const r=(o.getAttribute("aria-labelledby")||"").split(" ").filter(Boolean);r.includes(t.id)||(r.push(t.id),o.setAttribute("aria-labelledby",r.join(" ")))}(a,i),l&&a&&(Z({element:a,html:(null===(r=t.content)||void 0===r?void 0:r.label)||""}),"TOP"===l.position?(i.style.flexDirection="column",i.style.alignItems="unset",J(a,{marginRight:"0",marginBottom:`${l.margin}px`})):(i.style.flexDirection="row",i.style.alignItems="center",J(a,{marginRight:`${l.margin}px`,marginBottom:"0"})),l.enabled?a.style.display="":a.style.display="none")}function ot(t,e,n){const o=function(t,e){const n=getComputedStyle(t)[e]||t.style.getPropertyValue(e);if(n&&n.includes("rgb")&&(!(n.split("rgb").length>2)||n.includes("#")))return n}(e,n);if(o){const e=$(o,.5);return t.classList.add("focus-outline-defined"),t.style.setProperty("--clFocusOutline",`3px solid ${e}`),e}return null}function rt(){return o("overlay-menu-content")}function it(t,e,n,o,r,a){const l=function(t,e,n,o,r){const a=function(t,e,n,o){const r=i.width(o),{right:a}=t.getBoundingClientRect(),l=r-n-a-i.scrollbarWidth(o);return{horizontalOffset:n,contentWidth:at(e).width,availableSpaceToTheLeftSideOfTheTrigger:a-n,availableSpaceToTheRightSideOfTheTrigger:l}}(t,e,n,r),l=function(t,e,n,o){const r=i.height(o),{top:a,bottom:l}=t.getBoundingClientRect();return{verticalOffset:n,contentHeight:at(e).height,availableSpaceAboveTriggerElem:a-n,availableSpaceBelowTriggerElem:r-l-n}}(t,e,n,r);let s="undefined";const c={bottom:l.availableSpaceBelowTriggerElem>=l.contentHeight,top:l.availableSpaceAboveTriggerElem>=l.contentHeight,right:a.availableSpaceToTheRightSideOfTheTrigger>=a.contentWidth,left:a.availableSpaceToTheLeftSideOfTheTrigger>=a.contentWidth};if(c.top?s="top":c.bottom?s="bottom":c.right?s="right":c.left&&(s="left"),o&&c[o]&&(s=o),"undefined"===s){const t=Math.max(l.availableSpaceBelowTriggerElem,l.availableSpaceAboveTriggerElem,a.availableSpaceToTheRightSideOfTheTrigger,a.availableSpaceToTheLeftSideOfTheTrigger);t===l.availableSpaceBelowTriggerElem?s="bottom":t===l.availableSpaceAboveTriggerElem?s="top":t===a.availableSpaceToTheRightSideOfTheTrigger?s="right":t===a.availableSpaceToTheLeftSideOfTheTrigger&&(s="left")}return Object.assign(Object.assign(Object.assign({},l),a),{position:s})}(t,e,n,o,a=a||document);return function(t,e){const{marginBottom:n,marginTop:o}=window.getComputedStyle(e);if("top"===t.position)J(e,{"margin-top":`${parseInt(o,10)+parseInt(n,10)}px`}),J(e,{"margin-bottom":"0px"});else if("bottom"===t.position)J(e,{"margin-bottom":`${parseInt(n,10)+parseInt(o,10)}px`}),J(e,{"margin-top":"0px"});else{const t=(parseInt(n,10)+parseInt(o,10))/2+"px";J(e,{"margin-top":t,"margin-bottom":t})}}(l,e),{coordinates:lt(l,t.getBoundingClientRect(),e.getBoundingClientRect(),r,a),position:l.position}}function at(t){const{width:e,height:n}=t.getBoundingClientRect(),{marginBottom:o,marginTop:r,marginLeft:i,marginRight:a}=window.getComputedStyle(t);return{width:e+parseInt(i,10)+parseInt(a,10),height:n+parseInt(r,10)+parseInt(o,10)}}function lt(t,e,n,o,r){switch(t.position){case"top":return{left:`${st(e,n,o,r)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${st(e,n,o,r)}px`,bottom:t.availableSpaceBelowTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"left":return{left:t.availableSpaceToTheLeftSideOfTheTrigger-e.width-t.contentWidth-t.horizontalOffset+"px",top:`${ct(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${ct(0,t)}px`}}}function st(t,e,n,o){let r=n?t.x+t.width/2-e.width/2:t.x;return r<0&&(r=0),r+e.width>i.width(o)&&(r-=r+e.width-i.width(o)),r}function ct(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}function dt(t,e){return t.startsWith("transparent")||t.startsWith("none")||!t.startsWith("rgb")||1!==(n=t.slice(0,t.match(/\)/).index+1),Y(n).alpha())?Q(e,G)>Q(e,K)?G:K:t;var n}function ut(t){const e=Q(t,G),n=Q(t,K);let o,r;if(e>n)for(o=G,r=e;r>5;)o=z(o,.1),r=Q(t,o);else for(o="rgb(10, 10, 10)",r=n;r>5;)o=q(o,.1),r=Q(t,o);return $(o,.2)}const pt="cl-tooltip-text-styles",ht=`\n .cl-tooltip-text {\n z-index: ${Number.MAX_SAFE_INTEGER};\n width: max-content;\n height: fit-content;\n visibility: hidden;\n background-color: white;\n color: #000;\n border: 1px solid rgb(194, 194, 194);\n border-radius: 5px;\n padding: 5px 10px;\n position: fixed;\n max-width: 300px;\n max-height: 100vh;\n box-shadow: 0 1px 5px rgba(0,0,0,.28);\n font-size: 14px;\n }\n\n .cl-tooltip-text[cl-tooltip-position='top']:before {\n content: "";\n position: absolute;\n top: 100%;\n left: calc(50% - 13px);\n border-width: 12px;\n border-style: solid;\n border-color: rgb(194, 194, 194) transparent transparent transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='top']:after {\n content: "";\n position: absolute;\n top: 100%;\n left: calc(50% - 5px);\n margin-left: -8px;\n margin-top: -2px;\n border-width: 12px;\n border-style: solid;\n border-color: white transparent transparent transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='bottom']:before {\n content: "";\n position: absolute;\n top: -24px;\n left: calc(50% - 9px);\n border-width: 12px;\n border-style: solid;\n border-color: transparent transparent rgb(194, 194, 194) transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='bottom']:after {\n content: "";\n position: absolute;\n top: -22px;\n left: calc(50% - 4px);\n margin-left: -5px;\n margin-bottom: -2px;\n border-width: 12px;\n border-style: solid;\n border-color: transparent transparent white transparent;\n }\n`;function Et(t,e,n,o){o=o||document;let r=null;t&&(t.classList.add("invalid"),t.setAttribute("aria-invalid","true")),e&&(e.style.visibility="visible"),e&&(e.onmouseenter=()=>{(function(t){if((t=t||document).head.querySelector(`#${pt}`))return;const e=document.createElement("style");e.setAttribute("id",pt),Z({element:e,html:ht}),t.head.appendChild(e)})(o),r=function(t){const e="cl-overlay-tooltip-text",n=document.getElementById(e)||document.createElement("div");return n.classList.add("cl-tooltip-text"),n.textContent!==t&&(n.textContent=t,n.style=null),n.id||(n.id=e),n}(n),o.body.append(r),r.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:n,offset:o=10,htmlDocumentObject:r}=t,i=it(e,n,o,"top",!0,r);n.setAttribute("cl-tooltip-position",i.position),J(n,i.coordinates)}({triggerElement:e,tooltipElement:r,htmlDocumentObject:o})},e.onmouseleave=()=>{r&&(r.remove(),function(t){const e=(t=t||document).head.querySelector(`#${pt}`);e&&e.remove()}(o))})}function mt(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}function vt(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=gt(t);return e[n]?{translations:e[n],language:n}:null}(n,t);return o||null}),null)}function gt(t){return t.includes("-")?t.split("-")[0].toLowerCase():t.includes("_")?t.split("_")[0].toLowerCase():t}function bt(t,e,n){const o=vt(e,mt(t));if(!o)return n;const r=o.translations,i=Object.keys(r).find((t=>t.includes(n)));return i?r[i]:n}const ft="VIEW",yt="MODULE",Tt="CONTAINER",Rt="INPUT",Ot="BUTTON",_t="CONSENT",At="COLUMN";var It,St;(St=It||(It={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",St.REQUEST="REQUEST",St.DISPATCH_EVENT="DISPATCH_EVENT",St.GO_TO_VIEW="GO_TO_VIEW",St.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",St.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",St.SHOW_WIDGET="SHOW_WIDGET",St.OPEN_LINK="OPEN_LINK",St.CLOSE_WIDGET="CLOSE_WIDGET",St.CLICK="CLICK";const Dt=It;var Ct,Lt;class Nt{static sortActions(t){const e={[Dt.CLOSE_WIDGET]:-1,[Dt.OPEN_LINK]:-2,[Dt.SHOW_WIDGET]:1,[Dt.SUBSCRIBE_CONTACT]:2,[Dt.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=Nt.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(Nt.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 r,i=!0,a=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,r){!function(t,e,n,o){Promise.resolve(o).then((function(e){t({value:e,done:n})}),e)}(o,r,(e=t[n](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(r=await a.next()).done);i=!0){o=r.value,i=!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{i||t||!(n=a.return)||await n.call(a)}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=[])}}Nt.IGNORING_VIEW_ENTRY_TYPES=[Ot,_t,Rt],(Lt=Ct||(Ct={})).CLICK="CLICK",Lt.COMPONENT_EVENT="COMPONENT_EVENT";class wt{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 xt{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 Ct.CLICK:return new Nt(t,e);case Ct.COMPONENT_EVENT:return new wt(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class Pt{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 Mt{constructor(){this.listeners=Mt.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=Pt.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=Mt.createDefaultListenersState()}}Mt.createDefaultListenersState=()=>({"*":{}});const kt=Mt,Vt=(t,e,n,o)=>{const r=EventTarget.prototype,{addEventListenerBase:i,addEventListener:a}=r;(i||a).call(t,e,n,o)};class jt{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class Ut{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===yt?Object.assign(Object.assign({},t),Ut.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 Bt,Ft,Xt,Wt,Ht,Yt,Gt,Kt,$t,qt,zt,Qt,Zt;Ut.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(Ft=Bt||(Bt={})).VIEW="VIEW",Ft.CONTAINER="CONTAINER",Ft.TEXT="TEXT",Ft.INPUT="INPUT",Ft.BUTTON="BUTTON",Ft.IMAGE="IMAGE",Ft.CONSENT="CONSENT",Ft.COUNTDOWN_TIMER="COUNTDOWN_TIMER",Ft.PROMO_CODE="PROMO_CODE",Ft.MULTIPLE_INPUT="MULTIPLE_INPUT",Ft.VIDEO="VIDEO",Ft.SLIDER="SLIDER",Ft.SLIDE="SLIDE",Ft.SOCIAL="SOCIAL",Ft.COLUMNS="COLUMNS",Ft.COLUMN="COLUMN",Ft.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(Xt||(Xt={})).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"}(Wt||(Wt={})),function(t){t.SELF="_self",t.BLANK="_blank"}(Ht||(Ht={})),(Yt||(Yt={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(Gt||(Gt={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(Kt||(Kt={})),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"}($t||($t={})),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"}(qt||(qt={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(zt||(zt={})),(Zt=Qt||(Qt={})).BEFORE="BEFORE",Zt.AFTER="AFTER",Zt.INSIDE="INSIDE",Zt.INSTEAD="INSTEAD";class Jt extends kt{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(Jt.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(Jt.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(Jt.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}Jt.changeEventName="CHANGE";const te=Jt;class ee{static set(t,e){const n=t[ee.accumulatorPropertyName]||{};t[ee.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[ee.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}ee.accumulatorPropertyName="clStyleAttributes";const ne=ee;var oe;!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"}(oe||(oe={}));class re{static applyHostStyles(t,e,n=null,o){var r,i,a;const l=null===(i=null===(r=null==n?void 0:n.props)||void 0===r?void 0:r.handlers)||void 0===i?void 0:i.find((t=>"CLICK"===t.type));l&&(null===(a=l.actions)||void 0===a?void 0:a.length)&&(e.style.cursor="pointer"),t!==ft&&t!==Tt&&t!==At||(e.style.display=o===oe.CONTENT_LOCKER&&t===ft?"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 ie{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class ae{constructor(t,e,n,o,r,i){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=r,this.httpClient=i,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,r,i,a,l;const s=null===(r=null===(o=e.adaptiveStyles)||void 0===o?void 0:o[t])||void 0===r?void 0:r.find((t=>t.element===n)),c=(null===(i=e.styles)||void 0===i?void 0:i.find((t=>t.element===n)))||{},d=(null===(a=null==c?void 0:c.styleAttributes)||void 0===a?void 0:a.background)||(null===(l=null==s?void 0:s.styleAttributes)||void 0===l?void 0:l.background),u=this.parseBackground(d);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),ie.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 r;o=o.replace(`var(--${r=n,`cl-schema-${r}`})`,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 le=new class{execute(t,e="GET",n=null,o,r){const i={method:e,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:r};return n&&(i.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,i)}};function se(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class ce{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 de{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 ue;!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.SUBMIT_REQUEST_STARTED="SUBMIT_REQUEST_STARTED",t.SUBMIT_REQUEST_FINISHED="SUBMIT_REQUEST_FINISHED",t.PROMO_CODE_SHOWN="PROMO_CODE_SHOWN"}(ue||(ue={}));const pe=ue;class he{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(pe.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(pe.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 de(this.onCounterStateUpdate)}}}const Ee=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>Ee(...t)}},me=Ee,ve="props",ge="shared",be="environment";function fe(t,e,n,o){const r=t=>{let i=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return i&&(o&&"function"==typeof o?o(i.getAttribute(e)):(null===(a=null==i?void 0:i.getAttribute)||void 0===a?void 0:a.call(i,e))===n)?i:i&&i.parentNode&&r(i.parentNode)||null;var a};return r(t)}const ye="SUBMIT";function Te(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}const Re={DESKTOP:"desktop",MOBILE:"mobile"};function Oe(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 _e(t=[]){return t.map((t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)})))}function Ae(t,e,o){var r;let i="rgb(0, 0, 0)";const a=t.adaptiveStyles[e].find((t=>"input"===t.element));if(!a)return i;if(a.placeholderStyleAttributes&&a.placeholderStyleAttributes.color)return a.placeholderStyleAttributes.color;const l=(a.classes||"").split(" ").filter((t=>t.startsWith(n)));if(!l.length)return i;let s=null===(r=o.textClasses)||void 0===r?void 0:r[l[0]];return s&&s.placeholderStyleAttributes&&s.placeholderStyleAttributes.color?s.placeholderStyleAttributes.color:i}class Ie extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}var Se;!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(Se||(Se={}));class De extends HTMLElement{constructor(){var t;super(),this.skipGameBlur=!0,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 a=new Ie("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(r("path")),id:e,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(a),t=a.detail.props,Object.assign(this,t),this.observers=me(ve,ge,be),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 jt({}),this.componentEventEmitter=new kt,this.componentResourceManager=new he(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new xt(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(ve).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(ge).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new ae(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),le),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(te.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(be).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")===Se.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===Se.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(ve).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(ge).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(be).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,r=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(Te(n,t),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(Te(n,t),r=!0)})),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!r&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e),i=r("type"),a="element-styles";let l=this.getRootElement().querySelector(`style[${i}="${a}"]`);l||(l=document.createElement("style"),l.setAttribute(i,a),this.getRootElement().appendChild(l)),Z({element:l,html:""}),n.forEach((t=>{let e=t.getAttribute(r("element"));const n=this.getEnvironment();let i=Oe(o,n,e);if(i){if(this.resizeListener.isMobile()){const t=Oe(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),l)}})),this._addLinkColor(l,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 a=[];"host"===(e=De._resolveTogglableStylesForElementModel(e)).element&&(re.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()),a.push("background")));let l=e.styleAttributes.background,s=l&&l.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&s){this.componentResourceManager.getPending().increment();const t=new Image;t.src=s[1],Vt(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),Vt(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:se(e.styleAttributes,a)});if(ne.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(),r=`flip-up-animation-${e.element}`;let i=this.getRootElement().querySelector(`#${r}`);i||(i=document.createElement("style"),i.id=r,t.appendChild(i)),Z({element:i,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 o=t;return(o.classes||"").split(" ").filter((t=>t.startsWith(n))).forEach((t=>{var n;let r=null===(n=e.textClasses)||void 0===n?void 0:n[t];r&&(r.styleAttributes.fontFamily||(r.isHeader&&e.headerFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:e.headerFontFamily})})),!r.isHeader&&e.textFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:e.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),r.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),r.placeholderStyleAttributes)}))})),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:e.textFontFamily})})),o}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",i)=>{const a=Object.keys(n).reduce(((t,e)=>t+` ${ce.camelCaseToDashCase(e)}: ${n[e]}${i?" !important;":";"}`),"");Z({element:t,html:`[${r("element")}="${e}"]${o} { ${a} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{Z({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,r,i;e.linkColor&&Z({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)&&Z({element:t,html:`a {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(r=e.linkParams)||void 0===r?void 0:r.color}}`,appendHtml:!0}),(null===(i=e.linkParams)||void 0===i?void 0:i.removeUnderline)&&Z({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!==o("hovered")&&t!==o("focused"))).forEach((e=>{e.startsWith(n)&&t.classList.remove(e)}));const r=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",r)},this.getParentComponent=()=>fe(this.parentNode,r("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(r("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:fe(this.parentNode,r("path"),void 0,(t=>1===(null==t?void 0:t.split(",").length)))},this.getWidgetLanguages=()=>mt(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>vt(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,r,i,a;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===(r=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===r?void 0:r.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(i=t.content)||void 0===i?void 0:i.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(a=t.control)||void 0===a?void 0:a.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===ye));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:Dt.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()}}De._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=De._resolveTogglableStyles(e[t]))})),e},De._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 Ce=De,Le=Symbol("required");var Ne=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n};function we(){}const xe="pending",Pe="valid",Me="invalid";class ke extends Ce{constructor(){super(...arguments),this._createControl=(t={},...e)=>{const{element:n}=t,o=Ne(t,["element"]),r=this.getProps(),i=this.getModel(),a=Object.assign(Object.assign(Object.assign({},r.control),{componentId:i.id,viewIdx:i.path[0]}),o),l=this.services.form,s=[a,n,...e];return l.hasControl(r.control.name)?l.updateControl(...s):l.registerControl(...s)},this.createControlWithValidation=(t=[],e={})=>{const{element:n=this.getElement("input"),tooltipElement:o=this.getRootElement().querySelector(".input-tooltip"),validCallback:r=we,invalidCallback:i=we,pendingCallback:a=we,elementToListen:l=n,validationMap:s={},listenStatusChange:c=!0}=e,d=Ne(e,["element","tooltipElement","validCallback","invalidCallback","pendingCallback","elementToListen","validationMap","listenStatusChange"]);if(o&&(o.style.visibility="hidden"),!t||!Array.isArray(t))throw new Error("Validators should be an array");const u=this.getProps().control.validation,p=(null==u?void 0:u.validator)?s[u.validator]:void 0,h=t.some((t=>t[Le])),E=!!(null==u?void 0:u.required),m=E||h,v=[...t];E&&!h&&v.unshift(function(t="REQUIRED"){const e=e=>{let n;switch(typeof e){case"string":n=e&&e.length>0;break;case"boolean":n=e;break;case"number":n=!isNaN(e);break;default:n=!!e}return{isValid:n,errorKey:n?null:t}};return e[Le]=!0,e}()),p&&v.push(p);const g=this._prepareAsyncValidators(v),b=this._createControl({element:n,validation:{validator:"custom",required:m}},void 0,g);return c&&this._handleControlStatusChange(Object.assign({control:b,element:l,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:r,invalidCallback:i,pendingCallback:a},d)),b},this._prepareAsyncValidators=(t=[])=>t.reduce(((t,e,n)=>"function"!=typeof e?(console.warn(`Validator ${n} should be a function, so it will be skipped`),t):(t[`custom_${n}`]=async(...t)=>{const n=await Promise.resolve(e(...t));return"object"==typeof n&&"isValid"in n?Object.assign(Object.assign({},n),{errorKey:n.isValid?null:n.errorKey}):{isValid:!1,errorKey:"INVALID_VALIDATOR_RESPONSE"}},t)),{}),this._handleControlStatusChange=n=>{n.control.on(t,(t=>{this._handleValidationStatus(n,t)})),n.control.on(e,(()=>{let t=xe;switch(!0){case n.control.pending:t=xe;break;case n.control.valid:t=Pe;break;default:t=Me}this._handleValidationStatus(n,t)}))},this._handleValidationStatus=(t,e)=>{const{control:n,element:o,tooltipElement:r,validCallback:i,invalidCallback:a,errorMessageMapper:l,pendingCallback:s}=t,c=this.services.config,d=this.manifest.i18n;switch(e){case Pe:(function(t,e){t&&(t.classList.remove("invalid"),t.setAttribute("aria-invalid","false")),e&&(e.style.visibility="hidden")})(o,r),i&&i();break;case Me:if(n.touched){const t=n.getErrorKeys();if(!t)break;const e=t[0];let i=bt(c,d,e);l&&(i=l(e,i)),Et(o,r,i,this.htmlDocumentObject),a&&a()}break;case xe:n.touched&&(function(t,e){e&&(e.style.visibility="hidden"),t&&t.classList.contains("invalid")&&(t.classList.remove("invalid"),t.removeAttribute("aria-invalid"))}(o,r),s&&s())}}}}function Ve(t){return Object.values(Re).map((e=>({type:"GROUP",propPath:["adaptiveStyles",e],children:t})))}const je={name:"SysDateComponent",componentType:"INPUT",version:"1.0.0",mappingTypes:["DATE"],contextMenuModel:Ve([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),floatingControlsModel:Ve([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"input",params:{width:{getValueFromElement:"host"},height:{getValueFromElement:"host"}}},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:Ve([{type:"CONTROL",name:"SIZE",element:"input",elementProp:"styleAttributes",params:{width:{options:["fixed","fill"]},height:{options:["fixed","fill"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"input",showPlaceholderControl:!0},{element:"label"}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"INPUT_LABEL",propPath:["styles","[element=label]","params"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"input",params:{indentationType:"PADDING",horizontalOnly:!0}},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]),general:[{type:"CONTROL",name:"DATE_FORMAT",propPath:["content","askYear"],displayCondition:function(t){return!t.editorConfig.useContactFields}},{type:"CONTROL",name:"INTEGRATION_FIELD_MAPPING",params:{integrationNamePropPath:["control","integrationName"],groupNamePropPath:["control","groupName"],fieldNamePropPath:["control","fieldName"],fieldTypePropPath:["control","fieldType"],validationPropPath:["control","validation"],placeholderPropPath:["content","placeholder"],labelPropPath:["content","label"],optionsPropPath:["control","options"]}},{type:"CONTROL",name:"INPUT_VALIDATION",params:{validationPropPath:["control","validation"],fieldTypePropPath:["control","fieldType"],required:!0}}]},autoContrast:[{slave:{element:"input",elementProp:"styleAttributes",elementSubProp:"color"},master:{element:"input",propPath:["styles","[element=input]","styleAttributes","background"]},enabledPropPath:["content","textContrastEnabled"]},{slave:{element:"input",elementProp:"placeholderStyleAttributes",elementSubProp:"color",dimmed:!0},master:{element:"input",propPath:["styles","[element=input]","styleAttributes","background"]},enabledPropPath:["content","placeholderTextContrastEnabled"]}],focusableElements:["input","label"],events:{dispatch:[],listen:[]},i18nPropPaths:["content,label"],i18n:{en:{"control,validation,validationErrors,REQUIRED":"Required field","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Only integers, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Only integers, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Invalid date","content,label":"Title"},ru:{"control,validation,validationErrors,REQUIRED":"Обязательное поле","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Только целые числа, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Только целые числа, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Недействительная дата","content,label":"Заголовок"},uk:{"control,validation,validationErrors,REQUIRED":"Обов'язкове поле","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Тільки цілі числа, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Тільки цілі числа, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Недійсна дата","content,label":"Заголовок"},es:{"control,validation,validationErrors,REQUIRED":"Campo obligatorio","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Solo enteros, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Solo enteros, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Fecha invalida","content,label":"Título"},de:{"control,validation,validationErrors,REQUIRED":"Pflichtfeld","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Nur ganze Zahlen, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Nur ganze Zahlen, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Ungültiges Datum","content,label":"Titel"},fr:{"control,validation,validationErrors,REQUIRED":"Champs requis","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Seuls les entiers, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Seuls les entiers, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Date invalide","content,label":"Titre"},it:{"control,validation,validationErrors,REQUIRED":"Campo obbligatorio","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Solo numeri interi, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Solo numeri interi, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Data non valida","content,label":"Titolo"},pt:{"control,validation,validationErrors,REQUIRED":"Campo obrigatório","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Apenas integrais, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Apenas integrais, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Data inválida","content,label":"Título"},ro:{"control,validation,validationErrors,REQUIRED":"Câmp obligatoriu","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Numai numere întregi, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Numai numere întregi, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Data nevalidă","content,label":"Titlu"},bg:{"control,validation,validationErrors,REQUIRED":"Изисквано поле","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Само цели числа, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Само цели числа, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Невалидна дата","content,label":"Заглавие"},cs:{"control,validation,validationErrors,REQUIRED":"Vyžadované pole","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Jen celá čísla, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Jen celá čísla, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Neplatné datum","content,label":"Titul"},el:{"control,validation,validationErrors,REQUIRED":"Απαιτητό πεδίο","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Μόνο ακέραιοι αριθμοί, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Μόνο ακέραιοι αριθμοί, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Άκυρη ημερομηνία","content,label":"Τίτλος"},nl:{"control,validation,validationErrors,REQUIRED":"Verplicht veld","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Alleen gehele getallen, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Alleen gehele getallen, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Ongeldige datum","content,label":"Titel"},pl:{"control,validation,validationErrors,REQUIRED":"Wymagane pole","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Tylko liczby całkowite, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Tylko liczby całkowite, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Nieprawidłowa data","content,label":"Tytuł"},sv:{"control,validation,validationErrors,REQUIRED":"Obligatoriskt fält","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Endast heltal, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Endast heltal, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Ogiltigt datum","content,label":"Tytuł"},tr:{"control,validation,validationErrors,REQUIRED":"Gerekli alan","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Yalnızca tam sayılar, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Yalnızca tam sayılar, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Geçersiz tarih","content,label":"Başlık"},ar:{"control,validation,validationErrors,REQUIRED":"الحقل المطلوب","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":'"الأعداد الصحيحة فقط, 1 - 31',"control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":'"الأعداد الصحيحة فقط, 0 - 3000',"control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"تاريخ غير صالح","content,label":"عنوان"},zh:{"control,validation,validationErrors,REQUIRED":"必填字段","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"仅限整数, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"仅限整数, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"无效日期","content,label":"Title"},da:{"control,validation,validationErrors,REQUIRED":"Påkrævet felt","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Kun heltal, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Kun heltal, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Ugyldig dato","content,label":"Titel"},he:{"control,validation,validationErrors,REQUIRED":"שדה נדרש","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"רק מספרים שלמים ,1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"רק מספרים שלמים ,0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"תאריך לא תקין","content,label":"Title"},fi:{"control,validation,validationErrors,REQUIRED":"Vaadittu kenttä","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Vain kokonaisluvut, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Vain kokonaisluvut, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Virheellinen päivämäärä","content,label":"Title"},hi:{"control,validation,validationErrors,REQUIRED":"आवश्यक फील्ड","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"केवल पूर्णांक, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"केवल पूर्णांक, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"अमान्य तारीख़","content,label":"Title"},hr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Samo cijeli brojevi, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Samo cijeli brojevi, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Nevažeći datum","content,label":"Title"},hu:{"control,validation,validationErrors,REQUIRED":"Kötelező mező","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Csak egész számok, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Csak egész számok, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Érvénytelen dátum","content,label":"Title"},id:{"control,validation,validationErrors,REQUIRED":"Bidang yang wajib diisi","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Hanya bilangan bulat, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Hanya bilangan bulat, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Tanggal tidak valid","content,label":"Title"},ja:{"control,validation,validationErrors,REQUIRED":"必須フィールド","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"整数のみ, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"整数のみ, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"日付が無効です","content,label":"Title"},ko:{"control,validation,validationErrors,REQUIRED":"필수 칸","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"정수만, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"정수만, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"유효하지 않은 날짜","content,label":"Title"},no:{"control,validation,validationErrors,REQUIRED":"Obligatorisk felt","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Bare heltall, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Bare heltall, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Ugyldig dato","content,label":"Title"},sk:{"control,validation,validationErrors,REQUIRED":"Povinné pole","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Iba celé čísla, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Iba celé čísla, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Neplatný dátum","content,label":"Title"},sl:{"control,validation,validationErrors,REQUIRED":"Obvezno polje","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Samo cela števila, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Samo cela števila, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Neveljaven datum","content,label":"Title"},sr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","control,validation,validationErrors,DAY_INVALID_ERROR_TEXT":"Samo celi brojevi, 1 - 31","control,validation,validationErrors,YEAR_INVALID_ERROR_TEXT":"Samo celi brojevi, 0 - 3000","control,validation,validationErrors,DATE_INVALID_ERROR_TEXT":"Nevažeći datum","content,label":"Title"}},props:{content:{label:"Title",askYear:!0,textContrastEnabled:!0,placeholderTextContrastEnabled:!0},control:{name:"date",integrationName:"date",defaultValue:null,validation:{required:!0,validator:"SYS_DATE"}},styles:[{element:"input",styleAttributes:{background:"rgb(255, 255, 255)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"1px",borderTopColor:"rgba(0, 0, 0, 0.1)",borderBottomWidth:"1px",borderBottomColor:"rgba(0, 0, 0, 0.1)",borderLeftWidth:"1px",borderLeftColor:"rgba(0, 0, 0, 0.1)",borderRightWidth:"1px",borderRightColor:"rgba(0, 0, 0, 0.1)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"}},{element:"label",params:{enabled:!1,position:"TOP",margin:5}}],adaptiveStyles:(Ue=[{element:"host",styleAttributes:{marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"input",styleAttributes:{width:"100%",minWidth:null,height:"35px",minHeight:"35px",color:"var(--cl-schema-text, rgb(0, 0, 0))",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none"},placeholderStyleAttributes:{color:"rgb(81, 81, 81)"},classes:""},{element:"label",styleAttributes:{color:"var(--cl-schema-text, rgb(0, 0, 0))",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none"},classes:""}],Object.values(Re).reduce(((t,e)=>Object.assign(t,{[e]:_e(Ue)})),{desktop:[],mobile:[]}))},metaDescription:{icon:"/SysDateComponent/assets/img/component-icon.svg",label:{en:"Date",ru:"Дата",uk:"Дата",es:"Fecha",fr:"Date",de:"Datum",it:"Data",pt:"Data",ro:"Data",bg:"Дата",cs:"Datum",el:"Ημερομηνία",nl:"Datum",pl:"Data",sv:"Datum",tr:"Tarih",ar:"التاريخ",zh:"日期",da:"Dato",he:"תאריך",fi:"Päivämäärä",hi:"तारीख़ ",hr:"Datum",hu:"Dátum",id:"Tanggal",ja:"日付",ko:"날짜",no:"Dato",sk:"Dátum",sl:"Datum",sr:"Datum"}},syncEnabled:!0,stylesImitationEnabled:!0,showIntegrationFieldMappingPropertyPaneOnInsert:!0};var Ue;function Be(t){return Be="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},Be(t)}function Fe(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,He(o.key),o)}}function Xe(t,e,n){return e&&Fe(t.prototype,e),n&&Fe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function We(t,e,n){return(e=He(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function He(t){var e=function(t){if("object"!=Be(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Be(e)?e:e+""}var Ye=Xe((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}));function Ge(t){return Ge="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},Ge(t)}function Ke(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,$e(o.key),o)}}function $e(t){var e=function(t){if("object"!=Ge(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ge(e)?e:e+""}We(Ye,"validationErrorKeys",{REQUIRED:"REQUIRED",DAY_INVALID_ERROR_TEXT:"DAY_INVALID_ERROR_TEXT",YEAR_INVALID_ERROR_TEXT:"YEAR_INVALID_ERROR_TEXT",DATE_INVALID_ERROR_TEXT:"DATE_INVALID_ERROR_TEXT"}),We(Ye,"DAY_PLACEHOLDER",{en:"Day",ru:"День",uk:"День",es:"Día",de:"Tag",fr:"Jour",it:"Giorno",pt:"Dia",ro:"Gün",bg:"Ден",cs:"Den",el:"Ημέρα",nl:"Dag",pl:"Dzień",sv:"Dag",tr:"Gün",ar:"اليوم"}),We(Ye,"MONTH_DROPDOWN_PLACEHOLDER",{en:"Month",ru:"Месяц",uk:"Мicяць",es:"Mes",de:"Monat",fr:"Mois",it:"Mese",pt:"Mês",ro:"Ay",bg:"Месец",cs:"Měsíc",el:"Μήνας",nl:"Maand",pl:"Miesiąc",sv:"Månad",tr:"Ay",ar:"الشهر"}),We(Ye,"YEAR_PLACEHOLDER",{en:"Year",ru:"Год",uk:"Рiк",es:"Año",de:"Jahr",fr:"Année",it:"Anno",pt:"Ano",ro:"Yıl",bg:"Година",cs:"Rok",el:"Έτος",nl:"Jaar",pl:"Rok",sv:"År",tr:"Yıl",ar:"السنة"});var qe=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return function(t,e,n){return n&&Ke(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,0,[{key:"getDatePartsOrder",value:function(t){return new Intl.DateTimeFormat(t).formatToParts().filter((function(t){return["year","month","day"].includes(t.type)})).map((function(t){return t.type}))}},{key:"convertMonthToNumeric",value:function(e,n){return t.getAllMonthsByLanguage("short",n).findIndex((function(t){return t===e}))+1}},{key:"convertNumericToMonth",value:function(e,n){return t.getAllMonthsByLanguage("short",n)[e-1]}},{key:"getAllMonthsByLanguage",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"short",e=gt(arguments.length>1?arguments[1]:void 0);return new Array(12).fill(0).map((function(n,o){return new Date(2e3,o,1).toLocaleDateString(e,{month:t})})).map((function(t){return t.charAt(0).toUpperCase()+t.slice(1)}))}},{key:"convertDashedStringDateIntoDate",value:function(t){var e=+t.split("-")[2],n=+t.split("-")[1],o=+t.split("-")[0];return new Date(new Date(2e3,n-1,e).setFullYear(o))}},{key:"convertToDoubleDigit",value:function(t){return t?+t<10?"0".concat(t):t:"00"}},{key:"normalizeYearInput",value:function(t){return"0"===t?"0000":t?"".concat(+t).padStart(4,"0"):""}}])}();function ze(t){const{element:e,html:n,appendHtml:o}=t,r=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+=r:e.innerHTML=r}function Qe(t){return Qe="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},Qe(t)}function Ze(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 Je(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ze(Object(n),!0).forEach((function(e){un(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function tn(t){return function(t){if(Array.isArray(t))return on(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||nn(t)||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.")}()}function en(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,r,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(o=i.call(n)).done)&&(l.push(o.value),l.length!==e);s=!0);}catch(t){c=!0,r=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return l}}(t,e)||nn(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nn(t,e){if(t){if("string"==typeof t)return on(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)?on(t,e):void 0}}function on(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 rn(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,pn(o.key),o)}}function an(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(an=function(){return!!t})()}function ln(t,e,n,o){var r=sn(cn(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof r?function(t){return r.apply(n,t)}:r}function sn(){return sn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=cn(t)););return t}(t,e);if(o){var r=Object.getOwnPropertyDescriptor(o,e);return r.get?r.get.call(arguments.length<3?t:n):r.value}},sn.apply(null,arguments)}function cn(t){return cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},cn(t)}function dn(t,e){return dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},dn(t,e)}function un(t,e,n){return(e=pn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pn(t){var e=function(t){if("object"!=Qe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qe(e)?e:e+""}var hn=function(){function e(){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),un(n=function(t,e,n){return e=cn(e),function(t,e){if(e&&("object"==Qe(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,an()?Reflect.construct(e,n||[],cn(t).constructor):e.apply(t,n))}(this,e),"setControlsOrder",(function(t){var e=n.getPreferredWidgetLanguage(),o=qe.getDatePartsOrder(e),r=n.getControlElementNodes(t),i=r.dayInputContainerElement,a=r.monthInputContainerElement,l=r.yearInputContainerElement,s=[];s[o.indexOf("day")]=i,s[o.indexOf("month")]=a,s[o.indexOf("year")]=l;var c=n.getRootElement().querySelector(".controls-container");ze({element:c,html:""}),s.forEach((function(t){return c.appendChild(t)}))})),un(n,"setControlValueProxy",(function(t,e){var o=n.getDateValueAsString();if(o||t)return n.getProps().content.askYear||(o="-".concat(o)),n.registeredControl.setValue(t||o,e)})),un(n,"dateValidation",(function(){var t=n.getRootElement(),e=qe.convertDashedStringDateIntoDate(n.getDateValueAsString()),o=n.getDateValueAsString(),r=n.getControlElementNodes(t),i=r.dayInputElement,a=r.yearInputElement,l=i.value,s=+i.value,c=+o.split("-")[1],d=a.value,u=+a.value;return+l<0||isNaN(s)||"0"===l||s&&(s>31||s<1)?{isValid:!1,errorKey:n.validationErrorKeys.DAY_INVALID_ERROR_TEXT}:+d<0||isNaN(u)||u>3e3||u<0?{isValid:!1,errorKey:n.validationErrorKeys.YEAR_INVALID_ERROR_TEXT}:s&&c&&(isNaN(e.getTime())||!n.isCurrentDateExist())?{isValid:!1,errorKey:n.validationErrorKeys.DATE_INVALID_ERROR_TEXT}:!s&&!isNaN(s)||!c||n.getProps().content.askYear&&!d?{isValid:!1,errorKey:n.validationErrorKeys.REQUIRED}:{isValid:!0}})),un(n,"isCurrentDateExist",(function(){var t=n.getDateValueAsString(),e=+t.split("-")[2],o=+t.split("-")[1],r=+t.split("-")[0],i=qe.convertDashedStringDateIntoDate(t);return i.getDate()===e&&i.getMonth()+1===o&&i.getFullYear()===r})),un(n,"getDateValueAsString",(function(){var t=n.getRootElement(),e=t.querySelector("#cl-day-input").value,o=t.querySelector("#cl-month-dropdown").innerText,r=t.querySelector("#cl-year-input").value;n.isMonthUnselected(o)&&(o=null),+e<0&&(e=""),+r<0&&(r="");var i=n.getPreferredWidgetLanguage(),a=qe.convertToDoubleDigit(qe.convertMonthToNumeric(o,i));return"".concat(qe.normalizeYearInput(r),"-").concat(a,"-").concat(qe.convertToDoubleDigit("".concat(+e)))})),un(n,"setStringDateValue",(function(t){var e=en(t.split("-"),3),o=e[0],r=e[1],i=e[2],a=n.getPreferredWidgetLanguage(),l=n.getRootElement();l.querySelector("#cl-day-input").value=i,l.querySelector("#cl-month-dropdown").innerText=qe.convertNumericToMonth(r,a),l.querySelector("#cl-year-input").value=+o,n.registeredControl.setValue(t)})),un(n,"getOptions",(function(){var t={};return qe.getAllMonthsByLanguage("short",n.getPreferredWidgetLanguage()).forEach((function(e,n){return t["month-".concat(n+1)]={label:e,id:n}})),t})),un(n,"createDropdownButtonMenuComponent",(function(t,e,n,o){var r=document.createElement("div");r.classList.add("option-wrapper"),e&&r.classList.add("option-selected"),r.setAttribute("role","option"),r.setAttribute("tabindex",e?"0":"-1"),r.setAttribute("aria-selected",e?"true":"false");var i=document.createElement("span");return i.textContent=t.label,J(i,n),r.style.setProperty("--option-selected-background",ut(o)),r.appendChild(i),r})),un(n,"focusMonthOption",(function(t,e){t&&e&&(tn(e.children).forEach((function(e){e.setAttribute("tabindex",e===t?"0":"-1"),e.classList.toggle("option-active",e===t),e.classList.toggle("option-selected",e===t&&"true"===e.getAttribute("aria-selected"))})),t.focus())})),un(n,"focusSelectedMonthAfterOverlayOpen",(function(){var t,e=null===(t=n.overlayBackdrop)||void 0===t?void 0:t.querySelector('[role="listbox"]'),o=e?tn(e.querySelectorAll(".option-wrapper")):[];if(o.length){var r=o.find((function(t){return"true"===t.getAttribute("aria-selected")}));n.focusMonthOption(r||o[0],e)}})),un(n,"restoreFocusToMonthTrigger",(function(t){t&&setTimeout((function(){t.focus()}),0)})),un(n,"armEscapeKeyupGuard",(function(){n.removeEscapeKeyupGuard(),n.boundEscapeKeyupGuard=function(t){var e,o;"Escape"===t.key&&(null===(e=t.preventDefault)||void 0===e||e.call(t),null===(o=t.stopImmediatePropagation)||void 0===o||o.call(t),n.removeEscapeKeyupGuard())},window.addEventListener("keyup",n.boundEscapeKeyupGuard,!0)})),un(n,"removeEscapeKeyupGuard",(function(){n.boundEscapeKeyupGuard&&(window.removeEventListener("keyup",n.boundEscapeKeyupGuard,!0),n.boundEscapeKeyupGuard=null)})),un(n,"handleMonthOptionKeydown",(function(t,e,o,r,i){var a,l=tn(o.children),s=l.indexOf(e);return"Enter"===t.key||" "===t.key?(t.preventDefault(),void r()):"Escape"===t.key?(t.preventDefault(),null===(a=t.stopPropagation)||void 0===a||a.call(t),n.armEscapeKeyupGuard(),void(null==i||i())):"ArrowDown"===t.key?(t.preventDefault(),void n.focusMonthOption(l[s+1]||l[0],o)):void("ArrowUp"===t.key&&(t.preventDefault(),n.focusMonthOption(l[s-1]||l[l.length-1],o)))})),un(n,"getCurrentSelectedMonthValue",(function(){var t=n.getRootElement().querySelector("#cl-month-dropdown").innerText;return n.isMonthUnselected(t)?null:qe.convertMonthToNumeric(t,n.getPreferredWidgetLanguage())})),un(n,"isMonthUnselected",(function(t){return t===n.getTranslationsMap(n.MONTH_DROPDOWN_PLACEHOLDER).translations})),un(n,"createOverlayContent",(function(t,e){var o=n.services.form.getControl(n.getProps().control.name),r=n.getRootElement().querySelector("#cl-month-dropdown"),i=tt(r,n.dropdownMenuOptionLabelStyles),a=tt(r,n.overlayContentStyles);a.background=dt(a.background,i.color);var l=function(t,e){return Math.min(Math.floor(parseInt(String(t))/2),parseInt(e.borderTopLeftRadius),parseInt(e.borderTopRightRadius),parseInt(e.borderBottomLeftRadius),parseInt(e.borderBottomRightRadius))}(tt(r,["height"]).height,a);J(e,Je(Je({},a),{},{"border-top-left-radius":"".concat(l,"px"),"border-top-right-radius":"".concat(l,"px"),"border-bottom-left-radius":"".concat(l,"px"),"border-bottom-right-radius":"".concat(l,"px")}));var s,c=n.getCurrentSelectedMonthValue(),d=n.getOptions(),u=document.createElement("div");u.setAttribute("role","listbox");var p=function(e){r.textContent=e.label,t.click(),n.setControlValueProxy(),o.emit("RUN_SINGLE_ELEMENT_VALIDATION",r)};Object.entries(d).forEach((function(e){var o=en(e,1)[0],r=d[o],l="month-".concat(c)===o,h=n.createDropdownButtonMenuComponent(r,l,i,a.background);l&&(s=h),h.addEventListener("click",(function(){return p(r)})),h.addEventListener("keydown",(function(e){n.handleMonthOptionKeydown(e,h,u,(function(){return p(r)}),(function(){return t.click()}))})),u.appendChild(h)})),e.appendChild(u),setTimeout((function(){n.focusMonthOption(s||u.firstElementChild,u)}),0)})),un(n,"createOverlay",(function(){n.overlayBackdrop&&n.overlayBackdrop.click();var t=n.getRootElement().querySelector("#cl-month-dropdown");t.setAttribute("aria-expanded","true");var e,o,r,i,a,l,s=function(t){const{triggerElement:e,overlayStyles:n,createOverlayContent:o,overlayWidth:r,overlayHeight:i,offset:a,onDestroy:l,positionByDefault:s,isHorizontallyCentered:c,isBackdropDisabledOnUI:d}=t,u=t.htmlDocumentObject||document,p=function(t){const e=document.createElement("div");return e.style.position="fixed",e.style.zIndex=String(Number.MAX_SAFE_INTEGER-1),e.style.top="0",e.style.left="0",e.style.width=t?"0px":"100%",e.style.height=t?"0px":"100%",e}(d),h=document.createElement("div");h.style.position="fixed",h.style.display="block",h.style.zIndex=String(Number.MAX_SAFE_INTEGER),r&&(h.style.width=`${r}px`),i&&(h.style.height=`${i}px`);const E=h.attachShadow({mode:"open"}),m=document.createElement("style");Z({element:m,html:n}),E.append(m);const v=document.createElement("div");v.classList.add(rt()),u.body.append(p),u.body.append(h),E.append(v),o(p,v),(()=>{const t=it(e,v,function(t){return null!=t?t:5}(a),s,c,u);(function(t,e){t.setAttribute("cl-overlay-position",e)})(v,t.position),J(h,t.coordinates)})(),h.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault()}));const g=t=>{p.remove(),h.remove(),l&&l(),window.removeEventListener("keyup",t,!0)},b=t=>{"Escape"===t.key&&(t.preventDefault(),t.stopImmediatePropagation(),g(b))};return p.addEventListener("click",(()=>g(b))),window.addEventListener("keyup",b,!0),{backdrop:p,overlay:h}}({triggerElement:t,overlayStyles:(e=n.getRootElement(),o=n.overlayContentStyles,r=n.dropdownMenuOptionLabelStyles,i=rt(),a=e.querySelector("#cl-month-dropdown"),l=dt(tt(a,o).background,tt(a,r).color),"\n .".concat(i," {\n height: 196px;\n width: 199px;\n box-shadow: 0 1px 5px rgba(0, 0, 0, 0.28);\n border-radius: 4px;\n background-color: #fff;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-width: fit-content;\n }\n \n .").concat(i," div {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n row-gap: 9px;\n padding: 10px 15px 10px;\n }\n \n .").concat(i," div {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n row-gap: 9px;\n padding: 10px 14px 10px;\n }\n \n .option-wrapper {\n border: 0;\n align-items: center;\n font-size: 16px;\n padding: 10px 20px;\n outline: 0;\n cursor: pointer;\n text-align: left;\n transition: background-color 0.15s ease, box-shadow 0.15s ease;\n }\n \n .option-wrapper span {\n word-break: keep-all;\n }\n \n .option-wrapper:hover,\n .option-wrapper:focus,\n .option-wrapper.option-active,\n .option-wrapper.option-selected {\n background-color: var(--option-selected-background, ").concat(ut(l),");\n }\n\n .option-wrapper.option-active {\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);\n }\n\n .option-wrapper:hover {\n background-color: ").concat(ut(l),";\n }\n ")),createOverlayContent:function(t,e){n.createOverlayContent(t,e)},overlayWidth:n.getRootElement().querySelector("#cl-month-dropdown").getBoundingClientRect().width,onDestroy:function(){n.overlayBackdrop=null,t.setAttribute("aria-expanded","false"),n.restoreFocusToMonthTrigger(t)},htmlDocumentObject:n.htmlDocumentObject});n.overlayBackdrop=s.backdrop;var c=function(){return n.focusSelectedMonthAfterOverlayOpen()};window.requestAnimationFrame?window.requestAnimationFrame((function(){return setTimeout(c,0)})):setTimeout(c,0)})),un(n,"applyControlsDisplayRules",(function(t){var e=n.getRootElement();t.content.askYear?e.querySelector(".year-input-with-tooltip").style.display="block":e.querySelector(".year-input-with-tooltip").style.display="none"})),un(n,"getControlElementNodes",(function(t){return{dayInputElement:t.querySelector("#cl-day-input"),dayTooltipElement:t.querySelector(".day-input-with-tooltip .input-tooltip"),dayInputContainerElement:t.querySelector(".day-input-with-tooltip"),monthInputElement:t.querySelector("#cl-month-dropdown"),monthTooltipElement:t.querySelector(".month-dropdown-input .input-tooltip"),monthInputContainerElement:t.querySelector(".month-dropdown-input"),yearInputElement:t.querySelector("#cl-year-input"),yearTooltipElement:t.querySelector(".year-input-with-tooltip .input-tooltip"),yearInputContainerElement:t.querySelector(".year-input-with-tooltip")}})),un(n,"setPlaceholders",(function(t,e){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(n.isUpdatingRenderMode()||o)&&(n.setDayPlaceholder(),n.setMonthPlaceholder(),n.setYearPlaceholder(),n.applyPlaceholdersColor(t,e))})),un(n,"applyPlaceholdersColor",(function(t,e){var o=Ae(t,e,n.getShared());n.getHostElement().style.setProperty("--cl-date-input-placeholder-color",o)})),un(n,"setDayPlaceholder",(function(){var t=n.getRootElement().querySelector("#cl-day-input");t&&(t.placeholder=n.getTranslationsMap(n.DAY_PLACEHOLDER).translations)})),un(n,"setMonthPlaceholder",(function(){var t=n.getRootElement().querySelector("#cl-month-dropdown");if(t){var e=n.getTranslationsMap(n.MONTH_DROPDOWN_PLACEHOLDER).translations,o=document.createElement("div");o.classList.add("dropdown-placeholder"),o.style.color="var(--cl-date-input-placeholder-color)",o.textContent=e,ze({element:t,html:""}),t.appendChild(o)}})),un(n,"setYearPlaceholder",(function(){var t=n.getRootElement().querySelector("#cl-year-input");t&&(t.placeholder=n.getTranslationsMap(n.YEAR_PLACEHOLDER).translations)})),un(n,"getTranslatedKey",(function(t){return bt(n.services.config,n.manifest.i18n,t)})),un(n,"setInvalidStyleToElement",(function(t,e,o,r){r&&e!==r||Et(e,o,t,n.htmlDocumentObject)})),un(n,"registerControl",(function(e){var o=n.getHostElement(),r=n.getControlElementNodes(e),i=r.dayInputElement,a=r.dayTooltipElement,l=r.monthInputElement,s=r.monthTooltipElement,c=r.yearInputElement,d=r.yearTooltipElement,u={SYS_DATE:function(){return n.dateValidation()}};function p(t){return t===i||t===c?!t.value:t===l&&this.isMonthUnselected(l.textContent)}function h(t){var e=this;this.registeredControl.validate().then((function(){var n=e.registeredControl.getErrorKeys();if(n){var o=n[0];o===e.validationErrorKeys.REQUIRED&&p.call(e,t)&&(o=n[1]||n[0]);var r=e.getTranslatedKey(o);b.call(e,r,o,!1,t)}}))}function E(t,e){return e===i?m.call(this):e===l?v.call(this):e===c?g.call(this):void(t&&(m.call(this),v.call(this),g.call(this)))}function m(){i.classList.contains("invalid")&&i.classList.remove("invalid"),a.style.visibility="hidden"}function v(){l.classList.contains("invalid")&&l.classList.remove("invalid"),s.style.visibility="hidden"}function g(){c.classList.contains("invalid")&&c.classList.remove("invalid"),d.style.visibility="hidden"}function b(t,e,n,o){return o?E.call(this,!1,o):E.call(this,!0),e===this.validationErrorKeys.YEAR_INVALID_ERROR_TEXT?this.setInvalidStyleToElement(t,c,d,o):e===this.validationErrorKeys.DAY_INVALID_ERROR_TEXT?this.setInvalidStyleToElement(t,i,a,o):e===this.validationErrorKeys.DATE_INVALID_ERROR_TEXT?this.setInvalidStyleToElement(t,i,a):void(e===this.validationErrorKeys.REQUIRED&&(i.value||o!==i&&!n||this.setInvalidStyleToElement(t,i,a,o),this.isMonthUnselected(l.textContent)&&(o===l||n)&&this.setInvalidStyleToElement(t,l,s,o),c.value||o!==c&&!n||this.setInvalidStyleToElement(t,c,d,o)))}function f(){s.style.visibility="hidden",l.classList.contains("invalid")&&l.classList.remove("invalid")}n.registeredControl=n.createControlWithValidation([],{element:o,listenStatusChange:!1,validationMap:u}),o.addEventListener("input",(function(t){n.registeredControl.emit("RUN_SINGLE_ELEMENT_VALIDATION",t.composedPath()[0]),n.setControlValueProxy()})),n.services.eventEmitter.on("INVALID_CONTACT_DATA_SUBMIT_ATTEMPT",(function(){var t=n.registeredControl.getErrorKeys();if(t){var e=n.getTranslatedKey(t[0]);b.call(n,e,t[0],!0)}})),n.registeredControl.on("RUN_SINGLE_ELEMENT_VALIDATION",(function(t){h.call(n,t)})),n.registeredControl.on(t,(function(t){switch(t){case"valid":E.call(n,!0);break;case"pending":f.call(n)}}))})),un(n,"setArrowIconStyles",(function(){n.getRootElement().querySelector(".dropdown-input-select-button").style.color=Ae(n.getProps(),n.getEnvironment(),n.getShared())})),un(n,"setInputHostSize",(function(t,e){var o=t.adaptiveStyles[e].find((function(t){return"input"===t.element})).styleAttributes,r=n.getHostElement(),i=n.getRootElement().querySelectorAll('[cl-element="input"]'),a=n.getElement("label"),l=et(t,e),s=a&&l.enabled&&"TOP"===l.position?a.getBoundingClientRect().height+l.margin:0,c="".concat(parseFloat(o.height)+s,"px");r.style.width=o.width,r.style.minWidth=o.minWidth,r.style.height=c,r.style.minHeight=c,i.forEach((function(t){t.style.width="",t.style.minWidth="",t.style.height="",t.style.minHeight=""}))})),un(n,"manifest",je),un(n,"registeredControl",void 0),un(n,"overlayBackdrop",void 0),un(n,"boundEscapeKeyupGuard",null),un(n,"DAY_PLACEHOLDER",Ye.DAY_PLACEHOLDER),un(n,"MONTH_DROPDOWN_PLACEHOLDER",Ye.MONTH_DROPDOWN_PLACEHOLDER),un(n,"YEAR_PLACEHOLDER",Ye.YEAR_PLACEHOLDER),un(n,"validationErrorKeys",Ye.validationErrorKeys),un(n,"dropdownMenuOptionLabelStyles",["color","font-family","font-size","letter-spacing","text-shadow","font-weight","line-height","text-align"]),un(n,"overlayContentStyles",["background","border-style","border-top-width","border-top-color","border-bottom-width","border-bottom-color","border-left-width","border-left-color","border-right-width","border-right-color","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius"]),un(n,"openMonthDropdown",(function(){setTimeout((function(){return n.createOverlay()}),50)})),un(n,"handleMonthDropdownKeydown",(function(t){["Enter"," ","ArrowDown"].includes(t.key)&&(t.preventDefault(),n.openMonthDropdown())})),n.getRootElement().innerHTML="\n ".concat("\n <style>\n .main-container {\n height: 100%;\n }\n \n .label-and-controls-container {\n height: 100%;\n display: flex;\n }\n \n .controls-container {\n position: relative;\n height: 100%;\n min-height: 15px;\n width: 100%;\n display: flex;\n gap: 5px;\n }\n \n .label {\n min-height: 10px;\n }\n \n .label.cl-focused {\n min-height: auto;\n }\n \n .dropdown-placeholder {\n width: calc(100% - 15px);\n text-overflow: ellipsis;\n overflow: hidden;\n }\n \n .day-input-with-tooltip {\n min-width: 54px;\n height: inherit;\n }\n \n .month-dropdown-input {\n position: relative;\n display: flex;\n height: inherit;\n width: 100%;\n cursor: pointer;\n min-width: 82px;\n }\n \n .year-input-with-tooltip {\n min-width: 56px;\n height: 100%;\n }\n \n .cl-date-input-control {\n position: relative;\n width: 100%;\n }\n \n .cl-date-input-control input {\n width: 100%;\n height: 100%;\n }\n \n .cl-date-input-control input::placeholder {\n color: var(--cl-date-input-placeholder-color);\n opacity: 1;\n }\n \n .cl-date-input-control input::-ms-input-placeholder {\n color: var(--cl-date-input-placeholder-color);\n opacity: 1;\n }\n \n .cl-date-input-control .month-dropdown-input .dropdown-input-select-button {\n bottom: calc(50% - 17px);\n }\n \n .invalid {\n border: 1px solid #ff0000 !important;\n }\n \n .input-tooltip {\n visibility: hidden;\n position: absolute;\n right: -10px;\n top: -10px;\n z-index: 1;\n border-radius: 100%;\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Chrome/Safari/Opera */\n -khtml-user-select: none; /* Konqueror */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n }\n \n .dropdown-label {\n display: flex;\n align-items: center;\n position: absolute;\n height: 100%;\n width: 100%;\n padding: 0 35px 0 20px;\n cursor: pointer;\n }\n \n .dropdown-input-select-button {\n background: transparent;\n border: none;\n min-width: max-content;\n width: 24px;\n height: 100%;\n display: flex;\n align-items: center;\n position: absolute;\n right: 0;\n z-index: 2;\n }\n \n .label-and-controls-container.focus-outline-defined input:focus, .dropdown-label:focus {\n outline: var(--clFocusOutline);\n }\n </style>\n ","\n ").concat('\n <div class="main-container">\n <div class="label-and-controls-container">\n \n <div cl-element="label"\n cl-inline-edit="content, label"\n class="label"\n id="cl-date-label">\n </div>\n \n <div class="controls-container"\n role="group"\n aria-labelledby="cl-date-label">\n \n <div class="cl-date-input-control day-input-with-tooltip">\n <input cl-element="input"\n id="cl-day-input"\n type="text"\n name="day"\n aria-labelledby="cl-date-label">\n <div class="input-tooltip" aria-hidden="true">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">\n <path d="M1.5 13.0604C1.5 19.4116 6.6481 24.5605 13.0075 24.5605C19.353 24.5605 24.5 19.4107 24.5 13.0604C24.5 6.70865 19.3531 1.55909 13.0075 1.55908C6.64806 1.55908 1.5 6.7077 1.5 13.0604ZM12.9775 17.9668C12.7032 17.9668 12.4807 17.7443 12.4807 17.47C12.4807 17.1956 12.7032 16.9732 12.9775 16.9732C13.2519 16.9732 13.4743 17.1956 13.4743 17.47C13.4743 17.7443 13.2519 17.9668 12.9775 17.9668ZM12.9775 13.4764C12.7032 13.4764 12.4807 13.254 12.4807 12.9796L12.4807 8.48924C12.4807 8.21487 12.7032 7.99245 12.9775 7.99245C13.2519 7.99245 13.4743 8.21487 13.4743 8.48924L13.4743 12.9796C13.4743 13.254 13.2519 13.4764 12.9775 13.4764Z" fill="#FF0000" stroke="white" stroke-width="2"></path>\n </svg>\n </div>\n </div>\n \n <div class="cl-date-input-control month-dropdown-input">\n <div class="dropdown-input-select-button">\n <svg width="11" height="7" viewBox="0 0 11 7" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M10.5248 1.90196L9.57381 2.71322L6.05712 5.71322L5.24395 6.40691L4.4324 5.71132L0.949088 2.72576L0 1.91229L1.62694 0.0141139L2.57603 0.827583L5.24778 3.11756L7.9513 0.811257L8.90228 0L10.5248 1.90196Z"\n fill="currentColor"/>\n </svg>\n </div>\n <button cl-element="input"\n class="dropdown-label"\n id="cl-month-dropdown"\n type="button"\n aria-haspopup="listbox"\n aria-expanded="false"\n aria-labelledby="cl-date-label">\n <div class="dropdown-placeholder">placeholder</div>\n </button>\n <div class="input-tooltip" aria-hidden="true">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">\n <path d="M1.5 13.0604C1.5 19.4116 6.6481 24.5605 13.0075 24.5605C19.353 24.5605 24.5 19.4107 24.5 13.0604C24.5 6.70865 19.3531 1.55909 13.0075 1.55908C6.64806 1.55908 1.5 6.7077 1.5 13.0604ZM12.9775 17.9668C12.7032 17.9668 12.4807 17.7443 12.4807 17.47C12.4807 17.1956 12.7032 16.9732 12.9775 16.9732C13.2519 16.9732 13.4743 17.1956 13.4743 17.47C13.4743 17.7443 13.2519 17.9668 12.9775 17.9668ZM12.9775 13.4764C12.7032 13.4764 12.4807 13.254 12.4807 12.9796L12.4807 8.48924C12.4807 8.21487 12.7032 7.99245 12.9775 7.99245C13.2519 7.99245 13.4743 8.21487 13.4743 8.48924L13.4743 12.9796C13.4743 13.254 13.2519 13.4764 12.9775 13.4764Z" fill="#FF0000" stroke="white" stroke-width="2"></path>\n </svg>\n </div>\n </div>\n \n <div class="cl-date-input-control year-input-with-tooltip">\n <input cl-element="input"\n id="cl-year-input"\n type="text"\n name="fname"\n aria-labelledby="cl-date-label">\n <div class="input-tooltip" aria-hidden="true">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">\n <path d="M1.5 13.0604C1.5 19.4116 6.6481 24.5605 13.0075 24.5605C19.353 24.5605 24.5 19.4107 24.5 13.0604C24.5 6.70865 19.3531 1.55909 13.0075 1.55908C6.64806 1.55908 1.5 6.7077 1.5 13.0604ZM12.9775 17.9668C12.7032 17.9668 12.4807 17.7443 12.4807 17.47C12.4807 17.1956 12.7032 16.9732 12.9775 16.9732C13.2519 16.9732 13.4743 17.1956 13.4743 17.47C13.4743 17.7443 13.2519 17.9668 12.9775 17.9668ZM12.9775 13.4764C12.7032 13.4764 12.4807 13.254 12.4807 12.9796L12.4807 8.48924C12.4807 8.21487 12.7032 7.99245 12.9775 7.99245C13.2519 7.99245 13.4743 8.21487 13.4743 8.48924L13.4743 12.9796C13.4743 13.254 13.2519 13.4764 12.9775 13.4764Z" fill="#FF0000" stroke="white" stroke-width="2"></path>\n </svg>\n </div>\n </div>\n \n </div>\n \n </div>\n </div>\n ',"\n "),n}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&&dn(t,e)}(e,ke),function(t,e){return e&&rn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"connectedCallback",value:function(){var t,n=this;ln(e,"connectedCallback",this,3)([]);var o=this.getRootElement(),r=this.getProps();this.registerControl(o);var i=(null===(t=this.registeredControl)||void 0===t?void 0:t.value)||null;this.setControlsOrder(o),i?this.setStringDateValue(i):this.setPlaceholders(r,this.getEnvironment(),!0),this.observeProps((function(t,e){n.applyAutoAdaptiveStyles(e.adaptiveStyles,e.styles);var r=n.getEnvironment();nt(e,r,o,".label-and-controls-container"),n.setInputHostSize(e,r),n.applyControlsDisplayRules(e),n.setPlaceholders(e,r),n.setArrowIconStyles(),function(t,e){let n=null;const o=e||t,r=["transparent","initial"];t&&(t.style.borderColor&&!r.includes(t.style.borderColor)&&(parseFloat(t.style.borderWidth)||parseFloat(t.style.borderBottomWidth))&&(n=ot(o,t,"borderColor")),!n&&t.style.getPropertyValue("--borderBottomColor")&&!r.includes(t.style.getPropertyValue("--borderBottomColor"))&&parseFloat(t.style.getPropertyValue("--borderBottomWidth"))&&(n=ot(o,t,"--borderBottomColor")),n||!t.style.backgroundColor||r.includes(t.style.backgroundColor)||(n=ot(o,t,"backgroundColor")),n||!t.style.color||r.includes(t.style.color)||(n=ot(o,t,"color")),n||o.classList.remove("focus-outline-defined"))}(n.getElement("input"),o.querySelector(".label-and-controls-container"))})),this.observeShared((function(){var t=n.getProps(),e=n.getEnvironment();n.setPlaceholders(t,e),n.setInputHostSize(t,e),n.setArrowIconStyles()})),this.observeEnvironment((function(t,e){var r=n.getProps();nt(r,e,o,".label-and-controls-container"),n.setInputHostSize(r,e),n.setPlaceholders(r,e),n.setArrowIconStyles()}));var a=o.querySelector("#cl-month-dropdown");a.addEventListener("click",this.openMonthDropdown),a.addEventListener("keydown",this.handleMonthDropdownKeydown)}},{key:"disconnectedCallback",value:function(){ln(e,"disconnectedCallback",this,3)([]),this.removeEscapeKeyupGuard();var t=this.getRootElement().querySelector("#cl-month-dropdown");null==t||t.removeEventListener("click",this.openMonthDropdown),null==t||t.removeEventListener("keydown",this.handleMonthDropdownKeydown)}}])}();un(hn,"define",{name:"sys-date",model:je.name,manifest:je});export{hn as default};window.clComponentClass_SysDateComponent=hn;
@@ -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="cl-";function o(t){return n+t}function i(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 a(t=[]){return t.map((t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)})))}const s={name:"SysPhoneInputComponent",componentType:"INPUT",version:"1.0.0",contextMenuModel:e([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),floatingControlsModel:e([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:e([{type:"CONTROL",name:"SIZE",element:"input",elementProp:"styleAttributes",params:{width:{options:["fixed","fill"]},height:{options:["fixed","fill"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"input",hideTextAlign:!0},{element:"label"}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"INPUT_LABEL",propPath:["styles","[element=label]","params"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"input",params:{indentationType:"PADDING",horizontalOnly:!0}},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]),general:[{type:"CONTROL",name:"COUNTRY_PHONE_SELECT",element:"input",propPath:["control"]},{type:"CONTROL",name:"INPUT_VALIDATION",params:{validationPropPath:["control","validation"],fieldTypePropPath:["control","fieldType"],required:!0,options:[{label:"Phone",value:"PHONE"}],validationErrors:{PHONE:[{key:"PHONE_INVALID_NUMBER",value:"Phone number is invalid"}]}}}]},autoContrast:[{slave:{element:"input",elementProp:"styleAttributes",elementSubProp:"color"},master:{element:"input",propPath:["styles","[element=input]","styleAttributes","background"]},enabledPropPath:["content","textContrastEnabled"]}],focusableElements:["input","label"],events:{dispatch:[],listen:[]},i18nPropPaths:["content,label","content,placeholder"],i18n:{en:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Phone number is invalid","control,validation,validationErrors,REQUIRED":"Required field","content,label":"Title"},ru:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Неверно заполнен номер телефона","control,validation,validationErrors,REQUIRED":"Обязательное поле","content,label":"Заголовок"},uk:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Неправильно заповнено номер телефону","control,validation,validationErrors,REQUIRED":"Обов'язкове поле","content,label":"Заголовок"},es:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"El número de teléfono no es válido","control,validation,validationErrors,REQUIRED":"Campo obligatorio","content,label":"Título"},de:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefonnummer ist ungültig","control,validation,validationErrors,REQUIRED":"Pflichtfeld","content,label":"Titel"},fr:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Le numéro de téléphone est invalide","control,validation,validationErrors,REQUIRED":"Champs requis","content,label":"Titre"},it:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Il numero di telefono non è valido","control,validation,validationErrors,REQUIRED":"Campo obbligatorio","content,label":"Titolo"},pt:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Número de telefone inválido","control,validation,validationErrors,REQUIRED":"Campo obrigatório","content,label":"Título"},ro:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Numărul de telefon nu este valid","control,validation,validationErrors,REQUIRED":"Câmp obligatoriu","content,label":"Titlu"},bg:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Телефонният номер е невалиден","control,validation,validationErrors,REQUIRED":"Изисквано поле","content,label":"Заглавие"},cs:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefonní číslo je neplatné","control,validation,validationErrors,REQUIRED":"Vyžadované pole","content,label":"Titul"},el:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Ο αριθμός τηλεφώνου είναι άκυρος","control,validation,validationErrors,REQUIRED":"Απαιτητό πεδίο","content,label":"Τίτλος"},nl:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefoonnummer is ongeldig","control,validation,validationErrors,REQUIRED":"Verplicht veld","content,label":"Titel"},pl:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Numer telefonu jest nieprawidłowy","control,validation,validationErrors,REQUIRED":"Wymagane pole","content,label":"Tytuł"},sv:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefonnumret är ogiltigt","control,validation,validationErrors,REQUIRED":"Obligatoriskt fält","content,label":"Tytuł"},tr:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefon numarası geçersiz","control,validation,validationErrors,REQUIRED":"Gerekli alan","content,label":"Başlık"},ar:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"رقم الهاتف غير صالح","control,validation,validationErrors,REQUIRED":"الحقل المطلوب","content,label":"عنوان"},zh:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"电话号码无效","control,validation,validationErrors,REQUIRED":"必填字段","content,label":"Title"},da:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefonnummer er ugyldigt","control,validation,validationErrors,REQUIRED":"Påkrævet felt","content,label":"Titel"},he:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"מספר טלפון לא תקין","control,validation,validationErrors,REQUIRED":"שדה נדרש","content,label":"Title"},fi:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Puhelinnumero on virheellinen","control,validation,validationErrors,REQUIRED":"Vaadittu kenttä","content,label":"Title"},hi:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"फ़ोन नंबर अमान्य है","control,validation,validationErrors,REQUIRED":"आवश्यक फील्ड","content,label":"Title"},hr:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefonski broj nije ispravan","control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title"},hu:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"A telefonszám érvénytelen","control,validation,validationErrors,REQUIRED":"Kötelező mező","content,label":"Title"},id:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Nomor telepon tidak valid","control,validation,validationErrors,REQUIRED":"Bidang yang wajib diisi","content,label":"Title"},ja:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"電話番号が無効です","control,validation,validationErrors,REQUIRED":"必須フィールド","content,label":"Title"},ko:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"유효하지 않은 전화번호","control,validation,validationErrors,REQUIRED":"필수 칸","content,label":"Title"},no:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefonnummeret er ugyldig","control,validation,validationErrors,REQUIRED":"Obligatorisk felt","content,label":"Title"},sk:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefónne číslo je neplatné","control,validation,validationErrors,REQUIRED":"Povinné pole","content,label":"Title"},sl:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefonska številka je neveljavna","control,validation,validationErrors,REQUIRED":"Obvezno polje","content,label":"Title"},sr:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Broj telefona je nevažeći","control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title"}},props:{content:{label:"Title",textContrastEnabled:!0},control:{name:"phone",countryCode:"UA",countriesPriority:{includedList:["UA"],allowToAddOnlyFromIncludedList:!1},validation:{required:!0,validator:"PHONE"}},styles:[{element:"input",styleAttributes:{background:"rgb(255, 255, 255)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"1px",borderTopColor:"rgba(0, 0, 0, 0.1)",borderBottomWidth:"1px",borderBottomColor:"rgba(0, 0, 0, 0.1)",borderLeftWidth:"1px",borderLeftColor:"rgba(0, 0, 0, 0.1)",borderRightWidth:"1px",borderRightColor:"rgba(0, 0, 0, 0.1)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"}},{element:"label",params:{enabled:!1,position:"TOP",margin:5}}],adaptiveStyles:(l=[{element:"host",styleAttributes:{marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"input",styleAttributes:{width:"100%",minWidth:null,height:"35px",minHeight:"35px",color:"var(--cl-schema-text, rgb(0, 0, 0))",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0},placeholderStyleAttributes:{color:"rgb(81, 81, 81)"},classes:""},{element:"label",styleAttributes:{color:"var(--cl-schema-text, rgb(0, 0, 0))",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none"},classes:""}],Object.values(t).reduce(((t,e)=>Object.assign(t,{[e]:a(l)})),{desktop:[],mobile:[]}))},metaDescription:{icon:"/SysPhoneInputComponent/assets/img/component-icon.svg",label:{en:"Phone",ru:"Телефон",uk:"Телефон",es:"Teléfono",fr:"Téléphone",de:"Telefon",it:"Telefono",pt:"Telefone",ro:"Telefon",bg:"Телефон",cs:"Telefon",el:"Τηλέφωνο",nl:"Telefoon",pl:"Telefon",sv:"Telefon",tr:"Telefon",ar:"الهاتف",zh:"电话",da:"Telefon",he:"טלפון",fi:"Puhelin",hi:"फ़ोन",hr:"Telefon",hu:"Telefon",id:"Telepon",ja:"電話",ko:"휴대폰",no:"Telefon",sk:"Telefón",sl:"Telefon",sr:"Telefon"}},syncEnabled:!0,stylesImitationEnabled:!0};var l;const c="validationStatusChanged",u="touchedStatusChanged";class d{static size(t){return{width:this.width(t),height:this.height(t)}}static width(t){var e;const n=t||document;return Math.max(n.documentElement.clientWidth,(null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)}static height(t){var e;const n=t||document;return Math.max(n.documentElement.clientHeight,(null===(e=n.defaultView)||void 0===e?void 0:e.innerHeight)||0)}static scrollbarWidth(t){var e;const n=t||document;return((null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)-n.documentElement.clientWidth}}var p=[];for(var h in{transparent:"#0000"})p.push(h);var m="\\s*([.\\d%]+)\\s*",v="\\("+[m,m,m]+"(?:,\\s*([.\\d]+)\\s*)?\\)",g="(?:rgb)a?",f="("+p.join("|")+")";function b(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}RegExp(g+v,"i"),RegExp([f,"(?:#([a-f0-9]{3,8}))",g+v,"(?:hsl)a?"+v].join("|"),"gi");var y=Array.prototype.concat,E=Array.prototype.slice,O=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var i=t[n];b(i)?e=y.call(e,E.call(i)):e.push(i)}return e};O.wrap=function(t){return function(){return t(O(arguments))}};const C=O;var S={},T=Object.hasOwnProperty,I=Object.create(null);for(var A in S)T.call(S,A)&&(I[S[A]]=A);var R={to:{},get:{}};function x(t,e,n){return Math.min(Math.max(e,t),n)}R.get=function(t){var e,n;return"hsl"===t.substring(0,3).toLowerCase()?(e=R.get.hsl(t),n="hsl"):(e=R.get.rgb(t),n="rgb"),e?{model:n,value:e}:null},R.get.rgb=function(t){if(!t)return null;var e,n,o,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=e[2],e=e[1],n=0;n<3;n++){var r=2*n;i[n]=parseInt(e.slice(r,r+2),16)}o&&(i[3]=parseInt(o,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(o=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);o&&(i[3]=parseInt(o+o,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:T.call(S,e[1])?((i=S[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=x(i[n],0,255);return i[3]=x(i[3],0,1),i},R.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,x(parseFloat(e[2]),0,100),x(parseFloat(e[3]),0,100),x(isNaN(n)?1:n,0,1)]}return null},R.to.rgb=function(){var t=C(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},R.to.hsl=function(){var t=C(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};const N=R,_={},L={};for(const t of Object.keys(_))L[_[t]]=t;const w={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"}};Math.pow(6/29,3);for(const t of Object.keys(w)){if(!("channels"in w[t]))throw new Error("missing channels property: "+t);if(!("labels"in w[t]))throw new Error("missing channel labels property: "+t);if(w[t].labels.length!==w[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=w[t];delete w[t].channels,delete w[t].labels,Object.defineProperty(w[t],"channels",{value:e}),Object.defineProperty(w[t],"labels",{value:n})}w.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,i=Math.min(e,n,o),r=Math.max(e,n,o),a=r-i;let s,l;r===i?s=0:e===r?s=(n-o)/a:n===r?s=2+(o-e)/a:o===r&&(s=4+(e-n)/a),s=Math.min(60*s,360),s<0&&(s+=360);const c=(i+r)/2;return l=r===i?0:c<=.5?a/(r+i):a/(2-r-i),[s,100*l,100*c]},w.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let i,r,a;if(0===n)return a=255*o,[a,a,a];i=o<.5?o*(1+n):o+n-o*n;const s=2*o-i,l=[0,0,0];for(let t=0;t<3;t++)r=e+1/3*-(t-1),r<0&&r++,r>1&&r--,a=6*r<1?s+6*(i-s)*r:2*r<1?i:3*r<2?s+(i-s)*(2/3-r)*6:s,l[t]=255*a;return l};const k=w;function P(t,e){return function(n){return e(t(n))}}function M(t,e){const n=[e[t].parent,t];let o=k[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),o=P(k[e[i].parent][i],o),i=e[i].parent;return o.conversion=n,o}const D={};Object.keys(k).forEach((t=>{D[t]={},Object.defineProperty(D[t],"channels",{value:k[t].channels}),Object.defineProperty(D[t],"labels",{value:k[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(k);for(let n=e.length,o=0;o<n;o++)t[e[o]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;){const t=n.pop(),o=Object.keys(k[t]);for(let i=o.length,r=0;r<i;r++){const i=o[r],a=e[i];-1===a.distance&&(a.distance=e[t].distance+1,a.parent=t,n.unshift(i))}}return e}(t),n={},o=Object.keys(e);for(let t=o.length,i=0;i<t;i++){const t=o[i];null!==e[t].parent&&(n[t]=M(t,e))}return n}(t);Object.keys(e).forEach((n=>{const o=e[n];D[t][n]=function(t){const e=function(...e){const n=e[0];if(null==n)return n;n.length>1&&(e=n);const o=t(e);if("object"==typeof o)for(let t=o.length,e=0;e<t;e++)o[e]=Math.round(o[e]);return o};return"conversion"in t&&(e.conversion=t.conversion),e}(o),D[t][n].raw=function(t){const e=function(...e){const n=e[0];return null==n?n:(n.length>1&&(e=n),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(o)}))}));const U=D,B=["keyword","gray","hex"],j={};for(const t of Object.keys(U))j[[...U[t].labels].sort().join("")]=t;const H={};function V(t,e){if(!(this instanceof V))return new V(t,e);if(e&&e in B&&(e=null),e&&!(e in U))throw new Error("Unknown model: "+e);let n,o;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof V)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=N.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,o=U[this.model].channels,this.color=e.value.slice(0,o),this.valpha="number"==typeof e.value[o]?e.value[o]:1}else if(t.length>0){this.model=e||"rgb",o=U[this.model].channels;const n=Array.prototype.slice.call(t,0,o);this.color=G(n,o),this.valpha="number"==typeof t[o]?t[o]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const o=e.sort().join("");if(!(o in j))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=j[o];const{labels:i}=U[this.model],r=[];for(n=0;n<i.length;n++)r.push(t[i[n]]);this.color=G(r)}if(H[this.model])for(o=U[this.model].channels,n=0;n<o;n++){const t=H[this.model][n];t&&(this.color[n]=t(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}V.prototype={toString(){return this.string()},string(t){let e=this.model in N.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return N.to[e.model](n)},round(t){return t=Math.max(t||0,0),new V([...this.color.map(F(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new V([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e}};for(const t of Object.keys(U)){if(B.includes(t))continue;const{channels:e}=U[t];V.prototype[t]=function(...e){return this.model===t?new V(this):e.length>0?new V(e,t):new V([...W(U[this.model][t].raw(this.color)),this.valpha],t)},V[t]=function(...n){let o=n[0];return"number"==typeof o&&(o=G(n,e)),new V(o,t)}}function F(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function W(t){return Array.isArray(t)?t:[t]}function G(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}const $=V;function z(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}function K(t,e){Object.keys(e).forEach((n=>{t.style[n]=e[n]}))}function Q(t,e){var n,o;let i;return t.styles&&(i=null===(n=t.styles.find((t=>"label"===t.element)))||void 0===n?void 0:n.params),t.adaptiveStyles&&!i&&(i=null===(o=t.adaptiveStyles[e].find((t=>"label"===t.element)))||void 0===o?void 0:o.params),i}function q(t,e,n,o){var i;const r=n.querySelector(o),a=n.querySelector(".label"),s=Q(t,e);a&&function(t,e){if(!e)return;t.id||(t.id=((t="cl-a11y")=>`${t}-${Math.random().toString(36).slice(2,10)}`)("cl-label"));const n=e.getAttribute("role"),o="group"===n||"radiogroup"===n?e:e.querySelector('[cl-element="input"]');if(!o)return;const i=(o.getAttribute("aria-labelledby")||"").split(" ").filter(Boolean);i.includes(t.id)||(i.push(t.id),o.setAttribute("aria-labelledby",i.join(" ")))}(a,r),s&&a&&(z({element:a,html:(null===(i=t.content)||void 0===i?void 0:i.label)||""}),"TOP"===s.position?(r.style.flexDirection="column",r.style.alignItems="unset",K(a,{marginRight:"0",marginBottom:`${s.margin}px`})):(r.style.flexDirection="row",r.style.alignItems="center",K(a,{marginRight:`${s.margin}px`,marginBottom:"0"})),s.enabled?a.style.display="":a.style.display="none")}function Z(t,e,n,o,i){const r=function(t,e){var n;let o;if(t.styles){const e=null===(n=t.styles.find((t=>"input"===t.element)))||void 0===n?void 0:n.styleAttributes;(null==e?void 0:e.width)&&(o=e)}if(t.adaptiveStyles&&!o){const n=t.adaptiveStyles[e].find((t=>"input"===t.element)),i=null==n?void 0:n.styleAttributes;(null==i?void 0:i.width)&&(o=i)}return o}(t,e);if(!r)return;const a=Q(t,e),s=i&&a&&a.enabled&&"TOP"===a.position?i.getBoundingClientRect().height+(a.margin||0):0;r.width&&(r.width.includes("100%")?(o.style.width="100%",n.style.width=r.width):n.style.width="auto"),r.height&&(r.height.includes("100%")?(o.style.height="100%",n.style.height=r.height):n.style.height=`${parseFloat(r.height)+s}px`)}function X(t,e,n){const o=function(t,e){const n=getComputedStyle(t)[e]||t.style.getPropertyValue(e);if(n&&n.includes("rgb")&&(!(n.split("rgb").length>2)||n.includes("#")))return n}(e,n);if(o){const e=$(o).alpha(.5).string();return t.classList.add("focus-outline-defined"),t.style.setProperty("--clFocusOutline",`3px solid ${e}`),e}return null}function Y(){return o("overlay-menu-content")}function J(t,e,n,o,i,r){const a=function(t,e,n,o,i){const r=function(t,e,n,o){const i=d.width(o),{right:r}=t.getBoundingClientRect(),a=i-n-r-d.scrollbarWidth(o);return{horizontalOffset:n,contentWidth:tt(e).width,availableSpaceToTheLeftSideOfTheTrigger:r-n,availableSpaceToTheRightSideOfTheTrigger:a}}(t,e,n,i),a=function(t,e,n,o){const i=d.height(o),{top:r,bottom:a}=t.getBoundingClientRect();return{verticalOffset:n,contentHeight:tt(e).height,availableSpaceAboveTriggerElem:r-n,availableSpaceBelowTriggerElem:i-a-n}}(t,e,n,i);let s="undefined";const l={bottom:a.availableSpaceBelowTriggerElem>=a.contentHeight,top:a.availableSpaceAboveTriggerElem>=a.contentHeight,right:r.availableSpaceToTheRightSideOfTheTrigger>=r.contentWidth,left:r.availableSpaceToTheLeftSideOfTheTrigger>=r.contentWidth};if(l.top?s="top":l.bottom?s="bottom":l.right?s="right":l.left&&(s="left"),o&&l[o]&&(s=o),"undefined"===s){const t=Math.max(a.availableSpaceBelowTriggerElem,a.availableSpaceAboveTriggerElem,r.availableSpaceToTheRightSideOfTheTrigger,r.availableSpaceToTheLeftSideOfTheTrigger);t===a.availableSpaceBelowTriggerElem?s="bottom":t===a.availableSpaceAboveTriggerElem?s="top":t===r.availableSpaceToTheRightSideOfTheTrigger?s="right":t===r.availableSpaceToTheLeftSideOfTheTrigger&&(s="left")}return Object.assign(Object.assign(Object.assign({},a),r),{position:s})}(t,e,n,o,r=r||document);return function(t,e){const{marginBottom:n,marginTop:o}=window.getComputedStyle(e);if("top"===t.position)K(e,{"margin-top":`${parseInt(o,10)+parseInt(n,10)}px`}),K(e,{"margin-bottom":"0px"});else if("bottom"===t.position)K(e,{"margin-bottom":`${parseInt(n,10)+parseInt(o,10)}px`}),K(e,{"margin-top":"0px"});else{const t=(parseInt(n,10)+parseInt(o,10))/2+"px";K(e,{"margin-top":t,"margin-bottom":t})}}(a,e),{coordinates:et(a,t.getBoundingClientRect(),e.getBoundingClientRect(),i,r),position:a.position}}function tt(t){const{width:e,height:n}=t.getBoundingClientRect(),{marginBottom:o,marginTop:i,marginLeft:r,marginRight:a}=window.getComputedStyle(t);return{width:e+parseInt(r,10)+parseInt(a,10),height:n+parseInt(i,10)+parseInt(o,10)}}function et(t,e,n,o,i){switch(t.position){case"top":return{left:`${nt(e,n,o,i)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${nt(e,n,o,i)}px`,bottom:t.availableSpaceBelowTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"left":return{left:t.availableSpaceToTheLeftSideOfTheTrigger-e.width-t.contentWidth-t.horizontalOffset+"px",top:`${ot(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${ot(0,t)}px`}}}function nt(t,e,n,o){let i=n?t.x+t.width/2-e.width/2:t.x;return i<0&&(i=0),i+e.width>d.width(o)&&(i-=i+e.width-d.width(o)),i}function ot(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}const it="cl-tooltip-text-styles",rt=`\n .cl-tooltip-text {\n z-index: ${Number.MAX_SAFE_INTEGER};\n width: max-content;\n height: fit-content;\n visibility: hidden;\n background-color: white;\n color: #000;\n border: 1px solid rgb(194, 194, 194);\n border-radius: 5px;\n padding: 5px 10px;\n position: fixed;\n max-width: 300px;\n max-height: 100vh;\n box-shadow: 0 1px 5px rgba(0,0,0,.28);\n font-size: 14px;\n }\n\n .cl-tooltip-text[cl-tooltip-position='top']:before {\n content: "";\n position: absolute;\n top: 100%;\n left: calc(50% - 13px);\n border-width: 12px;\n border-style: solid;\n border-color: rgb(194, 194, 194) transparent transparent transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='top']:after {\n content: "";\n position: absolute;\n top: 100%;\n left: calc(50% - 5px);\n margin-left: -8px;\n margin-top: -2px;\n border-width: 12px;\n border-style: solid;\n border-color: white transparent transparent transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='bottom']:before {\n content: "";\n position: absolute;\n top: -24px;\n left: calc(50% - 9px);\n border-width: 12px;\n border-style: solid;\n border-color: transparent transparent rgb(194, 194, 194) transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='bottom']:after {\n content: "";\n position: absolute;\n top: -22px;\n left: calc(50% - 4px);\n margin-left: -5px;\n margin-bottom: -2px;\n border-width: 12px;\n border-style: solid;\n border-color: transparent transparent white transparent;\n }\n`;function at(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}function st(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)}const lt="VIEW",ct="MODULE",ut="CONTAINER",dt="INPUT",pt="BUTTON",ht="CONSENT",mt="COLUMN";var vt,gt;(gt=vt||(vt={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",gt.REQUEST="REQUEST",gt.DISPATCH_EVENT="DISPATCH_EVENT",gt.GO_TO_VIEW="GO_TO_VIEW",gt.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",gt.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",gt.SHOW_WIDGET="SHOW_WIDGET",gt.OPEN_LINK="OPEN_LINK",gt.CLOSE_WIDGET="CLOSE_WIDGET",gt.CLICK="CLICK";const ft=vt;var bt,yt;class Et{static sortActions(t){const e={[ft.CLOSE_WIDGET]:-1,[ft.OPEN_LINK]:-2,[ft.SHOW_WIDGET]:1,[ft.SUBSCRIBE_CONTACT]:2,[ft.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=Et.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(),r=o.getAttribute(i("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(i("type"))));let n=0;for(;e[n]&&e[n].getAttribute(i("id"))!==r;){let t=e[n].getAttribute(i("type"));if(Et.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,a=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 a.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=a.return)||await n.call(a)}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=[])}}Et.IGNORING_VIEW_ENTRY_TYPES=[pt,ht,dt],(yt=bt||(bt={})).CLICK="CLICK",yt.COMPONENT_EVENT="COMPONENT_EVENT";class Ot{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 Ct{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 bt.CLICK:return new Et(t,e);case bt.COMPONENT_EVENT:return new Ot(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class St{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 Tt{constructor(){this.listeners=Tt.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=St.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=Tt.createDefaultListenersState()}}Tt.createDefaultListenersState=()=>({"*":{}});const It=Tt,At=(t,e,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:r,addEventListener:a}=i;(r||a).call(t,e,n,o)};class Rt{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class xt{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===ct?Object.assign(Object.assign({},t),xt.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 Nt,_t,Lt,wt,kt,Pt,Mt,Dt,Ut,Bt,jt,Ht,Vt;xt.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(_t=Nt||(Nt={})).VIEW="VIEW",_t.CONTAINER="CONTAINER",_t.TEXT="TEXT",_t.INPUT="INPUT",_t.BUTTON="BUTTON",_t.IMAGE="IMAGE",_t.CONSENT="CONSENT",_t.COUNTDOWN_TIMER="COUNTDOWN_TIMER",_t.PROMO_CODE="PROMO_CODE",_t.MULTIPLE_INPUT="MULTIPLE_INPUT",_t.VIDEO="VIDEO",_t.SLIDER="SLIDER",_t.SLIDE="SLIDE",_t.SOCIAL="SOCIAL",_t.COLUMNS="COLUMNS",_t.COLUMN="COLUMN",_t.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(Lt||(Lt={})).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"}(wt||(wt={})),function(t){t.SELF="_self",t.BLANK="_blank"}(kt||(kt={})),(Pt||(Pt={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(Mt||(Mt={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(Dt||(Dt={})),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"}(Ut||(Ut={})),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"}(Bt||(Bt={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(jt||(jt={})),(Vt=Ht||(Ht={})).BEFORE="BEFORE",Vt.AFTER="AFTER",Vt.INSIDE="INSIDE",Vt.INSTEAD="INSTEAD";class Ft extends It{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(Ft.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(Ft.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(Ft.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}Ft.changeEventName="CHANGE";const Wt=Ft;class Gt{static set(t,e){const n=t[Gt.accumulatorPropertyName]||{};t[Gt.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[Gt.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}Gt.accumulatorPropertyName="clStyleAttributes";const $t=Gt;var zt;!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"}(zt||(zt={}));class Kt{static applyHostStyles(t,e,n=null,o){var i,r,a;const s=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));s&&(null===(a=s.actions)||void 0===a?void 0:a.length)&&(e.style.cursor="pointer"),t!==lt&&t!==ut&&t!==mt||(e.style.display=o===zt.CONTENT_LOCKER&&t===lt?"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 Qt{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class qt{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,a,s;const l=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)))||{},u=(null===(a=null==c?void 0:c.styleAttributes)||void 0===a?void 0:a.background)||(null===(s=null==l?void 0:l.styleAttributes)||void 0===s?void 0:s.background),d=this.parseBackground(u);d.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:d.url,inlineSvgString:null,positionOptions:d.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),Qt.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 Zt=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 Xt(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class Yt{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 Jt{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 te;!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.SUBMIT_REQUEST_STARTED="SUBMIT_REQUEST_STARTED",t.SUBMIT_REQUEST_FINISHED="SUBMIT_REQUEST_FINISHED",t.PROMO_CODE_SHOWN="PROMO_CODE_SHOWN"}(te||(te={}));const ee=te;class ne{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(ee.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(ee.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 Jt(this.onCounterStateUpdate)}}}const oe=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>oe(...t)}},ie=oe,re="props",ae="shared",se="environment";function le(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===(a=null==r?void 0:r.getAttribute)||void 0===a?void 0:a.call(r,e))===n)?r:r&&r.parentNode&&i(r.parentNode)||null;var a};return i(t)}const ce="SUBMIT";function ue(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}class de extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}var pe;!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(pe||(pe={}));class he extends HTMLElement{constructor(){var t;super(),this.skipGameBlur=!0,this.construct=()=>{let t;const e=this.getAttribute(i("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${i("widget-id")}]`);let r;o&&(r=o.getAttribute(i("widget-id")));let a=new de("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(i("path")),id:e,widgetId:r},{bubbles:!0,composed:!0});this.dispatchEvent(a),t=a.detail.props,Object.assign(this,t),this.observers=ie(re,ae,se),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 Rt({}),this.componentEventEmitter=new It,this.componentResourceManager=new ne(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new Ct(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(re).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=i("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(ae).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new qt(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),Zt),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(Wt.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(se).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")===pe.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===pe.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(re).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(ae).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(se).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${i("element")}]`)).filter((t=>!t.hasAttribute(i("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute(i("element"))===t&&n.id===e:n.getAttribute(i("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&&(ue(n,t),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(ue(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),a=i("type"),s="element-styles";let l=this.getRootElement().querySelector(`style[${a}="${s}"]`);l||(l=document.createElement("style"),l.setAttribute(a,s),this.getRootElement().appendChild(l)),z({element:l,html:""}),n.forEach((t=>{let e=t.getAttribute(i("element"));const n=this.getEnvironment();let a=r(o,n,e);if(a){if(this.resizeListener.isMobile()){const t=r(o,"desktop",e);t&&(a=Object.assign(Object.assign({},a),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),a.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(a),l)}})),this._addLinkColor(l,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,r;const a=[];"host"===(e=he._resolveTogglableStylesForElementModel(e)).element&&(Kt.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===(r=this.model.props.backgroundDynamicInlineSVGElements)||void 0===r?void 0:r.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),a.push("background")));let s=e.styleAttributes.background,l=s&&s.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&l){this.componentResourceManager.getPending().increment();const t=new Image;t.src=l[1],At(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),At(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:Xt(e.styleAttributes,a)});if($t.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)),z({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(.${i("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 o=t;return(o.classes||"").split(" ").filter((t=>t.startsWith(n))).forEach((t=>{var n;let i=null===(n=e.textClasses)||void 0===n?void 0:n[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})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),i.placeholderStyleAttributes)}))})),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:e.textFontFamily})})),o}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",r)=>{const a=Object.keys(n).reduce(((t,e)=>t+` ${Yt.camelCaseToDashCase(e)}: ${n[e]}${r?" !important;":";"}`),"");z({element:t,html:`[${i("element")}="${e}"]${o} { ${a} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{z({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,r;e.linkColor&&z({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)&&z({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)&&z({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!==o("hovered")&&t!==o("focused"))).forEach((e=>{e.startsWith(n)&&t.classList.remove(e)}));const i=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",i)},this.getParentComponent=()=>le(this.parentNode,i("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(i("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:le(this.parentNode,i("path"),void 0,(t=>1===(null==t?void 0:t.split(",").length)))},this.getWidgetLanguages=()=>at(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>st(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,a;const s=t.control.name;if(["email","first_name","last_name"].includes(s))return s.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===(a=t.control)||void 0===a?void 0:a.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===ce));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:ft.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()}}he._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=he._resolveTogglableStyles(e[t]))})),e},he._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 me=he,ve=Symbol("required");var ge=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n};function fe(){}const be="pending",ye="valid",Ee="invalid";class Oe extends me{constructor(){super(...arguments),this._createControl=(t={},...e)=>{const{element:n}=t,o=ge(t,["element"]),i=this.getProps(),r=this.getModel(),a=Object.assign(Object.assign(Object.assign({},i.control),{componentId:r.id,viewIdx:r.path[0]}),o),s=this.services.form,l=[a,n,...e];return s.hasControl(i.control.name)?s.updateControl(...l):s.registerControl(...l)},this.createControlWithValidation=(t=[],e={})=>{const{element:n=this.getElement("input"),tooltipElement:o=this.getRootElement().querySelector(".input-tooltip"),validCallback:i=fe,invalidCallback:r=fe,pendingCallback:a=fe,elementToListen:s=n,validationMap:l={},listenStatusChange:c=!0}=e,u=ge(e,["element","tooltipElement","validCallback","invalidCallback","pendingCallback","elementToListen","validationMap","listenStatusChange"]);if(o&&(o.style.visibility="hidden"),!t||!Array.isArray(t))throw new Error("Validators should be an array");const d=this.getProps().control.validation,p=(null==d?void 0:d.validator)?l[d.validator]:void 0,h=t.some((t=>t[ve])),m=!!(null==d?void 0:d.required),v=m||h,g=[...t];m&&!h&&g.unshift(function(t="REQUIRED"){const e=e=>{let n;switch(typeof e){case"string":n=e&&e.length>0;break;case"boolean":n=e;break;case"number":n=!isNaN(e);break;default:n=!!e}return{isValid:n,errorKey:n?null:t}};return e[ve]=!0,e}()),p&&g.push(p);const f=this._prepareAsyncValidators(g),b=this._createControl({element:n,validation:{validator:"custom",required:v}},void 0,f);return c&&this._handleControlStatusChange(Object.assign({control:b,element:s,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:i,invalidCallback:r,pendingCallback:a},u)),b},this._prepareAsyncValidators=(t=[])=>t.reduce(((t,e,n)=>"function"!=typeof e?(console.warn(`Validator ${n} should be a function, so it will be skipped`),t):(t[`custom_${n}`]=async(...t)=>{const n=await Promise.resolve(e(...t));return"object"==typeof n&&"isValid"in n?Object.assign(Object.assign({},n),{errorKey:n.isValid?null:n.errorKey}):{isValid:!1,errorKey:"INVALID_VALIDATOR_RESPONSE"}},t)),{}),this._handleControlStatusChange=t=>{t.control.on(c,(e=>{this._handleValidationStatus(t,e)})),t.control.on(u,(()=>{let e=be;switch(!0){case t.control.pending:e=be;break;case t.control.valid:e=ye;break;default:e=Ee}this._handleValidationStatus(t,e)}))},this._handleValidationStatus=(t,e)=>{const{control:n,element:o,tooltipElement:i,validCallback:r,invalidCallback:a,errorMessageMapper:s,pendingCallback:l}=t,c=this.services.config,u=this.manifest.i18n;switch(e){case ye:(function(t,e){t&&(t.classList.remove("invalid"),t.setAttribute("aria-invalid","false")),e&&(e.style.visibility="hidden")})(o,i),r&&r();break;case Ee:if(n.touched){const t=n.getErrorKeys();if(!t)break;const e=t[0];let r=function(t,e,n){const o=st(e,at(t));if(!o)return n;const i=o.translations,r=Object.keys(i).find((t=>t.includes(n)));return r?i[r]:n}(c,u,e);s&&(r=s(e,r)),function(t,e,n,o){o=o||document;let i=null;t&&(t.classList.add("invalid"),t.setAttribute("aria-invalid","true")),e&&(e.style.visibility="visible"),e&&(e.onmouseenter=()=>{(function(t){if((t=t||document).head.querySelector(`#${it}`))return;const e=document.createElement("style");e.setAttribute("id",it),z({element:e,html:rt}),t.head.appendChild(e)})(o),i=function(t){const e="cl-overlay-tooltip-text",n=document.getElementById(e)||document.createElement("div");return n.classList.add("cl-tooltip-text"),n.textContent!==t&&(n.textContent=t,n.style=null),n.id||(n.id=e),n}(n),o.body.append(i),i.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:n,offset:o=10,htmlDocumentObject:i}=t,r=J(e,n,o,"top",!0,i);n.setAttribute("cl-tooltip-position",r.position),K(n,r.coordinates)}({triggerElement:e,tooltipElement:i,htmlDocumentObject:o})},e.onmouseleave=()=>{i&&(i.remove(),function(t){const e=(t=t||document).head.querySelector(`#${it}`);e&&e.remove()}(o))})}(o,i,r,this.htmlDocumentObject),a&&a()}break;case be:n.touched&&(function(t,e){e&&(e.style.visibility="hidden"),t&&t.classList.contains("invalid")&&(t.classList.remove("invalid"),t.removeAttribute("aria-invalid"))}(o,i),l&&l())}}}}function Ce(t){return Ce="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},Ce(t)}function Se(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,Ie(o.key),o)}}function Te(t,e,n){return(e=Ie(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ie(t){var e=function(t){if("object"!=Ce(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ce(e)?e:e+""}var Ae=function(){return function(t,e){return e&&Se(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,n,o,i,r,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Te(this,"getRootElement",null),Te(this,"overlayElement",null),Te(this,"overlayBackdrop",null),Te(this,"configService",null),Te(this,"stateService",null),Te(this,"valueChangedCallback",null),Te(this,"overlayOptions",[]),Te(this,"activeOptionIndex",-1),Te(this,"searchInputElement",null),Te(this,"triggerElement",null),Te(this,"listboxId","cl-phone-input-listbox-".concat(Math.random().toString(36).slice(2,11))),Te(this,"navigationHint","selected"),Te(this,"boundEscapeKeyupGuard",null),this.getRootElement=e,this.getElement=n,this.configService=o,this.stateService=i,this.valueChangedCallback=r,this.htmlDocumentObject=a}),[{key:"createOverlay",value:function(t,e){var n,o=this,i=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).navigationHint,r=void 0===i?"selected":i,a=this.getRootElement();this.triggerElement=a.querySelector(".phone-input-select-button"),this.navigationHint=r,this.overlayBackdrop&&this.closeOverlay(!1);var s,l,c=function(t){const{triggerElement:e,overlayStyles:n,createOverlayContent:o,overlayWidth:i,overlayHeight:r,offset:a,onDestroy:s,positionByDefault:l,isHorizontallyCentered:c,isBackdropDisabledOnUI:u}=t,d=t.htmlDocumentObject||document,p=function(t){const e=document.createElement("div");return e.style.position="fixed",e.style.zIndex=String(Number.MAX_SAFE_INTEGER-1),e.style.top="0",e.style.left="0",e.style.width=t?"0px":"100%",e.style.height=t?"0px":"100%",e}(u),h=document.createElement("div");h.style.position="fixed",h.style.display="block",h.style.zIndex=String(Number.MAX_SAFE_INTEGER),i&&(h.style.width=`${i}px`),r&&(h.style.height=`${r}px`);const m=h.attachShadow({mode:"open"}),v=document.createElement("style");z({element:v,html:n}),m.append(v);const g=document.createElement("div");g.classList.add(Y()),d.body.append(p),d.body.append(h),m.append(g),o(p,g),(()=>{const t=J(e,g,function(t){return null!=t?t:5}(a),l,c,d);(function(t,e){t.setAttribute("cl-overlay-position",e)})(g,t.position),K(h,t.coordinates)})(),h.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault()}));const f=t=>{p.remove(),h.remove(),s&&s(),window.removeEventListener("keyup",t,!0)},b=t=>{"Escape"===t.key&&(t.preventDefault(),t.stopImmediatePropagation(),f(b))};return p.addEventListener("click",(()=>f(b))),window.addEventListener("keyup",b,!0),{backdrop:p,overlay:h}}({triggerElement:a.querySelector(".phone-input-with-tooltip"),overlayStyles:(s=Y(),l=this.configService.getConfig("staticResourcesUrl").replace(/\/$/,"")+"/SysPhoneInputComponent/assets/","\n.".concat(s," {\n width: 270px;\n max-height: 380px;\n box-shadow: 0 1px 5px rgba(0, 0, 0, 0.28);\n border-radius: 4px;\n padding: 20px 0;\n overflow: auto;\n position: absolute;\n background-color: #fff;\n}\n\n.").concat(s,"::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n background-color: transparent;\n}\n\n.").concat(s,"::-webkit-scrollbar-thumb {\n border-radius: 6px;\n background-color: #848484;\n}\n\n.search-country-input-container {\n display: flex;\n align-items: center;\n padding: 0 20px 20px;\n}\n\n.option-wrapper {\n background-color: #fff;\n border: 0;\n display: flex;\n align-items: center;\n font-size: 16px;\n padding: 10px 20px;\n outline: 0;\n cursor: pointer;\n text-align: left;\n flex-direction: row;\n}\n.option-wrapper:hover {\n background-color: #fafafa;\n}\n.phone-input-flag-icon {\n background: url(").concat(l,"img/flags.png) no-repeat 0 0;\n background-size: 24px 3876px;\n background-position-x: -1px;\n min-width: 24px;\n height: 16px;\n margin: 0 5px;\n}\n.phone-input-prefix {\n margin-left: 8px;\n color: #999;\n font-size: 14px;\n}\n\n.search-country-input {\n border: 0;\n border-bottom: 1px solid #000;\n border-radius: 0;\n outline: 0;\n margin-left: 10px;\n width: 170px;\n line-height: 1.42857143;\n}\n ")),createOverlayContent:function(e,n){n.setAttribute("role","listbox"),n.id=o.listboxId,o.createOverlayContent(a,e,n,t),o.overlayElement=n},overlayWidth:270,overlayHeight:380,htmlDocumentObject:this.htmlDocumentObject,onDestroy:function(){var t,n;o.overlayElement=null,o.overlayBackdrop=null,o.overlayOptions=[],o.activeOptionIndex=-1,o.searchInputElement=null,null===(t=o.triggerElement)||void 0===t||t.removeAttribute("aria-controls"),null===(n=o.triggerElement)||void 0===n||n.removeAttribute("aria-activedescendant"),null==e||e()}});this.overlayBackdrop=c.backdrop,null===(n=this.triggerElement)||void 0===n||n.setAttribute("aria-controls",this.listboxId)}},{key:"createOverlayContent",value:function(t,e,n,o){var i=this,r=this.stateService.getState().currentCountryCode,a=t.querySelector(".phone-input-select-button-flag");if(o.length>8){var s=document.createElement("div");s.classList.add("search-country-input-container");var l=document.createElement("input");l.classList.add("search-country-input"),l.setAttribute("role","combobox"),l.setAttribute("aria-autocomplete","list"),l.setAttribute("aria-expanded","true"),l.setAttribute("aria-controls",this.listboxId),l.setAttribute("aria-label","Search country code"),l.addEventListener("input",(function(t){return p(t.currentTarget.value)})),l.addEventListener("keydown",(function(t){return i.handleSearchInputKeydown(t)})),this.searchInputElement=l,s.appendChild(this.getSearchIcon()),s.appendChild(l),n.appendChild(s),setTimeout((function(){l.focus()}),0)}var c=function(t){const e=window.getComputedStyle(t);return["height","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius"].reduce(((t,n)=>(t[n]=e.getPropertyValue(n),t)),{})}(this.getElement("input")),u=function(t,e){return Math.min(Math.floor(parseInt(String(t))/2),parseInt(e.borderTopLeftRadius),parseInt(e.borderTopRightRadius),parseInt(e.borderBottomLeftRadius),parseInt(e.borderBottomRightRadius))}(c.height,c);K(n,{"border-top-left-radius":"".concat(u,"px"),"border-top-right-radius":"".concat(u,"px"),"border-bottom-left-radius":"".concat(u,"px"),"border-bottom-right-radius":"".concat(u,"px")});var d=document.createElement("div");K(d,{display:"flex",flexDirection:"column"}),n.appendChild(d);var p=function(t,e=300){let n;return function(...o){clearTimeout(n),n=setTimeout((()=>{t.apply(this,o)}),e)}}((function(t){var n=i.filterOptions(t,o);d.replaceChildren(),i.overlayOptions=[],n.length?(n.forEach((function(t,n){var o=r===t.countryCode,s=i.createMenuButtonComponent(t,o);s.addEventListener("click",(function(){i.selectCountry(t,a,e)})),s.addEventListener("mouseenter",(function(){i.setActiveOption(n,!1)})),d.appendChild(s),i.overlayOptions.push({country:t,element:s})})),i.setInitialActiveOption()):(i.clearActiveDescendant(),d.appendChild(i.getNothingFoundComponent()))}),100);p("")}},{key:"createMenuButtonComponent",value:function(t,e){var n=document.createElement("div");n.classList.add("option-wrapper"),n.setAttribute("role","option"),n.setAttribute("aria-selected",e?"true":"false"),n.id=this.getOptionId(t.countryCode);var o=document.createElement("span");o.classList.add("phone-input-flag-icon"),o.setAttribute("aria-hidden","true");var i=document.createElement("span");i.classList.add("phone-input-prefix");var r=document.createElement("span");return r.textContent=st(t.label,at(this.configService)).translations,r.style.color="#000",o.style.backgroundPositionY="".concat(t.position,"px"),i.textContent=t.prefix,e&&(n.style.backgroundColor="#fafafa"),n.appendChild(o),n.appendChild(r),n.appendChild(i),n}},{key:"getNothingFoundComponent",value:function(){var t=document.createElement("p");return t.style.padding="0 20px",t.textContent="Nothing found",t}},{key:"filterOptions",value:function(t,e){var n=this,o=t.trim().toLowerCase();return o?e.filter((function(t){return st(t.label,at(n.configService)).translations.toLowerCase().includes(o)})):e}},{key:"getSearchIcon",value:function(){var t=document.createElement("div");return function(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}({element:t,html:'\n <svg\n width="25"\n height="24"\n viewBox="0 0 25 24"\n fill="none"\n xmlns="http://www.w3.org/2000/svg">\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M17.005 14.9871C18.9001 12.2585 18.6317 8.48222 16.1997 6.05025C13.4661 3.31658 9.03392 3.31658 6.30025\n 6.05025C3.56658 8.78392 3.56658 13.2161 6.30025 15.9497C8.73224 18.3817 12.5085 18.6501 15.2372\n 16.7549L19.1369 20.6546L20.9046 18.8868L17.005 14.9871ZM14.7855 7.46447C16.7382 9.41709 16.7382 12.5829\n 14.7855 14.5355C12.8329 16.4882 9.66709 16.4882 7.71447 14.5355C5.76184 12.5829\n 5.76184 9.41709 7.71447 7.46447C9.66709 5.51184 12.8329 5.51184 14.7855 7.46447Z"\n fill="#5F5F5F"/>\n </svg>',isSvg:!0}),t}},{key:"focusSearchInput",value:function(){var t;null===(t=this.overlayElement)||void 0===t||null===(t=t.querySelector(".search-country-input"))||void 0===t||t.focus()}},{key:"isOpen",value:function(){return!!this.overlayBackdrop}},{key:"handleSearchInputKeydown",value:function(t){var e;switch(t.key){case"ArrowDown":t.preventDefault(),this.moveActiveOption(1);break;case"ArrowUp":t.preventDefault(),this.moveActiveOption(-1);break;case"Home":t.preventDefault(),this.setActiveOption(0);break;case"End":t.preventDefault(),this.setActiveOption(this.overlayOptions.length-1);break;case"Enter":t.preventDefault(),this.selectActiveOption();break;case"Escape":t.preventDefault(),null===(e=t.stopPropagation)||void 0===e||e.call(t),this.armEscapeKeyupGuard(),this.closeOverlay();break;case"Tab":this.closeOverlay(!1)}}},{key:"moveActiveOption",value:function(t){if(this.overlayOptions.length){var e=this.activeOptionIndex<0?t>0?0:this.overlayOptions.length-1:Math.max(0,Math.min(this.activeOptionIndex+t,this.overlayOptions.length-1));this.setActiveOption(e)}}},{key:"setInitialActiveOption",value:function(){if(this.overlayOptions.length)if("first"!==this.navigationHint)if("last"!==this.navigationHint){var t=this.stateService.getState().currentCountryCode,e=this.overlayOptions.findIndex((function(e){return e.country.countryCode===t}));this.setActiveOption(e>=0?e:0,!1)}else this.setActiveOption(this.overlayOptions.length-1,!1);else this.setActiveOption(0,!1);else this.clearActiveDescendant()}},{key:"setActiveOption",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.overlayOptions.length&&!(t<0)){this.activeOptionIndex=Math.max(0,Math.min(t,this.overlayOptions.length-1)),this.overlayOptions.forEach((function(t,n){t.element.classList.toggle("option-active",n===e.activeOptionIndex)}));var o=this.overlayOptions[this.activeOptionIndex];this.setActiveDescendant(o.element.id),n&&o.element.scrollIntoView({block:"nearest"})}}},{key:"selectActiveOption",value:function(){if(!(this.activeOptionIndex<0)){var t=this.overlayOptions[this.activeOptionIndex],e=this.getRootElement().querySelector(".phone-input-select-button-flag");this.selectCountry(t.country,e,this.overlayBackdrop)}}},{key:"selectCountry",value:function(t,e,n){var o;this.valueChangedCallback(t),e.style.backgroundPositionY="".concat(t.position,"px"),n.click(),null===(o=this.triggerElement)||void 0===o||o.focus()}},{key:"closeOverlay",value:function(){var t,e,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];null===(t=this.overlayBackdrop)||void 0===t||t.click(),n&&(null===(e=this.triggerElement)||void 0===e||e.focus())}},{key:"armEscapeKeyupGuard",value:function(){var t=this;this.removeEscapeKeyupGuard(),this.boundEscapeKeyupGuard=function(e){var n,o;"Escape"===e.key&&(null===(n=e.preventDefault)||void 0===n||n.call(e),null===(o=e.stopImmediatePropagation)||void 0===o||o.call(e),t.removeEscapeKeyupGuard())},window.addEventListener("keyup",this.boundEscapeKeyupGuard,!0)}},{key:"removeEscapeKeyupGuard",value:function(){this.boundEscapeKeyupGuard&&(window.removeEventListener("keyup",this.boundEscapeKeyupGuard,!0),this.boundEscapeKeyupGuard=null)}},{key:"getActiveDescendantOwner",value:function(){return this.searchInputElement||this.triggerElement}},{key:"setActiveDescendant",value:function(t){var e;null===(e=this.getActiveDescendantOwner())||void 0===e||e.setAttribute("aria-activedescendant",t)}},{key:"clearActiveDescendant",value:function(){var t,e;null===(t=this.searchInputElement)||void 0===t||t.removeAttribute("aria-activedescendant"),null===(e=this.triggerElement)||void 0===e||e.removeAttribute("aria-activedescendant")}},{key:"getOptionId",value:function(t){return"cl-phone-input-option-".concat(String(t).replace(/[^a-zA-Z0-9_-]/g,"-"))}}])}();const Re={en:"Select country code",ru:"Выберите код страны",uk:"Виберіть код країни",es:"Seleccionar código de país",de:"Ländervorwahl auswählen",fr:"Sélectionner le code du pays",it:"Seleziona prefisso del paese",pt:"Selecionar código do país",ro:"Selectați codul țării",bg:"Изберете код на държавата",cs:"Vyberte předvolbu země",el:"Επιλέξτε κωδικό χώρας",nl:"Selecteer landcode",pl:"Wybierz kod kraju",sv:"Välj landskod",tr:"Ülke kodunu seçin",ar:"حدد رمز البلد",zh:"选择国家代码",da:"Vælg landekode",he:"בחר קוד מדינה",fi:"Valitse maakoodi",hi:"देश कोड चुनें",hr:"Odaberite pozivni broj države",hu:"Válasszon országhívószámot",id:"Pilih kode negara",ja:"国コードを選択",ko:"국가 코드 선택",no:"Velg landkode",sk:"Vyberte predvoľbu krajiny",sl:"Izberite kodo države",sr:"Izaberite pozivni broj države"};function xe(t){return xe="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},xe(t)}function Ne(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,De(o.key),o)}}function _e(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_e=function(){return!!t})()}function Le(t,e,n,o){var i=we(ke(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function we(){return we="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ke(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}},we.apply(null,arguments)}function ke(t){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ke(t)}function Pe(t,e){return Pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pe(t,e)}function Me(t,e,n){return(e=De(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function De(t){var e=function(t){if("object"!=xe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xe(e)?e:e+""}var Ue=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 Me(e=function(t,e,n){return e=ke(e),function(t,e){if(e&&("object"==xe(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,_e()?Reflect.construct(e,n||[],ke(t).constructor):e.apply(t,n))}(this,t,[].concat(o)),"getValidators",(function(){return[function(t){return t&&t.replace(/[+()\-_ ]/g,"").match(/^\d+$/)?{isValid:!0}:{isValid:!1,errorKey:"PHONE_INVALID_NUMBER"}}]})),Me(e,"addContextRecord",(function(t){var n,o=e.getModel();e.services.context.addRecord(o.id,{recordKey:o.id,id:o.props.control.name,label:"PHONE",value:o.props.control.defaultValue||"",viewIndex:null===(n=o.path)||void 0===n?void 0:n[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:"".concat(t,"6402577610")}})})),Me(e,"updateContext",(function(){var t,n=e.getModel();e.services.context.updateRecord(n.id,{viewIndex:null===(t=n.path)||void 0===t?void 0:t[0]})})),Me(e,"requestCountryData",(function(){return fetch("".concat(e.assets("json/country-code-options.json"))).then((function(t){return t.json()}))})),Me(e,"applyParams",(function(t,n){var o=e.getRootElement().querySelector(".phone-input-select-button"),i=e.getInputElement(),r=t.adaptiveStyles[n].find((function(t){return"input"===t.element})).styleAttributes.paddingLeft||"10px";K(o,{left:r}),K(i,{paddingLeft:"".concat(parseFloat(r)+51,"px")})})),Me(e,"getInputElement",(function(){return e.getRootElement().querySelector(".phone-input")})),Me(e,"setValue",(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=e.services.state.getState().currentCountryCode||t.control.countryCode||e.defaultCountryCode;e.services.state.setState({currentCountryCode:o});var i=e.countryData.find((function(t){return t.countryCode===o})),r=e.getRootElement(),a=e.getInputElement(),s=r.querySelector(".phone-input-select-button-flag"),l=i&&i.prefix||"+380";s.style.backgroundPositionY=i?"".concat(i.position,"px")||0:"-2721px",s.style.opacity="1";var c=e.services.form.hasControl(t.control.name)?e.services.form.getControl(t.control.name):null,u=n||(null==c?void 0:c.getValue())||l;a.value=u,c&&c.setValue(u,{silent:!0,skipValidation:!0})})),Me(e,"getAvailableOptions",(function(t,n){return n.allowToAddOnlyFromIncludedList&&(t=n.includedList.map((function(e){var n=t.find((function(t){return t.countryCode===e}));if(!n)throw new Error("SysPhoneInputComponent: could not found ".concat(e," in options array"));return n}))),e.sortOptionsByPriority(t,n)})),Me(e,"sortOptionsByPriority",(function(t,e){return e.includedList.reverse().forEach((function(e){var n=t.findIndex((function(t){return t.countryCode===e}));if(-1===n)throw new Error("SysPhoneInputComponent: could not found ".concat(e," in options array"));var o=t[n];t.splice(n,1),t.unshift(o)})),t})),Me(e,"setArrowIconStyles",(function(){var t=e.getElement("input").style.color;e.getRootElement().querySelector(".dropdown-icon").style.color=t})),Me(e,"valueChangedCallback",(function(t){if(!e.countryCodeSelectedAtLeastOnce&&e.countryData){var n=e.getCountryOptionByValue(t);if(n){var o=e.services.state.getState().currentCountryCode;n.countryCode!==o&&(e.services.state.setState({currentCountryCode:n.countryCode}),e.getRootElement().querySelector(".phone-input-select-button-flag").style.backgroundPositionY="".concat(n.position,"px"))}}})),Me(e,"getCountryOptionByValue",(function(t){var n=t.startsWith("+")?t:"+".concat(t);return e.availableOptions.find((function(t){return n.startsWith(t.prefix)}))})),Me(e,"createPhoneInputFormControl",(function(){var t=e.getRootElement(),n=e.getInputElement(),o=t.querySelector(".phone-input-asyncLoader");e.phoneInputFormControl=e.createControlWithValidation(e.getValidators(),{validCallback:function(){return o.style.visibility="hidden"},invalidCallback:function(){return o.style.visibility="hidden"},pendingCallback:function(){return o.style.visibility="visible"}}),e.phoneInputFormControl.on("valueChanged",(function(t){e.valueChangedCallback((t||"").trim())})),e.createPhoneInputFormControlHandler&&n.removeEventListener("input",e.createPhoneInputFormControlHandler)})),Me(e,"menuOptionSelected",(function(t){e.phoneInputFormControl||e.createPhoneInputFormControl(),e.phoneInputFormControl.setValue(t.prefix),e.countryCodeSelectedAtLeastOnce=!0,e.services.state.setState({currentCountryCode:t.countryCode})})),Me(e,"manifest",s),Me(e,"countryData",null),Me(e,"registeredControl",null),Me(e,"countryCodeSelectedAtLeastOnce",!1),Me(e,"availableOptions",[]),Me(e,"defaultCountryCode","US"),Me(e,"openSelectMenu",null),Me(e,"handleSelectButtonKeydown",null),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&&Pe(t,e)}(t,Oe),function(t,e){return e&&Ne(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;Le(t,"connectedCallback",this,3)([]);var n=this.getTranslationsMap(Re).translations;this.getRootElement().innerHTML+="\n ".concat("\n<style>\n.main-container {\n height: 100%;\n}\n\n.label-with-input-container {\n height: 100%;\n display: flex;\n}\n\n.label {\n min-height: 10px;\n}\n\n.label.cl-focused {\n min-height: auto;\n}\n\n.phone-input-with-tooltip {\n position: relative;\n display: flex;\n height: 100%;\n width: 100%;\n}\n\n.invalid {\n border: 1px solid #ff0000 !important;\n}\n\n.input-tooltip {\n visibility: hidden;\n position: absolute;\n right: -10px;\n top: -10px;\n z-index: 1;\n border-radius: 100%;\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Chrome/Safari/Opera */\n -khtml-user-select: none; /* Konqueror */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n}\n\ninput {\n height: 100%;\n -moz-appearance:none;\n -webkit-appearance:none;\n -o-appearance:none;\n}\n\n.phone-input-select-button {\n background: transparent;\n border: none;\n min-width: max-content;\n width: 24px;\n height: 100%;\n display: flex;\n align-items: center;\n cursor: pointer;\n position: absolute;\n}\n\n.phone-input {\n height: 100%;\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n margin: 0;\n text-align: start !important;\n}\n\n.phone-input-select-button-flag {\n background-repeat: no-repeat;\n background-size: 24px 3876px;\n background-position-x: -1px;\n min-width: 24px;\n width: 24px;\n height: 16px;\n margin: auto 5px auto 0;\n}\n\n.phone-input-asyncLoader {\n height: 18px;\n width: 18px;\n border-radius: 50%;\n background-color: #ffffff;\n position: absolute;\n right: -9px;\n top: -9px;\n visibility: hidden;\n}\n\n.phone-input-asyncLoader .spinner--icon {\n animation: rotates 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -9px 0 0 -9px;\n width: 18px;\n height: 18px;\n}\n\n.phone-input-asyncLoader .spinner--icon .path {\n stroke: #9B9B9B;\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n.phone-input-asyncLoader .spinner--icon .path1 {\n stroke: #9B9B9B;\n stroke-linecap: round;\n animation: dash 1.25s ease-in-out infinite;\n}\n\n.phone-input-asyncLoader .spinner--icon @keyframes rotates {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.phone-input-asyncLoader .spinner--icon @keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}\n\ninput {\n width: 100%;\n}\n\ninput.focus-outline-defined:focus {\n outline: var(--clFocusOutline);\n}\n</style>\n ","\n ").concat(function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).selectCountryLabel;return'\n<div class="main-container">\n <div class="label-with-input-container">\n <div cl-element="label"\n cl-inline-edit="content, label"\n class="label"\n id="cl-phone-label">\n </div>\n\n <div class="phone-input-with-tooltip">\n <div class="phone-input-select-button"\n role="combobox"\n tabindex="0"\n aria-haspopup="listbox"\n aria-expanded="false"\n aria-label="'.concat(void 0===t?"Select country code":t,'">\n <div class="phone-input-select-button-flag" aria-hidden="true"></div>\n\n <svg width="11" height="7" viewBox="0 0 11 7" fill="none" xmlns="http://www.w3.org/2000/svg"\n class="dropdown-icon" aria-hidden="true">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M10.5248 1.90196L9.57381 2.71322L6.05712 5.71322L5.24395 6.40691L4.4324 5.71132L0.949088 2.72576L0 1.91229L1.62694 0.0141139L2.57603 0.827583L5.24778 3.11756L7.9513 0.811257L8.90228 0L10.5248 1.90196Z"\n fill="currentColor"/>\n </svg>\n </div>\n\n <input cl-element="input"\n type="tel"\n name="phone"\n autocomplete="on"\n aria-labelledby="cl-phone-label"\n class="phone-input">\n\n <div class="input-tooltip" aria-hidden="true">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">\n <path d="M1.5 13.0604C1.5 19.4116 6.6481 24.5605 13.0075 24.5605C19.353 24.5605 24.5 19.4107 24.5 13.0604C24.5 6.70865 19.3531 1.55909 13.0075 1.55908C6.64806 1.55908 1.5 6.7077 1.5 13.0604ZM12.9775 17.9668C12.7032 17.9668 12.4807 17.7443 12.4807 17.47C12.4807 17.1956 12.7032 16.9732 12.9775 16.9732C13.2519 16.9732 13.4743 17.1956 13.4743 17.47C13.4743 17.7443 13.2519 17.9668 12.9775 17.9668ZM12.9775 13.4764C12.7032 13.4764 12.4807 13.254 12.4807 12.9796L12.4807 8.48924C12.4807 8.21487 12.7032 7.99245 12.9775 7.99245C13.2519 7.99245 13.4743 8.21487 13.4743 8.48924L13.4743 12.9796C13.4743 13.254 13.2519 13.4764 12.9775 13.4764Z" fill="#FF0000" stroke="white" stroke-width="2"></path>\n </svg>\n </div>\n\n <span class="phone-input-asyncLoader" aria-hidden="true">\n <svg class="spinner--icon" viewBox="0 0 18 18" aria-hidden="true">\n <circle class="path" cx="9" cy="9" r="5" fill="none" stroke-width="2"></circle>\n <circle class="path1" cx="9" cy="9" r="2" fill="none" stroke-width="2"></circle>\n </svg>\n </span>\n </div>\n </div>\n</div>\n ')}({selectCountryLabel:n}),"\n ");var o=this.getRootElement(),i=this.getInputElement(),r=o.querySelector(".phone-input-select-button-flag");r.style.opacity="0",r.style.backgroundImage="url(".concat(this.assets("img/flags.png"),")"),this.requestCountryData().then((function(t){var n,o=e.getProps();e.countryData=t;var r=e.services.state.getState().currentCountryCode||o.control.countryCode||e.defaultCountryCode,a=o.control.countriesPriority||{includedList:[r],allowToAddOnlyFromIncludedList:!1};e.availableOptions=e.getAvailableOptions(e.countryData.slice(),a),(null===(n=e.getProps().control)||void 0===n||null===(n=n.validation)||void 0===n?void 0:n.required)?e.createPhoneInputFormControl():(e.createPhoneInputFormControlHandler=function(){return e.createPhoneInputFormControl()},i.addEventListener("input",e.createPhoneInputFormControlHandler)),e.setValue(o,o.control.defaultValue||null),e.phoneInputMenu=new Ae(e.getRootElement.bind(e),e.getElement.bind(e),e.services.config,e.services.state,e.menuOptionSelected.bind(e),e.htmlDocumentObject);var s=t.find((function(t){return t.countryCode===r}));e.addContextRecord((null==s?void 0:s.prefix)||"+380")})).catch((function(t){console.error("SysPhoneInputComponent: could not load country data",t),e.addContextRecord("+1")})),this.observeProps((function(t,n){var i,r=e.getEnvironment();if(e.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles),q(n,r,o,".label-with-input-container"),Z(n,r,e.getHostElement(),e.getElement("input"),e.getElement("label")),function(t){let e=null;const n=t,o=["transparent","initial"];t&&(t.style.borderColor&&!o.includes(t.style.borderColor)&&(parseFloat(t.style.borderWidth)||parseFloat(t.style.borderBottomWidth))&&(e=X(n,t,"borderColor")),!e&&t.style.getPropertyValue("--borderBottomColor")&&!o.includes(t.style.getPropertyValue("--borderBottomColor"))&&parseFloat(t.style.getPropertyValue("--borderBottomWidth"))&&(e=X(n,t,"--borderBottomColor")),e||!t.style.backgroundColor||o.includes(t.style.backgroundColor)||(e=X(n,t,"backgroundColor")),e||!t.style.color||o.includes(t.style.color)||(e=X(n,t,"color")),e||n.classList.remove("focus-outline-defined"))}(e.getElement("input")),e.getElement("input").setAttribute("aria-required",String(!(null===(i=n.control)||void 0===i||null===(i=i.validation)||void 0===i||!i.required))),e.applyParams(n,r),e.setArrowIconStyles(),e.updateContext(),e.countryData){var a=(null==t?void 0:t.control)||{},s=n.control||{};if(a.countryCode!==s.countryCode){var l=s.countryCode||e.defaultCountryCode,c=e.countryData.find((function(t){return t.countryCode===l}));e.services.state.setState({currentCountryCode:l}),e.setValue(n,null==c?void 0:c.prefix)}}})),this.observeEnvironment((function(t,n){var i=e.getProps();e.applyParams(i,n),q(i,n,o,".label-with-input-container"),Z(i,n,e.getHostElement(),e.getElement("input"),e.getElement("label")),e.setArrowIconStyles()})),this.observeShared((function(){e.applyParams(e.getProps(),e.getEnvironment()),e.setArrowIconStyles()}));var a=o.querySelector(".phone-input-select-button");this.openSelectMenu=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"selected";e.countryData&&!e.isUpdatingRenderMode()&&(a.setAttribute("aria-expanded","true"),setTimeout((function(){return e.phoneInputMenu.createOverlay(e.availableOptions,(function(){a.setAttribute("aria-expanded","false")}),{navigationHint:t})}),50),setTimeout((function(){e.phoneInputMenu.focusSearchInput()}),0))},this.handleSelectButtonKeydown=function(t){var n,o=null===(n=e.phoneInputMenu)||void 0===n?void 0:n.isOpen();switch(t.key){case"Enter":case" ":case"Spacebar":t.preventDefault(),o?e.phoneInputMenu.selectActiveOption():e.openSelectMenu();break;case"ArrowDown":t.preventDefault(),o?e.phoneInputMenu.moveActiveOption(1):e.openSelectMenu("first");break;case"ArrowUp":t.preventDefault(),o?e.phoneInputMenu.moveActiveOption(-1):e.openSelectMenu("last");break;case"Home":o&&(t.preventDefault(),e.phoneInputMenu.setActiveOption(0));break;case"End":o&&(t.preventDefault(),e.phoneInputMenu.setActiveOption(e.availableOptions.length-1));break;case"Escape":var i;o&&(t.preventDefault(),null===(i=t.stopPropagation)||void 0===i||i.call(t),e.phoneInputMenu.armEscapeKeyupGuard(),e.phoneInputMenu.closeOverlay())}},a.addEventListener("click",(function(){return e.openSelectMenu()})),a.addEventListener("keydown",this.handleSelectButtonKeydown)}},{key:"disconnectedCallback",value:function(){var e,n;Le(t,"disconnectedCallback",this,3)([]),this.services.context.deleteRecord(this.getModel().id),null===(e=this.phoneInputMenu)||void 0===e||null===(n=e.removeEscapeKeyupGuard)||void 0===n||n.call(e);var o=this.getRootElement().querySelector(".phone-input-select-button");null==o||o.removeEventListener("keydown",this.handleSelectButtonKeydown)}}])}();Me(Ue,"define",{name:"sys-phone-input",model:s.name,manifest:s});export{Ue as default};window.clComponentClass_SysPhoneInputComponent=Ue;
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="cl-";function o(t){return n+t}function i(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 a(t=[]){return t.map((t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)})))}const s={name:"SysPhoneInputComponent",componentType:"INPUT",version:"1.0.0",contextMenuModel:e([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),floatingControlsModel:e([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:e([{type:"CONTROL",name:"SIZE",element:"input",elementProp:"styleAttributes",params:{width:{options:["fixed","fill"]},height:{options:["fixed","fill"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"input",hideTextAlign:!0},{element:"label"}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"INPUT_LABEL",propPath:["styles","[element=label]","params"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"input",params:{indentationType:"PADDING",horizontalOnly:!0}},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]),general:[{type:"CONTROL",name:"COUNTRY_PHONE_SELECT",element:"input",propPath:["control"]},{type:"CONTROL",name:"INPUT_VALIDATION",params:{validationPropPath:["control","validation"],fieldTypePropPath:["control","fieldType"],required:!0,options:[{label:"Phone",value:"PHONE"}],validationErrors:{PHONE:[{key:"PHONE_INVALID_NUMBER",value:"Phone number is invalid"}]}}}]},autoContrast:[{slave:{element:"input",elementProp:"styleAttributes",elementSubProp:"color"},master:{element:"input",propPath:["styles","[element=input]","styleAttributes","background"]},enabledPropPath:["content","textContrastEnabled"]}],focusableElements:["input","label"],events:{dispatch:[],listen:[]},i18nPropPaths:["content,label","content,placeholder"],i18n:{en:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Phone number is invalid","control,validation,validationErrors,REQUIRED":"Required field","content,label":"Title"},ru:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Неверно заполнен номер телефона","control,validation,validationErrors,REQUIRED":"Обязательное поле","content,label":"Заголовок"},uk:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Неправильно заповнено номер телефону","control,validation,validationErrors,REQUIRED":"Обов'язкове поле","content,label":"Заголовок"},es:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"El número de teléfono no es válido","control,validation,validationErrors,REQUIRED":"Campo obligatorio","content,label":"Título"},de:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefonnummer ist ungültig","control,validation,validationErrors,REQUIRED":"Pflichtfeld","content,label":"Titel"},fr:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Le numéro de téléphone est invalide","control,validation,validationErrors,REQUIRED":"Champs requis","content,label":"Titre"},it:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Il numero di telefono non è valido","control,validation,validationErrors,REQUIRED":"Campo obbligatorio","content,label":"Titolo"},pt:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Número de telefone inválido","control,validation,validationErrors,REQUIRED":"Campo obrigatório","content,label":"Título"},ro:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Numărul de telefon nu este valid","control,validation,validationErrors,REQUIRED":"Câmp obligatoriu","content,label":"Titlu"},bg:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Телефонният номер е невалиден","control,validation,validationErrors,REQUIRED":"Изисквано поле","content,label":"Заглавие"},cs:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefonní číslo je neplatné","control,validation,validationErrors,REQUIRED":"Vyžadované pole","content,label":"Titul"},el:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Ο αριθμός τηλεφώνου είναι άκυρος","control,validation,validationErrors,REQUIRED":"Απαιτητό πεδίο","content,label":"Τίτλος"},nl:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefoonnummer is ongeldig","control,validation,validationErrors,REQUIRED":"Verplicht veld","content,label":"Titel"},pl:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Numer telefonu jest nieprawidłowy","control,validation,validationErrors,REQUIRED":"Wymagane pole","content,label":"Tytuł"},sv:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefonnumret är ogiltigt","control,validation,validationErrors,REQUIRED":"Obligatoriskt fält","content,label":"Tytuł"},tr:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefon numarası geçersiz","control,validation,validationErrors,REQUIRED":"Gerekli alan","content,label":"Başlık"},ar:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"رقم الهاتف غير صالح","control,validation,validationErrors,REQUIRED":"الحقل المطلوب","content,label":"عنوان"},zh:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"电话号码无效","control,validation,validationErrors,REQUIRED":"必填字段","content,label":"Title"},da:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefonnummer er ugyldigt","control,validation,validationErrors,REQUIRED":"Påkrævet felt","content,label":"Titel"},he:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"מספר טלפון לא תקין","control,validation,validationErrors,REQUIRED":"שדה נדרש","content,label":"Title"},fi:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Puhelinnumero on virheellinen","control,validation,validationErrors,REQUIRED":"Vaadittu kenttä","content,label":"Title"},hi:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"फ़ोन नंबर अमान्य है","control,validation,validationErrors,REQUIRED":"आवश्यक फील्ड","content,label":"Title"},hr:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefonski broj nije ispravan","control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title"},hu:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"A telefonszám érvénytelen","control,validation,validationErrors,REQUIRED":"Kötelező mező","content,label":"Title"},id:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Nomor telepon tidak valid","control,validation,validationErrors,REQUIRED":"Bidang yang wajib diisi","content,label":"Title"},ja:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"電話番号が無効です","control,validation,validationErrors,REQUIRED":"必須フィールド","content,label":"Title"},ko:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"유효하지 않은 전화번호","control,validation,validationErrors,REQUIRED":"필수 칸","content,label":"Title"},no:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefonnummeret er ugyldig","control,validation,validationErrors,REQUIRED":"Obligatorisk felt","content,label":"Title"},sk:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefónne číslo je neplatné","control,validation,validationErrors,REQUIRED":"Povinné pole","content,label":"Title"},sl:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Telefonska številka je neveljavna","control,validation,validationErrors,REQUIRED":"Obvezno polje","content,label":"Title"},sr:{"control,validation,validationErrors,PHONE_INVALID_NUMBER":"Broj telefona je nevažeći","control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title"}},props:{content:{label:"Title",textContrastEnabled:!0},control:{name:"phone",countryCode:"UA",countriesPriority:{includedList:["UA"],allowToAddOnlyFromIncludedList:!1},validation:{required:!0,validator:"PHONE"}},styles:[{element:"input",styleAttributes:{background:"rgb(255, 255, 255)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"1px",borderTopColor:"rgba(0, 0, 0, 0.1)",borderBottomWidth:"1px",borderBottomColor:"rgba(0, 0, 0, 0.1)",borderLeftWidth:"1px",borderLeftColor:"rgba(0, 0, 0, 0.1)",borderRightWidth:"1px",borderRightColor:"rgba(0, 0, 0, 0.1)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"}},{element:"label",params:{enabled:!1,position:"TOP",margin:5}}],adaptiveStyles:(l=[{element:"host",styleAttributes:{marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"input",styleAttributes:{width:"100%",minWidth:null,height:"35px",minHeight:"35px",color:"var(--cl-schema-text, rgb(0, 0, 0))",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0},placeholderStyleAttributes:{color:"rgb(81, 81, 81)"},classes:""},{element:"label",styleAttributes:{color:"var(--cl-schema-text, rgb(0, 0, 0))",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none"},classes:""}],Object.values(t).reduce(((t,e)=>Object.assign(t,{[e]:a(l)})),{desktop:[],mobile:[]}))},metaDescription:{icon:"/SysPhoneInputComponent/assets/img/component-icon.svg",label:{en:"Phone",ru:"Телефон",uk:"Телефон",es:"Teléfono",fr:"Téléphone",de:"Telefon",it:"Telefono",pt:"Telefone",ro:"Telefon",bg:"Телефон",cs:"Telefon",el:"Τηλέφωνο",nl:"Telefoon",pl:"Telefon",sv:"Telefon",tr:"Telefon",ar:"الهاتف",zh:"电话",da:"Telefon",he:"טלפון",fi:"Puhelin",hi:"फ़ोन",hr:"Telefon",hu:"Telefon",id:"Telepon",ja:"電話",ko:"휴대폰",no:"Telefon",sk:"Telefón",sl:"Telefon",sr:"Telefon"}},syncEnabled:!0,stylesImitationEnabled:!0};var l;const c="validationStatusChanged",u="touchedStatusChanged";class d{static size(t){return{width:this.width(t),height:this.height(t)}}static width(t){var e;const n=t||document;return Math.max(n.documentElement.clientWidth,(null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)}static height(t){var e;const n=t||document;return Math.max(n.documentElement.clientHeight,(null===(e=n.defaultView)||void 0===e?void 0:e.innerHeight)||0)}static scrollbarWidth(t){var e;const n=t||document;return((null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)-n.documentElement.clientWidth}}var p=[];for(var h in{transparent:"#0000"})p.push(h);var m="\\s*([.\\d%]+)\\s*",v="\\("+[m,m,m]+"(?:,\\s*([.\\d]+)\\s*)?\\)",g="(?:rgb)a?",f="("+p.join("|")+")";function b(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}RegExp(g+v,"i"),RegExp([f,"(?:#([a-f0-9]{3,8}))",g+v,"(?:hsl)a?"+v].join("|"),"gi");var y=Array.prototype.concat,E=Array.prototype.slice,O=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var i=t[n];b(i)?e=y.call(e,E.call(i)):e.push(i)}return e};O.wrap=function(t){return function(){return t(O(arguments))}};const C=O;var S={},T=Object.hasOwnProperty,I=Object.create(null);for(var A in S)T.call(S,A)&&(I[S[A]]=A);var R={to:{},get:{}};function x(t,e,n){return Math.min(Math.max(e,t),n)}R.get=function(t){var e,n;return"hsl"===t.substring(0,3).toLowerCase()?(e=R.get.hsl(t),n="hsl"):(e=R.get.rgb(t),n="rgb"),e?{model:n,value:e}:null},R.get.rgb=function(t){if(!t)return null;var e,n,o,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=e[2],e=e[1],n=0;n<3;n++){var r=2*n;i[n]=parseInt(e.slice(r,r+2),16)}o&&(i[3]=parseInt(o,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(o=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);o&&(i[3]=parseInt(o+o,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:T.call(S,e[1])?((i=S[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=x(i[n],0,255);return i[3]=x(i[3],0,1),i},R.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,x(parseFloat(e[2]),0,100),x(parseFloat(e[3]),0,100),x(isNaN(n)?1:n,0,1)]}return null},R.to.rgb=function(){var t=C(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},R.to.hsl=function(){var t=C(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};const N=R,_={},L={};for(const t of Object.keys(_))L[_[t]]=t;const w={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"}};Math.pow(6/29,3);for(const t of Object.keys(w)){if(!("channels"in w[t]))throw new Error("missing channels property: "+t);if(!("labels"in w[t]))throw new Error("missing channel labels property: "+t);if(w[t].labels.length!==w[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=w[t];delete w[t].channels,delete w[t].labels,Object.defineProperty(w[t],"channels",{value:e}),Object.defineProperty(w[t],"labels",{value:n})}w.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,i=Math.min(e,n,o),r=Math.max(e,n,o),a=r-i;let s,l;r===i?s=0:e===r?s=(n-o)/a:n===r?s=2+(o-e)/a:o===r&&(s=4+(e-n)/a),s=Math.min(60*s,360),s<0&&(s+=360);const c=(i+r)/2;return l=r===i?0:c<=.5?a/(r+i):a/(2-r-i),[s,100*l,100*c]},w.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let i,r,a;if(0===n)return a=255*o,[a,a,a];i=o<.5?o*(1+n):o+n-o*n;const s=2*o-i,l=[0,0,0];for(let t=0;t<3;t++)r=e+1/3*-(t-1),r<0&&r++,r>1&&r--,a=6*r<1?s+6*(i-s)*r:2*r<1?i:3*r<2?s+(i-s)*(2/3-r)*6:s,l[t]=255*a;return l};const k=w;function P(t,e){return function(n){return e(t(n))}}function M(t,e){const n=[e[t].parent,t];let o=k[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),o=P(k[e[i].parent][i],o),i=e[i].parent;return o.conversion=n,o}const D={};Object.keys(k).forEach((t=>{D[t]={},Object.defineProperty(D[t],"channels",{value:k[t].channels}),Object.defineProperty(D[t],"labels",{value:k[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(k);for(let n=e.length,o=0;o<n;o++)t[e[o]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;){const t=n.pop(),o=Object.keys(k[t]);for(let i=o.length,r=0;r<i;r++){const i=o[r],a=e[i];-1===a.distance&&(a.distance=e[t].distance+1,a.parent=t,n.unshift(i))}}return e}(t),n={},o=Object.keys(e);for(let t=o.length,i=0;i<t;i++){const t=o[i];null!==e[t].parent&&(n[t]=M(t,e))}return n}(t);Object.keys(e).forEach((n=>{const o=e[n];D[t][n]=function(t){const e=function(...e){const n=e[0];if(null==n)return n;n.length>1&&(e=n);const o=t(e);if("object"==typeof o)for(let t=o.length,e=0;e<t;e++)o[e]=Math.round(o[e]);return o};return"conversion"in t&&(e.conversion=t.conversion),e}(o),D[t][n].raw=function(t){const e=function(...e){const n=e[0];return null==n?n:(n.length>1&&(e=n),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(o)}))}));const U=D,B=["keyword","gray","hex"],j={};for(const t of Object.keys(U))j[[...U[t].labels].sort().join("")]=t;const H={};function V(t,e){if(!(this instanceof V))return new V(t,e);if(e&&e in B&&(e=null),e&&!(e in U))throw new Error("Unknown model: "+e);let n,o;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof V)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=N.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,o=U[this.model].channels,this.color=e.value.slice(0,o),this.valpha="number"==typeof e.value[o]?e.value[o]:1}else if(t.length>0){this.model=e||"rgb",o=U[this.model].channels;const n=Array.prototype.slice.call(t,0,o);this.color=G(n,o),this.valpha="number"==typeof t[o]?t[o]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const o=e.sort().join("");if(!(o in j))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=j[o];const{labels:i}=U[this.model],r=[];for(n=0;n<i.length;n++)r.push(t[i[n]]);this.color=G(r)}if(H[this.model])for(o=U[this.model].channels,n=0;n<o;n++){const t=H[this.model][n];t&&(this.color[n]=t(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}V.prototype={toString(){return this.string()},string(t){let e=this.model in N.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return N.to[e.model](n)},round(t){return t=Math.max(t||0,0),new V([...this.color.map(F(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new V([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e}};for(const t of Object.keys(U)){if(B.includes(t))continue;const{channels:e}=U[t];V.prototype[t]=function(...e){return this.model===t?new V(this):e.length>0?new V(e,t):new V([...W(U[this.model][t].raw(this.color)),this.valpha],t)},V[t]=function(...n){let o=n[0];return"number"==typeof o&&(o=G(n,e)),new V(o,t)}}function F(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function W(t){return Array.isArray(t)?t:[t]}function G(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}const $=V;function z(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}function K(t,e){Object.keys(e).forEach((n=>{t.style[n]=e[n]}))}function Q(t,e){var n,o;let i;return t.styles&&(i=null===(n=t.styles.find((t=>"label"===t.element)))||void 0===n?void 0:n.params),t.adaptiveStyles&&!i&&(i=null===(o=t.adaptiveStyles[e].find((t=>"label"===t.element)))||void 0===o?void 0:o.params),i}function q(t,e,n,o){var i;const r=n.querySelector(o),a=n.querySelector(".label"),s=Q(t,e);a&&function(t,e){if(!e)return;t.id||(t.id=((t="cl-a11y")=>`${t}-${Math.random().toString(36).slice(2,10)}`)("cl-label"));const n=e.getAttribute("role"),o="group"===n||"radiogroup"===n?e:e.querySelector('[cl-element="input"]');if(!o)return;const i=(o.getAttribute("aria-labelledby")||"").split(" ").filter(Boolean);i.includes(t.id)||(i.push(t.id),o.setAttribute("aria-labelledby",i.join(" ")))}(a,r),s&&a&&(z({element:a,html:(null===(i=t.content)||void 0===i?void 0:i.label)||""}),"TOP"===s.position?(r.style.flexDirection="column",r.style.alignItems="unset",K(a,{marginRight:"0",marginBottom:`${s.margin}px`})):(r.style.flexDirection="row",r.style.alignItems="center",K(a,{marginRight:`${s.margin}px`,marginBottom:"0"})),s.enabled?a.style.display="":a.style.display="none")}function Z(t,e,n,o,i){const r=function(t,e){var n;let o;if(t.styles){const e=null===(n=t.styles.find((t=>"input"===t.element)))||void 0===n?void 0:n.styleAttributes;(null==e?void 0:e.width)&&(o=e)}if(t.adaptiveStyles&&!o){const n=t.adaptiveStyles[e].find((t=>"input"===t.element)),i=null==n?void 0:n.styleAttributes;(null==i?void 0:i.width)&&(o=i)}return o}(t,e);if(!r)return;const a=Q(t,e),s=i&&a&&a.enabled&&"TOP"===a.position?i.getBoundingClientRect().height+(a.margin||0):0;r.width&&(r.width.includes("100%")?(o.style.width="100%",n.style.width=r.width):n.style.width="auto"),r.height&&(r.height.includes("100%")?(o.style.height="100%",n.style.height=r.height):n.style.height=`${parseFloat(r.height)+s}px`)}function X(t,e,n){const o=function(t,e){const n=getComputedStyle(t)[e]||t.style.getPropertyValue(e);if(n&&n.includes("rgb")&&(!(n.split("rgb").length>2)||n.includes("#")))return n}(e,n);if(o){const e=$(o).alpha(.5).string();return t.classList.add("focus-outline-defined"),t.style.setProperty("--clFocusOutline",`3px solid ${e}`),e}return null}function Y(){return o("overlay-menu-content")}function J(t,e,n,o,i,r){const a=function(t,e,n,o,i){const r=function(t,e,n,o){const i=d.width(o),{right:r}=t.getBoundingClientRect(),a=i-n-r-d.scrollbarWidth(o);return{horizontalOffset:n,contentWidth:tt(e).width,availableSpaceToTheLeftSideOfTheTrigger:r-n,availableSpaceToTheRightSideOfTheTrigger:a}}(t,e,n,i),a=function(t,e,n,o){const i=d.height(o),{top:r,bottom:a}=t.getBoundingClientRect();return{verticalOffset:n,contentHeight:tt(e).height,availableSpaceAboveTriggerElem:r-n,availableSpaceBelowTriggerElem:i-a-n}}(t,e,n,i);let s="undefined";const l={bottom:a.availableSpaceBelowTriggerElem>=a.contentHeight,top:a.availableSpaceAboveTriggerElem>=a.contentHeight,right:r.availableSpaceToTheRightSideOfTheTrigger>=r.contentWidth,left:r.availableSpaceToTheLeftSideOfTheTrigger>=r.contentWidth};if(l.top?s="top":l.bottom?s="bottom":l.right?s="right":l.left&&(s="left"),o&&l[o]&&(s=o),"undefined"===s){const t=Math.max(a.availableSpaceBelowTriggerElem,a.availableSpaceAboveTriggerElem,r.availableSpaceToTheRightSideOfTheTrigger,r.availableSpaceToTheLeftSideOfTheTrigger);t===a.availableSpaceBelowTriggerElem?s="bottom":t===a.availableSpaceAboveTriggerElem?s="top":t===r.availableSpaceToTheRightSideOfTheTrigger?s="right":t===r.availableSpaceToTheLeftSideOfTheTrigger&&(s="left")}return Object.assign(Object.assign(Object.assign({},a),r),{position:s})}(t,e,n,o,r=r||document);return function(t,e){const{marginBottom:n,marginTop:o}=window.getComputedStyle(e);if("top"===t.position)K(e,{"margin-top":`${parseInt(o,10)+parseInt(n,10)}px`}),K(e,{"margin-bottom":"0px"});else if("bottom"===t.position)K(e,{"margin-bottom":`${parseInt(n,10)+parseInt(o,10)}px`}),K(e,{"margin-top":"0px"});else{const t=(parseInt(n,10)+parseInt(o,10))/2+"px";K(e,{"margin-top":t,"margin-bottom":t})}}(a,e),{coordinates:et(a,t.getBoundingClientRect(),e.getBoundingClientRect(),i,r),position:a.position}}function tt(t){const{width:e,height:n}=t.getBoundingClientRect(),{marginBottom:o,marginTop:i,marginLeft:r,marginRight:a}=window.getComputedStyle(t);return{width:e+parseInt(r,10)+parseInt(a,10),height:n+parseInt(i,10)+parseInt(o,10)}}function et(t,e,n,o,i){switch(t.position){case"top":return{left:`${nt(e,n,o,i)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${nt(e,n,o,i)}px`,bottom:t.availableSpaceBelowTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"left":return{left:t.availableSpaceToTheLeftSideOfTheTrigger-e.width-t.contentWidth-t.horizontalOffset+"px",top:`${ot(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${ot(0,t)}px`}}}function nt(t,e,n,o){let i=n?t.x+t.width/2-e.width/2:t.x;return i<0&&(i=0),i+e.width>d.width(o)&&(i-=i+e.width-d.width(o)),i}function ot(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}const it="cl-tooltip-text-styles",rt=`\n .cl-tooltip-text {\n z-index: ${Number.MAX_SAFE_INTEGER};\n width: max-content;\n height: fit-content;\n visibility: hidden;\n background-color: white;\n color: #000;\n border: 1px solid rgb(194, 194, 194);\n border-radius: 5px;\n padding: 5px 10px;\n position: fixed;\n max-width: 300px;\n max-height: 100vh;\n box-shadow: 0 1px 5px rgba(0,0,0,.28);\n font-size: 14px;\n }\n\n .cl-tooltip-text[cl-tooltip-position='top']:before {\n content: "";\n position: absolute;\n top: 100%;\n left: calc(50% - 13px);\n border-width: 12px;\n border-style: solid;\n border-color: rgb(194, 194, 194) transparent transparent transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='top']:after {\n content: "";\n position: absolute;\n top: 100%;\n left: calc(50% - 5px);\n margin-left: -8px;\n margin-top: -2px;\n border-width: 12px;\n border-style: solid;\n border-color: white transparent transparent transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='bottom']:before {\n content: "";\n position: absolute;\n top: -24px;\n left: calc(50% - 9px);\n border-width: 12px;\n border-style: solid;\n border-color: transparent transparent rgb(194, 194, 194) transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='bottom']:after {\n content: "";\n position: absolute;\n top: -22px;\n left: calc(50% - 4px);\n margin-left: -5px;\n margin-bottom: -2px;\n border-width: 12px;\n border-style: solid;\n border-color: transparent transparent white transparent;\n }\n`;function at(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}function st(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)}const lt="VIEW",ct="MODULE",ut="CONTAINER",dt="INPUT",pt="BUTTON",ht="CONSENT",mt="COLUMN";var vt,gt;(gt=vt||(vt={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",gt.REQUEST="REQUEST",gt.DISPATCH_EVENT="DISPATCH_EVENT",gt.GO_TO_VIEW="GO_TO_VIEW",gt.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",gt.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",gt.SHOW_WIDGET="SHOW_WIDGET",gt.OPEN_LINK="OPEN_LINK",gt.CLOSE_WIDGET="CLOSE_WIDGET",gt.CLICK="CLICK";const ft=vt;var bt,yt;class Et{static sortActions(t){const e={[ft.CLOSE_WIDGET]:-1,[ft.OPEN_LINK]:-2,[ft.SHOW_WIDGET]:1,[ft.SUBSCRIBE_CONTACT]:2,[ft.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=Et.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(),r=o.getAttribute(i("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(i("type"))));let n=0;for(;e[n]&&e[n].getAttribute(i("id"))!==r;){let t=e[n].getAttribute(i("type"));if(Et.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,a=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 a.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=a.return)||await n.call(a)}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=[])}}Et.IGNORING_VIEW_ENTRY_TYPES=[pt,ht,dt],(yt=bt||(bt={})).CLICK="CLICK",yt.COMPONENT_EVENT="COMPONENT_EVENT";class Ot{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 Ct{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 bt.CLICK:return new Et(t,e);case bt.COMPONENT_EVENT:return new Ot(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class St{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 Tt{constructor(){this.listeners=Tt.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=St.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=Tt.createDefaultListenersState()}}Tt.createDefaultListenersState=()=>({"*":{}});const It=Tt,At=(t,e,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:r,addEventListener:a}=i;(r||a).call(t,e,n,o)};class Rt{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class xt{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===ct?Object.assign(Object.assign({},t),xt.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 Nt,_t,Lt,wt,kt,Pt,Mt,Dt,Ut,Bt,jt,Ht,Vt;xt.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(_t=Nt||(Nt={})).VIEW="VIEW",_t.CONTAINER="CONTAINER",_t.TEXT="TEXT",_t.INPUT="INPUT",_t.BUTTON="BUTTON",_t.IMAGE="IMAGE",_t.CONSENT="CONSENT",_t.COUNTDOWN_TIMER="COUNTDOWN_TIMER",_t.PROMO_CODE="PROMO_CODE",_t.MULTIPLE_INPUT="MULTIPLE_INPUT",_t.VIDEO="VIDEO",_t.SLIDER="SLIDER",_t.SLIDE="SLIDE",_t.SOCIAL="SOCIAL",_t.COLUMNS="COLUMNS",_t.COLUMN="COLUMN",_t.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(Lt||(Lt={})).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"}(wt||(wt={})),function(t){t.SELF="_self",t.BLANK="_blank"}(kt||(kt={})),(Pt||(Pt={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(Mt||(Mt={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(Dt||(Dt={})),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"}(Ut||(Ut={})),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"}(Bt||(Bt={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(jt||(jt={})),(Vt=Ht||(Ht={})).BEFORE="BEFORE",Vt.AFTER="AFTER",Vt.INSIDE="INSIDE",Vt.INSTEAD="INSTEAD";class Ft extends It{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(Ft.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(Ft.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(Ft.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}Ft.changeEventName="CHANGE";const Wt=Ft;class Gt{static set(t,e){const n=t[Gt.accumulatorPropertyName]||{};t[Gt.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[Gt.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}Gt.accumulatorPropertyName="clStyleAttributes";const $t=Gt;var zt;!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"}(zt||(zt={}));class Kt{static applyHostStyles(t,e,n=null,o){var i,r,a;const s=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));s&&(null===(a=s.actions)||void 0===a?void 0:a.length)&&(e.style.cursor="pointer"),t!==lt&&t!==ut&&t!==mt||(e.style.display=o===zt.CONTENT_LOCKER&&t===lt?"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 Qt{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class qt{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,a,s;const l=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)))||{},u=(null===(a=null==c?void 0:c.styleAttributes)||void 0===a?void 0:a.background)||(null===(s=null==l?void 0:l.styleAttributes)||void 0===s?void 0:s.background),d=this.parseBackground(u);d.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:d.url,inlineSvgString:null,positionOptions:d.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),Qt.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 Zt=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 Xt(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class Yt{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 Jt{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 te;!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.SUBMIT_REQUEST_STARTED="SUBMIT_REQUEST_STARTED",t.SUBMIT_REQUEST_FINISHED="SUBMIT_REQUEST_FINISHED",t.PROMO_CODE_SHOWN="PROMO_CODE_SHOWN"}(te||(te={}));const ee=te;class ne{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(ee.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(ee.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 Jt(this.onCounterStateUpdate)}}}const oe=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>oe(...t)}},ie=oe,re="props",ae="shared",se="environment";function le(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===(a=null==r?void 0:r.getAttribute)||void 0===a?void 0:a.call(r,e))===n)?r:r&&r.parentNode&&i(r.parentNode)||null;var a};return i(t)}const ce="SUBMIT";function ue(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}class de extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}var pe;!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(pe||(pe={}));class he extends HTMLElement{constructor(){var t;super(),this.skipGameBlur=!0,this.construct=()=>{let t;const e=this.getAttribute(i("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${i("widget-id")}]`);let r;o&&(r=o.getAttribute(i("widget-id")));let a=new de("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(i("path")),id:e,widgetId:r},{bubbles:!0,composed:!0});this.dispatchEvent(a),t=a.detail.props,Object.assign(this,t),this.observers=ie(re,ae,se),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 Rt({}),this.componentEventEmitter=new It,this.componentResourceManager=new ne(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new Ct(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(re).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=i("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(ae).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new qt(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),Zt),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(Wt.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(se).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")===pe.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===pe.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(re).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(ae).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(se).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${i("element")}]`)).filter((t=>!t.hasAttribute(i("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute(i("element"))===t&&n.id===e:n.getAttribute(i("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&&(ue(n,t),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(ue(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),a=i("type"),s="element-styles";let l=this.getRootElement().querySelector(`style[${a}="${s}"]`);l||(l=document.createElement("style"),l.setAttribute(a,s),this.getRootElement().appendChild(l)),z({element:l,html:""}),n.forEach((t=>{let e=t.getAttribute(i("element"));const n=this.getEnvironment();let a=r(o,n,e);if(a){if(this.resizeListener.isMobile()){const t=r(o,"desktop",e);t&&(a=Object.assign(Object.assign({},a),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),a.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(a),l)}})),this._addLinkColor(l,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,r;const a=[];"host"===(e=he._resolveTogglableStylesForElementModel(e)).element&&(Kt.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===(r=this.model.props.backgroundDynamicInlineSVGElements)||void 0===r?void 0:r.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),a.push("background")));let s=e.styleAttributes.background,l=s&&s.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&l){this.componentResourceManager.getPending().increment();const t=new Image;t.src=l[1],At(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),At(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:Xt(e.styleAttributes,a)});if($t.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)),z({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(.${i("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 o=t;return(o.classes||"").split(" ").filter((t=>t.startsWith(n))).forEach((t=>{var n;let i=null===(n=e.textClasses)||void 0===n?void 0:n[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})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),i.placeholderStyleAttributes)}))})),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:e.textFontFamily})})),o}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",r)=>{const a=Object.keys(n).reduce(((t,e)=>t+` ${Yt.camelCaseToDashCase(e)}: ${n[e]}${r?" !important;":";"}`),"");z({element:t,html:`[${i("element")}="${e}"]${o} { ${a} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{z({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,r;e.linkColor&&z({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)&&z({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)&&z({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!==o("hovered")&&t!==o("focused"))).forEach((e=>{e.startsWith(n)&&t.classList.remove(e)}));const i=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",i)},this.getParentComponent=()=>le(this.parentNode,i("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(i("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:le(this.parentNode,i("path"),void 0,(t=>1===(null==t?void 0:t.split(",").length)))},this.getWidgetLanguages=()=>at(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>st(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,a;const s=t.control.name;if(["email","first_name","last_name"].includes(s))return s.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===(a=t.control)||void 0===a?void 0:a.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===ce));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:ft.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()}}he._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=he._resolveTogglableStyles(e[t]))})),e},he._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 me=he,ve=Symbol("required");var ge=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n};function fe(){}const be="pending",ye="valid",Ee="invalid";class Oe extends me{constructor(){super(...arguments),this._createControl=(t={},...e)=>{const{element:n}=t,o=ge(t,["element"]),i=this.getProps(),r=this.getModel(),a=Object.assign(Object.assign(Object.assign({},i.control),{componentId:r.id,viewIdx:r.path[0]}),o),s=this.services.form,l=[a,n,...e];return s.hasControl(i.control.name)?s.updateControl(...l):s.registerControl(...l)},this.createControlWithValidation=(t=[],e={})=>{const{element:n=this.getElement("input"),tooltipElement:o=this.getRootElement().querySelector(".input-tooltip"),validCallback:i=fe,invalidCallback:r=fe,pendingCallback:a=fe,elementToListen:s=n,validationMap:l={},listenStatusChange:c=!0}=e,u=ge(e,["element","tooltipElement","validCallback","invalidCallback","pendingCallback","elementToListen","validationMap","listenStatusChange"]);if(o&&(o.style.visibility="hidden"),!t||!Array.isArray(t))throw new Error("Validators should be an array");const d=this.getProps().control.validation,p=(null==d?void 0:d.validator)?l[d.validator]:void 0,h=t.some((t=>t[ve])),m=!!(null==d?void 0:d.required),v=m||h,g=[...t];m&&!h&&g.unshift(function(t="REQUIRED"){const e=e=>{let n;switch(typeof e){case"string":n=e&&e.length>0;break;case"boolean":n=e;break;case"number":n=!isNaN(e);break;default:n=!!e}return{isValid:n,errorKey:n?null:t}};return e[ve]=!0,e}()),p&&g.push(p);const f=this._prepareAsyncValidators(g),b=this._createControl({element:n,validation:{validator:"custom",required:v}},void 0,f);return c&&this._handleControlStatusChange(Object.assign({control:b,element:s,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:i,invalidCallback:r,pendingCallback:a},u)),b},this._prepareAsyncValidators=(t=[])=>t.reduce(((t,e,n)=>"function"!=typeof e?(console.warn(`Validator ${n} should be a function, so it will be skipped`),t):(t[`custom_${n}`]=async(...t)=>{const n=await Promise.resolve(e(...t));return"object"==typeof n&&"isValid"in n?Object.assign(Object.assign({},n),{errorKey:n.isValid?null:n.errorKey}):{isValid:!1,errorKey:"INVALID_VALIDATOR_RESPONSE"}},t)),{}),this._handleControlStatusChange=t=>{t.control.on(c,(e=>{this._handleValidationStatus(t,e)})),t.control.on(u,(()=>{let e=be;switch(!0){case t.control.pending:e=be;break;case t.control.valid:e=ye;break;default:e=Ee}this._handleValidationStatus(t,e)}))},this._handleValidationStatus=(t,e)=>{const{control:n,element:o,tooltipElement:i,validCallback:r,invalidCallback:a,errorMessageMapper:s,pendingCallback:l}=t,c=this.services.config,u=this.manifest.i18n;switch(e){case ye:(function(t,e){t&&(t.classList.remove("invalid"),t.setAttribute("aria-invalid","false")),e&&(e.style.visibility="hidden")})(o,i),r&&r();break;case Ee:if(n.touched){const t=n.getErrorKeys();if(!t)break;const e=t[0];let r=function(t,e,n){const o=st(e,at(t));if(!o)return n;const i=o.translations,r=Object.keys(i).find((t=>t.includes(n)));return r?i[r]:n}(c,u,e);s&&(r=s(e,r)),function(t,e,n,o){o=o||document;let i=null;t&&(t.classList.add("invalid"),t.setAttribute("aria-invalid","true")),e&&(e.style.visibility="visible"),e&&(e.onmouseenter=()=>{(function(t){if((t=t||document).head.querySelector(`#${it}`))return;const e=document.createElement("style");e.setAttribute("id",it),z({element:e,html:rt}),t.head.appendChild(e)})(o),i=function(t){const e="cl-overlay-tooltip-text",n=document.getElementById(e)||document.createElement("div");return n.classList.add("cl-tooltip-text"),n.textContent!==t&&(n.textContent=t,n.style=null),n.id||(n.id=e),n}(n),o.body.append(i),i.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:n,offset:o=10,htmlDocumentObject:i}=t,r=J(e,n,o,"top",!0,i);n.setAttribute("cl-tooltip-position",r.position),K(n,r.coordinates)}({triggerElement:e,tooltipElement:i,htmlDocumentObject:o})},e.onmouseleave=()=>{i&&(i.remove(),function(t){const e=(t=t||document).head.querySelector(`#${it}`);e&&e.remove()}(o))})}(o,i,r,this.htmlDocumentObject),a&&a()}break;case be:n.touched&&(function(t,e){e&&(e.style.visibility="hidden"),t&&t.classList.contains("invalid")&&(t.classList.remove("invalid"),t.removeAttribute("aria-invalid"))}(o,i),l&&l())}}}}function Ce(t){return Ce="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},Ce(t)}function Se(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,Ie(o.key),o)}}function Te(t,e,n){return(e=Ie(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ie(t){var e=function(t){if("object"!=Ce(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ce(e)?e:e+""}var Ae=function(){return function(t,e){return e&&Se(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,n,o,i,r,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Te(this,"getRootElement",null),Te(this,"overlayElement",null),Te(this,"overlayBackdrop",null),Te(this,"configService",null),Te(this,"stateService",null),Te(this,"valueChangedCallback",null),Te(this,"overlayOptions",[]),Te(this,"activeOptionIndex",-1),Te(this,"searchInputElement",null),Te(this,"triggerElement",null),Te(this,"listboxId","cl-phone-input-listbox-".concat(Math.random().toString(36).slice(2,11))),Te(this,"navigationHint","selected"),Te(this,"boundEscapeKeyupGuard",null),this.getRootElement=e,this.getElement=n,this.configService=o,this.stateService=i,this.valueChangedCallback=r,this.htmlDocumentObject=a}),[{key:"createOverlay",value:function(t,e){var n,o=this,i=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).navigationHint,r=void 0===i?"selected":i,a=this.getRootElement();this.triggerElement=a.querySelector(".phone-input-select-button"),this.navigationHint=r,this.overlayBackdrop&&this.closeOverlay(!1);var s,l,c=function(t){const{triggerElement:e,overlayStyles:n,createOverlayContent:o,overlayWidth:i,overlayHeight:r,offset:a,onDestroy:s,positionByDefault:l,isHorizontallyCentered:c,isBackdropDisabledOnUI:u}=t,d=t.htmlDocumentObject||document,p=function(t){const e=document.createElement("div");return e.style.position="fixed",e.style.zIndex=String(Number.MAX_SAFE_INTEGER-1),e.style.top="0",e.style.left="0",e.style.width=t?"0px":"100%",e.style.height=t?"0px":"100%",e}(u),h=document.createElement("div");h.style.position="fixed",h.style.display="block",h.style.zIndex=String(Number.MAX_SAFE_INTEGER),i&&(h.style.width=`${i}px`),r&&(h.style.height=`${r}px`);const m=h.attachShadow({mode:"open"}),v=document.createElement("style");z({element:v,html:n}),m.append(v);const g=document.createElement("div");g.classList.add(Y()),d.body.append(p),d.body.append(h),m.append(g),o(p,g),(()=>{const t=J(e,g,function(t){return null!=t?t:5}(a),l,c,d);(function(t,e){t.setAttribute("cl-overlay-position",e)})(g,t.position),K(h,t.coordinates)})(),h.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault()}));const f=t=>{p.remove(),h.remove(),s&&s(),window.removeEventListener("keyup",t,!0)},b=t=>{"Escape"===t.key&&(t.preventDefault(),t.stopImmediatePropagation(),f(b))};return p.addEventListener("click",(()=>f(b))),window.addEventListener("keyup",b,!0),{backdrop:p,overlay:h}}({triggerElement:a.querySelector(".phone-input-with-tooltip"),overlayStyles:(s=Y(),l=this.configService.getConfig("staticResourcesUrl").replace(/\/$/,"")+"/SysPhoneInputComponent/assets/","\n.".concat(s," {\n width: 270px;\n max-height: 380px;\n box-shadow: 0 1px 5px rgba(0, 0, 0, 0.28);\n border-radius: 4px;\n padding: 20px 0;\n overflow: auto;\n position: absolute;\n background-color: #fff;\n}\n\n.").concat(s,"::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n background-color: transparent;\n}\n\n.").concat(s,"::-webkit-scrollbar-thumb {\n border-radius: 6px;\n background-color: #848484;\n}\n\n.search-country-input-container {\n display: flex;\n align-items: center;\n padding: 0 20px 20px;\n}\n\n.option-wrapper {\n background-color: #fff;\n border: 0;\n display: flex;\n align-items: center;\n font-size: 16px;\n padding: 10px 20px;\n outline: 0;\n cursor: pointer;\n text-align: left;\n flex-direction: row;\n transition: background-color 0.15s ease, box-shadow 0.15s ease;\n}\n.option-wrapper:hover,\n.option-wrapper.option-active,\n.option-wrapper.option-selected {\n background-color: #fafafa;\n}\n\n.option-wrapper.option-active {\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);\n}\n.phone-input-flag-icon {\n background: url(").concat(l,"img/flags.png) no-repeat 0 0;\n background-size: 24px 3876px;\n background-position-x: -1px;\n min-width: 24px;\n height: 16px;\n margin: 0 5px;\n}\n.phone-input-prefix {\n margin-left: 8px;\n color: #999;\n font-size: 14px;\n}\n\n.search-country-input {\n border: 0;\n border-bottom: 1px solid #000;\n border-radius: 0;\n outline: 0;\n margin-left: 10px;\n width: 170px;\n line-height: 1.42857143;\n}\n ")),createOverlayContent:function(e,n){n.setAttribute("role","listbox"),n.id=o.listboxId,o.createOverlayContent(a,e,n,t),o.overlayElement=n},overlayWidth:270,overlayHeight:380,htmlDocumentObject:this.htmlDocumentObject,onDestroy:function(){var t,n;o.overlayElement=null,o.overlayBackdrop=null,o.overlayOptions=[],o.activeOptionIndex=-1,o.searchInputElement=null,null===(t=o.triggerElement)||void 0===t||t.removeAttribute("aria-controls"),null===(n=o.triggerElement)||void 0===n||n.removeAttribute("aria-activedescendant"),null==e||e()}});this.overlayBackdrop=c.backdrop,null===(n=this.triggerElement)||void 0===n||n.setAttribute("aria-controls",this.listboxId)}},{key:"createOverlayContent",value:function(t,e,n,o){var i=this,r=this.stateService.getState().currentCountryCode,a=t.querySelector(".phone-input-select-button-flag");if(o.length>8){var s=document.createElement("div");s.classList.add("search-country-input-container");var l=document.createElement("input");l.classList.add("search-country-input"),l.setAttribute("role","combobox"),l.setAttribute("aria-autocomplete","list"),l.setAttribute("aria-expanded","true"),l.setAttribute("aria-controls",this.listboxId),l.setAttribute("aria-label","Search country code"),l.addEventListener("input",(function(t){return p(t.currentTarget.value)})),l.addEventListener("keydown",(function(t){return i.handleSearchInputKeydown(t)})),this.searchInputElement=l,s.appendChild(this.getSearchIcon()),s.appendChild(l),n.appendChild(s),setTimeout((function(){l.focus()}),0)}var c=function(t){const e=window.getComputedStyle(t);return["height","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius"].reduce(((t,n)=>(t[n]=e.getPropertyValue(n),t)),{})}(this.getElement("input")),u=function(t,e){return Math.min(Math.floor(parseInt(String(t))/2),parseInt(e.borderTopLeftRadius),parseInt(e.borderTopRightRadius),parseInt(e.borderBottomLeftRadius),parseInt(e.borderBottomRightRadius))}(c.height,c);K(n,{"border-top-left-radius":"".concat(u,"px"),"border-top-right-radius":"".concat(u,"px"),"border-bottom-left-radius":"".concat(u,"px"),"border-bottom-right-radius":"".concat(u,"px")});var d=document.createElement("div");K(d,{display:"flex",flexDirection:"column"}),n.appendChild(d);var p=function(t,e=300){let n;return function(...o){clearTimeout(n),n=setTimeout((()=>{t.apply(this,o)}),e)}}((function(t){var n=i.filterOptions(t,o);d.replaceChildren(),i.overlayOptions=[],n.length?(n.forEach((function(t,n){var o=r===t.countryCode,s=i.createMenuButtonComponent(t,o);s.addEventListener("click",(function(){i.selectCountry(t,a,e)})),s.addEventListener("mouseenter",(function(){i.setActiveOption(n,!1)})),d.appendChild(s),i.overlayOptions.push({country:t,element:s})})),i.setInitialActiveOption()):(i.clearActiveDescendant(),d.appendChild(i.getNothingFoundComponent()))}),100);p("")}},{key:"createMenuButtonComponent",value:function(t,e){var n=document.createElement("div");n.classList.add("option-wrapper"),e&&n.classList.add("option-selected"),n.setAttribute("role","option"),n.setAttribute("aria-selected",e?"true":"false"),n.id=this.getOptionId(t.countryCode);var o=document.createElement("span");o.classList.add("phone-input-flag-icon"),o.setAttribute("aria-hidden","true");var i=document.createElement("span");i.classList.add("phone-input-prefix");var r=document.createElement("span");return r.textContent=st(t.label,at(this.configService)).translations,r.style.color="#000",o.style.backgroundPositionY="".concat(t.position,"px"),i.textContent=t.prefix,n.appendChild(o),n.appendChild(r),n.appendChild(i),n}},{key:"getNothingFoundComponent",value:function(){var t=document.createElement("p");return t.style.padding="0 20px",t.textContent="Nothing found",t}},{key:"filterOptions",value:function(t,e){var n=this,o=t.trim().toLowerCase();return o?e.filter((function(t){return st(t.label,at(n.configService)).translations.toLowerCase().includes(o)})):e}},{key:"getSearchIcon",value:function(){var t=document.createElement("div");return function(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}({element:t,html:'\n <svg\n width="25"\n height="24"\n viewBox="0 0 25 24"\n fill="none"\n xmlns="http://www.w3.org/2000/svg">\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M17.005 14.9871C18.9001 12.2585 18.6317 8.48222 16.1997 6.05025C13.4661 3.31658 9.03392 3.31658 6.30025\n 6.05025C3.56658 8.78392 3.56658 13.2161 6.30025 15.9497C8.73224 18.3817 12.5085 18.6501 15.2372\n 16.7549L19.1369 20.6546L20.9046 18.8868L17.005 14.9871ZM14.7855 7.46447C16.7382 9.41709 16.7382 12.5829\n 14.7855 14.5355C12.8329 16.4882 9.66709 16.4882 7.71447 14.5355C5.76184 12.5829\n 5.76184 9.41709 7.71447 7.46447C9.66709 5.51184 12.8329 5.51184 14.7855 7.46447Z"\n fill="#5F5F5F"/>\n </svg>',isSvg:!0}),t}},{key:"focusSearchInput",value:function(){var t;null===(t=this.overlayElement)||void 0===t||null===(t=t.querySelector(".search-country-input"))||void 0===t||t.focus()}},{key:"isOpen",value:function(){return!!this.overlayBackdrop}},{key:"handleSearchInputKeydown",value:function(t){var e;switch(t.key){case"ArrowDown":t.preventDefault(),this.moveActiveOption(1);break;case"ArrowUp":t.preventDefault(),this.moveActiveOption(-1);break;case"Home":t.preventDefault(),this.setActiveOption(0);break;case"End":t.preventDefault(),this.setActiveOption(this.overlayOptions.length-1);break;case"Enter":t.preventDefault(),this.selectActiveOption();break;case"Escape":t.preventDefault(),null===(e=t.stopPropagation)||void 0===e||e.call(t),this.armEscapeKeyupGuard(),this.closeOverlay();break;case"Tab":this.closeOverlay(!1)}}},{key:"moveActiveOption",value:function(t){if(this.overlayOptions.length){var e=this.activeOptionIndex<0?t>0?0:this.overlayOptions.length-1:Math.max(0,Math.min(this.activeOptionIndex+t,this.overlayOptions.length-1));this.setActiveOption(e)}}},{key:"setInitialActiveOption",value:function(){if(this.overlayOptions.length)if("first"!==this.navigationHint)if("last"!==this.navigationHint){var t=this.stateService.getState().currentCountryCode,e=this.overlayOptions.findIndex((function(e){return e.country.countryCode===t}));this.setActiveOption(e>=0?e:0,!1)}else this.setActiveOption(this.overlayOptions.length-1,!1);else this.setActiveOption(0,!1);else this.clearActiveDescendant()}},{key:"setActiveOption",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.overlayOptions.length&&!(t<0)){this.activeOptionIndex=Math.max(0,Math.min(t,this.overlayOptions.length-1)),this.overlayOptions.forEach((function(t,n){t.element.classList.toggle("option-active",n===e.activeOptionIndex)}));var o=this.overlayOptions[this.activeOptionIndex];this.setActiveDescendant(o.element.id),n&&o.element.scrollIntoView({block:"nearest"})}}},{key:"selectActiveOption",value:function(){if(!(this.activeOptionIndex<0)){var t=this.overlayOptions[this.activeOptionIndex],e=this.getRootElement().querySelector(".phone-input-select-button-flag");this.selectCountry(t.country,e,this.overlayBackdrop)}}},{key:"selectCountry",value:function(t,e,n){var o;this.valueChangedCallback(t),e.style.backgroundPositionY="".concat(t.position,"px"),n.click(),null===(o=this.triggerElement)||void 0===o||o.focus()}},{key:"closeOverlay",value:function(){var t,e,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];null===(t=this.overlayBackdrop)||void 0===t||t.click(),n&&(null===(e=this.triggerElement)||void 0===e||e.focus())}},{key:"armEscapeKeyupGuard",value:function(){var t=this;this.removeEscapeKeyupGuard(),this.boundEscapeKeyupGuard=function(e){var n,o;"Escape"===e.key&&(null===(n=e.preventDefault)||void 0===n||n.call(e),null===(o=e.stopImmediatePropagation)||void 0===o||o.call(e),t.removeEscapeKeyupGuard())},window.addEventListener("keyup",this.boundEscapeKeyupGuard,!0)}},{key:"removeEscapeKeyupGuard",value:function(){this.boundEscapeKeyupGuard&&(window.removeEventListener("keyup",this.boundEscapeKeyupGuard,!0),this.boundEscapeKeyupGuard=null)}},{key:"getActiveDescendantOwner",value:function(){return this.searchInputElement||this.triggerElement}},{key:"setActiveDescendant",value:function(t){var e;null===(e=this.getActiveDescendantOwner())||void 0===e||e.setAttribute("aria-activedescendant",t)}},{key:"clearActiveDescendant",value:function(){var t,e;null===(t=this.searchInputElement)||void 0===t||t.removeAttribute("aria-activedescendant"),null===(e=this.triggerElement)||void 0===e||e.removeAttribute("aria-activedescendant")}},{key:"getOptionId",value:function(t){return"cl-phone-input-option-".concat(String(t).replace(/[^a-zA-Z0-9_-]/g,"-"))}}])}();const Re={en:"Select country code",ru:"Выберите код страны",uk:"Виберіть код країни",es:"Seleccionar código de país",de:"Ländervorwahl auswählen",fr:"Sélectionner le code du pays",it:"Seleziona prefisso del paese",pt:"Selecionar código do país",ro:"Selectați codul țării",bg:"Изберете код на държавата",cs:"Vyberte předvolbu země",el:"Επιλέξτε κωδικό χώρας",nl:"Selecteer landcode",pl:"Wybierz kod kraju",sv:"Välj landskod",tr:"Ülke kodunu seçin",ar:"حدد رمز البلد",zh:"选择国家代码",da:"Vælg landekode",he:"בחר קוד מדינה",fi:"Valitse maakoodi",hi:"देश कोड चुनें",hr:"Odaberite pozivni broj države",hu:"Válasszon országhívószámot",id:"Pilih kode negara",ja:"国コードを選択",ko:"국가 코드 선택",no:"Velg landkode",sk:"Vyberte predvoľbu krajiny",sl:"Izberite kodo države",sr:"Izaberite pozivni broj države"};function xe(t){return xe="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},xe(t)}function Ne(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,De(o.key),o)}}function _e(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_e=function(){return!!t})()}function Le(t,e,n,o){var i=we(ke(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function we(){return we="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ke(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}},we.apply(null,arguments)}function ke(t){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ke(t)}function Pe(t,e){return Pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pe(t,e)}function Me(t,e,n){return(e=De(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function De(t){var e=function(t){if("object"!=xe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xe(e)?e:e+""}var Ue=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 Me(e=function(t,e,n){return e=ke(e),function(t,e){if(e&&("object"==xe(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,_e()?Reflect.construct(e,n||[],ke(t).constructor):e.apply(t,n))}(this,t,[].concat(o)),"getValidators",(function(){return[function(t){return t&&t.replace(/[+()\-_ ]/g,"").match(/^\d+$/)?{isValid:!0}:{isValid:!1,errorKey:"PHONE_INVALID_NUMBER"}}]})),Me(e,"addContextRecord",(function(t){var n,o=e.getModel();e.services.context.addRecord(o.id,{recordKey:o.id,id:o.props.control.name,label:"PHONE",value:o.props.control.defaultValue||"",viewIndex:null===(n=o.path)||void 0===n?void 0:n[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:"".concat(t,"6402577610")}})})),Me(e,"updateContext",(function(){var t,n=e.getModel();e.services.context.updateRecord(n.id,{viewIndex:null===(t=n.path)||void 0===t?void 0:t[0]})})),Me(e,"requestCountryData",(function(){return fetch("".concat(e.assets("json/country-code-options.json"))).then((function(t){return t.json()}))})),Me(e,"applyParams",(function(t,n){var o=e.getRootElement().querySelector(".phone-input-select-button"),i=e.getInputElement(),r=t.adaptiveStyles[n].find((function(t){return"input"===t.element})).styleAttributes.paddingLeft||"10px";K(o,{left:r}),K(i,{paddingLeft:"".concat(parseFloat(r)+51,"px")})})),Me(e,"getInputElement",(function(){return e.getRootElement().querySelector(".phone-input")})),Me(e,"setValue",(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=e.services.state.getState().currentCountryCode||t.control.countryCode||e.defaultCountryCode;e.services.state.setState({currentCountryCode:o});var i=e.countryData.find((function(t){return t.countryCode===o})),r=e.getRootElement(),a=e.getInputElement(),s=r.querySelector(".phone-input-select-button-flag"),l=i&&i.prefix||"+380";s.style.backgroundPositionY=i?"".concat(i.position,"px")||0:"-2721px",s.style.opacity="1";var c=e.services.form.hasControl(t.control.name)?e.services.form.getControl(t.control.name):null,u=n||(null==c?void 0:c.getValue())||l;a.value=u,c&&c.setValue(u,{silent:!0,skipValidation:!0})})),Me(e,"getAvailableOptions",(function(t,n){return n.allowToAddOnlyFromIncludedList&&(t=n.includedList.map((function(e){var n=t.find((function(t){return t.countryCode===e}));if(!n)throw new Error("SysPhoneInputComponent: could not found ".concat(e," in options array"));return n}))),e.sortOptionsByPriority(t,n)})),Me(e,"sortOptionsByPriority",(function(t,e){return e.includedList.reverse().forEach((function(e){var n=t.findIndex((function(t){return t.countryCode===e}));if(-1===n)throw new Error("SysPhoneInputComponent: could not found ".concat(e," in options array"));var o=t[n];t.splice(n,1),t.unshift(o)})),t})),Me(e,"setArrowIconStyles",(function(){var t=e.getElement("input").style.color;e.getRootElement().querySelector(".dropdown-icon").style.color=t})),Me(e,"valueChangedCallback",(function(t){if(!e.countryCodeSelectedAtLeastOnce&&e.countryData){var n=e.getCountryOptionByValue(t);if(n){var o=e.services.state.getState().currentCountryCode;n.countryCode!==o&&(e.services.state.setState({currentCountryCode:n.countryCode}),e.getRootElement().querySelector(".phone-input-select-button-flag").style.backgroundPositionY="".concat(n.position,"px"))}}})),Me(e,"getCountryOptionByValue",(function(t){var n=t.startsWith("+")?t:"+".concat(t);return e.availableOptions.find((function(t){return n.startsWith(t.prefix)}))})),Me(e,"createPhoneInputFormControl",(function(){var t=e.getRootElement(),n=e.getInputElement(),o=t.querySelector(".phone-input-asyncLoader");e.phoneInputFormControl=e.createControlWithValidation(e.getValidators(),{validCallback:function(){return o.style.visibility="hidden"},invalidCallback:function(){return o.style.visibility="hidden"},pendingCallback:function(){return o.style.visibility="visible"}}),e.phoneInputFormControl.on("valueChanged",(function(t){e.valueChangedCallback((t||"").trim())})),e.createPhoneInputFormControlHandler&&n.removeEventListener("input",e.createPhoneInputFormControlHandler)})),Me(e,"menuOptionSelected",(function(t){e.phoneInputFormControl||e.createPhoneInputFormControl(),e.phoneInputFormControl.setValue(t.prefix),e.countryCodeSelectedAtLeastOnce=!0,e.services.state.setState({currentCountryCode:t.countryCode})})),Me(e,"manifest",s),Me(e,"countryData",null),Me(e,"registeredControl",null),Me(e,"countryCodeSelectedAtLeastOnce",!1),Me(e,"availableOptions",[]),Me(e,"defaultCountryCode","US"),Me(e,"openSelectMenu",null),Me(e,"handleSelectButtonKeydown",null),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&&Pe(t,e)}(t,Oe),function(t,e){return e&&Ne(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;Le(t,"connectedCallback",this,3)([]);var n=this.getTranslationsMap(Re).translations;this.getRootElement().innerHTML+="\n ".concat("\n<style>\n.main-container {\n height: 100%;\n}\n\n.label-with-input-container {\n height: 100%;\n display: flex;\n}\n\n.label {\n min-height: 10px;\n}\n\n.label.cl-focused {\n min-height: auto;\n}\n\n.phone-input-with-tooltip {\n position: relative;\n display: flex;\n height: 100%;\n width: 100%;\n}\n\n.invalid {\n border: 1px solid #ff0000 !important;\n}\n\n.input-tooltip {\n visibility: hidden;\n position: absolute;\n right: -10px;\n top: -10px;\n z-index: 1;\n border-radius: 100%;\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Chrome/Safari/Opera */\n -khtml-user-select: none; /* Konqueror */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n}\n\ninput {\n height: 100%;\n -moz-appearance:none;\n -webkit-appearance:none;\n -o-appearance:none;\n}\n\n.phone-input-select-button {\n background: transparent;\n border: none;\n min-width: max-content;\n width: 24px;\n height: 100%;\n display: flex;\n align-items: center;\n cursor: pointer;\n position: absolute;\n}\n\n.phone-input {\n height: 100%;\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n margin: 0;\n text-align: start !important;\n}\n\n.phone-input-select-button-flag {\n background-repeat: no-repeat;\n background-size: 24px 3876px;\n background-position-x: -1px;\n min-width: 24px;\n width: 24px;\n height: 16px;\n margin: auto 5px auto 0;\n}\n\n.phone-input-asyncLoader {\n height: 18px;\n width: 18px;\n border-radius: 50%;\n background-color: #ffffff;\n position: absolute;\n right: -9px;\n top: -9px;\n visibility: hidden;\n}\n\n.phone-input-asyncLoader .spinner--icon {\n animation: rotates 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -9px 0 0 -9px;\n width: 18px;\n height: 18px;\n}\n\n.phone-input-asyncLoader .spinner--icon .path {\n stroke: #9B9B9B;\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n.phone-input-asyncLoader .spinner--icon .path1 {\n stroke: #9B9B9B;\n stroke-linecap: round;\n animation: dash 1.25s ease-in-out infinite;\n}\n\n.phone-input-asyncLoader .spinner--icon @keyframes rotates {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.phone-input-asyncLoader .spinner--icon @keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}\n\ninput {\n width: 100%;\n}\n\ninput.focus-outline-defined:focus {\n outline: var(--clFocusOutline);\n}\n</style>\n ","\n ").concat(function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).selectCountryLabel;return'\n<div class="main-container">\n <div class="label-with-input-container">\n <div cl-element="label"\n cl-inline-edit="content, label"\n class="label"\n id="cl-phone-label">\n </div>\n\n <div class="phone-input-with-tooltip">\n <div class="phone-input-select-button"\n role="combobox"\n tabindex="0"\n aria-haspopup="listbox"\n aria-expanded="false"\n aria-label="'.concat(void 0===t?"Select country code":t,'">\n <div class="phone-input-select-button-flag" aria-hidden="true"></div>\n\n <svg width="11" height="7" viewBox="0 0 11 7" fill="none" xmlns="http://www.w3.org/2000/svg"\n class="dropdown-icon" aria-hidden="true">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M10.5248 1.90196L9.57381 2.71322L6.05712 5.71322L5.24395 6.40691L4.4324 5.71132L0.949088 2.72576L0 1.91229L1.62694 0.0141139L2.57603 0.827583L5.24778 3.11756L7.9513 0.811257L8.90228 0L10.5248 1.90196Z"\n fill="currentColor"/>\n </svg>\n </div>\n\n <input cl-element="input"\n type="tel"\n name="phone"\n autocomplete="on"\n aria-labelledby="cl-phone-label"\n class="phone-input">\n\n <div class="input-tooltip" aria-hidden="true">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">\n <path d="M1.5 13.0604C1.5 19.4116 6.6481 24.5605 13.0075 24.5605C19.353 24.5605 24.5 19.4107 24.5 13.0604C24.5 6.70865 19.3531 1.55909 13.0075 1.55908C6.64806 1.55908 1.5 6.7077 1.5 13.0604ZM12.9775 17.9668C12.7032 17.9668 12.4807 17.7443 12.4807 17.47C12.4807 17.1956 12.7032 16.9732 12.9775 16.9732C13.2519 16.9732 13.4743 17.1956 13.4743 17.47C13.4743 17.7443 13.2519 17.9668 12.9775 17.9668ZM12.9775 13.4764C12.7032 13.4764 12.4807 13.254 12.4807 12.9796L12.4807 8.48924C12.4807 8.21487 12.7032 7.99245 12.9775 7.99245C13.2519 7.99245 13.4743 8.21487 13.4743 8.48924L13.4743 12.9796C13.4743 13.254 13.2519 13.4764 12.9775 13.4764Z" fill="#FF0000" stroke="white" stroke-width="2"></path>\n </svg>\n </div>\n\n <span class="phone-input-asyncLoader" aria-hidden="true">\n <svg class="spinner--icon" viewBox="0 0 18 18" aria-hidden="true">\n <circle class="path" cx="9" cy="9" r="5" fill="none" stroke-width="2"></circle>\n <circle class="path1" cx="9" cy="9" r="2" fill="none" stroke-width="2"></circle>\n </svg>\n </span>\n </div>\n </div>\n</div>\n ')}({selectCountryLabel:n}),"\n ");var o=this.getRootElement(),i=this.getInputElement(),r=o.querySelector(".phone-input-select-button-flag");r.style.opacity="0",r.style.backgroundImage="url(".concat(this.assets("img/flags.png"),")"),this.requestCountryData().then((function(t){var n,o=e.getProps();e.countryData=t;var r=e.services.state.getState().currentCountryCode||o.control.countryCode||e.defaultCountryCode,a=o.control.countriesPriority||{includedList:[r],allowToAddOnlyFromIncludedList:!1};e.availableOptions=e.getAvailableOptions(e.countryData.slice(),a),(null===(n=e.getProps().control)||void 0===n||null===(n=n.validation)||void 0===n?void 0:n.required)?e.createPhoneInputFormControl():(e.createPhoneInputFormControlHandler=function(){return e.createPhoneInputFormControl()},i.addEventListener("input",e.createPhoneInputFormControlHandler)),e.setValue(o,o.control.defaultValue||null),e.phoneInputMenu=new Ae(e.getRootElement.bind(e),e.getElement.bind(e),e.services.config,e.services.state,e.menuOptionSelected.bind(e),e.htmlDocumentObject);var s=t.find((function(t){return t.countryCode===r}));e.addContextRecord((null==s?void 0:s.prefix)||"+380")})).catch((function(t){console.error("SysPhoneInputComponent: could not load country data",t),e.addContextRecord("+1")})),this.observeProps((function(t,n){var i,r=e.getEnvironment();if(e.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles),q(n,r,o,".label-with-input-container"),Z(n,r,e.getHostElement(),e.getElement("input"),e.getElement("label")),function(t){let e=null;const n=t,o=["transparent","initial"];t&&(t.style.borderColor&&!o.includes(t.style.borderColor)&&(parseFloat(t.style.borderWidth)||parseFloat(t.style.borderBottomWidth))&&(e=X(n,t,"borderColor")),!e&&t.style.getPropertyValue("--borderBottomColor")&&!o.includes(t.style.getPropertyValue("--borderBottomColor"))&&parseFloat(t.style.getPropertyValue("--borderBottomWidth"))&&(e=X(n,t,"--borderBottomColor")),e||!t.style.backgroundColor||o.includes(t.style.backgroundColor)||(e=X(n,t,"backgroundColor")),e||!t.style.color||o.includes(t.style.color)||(e=X(n,t,"color")),e||n.classList.remove("focus-outline-defined"))}(e.getElement("input")),e.getElement("input").setAttribute("aria-required",String(!(null===(i=n.control)||void 0===i||null===(i=i.validation)||void 0===i||!i.required))),e.applyParams(n,r),e.setArrowIconStyles(),e.updateContext(),e.countryData){var a=(null==t?void 0:t.control)||{},s=n.control||{};if(a.countryCode!==s.countryCode){var l=s.countryCode||e.defaultCountryCode,c=e.countryData.find((function(t){return t.countryCode===l}));e.services.state.setState({currentCountryCode:l}),e.setValue(n,null==c?void 0:c.prefix)}}})),this.observeEnvironment((function(t,n){var i=e.getProps();e.applyParams(i,n),q(i,n,o,".label-with-input-container"),Z(i,n,e.getHostElement(),e.getElement("input"),e.getElement("label")),e.setArrowIconStyles()})),this.observeShared((function(){e.applyParams(e.getProps(),e.getEnvironment()),e.setArrowIconStyles()}));var a=o.querySelector(".phone-input-select-button");this.openSelectMenu=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"selected";e.countryData&&!e.isUpdatingRenderMode()&&(a.setAttribute("aria-expanded","true"),setTimeout((function(){return e.phoneInputMenu.createOverlay(e.availableOptions,(function(){a.setAttribute("aria-expanded","false")}),{navigationHint:t})}),50),setTimeout((function(){e.phoneInputMenu.focusSearchInput()}),0))},this.handleSelectButtonKeydown=function(t){var n,o=null===(n=e.phoneInputMenu)||void 0===n?void 0:n.isOpen();switch(t.key){case"Enter":case" ":case"Spacebar":t.preventDefault(),o?e.phoneInputMenu.selectActiveOption():e.openSelectMenu();break;case"ArrowDown":t.preventDefault(),o?e.phoneInputMenu.moveActiveOption(1):e.openSelectMenu("first");break;case"ArrowUp":t.preventDefault(),o?e.phoneInputMenu.moveActiveOption(-1):e.openSelectMenu("last");break;case"Home":o&&(t.preventDefault(),e.phoneInputMenu.setActiveOption(0));break;case"End":o&&(t.preventDefault(),e.phoneInputMenu.setActiveOption(e.availableOptions.length-1));break;case"Escape":var i;o&&(t.preventDefault(),null===(i=t.stopPropagation)||void 0===i||i.call(t),e.phoneInputMenu.armEscapeKeyupGuard(),e.phoneInputMenu.closeOverlay())}},a.addEventListener("click",(function(){return e.openSelectMenu()})),a.addEventListener("keydown",this.handleSelectButtonKeydown)}},{key:"disconnectedCallback",value:function(){var e,n;Le(t,"disconnectedCallback",this,3)([]),this.services.context.deleteRecord(this.getModel().id),null===(e=this.phoneInputMenu)||void 0===e||null===(n=e.removeEscapeKeyupGuard)||void 0===n||n.call(e);var o=this.getRootElement().querySelector(".phone-input-select-button");null==o||o.removeEventListener("keydown",this.handleSelectButtonKeydown)}}])}();Me(Ue,"define",{name:"sys-phone-input",model:s.name,manifest:s});export{Ue as default};window.clComponentClass_SysPhoneInputComponent=Ue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claspo/components",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "prebuild": "rm -rf out",