@supersoniks/concorde 3.1.71 → 3.1.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +17 -15
- package/concorde-core.es.js +23 -21
- package/dist/concorde-core.bundle.js +17 -15
- package/dist/concorde-core.es.js +23 -21
- package/index.html +0 -0
- package/package.json +2 -2
- package/scripts/create-search.js +0 -0
- package/scripts/generate-routes.js +0 -0
- package/src/core/_types/types.ts +0 -0
- package/src/core/components/functional/date/date.ts +0 -0
- package/src/core/components/functional/functional.ts +0 -0
- package/src/core/components/functional/if/if.md +0 -0
- package/src/core/components/functional/if/if.test.ts +0 -0
- package/src/core/components/functional/list/list.demo.ts +0 -0
- package/src/core/components/functional/list/list.spec.ts +0 -0
- package/src/core/components/functional/queue/queue.demo.ts +0 -0
- package/src/core/components/functional/router/router.demo.ts +0 -0
- package/src/core/components/functional/router/router.md +0 -0
- package/src/core/components/functional/router/router.spec.ts +0 -0
- package/src/core/components/functional/router/router.ts +0 -0
- package/src/core/components/functional/sonic-scope/sonic-scope.ts +0 -0
- package/src/core/components/functional/states/states.demo.ts +0 -0
- package/src/core/components/functional/states/states.md +0 -0
- package/src/core/components/functional/states/states.spec.ts +0 -0
- package/src/core/components/functional/states/states.ts +0 -0
- package/src/core/components/functional/translation/translation.ts +0 -0
- package/src/core/components/ui/_css/scroll.ts +0 -0
- package/src/core/components/ui/_css/shadow.ts +0 -0
- package/src/core/components/ui/_css/size.ts +0 -0
- package/src/core/components/ui/_css/type.ts +0 -0
- package/src/core/components/ui/alert/alert.md +0 -0
- package/src/core/components/ui/alert/alert.ts +0 -0
- package/src/core/components/ui/alert-messages/alert-messages.md +0 -0
- package/src/core/components/ui/badge/badge.md +0 -0
- package/src/core/components/ui/badge/badge.ts +0 -0
- package/src/core/components/ui/button/button.md +0 -0
- package/src/core/components/ui/button/button.ts +0 -0
- package/src/core/components/ui/captcha/captcha.md +0 -0
- package/src/core/components/ui/card/card-footer.ts +0 -0
- package/src/core/components/ui/card/card-header-descripton.ts +0 -0
- package/src/core/components/ui/card/card-header.ts +0 -0
- package/src/core/components/ui/card/card-main.ts +0 -0
- package/src/core/components/ui/card/card.md +0 -0
- package/src/core/components/ui/card/card.ts +0 -0
- package/src/core/components/ui/divider/divider.ts +0 -0
- package/src/core/components/ui/form/checkbox/checkbox.ts +1 -1
- package/src/core/components/ui/form/css/form-control.ts +0 -0
- package/src/core/components/ui/form/fieldset/fieldset.ts +0 -0
- package/src/core/components/ui/form/fieldset/legend-description.ts +0 -0
- package/src/core/components/ui/form/fieldset/legend.ts +0 -0
- package/src/core/components/ui/form/form-layout/form-layout.md +0 -0
- package/src/core/components/ui/form/input/input.md +0 -0
- package/src/core/components/ui/form/input/input.ts +1 -1
- package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +0 -0
- package/src/core/components/ui/form/radio/radio.md +0 -0
- package/src/core/components/ui/form/radio/radio.ts +0 -0
- package/src/core/components/ui/form/select/select.md +0 -0
- package/src/core/components/ui/form/switch/switch.md +0 -0
- package/src/core/components/ui/form/switch/switch.ts +0 -0
- package/src/core/components/ui/form/textarea/textarea.ts +1 -1
- package/src/core/components/ui/icon/icon.ts +0 -0
- package/src/core/components/ui/icon/icons.ts +0 -0
- package/src/core/components/ui/image/image.md +0 -0
- package/src/core/components/ui/image/image.ts +0 -0
- package/src/core/components/ui/loader/loader.md +0 -0
- package/src/core/components/ui/loader/loader.ts +0 -0
- package/src/core/components/ui/loader/styles/fixed.ts +0 -0
- package/src/core/components/ui/loader/styles/inline.ts +0 -0
- package/src/core/components/ui/menu/menu.ts +0 -0
- package/src/core/components/ui/modal/modal-actions.ts +0 -0
- package/src/core/components/ui/modal/modal-subtitle.ts +0 -0
- package/src/core/components/ui/modal/modal-title.ts +0 -0
- package/src/core/components/ui/modal/modal.md +0 -0
- package/src/core/components/ui/modal/modal.ts +0 -0
- package/src/core/components/ui/pop/pop.ts +0 -0
- package/src/core/components/ui/progress/progress.ts +0 -0
- package/src/core/components/ui/table/table-tbody.ts +0 -0
- package/src/core/components/ui/table/table-th.ts +0 -0
- package/src/core/components/ui/table/table.ts +0 -0
- package/src/core/components/ui/theme/theme-collection/core-variables.ts +0 -0
- package/src/core/components/ui/theme/theme-collection/dark.ts +0 -0
- package/src/core/components/ui/theme/theme-collection/light.ts +0 -0
- package/src/core/components/ui/theme/theme.ts +0 -0
- package/src/core/components/ui/toast/toast-item.ts +0 -0
- package/src/core/components/ui/toast/toast.ts +0 -0
- package/src/core/components/ui/tooltip/tooltip.ts +0 -0
- package/src/core/components/ui/ui.ts +0 -0
- package/src/core/directives/DataProvider.ts +0 -0
- package/src/core/directives/Wording.ts +0 -0
- package/src/core/mixins/Fetcher.ts +0 -0
- package/src/core/mixins/Subscriber.ts +0 -0
- package/src/core/mixins/TemplatesContainer.ts +0 -0
- package/src/core/utils/HTML.ts +0 -0
- package/src/core/utils/LocationHandler.ts +0 -0
- package/src/core/utils/Objects.ts +0 -0
- package/src/core/utils/Utils.ts +0 -0
- package/src/core/utils/aesCrypto.ts +0 -0
- package/src/core/utils/api.ts +0 -0
- package/src/core/utils/route.spec.ts +0 -0
- package/src/core/utils/route.ts +0 -0
- package/src/docs/code.ts +0 -0
- package/src/docs/docs.ts +0 -0
- package/src/docs/header/header.ts +0 -0
- package/src/docs/layout.ts +0 -0
- package/src/docs/navigation/navigation.ts +0 -0
- package/src/docs/search/docs-search.json +0 -0
- package/src/docs/search/markdown-renderer.ts +0 -0
- package/src/docs/search/page.ts +0 -0
- package/src/docs/search/search.ts +0 -0
- package/src/docs/tailwind/css/tailwind.css +0 -0
- package/src/docs/tailwind/css.d.ts +0 -0
- package/src/index.ts +0 -0
- package/src/test-utils/TestUtils.ts +0 -0
- package/src/tsconfig-model.json +0 -0
- package/src/tsconfig.json +0 -0
- package/src/tsconfig.tsbuildinfo +0 -0
- package/tailwind.config.js +0 -0
- package/templates-test.html +0 -0
- package/vite/config.js +0 -0
- package/vite.config.mts +0 -0
- package/docs/assets/index-D9bBwsCn.js +0 -4537
- package/docs/assets/index-DCRPZO3x.css +0 -1
- package/docs/css/docs.css +0 -0
- package/docs/fonts/ClashGrotesk-Bold.eot +0 -0
- package/docs/fonts/ClashGrotesk-Bold.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Bold.woff +0 -0
- package/docs/fonts/ClashGrotesk-Bold.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Extralight.eot +0 -0
- package/docs/fonts/ClashGrotesk-Extralight.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Extralight.woff +0 -0
- package/docs/fonts/ClashGrotesk-Extralight.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Light.eot +0 -0
- package/docs/fonts/ClashGrotesk-Light.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Light.woff +0 -0
- package/docs/fonts/ClashGrotesk-Light.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Medium.eot +0 -0
- package/docs/fonts/ClashGrotesk-Medium.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Medium.woff +0 -0
- package/docs/fonts/ClashGrotesk-Medium.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Regular.eot +0 -0
- package/docs/fonts/ClashGrotesk-Regular.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Regular.woff +0 -0
- package/docs/fonts/ClashGrotesk-Regular.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Semibold.eot +0 -0
- package/docs/fonts/ClashGrotesk-Semibold.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Semibold.woff +0 -0
- package/docs/fonts/ClashGrotesk-Semibold.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Variable.eot +0 -0
- package/docs/fonts/ClashGrotesk-Variable.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Variable.woff +0 -0
- package/docs/fonts/ClashGrotesk-Variable.woff2 +0 -0
- package/docs/img/concorde-icon.svg +0 -5
- package/docs/img/concorde-logo.svg +0 -1
- package/docs/img/concorde.png +0 -0
- package/docs/img/concorde_def.png +0 -0
- package/docs/img/concorde_seuil.png.webp +0 -0
- package/docs/img/concorde_seuil_invert.png +0 -0
- package/docs/img/paul_metrand.jpg +0 -0
- package/docs/img/paul_metrand_xs.jpg +0 -0
- package/docs/index.html +0 -93
- package/docs/src/core/components/functional/date/date.md +0 -290
- package/docs/src/core/components/functional/fetch/fetch.md +0 -117
- package/docs/src/core/components/functional/if/if.md +0 -16
- package/docs/src/core/components/functional/list/list.md +0 -199
- package/docs/src/core/components/functional/mix/mix.md +0 -41
- package/docs/src/core/components/functional/queue/queue.md +0 -87
- package/docs/src/core/components/functional/router/router.md +0 -108
- package/docs/src/core/components/functional/sdui/default-library.json +0 -108
- package/docs/src/core/components/functional/sdui/example.json +0 -99
- package/docs/src/core/components/functional/sdui/sdui.md +0 -356
- package/docs/src/core/components/functional/states/states.md +0 -87
- package/docs/src/core/components/functional/submit/submit.md +0 -83
- package/docs/src/core/components/functional/subscriber/subscriber.md +0 -91
- package/docs/src/core/components/functional/value/value.md +0 -35
- package/docs/src/core/components/ui/alert/alert.md +0 -121
- package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -0
- package/docs/src/core/components/ui/badge/badge.md +0 -127
- package/docs/src/core/components/ui/button/button.md +0 -182
- package/docs/src/core/components/ui/captcha/captcha.md +0 -12
- package/docs/src/core/components/ui/card/card.md +0 -97
- package/docs/src/core/components/ui/divider/divider.md +0 -35
- package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -94
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +0 -129
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +0 -77
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +0 -44
- package/docs/src/core/components/ui/form/input/input.md +0 -167
- package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -130
- package/docs/src/core/components/ui/form/radio/radio.md +0 -84
- package/docs/src/core/components/ui/form/select/select.md +0 -97
- package/docs/src/core/components/ui/form/switch/switch.md +0 -84
- package/docs/src/core/components/ui/form/textarea/textarea.md +0 -65
- package/docs/src/core/components/ui/group/group.md +0 -75
- package/docs/src/core/components/ui/icon/icon.md +0 -125
- package/docs/src/core/components/ui/icon/icons.json +0 -1
- package/docs/src/core/components/ui/image/image.md +0 -107
- package/docs/src/core/components/ui/link/link.md +0 -43
- package/docs/src/core/components/ui/loader/loader.md +0 -67
- package/docs/src/core/components/ui/menu/menu.md +0 -288
- package/docs/src/core/components/ui/modal/modal.md +0 -123
- package/docs/src/core/components/ui/pop/pop.md +0 -79
- package/docs/src/core/components/ui/progress/progress.md +0 -63
- package/docs/src/core/components/ui/table/table.md +0 -455
- package/docs/src/core/components/ui/tooltip/tooltip.md +0 -82
- package/docs/src/docs/_core-concept/overview.md +0 -57
- package/docs/src/docs/_core-concept/subscriber.md +0 -76
- package/docs/src/docs/_getting-started/concorde-outside.md +0 -143
- package/docs/src/docs/_getting-started/create-a-component.md +0 -137
- package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -174
- package/docs/src/docs/_getting-started/pubsub.md +0 -150
- package/docs/src/docs/_getting-started/start.md +0 -39
- package/docs/src/docs/_getting-started/theming.md +0 -91
- package/docs/src/docs/search/docs-search.json +0 -3902
- package/docs/src/tag-list.json +0 -1
- package/docs/src/tsconfig-model.json +0 -23
- package/docs/src/tsconfig.json +0 -835
- package/docs/svg/regular/plane.svg +0 -1
- package/docs/svg/solid/plane.svg +0 -1
- package/php/get-challenge.php +0 -34
- package/php/some-service.php +0 -42
package/build-infos.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"date":
|
|
1
|
+
{"date":1749044030}
|
package/concorde-core.bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(K){typeof define=="function"&&define.amd?define(K):K()})(function(){"use strict";var Dt,k,L,ko,t,G;let K=class Vt{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Vt.getAncestorAttributeValue(t,"token"),i=Vt.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Vt.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const a=Vt.getAncestorAttributeValue(t,"tokenProvider"),c=Vt.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Vt.getAncestorAttributeValue(t,"userName"),n=Vt.getAncestorAttributeValue(t,"password"));const h=Vt.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),p=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:a,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:p}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Vt.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}};const si=r=>{const t=document.documentElement,s=new MutationObserver(e=>{for(let o of e)o.type==="attributes"&&o.attributeName==="lang"&&r()}),i={attributes:!0,attributeFilter:["lang"]};s.observe(t,i)};let ws=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=K.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,p){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:p}).format}const[n,a]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),a&&c.push(o(s,"minute",i)(a)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}},Mo=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(s=>{setTimeout(s,t)})}},rr="sonic";typeof __SONIC_PREFIX__<"u"&&(rr=__SONIC_PREFIX__);let or=rr.replace(/-([a-z])/g,r=>r[1].toUpperCase());const xs=or.charAt(0).toUpperCase()+or.slice(1);function $s(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function He(r){return typeof r=="object"&&r!=null}let De="sonic";typeof __SONIC_PREFIX__>"u"&&(De="sonic"+Math.floor(Math.random()*1e6));const ii=De=="sonic"?"publisher-proxies-data":De+"-publisher-proxies-data";let ri=(Dt=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),Dt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!E.changed){E.changed=!0,E.saveId++;const s=E.saveId;setTimeout(()=>E.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>{e(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.add(t)}offFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.delete(t)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,s=!1){var e,o,n;if(this._value_===t||this._value_&&t&&$s(this._value_)&&$s(t)&&this._value_.__value===t.__value)return!0;this._value_=He(t)?t:{__value:t},this._cachedGet_=void 0;const i=$s(this._value_);if(this._parentKey_&&this.parent){const a=$s(this._value_)?this._value_.__value:this._value_;if(((e=this.parent)==null?void 0:e.get())==null&&((o=this.parent)==null?void 0:o.get())==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:a});else{const c=[];c[Number(this._parentKey_)]=a,this.parent.set(c)}else this.parent._value_[this._parentKey_]=a}if(i)return this._proxies_.forEach((a,c)=>{c!="_parent_"&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const a in this._value_)this._value_[a]===void 0&&delete this._value_[a];if(this._proxies_.forEach((a,c)=>{const h=this._value_[c];c!="_parent_"&&h===void 0&&h!==null&&isNaN(Number(c))&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),He(this._value_))for(const a in this._value_){const c=t[a],d=He(c)?c:{__value:c};if(!this._proxies_.has(a)){this._publishDynamicFilling_(a,c);continue}(n=this._proxies_.get(a))==null||n.set(d,!0),this._publishDynamicFilling_(a,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(E.modifiedCollectore.length>0&&E.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(Dt.instancesCounter++,this._instanceCounter_=Dt.instancesCounter),Dt.instances.set(this._instanceCounter_,this),"<"+De+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+De+"-publisher-proxy>"}},Dt.instances=new Map,Dt.instancesCounter=0,Dt),E=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}invalidateAll(){this.publishers.forEach(t=>{t._invalidate_on_page_show_&&t.invalidate()})}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(ii),e=null;if(i&&(e=await this.decompress(i,"gzip")),e)try{this.localStorageData=JSON.parse(e)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem(ii,i),this.localStorageData={};const o=1e3*60*60*12;for(const n in this.localStorageData){const a=this.localStorageData[n],c=new Date().getTime()-(a.expirationDelayMs||o);a.lastModifiationMS<c&&delete this.localStorageData[n]}t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const s=k.instances.get(t);return s||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new k)}return k.instance==null?new k:k.instance}static registerInstance(t,s){k.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),k.instances.set(t,s)}static get(t,s){return k.getInstance().get(t,s)}static collectModifiedPublisher(){k.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return k.modifiedCollectore.shift()}static delete(t){return t?k.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+K.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled",e=(s==null?void 0:s.invalidateOnPageShow)===!0;if(!this.publishers.has(t)){const n={},a=new Be(n);this.set(t,a)}const o=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(s!=null&&s.expirationDelayMs&&(o._expiration_delay_=s.expirationDelayMs),o._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(o,t)),e&&(o._invalidate_on_page_show_=e),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+K.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:o._expiration_delay_,data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(ii,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const a=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(a);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,a=new n.DecompressionStream(s),c=a.writable.getWriter();c.write(o),c.close();const h=await new Response(a.readable).arrayBuffer();return new TextDecoder().decode(h)}},k.buildDate="Mon May 26 2025 14:40:09 GMT+0200 (Central European Summer Time)",k.changed=!1,k.saving=!1,k.saveId=0,k.instance=null,k.instances=new Map,k.modifiedCollectore=[],k);if(typeof window<"u"){const r=window;r[xs+"PublisherManager"]=r[xs+"PublisherManager"]||E}const Io=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);class Be extends ri{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Io.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const a=o._value_[n],c=new Be(He(a)?a:{__value:a},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,a){var h;if(n=="_value_")return o._value_=a,!0;if(n=="_cachedGet_")return o._cachedGet_=a,!0;if(n=="_assignmentId_")return o._assignmentId_=a,!0;if(n=="_is_savable_")return o._is_savable_=a,!0;if(n=="_expiration_delay_")return o._expiration_delay_=a,!0;if(n=="_invalidate_on_page_show_")return o._invalidate_on_page_show_=a,!0;if(n=="_instanceCounter_")return o._instanceCounter_=a,!0;if(!o._proxies_.has(n)){const d=new Be({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==a&&(o._value_[n]=a,o._publishDynamicFilling_(n,a),(h=o._proxies_.get(n))==null||h.set(He(a)?a:{__value:a})),!0},deleteProperty:function(o,n){var a;return o._publishDynamicFilling_(n,null),(a=o._proxies_.get(n))==null||a.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,a){return a&&"value"in a&&(o._value_[n]=a.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class jo extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=ri.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}try{customElements.define(De+"-publisher-proxy",jo)}catch{}window.addEventListener("pageshow",r=>{r.persisted&&E.getInstance().invalidateAll()});let Ps=(L=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(L.observedElements.keys()).forEach(t=>L.unObserve(t)))}static observe(t){if(!t||!L.enabled||L.observedElements.has(t))return;const s=new MutationObserver(L.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>L.addPublisherListeners(e)),L.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>L.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.addPublisherListeners(s)):t.childNodes.forEach(s=>L.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.removePublisherListeners(s)):t.childNodes.forEach(s=>L.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":L.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{L.onAdded(i)}),s.removedNodes.forEach(i=>{L.onRemoved(i)});break}}static removePublisherListeners(t){const s=L.publisherListeners.get(t);s&&(L.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:L.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){L.removePublisherListeners(t);const s=K.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=E.getInstance().get(s),e=L.getDataBindItems(t),o=[];e.forEach(n=>{const a=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of a.variables){const d=h;let p=i;p=L.getSubPublisher(i,d);const g=t,v={publisher:p,onAssign:()=>{const b=a.variables.map(D=>{var f;return(f=L.getSubPublisher(i,D))==null?void 0:f.get()});let y=a.expression,S=!1;if(b.length==1&&a.variables[0].join(".")==y.substring(1)){let D=b[0];D===null&&(D=""),g[c]=D;return}for(let D=0;D<b.length;D++){let f=b[D];const u=a.variables[D];f===null&&(S=!0,f=void 0),y=y.replace("$"+u.join("."),f)}if(y.indexOf("|")!=-1){const D=y.indexOf("|");if(D==0)y=ws.js(y.substring(1));else{const f=y.substring(0,D),u=y.substring(D+1),_=ws[f];y=S?"":_?_(u):y}}else y=S?"":y;g[c]=y}};p==null||p.onAssign(v.onAssign),o.push(v)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);Ps.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ps);let tt=class Zt{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const a=t[n],c=s[n];if(i?a!==c:a!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const a=t[n],c=s[n],h=Zt.isObject(a)&&Zt.isObject(c),d=i?a!==c:a!=c;if(h&&!Zt.deepEqual(a,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return Zt.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&Zt.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Zt.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Zt.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Zt.getURLSearchArray(t,"").join("&")}};const pt=tt.traverseDotNotation;/**
|
|
1
|
+
(function(K){typeof define=="function"&&define.amd?define(K):K()})(function(){"use strict";var Dt,k,L,ko,t,G;let K=class Vt{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Vt.getAncestorAttributeValue(t,"token"),i=Vt.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Vt.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const a=Vt.getAncestorAttributeValue(t,"tokenProvider"),c=Vt.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Vt.getAncestorAttributeValue(t,"userName"),n=Vt.getAncestorAttributeValue(t,"password"));const h=Vt.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),p=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:a,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:p}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Vt.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}};const si=r=>{const t=document.documentElement,s=new MutationObserver(e=>{for(let o of e)o.type==="attributes"&&o.attributeName==="lang"&&r()}),i={attributes:!0,attributeFilter:["lang"]};s.observe(t,i)};let ws=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=K.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,p){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:p}).format}const[n,a]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),a&&c.push(o(s,"minute",i)(a)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}},Mo=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(s=>{setTimeout(s,t)})}},rr="sonic";typeof __SONIC_PREFIX__<"u"&&(rr=__SONIC_PREFIX__);let or=rr.replace(/-([a-z])/g,r=>r[1].toUpperCase());const xs=or.charAt(0).toUpperCase()+or.slice(1);function $s(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function He(r){return typeof r=="object"&&r!=null}let De="sonic";typeof __SONIC_PREFIX__>"u"&&(De="sonic"+Math.floor(Math.random()*1e6));const ii=De=="sonic"?"publisher-proxies-data":De+"-publisher-proxies-data";let ri=(Dt=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),Dt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!E.changed){E.changed=!0,E.saveId++;const s=E.saveId;setTimeout(()=>E.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>{e(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.add(t)}offFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.delete(t)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,s=!1){var e,o,n;if(this._value_===t||this._value_&&t&&$s(this._value_)&&$s(t)&&this._value_.__value===t.__value)return!0;this._value_=He(t)?t:{__value:t},this._cachedGet_=void 0;const i=$s(this._value_);if(this._parentKey_&&this.parent){const a=$s(this._value_)?this._value_.__value:this._value_;if(((e=this.parent)==null?void 0:e.get())==null&&((o=this.parent)==null?void 0:o.get())==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:a});else{const c=[];c[Number(this._parentKey_)]=a,this.parent.set(c)}else this.parent._value_[this._parentKey_]=a}if(i)return this._proxies_.forEach((a,c)=>{c!="_parent_"&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const a in this._value_)this._value_[a]===void 0&&delete this._value_[a];if(this._proxies_.forEach((a,c)=>{const h=this._value_[c];c!="_parent_"&&h===void 0&&h!==null&&isNaN(Number(c))&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),He(this._value_))for(const a in this._value_){const c=t[a],d=He(c)?c:{__value:c};if(!this._proxies_.has(a)){this._publishDynamicFilling_(a,c);continue}(n=this._proxies_.get(a))==null||n.set(d,!0),this._publishDynamicFilling_(a,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(E.modifiedCollectore.length>0&&E.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(Dt.instancesCounter++,this._instanceCounter_=Dt.instancesCounter),Dt.instances.set(this._instanceCounter_,this),"<"+De+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+De+"-publisher-proxy>"}},Dt.instances=new Map,Dt.instancesCounter=0,Dt),E=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}invalidateAll(){this.publishers.forEach(t=>{t._invalidate_on_page_show_&&t.invalidate()})}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(ii),e=null;if(i&&(e=await this.decompress(i,"gzip")),e)try{this.localStorageData=JSON.parse(e)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem(ii,i),this.localStorageData={};const o=1e3*60*60*12;for(const n in this.localStorageData){const a=this.localStorageData[n],c=new Date().getTime()-(a.expirationDelayMs||o);a.lastModifiationMS<c&&delete this.localStorageData[n]}t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const s=k.instances.get(t);return s||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new k)}return k.instance==null?new k:k.instance}static registerInstance(t,s){k.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),k.instances.set(t,s)}static get(t,s){return k.getInstance().get(t,s)}static collectModifiedPublisher(){k.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return k.modifiedCollectore.shift()}static delete(t){return t?k.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+K.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled",e=(s==null?void 0:s.invalidateOnPageShow)===!0;if(!this.publishers.has(t)){const n={},a=new Be(n);this.set(t,a)}const o=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(s!=null&&s.expirationDelayMs&&(o._expiration_delay_=s.expirationDelayMs),o._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(o,t)),e&&(o._invalidate_on_page_show_=e),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+K.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:o._expiration_delay_,data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(ii,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const a=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(a);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,a=new n.DecompressionStream(s),c=a.writable.getWriter();c.write(o),c.close();const h=await new Response(a.readable).arrayBuffer();return new TextDecoder().decode(h)}},k.buildDate="Wed Jun 04 2025 15:33:49 GMT+0200 (Central European Summer Time)",k.changed=!1,k.saving=!1,k.saveId=0,k.instance=null,k.instances=new Map,k.modifiedCollectore=[],k);if(typeof window<"u"){const r=window;r[xs+"PublisherManager"]=r[xs+"PublisherManager"]||E}const Io=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);class Be extends ri{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Io.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const a=o._value_[n],c=new Be(He(a)?a:{__value:a},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,a){var h;if(n=="_value_")return o._value_=a,!0;if(n=="_cachedGet_")return o._cachedGet_=a,!0;if(n=="_assignmentId_")return o._assignmentId_=a,!0;if(n=="_is_savable_")return o._is_savable_=a,!0;if(n=="_expiration_delay_")return o._expiration_delay_=a,!0;if(n=="_invalidate_on_page_show_")return o._invalidate_on_page_show_=a,!0;if(n=="_instanceCounter_")return o._instanceCounter_=a,!0;if(!o._proxies_.has(n)){const d=new Be({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==a&&(o._value_[n]=a,o._publishDynamicFilling_(n,a),(h=o._proxies_.get(n))==null||h.set(He(a)?a:{__value:a})),!0},deleteProperty:function(o,n){var a;return o._publishDynamicFilling_(n,null),(a=o._proxies_.get(n))==null||a.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,a){return a&&"value"in a&&(o._value_[n]=a.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class jo extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=ri.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}try{customElements.define(De+"-publisher-proxy",jo)}catch{}window.addEventListener("pageshow",r=>{r.persisted&&E.getInstance().invalidateAll()});let Ps=(L=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(L.observedElements.keys()).forEach(t=>L.unObserve(t)))}static observe(t){if(!t||!L.enabled||L.observedElements.has(t))return;const s=new MutationObserver(L.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>L.addPublisherListeners(e)),L.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>L.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.addPublisherListeners(s)):t.childNodes.forEach(s=>L.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.removePublisherListeners(s)):t.childNodes.forEach(s=>L.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":L.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{L.onAdded(i)}),s.removedNodes.forEach(i=>{L.onRemoved(i)});break}}static removePublisherListeners(t){const s=L.publisherListeners.get(t);s&&(L.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:L.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){L.removePublisherListeners(t);const s=K.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=E.getInstance().get(s),e=L.getDataBindItems(t),o=[];e.forEach(n=>{const a=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of a.variables){const d=h;let p=i;p=L.getSubPublisher(i,d);const g=t,v={publisher:p,onAssign:()=>{const b=a.variables.map(D=>{var f;return(f=L.getSubPublisher(i,D))==null?void 0:f.get()});let y=a.expression,S=!1;if(b.length==1&&a.variables[0].join(".")==y.substring(1)){let D=b[0];D===null&&(D=""),g[c]=D;return}for(let D=0;D<b.length;D++){let f=b[D];const u=a.variables[D];f===null&&(S=!0,f=void 0),y=y.replace("$"+u.join("."),f)}if(y.indexOf("|")!=-1){const D=y.indexOf("|");if(D==0)y=ws.js(y.substring(1));else{const f=y.substring(0,D),u=y.substring(D+1),_=ws[f];y=S?"":_?_(u):y}}else y=S?"":y;g[c]=y}};p==null||p.onAssign(v.onAssign),o.push(v)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);Ps.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ps);let tt=class Zt{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const a=t[n],c=s[n];if(i?a!==c:a!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const a=t[n],c=s[n],h=Zt.isObject(a)&&Zt.isObject(c),d=i?a!==c:a!=c;if(h&&!Zt.deepEqual(a,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return Zt.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&Zt.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Zt.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Zt.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Zt.getURLSearchArray(t,"").join("&")}};const pt=tt.traverseDotNotation;/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1262,7 +1262,7 @@
|
|
|
1262
1262
|
>
|
|
1263
1263
|
</sonic-list>
|
|
1264
1264
|
`})}
|
|
1265
|
-
`}};Q.instanceCounter=0,rt([l({type:Array})],Q.prototype,"templates",2),rt([l({type:Object})],Q.prototype,"items",2),rt([l({type:Object})],Q.prototype,"noItems",2),rt([l({type:Object})],Q.prototype,"skeleton",2),rt([l({type:Object})],Q.prototype,"itemPropertyMap",2),rt([l()],Q.prototype,"cache",2),rt([l()],Q.prototype,"targetRequestDuration",2),rt([l()],Q.prototype,"limit",2),rt([l()],Q.prototype,"lazyBoundsRatio",2),rt([l()],Q.prototype,"offset",2),rt([l()],Q.prototype,"resultCount",2),rt([l({type:Boolean})],Q.prototype,"noLazyload",2),rt([l({type:String})],Q.prototype,"loader",2),rt([l()],Q.prototype,"filteredFields",2),rt([l({type:String})],Q.prototype,"dataProviderExpression",2),rt([l({type:Boolean})],Q.prototype,"invalidateOnPageShow",2),rt([l({type:String})],Q.prototype,"idKey",2),Q=rt([x(sl)],Q);var il=Object.defineProperty,rl=Object.getOwnPropertyDescriptor,je=(r,t,s,i)=>{for(var e=i>1?void 0:i?rl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&il(t,s,e),e};const ol="sonic-submit";let ee=class extends X(w){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null,this.clickTimeStamp=0,this.submit=async r=>{var b;if(this.disabled||r instanceof KeyboardEvent&&r.key!=="Enter")return;r instanceof MouseEvent&&r.stopPropagation();const t=E.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(t.isFormValid=!0,t.invalidateForm(),!t.isFormValid.get())return;if(this.disabled=!0,ot.show(),t.isFormValid,this.hasAttribute("native")){this.submitNativeForm();return}const i=((b=this.getAttribute("method"))==null?void 0:b.toLocaleLowerCase())||"post",e=this.hasAttribute("sendAsFormData"),o=t.get();delete o.isFormValid;const n=this.getAncestorAttributeValue("headersDataProvider"),a=n?E.getInstance().get(n):null;let c={};a&&(c=a.get());let h=null;const d=this.getAncestorAttributeValue("dataProvider"),p=this.endPoint||d,g=async()=>{var _,C,O,T,q,W,kt,Lo;const y={...o};if(delete y.needsCaptchaValidation,delete c.needsCaptchaValidation,e)h=await((_=this.api)==null?void 0:_.submitFormData(p,y,i,c));else switch(i){case"put":h=await((C=this.api)==null?void 0:C.put(p,y,c));break;case"patch":h=await((O=this.api)==null?void 0:O.patch(p,y,c));break;case"delete":h=await((T=this.api)==null?void 0:T.delete(p,y,c));break;case"get":const ei=new URLSearchParams;if(y)for(const Eo in y)ei.append(Eo,y[Eo]);const Bd="?"+ei.toString();h=await((q=this.api)==null?void 0:q.get(p+Bd,c));break;default:h=await((W=this.api)==null?void 0:W.post(p,y,c));break}ot.hide(),h?h._sonic_http_response_&&!h._sonic_http_response_.ok&&Object.keys(h).length===1&&(h.messages=[{content:"Network Error",status:"error"}]):h={messages:[{content:"Network
|
|
1265
|
+
`}};Q.instanceCounter=0,rt([l({type:Array})],Q.prototype,"templates",2),rt([l({type:Object})],Q.prototype,"items",2),rt([l({type:Object})],Q.prototype,"noItems",2),rt([l({type:Object})],Q.prototype,"skeleton",2),rt([l({type:Object})],Q.prototype,"itemPropertyMap",2),rt([l()],Q.prototype,"cache",2),rt([l()],Q.prototype,"targetRequestDuration",2),rt([l()],Q.prototype,"limit",2),rt([l()],Q.prototype,"lazyBoundsRatio",2),rt([l()],Q.prototype,"offset",2),rt([l()],Q.prototype,"resultCount",2),rt([l({type:Boolean})],Q.prototype,"noLazyload",2),rt([l({type:String})],Q.prototype,"loader",2),rt([l()],Q.prototype,"filteredFields",2),rt([l({type:String})],Q.prototype,"dataProviderExpression",2),rt([l({type:Boolean})],Q.prototype,"invalidateOnPageShow",2),rt([l({type:String})],Q.prototype,"idKey",2),Q=rt([x(sl)],Q);var il=Object.defineProperty,rl=Object.getOwnPropertyDescriptor,je=(r,t,s,i)=>{for(var e=i>1?void 0:i?rl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&il(t,s,e),e};const ol="sonic-submit";let ee=class extends X(w){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null,this.clickTimeStamp=0,this.submit=async r=>{var b;if(this.disabled||r instanceof KeyboardEvent&&r.key!=="Enter")return;r instanceof MouseEvent&&r.stopPropagation();const t=E.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(t.isFormValid=!0,t.invalidateForm(),!t.isFormValid.get())return;if(this.disabled=!0,ot.show(),t.isFormValid,this.hasAttribute("native")){this.submitNativeForm();return}const i=((b=this.getAttribute("method"))==null?void 0:b.toLocaleLowerCase())||"post",e=this.hasAttribute("sendAsFormData"),o=t.get();delete o.isFormValid;const n=this.getAncestorAttributeValue("headersDataProvider"),a=n?E.getInstance().get(n):null;let c={};a&&(c=a.get());let h=null;const d=this.getAncestorAttributeValue("dataProvider"),p=this.endPoint||d,g=async()=>{var _,C,O,T,q,W,kt,Lo;const y={...o};if(delete y.needsCaptchaValidation,delete c.needsCaptchaValidation,e)h=await((_=this.api)==null?void 0:_.submitFormData(p,y,i,c));else switch(i){case"put":h=await((C=this.api)==null?void 0:C.put(p,y,c));break;case"patch":h=await((O=this.api)==null?void 0:O.patch(p,y,c));break;case"delete":h=await((T=this.api)==null?void 0:T.delete(p,y,c));break;case"get":const ei=new URLSearchParams;if(y)for(const Eo in y)ei.append(Eo,y[Eo]);const Bd="?"+ei.toString();h=await((q=this.api)==null?void 0:q.get(p+Bd,c));break;default:h=await((W=this.api)==null?void 0:W.post(p,y,c));break}ot.hide(),h?h._sonic_http_response_&&!h._sonic_http_response_.ok&&Object.keys(h).length===1&&(h.messages=[{content:"Network Error",status:"error"}]):h={messages:[{content:"Network Error",status:"error"}]};const S=this.getAncestorAttributeValue("clearedDataOnSuccess");S&&S.split(" ").forEach(ei=>E.get(ei).set({}));const D=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",f=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";(Lo=(kt=this.api)==null?void 0:kt.lastResult)!=null&&Lo.ok&&y[D]&&y[f]&&this.saveCredentials(y[D],y[f]),this.submitResultKey&&(h=tt.traverse(h,this.submitResultKey.split("."),!0));const u=this.getAncestorAttributeValue("submitResultDataProvider");u&&E.get(u).set(h),this.disabled=!1,this.dispatchEvent(new CustomEvent("submit",{detail:h,bubbles:!0,composed:!0}))},v=a!=null&&a.needsCaptchaValidation.get()?a:t.needsCaptchaValidation.get()?t:null;if(v){v.captchaToken="request_token";const y=S=>{S!="request_token"?(g(),v.captchaToken.offAssign(y)):(ot.hide(),this.disabled=!1)};v.captchaToken.onAssign(y)}else g()}}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",this.submit),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",this.submit),super.connectedCallback(),this.api=new Ne(this.getApiConfiguration())}submitNativeForm(){const r=Xt.getClosestForm(this);if(!r)return;const t=this.getAncestorAttributeValue("formDataProvider"),s={...E.get(t).get()};delete s.needsCaptchaValidation;for(const e in s){if(e=="isFormValid")continue;let o=r.querySelector('input[name="'+e+'"], select[name="'+e+'"], textarea[name="'+e+'"]');o||(o=document.createElement("input"),o.type="hidden",o.name=e,r.appendChild(o));let n=s[e];Array.isArray(n)&&(n=n.join(",")),o.type==="checkbox"||o.type==="radio"?n&&(o.checked=!0):o.value=n}const i=document.createElement("input");i.name=this.name,i.style.display="none",i.value=this.value,i.type="submit",r.appendChild(i),i&&i.click()}async saveCredentials(r,t){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:r,password:t});await navigator.credentials.store(s)}}render(){return m`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};ee.styles=$`
|
|
1266
1266
|
[data-disabled] {
|
|
1267
1267
|
opacity: 0.3;
|
|
1268
1268
|
pointer-events: none;
|
|
@@ -1970,7 +1970,7 @@
|
|
|
1970
1970
|
@input=${this.handleChange}
|
|
1971
1971
|
@blur=${this.handleBlur}
|
|
1972
1972
|
type=${this.type}
|
|
1973
|
-
disabled=${
|
|
1973
|
+
?disabled=${this.disabled}
|
|
1974
1974
|
?readonly=${this.readonly}
|
|
1975
1975
|
?autofocus=${this.autofocus}
|
|
1976
1976
|
list=${P(this.list)}
|
|
@@ -2203,7 +2203,7 @@
|
|
|
2203
2203
|
@blur=${this.handleBlur}
|
|
2204
2204
|
?required=${this.required}
|
|
2205
2205
|
?data-indeterminate=${this.showAsIndeterminate}
|
|
2206
|
-
|
|
2206
|
+
?disabled=${this.disabled}
|
|
2207
2207
|
.checked=${P(this.checked)}
|
|
2208
2208
|
.name=${this.name}
|
|
2209
2209
|
.value=${this.value}
|
|
@@ -2485,14 +2485,14 @@
|
|
|
2485
2485
|
}
|
|
2486
2486
|
|
|
2487
2487
|
@supports selector(:has(*)) {
|
|
2488
|
-
:host([
|
|
2488
|
+
:host(:not([disabled]):not([align="center"]))
|
|
2489
2489
|
.form-element:not(:has(option:only-child)) {
|
|
2490
2490
|
padding-right: max(1.5em, calc(1.5 * var(--sc-input-px)));
|
|
2491
2491
|
}
|
|
2492
2492
|
}
|
|
2493
2493
|
/*Firefox etc.*/
|
|
2494
2494
|
@supports not selector(:has(*)) {
|
|
2495
|
-
:host([
|
|
2495
|
+
:host(:not([disabled]):not([align="center"])) .form-element {
|
|
2496
2496
|
padding-right: max(1.5em, calc(1.5 * var(--sc-input-px)));
|
|
2497
2497
|
}
|
|
2498
2498
|
}
|
|
@@ -2513,7 +2513,7 @@
|
|
|
2513
2513
|
}
|
|
2514
2514
|
|
|
2515
2515
|
option {
|
|
2516
|
-
padding: 0.1rem var(--sc-input-px);
|
|
2516
|
+
padding: 0.1rem var(--sc-input-px, 0);
|
|
2517
2517
|
color: var(--sc-base-content, #000);
|
|
2518
2518
|
background: var(--sc-base, #fff);
|
|
2519
2519
|
}
|
|
@@ -2541,7 +2541,7 @@
|
|
|
2541
2541
|
id="${this.id||"form-element"}"
|
|
2542
2542
|
@input=${this.handleChange}
|
|
2543
2543
|
@blur=${this.handleBlur}
|
|
2544
|
-
disabled=${
|
|
2544
|
+
?disabled=${this.disabled}
|
|
2545
2545
|
?required=${this.required}
|
|
2546
2546
|
?autofocus=${this.autofocus}
|
|
2547
2547
|
rows=${P(this.rows)}
|
|
@@ -3066,7 +3066,13 @@ ${this.value}</textarea
|
|
|
3066
3066
|
font-weight: var(--sc-headings-font-weight, 700);
|
|
3067
3067
|
font-style: var(--sc-headings-font-style, normal);
|
|
3068
3068
|
}
|
|
3069
|
-
`],Wi=mh([x(gh)],Wi);var bh=Object.defineProperty,vh=Object.getOwnPropertyDescriptor,st=(r,t,s,i)=>{for(var e=i>1?void 0:i?vh(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&bh(t,s,e),e};const Po="sonic-modal";let F=class extends X(w){constructor(){super(...arguments),this.forceAction=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.zIndex="var(--sc-modal-z-index)",this.fullScreen=!1,this.visible=!1}static create(r){const t=document.createElement(Po);return t.options=r,r.removeHashOnHide===!0&&t.setAttribute("removeHashOnHide","true"),r.removeOnHide===!0&&t.setAttribute("removeOnHide","true"),r.maxWidth&&(t.maxWidth=r==null?void 0:r.maxWidth),r.width&&(t.width=r==null?void 0:r.width),r.maxHeight&&(t.maxHeight=r==null?void 0:r.maxHeight),r.height&&(t.height=r==null?void 0:r.height),r.forceAction&&(t.forceAction=!0),r.fullScreen&&(t.fullScreen=r==null?void 0:r.fullScreen),r.effect&&(t.effect=r==null?void 0:r.effect),r.paddingX&&t.style.setProperty("--sc-modal-px",r==null?void 0:r.paddingX),r.paddingY&&t.style.setProperty("--sc-modal-py",r==null?void 0:r.paddingY),r.zIndex&&t.style.setProperty("--sc-modal-z-index",r==null?void 0:r.zIndex),_t.getPopContainer().appendChild(t),t.show(),t}connectedCallback(){F.modals.push(this),super.connectedCallback(),this.handleFullsceen()}disconnectedCallback(){F.modals.splice(F.modals.indexOf(this),1),super.disconnectedCallback()}updated(){const r=this;document.addEventListener("keydown",this.handleEscape),r.closeBtn.forEach(t=>{t.addEventListener("click",function(){r.hide()},{once:!0})})}willUpdate(r){r.has("fullScreen")&&this.handleFullsceen(),r.has("effect")&&(this.effect=="fade"?this.animation={keyframeOptions:{duration:400},in:Qr,out:Xr}:this.effect=="none"?this.animation=void 0:this.animation={keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]}),super.willUpdate(r)}render(){if(this.visible==!1)return A;const r={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,zIndex:this.zIndex,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return m
|
|
3069
|
+
`],Wi=mh([x(gh)],Wi);var bh=Object.defineProperty,vh=Object.getOwnPropertyDescriptor,st=(r,t,s,i)=>{for(var e=i>1?void 0:i?vh(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&bh(t,s,e),e};const Po="sonic-modal";let F=class extends X(w){constructor(){super(...arguments),this.forceAction=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.zIndex="var(--sc-modal-z-index)",this.fullScreen=!1,this.visible=!1}static create(r){const t=document.createElement(Po);return t.options=r,r.removeHashOnHide===!0&&t.setAttribute("removeHashOnHide","true"),r.removeOnHide===!0&&t.setAttribute("removeOnHide","true"),r.maxWidth&&(t.maxWidth=r==null?void 0:r.maxWidth),r.width&&(t.width=r==null?void 0:r.width),r.maxHeight&&(t.maxHeight=r==null?void 0:r.maxHeight),r.height&&(t.height=r==null?void 0:r.height),r.forceAction&&(t.forceAction=!0),r.fullScreen&&(t.fullScreen=r==null?void 0:r.fullScreen),r.effect&&(t.effect=r==null?void 0:r.effect),r.paddingX&&t.style.setProperty("--sc-modal-px",r==null?void 0:r.paddingX),r.paddingY&&t.style.setProperty("--sc-modal-py",r==null?void 0:r.paddingY),r.zIndex&&t.style.setProperty("--sc-modal-z-index",r==null?void 0:r.zIndex),_t.getPopContainer().appendChild(t),t.show(),t}connectedCallback(){F.modals.push(this),super.connectedCallback(),this.handleFullsceen()}disconnectedCallback(){F.modals.splice(F.modals.indexOf(this),1),super.disconnectedCallback()}updated(){const r=this;document.addEventListener("keydown",this.handleEscape),r.closeBtn.forEach(t=>{t.addEventListener("click",function(){r.hide()},{once:!0})})}willUpdate(r){r.has("fullScreen")&&this.handleFullsceen(),r.has("effect")&&(this.effect=="fade"?this.animation={keyframeOptions:{duration:400},in:Qr,out:Xr}:this.effect=="none"?this.animation=void 0:this.animation={keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]}),super.willUpdate(r)}render(){if(this.visible==!1)return A;const r={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,zIndex:this.zIndex,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return m`
|
|
3070
|
+
<div
|
|
3071
|
+
class="overlay"
|
|
3072
|
+
@click="${this.forceAction?null:this.hide}"
|
|
3073
|
+
${zs({keyframeOptions:{duration:500},in:Qr,out:[{opacity:0,pointerEvents:"none"}]})}
|
|
3074
|
+
></div>
|
|
3075
|
+
<div
|
|
3070
3076
|
class="modal-wrapper"
|
|
3071
3077
|
style=${gt(t)}
|
|
3072
3078
|
${zs({out:Xr})}
|
|
@@ -3087,11 +3093,7 @@ ${this.value}</textarea
|
|
|
3087
3093
|
</div>
|
|
3088
3094
|
</div>
|
|
3089
3095
|
</div>
|
|
3090
|
-
|
|
3091
|
-
class="overlay"
|
|
3092
|
-
@click="${this.forceAction?null:this.hide}"
|
|
3093
|
-
${zs({keyframeOptions:{duration:500},in:Qr,out:[{opacity:0,pointerEvents:"none"}]})}
|
|
3094
|
-
></div>`}modalFragment(r){var i;const t=(i=this.options)==null?void 0:i[r];if(!t)return A;let s;switch(t instanceof Object?s=t:s=z(t),r){case"title":return m`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return m`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return m`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return m`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return A}}show(){var r,t;this.visible=!0,(r=this.modalElement)==null||r.setAttribute("tabindex","0"),(t=this.modalElement)==null||t.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var r;this.visible=!1,(r=this.modalElement)==null||r.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&it.get(this.getAttribute("resetDataProviderOnHide")).set({}),setTimeout(()=>{this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname),this.removeOnHide&&this.remove(),this.dispatchEvent(new CustomEvent("hidden"))},480)}dispose(){this.hide(),this.remove()}static disposeAll(){F.modals.forEach(r=>{r.dispose()})}handleEscape(r){r.key==="Escape"&&F.modals.forEach(t=>{t.forceAction||t.hide()})}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};F.styles=[cs,$`
|
|
3096
|
+
`}modalFragment(r){var i;const t=(i=this.options)==null?void 0:i[r];if(!t)return A;let s;switch(t instanceof Object?s=t:s=z(t),r){case"title":return m`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return m`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return m`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return m`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return A}}show(){var r,t;this.visible=!0,(r=this.modalElement)==null||r.setAttribute("tabindex","0"),(t=this.modalElement)==null||t.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var r;this.visible=!1,(r=this.modalElement)==null||r.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&it.get(this.getAttribute("resetDataProviderOnHide")).set({}),setTimeout(()=>{this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname),this.removeOnHide&&this.remove(),this.dispatchEvent(new CustomEvent("hidden"))},480)}dispose(){this.hide(),this.remove()}static disposeAll(){F.modals.forEach(r=>{r.dispose()})}handleEscape(r){r.key==="Escape"&&F.modals.forEach(t=>{t.forceAction||t.hide()})}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};F.styles=[cs,$`
|
|
3095
3097
|
:host {
|
|
3096
3098
|
--sc-modal-py: 2.5rem;
|
|
3097
3099
|
--sc-modal-px: 1.5rem;
|
|
@@ -3110,7 +3112,7 @@ ${this.value}</textarea
|
|
|
3110
3112
|
bottom: 0;
|
|
3111
3113
|
left: 0;
|
|
3112
3114
|
width: 100%;
|
|
3113
|
-
z-index:
|
|
3115
|
+
z-index: var(--sc-modal-z-index);
|
|
3114
3116
|
align-items: center;
|
|
3115
3117
|
justify-content: center;
|
|
3116
3118
|
flex-direction: column;
|
package/concorde-core.es.js
CHANGED
|
@@ -563,7 +563,7 @@ let N = (k = class {
|
|
|
563
563
|
const h = await new Response(a.readable).arrayBuffer();
|
|
564
564
|
return new TextDecoder().decode(h);
|
|
565
565
|
}
|
|
566
|
-
}, k.buildDate = "
|
|
566
|
+
}, k.buildDate = "Wed Jun 04 2025 15:33:49 GMT+0200 (Central European Summer Time)", k.changed = !1, k.saving = !1, k.saveId = 0, k.instance = null, k.instances = /* @__PURE__ */ new Map(), k.modifiedCollectore = [], k);
|
|
567
567
|
if (typeof window < "u") {
|
|
568
568
|
const r = window;
|
|
569
569
|
r[Ds + "PublisherManager"] = r[Ds + "PublisherManager"] || N;
|
|
@@ -6434,7 +6434,7 @@ let te = class extends X(w) {
|
|
|
6434
6434
|
break;
|
|
6435
6435
|
}
|
|
6436
6436
|
ot.hide(), h ? h._sonic_http_response_ && !h._sonic_http_response_.ok && Object.keys(h).length === 1 && (h.messages = [{ content: "Network Error", status: "error" }]) : h = {
|
|
6437
|
-
messages: [{ content: "Network
|
|
6437
|
+
messages: [{ content: "Network Error", status: "error" }]
|
|
6438
6438
|
};
|
|
6439
6439
|
const S = this.getAncestorAttributeValue(
|
|
6440
6440
|
"clearedDataOnSuccess"
|
|
@@ -8309,7 +8309,7 @@ let j = class extends Xs(Fe(X(w))) {
|
|
|
8309
8309
|
@input=${this.handleChange}
|
|
8310
8310
|
@blur=${this.handleBlur}
|
|
8311
8311
|
type=${this.type}
|
|
8312
|
-
disabled=${
|
|
8312
|
+
?disabled=${this.disabled}
|
|
8313
8313
|
?readonly=${this.readonly}
|
|
8314
8314
|
?autofocus=${this.autofocus}
|
|
8315
8315
|
list=${P(this.list)}
|
|
@@ -9151,7 +9151,7 @@ let ut = class extends Bi(
|
|
|
9151
9151
|
@blur=${this.handleBlur}
|
|
9152
9152
|
?required=${this.required}
|
|
9153
9153
|
?data-indeterminate=${this.showAsIndeterminate}
|
|
9154
|
-
|
|
9154
|
+
?disabled=${this.disabled}
|
|
9155
9155
|
.checked=${P(this.checked)}
|
|
9156
9156
|
.name=${this.name}
|
|
9157
9157
|
.value=${this.value}
|
|
@@ -9603,14 +9603,14 @@ Y.styles = [
|
|
|
9603
9603
|
}
|
|
9604
9604
|
|
|
9605
9605
|
@supports selector(:has(*)) {
|
|
9606
|
-
:host([
|
|
9606
|
+
:host(:not([disabled]):not([align="center"]))
|
|
9607
9607
|
.form-element:not(:has(option:only-child)) {
|
|
9608
9608
|
padding-right: max(1.5em, calc(1.5 * var(--sc-input-px)));
|
|
9609
9609
|
}
|
|
9610
9610
|
}
|
|
9611
9611
|
/*Firefox etc.*/
|
|
9612
9612
|
@supports not selector(:has(*)) {
|
|
9613
|
-
:host([
|
|
9613
|
+
:host(:not([disabled]):not([align="center"])) .form-element {
|
|
9614
9614
|
padding-right: max(1.5em, calc(1.5 * var(--sc-input-px)));
|
|
9615
9615
|
}
|
|
9616
9616
|
}
|
|
@@ -9631,7 +9631,7 @@ Y.styles = [
|
|
|
9631
9631
|
}
|
|
9632
9632
|
|
|
9633
9633
|
option {
|
|
9634
|
-
padding: 0.1rem var(--sc-input-px);
|
|
9634
|
+
padding: 0.1rem var(--sc-input-px, 0);
|
|
9635
9635
|
color: var(--sc-base-content, #000);
|
|
9636
9636
|
background: var(--sc-base, #fff);
|
|
9637
9637
|
}
|
|
@@ -9757,7 +9757,7 @@ let ht = class extends Xs(Fe(X(w))) {
|
|
|
9757
9757
|
id="${this.id || "form-element"}"
|
|
9758
9758
|
@input=${this.handleChange}
|
|
9759
9759
|
@blur=${this.handleBlur}
|
|
9760
|
-
disabled=${
|
|
9760
|
+
?disabled=${this.disabled}
|
|
9761
9761
|
?required=${this.required}
|
|
9762
9762
|
?autofocus=${this.autofocus}
|
|
9763
9763
|
rows=${P(this.rows)}
|
|
@@ -10944,7 +10944,19 @@ let F = class extends X(w) {
|
|
|
10944
10944
|
height: this.height,
|
|
10945
10945
|
borderRadius: this.fullScreen ? "0" : "var(--sc-modal-rounded)"
|
|
10946
10946
|
};
|
|
10947
|
-
return m
|
|
10947
|
+
return m`
|
|
10948
|
+
<div
|
|
10949
|
+
class="overlay"
|
|
10950
|
+
@click="${this.forceAction ? null : this.hide}"
|
|
10951
|
+
${Ss({
|
|
10952
|
+
keyframeOptions: {
|
|
10953
|
+
duration: 500
|
|
10954
|
+
},
|
|
10955
|
+
in: Lr,
|
|
10956
|
+
out: [{ opacity: 0, pointerEvents: "none" }]
|
|
10957
|
+
})}
|
|
10958
|
+
></div>
|
|
10959
|
+
<div
|
|
10948
10960
|
class="modal-wrapper"
|
|
10949
10961
|
style=${gt(t)}
|
|
10950
10962
|
${Ss({
|
|
@@ -10967,17 +10979,7 @@ let F = class extends X(w) {
|
|
|
10967
10979
|
</div>
|
|
10968
10980
|
</div>
|
|
10969
10981
|
</div>
|
|
10970
|
-
|
|
10971
|
-
class="overlay"
|
|
10972
|
-
@click="${this.forceAction ? null : this.hide}"
|
|
10973
|
-
${Ss({
|
|
10974
|
-
keyframeOptions: {
|
|
10975
|
-
duration: 500
|
|
10976
|
-
},
|
|
10977
|
-
in: Lr,
|
|
10978
|
-
out: [{ opacity: 0, pointerEvents: "none" }]
|
|
10979
|
-
})}
|
|
10980
|
-
></div>`;
|
|
10982
|
+
`;
|
|
10981
10983
|
}
|
|
10982
10984
|
modalFragment(r) {
|
|
10983
10985
|
var i;
|
|
@@ -11047,7 +11049,7 @@ F.styles = [
|
|
|
11047
11049
|
bottom: 0;
|
|
11048
11050
|
left: 0;
|
|
11049
11051
|
width: 100%;
|
|
11050
|
-
z-index:
|
|
11052
|
+
z-index: var(--sc-modal-z-index);
|
|
11051
11053
|
align-items: center;
|
|
11052
11054
|
justify-content: center;
|
|
11053
11055
|
flex-direction: column;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(K){typeof define=="function"&&define.amd?define(K):K()})(function(){"use strict";var Dt,k,L,ko,t,G;let K=class Vt{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Vt.getAncestorAttributeValue(t,"token"),i=Vt.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Vt.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const a=Vt.getAncestorAttributeValue(t,"tokenProvider"),c=Vt.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Vt.getAncestorAttributeValue(t,"userName"),n=Vt.getAncestorAttributeValue(t,"password"));const h=Vt.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),p=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:a,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:p}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Vt.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}};const si=r=>{const t=document.documentElement,s=new MutationObserver(e=>{for(let o of e)o.type==="attributes"&&o.attributeName==="lang"&&r()}),i={attributes:!0,attributeFilter:["lang"]};s.observe(t,i)};let ws=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=K.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,p){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:p}).format}const[n,a]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),a&&c.push(o(s,"minute",i)(a)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}},Mo=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(s=>{setTimeout(s,t)})}},rr="sonic";typeof __SONIC_PREFIX__<"u"&&(rr=__SONIC_PREFIX__);let or=rr.replace(/-([a-z])/g,r=>r[1].toUpperCase());const xs=or.charAt(0).toUpperCase()+or.slice(1);function $s(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function He(r){return typeof r=="object"&&r!=null}let De="sonic";typeof __SONIC_PREFIX__>"u"&&(De="sonic"+Math.floor(Math.random()*1e6));const ii=De=="sonic"?"publisher-proxies-data":De+"-publisher-proxies-data";let ri=(Dt=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),Dt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!E.changed){E.changed=!0,E.saveId++;const s=E.saveId;setTimeout(()=>E.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>{e(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.add(t)}offFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.delete(t)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,s=!1){var e,o,n;if(this._value_===t||this._value_&&t&&$s(this._value_)&&$s(t)&&this._value_.__value===t.__value)return!0;this._value_=He(t)?t:{__value:t},this._cachedGet_=void 0;const i=$s(this._value_);if(this._parentKey_&&this.parent){const a=$s(this._value_)?this._value_.__value:this._value_;if(((e=this.parent)==null?void 0:e.get())==null&&((o=this.parent)==null?void 0:o.get())==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:a});else{const c=[];c[Number(this._parentKey_)]=a,this.parent.set(c)}else this.parent._value_[this._parentKey_]=a}if(i)return this._proxies_.forEach((a,c)=>{c!="_parent_"&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const a in this._value_)this._value_[a]===void 0&&delete this._value_[a];if(this._proxies_.forEach((a,c)=>{const h=this._value_[c];c!="_parent_"&&h===void 0&&h!==null&&isNaN(Number(c))&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),He(this._value_))for(const a in this._value_){const c=t[a],d=He(c)?c:{__value:c};if(!this._proxies_.has(a)){this._publishDynamicFilling_(a,c);continue}(n=this._proxies_.get(a))==null||n.set(d,!0),this._publishDynamicFilling_(a,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(E.modifiedCollectore.length>0&&E.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(Dt.instancesCounter++,this._instanceCounter_=Dt.instancesCounter),Dt.instances.set(this._instanceCounter_,this),"<"+De+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+De+"-publisher-proxy>"}},Dt.instances=new Map,Dt.instancesCounter=0,Dt),E=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}invalidateAll(){this.publishers.forEach(t=>{t._invalidate_on_page_show_&&t.invalidate()})}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(ii),e=null;if(i&&(e=await this.decompress(i,"gzip")),e)try{this.localStorageData=JSON.parse(e)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem(ii,i),this.localStorageData={};const o=1e3*60*60*12;for(const n in this.localStorageData){const a=this.localStorageData[n],c=new Date().getTime()-(a.expirationDelayMs||o);a.lastModifiationMS<c&&delete this.localStorageData[n]}t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const s=k.instances.get(t);return s||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new k)}return k.instance==null?new k:k.instance}static registerInstance(t,s){k.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),k.instances.set(t,s)}static get(t,s){return k.getInstance().get(t,s)}static collectModifiedPublisher(){k.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return k.modifiedCollectore.shift()}static delete(t){return t?k.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+K.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled",e=(s==null?void 0:s.invalidateOnPageShow)===!0;if(!this.publishers.has(t)){const n={},a=new Be(n);this.set(t,a)}const o=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(s!=null&&s.expirationDelayMs&&(o._expiration_delay_=s.expirationDelayMs),o._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(o,t)),e&&(o._invalidate_on_page_show_=e),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+K.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:o._expiration_delay_,data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(ii,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const a=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(a);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,a=new n.DecompressionStream(s),c=a.writable.getWriter();c.write(o),c.close();const h=await new Response(a.readable).arrayBuffer();return new TextDecoder().decode(h)}},k.buildDate="Mon May 26 2025 14:40:09 GMT+0200 (Central European Summer Time)",k.changed=!1,k.saving=!1,k.saveId=0,k.instance=null,k.instances=new Map,k.modifiedCollectore=[],k);if(typeof window<"u"){const r=window;r[xs+"PublisherManager"]=r[xs+"PublisherManager"]||E}const Io=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);class Be extends ri{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Io.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const a=o._value_[n],c=new Be(He(a)?a:{__value:a},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,a){var h;if(n=="_value_")return o._value_=a,!0;if(n=="_cachedGet_")return o._cachedGet_=a,!0;if(n=="_assignmentId_")return o._assignmentId_=a,!0;if(n=="_is_savable_")return o._is_savable_=a,!0;if(n=="_expiration_delay_")return o._expiration_delay_=a,!0;if(n=="_invalidate_on_page_show_")return o._invalidate_on_page_show_=a,!0;if(n=="_instanceCounter_")return o._instanceCounter_=a,!0;if(!o._proxies_.has(n)){const d=new Be({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==a&&(o._value_[n]=a,o._publishDynamicFilling_(n,a),(h=o._proxies_.get(n))==null||h.set(He(a)?a:{__value:a})),!0},deleteProperty:function(o,n){var a;return o._publishDynamicFilling_(n,null),(a=o._proxies_.get(n))==null||a.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,a){return a&&"value"in a&&(o._value_[n]=a.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class jo extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=ri.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}try{customElements.define(De+"-publisher-proxy",jo)}catch{}window.addEventListener("pageshow",r=>{r.persisted&&E.getInstance().invalidateAll()});let Ps=(L=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(L.observedElements.keys()).forEach(t=>L.unObserve(t)))}static observe(t){if(!t||!L.enabled||L.observedElements.has(t))return;const s=new MutationObserver(L.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>L.addPublisherListeners(e)),L.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>L.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.addPublisherListeners(s)):t.childNodes.forEach(s=>L.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.removePublisherListeners(s)):t.childNodes.forEach(s=>L.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":L.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{L.onAdded(i)}),s.removedNodes.forEach(i=>{L.onRemoved(i)});break}}static removePublisherListeners(t){const s=L.publisherListeners.get(t);s&&(L.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:L.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){L.removePublisherListeners(t);const s=K.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=E.getInstance().get(s),e=L.getDataBindItems(t),o=[];e.forEach(n=>{const a=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of a.variables){const d=h;let p=i;p=L.getSubPublisher(i,d);const g=t,v={publisher:p,onAssign:()=>{const b=a.variables.map(D=>{var f;return(f=L.getSubPublisher(i,D))==null?void 0:f.get()});let y=a.expression,S=!1;if(b.length==1&&a.variables[0].join(".")==y.substring(1)){let D=b[0];D===null&&(D=""),g[c]=D;return}for(let D=0;D<b.length;D++){let f=b[D];const u=a.variables[D];f===null&&(S=!0,f=void 0),y=y.replace("$"+u.join("."),f)}if(y.indexOf("|")!=-1){const D=y.indexOf("|");if(D==0)y=ws.js(y.substring(1));else{const f=y.substring(0,D),u=y.substring(D+1),_=ws[f];y=S?"":_?_(u):y}}else y=S?"":y;g[c]=y}};p==null||p.onAssign(v.onAssign),o.push(v)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);Ps.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ps);let tt=class Zt{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const a=t[n],c=s[n];if(i?a!==c:a!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const a=t[n],c=s[n],h=Zt.isObject(a)&&Zt.isObject(c),d=i?a!==c:a!=c;if(h&&!Zt.deepEqual(a,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return Zt.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&Zt.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Zt.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Zt.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Zt.getURLSearchArray(t,"").join("&")}};const pt=tt.traverseDotNotation;/**
|
|
1
|
+
(function(K){typeof define=="function"&&define.amd?define(K):K()})(function(){"use strict";var Dt,k,L,ko,t,G;let K=class Vt{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Vt.getAncestorAttributeValue(t,"token"),i=Vt.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Vt.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const a=Vt.getAncestorAttributeValue(t,"tokenProvider"),c=Vt.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Vt.getAncestorAttributeValue(t,"userName"),n=Vt.getAncestorAttributeValue(t,"password"));const h=Vt.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),p=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:a,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:p}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Vt.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}};const si=r=>{const t=document.documentElement,s=new MutationObserver(e=>{for(let o of e)o.type==="attributes"&&o.attributeName==="lang"&&r()}),i={attributes:!0,attributeFilter:["lang"]};s.observe(t,i)};let ws=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=K.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,p){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:p}).format}const[n,a]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),a&&c.push(o(s,"minute",i)(a)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}},Mo=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(s=>{setTimeout(s,t)})}},rr="sonic";typeof __SONIC_PREFIX__<"u"&&(rr=__SONIC_PREFIX__);let or=rr.replace(/-([a-z])/g,r=>r[1].toUpperCase());const xs=or.charAt(0).toUpperCase()+or.slice(1);function $s(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function He(r){return typeof r=="object"&&r!=null}let De="sonic";typeof __SONIC_PREFIX__>"u"&&(De="sonic"+Math.floor(Math.random()*1e6));const ii=De=="sonic"?"publisher-proxies-data":De+"-publisher-proxies-data";let ri=(Dt=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),Dt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!E.changed){E.changed=!0,E.saveId++;const s=E.saveId;setTimeout(()=>E.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>{e(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.add(t)}offFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.delete(t)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,s=!1){var e,o,n;if(this._value_===t||this._value_&&t&&$s(this._value_)&&$s(t)&&this._value_.__value===t.__value)return!0;this._value_=He(t)?t:{__value:t},this._cachedGet_=void 0;const i=$s(this._value_);if(this._parentKey_&&this.parent){const a=$s(this._value_)?this._value_.__value:this._value_;if(((e=this.parent)==null?void 0:e.get())==null&&((o=this.parent)==null?void 0:o.get())==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:a});else{const c=[];c[Number(this._parentKey_)]=a,this.parent.set(c)}else this.parent._value_[this._parentKey_]=a}if(i)return this._proxies_.forEach((a,c)=>{c!="_parent_"&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const a in this._value_)this._value_[a]===void 0&&delete this._value_[a];if(this._proxies_.forEach((a,c)=>{const h=this._value_[c];c!="_parent_"&&h===void 0&&h!==null&&isNaN(Number(c))&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),He(this._value_))for(const a in this._value_){const c=t[a],d=He(c)?c:{__value:c};if(!this._proxies_.has(a)){this._publishDynamicFilling_(a,c);continue}(n=this._proxies_.get(a))==null||n.set(d,!0),this._publishDynamicFilling_(a,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(E.modifiedCollectore.length>0&&E.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(Dt.instancesCounter++,this._instanceCounter_=Dt.instancesCounter),Dt.instances.set(this._instanceCounter_,this),"<"+De+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+De+"-publisher-proxy>"}},Dt.instances=new Map,Dt.instancesCounter=0,Dt),E=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}invalidateAll(){this.publishers.forEach(t=>{t._invalidate_on_page_show_&&t.invalidate()})}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(ii),e=null;if(i&&(e=await this.decompress(i,"gzip")),e)try{this.localStorageData=JSON.parse(e)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem(ii,i),this.localStorageData={};const o=1e3*60*60*12;for(const n in this.localStorageData){const a=this.localStorageData[n],c=new Date().getTime()-(a.expirationDelayMs||o);a.lastModifiationMS<c&&delete this.localStorageData[n]}t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const s=k.instances.get(t);return s||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new k)}return k.instance==null?new k:k.instance}static registerInstance(t,s){k.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),k.instances.set(t,s)}static get(t,s){return k.getInstance().get(t,s)}static collectModifiedPublisher(){k.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return k.modifiedCollectore.shift()}static delete(t){return t?k.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+K.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled",e=(s==null?void 0:s.invalidateOnPageShow)===!0;if(!this.publishers.has(t)){const n={},a=new Be(n);this.set(t,a)}const o=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(s!=null&&s.expirationDelayMs&&(o._expiration_delay_=s.expirationDelayMs),o._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(o,t)),e&&(o._invalidate_on_page_show_=e),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+K.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:o._expiration_delay_,data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(ii,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const a=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(a);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,a=new n.DecompressionStream(s),c=a.writable.getWriter();c.write(o),c.close();const h=await new Response(a.readable).arrayBuffer();return new TextDecoder().decode(h)}},k.buildDate="Wed Jun 04 2025 15:33:49 GMT+0200 (Central European Summer Time)",k.changed=!1,k.saving=!1,k.saveId=0,k.instance=null,k.instances=new Map,k.modifiedCollectore=[],k);if(typeof window<"u"){const r=window;r[xs+"PublisherManager"]=r[xs+"PublisherManager"]||E}const Io=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);class Be extends ri{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Io.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const a=o._value_[n],c=new Be(He(a)?a:{__value:a},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,a){var h;if(n=="_value_")return o._value_=a,!0;if(n=="_cachedGet_")return o._cachedGet_=a,!0;if(n=="_assignmentId_")return o._assignmentId_=a,!0;if(n=="_is_savable_")return o._is_savable_=a,!0;if(n=="_expiration_delay_")return o._expiration_delay_=a,!0;if(n=="_invalidate_on_page_show_")return o._invalidate_on_page_show_=a,!0;if(n=="_instanceCounter_")return o._instanceCounter_=a,!0;if(!o._proxies_.has(n)){const d=new Be({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==a&&(o._value_[n]=a,o._publishDynamicFilling_(n,a),(h=o._proxies_.get(n))==null||h.set(He(a)?a:{__value:a})),!0},deleteProperty:function(o,n){var a;return o._publishDynamicFilling_(n,null),(a=o._proxies_.get(n))==null||a.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,a){return a&&"value"in a&&(o._value_[n]=a.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class jo extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=ri.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}try{customElements.define(De+"-publisher-proxy",jo)}catch{}window.addEventListener("pageshow",r=>{r.persisted&&E.getInstance().invalidateAll()});let Ps=(L=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(L.observedElements.keys()).forEach(t=>L.unObserve(t)))}static observe(t){if(!t||!L.enabled||L.observedElements.has(t))return;const s=new MutationObserver(L.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>L.addPublisherListeners(e)),L.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>L.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.addPublisherListeners(s)):t.childNodes.forEach(s=>L.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.removePublisherListeners(s)):t.childNodes.forEach(s=>L.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":L.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{L.onAdded(i)}),s.removedNodes.forEach(i=>{L.onRemoved(i)});break}}static removePublisherListeners(t){const s=L.publisherListeners.get(t);s&&(L.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:L.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){L.removePublisherListeners(t);const s=K.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=E.getInstance().get(s),e=L.getDataBindItems(t),o=[];e.forEach(n=>{const a=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of a.variables){const d=h;let p=i;p=L.getSubPublisher(i,d);const g=t,v={publisher:p,onAssign:()=>{const b=a.variables.map(D=>{var f;return(f=L.getSubPublisher(i,D))==null?void 0:f.get()});let y=a.expression,S=!1;if(b.length==1&&a.variables[0].join(".")==y.substring(1)){let D=b[0];D===null&&(D=""),g[c]=D;return}for(let D=0;D<b.length;D++){let f=b[D];const u=a.variables[D];f===null&&(S=!0,f=void 0),y=y.replace("$"+u.join("."),f)}if(y.indexOf("|")!=-1){const D=y.indexOf("|");if(D==0)y=ws.js(y.substring(1));else{const f=y.substring(0,D),u=y.substring(D+1),_=ws[f];y=S?"":_?_(u):y}}else y=S?"":y;g[c]=y}};p==null||p.onAssign(v.onAssign),o.push(v)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);Ps.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ps);let tt=class Zt{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const a=t[n],c=s[n];if(i?a!==c:a!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const a=t[n],c=s[n],h=Zt.isObject(a)&&Zt.isObject(c),d=i?a!==c:a!=c;if(h&&!Zt.deepEqual(a,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return Zt.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&Zt.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Zt.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Zt.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Zt.getURLSearchArray(t,"").join("&")}};const pt=tt.traverseDotNotation;/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1262,7 +1262,7 @@
|
|
|
1262
1262
|
>
|
|
1263
1263
|
</sonic-list>
|
|
1264
1264
|
`})}
|
|
1265
|
-
`}};Q.instanceCounter=0,rt([l({type:Array})],Q.prototype,"templates",2),rt([l({type:Object})],Q.prototype,"items",2),rt([l({type:Object})],Q.prototype,"noItems",2),rt([l({type:Object})],Q.prototype,"skeleton",2),rt([l({type:Object})],Q.prototype,"itemPropertyMap",2),rt([l()],Q.prototype,"cache",2),rt([l()],Q.prototype,"targetRequestDuration",2),rt([l()],Q.prototype,"limit",2),rt([l()],Q.prototype,"lazyBoundsRatio",2),rt([l()],Q.prototype,"offset",2),rt([l()],Q.prototype,"resultCount",2),rt([l({type:Boolean})],Q.prototype,"noLazyload",2),rt([l({type:String})],Q.prototype,"loader",2),rt([l()],Q.prototype,"filteredFields",2),rt([l({type:String})],Q.prototype,"dataProviderExpression",2),rt([l({type:Boolean})],Q.prototype,"invalidateOnPageShow",2),rt([l({type:String})],Q.prototype,"idKey",2),Q=rt([x(sl)],Q);var il=Object.defineProperty,rl=Object.getOwnPropertyDescriptor,je=(r,t,s,i)=>{for(var e=i>1?void 0:i?rl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&il(t,s,e),e};const ol="sonic-submit";let ee=class extends X(w){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null,this.clickTimeStamp=0,this.submit=async r=>{var b;if(this.disabled||r instanceof KeyboardEvent&&r.key!=="Enter")return;r instanceof MouseEvent&&r.stopPropagation();const t=E.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(t.isFormValid=!0,t.invalidateForm(),!t.isFormValid.get())return;if(this.disabled=!0,ot.show(),t.isFormValid,this.hasAttribute("native")){this.submitNativeForm();return}const i=((b=this.getAttribute("method"))==null?void 0:b.toLocaleLowerCase())||"post",e=this.hasAttribute("sendAsFormData"),o=t.get();delete o.isFormValid;const n=this.getAncestorAttributeValue("headersDataProvider"),a=n?E.getInstance().get(n):null;let c={};a&&(c=a.get());let h=null;const d=this.getAncestorAttributeValue("dataProvider"),p=this.endPoint||d,g=async()=>{var _,C,O,T,q,W,kt,Lo;const y={...o};if(delete y.needsCaptchaValidation,delete c.needsCaptchaValidation,e)h=await((_=this.api)==null?void 0:_.submitFormData(p,y,i,c));else switch(i){case"put":h=await((C=this.api)==null?void 0:C.put(p,y,c));break;case"patch":h=await((O=this.api)==null?void 0:O.patch(p,y,c));break;case"delete":h=await((T=this.api)==null?void 0:T.delete(p,y,c));break;case"get":const ei=new URLSearchParams;if(y)for(const Eo in y)ei.append(Eo,y[Eo]);const Bd="?"+ei.toString();h=await((q=this.api)==null?void 0:q.get(p+Bd,c));break;default:h=await((W=this.api)==null?void 0:W.post(p,y,c));break}ot.hide(),h?h._sonic_http_response_&&!h._sonic_http_response_.ok&&Object.keys(h).length===1&&(h.messages=[{content:"Network Error",status:"error"}]):h={messages:[{content:"Network
|
|
1265
|
+
`}};Q.instanceCounter=0,rt([l({type:Array})],Q.prototype,"templates",2),rt([l({type:Object})],Q.prototype,"items",2),rt([l({type:Object})],Q.prototype,"noItems",2),rt([l({type:Object})],Q.prototype,"skeleton",2),rt([l({type:Object})],Q.prototype,"itemPropertyMap",2),rt([l()],Q.prototype,"cache",2),rt([l()],Q.prototype,"targetRequestDuration",2),rt([l()],Q.prototype,"limit",2),rt([l()],Q.prototype,"lazyBoundsRatio",2),rt([l()],Q.prototype,"offset",2),rt([l()],Q.prototype,"resultCount",2),rt([l({type:Boolean})],Q.prototype,"noLazyload",2),rt([l({type:String})],Q.prototype,"loader",2),rt([l()],Q.prototype,"filteredFields",2),rt([l({type:String})],Q.prototype,"dataProviderExpression",2),rt([l({type:Boolean})],Q.prototype,"invalidateOnPageShow",2),rt([l({type:String})],Q.prototype,"idKey",2),Q=rt([x(sl)],Q);var il=Object.defineProperty,rl=Object.getOwnPropertyDescriptor,je=(r,t,s,i)=>{for(var e=i>1?void 0:i?rl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&il(t,s,e),e};const ol="sonic-submit";let ee=class extends X(w){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null,this.clickTimeStamp=0,this.submit=async r=>{var b;if(this.disabled||r instanceof KeyboardEvent&&r.key!=="Enter")return;r instanceof MouseEvent&&r.stopPropagation();const t=E.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(t.isFormValid=!0,t.invalidateForm(),!t.isFormValid.get())return;if(this.disabled=!0,ot.show(),t.isFormValid,this.hasAttribute("native")){this.submitNativeForm();return}const i=((b=this.getAttribute("method"))==null?void 0:b.toLocaleLowerCase())||"post",e=this.hasAttribute("sendAsFormData"),o=t.get();delete o.isFormValid;const n=this.getAncestorAttributeValue("headersDataProvider"),a=n?E.getInstance().get(n):null;let c={};a&&(c=a.get());let h=null;const d=this.getAncestorAttributeValue("dataProvider"),p=this.endPoint||d,g=async()=>{var _,C,O,T,q,W,kt,Lo;const y={...o};if(delete y.needsCaptchaValidation,delete c.needsCaptchaValidation,e)h=await((_=this.api)==null?void 0:_.submitFormData(p,y,i,c));else switch(i){case"put":h=await((C=this.api)==null?void 0:C.put(p,y,c));break;case"patch":h=await((O=this.api)==null?void 0:O.patch(p,y,c));break;case"delete":h=await((T=this.api)==null?void 0:T.delete(p,y,c));break;case"get":const ei=new URLSearchParams;if(y)for(const Eo in y)ei.append(Eo,y[Eo]);const Bd="?"+ei.toString();h=await((q=this.api)==null?void 0:q.get(p+Bd,c));break;default:h=await((W=this.api)==null?void 0:W.post(p,y,c));break}ot.hide(),h?h._sonic_http_response_&&!h._sonic_http_response_.ok&&Object.keys(h).length===1&&(h.messages=[{content:"Network Error",status:"error"}]):h={messages:[{content:"Network Error",status:"error"}]};const S=this.getAncestorAttributeValue("clearedDataOnSuccess");S&&S.split(" ").forEach(ei=>E.get(ei).set({}));const D=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",f=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";(Lo=(kt=this.api)==null?void 0:kt.lastResult)!=null&&Lo.ok&&y[D]&&y[f]&&this.saveCredentials(y[D],y[f]),this.submitResultKey&&(h=tt.traverse(h,this.submitResultKey.split("."),!0));const u=this.getAncestorAttributeValue("submitResultDataProvider");u&&E.get(u).set(h),this.disabled=!1,this.dispatchEvent(new CustomEvent("submit",{detail:h,bubbles:!0,composed:!0}))},v=a!=null&&a.needsCaptchaValidation.get()?a:t.needsCaptchaValidation.get()?t:null;if(v){v.captchaToken="request_token";const y=S=>{S!="request_token"?(g(),v.captchaToken.offAssign(y)):(ot.hide(),this.disabled=!1)};v.captchaToken.onAssign(y)}else g()}}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",this.submit),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",this.submit),super.connectedCallback(),this.api=new Ne(this.getApiConfiguration())}submitNativeForm(){const r=Xt.getClosestForm(this);if(!r)return;const t=this.getAncestorAttributeValue("formDataProvider"),s={...E.get(t).get()};delete s.needsCaptchaValidation;for(const e in s){if(e=="isFormValid")continue;let o=r.querySelector('input[name="'+e+'"], select[name="'+e+'"], textarea[name="'+e+'"]');o||(o=document.createElement("input"),o.type="hidden",o.name=e,r.appendChild(o));let n=s[e];Array.isArray(n)&&(n=n.join(",")),o.type==="checkbox"||o.type==="radio"?n&&(o.checked=!0):o.value=n}const i=document.createElement("input");i.name=this.name,i.style.display="none",i.value=this.value,i.type="submit",r.appendChild(i),i&&i.click()}async saveCredentials(r,t){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:r,password:t});await navigator.credentials.store(s)}}render(){return m`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};ee.styles=$`
|
|
1266
1266
|
[data-disabled] {
|
|
1267
1267
|
opacity: 0.3;
|
|
1268
1268
|
pointer-events: none;
|
|
@@ -1970,7 +1970,7 @@
|
|
|
1970
1970
|
@input=${this.handleChange}
|
|
1971
1971
|
@blur=${this.handleBlur}
|
|
1972
1972
|
type=${this.type}
|
|
1973
|
-
disabled=${
|
|
1973
|
+
?disabled=${this.disabled}
|
|
1974
1974
|
?readonly=${this.readonly}
|
|
1975
1975
|
?autofocus=${this.autofocus}
|
|
1976
1976
|
list=${P(this.list)}
|
|
@@ -2203,7 +2203,7 @@
|
|
|
2203
2203
|
@blur=${this.handleBlur}
|
|
2204
2204
|
?required=${this.required}
|
|
2205
2205
|
?data-indeterminate=${this.showAsIndeterminate}
|
|
2206
|
-
|
|
2206
|
+
?disabled=${this.disabled}
|
|
2207
2207
|
.checked=${P(this.checked)}
|
|
2208
2208
|
.name=${this.name}
|
|
2209
2209
|
.value=${this.value}
|
|
@@ -2485,14 +2485,14 @@
|
|
|
2485
2485
|
}
|
|
2486
2486
|
|
|
2487
2487
|
@supports selector(:has(*)) {
|
|
2488
|
-
:host([
|
|
2488
|
+
:host(:not([disabled]):not([align="center"]))
|
|
2489
2489
|
.form-element:not(:has(option:only-child)) {
|
|
2490
2490
|
padding-right: max(1.5em, calc(1.5 * var(--sc-input-px)));
|
|
2491
2491
|
}
|
|
2492
2492
|
}
|
|
2493
2493
|
/*Firefox etc.*/
|
|
2494
2494
|
@supports not selector(:has(*)) {
|
|
2495
|
-
:host([
|
|
2495
|
+
:host(:not([disabled]):not([align="center"])) .form-element {
|
|
2496
2496
|
padding-right: max(1.5em, calc(1.5 * var(--sc-input-px)));
|
|
2497
2497
|
}
|
|
2498
2498
|
}
|
|
@@ -2513,7 +2513,7 @@
|
|
|
2513
2513
|
}
|
|
2514
2514
|
|
|
2515
2515
|
option {
|
|
2516
|
-
padding: 0.1rem var(--sc-input-px);
|
|
2516
|
+
padding: 0.1rem var(--sc-input-px, 0);
|
|
2517
2517
|
color: var(--sc-base-content, #000);
|
|
2518
2518
|
background: var(--sc-base, #fff);
|
|
2519
2519
|
}
|
|
@@ -2541,7 +2541,7 @@
|
|
|
2541
2541
|
id="${this.id||"form-element"}"
|
|
2542
2542
|
@input=${this.handleChange}
|
|
2543
2543
|
@blur=${this.handleBlur}
|
|
2544
|
-
disabled=${
|
|
2544
|
+
?disabled=${this.disabled}
|
|
2545
2545
|
?required=${this.required}
|
|
2546
2546
|
?autofocus=${this.autofocus}
|
|
2547
2547
|
rows=${P(this.rows)}
|
|
@@ -3066,7 +3066,13 @@ ${this.value}</textarea
|
|
|
3066
3066
|
font-weight: var(--sc-headings-font-weight, 700);
|
|
3067
3067
|
font-style: var(--sc-headings-font-style, normal);
|
|
3068
3068
|
}
|
|
3069
|
-
`],Wi=mh([x(gh)],Wi);var bh=Object.defineProperty,vh=Object.getOwnPropertyDescriptor,st=(r,t,s,i)=>{for(var e=i>1?void 0:i?vh(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&bh(t,s,e),e};const Po="sonic-modal";let F=class extends X(w){constructor(){super(...arguments),this.forceAction=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.zIndex="var(--sc-modal-z-index)",this.fullScreen=!1,this.visible=!1}static create(r){const t=document.createElement(Po);return t.options=r,r.removeHashOnHide===!0&&t.setAttribute("removeHashOnHide","true"),r.removeOnHide===!0&&t.setAttribute("removeOnHide","true"),r.maxWidth&&(t.maxWidth=r==null?void 0:r.maxWidth),r.width&&(t.width=r==null?void 0:r.width),r.maxHeight&&(t.maxHeight=r==null?void 0:r.maxHeight),r.height&&(t.height=r==null?void 0:r.height),r.forceAction&&(t.forceAction=!0),r.fullScreen&&(t.fullScreen=r==null?void 0:r.fullScreen),r.effect&&(t.effect=r==null?void 0:r.effect),r.paddingX&&t.style.setProperty("--sc-modal-px",r==null?void 0:r.paddingX),r.paddingY&&t.style.setProperty("--sc-modal-py",r==null?void 0:r.paddingY),r.zIndex&&t.style.setProperty("--sc-modal-z-index",r==null?void 0:r.zIndex),_t.getPopContainer().appendChild(t),t.show(),t}connectedCallback(){F.modals.push(this),super.connectedCallback(),this.handleFullsceen()}disconnectedCallback(){F.modals.splice(F.modals.indexOf(this),1),super.disconnectedCallback()}updated(){const r=this;document.addEventListener("keydown",this.handleEscape),r.closeBtn.forEach(t=>{t.addEventListener("click",function(){r.hide()},{once:!0})})}willUpdate(r){r.has("fullScreen")&&this.handleFullsceen(),r.has("effect")&&(this.effect=="fade"?this.animation={keyframeOptions:{duration:400},in:Qr,out:Xr}:this.effect=="none"?this.animation=void 0:this.animation={keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]}),super.willUpdate(r)}render(){if(this.visible==!1)return A;const r={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,zIndex:this.zIndex,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return m
|
|
3069
|
+
`],Wi=mh([x(gh)],Wi);var bh=Object.defineProperty,vh=Object.getOwnPropertyDescriptor,st=(r,t,s,i)=>{for(var e=i>1?void 0:i?vh(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&bh(t,s,e),e};const Po="sonic-modal";let F=class extends X(w){constructor(){super(...arguments),this.forceAction=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.zIndex="var(--sc-modal-z-index)",this.fullScreen=!1,this.visible=!1}static create(r){const t=document.createElement(Po);return t.options=r,r.removeHashOnHide===!0&&t.setAttribute("removeHashOnHide","true"),r.removeOnHide===!0&&t.setAttribute("removeOnHide","true"),r.maxWidth&&(t.maxWidth=r==null?void 0:r.maxWidth),r.width&&(t.width=r==null?void 0:r.width),r.maxHeight&&(t.maxHeight=r==null?void 0:r.maxHeight),r.height&&(t.height=r==null?void 0:r.height),r.forceAction&&(t.forceAction=!0),r.fullScreen&&(t.fullScreen=r==null?void 0:r.fullScreen),r.effect&&(t.effect=r==null?void 0:r.effect),r.paddingX&&t.style.setProperty("--sc-modal-px",r==null?void 0:r.paddingX),r.paddingY&&t.style.setProperty("--sc-modal-py",r==null?void 0:r.paddingY),r.zIndex&&t.style.setProperty("--sc-modal-z-index",r==null?void 0:r.zIndex),_t.getPopContainer().appendChild(t),t.show(),t}connectedCallback(){F.modals.push(this),super.connectedCallback(),this.handleFullsceen()}disconnectedCallback(){F.modals.splice(F.modals.indexOf(this),1),super.disconnectedCallback()}updated(){const r=this;document.addEventListener("keydown",this.handleEscape),r.closeBtn.forEach(t=>{t.addEventListener("click",function(){r.hide()},{once:!0})})}willUpdate(r){r.has("fullScreen")&&this.handleFullsceen(),r.has("effect")&&(this.effect=="fade"?this.animation={keyframeOptions:{duration:400},in:Qr,out:Xr}:this.effect=="none"?this.animation=void 0:this.animation={keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]}),super.willUpdate(r)}render(){if(this.visible==!1)return A;const r={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,zIndex:this.zIndex,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return m`
|
|
3070
|
+
<div
|
|
3071
|
+
class="overlay"
|
|
3072
|
+
@click="${this.forceAction?null:this.hide}"
|
|
3073
|
+
${zs({keyframeOptions:{duration:500},in:Qr,out:[{opacity:0,pointerEvents:"none"}]})}
|
|
3074
|
+
></div>
|
|
3075
|
+
<div
|
|
3070
3076
|
class="modal-wrapper"
|
|
3071
3077
|
style=${gt(t)}
|
|
3072
3078
|
${zs({out:Xr})}
|
|
@@ -3087,11 +3093,7 @@ ${this.value}</textarea
|
|
|
3087
3093
|
</div>
|
|
3088
3094
|
</div>
|
|
3089
3095
|
</div>
|
|
3090
|
-
|
|
3091
|
-
class="overlay"
|
|
3092
|
-
@click="${this.forceAction?null:this.hide}"
|
|
3093
|
-
${zs({keyframeOptions:{duration:500},in:Qr,out:[{opacity:0,pointerEvents:"none"}]})}
|
|
3094
|
-
></div>`}modalFragment(r){var i;const t=(i=this.options)==null?void 0:i[r];if(!t)return A;let s;switch(t instanceof Object?s=t:s=z(t),r){case"title":return m`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return m`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return m`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return m`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return A}}show(){var r,t;this.visible=!0,(r=this.modalElement)==null||r.setAttribute("tabindex","0"),(t=this.modalElement)==null||t.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var r;this.visible=!1,(r=this.modalElement)==null||r.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&it.get(this.getAttribute("resetDataProviderOnHide")).set({}),setTimeout(()=>{this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname),this.removeOnHide&&this.remove(),this.dispatchEvent(new CustomEvent("hidden"))},480)}dispose(){this.hide(),this.remove()}static disposeAll(){F.modals.forEach(r=>{r.dispose()})}handleEscape(r){r.key==="Escape"&&F.modals.forEach(t=>{t.forceAction||t.hide()})}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};F.styles=[cs,$`
|
|
3096
|
+
`}modalFragment(r){var i;const t=(i=this.options)==null?void 0:i[r];if(!t)return A;let s;switch(t instanceof Object?s=t:s=z(t),r){case"title":return m`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return m`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return m`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return m`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return A}}show(){var r,t;this.visible=!0,(r=this.modalElement)==null||r.setAttribute("tabindex","0"),(t=this.modalElement)==null||t.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var r;this.visible=!1,(r=this.modalElement)==null||r.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&it.get(this.getAttribute("resetDataProviderOnHide")).set({}),setTimeout(()=>{this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname),this.removeOnHide&&this.remove(),this.dispatchEvent(new CustomEvent("hidden"))},480)}dispose(){this.hide(),this.remove()}static disposeAll(){F.modals.forEach(r=>{r.dispose()})}handleEscape(r){r.key==="Escape"&&F.modals.forEach(t=>{t.forceAction||t.hide()})}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};F.styles=[cs,$`
|
|
3095
3097
|
:host {
|
|
3096
3098
|
--sc-modal-py: 2.5rem;
|
|
3097
3099
|
--sc-modal-px: 1.5rem;
|
|
@@ -3110,7 +3112,7 @@ ${this.value}</textarea
|
|
|
3110
3112
|
bottom: 0;
|
|
3111
3113
|
left: 0;
|
|
3112
3114
|
width: 100%;
|
|
3113
|
-
z-index:
|
|
3115
|
+
z-index: var(--sc-modal-z-index);
|
|
3114
3116
|
align-items: center;
|
|
3115
3117
|
justify-content: center;
|
|
3116
3118
|
flex-direction: column;
|