@supersoniks/concorde 1.1.28 → 1.1.31
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/concorde-core.bundle.js +23 -23
- package/concorde-core.es.js +23 -23
- package/core/components/functional/date/date.js +8 -2
- package/core/components/functional/list/list.js +17 -11
- package/core/components/functional/submit/submit.js +46 -30
- package/core/components/functional/subscriber/subscriber.d.ts +2 -1
- package/core/components/functional/subscriber/subscriber.js +8 -0
- package/core/components/ui/_css/size.d.ts +1 -0
- package/core/components/ui/_css/size.js +26 -0
- package/core/components/ui/_css/type.d.ts +2 -0
- package/core/components/ui/_css/{types.js → type.js} +1 -1
- package/core/components/ui/alert/alert.d.ts +1 -1
- package/core/components/ui/alert/alert.js +7 -16
- package/core/components/ui/badge/badge.d.ts +1 -1
- package/core/components/ui/badge/badge.js +7 -6
- package/core/components/ui/button/button.d.ts +11 -6
- package/core/components/ui/button/button.js +32 -35
- package/core/components/ui/captcha/captcha.d.ts +16 -0
- package/core/components/ui/captcha/captcha.js +54 -0
- package/core/components/ui/card/card-header.js +1 -1
- package/core/components/ui/divider/divider.d.ts +1 -1
- package/core/components/ui/divider/divider.js +7 -3
- package/core/components/ui/form/checkbox/checkbox.d.ts +51 -11
- package/core/components/ui/form/checkbox/checkbox.js +10 -6
- package/core/components/ui/form/css/form-control.js +56 -31
- package/core/components/ui/form/input/input.d.ts +23 -19
- package/core/components/ui/form/input/input.js +35 -33
- package/core/components/ui/form/radio/radio.js +1 -2
- package/core/components/ui/form/select/select.d.ts +9 -9
- package/core/components/ui/form/select/select.js +8 -14
- package/core/components/ui/form/textarea/textarea.d.ts +18 -17
- package/core/components/ui/form/textarea/textarea.js +12 -23
- package/core/components/ui/icon/icon.js +4 -0
- package/core/components/ui/image/image.d.ts +0 -1
- package/core/components/ui/image/image.js +0 -23
- package/core/components/ui/pop/pop.d.ts +1 -0
- package/core/components/ui/pop/pop.js +8 -0
- package/core/components/ui/progress/progress.d.ts +1 -0
- package/core/components/ui/progress/progress.js +13 -20
- package/core/components/ui/table/table-td.d.ts +1 -0
- package/core/components/ui/table/table-td.js +6 -2
- package/core/components/ui/table/table-th.js +2 -2
- package/core/components/ui/table/table-tr.js +3 -2
- package/core/components/ui/table/table.d.ts +1 -1
- package/core/components/ui/table/table.js +3 -20
- package/core/components/ui/taxonomy/taxonomy.js +2 -1
- package/core/components/ui/theme/theme-collection/core-variables.js +19 -8
- package/core/components/ui/theme/theme.d.ts +9 -1
- package/core/components/ui/theme/theme.js +47 -2
- package/core/components/ui/toast/toast-item.js +25 -7
- package/core/components/ui/toast/toast.js +6 -2
- package/core/components/ui/ui.d.ts +1 -0
- package/core/components/ui/ui.js +1 -0
- package/core/mixins/Fetcher.js +4 -0
- package/core/mixins/FormCheckable.d.ts +3 -5
- package/core/mixins/FormCheckable.js +5 -2
- package/core/mixins/FormElement.d.ts +3 -2
- package/core/mixins/FormElement.js +8 -4
- package/core/mixins/FormInput.d.ts +6 -9
- package/core/mixins/FormInput.js +1 -3
- package/core/utils/PublisherProxy.d.mts +1 -1
- package/core/utils/PublisherProxy.mjs +3 -3
- package/core/utils/api.js +4 -2
- package/mixins.d.ts +8 -6
- package/package.json +7 -3
- package/core/components/ui/_css/types.d.ts +0 -2
package/concorde-core.bundle.js
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Xl=Object.defineProperty,tc=Object.defineProperties;var ec=Object.getOwnPropertyDescriptors;var Wo=Object.getOwnPropertySymbols;var rc=Object.prototype.hasOwnProperty,sc=Object.prototype.propertyIsEnumerable;var Xr=(W,R,tt)=>R in W?Xl(W,R,{enumerable:!0,configurable:!0,writable:!0,value:tt}):W[R]=tt,X=(W,R)=>{for(var tt in R||(R={}))rc.call(R,tt)&&Xr(W,tt,R[tt]);if(Wo)for(var tt of Wo(R))sc.call(R,tt)&&Xr(W,tt,R[tt]);return W},Ie=(W,R)=>tc(W,ec(R));var Zo=(W,R,tt)=>(Xr(W,typeof R!="symbol"?R+"":R,tt),tt);(function(W){typeof define=="function"&&define.amd?define(W):W()})(function(){var Ho;"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const W=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,
|
|
5
|
+
*/const W=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,R=Symbol(),tt=new Map;class ts{constructor(t,s){if(this._$cssResult$=!0,s!==R)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=tt.get(this.cssText);return W&&t===void 0&&(tt.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const es=o=>new ts(typeof o=="string"?o:o+"",R),w=(o,...t)=>{const s=o.length===1?o[0]:t.reduce((e,r,i)=>e+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+o[i+1],o[0]);return new ts(s,R)},Ko=(o,t)=>{W?o.adoptedStyleSheets=t.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet):t.forEach(s=>{const e=document.createElement("style"),r=window.litNonce;r!==void 0&&e.setAttribute("nonce",r),e.textContent=s.cssText,o.appendChild(e)})},rs=W?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let s="";for(const e of t.cssRules)s+=e.cssText;return es(s)})(o):o;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var fr;const ss=window.trustedTypes,Yo=ss?ss.emptyScript:"",os=window.reactiveElementPolyfillSupport,vr={toAttribute(o,t){switch(t){case Boolean:o=o?Yo:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let s=o;switch(t){case Boolean:s=o!==null;break;case Number:s=o===null?null:Number(o);break;case Object:case Array:try{s=JSON.parse(o)}catch{s=null}}return s}},is=(o,t)=>t!==o&&(t==t||o==o),yr={attribute:!0,type:String,converter:vr,reflect:!1,hasChanged:is};class Qt extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var s;(s=this.l)!==null&&s!==void 0||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((s,e)=>{const r=this._$Eh(e,s);r!==void 0&&(this._$Eu.set(r,e),t.push(r))}),t}static createProperty(t,s=yr){if(s.state&&(s.attribute=!1),this.finalize(),this.elementProperties.set(t,s),!s.noAccessor&&!this.prototype.hasOwnProperty(t)){const e=typeof t=="symbol"?Symbol():"__"+t,r=this.getPropertyDescriptor(t,e,s);r!==void 0&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,s,e){return{get(){return this[s]},set(r){const i=this[t];this[s]=r,this.requestUpdate(t,i,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||yr}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const s=this.properties,e=[...Object.getOwnPropertyNames(s),...Object.getOwnPropertySymbols(s)];for(const r of e)this.createProperty(r,s[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const s=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const r of e)s.unshift(rs(r))}else t!==void 0&&s.push(rs(t));return s}static _$Eh(t,s){const e=s.attribute;return e===!1?void 0:typeof e=="string"?e:typeof t=="string"?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise(s=>this.enableUpdating=s),this._$AL=new Map,this._$Em(),this.requestUpdate(),(t=this.constructor.l)===null||t===void 0||t.forEach(s=>s(this))}addController(t){var s,e;((s=this._$Eg)!==null&&s!==void 0?s:this._$Eg=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)===null||e===void 0||e.call(t))}removeController(t){var s;(s=this._$Eg)===null||s===void 0||s.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach((t,s)=>{this.hasOwnProperty(s)&&(this._$Et.set(s,this[s]),delete this[s])})}createRenderRoot(){var t;const s=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Ko(s,this.constructor.elementStyles),s}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$Eg)===null||t===void 0||t.forEach(s=>{var e;return(e=s.hostConnected)===null||e===void 0?void 0:e.call(s)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$Eg)===null||t===void 0||t.forEach(s=>{var e;return(e=s.hostDisconnected)===null||e===void 0?void 0:e.call(s)})}attributeChangedCallback(t,s,e){this._$AK(t,e)}_$ES(t,s,e=yr){var r,i;const n=this.constructor._$Eh(t,e);if(n!==void 0&&e.reflect===!0){const l=((i=(r=e.converter)===null||r===void 0?void 0:r.toAttribute)!==null&&i!==void 0?i:vr.toAttribute)(s,e.type);this._$Ei=t,l==null?this.removeAttribute(n):this.setAttribute(n,l),this._$Ei=null}}_$AK(t,s){var e,r,i;const n=this.constructor,l=n._$Eu.get(t);if(l!==void 0&&this._$Ei!==l){const c=n.getPropertyOptions(l),h=c.converter,y=(i=(r=(e=h)===null||e===void 0?void 0:e.fromAttribute)!==null&&r!==void 0?r:typeof h=="function"?h:null)!==null&&i!==void 0?i:vr.fromAttribute;this._$Ei=l,this[l]=y(s,c.type),this._$Ei=null}}requestUpdate(t,s,e){let r=!0;t!==void 0&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||is)(this[t],s)?(this._$AL.has(t)||this._$AL.set(t,s),e.reflect===!0&&this._$Ei!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,e))):r=!1),!this.isUpdatePending&&r&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(s){Promise.reject(s)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach((r,i)=>this[i]=r),this._$Et=void 0);let s=!1;const e=this._$AL;try{s=this.shouldUpdate(e),s?(this.willUpdate(e),(t=this._$Eg)===null||t===void 0||t.forEach(r=>{var i;return(i=r.hostUpdate)===null||i===void 0?void 0:i.call(r)}),this.update(e)):this._$EU()}catch(r){throw s=!1,this._$EU(),r}s&&this._$AE(e)}willUpdate(t){}_$AE(t){var s;(s=this._$Eg)===null||s===void 0||s.forEach(e=>{var r;return(r=e.hostUpdated)===null||r===void 0?void 0:r.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((s,e)=>this._$ES(e,this[e],s)),this._$EC=void 0),this._$EU()}updated(t){}firstUpdated(t){}}Qt.finalized=!0,Qt.elementProperties=new Map,Qt.elementStyles=[],Qt.shadowRootOptions={mode:"open"},os==null||os({ReactiveElement:Qt}),((fr=globalThis.reactiveElementVersions)!==null&&fr!==void 0?fr:globalThis.reactiveElementVersions=[]).push("1.3.2");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
13
|
+
*/var wr;const Jt=globalThis.trustedTypes,ns=Jt?Jt.createPolicy("lit-html",{createHTML:o=>o}):void 0,ft=`lit$${(Math.random()+"").slice(9)}$`,xr="?"+ft,Go=`<${xr}>`,Xt=document,xe=(o="")=>Xt.createComment(o),$e=o=>o===null||typeof o!="object"&&typeof o!="function",as=Array.isArray,ls=o=>{var t;return as(o)||typeof((t=o)===null||t===void 0?void 0:t[Symbol.iterator])=="function"},ke=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,cs=/-->/g,hs=/>/g,Mt=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,ds=/'/g,ps=/"/g,us=/^(?:script|style|textarea|title)$/i,Qo=o=>(t,...s)=>({_$litType$:o,strings:t,values:s}),u=Qo(1),ht=Symbol.for("lit-noChange"),S=Symbol.for("lit-nothing"),ms=new WeakMap,Jo=(o,t,s)=>{var e,r;const i=(e=s==null?void 0:s.renderBefore)!==null&&e!==void 0?e:t;let n=i._$litPart$;if(n===void 0){const l=(r=s==null?void 0:s.renderBefore)!==null&&r!==void 0?r:null;i._$litPart$=n=new ee(t.insertBefore(xe(),l),l,void 0,s!=null?s:{})}return n._$AI(o),n},te=Xt.createTreeWalker(Xt,129,null,!1),gs=(o,t)=>{const s=o.length-1,e=[];let r,i=t===2?"<svg>":"",n=ke;for(let c=0;c<s;c++){const h=o[c];let y,g,m=-1,x=0;for(;x<h.length&&(n.lastIndex=x,g=n.exec(h),g!==null);)x=n.lastIndex,n===ke?g[1]==="!--"?n=cs:g[1]!==void 0?n=hs:g[2]!==void 0?(us.test(g[2])&&(r=RegExp("</"+g[2],"g")),n=Mt):g[3]!==void 0&&(n=Mt):n===Mt?g[0]===">"?(n=r!=null?r:ke,m=-1):g[1]===void 0?m=-2:(m=n.lastIndex-g[2].length,y=g[1],n=g[3]===void 0?Mt:g[3]==='"'?ps:ds):n===ps||n===ds?n=Mt:n===cs||n===hs?n=ke:(n=Mt,r=void 0);const _=n===Mt&&o[c+1].startsWith("/>")?" ":"";i+=n===ke?h+Go:m>=0?(e.push(y),h.slice(0,m)+"$lit$"+h.slice(m)+ft+_):h+ft+(m===-2?(e.push(void 0),c):_)}const l=i+(o[s]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return[ns!==void 0?ns.createHTML(l):l,e]};class _e{constructor({strings:t,_$litType$:s},e){let r;this.parts=[];let i=0,n=0;const l=t.length-1,c=this.parts,[h,y]=gs(t,s);if(this.el=_e.createElement(h,e),te.currentNode=this.el.content,s===2){const g=this.el.content,m=g.firstChild;m.remove(),g.append(...m.childNodes)}for(;(r=te.nextNode())!==null&&c.length<l;){if(r.nodeType===1){if(r.hasAttributes()){const g=[];for(const m of r.getAttributeNames())if(m.endsWith("$lit$")||m.startsWith(ft)){const x=y[n++];if(g.push(m),x!==void 0){const _=r.getAttribute(x.toLowerCase()+"$lit$").split(ft),A=/([.?@])?(.*)/.exec(x);c.push({type:1,index:i,name:A[2],strings:_,ctor:A[1]==="."?fs:A[1]==="?"?vs:A[1]==="@"?ys:Ae})}else c.push({type:6,index:i})}for(const m of g)r.removeAttribute(m)}if(us.test(r.tagName)){const g=r.textContent.split(ft),m=g.length-1;if(m>0){r.textContent=Jt?Jt.emptyScript:"";for(let x=0;x<m;x++)r.append(g[x],xe()),te.nextNode(),c.push({type:2,index:++i});r.append(g[m],xe())}}}else if(r.nodeType===8)if(r.data===xr)c.push({type:2,index:i});else{let g=-1;for(;(g=r.data.indexOf(ft,g+1))!==-1;)c.push({type:7,index:i}),g+=ft.length-1}i++}}static createElement(t,s){const e=Xt.createElement("template");return e.innerHTML=t,e}}function Tt(o,t,s=o,e){var r,i,n,l;if(t===ht)return t;let c=e!==void 0?(r=s._$Cl)===null||r===void 0?void 0:r[e]:s._$Cu;const h=$e(t)?void 0:t._$litDirective$;return(c==null?void 0:c.constructor)!==h&&((i=c==null?void 0:c._$AO)===null||i===void 0||i.call(c,!1),h===void 0?c=void 0:(c=new h(o),c._$AT(o,s,e)),e!==void 0?((n=(l=s)._$Cl)!==null&&n!==void 0?n:l._$Cl=[])[e]=c:s._$Cu=c),c!==void 0&&(t=Tt(o,c._$AS(o,t.values),c,e)),t}class bs{constructor(t,s){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var s;const{el:{content:e},parts:r}=this._$AD,i=((s=t==null?void 0:t.creationScope)!==null&&s!==void 0?s:Xt).importNode(e,!0);te.currentNode=i;let n=te.nextNode(),l=0,c=0,h=r[0];for(;h!==void 0;){if(l===h.index){let y;h.type===2?y=new ee(n,n.nextSibling,this,t):h.type===1?y=new h.ctor(n,h.name,h.strings,this,t):h.type===6&&(y=new ws(n,this,t)),this.v.push(y),h=r[++c]}l!==(h==null?void 0:h.index)&&(n=te.nextNode(),l++)}return i}m(t){let s=0;for(const e of this.v)e!==void 0&&(e.strings!==void 0?(e._$AI(t,e,s),s+=e.strings.length-2):e._$AI(t[s])),s++}}class ee{constructor(t,s,e,r){var i;this.type=2,this._$AH=S,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=e,this.options=r,this._$Cg=(i=r==null?void 0:r.isConnected)===null||i===void 0||i}get _$AU(){var t,s;return(s=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&s!==void 0?s:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&t.nodeType===11&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=Tt(this,t,s),$e(t)?t===S||t==null||t===""?(this._$AH!==S&&this._$AR(),this._$AH=S):t!==this._$AH&&t!==ht&&this.$(t):t._$litType$!==void 0?this.T(t):t.nodeType!==void 0?this.k(t):ls(t)?this.S(t):this.$(t)}M(t,s=this._$AB){return this._$AA.parentNode.insertBefore(t,s)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==S&&$e(this._$AH)?this._$AA.nextSibling.data=t:this.k(Xt.createTextNode(t)),this._$AH=t}T(t){var s;const{values:e,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=_e.createElement(r.h,this.options)),r);if(((s=this._$AH)===null||s===void 0?void 0:s._$AD)===i)this._$AH.m(e);else{const n=new bs(i,this),l=n.p(this.options);n.m(e),this.k(l),this._$AH=n}}_$AC(t){let s=ms.get(t.strings);return s===void 0&&ms.set(t.strings,s=new _e(t)),s}S(t){as(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let e,r=0;for(const i of t)r===s.length?s.push(e=new ee(this.M(xe()),this.M(xe()),this,this.options)):e=s[r],e._$AI(i),r++;r<s.length&&(this._$AR(e&&e._$AB.nextSibling,r),s.length=r)}_$AR(t=this._$AA.nextSibling,s){var e;for((e=this._$AP)===null||e===void 0||e.call(this,!1,!0,s);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var s;this._$AM===void 0&&(this._$Cg=t,(s=this._$AP)===null||s===void 0||s.call(this,t))}}class Ae{constructor(t,s,e,r,i){this.type=1,this._$AH=S,this._$AN=void 0,this.element=t,this.name=s,this._$AM=r,this.options=i,e.length>2||e[0]!==""||e[1]!==""?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=S}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,s=this,e,r){const i=this.strings;let n=!1;if(i===void 0)t=Tt(this,t,s,0),n=!$e(t)||t!==this._$AH&&t!==ht,n&&(this._$AH=t);else{const l=t;let c,h;for(t=i[0],c=0;c<i.length-1;c++)h=Tt(this,l[e+c],s,c),h===ht&&(h=this._$AH[c]),n||(n=!$e(h)||h!==this._$AH[c]),h===S?t=S:t!==S&&(t+=(h!=null?h:"")+i[c+1]),this._$AH[c]=h}n&&!r&&this.C(t)}C(t){t===S?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}}class fs extends Ae{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===S?void 0:t}}const Xo=Jt?Jt.emptyScript:"";class vs extends Ae{constructor(){super(...arguments),this.type=4}C(t){t&&t!==S?this.element.setAttribute(this.name,Xo):this.element.removeAttribute(this.name)}}class ys extends Ae{constructor(t,s,e,r,i){super(t,s,e,r,i),this.type=5}_$AI(t,s=this){var e;if((t=(e=Tt(this,t,s,0))!==null&&e!==void 0?e:S)===ht)return;const r=this._$AH,i=t===S&&r!==S||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==S&&(r===S||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var s,e;typeof this._$AH=="function"?this._$AH.call((e=(s=this.options)===null||s===void 0?void 0:s.host)!==null&&e!==void 0?e:this.element,t):this._$AH.handleEvent(t)}}class ws{constructor(t,s,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){Tt(this,t)}}const ti={L:"$lit$",P:ft,V:xr,I:1,N:gs,R:bs,j:ls,D:Tt,H:ee,F:Ae,O:vs,W:ys,B:fs,Z:ws},xs=window.litHtmlPolyfillSupport;xs==null||xs(_e,ee),((wr=globalThis.litHtmlVersions)!==null&&wr!==void 0?wr:globalThis.litHtmlVersions=[]).push("2.2.3");/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/var
|
|
17
|
+
*/var $r,kr;class f extends Qt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,s;const e=super.createRenderRoot();return(t=(s=this.renderOptions).renderBefore)!==null&&t!==void 0||(s.renderBefore=e.firstChild),e}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=Jo(s,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Dt)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Dt)===null||t===void 0||t.setConnected(!1)}render(){return ht}}f.finalized=!0,f._$litElement$=!0,($r=globalThis.litElementHydrateSupport)===null||$r===void 0||$r.call(globalThis,{LitElement:f});const $s=globalThis.litElementPolyfillSupport;$s==null||$s({LitElement:f}),((kr=globalThis.litElementVersions)!==null&&kr!==void 0?kr:globalThis.litElementVersions=[]).push("3.2.0");/**
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright 2017 Google LLC
|
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/const
|
|
21
|
+
*/const v=o=>t=>typeof t=="function"?((s,e)=>(window.customElements.define(s,e),e))(o,t):((s,e)=>{const{kind:r,elements:i}=e;return{kind:r,elements:i,finisher(n){window.customElements.define(s,n)}}})(o,t);/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/const
|
|
25
|
+
*/const ei=(o,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?Ie(X({},t),{finisher(s){s.createProperty(t.key,o)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(s){s.createProperty(t.key,o)}};function a(o){return(t,s)=>s!==void 0?((e,r,i)=>{r.constructor.createProperty(i,e)})(o,t,s):ei(o,t)}/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2017 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
*/function
|
|
29
|
+
*/function Y(o){return a(Ie(X({},o),{state:!0}))}/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
32
32
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
33
|
-
*/const
|
|
33
|
+
*/const _r=({finisher:o,descriptor:t})=>(s,e)=>{var r;if(e===void 0){const i=(r=s.originalKey)!==null&&r!==void 0?r:s.key,n=t!=null?{kind:"method",placement:"prototype",key:i,descriptor:t(s.key)}:Ie(X({},s),{key:i});return o!=null&&(n.finisher=function(l){o(l,i)}),n}{const i=s.constructor;t!==void 0&&Object.defineProperty(s,e,t(e)),o==null||o(i,e)}};/**
|
|
34
34
|
* @license
|
|
35
35
|
* Copyright 2017 Google LLC
|
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
-
*/function
|
|
37
|
+
*/function re(o,t){return _r({descriptor:s=>{const e={get(){var r,i;return(i=(r=this.renderRoot)===null||r===void 0?void 0:r.querySelector(o))!==null&&i!==void 0?i:null},enumerable:!0,configurable:!0};if(t){const r=typeof s=="symbol"?Symbol():"__"+s;e.get=function(){var i,n;return this[r]===void 0&&(this[r]=(n=(i=this.renderRoot)===null||i===void 0?void 0:i.querySelector(o))!==null&&n!==void 0?n:null),this[r]}}return e}})}/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2021 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
-
*/var
|
|
41
|
+
*/var Ar;const ri=((Ar=window.HTMLSlotElement)===null||Ar===void 0?void 0:Ar.prototype.assignedElements)!=null?(o,t)=>o.assignedElements(t):(o,t)=>o.assignedNodes(t).filter(s=>s.nodeType===Node.ELEMENT_NODE);function Nt(o){const{slot:t,selector:s}=o!=null?o:{};return _r({descriptor:e=>({get(){var r;const i="slot"+(t?`[name=${t}]`:":not([name])"),n=(r=this.renderRoot)===null||r===void 0?void 0:r.querySelector(i),l=n!=null?ri(n,o):[];return s?l.filter(c=>c.matches(s)):l},enumerable:!0,configurable:!0})})}/**
|
|
42
42
|
* @license
|
|
43
43
|
* Copyright 2017 Google LLC
|
|
44
44
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
|
-
*/function rt(i,t,r){let e,s=i;return typeof i=="object"?(s=i.slot,e=i):e={flatten:t},r?Tt({slot:s,flatten:t,selector:r}):xs({descriptor:o=>({get(){var n,l;const c="slot"+(s?`[name=${s}]`:":not([name])"),h=(n=this.renderRoot)===null||n===void 0?void 0:n.querySelector(c);return(l=h==null?void 0:h.assignedNodes(e))!==null&&l!==void 0?l:[]},enumerable:!0,configurable:!0})})}function Re(i){return typeof i=="object"&&i!=null}class Ji{constructor(t,r=null){for(this._proxies_=new Map,this._value_=t,this._invalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this.parent=r,this.root=this;this.root.parent;)this.root=this.root.parent}delete(){for(let t of this._proxies_.values())t.delete();this._invalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear()}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){this._mutationListeners_.forEach(r=>r()),!t&&this.parent&&this.parent._publishInternalMutation_()}_publishAssignement_(t=!1){this._assignListeners_.forEach(r=>r(this.get())),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,r){this._fillListeners_.forEach(e=>{e[t]!==r&&(e[t]=r)}),this._publishTemplateFilling_(t,r)}_publishTemplateFilling_(t,r){this._templateFillListeners_.forEach(e=>{let s=Object.getOwnPropertyDescriptor(e,t);s&&!s.set||(e.propertyMap&&e.propertyMap[t]&&(t=e.propertyMap[t]),typeof e[t]!="undefined"&&e[t]!==r&&(e[t]=r))})}onAssign(t){typeof t=="function"&&(this._assignListeners_.add(t),t(this.get()))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){this._invalidateListeners_.delete(t)}invalidate(t){this._publishInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){this._mutationListeners_.delete(t)}startTemplateFilling(t){this._templateFillListeners_.add(t);for(var r in this._value_){const e=this._value_[r];t.propertyMap&&t.propertyMap[r]&&(r=t.propertyMap[r]),typeof t[r]!="undefined"&&t[r]!==e&&(t[r]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(var r in this._value_){const e=this._value_[r];t[r]!==e&&(t[r]=e)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,r=!1){if(this._value_===t||this._value_.hasOwnProperty("__value")&&t.hasOwnProperty("__value")&&this._value_.__value===t.__value)return!0;if(this._value_=t,this._value_.hasOwnProperty("__value"))return this._publishAssignement_(r),!0;if(Array.from(this._proxies_.keys()).forEach(s=>{!this._value_[s]&&this._proxies_.has(s)&&!this._proxies_.get(s).hasListener()&&this._proxies_.delete(s)}),Re(this._value_))for(let s in this._value_){let o=t[s],l=Re(o)?o:{__value:o};if(!this._proxies_.has(s)){let c=new Mt({},this);this._proxies_.set(s,c,!0),c._proxies_.set("_parent_",this)}this._proxies_.get(s).set(l,!0),this._publishDynamicFilling_(s,o)}return this._publishAssignement_(),!0}get(){if(this._value_.hasOwnProperty("__value")){let t=this._value_.__value;return t!=null?t:null}return this._value_}}const _t=class{constructor(){if(_t.instance!=null)throw"Singleton / use getInstance";_t.instance=this,this.publishers=new Map}static getInstance(){return _t.instance==null?new _t:_t.instance}static get(t){return _t.getInstance().get(t)}static delete(t){return _t.getInstance().delete(t)}get(t){return this.publishers.has(t)||this.publishers.set(t,new Mt({})),this.publishers.get(t)}set(t,r){this.publishers.set(t,r)}delete(t){if(!this.publishers.has(t))return!1;this.publishers.get(t),this.publishers.delete(t)}};let K=_t;Ui(K,"instance",null);class Mt extends Ji{constructor(t,r=null){super(t,r);let e=this,s=new Proxy(this,{get:function(o,n){if(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_lockInternalMutationPublishing_"].includes(n))return e[n];if(!e._proxies_.has(n)){let l=e._value_[n],c=new Mt(Re(l)?l:{__value:l},e);c._proxies_.set("_parent_",s),e._proxies_.set(n,c)}return e._proxies_.get(n)},set:function(o,n,l){if(n=="_value_")return o._value_=l,o._value_;if(!e._proxies_.has(n)){let h=new Mt({},e);h._proxies_.set("_parent_",s),e._proxies_.set(n,h)}return e._value_[n]!==l&&(e._value_[n]=l,e._publishDynamicFilling_(n,l),e._proxies_.get(n).set(Re(l)?l:{__value:l})),e._proxies_.get(n)},deleteProperty:function(o,n){return e._publishDynamicFilling_(n,null),e._proxies_.delete(n),delete e._value_[n]},enumerate:function(o,n){return e._value_.keys()},has:function(o,n){return n in e._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,l){return l&&"value"in l&&(e._value_[n]=l.value),e._value_},getOwnPropertyDescriptor:function(o,n){return e._value_[n],{enumerable:!0,configurable:!0}},ownKeys:function(o){return e._value_.__value?Object.keys(this._value_.__value):Object.keys(e._value_)}});return s}}typeof module!="undefined"&&(module.exports={Publisher:Mt,PublisherManager:K});class ee{static getLanguage(){return document.getElementsByTagName("html")[0].getAttribute("lang")}static getCookies(){return document.cookie.split(";").reduce((t,r)=>{const e=r.indexOf("=");return t[r.substring(0,e).trim()]=r.substring(e+1),t},{})}static getAncestorAttributeValue(t,r){for(;!(t.hasAttribute&&t.hasAttribute(r))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.hasAttribute?t.getAttribute(r):null}}const kt=class{constructor(i){this.serviceURL=i.serviceURL,this.serviceURL||(this.serviceURL=document.location.origin),this.userName=i.userName,this.password=i.password,this.token=i.token,this.tokenProvider=i.tokenProvider}async auth(){if(this.token)return;if(kt.tokens.has(this.serviceURL)){this.token=kt.tokens.get(this.serviceURL);return}if(!this.userName||!this.password||!this.tokenProvider)return;let i={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))},t=await fetch(this.computeURL(this.tokenProvider),{headers:i});try{let r=await t.json();this.token=r.token,kt.tokens.set(this.serviceURL,this.token)}catch{}}async get(i,t){let r=await this.createHeaders(t);const e=this.computeURL(i);if(!kt.loadingGetPromises.has(e)){let o=new Promise(async n=>{let l=await fetch(e,{headers:r});try{let c=await l.json();n(c)}catch{n(null)}});kt.loadingGetPromises.set(e,o)}let s=await kt.loadingGetPromises.get(e);return kt.loadingGetPromises.delete(e),s}async createHeaders(i){await this.auth();let t={};return this.token&&(t.Authorization="Bearer "+this.token),t.credentials="include",t["Accept-Language"]=ee.getLanguage(),i&&Object.assign(t,i),t}computeURL(i){return(this.serviceURL+"/"+i).replace(/([^(https?\:)])\/{2,}/g,"$1/")}async send(i,t,r="POST",e){await this.auth();let s=await this.createHeaders(e);s.Accept="application/json",s["Content-Type"]="application/json";let o=await fetch(this.computeURL(i),{headers:s,method:r,body:JSON.stringify(t)});try{return await o.json()}catch{return null}}async put(i,t,r){return this.send(i,t,"PUT",r)}async post(i,t,r){return this.send(i,t,"POST",r)}async delete(i,t,r){return this.send(i,t,"delete",r)}};let se=kt;se.loadingGetPromises=new Map,se.tokens=new Map;class Ne{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static js(t){try{return Function("return "+t)()}catch{return""}}}const C=class{static disable(){!this.enabled||(this.enabled=!1,Array.from(C.observedElements.keys()).forEach(i=>C.unObserve(i)))}static observe(i){if(!i||!C.enabled||C.observedElements.has(i))return;let t=new MutationObserver(C.onMutation),r={};r.childList=!0,r.subtree=!0,r.attributes=!0,r.attributeFilter=["data-bind"],t.observe(i,r),i.querySelectorAll("[data-bind]").forEach(e=>C.addPublisherListeners(e)),C.observedElements.set(i,t)}static unObserve(i){if(!i)return;let t=this.observedElements.get(i);!t||(t.disconnect(),i.querySelectorAll("[data-bind]").forEach(r=>C.removePublisherListeners(r)))}static onAdded(i){i.hasAttribute&&i.hasAttribute("data-bind")&&C.addPublisherListeners(i),i.querySelectorAll?i.querySelectorAll("[data-bind]").forEach(t=>C.addPublisherListeners(t)):i.childNodes.forEach(t=>C.onAdded(t))}static onRemoved(i){i.hasAttribute&&i.hasAttribute("data-bind")&&C.removePublisherListeners(i),i.querySelectorAll?i.querySelectorAll("[data-bind]").forEach(t=>C.removePublisherListeners(t)):i.childNodes.forEach(t=>C.onRemoved(t))}static onMutation(i){for(let e of i)switch(e.type){case"attributes":C.addPublisherListeners(e.target);break;case"childList":var t=e.addedNodes,r=e.removedNodes;t.forEach(s=>{C.onAdded(s)}),r.forEach(s=>{C.onRemoved(s)});break}}static removePublisherListeners(i){let t=C.publisherListeners.get(i);!t||(C.publisherListeners.delete(i),t.forEach(r=>{r.publisher.offAssign(r.onAssign)}))}static getVariablesDescriptor(i){let t=i.match(/(\$(?:\w+\\?\.?)+)/g);return t?t=t.map(r=>r.replace("$","")):t=[i],t=t.filter(r=>r.length>0),{expression:i.replace("\\",""),variables:t.map(r=>r.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(i){return Array.from(i.attributes).filter(t=>t.name.indexOf("::")==0).map(t=>({propertyToUpdate:t.name.substring(2).replace(/\-((html)|\w)/g,r=>r.substring(1).toUpperCase()),bindedVariablesDescriptor:C.getVariablesDescriptor(t.value)}))}static getSubPublisher(i,t){for(let r of t)r!="_self_"&&(i=i[r]);return i}static addPublisherListeners(i){C.removePublisherListeners(i);let t=i,r=ee.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!r)return;let e=K.getInstance().get(r),s=C.getDataBindItems(i),o=[];s.forEach(n=>{let l=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(let h of l.variables){let b=h,f=e;f=C.getSubPublisher(e,b);let g=i,$={publisher:f,onAssign:()=>{let _=l.variables.map(D=>C.getSubPublisher(e,D).get()),k=l.expression,R=!1;if(_.length==1&&l.variables[0].join(".")==k.substring(1)){let D=_[0];D===null&&(D=""),g[c]=D;return}for(let D=0;D<_.length;D++){let d=_[D],p=l.variables[D];d===null&&(R=!0,d=void 0),k=k.replace("$"+p.join("."),d)}if(k.indexOf("|")!=-1){let D=k.indexOf("|");if(D==0)k=Ne.js(k.substring(1));else{let d=k.substring(0,D),p=k.substring(D+1),m=Ne;k=R?"":m[d]?m[d](p):k}}else k=R?"":k;g[c]=k}};f.onAssign($.onAssign),o.push($)}}),C.publisherListeners.set(i,o)}};let At=C;At.observedElements=new Map,At.enabled=!0,At.publisherListeners=new Map,At.observe(document.documentElement);let br=window;br.SonicDataBindObserver||(br.SonicDataBindObserver=At);class et{static shallowEqual(t,r){const e=Object.keys(t),s=Object.keys(r);if(e.length!==s.length)return!1;for(let o of e)if(t[o]!==r[o])return!1;return!0}static deepEqual(t,r){const e=Object.keys(t),s=Object.keys(r);if(e.length!==s.length)return!1;for(const o of e){const n=t[o],l=r[o],c=et.isObject(n)&&et.isObject(l);if(c&&!et.deepEqual(n,l)||!c&&n!==l)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static traverse(t,r,e=!1){for(let s of r){let o=t[s];if(o===void 0)return;e&&et.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[s]}return t}}var Qi=Object.defineProperty,to=Object.getOwnPropertyDescriptor,re=(i,t,r,e)=>{for(var s=e>1?void 0:e?to(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Qi(t,r,s),s};let Fe=!1,ks=new Set;const I=i=>{const t=class extends i{constructor(...e){super(),this.noAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.defferedDebug=null,this.debug=null,this.onAssign=null,this.args=e}hasAncestorAttribute(e){return this.getAncestorAttributeValue(e)!=null}getAncestorAttributeValue(e){let s=this;return ee.getAncestorAttributeValue(s,e)}get props(){return this.publisher?this.publisher.get():this._props}set props(e){typeof e=="string"&&["{","["].includes(e.trim().charAt(0))&&(e=JSON.parse(e)),(e==null||e==="")&&(e={}),this.publisher||this.initPublisher(),this._props=e,this.publisher&&this.publisher.set(e),this.requestUpdate()}updated(e){super.updated(e),this.shadowRoot?this.shadowRoot.children.length==0?this.style.display="none":this.style.removeProperty("display"):this.children.length==0?this.style.display="none":this.style.removeProperty("display")}connectedCallback(){if(this.hasAttribute("lazyRendering")){let e={root:null,rootMargin:Math.max(window.innerWidth*.1,window.innerHeight*.1)+"px"},s=!0;new IntersectionObserver(o=>{for(const n of o)s&&n.isIntersecting&&(s=!1,this.initWording(),this.initPublisher())},e).observe(this)}else this.initWording(),this.initPublisher();this.addDebugger(),super.connectedCallback(),t.instanceCounter++}disconnectedCallback(){this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate())),this.wordingPublisher&&this.wordingPublisher.stopTemplateFilling(this),this.onAssign&&this.publisher.offAssign(this.onAssign)}addDebugger(){if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");let e=this.debug.style;e.position="fixed",e.top="0",e.right="0",e.margin="auto",e.borderRadius=".7rem",e.backgroundColor="#0f1729",e.color="#c5d4f9",e.padding="16px 16px",e.margin="16px 16px",e.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",e.overflowY="auto",e.zIndex="99999999",e.maxHeight="calc(100vh - 32px)",e.fontFamily="Consolas, monospace",e.maxWidth="50vw",e.fontSize="12px",e.minWidth="300px",e.overflowWrap="break-word"}if(this.addEventListener("click",e=>{!e.ctrlKey||(e.preventDefault(),Fe=!Fe)}),this.dataProvider){let e=window;e[this.dataProvider]=this.publisher}this.addEventListener("mouseover",()=>{Fe||this.removeDebugger(),document.body.appendChild(this.debug),ks.add(this.debug)}),this.addEventListener("mouseout",()=>{Fe||this.removeDebugger()}),this.publisher.onInternalMutation(()=>{this.debug.innerHTML=`\u{1F916} DataProvider : "<b style="font-weight:700;color:#fff">${this.dataProvider}</b>"<br><div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px">Variable disponible dans la console<br>ctrl + Clique : \xE9pingler / d\xE9s\xE9pingler</div><pre style="margin-top:10px;background:0 0;padding:0;font-size:inherit;color:inherit">${JSON.stringify(this.publisher.get(),null," ")}</pre>`})}}removeDebugger(){ks.forEach(e=>{document.body.contains(e)&&document.body.removeChild(e)}),ks=new Set}getApiConfiguration(){const e=this.getAncestorAttributeValue("token");let s=this.getAncestorAttributeValue("serviceURL"),o=null,n=null,l=null;return e||(o=this.getAncestorAttributeValue("userName"),n=this.getAncestorAttributeValue("password"),l=this.getAncestorAttributeValue("tokenProvider")),{serviceURL:s,token:e,userName:o,password:n,tokenProvider:l}}async initWording(){let e=!1;const s=Object.getOwnPropertyNames(this.constructor.prototype);for(let c of s)if(c.indexOf("wording_")==0){e=!0;break}if(!e)return;let o=K.getInstance().get("sonic-wording"),n=this.getAncestorAttributeValue("wordingProvider");const l=new se(this.getApiConfiguration());if(n){let c=[];for(let h of s)if(h.indexOf("wording_")==0){let b=h.substring(8);o.get()[h]||(o[h]="...",c.push(b))}if(c.length>0){let h=await l.post(n,{labels:c});for(let b in h)o["wording_"+b]=h[b]}o.startTemplateFilling(this),this.wordingPublisher=o}}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;let e=super.createRenderRoot();return At.observe(e),e}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const e=K.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let s=this.dataProvider;if(!s&&this._props&&(this.dataProvider=s="__subscriber__"+t.instanceCounter),s){this.bindPublisher&&e.set(s,this.bindPublisher());let o=e.get(s);if(this.dataProvider=s,this.hasAttribute("subDataProvider")){let n=this.getAttribute("subDataProvider");this.dataProvider=s+"/"+n,o=et.traverse(o,n.split(".")),e.set(this.dataProvider,o),this.publisher=o}this.publisher=o}this.publisher&&(this.onAssign=()=>{this.requestUpdate()},this.publisher.onAssign(this.onAssign),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this._props&&this.publisher.set(this._props))}};let r=t;return r.instanceCounter=0,re([a({type:Boolean})],r.prototype,"noAutoFill",2),re([a({type:Object})],r.prototype,"propertyMap",2),re([a({type:String,attribute:"data-title"})],r.prototype,"title",2),re([a({reflect:!0})],r.prototype,"dataProvider",2),re([a()],r.prototype,"bindPublisher",2),re([a()],r.prototype,"props",1),r};let yr=window;yr.SonicPublisherManager||(yr.SonicPublisherManager=K);var eo=Object.defineProperty,so=Object.getOwnPropertyDescriptor,ro=(i,t,r,e)=>{for(var s=e>1?void 0:e?so(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&eo(t,r,s),s};const $e=i=>{class t extends i{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){let e=this.templates||[...this.querySelectorAll("template")];for(let s of e)s.hasAttribute(this.templateValueAttribute)&&(this.templateParts[s.getAttribute(this.templateValueAttribute)]=s,this.templatePartsList.push(s));this.templateList=e.filter(s=>!s.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=e),super.connectedCallback()}}return ro([a({type:Array})],t.prototype,"templates",2),t};var io=Object.defineProperty,oo=Object.getOwnPropertyDescriptor,V=(i,t,r,e)=>{for(var s=e>1?void 0:e?oo(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&io(t,r,s),s};const no="sonic-date";let U=class extends I($e(v)){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=new Date().getTime()/1e3,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.minute="2-digit",this.language="",this.renderIf=!0,this.startDateObject=new Date,this.endDateObject=new Date}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(i){this._wording_billet_periode_validite=i,this.duAu=this.wording_billet_periode_validite.split("%s").map(t=>t.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.wording_billet_periode_validite="Du %s au %s",this.pageLanguage=ee.getLanguage(),super.connectedCallback()}getDatesParts(i,t,r){const e=new Intl.DateTimeFormat(this.language||this.pageLanguage,r);let s=this.startDateObject;s.setTime(i*1e3);let o=null;if(t>0){let n=this.endDateObject;if(n.setTime(t*1e3),o=e.formatRangeToParts(s,n),this.designMode)for(let c of o)c.type=="literal"&&this.designMode&&c.value.trim()==","&&(c.hidden=!0);const l=s.getFullYear()==n.getFullYear()&&s.getMonth()==n.getMonth()&&s.getDate()==n.getDate();if(o.some(c=>c.source=="endRange")&&!l){for(let c of o)if(c.type=="literal"&&c.source=="shared"&&c.value.trim().length>0&&!l){c.value=" "+this.duAu[1]+" ",c.type="to";break}this.designMode||o.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else o=e.formatToParts(s);return o[0].value=Ne.ucFirst(o[0].value),o=o.filter(n=>n.hidden!==!0),o}render(){if(!this.renderIf)return P;if(this.date_string&&(this.date=new Date(this.date_string).getTime()/1e3),this.date&&(this.start_date=this.date),this.start_date_string&&(this.start_date=new Date(this.start_date_string).getTime()/1e3),this.end_date_string&&(this.end_date=new Date(this.end_date_string).getTime()/1e3),this.end_date>0&&this.end_date<this.start_date){const r=this.start_date;this.start_date=this.end_date,this.end_date=r}let i={weekday:this.weekday,year:this.year,month:this.month,day:this.day};this.hour&&(i.hour=this.hour),this.minute&&(i.minute=this.minute),this.era&&(i.era=this.era),this.time_zone&&(i.timeZone=this.time_zone);let t=this.getDatesParts(this.start_date,this.end_date,i);return u`${t.map(r=>{let e=this.templateParts[r.type];if(e){var s=document.importNode(e.content,!0);let o=s.children[0];return o.innerText.trim()==""&&(o.innerText=r.value),s}return u`<span class="${r.type}">${r.value}</span>`})}`}};V([a()],U.prototype,"wording_billet_periode_validite",1),V([a({type:Boolean})],U.prototype,"designMode",2),V([a({type:String})],U.prototype,"time_zone",2),V([a({type:Number})],U.prototype,"date",2),V([a({type:String})],U.prototype,"date_string",2),V([a({type:String})],U.prototype,"start_date_string",2),V([a({type:String})],U.prototype,"end_date_string",2),V([a({type:Number})],U.prototype,"start_date",2),V([a({type:Number})],U.prototype,"end_date",2),V([a({type:String})],U.prototype,"era",2),V([a({type:String})],U.prototype,"year",2),V([a({type:String})],U.prototype,"month",2),V([a({type:String})],U.prototype,"day",2),V([a({type:String})],U.prototype,"weekday",2),V([a({type:String})],U.prototype,"hour",2),V([a({type:String})],U.prototype,"minute",2),V([a({type:String})],U.prototype,"language",2),V([a({type:Boolean})],U.prototype,"renderIf",2),U=V([y(no)],U);const ao=w`:host([align="left"]) .sonic-loader--inline { margin-left:0; } :host([align="right"]) .sonic-loader--inline { margin-left:auto; margin-right:0; } .sonic-loader--inline { display:block; position: relative; width: 80px; height: 80px; margin:auto; z-index:20; } .sonic-loader--inline div { position: absolute; top: 33px; width: 13px; height: 13px; border-radius: 50%; background:var(--sc-loader-bg); animation-timing-function: cubic-bezier(0, 1, 1, 0); } .sonic-loader--inline div:nth-child(1) { left: 8px; animation: lds-ellipsis1 0.6s infinite; } .sonic-loader--inline div:nth-child(2) { left: 8px; animation: lds-ellipsis2 0.6s infinite; } .sonic-loader--inline div:nth-child(3) { left: 32px; animation: lds-ellipsis2 0.6s infinite; } .sonic-loader--inline div:nth-child(4) { left: 56px; animation: lds-ellipsis3 0.6s infinite; } @keyframes lds-ellipsis1 { 0% { transform: scale(0); } 100% { transform: scale(1); } } @keyframes lds-ellipsis3 { 0% { transform: scale(1); } 100% { transform: scale(0); } } @keyframes lds-ellipsis2 { 0% { transform: translate(0, 0); } 100% { transform: translate(24px, 0); } }`,lo=w`@keyframes sonic-loader--fixed { 0% { transform: scale(0); opacity: 0; } 5% { opacity: 1; } 70% { opacity:90%; } 100% { transform: scale(1); opacity: 0; } } .sonic-loader--fixed { position: fixed; top:50%; left:50%; transform:transateY(-50%) translateX(-50%); z-index:999; } .sonic-loader--fixed > div:nth-child(2) { animation-delay: -0.5s; } .sonic-loader--fixed > div:nth-child(3) { animation-delay: -0.2s; } .sonic-loader--fixed > div:nth-child(4) { display:none !important; } .sonic-loader--fixed > div { background-color: var(--sc-loader-bg); width: 5rem; height: 5rem; border-radius: 100%; margin: 2px; animation-fill-mode: both; position: absolute; top: 0px; opacity: 0; margin: 0; top: -2.5rem; left: -2.5rem; width: 5rem; height: 5rem; animation: sonic-loader--fixed 1s 0s linear infinite; }`;var co=Object.defineProperty,ho=Object.getOwnPropertyDescriptor,wr=(i,t,r,e)=>{for(var s=e>1?void 0:e?ho(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&co(t,r,s),s};const $r="sonic-loader";let q=class extends v{constructor(){super(...arguments),this.mode="fixed"}static show(i){q.loader||(q.loader=document.createElement("sonic-loader"));let t=q.loader;i||(i={});let r=i;for(let e in r)t.setAttribute(e,r[e]);i.container||(i.container=document.querySelector("sonic-theme")||document.body,i.mode="fixed"),i.container.appendChild(t),q.callCounter++}static hide(){q.callCounter--,!(q.callCounter>0)&&q.loader&&q.loader.remove()}render(){return u`<div class="sonic-loader sonic-loader--${this.mode}"><div></div><div></div><div></div><div></div></div>`}};q.styles=[ao,lo,w`:host { --sc-loader-bg: var(--sc-primary, currentColor); pointer-events: none; } .sonic-loader { opacity: 0; animation: showLoader 0.5s 0.5s forwards; } .sonic-loader--inline { animation-delay: 0s; } @keyframes showLoader { 0% { opacity: 0; } 100% { opacity: 1; } }`],q.callCounter=0,wr([a({type:String})],q.prototype,"mode",2),q=wr([y($r)],q);try{customElements.define($r,q)}catch{}/**
|
|
45
|
+
*/function st(o,t,s){let e,r=o;return typeof o=="object"?(r=o.slot,e=o):e={flatten:t},s?Nt({slot:r,flatten:t,selector:s}):_r({descriptor:i=>({get(){var n,l;const c="slot"+(r?`[name=${r}]`:":not([name])"),h=(n=this.renderRoot)===null||n===void 0?void 0:n.querySelector(c);return(l=h==null?void 0:h.assignedNodes(e))!==null&&l!==void 0?l:[]},enumerable:!0,configurable:!0})})}function Re(o){return typeof o=="object"&&o!=null}class si{constructor(t,s=null){for(this._proxies_=new Map,this._value_=t,this._invalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this.parent=s,this.root=this;this.root.parent;)this.root=this.root.parent}delete(){for(let t of this._proxies_.values())t.delete();this._invalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear()}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){this._mutationListeners_.forEach(s=>s()),!t&&this.parent&&this.parent._publishInternalMutation_()}_publishAssignement_(t=!1){this._assignListeners_.forEach(s=>s(this.get())),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(e=>{e[t]!==s&&(e[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(e=>{let r=Object.getOwnPropertyDescriptor(e,t);r&&!r.set||(e.propertyMap&&e.propertyMap[t]&&(t=e.propertyMap[t]),typeof e[t]!="undefined"&&e[t]!==s&&(e[t]=s))})}onAssign(t){typeof t=="function"&&(this._assignListeners_.add(t),t(this.get()))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){this._invalidateListeners_.delete(t)}invalidate(t){this._publishInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){this._mutationListeners_.delete(t)}startTemplateFilling(t){this._templateFillListeners_.add(t);for(var s in this._value_){const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(s=t.propertyMap[s]),typeof t[s]!="undefined"&&t[s]!==e&&(t[s]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(var s in this._value_){const e=this._value_[s];t[s]!==e&&(t[s]=e)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,s=!1){if(this._value_===t||this._value_.hasOwnProperty("__value")&&t.hasOwnProperty("__value")&&this._value_.__value===t.__value)return!0;if(this._value_=t,this._value_.hasOwnProperty("__value"))return this._publishAssignement_(s),!0;if(Array.from(this._proxies_.keys()).forEach(r=>{!this._value_[r]&&this._proxies_.has(r)&&!this._proxies_.get(r).hasListener()&&this._proxies_.delete(r)}),Re(this._value_))for(let r in this._value_){let i=t[r],l=Re(i)?i:{__value:i};if(!this._proxies_.has(r)){let c=new It({},this);this._proxies_.set(r,c,!0),c._proxies_.set("_parent_",this)}this._proxies_.get(r).set(l,!0),this._publishDynamicFilling_(r,i)}return this._publishAssignement_(),!0}get(){if(this._value_.hasOwnProperty("__value")){let t=this._value_.__value;return t!=null?t:null}return this._value_}}const Pt=class{constructor(){if(Pt.instance!=null)throw"Singleton / use getInstance";Pt.instance=this,this.publishers=new Map}static getInstance(){return Pt.instance==null?new Pt:Pt.instance}static get(t){return Pt.getInstance().get(t)}static delete(t){return Pt.getInstance().delete(t)}get(t){return this.publishers.has(t)||this.publishers.set(t,new It({})),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){if(!this.publishers.has(t))return!1;this.publishers.get(t),this.publishers.delete(t)}};let Z=Pt;Zo(Z,"instance",null);class It extends si{constructor(t,s=null){super(t,s);let e=this,r=new Proxy(this,{get:function(i,n){if(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_lockInternalMutationPublishing_"].includes(n))return e[n];if(!e._proxies_.has(n)){let l=e._value_[n],c=new It(Re(l)?l:{__value:l},e);c._proxies_.set("_parent_",r),e._proxies_.set(n,c)}return e._proxies_.get(n)},set:function(i,n,l){if(n=="_value_")return i._value_=l,i._value_;if(!e._proxies_.has(n)){let h=new It({},e);h._proxies_.set("_parent_",r),e._proxies_.set(n,h)}return e._value_[n]!==l&&(e._value_[n]=l,e._publishDynamicFilling_(n,l),e._proxies_.get(n).set(Re(l)?l:{__value:l})),e._proxies_.get(n)},deleteProperty:function(i,n){return e._publishDynamicFilling_(n,null),e._proxies_.delete(n),delete e._value_[n]},enumerate:function(i,n){return e._value_.keys()},has:function(i,n){return n in e._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(i,n,l){return l&&"value"in l&&(e._value_[n]=l.value),e._value_},getOwnPropertyDescriptor:function(i,n){return e._value_[n],{enumerable:!0,configurable:!0}},ownKeys:function(i){return e._value_.__value?Object.keys(this._value_.__value):Object.keys(e._value_)}});return r}}typeof module!="undefined"&&(module.exports={Publisher:It,PublisherManager:Z});class se{static getLanguage(){return document.getElementsByTagName("html")[0].getAttribute("lang")}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const e=s.indexOf("=");return t[s.substring(0,e).trim()]=s.substring(e+1),t},{})}static getAncestorAttributeValue(t,s){for(;!(t.hasAttribute&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.hasAttribute?t.getAttribute(s):null}}const St=class{constructor(o){this.serviceURL=o.serviceURL,this.serviceURL||(this.serviceURL=document.location.origin),this.userName=o.userName,this.password=o.password,this.token=o.token,this.tokenProvider=o.tokenProvider}async auth(){if(this.token)return;if(St.tokens.has(this.serviceURL)){this.token=St.tokens.get(this.serviceURL);return}if(!this.userName||!this.password||!this.tokenProvider)return;let o={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))},t=await fetch(this.computeURL(this.tokenProvider),{headers:o});try{let s=await t.json();this.token=s.token,St.tokens.set(this.serviceURL,this.token)}catch{}}async get(o,t){let s=await this.createHeaders(t);const e=this.computeURL(o);if(!St.loadingGetPromises.has(e)){let i=new Promise(async n=>{let l=await fetch(e,{headers:s});try{let c=await l.json();c._sonic_http_response_=l,n(c)}catch{n({_sonic_http_response_:l})}});St.loadingGetPromises.set(e,i)}let r=await St.loadingGetPromises.get(e);return St.loadingGetPromises.delete(e),r}async createHeaders(o){await this.auth();let t={};return this.token&&(t.Authorization="Bearer "+this.token),t.credentials="include",t["Accept-Language"]=se.getLanguage(),o&&Object.assign(t,o),t}computeURL(o){return(this.serviceURL+"/"+o).replace(/([^(https?\:)])\/{2,}/g,"$1/")}async send(o,t,s="POST",e){await this.auth();let r=await this.createHeaders(e);r.Accept="application/json",r["Content-Type"]="application/json";let i=await fetch(this.computeURL(o),{headers:r,method:s,body:JSON.stringify(t)});try{let n=await i.json();return n._sonic_http_response_=i,n}catch{return{_sonic_http_response_:i}}}async put(o,t,s){return this.send(o,t,"PUT",s)}async post(o,t,s){return this.send(o,t,"POST",s)}async delete(o,t,s){return this.send(o,t,"delete",s)}};let oe=St;oe.loadingGetPromises=new Map,oe.tokens=new Map;class Fe{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static js(t){try{return Function("return "+t)()}catch{return""}}}const O=class{static disable(){!this.enabled||(this.enabled=!1,Array.from(O.observedElements.keys()).forEach(o=>O.unObserve(o)))}static observe(o){if(!o||!O.enabled||O.observedElements.has(o))return;let t=new MutationObserver(O.onMutation),s={};s.childList=!0,s.subtree=!0,s.attributes=!0,s.attributeFilter=["data-bind"],t.observe(o,s),o.querySelectorAll("[data-bind]").forEach(e=>O.addPublisherListeners(e)),O.observedElements.set(o,t)}static unObserve(o){if(!o)return;let t=this.observedElements.get(o);!t||(t.disconnect(),o.querySelectorAll("[data-bind]").forEach(s=>O.removePublisherListeners(s)))}static onAdded(o){o.hasAttribute&&o.hasAttribute("data-bind")&&O.addPublisherListeners(o),o.querySelectorAll?o.querySelectorAll("[data-bind]").forEach(t=>O.addPublisherListeners(t)):o.childNodes.forEach(t=>O.onAdded(t))}static onRemoved(o){o.hasAttribute&&o.hasAttribute("data-bind")&&O.removePublisherListeners(o),o.querySelectorAll?o.querySelectorAll("[data-bind]").forEach(t=>O.removePublisherListeners(t)):o.childNodes.forEach(t=>O.onRemoved(t))}static onMutation(o){for(let e of o)switch(e.type){case"attributes":O.addPublisherListeners(e.target);break;case"childList":var t=e.addedNodes,s=e.removedNodes;t.forEach(r=>{O.onAdded(r)}),s.forEach(r=>{O.onRemoved(r)});break}}static removePublisherListeners(o){let t=O.publisherListeners.get(o);!t||(O.publisherListeners.delete(o),t.forEach(s=>{s.publisher.offAssign(s.onAssign)}))}static getVariablesDescriptor(o){let t=o.match(/(\$(?:\w+\\?\.?)+)/g);return t?t=t.map(s=>s.replace("$","")):t=[o],t=t.filter(s=>s.length>0),{expression:o.replace("\\",""),variables:t.map(s=>s.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(o){return Array.from(o.attributes).filter(t=>t.name.indexOf("::")==0).map(t=>({propertyToUpdate:t.name.substring(2).replace(/\-((html)|\w)/g,s=>s.substring(1).toUpperCase()),bindedVariablesDescriptor:O.getVariablesDescriptor(t.value)}))}static getSubPublisher(o,t){for(let s of t)s!="_self_"&&(o=o[s]);return o}static addPublisherListeners(o){O.removePublisherListeners(o);let t=o,s=se.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;let e=Z.getInstance().get(s),r=O.getDataBindItems(o),i=[];r.forEach(n=>{let l=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(let h of l.variables){let y=h,g=e;g=O.getSubPublisher(e,y);let m=o,x={publisher:g,onAssign:()=>{let _=l.variables.map(D=>O.getSubPublisher(e,D).get()),A=l.expression,N=!1;if(_.length==1&&l.variables[0].join(".")==A.substring(1)){let D=_[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<_.length;D++){let d=_[D],p=l.variables[D];d===null&&(N=!0,d=void 0),A=A.replace("$"+p.join("."),d)}if(A.indexOf("|")!=-1){let D=A.indexOf("|");if(D==0)A=Fe.js(A.substring(1));else{let d=A.substring(0,D),p=A.substring(D+1),b=Fe;A=N?"":b[d]?b[d](p):A}}else A=N?"":A;m[c]=A}};g.onAssign(x.onAssign),i.push(x)}}),O.publisherListeners.set(o,i)}};let Ct=O;Ct.observedElements=new Map,Ct.enabled=!0,Ct.publisherListeners=new Map,Ct.observe(document.documentElement);let ks=window;ks.SonicDataBindObserver||(ks.SonicDataBindObserver=Ct);class et{static shallowEqual(t,s){const e=Object.keys(t),r=Object.keys(s);if(e.length!==r.length)return!1;for(let i of e)if(t[i]!==s[i])return!1;return!0}static deepEqual(t,s){const e=Object.keys(t),r=Object.keys(s);if(e.length!==r.length)return!1;for(const i of e){const n=t[i],l=s[i],c=et.isObject(n)&&et.isObject(l);if(c&&!et.deepEqual(n,l)||!c&&n!==l)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static traverse(t,s,e=!1){for(let r of s){let i=t[r];if(i===void 0)return;e&&et.isObject(i)?t=Object.assign(Array.isArray(i)?[]:{},t,i):t=t[r]}return t}}var oi=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,ie=(o,t,s,e)=>{for(var r=e>1?void 0:e?ii(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&oi(t,s,r),r};let Ue=!1,Pr=new Set;const F=o=>{const t=class extends o{constructor(...e){super(),this.noAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.defferedDebug=null,this.debug=null,this.onAssign=null,this.args=e}hasAncestorAttribute(e){return this.getAncestorAttributeValue(e)!=null}getAncestorAttributeValue(e){let r=this;return se.getAncestorAttributeValue(r,e)}get props(){return this.publisher?this.publisher.get():this._props}set props(e){typeof e=="string"&&["{","["].includes(e.trim().charAt(0))&&(e=JSON.parse(e)),(e==null||e==="")&&(e={}),this.publisher||this.initPublisher(),this._props=e,this.publisher&&this.publisher.set(e),this.requestUpdate()}updated(e){super.updated(e),this.shadowRoot?this.shadowRoot.children.length==0?this.style.display="none":this.style.removeProperty("display"):this.children.length==0?this.style.display="none":this.style.removeProperty("display")}connectedCallback(){if(this.hasAttribute("lazyRendering")){let e={root:null,rootMargin:Math.max(window.innerWidth*.1,window.innerHeight*.1)+"px"},r=!0;new IntersectionObserver(i=>{for(const n of i)r&&n.isIntersecting&&(r=!1,this.initWording(),this.initPublisher())},e).observe(this)}else this.initWording(),this.initPublisher();this.addDebugger(),super.connectedCallback(),t.instanceCounter++}disconnectedCallback(){this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate())),this.wordingPublisher&&this.wordingPublisher.stopTemplateFilling(this),this.onAssign&&this.publisher.offAssign(this.onAssign)}addDebugger(){if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");let e=this.debug.style;e.position="fixed",e.top="0",e.right="0",e.margin="auto",e.borderRadius=".7rem",e.backgroundColor="#0f1729",e.color="#c5d4f9",e.padding="16px 16px",e.margin="16px 16px",e.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",e.overflowY="auto",e.zIndex="99999999",e.maxHeight="calc(100vh - 32px)",e.fontFamily="Consolas, monospace",e.maxWidth="50vw",e.fontSize="12px",e.minWidth="300px",e.overflowWrap="break-word"}if(this.addEventListener("click",e=>{!e.ctrlKey||(e.preventDefault(),Ue=!Ue)}),this.dataProvider){let e=window;e[this.dataProvider]=this.publisher}this.addEventListener("mouseover",()=>{Ue||this.removeDebugger(),document.body.appendChild(this.debug),Pr.add(this.debug)}),this.addEventListener("mouseout",()=>{Ue||this.removeDebugger()}),this.publisher.onInternalMutation(()=>{this.debug.innerHTML=`\u{1F916} DataProvider : "<b style="font-weight:700;color:#fff">${this.dataProvider}</b>"<br><div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px">Variable disponible dans la console<br>ctrl + Clique : \xE9pingler / d\xE9s\xE9pingler</div><pre style="margin-top:10px;background:0 0;padding:0;font-size:inherit;color:inherit">${JSON.stringify(this.publisher.get(),null," ")}</pre>`})}}removeDebugger(){Pr.forEach(e=>{document.body.contains(e)&&document.body.removeChild(e)}),Pr=new Set}getApiConfiguration(){const e=this.getAncestorAttributeValue("token");let r=this.getAncestorAttributeValue("serviceURL"),i=null,n=null,l=null;return e||(i=this.getAncestorAttributeValue("userName"),n=this.getAncestorAttributeValue("password"),l=this.getAncestorAttributeValue("tokenProvider")),{serviceURL:r,token:e,userName:i,password:n,tokenProvider:l}}async initWording(){let e=!1;const r=Object.getOwnPropertyNames(this.constructor.prototype);for(let c of r)if(c.indexOf("wording_")==0){e=!0;break}if(!e)return;let i=Z.getInstance().get("sonic-wording"),n=this.getAncestorAttributeValue("wordingProvider");const l=new oe(this.getApiConfiguration());if(n){let c=[];for(let h of r)if(h.indexOf("wording_")==0){let y=h.substring(8);i.get()[h]||(i[h]="...",c.push(y))}if(c.length>0){let h=await l.post(n,{labels:c});for(let y in h)i["wording_"+y]=h[y]}i.startTemplateFilling(this),this.wordingPublisher=i}}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;let e=super.createRenderRoot();return Ct.observe(e),e}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const e=Z.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let r=this.dataProvider;if(!r&&this._props&&(this.dataProvider=r="__subscriber__"+t.instanceCounter),r){this.bindPublisher&&e.set(r,this.bindPublisher());let i=e.get(r);if(this.dataProvider=r,this.hasAttribute("subDataProvider")){let n=this.getAttribute("subDataProvider");this.dataProvider=r+"/"+n,i=et.traverse(i,n.split(".")),e.set(this.dataProvider,i),this.publisher=i}this.publisher=i}this.publisher&&(this.onAssign=()=>{this.requestUpdate()},this.publisher.onAssign(this.onAssign),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this._props&&this.publisher.set(this._props))}};let s=t;return s.instanceCounter=0,ie([a({type:Boolean})],s.prototype,"noAutoFill",2),ie([a({type:Object})],s.prototype,"propertyMap",2),ie([a({type:String,attribute:"data-title"})],s.prototype,"title",2),ie([a({reflect:!0})],s.prototype,"dataProvider",2),ie([a()],s.prototype,"bindPublisher",2),ie([a()],s.prototype,"props",1),s};let _s=window;_s.SonicPublisherManager||(_s.SonicPublisherManager=Z);var ni=Object.defineProperty,ai=Object.getOwnPropertyDescriptor,li=(o,t,s,e)=>{for(var r=e>1?void 0:e?ai(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&ni(t,s,r),r};const Pe=o=>{class t extends o{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){let e=this.templates||[...this.querySelectorAll("template")];for(let r of e)r.hasAttribute(this.templateValueAttribute)&&(this.templateParts[r.getAttribute(this.templateValueAttribute)]=r,this.templatePartsList.push(r));this.templateList=e.filter(r=>!r.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=e),super.connectedCallback()}}return li([a({type:Array})],t.prototype,"templates",2),t};var ci=Object.defineProperty,hi=Object.getOwnPropertyDescriptor,V=(o,t,s,e)=>{for(var r=e>1?void 0:e?hi(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&ci(t,s,r),r};const di="sonic-date";let U=class extends F(Pe(f)){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=new Date().getTime()/1e3,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.minute="2-digit",this.language="",this.renderIf=!0,this.startDateObject=new Date,this.endDateObject=new Date}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(o){this._wording_billet_periode_validite=o,this.duAu=this.wording_billet_periode_validite.split("%s").map(t=>t.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.wording_billet_periode_validite="Du %s au %s",this.pageLanguage=se.getLanguage(),super.connectedCallback()}getDatesParts(o,t,s){let e=this.startDateObject;e.setTime(o*1e3);let r=null;if(t>0){let i=this.endDateObject;if(i.setTime(t*1e3),e.toJSON().substring(0,10)!=i.toJSON().substring(0,10)&&(delete s.hour,delete s.minute),r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(e,i),this.designMode)for(let l of r)l.type=="literal"&&this.designMode&&l.value.trim()==","&&(l.hidden=!0);const n=e.getFullYear()==i.getFullYear()&&e.getMonth()==i.getMonth()&&e.getDate()==i.getDate();if(r.some(l=>l.source=="endRange")&&!n){for(let l of r)if(l.type=="literal"&&l.source=="shared"&&l.value.trim().length>0&&!n){l.value=" "+this.duAu[1]+" ",l.type="to";break}this.designMode||r.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(e);return r[0].value=Fe.ucFirst(r[0].value),r=r.filter(i=>i.hidden!==!0),r}render(){if(!this.renderIf)return S;if(this.date_string&&(this.date=new Date(this.date_string).getTime()/1e3),this.date&&(this.start_date=this.date),this.start_date_string&&(this.start_date=new Date(this.start_date_string).getTime()/1e3),this.end_date_string&&(this.end_date=new Date(this.end_date_string).getTime()/1e3),this.end_date>0&&this.end_date<this.start_date){const s=this.start_date;this.start_date=this.end_date,this.end_date=s}let o={weekday:this.weekday,year:this.year,month:this.month,day:this.day};this.hour&&(o.hour=this.hour),this.minute&&(o.minute=this.minute),this.era&&(o.era=this.era),this.time_zone&&(o.timeZone=this.time_zone);let t=this.getDatesParts(this.start_date,this.end_date,o);return u`${t.map(s=>{let e=this.templateParts[s.type];if(e){var r=document.importNode(e.content,!0);let i=r.children[0];return i.innerText.trim()==""&&(i.innerText=s.value),r}return u`<span class="${s.type}">${s.value}</span>`})}`}};V([a()],U.prototype,"wording_billet_periode_validite",1),V([a({type:Boolean})],U.prototype,"designMode",2),V([a({type:String})],U.prototype,"time_zone",2),V([a({type:Number})],U.prototype,"date",2),V([a({type:String})],U.prototype,"date_string",2),V([a({type:String})],U.prototype,"start_date_string",2),V([a({type:String})],U.prototype,"end_date_string",2),V([a({type:Number})],U.prototype,"start_date",2),V([a({type:Number})],U.prototype,"end_date",2),V([a({type:String})],U.prototype,"era",2),V([a({type:String})],U.prototype,"year",2),V([a({type:String})],U.prototype,"month",2),V([a({type:String})],U.prototype,"day",2),V([a({type:String})],U.prototype,"weekday",2),V([a({type:String})],U.prototype,"hour",2),V([a({type:String})],U.prototype,"minute",2),V([a({type:String})],U.prototype,"language",2),V([a({type:Boolean})],U.prototype,"renderIf",2),U=V([v(di)],U);const pi=w`:host([align="left"]) .sonic-loader--inline { margin-left:0; } :host([align="right"]) .sonic-loader--inline { margin-left:auto; margin-right:0; } .sonic-loader--inline { display:block; position: relative; width: 80px; height: 80px; margin:auto; z-index:20; } .sonic-loader--inline div { position: absolute; top: 33px; width: 13px; height: 13px; border-radius: 50%; background:var(--sc-loader-bg); animation-timing-function: cubic-bezier(0, 1, 1, 0); } .sonic-loader--inline div:nth-child(1) { left: 8px; animation: lds-ellipsis1 0.6s infinite; } .sonic-loader--inline div:nth-child(2) { left: 8px; animation: lds-ellipsis2 0.6s infinite; } .sonic-loader--inline div:nth-child(3) { left: 32px; animation: lds-ellipsis2 0.6s infinite; } .sonic-loader--inline div:nth-child(4) { left: 56px; animation: lds-ellipsis3 0.6s infinite; } @keyframes lds-ellipsis1 { 0% { transform: scale(0); } 100% { transform: scale(1); } } @keyframes lds-ellipsis3 { 0% { transform: scale(1); } 100% { transform: scale(0); } } @keyframes lds-ellipsis2 { 0% { transform: translate(0, 0); } 100% { transform: translate(24px, 0); } }`,ui=w`@keyframes sonic-loader--fixed { 0% { transform: scale(0); opacity: 0; } 5% { opacity: 1; } 70% { opacity:90%; } 100% { transform: scale(1); opacity: 0; } } .sonic-loader--fixed { position: fixed; top:50%; left:50%; transform:transateY(-50%) translateX(-50%); z-index:999; } .sonic-loader--fixed > div:nth-child(2) { animation-delay: -0.5s; } .sonic-loader--fixed > div:nth-child(3) { animation-delay: -0.2s; } .sonic-loader--fixed > div:nth-child(4) { display:none !important; } .sonic-loader--fixed > div { background-color: var(--sc-loader-bg); width: 5rem; height: 5rem; border-radius: 100%; margin: 2px; animation-fill-mode: both; position: absolute; top: 0px; opacity: 0; margin: 0; top: -2.5rem; left: -2.5rem; width: 5rem; height: 5rem; animation: sonic-loader--fixed 1s 0s linear infinite; }`;var mi=Object.defineProperty,gi=Object.getOwnPropertyDescriptor,As=(o,t,s,e)=>{for(var r=e>1?void 0:e?gi(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&mi(t,s,r),r};const Ps="sonic-loader";let q=class extends f{constructor(){super(...arguments),this.mode="fixed"}static show(o){q.loader||(q.loader=document.createElement("sonic-loader"));let t=q.loader;o||(o={});let s=o;for(let e in s)t.setAttribute(e,s[e]);o.container||(o.container=document.querySelector("sonic-theme")||document.body,o.mode="fixed"),o.container.appendChild(t),q.callCounter++}static hide(){q.callCounter--,!(q.callCounter>0)&&q.loader&&q.loader.remove()}render(){return u`<div class="sonic-loader sonic-loader--${this.mode}"><div></div><div></div><div></div><div></div></div>`}};q.styles=[pi,ui,w`:host { --sc-loader-bg: var(--sc-primary, currentColor); pointer-events: none; } .sonic-loader { opacity: 0; animation: showLoader 0.5s 0.5s forwards; } .sonic-loader--inline { animation-delay: 0s; } @keyframes showLoader { 0% { opacity: 0; } 100% { opacity: 1; } }`],q.callCounter=0,As([a({type:String})],q.prototype,"mode",2),q=As([v(Ps)],q);try{customElements.define(Ps,q)}catch{}/**
|
|
46
46
|
* @license
|
|
47
47
|
* Copyright 2017 Google LLC
|
|
48
48
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
49
|
-
*/const Rt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},
|
|
49
|
+
*/const Rt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ne=o=>(...t)=>({_$litDirective$:o,values:t});class ae{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,s,e){this._$Ct=t,this._$AM=s,this._$Ci=e}_$AS(t,s){return this.update(t,s)}update(t,s){return this.render(...s)}}/**
|
|
50
50
|
* @license
|
|
51
51
|
* Copyright 2020 Google LLC
|
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
|
-
*/const{H:
|
|
53
|
+
*/const{H:bi}=ti,fi=o=>o.strings===void 0,Ss=()=>document.createComment(""),Se=(o,t,s)=>{var e;const r=o._$AA.parentNode,i=t===void 0?o._$AB:t._$AA;if(s===void 0){const n=r.insertBefore(Ss(),i),l=r.insertBefore(Ss(),i);s=new bi(n,l,o,o.options)}else{const n=s._$AB.nextSibling,l=s._$AM,c=l!==o;if(c){let h;(e=s._$AQ)===null||e===void 0||e.call(s,o),s._$AM=o,s._$AP!==void 0&&(h=o._$AU)!==l._$AU&&s._$AP(h)}if(n!==i||c){let h=s._$AA;for(;h!==n;){const y=h.nextSibling;r.insertBefore(h,i),h=y}}}return s},Ft=(o,t,s=o)=>(o._$AI(t,s),o),vi={},yi=(o,t=vi)=>o._$AH=t,wi=o=>o._$AH,Sr=o=>{var t;(t=o._$AP)===null||t===void 0||t.call(o,!1,!0);let s=o._$AA;const e=o._$AB.nextSibling;for(;s!==e;){const r=s.nextSibling;s.remove(),s=r}};/**
|
|
54
54
|
* @license
|
|
55
55
|
* Copyright 2017 Google LLC
|
|
56
56
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
57
|
-
*/const
|
|
57
|
+
*/const Cs=(o,t,s)=>{const e=new Map;for(let r=t;r<=s;r++)e.set(o[r],r);return e},Ut=ne(class extends ae{constructor(o){if(super(o),o.type!==Rt.CHILD)throw Error("repeat() can only be used in text expressions")}dt(o,t,s){let e;s===void 0?s=t:t!==void 0&&(e=t);const r=[],i=[];let n=0;for(const l of o)r[n]=e?e(l,n):n,i[n]=s(l,n),n++;return{values:i,keys:r}}render(o,t,s){return this.dt(o,t,s).values}update(o,[t,s,e]){var r;const i=wi(o),{values:n,keys:l}=this.dt(t,s,e);if(!Array.isArray(i))return this.ut=l,n;const c=(r=this.ut)!==null&&r!==void 0?r:this.ut=[],h=[];let y,g,m=0,x=i.length-1,_=0,A=n.length-1;for(;m<=x&&_<=A;)if(i[m]===null)m++;else if(i[x]===null)x--;else if(c[m]===l[_])h[_]=Ft(i[m],n[_]),m++,_++;else if(c[x]===l[A])h[A]=Ft(i[x],n[A]),x--,A--;else if(c[m]===l[A])h[A]=Ft(i[m],n[A]),Se(o,h[A+1],i[m]),m++,A--;else if(c[x]===l[_])h[_]=Ft(i[x],n[_]),Se(o,i[m],i[x]),x--,_++;else if(y===void 0&&(y=Cs(l,_,A),g=Cs(c,m,x)),y.has(c[m]))if(y.has(c[x])){const N=g.get(l[_]),D=N!==void 0?i[N]:null;if(D===null){const d=Se(o,i[m]);Ft(d,n[_]),h[_]=d}else h[_]=Ft(D,n[_]),Se(o,i[m],D),i[N]=null;_++}else Sr(i[x]),x--;else Sr(i[m]),m++;for(;_<=A;){const N=Se(o,h[A+1]);Ft(N,n[_]),h[_++]=N}for(;m<=x;){const N=i[m++];N!==null&&Sr(N)}return this.ut=l,yi(o,h),ht}});/**
|
|
58
58
|
* @license
|
|
59
59
|
* Copyright 2017 Google LLC
|
|
60
60
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
61
|
-
*/const
|
|
61
|
+
*/const Ce=(o,t)=>{var s,e;const r=o._$AN;if(r===void 0)return!1;for(const i of r)(e=(s=i)._$AO)===null||e===void 0||e.call(s,t,!1),Ce(i,t);return!0},Be=o=>{let t,s;do{if((t=o._$AM)===void 0)break;s=t._$AN,s.delete(o),o=t}while((s==null?void 0:s.size)===0)},Os=o=>{for(let t;t=o._$AM;o=t){let s=t._$AN;if(s===void 0)t._$AN=s=new Set;else if(s.has(o))break;s.add(o),ki(t)}};function xi(o){this._$AN!==void 0?(Be(this),this._$AM=o,Os(this)):this._$AM=o}function $i(o,t=!1,s=0){const e=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(e))for(let i=s;i<e.length;i++)Ce(e[i],!1),Be(e[i]);else e!=null&&(Ce(e,!1),Be(e));else Ce(this,o)}const ki=o=>{var t,s,e,r;o.type==Rt.CHILD&&((t=(e=o)._$AP)!==null&&t!==void 0||(e._$AP=$i),(s=(r=o)._$AQ)!==null&&s!==void 0||(r._$AQ=xi))};class _i extends ae{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,s,e){super._$AT(t,s,e),Os(this),this.isConnected=t._$AU}_$AO(t,s=!0){var e,r;t!==this.isConnected&&(this.isConnected=t,t?(e=this.reconnected)===null||e===void 0||e.call(this):(r=this.disconnected)===null||r===void 0||r.call(this)),s&&(Ce(this,t),Be(this))}setValue(t){if(fi(this._$Ct))this._$Ct._$AI(t,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=t,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}const Ai=new WeakMap;let Es=0;const Cr=new Map,js=new WeakSet,zs=()=>new Promise(o=>requestAnimationFrame(o)),Pi=[{opacity:0}],Si=[{opacity:0},{opacity:1}],Ds=(o,t)=>{const s=o-t;return s===0?void 0:s},Ls=(o,t)=>{const s=o/t;return s===1?void 0:s},Or={left:(o,t)=>{const s=Ds(o,t);return{value:s,transform:s&&`translateX(${s}px)`}},top:(o,t)=>{const s=Ds(o,t);return{value:s,transform:s&&`translateY(${s}px)`}},width:(o,t)=>{const s=Ls(o,t);return{value:s,transform:s&&`scaleX(${s})`}},height:(o,t)=>{const s=Ls(o,t);return{value:s,transform:s&&`scaleY(${s})`}}},Ci={duration:333,easing:"ease-in-out"},Oi=["left","top","width","height","opacity","color","background"],Ms=new WeakMap;class Ei extends _i{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===Rt.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;(t=this.resolveFinished)===null||t===void 0||t.call(this),this.finished=new Promise(s=>{this.h=s})}async resolveFinished(){var t;(t=this.h)===null||t===void 0||t.call(this),this.h=void 0}render(t){return S}getController(){return Ai.get(this.l)}isDisabled(){var t;return this.options.disabled||((t=this.getController())===null||t===void 0?void 0:t.disabled)}update(t,[s]){var e;const r=this.l===void 0;return r&&(this.l=(e=t.options)===null||e===void 0?void 0:e.host,this.l.addController(this),this.element=t.element,Ms.set(this.element,this)),this.optionsOrCallback=s,(r||typeof s!="function")&&this.u(s),this.render(s)}u(t){var s,e;t=t!=null?t:{};const r=this.getController();r!==void 0&&((t=X(X({},r.defaultOptions),t)).keyframeOptions=X(X({},r.defaultOptions.keyframeOptions),t.keyframeOptions)),(s=(e=t).properties)!==null&&s!==void 0||(e.properties=Oi),this.options=t}v(){const t={},s=this.element.getBoundingClientRect(),e=getComputedStyle(this.element);return this.options.properties.forEach(r=>{var i;const n=(i=s[r])!==null&&i!==void 0?i:Or[r]?void 0:e[r],l=Number(n);t[r]=isNaN(l)?n+"":l}),t}p(){let t,s=!0;return this.options.guard&&(t=this.options.guard(),s=((e,r)=>{if(Array.isArray(e)){if(Array.isArray(r)&&r.length===e.length&&e.every((i,n)=>i===r[n]))return!1}else if(r===e)return!1;return!0})(t,this.m)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&s&&this.element.isConnected,this.o&&(this.m=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){var t;typeof this.optionsOrCallback=="function"&&this.u(this.optionsOrCallback()),this.p()&&(this.g=this.v(),this.t=(t=this.t)!==null&&t!==void 0?t:this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await zs;const s=this.A(),e=this._(this.options.keyframeOptions,s),r=this.v();if(this.g!==void 0){const{from:i,to:n}=this.j(this.g,r,s);this.log("measured",[this.g,r,i,n]),t=this.calculateKeyframes(i,n)}else{const i=Cr.get(this.options.inId);if(i){Cr.delete(this.options.inId);const{from:n,to:l}=this.j(i,r,s);t=this.calculateKeyframes(n,l),t=this.options.in?[X(X({},this.options.in[0]),t[0]),...this.options.in.slice(1),t[1]]:t,Es++,t.forEach(c=>c.zIndex=Es)}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,e)}resetStyles(){var t;this.S!==void 0&&(this.element.setAttribute("style",(t=this.S)!==null&&t!==void 0?t:""),this.S=void 0)}commitStyles(){var t,s;this.S=this.element.getAttribute("style"),(t=this.webAnimation)===null||t===void 0||t.commitStyles(),(s=this.webAnimation)===null||s===void 0||s.cancel()}reconnected(){}async disconnected(){var t;if(!this.o||(this.options.id!==void 0&&Cr.set(this.options.id,this.g),this.options.out===void 0))return;if(this.prepare(),await zs(),(t=this.t)===null||t===void 0?void 0:t.isConnected){const e=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,e),this.options.stabilizeOut){const r=this.v();this.log("stabilizing out");const i=this.g.left-r.left,n=this.g.top-r.top;getComputedStyle(this.element).position!=="static"||i===0&&n===0||(this.element.style.position="relative"),i!==0&&(this.element.style.left=i+"px"),n!==0&&(this.element.style.top=n+"px")}}const s=this._(this.options.keyframeOptions);await this.animate(this.options.out,s),this.element.remove()}prepare(){this.createFinished()}start(){var t,s;(s=(t=this.options).onStart)===null||s===void 0||s.call(t,this)}didFinish(t){var s,e;t&&((e=(s=this.options).onComplete)===null||e===void 0||e.call(s,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}A(){const t=[];for(let s=this.element.parentNode;s;s=s==null?void 0:s.parentNode){const e=Ms.get(s);e&&!e.isDisabled()&&e&&t.push(e)}return t}get isHostRendered(){const t=js.has(this.l);return t||this.l.updateComplete.then(()=>{js.add(this.l)}),t}_(t,s=this.A()){const e=X({},Ci);return s.forEach(r=>Object.assign(e,r.options.keyframeOptions)),Object.assign(e,t),e}j(t,s,e){t=X({},t),s=X({},s);const r=e.map(l=>l.animatingProperties).filter(l=>l!==void 0);let i=1,n=1;return r!==void 0&&(r.forEach(l=>{l.width&&(i/=l.width),l.height&&(n/=l.height)}),t.left!==void 0&&s.left!==void 0&&(t.left=i*t.left,s.left=i*s.left),t.top!==void 0&&s.top!==void 0&&(t.top=n*t.top,s.top=n*s.top)),{from:t,to:s}}calculateKeyframes(t,s,e=!1){var r;const i={},n={};let l=!1;const c={};for(const h in s){const y=t[h],g=s[h];if(h in Or){const m=Or[h];if(y===void 0||g===void 0)continue;const x=m(y,g);x.transform!==void 0&&(c[h]=x.value,l=!0,i.transform=`${(r=i.transform)!==null&&r!==void 0?r:""} ${x.transform}`)}else y!==g&&y!==void 0&&g!==void 0&&(l=!0,i[h]=y,n[h]=g)}return i.transformOrigin=n.transformOrigin=e?"center center":"top left",this.animatingProperties=c,l?[i,n]:void 0}async animate(t,s=this.options.keyframeOptions){this.start(),this.frames=t;let e=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),t!==void 0)){this.log("animate",[t,s]),e=!0,this.webAnimation=this.element.animate(t,s);const r=this.getController();r==null||r.add(this);try{await this.webAnimation.finished}catch{}r==null||r.remove(this)}return this.didFinish(e),e}isAnimating(){var t,s;return((t=this.webAnimation)===null||t===void 0?void 0:t.playState)==="running"||((s=this.webAnimation)===null||s===void 0?void 0:s.pending)}log(t,s){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,s)}}const Ve=ne(Ei);/**
|
|
62
62
|
* @license
|
|
63
63
|
* Copyright 2017 Google LLC
|
|
64
64
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
65
|
-
*/class
|
|
65
|
+
*/class Er extends ae{constructor(t){if(super(t),this.it=S,t.type!==Rt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===S||t==null)return this.ft=void 0,this.it=t;if(t===ht)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;const s=[t];return s.raw=s,this.ft={_$litType$:this.constructor.resultType,strings:s,values:[]}}}Er.directiveName="unsafeHTML",Er.resultType=1;const Bt=ne(Er);var Ts={core:{cancel:`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
66
66
|
<path d="M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
67
67
|
</svg>
|
|
68
68
|
`,"check-circled-outline":`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -95,21 +95,21 @@ var Wl=Object.defineProperty,Kl=Object.defineProperties;var Yl=Object.getOwnProp
|
|
|
95
95
|
<path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
96
96
|
<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
97
97
|
</svg>
|
|
98
|
-
`}};const
|
|
98
|
+
`}};const qe=new Map,Oe={heroicons:{url:"https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",defaultPrefix:"outline"},iconoir:{url:"https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg"},feathers:{url:"https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg"},material:{url:"https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",defaultPrefix:"regular"},fontAwesome:{url:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",defaultPrefix:"regular"}};let Ns=!1;function ji(){var o,t;Ns||(Ns=!0,Oe.custom={},Oe.custom.url=(o=document.querySelector("[customIconLibraryPath]"))==null?void 0:o.getAttribute("customIconLibraryPath"),Oe.custom.defaultPrefix=(t=document.querySelector("[customIconDefaultPrefix]"))==null?void 0:t.getAttribute("customIconDefaultPrefix"))}const Is=class{static registerIcons(o){const t=Ts;for(let s in o){const e=o[s],r=t[s]||{};for(let i in e)r[i]=e[i];t[s]=r}}};let jr=Is;jr.fontAwesomeNext={get:async o=>{let t=o.library,s=o.name||"";const e=Ts;if(t=="custom"&&ji(),t&&Oe[t]){let r=Oe[t],i=o.prefix||r.defaultPrefix,n=e[t]||{},l=i+"-"+s;if(n[l])return Bt(n[l]);let c=r.url.replace("$prefix",i).replace("$name",s);if(n[l])return Bt(n[l]);if(!qe.has(c)){let y=new Promise(async g=>{let m=await fetch(c);if(!m.ok){g(`<b title="Erreur ${m.status}">\u{1F636}</b>`);return}try{let x=await m.text();g(x)}catch{g(null)}});qe.set(c,y)}let h=await qe.get(c);return qe.delete(c),n[l]=h,Bt(h)}return Bt(e.core[o.name]||"")}},jr.default=Is.fontAwesomeNext;var zi=Object.defineProperty,Di=Object.getOwnPropertyDescriptor,He=(o,t,s,e)=>{for(var r=e>1?void 0:e?Di(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&zi(t,s,r),r};const Rs="sonic-icon";let Vt=class extends f{constructor(){super(...arguments),this.iconText="",this._name="",this._prefix="",this._library=""}async updateIcon(){!this.name||(this.iconText=await jr.default.get({name:this.name,prefix:this.prefix,library:this.library}),this.requestUpdate())}get name(){return this._name}set name(o){this._name=o,this.updateIcon()}get prefix(){return this._prefix}set prefix(o){this._prefix=o,this.updateIcon()}get library(){return this._library}set library(o){this._library=o,this.updateIcon()}render(){return this.name?(this.style.removeProperty("display"),this.iconText):(this.style.display="none",S)}};Vt.styles=w`:host { line-height: 0; width: fit-content; height: fit-content; vertical-align: -0.125em; } svg { height: var(--sc-icon-size, 1em); width: var(--sc-icon-size, 1em); } svg:not([fill="none"]){ fill: currentColor; } svg[fill="none"]{ stroke-width: 2; } :host([size="2xs"]) svg { --sc-icon-size: 0.625em; } :host([size="xs"]) svg { --sc-icon-size: 0.75em; } :host([size="sm"]) svg { --sc-icon-size: 0.875em; } :host([size="lg"]) svg { --sc-icon-size: 1.25em; } :host([size="xl"]) svg { --sc-icon-size: 1.5em; } :host([size="2xl"]) svg { --sc-icon-size: 2em; } :host([size="3xl"]) svg { --sc-icon-size: 2.8em;`,He([a({type:String})],Vt.prototype,"name",1),He([a({type:String})],Vt.prototype,"prefix",1),He([a({type:String})],Vt.prototype,"library",1),Vt=He([v(Rs)],Vt);try{customElements.define(Rs,Vt)}catch{}/**
|
|
99
99
|
* @license
|
|
100
100
|
* Copyright 2018 Google LLC
|
|
101
101
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
102
|
-
*/const dt=ie(class extends oe{constructor(i){var t;if(super(i),i.type!==Rt.ATTRIBUTE||i.name!=="style"||((t=i.strings)===null||t===void 0?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce((t,r)=>{const e=i[r];return e==null?t:t+`${r=r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${e};`},"")}update(i,[t]){const{style:r}=i.element;if(this.ct===void 0){this.ct=new Set;for(const e in t)this.ct.add(e);return this.render(t)}this.ct.forEach(e=>{t[e]==null&&(this.ct.delete(e),e.includes("-")?r.removeProperty(e):r[e]="")});for(const e in t){const s=t[e];s!=null&&(this.ct.add(e),e.includes("-")?r.setProperty(e,s):r[e]=s)}return ht}}),qe=w`.custom-scroll { overflow:auto !important; } .custom-scroll::-webkit-scrollbar { width: 0.5rem; height: 0.5rem; border: solid .15rem transparent; border-radius: var(--sc-rounded); background:transparent; } .custom-scroll::-webkit-scrollbar-thumb { box-shadow: inset 0 0 2rem 2rem var(--sc-scrollbar-bg); border-radius: var(--sc-rounded); border: solid .15rem transparent; }`;var Eo=Object.defineProperty,jo=Object.getOwnPropertyDescriptor,ft=(i,t,r,e)=>{for(var s=e>1?void 0:e?jo(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Eo(t,r,s),s};const Do={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},Lo="sonic-toast-item";let lt=class extends v{constructor(){super(...arguments),this.title="",this.id="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.visible=!0}render(){if(this.dismissForever){const i=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(i)[this.id])return P}return this.visible?u`<div class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"><button aria-label="Close" class="sonic-toast-close" @click="${()=>this.hide()}"><sonic-icon name="cancel" size="lg"></sonic-icon></button><div class="sonic-toast-content custom-scroll" style="max-height:${this.maxHeight}">${this.status&&u`<sonic-icon name="${Do[this.status]}" class="sonic-toast-icon" size="2xl"></sonic-icon>`}<div class="sonic-toast-text">${this.title?u`<div class="sonic-toast-title">${this.title}</div>`:""} ${this.text?It(this.text):""}<slot></slot></div>${this.preserve?"":this.autoHide()}</div></div>`:P}hide(){if(this.closest("sonic-toast")||(this.visible=!1),this.dismissForever){const i=localStorage.getItem("sonic-toast-dismissed")||"{}",t=JSON.parse(i);t[this.id]=!0,localStorage.setItem("sonic-toast-dismissed",JSON.stringify(t))}this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout(()=>{this.hide()},4200)}};lt.styles=[qe,w`* { box-sizing: border-box; } :host { display: block; pointer-events: auto; position: relative; --sc-toast-status-color: transparent; --sc-toast-color: var(--sc-base-content); --sc-toast-bg: var(--sc-base); --sc-toast-rounded: var(--sc-rounded-md); --sc-toast-shadow: var(--sc-shadow-lg); } .fixed-area { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 999; display: flex; flex-direction: column-reverse; } .sonic-toast { position: relative; pointer-events: auto; overflow:hidden; line-height: 1.25; color: var(--sc-toast-color); box-shadow: var(--sc-toast-shadow); border-radius: var(--sc-toast-rounded); background: var(--sc-toast-bg); } .sonic-toast-content { padding: 1em 2rem 1em 1em; display: flex; gap: 0.5rem; overflow: auto; position:relative; } .sonic-toast-text { align-self: center; margin-top: auto; margin-bottom: auto; max-width:70ch; } ::slotted(a), .sonic-toast-text a { color: inherit; text-decoration: underline; text-underline-offset: 0.15rem; } /*BUTTON CLOSE*/ .sonic-toast-close { all: unset; position: absolute; z-index:4; pointer-events: initial; right: 0.5em; top: 0.5em; width: 1.5rem; height: 1.5rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; text-align: center; opacity: 0.5; background: rgba(0, 0, 0, 0); } .sonic-toast-close:focus, .sonic-toast-close:hover { opacity: 1; background: rgba(0, 0, 0, 0.075); } .sonic-toast-close svg { width: 1rem; height: 1rem; object-fit: contain; object-position: center center; } /*Title*/ .sonic-toast-title { font-weight: bold; font-size: 1.15rem; margin: 0.15em 0 0.25em; } /*STATUS*/ .success { --sc-toast-status-color: var(--sc-success); --sc-toast-title-color: var(--sc-toast-status-color); } .error { --sc-toast-status-color: var(--sc-danger); --sc-toast-title-color: var(--sc-toast-status-color); } .warning { --sc-toast-status-color: var(--sc-warning); --sc-toast-title-color: var(--sc-toast-status-color); } .info { --sc-toast-status-color: var(--sc-info); --sc-toast-title-color: var(--sc-toast-status-color); } .success, .error, .info, .warning { border-top: 3px solid var(--sc-toast-status-color, currentColor); } .sonic-toast:before { content: ""; display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; opacity: 0.05; pointer-events: none; transition: 0.2s; border-radius: var(--sc-toast-rounded); background-color: var(--sc-toast-status-color); } .sonic-toast:hover:before { opacity: 0.025; } .info .sonic-toast-icon, .error .sonic-toast-icon, .success .sonic-toast-icon, .warning .sonic-toast-icon { color: var(--sc-toast-status-color, currentColor); } .sonic-toast-icon { position:sticky; top:0; } .ghost { opacity: 0.85; pointer-events: none; }`],ft([a({type:String})],lt.prototype,"title",2),ft([a({type:String})],lt.prototype,"id",2),ft([a({type:String})],lt.prototype,"text",2),ft([a({type:String})],lt.prototype,"status",2),ft([a({type:Boolean})],lt.prototype,"ghost",2),ft([a({type:Boolean})],lt.prototype,"preserve",2),ft([a({type:Boolean})],lt.prototype,"dismissForever",2),ft([a({type:String})],lt.prototype,"maxHeight",2),ft([Z()],lt.prototype,"visible",2),lt=ft([y(Lo)],lt);var zo=Object.defineProperty,To=Object.getOwnPropertyDescriptor,Tr=(i,t,r,e)=>{for(var s=e>1?void 0:e?To(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&zo(t,r,s),s};const Mo="sonic-toast";let pt=class extends v{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const i=window.parent!=window;let t={pointerEvents:"none",gap:"1rem",display:"flex",margin:"1rem"};return i||(t=Me(J({},t),{margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"999",maxWidth:"64ch",flexDirection:"column-reverse"})),this.toasts?u`<div aria-live="polite" style="${dt(t)}">${Ft(this.toasts,r=>r.id,r=>u`<sonic-toast-item maxHeight="${i?"none":"10rem"}" status="${r.status}" ?ghost="${r.ghost}" ?dismissForever="${r.dismissForever}" ?preserve="${r.preserve}" id="${r.id}" @hide="${()=>this.removeItem(r)}" ${Ue({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}>${r.text?It(r.text):""}</sonic-toast-item>`)}</div>`:P}static removeAll(){let i=document.querySelector("sonic-toast");!i||(i.toasts=i.toasts.filter(t=>t.ghost))}static add(i){var o;if(!document.querySelector("sonic-toast")){let n=document.createElement("sonic-toast");(document.querySelector("sonic-theme")||document.body).prepend(n)}let t=document.querySelector("sonic-toast");const r=(o=i.id)!=null?o:new Date().valueOf(),e=new RegExp("</a>|</button>").test(i.text),s={id:r,text:i.text,title:i.title,status:i.status,preserve:e?!0:i.preserve,ghost:i.ghost,dismissForever:i.dismissForever};if(i.dismissForever&&i.id){const n=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(n)[i.id])return null}if(t.toasts.length>0){let n=J({},s),l=J({},t.toasts[t.toasts.length-1]);if(n.id=l.id=0,!s.preserve&&et.shallowEqual(n,l))return null}return t.toasts=[...t.toasts,s],s}removeItem(i){this.toasts=this.toasts.filter(t=>t!=i)}};if(Tr([a({type:Array})],pt.prototype,"toasts",2),pt=Tr([y(Mo)],pt),typeof window<"u"){let i=window;i.SonicToast=pt}const st=class{static listen(){var t;if(!st.listening)return;let i=(t=document.location)==null?void 0:t.href.replace(document.location.origin,"");st.prevURL&&st.prevURL!=i&&(st.prevURL=i,st.listeners.forEach(r=>{r.location=i})),window.requestAnimationFrame(st.listen)}static offChange(i){let t=st.listeners.indexOf(i);t!=-1&&(st.listeners.splice(t,1),st.listeners.length==0&&(st.listening=!1))}static onChange(i){st.listening||(st.listening=!0,st.listen()),st.listeners.push(i)}static changeFromComponent(i){if(i.goBack!==null){const n=document.location.origin;let l=i.goBack||n;if((document.referrer.indexOf("http")!=0||new URL(document.referrer).origin!=n)&&l!=document.location.href){let c=history.state||{};c.concorde=c.concorde||{},c.concorde.hasDoneHistoryBack=!0,history.pushState(c,document.title),history.back(),document.location.replace(l)}else history.back();return}let t=i.getAttribute("to");if(t||(t=i.href),!t)return;if(t.indexOf("#")==0){document.location.hash=t.substring(1);return}let r=new URL(t,document.location.href),e=r.pathname.split("/"),s=[],o="";for(let n of e)n!=o&&s.push(n),o=n;t="/"+s.join("/")+r.search+(r.hash?+r.hash:""),i.hasAttribute("pushState")?history.pushState(null,"",t):i.hasAttribute("replaceState")?history.replaceState(null,"",t):document.location.href=t}static updateComponentActiveState(i){if(i.autoActive!="disabled"&&i.href&&i.href.indexOf("http")!=0){let t=new URL(i.href,document.location.href),r=new URL(i.location,document.location.origin),e=!1;i.autoActive=="strict"?e=t.pathname==r.pathname&&t.hash==r.hash&&t.search==r.search:e=r.href.indexOf(t.href)==0,e?i.setAttribute("active","true"):i.removeAttribute("active")}}};let G=st;G.listeners=[],G.listening=!1,G.prevURL=(Fi=document.location)==null?void 0:Fi.href.replace(document.location.origin,"");var Ro=Object.defineProperty,No=Object.getOwnPropertyDescriptor,Bt=(i,t,r,e)=>{for(var s=e>1?void 0:e?No(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Ro(t,r,s),s};const He=new Map,ne=i=>{class t extends i{constructor(...e){super(),this.touched=!1,this.error=null,this.autofocus=!1,this.disabled=null,this.required=null,this.onValueAssign=null,this.onFormValueAssign=null,this.onFormDataInValidate=null,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=s=>{this.setValueFromPublisher(s)},this.onFormValueAssign=s=>{this.setFormValueFromPublisher(s)},this.onFormDataInValidate=()=>{!this.getFormPublisher().isFormValid.get()||this.validateFormElement()}}get name(){return this._name}set name(e){this._name=e}validateFormElement(){}updateDataValue(){if(this._name){let e=this.getFormPublisher();e&&(e[this._name]=this.getValueForFormPublisher(),this.setFormValueFromPublisher(e[this.name].get()))}}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?K.get(this.formDataProvider):this.publisher}getValueForFormPublisher(){return this.value}setValueFromPublisher(e){this.value=e}setFormValueFromPublisher(e){this.value=e}get value(){return this._value}set value(e){et.isObject(e)&&e.hasOwnProperty("__value")&&e.value==null||e!=null&&this._value!=e&&(this._value=e,this.updateDataValue(),this.requestUpdate())}initPublisher(){this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);let e=this.getFormPublisher();this._name&&e&&e[this._name].offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.updateDataValue(),this.publisher&&this._name&&this.publisher[this._name].onAssign(this.onValueAssign),e=this.getFormPublisher(),this._name&&e&&(e[this._name].onAssign(this.onFormValueAssign),e.onInvalidate(this.onFormDataInValidate))}handleChange(e){this.value=e.target.value;const s=new Event("change");this.dispatchEvent(s)}addKeyboardNavigation(){let e=this.getAncestorAttributeValue("data-keyboard-nav");if(!e)return;let s=e.split(" "),o=s[0];if(!o)return;for(let l of s){He.has(l)||He.set(l,[]);let c=He.get(l);c.indexOf(this)==-1&&c.push(this)}let n=He.get(o);this.addEventListener("keydown",l=>{if(!["ArrowDown","ArrowUp"].includes(l.key))return;let c="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",h=n.filter(g=>{let $=g.shadowRoot.querySelector(c);if(!$)return!1;let _=window.getComputedStyle($);return _.display!=="none"&&_.display!==""&&_.pointerEvents!="none"&&_.visibility!=="hidden"&&$.getBoundingClientRect().width>0}),b=null;if(l.key=="ArrowDown"){let g=h.indexOf(this);g==h.length-1?b=h[0]:b=h[g+1]}else if(l.key=="ArrowUp"){let g=h.indexOf(this);g==0?b=h[h.length-1]:b=h[g-1]}let f=b.shadowRoot.querySelector(c);f&&(f.focus(),l.preventDefault())})}connectedCallback(){super.connectedCallback(),this.addKeyboardNavigation()}disconnectedCallback(){super.disconnectedCallback(),this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);let e=this.getFormPublisher();this._name&&e&&(e[this._name].offAssign(this.onFormValueAssign),e.offInvalidate(this.onFormDataInValidate))}}return Bt([a({type:Boolean,reflect:!0})],t.prototype,"touched",2),Bt([a({type:Boolean})],t.prototype,"error",2),Bt([a({type:Boolean})],t.prototype,"autofocus",2),Bt([a({type:Boolean})],t.prototype,"disabled",2),Bt([a({type:Boolean})],t.prototype,"required",2),Bt([a()],t.prototype,"name",1),Bt([a()],t.prototype,"value",1),t};var Fo=Object.defineProperty,Io=Object.getOwnPropertyDescriptor,Ae=(i,t,r,e)=>{for(var s=e>1?void 0:e?Io(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Fo(t,r,s),s};const Es=i=>{class t extends i{constructor(){super(...arguments),this._value="",this._name="",this.unique=null,this.radio=null,this._checked=null}get value(){return this._value}set value(e){this.hasAttribute("value")&&(e=this.getAttribute("value")),this._value!=e&&(this._value=e,this.updateDataValue(),this.requestUpdate())}get name(){return this._name}set name(e){this.hasAttribute("name")&&(e=this.getAttribute("name")),this._name=e}get checked(){return this._checked}set checked(e){this.setCheckedValue(e)}validateFormElement(){var o;const e=(o=this.shadowRoot)==null?void 0:o.querySelector("input");if(!e||e.checkValidity())return;let s=this.getFormPublisher()[this.name].get();(this.unique||this.radio)&&s!==null&&s.toString().length>0||(this.getFormPublisher().isFormValid=!1,e.reportValidity())}setCheckedValue(e){this._checked!=e&&(this._checked=e,this.updateDataValue(),this.requestUpdate(),this.publisher&&!this.radio&&!this.unique&&(this.publisher.checked=this._checked))}handleChange(){this.checked=this.checked?this.radio?!0:null:!0;const e=new Event("change");this.dispatchEvent(e)}getValueForFormPublisher(){let e=this.getFormPublisher();if(this.unique||this.radio)return this.checked&&this.value!=null?this.value:null;let s=e[this.name].get();Array.isArray(s)||(s=[]),s=s.slice(0);let o=s.indexOf(this.value);return this.checked===!0&&o===-1&&s.push(this.value),this.checked===null&&o!==-1&&s.splice(o,1),s}setFormValueFromPublisher(e){if(this.unique||this.radio){this.checked=this.value==e?!0:null;return}Array.isArray(e)||(e=[]),this.checked=e.indexOf(this.value)!==-1?!0:null}initPublisher(){super.initPublisher(),!!this.hasAttribute("checked")&&(!this.publisher||this.publisher.get().checked!==!1)&&(this.checked=!0)}}return Ae([a()],t.prototype,"value",1),Ae([a()],t.prototype,"name",1),Ae([a({type:Boolean})],t.prototype,"unique",2),Ae([a({type:Boolean})],t.prototype,"radio",2),Ae([a()],t.prototype,"checked",1),t};/**
|
|
102
|
+
*/const k=o=>o!=null?o:S;/**
|
|
103
103
|
* @license
|
|
104
104
|
* Copyright 2018 Google LLC
|
|
105
105
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
106
|
-
*/const S=i=>i!=null?i:P;var Uo=Object.defineProperty,Bo=Object.getOwnPropertyDescriptor,T=(i,t,r,e)=>{for(var s=e>1?void 0:e?Bo(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Uo(t,r,s),s};const Mr="sonic-button";let E=class extends Es(ne(I(v))){constructor(){super(...arguments),this.type="default",this.variant="default",this.size="md",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.align="center",this.minWidth="0",this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=null,this.active=!1,this._location=""}set href(i){this._href=i,this.href&&this.href.indexOf("http")!=0?(G.onChange(this),this.location=document.location.href.replace(document.location.origin,"")):G.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(i){i.preventDefault(),G.changeFromComponent(this)}handleChange(i){super.handleChange(i),(this.pushState||this.goBack!==null)&&(i.preventDefault(),i.stopPropagation(),G.changeFromComponent(this))}connectedCallback(){super.connectedCallback()}setCheckedValue(i){if(this.name){if(i==this._checked)return;super.setCheckedValue(i),this._checked?this.setAttribute("active","true"):this.removeAttribute("active")}}disconnectedCallback(){G.offChange(this),super.disconnectedCallback()}get location(){return this._location}set location(i){this._location=i,G.updateComponentActiveState(this)}render(){const i={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,textAlign:this.align,minWidth:this.minWidth},t=u`<button part="button" class="${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}" style="${dt(i)}" @click="${this.handleChange}"><slot @slotchange="${this.onSlotChange}" part="prefix" name="prefix"></slot><slot part="main" class="main-slot"></slot><slot @slotchange="${this.onSlotChange}" part="suffix" name="suffix"></slot>${this.loading==!0?u`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}</button>`;return this.href?u`<a href="${this.href}" target="${S(this.target)}" @click="${this.pushState||this.goBack!==null?this.handleNavigation:null}">${t}</a>`:u`${t}`}onSlotChange(){var i,t;this.hasPrefix=!!((i=this.prefixes)!=null&&i.length),this.hasSuffix=!!((t=this.suffixes)!=null&&t.length)}};E.styles=[w`* { box-sizing: border-box; } :host { --sc-btn-gap: 0.35em; --sc-btn-py: 0.25em; --sc-btn-px: 1.1em; --sc-btn-fs: 1rem; --sc-btn-fw: var(--sc-btn-font-weight); --sc-btn-ff: var(--sc-btn-font-family); --sc-btn-height: var(--sc-form-height, 2.5em); --sc-btn-color: var(--sc-base-content, #1f2937); --sc-btn-bg: var(--sc-base-100, #e5e7eb); --sc-btn-border-style: solid; --sc-btn-border-with: var(--sc-form-border-width, 0.1rem); --sc-btn-border-color: transparent; --sc-btn-outline-bg-hover: var(--sc-base-100); --sc-btn-ghost-bg-hover: var(--sc-base-100); --sc-btn-active-color: var(--sc-base); --sc-btn-hover-filter: brightness(0.97); --sc-btn-active-filter: brightness(0.96); --sc-btn-active-bg: var(--sc-base-content); --sc-item-rounded-tr: var(--sc-btn-rounded); --sc-item-rounded-tl: var(--sc-btn-rounded); --sc-item-rounded-bl: var(--sc-btn-rounded); --sc-item-rounded-br: var(--sc-btn-rounded); display: inline-flex; vertical-align: middle; box-sizing: border-box; } :host a { display: contents; color:unset; } :host button { display: flex; flex: 1; box-sizing: border-box; align-items: center; justify-content: center; font-family: var(--sc-btn-ff); font-weight: var(--sc-btn-fw); font-size: var(--sc-btn-fs); cursor: pointer; text-align: center; line-height: 1.1; border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl); background: var(--sc-btn-bg); color: var(--sc-btn-color); padding-top: var(--sc-btn-py); padding-bottom: var(--sc-btn-py); padding-left: var(--sc-btn-px); padding-right: var(--sc-btn-px); border: var(--sc-btn-border-with) var(--sc-btn-border-style) var(--sc-btn-border-color); min-height: var(--sc-btn-height); } :host button.has-prefix-or-suffix { gap: var(--sc-btn-gap); } :host button:focus, :host button:hover { filter: var(--sc-btn-hover-filter); } :host button:active { filter: var(--sc-btn-active-filter); } /*TYPES*/ :host([type="default"]) button { --sc-btn-color: var(--sc-base-content); --sc-btn-bg: var(--sc-base-100); } :host([type="primary"]) button { --sc-btn-color: var(--sc-primary-content); --sc-btn-bg: var(--sc-primary); } :host([type="warning"]) button { --sc-btn-color: var(--sc-warning-content); --sc-btn-bg: var(--sc-warning); } :host([type="danger"]) button { --sc-btn-color: var(--sc-danger-content); --sc-btn-bg: var(--sc-danger); } :host([type="info"]) button { --sc-btn-color: var(--sc-info-content); --sc-btn-bg: var(--sc-info); } :host([type="success"]) button { --sc-btn-color: var(--sc-success-content); --sc-btn-bg: var(--sc-success); } :host([type="neutral"]) button { --sc-btn-color: var(--sc-base); --sc-btn-bg: var(--sc-base-600); } /*SIZE*/ :host([size="2xs"]) { --sc-btn-fs: 0.6rem; } :host([size="xs"]) { --sc-btn-fs: 0.75rem; } :host([size="sm"]) { --sc-btn-fs: 0.85rem; } :host([size="lg"]) { --sc-btn-fs: 1.2rem; } :host([size="xl"]) { --sc-btn-fs: 1.5rem; } /*UNSTYLED*/ :host([variant="unstyled"]) button { all: unset; transition: 0.1s; display: inline-flex; cursor: pointer; --sc-btn-height: auto; --sc-btn-width: auto; } /*GESTION DU FOCUS*/ :host(:not([disabled])) button:focus { box-shadow: 0 0 0 0.18rem var(--sc-base-300); border-color: var(--sc-base-300) !important; outline: none; } /*GHOST*/ :host([variant="ghost"][type]) button { color: var(--sc-btn-bg); background: transparent; } :host([variant="ghost"][type="default"]) button { color: var(--sc-btn-color); background: transparent; } /*:host([variant="ghost"]) button:focus,*/ :host([variant="ghost"]) button:hover { background: var(--sc-btn-ghost-bg-hover); filter: none; } :host([active][variant="ghost"]) button { background: var(--sc-btn-ghost-bg-hover); filter: none; } :host([active][variant="ghost"]) button:hover { filter: var(--sc-btn-hover-filter); } /*OUTLINE*/ :host([variant="outline"][type]) button { border-color: var(--sc-btn-bg); color: var(--sc-btn-bg); background: transparent; } :host([variant="outline"][type="default"]) button { border-color: var(--sc-base-400); color: var(--sc-base-500); background: transparent; } /*:host([variant="outline"]) button:focus,*/ :host([variant="outline"]) button:hover { background: var(--sc-btn-outline-bg-hover); } /*OUTLINE*/ :host([variant="link"]) { vertical-align: baseline; margin-left:.25em; margin-right:.25em; } :host([variant="link"]) button { text-decoration: underline; padding: 0; background: none; border: none; font-size: inherit; min-height: 0; color: inherit; } :host([variant="link"][type]) button { color: var(--sc-btn-bg); } :host([variant="link"][type="default"]) button { color: inherit; } :host([variant="link"]) button:focus, :host([variant="link"]) button:hover { text-decoration: none; } /*SHAPE*/ :host([shape="circle"]) button { border-radius: 50%; } :host([shape="circle"]) button, :host([shape="square"]) button { width: var(--sc-btn-height); height: var(--sc-btn-height); overflow: hidden; padding: 0; align-items: center; justify-content: 0; text-align:center !important; } :host([shape="block"]), :host([shape="block"]) button { width: 100%; } :host([disabled]) { opacity: 0.3; pointer-events: none; user-select: none; } /*ACTIVE*/ :host([active]:not([variant="ghost"])) button { background: var(--sc-btn-active-bg); color: var(--sc-btn-active-color); border-color: var(--sc-btn-active-bg); } :host([textAlign="left"]) button { text-align: left; } :host([textAlign="right"]) button { text-align: right; } .main-slot { flex-grow: 1; display: block; /*align-items: center; justify-content: center;*/ } :host([minWidth]) .main-slot { flex-grow:0; } slot[name="suffix"], slot[name="prefix"] { flex-shrink: 0; } /*ALIGNEMENT DES ICONES permet de tous les avoir alignés dans un menu */ ::slotted(sonic-icon) { min-width: 1.3em; text-align: center; } /*Tooltip ne joue pas sur le layout*/ sonic-tooltip { display: contents; } /*OUTLINE*/ :host(:not([active])) ::slotted([swap="on"]) { display: none; } :host([active]) ::slotted([swap="off"]) { display: none; } /*Loading*/ :host([loading]) { pointer-events: none; position: relative; } :host([loading]) slot { opacity: 0 !important; pointer-events: none; } /*Loading*/ :host([loading]) .loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; line-height: 0; height: var(--sc-btn-ff); width: var(--sc-btn-ff); animation: rotation 2s infinite linear; } @keyframes rotation { from { transform-origin: 50% 50%; transform: translate(-50%, -50%) rotate(0deg); } to { transform-origin: 50% 50%; transform: translate(-50%, -50%) rotate(359deg); } }`],T([a({type:String,reflect:!0})],E.prototype,"type",2),T([a({type:String,reflect:!0})],E.prototype,"variant",2),T([a({type:String,reflect:!0})],E.prototype,"size",2),T([a({type:String,reflect:!0})],E.prototype,"shape",2),T([a({type:String})],E.prototype,"direction",2),T([a({type:String,reflect:!0})],E.prototype,"alignItems",2),T([a({type:String})],E.prototype,"justify",2),T([a({type:String,reflect:!0})],E.prototype,"align",2),T([a({type:String})],E.prototype,"minWidth",2),T([a({type:String})],E.prototype,"autoActive",2),T([a({type:Boolean,reflect:!0})],E.prototype,"loading",2),T([Z()],E.prototype,"hasPrefix",2),T([Z()],E.prototype,"hasSuffix",2),T([Tt({flatten:!0,slot:"prefix"})],E.prototype,"prefixes",2),T([Tt({flatten:!0,slot:"suffix"})],E.prototype,"suffixes",2),T([a({type:String})],E.prototype,"target",2),T([a({type:String})],E.prototype,"href",1),T([a({type:String})],E.prototype,"goBack",2),T([a({type:Boolean})],E.prototype,"pushState",2),T([a({type:Boolean,reflect:!0})],E.prototype,"active",2),E=T([y(Mr)],E);try{customElements.define(Mr,E)}catch{}class St{static areEqual(t,r){return t.length===r.length?t.every((e,s)=>e===r[s]):!1}static from2d(t){return{to1D:()=>{let r=[];return t.forEach(e=>r=r.concat(e)),this.from(r)}}}static from(t){return{get:()=>t||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:r=>{if(t.length<1)return!0;let e=(t[0]||{})[r];return t.every(s=>(s||{})[r]==e)}})})}),value:()=>({forKey:r=>St.from(t.map(e=>e[r]))}),copy:()=>({fromKey:r=>({toKey:e=>{t.forEach(s=>{s[e]=Array.isArray(s[r])?[...s[r]]:typeof s[r]=="object"&&s[r]!=null?J({},s[r]):s[r]})}})})}),map:r=>St.from(t.map(r)),filter:r=>St.from(t.filter(r)),find:r=>t.find(r),some:r=>t.some(r),every:r=>t.every(r),group:()=>({byKey:r=>{let e=[],s=new Map;for(let o of t){let n=o[r];if(!s.has(n)){let l=e.length;s.set(n,l);let c={items:[]};c[r]=n,e.push(c)}e[s.get(n)].items.push(o)}return St.from(e)}}),without:()=>({duplicates:()=>({forKey:r=>{let e=[...new Set(t.map(s=>s[r]))];return St.from(e.map(s=>t.find(o=>o[r]==s)))}}),itemsIn:r=>({havingSameValue:()=>({forKey:e=>{let s=(o,n)=>l=>o[n]!=l[n];return St.from(t.filter(o=>r.every(s(o,e))))}})})})}}}const Vo=St,qo=At,Ho=Ne,Wo=ee,Ko=G,Yo=et,Zo=Mt,Rr=K,Go=se;let js=window;js["concorde-utils"]=js["concorde-utils"]||{},js["concorde-utils"]={Arrays:Vo,DataBindObserver:qo,Format:Ho,HTML:Wo,LocationHandler:Ko,Objects:Yo,PublisherProxy:Zo,PublisherManager:Rr,api:Go};var Xo=Object.defineProperty,Jo=Object.getOwnPropertyDescriptor,Qo=(i,t,r,e)=>{for(var s=e>1?void 0:e?Jo(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Xo(t,r,s),s};const Ds=i=>{class t extends i{constructor(...e){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isDefaultLoaderEnabled=!0,this.isFetchEnabled=!0,this._endPoint="",this.dataProvider=""}set endPoint(e){this._endPoint=e,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}async _fetchData(){if(!this.isFetchEnabled||(this.api=new se(this.getApiConfiguration()),!this.api))return;this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.isLoading=!0,this.requestUpdate();let e,s=this.isDefaultLoaderEnabled&&!this.hasAttribute("noLoader");s&&q.show();let o=Rr.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(e=await this.api.get(this.endPoint||this.dataProvider||"",o),!e){pt.add({text:"Network Error",status:"error"}),this.isLoading=!1,s&&q.hide();return}s&&q.hide(),this.key&&(e=et.traverse(e,this.key.split("."),!1)),this.props=e,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.publisher)==null||e.offInvalidate(this.onInvalidate),this.isFirstLoad=!1}connectedCallback(){var e;if(this.noShadowDom="",!this.isFetchEnabled){super.connectedCallback();return}super.connectedCallback(),this.key=this.getAncestorAttributeValue("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),(e=this.publisher)==null||e.onInvalidate(this.onInvalidate),this.getAncestorAttributeValue("lazyload")===null&&this._fetchData()}firstUpdated(){if(this.getAncestorAttributeValue("lazyload")===null)return;let e={root:null,rootMargin:Math.max(window.innerWidth,window.innerHeight)+"px"};this.iObserver=new IntersectionObserver(n=>this.onIntersection(n),e);let s=this,o=s.shadowRoot?s.shadowRoot.children[0]:s.children[0];o&&o.nodeName.toLocaleLowerCase()=="slot"&&(o=o.children[0]),(!o||o.nodeName.toLocaleLowerCase()=="template")&&(o=document.createElement("span"),s.appendChild(o)),o?this.iObserver.observe(o):this.isFirstLoad&&this._fetchData()}onIntersection(e){for(const s of e)s.isIntersecting&&this.isFirstLoad&&this._fetchData()}}return Qo([a({type:String})],t.prototype,"endPoint",1),t};var tn=Object.defineProperty,en=Object.getOwnPropertyDescriptor,sn=(i,t,r,e)=>{for(var s=e>1?void 0:e?en(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&tn(t,r,s),s};const Nr="sonic-fetch";let We=class extends Ds(I(v)){render(){return u`<slot></slot>`}};We.styles=[w`:host { display: contents; }`],We=sn([y(Nr)],We);try{customElements.define(Nr,We)}catch{}var rn=Object.defineProperty,on=Object.getOwnPropertyDescriptor,Fr=(i,t,r,e)=>{for(var s=e>1?void 0:e?on(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&rn(t,r,s),s};const Ir="sonic-if";let Se=class extends v{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?u`<slot></slot>`:P}};Se.styles=w`:host{ display:contents; }`,Fr([a({type:Boolean})],Se.prototype,"condition",2),Se=Fr([y(Ir)],Se);try{customElements.define(Ir,Se)}catch{}/**
|
|
106
|
+
*/const dt=ne(class extends ae{constructor(o){var t;if(super(o),o.type!==Rt.ATTRIBUTE||o.name!=="style"||((t=o.strings)===null||t===void 0?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((t,s)=>{const e=o[s];return e==null?t:t+`${s=s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${e};`},"")}update(o,[t]){const{style:s}=o.element;if(this.ct===void 0){this.ct=new Set;for(const e in t)this.ct.add(e);return this.render(t)}this.ct.forEach(e=>{t[e]==null&&(this.ct.delete(e),e.includes("-")?s.removeProperty(e):s[e]="")});for(const e in t){const r=t[e];r!=null&&(this.ct.add(e),e.includes("-")?s.setProperty(e,r):s[e]=r)}return ht}}),We=w`.custom-scroll { overflow:auto !important; } .custom-scroll::-webkit-scrollbar { width: 0.5rem; height: 0.5rem; border: solid .15rem transparent; border-radius: var(--sc-rounded); background:transparent; } .custom-scroll::-webkit-scrollbar-thumb { box-shadow: inset 0 0 2rem 2rem var(--sc-scrollbar-bg); border-radius: var(--sc-rounded); border: solid .15rem transparent; }`;var Li=Object.defineProperty,Mi=Object.getOwnPropertyDescriptor,gt=(o,t,s,e)=>{for(var r=e>1?void 0:e?Mi(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Li(t,s,r),r};const Ti={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},Ni="sonic-toast-item";let at=class extends f{constructor(){super(...arguments),this.title="",this.id="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.visible=!0}render(){if(this.dismissForever){const o=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(o)[this.id])return S}return this.visible?u`<div class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"><button aria-label="Close" class="sonic-toast-close" @click="${()=>this.hide()}"><sonic-icon name="cancel" size="lg"></sonic-icon></button><div class="sonic-toast-content custom-scroll" style="max-height:${this.maxHeight}">${this.status&&u`<sonic-icon name="${Ti[this.status]}" class="sonic-toast-icon" size="2xl"></sonic-icon>`}<div class="sonic-toast-text">${this.title?u`<div class="sonic-toast-title">${this.title}</div>`:""} ${this.text?Bt(this.text):""}<slot></slot></div>${this.preserve?"":this.autoHide()}</div></div>`:S}hide(){if(this.closest("sonic-toast")||(this.visible=!1),this.dismissForever){const o=localStorage.getItem("sonic-toast-dismissed")||"{}",t=JSON.parse(o);t[this.id]=!0,localStorage.setItem("sonic-toast-dismissed",JSON.stringify(t))}this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout(()=>{this.hide()},4200)}};at.styles=[We,w`* { box-sizing: border-box; } :host { display: block; pointer-events: auto; position: relative; --sc-toast-status-color: transparent; --sc-toast-color: var(--sc-base-content); --sc-toast-bg: var(--sc-base); --sc-toast-rounded: var(--sc-rounded-md); --sc-toast-shadow: var(--sc-shadow-lg); } .fixed-area { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 999; display: flex; flex-direction: column-reverse; } .sonic-toast { position: relative; pointer-events: auto; overflow:hidden; line-height: 1.25; color: var(--sc-toast-color); box-shadow: var(--sc-toast-shadow); border-radius: var(--sc-toast-rounded); background: var(--sc-toast-bg); } .sonic-toast-content { padding: 1em 2.5rem 1em 1em; display: flex; gap: 0.5rem; overflow: auto; position:relative; } .sonic-toast-text { align-self: center; margin-top: auto; margin-bottom: auto; max-width:70ch; line-height: 1.2; } ::slotted(a:not(.btn)), .sonic-toast-text a { color: inherit !important; text-decoration: underline !important; text-underline-offset: 0.15rem; } ::slotted(:is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6)), .sonic-toast-text :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6) { margin: 0 0 0.3em !important; } ::slotted(li), .sonic-toast-text li { margin-bottom: .15em !important; } ::slotted( :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6):last-child), .sonic-toast-text > :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6):last-child { margin-bottom: 0 !important; } /*BUTTON CLOSE*/ .sonic-toast-close { all: unset; position: absolute; z-index:4; pointer-events: initial; right: 0.5em; top: 0.5em; width: 1.5rem; height: 1.5rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; text-align: center; opacity: 0.5; background: rgba(0, 0, 0, 0); } .sonic-toast-close:focus, .sonic-toast-close:hover { opacity: 1; background: rgba(0, 0, 0, 0.075); } .sonic-toast-close svg { width: 1rem; height: 1rem; object-fit: contain; object-position: center center; } /*Title*/ .sonic-toast-title { font-weight: bold; font-size: 1.15rem; margin: 0.15em 0 0.25em; line-height: 1.2; } /*STATUS*/ .success { --sc-toast-status-color: var(--sc-success); --sc-toast-title-color: var(--sc-toast-status-color); } .error { --sc-toast-status-color: var(--sc-danger); --sc-toast-title-color: var(--sc-toast-status-color); } .warning { --sc-toast-status-color: var(--sc-warning); --sc-toast-title-color: var(--sc-toast-status-color); } .info { --sc-toast-status-color: var(--sc-info); --sc-toast-title-color: var(--sc-toast-status-color); } .success, .error, .info, .warning { border-top: 3px solid var(--sc-toast-status-color, currentColor); } .sonic-toast:before { content: ""; display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; opacity: 0.05; pointer-events: none; transition: 0.2s; border-radius: var(--sc-toast-rounded); background-color: var(--sc-toast-status-color); } .sonic-toast:hover:before { opacity: 0.025; } .info .sonic-toast-icon, .error .sonic-toast-icon, .success .sonic-toast-icon, .warning .sonic-toast-icon { color: var(--sc-toast-status-color, currentColor); } .sonic-toast-icon { position:sticky; top:0; } .ghost { opacity: 0.85; pointer-events: none; }`],gt([a({type:String})],at.prototype,"title",2),gt([a({type:String})],at.prototype,"id",2),gt([a({type:String})],at.prototype,"text",2),gt([a({type:String})],at.prototype,"status",2),gt([a({type:Boolean})],at.prototype,"ghost",2),gt([a({type:Boolean})],at.prototype,"preserve",2),gt([a({type:Boolean})],at.prototype,"dismissForever",2),gt([a({type:String})],at.prototype,"maxHeight",2),gt([Y()],at.prototype,"visible",2),at=gt([v(Ni)],at);var Ii=Object.defineProperty,Ri=Object.getOwnPropertyDescriptor,Fs=(o,t,s,e)=>{for(var r=e>1?void 0:e?Ri(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Ii(t,s,r),r};const Fi="sonic-toast";let pt=class extends f{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const o=window.parent!=window;let t={pointerEvents:"none",gap:"1rem",display:"flex",margin:"1rem"};return o||(t=Ie(X({},t),{margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"999",maxWidth:"64ch",flexDirection:"column-reverse"})),this.toasts?u`<div aria-live="polite" style="${dt(t)}">${Ut(this.toasts,s=>s.id,s=>u`<sonic-toast-item maxHeight="${o?"none":"10rem"}" status="${k(s.status)}" title="${k(s.title)}" ?ghost="${s.ghost}" ?dismissForever="${s.dismissForever}" ?preserve="${s.preserve}" id="${k(s.id)}" @hide="${()=>this.removeItem(s)}" ${Ve({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}>${s.text?Bt(s.text):""}</sonic-toast-item>`)}</div>`:S}static removeAll(){let o=document.querySelector("sonic-toast");!o||(o.toasts=o.toasts.filter(t=>t.ghost))}static add(o){var i;if(!document.querySelector("sonic-toast")){let n=document.createElement("sonic-toast");(document.querySelector("sonic-theme")||document.body).prepend(n)}let t=document.querySelector("sonic-toast");const s=(i=o.id)!=null?i:new Date().valueOf(),e=new RegExp("</a>|</button>").test(o.text),r={id:s,text:o.text,title:o.title,status:o.status,preserve:e?!0:o.preserve,ghost:o.ghost,dismissForever:o.dismissForever};if(o.dismissForever&&o.id){const n=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(n)[o.id])return null}if(t.toasts.length>0){let n=X({},r),l=X({},t.toasts[t.toasts.length-1]);if(n.id=l.id=0,!r.preserve&&et.shallowEqual(n,l))return null}return t.toasts=[...t.toasts,r],r}removeItem(o){this.toasts=this.toasts.filter(t=>t!=o)}};if(Fs([a({type:Array})],pt.prototype,"toasts",2),pt=Fs([v(Fi)],pt),typeof window<"u"){let o=window;o.SonicToast=pt}const rt=class{static listen(){var t;if(!rt.listening)return;let o=(t=document.location)==null?void 0:t.href.replace(document.location.origin,"");rt.prevURL&&rt.prevURL!=o&&(rt.prevURL=o,rt.listeners.forEach(s=>{s.location=o})),window.requestAnimationFrame(rt.listen)}static offChange(o){let t=rt.listeners.indexOf(o);t!=-1&&(rt.listeners.splice(t,1),rt.listeners.length==0&&(rt.listening=!1))}static onChange(o){rt.listening||(rt.listening=!0,rt.listen()),rt.listeners.push(o)}static changeFromComponent(o){if(o.goBack!==null){const n=document.location.origin;let l=o.goBack||n;if((document.referrer.indexOf("http")!=0||new URL(document.referrer).origin!=n)&&l!=document.location.href){let c=history.state||{};c.concorde=c.concorde||{},c.concorde.hasDoneHistoryBack=!0,history.pushState(c,document.title),history.back(),document.location.replace(l)}else history.back();return}let t=o.getAttribute("to");if(t||(t=o.href),!t)return;if(t.indexOf("#")==0){document.location.hash=t.substring(1);return}let s=new URL(t,document.location.href),e=s.pathname.split("/"),r=[],i="";for(let n of e)n!=i&&r.push(n),i=n;t="/"+r.join("/")+s.search+(s.hash?+s.hash:""),o.hasAttribute("pushState")?history.pushState(null,"",t):o.hasAttribute("replaceState")?history.replaceState(null,"",t):document.location.href=t}static updateComponentActiveState(o){if(o.autoActive!="disabled"&&o.href&&o.href.indexOf("http")!=0){let t=new URL(o.href,document.location.href),s=new URL(o.location,document.location.origin),e=!1;o.autoActive=="strict"?e=t.pathname==s.pathname&&t.hash==s.hash&&t.search==s.search:e=s.href.indexOf(t.href)==0,e?o.setAttribute("active","true"):o.removeAttribute("active")}}};let G=rt;G.listeners=[],G.listening=!1,G.prevURL=(Ho=document.location)==null?void 0:Ho.href.replace(document.location.origin,"");var Ui=Object.defineProperty,Bi=Object.getOwnPropertyDescriptor,qt=(o,t,s,e)=>{for(var r=e>1?void 0:e?Bi(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Ui(t,s,r),r};const Ze=new Map,le=o=>{class t extends o{constructor(...e){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.disabled=null,this.onValueAssign=null,this.onFormValueAssign=null,this.onFormDataInValidate=null,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=r=>{this.setValueFromPublisher(r)},this.onFormValueAssign=r=>{this.setFormValueFromPublisher(r)},this.onFormDataInValidate=()=>{!this.getFormPublisher().isFormValid.get()||this.validateFormElement()}}get name(){return this._name}set name(e){this._name=e}validateFormElement(){}updateDataValue(){if(this._name){let e=this.getFormPublisher();e&&(e[this._name]=this.getValueForFormPublisher(),this.setFormValueFromPublisher(e[this.name].get()))}}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?Z.get(this.formDataProvider):this.publisher}getValueForFormPublisher(){return this.value}setValueFromPublisher(e){this.value=e}setFormValueFromPublisher(e){this.value=e}get value(){return this._value}set value(e){et.isObject(e)&&e.hasOwnProperty("__value")&&e.value==null||e!=null&&this._value!=e&&(this._value=e,this.updateDataValue(),this.requestUpdate())}initPublisher(){this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);let e=this.getFormPublisher();this._name&&e&&e[this._name].offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.updateDataValue(),this.publisher&&this._name&&this.publisher[this._name].onAssign(this.onValueAssign),e=this.getFormPublisher(),this._name&&e&&(e[this._name].onAssign(this.onFormValueAssign),e.onInvalidate(this.onFormDataInValidate))}handleBlur(){this.touched=!0}handleChange(e){this.value=e.target.value;const r=new Event("change");this.dispatchEvent(r)}addKeyboardNavigation(){let e=this.getAncestorAttributeValue("data-keyboard-nav");if(!e)return;let r=e.split(" "),i=r[0];if(!i)return;for(let l of r){Ze.has(l)||Ze.set(l,[]);let c=Ze.get(l);c.indexOf(this)==-1&&c.push(this)}let n=Ze.get(i);this.addEventListener("keydown",l=>{if(!["ArrowDown","ArrowUp"].includes(l.key))return;let c="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",h=n.filter(m=>{let x=m.shadowRoot.querySelector(c);if(!x)return!1;let _=window.getComputedStyle(x);return _.display!=="none"&&_.display!==""&&_.pointerEvents!="none"&&_.visibility!=="hidden"&&x.getBoundingClientRect().width>0}),y=null;if(l.key=="ArrowDown"){let m=h.indexOf(this);m==h.length-1?y=h[0]:y=h[m+1]}else if(l.key=="ArrowUp"){let m=h.indexOf(this);m==0?y=h[h.length-1]:y=h[m-1]}let g=y.shadowRoot.querySelector(c);g&&(g.focus(),l.preventDefault())})}connectedCallback(){super.connectedCallback(),this.addKeyboardNavigation()}disconnectedCallback(){super.disconnectedCallback(),this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);let e=this.getFormPublisher();this._name&&e&&(e[this._name].offAssign(this.onFormValueAssign),e.offInvalidate(this.onFormDataInValidate))}}return qt([a({type:Boolean,reflect:!0})],t.prototype,"touched",2),qt([a({type:Boolean})],t.prototype,"error",2),qt([a({type:Boolean})],t.prototype,"autofocus",2),qt([a({type:Boolean})],t.prototype,"required",2),qt([a({type:Boolean})],t.prototype,"disabled",2),qt([a()],t.prototype,"name",1),qt([a()],t.prototype,"value",1),t};var Vi=Object.defineProperty,qi=Object.getOwnPropertyDescriptor,Ee=(o,t,s,e)=>{for(var r=e>1?void 0:e?qi(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Vi(t,s,r),r};const zr=o=>{class t extends o{constructor(){super(...arguments),this._value="",this._name="",this.unique=null,this.radio=null,this._checked=null}get value(){return this._value}set value(e){this.hasAttribute("value")&&(e=this.getAttribute("value")),this._value!=e&&(this._value=e,this.updateDataValue(),this.requestUpdate())}get name(){return this._name}set name(e){this.hasAttribute("name")&&(e=this.getAttribute("name")),this._name=e}get checked(){return this._checked}set checked(e){this.setCheckedValue(e)}validateFormElement(){var i;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("input");if(!e||e.checkValidity())return;let r=this.getFormPublisher()[this.name].get();(this.unique||this.radio)&&r!==null&&r.toString().length>0||(this.getFormPublisher().isFormValid=!1,e.reportValidity())}setCheckedValue(e){this._checked!=e&&(this._checked=e,this.updateDataValue(),this.requestUpdate(),this.publisher&&!this.radio&&!this.unique&&(this.publisher.checked=this._checked))}handleChange(){this.checked=this.checked?this.radio?!0:null:!0;const e=new Event("change");this.dispatchEvent(e)}getValueForFormPublisher(){let e=this.getFormPublisher()[this.name].get();if(this.radio)return this.checked&&this.value!=null?this.value:e;if(this.unique)return this.checked&&this.value!=null?this.value:null;Array.isArray(e)||(e=[]),e=e.slice(0);let r=e.indexOf(this.value);return this.checked===!0&&r===-1&&e.push(this.value),this.checked===null&&r!==-1&&e.splice(r,1),e}setFormValueFromPublisher(e){if(this.unique||this.radio){this.checked=this.value==e?!0:null;return}Array.isArray(e)||(e=[]),this.checked=e.indexOf(this.value)!==-1?!0:null}initPublisher(){super.initPublisher(),!!this.hasAttribute("checked")&&(!this.publisher||this.publisher.get().checked!==!1)&&(this.checked=!0)}}return Ee([a()],t.prototype,"value",1),Ee([a()],t.prototype,"name",1),Ee([a({type:Boolean})],t.prototype,"unique",2),Ee([a({type:Boolean})],t.prototype,"radio",2),Ee([a()],t.prototype,"checked",1),t},ce=w`/*SIZES*/ :host { --sc-fs: 1rem; font-size: var(--sc-fs); } :host([size="2xs"]) { --sc-fs: 0.68rem; } :host([size="xs"]) { --sc-fs: 0.75rem; } :host([size="sm"]) { --sc-fs: 0.875rem; } :host([size="lg"]) { --sc-fs: 1.125rem; } :host([size="xl"]) { --sc-fs: 1.25rem; } :host([size="2xl"]) { --sc-fs: 1.5rem; }`;var Hi=Object.defineProperty,Wi=Object.getOwnPropertyDescriptor,M=(o,t,s,e)=>{for(var r=e>1?void 0:e?Wi(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Hi(t,s,r),r};const Us="sonic-button";let E=class extends zr(le(F(f))){constructor(){super(...arguments),this.type="default",this.variant="default",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.minWidth="0",this.icon=!1,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this._location=""}set href(o){this._href=o,this.href&&this.href.indexOf("http")!=0?(G.onChange(this),this.location=document.location.href.replace(document.location.origin,"")):G.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(o){o.preventDefault(),G.changeFromComponent(this)}handleChange(o){super.handleChange(o),(this.pushState||this.goBack!==null)&&(o.preventDefault(),o.stopPropagation(),G.changeFromComponent(this))}connectedCallback(){super.connectedCallback()}setCheckedValue(o){if(this.name){if(o==this._checked)return;super.setCheckedValue(o),this._checked?this.setAttribute("active","true"):this.removeAttribute("active")}}disconnectedCallback(){G.offChange(this),super.disconnectedCallback()}get location(){return this._location}set location(o){this._location=o,G.updateComponentActiveState(this)}render(){const o={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,textAlign:this.align,minWidth:this.minWidth},t=u`<button part="button" class="${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}" style="${dt(o)}" @click="${this.handleChange}"><slot @slotchange="${this.onSlotChange}" part="prefix" name="prefix"></slot><slot part="main" class="main-slot"></slot><slot @slotchange="${this.onSlotChange}" part="suffix" name="suffix"></slot>${this.loading==!0?u`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}</button>`;return this.href?u`<a href="${this.href}" target="${k(this.target)}" @click="${this.pushState||this.goBack!==null?this.handleNavigation:null}">${t}</a>`:u`${t}`}onSlotChange(){var o,t;this.hasPrefix=!!((o=this.prefixes)!=null&&o.length),this.hasSuffix=!!((t=this.suffixes)!=null&&t.length)}};E.styles=[ce,w`* { box-sizing: border-box; } :host { --sc-btn-gap: 0.35em; --sc-btn-py: 0.25em; --sc-btn-px: 1.1em; --sc-btn-fs: var(--sc-fs, 1rem); --sc-btn-fw: var(--sc-btn-font-weight); --sc-btn-ff: var(--sc-btn-font-family); --sc-btn-height: var(--sc-form-height); --sc-btn-color: var(--sc-base-content); --sc-btn-bg: var(--sc-base-100); --sc-btn-border-style: solid; --sc-btn-border-with: var(--sc-form-border-width); --sc-btn-border-color: transparent; --sc-btn-outline-bg-hover: var(--sc-base-100); --sc-btn-ghost-bg-hover: var(--sc-base-100); --sc-btn-active-color: var(--sc-base); --sc-btn-hover-filter: brightness(0.98); --sc-btn-active-filter: brightness(0.97); --sc-btn-active-bg: var(--sc-base-content); --sc-item-rounded-tr: var(--sc-btn-rounded); --sc-item-rounded-tl: var(--sc-btn-rounded); --sc-item-rounded-bl: var(--sc-btn-rounded); --sc-item-rounded-br: var(--sc-btn-rounded); display: inline-flex; vertical-align: middle; box-sizing: border-box; } :host a { display: contents; color:unset; } :host button { display: flex; flex: 1; box-sizing: border-box; align-items: center; justify-content: center; font-family: var(--sc-btn-ff); font-weight: var(--sc-btn-fw); font-size: var(--sc-btn-fs); cursor: pointer; text-align: center; line-height: 1.1; border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl); background: var(--sc-btn-bg); color: var(--sc-btn-color); padding-top: var(--sc-btn-py); padding-bottom: var(--sc-btn-py); padding-left: var(--sc-btn-px); padding-right: var(--sc-btn-px); border: var(--sc-btn-border-with) var(--sc-btn-border-style) var(--sc-btn-border-color); min-height: var(--sc-btn-height); } :host button.has-prefix-or-suffix { gap: var(--sc-btn-gap); } :host button:focus, :host button:hover { filter: var(--sc-btn-hover-filter); } :host button:active { filter: var(--sc-btn-active-filter); } /*TYPES*/ :host([type="default"]) button { --sc-btn-color: var(--sc-base-content); --sc-btn-bg: var(--sc-base-100); } :host([type="primary"]) button { --sc-btn-color: var(--sc-primary-content); --sc-btn-bg: var(--sc-primary); } :host([type="warning"]) button { --sc-btn-color: var(--sc-warning-content); --sc-btn-bg: var(--sc-warning); } :host([type="danger"]) button { --sc-btn-color: var(--sc-danger-content); --sc-btn-bg: var(--sc-danger); } :host([type="info"]) button { --sc-btn-color: var(--sc-info-content); --sc-btn-bg: var(--sc-info); } :host([type="success"]) button { --sc-btn-color: var(--sc-success-content); --sc-btn-bg: var(--sc-success); } :host([type="neutral"]) button { --sc-btn-color: var(--sc-base); --sc-btn-bg: var(--sc-base-600); } /*UNSTYLED*/ :host([variant="unstyled"]), :host([variant="unstyled"]) button { all: unset; display: contents; transition: 0.1s; cursor: pointer; --sc-btn-height: auto; --sc-btn-width: auto; } /*GESTION DU FOCUS*/ :host(:not([disabled])) button:focus { box-shadow: 0 0 0 0.18rem var(--sc-base-300); border-color: var(--sc-base-300) !important; outline: none; } /*GHOST*/ :host([variant="ghost"][type]) button { color: var(--sc-btn-bg); background: transparent; } :host([variant="ghost"][type="default"]) button { color: var(--sc-btn-color); background: transparent; } /*:host([variant="ghost"]) button:focus,*/ :host([variant="ghost"]) button:hover { background: var(--sc-btn-ghost-bg-hover); filter: none; } :host([active][variant="ghost"]) button { background: var(--sc-btn-ghost-bg-hover); filter: none; } :host([active][variant="ghost"]) button:hover { filter: var(--sc-btn-hover-filter); } /*OUTLINE*/ :host([variant="outline"][type]) button { border-color: var(--sc-btn-bg); color: var(--sc-btn-bg); background: transparent; } :host([variant="outline"][type="default"]) button { border-color: var(--sc-base-400); color: var(--sc-base-500); background: transparent; } /*:host([variant="outline"]) button:focus,*/ :host([variant="outline"]) button:hover { background: var(--sc-btn-outline-bg-hover); } /*OUTLINE*/ :host([variant="link"]:not([size])) { vertical-align: baseline; margin-left:.25em; margin-right:.25em; } :host([variant="link"]:not([size])) { font-size: inherit; } :host([variant="link"]) button { text-decoration: underline; padding: 0; background: none; border: none; font-size: inherit; min-height: 0; color: inherit; } :host([variant="link"][type]) button { color: var(--sc-btn-bg); } :host([variant="link"][type="default"]) button { color: inherit; } :host([variant="link"]) button:focus, :host([variant="link"]) button:hover { text-decoration: none; } /*SHAPE*/ :host([shape="circle"]) button { border-radius: 50%; } :host([shape="circle"]) button, :host([shape="square"]) button { width: var(--sc-btn-height); height: var(--sc-btn-height); overflow: hidden; padding: 0; align-items: center; justify-content: 0; text-align:center !important; } :host([shape="block"]), :host([shape="block"]) button { width: 100%; } :host([disabled]) { opacity: 0.3; pointer-events: none; user-select: none; } /*ACTIVE*/ :host([active]:not([variant="ghost"])) button { background: var(--sc-btn-active-bg); color: var(--sc-btn-active-color); border-color: var(--sc-btn-active-bg); } :host([textAlign="left"]) button { text-align: left; } :host([textAlign="right"]) button { text-align: right; } .main-slot { flex-grow: 1; display: block; /*align-items: center; justify-content: center;*/ } :host([minWidth]) .main-slot { flex-grow:0; } slot[name="suffix"], slot[name="prefix"] { flex-shrink: 0; } /*ALIGNEMENT DES ICONES permet de tous les avoir alignés dans un menu */ ::slotted(sonic-icon) { min-width: 1.28em; text-align: center; } /*BOUTON Avec icone seulement*/ :host([icon]) ::slotted(sonic-icon) { font-size: 1.35em; } /*Tooltip ne joue pas sur le layout*/ sonic-tooltip { display: contents; } /*OUTLINE*/ :host(:not([active])) ::slotted([swap="on"]) { display: none; } :host([active]) ::slotted([swap="off"]) { display: none; } /*Loading*/ :host([loading]) { pointer-events: none; position: relative; } :host([loading]) slot { opacity: 0 !important; pointer-events: none; } /*Loading*/ :host([loading]) .loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; line-height: 0; height: var(--sc-btn-ff); width: var(--sc-btn-ff); animation: rotation 2s infinite linear; } @keyframes rotation { from { transform-origin: 50% 50%; transform: translate(-50%, -50%) rotate(0deg); } to { transform-origin: 50% 50%; transform: translate(-50%, -50%) rotate(359deg); } }`],M([a({type:String,reflect:!0})],E.prototype,"type",2),M([a({type:String,reflect:!0})],E.prototype,"variant",2),M([a({type:String,reflect:!0})],E.prototype,"size",2),M([a({type:String,reflect:!0})],E.prototype,"shape",2),M([a({type:String})],E.prototype,"direction",2),M([a({type:String,reflect:!0})],E.prototype,"alignItems",2),M([a({type:String})],E.prototype,"justify",2),M([a({type:String,reflect:!0})],E.prototype,"align",2),M([a({type:String})],E.prototype,"minWidth",2),M([a({type:Boolean,reflect:!0})],E.prototype,"icon",2),M([a({type:String})],E.prototype,"autoActive",2),M([a({type:Boolean,reflect:!0})],E.prototype,"loading",2),M([Y()],E.prototype,"hasPrefix",2),M([Y()],E.prototype,"hasSuffix",2),M([Nt({flatten:!0,slot:"prefix"})],E.prototype,"prefixes",2),M([Nt({flatten:!0,slot:"suffix"})],E.prototype,"suffixes",2),M([a({type:String})],E.prototype,"target",2),M([a({type:String})],E.prototype,"href",1),M([a({type:String})],E.prototype,"goBack",2),M([a({type:Boolean})],E.prototype,"pushState",2),M([a({type:Boolean,reflect:!0})],E.prototype,"active",2),E=M([v(Us)],E);try{customElements.define(Us,E)}catch{}class Ot{static areEqual(t,s){return t.length===s.length?t.every((e,r)=>e===s[r]):!1}static from2d(t){return{to1D:()=>{let s=[];return t.forEach(e=>s=s.concat(e)),this.from(s)}}}static from(t){return{get:()=>t||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:s=>{if(t.length<1)return!0;let e=(t[0]||{})[s];return t.every(r=>(r||{})[s]==e)}})})}),value:()=>({forKey:s=>Ot.from(t.map(e=>e[s]))}),copy:()=>({fromKey:s=>({toKey:e=>{t.forEach(r=>{r[e]=Array.isArray(r[s])?[...r[s]]:typeof r[s]=="object"&&r[s]!=null?X({},r[s]):r[s]})}})})}),map:s=>Ot.from(t.map(s)),filter:s=>Ot.from(t.filter(s)),find:s=>t.find(s),some:s=>t.some(s),every:s=>t.every(s),group:()=>({byKey:s=>{let e=[],r=new Map;for(let i of t){let n=i[s];if(!r.has(n)){let l=e.length;r.set(n,l);let c={items:[]};c[s]=n,e.push(c)}e[r.get(n)].items.push(i)}return Ot.from(e)}}),without:()=>({duplicates:()=>({forKey:s=>{let e=[...new Set(t.map(r=>r[s]))];return Ot.from(e.map(r=>t.find(i=>i[s]==r)))}}),itemsIn:s=>({havingSameValue:()=>({forKey:e=>{let r=(i,n)=>l=>i[n]!=l[n];return Ot.from(t.filter(i=>s.every(r(i,e))))}})})})}}}const Zi=Ot,Ki=Ct,Yi=Fe,Gi=se,Qi=G,Ji=et,Xi=It,Dr=Z,tn=oe;let Lr=window;Lr["concorde-utils"]=Lr["concorde-utils"]||{},Lr["concorde-utils"]={Arrays:Zi,DataBindObserver:Ki,Format:Yi,HTML:Gi,LocationHandler:Qi,Objects:Ji,PublisherProxy:Xi,PublisherManager:Dr,api:tn};var en=Object.defineProperty,rn=Object.getOwnPropertyDescriptor,sn=(o,t,s,e)=>{for(var r=e>1?void 0:e?rn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&en(t,s,r),r};const Mr=o=>{class t extends o{constructor(...e){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isDefaultLoaderEnabled=!0,this.isFetchEnabled=!0,this._endPoint="",this.dataProvider=""}set endPoint(e){this._endPoint=e,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}async _fetchData(){if(!this.isFetchEnabled||(this.api=new oe(this.getApiConfiguration()),!this.api))return;this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.isLoading=!0,this.requestUpdate();let e,r=this.isDefaultLoaderEnabled&&!this.hasAttribute("noLoader");r&&q.show();let i=Dr.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(e=await this.api.get(this.endPoint||this.dataProvider||"",i),!e){pt.add({text:"Network Error",status:"error"}),this.isLoading=!1,r&&q.hide();return}if(r&&q.hide(),this.key){let n=e._sonic_http_response_;e=et.traverse(e,this.key.split("."),!1),e&&(e._sonic_http_response_=n)}this.props=e,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.publisher)==null||e.offInvalidate(this.onInvalidate),this.isFirstLoad=!1}connectedCallback(){var e;if(this.noShadowDom="",!this.isFetchEnabled){super.connectedCallback();return}super.connectedCallback(),this.key=this.getAncestorAttributeValue("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),(e=this.publisher)==null||e.onInvalidate(this.onInvalidate),this.getAncestorAttributeValue("lazyload")===null&&this._fetchData()}firstUpdated(){if(this.getAncestorAttributeValue("lazyload")===null)return;let e={root:null,rootMargin:Math.max(window.innerWidth,window.innerHeight)+"px"};this.iObserver=new IntersectionObserver(n=>this.onIntersection(n),e);let r=this,i=r.shadowRoot?r.shadowRoot.children[0]:r.children[0];i&&i.nodeName.toLocaleLowerCase()=="slot"&&(i=i.children[0]),(!i||i.nodeName.toLocaleLowerCase()=="template")&&(i=document.createElement("span"),r.appendChild(i)),i?this.iObserver.observe(i):this.isFirstLoad&&this._fetchData()}onIntersection(e){for(const r of e)r.isIntersecting&&this.isFirstLoad&&this._fetchData()}}return sn([a({type:String})],t.prototype,"endPoint",1),t};var on=Object.defineProperty,nn=Object.getOwnPropertyDescriptor,an=(o,t,s,e)=>{for(var r=e>1?void 0:e?nn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&on(t,s,r),r};const Bs="sonic-fetch";let Ke=class extends Mr(F(f)){render(){return u`<slot></slot>`}};Ke.styles=[w`:host { display: contents; }`],Ke=an([v(Bs)],Ke);try{customElements.define(Bs,Ke)}catch{}var ln=Object.defineProperty,cn=Object.getOwnPropertyDescriptor,Vs=(o,t,s,e)=>{for(var r=e>1?void 0:e?cn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&ln(t,s,r),r};const qs="sonic-if";let je=class extends f{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?u`<slot></slot>`:S}};je.styles=w`:host{ display:contents; }`,Vs([a({type:Boolean})],je.prototype,"condition",2),je=Vs([v(qs)],je);try{customElements.define(qs,je)}catch{}/**
|
|
107
107
|
* @license
|
|
108
108
|
* Copyright 2020 Google LLC
|
|
109
109
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
110
|
-
*/const Pt=ie(class extends oe{constructor(i){if(super(i),i.type!==Rt.CHILD)throw Error("templateContent can only be used in child bindings")}render(i){return this.vt===i?ht:(this.vt=i,document.importNode(i.content,!0))}});var nn=Object.defineProperty,an=Object.getOwnPropertyDescriptor,ln=(i,t,r,e)=>{for(var s=e>1?void 0:e?an(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&nn(t,r,s),s};const Ur="sonic-subscriber";let Ls=class extends I(v){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}render(){return u`<slot></slot>`}};Ls=ln([y(Ur)],Ls);try{customElements.define(Ur,Ls)}catch{}var cn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,Ke=(i,t,r,e)=>{for(var s=e>1?void 0:e?hn(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&cn(t,r,s),s};const Br="sonic-list";let Vt=class extends Ds(I($e(v))){constructor(){super(...arguments),this.itemPropertyMap=null,this.templateKey="template",this.idKey="id"}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isDefaultLoaderEnabled=!1,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}renderLoadingState(){return this.templateParts.skeleton?Pt(this.templateParts.skeleton):u`<sonic-loader mode="inline"></sonic-loader>`}renderNoResultState(){return u`<div class="sonic-no-result-container"><sonic-icon name="emoji-puzzled" size="lg"></sonic-icon><span class="sonic-no-result-text">${this.props}</span></div>`}formatProps(){let i=this.props,t=this.hasAttribute("extractValues");return Array.isArray(i)||(t?i=Object.entries(i).map(([r,e])=>({key:r,value:e})):i=[i]),i}render(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!et.isObject(this.props))return u`<div></div>`;let i=this.formatProps();if(i.length==0&&this.templateParts["no-item"])return Pt(this.templateParts["no-item"]);let t=this.templateList.length,r=-1,e=this.hasAttribute("extractValues");return u`${Ft(i,(s,o)=>s[this.idKey]||o,(s,o)=>{let n=s[this.templateKey],l=n&&this.templateParts[n];r++,l&&(r=-1);let c=e?s.key:o,h=this.publisher[c];return h._key_=c+"",s&&u`<sonic-subscriber debug="${S(this.defferedDebug)}" .bindPublisher="${function(){return h}}" .propertyMap="${S(this.itemPropertyMap)}" dataProvider="${this.dataProvider}/list-item/${o}">${Pt(l?this.templateParts[n]:this.templateList[r%t])}</sonic-subscriber>`})}`}};Vt.styles=[w`.sonic-no-result-container { color: var(--sc-base-400); font-size: 1.65rem; } sonic-icon { margin-right: 0.25em; } span { vertical-align: middle; }`],Ke([a({type:Object})],Vt.prototype,"itemPropertyMap",2),Ke([a({type:String})],Vt.prototype,"templateKey",2),Ke([a({type:String})],Vt.prototype,"idKey",2),Vt=Ke([y(Br)],Vt);try{customElements.define(Br,Vt)}catch{}var dn=Object.defineProperty,pn=Object.getOwnPropertyDescriptor,yt=(i,t,r,e)=>{for(var s=e>1?void 0:e?pn(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&dn(t,r,s),s};const Vr="sonic-queue";let nt=class extends I(v){constructor(){super(...arguments),this.templates=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.targetRequestDuration=500,this.limit=5,this.offset=0,this.filteredFields="",this.filterPublisher=null,this.filterTimeoutId=void 0,this.dataProviderExpression="",this.idKey="id",this.currentScrollPosition=void 0,this.listDataProviders=[]}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider="sonic-queue-"+nt.instanceCounter++),this.configFilter(),super.connectedCallback(),this.key=this.getAttribute("key"),this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=new Date().getTime(),this.next()}configFilter(){var t;let i=this.getAncestorAttributeValue("dataFilterProvider");!i||(this.filterPublisher=K.getInstance().get(i),(t=this.filterPublisher)==null||t.onInternalMutation(()=>{var r;Object.keys((r=this.filterPublisher)==null?void 0:r.get()).length!=0&&this.updateFilteredContent()}))}updateFilteredContent(){for(let i of this.listDataProviders)K.delete(i);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout(()=>{this.props=null,this.next()},250)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(i){var h,b;let t=this.offset;const r=new Date().getTime()-this.lastRequestTime;if(i&&(!i.detail.isFirstLoad||!i.detail.props.length||this.dataProviderExpression.indexOf("$offset")==-1))return;if(!Array.isArray(this.props))this.props=[];else{const f=this.props,g=f[f.length-1];t=parseInt(g.offset.toString())+parseInt(g.limit.toString())}r>0&&i&&(this.limit=Math.round(this.limit/r*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let e=this.dataProviderExpression.replace("$offset",t+"").replace("$limit",this.limit+""),s=e.split("?"),o=s.shift(),n=new URLSearchParams(s.join("?")),l=(h=this.filterPublisher)==null?void 0:h.get(),c=this.filteredFields.split(" ");for(let f in l)this.filteredFields&&!c.includes(f)||n.set(f,l[f]);e=o+"?"+n.toString(),this.listDataProviders.push(e),this.currentScrollPosition=(b=document.scrollingElement)==null?void 0:b.scrollTop,this.props=[...this.props,{id:n.toString()+"/"+this.props.length,dataProvider:e,offset:t,limit:this.limit}],this.lastRequestTime=new Date().getTime()}render(){return this.currentScrollPosition&&window.requestAnimationFrame(()=>{document.scrollingElement&&(document.scrollingElement.scrollTop=this.currentScrollPosition),this.currentScrollPosition=void 0}),Array.isArray(this.props)?u`${Ft(this.props,i=>i.id,(i,t)=>{var e;let r=t==0?this.templates:(e=this.templates)==null?void 0:e.filter(s=>s.getAttribute("data-value")!="no-item");return u`<sonic-list fetch .itemPropertyMap="${this.itemPropertyMap}" debug="${S(this.defferedDebug)}" @load="${this.next}" key="${this.key}" @loading="${this.resetDuration}" dataProvider="${i.dataProvider}" idKey="${this.idKey}" .templates="${r}"></sonic-list>`})}`:P}};nt.instanceCounter=0,yt([a({type:Array})],nt.prototype,"templates",2),yt([a({type:Object})],nt.prototype,"itemPropertyMap",2),yt([a()],nt.prototype,"targetRequestDuration",2),yt([a()],nt.prototype,"limit",2),yt([a()],nt.prototype,"offset",2),yt([a()],nt.prototype,"filteredFields",2),yt([a({type:String})],nt.prototype,"dataProviderExpression",2),yt([a({type:String})],nt.prototype,"idKey",2),nt=yt([y(Vr)],nt);try{customElements.define(Vr,nt)}catch{}var un=Object.defineProperty,gn=Object.getOwnPropertyDescriptor,Ye=(i,t,r,e)=>{for(var s=e>1?void 0:e?gn(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&un(t,r,s),s};const qr="sonic-submit";let qt=class extends I(v){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.api=null}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",()=>this.submit()),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",i=>{i.key==="Enter"&&this.submit()}),super.connectedCallback(),this.api=new se(this.getApiConfiguration())}async submit(){var c,h,b,f,g;const i=K.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(i.isFormValid=!0,i.invalidate(),!i.isFormValid.get())return;this.publisher.disabled=!0,i.isFormValid;let t=((c=this.getAttribute("method"))==null?void 0:c.toLocaleLowerCase())||"post",r=i.get();delete r.isFormValid;let e=K.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get(),s=null,o=this.getAncestorAttributeValue("dataProvider"),n=this.endPoint||o;switch(q.show(),t){case"put":s=await((h=this.api)==null?void 0:h.put(n,r,e));break;case"delete":s=await((b=this.api)==null?void 0:b.delete(n,r,e));break;case"get":s=await((f=this.api)==null?void 0:f.get(n));break;default:s=await((g=this.api)==null?void 0:g.post(n,r,e));break}q.hide(),s||(s={messages:[{content:"Network Error",status:"error"}]});let l=this.getAncestorAttributeValue("clearedDataOnSuccess");l&&l.split(" ").forEach($=>K.get($).set({})),this.submitResultKey&&(s=et.traverse(s,this.submitResultKey.split("."),!0)),K.getInstance().get(this.getAncestorAttributeValue("submitResultDataProvider")).set(s),this.publisher.disabled=!1}render(){return u`<div ?data-disabled="${this.disabled}"><slot></slot></div>`}};qt.styles=w`[data-disabled]{ opacity: 0.3; pointer-events: none; user-select: none; }`,Ye([a({type:String})],qt.prototype,"submitResultKey",2),Ye([a({type:Boolean})],qt.prototype,"disabled",2),Ye([a({type:String})],qt.prototype,"endPoint",2),qt=Ye([y(qr)],qt);try{customElements.define(qr,qt)}catch{}var fn=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},zs={exports:{}};(function(i,t){var r=[].slice;(function(e,s){return t!==null?i.exports=s():e.UrlPattern=s()})(fn,function(){var e,s,o,n,l,c,h,b,f,g,$,_,k,R,D;return f=function(d){return d.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},h=function(d,p){var m,x,A;for(A=[],m=-1,x=d.length;++m<x;)A=A.concat(p(d[m]));return A},R=function(d,p){var m,x,A;for(A="",m=-1,x=d.length;++m<x;)A+=p(d[m]);return A},k=function(d){return new RegExp(d.toString()+"|").exec("").length-1},$=function(d,p){var m,x,A,O,N;for(O={},m=-1,A=d.length;++m<A;)x=d[m],N=p[m],N!=null&&(O[x]!=null?(Array.isArray(O[x])||(O[x]=[O[x]]),O[x].push(N)):O[x]=N);return O},e={},e.Result=function(d,p){this.value=d,this.rest=p},e.Tagged=function(d,p){this.tag=d,this.value=p},e.tag=function(d,p){return function(m){var x,A;if(x=p(m),x!=null)return A=new e.Tagged(d,x.value),new e.Result(A,x.rest)}},e.regex=function(d){return function(p){var m,x;if(m=d.exec(p),m!=null)return x=m[0],new e.Result(x,p.slice(x.length))}},e.sequence=function(){var d;return d=1<=arguments.length?r.call(arguments,0):[],function(p){var m,x,A,O,N,X;for(m=-1,x=d.length,X=[],O=p;++m<x;){if(A=d[m],N=A(O),N==null)return;X.push(N.value),O=N.rest}return new e.Result(X,O)}},e.pick=function(){var d,p;return d=arguments[0],p=2<=arguments.length?r.call(arguments,1):[],function(m){var x,A;if(A=e.sequence.apply(e,p)(m),A!=null)return x=A.value,A.value=x[d],A}},e.string=function(d){var p;return p=d.length,function(m){if(m.slice(0,p)===d)return new e.Result(d,m.slice(p))}},e.lazy=function(d){var p;return p=null,function(m){return p==null&&(p=d()),p(m)}},e.baseMany=function(d,p,m,x,A){var O,N,X,Te;for(X=A,Te=m?"":[];!(p!=null&&(O=p(X),O!=null)||(N=d(X),N==null));)m?Te+=N.value:Te.push(N.value),X=N.rest;if(!(x&&Te.length===0))return new e.Result(Te,X)},e.many1=function(d){return function(p){return e.baseMany(d,null,!1,!0,p)}},e.concatMany1Till=function(d,p){return function(m){return e.baseMany(d,p,!0,!0,m)}},e.firstChoice=function(){var d;return d=1<=arguments.length?r.call(arguments,0):[],function(p){var m,x,A,O;for(m=-1,x=d.length;++m<x;)if(A=d[m],O=A(p),O!=null)return O}},_=function(d){var p;return p={},p.wildcard=e.tag("wildcard",e.string(d.wildcardChar)),p.optional=e.tag("optional",e.pick(1,e.string(d.optionalSegmentStartChar),e.lazy(function(){return p.pattern}),e.string(d.optionalSegmentEndChar))),p.name=e.regex(new RegExp("^["+d.segmentNameCharset+"]+")),p.named=e.tag("named",e.pick(1,e.string(d.segmentNameStartChar),e.lazy(function(){return p.name}))),p.escapedChar=e.pick(1,e.string(d.escapeChar),e.regex(/^./)),p.static=e.tag("static",e.concatMany1Till(e.firstChoice(e.lazy(function(){return p.escapedChar}),e.regex(/^./)),e.firstChoice(e.string(d.segmentNameStartChar),e.string(d.optionalSegmentStartChar),e.string(d.optionalSegmentEndChar),p.wildcard))),p.token=e.lazy(function(){return e.firstChoice(p.wildcard,p.optional,p.named,p.static)}),p.pattern=e.many1(e.lazy(function(){return p.token})),p},b={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},c=function(d,p){if(Array.isArray(d))return R(d,function(m){return c(m,p)});switch(d.tag){case"wildcard":return"(.*?)";case"named":return"(["+p+"]+)";case"static":return f(d.value);case"optional":return"(?:"+c(d.value,p)+")?"}},l=function(d,p){return p==null&&(p=b.segmentValueCharset),"^"+c(d,p)+"$"},n=function(d){if(Array.isArray(d))return h(d,n);switch(d.tag){case"wildcard":return["_"];case"named":return[d.value];case"static":return[];case"optional":return n(d.value)}},g=function(d,p,m,x){var A,O,N,X;if(x==null&&(x=!1),X=d[p],X==null){if(x)throw new Error("no values provided for key `"+p+"`");return}if(A=m[p]||0,O=Array.isArray(X)?X.length-1:0,A>O){if(x)throw new Error("too few values provided for key `"+p+"`");return}return N=Array.isArray(X)?X[A]:X,x&&(m[p]=A+1),N},o=function(d,p,m){var x,A;if(Array.isArray(d)){for(x=-1,A=d.length;++x<A;)if(o(d[x],p,m))return!0;return!1}switch(d.tag){case"wildcard":return g(p,"_",m,!1)!=null;case"named":return g(p,d.value,m,!1)!=null;case"static":return!1;case"optional":return o(d.value,p,m)}},D=function(d,p,m){if(Array.isArray(d))return R(d,function(x){return D(x,p,m)});switch(d.tag){case"wildcard":return g(p,"_",m,!0);case"named":return g(p,d.value,m,!0);case"static":return d.value;case"optional":return o(d.value,p,m)?D(d.value,p,m):""}},s=function(d,p){var m,x,A,O,N;if(d instanceof s){this.isRegex=d.isRegex,this.regex=d.regex,this.ast=d.ast,this.names=d.names;return}if(this.isRegex=d instanceof RegExp,!(typeof d=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=d,p!=null){if(!Array.isArray(p))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(m=k(this.regex),p.length!==m)throw new Error("regex contains "+m+" groups but array of group names contains "+p.length);this.names=p}return}if(d==="")throw new Error("argument must not be the empty string");if(N=d.replace(/\s+/g,""),N!==d)throw new Error("argument must not contain whitespace");if(x={escapeChar:(p!=null?p.escapeChar:void 0)||b.escapeChar,segmentNameStartChar:(p!=null?p.segmentNameStartChar:void 0)||b.segmentNameStartChar,segmentNameCharset:(p!=null?p.segmentNameCharset:void 0)||b.segmentNameCharset,segmentValueCharset:(p!=null?p.segmentValueCharset:void 0)||b.segmentValueCharset,optionalSegmentStartChar:(p!=null?p.optionalSegmentStartChar:void 0)||b.optionalSegmentStartChar,optionalSegmentEndChar:(p!=null?p.optionalSegmentEndChar:void 0)||b.optionalSegmentEndChar,wildcardChar:(p!=null?p.wildcardChar:void 0)||b.wildcardChar},O=_(x),A=O.pattern(d),A==null)throw new Error("couldn't parse pattern");if(A.rest!=="")throw new Error("could only partially parse pattern");this.ast=A.value,this.regex=new RegExp(l(this.ast,x.segmentValueCharset)),this.names=n(this.ast)},s.prototype.match=function(d){var p,m;return m=this.regex.exec(d),m==null?null:(p=m.slice(1),this.names?$(this.names,p):p)},s.prototype.stringify=function(d){if(d==null&&(d={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(d!==Object(d))throw new Error("argument must be an object or undefined");return D(this.ast,d,{})},s.escapeForRegex=f,s.concatMap=h,s.stringConcatMap=R,s.regexGroupCount=k,s.keysAndValuesToObject=$,s.P=e,s.newParser=_,s.defaultOptions=b,s.astNodeToRegexString=l,s.astNodeToNames=n,s.getParam=g,s.astNodeContainsSegmentsForProvidedParams=o,s.stringify=D,s})})(zs,zs.exports);var ae=zs.exports,mn=Object.defineProperty,vn=Object.getOwnPropertyDescriptor,Hr=(i,t,r,e)=>{for(var s=e>1?void 0:e?vn(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&mn(t,r,s),s};const Wr="sonic-router";let Ze=class extends I($e(v)){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}connectedCallback(){this.noShadowDom="",G.onChange(this),super.connectedCallback()}disconnectedCallback(){G.offChange(this),super.disconnectedCallback()}set location(i){this._location=i,this.requestUpdate()}get location(){return this._location}render(){let i=[];for(let t of this.templatePartsList){let r=t.getAttribute(this.templateValueAttribute),e=new RegExp(r),s=new ae(r);e.test(this.location)?i.push(t):s.match(this.location)&&(t.setAttribute("mode","patternMatching"),i.push(t))}return u`${Ft(i,(t,r)=>r+new Date().getTime(),t=>{var r;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){let e="",s=t.getAttribute("dataProviderExpression");if(t.getAttribute("mode")=="patternMatching"){const o=new ae(t.getAttribute(this.templateValueAttribute));e=new ae(s).stringify(o.match(this.location))}else{const o=new RegExp(t.getAttribute(this.templateValueAttribute));let n=(this.location+"").match(o);n&&(e=(r=n.shift())==null?void 0:r.replace(o,s))}return u`<div style="display:contents" dataProvider="${e}">${Pt(t)}</div>`}return Pt(t)})}`}};Hr([a()],Ze.prototype,"location",1),Ze=Hr([y(Wr)],Ze);try{customElements.define(Wr,Ze)}catch{}var bn=Object.defineProperty,yn=Object.getOwnPropertyDescriptor,wn=(i,t,r,e)=>{for(var s=e>1?void 0:e?yn(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&bn(t,r,s),s};const Kr="sonic-redirect";let Ts=class extends I(v){constructor(){super(...arguments),this.udpateCallBack=()=>{}}connectedCallback(){this.noShadowDom="",this.style.display="none",super.connectedCallback(),this.udpateCallBack=()=>this.update(),this.publisher&&this.publisher.onInternalMutation(this.udpateCallBack)}disconnectedCallback(){this.publisher&&this.publisher.offInternalMutation(this.udpateCallBack),super.disconnectedCallback()}update(){if(!this.props)return;let i=this.getAttribute("onData").split("."),t=et.traverse(this.props,i);t&&!(et.isObject(t)&&t)&&G.changeFromComponent(this)}};Ts=wn([y(Kr)],Ts);try{customElements.define(Kr,Ts)}catch{}var $n=Object.defineProperty,xn=Object.getOwnPropertyDescriptor,Ms=(i,t,r,e)=>{for(var s=e>1?void 0:e?xn(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&$n(t,r,s),s};const Yr="sonic-states";let Pe=class extends I($e(v)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onAssign=null}connectedCallback(){if(super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;let i=this.statePath.split(".");for(let t of i)this.statePublisher=this.statePublisher[t];this.onAssign=t=>{this.state=t,this.requestUpdate()},this.statePublisher.onAssign(this.onAssign)}}disconnectedCallback(){this.statePath&&this.statePublisher.offAssign(this.onAssign),super.disconnectedCallback()}render(){let i=[],t=this.state;(!Array.isArray(t)&&et.isObject(t)||t===void 0)&&(t="");for(let r of this.templatePartsList){let e=r.getAttribute(this.templateValueAttribute),s=t;if(this.inverted&&(s=e,e=t),e==""&&(e=this.inverted?".*?":"^$"),new RegExp(e).test(s))i.push(r),r.removeAttribute("mode");else{let o=new ae(e);o.names.length>0&&o.match(s)&&(r.setAttribute("mode","patternMatching"),i.push(r))}}return u`${Ft(i,(r,e)=>e+new Date().getTime(),r=>{var e;if(r.title&&(document.title=r.title),r.hasAttribute("dataProviderExpression")){let s=r.getAttribute("dataProviderExpression"),o="",n=t,l=r.getAttribute(this.templateValueAttribute);if(this.inverted&&(n=l,l=t),l==""&&(l=this.inverted?"*":"^$"),r.getAttribute("mode")=="patternMatching"){const c=new ae(l);o=new ae(s).stringify(c.match(n))}else{const c=new RegExp(l);let h=(n+"").match(c);h&&(o=(e=h.shift())==null?void 0:e.replace(c,s))}return u`<div style="display:contents" dataProvider="${o}">${Pt(r)}</div>`}return Pt(r)})}`}};Ms([a()],Pe.prototype,"state",2),Ms([a({type:Boolean,reflect:!0})],Pe.prototype,"inverted",2),Pe=Ms([y(Yr)],Pe);try{customElements.define(Yr,Pe)}catch{}var _n=Object.defineProperty,kn=Object.getOwnPropertyDescriptor,An=(i,t,r,e)=>{for(var s=e>1?void 0:e?kn(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&_n(t,r,s),s};const Sn="sonic-scope";let Zr=class extends v{createRenderRoot(){return this}render(){return u`<slot></slot>`}};Zr=An([y(Sn)],Zr);var Pn=Object.defineProperty,Cn=Object.getOwnPropertyDescriptor,Gr=(i,t,r,e)=>{for(var s=e>1?void 0:e?Cn(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Pn(t,r,s),s};const On="sonic-example";let Rs=class extends I(v){constructor(){super(...arguments),this.text="Example"}render(){return u`${this.text}`}};Gr([a()],Rs.prototype,"text",2),Rs=Gr([y(On)],Rs);const En=w`:host { /* polices*/ --sc-font-family-base: "Inter var", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --sc-font-weight-base: 400; --sc-font-style-base: normal; --sc-headings-font-family: var(--sc-font-family-base); --sc-headings-font-style: var(--sc-font-style-base); --sc-headings-line-height: 1.1; --sc-headings-font-weight: 700; --sc-headings-text-transform: none; /* Button*/ --sc-btn-font-weight: var(--sc-font-weight-base); --sc-btn-font-family: var(--sc-font-family-base); --sc-btn-font-style: var(--sc-font-style-base); /* ROUNDED*/ --sc-rounded-sm: calc(var(--sc-rounded) * 0.5); --sc-rounded: 0.35rem; --sc-rounded-md: calc(var(--sc-rounded) * 1.8); --sc-rounded-lg: calc(var(--sc-rounded) * 3.5); --sc-rounded-xl: calc(var(--sc-rounded) * 7); --sc-btn-rounded: calc(var(--sc-rounded) * 1.2); /* Placeholder */ --sc-placeholder-bg: rgba(17, 24, 39, 0.05); /* Images*/ --sc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --sc-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --sc-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --sc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --sc-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); /* formulaires*/ --sc-border-width: max(1px, 0.085rem); --sc-form-border-width: var(--sc-border-width); --sc-input-bg: var(--sc-base-100); --sc-input-border-color: var(--sc-input-bg); --sc-input-rounded: calc(var(--sc-rounded) * 1.2); /*Couleurs -- textes sur images*/ --sc-contrast-content: #fff; --sc-contrast: #0f172a; /*Scrollbar*/ --sc-scrollbar-bg : var(--sc-base-400); }`,jn=w`:host { /*Boutons*/ --sc-primary: var(--sc-base-800); --sc-info: #2563eb; --sc-danger: #f43f5e; --sc-warning: #f97316; --sc-success: #14b8a6; --sc-primary-content: var(--sc-base); --sc-info-content: var(--sc-base); --sc-danger-content: var(--sc-base); --sc-warning-content: var(--sc-base); --sc-success-content: var(--sc-base); /*Bases*/ --sc-base: #fff; --sc-base-50: #f8fafc; --sc-base-100: #f1f5f9; --sc-base-200: #e2e8f0; --sc-base-300: #cbd5e1; --sc-base-400: #94a3b8; --sc-base-500: #64748b; --sc-base-600: #475569; --sc-base-700: #334155; --sc-base-800: #1e293b; --sc-base-900: #0f172a; --sc-base-content: var(--sc-base-700); /*formulaires*/ --sc-input-bg: var(--sc-base-100); --sc-input-color: var(--sc-base-content); }`,Xr=w`--sc-primary: var(--sc-dark-primary, var(--sc-base-700)); --sc-info: var(--sc-dark-info, #3abff8); --sc-danger: var(--sc-dark-danger, #f87272); --sc-warning: var(--sc-dark-warning, #fbbd23); --sc-success: var(--sc-dark-success, #36d399); --sc-primary-content: var(--sc-dark-primary-content, #002b3d); --sc-info-content: var(--sc-dark-info-content, #002b3d); --sc-danger-content: var(--sc-dark-danger-content, #382800); --sc-warning-content: var(--sc-dark-warning-content, #382800); --sc-success-content: var(--sc-dark-success-content, #003320); --sc-base: var(--sc-dark-base, #1d2634); --sc-base-50: var(--sc-dark-base-50, #1f2937); --sc-base-100: var(--sc-dark-base-100, #252C36); --sc-base-200: var(--sc-dark-base-200, #2c3543); --sc-base-300: var(--sc-dark-base-300, #38414e); --sc-base-400: var(--sc-dark-base-400, #515964); --sc-base-500: var(--sc-dark-base-500, #828891); --sc-base-600: var(--sc-dark-base-600, #b4b8be); --sc-base-700: var(--sc-dark-base-700, #cdd0d5); --sc-base-800: var(--sc-dark-base-800, #d9dce0); --sc-base-900: var(--sc-dark-base-900, #e5e7eb); --sc-base-content: var(--sc-dark-base-content, #e5e7eb);`,Dn=w`:host([theme="dark"]) { ${Xr} } @media (prefers-color-scheme: dark) { :host([theme="auto"]) { ${Xr} } }`;var Ln=Object.defineProperty,zn=Object.getOwnPropertyDescriptor,Jr=(i,t,r,e)=>{for(var s=e>1?void 0:e?zn(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Ln(t,r,s),s};const Tn="sonic-theme";let Ce=class extends v{constructor(){super(...arguments),this.theme="light"}connectedCallback(){super.connectedCallback(),window.addEventListener("message",i=>this.receiveMessage(i),!1),this.postCSSVars()}postCSSVars(){const i=document.styleSheets,t=i.length;let r=[];for(let e=0;e<t;e++){let s=i[e];s.href&&(s.href.includes("googleapis")||s.href.includes("typekit.net"))&&r.push(s.href)}document.querySelectorAll("iframe").forEach(e=>{var s;return(s=e.contentWindow)==null?void 0:s.postMessage({type:"SonicTheme",variables:this.getCssVariables(),fonts:r},"*")})}receiveMessage(i){let t=i.data;!t.type||t.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){let i=[],t=[...Ce.styles.map(s=>s.styleSheet),...Array.from(document.styleSheets)];for(let s of t)try{let o=s==null?void 0:s.cssRules;for(let n of o)if(n.style)for(let l of n.style)i.includes(l)||l.indexOf("--sc")!==0||i.push(l)}catch{}let r=window.getComputedStyle(this),e={};return i.forEach(s=>e[s]=r.getPropertyValue(s)),e}render(){return u`<slot></slot>`}};Ce.styles=[jn,Dn,En,w`:host([background]) { display: block !important; background: var(--sc-base) !important; } :host([color]) { color: var(--sc-base-content); } :host([font]) { font-family: var(--sc-font-family-base); font-weight: var(--sc-font-weight-base); font-style: var(--sc-font-style-base); }`],Jr([a({type:String,reflect:!0})],Ce.prototype,"theme",2),Ce=Jr([y(Tn)],Ce);var Mn=Object.defineProperty,Rn=Object.getOwnPropertyDescriptor,Ge=(i,t,r,e)=>{for(var s=e>1?void 0:e?Rn(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Mn(t,r,s),s};const Qr="sonic-badge";let Ht=class extends v{constructor(){super(...arguments),this.type="default",this.variant="default",this.size="md"}render(){return u`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`}};Ht.styles=[w`:host { --sc-badge-gap: 0.3em; --sc-badge-py: 0.15em; --sc-badge-px: 0.66em; --sc-badge-fs: 1rem; --sc-badge-color: var(--sc-base-content, #1f2937); --sc-badge-bg: var(--sc-base-200, #e5e7eb); --sc-badge-border-with: var(--sc-form-border-width, 0.1rem); --sc-badge-border-color: transparent; --sc-badge-border: var(--sc-badge-border-with) solid var(--sc-badge-border-color); --sc-badge-rounded: 9999px; --sc-badge-line-height: 1.15; --sc-badge-fw: var(--sc-font-weight-base); display: inline-flex; align-items:center; box-sizing: border-box; line-height: var(--sc-badge-line-height); border-radius: var(--sc-badge-rounded); background: var(--sc-badge-bg); color: var(--sc-badge-color); font-family: var(--sc-badge-ff, var(--sc-font-family-base, inherit)); font-weight: var(--sc-badge-fw); padding-top: var(--sc-badge-py); padding-bottom: var(--sc-badge-py); padding-left: var(--sc-badge-px); padding-right: var(--sc-badge-px); min-height: calc(var(--sc-badge-px) * 2); border: var(--sc-badge-border); } /*TYPES*/ :host([type="primary"]) { --sc-badge-color: var(--sc-primary-content); --sc-badge-bg: var(--sc-primary); } :host([type="warning"]) { --sc-badge-color: var(--sc-warning-content); --sc-badge-bg: var(--sc-warning); } :host([type="danger"]) { --sc-badge-color: var(--sc-danger-content); --sc-badge-bg: var(--sc-danger); } :host([type="info"]) { --sc-badge-color: var(--sc-info-content); --sc-badge-bg: var(--sc-info); } :host([type="success"]) { --sc-badge-color: var(--sc-success-content); --sc-badge-bg: var(--sc-success); } :host([type="neutral"]) { --sc-badge-color: var(--sc-base); --sc-badge-bg: var(--sc-base-content); } /*SIZE*/ :host { font-size: var(--sc-badge-fs); gap: var(--sc-badge-gap); } :host([size="xs"]) { --sc-badge-fs: 0.68rem; --sc-badge-gap: 0.35em; } :host([size="sm"]) { --sc-badge-fs: 0.85rem; --sc-badge-gap: 0.35em; } :host([size="lg"]) { --sc-badge-line-height: 1.2; --sc-badge-fs: 1.25rem; --sc-badge-gap: 0.5em; } :host([size="xl"]) { --sc-badge-line-height: 1.2; --sc-badge-fs: 1.5rem; --sc-badge-gap: 0.5em; } /*OUTLINE*/ :host([variant="outline"][type]) { border-width: var(--sc-badge-border-with) !important; border-color: var(--sc-badge-bg); color: var(--sc-badge-bg); background: transparent; } :host([variant="outline"][type="default"]) { border-color: var(--sc-base-400); color: var(--sc-base-500); background: transparent; } /*GHOST*/ :host([variant="ghost"][type]) { color: var(--sc-badge-bg); background: transparent; padding: 0; } :host([variant="ghost"][type="default"]) { color: var(--sc-badge-color); background: transparent; }`],Ge([a({type:String,reflect:!0})],Ht.prototype,"type",2),Ge([a({type:String,reflect:!0})],Ht.prototype,"variant",2),Ge([a({type:String,reflect:!0})],Ht.prototype,"size",2),Ht=Ge([y(Qr)],Ht);try{customElements.define(Qr,Ht)}catch{}class Nn{static fixBlankLink(t){const r="electron",e=typeof require>"u"?null:require(r);typeof e&&t.target=="_blank"&&t.addEventListener("click",()=>{e==null||e.shell.openExternal(t.href)})}}var Fn=Object.defineProperty,In=Object.getOwnPropertyDescriptor,Oe=(i,t,r,e)=>{for(var s=e>1?void 0:e?In(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Fn(t,r,s),s};const ti="sonic-link";let Ct=class extends v{constructor(){super(...arguments),this.href="",this._location="",this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(i){this._location=i,G.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(G.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),super.connectedCallback()}disconnectedCallback(){G.offChange(this),super.disconnectedCallback()}set target(i){this._target=i,Nn.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(i){i.preventDefault(),G.changeFromComponent(this)}render(){return this.href?u`<a href="${this.href}" target="${S(this.target)}" @click="${this.pushState?this.handlePushState:null}"><slot></slot></a>`:u`<slot></slot>`}};Ct.styles=[w`a { color: inherit; text-decoration: none; display:contents; }`],Oe([a({type:String})],Ct.prototype,"href",2),Oe([a({type:String})],Ct.prototype,"autoActive",2),Oe([a({type:String})],Ct.prototype,"target",1),Oe([a({type:Boolean})],Ct.prototype,"pushState",2),Ct=Oe([y(ti)],Ct);try{customElements.define(ti,Ct)}catch{}var Un=Object.defineProperty,Bn=Object.getOwnPropertyDescriptor,Ee=(i,t,r,e)=>{for(var s=e>1?void 0:e?Bn(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Un(t,r,s),s};const ei="sonic-progress";let Ot=class extends v{constructor(){super(...arguments),this.max=100,this.type="default",this.size="md"}render(){return u`<progress value="${S(this.value)}" max="${this.max}"></progress><div class="slot-container"><slot></slot><slot name="remaining"></slot></div>`}};Ot.styles=[w`:host { --sc-progress-bg: var(--sc-input-bg, var(--sc-base-100, #f5f5f5)); --sc-progress-color: var(--sc-base-content, #1f2937); --sc-progress-height: .6rem; --sc-progress-fs: 1rem; --sc-progress-fw: 500; --sc-progress-rounded: var(--sc-rounded-lg); display: block; line-height: 1.2; font-weight:var(--sc-progress-fw); font-size:var(--sc-progress-fs); color:var(--sc-progress-color); } progress { position: relative; width: 100%; -webkit-appearance: none; appearance: none; overflow: hidden; border:none; height: var(--sc-progress-height); border-radius: var(--sc-progress-rounded); background-color: var(--sc-progress-bg); color: var(--sc-progress-color); } progress::-moz-progress-bar { background-color: var(--sc-progress-color); border-radius: var(--sc-progress-rounded); } progress:not([value])::-moz-progress-bar { background-color: var(--sc-progress-bg); } progress::-webkit-progress-bar { background-color: var(--sc-progress-bg); } progress::-webkit-progress-value { background-color: var(--sc-progress-color); border-radius: var(--sc-progress-rounded); } /* Indeterminate */ progress:indeterminate:after { background-color: var(--sc-progress-color); content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 33.333333%; border-radius: var(--sc-progress-rounded); animation: progress-loading 3s infinite ease-in-out; } @keyframes progress-loading { 50% { left: 107%; } } /* COLOR TYPES */ :host([type="warning"]) { --sc-progress-color: var(--sc-warning); } :host([type="danger"]) { --sc-progress-color: var(--sc-danger); } :host([type="info"]) { --sc-progress-color: var(--sc-info); } :host([type="success"]) { --sc-progress-color: var(--sc-success); } /* SIZES */ :host([size="xs"]) { --sc-progress-height:.25rem; --sc-progress-fs: 0.68rem; } :host([size="sm"]) { --sc-progress-height:.4rem; --sc-progress-fs: 0.85rem; } :host([size="lg"]) { --sc-progress-height:1rem; --sc-progress-fs: 1.25rem; } :host([size="xl"]) { --sc-progress-height:1.5rem; --sc-progress-fs: 1.5rem; } slot[name="remaining"] { font-weight:var(--sc-font-weight-base); color:var(--sc-base-400); font-size:.85em; margin-top:.5em; } .slot-container { display:flex; justify-content: space-between; gap:.5em; }`],Ee([a({type:Number})],Ot.prototype,"value",2),Ee([a({type:Number})],Ot.prototype,"max",2),Ee([a({type:String,reflect:!0})],Ot.prototype,"type",2),Ee([a({type:String,reflect:!0})],Ot.prototype,"size",2),Ot=Ee([y(ei)],Ot);try{customElements.define(ei,Ot)}catch{}const Ns=w`* { box-sizing: border-box; } :host { --sc-input-height: var(--sc-form-height, 2.5em); --sc-input-border-width: var(--sc-form-border-width, 0.1rem); --sc-input-color: var(--sc-base-content, #1f2937); --sc-item-rounded-tr: var(--sc-input-rounded, var(--sc-rounded)); --sc-item-rounded-tl: var(--sc-input-rounded, var(--sc-rounded)); --sc-item-rounded-bl: var(--sc-input-rounded, var(--sc-rounded)); --sc-item-rounded-br: var(--sc-input-rounded, var(--sc-rounded)); --sc-input-ff: inherit; --sc-input-py: 0.6em; --sc-input-px: 1.15em; --sc-input-prefix-color: var(--sc-input-color); --sc-input-prefix-bg: var(--sc-input-bg); --sc-input-prefix-border-color: var(--sc-input-border-color); --sc-input-suffix-color: var(--sc-input-color); --sc-input-suffix-bg: var(--sc-input-bg); --sc-input-suffix-border-color: var(--sc-input-border-color); --sc-label-fs: var(--sc-input-fs); --sc-label-fw: normal; } .form-element { display: block; flex-grow: 1; width: 100%; line-height: 1.1; color: var(--sc-input-color); border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl); font-family: var(--sc-input-ff); background-color: var(--sc-input-bg, var(--sc-base, #fff)); border: var(--sc-input-border-width) solid var(--sc-input-border-color, var(--sc-base-300, #aaa)); width: 100%; font-size: var(--sc-input-fs); padding-top: var(--sc-input-py); padding-bottom: var(--sc-input-py); padding-left: var(--sc-input-px); padding-right: var(--sc-input-px); min-height: var(--sc-input-height); } label { font-size: var(--sc-label-fs); font-weight: var(--sc-label-fw); line-height: 1.2; } .form-control { display: flex; width: 100%; } /*Suffix*/ :host(:not([inlineContent])) .has-suffix slot[name="suffix"], :host(:not([inlineContent])) .has-prefix slot[name="prefix"] { min-width: var(--sc-input-height); box-sizing: border-box; display: flex; align-items: center; justify-content: center; line-height: 1.1; flex-shrink: 0; padding-left: calc(-1 * var(--sc-input-px)); padding-right: calc(-1 * var(--sc-input-px)); } :host(:not([inlineContent])) slot[name="prefix"] { border-radius: var(--sc-item-rounded-tl) 0 0 var(--sc-item-rounded-bl); background-color: var(--sc-input-prefix-bg); color: var(--sc-input-prefix-color); border: var(--sc-input-border-width) solid var(--sc-input-prefix-border-color); margin-right: calc(-1 * var(--sc-input-border-width)); } :host(:not([inlineContent])) slot[name="suffix"] { border-radius: 0 var(--sc-item-rounded-tr) var(--sc-item-rounded-br) 0; background-color: var(--sc-input-suffix-bg); color: var(--sc-input-suffix-color); border: var(--sc-input-border-width) solid var(--sc-input-suffix-border-color); margin-left: calc(-1 * var(--sc-input-border-width)); } :host(:not([inlineContent])) .has-prefix .form-element { border-top-left-radius: 0; border-bottom-left-radius: 0; } :host(:not([inlineContent])) .has-suffix .form-element { border-top-right-radius: 0; border-bottom-right-radius: 0; } /*InlineCONTENT */ :host([inlineContent]) { --sc-input-py: 0; } :host([inlineContent]) .form-element { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2em; } /*Disabled */ :host([disabled]) .form-element-container { cursor: not-allowed; } /*SIZE*/ :host { --sc-input-fs: 1rem; } :host([size="xs"]) { --sc-input-fs: 0.75rem; } :host([size="sm"]) { --sc-input-fs: 0.85rem; } :host([size="lg"]) { --sc-input-fs: 1.2rem; } :host([variant="ghost"]) .form-element { --sc-input-bg: transparent; } /*Disbaled*/ :host([disabled]) .form-element { pointer-events: none; background-color: var(--sc-base-100); border-color: transparent; color: var(--sc-base-400); } /*PLACEHOLDER*/ ::placeholder { color: inherit; opacity: 0.45; } :focus::placeholder { opacity: 0; } /*HOVER*/ :host(:not([disabled])) .form-element:hover, .form-element:focus-visible, .form-element:focus { filter: brightness(0.97); outline: none; } .form-label { margin-bottom: 0.22em; display: block; } .form-description { color: var(--sc-base-400); font-size: 0.85em; margin-top: 0.2em; display: block; } .form-element > slot, .form-element .form-element { all: unset !important; } /*Utilitaires*/ .hidden { display: none; } .contents { display: contents; } /*ERROR*/ :host([error]) { --sc-input-border-color: var(--sc-danger); } :host input:visited{ display:none; } :host([touched]) :not(:focus):invalid { --sc-input-border-color: var(--sc-danger); --sc-input-color: var(--sc-danger); } :host([touched]) :not(:focus):invalid + .select-chevron{ --sc-input-color: var(--sc-danger); } /*VALID*/ :host([touched]) :not([value=""]):not(:focus):valid { --sc-input-border-color: var(--sc-success); --sc-input-color: var(--sc-success); } :host([touched]) :not(:focus):valid + .select-chevron{ --sc-input-color: var(--sc-success); }`;var Vn=Object.defineProperty,qn=Object.getOwnPropertyDescriptor,Fs=(i,t,r,e)=>{for(var s=e>1?void 0:e?qn(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Vn(t,r,s),s};const Xe=i=>{class t extends i{constructor(...e){super(),this.type="text",this.tabindex=null,this.autocomplete=null}validateFormElement(){var s;const e=(s=this.shadowRoot)==null?void 0:s.querySelector("input");!e||e.checkValidity()||(this.getFormPublisher().isFormValid=!1,e.reportValidity())}}return Fs([a({type:String})],t.prototype,"type",2),Fs([a({type:String})],t.prototype,"tabindex",2),Fs([a({type:String})],t.prototype,"autocomplete",2),t};/**
|
|
110
|
+
*/const Et=ne(class extends ae{constructor(o){if(super(o),o.type!==Rt.CHILD)throw Error("templateContent can only be used in child bindings")}render(o){return this.vt===o?ht:(this.vt=o,document.importNode(o.content,!0))}});var hn=Object.defineProperty,dn=Object.getOwnPropertyDescriptor,pn=(o,t,s,e)=>{for(var r=e>1?void 0:e?dn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&hn(t,s,r),r};const Hs="sonic-subscriber";let Tr=class extends F(f){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(o){super.updated(o),this.children.length==0?this.style.display="none":this.style.display="contents"}render(){return u`<slot></slot>`}};Tr=pn([v(Hs)],Tr);try{customElements.define(Hs,Tr)}catch{}var un=Object.defineProperty,mn=Object.getOwnPropertyDescriptor,Ye=(o,t,s,e)=>{for(var r=e>1?void 0:e?mn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&un(t,s,r),r};const Ws="sonic-list";let Ht=class extends Mr(F(Pe(f))){constructor(){super(...arguments),this.itemPropertyMap=null,this.templateKey="template",this.idKey="id"}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isDefaultLoaderEnabled=!1,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}renderLoadingState(){return this.templateParts.skeleton?Et(this.templateParts.skeleton):u`<sonic-loader mode="inline"></sonic-loader>`}renderNoResultState(){return u`<div class="sonic-no-result-container"><sonic-icon name="emoji-puzzled" size="lg"></sonic-icon><span class="sonic-no-result-text">${this.props}</span></div>`}formatProps(){let o=this.props,t=o._sonic_http_response_,s=this.hasAttribute("extractValues");return Array.isArray(o)||(s?o=Object.entries(o).map(([e,r])=>({key:e,value:r})):!t||t.ok?o=[o]:o=[]),o._sonic_http_response_=t,o}render(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!et.isObject(this.props))return u`<div></div>`;let o=this.formatProps();if(o.length==0&&this.templateParts["no-item"])return Et(this.templateParts["no-item"]);let t=this.templateList.length,s=-1,e=this.hasAttribute("extractValues");return u`${Ut(o,(r,i)=>r[this.idKey]||i,(r,i)=>{let n=r[this.templateKey],l=n&&this.templateParts[n],c=e?r.key:i;if(c=="_sonic_http_response_")return S;let h=this.publisher[c];return h._key_=c+"",s++,l&&(s=-1),r&&u`<sonic-subscriber debug="${k(this.defferedDebug)}" .bindPublisher="${function(){return h}}" .propertyMap="${k(this.itemPropertyMap)}" dataProvider="${this.dataProvider}/list-item/${i}">${Et(l?this.templateParts[n]:this.templateList[s%t])}</sonic-subscriber>`})}`}};Ht.styles=[w`.sonic-no-result-container { color: var(--sc-base-400); font-size: 1.65rem; } sonic-icon { margin-right: 0.25em; } span { vertical-align: middle; }`],Ye([a({type:Object})],Ht.prototype,"itemPropertyMap",2),Ye([a({type:String})],Ht.prototype,"templateKey",2),Ye([a({type:String})],Ht.prototype,"idKey",2),Ht=Ye([v(Ws)],Ht);try{customElements.define(Ws,Ht)}catch{}var gn=Object.defineProperty,bn=Object.getOwnPropertyDescriptor,vt=(o,t,s,e)=>{for(var r=e>1?void 0:e?bn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&gn(t,s,r),r};const Zs="sonic-queue";let nt=class extends F(f){constructor(){super(...arguments),this.templates=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.targetRequestDuration=500,this.limit=5,this.offset=0,this.filteredFields="",this.filterPublisher=null,this.filterTimeoutId=void 0,this.dataProviderExpression="",this.idKey="id",this.currentScrollPosition=void 0,this.listDataProviders=[]}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider="sonic-queue-"+nt.instanceCounter++),this.configFilter(),super.connectedCallback(),this.key=this.getAttribute("key"),this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=new Date().getTime(),this.next()}configFilter(){var t;let o=this.getAncestorAttributeValue("dataFilterProvider");!o||(this.filterPublisher=Z.getInstance().get(o),(t=this.filterPublisher)==null||t.onInternalMutation(()=>{var s;Object.keys((s=this.filterPublisher)==null?void 0:s.get()).length!=0&&this.updateFilteredContent()}))}updateFilteredContent(){for(let o of this.listDataProviders)Z.delete(o);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout(()=>{this.props=null,this.next()},250)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(o){var h,y;let t=this.offset;const s=new Date().getTime()-this.lastRequestTime;if(o&&(!o.detail.isFirstLoad||!o.detail.props.length||this.dataProviderExpression.indexOf("$offset")==-1))return;if(!Array.isArray(this.props))this.props=[];else{const g=this.props,m=g[g.length-1];t=parseInt(m.offset.toString())+parseInt(m.limit.toString())}s>0&&o&&(this.limit=Math.round(this.limit/s*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let e=this.dataProviderExpression.replace("$offset",t+"").replace("$limit",this.limit+""),r=e.split("?"),i=r.shift(),n=new URLSearchParams(r.join("?")),l=(h=this.filterPublisher)==null?void 0:h.get(),c=this.filteredFields.split(" ");for(let g in l)this.filteredFields&&!c.includes(g)||n.set(g,l[g]);e=i+"?"+n.toString(),this.listDataProviders.push(e),this.currentScrollPosition=(y=document.scrollingElement)==null?void 0:y.scrollTop,this.props=[...this.props,{id:n.toString()+"/"+this.props.length,dataProvider:e,offset:t,limit:this.limit}],this.lastRequestTime=new Date().getTime()}render(){return this.currentScrollPosition&&window.requestAnimationFrame(()=>{document.scrollingElement&&(document.scrollingElement.scrollTop=this.currentScrollPosition),this.currentScrollPosition=void 0}),Array.isArray(this.props)?u`${Ut(this.props,o=>o.id,(o,t)=>{var e;let s=t==0?this.templates:(e=this.templates)==null?void 0:e.filter(r=>r.getAttribute("data-value")!="no-item");return u`<sonic-list fetch .itemPropertyMap="${this.itemPropertyMap}" debug="${k(this.defferedDebug)}" @load="${this.next}" key="${this.key}" @loading="${this.resetDuration}" dataProvider="${o.dataProvider}" idKey="${this.idKey}" .templates="${s}"></sonic-list>`})}`:S}};nt.instanceCounter=0,vt([a({type:Array})],nt.prototype,"templates",2),vt([a({type:Object})],nt.prototype,"itemPropertyMap",2),vt([a()],nt.prototype,"targetRequestDuration",2),vt([a()],nt.prototype,"limit",2),vt([a()],nt.prototype,"offset",2),vt([a()],nt.prototype,"filteredFields",2),vt([a({type:String})],nt.prototype,"dataProviderExpression",2),vt([a({type:String})],nt.prototype,"idKey",2),nt=vt([v(Zs)],nt);try{customElements.define(Zs,nt)}catch{}var fn=Object.defineProperty,vn=Object.getOwnPropertyDescriptor,Ge=(o,t,s,e)=>{for(var r=e>1?void 0:e?vn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&fn(t,s,r),r};const Ks="sonic-submit";let Wt=class extends F(f){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.api=null}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",()=>this.submit()),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",o=>{o.key==="Enter"&&this.submit()}),super.connectedCallback(),this.api=new oe(this.getApiConfiguration())}async submit(){var c;const o=Z.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(o.isFormValid=!0,o.invalidate(),!o.isFormValid.get())return;this.publisher&&(this.publisher.disabled=!0),o.isFormValid;let t=((c=this.getAttribute("method"))==null?void 0:c.toLocaleLowerCase())||"post",s=o.get();delete s.isFormValid;let e=Z.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get(),r=null,i=this.getAncestorAttributeValue("dataProvider"),n=this.endPoint||i;q.show();let l=async()=>{var y,g,m,x;switch(t){case"put":r=await((y=this.api)==null?void 0:y.put(n,s,e));break;case"delete":r=await((g=this.api)==null?void 0:g.delete(n,s,e));break;case"get":r=await((m=this.api)==null?void 0:m.get(n,e));break;default:r=await((x=this.api)==null?void 0:x.post(n,s,e));break}q.hide(),r||(r={messages:[{content:"Network Error",status:"error"}]});let h=this.getAncestorAttributeValue("clearedDataOnSuccess");h&&h.split(" ").forEach(_=>Z.get(_).set({})),this.submitResultKey&&(r=et.traverse(r,this.submitResultKey.split("."),!0)),Z.getInstance().get(this.getAncestorAttributeValue("submitResultDataProvider")).set(r),this.publisher&&(this.publisher.disabled=!1)};o.needsCaptchaValidation.get()?(o.captchaToken="request_token",o.captchaToken.onAssign(h=>{h!="request_token"&&l()})):l()}render(){return u`<div ?data-disabled="${this.disabled}"><slot></slot></div>`}};Wt.styles=w`[data-disabled] { opacity: 0.3; pointer-events: none; user-select: none; }`,Ge([a({type:String})],Wt.prototype,"submitResultKey",2),Ge([a({type:Boolean})],Wt.prototype,"disabled",2),Ge([a({type:String})],Wt.prototype,"endPoint",2),Wt=Ge([v(Ks)],Wt);try{customElements.define(Ks,Wt)}catch{}var yn=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Nr={exports:{}};(function(o,t){var s=[].slice;(function(e,r){return t!==null?o.exports=r():e.UrlPattern=r()})(yn,function(){var e,r,i,n,l,c,h,y,g,m,x,_,A,N,D;return g=function(d){return d.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},h=function(d,p){var b,$,P;for(P=[],b=-1,$=d.length;++b<$;)P=P.concat(p(d[b]));return P},N=function(d,p){var b,$,P;for(P="",b=-1,$=d.length;++b<$;)P+=p(d[b]);return P},A=function(d){return new RegExp(d.toString()+"|").exec("").length-1},x=function(d,p){var b,$,P,j,I;for(j={},b=-1,P=d.length;++b<P;)$=d[b],I=p[b],I!=null&&(j[$]!=null?(Array.isArray(j[$])||(j[$]=[j[$]]),j[$].push(I)):j[$]=I);return j},e={},e.Result=function(d,p){this.value=d,this.rest=p},e.Tagged=function(d,p){this.tag=d,this.value=p},e.tag=function(d,p){return function(b){var $,P;if($=p(b),$!=null)return P=new e.Tagged(d,$.value),new e.Result(P,$.rest)}},e.regex=function(d){return function(p){var b,$;if(b=d.exec(p),b!=null)return $=b[0],new e.Result($,p.slice($.length))}},e.sequence=function(){var d;return d=1<=arguments.length?s.call(arguments,0):[],function(p){var b,$,P,j,I,J;for(b=-1,$=d.length,J=[],j=p;++b<$;){if(P=d[b],I=P(j),I==null)return;J.push(I.value),j=I.rest}return new e.Result(J,j)}},e.pick=function(){var d,p;return d=arguments[0],p=2<=arguments.length?s.call(arguments,1):[],function(b){var $,P;if(P=e.sequence.apply(e,p)(b),P!=null)return $=P.value,P.value=$[d],P}},e.string=function(d){var p;return p=d.length,function(b){if(b.slice(0,p)===d)return new e.Result(d,b.slice(p))}},e.lazy=function(d){var p;return p=null,function(b){return p==null&&(p=d()),p(b)}},e.baseMany=function(d,p,b,$,P){var j,I,J,Ne;for(J=P,Ne=b?"":[];!(p!=null&&(j=p(J),j!=null)||(I=d(J),I==null));)b?Ne+=I.value:Ne.push(I.value),J=I.rest;if(!($&&Ne.length===0))return new e.Result(Ne,J)},e.many1=function(d){return function(p){return e.baseMany(d,null,!1,!0,p)}},e.concatMany1Till=function(d,p){return function(b){return e.baseMany(d,p,!0,!0,b)}},e.firstChoice=function(){var d;return d=1<=arguments.length?s.call(arguments,0):[],function(p){var b,$,P,j;for(b=-1,$=d.length;++b<$;)if(P=d[b],j=P(p),j!=null)return j}},_=function(d){var p;return p={},p.wildcard=e.tag("wildcard",e.string(d.wildcardChar)),p.optional=e.tag("optional",e.pick(1,e.string(d.optionalSegmentStartChar),e.lazy(function(){return p.pattern}),e.string(d.optionalSegmentEndChar))),p.name=e.regex(new RegExp("^["+d.segmentNameCharset+"]+")),p.named=e.tag("named",e.pick(1,e.string(d.segmentNameStartChar),e.lazy(function(){return p.name}))),p.escapedChar=e.pick(1,e.string(d.escapeChar),e.regex(/^./)),p.static=e.tag("static",e.concatMany1Till(e.firstChoice(e.lazy(function(){return p.escapedChar}),e.regex(/^./)),e.firstChoice(e.string(d.segmentNameStartChar),e.string(d.optionalSegmentStartChar),e.string(d.optionalSegmentEndChar),p.wildcard))),p.token=e.lazy(function(){return e.firstChoice(p.wildcard,p.optional,p.named,p.static)}),p.pattern=e.many1(e.lazy(function(){return p.token})),p},y={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},c=function(d,p){if(Array.isArray(d))return N(d,function(b){return c(b,p)});switch(d.tag){case"wildcard":return"(.*?)";case"named":return"(["+p+"]+)";case"static":return g(d.value);case"optional":return"(?:"+c(d.value,p)+")?"}},l=function(d,p){return p==null&&(p=y.segmentValueCharset),"^"+c(d,p)+"$"},n=function(d){if(Array.isArray(d))return h(d,n);switch(d.tag){case"wildcard":return["_"];case"named":return[d.value];case"static":return[];case"optional":return n(d.value)}},m=function(d,p,b,$){var P,j,I,J;if($==null&&($=!1),J=d[p],J==null){if($)throw new Error("no values provided for key `"+p+"`");return}if(P=b[p]||0,j=Array.isArray(J)?J.length-1:0,P>j){if($)throw new Error("too few values provided for key `"+p+"`");return}return I=Array.isArray(J)?J[P]:J,$&&(b[p]=P+1),I},i=function(d,p,b){var $,P;if(Array.isArray(d)){for($=-1,P=d.length;++$<P;)if(i(d[$],p,b))return!0;return!1}switch(d.tag){case"wildcard":return m(p,"_",b,!1)!=null;case"named":return m(p,d.value,b,!1)!=null;case"static":return!1;case"optional":return i(d.value,p,b)}},D=function(d,p,b){if(Array.isArray(d))return N(d,function($){return D($,p,b)});switch(d.tag){case"wildcard":return m(p,"_",b,!0);case"named":return m(p,d.value,b,!0);case"static":return d.value;case"optional":return i(d.value,p,b)?D(d.value,p,b):""}},r=function(d,p){var b,$,P,j,I;if(d instanceof r){this.isRegex=d.isRegex,this.regex=d.regex,this.ast=d.ast,this.names=d.names;return}if(this.isRegex=d instanceof RegExp,!(typeof d=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=d,p!=null){if(!Array.isArray(p))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(b=A(this.regex),p.length!==b)throw new Error("regex contains "+b+" groups but array of group names contains "+p.length);this.names=p}return}if(d==="")throw new Error("argument must not be the empty string");if(I=d.replace(/\s+/g,""),I!==d)throw new Error("argument must not contain whitespace");if($={escapeChar:(p!=null?p.escapeChar:void 0)||y.escapeChar,segmentNameStartChar:(p!=null?p.segmentNameStartChar:void 0)||y.segmentNameStartChar,segmentNameCharset:(p!=null?p.segmentNameCharset:void 0)||y.segmentNameCharset,segmentValueCharset:(p!=null?p.segmentValueCharset:void 0)||y.segmentValueCharset,optionalSegmentStartChar:(p!=null?p.optionalSegmentStartChar:void 0)||y.optionalSegmentStartChar,optionalSegmentEndChar:(p!=null?p.optionalSegmentEndChar:void 0)||y.optionalSegmentEndChar,wildcardChar:(p!=null?p.wildcardChar:void 0)||y.wildcardChar},j=_($),P=j.pattern(d),P==null)throw new Error("couldn't parse pattern");if(P.rest!=="")throw new Error("could only partially parse pattern");this.ast=P.value,this.regex=new RegExp(l(this.ast,$.segmentValueCharset)),this.names=n(this.ast)},r.prototype.match=function(d){var p,b;return b=this.regex.exec(d),b==null?null:(p=b.slice(1),this.names?x(this.names,p):p)},r.prototype.stringify=function(d){if(d==null&&(d={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(d!==Object(d))throw new Error("argument must be an object or undefined");return D(this.ast,d,{})},r.escapeForRegex=g,r.concatMap=h,r.stringConcatMap=N,r.regexGroupCount=A,r.keysAndValuesToObject=x,r.P=e,r.newParser=_,r.defaultOptions=y,r.astNodeToRegexString=l,r.astNodeToNames=n,r.getParam=m,r.astNodeContainsSegmentsForProvidedParams=i,r.stringify=D,r})})(Nr,Nr.exports);var he=Nr.exports,wn=Object.defineProperty,xn=Object.getOwnPropertyDescriptor,Ys=(o,t,s,e)=>{for(var r=e>1?void 0:e?xn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&wn(t,s,r),r};const Gs="sonic-router";let Qe=class extends F(Pe(f)){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}connectedCallback(){this.noShadowDom="",G.onChange(this),super.connectedCallback()}disconnectedCallback(){G.offChange(this),super.disconnectedCallback()}set location(o){this._location=o,this.requestUpdate()}get location(){return this._location}render(){let o=[];for(let t of this.templatePartsList){let s=t.getAttribute(this.templateValueAttribute),e=new RegExp(s),r=new he(s);e.test(this.location)?o.push(t):r.match(this.location)&&(t.setAttribute("mode","patternMatching"),o.push(t))}return u`${Ut(o,(t,s)=>s+new Date().getTime(),t=>{var s;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){let e="",r=t.getAttribute("dataProviderExpression");if(t.getAttribute("mode")=="patternMatching"){const i=new he(t.getAttribute(this.templateValueAttribute));e=new he(r).stringify(i.match(this.location))}else{const i=new RegExp(t.getAttribute(this.templateValueAttribute));let n=(this.location+"").match(i);n&&(e=(s=n.shift())==null?void 0:s.replace(i,r))}return u`<div style="display:contents" dataProvider="${e}">${Et(t)}</div>`}return Et(t)})}`}};Ys([a()],Qe.prototype,"location",1),Qe=Ys([v(Gs)],Qe);try{customElements.define(Gs,Qe)}catch{}var $n=Object.defineProperty,kn=Object.getOwnPropertyDescriptor,_n=(o,t,s,e)=>{for(var r=e>1?void 0:e?kn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&$n(t,s,r),r};const Qs="sonic-redirect";let Ir=class extends F(f){constructor(){super(...arguments),this.udpateCallBack=()=>{}}connectedCallback(){this.noShadowDom="",this.style.display="none",super.connectedCallback(),this.udpateCallBack=()=>this.update(),this.publisher&&this.publisher.onInternalMutation(this.udpateCallBack)}disconnectedCallback(){this.publisher&&this.publisher.offInternalMutation(this.udpateCallBack),super.disconnectedCallback()}update(){if(!this.props)return;let o=this.getAttribute("onData").split("."),t=et.traverse(this.props,o);t&&!(et.isObject(t)&&t)&&G.changeFromComponent(this)}};Ir=_n([v(Qs)],Ir);try{customElements.define(Qs,Ir)}catch{}var An=Object.defineProperty,Pn=Object.getOwnPropertyDescriptor,Rr=(o,t,s,e)=>{for(var r=e>1?void 0:e?Pn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&An(t,s,r),r};const Js="sonic-states";let ze=class extends F(Pe(f)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onAssign=null}connectedCallback(){if(super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;let o=this.statePath.split(".");for(let t of o)this.statePublisher=this.statePublisher[t];this.onAssign=t=>{this.state=t,this.requestUpdate()},this.statePublisher.onAssign(this.onAssign)}}disconnectedCallback(){this.statePath&&this.statePublisher.offAssign(this.onAssign),super.disconnectedCallback()}render(){let o=[],t=this.state;(!Array.isArray(t)&&et.isObject(t)||t===void 0)&&(t="");for(let s of this.templatePartsList){let e=s.getAttribute(this.templateValueAttribute),r=t;if(this.inverted&&(r=e,e=t),e==""&&(e=this.inverted?".*?":"^$"),new RegExp(e).test(r))o.push(s),s.removeAttribute("mode");else{let i=new he(e);i.names.length>0&&i.match(r)&&(s.setAttribute("mode","patternMatching"),o.push(s))}}return u`${Ut(o,(s,e)=>e+new Date().getTime(),s=>{var e;if(s.title&&(document.title=s.title),s.hasAttribute("dataProviderExpression")){let r=s.getAttribute("dataProviderExpression"),i="",n=t,l=s.getAttribute(this.templateValueAttribute);if(this.inverted&&(n=l,l=t),l==""&&(l=this.inverted?"*":"^$"),s.getAttribute("mode")=="patternMatching"){const c=new he(l);i=new he(r).stringify(c.match(n))}else{const c=new RegExp(l);let h=(n+"").match(c);h&&(i=(e=h.shift())==null?void 0:e.replace(c,r))}return u`<div style="display:contents" dataProvider="${i}">${Et(s)}</div>`}return Et(s)})}`}};Rr([a()],ze.prototype,"state",2),Rr([a({type:Boolean,reflect:!0})],ze.prototype,"inverted",2),ze=Rr([v(Js)],ze);try{customElements.define(Js,ze)}catch{}var Sn=Object.defineProperty,Cn=Object.getOwnPropertyDescriptor,On=(o,t,s,e)=>{for(var r=e>1?void 0:e?Cn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Sn(t,s,r),r};const En="sonic-scope";let Xs=class extends f{createRenderRoot(){return this}render(){return u`<slot></slot>`}};Xs=On([v(En)],Xs);var jn=Object.defineProperty,zn=Object.getOwnPropertyDescriptor,to=(o,t,s,e)=>{for(var r=e>1?void 0:e?zn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&jn(t,s,r),r};const Dn="sonic-example";let Fr=class extends F(f){constructor(){super(...arguments),this.text="Example"}render(){return u`${this.text}`}};to([a()],Fr.prototype,"text",2),Fr=to([v(Dn)],Fr);const Ln=w`:host { /* polices*/ --sc-font-family-base: "Inter var", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --sc-font-weight-base: 400; --sc-font-style-base: normal; --sc-headings-font-family: var(--sc-font-family-base); --sc-headings-font-style: var(--sc-font-style-base); --sc-headings-line-height: 1.1; --sc-headings-font-weight: 700; --sc-headings-text-transform: none; /* Button*/ --sc-btn-font-weight: var(--sc-font-weight-base); --sc-btn-font-family: var(--sc-font-family-base); --sc-btn-font-style: var(--sc-font-style-base); /* ROUNDED*/ --sc-rounded-sm: calc(var(--sc-rounded) * 0.5); --sc-rounded: 0.375rem; --sc-rounded-md: calc(var(--sc-rounded) * 1.8); --sc-rounded-lg: calc(var(--sc-rounded) * 3.5); --sc-rounded-xl: calc(var(--sc-rounded) * 7); --sc-rounded-size-intensity: calc((1em - 1rem) * .4); /* 4 for rounded full*/ --sc-btn-rounded-intensity : 1.4; --sc-btn-font-weight: 500; --sc-btn-rounded: calc((var(--sc-rounded) + var(--sc-rounded-size-intensity)) * var(--sc-btn-rounded-intensity) ); /* Placeholder */ --sc-placeholder-bg: rgba(17, 24, 39, 0.05); /* OMBRES */ --sc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --sc-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --sc-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --sc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --sc-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); /* Forms */ --sc-border-width: max(1px, 0.12rem); --sc-form-height : 2.5em; --sc-form-border-width: var(--sc-border-width); --sc-input-bg: var(--sc-base-100); --sc-input-border-color: var(--sc-input-bg); --sc-input-rounded-intensity : 1.4; --sc-input-rounded: calc((var(--sc-rounded) + var(--sc-rounded-size-intensity)) * var(--sc-input-rounded-intensity) ); --sc-label-font-weight: 500; /* Contrast -- ex : Text on images */ --sc-contrast-content: #fff; --sc-contrast: #11151f; /*Scrollbar*/ --sc-scrollbar-bg : var(--sc-base-400); /*Body*/ --sc-body-bg: var(--sc-base); }`,Mn=w`:host { /*Boutons*/ --sc-primary: var(--sc-base-800); --sc-info: #2563eb; --sc-danger: #f43f5e; --sc-warning: #f97316; --sc-success: #14b8a6; --sc-primary-content: var(--sc-base); --sc-info-content: var(--sc-base); --sc-danger-content: var(--sc-base); --sc-warning-content: var(--sc-base); --sc-success-content: var(--sc-base); /*Bases*/ --sc-base: #fff; --sc-base-50: #f8fafc; --sc-base-100: #f1f5f9; --sc-base-200: #e2e8f0; --sc-base-300: #cbd5e1; --sc-base-400: #94a3b8; --sc-base-500: #64748b; --sc-base-600: #475569; --sc-base-700: #334155; --sc-base-800: #1e293b; --sc-base-900: #0f172a; --sc-base-content: var(--sc-base-700); /*formulaires*/ --sc-input-bg: var(--sc-base-100); --sc-input-color: var(--sc-base-content); }`,eo=w`--sc-primary: var(--sc-dark-primary, var(--sc-base-700)); --sc-info: var(--sc-dark-info, #3abff8); --sc-danger: var(--sc-dark-danger, #f87272); --sc-warning: var(--sc-dark-warning, #fbbd23); --sc-success: var(--sc-dark-success, #36d399); --sc-primary-content: var(--sc-dark-primary-content, #002b3d); --sc-info-content: var(--sc-dark-info-content, #002b3d); --sc-danger-content: var(--sc-dark-danger-content, #382800); --sc-warning-content: var(--sc-dark-warning-content, #382800); --sc-success-content: var(--sc-dark-success-content, #003320); --sc-base: var(--sc-dark-base, #1d2634); --sc-base-50: var(--sc-dark-base-50, #1f2937); --sc-base-100: var(--sc-dark-base-100, #252C36); --sc-base-200: var(--sc-dark-base-200, #2c3543); --sc-base-300: var(--sc-dark-base-300, #38414e); --sc-base-400: var(--sc-dark-base-400, #515964); --sc-base-500: var(--sc-dark-base-500, #828891); --sc-base-600: var(--sc-dark-base-600, #b4b8be); --sc-base-700: var(--sc-dark-base-700, #cdd0d5); --sc-base-800: var(--sc-dark-base-800, #d9dce0); --sc-base-900: var(--sc-dark-base-900, #e5e7eb); --sc-base-content: var(--sc-dark-base-content, #e5e7eb);`,Tn=w`:host([theme="dark"]) { ${eo} } @media (prefers-color-scheme: dark) { :host([theme="auto"]) { ${eo} } }`;var Nn=w`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::-webkit-backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where([class~="lead"]):not(:where([class~="not-prose"] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~="not-prose"] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~="not-prose"] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~="not-prose"] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~="not-prose"] *)){color:inherit}.prose :where(thead th strong):not(:where([class~="not-prose"] *)){color:inherit}.prose :where(ol):not(:where([class~="not-prose"] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol[type="A"]):not(:where([class~="not-prose"] *)){list-style-type:upper-alpha}.prose :where(ol[type="a"]):not(:where([class~="not-prose"] *)){list-style-type:lower-alpha}.prose :where(ol[type="A" s]):not(:where([class~="not-prose"] *)){list-style-type:upper-alpha}.prose :where(ol[type="a" s]):not(:where([class~="not-prose"] *)){list-style-type:lower-alpha}.prose :where(ol[type="I"]):not(:where([class~="not-prose"] *)){list-style-type:upper-roman}.prose :where(ol[type="i"]):not(:where([class~="not-prose"] *)){list-style-type:lower-roman}.prose :where(ol[type="I" s]):not(:where([class~="not-prose"] *)){list-style-type:upper-roman}.prose :where(ol[type="i" s]):not(:where([class~="not-prose"] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~="not-prose"] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~="not-prose"] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol > li):not(:where([class~="not-prose"] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul > li):not(:where([class~="not-prose"] *))::marker{color:var(--tw-prose-bullets)}.prose :where(hr):not(:where([class~="not-prose"] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~="not-prose"] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"\\201c""\\201d""\\2018""\\2019";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose :where(blockquote p:first-of-type):not(:where([class~="not-prose"] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~="not-prose"] *)):after{content:close-quote}.prose :where(h1):not(:where([class~="not-prose"] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~="not-prose"] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~="not-prose"] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~="not-prose"] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~="not-prose"] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~="not-prose"] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~="not-prose"] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~="not-prose"] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~="not-prose"] *)){margin-top:2em;margin-bottom:2em}.prose :where(figure > *):not(:where([class~="not-prose"] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~="not-prose"] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose :where(code):not(:where([class~="not-prose"] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~="not-prose"] *)):before{content:"\`"}.prose :where(code):not(:where([class~="not-prose"] *)):after{content:"\`"}.prose :where(a code):not(:where([class~="not-prose"] *)){color:inherit}.prose :where(h1 code):not(:where([class~="not-prose"] *)){color:inherit}.prose :where(h2 code):not(:where([class~="not-prose"] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~="not-prose"] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~="not-prose"] *)){color:inherit}.prose :where(blockquote code):not(:where([class~="not-prose"] *)){color:inherit}.prose :where(thead th code):not(:where([class~="not-prose"] *)){color:inherit}.prose :where(pre):not(:where([class~="not-prose"] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre code):not(:where([class~="not-prose"] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~="not-prose"] *)):before{content:none}.prose :where(pre code):not(:where([class~="not-prose"] *)):after{content:none}.prose :where(table):not(:where([class~="not-prose"] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~="not-prose"] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~="not-prose"] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~="not-prose"] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~="not-prose"] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~="not-prose"] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~="not-prose"] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~="not-prose"] *)){vertical-align:top}.prose{--tw-prose-body: var(--sc-base-content);--tw-prose-headings: var(--sc-base-900);--tw-prose-lead: var(--sc-base-600);--tw-prose-links: var(--sc-base-900);--tw-prose-bold: var(--sc-base-900);--tw-prose-counters: var(--sc-base-500);--tw-prose-bullets: var(--sc-base-300);--tw-prose-hr: var(--sc-base-200);--tw-prose-quotes: var(--sc-base-900);--tw-prose-quote-borders: var(--sc-base-200);--tw-prose-captions: var(--sc-base-500);--tw-prose-code: var(--sc-base-900);--tw-prose-pre-code: var(--sc-base-200);--tw-prose-pre-bg: var(--sc-base-800);--tw-prose-th-borders: var(--sc-base-300);--tw-prose-td-borders: var(--sc-base-200);--tw-prose-invert-body: var(--sc-base-300);--tw-prose-invert-headings: var(--sc-base);--tw-prose-invert-lead: var(--sc-base-400);--tw-prose-invert-links: var(--sc-base);--tw-prose-invert-bold: var(--sc-base);--tw-prose-invert-counters: var(--sc-base-400);--tw-prose-invert-bullets: var(--sc-base-600);--tw-prose-invert-hr: var(--sc-base-700);--tw-prose-invert-quotes: var(--sc-base-100);--tw-prose-invert-quote-borders: var(--sc-base-700);--tw-prose-invert-captions: var(--sc-base-400);--tw-prose-invert-code: var(--sc-base);--tw-prose-invert-pre-code: var(--sc-base-300);--tw-prose-invert-pre-bg: var(--sc-base-900);--tw-prose-invert-th-borders: var(--sc-base-600);--tw-prose-invert-td-borders: var(--sc-base-700);font-size:1rem;line-height:1.75}.prose :where(p):not(:where([class~="not-prose"] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(video):not(:where([class~="not-prose"] *)){margin-top:2em;margin-bottom:2em}.prose :where(figure):not(:where([class~="not-prose"] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~="not-prose"] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol > li):not(:where([class~="not-prose"] *)){padding-left:.375em}.prose :where(ul > li):not(:where([class~="not-prose"] *)){padding-left:.375em}.prose :where(.prose > ul > li p):not(:where([class~="not-prose"] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.25em}.prose :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.25em}.prose :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.25em}.prose :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~="not-prose"] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(hr + *):not(:where([class~="not-prose"] *)){margin-top:0}.prose :where(h2 + *):not(:where([class~="not-prose"] *)){margin-top:0}.prose :where(h3 + *):not(:where([class~="not-prose"] *)){margin-top:0}.prose :where(h4 + *):not(:where([class~="not-prose"] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~="not-prose"] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~="not-prose"] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~="not-prose"] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~="not-prose"] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~="not-prose"] *)){padding-right:0}.prose :where(.prose > :first-child):not(:where([class~="not-prose"] *)){margin-top:0}.prose :where(.prose > :last-child):not(:where([class~="not-prose"] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~="not-prose"] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~="lead"]):not(:where([class~="not-prose"] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~="not-prose"] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-left:1.1111111em}.prose-sm :where(h1):not(:where([class~="not-prose"] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~="not-prose"] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~="not-prose"] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~="not-prose"] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~="not-prose"] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(video):not(:where([class~="not-prose"] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure):not(:where([class~="not-prose"] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure > *):not(:where([class~="not-prose"] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~="not-prose"] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(code):not(:where([class~="not-prose"] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~="not-prose"] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~="not-prose"] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~="not-prose"] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding:.6666667em 1em}.prose-sm :where(ol):not(:where([class~="not-prose"] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(ul):not(:where([class~="not-prose"] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(li):not(:where([class~="not-prose"] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol > li):not(:where([class~="not-prose"] *)){padding-left:.4285714em}.prose-sm :where(ul > li):not(:where([class~="not-prose"] *)){padding-left:.4285714em}.prose-sm :where(.prose > ul > li p):not(:where([class~="not-prose"] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.1428571em}.prose-sm :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.1428571em}.prose-sm :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~="not-prose"] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(hr):not(:where([class~="not-prose"] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr + *):not(:where([class~="not-prose"] *)){margin-top:0}.prose-sm :where(h2 + *):not(:where([class~="not-prose"] *)){margin-top:0}.prose-sm :where(h3 + *):not(:where([class~="not-prose"] *)){margin-top:0}.prose-sm :where(h4 + *):not(:where([class~="not-prose"] *)){margin-top:0}.prose-sm :where(table):not(:where([class~="not-prose"] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~="not-prose"] *)){padding-right:1em;padding-bottom:.6666667em;padding-left:1em}.prose-sm :where(thead th:first-child):not(:where([class~="not-prose"] *)){padding-left:0}.prose-sm :where(thead th:last-child):not(:where([class~="not-prose"] *)){padding-right:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~="not-prose"] *)){padding:.6666667em 1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~="not-prose"] *)){padding-left:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~="not-prose"] *)){padding-right:0}.prose-sm :where(.prose > :first-child):not(:where([class~="not-prose"] *)){margin-top:0}.prose-sm :where(.prose > :last-child):not(:where([class~="not-prose"] *)){margin-bottom:0}.prose-base :where(.prose > ul > li p):not(:where([class~="not-prose"] *)){margin-top:.75em;margin-bottom:.75em}.prose-base :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.25em}.prose-base :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.25em}.prose-base :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.25em}.prose-base :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.25em}.prose-base :where(.prose > :first-child):not(:where([class~="not-prose"] *)){margin-top:0}.prose-base :where(.prose > :last-child):not(:where([class~="not-prose"] *)){margin-bottom:0}.prose-lg :where(.prose > ul > li p):not(:where([class~="not-prose"] *)){margin-top:.8888889em;margin-bottom:.8888889em}.prose-lg :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.3333333em}.prose-lg :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.3333333em}.prose-lg :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.3333333em}.prose-lg :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.3333333em}.prose-lg :where(.prose > :first-child):not(:where([class~="not-prose"] *)){margin-top:0}.prose-lg :where(.prose > :last-child):not(:where([class~="not-prose"] *)){margin-bottom:0}.prose-xl :where(.prose > ul > li p):not(:where([class~="not-prose"] *)){margin-top:.8em;margin-bottom:.8em}.prose-xl :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.2em}.prose-xl :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.2em}.prose-xl :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.2em}.prose-xl :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.2em}.prose-xl :where(.prose > :first-child):not(:where([class~="not-prose"] *)){margin-top:0}.prose-xl :where(.prose > :last-child):not(:where([class~="not-prose"] *)){margin-bottom:0}.prose-2xl :where(.prose > ul > li p):not(:where([class~="not-prose"] *)){margin-top:.8333333em;margin-bottom:.8333333em}.prose-2xl :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.3333333em}.prose-2xl :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.3333333em}.prose-2xl :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.3333333em}.prose-2xl :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.3333333em}.prose-2xl :where(.prose > :first-child):not(:where([class~="not-prose"] *)){margin-top:0}.prose-2xl :where(.prose > :last-child):not(:where([class~="not-prose"] *)){margin-bottom:0}.prose-tight :where(p,ul,ol,pre):not(:where([class~="not-prose"] *)){line-height:1.25;margin:0 0 .5em}.prose-tight :where(li):not(:where([class~="not-prose"] *)){margin-bottom:.5em}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:-webkit-sticky;position:sticky}.top-0{top:0px}.left-0{left:0px}.right-1{right:.25rem}.bottom-1{bottom:.25rem}.bottom-4{bottom:1rem}.left-4{left:1rem}.right-4{right:1rem}.top-\\[-1px\\]{top:-1px}.right-5{right:1.25rem}.top-1\\/2{top:50%}.bottom-0{bottom:0px}.-right-1{right:-.25rem}.-bottom-1{bottom:-.25rem}.z-10{z-index:10}.z-20{z-index:20}.z-0{z-index:0}.col-span-full{grid-column:1 / -1}.col-span-3{grid-column:span 3 / span 3}.col-span-2{grid-column:span 2 / span 2}.mx-auto{margin-left:auto;margin-right:auto}.my-8{margin-top:2rem;margin-bottom:2rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-auto{margin-top:auto;margin-bottom:auto}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-\\[-3vw\\]{margin-left:-3vw;margin-right:-3vw}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.mb-4{margin-bottom:1rem}.mt-5{margin-top:1.25rem}.mb-1{margin-bottom:.25rem}.mb-6{margin-bottom:1.5rem}.mr-4{margin-right:1rem}.mb-2{margin-bottom:.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.mb-5{margin-bottom:1.25rem}.mt-8{margin-top:2rem}.mr-3{margin-right:.75rem}.mt-\\[\\.15em\\]{margin-top:.15em}.mb-10{margin-bottom:2.5rem}.mb-7{margin-bottom:1.75rem}.mb-12{margin-bottom:3rem}.mb-3{margin-bottom:.75rem}.mt-2{margin-top:.5rem}.ml-\\[\\.10em\\]{margin-left:.1em}.ml-3{margin-left:.75rem}.mt-4{margin-top:1rem}.mt-1{margin-top:.25rem}.mr-2{margin-right:.5rem}.mt-3{margin-top:.75rem}.ml-auto{margin-left:auto}.mb-\\[2em\\]{margin-bottom:2em}.mr-1{margin-right:.25rem}.mb-20{margin-bottom:5rem}.ml-2{margin-left:.5rem}.mr-\\[\\.25em\\]{margin-right:.25em}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-12{height:3rem}.h-20{height:5rem}.h-2{height:.5rem}.h-5{height:1.25rem}.h-1\\/2{height:50%}.h-96{height:24rem}.max-h-\\[10rem\\]{max-height:10rem}.w-full{width:100%}.w-72{width:18rem}.w-12{width:3rem}.w-20{width:5rem}.w-2{width:.5rem}.w-5{width:1.25rem}.w-10\\/12{width:83.333333%}.w-24{width:6rem}.w-\\[1\\.2em\\]{width:1.2em}.min-w-full{min-width:100%}.min-w-max{min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.min-w-\\[11rem\\]{min-width:11rem}.min-w-\\[5rem\\]{min-width:5rem}.max-w-lg{max-width:32rem}.max-w-xs{max-width:20rem}.max-w-\\[80ch\\]{max-width:80ch}.max-w-\\[32rem\\]{max-width:32rem}.max-w-\\[20rem\\]{max-width:20rem}.max-w-none{max-width:none}.flex-shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\\/2{--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\\/2{--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-\\[minmax\\(0\\,1fr\\)\\,minmax\\(0\\,4fr\\)\\]{grid-template-columns:minmax(0,1fr) minmax(0,4fr)}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-\\[1fr\\,_2fr\\]{grid-template-columns:1fr 2fr}.grid-cols-\\[minmax\\(0\\,_3fr\\)_minmax\\(0\\,_2fr\\)\\]{grid-template-columns:minmax(0,3fr) minmax(0,2fr)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\\[minmax\\(6rem\\,_min\\(20\\%\\,_10rem\\)\\)\\,_1fr\\]{grid-template-columns:minmax(6rem,min(20%,10rem)) 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-around{justify-content:space-around}.gap-5{gap:1.25rem}.gap-8{gap:2rem}.gap-3{gap:.75rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-10{gap:2.5rem}.gap-1{gap:.25rem}.gap-6{gap:1.5rem}.gap-\\[1\\.5em\\]{gap:1.5em}.gap-\\[\\.2rem_\\.7rem\\]{gap:.2rem .7rem}.gap-\\[\\.25em\\]{gap:.25em}.gap-x-10{-moz-column-gap:2.5rem;column-gap:2.5rem}.gap-x-\\[\\.75em\\]{-moz-column-gap:.75em;column-gap:.75em}.self-start{align-self:flex-start}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-lg{border-radius:var(--sc-rounded-lg)}.rounded-md{border-radius:var(--sc-rounded-md)}.rounded{border-radius:var(--sc-rounded)}.rounded-full{border-radius:9999px}.rounded-t-md{border-top-left-radius:var(--sc-rounded-md);border-top-right-radius:var(--sc-rounded-md)}.border{border-width:var(--sc-border-width)}.border-b-\\[1px\\]{border-bottom-width:1px}.border-solid{border-style:solid}.border-dotted{border-style:dotted}.border-success{border-color:var(--sc-success)}.border-t-neutral-200{border-top-color:var(--sc-base-200)}.border-b-neutral-100{border-bottom-color:var(--sc-base-100)}.border-b-neutral-300{border-bottom-color:var(--sc-base-300)}.bg-danger{background-color:var(--sc-danger)}.bg-neutral-0{background-color:var(--sc-base)}.bg-neutral-200{background-color:var(--sc-base-200)}.bg-contrast{background-color:var(--sc-contrast)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-\\[rgba\\(0\\,0\\,10\\,\\.2\\)\\]{--tw-gradient-from: rgba(0,0,10,.2);--tw-gradient-to: rgb(0 0 10 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.object-contain{-o-object-fit:contain;object-fit:contain}.p-7{padding:1.75rem}.p-4{padding:1rem}.p-3{padding:.75rem}.p-5{padding:1.25rem}.p-8{padding:2rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-7{padding-top:1.75rem;padding-bottom:1.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.px-\\[3vw\\]{padding-left:3vw;padding-right:3vw}.py-2{padding-top:.5rem;padding-bottom:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.pt-20{padding-top:5rem}.pr-3{padding-right:.75rem}.pt-\\[\\.06em\\]{padding-top:.06em}.text-center{text-align:center}.font-headings{font-family:var(--sc-headings-font-family)}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-normal{font-weight:400}.font-black{font-weight:900}.font-medium{font-weight:500}.font-extrabold{font-weight:800}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.leading-none{line-height:1}.leading-tight{line-height:1.25}.text-neutral-0{color:var(--sc-base)}.text-neutral-300{color:var(--sc-base-300)}.text-primary{color:var(--sc-primary)}.text-neutral-500{color:var(--sc-base-500)}.text-contrast-content{color:var(--sc-contrast-content)}.text-neutral-400{color:var(--sc-base-400)}.text-info{color:var(--sc-info)}.underline{-webkit-text-decoration-line:underline;text-decoration-line:underline}.no-underline{-webkit-text-decoration-line:none;text-decoration-line:none}.opacity-60{opacity:.6}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_0_2rem_rgba\\(0\\,0\\,0\\,0\\.2\\)\\]{--tw-shadow: 0 0 2rem rgba(0,0,0,.2);--tw-shadow-colored: 0 0 2rem var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-danger{--tw-shadow-color: var(--sc-danger);--tw-shadow: var(--tw-shadow-colored)}.outline{outline-style:solid}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.\\[display\\:none\\]{display:none}.hover\\:text-neutral-400:hover{color:var(--sc-base-400)}.group:hover .group-hover\\:underline{-webkit-text-decoration-line:underline;text-decoration-line:underline}.prose-img\\:rounded-lg :is(:where(img):not(:where([class~="not-prose"] *))){border-radius:var(--sc-rounded-lg)}@media (min-width: 640px){.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 768px){.md\\:block{display:block}.md\\:hidden{display:none}.md\\:grid-cols-\\[minmax\\(0\\,2fr\\)\\,minmax\\(0\\,5fr\\)\\]{grid-template-columns:minmax(0,2fr) minmax(0,5fr)}.md\\:py-4{padding-top:1rem;padding-bottom:1rem}.md\\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 1024px){.lg\\:prose-lg{font-size:1.125rem;line-height:1.7777778}.lg\\:prose-lg :where(p):not(:where([class~="not-prose"] *)){margin-top:1.3333333em;margin-bottom:1.3333333em}.lg\\:prose-lg :where([class~="lead"]):not(:where([class~="not-prose"] *)){font-size:1.2222222em;line-height:1.4545455;margin-top:1.0909091em;margin-bottom:1.0909091em}.lg\\:prose-lg :where(blockquote):not(:where([class~="not-prose"] *)){margin-top:1.6666667em;margin-bottom:1.6666667em;padding-left:1em}.lg\\:prose-lg :where(h1):not(:where([class~="not-prose"] *)){font-size:2.6666667em;margin-top:0;margin-bottom:.8333333em;line-height:1}.lg\\:prose-lg :where(h2):not(:where([class~="not-prose"] *)){font-size:1.6666667em;margin-top:1.8666667em;margin-bottom:1.0666667em;line-height:1.3333333}.lg\\:prose-lg :where(h3):not(:where([class~="not-prose"] *)){font-size:1.3333333em;margin-top:1.6666667em;margin-bottom:.6666667em;line-height:1.5}.lg\\:prose-lg :where(h4):not(:where([class~="not-prose"] *)){margin-top:1.7777778em;margin-bottom:.4444444em;line-height:1.5555556}.lg\\:prose-lg :where(img):not(:where([class~="not-prose"] *)){margin-top:1.7777778em;margin-bottom:1.7777778em}.lg\\:prose-lg :where(video):not(:where([class~="not-prose"] *)){margin-top:1.7777778em;margin-bottom:1.7777778em}.lg\\:prose-lg :where(figure):not(:where([class~="not-prose"] *)){margin-top:1.7777778em;margin-bottom:1.7777778em}.lg\\:prose-lg :where(figure > *):not(:where([class~="not-prose"] *)){margin-top:0;margin-bottom:0}.lg\\:prose-lg :where(figcaption):not(:where([class~="not-prose"] *)){font-size:.8888889em;line-height:1.5;margin-top:1em}.lg\\:prose-lg :where(code):not(:where([class~="not-prose"] *)){font-size:.8888889em}.lg\\:prose-lg :where(h2 code):not(:where([class~="not-prose"] *)){font-size:.8666667em}.lg\\:prose-lg :where(h3 code):not(:where([class~="not-prose"] *)){font-size:.875em}.lg\\:prose-lg :where(pre):not(:where([class~="not-prose"] *)){font-size:.8888889em;line-height:1.75;margin-top:2em;margin-bottom:2em;border-radius:.375rem;padding:1em 1.5em}.lg\\:prose-lg :where(ol):not(:where([class~="not-prose"] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-left:1.5555556em}.lg\\:prose-lg :where(ul):not(:where([class~="not-prose"] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-left:1.5555556em}.lg\\:prose-lg :where(li):not(:where([class~="not-prose"] *)){margin-top:.6666667em;margin-bottom:.6666667em}.lg\\:prose-lg :where(ol > li):not(:where([class~="not-prose"] *)){padding-left:.4444444em}.lg\\:prose-lg :where(ul > li):not(:where([class~="not-prose"] *)){padding-left:.4444444em}.lg\\:prose-lg :where(.prose > ul > li p):not(:where([class~="not-prose"] *)){margin-top:.8888889em;margin-bottom:.8888889em}.lg\\:prose-lg :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.3333333em}.lg\\:prose-lg :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.3333333em}.lg\\:prose-lg :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.3333333em}.lg\\:prose-lg :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.3333333em}.lg\\:prose-lg :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~="not-prose"] *)){margin-top:.8888889em;margin-bottom:.8888889em}.lg\\:prose-lg :where(hr):not(:where([class~="not-prose"] *)){margin-top:3.1111111em;margin-bottom:3.1111111em}.lg\\:prose-lg :where(hr + *):not(:where([class~="not-prose"] *)){margin-top:0}.lg\\:prose-lg :where(h2 + *):not(:where([class~="not-prose"] *)){margin-top:0}.lg\\:prose-lg :where(h3 + *):not(:where([class~="not-prose"] *)){margin-top:0}.lg\\:prose-lg :where(h4 + *):not(:where([class~="not-prose"] *)){margin-top:0}.lg\\:prose-lg :where(table):not(:where([class~="not-prose"] *)){font-size:.8888889em;line-height:1.5}.lg\\:prose-lg :where(thead th):not(:where([class~="not-prose"] *)){padding-right:.75em;padding-bottom:.75em;padding-left:.75em}.lg\\:prose-lg :where(thead th:first-child):not(:where([class~="not-prose"] *)){padding-left:0}.lg\\:prose-lg :where(thead th:last-child):not(:where([class~="not-prose"] *)){padding-right:0}.lg\\:prose-lg :where(tbody td,tfoot td):not(:where([class~="not-prose"] *)){padding:.75em}.lg\\:prose-lg :where(tbody td:first-child,tfoot td:first-child):not(:where([class~="not-prose"] *)){padding-left:0}.lg\\:prose-lg :where(tbody td:last-child,tfoot td:last-child):not(:where([class~="not-prose"] *)){padding-right:0}.lg\\:prose-lg :where(.prose > :first-child):not(:where([class~="not-prose"] *)){margin-top:0}.lg\\:prose-lg :where(.prose > :last-child):not(:where([class~="not-prose"] *)){margin-bottom:0}.lg\\:block{display:block}.lg\\:flex{display:flex}.lg\\:hidden{display:none}.lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\\:text-base{font-size:1rem;line-height:1.5rem}.lg\\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width: 1280px){.xl\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\\:text-3xl{font-size:1.875rem;line-height:2.25rem}.xl\\:text-lg{font-size:1.125rem;line-height:1.75rem}.xl\\:text-2xl{font-size:1.5rem;line-height:2rem}}
|
|
111
|
+
`,In=Object.defineProperty,Rn=Object.getOwnPropertyDescriptor,de=(o,t,s,e)=>{for(var r=e>1?void 0:e?Rn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&In(t,s,r),r};w`${es(Nn)}`;const Fn="sonic-theme";let yt=class extends f{constructor(){super(...arguments),this.theme="light",this.background=!1,this.color=!1,this.font=!1,this.contrastDarkMode=!1}connectedCallback(){super.connectedCallback(),window.addEventListener("message",o=>this.receiveMessage(o),!1),this.postCSSVars()}updated(){this.contrastBg()}postCSSVars(){const o=document.styleSheets,t=o.length;let s=[];for(let e=0;e<t;e++){let r=o[e];r.href&&(r.href.includes("googleapis")||r.href.includes("typekit.net"))&&s.push(r.href)}document.querySelectorAll("iframe").forEach(e=>{var r;return(r=e.contentWindow)==null?void 0:r.postMessage({type:"SonicTheme",variables:this.getCssVariables(),fonts:s},"*")})}receiveMessage(o){let t=o.data;!t.type||t.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){let o=[],t=[...yt.styles.map(r=>r.styleSheet),...Array.from(document.styleSheets)];for(let r of t)try{let i=r==null?void 0:r.cssRules;for(let n of i)if(n.style)for(let l of n.style)o.includes(l)||l.indexOf("--sc")!==0||o.push(l)}catch{}let s=window.getComputedStyle(this),e={};return o.forEach(r=>e[r]=s.getPropertyValue(r)),e}contrast(o,t){let s=parseInt(o.replace("#",""),16),e=Math.round(2.55*t),r=(s>>16)+e,i=(s>>8&255)+e,n=(s&255)+e;return"#"+(16777216+(r<255?r<1?0:r:255)*65536+(i<255?i<1?0:i:255)*256+(n<255?n<1?0:n:255)).toString(16).slice(1)}contrastBg(){if(this.theme==="dark"&&this.contrastDarkMode&&this.background){let o=window.getComputedStyle(this).getPropertyValue("--sc-base");this.style.setProperty("--sc-body-bg",this.contrast(o,-2.5))}}render(){return u`<slot></slot>`}};yt.styles=[Mn,Tn,Ln,w`:host([background]) { display: block !important; background: var(--sc-body-bg) !important; min-height: 100vh; } :host([contrastDarkMode]) { transition: background-color 2.5s ease; } :host([color]) { color: var(--sc-base-content); } :host([font]) { font-family: var(--sc-font-family-base); font-weight: var(--sc-font-weight-base); font-style: var(--sc-font-style-base); }`],de([a({type:String,reflect:!0})],yt.prototype,"theme",2),de([a({type:Boolean,reflect:!0})],yt.prototype,"background",2),de([a({type:Boolean,reflect:!0})],yt.prototype,"color",2),de([a({type:Boolean,reflect:!0})],yt.prototype,"font",2),de([a({type:Boolean,reflect:!0})],yt.prototype,"contrastDarkMode",2),yt=de([v(Fn)],yt);var Un=Object.defineProperty,Bn=Object.getOwnPropertyDescriptor,Je=(o,t,s,e)=>{for(var r=e>1?void 0:e?Bn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Un(t,s,r),r};const ro="sonic-badge";let Zt=class extends f{constructor(){super(...arguments),this.type="default",this.variant="default"}render(){return u`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`}};Zt.styles=[w`:host { --sc-badge-gap: 0.3em; --sc-badge-py: 0.16em; --sc-badge-px: 0.66em; --sc-badge-fs: 1rem; --sc-badge-color: var(--sc-base-content, #1f2937); --sc-badge-bg: var(--sc-base-200, #e5e7eb); --sc-badge-border-with: var(--sc-form-border-width, 0.1rem); --sc-badge-border-color: transparent; --sc-badge-border: var(--sc-badge-border-with) solid var(--sc-badge-border-color); --sc-badge-rounded: calc(var(--sc-rounded) * 1000); --sc-badge-line-height: 1.15; --sc-badge-fw: var(--sc-font-weight-base); display: inline-flex; align-items:center; box-sizing: border-box; line-height: var(--sc-badge-line-height); border-radius: var(--sc-badge-rounded); background: var(--sc-badge-bg); color: var(--sc-badge-color); font-family: var(--sc-badge-ff, var(--sc-font-family-base, inherit)); font-weight: var(--sc-badge-fw); padding-top: var(--sc-badge-py); padding-bottom: var(--sc-badge-py); padding-left: var(--sc-badge-px); padding-right: var(--sc-badge-px); min-height: calc(var(--sc-badge-px) * 2); border: var(--sc-badge-border); } /*TYPES*/ :host([type="primary"]) { --sc-badge-color: var(--sc-primary-content); --sc-badge-bg: var(--sc-primary); } :host([type="warning"]) { --sc-badge-color: var(--sc-warning-content); --sc-badge-bg: var(--sc-warning); } :host([type="danger"]) { --sc-badge-color: var(--sc-danger-content); --sc-badge-bg: var(--sc-danger); } :host([type="info"]) { --sc-badge-color: var(--sc-info-content); --sc-badge-bg: var(--sc-info); } :host([type="success"]) { --sc-badge-color: var(--sc-success-content); --sc-badge-bg: var(--sc-success); } :host([type="neutral"]) { --sc-badge-color: var(--sc-base); --sc-badge-bg: var(--sc-base-content); } /*SIZE*/ :host { font-size: var(--sc-badge-fs); gap: var(--sc-badge-gap); } :host([size="2xs"]) { --sc-badge-fs: 0.58rem; --sc-badge-gap: 0.3em; } :host([size="xs"]) { --sc-badge-fs: 0.68rem; --sc-badge-gap: 0.35em; } :host([size="sm"]) { --sc-badge-fs: 0.85rem; --sc-badge-gap: 0.35em; } :host([size="lg"]) { --sc-badge-line-height: 1.2; --sc-badge-fs: 1.25rem; --sc-badge-gap: 0.5em; } :host([size="xl"]) { --sc-badge-line-height: 1.2; --sc-badge-fs: 1.5rem; --sc-badge-gap: 0.5em; } /*OUTLINE*/ :host([variant="outline"][type]) { border-width: var(--sc-badge-border-with) !important; border-color: var(--sc-badge-bg); color: var(--sc-badge-bg); background: transparent; } :host([variant="outline"][type="default"]) { border-color: var(--sc-base-400); color: var(--sc-base-500); background: transparent; } /*GHOST*/ :host([variant="ghost"][type]) { color: var(--sc-badge-bg); background: transparent; padding: 0; } :host([variant="ghost"][type="default"]) { color: var(--sc-badge-color); background: transparent; }`],Je([a({type:String,reflect:!0})],Zt.prototype,"type",2),Je([a({type:String,reflect:!0})],Zt.prototype,"variant",2),Je([a({type:String,reflect:!0})],Zt.prototype,"size",2),Zt=Je([v(ro)],Zt);try{customElements.define(ro,Zt)}catch{}class Vn{static fixBlankLink(t){const s="electron",e=typeof require>"u"?null:require(s);typeof e&&t.target=="_blank"&&t.addEventListener("click",()=>{e==null||e.shell.openExternal(t.href)})}}var qn=Object.defineProperty,Hn=Object.getOwnPropertyDescriptor,De=(o,t,s,e)=>{for(var r=e>1?void 0:e?Hn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&qn(t,s,r),r};const so="sonic-link";let jt=class extends f{constructor(){super(...arguments),this.href="",this._location="",this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(o){this._location=o,G.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(G.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),super.connectedCallback()}disconnectedCallback(){G.offChange(this),super.disconnectedCallback()}set target(o){this._target=o,Vn.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(o){o.preventDefault(),G.changeFromComponent(this)}render(){return this.href?u`<a href="${this.href}" target="${k(this.target)}" @click="${this.pushState?this.handlePushState:null}"><slot></slot></a>`:u`<slot></slot>`}};jt.styles=[w`a { color: inherit; text-decoration: none; display:contents; }`],De([a({type:String})],jt.prototype,"href",2),De([a({type:String})],jt.prototype,"autoActive",2),De([a({type:String})],jt.prototype,"target",1),De([a({type:Boolean})],jt.prototype,"pushState",2),jt=De([v(so)],jt);try{customElements.define(so,jt)}catch{}var Wn=Object.defineProperty,Zn=Object.getOwnPropertyDescriptor,pe=(o,t,s,e)=>{for(var r=e>1?void 0:e?Zn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Wn(t,s,r),r};const oo="sonic-progress";let wt=class extends f{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default",this.size="md"}render(){return u`<progress value="${k(this.value)}" max="${this.max}"></progress><div class="slot-container"><slot></slot><slot name="remaining"></slot></div>`}};wt.styles=[ce,w`:host { --sc-progress-bg: var(--sc-input-bg, var(--sc-base-100, #f5f5f5)); --sc-progress-color: var(--sc-base-content, #1f2937); --sc-progress-height: .6em; --sc-progress-fs: var(--sc-fs, 1rem); --sc-progress-fw: 500; --sc-progress-rounded: var(--sc-rounded-lg); display: block; line-height: 1.2; font-weight:var(--sc-progress-fw); font-size:var(--sc-progress-fs); color:var(--sc-progress-color); } progress { position: relative; width: 100%; -webkit-appearance: none; appearance: none; overflow: hidden; border:none; height: var(--sc-progress-height); border-radius: var(--sc-progress-rounded); background-color: var(--sc-progress-bg); color: var(--sc-progress-color); } progress::-moz-progress-bar { background-color: var(--sc-progress-color); border-radius: var(--sc-progress-rounded); } progress:not([value])::-moz-progress-bar { background-color: var(--sc-progress-bg); } progress::-webkit-progress-bar { background-color: var(--sc-progress-bg); } progress::-webkit-progress-value { background-color: var(--sc-progress-color); border-radius: var(--sc-progress-rounded); } /* Indeterminate */ progress:indeterminate:after { background-color: var(--sc-progress-color); content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 33.333333%; border-radius: var(--sc-progress-rounded); animation: progress-loading 3s infinite ease-in-out; } @keyframes progress-loading { 50% { left: 107%; } } /* COLOR TYPES */ :host([type="warning"]) { --sc-progress-color: var(--sc-warning); } :host([type="danger"]) { --sc-progress-color: var(--sc-danger); } :host([type="info"]) { --sc-progress-color: var(--sc-info); } :host([type="success"]) { --sc-progress-color: var(--sc-success); } :host([invert]) { --sc-progress-bg: var(--sc-base-700); } :host([type="default"][invert]) { --sc-progress-color: var(--sc-base); } slot[name="remaining"] { font-weight:var(--sc-font-weight-base); color:var(--sc-base-400); font-size:.85em; margin-top:.5em; } .slot-container { display:flex; justify-content: space-between; gap:.5em; margin-top:.15em; }`],pe([a({type:Number})],wt.prototype,"value",2),pe([a({type:Number})],wt.prototype,"max",2),pe([a({type:Boolean})],wt.prototype,"invert",2),pe([a({type:String,reflect:!0})],wt.prototype,"type",2),pe([a({type:String,reflect:!0})],wt.prototype,"size",2),wt=pe([v(oo)],wt);try{customElements.define(oo,wt)}catch{}const Ur=w`* { box-sizing: border-box; } :host { --sc-input-height: var(--sc-form-height); --sc-input-border-width: var(--sc-form-border-width); --sc-input-color: var(--sc-base-content); --sc-item-rounded-tr: var(--sc-input-rounded); --sc-item-rounded-tl: var(--sc-input-rounded); --sc-item-rounded-bl: var(--sc-input-rounded); --sc-item-rounded-br: var(--sc-input-rounded); --sc-input-fs: var(--sc-fs, 1rem) ; --sc-input-ff: inherit; --sc-input-py: 0.6em; --sc-input-px: 1.15em; --sc-input-prefix-color: var(--sc-input-color); --sc-input-prefix-bg: var(--sc-input-bg); --sc-input-prefix-border-color: var(--sc-input-border-color); --sc-input-suffix-color: var(--sc-input-color); --sc-input-suffix-bg: var(--sc-input-bg); --sc-input-suffix-border-color: var(--sc-input-border-color); --sc-label-fs: var(--sc-fs, 1rem); --sc-label-fw: var(--sc-label-font-weight); } .form-element { display: block; flex-grow: 1; width: 100%; line-height: 1.1; color: var(--sc-input-color); border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl); font-family: var(--sc-input-ff); background-color: var(--sc-input-bg, var(--sc-base, #fff)); border: var(--sc-input-border-width) solid var(--sc-input-border-color, var(--sc-base-300, #aaa)); width: 100%; font-size: var(--sc-input-fs); padding-top: var(--sc-input-py); padding-bottom: var(--sc-input-py); padding-left: var(--sc-input-px); padding-right: var(--sc-input-px); min-height: var(--sc-input-height); } label { font-size: var(--sc-label-fs); font-weight: var(--sc-label-fw); line-height: 1.2; } .form-control { display: flex; width: 100%; } /*Suffix*/ :host(:not([inlineContent])) .has-suffix slot[name="suffix"], :host(:not([inlineContent])) .has-prefix slot[name="prefix"] { min-width: var(--sc-input-height); box-sizing: border-box; display: flex; align-items: center; justify-content: center; line-height: 1.1; flex-shrink: 0; padding-left: calc(-1 * var(--sc-input-px)); padding-right: calc(-1 * var(--sc-input-px)); } :host(:not([inlineContent])) slot[name="prefix"] { border-radius: var(--sc-item-rounded-tl) 0 0 var(--sc-item-rounded-bl); background-color: var(--sc-input-prefix-bg); color: var(--sc-input-prefix-color); border: var(--sc-input-border-width) solid var(--sc-input-prefix-border-color); margin-right: calc(-1 * var(--sc-input-border-width)); } :host(:not([inlineContent])) slot[name="suffix"] { border-radius: 0 var(--sc-item-rounded-tr) var(--sc-item-rounded-br) 0; background-color: var(--sc-input-suffix-bg); color: var(--sc-input-suffix-color); border: var(--sc-input-border-width) solid var(--sc-input-suffix-border-color); margin-left: calc(-1 * var(--sc-input-border-width)); } :host(:not([inlineContent])) .has-prefix .form-element { border-top-left-radius: 0; border-bottom-left-radius: 0; } :host(:not([inlineContent])) .has-suffix .form-element { border-top-right-radius: 0; border-bottom-right-radius: 0; } /*InlineCONTENT */ :host([inlineContent]) { --sc-input-py: 0; } :host([inlineContent]) .form-element { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35em; min-height: var(--sc-form-height); } /*Disabled */ :host([disabled]) .form-element-container { cursor: not-allowed; } :host([variant="ghost"]) .form-element { --sc-input-bg: transparent; } /*Disbaled*/ :host([disabled]) .form-element { pointer-events: none; background-color: var(--sc-base-100); border-color: transparent; color: var(--sc-base-400); } /*PLACEHOLDER*/ ::placeholder { color: inherit; opacity: 0.45; } :focus::placeholder { opacity: 0; } /*HOVER*/ :host(:not([disabled])) .form-element:hover, .form-element:focus-visible, .form-element:focus { filter: brightness(0.97); outline: none; } .form-label { margin-bottom: 0.22em; display: block; } .form-description { color: var(--sc-base-400); font-size: 0.85em; margin-top: 0.2em; display: block; } .form-element > slot, .form-element .form-element { all: unset !important; } /*Utilitaires*/ .hidden { display: none; } .contents { display: contents; } /*ERROR*/ :host([error]) { --sc-input-border-color: var(--sc-danger); } :host input:visited{ display:none; } :host([touched][required]) :not(:focus):invalid { --sc-input-border-color: var(--sc-danger); --sc-input-color: var(--sc-danger); } :host([touched][required]) :not(:focus):invalid + .select-chevron{ --sc-input-color: var(--sc-danger); } /*VALID*/ :host([touched][required]) :not([value=""]):not(:focus):valid { --sc-input-border-color: var(--sc-success); --sc-input-color: var(--sc-success); } :host([touched][required]) :not(:focus):valid + .select-chevron{ --sc-input-color: var(--sc-success); } /*Input COLOR*/ :host([type="color"]) .form-element { padding: 0; border: 0; min-width: var(--sc-input-height); } input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; } input[type="color"]::-webkit-color-swatch { border: none; border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl); } /*Input Image*/ :host([type="image"]) .form-element { padding: 0; border:none; } /*Input reset & image*/ input[type="reset"], input[type="submit"] { cursor: pointer; } /*Input search*/ input[type="search"]::-webkit-search-cancel-button { appearance:none; cursor:pointer; height: .65em; width: .65em; background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjEyMy4wNXB4IiBoZWlnaHQ9IjEyMy4wNXB4IiB2aWV3Qm94PSIwIDAgMTIzLjA1IDEyMy4wNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIzLjA1IDEyMy4wNTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTEyMS4zMjUsMTAuOTI1bC04LjUtOC4zOTljLTIuMy0yLjMtNi4xLTIuMy04LjUsMGwtNDIuNCw0Mi4zOTlMMTguNzI2LDEuNzI2Yy0yLjMwMS0yLjMwMS02LjEwMS0yLjMwMS04LjUsMGwtOC41LDguNQ0KCQljLTIuMzAxLDIuMy0yLjMwMSw2LjEsMCw4LjVsNDMuMSw0My4xbC00Mi4zLDQyLjVjLTIuMywyLjMtMi4zLDYuMSwwLDguNWw4LjUsOC41YzIuMywyLjMsNi4xLDIuMyw4LjUsMGw0Mi4zOTktNDIuNGw0Mi40LDQyLjQNCgkJYzIuMywyLjMsNi4xLDIuMyw4LjUsMGw4LjUtOC41YzIuMy0yLjMsMi4zLTYuMSwwLTguNWwtNDIuNS00Mi40bDQyLjQtNDIuMzk5QzEyMy42MjUsMTcuMTI1LDEyMy42MjUsMTMuMzI1LDEyMS4zMjUsMTAuOTI1eiIvPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPC9zdmc+DQo=); background-size: contain; background-repeat: no-repeat; }`;var Kn=Object.defineProperty,Yn=Object.getOwnPropertyDescriptor,Br=(o,t,s,e)=>{for(var r=e>1?void 0:e?Yn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Kn(t,s,r),r};const Xe=o=>{class t extends o{constructor(...e){super(),this.type="text"}validateFormElement(){var r;const e=(r=this.shadowRoot)==null?void 0:r.querySelector("input");!e||e.checkValidity()||(this.getFormPublisher().isFormValid=!1,e.reportValidity())}}return Br([a({type:String})],t.prototype,"type",2),Br([a({type:Number})],t.prototype,"tabindex",2),Br([a({type:String})],t.prototype,"autocomplete",2),t};/**
|
|
111
112
|
* @license
|
|
112
113
|
* Copyright 2018 Google LLC
|
|
113
114
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
114
|
-
*/const si=ie(class extends oe{constructor(i){var t;if(super(i),i.type!==Rt.ATTRIBUTE||i.name!=="class"||((t=i.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter(t=>i[t]).join(" ")+" "}update(i,[t]){var r,e;if(this.et===void 0){this.et=new Set,i.strings!==void 0&&(this.st=new Set(i.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in t)t[o]&&!(!((r=this.st)===null||r===void 0)&&r.has(o))&&this.et.add(o);return this.render(t)}const s=i.element.classList;this.et.forEach(o=>{o in t||(s.remove(o),this.et.delete(o))});for(const o in t){const n=!!t[o];n===this.et.has(o)||((e=this.st)===null||e===void 0?void 0:e.has(o))||(n?(s.add(o),this.et.add(o)):(s.remove(o),this.et.delete(o)))}return ht}});var Hn=Object.defineProperty,Wn=Object.getOwnPropertyDescriptor,z=(i,t,r,e)=>{for(var s=e>1?void 0:e?Wn(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Hn(t,r,s),s};const ri="sonic-input";let j=class extends Xe(ne(I(v))){constructor(){super(...arguments),this.size="",this.list=null,this.placeholder="",this.readonly=!1,this.pattern=null,this.min=null,this.max=null,this.step=null,this.minlength=null,this.maxlength=null,this.label="",this.description="",this.inlineContent=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}updated(){var i,t,r,e;this.hasLabel=!!(this.label||((i=this.slotLabelNodes)==null?void 0:i.length)),this.hasDescription=!!(this.description||((t=this.slotDescriptionNodes)==null?void 0:t.length)),this.hasSuffix=!!((r=this.slotSuffixNodes)!=null&&r.length),this.hasPrefix=!!((e=this.slotPrefixNodes)!=null&&e.length)}onSlotChange(){this.requestUpdate()}render(){const i={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return u`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?this.label:""}<slot name="label" @slotchange="${this.onSlotChange}"></slot></label><div class="form-control ${si(i)}"><div class="${this.inlineContent?"form-element form-element-wrapper":"contents"}"><slot name="prefix" @slotchange="${this.onSlotChange}"></slot><input id="form-element" part="input" class="form-element input" type="${this.type}" @input="${this.handleChange}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" list="${S(this.list)}" autofocus="${S(this.autofocus)}" required="${S(this.required)}" tabindex="${S(this.tabindex)}" pattern="${S(this.pattern)}" min="${S(this.min)}" max="${S(this.max)}" step="${S(this.step)}" minlength="${S(this.minlength)}" maxlength="${S(this.maxlength)}" placeholder="${this.placeholder}" .name="${this.name}" .value="${this.value}" autocomplete="${S(this.autocomplete)}"><slot name="suffix" @slotchange="${this.onSlotChange}"></slot></div></div><slot name="description" class="${this.hasDescription?"form-description":"hidden"}">${this.description?u`${this.description}`:""}</slot>`}};j.styles=[Ns],z([a({type:String})],j.prototype,"size",2),z([a({type:String})],j.prototype,"list",2),z([a({type:String})],j.prototype,"placeholder",2),z([a({type:Boolean})],j.prototype,"readonly",2),z([a({type:String})],j.prototype,"pattern",2),z([a({type:String})],j.prototype,"min",2),z([a({type:String})],j.prototype,"max",2),z([a({type:String})],j.prototype,"step",2),z([a({type:String})],j.prototype,"minlength",2),z([a({type:String})],j.prototype,"maxlength",2),z([a({type:String})],j.prototype,"label",2),z([a({type:String})],j.prototype,"description",2),z([a({type:Boolean,reflect:!0})],j.prototype,"inlineContent",2),z([rt({slot:"label"})],j.prototype,"slotLabelNodes",2),z([rt({slot:"description"})],j.prototype,"slotDescriptionNodes",2),z([rt({slot:"suffix"})],j.prototype,"slotSuffixNodes",2),z([rt({slot:"prefix"})],j.prototype,"slotPrefixNodes",2),z([Z()],j.prototype,"hasDescription",2),z([Z()],j.prototype,"hasLabel",2),z([Z()],j.prototype,"hasSuffix",2),z([Z()],j.prototype,"hasPrefix",2),j=z([y(ri)],j);try{customElements.define(ri,j)}catch{}var Kn=Object.defineProperty,Yn=Object.getOwnPropertyDescriptor,Wt=(i,t,r,e)=>{for(var s=e>1?void 0:e?Yn(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Kn(t,r,s),s};const ii="sonic-checkbox";let ct=class extends Es(Xe(ne(I(v)))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.description="",this.label="",this.hasDescription=!1}updated(){var i;this.hasDescription=!!(this.description||((i=this.slotDescriptionNodes)==null?void 0:i.length))}connectedCallback(){this.type="checkbox",super.connectedCallback()}render(){return u`<label class="checkbox-container ${this.disabled?"disabled":""}"><span class="icon-container"><input type="${this.type}" @change="${this.handleChange}" .disabled="${S(this.disabled)}" .required="${S(this.required)}" .checked="${S(this.checked)}" .name="${this.name}" .value="${this.value}" ?autofocus="${this.autofocus}"><sonic-icon name="${this.iconName}" class="sc-input-icon"></sonic-icon></span><div class="checkbox-text">${this.label?this.label:""}<slot></slot><slot name="description" class="${this.hasDescription?"description":"hidden"}">${this.description?u`${this.description}`:""}</slot></div></label>`}};ct.styles=[w`:host{ --sc-checkbox-border-width: var(--sc-form-border-width); --sc-checkbox-border-color: transparent; } * { box-sizing: border-box; } .checkbox-container { min-height: 1.4em; display: flex; gap: 0.5em; line-height: 1.2; align-items: flex-start; } .icon-container { position: relative; display: flex; flex-shrink: 0; } input { appearance: none; flex-shrink: 0; height: 1.5em; width: 1.5em; display: block; cursor: pointer; border-radius: 0.25em; transition: 0.2s; outline: none; margin: 0; background-color: var(--sc-base-200); border:var(--sc-checkbox-border-width) solid var(--sc-checkbox-border-color); } input:focus, :host(:not([disabled])) input:active { box-shadow: 0 0 0 2px var(--sc-primary); } :host(:not([disabled])) label { cursor: pointer; } sonic-icon { line-height: 0; position: absolute; top: 50%; left: 50%; transform: translateX(-50%) translateY(-50%) scale(0); transition: transform 0.2s ease-in-out; color: var(--sc-primary-content); } /* .checkbox-text { align-self: center; } */ .description { color: var(--sc-base-400); font-size: 0.85em; margin-top: 0.2em; display: block; } /*Active */ input:checked, input[checked="true"] { background: var(--sc-primary); } input:checked + sonic-icon, input[checked="true"] + sonic-icon { transform: translateX(-50%) translateY(-50%) scale(1); } /*DISABLED */ .disabled { cursor: not-allowed; } .disabled input { opacity: 0.4; } .disabled .checkbox-text { opacity: 0.6; } ::slotted(a) { color: inherit; text-decoration: underline !important; } ::slotted(a:hover) { text-decoration: none !important; } /*Utils */ .hidden { display: none; } /*ERROR*/ :host([touched]) .checkbox-container:has(input:not(:focus):invalid) { --sc-checkbox-border-color:var(--sc-danger); } :host([touched]) .checkbox-container:has(input:not(:focus):invalid) .checkbox-text{ color:var(--sc-danger); }`],Wt([a({type:Boolean,reflect:!0})],ct.prototype,"touched",2),Wt([a({type:String})],ct.prototype,"iconName",2),Wt([a({type:String})],ct.prototype,"description",2),Wt([a({type:String})],ct.prototype,"label",2),Wt([rt({slot:"description"})],ct.prototype,"slotDescriptionNodes",2),Wt([a({type:Boolean})],ct.prototype,"hasDescription",2),ct=Wt([y(ii)],ct);try{customElements.define(ii,ct)}catch{}var Zn=Object.defineProperty,Gn=Object.getOwnPropertyDescriptor,Xn=(i,t,r,e)=>{for(var s=e>1?void 0:e?Gn(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Zn(t,r,s),s};const oi="sonic-radio";let Je=class extends ct{constructor(){super()}connectedCallback(){this.radio=!0,super.connectedCallback(),this.type="radio"}};Je.styles=[ct.styles,w`:host input { border-radius: 50%; } :host sonic-icon { border-radius: 50%; overflow: hidden; background-color:var(--sc-primary-content); line-height:0; display:block; font-size:0; height:10px; width:10px; }`],Je=Xn([y(oi)],Je);try{customElements.define(oi,Je)}catch{}var Jn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor,Y=(i,t,r,e)=>{for(var s=e>1?void 0:e?Qn(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Jn(t,r,s),s};const ni="sonic-select";let M=class extends ne(I(v)){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=null,this.size="",this.selectSize=null,this._options=[],this._value="",this.label="",this.description="",this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(i){this._options=i,!this.value&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}get value(){return this._value}set value(i){!i||this._value!=i&&(this._value=i,this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?K.getInstance().get(this.formDataProvider)[this._name]=i:this.publisher&&(this.publisher[this._name]=i),this.requestUpdate())}connectedCallback(){super.connectedCallback();let i=this.querySelectorAll("option");i.length>0&&(this.options=Array.from(i).map(t=>({value:t.value,wording:t.text})))}updated(){var i,t,r,e;this.hasLabel=!!(this.label||((i=this.slotLabelNodes)==null?void 0:i.length)),this.hasDescription=!!(this.description||((t=this.slotDescriptionNodes)==null?void 0:t.length)),this.hasSuffix=!!((r=this.slotSuffixNodes)!=null&&r.length),this.hasPrefix=!!((e=this.slotPrefixNodes)!=null&&e.length)}onSlotChange(){this.requestUpdate()}validateFormElement(){var t;const i=(t=this.shadowRoot)==null?void 0:t.querySelector("select");!i||i.checkValidity()||(this.getFormPublisher().isFormValid=!1,i.reportValidity())}render(){const i={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return u`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?this.label:""}<slot name="label" @slotchange="${this.onSlotChange}"></slot></label><div class="form-control ${si(i)}"><slot name="prefix" @slotchange="${this.onSlotChange}"></slot><div class="form-select-wrapper"><select @change="${this.handleChange}" disabled="${S(this.multiple)}" size="${S(this.selectSize)}" autofocus="${S(this.autofocus)}" required="${S(this.required)}" .value="${this.value}" class="form-element">${Ft(this.options,t=>t[this.valueKey],t=>{const r=this.value==t[this.valueKey]?"selected":null;return u`<option selected="${S(r)}" value="${t[this.valueKey]}">${t[this.wordingKey]}</option>`})}<slot></slot></select><sonic-icon class="select-chevron" name="nav-arrow-down" size="${this.size}"></sonic-icon></div><slot name="suffix" @slotchange="${this.onSlotChange}"></slot></div><slot name="description" class="${this.hasDescription?"form-description":"hidden"}">${this.description?u`${this.description}`:""}</slot>`}};M.styles=[Ns,w`.form-element { appearance: none; padding-right: 2.5em; } .form-select-wrapper { position: relative; width: 100%; } sonic-icon { position: absolute; right: 1em; top: 50%; pointer-events: none; transform: translateY(-50%); color:var(--sc-input-color); } option { padding: 0.1rem 5rem; color: var(--sc-base-content); background: var(--sc-base); }`],Y([a({type:String})],M.prototype,"valueKey",2),Y([a({type:String})],M.prototype,"wordingKey",2),Y([a({type:Boolean})],M.prototype,"multiple",2),Y([a({type:String})],M.prototype,"size",2),Y([a({type:String})],M.prototype,"selectSize",2),Y([a({type:Array})],M.prototype,"options",1),Y([a()],M.prototype,"value",1),Y([a({type:String})],M.prototype,"label",2),Y([a({type:String})],M.prototype,"description",2),Y([rt({slot:"label"})],M.prototype,"slotLabelNodes",2),Y([rt({slot:"description"})],M.prototype,"slotDescriptionNodes",2),Y([rt({slot:"suffix"})],M.prototype,"slotSuffixNodes",2),Y([rt({slot:"prefix"})],M.prototype,"slotPrefixNodes",2),Y([Z()],M.prototype,"hasDescription",2),Y([Z()],M.prototype,"hasLabel",2),Y([Z()],M.prototype,"hasSuffix",2),Y([Z()],M.prototype,"hasPrefix",2),M=Y([y(ni)],M);try{customElements.define(ni,M)}catch{}var ta=Object.defineProperty,ea=Object.getOwnPropertyDescriptor,B=(i,t,r,e)=>{for(var s=e>1?void 0:e?ea(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&ta(t,r,s),s};const ai="sonic-textarea";let L=class extends Xe(ne(I(v))){constructor(){super(...arguments),this.size="",this.rows="",this.cols="",this.maxlength="",this.minlength="",this.wrap=null,this.readonly=null,this.placeholder="",this.label="",this.description="",this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.slotClasses={}}updated(){var i,t,r,e;this.hasLabel=!!(this.label||((i=this.slotLabelNodes)==null?void 0:i.length)),this.hasDescription=!!(this.description||((t=this.slotDescriptionNodes)==null?void 0:t.length)),this.hasSuffix=!!((r=this.slotSuffixNodes)!=null&&r.length),this.hasPrefix=!!((e=this.slotPrefixNodes)!=null&&e.length)}onSlotChange(){this.requestUpdate()}validateFormElement(){var t;const i=(t=this.shadowRoot)==null?void 0:t.querySelector("textarea");!i||i.checkValidity()||(this.getFormPublisher().isFormValid=!1,i.reportValidity())}render(){return u`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?this.label:""}<slot name="label" @slotchange="${this.onSlotChange}"></slot></label><div class="form-control"><textarea @input="${this.handleChange}" ?disabled="${this.disabled}" ?required="${this.required}" autocomplete="${S(this.autocomplete)}" autofocus="${S(this.autofocus)}" rows="${S(this.rows)}" cols="${S(this.cols)}" maxlength="${S(this.maxlength)}" minlength="${S(this.minlength)}" ?readonly="${this.readonly}" spellcheck="${S(this.spellcheck)}" wrap="${S(this.wrap)}" class="form-element textarea custom-scroll" placeholder="${this.placeholder}">
|
|
115
|
-
${this.value}</textarea></div><slot name="description" class="${this.hasDescription?"form-description":"hidden"}">${this.description?u`${this.description}`:""}</slot>`}};L.styles=[Ns,qe,w`textarea { font-size: inherit; }`],B([a({type:String})],L.prototype,"size",2),B([a({type:String})],L.prototype,"rows",2),B([a({type:String})],L.prototype,"cols",2),B([a({type:String})],L.prototype,"maxlength",2),B([a({type:String})],L.prototype,"minlength",2),B([a({type:String})],L.prototype,"wrap",2),B([a({type:Boolean})],L.prototype,"readonly",2),B([a({type:String})],L.prototype,"placeholder",2),B([a({type:String})],L.prototype,"label",2),B([a({type:String})],L.prototype,"description",2),B([rt({slot:"label"})],L.prototype,"slotLabelNodes",2),B([rt({slot:"description"})],L.prototype,"slotDescriptionNodes",2),B([rt({slot:"suffix"})],L.prototype,"slotSuffixNodes",2),B([rt({slot:"prefix"})],L.prototype,"slotPrefixNodes",2),B([Z()],L.prototype,"hasDescription",2),B([Z()],L.prototype,"hasLabel",2),B([Z()],L.prototype,"hasSuffix",2),B([Z()],L.prototype,"hasPrefix",2),B([a()],L.prototype,"slotClasses",2),L=B([y(ai)],L);try{customElements.define(ai,L)}catch{}var sa=Object.defineProperty,ra=Object.getOwnPropertyDescriptor,Is=(i,t,r,e)=>{for(var s=e>1?void 0:e?ra(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&sa(t,r,s),s};const li="sonic-fieldset";let le=class extends I(v){constructor(){super(...arguments),this.disabled=!1}render(){return u`<fieldset form="${S(this.form)}" ?disabled="${this.disabled}"><slot></slot></fieldset>`}};le.styles=[w`:host { --sc-fieldset-mt: 0; --sc-fieldset-mb: 1rem; --sc-fieldset-border-color: var(--sc-base-200); --sc-fieldset-border-width: var(--sc-form-border-width); margin-top: var(--sc-fieldset-mt); margin-bottom: var(--sc-fieldset-mb); display: block; border: var(--sc-fieldset-border-width) solid var(--sc-fieldset-border-color) !important; padding: 1.8rem 1.25rem; border-radius: var(--sc-rounded-lg); } fieldset { all: unset; display: contents; } ::slotted(sonic-legend) { margin-bottom: 1.5rem; display: block; }`],Is([a({type:Boolean,reflect:!0})],le.prototype,"disabled",2),Is([a({type:String})],le.prototype,"form",2),le=Is([y(li)],le);try{customElements.define(li,le)}catch{}var ia=Object.defineProperty,oa=Object.getOwnPropertyDescriptor,na=(i,t,r,e)=>{for(var s=e>1?void 0:e?oa(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&ia(t,r,s),s};let Qe=class extends v{render(){return u`<slot></slot>`}};Qe.styles=[w`:host { color: var(--sc-neutral-500); font-size: 1.25rem; line-height: 1.2; display: block; font-weight: var(--sc-font-weight-base); font-style: var(--sc-font-style-base); margin-top: 0.25em; }`],Qe=na([y("sonic-legend-description")],Qe);try{customElements.define("sonic-legend-description",Qe)}catch{}var aa=Object.defineProperty,la=Object.getOwnPropertyDescriptor,ce=(i,t,r,e)=>{for(var s=e>1?void 0:e?la(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&aa(t,r,s),s};const ci="sonic-legend";let wt=class extends v{render(){return u`<legend part="legend">${this.iconName?u`<div class="icon"><sonic-icon name="${this.iconName}" prefix="${S(this.iconPrefix)}" library="${S(this.iconLibrary)}"></sonic-icon></div>`:""}<div class="legend-content">${this.label} ${this.description?u`<sonic-legend-description>${this.description}</sonic-legend-description>`:""}<slot></slot></div><slot name="suffix"></slot></legend>`}};wt.styles=[w`:host { --sc-legend-font-size: 1.75rem; --sc-legend-font-weight: var(--sc-font-weight-base); --sc-legend-font-style: var(--sc-headings-font-style); --sc-legend-family: var(--sc-headings-font-family); --sc-legend-line-height: var(--sc-headings-line-height); display: flex; width: 100%; } legend { font-size: var(--sc-legend-font-size); font-weight: var(--sc-legend-font-weight); font-style: var(--sc-legend-font-style); font-family: var(--sc-legend-font-family); line-height: var(--sc-legend-line-height); padding: 0; display: flex; width: 100%; align-items: flex-start; gap: 0.5em; } slot[name="suffix"] { display: block; margin-left: auto; flex-shrink: 0; } .legend-content { flex-grow: 1; }`],ce([a({type:String})],wt.prototype,"description",2),ce([a({type:String})],wt.prototype,"label",2),ce([a({type:String})],wt.prototype,"iconName",2),ce([a({type:String})],wt.prototype,"iconLibrary",2),ce([a({type:String})],wt.prototype,"iconPrefix",2),wt=ce([y(ci)],wt);try{customElements.define(ci,wt)}catch{}class ca{constructor(t,{target:r,config:e,callback:s,skipInitial:o}){this.t=!1,this.i=!1,this.callback=()=>!0,(this.h=t).addController(this),this.o=r===null||r!=null?r:this.h,this.l=e,this.t=o!=null?o:this.t,this.callback=s!=null?s:this.callback,window.ResizeObserver?this.u=new ResizeObserver(n=>{this.handleChanges(n),this.h.requestUpdate()}):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){this.value=this.callback(t,this.u)}hostConnected(){this.o&&this.observe(this.o)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.t&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}}var ha=Object.defineProperty,da=Object.getOwnPropertyDescriptor,pa=(i,t,r,e)=>{for(var s=e>1?void 0:e?da(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&ha(t,r,s),s};const hi="sonic-form-layout";let ts=class extends I(v){constructor(){super(...arguments),this._resizeController=new ca(this,{})}render(){return u`<div class="${this.offsetWidth>440?"cq--md":""}"><slot></slot></div>`}};ts.styles=[w`:host { display: block; } div { display: grid; grid-gap: 1.5rem; align-items: flex-start; } .cq--md { grid-gap: 1.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); } ::slotted(sonic-radio), ::slotted(sonic-checkbox), ::slotted(sonic-form-actions), ::slotted(sonic-divider), ::slotted(sonic-textarea) { grid-column: 1 / -1; } ::slotted(sonic-divider) { --sc-divider-my: 0; }`],ts=pa([y(hi)],ts);try{customElements.define(hi,ts)}catch{}var ua=Object.defineProperty,ga=Object.getOwnPropertyDescriptor,fa=(i,t,r,e)=>{for(var s=e>1?void 0:e?ga(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&ua(t,r,s),s};const di="sonic-form-actions";let es=class extends v{render(){return u`<slot></slot>`}};es.styles=[w`:host{ display:flex; gap:.3rem; }`],es=fa([y(di)],es);try{customElements.define(di,es)}catch{}var ma=Object.defineProperty,va=Object.getOwnPropertyDescriptor,ba=(i,t,r,e)=>{for(var s=e>1?void 0:e?va(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&ma(t,r,s),s};const pi="sonic-group";let ss=class extends v{updated(){const i=this.querySelectorAll("sonic-input, sonic-button"),t=i.length;t>1&&i.forEach((r,e)=>{e===0?(r.style.setProperty("--sc-item-rounded-tr","0"),r.style.setProperty("--sc-item-rounded-br","0")):e===t-1?(r.style.setProperty("--sc-item-rounded-tl","0"),r.style.setProperty("--sc-item-rounded-bl","0")):(r.style.setProperty("--sc-item-rounded-tr","0"),r.style.setProperty("--sc-item-rounded-br","0"),r.style.setProperty("--sc-item-rounded-tl","0"),r.style.setProperty("--sc-item-rounded-bl","0"))})}render(){return u`<slot></slot>`}};ss.styles=[w`:host { display: inline-flex; vertical-align: middle; } slot { width: 100%; display: flex; align-items: flex-end; }`],ss=ba([y(pi)],ss);try{customElements.define(pi,ss)}catch{}var ya=Object.defineProperty,wa=Object.getOwnPropertyDescriptor,mt=(i,t,r,e)=>{for(var s=e>1?void 0:e?wa(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&ya(t,r,s),s};const ui="sonic-image";let at=class extends v{constructor(){super(...arguments),this.rounded="none",this.src="",this.alt="",this.loading="lazy",this.ratio="auto",this.objectPosition="center center",this.imageRendering="auto",this.shadow="none",this.cover=!1}render(){const i={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return u`<div part="image"><picture part="picture"><img part="img" src="${this.src}" loading="${this.loading}" alt="${this.alt}" style="${dt(i)}"></picture></div>`}};at.styles=[w`:host { --sc-img-radius: 0; --sc-img-bg: var(--sc-placeholder-bg); border-radius: var(--sc-img-radius); display: block; width: 100%; background: var(--sc-img-bg); } img { width: 100%; vertical-align: middle; object-fit: cover; } img[src=""] { visibility: hidden; } /*Rounded*/ :host([rounded]) { --sc-img-radius: var(--sc-rounded); overflow: hidden; } :host([rounded="sm"]) { --sc-img-radius: var(--sc-rounded-sm); } :host([rounded="md"]) { --sc-img-radius: var(--sc-rounded-md); } :host([rounded="lg"]) { --sc-img-radius: var(--sc-rounded-lg); } :host([rounded="xl"]) { --sc-img-radius: var(--sc-rounded-xl); } /*Cercle*/ :host([rounded="full"]) { --sc-img-radius: 50% !important; } :host([rounded="none"]) { --sc-img-radius: 0 !important; } /*OMBRE*/ :host([shadow]) > div, :host([shadow="md"]) > div, :host([shadow="true"]) > div { box-shadow: var(--sc-shadow); } :host([shadow="sm"]) > div { box-shadow: var(--sc-shadow-sm); } :host([shadow="none"]) > div { box-shadow: none; } :host([shadow="lg"]) > div { box-shadow: var(--sc-shadow-lg); } :host([cover]), :host([cover]) > div, :host([cover]) img { position: absolute !important; left: 0 !important; top: 0 !important; right: 0 !important; bottom: 0 !important; height: 100% !important; width: 100% !important; }`],mt([a({type:String})],at.prototype,"rounded",2),mt([a({type:String})],at.prototype,"src",2),mt([a({type:String})],at.prototype,"alt",2),mt([a({type:String})],at.prototype,"loading",2),mt([a({type:String})],at.prototype,"ratio",2),mt([a({type:String})],at.prototype,"objectPosition",2),mt([a({type:String})],at.prototype,"imageRendering",2),mt([a({type:String,reflect:!0})],at.prototype,"shadow",2),mt([a({type:Boolean,reflect:!0})],at.prototype,"cover",2),at=mt([y(ui)],at);try{customElements.define(ui,at)}catch{}var $a=Object.defineProperty,xa=Object.getOwnPropertyDescriptor,Et=(i,t,r,e)=>{for(var s=e>1?void 0:e?xa(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&$a(t,r,s),s};const _a="sonic-taxonomy";let ut=class extends v{constructor(){super(...arguments),this.icon={},this.taxonomy=[],this.separator=", ",this.key="",this.type="default",this.variant="default",this.size="md"}render(){if(!this.taxonomy)return P;let i=this.key+"_display",t=this.taxonomy.filter(r=>r!=null&&(r[i]===!0||r[i]=="1"||!r.hasOwnProperty(i)));return t.length===0?(this.style.display="none",P):(this.style.removeProperty("display"),u`<sonic-badge type="${this.type}" variant="${this.variant}" size="${this.size}"><sonic-icon slot="prefix" name="${this.icon.name}" prefix="${this.icon.prefix}"></sonic-icon><span class="taxonomy-list">${Ft(t,r=>r[this.key+"_id"],r=>u`<span>${r[this.key+"_name"]}</span><span class="sonic-taxonomy-separator">${It(this.separator)}</span>`)}</span></sonic-badge>`)}};ut.styles=w`:host .sonic-taxonomy-separator:last-child { display: none; } .taxonomy-list { display: flex; flex-wrap: wrap; }`,Et([a({type:Object})],ut.prototype,"icon",2),Et([a({type:Array})],ut.prototype,"taxonomy",2),Et([a({type:String})],ut.prototype,"separator",2),Et([a({type:String})],ut.prototype,"key",2),Et([a({type:String,reflect:!0})],ut.prototype,"type",2),Et([a({type:String,reflect:!0})],ut.prototype,"variant",2),Et([a({type:String,reflect:!0})],ut.prototype,"size",2),ut=Et([y(_a)],ut);try{customElements.define("sonic-taxonomy",ut)}catch{}var ka=Object.defineProperty,Aa=Object.getOwnPropertyDescriptor,Sa=(i,t,r,e)=>{for(var s=e>1?void 0:e?Aa(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&ka(t,r,s),s};const gi="sonic-menu-item";let Us=class extends E{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="primary"),this.hasAttribute("shape")||(this.shape="block"),this.hasAttribute("align")||(this.align="left"),super.connectedCallback()}};Us=Sa([y(gi)],Us);try{customElements.define(gi,Us)}catch{}var Pa=Object.defineProperty,Ca=Object.getOwnPropertyDescriptor,gt=(i,t,r,e)=>{for(var s=e>1?void 0:e?Ca(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Pa(t,r,s),s};const fi="sonic-menu";let it=class extends v{constructor(){super(...arguments),this.size="",this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.minWidth="0",this.hasMoreElements=!1}checkIfMore(){var i;this.hasMoreElements=!!((i=this.moreElements)!=null&&i.length)}updated(i){const t=this.querySelector(".more-btn");this.size&&t&&t.setAttribute("size",this.size),this.querySelectorAll("sonic-divider").forEach(r=>{r.hasAttribute("size")||r.setAttribute("size","xs")}),super.updated(i)}mainSlotChange(){this.setChildrenSize(this.menuChildren)}setChildrenSize(i){i.forEach(t=>{this.size&&t.setAttribute("size",this.size),this.align&&t.setAttribute("align",this.align),this.direction=="row"&&t.getAttribute("shape")=="block"&&t.setAttribute("shape","default")})}render(){const i={minWidth:this.minWidth,flexDirection:this.direction,gap:this.gap},t=this.direction=="row",r={display:"block",alignSelf:t?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},e={marginLeft:t?"":".55em"};return u`<menu part="menu" class="shadowable" style="${dt(i)}"><slot @slotchange="${this.mainSlotChange}"></slot><sonic-pop style="${dt(r)}" class="${this.hasMoreElements?"":"hidden"}"><sonic-menu-item style="${dt(e)}" class="more-btn" shape="${this.moreShape}" align="center"><sonic-icon size="xl" name="${t?"more-vert":"more-horiz"}"></sonic-icon></sonic-menu-item><slot name="more" @slotchange="${this.checkIfMore}" slot="content"></slot></sonic-pop></menu>`}};it.styles=[w`:host { display: block; --sc-menu-gap:.15rem; } :host > menu { display: flex; border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em); margin: 0; padding: 0.35em; } .hidden { display:none !important; } /*OMBRE*/ :host([shadow]) .shadowable, :host([shadow="md"]) .shadowable, :host([shadow="true"]) .shadowable { box-shadow: var(--sc-shadow); } :host([shadow="sm"]) .shadowable { box-shadow: var(--sc-shadow-sm); } :host([shadow="lg"]) .shadowable { box-shadow: var(--sc-shadow-lg); } :host([shadow="none"]) .shadowable { box-shadow: none; }`],gt([a({type:String,reflect:!0})],it.prototype,"size",2),gt([a({type:String,reflect:!0})],it.prototype,"direction",2),gt([a({type:String})],it.prototype,"gap",2),gt([a({type:String,reflect:!0})],it.prototype,"align",2),gt([a({type:String,reflect:!0})],it.prototype,"shadow",2),gt([a({type:String})],it.prototype,"moreShape",2),gt([a({type:String})],it.prototype,"minWidth",2),gt([Tt({selector:"sonic-menu-item"})],it.prototype,"menuChildren",2),gt([Tt({slot:"more",selector:"*"})],it.prototype,"moreElements",2),gt([Z()],it.prototype,"hasMoreElements",2),it=gt([y(fi)],it);try{customElements.define(fi,it)}catch{}var Oa=Object.defineProperty,Ea=Object.getOwnPropertyDescriptor,mi=(i,t,r,e)=>{for(var s=e>1?void 0:e?Ea(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Oa(t,r,s),s};const vi="sonic-modal-actions";let je=class extends v{firstUpdated(){var i;(i=this.buttons)==null||i.forEach(t=>{t.addEventListener("click",()=>{var r;t.getAttribute("hideModal")!="false"&&((r=this.closest("sonic-modal"))==null||r.hide())})})}render(){return u`<slot></slot>`}};je.styles=[w`:host { display: flex; gap: 0.5rem; margin-top: auto; padding-top: 1rem; }`],mi([Tt({selector:"sonic-button"})],je.prototype,"buttons",2),je=mi([y(vi)],je);try{customElements.define(vi,je)}catch{}var ja=Object.defineProperty,Da=Object.getOwnPropertyDescriptor,La=(i,t,r,e)=>{for(var s=e>1?void 0:e?Da(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&ja(t,r,s),s};const bi="sonic-modal-title";let rs=class extends v{render(){return u`<slot></slot>`}};rs.styles=[w`:host { font-weight: bold; font-size: 1.5rem; display: block; line-height: var(--sc-headings-line-height); font-family: var(--sc-headings-font-family); }`],rs=La([y(bi)],rs);try{customElements.define(bi,rs)}catch{}var za=Object.defineProperty,Ta=Object.getOwnPropertyDescriptor,Ma=(i,t,r,e)=>{for(var s=e>1?void 0:e?Ta(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&za(t,r,s),s};const yi="sonic-modal-subtitle";let is=class extends v{render(){return u`<slot></slot>`}};is.styles=[w`:host { font-size: 1.1rem; display: block; text-transform: uppercase; line-height: var(--sc-headings-line-height); font-family: var(--sc-headings-font-family); }`],is=Ma([y(yi)],is);try{customElements.define(yi,is)}catch{}var Ra=Object.defineProperty,Na=Object.getOwnPropertyDescriptor,Fa=(i,t,r,e)=>{for(var s=e>1?void 0:e?Na(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Ra(t,r,s),s};const wi="sonic-modal-content";let os=class extends v{render(){return u`<slot></slot>`}};os.styles=[w`:host { display: block; }`],os=Fa([y(wi)],os);try{customElements.define(wi,os)}catch{}var Ia=Object.defineProperty,Ua=Object.getOwnPropertyDescriptor,Ba=(i,t,r,e)=>{for(var s=e>1?void 0:e?Ua(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Ia(t,r,s),s};const $i="sonic-modal-close";let ns=class extends v{render(){return u`<sonic-button shape="circle" variant="ghost" @click="${this.handleClick}"><sonic-icon name="cancel" size="lg"></sonic-icon></sonic-button>`}handleClick(){this.closest("sonic-modal").hide()}};ns.styles=[w`:host { position: absolute; right: 0.6rem; top: 0.6rem; z-index: 20; }`],ns=Ba([y($i)],ns);try{customElements.define($i,ns)}catch{}var Va=Object.defineProperty,qa=Object.getOwnPropertyDescriptor,ot=(i,t,r,e)=>{for(var s=e>1?void 0:e?qa(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Va(t,r,s),s};const as="sonic-modal";let H=class extends I(v){constructor(){super(...arguments),this.hideOnOverlayClick=!0,this.hideOnEscape=!0,this.align="center",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.fullScreen=!1,this.visible=!1}static create(i){const t=document.createElement(as);return t.innerHTML=`<sonic-modal-close></sonic-modal-close><sonic-modal-content>${i.content}</sonic-modal-content>`||"",(document.querySelector("sonic-theme")||document.body).appendChild(t),t.show(),t}connectedCallback(){super.connectedCallback()}updated(){const i=this;document.addEventListener("keydown",this.handleEscape),i.closeBtn.forEach(t=>{t.addEventListener("click",function(){i.hide()},{once:!0})})}render(){if(this.visible==!1)return P;this.handleFullsceen();const i={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,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 u`<div class="modal-wrapper" style="${dt(t)}" ${Ue({out:xo})} tabindex="0"><div part="modal" class="modal custom-scroll" style="${dt(i)}" ${Ue({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}]})}><div class="modal-content"><slot></slot></div></div></div><div class="overlay" @click="${this.hideOnOverlayClick?this.hide:""}" ${Ue({keyframeOptions:{duration:500},in:_o,out:[{opacity:0,pointerEvents:"none"}]})}></div>`}show(){var i,t;this.visible=!0,(i=this.modalElement)==null||i.setAttribute("tabindex","0"),(t=this.modalElement)==null||t.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var i;this.visible=!1,(i=this.modalElement)==null||i.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide"))}dispose(){this.hide(),this.remove()}handleEscape(i){i.key==="Escape"&&[...document.querySelectorAll(as)].forEach(t=>{this.hideOnEscape==!0&&t.hide()})}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};if(H.styles=[qe,w`:host { --sc-modal-py: 2.5rem; --sc-modal-px: 1.5rem; --sc-modal-content: var(--sc-base-content); --sc-modal-bg: var(--sc-base); --sc-modal-max-w: min(100vw, 64ch); --sc-modal-max-h: 80vh; --sc-modal-scrollbar-bg: var(--sc-base-300); --sc-modal-rounded: var(--sc-rounded-lg); } * { box-sizing: border-box; } .modal-wrapper { position: fixed; bottom: 0; left: 0; width: 100%; z-index: 990; text-align: center; align-items: center; justify-content: center; flex-direction: column; display: flex; pointer-events: none; } .modal-content { overflow-y: auto; display: flex; flex-direction: column; text-align: center; align-items: center; min-height: 10rem; } .modal { background: var(--sc-base); width: 100%; box-shadow: var(--sc-shadow-lg); border-radius: var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0; pointer-events: auto; /*overflow: hidden;*/ transform: translateZ(0); } .overlay { background: var(--sc-base-200); left: 0; top: 0; right: 0; bottom: 0; z-index: 900; opacity: 0.8; position: fixed; } ::slotted(sonic-modal-title) { margin-bottom: 1rem; } ::slotted(sonic-modal-subtitle) { margin-top: -0.45rem; margin-bottom: 1rem; } @media (max-width: 767.5px) { .modal-wrapper, .modal { max-width: none !important; width: 100% !important; } } @media (min-width: 768px) { .modal-wrapper { top: 50%; left: 50%; bottom: auto; right: auto; transform: translateX(-50%) translateY(-50%); } .modal { top: 50%; bottom: auto; right: auto; border-radius: var(--sc-modal-rounded); } } :host([align="left"]) .modal-content { text-align: left; align-items: flex-start; } :host([align="right"]) .modal-content { text-align: right; align-items: flex-end; } /* Border radius */ :host([rounded="none"]) modal { --sc-img-radius: 0 !important; }`],ot([a({type:Boolean,reflect:!0})],H.prototype,"hideOnOverlayClick",2),ot([a({type:Boolean,reflect:!0})],H.prototype,"hideOnEscape",2),ot([a({type:String,reflect:!0})],H.prototype,"align",2),ot([a({type:String})],H.prototype,"padding",2),ot([a({type:String})],H.prototype,"maxWidth",2),ot([a({type:String})],H.prototype,"maxHeight",2),ot([a({type:String})],H.prototype,"width",2),ot([a({type:String})],H.prototype,"height",2),ot([a({type:Boolean,reflect:!0})],H.prototype,"fullScreen",2),ot([a({type:Boolean,reflect:!0})],H.prototype,"visible",2),ot([we(".modal-wrapper")],H.prototype,"modalWrapper",2),ot([we(".modal")],H.prototype,"modalElement",2),ot([Tt({selector:"sonic-modal-close"})],H.prototype,"closeBtn",2),H=ot([y(as)],H),typeof window<"u"){let i=window;i.SonicModal=H}try{customElements.define(as,H)}catch{}var Ha=Object.defineProperty,Wa=Object.getOwnPropertyDescriptor,he=(i,t,r,e)=>{for(var s=e>1?void 0:e?Wa(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Ha(t,r,s),s};const Ka={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"},xi="sonic-alert";let $t=class extends v{constructor(){super(...arguments),this.label="",this.text="",this.size="md",this.background=!1,this.status="default"}render(){return u`<div part="alert" class="alert"><div>${this.status&&u`<sonic-icon name="${Ka[this.status]}"></sonic-icon>`}</div><div>${this.label?u`<span class="label">${this.label} :</span>`:P} ${this.text}<slot></slot></div></div>`}};$t.styles=[w`:host { --sc-alert-color: inherit; --sc-alert-rounded: var(--sc-rounded); --sc-alert-fw: var(--sc-font-weight-base); --sc-alert-fst: var(--sc-font-style-base); --sc-alert-fs: 1rem; --sc-alert-label-fw: bold; display: block; font-size: var(--sc-alert-fs); font-weight: var(--sc-alert-fw); font-style: var(--sc-alert-fst); } .alert { color: var(--sc-alert-color); position: relative; display: flex; gap: 0.4em; line-height: 1.2; border-radius: var(--sc-alert-rounded); } .label { font-weight: var(--sc-alert-label-fw); } :host([status="warning"]) { --sc-alert-color: var(--sc-warning); } :host([status="error"]) { --sc-alert-color: var(--sc-danger); } :host([status="info"]) { --sc-alert-color: var(--sc-info); } :host([status="success"]) { --sc-alert-color: var(--sc-success); } /*background*/ :host([background]) .alert { background: var(--sc-base); padding: 0.8em 1.15em; } :host([background]) .alert:before { background-color: currentColor; content: ""; display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; opacity: 0.08; border-radius: var(--sc-alert-rounded); pointer-events: none; } :host([background]) > div { z-index: 2; position: relative; } /*SIZE*/ :host([size="xs"]) { --sc-alert-fs: 0.75rem; } :host([size="sm"]) { --sc-alert-fs: 0.85rem; } :host([size="lg"]) { --sc-alert-fs: 1.2rem; } /*Rounded*/ :host([size="xs"]) .alert { --sc-alert-rounded: var(--sc-rounded-sm); } :host([size="sm"]) .alert { --sc-alert-rounded: var(--sc-rounded-sm); }`],he([a({type:String})],$t.prototype,"label",2),he([a({type:String})],$t.prototype,"text",2),he([a({type:String,reflect:!0})],$t.prototype,"size",2),he([a({type:Boolean,reflect:!0})],$t.prototype,"background",2),he([a({type:String,reflect:!0})],$t.prototype,"status",2),$t=he([y(xi)],$t);try{customElements.define(xi,$t)}catch{}var Ya=Object.defineProperty,Za=Object.getOwnPropertyDescriptor,de=(i,t,r,e)=>{for(var s=e>1?void 0:e?Za(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Ya(t,r,s),s};const Ga="sonic-toast-message-subscriber";let Kt=class extends I(v){constructor(){super(...arguments),this._messages=[],this.success=null,this.status=null,this._message="",this._data=""}get messages(){return this._messages}set messages(i){this._messages=i,this.messages&&i.forEach(t=>{t.type=="public"&&pt.add({text:t.content,status:t.status})})}get message(){return this._message}set message(i){this._message=i,!!this.message&&this.props.success===!1&&(this.props.public_message||pt.add({text:this.message,status:"error"}))}get data(){return this._data}set data(i){this._data=i;const t={text:"Votre produit a bien \xE9t\xE9 ajout\xE9",status:"success"};Array.isArray(this.data)&&this.props.success===!0&&pt.add(t),this.data==""&&this.props.status===!0&&pt.add(t),this.props.success===!1&&(this.props.public_message||pt.add({text:this.data,status:"error"}))}render(){return P}};de([a({type:Boolean})],Kt.prototype,"success",2),de([a({type:Boolean})],Kt.prototype,"status",2),de([a({type:Array})],Kt.prototype,"messages",1),de([a({type:String})],Kt.prototype,"message",1),de([a()],Kt.prototype,"data",1),Kt=de([y(Ga)],Kt);var Xa=Object.defineProperty,Ja=Object.getOwnPropertyDescriptor,Bs=(i,t,r,e)=>{for(var s=e>1?void 0:e?Ja(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Xa(t,r,s),s};const _i="sonic-tooltip";let pe=class extends v{constructor(){super(...arguments),this.label="",this.disabled=!1}render(){let i=this.disabled||this.label==""?"disabled":"";return u`<div data-tooltip-text="${this.label.trim().replace(" "," ")}" class="tooltip ${i}"><slot></slot></div>`}};pe.styles=[w`.tooltip { position: relative; display: flex; align-items: center; text-align: center; } .tooltip:before { position: absolute; content: attr(data-tooltip-text); font-size: 0.85rem; display: block; opacity: 0; pointer-events: none; bottom: calc(100% + 0.25rem); left: 50%; transform: translateX(-50%); background: var(--sc-base-content, #111827); padding: 0.25rem; border-radius: 0.25rem; color: var(--sc-base, #fff); z-index: 999; display: none; line-height: 1.1; width: max-content; max-width: 20rem; } .tooltip:not(.disabled):hover:before { opacity: 1; display: block; }`],Bs([a({type:String})],pe.prototype,"label",2),Bs([a({type:Boolean})],pe.prototype,"disabled",2),pe=Bs([y(_i)],pe);try{customElements.define(_i,pe)}catch{}var Qa=Object.defineProperty,tl=Object.getOwnPropertyDescriptor,Yt=(i,t,r,e)=>{for(var s=e>1?void 0:e?tl(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Qa(t,r,s),s};const ki="sonic-pop";let tt=class extends v{constructor(){super(...arguments),this.open=!1,this.toggle="true",this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=Number.NaN,this.lastContentY=Number.NaN}runPositioning(){!this.positioningRuns||(this.positioningRuns=!0,this._setUpMenu(this.placement),window.requestAnimationFrame(()=>this.runPositioning()))}_toggle(i){this.open&&this.toggle=="false"||i.type=="keydown"&&(i.key!="ArrowDown"||this.open)||(this.open=!this.open,this.open?this._show():this._hide())}_show(){this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=Number.NaN,this.lastContentY=Number.NaN,this.runPositioning())}_hide(){this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1}_handleClosePop(i){let t=i.composedPath(),r=t[0];tt.pops.forEach(e=>{const s=t.includes(e),o=t.includes(e.querySelector('[slot="content"]')),n=ee.getAncestorAttributeValue(r,"data-on-select")==="keep";i.type=="pointerdown"&&s||i.type=="click"&&(s&&n||!o)||e._hide()})}connectedCallback(){super.connectedCallback(),tt.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop)),tt.pops.add(this)}disconnectedCallback(){super.disconnectedCallback(),tt.pops.delete(this),tt.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop))}_setUpMenu(i){var R;const t=(R=this.popContent)==null?void 0:R.getBoundingClientRect(),r=8,e=20,s=this.getBoundingClientRect();if(!this.offsetParent)return;let o=this.offsetParent.getBoundingClientRect(),n=s.left-o.left,l=s.top-o.top,c=n,h=l,b=l-t.height-r,f=n-t.width-2*r,g=n+s.width+2*r,$=l+s.height+r;switch(i){case"bottom":h=$;break;case"top":h=b;break;case"left":c=f;break;case"right":c=g;break}let _=window.innerWidth-g-o.left-t.width-e;_<0&&i==="right"&&(c=f),_<0&&["top","bottom"].includes(i)&&(c=Math.max(c+_,f+s.width)),-o.left-f>e&&i==="left"&&(c=g);let k=window.innerHeight-$-o.top-t.height-e;k<0&&i==="bottom"&&(h=b),k<0&&["left","right"].includes(i)&&(h=Math.max(h+k,b+s.height)),-o.top-b>-e&&i==="top"&&(h=$),this.lastContentX=c,this.lastContentY=h,Object.assign(this.popContent.style,{left:`${c}px`,top:`${h}px`})}render(){return u`<slot @click="${this._toggle}" @keydown="${this._toggle}" class="contents"></slot><slot name="content" tabindex="-1" part="content" class="${this.open?"is-open":""}"></slot>`}};tt.pops=new Set,tt.styles=[w`:host { display: inline-block; vertical-align: middle; } slot[name="content"] { background-color: var(--sc-base); position: absolute; z-index: 50; display: block; transform: translateY(1rem) scale(0.95); opacity: 0; pointer-events: none; transition-duration: 0.15s ; transition-timing-function: ease; transition-property:all; border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em); } slot[name="content"].is-open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; transition-property:scale, opacity; transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225); } /*OMBRE*/ :host([shadow]) slot[name="content"], :host([shadow="md"]) slot[name="content"], :host([shadow="true"]) slot[name="content"] { box-shadow: var(--sc-shadow); } :host([shadow="sm"]) slot[name="content"] { box-shadow: var(--sc-shadow-sm); } :host([shadow="none"]) slot[name="content"] { box-shadow: none; } :host([shadow="lg"]) slot[name="content"] { box-shadow: var(--sc-shadow-lg); }`],Yt([Z()],tt.prototype,"open",2),Yt([we("slot:not([name=content])")],tt.prototype,"popBtn",2),Yt([we("slot[name=content]")],tt.prototype,"popContent",2),Yt([a({type:String})],tt.prototype,"toggle",2),Yt([a({type:String,reflect:!0})],tt.prototype,"shadow",2),Yt([a({type:String})],tt.prototype,"placement",2),tt=Yt([y(ki)],tt);try{customElements.define(ki,tt)}catch{}var el=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,ue=(i,t,r,e)=>{for(var s=e>1?void 0:e?sl(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&el(t,r,s),s};const rl="sonic-divider";let xt=class extends v{constructor(){super(...arguments),this.label="",this.size="md",this.align="center"}firstUpdated(){var i,t;(this.label||((i=this.slotNodes)==null?void 0:i.length))&&((t=this.divider)==null||t.classList.add("has-text"))}render(){return u`<div part="divider"><span class="text">${this.label}<slot></slot></span></div>`}};xt.styles=[w`:host { --sc-divider-my: 0.5rem; --sc-divider-mx: 0; --sc-divider-border-width: min(2px, 0.15rem); --sc-divider-border-color: var(--sc-base-200); --sc-divider-border-style: solid; --sc-divider-color: var(--sc-base-500); --sc-divider-ff: var(--sc-font-family-base); --sc-divider-fs: 1rem; --sc-divider-fw: var(--sc-font-weight-base); --sc-divider-fst: var(--sc-font-style-base); margin: var(--sc-divider-my) var(--sc-divider-mx); font-size: var(--sc-divider-fs); font-style: var(--sc-divider-fst); font-family: var(--sc-divider-ff); font-weight: var(--sc-divider-fw); color: var(--sc-divider-color); display: block; } /*SIZE*/ :host([size="xs"]) { --sc-divider-my: 0.5rem; --sc-divider-fs: 0.75rem; } :host([size="sm"]) { --sc-divider-my: 0.75rem; --sc-divider-fs: 0.85rem; } :host([size="md"]) { --sc-divider-my: 1.25rem; } :host([size="lg"]) { --sc-divider-my: 1.85rem; } :host([size="xl"]) { --sc-divider-my: 2.25rem; } :host([size="2xl"]) { --sc-divider-my: 3rem; } div { display: flex; align-items: center; width: 100%; } div:before { content: ""; flex-grow: 1; border-top: var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color); width: 100%; } div:after { content: ""; flex-grow: 1; border-top: var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color); width: 100%; } /*ALIGNEMENT*/ :host([align="left"]) div:before { display: none; } :host([align="right"]) div:after { display: none; } /*TEXT*/ .text { flex-shrink: 0; max-width: 80%; } .no-text .text { display: none; } .has-text { gap: 0.5rem; }`],ue([rt()],xt.prototype,"slotNodes",2),ue([we("div")],xt.prototype,"divider",2),ue([a({type:String})],xt.prototype,"label",2),ue([a({type:String,reflect:!0})],xt.prototype,"size",2),ue([a({type:String,reflect:!0})],xt.prototype,"align",2),xt=ue([y("sonic-divider")],xt);try{customElements.define(rl,xt)}catch{}var il=Object.defineProperty,ol=Object.getOwnPropertyDescriptor,nl=(i,t,r,e)=>{for(var s=e>1?void 0:e?ol(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&il(t,r,s),s};const Ai="sonic-card-header-description";let ls=class extends v{render(){return u`<div><slot></slot></div>`}};ls.styles=[w`div { margin-top: .1em; font-family: var(--sc-font-family-base); font-size: .7em; font-weight: var(--sc-font-style-base); }`],ls=nl([y(Ai)],ls);try{customElements.define(Ai,ls)}catch{}var al=Object.defineProperty,ll=Object.getOwnPropertyDescriptor,Vs=(i,t,r,e)=>{for(var s=e>1?void 0:e?ll(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&al(t,r,s),s};const Si="sonic-card-header";let ge=class extends v{render(){return u`<div class="header"><div class="header-content">${this.label} ${this.description?u`<sonic-card-header-description>${this.description}</sonic-card-header-description>`:""}<slot></slot></div><slot name="suffix"></slot></div>`}};ge.styles=[w`:host { --sc-card-header-mb: 1rem; --sc-card-header-font-size: 1.875rem; --sc-card-header-font-weight: var(--sc-headings-font-weight); --sc-card-header-font-style: var(--sc-headings-font-style); --sc-card-header-family: var(--sc-headings-font-family); --sc-card-header-line-height: var(--sc-headings-line-height); } .header { display: flex; align-items: flex-start; gap: .5em 1em; margin-bottom: var(--sc-card-header-mb); line-height: var(--sc-card-header-line-height); font-family: var(--sc-card-header-font-family); font-size: var(--sc-card-header-font-size); font-style: var(--sc-card-header-font-style); font-weight: var(--sc-card-header-font-weight); } .header-content { flex-grow: 1; } slot[name="suffix"] { flex-shrink: 0; }`],Vs([a()],ge.prototype,"label",2),Vs([a()],ge.prototype,"description",2),ge=Vs([y(Si)],ge);try{customElements.define(Si,ge)}catch{}var cl=Object.defineProperty,hl=Object.getOwnPropertyDescriptor,dl=(i,t,r,e)=>{for(var s=e>1?void 0:e?hl(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&cl(t,r,s),s};const Pi="sonic-card-main";let qs=class extends v{render(){return u`<div><slot></slot></div>`}};qs=dl([y(Pi)],qs);try{customElements.define(Pi,qs)}catch{}var pl=Object.defineProperty,ul=Object.getOwnPropertyDescriptor,gl=(i,t,r,e)=>{for(var s=e>1?void 0:e?ul(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&pl(t,r,s),s};const Ci="sonic-card-footer";let Hs=class extends v{render(){return u`<slot></slot>`}};Hs=gl([y(Ci)],Hs);try{customElements.define(Ci,Hs)}catch{}var fl=Object.defineProperty,ml=Object.getOwnPropertyDescriptor,Oi=(i,t,r,e)=>{for(var s=e>1?void 0:e?ml(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&fl(t,r,s),s};const Ei="sonic-card";let De=class extends v{constructor(){super(...arguments),this.type="default"}render(){return u`<div part="card" class="card"><slot></slot></div>`}};De.styles=[w`:host { --sc-card-padding: 1.5rem; --sc-card-color: var(--sc-base-content); --sc-card-bg: var(--sc-base); --sc-card-rounded: var(--sc-rounded-lg); --sc-card-shadow: var(--sc-shadow-lg); } .card { padding: var(--sc-card-padding); background-color: var(--sc-card-bg); border-radius: var(--sc-card-rounded); box-shadow: var(--sc-card-shadow); color: var(--sc-card-color); } /*TYPES*/ :host([type="primary"]) { --sc-card-color: var(--sc-primary-content); --sc-badge-bg: var(--sc-primary); } :host([type="warning"]) { --sc-card-color: var(--sc-warning-content); --sc-card-bg: var(--sc-warning); } :host([type="danger"]) { --sc-card-color: var(--sc-danger-content); --sc-card-bg: var(--sc-danger); } :host([type="info"]) { --sc-card-color: var(--sc-info-content); --sc-card-bg: var(--sc-info); } :host([type="success"]) { --sc-card-color: var(--sc-success-content); --sc-card-bg: var(--sc-success); } :host([type="light"]) { --sc-card-color: var(--sc-base-content); --sc-card-bg: var(--sc-base-100); } :host([type="neutral"]) { --sc-card-color: var(--sc-base); --sc-card-bg: var(--sc-base-content); } :host([type="invert"]) { --sc-card-color: var(--sc-base); --sc-card-bg: var(--sc-base-900); }`],Oi([a({type:String,reflect:!0})],De.prototype,"type",2),De=Oi([y(Ei)],De);try{customElements.define(Ei,De)}catch{}const Ws=w`:host{ --sc-color:inherit; color:var(--sc-color); } :host([type="primary"]) { --sc-color: var(--sc-primary); } :host([type="warning"]) { --sc-color: var(--sc-warning); } :host([type="danger"]) { --sc-color: var(--sc-danger); } :host([type="info"]) { --sc-color: var(--sc-info); } :host([type="success"]) { --sc-color: var(--sc-success); } .inherit-color{ color:var(--sc-color); }`;w`:host{ --sc-color:inherit; --sc-bg:inherit; color:var(--sc-color); background:var(--sc-bg); } :host([type="primary"]) { --sc-color: var(--sc-primary-content); --sc-bg: var(--sc-primary); } :host([type="warning"]) { --sc-color: var(--sc-warning-content); --sc-bg: var(--sc-warning); } :host([type="danger"]) { --sc-color: var(--sc-danger-content); --sc-bg: var(--sc-danger); } :host([type="info"]) { --sc-color: var(--sc-info-content); --sc-bg: var(--sc-info); } :host([type="success"]) { --sc-color: var(--sc-success-content); --sc-bg: var(--sc-success); } .inherit-bg{ color:inherit; }`;var vl=Object.defineProperty,bl=Object.getOwnPropertyDescriptor,yl=(i,t,r,e)=>{for(var s=e>1?void 0:e?bl(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&vl(t,r,s),s};const ji="sonic-tr";let cs=class extends v{render(){return u`<slot></slot>`}};cs.styles=[Ws,w`:host { display: table-row; }`],cs=yl([y(ji)],cs);try{customElements.define(ji,cs)}catch{}var wl=Object.defineProperty,$l=Object.getOwnPropertyDescriptor,Le=(i,t,r,e)=>{for(var s=e>1?void 0:e?$l(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&wl(t,r,s),s};const Di="sonic-th";let jt=class extends v{render(){const i={textAlign:this.align,minWidth:this.minWidth};return u`<th part="th" style="${dt(i)}" colspan="${S(this.colSpan)}" rowspan="${S(this.rowSpan)}"><slot></slot></th>`}};jt.styles=[Ws,w`:host { display: contents; background:var(--sc-table-bg); position:sticky; top:0; z-index:20; } th { all: inherit; display: table-cell; border-bottom: calc(var(--sc-border-width) * 1.5) solid var(--sc-table-border-color); text-transform: var(--sc-table-th-tt); font-weight: var(--sc-table-th-fw); font-size: var(--sc-table-th-fs); padding: var(--sc-table-th-py) var(--sc-table-th-px); }`],Le([a({type:Number})],jt.prototype,"colSpan",2),Le([a({type:Number})],jt.prototype,"rowSpan",2),Le([a({type:String})],jt.prototype,"align",2),Le([a({type:String})],jt.prototype,"minWidth",2),jt=Le([y(Di)],jt);try{customElements.define(Di,jt)}catch{}var xl=Object.defineProperty,_l=Object.getOwnPropertyDescriptor,ze=(i,t,r,e)=>{for(var s=e>1?void 0:e?_l(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&xl(t,r,s),s};const Li="sonic-td";let Dt=class extends v{render(){const i={textAlign:this.align,minWidth:this.minWidth};return u`<td part="td" style="${dt(i)}" colspan="${S(this.colSpan)}" rowspan="${S(this.rowSpan)}"><slot></slot></td>`}};Dt.styles=[Ws,w`:host { display: contents; } td { all: inherit; display: table-cell; padding: var(--sc-table-td-py) var(--sc-table-td-px); }`],ze([a({type:Number})],Dt.prototype,"colSpan",2),ze([a({type:Number})],Dt.prototype,"rowSpan",2),ze([a({type:String})],Dt.prototype,"align",2),ze([a({type:String})],Dt.prototype,"minWidth",2),Dt=ze([y(Li)],Dt);try{customElements.define(Li,Dt)}catch{}var kl=Object.defineProperty,Al=Object.getOwnPropertyDescriptor,Sl=(i,t,r,e)=>{for(var s=e>1?void 0:e?Al(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&kl(t,r,s),s};const zi="sonic-thead";let hs=class extends v{render(){return u`<slot></slot>`}};hs.styles=[w`:host { display: table-header-group; }`],hs=Sl([y(zi)],hs);try{customElements.define(zi,hs)}catch{}var Pl=Object.defineProperty,Cl=Object.getOwnPropertyDescriptor,Ol=(i,t,r,e)=>{for(var s=e>1?void 0:e?Cl(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Pl(t,r,s),s};const Ti="sonic-tbody";let ds=class extends v{render(){return u`<tbody><slot></slot></tbody>`}};ds.styles=[w`:host { display: table-row-group; } ::slotted(sonic-tr:nth-child(odd)){ background:var(--sc-base-50); } ::slotted(sonic-tr:hover) { background:var(--sc-base-100); } ::slotted(sonic-tr:not(:last-child)){ border-bottom:var(--sc-form-border-width) solid var(--sc-base-200) !important; }`],ds=Ol([y(Ti)],ds);try{customElements.define(Ti,ds)}catch{}var El=Object.defineProperty,jl=Object.getOwnPropertyDescriptor,Dl=(i,t,r,e)=>{for(var s=e>1?void 0:e?jl(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&El(t,r,s),s};const Mi="sonic-tfoot";let ps=class extends v{render(){return u`<tfoot><slot></slot></tfoot>`}};ps.styles=[w`:host { display: contents; }`],ps=Dl([y(Mi)],ps);try{customElements.define(Mi,ps)}catch{}var Ll=Object.defineProperty,zl=Object.getOwnPropertyDescriptor,Tl=(i,t,r,e)=>{for(var s=e>1?void 0:e?zl(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Ll(t,r,s),s};const Ri="sonic-caption";let us=class extends v{render(){return u`<slot></slot>`}};us.styles=[w`:host { display:table-caption; font-size:.75rem; color:var(--sc-table-caption-color); padding: var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py) ); }`],us=Tl([y(Ri)],us);try{customElements.define(Ri,us)}catch{}var Ml=Object.defineProperty,Rl=Object.getOwnPropertyDescriptor,Zt=(i,t,r,e)=>{for(var s=e>1?void 0:e?Rl(t,r):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(e?n(t,r,s):n(s))||s);return e&&s&&Ml(t,r,s),s};const Ni="sonic-table";let vt=class extends v{constructor(){super(...arguments),this.size="md",this.striped=!1,this.sticky=!1,this.bordered=!1,this.hover=!1}render(){const i={maxHeight:this.maxHeight};return u`<div class="table-container custom-scroll" style="${dt(i)}"><div class="table" ?striped="${this.striped}" ?hover="${this.hover}" ?sticky="${this.sticky}"><slot></slot></div></div>`}};vt.styles=[qe,w`:host { --sc-table-fw: var(--sc-font-weight-base); --sc-table-fst: var(--sc-font-style-base); --sc-table-fs: 1rem; --sc-table-border-color: var(--sc-base-200); --sc-table-caption-color: var(--sc-base-400); --sc-table-bg: var(--sc-base); --sc-table-th-fs: .85em; --sc-table-th-fw: bold; --sc-table-th-tt: uppercase; --sc-table-th-px: var(--sc-table-td-px); --sc-table-th-py: calc(1.8 * var(--sc-table-td-py) ); --sc-table-td-px: .5em; --sc-table-td-py: .5em; display:block; } .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; } .table { width: 100%; font-size: var(--sc-table-fs); display: table; box-sizing:border-box; } /*SIZES*/ :host([size="2xs"]) { --sc-table-fs: 0.6rem; } :host([size="xs"]) { --sc-table-fs: 0.75rem; } :host([size="sm"]) { --sc-table-fs: 0.85rem; } :host([size="lg"]) { --sc-table-fs: 1.2rem; } :host([size="xl"]) { --sc-table-fs: 1.5rem; } :host([bordered]) .table-container { border:var(--sc-border-width) solid var(--sc-table-border-color) !important; }`],Zt([a({type:String,reflect:!0})],vt.prototype,"size",2),Zt([a({type:Boolean,reflect:!0})],vt.prototype,"striped",2),Zt([a({type:Boolean,reflect:!0})],vt.prototype,"sticky",2),Zt([a({type:Boolean,reflect:!0})],vt.prototype,"bordered",2),Zt([a({type:Boolean,reflect:!0})],vt.prototype,"hover",2),Zt([a({type:String})],vt.prototype,"maxHeight",2),vt=Zt([y(Ni)],vt);try{customElements.define(Ni,vt)}catch{}let gs=window;gs.SonicPublisherManager||(gs.SonicPublisherManager=K),gs.SonicDataBindObserver||(gs.SonicDataBindObserver=At);const Nl=Ds,Fl=Es,Il=ne,Ul=Xe,Bl=I,Vl=$e;let Ks=window;Ks["concorde-mixins"]=Ks["concorde-mixins"]||{},Ks["concorde-mixins"]={Fetcher:Nl,FormCheckable:Fl,FormElement:Il,FormInput:Ul,Subscriber:Bl,TemplatesContainer:Vl};const ql=pt,Hl=H;let Ys=window;Ys["concorde-components"]=Ys["concorde-components"]||{},Ys["concorde-components"]={SonicToast:ql,SonicModal:Hl}});
|
|
115
|
+
*/const io=ne(class extends ae{constructor(o){var t;if(super(o),o.type!==Rt.ATTRIBUTE||o.name!=="class"||((t=o.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(t=>o[t]).join(" ")+" "}update(o,[t]){var s,e;if(this.et===void 0){this.et=new Set,o.strings!==void 0&&(this.st=new Set(o.strings.join(" ").split(/\s/).filter(i=>i!=="")));for(const i in t)t[i]&&!(!((s=this.st)===null||s===void 0)&&s.has(i))&&this.et.add(i);return this.render(t)}const r=o.element.classList;this.et.forEach(i=>{i in t||(r.remove(i),this.et.delete(i))});for(const i in t){const n=!!t[i];n===this.et.has(i)||((e=this.st)===null||e===void 0?void 0:e.has(i))||(n?(r.add(i),this.et.add(i)):(r.remove(i),this.et.delete(i)))}return ht}});var Gn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor,z=(o,t,s,e)=>{for(var r=e>1?void 0:e?Qn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Gn(t,s,r),r};const no="sonic-input";let C=class extends Xe(le(F(f))){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}updated(){var o,t,s,e;this.hasLabel=!!(this.label||((o=this.slotLabelNodes)==null?void 0:o.length)),this.hasDescription=!!(this.description||((t=this.slotDescriptionNodes)==null?void 0:t.length)),this.hasSuffix=!!((s=this.slotSuffixNodes)!=null&&s.length),this.hasPrefix=!!((e=this.slotPrefixNodes)!=null&&e.length)}onSlotChange(){this.requestUpdate()}inlineContentFocus(){var o;!this.inlineContent||(console.log("oypouaze"),(o=this.input)==null||o.focus())}render(){const o={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return u`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?this.label:""}<slot name="label" @slotchange="${this.onSlotChange}"></slot></label><div @click="${this.inlineContentFocus}" class="form-control ${io(o)}"><div class="${this.inlineContent?"form-element form-element-wrapper":"contents"}"><slot name="prefix" @slotchange="${this.onSlotChange}"></slot><input id="form-element" part="input" class="form-element input" @input="${this.handleChange}" @blur="${this.handleBlur}" type="${this.type}" disabled="${k(this.disabled)}" ?readonly="${this.readonly}" ?autofocus="${this.autofocus}" list="${k(this.list)}" tabindex="${k(this.tabindex)}" pattern="${k(this.pattern)}" min="${k(this.min)}" max="${k(this.max)}" step="${k(this.step)}" src="${k(this.src)}" minlength="${k(this.minlength)}" maxlength="${k(this.maxlength)}" placeholder="${k(this.placeholder)}" required="${k(this.required)}" autocomplete="${k(this.autocomplete)}" .name="${this.name}" .value="${this.value}"><slot name="suffix" @slotchange="${this.onSlotChange}"></slot></div></div><slot name="description" class="${this.hasDescription?"form-description":"hidden"}">${this.description?u`${this.description}`:""}</slot>`}};C.styles=[ce,Ur],z([a({type:String,reflect:!0})],C.prototype,"size",2),z([a({type:String})],C.prototype,"list",2),z([a({type:String})],C.prototype,"placeholder",2),z([a({type:String})],C.prototype,"pattern",2),z([a({type:String})],C.prototype,"min",2),z([a({type:String})],C.prototype,"max",2),z([a({type:Boolean})],C.prototype,"readonly",2),z([a({type:Number})],C.prototype,"step",2),z([a({type:Number})],C.prototype,"minlength",2),z([a({type:Number})],C.prototype,"maxlength",2),z([a({type:String})],C.prototype,"src",2),z([a({type:String})],C.prototype,"label",2),z([a({type:String})],C.prototype,"description",2),z([a({type:Boolean,reflect:!0})],C.prototype,"inlineContent",2),z([st({slot:"label"})],C.prototype,"slotLabelNodes",2),z([st({slot:"description"})],C.prototype,"slotDescriptionNodes",2),z([st({slot:"suffix"})],C.prototype,"slotSuffixNodes",2),z([st({slot:"prefix"})],C.prototype,"slotPrefixNodes",2),z([re("input")],C.prototype,"input",2),z([Y()],C.prototype,"hasDescription",2),z([Y()],C.prototype,"hasLabel",2),z([Y()],C.prototype,"hasSuffix",2),z([Y()],C.prototype,"hasPrefix",2),C=z([v(no)],C);try{customElements.define(no,C)}catch{}var Jn=Object.defineProperty,Xn=Object.getOwnPropertyDescriptor,Kt=(o,t,s,e)=>{for(var r=e>1?void 0:e?Xn(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Jn(t,s,r),r};const ao="sonic-checkbox";let lt=class extends zr(Xe(le(F(f)))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.hasDescription=!1}updated(){var o;this.hasDescription=!!(this.description||((o=this.slotDescriptionNodes)==null?void 0:o.length))}connectedCallback(){this.type="checkbox",super.connectedCallback()}render(){return u`<label class="checkbox-container ${this.disabled?"disabled":""}"><span class="icon-container"><input type="${this.type}" @change="${this.handleChange}" @blur="${this.handleBlur}" ?required="${this.required}" .disabled="${k(this.disabled)}" .checked="${k(this.checked)}" .name="${this.name}" .value="${this.value}" ?autofocus="${this.autofocus}"><sonic-icon name="${this.iconName}" class="sc-input-icon"></sonic-icon></span><div class="checkbox-text">${this.label?this.label:""}<slot></slot><slot name="description" class="${this.hasDescription?"description":"hidden"}">${this.description?u`${this.description}`:""}</slot></div></label>`}};lt.styles=[ce,w`:host{ --sc-checkbox-border-width: var(--sc-form-border-width); --sc-checkbox-border-color: transparent; } * { box-sizing: border-box; } .checkbox-container { min-height: 1.4em; display: flex; gap: 0.5em; line-height: 1.2; align-items: flex-start; font-size: var(--sc-fs); } .icon-container { position: relative; display: flex; flex-shrink: 0; } input { box-sizing: border-box; appearance: none; flex-shrink: 0; height: calc(var(--sc-fs) * 1.25); width: calc(var(--sc-fs) * 1.25); display: block; cursor: pointer; border-radius: 0.25em; transition: 0.2s; outline: none; margin: 0; background-color: var(--sc-base-200); border:var(--sc-checkbox-border-width) solid var(--sc-checkbox-border-color); } input:focus, :host(:not([disabled])) input:active { box-shadow: 0 0 0 2px var(--sc-primary); } :host(:not([disabled])) label { cursor: pointer; } sonic-icon { line-height: 0; position: absolute; top: 50%; left: 50%; transform: translateX(-50%) translateY(-50%) scale(0); transition: transform 0.2s ease-in-out; color: var(--sc-primary-content); } /* .checkbox-text { align-self: center; } */ .description { color: var(--sc-base-400); font-size: 0.85em; margin-top: 0.2em; display: block; } /*Active */ input:checked, input[checked="true"] { background: var(--sc-primary); } input:checked + sonic-icon, input[checked="true"] + sonic-icon { transform: translateX(-50%) translateY(-50%) scale(1); } /*DISABLED */ .disabled { cursor: not-allowed; } .disabled input { opacity: 0.4; } .disabled .checkbox-text { opacity: 0.6; } ::slotted(a) { color: inherit; text-decoration: underline !important; } ::slotted(a:hover) { text-decoration: none !important; } /*Utils */ .hidden { display: none; } /*ERROR*/ :host([touched]) .checkbox-container:has(input:not(:focus):invalid) { --sc-checkbox-border-color:var(--sc-danger); } :host([touched]) .checkbox-container:has(input:not(:focus):invalid) .checkbox-text{ color:var(--sc-danger); }`],Kt([a({type:Boolean,reflect:!0})],lt.prototype,"touched",2),Kt([a({type:String})],lt.prototype,"iconName",2),Kt([a({type:String})],lt.prototype,"description",2),Kt([a({type:String})],lt.prototype,"label",2),Kt([st({slot:"description"})],lt.prototype,"slotDescriptionNodes",2),Kt([a({type:Boolean})],lt.prototype,"hasDescription",2),lt=Kt([v(ao)],lt);try{customElements.define(ao,lt)}catch{}var ta=Object.defineProperty,ea=Object.getOwnPropertyDescriptor,ra=(o,t,s,e)=>{for(var r=e>1?void 0:e?ea(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&ta(t,s,r),r};const lo="sonic-radio";let tr=class extends lt{constructor(){super(),this.radio=!0}connectedCallback(){super.connectedCallback(),this.type="radio"}};tr.styles=[lt.styles,w`:host input { border-radius: 50%; } :host sonic-icon { border-radius: 50%; overflow: hidden; background-color:var(--sc-primary-content); line-height:0; display:block; font-size:0; height:10px; width:10px; }`],tr=ra([v(lo)],tr);try{customElements.define(lo,tr)}catch{}var sa=Object.defineProperty,oa=Object.getOwnPropertyDescriptor,K=(o,t,s,e)=>{for(var r=e>1?void 0:e?oa(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&sa(t,s,r),r};const co="sonic-select";let T=class extends le(F(f)){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=!1,this._options=[],this._value="",this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(o){this._options=o,!this.value&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}get value(){return this._value}set value(o){!o||this._value!=o&&(this._value=o,this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?Z.getInstance().get(this.formDataProvider)[this._name]=o:this.publisher&&(this.publisher[this._name]=o),this.requestUpdate())}connectedCallback(){super.connectedCallback();let o=this.querySelectorAll("option");o.length>0&&(this.options=Array.from(o).map(t=>({value:t.value,wording:t.text})))}updated(){var o,t,s,e;this.hasLabel=!!(this.label||((o=this.slotLabelNodes)==null?void 0:o.length)),this.hasDescription=!!(this.description||((t=this.slotDescriptionNodes)==null?void 0:t.length)),this.hasSuffix=!!((s=this.slotSuffixNodes)!=null&&s.length),this.hasPrefix=!!((e=this.slotPrefixNodes)!=null&&e.length)}onSlotChange(){this.requestUpdate()}validateFormElement(){var t;const o=(t=this.shadowRoot)==null?void 0:t.querySelector("select");!o||o.checkValidity()||(this.getFormPublisher().isFormValid=!1,o.reportValidity())}render(){const o={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return u`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?this.label:""}<slot name="label" @slotchange="${this.onSlotChange}"></slot></label><div class="form-control ${io(o)}"><slot name="prefix" @slotchange="${this.onSlotChange}"></slot><div class="form-select-wrapper"><select @change="${this.handleChange}" @blur="${this.handleBlur}" disabled="${k(this.disabled)}" ?required="${this.required}" ?multiple="${this.multiple}" size="${k(this.selectSize)}" ?autofocus="${this.autofocus}" .value="${this.value}" class="form-element">${Ut(this.options,t=>t[this.valueKey],t=>{const s=this.value==t[this.valueKey]?"selected":null;return u`<option selected="${k(s)}" value="${t[this.valueKey]}">${t[this.wordingKey]}</option>`})}<slot></slot></select><sonic-icon class="select-chevron" name="nav-arrow-down" size="${this.size}"></sonic-icon></div><slot name="suffix" @slotchange="${this.onSlotChange}"></slot></div><slot name="description" class="${this.hasDescription?"form-description":"hidden"}">${this.description?u`${this.description}`:""}</slot>`}};T.styles=[Ur,w`.form-element { appearance: none; padding-right: 2.5em; } .form-select-wrapper { position: relative; width: 100%; } sonic-icon { position: absolute; right: 1em; top: 50%; pointer-events: none; transform: translateY(-50%); color:var(--sc-input-color); } option { padding: 0.1rem 5rem; color: var(--sc-base-content); background: var(--sc-base); }`],K([a({type:String})],T.prototype,"valueKey",2),K([a({type:String})],T.prototype,"wordingKey",2),K([a({type:Boolean})],T.prototype,"multiple",2),K([a({type:String,reflect:!0})],T.prototype,"size",2),K([a({type:Number})],T.prototype,"selectSize",2),K([a({type:Array})],T.prototype,"options",1),K([a()],T.prototype,"value",1),K([a({type:String})],T.prototype,"label",2),K([a({type:String})],T.prototype,"description",2),K([st({slot:"label"})],T.prototype,"slotLabelNodes",2),K([st({slot:"description"})],T.prototype,"slotDescriptionNodes",2),K([st({slot:"suffix"})],T.prototype,"slotSuffixNodes",2),K([st({slot:"prefix"})],T.prototype,"slotPrefixNodes",2),K([Y()],T.prototype,"hasDescription",2),K([Y()],T.prototype,"hasLabel",2),K([Y()],T.prototype,"hasSuffix",2),K([Y()],T.prototype,"hasPrefix",2),T=K([v(co)],T);try{customElements.define(co,T)}catch{}var ia=Object.defineProperty,na=Object.getOwnPropertyDescriptor,B=(o,t,s,e)=>{for(var r=e>1?void 0:e?na(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&ia(t,s,r),r};const ho="sonic-textarea";let L=class extends Xe(le(F(f))){constructor(){super(...arguments),this.size="",this.readonly=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.slotClasses={}}updated(){var o,t,s,e;this.hasLabel=!!(this.label||((o=this.slotLabelNodes)==null?void 0:o.length)),this.hasDescription=!!(this.description||((t=this.slotDescriptionNodes)==null?void 0:t.length)),this.hasSuffix=!!((s=this.slotSuffixNodes)!=null&&s.length),this.hasPrefix=!!((e=this.slotPrefixNodes)!=null&&e.length)}onSlotChange(){this.requestUpdate()}validateFormElement(){var t;const o=(t=this.shadowRoot)==null?void 0:t.querySelector("textarea");!o||o.checkValidity()||(this.getFormPublisher().isFormValid=!1,o.reportValidity())}render(){return u`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?this.label:""}<slot name="label" @slotchange="${this.onSlotChange}"></slot></label><div class="form-control"><textarea @input="${this.handleChange}" @blur="${this.handleBlur}" disabled="${k(this.disabled)}" ?required="${this.required}" ?autofocus="${this.autofocus}" rows="${k(this.rows)}" cols="${k(this.cols)}" maxlength="${k(this.maxlength)}" minlength="${k(this.minlength)}" ?readonly="${this.readonly}" spellcheck="${k(this.spellcheck)}" autocomplete="${k(this.autocomplete)}" tabindex="${k(this.tabindex)}" wrap="${k(this.wrap)}" placeholder="${this.placeholder}" class="form-element textarea custom-scroll">${this.value}</textarea></div><slot name="description" class="${this.hasDescription?"form-description":"hidden"}">${this.description?u`${this.description}`:""}</slot>`}};L.styles=[Ur,We,w`textarea { font-size: inherit; }`],B([a({type:String})],L.prototype,"size",2),B([a({type:Number})],L.prototype,"rows",2),B([a({type:Number})],L.prototype,"cols",2),B([a({type:Number})],L.prototype,"maxlength",2),B([a({type:Number})],L.prototype,"minlength",2),B([a({type:String})],L.prototype,"wrap",2),B([a({type:Boolean})],L.prototype,"readonly",2),B([a({type:String})],L.prototype,"placeholder",2),B([a({type:String})],L.prototype,"label",2),B([a({type:String})],L.prototype,"description",2),B([st({slot:"label"})],L.prototype,"slotLabelNodes",2),B([st({slot:"description"})],L.prototype,"slotDescriptionNodes",2),B([st({slot:"suffix"})],L.prototype,"slotSuffixNodes",2),B([st({slot:"prefix"})],L.prototype,"slotPrefixNodes",2),B([Y()],L.prototype,"hasDescription",2),B([Y()],L.prototype,"hasLabel",2),B([Y()],L.prototype,"hasSuffix",2),B([Y()],L.prototype,"hasPrefix",2),B([a()],L.prototype,"slotClasses",2),L=B([v(ho)],L);try{customElements.define(ho,L)}catch{}var aa=Object.defineProperty,la=Object.getOwnPropertyDescriptor,Vr=(o,t,s,e)=>{for(var r=e>1?void 0:e?la(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&aa(t,s,r),r};const po="sonic-fieldset";let ue=class extends F(f){constructor(){super(...arguments),this.disabled=!1}render(){return u`<fieldset form="${k(this.form)}" ?disabled="${this.disabled}"><slot></slot></fieldset>`}};ue.styles=[w`:host { --sc-fieldset-mt: 0; --sc-fieldset-mb: 1rem; --sc-fieldset-border-color: var(--sc-base-200); --sc-fieldset-border-width: var(--sc-form-border-width); margin-top: var(--sc-fieldset-mt); margin-bottom: var(--sc-fieldset-mb); display: block; border: var(--sc-fieldset-border-width) solid var(--sc-fieldset-border-color) !important; padding: 1.8rem 1.25rem; border-radius: var(--sc-rounded-lg); } fieldset { all: unset; display: contents; } ::slotted(sonic-legend) { margin-bottom: 1.5rem; display: block; }`],Vr([a({type:Boolean,reflect:!0})],ue.prototype,"disabled",2),Vr([a({type:String})],ue.prototype,"form",2),ue=Vr([v(po)],ue);try{customElements.define(po,ue)}catch{}var ca=Object.defineProperty,ha=Object.getOwnPropertyDescriptor,da=(o,t,s,e)=>{for(var r=e>1?void 0:e?ha(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&ca(t,s,r),r};let er=class extends f{render(){return u`<slot></slot>`}};er.styles=[w`:host { color: var(--sc-neutral-500); font-size: 1.25rem; line-height: 1.2; display: block; font-weight: var(--sc-font-weight-base); font-style: var(--sc-font-style-base); margin-top: 0.25em; }`],er=da([v("sonic-legend-description")],er);try{customElements.define("sonic-legend-description",er)}catch{}var pa=Object.defineProperty,ua=Object.getOwnPropertyDescriptor,me=(o,t,s,e)=>{for(var r=e>1?void 0:e?ua(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&pa(t,s,r),r};const uo="sonic-legend";let xt=class extends f{render(){return u`<legend part="legend">${this.iconName?u`<div class="icon"><sonic-icon name="${this.iconName}" prefix="${k(this.iconPrefix)}" library="${k(this.iconLibrary)}"></sonic-icon></div>`:""}<div class="legend-content">${this.label} ${this.description?u`<sonic-legend-description>${this.description}</sonic-legend-description>`:""}<slot></slot></div><slot name="suffix"></slot></legend>`}};xt.styles=[w`:host { --sc-legend-font-size: 1.75rem; --sc-legend-font-weight: var(--sc-font-weight-base); --sc-legend-font-style: var(--sc-headings-font-style); --sc-legend-family: var(--sc-headings-font-family); --sc-legend-line-height: var(--sc-headings-line-height); display: flex; width: 100%; } legend { font-size: var(--sc-legend-font-size); font-weight: var(--sc-legend-font-weight); font-style: var(--sc-legend-font-style); font-family: var(--sc-legend-font-family); line-height: var(--sc-legend-line-height); padding: 0; display: flex; width: 100%; align-items: flex-start; gap: 0.5em; } slot[name="suffix"] { display: block; margin-left: auto; flex-shrink: 0; } .legend-content { flex-grow: 1; }`],me([a({type:String})],xt.prototype,"description",2),me([a({type:String})],xt.prototype,"label",2),me([a({type:String})],xt.prototype,"iconName",2),me([a({type:String})],xt.prototype,"iconLibrary",2),me([a({type:String})],xt.prototype,"iconPrefix",2),xt=me([v(uo)],xt);try{customElements.define(uo,xt)}catch{}class ma{constructor(t,{target:s,config:e,callback:r,skipInitial:i}){this.t=!1,this.i=!1,this.callback=()=>!0,(this.h=t).addController(this),this.o=s===null||s!=null?s:this.h,this.l=e,this.t=i!=null?i:this.t,this.callback=r!=null?r:this.callback,window.ResizeObserver?this.u=new ResizeObserver(n=>{this.handleChanges(n),this.h.requestUpdate()}):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){this.value=this.callback(t,this.u)}hostConnected(){this.o&&this.observe(this.o)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.t&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}}var ga=Object.defineProperty,ba=Object.getOwnPropertyDescriptor,fa=(o,t,s,e)=>{for(var r=e>1?void 0:e?ba(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&ga(t,s,r),r};const mo="sonic-form-layout";let rr=class extends F(f){constructor(){super(...arguments),this._resizeController=new ma(this,{})}render(){return u`<div class="${this.offsetWidth>440?"cq--md":""}"><slot></slot></div>`}};rr.styles=[w`:host { display: block; } div { display: grid; grid-gap: 1.5rem; align-items: flex-start; } .cq--md { grid-gap: 1.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); } ::slotted(sonic-radio), ::slotted(sonic-checkbox), ::slotted(sonic-form-actions), ::slotted(sonic-divider), ::slotted(sonic-textarea) { grid-column: 1 / -1; } ::slotted(sonic-divider) { --sc-divider-my: 0; }`],rr=fa([v(mo)],rr);try{customElements.define(mo,rr)}catch{}var va=Object.defineProperty,ya=Object.getOwnPropertyDescriptor,wa=(o,t,s,e)=>{for(var r=e>1?void 0:e?ya(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&va(t,s,r),r};const go="sonic-form-actions";let sr=class extends f{render(){return u`<slot></slot>`}};sr.styles=[w`:host{ display:flex; gap:.3rem; }`],sr=wa([v(go)],sr);try{customElements.define(go,sr)}catch{}var xa=Object.defineProperty,$a=Object.getOwnPropertyDescriptor,ka=(o,t,s,e)=>{for(var r=e>1?void 0:e?$a(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&xa(t,s,r),r};const bo="sonic-group";let or=class extends f{updated(){const o=this.querySelectorAll("sonic-input, sonic-button"),t=o.length;t>1&&o.forEach((s,e)=>{e===0?(s.style.setProperty("--sc-item-rounded-tr","0"),s.style.setProperty("--sc-item-rounded-br","0")):e===t-1?(s.style.setProperty("--sc-item-rounded-tl","0"),s.style.setProperty("--sc-item-rounded-bl","0")):(s.style.setProperty("--sc-item-rounded-tr","0"),s.style.setProperty("--sc-item-rounded-br","0"),s.style.setProperty("--sc-item-rounded-tl","0"),s.style.setProperty("--sc-item-rounded-bl","0"))})}render(){return u`<slot></slot>`}};or.styles=[w`:host { display: inline-flex; vertical-align: middle; } slot { width: 100%; display: flex; align-items: flex-end; }`],or=ka([v(bo)],or);try{customElements.define(bo,or)}catch{}var _a=Object.defineProperty,Aa=Object.getOwnPropertyDescriptor,$t=(o,t,s,e)=>{for(var r=e>1?void 0:e?Aa(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&_a(t,s,r),r};const fo="sonic-image";let ct=class extends f{constructor(){super(...arguments),this.rounded="none",this.src="",this.alt="",this.loading="lazy",this.ratio="auto",this.objectPosition="center center",this.imageRendering="auto",this.cover=!1}render(){const o={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return u`<div part="image"><picture part="picture"><img part="img" src="${this.src}" loading="${this.loading}" alt="${this.alt}" style="${dt(o)}"></picture></div>`}};ct.styles=[w`:host { --sc-img-radius: 0; --sc-img-bg: var(--sc-placeholder-bg); border-radius: var(--sc-img-radius); display: block; width: 100%; background: var(--sc-img-bg); } img { width: 100%; vertical-align: middle; object-fit: cover; } img[src=""] { visibility: hidden; } /*Rounded*/ :host([rounded]) { --sc-img-radius: var(--sc-rounded); overflow: hidden; } :host([rounded="sm"]) { --sc-img-radius: var(--sc-rounded-sm); } :host([rounded="md"]) { --sc-img-radius: var(--sc-rounded-md); } :host([rounded="lg"]) { --sc-img-radius: var(--sc-rounded-lg); } :host([rounded="xl"]) { --sc-img-radius: var(--sc-rounded-xl); } /*Cercle*/ :host([rounded="full"]) { --sc-img-radius: 50% !important; } :host([rounded="none"]) { --sc-img-radius: 0 !important; } :host([cover]), :host([cover]) > div, :host([cover]) img { position: absolute !important; left: 0 !important; top: 0 !important; right: 0 !important; bottom: 0 !important; height: 100% !important; width: 100% !important; }`],$t([a({type:String})],ct.prototype,"rounded",2),$t([a({type:String})],ct.prototype,"src",2),$t([a({type:String})],ct.prototype,"alt",2),$t([a({type:String})],ct.prototype,"loading",2),$t([a({type:String})],ct.prototype,"ratio",2),$t([a({type:String})],ct.prototype,"objectPosition",2),$t([a({type:String})],ct.prototype,"imageRendering",2),$t([a({type:Boolean,reflect:!0})],ct.prototype,"cover",2),ct=$t([v(fo)],ct);try{customElements.define(fo,ct)}catch{}var Pa=Object.defineProperty,Sa=Object.getOwnPropertyDescriptor,zt=(o,t,s,e)=>{for(var r=e>1?void 0:e?Sa(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Pa(t,s,r),r};const Ca="sonic-taxonomy";let ut=class extends f{constructor(){super(...arguments),this.icon={},this.taxonomy=[],this.separator=", ",this.key="",this.type="default",this.variant="default",this.size="md"}render(){if(!this.taxonomy)return S;let o=this.key+"_display",t=this.taxonomy.filter(s=>s!=null&&(s[o]===!0||s[o]=="1"||!s.hasOwnProperty(o)));return t.length===0?(this.style.display="none",S):(this.style.removeProperty("display"),u`<sonic-badge type="${this.type}" variant="${this.variant}" size="${this.size}"><sonic-icon slot="prefix" library="${k(this.icon.library)}" prefix="${k(this.icon.prefix)}" name="${k(this.icon.name)}"></sonic-icon><span class="taxonomy-list">${Ut(t,s=>s[this.key+"_id"],s=>u`<span>${s[this.key+"_name"]}</span><span class="sonic-taxonomy-separator">${Bt(this.separator)}</span>`)}</span></sonic-badge>`)}};ut.styles=w`:host .sonic-taxonomy-separator:last-child { display: none; } .taxonomy-list { display: flex; flex-wrap: wrap; }`,zt([a({type:Object})],ut.prototype,"icon",2),zt([a({type:Array})],ut.prototype,"taxonomy",2),zt([a({type:String})],ut.prototype,"separator",2),zt([a({type:String})],ut.prototype,"key",2),zt([a({type:String,reflect:!0})],ut.prototype,"type",2),zt([a({type:String,reflect:!0})],ut.prototype,"variant",2),zt([a({type:String,reflect:!0})],ut.prototype,"size",2),ut=zt([v(Ca)],ut);try{customElements.define("sonic-taxonomy",ut)}catch{}var Oa=Object.defineProperty,Ea=Object.getOwnPropertyDescriptor,ja=(o,t,s,e)=>{for(var r=e>1?void 0:e?Ea(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Oa(t,s,r),r};const vo="sonic-menu-item";let qr=class extends E{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="primary"),this.hasAttribute("shape")||(this.shape="block"),this.hasAttribute("align")||(this.align="left"),super.connectedCallback()}};qr=ja([v(vo)],qr);try{customElements.define(vo,qr)}catch{}var za=Object.defineProperty,Da=Object.getOwnPropertyDescriptor,mt=(o,t,s,e)=>{for(var r=e>1?void 0:e?Da(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&za(t,s,r),r};const yo="sonic-menu";let ot=class extends f{constructor(){super(...arguments),this.size="",this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.minWidth="0",this.hasMoreElements=!1}checkIfMore(){var o;this.hasMoreElements=!!((o=this.moreElements)!=null&&o.length)}updated(o){const t=this.querySelector(".more-btn");this.size&&t&&t.setAttribute("size",this.size),this.querySelectorAll("sonic-divider").forEach(s=>{s.hasAttribute("size")||s.setAttribute("size","xs")}),super.updated(o)}mainSlotChange(){this.setChildrenSize(this.menuChildren)}setChildrenSize(o){o.forEach(t=>{this.size&&t.setAttribute("size",this.size),this.align&&t.setAttribute("align",this.align),this.direction=="row"&&t.getAttribute("shape")=="block"&&t.setAttribute("shape","default")})}render(){const o={minWidth:this.minWidth,flexDirection:this.direction,gap:this.gap},t=this.direction=="row",s={display:"block",alignSelf:t?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},e={marginLeft:t?"":".55em"};return u`<menu part="menu" class="shadowable" style="${dt(o)}"><slot @slotchange="${this.mainSlotChange}"></slot><sonic-pop style="${dt(s)}" class="${this.hasMoreElements?"":"hidden"}"><sonic-menu-item style="${dt(e)}" class="more-btn" shape="${this.moreShape}" align="center"><sonic-icon size="xl" name="${t?"more-vert":"more-horiz"}"></sonic-icon></sonic-menu-item><slot name="more" @slotchange="${this.checkIfMore}" slot="content"></slot></sonic-pop></menu>`}};ot.styles=[w`:host { display: block; --sc-menu-gap:.15rem; } :host > menu { display: flex; border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em); margin: 0; padding: 0.35em; } .hidden { display:none !important; } /*OMBRE*/ :host([shadow]) .shadowable, :host([shadow="md"]) .shadowable, :host([shadow="true"]) .shadowable { box-shadow: var(--sc-shadow); } :host([shadow="sm"]) .shadowable { box-shadow: var(--sc-shadow-sm); } :host([shadow="lg"]) .shadowable { box-shadow: var(--sc-shadow-lg); } :host([shadow="none"]) .shadowable { box-shadow: none; }`],mt([a({type:String,reflect:!0})],ot.prototype,"size",2),mt([a({type:String,reflect:!0})],ot.prototype,"direction",2),mt([a({type:String})],ot.prototype,"gap",2),mt([a({type:String,reflect:!0})],ot.prototype,"align",2),mt([a({type:String,reflect:!0})],ot.prototype,"shadow",2),mt([a({type:String})],ot.prototype,"moreShape",2),mt([a({type:String})],ot.prototype,"minWidth",2),mt([Nt({selector:"sonic-menu-item"})],ot.prototype,"menuChildren",2),mt([Nt({slot:"more",selector:"*"})],ot.prototype,"moreElements",2),mt([Y()],ot.prototype,"hasMoreElements",2),ot=mt([v(yo)],ot);try{customElements.define(yo,ot)}catch{}var La=Object.defineProperty,Ma=Object.getOwnPropertyDescriptor,wo=(o,t,s,e)=>{for(var r=e>1?void 0:e?Ma(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&La(t,s,r),r};const xo="sonic-modal-actions";let Le=class extends f{firstUpdated(){var o;(o=this.buttons)==null||o.forEach(t=>{t.addEventListener("click",()=>{var s;t.getAttribute("hideModal")!="false"&&((s=this.closest("sonic-modal"))==null||s.hide())})})}render(){return u`<slot></slot>`}};Le.styles=[w`:host { display: flex; gap: 0.5rem; margin-top: auto; padding-top: 1rem; }`],wo([Nt({selector:"sonic-button"})],Le.prototype,"buttons",2),Le=wo([v(xo)],Le);try{customElements.define(xo,Le)}catch{}var Ta=Object.defineProperty,Na=Object.getOwnPropertyDescriptor,Ia=(o,t,s,e)=>{for(var r=e>1?void 0:e?Na(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Ta(t,s,r),r};const $o="sonic-modal-title";let ir=class extends f{render(){return u`<slot></slot>`}};ir.styles=[w`:host { font-weight: bold; font-size: 1.5rem; display: block; line-height: var(--sc-headings-line-height); font-family: var(--sc-headings-font-family); }`],ir=Ia([v($o)],ir);try{customElements.define($o,ir)}catch{}var Ra=Object.defineProperty,Fa=Object.getOwnPropertyDescriptor,Ua=(o,t,s,e)=>{for(var r=e>1?void 0:e?Fa(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Ra(t,s,r),r};const ko="sonic-modal-subtitle";let nr=class extends f{render(){return u`<slot></slot>`}};nr.styles=[w`:host { font-size: 1.1rem; display: block; text-transform: uppercase; line-height: var(--sc-headings-line-height); font-family: var(--sc-headings-font-family); }`],nr=Ua([v(ko)],nr);try{customElements.define(ko,nr)}catch{}var Ba=Object.defineProperty,Va=Object.getOwnPropertyDescriptor,qa=(o,t,s,e)=>{for(var r=e>1?void 0:e?Va(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Ba(t,s,r),r};const _o="sonic-modal-content";let ar=class extends f{render(){return u`<slot></slot>`}};ar.styles=[w`:host { display: block; }`],ar=qa([v(_o)],ar);try{customElements.define(_o,ar)}catch{}var Ha=Object.defineProperty,Wa=Object.getOwnPropertyDescriptor,Za=(o,t,s,e)=>{for(var r=e>1?void 0:e?Wa(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Ha(t,s,r),r};const Ao="sonic-modal-close";let lr=class extends f{render(){return u`<sonic-button shape="circle" variant="ghost" @click="${this.handleClick}"><sonic-icon name="cancel" size="lg"></sonic-icon></sonic-button>`}handleClick(){this.closest("sonic-modal").hide()}};lr.styles=[w`:host { position: absolute; right: 0.6rem; top: 0.6rem; z-index: 20; }`],lr=Za([v(Ao)],lr);try{customElements.define(Ao,lr)}catch{}var Ka=Object.defineProperty,Ya=Object.getOwnPropertyDescriptor,it=(o,t,s,e)=>{for(var r=e>1?void 0:e?Ya(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Ka(t,s,r),r};const cr="sonic-modal";let H=class extends F(f){constructor(){super(...arguments),this.hideOnOverlayClick=!0,this.hideOnEscape=!0,this.align="center",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.fullScreen=!1,this.visible=!1}static create(o){const t=document.createElement(cr);return t.innerHTML=`<sonic-modal-close></sonic-modal-close><sonic-modal-content>${o.content}</sonic-modal-content>`||"",(document.querySelector("sonic-theme")||document.body).appendChild(t),t.show(),t}connectedCallback(){super.connectedCallback()}updated(){const o=this;document.addEventListener("keydown",this.handleEscape),o.closeBtn.forEach(t=>{t.addEventListener("click",function(){o.hide()},{once:!0})})}render(){if(this.visible==!1)return S;this.handleFullsceen();const o={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,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 u`<div class="modal-wrapper" style="${dt(t)}" ${Ve({out:Pi})} tabindex="0"><div part="modal" class="modal custom-scroll" style="${dt(o)}" ${Ve({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}]})}><div class="modal-content"><slot></slot></div></div></div><div class="overlay" @click="${this.hideOnOverlayClick?this.hide:""}" ${Ve({keyframeOptions:{duration:500},in:Si,out:[{opacity:0,pointerEvents:"none"}]})}></div>`}show(){var o,t;this.visible=!0,(o=this.modalElement)==null||o.setAttribute("tabindex","0"),(t=this.modalElement)==null||t.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var o;this.visible=!1,(o=this.modalElement)==null||o.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide"))}dispose(){this.hide(),this.remove()}handleEscape(o){o.key==="Escape"&&[...document.querySelectorAll(cr)].forEach(t=>{this.hideOnEscape==!0&&t.hide()})}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};if(H.styles=[We,w`:host { --sc-modal-py: 2.5rem; --sc-modal-px: 1.5rem; --sc-modal-content: var(--sc-base-content); --sc-modal-bg: var(--sc-base); --sc-modal-max-w: min(100vw, 64ch); --sc-modal-max-h: 80vh; --sc-modal-scrollbar-bg: var(--sc-base-300); --sc-modal-rounded: var(--sc-rounded-lg); } * { box-sizing: border-box; } .modal-wrapper { position: fixed; bottom: 0; left: 0; width: 100%; z-index: 990; text-align: center; align-items: center; justify-content: center; flex-direction: column; display: flex; pointer-events: none; } .modal-content { overflow-y: auto; display: flex; flex-direction: column; text-align: center; align-items: center; min-height: 10rem; } .modal { background: var(--sc-base); width: 100%; box-shadow: var(--sc-shadow-lg); border-radius: var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0; pointer-events: auto; /*overflow: hidden;*/ transform: translateZ(0); } .overlay { background: var(--sc-base-200); left: 0; top: 0; right: 0; bottom: 0; z-index: 900; opacity: 0.8; position: fixed; } ::slotted(sonic-modal-title) { margin-bottom: 1rem; } ::slotted(sonic-modal-subtitle) { margin-top: -0.45rem; margin-bottom: 1rem; } @media (max-width: 767.5px) { .modal-wrapper, .modal { max-width: none !important; width: 100% !important; } } @media (min-width: 768px) { .modal-wrapper { top: 50%; left: 50%; bottom: auto; right: auto; transform: translateX(-50%) translateY(-50%); } .modal { top: 50%; bottom: auto; right: auto; border-radius: var(--sc-modal-rounded); } } :host([align="left"]) .modal-content { text-align: left; align-items: flex-start; } :host([align="right"]) .modal-content { text-align: right; align-items: flex-end; } /* Border radius */ :host([rounded="none"]) modal { --sc-img-radius: 0 !important; }`],it([a({type:Boolean,reflect:!0})],H.prototype,"hideOnOverlayClick",2),it([a({type:Boolean,reflect:!0})],H.prototype,"hideOnEscape",2),it([a({type:String,reflect:!0})],H.prototype,"align",2),it([a({type:String})],H.prototype,"padding",2),it([a({type:String})],H.prototype,"maxWidth",2),it([a({type:String})],H.prototype,"maxHeight",2),it([a({type:String})],H.prototype,"width",2),it([a({type:String})],H.prototype,"height",2),it([a({type:Boolean,reflect:!0})],H.prototype,"fullScreen",2),it([a({type:Boolean,reflect:!0})],H.prototype,"visible",2),it([re(".modal-wrapper")],H.prototype,"modalWrapper",2),it([re(".modal")],H.prototype,"modalElement",2),it([Nt({selector:"sonic-modal-close"})],H.prototype,"closeBtn",2),H=it([v(cr)],H),typeof window<"u"){let o=window;o.SonicModal=H}try{customElements.define(cr,H)}catch{}var Ga=Object.defineProperty,Qa=Object.getOwnPropertyDescriptor,ge=(o,t,s,e)=>{for(var r=e>1?void 0:e?Qa(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Ga(t,s,r),r};const Ja={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"},Po="sonic-alert";let kt=class extends f{constructor(){super(...arguments),this.label="",this.text="",this.background=!1,this.status="default"}render(){return u`<div part="alert" class="alert"><div>${this.status&&u`<sonic-icon name="${Ja[this.status]}"></sonic-icon>`}</div><div>${this.label?u`<span class="label">${this.label}</span>`:S}<slot>${this.text}</slot></div></div>`}};kt.styles=[ce,w`:host { --sc-alert-color: inherit; --sc-alert-rounded: var(--sc-rounded); --sc-alert-fw: var(--sc-font-weight-base); --sc-alert-fst: var(--sc-font-style-base); --sc-alert-label-fw: bold; display: block; font-weight: var(--sc-alert-fw); font-style: var(--sc-alert-fst); } .alert { color: var(--sc-alert-color); position: relative; display: flex; gap: 0.4em; line-height: 1.2; border-radius: var(--sc-alert-rounded); } z .label { font-weight: var(--sc-alert-label-fw); } :host([status="warning"]) { --sc-alert-color: var(--sc-warning); } :host([status="error"]) { --sc-alert-color: var(--sc-danger); } :host([status="info"]) { --sc-alert-color: var(--sc-info); } :host([status="success"]) { --sc-alert-color: var(--sc-success); } /*background*/ :host([background]) .alert { background: var(--sc-base); padding: 0.8em 1.15em; } :host([background]) .alert:before { background-color: currentColor; content: ""; display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; opacity: 0.08; border-radius: var(--sc-alert-rounded); pointer-events: none; } :host([background]) > div { z-index: 2; position: relative; } slot { display: block; } /*Rounded*/ :host([size="xs"]) .alert { --sc-alert-rounded: var(--sc-rounded-sm); } :host([size="sm"]) .alert { --sc-alert-rounded: var(--sc-rounded-sm); }`],ge([a({type:String})],kt.prototype,"label",2),ge([a({type:String})],kt.prototype,"text",2),ge([a({type:String,reflect:!0})],kt.prototype,"size",2),ge([a({type:Boolean,reflect:!0})],kt.prototype,"background",2),ge([a({type:String,reflect:!0})],kt.prototype,"status",2),kt=ge([v(Po)],kt);try{customElements.define(Po,kt)}catch{}var Xa=Object.defineProperty,tl=Object.getOwnPropertyDescriptor,be=(o,t,s,e)=>{for(var r=e>1?void 0:e?tl(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Xa(t,s,r),r};const el="sonic-toast-message-subscriber";let Yt=class extends F(f){constructor(){super(...arguments),this._messages=[],this.success=null,this.status=null,this._message="",this._data=""}get messages(){return this._messages}set messages(o){this._messages=o,this.messages&&o.forEach(t=>{t.type=="public"&&pt.add({text:t.content,status:t.status})})}get message(){return this._message}set message(o){this._message=o,!!this.message&&this.props.success===!1&&(this.props.public_message||pt.add({text:this.message,status:"error"}))}get data(){return this._data}set data(o){this._data=o;const t={text:"Votre produit a bien \xE9t\xE9 ajout\xE9",status:"success"};Array.isArray(this.data)&&this.props.success===!0&&pt.add(t),this.data==""&&this.props.status===!0&&pt.add(t),this.props.success===!1&&(this.props.public_message||pt.add({text:this.data,status:"error"}))}render(){return S}};be([a({type:Boolean})],Yt.prototype,"success",2),be([a({type:Boolean})],Yt.prototype,"status",2),be([a({type:Array})],Yt.prototype,"messages",1),be([a({type:String})],Yt.prototype,"message",1),be([a()],Yt.prototype,"data",1),Yt=be([v(el)],Yt);var rl=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,Hr=(o,t,s,e)=>{for(var r=e>1?void 0:e?sl(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&rl(t,s,r),r};const So="sonic-tooltip";let fe=class extends f{constructor(){super(...arguments),this.label="",this.disabled=!1}render(){let o=this.disabled||this.label==""?"disabled":"";return u`<div data-tooltip-text="${this.label.trim().replace(" "," ")}" class="tooltip ${o}"><slot></slot></div>`}};fe.styles=[w`.tooltip { position: relative; display: flex; align-items: center; text-align: center; } .tooltip:before { position: absolute; content: attr(data-tooltip-text); font-size: 0.85rem; display: block; opacity: 0; pointer-events: none; bottom: calc(100% + 0.25rem); left: 50%; transform: translateX(-50%); background: var(--sc-base-content, #111827); padding: 0.25rem; border-radius: 0.25rem; color: var(--sc-base, #fff); z-index: 999; display: none; line-height: 1.1; width: max-content; max-width: 20rem; } .tooltip:not(.disabled):hover:before { opacity: 1; display: block; }`],Hr([a({type:String})],fe.prototype,"label",2),Hr([a({type:Boolean})],fe.prototype,"disabled",2),fe=Hr([v(So)],fe);try{customElements.define(So,fe)}catch{}var ol=Object.defineProperty,il=Object.getOwnPropertyDescriptor,Dt=(o,t,s,e)=>{for(var r=e>1?void 0:e?il(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&ol(t,s,r),r};const Co="sonic-pop";let Q=class extends f{constructor(){super(...arguments),this.open=!1,this.toggle="true",this.inline=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=Number.NaN,this.lastContentY=Number.NaN}runPositioning(){!this.positioningRuns||(this.positioningRuns=!0,this._setUpMenu(this.placement),window.requestAnimationFrame(()=>this.runPositioning()))}_toggle(o){this.open&&this.toggle=="false"||o.type=="keydown"&&(o.key!="ArrowDown"||this.open)||(this.open=!this.open,this.open?this._show():this._hide())}_show(){this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=Number.NaN,this.lastContentY=Number.NaN,this.runPositioning())}_hide(){this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1}_handleClosePop(o){let t=o.composedPath(),s=t[0];Q.pops.forEach(e=>{const r=t.includes(e),i=t.includes(e.querySelector('[slot="content"]')),n=se.getAncestorAttributeValue(s,"data-on-select")==="keep";o.type=="pointerdown"&&r||o.type=="click"&&(r&&n||!i)||e._hide()})}connectedCallback(){super.connectedCallback(),Q.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop)),Q.pops.add(this)}disconnectedCallback(){super.disconnectedCallback(),Q.pops.delete(this),Q.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop))}_setUpMenu(o){var N;const t=(N=this.popContent)==null?void 0:N.getBoundingClientRect(),s=8,e=20,r=this.getBoundingClientRect();if(!this.offsetParent)return;let i=this.offsetParent.getBoundingClientRect(),n=r.left-i.left,l=r.top-i.top,c=n,h=l,y=l-t.height-s,g=n-t.width-2*s,m=n+r.width+2*s,x=l+r.height+s;switch(o){case"bottom":h=x;break;case"top":h=y;break;case"left":c=g;break;case"right":c=m;break}let _=window.innerWidth-m-i.left-t.width-e;_<0&&o==="right"&&(c=g),_<0&&["top","bottom"].includes(o)&&(c=Math.max(c+_,g+r.width)),-i.left-g>e&&o==="left"&&(c=m);let A=window.innerHeight-x-i.top-t.height-e;A<0&&o==="bottom"&&(h=y),A<0&&["left","right"].includes(o)&&(h=Math.max(h+A,y+r.height)),-i.top-y>-e&&o==="top"&&(h=x),this.lastContentX=c,this.lastContentY=h,Object.assign(this.popContent.style,{left:`${c}px`,top:`${h}px`})}render(){return u`<slot @click="${this._toggle}" @keydown="${this._toggle}" class="contents"></slot><slot name="content" tabindex="-1" part="content" class="${this.open?"is-open":""}"></slot>`}};Q.pops=new Set,Q.styles=[w`:host { display: inline-block; vertical-align: middle; } slot[name="content"] { background-color: var(--sc-base); position: absolute; z-index: 50; display: block; transform: translateY(1rem) scale(0.95); opacity: 0; pointer-events: none; transition-duration: 0.15s ; transition-timing-function: ease; transition-property:all; border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em); } slot[name="content"].is-open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; transition-property:scale, opacity; transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225); } /*OMBRE*/ :host([shadow]) slot[name="content"], :host([shadow="md"]) slot[name="content"], :host([shadow="true"]) slot[name="content"] { box-shadow: var(--sc-shadow); } :host([shadow="sm"]) slot[name="content"] { box-shadow: var(--sc-shadow-sm); } :host([shadow="none"]) slot[name="content"] { box-shadow: none; } :host([shadow="lg"]) slot[name="content"] { box-shadow: var(--sc-shadow-lg); } :host([inline]) { vertical-align: baseline; }`],Dt([Y()],Q.prototype,"open",2),Dt([re("slot:not([name=content])")],Q.prototype,"popBtn",2),Dt([re("slot[name=content]")],Q.prototype,"popContent",2),Dt([a({type:String})],Q.prototype,"toggle",2),Dt([a({type:Boolean,reflect:!0})],Q.prototype,"inline",2),Dt([a({type:String,reflect:!0})],Q.prototype,"shadow",2),Dt([a({type:String})],Q.prototype,"placement",2),Q=Dt([v(Co)],Q);try{customElements.define(Co,Q)}catch{}var nl=Object.defineProperty,al=Object.getOwnPropertyDescriptor,ve=(o,t,s,e)=>{for(var r=e>1?void 0:e?al(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&nl(t,s,r),r};const ll="sonic-divider";let _t=class extends f{constructor(){super(...arguments),this.label="",this.align="center"}firstUpdated(){var o,t;(this.label||((o=this.slotNodes)==null?void 0:o.length))&&((t=this.divider)==null||t.classList.add("has-text"))}render(){return u`<div part="divider"><span class="text">${this.label}<slot></slot></span></div>`}};_t.styles=[w`:host { --sc-divider-my: 0.5rem; --sc-divider-mx: 0; --sc-divider-border-width: min(2px, 0.15rem); --sc-divider-border-color: var(--sc-base-200); --sc-divider-border-style: solid; --sc-divider-color: var(--sc-base-500); --sc-divider-ff: var(--sc-font-family-base); --sc-divider-fs: 1rem; --sc-divider-fw: var(--sc-font-weight-base); --sc-divider-fst: var(--sc-font-style-base); margin: var(--sc-divider-my) var(--sc-divider-mx); font-size: var(--sc-divider-fs); font-style: var(--sc-divider-fst); font-family: var(--sc-divider-ff); font-weight: var(--sc-divider-fw); color: var(--sc-divider-color); display: block; } /*SIZE*/ :host([size="2xs"]) { --sc-divider-my: 0.35rem; --sc-divider-fs: 0.68rem; } :host([size="xs"]) { --sc-divider-my: 0.5rem; --sc-divider-fs: 0.75rem; } :host([size="sm"]) { --sc-divider-my: 0.75rem; --sc-divider-fs: 0.875rem; } :host([size="md"]) { --sc-divider-my: 1.25rem; } :host([size="lg"]) { --sc-divider-my: 1.85rem; } :host([size="xl"]) { --sc-divider-my: 2.25rem; } :host([size="2xl"]) { --sc-divider-my: 3.35rem; } div { display: flex; align-items: center; width: 100%; } div:before { content: ""; flex-grow: 1; border-top: var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color); width: 100%; } div:after { content: ""; flex-grow: 1; border-top: var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color); width: 100%; } /*ALIGNEMENT*/ :host([align="left"]) div:before { display: none; } :host([align="right"]) div:after { display: none; } /*TEXT*/ .text { flex-shrink: 0; max-width: 80%; } .no-text .text { display: none; } .has-text { gap: 0.5rem; }`],ve([st()],_t.prototype,"slotNodes",2),ve([re("div")],_t.prototype,"divider",2),ve([a({type:String})],_t.prototype,"label",2),ve([a({type:String,reflect:!0})],_t.prototype,"size",2),ve([a({type:String,reflect:!0})],_t.prototype,"align",2),_t=ve([v("sonic-divider")],_t);try{customElements.define(ll,_t)}catch{}var cl=Object.defineProperty,hl=Object.getOwnPropertyDescriptor,dl=(o,t,s,e)=>{for(var r=e>1?void 0:e?hl(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&cl(t,s,r),r};const Oo="sonic-card-header-description";let hr=class extends f{render(){return u`<div><slot></slot></div>`}};hr.styles=[w`div { margin-top: .1em; font-family: var(--sc-font-family-base); font-size: .7em; font-weight: var(--sc-font-style-base); }`],hr=dl([v(Oo)],hr);try{customElements.define(Oo,hr)}catch{}var pl=Object.defineProperty,ul=Object.getOwnPropertyDescriptor,Wr=(o,t,s,e)=>{for(var r=e>1?void 0:e?ul(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&pl(t,s,r),r};const Eo="sonic-card-header";let ye=class extends f{render(){return u`<div class="header"><div class="header-content">${this.label} ${this.description?u`<sonic-card-header-description>${this.description}</sonic-card-header-description>`:""}<slot></slot></div><slot name="suffix"></slot></div>`}};ye.styles=[w`:host { --sc-card-header-mb: 1.25rem; --sc-card-header-font-size: 1.875rem; --sc-card-header-font-weight: var(--sc-headings-font-weight); --sc-card-header-font-style: var(--sc-headings-font-style); --sc-card-header-family: var(--sc-headings-font-family); --sc-card-header-line-height: var(--sc-headings-line-height); } .header { display: flex; align-items: flex-start; gap: .5em 1em; margin-bottom: var(--sc-card-header-mb); line-height: var(--sc-card-header-line-height); font-family: var(--sc-card-header-font-family); font-size: var(--sc-card-header-font-size); font-style: var(--sc-card-header-font-style); font-weight: var(--sc-card-header-font-weight); } .header-content { flex-grow: 1; } slot[name="suffix"] { flex-shrink: 0; }`],Wr([a()],ye.prototype,"label",2),Wr([a()],ye.prototype,"description",2),ye=Wr([v(Eo)],ye);try{customElements.define(Eo,ye)}catch{}var ml=Object.defineProperty,gl=Object.getOwnPropertyDescriptor,bl=(o,t,s,e)=>{for(var r=e>1?void 0:e?gl(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&ml(t,s,r),r};const jo="sonic-card-main";let Zr=class extends f{render(){return u`<div><slot></slot></div>`}};Zr=bl([v(jo)],Zr);try{customElements.define(jo,Zr)}catch{}var fl=Object.defineProperty,vl=Object.getOwnPropertyDescriptor,yl=(o,t,s,e)=>{for(var r=e>1?void 0:e?vl(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&fl(t,s,r),r};const zo="sonic-card-footer";let Kr=class extends f{render(){return u`<slot></slot>`}};Kr=yl([v(zo)],Kr);try{customElements.define(zo,Kr)}catch{}var wl=Object.defineProperty,xl=Object.getOwnPropertyDescriptor,Do=(o,t,s,e)=>{for(var r=e>1?void 0:e?xl(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&wl(t,s,r),r};const Lo="sonic-card";let Me=class extends f{constructor(){super(...arguments),this.type="default"}render(){return u`<div part="card" class="card"><slot></slot></div>`}};Me.styles=[w`:host { --sc-card-padding: 1.5rem; --sc-card-color: var(--sc-base-content); --sc-card-bg: var(--sc-base); --sc-card-rounded: var(--sc-rounded-lg); --sc-card-shadow: var(--sc-shadow-lg); } .card { padding: var(--sc-card-padding); background-color: var(--sc-card-bg); border-radius: var(--sc-card-rounded); box-shadow: var(--sc-card-shadow); color: var(--sc-card-color); } /*TYPES*/ :host([type="primary"]) { --sc-card-color: var(--sc-primary-content); --sc-badge-bg: var(--sc-primary); } :host([type="warning"]) { --sc-card-color: var(--sc-warning-content); --sc-card-bg: var(--sc-warning); } :host([type="danger"]) { --sc-card-color: var(--sc-danger-content); --sc-card-bg: var(--sc-danger); } :host([type="info"]) { --sc-card-color: var(--sc-info-content); --sc-card-bg: var(--sc-info); } :host([type="success"]) { --sc-card-color: var(--sc-success-content); --sc-card-bg: var(--sc-success); } :host([type="light"]) { --sc-card-color: var(--sc-base-content); --sc-card-bg: var(--sc-base-100); } :host([type="neutral"]) { --sc-card-color: var(--sc-base); --sc-card-bg: var(--sc-base-content); } :host([type="invert"]) { --sc-card-color: var(--sc-base); --sc-card-bg: var(--sc-base-900); }`],Do([a({type:String,reflect:!0})],Me.prototype,"type",2),Me=Do([v(Lo)],Me);try{customElements.define(Lo,Me)}catch{}const Yr=w`:host{ --sc-color:inherit; color:var(--sc-color); } :host([type="primary"]) { --sc-color: var(--sc-primary); } :host([type="warning"]) { --sc-color: var(--sc-warning); } :host([type="danger"]) { --sc-color: var(--sc-danger); } :host([type="info"]) { --sc-color: var(--sc-info); } :host([type="success"]) { --sc-color: var(--sc-success); } .inherit-color{ color:var(--sc-color); }`;w`:host{ --sc-color:inherit; --sc-bg:inherit; color:var(--sc-color); background:var(--sc-bg); } :host([type="primary"]) { --sc-color: var(--sc-primary-content); --sc-bg: var(--sc-primary); } :host([type="warning"]) { --sc-color: var(--sc-warning-content); --sc-bg: var(--sc-warning); } :host([type="danger"]) { --sc-color: var(--sc-danger-content); --sc-bg: var(--sc-danger); } :host([type="info"]) { --sc-color: var(--sc-info-content); --sc-bg: var(--sc-info); } :host([type="success"]) { --sc-color: var(--sc-success-content); --sc-bg: var(--sc-success); } .inherit-bg{ color:inherit; }`;var $l=Object.defineProperty,kl=Object.getOwnPropertyDescriptor,_l=(o,t,s,e)=>{for(var r=e>1?void 0:e?kl(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&$l(t,s,r),r};const Mo="sonic-tr";let dr=class extends f{render(){return u`<slot></slot>`}};dr.styles=[Yr,w`:host { display: table-row; }`],dr=_l([v(Mo)],dr);try{customElements.define(Mo,dr)}catch{}var Al=Object.defineProperty,Pl=Object.getOwnPropertyDescriptor,Te=(o,t,s,e)=>{for(var r=e>1?void 0:e?Pl(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Al(t,s,r),r};const To="sonic-th";let Lt=class extends f{render(){const o={textAlign:this.align,minWidth:this.minWidth};return u`<th part="th" style="${dt(o)}" colspan="${k(this.colSpan)}" rowspan="${k(this.rowSpan)}"><slot></slot></th>`}};Lt.styles=[Yr,w`:host { display: contents; background:var(--sc-table-bg); position:sticky; top:0; z-index:20; } th { all: inherit; display: table-cell; border-bottom: calc(var(--sc-border-width) * 1.5) solid var(--sc-table-border-color); text-transform: var(--sc-table-th-tt); font-weight: var(--sc-table-th-fw); font-size: var(--sc-table-th-fs); padding: var(--sc-table-th-py) var(--sc-table-th-px); }`],Te([a({type:Number})],Lt.prototype,"colSpan",2),Te([a({type:Number})],Lt.prototype,"rowSpan",2),Te([a({type:String})],Lt.prototype,"align",2),Te([a({type:String})],Lt.prototype,"minWidth",2),Lt=Te([v(To)],Lt);try{customElements.define(To,Lt)}catch{}var Sl=Object.defineProperty,Cl=Object.getOwnPropertyDescriptor,we=(o,t,s,e)=>{for(var r=e>1?void 0:e?Cl(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Sl(t,s,r),r};const No="sonic-td";let At=class extends f{render(){const o={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth};return u`<td part="td" style="${dt(o)}" colspan="${k(this.colSpan)}" rowspan="${k(this.rowSpan)}"><slot></slot></td>`}};At.styles=[Yr,w`:host { display: contents; } td { all: inherit; display: table-cell; padding: var(--sc-table-td-py) var(--sc-table-td-px); }`],we([a({type:Number})],At.prototype,"colSpan",2),we([a({type:Number})],At.prototype,"rowSpan",2),we([a({type:String})],At.prototype,"align",2),we([a({type:String})],At.prototype,"vAlign",2),we([a({type:String})],At.prototype,"minWidth",2),At=we([v(No)],At);try{customElements.define(No,At)}catch{}var Ol=Object.defineProperty,El=Object.getOwnPropertyDescriptor,jl=(o,t,s,e)=>{for(var r=e>1?void 0:e?El(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Ol(t,s,r),r};const Io="sonic-thead";let pr=class extends f{render(){return u`<slot></slot>`}};pr.styles=[w`:host { display: table-header-group; }`],pr=jl([v(Io)],pr);try{customElements.define(Io,pr)}catch{}var zl=Object.defineProperty,Dl=Object.getOwnPropertyDescriptor,Ll=(o,t,s,e)=>{for(var r=e>1?void 0:e?Dl(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&zl(t,s,r),r};const Ro="sonic-tbody";let ur=class extends f{render(){return u`<tbody><slot></slot></tbody>`}};ur.styles=[w`:host { display: table-row-group; } ::slotted(sonic-tr:nth-child(odd)){ background:var(--sc-base-50); } ::slotted(sonic-tr:hover) { background:var(--sc-base-100); } ::slotted(sonic-tr:not(:last-child)){ border-bottom:var(--sc-form-border-width) solid var(--sc-base-200) !important; }`],ur=Ll([v(Ro)],ur);try{customElements.define(Ro,ur)}catch{}var Ml=Object.defineProperty,Tl=Object.getOwnPropertyDescriptor,Nl=(o,t,s,e)=>{for(var r=e>1?void 0:e?Tl(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Ml(t,s,r),r};const Fo="sonic-tfoot";let mr=class extends f{render(){return u`<tfoot><slot></slot></tfoot>`}};mr.styles=[w`:host { display: contents; }`],mr=Nl([v(Fo)],mr);try{customElements.define(Fo,mr)}catch{}var Il=Object.defineProperty,Rl=Object.getOwnPropertyDescriptor,Fl=(o,t,s,e)=>{for(var r=e>1?void 0:e?Rl(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Il(t,s,r),r};const Uo="sonic-caption";let gr=class extends f{render(){return u`<slot></slot>`}};gr.styles=[w`:host { display:table-caption; font-size:.75rem; color:var(--sc-table-caption-color); padding: var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py) ); }`],gr=Fl([v(Uo)],gr);try{customElements.define(Uo,gr)}catch{}var Ul=Object.defineProperty,Bl=Object.getOwnPropertyDescriptor,Gt=(o,t,s,e)=>{for(var r=e>1?void 0:e?Bl(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Ul(t,s,r),r};const Bo="sonic-table";let bt=class extends f{constructor(){super(...arguments),this.striped=!1,this.sticky=!1,this.bordered=!1,this.hover=!1}render(){const o={maxHeight:this.maxHeight};return u`<div class="table-container custom-scroll" style="${dt(o)}"><div class="table" ?striped="${this.striped}" ?hover="${this.hover}" ?sticky="${this.sticky}"><slot></slot></div></div>`}};bt.styles=[We,ce,w`:host { --sc-table-fw: var(--sc-font-weight-base); --sc-table-fst: var(--sc-font-style-base); --sc-table-fs: 1rem; --sc-table-border-color: var(--sc-base-200); --sc-table-caption-color: var(--sc-base-400); --sc-table-bg: var(--sc-base); --sc-table-th-fs: .85em; --sc-table-th-fw: bold; --sc-table-th-tt: uppercase; --sc-table-th-px: var(--sc-table-td-px); --sc-table-th-py: calc(1.8 * var(--sc-table-td-py) ); --sc-table-td-px: .5em; --sc-table-td-py: .5em; display:block; } :host([maxHeight]) .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; } .table { width: 100%; display: table; box-sizing:border-box; } :host([bordered]) .table-container { border:var(--sc-border-width) solid var(--sc-table-border-color) !important; }`],Gt([a({type:String,reflect:!0})],bt.prototype,"size",2),Gt([a({type:Boolean,reflect:!0})],bt.prototype,"striped",2),Gt([a({type:Boolean,reflect:!0})],bt.prototype,"sticky",2),Gt([a({type:Boolean,reflect:!0})],bt.prototype,"bordered",2),Gt([a({type:Boolean,reflect:!0})],bt.prototype,"hover",2),Gt([a({type:String})],bt.prototype,"maxHeight",2),bt=Gt([v(Bo)],bt);try{customElements.define(Bo,bt)}catch{}const Vl=Mr,ql=zr,Hl=le,Wl=Xe,Vo=F,Zl=Pe;let Gr=window;Gr["concorde-mixins"]=Gr["concorde-mixins"]||{},Gr["concorde-mixins"]={Fetcher:Vl,FormCheckable:ql,FormElement:Hl,FormInput:Wl,Subscriber:Vo,TemplatesContainer:Zl};var Kl=Object.defineProperty,Yl=Object.getOwnPropertyDescriptor,qo=(o,t,s,e)=>{for(var r=e>1?void 0:e?Yl(t,s):t,i=o.length-1,n;i>=0;i--)(n=o[i])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&Kl(t,s,r),r};const Gl="sonic-captcha";let Qr=class extends Vo(f){constructor(){super(...arguments),this.key=""}connectedCallback(){const o=document.createElement("script");o.src="https://www.google.com/recaptcha/api.js?render="+this.key,document.head.appendChild(o),super.connectedCallback(),this.formPublisher=Dr.get(this.getAncestorAttributeValue("formDataProvider")),this.formPublisher.needsCaptchaValidation=!0,this.formPublisher.captchaToken.onAssign(t=>{t=="request_token"&&this.requestToken()})}requestToken(){const o=window;o.grecaptcha.ready(()=>{o.grecaptcha.execute(this.key,{action:"submit"}).then(t=>{this.formPublisher.captchaToken=t})})}render(){return u`<slot></slot>`}};qo([a()],Qr.prototype,"key",2),Qr=qo([v(Gl)],Qr);let br=window;br.SonicPublisherManager||(br.SonicPublisherManager=Z),br.SonicDataBindObserver||(br.SonicDataBindObserver=Ct);const Ql=pt,Jl=H;let Jr=window;Jr["concorde-components"]=Jr["concorde-components"]||{},Jr["concorde-components"]={SonicToast:Ql,SonicModal:Jl}});
|