@loadsmart/miranda-wc 1.41.1-beta.1 → 1.42.0

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.
Files changed (47) hide show
  1. package/dist/{attention-26b6818f.js → attention-d36fbf6d.js} +2 -2
  2. package/dist/attention-d36fbf6d.js.map +1 -0
  3. package/dist/{bell-dc0111a0.js → bell-1815234e.js} +2 -2
  4. package/dist/bell-1815234e.js.map +1 -0
  5. package/dist/{check-e87dc5cc.js → check-48e597eb.js} +2 -2
  6. package/dist/check-48e597eb.js.map +1 -0
  7. package/dist/{close-5c0b1a30.js → close-801579c6.js} +2 -2
  8. package/dist/close-801579c6.js.map +1 -0
  9. package/dist/components/tag/tag.styles.d.ts.map +1 -1
  10. package/dist/{indeterminate-635ae13a.js → indeterminate-8684fdbb.js} +2 -2
  11. package/dist/{indeterminate-635ae13a.js.map → indeterminate-8684fdbb.js.map} +1 -1
  12. package/dist/index-dc701c8a.js +2179 -0
  13. package/dist/index-dc701c8a.js.map +1 -0
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +1 -1
  17. package/dist/{info-circle-a2563417.js → info-circle-c8027129.js} +2 -2
  18. package/dist/{info-circle-a2563417.js.map → info-circle-c8027129.js.map} +1 -1
  19. package/dist/styles/index.d.ts +6 -13
  20. package/dist/styles/index.d.ts.map +1 -1
  21. package/dist/styles/margin.d.ts +1 -2
  22. package/dist/styles/margin.d.ts.map +1 -1
  23. package/dist/styles/on.d.ts +64 -0
  24. package/dist/styles/on.d.ts.map +1 -0
  25. package/dist/styles/padding.d.ts +1 -2
  26. package/dist/styles/padding.d.ts.map +1 -1
  27. package/dist/styles/skeleton.d.ts +3 -2
  28. package/dist/styles/skeleton.d.ts.map +1 -1
  29. package/dist/styles/transition.d.ts +1 -2
  30. package/dist/styles/transition.d.ts.map +1 -1
  31. package/dist/styles/typography.d.ts +1 -2
  32. package/dist/styles/typography.d.ts.map +1 -1
  33. package/package.json +1 -1
  34. package/dist/attention-26b6818f.js.map +0 -1
  35. package/dist/bell-dc0111a0.js.map +0 -1
  36. package/dist/check-e87dc5cc.js.map +0 -1
  37. package/dist/close-5c0b1a30.js.map +0 -1
  38. package/dist/index-70ec393a.js +0 -2179
  39. package/dist/index-70ec393a.js.map +0 -1
  40. package/dist/styles/activable.d.ts +0 -8
  41. package/dist/styles/activable.d.ts.map +0 -1
  42. package/dist/styles/disableable.d.ts +0 -9
  43. package/dist/styles/disableable.d.ts.map +0 -1
  44. package/dist/styles/focusable.d.ts +0 -8
  45. package/dist/styles/focusable.d.ts.map +0 -1
  46. package/dist/styles/hoverable.d.ts +0 -8
  47. package/dist/styles/hoverable.d.ts.map +0 -1
@@ -1,2179 +0,0 @@
1
- function t(t,e,i,o){if("a"===i&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?o:"a"===i?o.call(t):o?o.value:e.get(t)}function e(t,e,i,o,r){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?r.call(t,i):r?r.value=i:e.set(t,i),i}
2
- /**
3
- * @license
4
- * Copyright 2017 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */
7
- var i;"function"==typeof SuppressedError&&SuppressedError;const o=window,r=o.trustedTypes,n=r?r.createPolicy("lit-html",{createHTML:t=>t}):void 0,s="$lit$",a=`lit$${(Math.random()+"").slice(9)}$`,l="?"+a,c=`<${l}>`,d=document,h=()=>d.createComment(""),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,p=Array.isArray,g="[ \t\n\f\r]",b=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,m=/-->/g,f=/>/g,y=RegExp(`>|${g}(?:([^\\s"'>=/]+)(${g}*=${g}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),v=/'/g,$=/"/g,w=/^(?:script|style|textarea|title)$/i,x=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),k=x(1),z=x(2),S=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),M=new WeakMap,W=d.createTreeWalker(d,129,null,!1);function A(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==n?n.createHTML(e):e}let j=class t{constructor({strings:e,_$litType$:i},o){let n;this.parts=[];let d=0,u=0;const p=e.length-1,g=this.parts,[x,k]=((t,e)=>{const i=t.length-1,o=[];let r,n=2===e?"<svg>":"",l=b;for(let e=0;e<i;e++){const i=t[e];let d,h,u=-1,p=0;for(;p<i.length&&(l.lastIndex=p,h=l.exec(i),null!==h);)p=l.lastIndex,l===b?"!--"===h[1]?l=m:void 0!==h[1]?l=f:void 0!==h[2]?(w.test(h[2])&&(r=RegExp("</"+h[2],"g")),l=y):void 0!==h[3]&&(l=y):l===y?">"===h[0]?(l=null!=r?r:b,u=-1):void 0===h[1]?u=-2:(u=l.lastIndex-h[2].length,d=h[1],l=void 0===h[3]?y:'"'===h[3]?$:v):l===$||l===v?l=y:l===m||l===f?l=b:(l=y,r=void 0);const g=l===y&&t[e+1].startsWith("/>")?" ":"";n+=l===b?i+c:u>=0?(o.push(d),i.slice(0,u)+s+i.slice(u)+a+g):i+a+(-2===u?(o.push(void 0),e):g)}return[A(t,n+(t[i]||"<?>")+(2===e?"</svg>":"")),o]})(e,i);if(this.el=t.createElement(x,o),W.currentNode=this.el.content,2===i){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=W.nextNode())&&g.length<p;){if(1===n.nodeType){if(n.hasAttributes()){const t=[];for(const e of n.getAttributeNames())if(e.endsWith(s)||e.startsWith(a)){const i=k[u++];if(t.push(e),void 0!==i){const t=n.getAttribute(i.toLowerCase()+s).split(a),e=/([.?@])?(.*)/.exec(i);g.push({type:1,index:d,name:e[2],strings:t,ctor:"."===e[1]?P:"?"===e[1]?O:"@"===e[1]?D:T})}else g.push({type:6,index:d})}for(const e of t)n.removeAttribute(e)}if(w.test(n.tagName)){const t=n.textContent.split(a),e=t.length-1;if(e>0){n.textContent=r?r.emptyScript:"";for(let i=0;i<e;i++)n.append(t[i],h()),W.nextNode(),g.push({type:2,index:++d});n.append(t[e],h())}}}else if(8===n.nodeType)if(n.data===l)g.push({type:2,index:d});else{let t=-1;for(;-1!==(t=n.data.indexOf(a,t+1));)g.push({type:7,index:d}),t+=a.length-1}d++}}static createElement(t,e){const i=d.createElement("template");return i.innerHTML=t,i}};function B(t,e,i=t,o){var r,n,s,a;if(e===S)return e;let l=void 0!==o?null===(r=i._$Co)||void 0===r?void 0:r[o]:i._$Cl;const c=u(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,i,o)),void 0!==o?(null!==(s=(a=i)._$Co)&&void 0!==s?s:a._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=B(t,l._$AS(t,e.values),l,o)),e}class E{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:d).importNode(i,!0);W.currentNode=r;let n=W.nextNode(),s=0,a=0,l=o[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new R(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new U(n,this,t)),this._$AV.push(e),l=o[++a]}s!==(null==l?void 0:l.index)&&(n=W.nextNode(),s++)}return W.currentNode=d,r}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class R{constructor(t,e,i,o){var r;this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=B(this,t,e),u(t)?t===C||null==t||""===t?(this._$AH!==C&&this._$AR(),this._$AH=C):t!==this._$AH&&t!==S&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>p(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==C&&u(this._$AH)?this._$AA.nextSibling.data=t:this.$(d.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=j.createElement(A(o.h,o.h[0]),this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(i);else{const t=new E(r,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=M.get(t.strings);return void 0===e&&M.set(t.strings,e=new j(t)),e}T(t){p(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new R(this.k(h()),this.k(h()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class T{constructor(t,e,i,o,r){this.type=1,this._$AH=C,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=C}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const r=this.strings;let n=!1;if(void 0===r)t=B(this,t,e,0),n=!u(t)||t!==this._$AH&&t!==S,n&&(this._$AH=t);else{const o=t;let s,a;for(t=r[0],s=0;s<r.length-1;s++)a=B(this,o[i+s],e,s),a===S&&(a=this._$AH[s]),n||(n=!u(a)||a!==this._$AH[s]),a===C?t=C:t!==C&&(t+=(null!=a?a:"")+r[s+1]),this._$AH[s]=a}n&&!o&&this.j(t)}j(t){t===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class P extends T{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===C?void 0:t}}const _=r?r.emptyScript:"";class O extends T{constructor(){super(...arguments),this.type=4}j(t){t&&t!==C?this.element.setAttribute(this.name,_):this.element.removeAttribute(this.name)}}class D extends T{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=B(this,t,e,0))&&void 0!==i?i:C)===S)return;const o=this._$AH,r=t===C&&o!==C||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==C&&(o===C||r);r&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class U{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){B(this,t)}}const q=o.litHtmlPolyfillSupport;null==q||q(j,R),(null!==(i=o.litHtmlVersions)&&void 0!==i?i:o.litHtmlVersions=[]).push("2.7.5");const L=Symbol.for(""),N=t=>{if((null==t?void 0:t.r)===L)return null==t?void 0:t._$litStatic$},F=(t,...e)=>({_$litStatic$:e.reduce(((e,i,o)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(i)+t[o+1]),t[0]),r:L}),I=new Map,G=(t=>(e,...i)=>{const o=i.length;let r,n;const s=[],a=[];let l,c=0,d=!1;for(;c<o;){for(l=e[c];c<o&&void 0!==(n=i[c],r=N(n));)l+=r+e[++c],d=!0;c!==o&&a.push(n),s.push(l),c++}if(c===o&&s.push(e[o]),d){const t=s.join("$$lit$$");void 0===(e=I.get(t))&&(s.raw=s,I.set(t,e=s)),i=a}return t(e,...i)})(k),V=window,H=V.ShadowRoot&&(void 0===V.ShadyCSS||V.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,J=Symbol(),X=new WeakMap;
8
- /**
9
- * @license
10
- * Copyright 2020 Google LLC
11
- * SPDX-License-Identifier: BSD-3-Clause
12
- */let Y=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==J)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(H&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=X.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&X.set(e,t))}return t}toString(){return this.cssText}};const Z=t=>new Y("string"==typeof t?t:t+"",void 0,J),K=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new Y(i,t,J)},Q=H?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Z(e)})(t):t
13
- /**
14
- * @license
15
- * Copyright 2017 Google LLC
16
- * SPDX-License-Identifier: BSD-3-Clause
17
- */;var tt;const et=window,it=et.trustedTypes,ot=it?it.emptyScript:"",rt=et.reactiveElementPolyfillSupport,nt={toAttribute(t,e){switch(e){case Boolean:t=t?ot:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},st=(t,e)=>e!==t&&(e==e||t==t),at={attribute:!0,type:String,converter:nt,reflect:!1,hasChanged:st},lt="finalized";class ct extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=at){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||at}static finalize(){if(this.hasOwnProperty(lt))return!1;this[lt]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(Q(t))}else void 0!==t&&e.push(Q(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{H?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=V.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=at){var o;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const n=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:nt).toAttribute(e,i.type);this._$El=t,null==n?this.removeAttribute(r):this.setAttribute(r,n),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:nt;this._$El=r,this[r]=n.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||st)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
18
- /**
19
- * @license
20
- * Copyright 2017 Google LLC
21
- * SPDX-License-Identifier: BSD-3-Clause
22
- */
23
- var dt,ht;ct[lt]=!0,ct.elementProperties=new Map,ct.elementStyles=[],ct.shadowRootOptions={mode:"open"},null==rt||rt({ReactiveElement:ct}),(null!==(tt=et.reactiveElementVersions)&&void 0!==tt?tt:et.reactiveElementVersions=[]).push("1.6.2");let ut=class extends ct{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var o,r;const n=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let s=n._$litPart$;if(void 0===s){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;n._$litPart$=s=new R(e.insertBefore(h(),t),t,void 0,null!=i?i:{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return S}};ut.finalized=!0,ut._$litElement$=!0,null===(dt=globalThis.litElementHydrateSupport)||void 0===dt||dt.call(globalThis,{LitElement:ut});const pt=globalThis.litElementPolyfillSupport;null==pt||pt({LitElement:ut}),(null!==(ht=globalThis.litElementVersions)&&void 0!==ht?ht:globalThis.litElementVersions=[]).push("3.3.2");
24
- /**
25
- * @license
26
- * Copyright 2018 Google LLC
27
- * SPDX-License-Identifier: BSD-3-Clause
28
- */
29
- const gt=t=>null!=t?t:C
30
- /**
31
- * @license
32
- * Copyright 2017 Google LLC
33
- * SPDX-License-Identifier: BSD-3-Clause
34
- */,bt=1,mt=t=>(...e)=>({_$litDirective$:t,values:e});let ft=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
35
- /**
36
- * @license
37
- * Copyright 2018 Google LLC
38
- * SPDX-License-Identifier: BSD-3-Clause
39
- */const yt=mt(class extends ft{constructor(t){var e;if(super(t),t.type!==bt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.nt)||void 0===i?void 0:i.has(t))&&this.it.add(t);return this.render(e)}const r=t.element.classList;this.it.forEach((t=>{t in e||(r.remove(t),this.it.delete(t))}));for(const t in e){const i=!!e[t];i===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(i?(r.add(t),this.it.add(t)):(r.remove(t),this.it.delete(t)))}return S}}),vt=(t,e=["article","div","span"],i="div")=>class extends t{static get properties(){return{as:{type:String}}}connectedCallback(){var t;super.connectedCallback(),this.as=null!==(t=e.includes(this.as)?this.as:i)&&void 0!==t?t:"div"}get tag(){return F`${(t=>({_$litStatic$:t,r:L}))(this.as)}`}};var $t,wt;class xt extends ut{constructor(){super(...arguments),$t.set(this,void 0),this.getForm=()=>t(this,$t,"f"),wt.set(this,(()=>{if(this.hasAttribute("form")){const t=this.getRootNode(),i=this.getAttribute("form");e(this,$t,t.getElementById(i),"f")}else e(this,$t,this.closest("form"),"f")}))}static get properties(){return{form:{type:String,reflect:!0}}}updated(e){super.updated(e),(e.has("form")||null==t(this,$t,"f"))&&t(this,wt,"f").call(this)}}function kt(t){return t&&t.i&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}$t=new WeakMap,wt=new WeakMap;var zt,St,Ct,Mt={};Mt.LoadsmartTheme={"brand-color-brand":"20, 214, 77","brand-color-brand-accent-1":"0, 215, 215","brand-color-brand-accent-2":"132, 241, 30","border-radius-none":"0px","border-radius-s":"4px","border-radius-m":"8px","border-radius-l":"16px","border-radius-circle":"50%","border-none":0,"border-thin":"1px","border-medium":"2px","border-thick":"4px","color-background-primary":"252, 252, 255","color-background-secondary":"248, 249, 251","color-background-tertiary":"230, 237, 242","color-background-highlight":"202, 219, 221","color-background-inverted":"32, 41, 49","color-background-secondary-inverted":"61, 74, 85","color-border":"193, 206, 217","color-divider":"230, 237, 242","color-brand":"20, 214, 77","color-brand-accent-1":"0, 215, 215","color-brand-accent-2":"132, 241, 30","color-primary-20":"202, 219, 221","color-primary-60":"0, 84, 84","color-primary-100":"0, 51, 51","color-accent-20":"229, 245, 255","color-accent-60":"0, 98, 159","color-accent-100":"15, 66, 97","color-neutral-0":"252, 252, 255","color-neutral-10":"248, 249, 251","color-neutral-20":"230, 237, 242","color-neutral-40":"193, 206, 217","color-neutral-60":"94, 118, 138","color-neutral-80":"92, 106, 118","color-neutral-90":"61, 74, 85","color-neutral-100":"32, 41, 49","color-success-20":"227, 247, 239","color-success-60":"3, 124, 94","color-success-100":"0, 94, 71","color-danger-20":"255, 233, 230","color-danger-60":"186, 27, 27","color-danger-100":"104, 0, 3","color-warning-20":"255, 243, 214","color-warning-60":"248, 182, 14","color-warning-100":"102, 63, 25","color-text-primary":"32, 41, 49","color-text-secondary":"61, 74, 85","color-text-tertiary":"92, 106, 118","color-text-placeholder":"94, 118, 138","color-text-disabled":"193, 206, 217","color-text-inverted":"252, 252, 255","color-text-secondary-inverted":"193, 206, 217","color-text-error":"186, 27, 27","color-text-highlight":"0, 98, 159","color-text-link":"0, 98, 159","font-family-default":"'Manrope', sans-serif","font-family-title":"'PlusJakartaSans', 'Manrope', sans-serif","font-size-1":"0.625rem","font-size-2":"0.75rem","font-size-3":"0.875rem","font-size-4":"1rem","font-size-5":"1.25rem","font-size-6":"1.625rem","font-size-7":"2.375rem","font-size-8":"3rem","font-size-9":"3.625rem","font-weight-regular":500,"font-weight-medium":600,"font-weight-bold":700,"line-height-1":"100%","line-height-2":"125%","line-height-3":"130%","line-height-4":"140%","line-height-5":"150%","line-height-6":"180%","global-height-small":"1.75rem","global-height-default":"2.5rem","global-height-large":"3rem","opacity-0":"0%","opacity-20":"20%","opacity-40":"40%","opacity-60":"60%","opacity-100":"100%","elevation-1":"0px 0px 2px rgba(94, 118, 138, 0.1), 0px 1px 6px 2px rgba(61, 74, 85, 0.15)","elevation-2":"0px 1px 3px rgba(94, 118, 138, 0.2), 0px 4px 8px 3px rgba(61, 74, 85, 0.15)","elevation-3":"0px 0px 4px rgba(94, 118, 138, 0.2), 0px 6px 12px 6px rgba(61, 74, 85, 0.15)","elevation-4":"0px 5px 6px 4px rgba(94, 118, 138, 0.2), 0px 8px 10px rgba(61, 74, 85, 0.1)","glow-primary":"0.0px 0.0px 4.0px 0px rgb(3, 124, 94, .5)","glow-warning":"0.0px 0.0px 4.0px 0px rgba(255, 206, 79, 1.0)","spacing-1":"4px","spacing-2":"8px","spacing-3":"12px","spacing-4":"16px","spacing-5":"20px","spacing-6":"24px","spacing-8":"32px","spacing-10":"40px","spacing-12":"48px","spacing-14":"56px","spacing-16":"64px","spacing-20":"80px","spacing-30":"120px","spacing-0-5":"2px","platform-font-default":"'Manrope', sans-serif","platform-font-title":"'PlusJakartaSans', 'Manrope', sans-serif"};var Wt=Mt;function At(t,e){return t.filter((function(t){return t.startsWith(e)}))}function jt(t,e){return t.filter((function(t){return!t.startsWith(e)}))}"function"==typeof SuppressedError&&SuppressedError;var Bt=jt(jt(Object.keys(Wt.LoadsmartTheme),"brand-"),"platform-");function Et(t){return Wt.LoadsmartTheme[t]}function Rt(t){var e=Et(t);return null==e?e:"--m-".concat(t)}function Tt(t,e){var i=Et(t);return null==i?"":t.startsWith("color-")?"rgba(var(".concat(Rt(t),", ").concat(i,"), ").concat(null!=e?e:1,")"):"var(".concat(Rt(t),", ").concat(i,")")}function Pt(t){return Z(St(t))}function _t(t,e=1){return Z(St(t,e))}At(Bt,"color-background-"),At(Bt,"border-radius-"),At(Bt,"border-"),At(Bt,"color-"),At(Bt,"elevation-"),At(Bt,"font-family-"),At(Bt,"font-size-"),At(Bt,"font-weight-"),At(Bt,"global-"),At(Bt,"glow-"),At(Bt,"line-height-"),At(Bt,"opacity-"),function(t,e,i){if(i||2===arguments.length)for(var o,r=0,n=e.length;r<n;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);t.concat(o||Array.prototype.slice.call(e))}(["none"],At(Bt,"spacing-"),!0),Ct=Et,St=Tt,zt=function(t,e){var i,o=e?Tt(e):"";return t&&null!==(i="none"===t?"0":Tt(t))&&void 0!==i?i:o};var Ot=function(t){return null==t?[]:Array.isArray(t)?t:[t]},Dt=kt(Ot);function Ut(t){return Z(`\n\t\tmargin-inline-start: ${t}\n\t`)}function qt(t){return Z(`\n\t\t${Ut(t)};\n\t\t${function(t){return Z(`\n\t\tmargin-inline-end: ${t}\n\t`)}(t)}\n\t`)}function Lt(t){return Z(`\n\t\t${function(t){return Z(`\n\t\tmargin-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return Z(`\n\t\tmargin-block-end: ${t}\n\t`)}(t)}\n\t`)}function Nt(t){return Z(`\n\t\t${qt(t)};\n\t\t${Lt(t)}\n\t`)}function Ft(t){return Z(`\n\t\t${function(t){return Z(`\n\t\tpadding-inline-end: ${t}\n\t`)}(t)};\n\t\t${function(t){return Z(`\n\t\tpadding-inline-start: ${t}\n\t`)}(t)}\n\t`)}function It(t){return Z(`\n\t\t${function(t){return Z(`\n\t\tpadding-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return Z(`\n\t\tpadding-block-end: ${t}\n\t`)}(t)}\n\t`)}function Gt(t){return Z(`\n\t\t${Ft(t)};\n\t\t${It(t)}\n\t`)}const Vt={property:"all",delay:"0s",duration:"0.35s",easing:"ease-in-out"};function Ht(t){const e=Dt(t).map((t=>function(t){const e={...Vt,...t};return Z(`${e.property} ${e.duration} ${e.easing} ${e.delay}`)}(t))).join(", ");return Z(`\n\t\ttransition: ${e}\n\t`)}function Jt(t){const e=Z("\n\t\tfont-style: normal;\n\t\tfont-stretch: normal;\n\t\tletter-spacing: normal;\n\n\t\tfont-synthesis: none;\n\t\ttext-rendering: optimizeLegibility;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\t-webkit-text-size-adjust: 100%;\n\t");return Z(`${e}\n${function(t){switch(t){case"hero-lg-bold":return`\n\t\t\t\tfont-family: ${Pt("font-family-title")};\n\t\t\t\tline-height: ${Pt("line-height-6")};\n\t\t\t\tfont-size: ${Pt("font-size-9")};\n\t\t\t\tfont-weight: ${Pt("font-weight-bold")}\n\t\t\t`;case"hero-lg":return`\n\t\t\t\tfont-family: ${Pt("font-family-title")};\n\t\t\t\tline-height: ${Pt("line-height-6")};\n\t\t\t\tfont-size: ${Pt("font-size-9")};\n\t\t\t\tfont-weight: ${Pt("font-weight-regular")}\n\t\t\t`;case"hero-md-bold":return`\n\t\t\t\tfont-family: ${Pt("font-family-title")};\n\t\t\t\tline-height: ${Pt("line-height-6")};\n\t\t\t\tfont-size: ${Pt("font-size-8")};\n\t\t\t\tfont-weight: ${Pt("font-weight-bold")}\n\t\t\t`;case"hero-md":return`\n\t\t\t\tfont-family: ${Pt("font-family-title")};\n\t\t\t\tline-height: ${Pt("line-height-6")};\n\t\t\t\tfont-size: ${Pt("font-size-8")};\n\t\t\t\tfont-weight: ${Pt("font-weight-regular")}\n\t\t\t`;case"hero-sm-bold":return`\n\t\t\t\tfont-family: ${Pt("font-family-title")};\n\t\t\t\tline-height: ${Pt("line-height-6")};\n\t\t\t\tfont-size: ${Pt("font-size-7")};\n\t\t\t\tfont-weight: ${Pt("font-weight-bold")}\n\t\t\t`;case"hero-sm":return`\n\t\t\t\tfont-family: ${Pt("font-family-title")};\n\t\t\t\tline-height: ${Pt("line-height-6")};\n\t\t\t\tfont-size: ${Pt("font-size-7")};\n\t\t\t\tfont-weight: ${Pt("font-weight-regular")}\n\t\t\t`;case"heading-lg-bold":return`\n\t\t\t\t\tfont-family: ${Pt("font-family-title")};\n\t\t\t\t\tline-height: ${Pt("line-height-5")};\n\t\t\t\t\tfont-size: ${Pt("font-size-6")};\n\t\t\t\t\tfont-weight: ${Pt("font-weight-bold")}\n\t\t\t\t`;case"heading-lg":return`\n\t\t\t\tfont-family: ${Pt("font-family-title")};\n\t\t\t\tline-height: ${Pt("line-height-5")};\n\t\t\t\tfont-size: ${Pt("font-size-6")};\n\t\t\t\tfont-weight: ${Pt("font-weight-regular")}\n\t\t\t`;case"heading-md-bold":return`\n\t\t\t\tfont-family: ${Pt("font-family-title")};\n\t\t\t\tline-height: ${Pt("line-height-5")};\n\t\t\t\tfont-size: ${Pt("font-size-5")};\n\t\t\t\tfont-weight: ${Pt("font-weight-bold")}\n\t\t\t`;case"heading-md":return`\n\t\t\t\tfont-family: ${Pt("font-family-title")};\n\t\t\t\tline-height: ${Pt("line-height-5")};\n\t\t\t\tfont-size: ${Pt("font-size-5")};\n\t\t\t\tfont-weight: ${Pt("font-weight-regular")}\n\t\t\t`;case"heading-sm-bold":return`\n\t\t\t\tfont-family: ${Pt("font-family-title")};\n\t\t\t\tline-height: ${Pt("line-height-5")};\n\t\t\t\tfont-size: ${Pt("font-size-4")};\n\t\t\t\tfont-weight: ${Pt("font-weight-bold")}\n\t\t\t`;case"heading-sm":return`\n\t\t\t\tfont-family: ${Pt("font-family-title")};\n\t\t\t\tline-height: ${Pt("line-height-5")};\n\t\t\t\tfont-size: ${Pt("font-size-4")};\n\t\t\t\tfont-weight: ${Pt("font-weight-regular")}\n\t\t\t`;case"body-lg-bold":return`\n\t\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\t\tline-height: ${Pt("line-height-6")};\n\t\t\t\t\tfont-size: ${Pt("font-size-5")};\n\t\t\t\t\tfont-weight: ${Pt("font-weight-bold")}\n\t\t\t\t`;case"body-lg":return`\n\t\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\t\tline-height: ${Pt("line-height-6")};\n\t\t\t\t\tfont-size: ${Pt("font-size-5")};\n\t\t\t\t\tfont-weight: ${Pt("font-weight-regular")}\n\t\t\t\t`;case"body-md":case"number-md":return`\n\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\tline-height: ${Pt("line-height-5")};\n\t\t\t\tfont-size: ${Pt("font-size-3")};\n\t\t\t\tfont-weight: ${Pt("font-weight-regular")}\n\t\t\t`;case"body-md-underline":return`\n\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\tline-height: ${Pt("line-height-5")};\n\t\t\t\tfont-size: ${Pt("font-size-3")};\n\t\t\t\tfont-weight: ${Pt("font-weight-regular")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-md-bold":return`\n\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\tline-height: ${Pt("line-height-5")};\n\t\t\t\tfont-size: ${Pt("font-size-3")};\n\t\t\t\tfont-weight: ${Pt("font-weight-bold")}\n\t\t\t`;case"body-md-bold-underline":return`\n\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\tline-height: ${Pt("line-height-5")};\n\t\t\t\tfont-size: ${Pt("font-size-3")};\n\t\t\t\tfont-weight: ${Pt("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-sm":case"number-sm":return`\n\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\tline-height: ${Pt("line-height-4")};\n\t\t\t\tfont-size: ${Pt("font-size-2")};\n\t\t\t\tfont-weight: ${Pt("font-weight-regular")}\n\t\t\t`;case"body-sm-underline":return`\n\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\tline-height: ${Pt("line-height-4")};\n\t\t\t\tfont-size: ${Pt("font-size-2")};\n\t\t\t\tfont-weight: ${Pt("font-weight-regular")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-sm-bold":return`\n\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\tline-height: ${Pt("line-height-4")};\n\t\t\t\tfont-size: ${Pt("font-size-2")};\n\t\t\t\tfont-weight: ${Pt("font-weight-bold")}\n\t\t\t`;case"body-sm-bold-underline":return`\n\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\tline-height: ${Pt("line-height-4")};\n\t\t\t\tfont-size: ${Pt("font-size-2")};\n\t\t\t\tfont-weight: ${Pt("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"button-lg":return`\n\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\tline-height: ${Pt("line-height-1")};\n\t\t\t\tfont-size: ${Pt("font-size-4")};\n\t\t\t\tfont-weight: ${Pt("font-weight-bold")}\n\t\t\t`;case"button-md":return`\n\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\tline-height: ${Pt("line-height-1")};\n\t\t\t\tfont-size: ${Pt("font-size-3")};\n\t\t\t\tfont-weight: ${Pt("font-weight-bold")}\n\t\t\t`;case"button-sm":return`\n\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\tline-height: ${Pt("line-height-1")};\n\t\t\t\tfont-size: ${Pt("font-size-2")};\n\t\t\t\tfont-weight: ${Pt("font-weight-bold")}\n\t\t\t`;case"table-header-md":return`\n\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\tline-height: ${Pt("line-height-1")};\n\t\t\t\tfont-size: ${Pt("font-size-3")};\n\t\t\t\tfont-weight: ${Pt("font-weight-medium")};\n\t\t\t\ttext-transform: uppercase\n\t\t\t`;case"table-header-sm":return`\n\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\tline-height: ${Pt("line-height-1")};\n\t\t\t\tfont-size: ${Pt("font-size-2")};\n\t\t\t\tfont-weight: ${Pt("font-weight-medium")}\n\t\t\t`;case"chips-md":return`\n\t\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\t\tline-height: ${Pt("line-height-1")};\n\t\t\t\t\tfont-size: ${Pt("font-size-2")};\n\t\t\t\t\tfont-weight: ${Pt("font-weight-bold")}\n\t\t\t\t`;case"chips-sm":return`\n\t\t\t\tfont-family: ${Pt("font-family-default")};\n\t\t\t\tline-height: ${Pt("line-height-1")};\n\t\t\t\tfont-size: ${Pt("font-size-1")};\n\t\t\t\tfont-weight: ${Pt("font-weight-medium")};\n\t\t\t\ttext-transform: uppercase\n\t\t\t`;default:return""}}(t)}`)}function Xt(t,e=""){return Z(Dt(t).map((t=>[`${t}.is-disabled`,`${t}:disabled`].map((t=>[t,e].join(" "))).join(", "))).join(", "))}const Yt={active:function(t){return Z(Dt(t).map((t=>`${t}:not(.is-disabled, :disabled):active`)).join(", "))},focus:function(t){return Z(Dt(t).map((t=>`${t}:not(.is-disabled, :disabled):focus,\n\t\t\t\t\t${t}:not(.is-disabled, :disabled):focus-visible,\n\t\t\t\t${t}:not(.is-disabled, :disabled):focus-within,\n\t\t\t\t${t}:not(.is-disabled, :disabled).is-focused`)).join(", "))},hover:function(t){return Z(Dt(t).map((t=>`${t}:not(.is-disabled, :disabled):hover`)).join(", "))}};function Zt(){return K`
40
- :host {
41
- --m-button-background-color: transparent;
42
- --m-button-base-size: ${Pt("global-height-default")};
43
- --m-button-border-color: ${_t("color-neutral-90")};
44
- --m-button-border-radius: ${Pt("border-radius-s")};
45
- --m-button-color: ${_t("color-text-secondary")};
46
- --m-button-outline-color: ${_t("color-primary-100")};
47
- --m-button-outline-offset: 2px;
48
- --m-button-padding-x: ${Pt("spacing-4")};
49
- --m-button-padding-y: ${Pt("spacing-3")};
50
- /**
51
- * Useful when overriding via host :slotted query.
52
- */
53
- --m-button-font-size: ${Pt("font-size-3")};
54
- }
55
-
56
- :host([size='small']) {
57
- --m-button-base-size: ${Pt("global-height-small")};
58
- }
59
-
60
- :host([size='large']) {
61
- --m-button-base-size: ${Pt("global-height-large")};
62
- }
63
-
64
- :host([variant|='icon']) {
65
- --m-button-border-radius: ${Pt("border-radius-circle")};
66
-
67
- min-inline-size: var(--m-button-base-size);
68
- inline-size: var(--m-button-base-size);
69
- }
70
-
71
- :host {
72
- display: inline-block;
73
- min-block-size: var(--m-button-base-size);
74
- block-size: var(--m-button-base-size);
75
- border-radius: var(--m-button-border-radius);
76
- }
77
-
78
- .button {
79
- ${Ht([{property:"color"},{property:"background-color"},{property:"border-color"}])};
80
-
81
- ${Jt("button-md")};
82
- font-size: var(--m-button-font-size);
83
-
84
- cursor: pointer;
85
- position: relative;
86
-
87
- display: flex;
88
- align-items: center;
89
- justify-content: center;
90
- overflow: hidden;
91
-
92
- block-size: 100%;
93
- inline-size: 100%;
94
- box-sizing: border-box;
95
-
96
- text-decoration: none;
97
-
98
- gap: ${Pt("spacing-1")};
99
-
100
- padding-inline: var(--m-button-padding-x);
101
- padding-block: var(--m-button-padding-y);
102
-
103
- background-color: var(--m-button-background-color);
104
- color: var(--m-button-color);
105
- border: 1px solid var(--m-button-border-color);
106
-
107
- border-radius: var(--m-button-border-radius);
108
- }
109
-
110
- ${Xt(".button")} {
111
- cursor: default;
112
- }
113
-
114
- ${Xt(".button","*")} {
115
- pointer-events: none;
116
- }
117
-
118
- ${Yt.focus(".button")} {
119
- outline: 1px solid var(--m-button-outline-color);
120
- outline-offset: var(--m-button-outline-offset);
121
- }
122
-
123
- ${Yt.hover(".button")} {
124
- --m-button-background-color: ${_t("color-background-inverted")};
125
- --m-button-border-color: ${_t("color-background-inverted")};
126
- --m-button-color: ${_t("color-text-inverted")};
127
- }
128
-
129
- ::slotted(*) {
130
- display: inline-flex;
131
- align-items: center;
132
-
133
- ${Gt(0)};
134
- ${Nt(0)};
135
- }
136
-
137
- slot[name='leading']::slotted(span),
138
- slot[name='trailing']::slotted(span) {
139
- justify-content: center;
140
- }
141
- `}var Kt,Qt,te,ee,ie,oe,re;class ne extends(vt(xt,["button","a"],"button")){static get properties(){return{...xt.properties,role:{type:String,reflect:!0},loading:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},variant:{type:String,reflect:!0},size:{type:String,reflect:!0},tabindex:{type:String},type:{type:String},href:{type:String},target:{type:String},download:{type:String}}}constructor(){super(),Kt.add(this),te.set(this,(()=>Boolean(this.disabled)||Boolean(this.loading))),ee.set(this,(()=>{const e=t(this,te,"f").call(this);this.setAttribute("aria-disabled",String(e))})),ie.set(this,(()=>{var e;return t(this,Kt,"m",re).call(this)?this.disabled?"-1":null!=this.tabindex?this.tabindex:"0":null!==(e=this.tabindex)&&void 0!==e?e:void 0})),oe.set(this,(t=>{var e,i;if(this.disabled||this.loading)return t.preventDefault(),void t.stopPropagation();"submit"===this.type&&(null===(e=this.getForm())||void 0===e||e.requestSubmit()),"reset"===this.type&&(null===(i=this.getForm())||void 0===i||i.reset())})),this.as="button",this.disabled=!1,this.loading=!1,this.size="default",this.type="button",this.variant="secondary",this.target="_self"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.addEventListener("click",t(this,oe,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,oe,"f"))}update(e){super.update(e),e.has("href")&&(this.as=t(this,Kt,"m",re).call(this)?"a":"button",this.role=t(this,Kt,"m",re).call(this)?"link":"button")}updated(e){super.updated(e),(e.has("disabled")||e.has("loading"))&&t(this,ee,"f").call(this)}render(){const e=t(this,Kt,"m",re).call(this);return G`
142
- <${this.tag}
143
- class=${yt({button:!0,"-primary":"primary"===this.variant,"-secondary":"secondary"===this.variant,"-tertiary":"tertiary"===this.variant,"-warning":"warning"===this.variant,"-danger":"danger"===this.variant,"-icon":"icon"===this.variant,"-icon-secondary":"icon-secondary"===this.variant,"-small":"small"===this.size,"-default":"default"===this.size,"-large":"large"===this.size,"is-loading":Boolean(this.loading),"is-disabled":t(this,te,"f").call(this)})}
144
- type=${gt(e?void 0:this.type)}
145
- ?disabled="${t(this,te,"f").call(this)}"
146
- aria-disabled=${this.disabled?"true":"false"}
147
- role=${gt(e?"link":"button")}
148
- tabindex=${gt(t(this,ie,"f").call(this))}
149
- href=${gt(e?this.href:void 0)}
150
- target=${gt(e?this.target:void 0)}
151
- download=${gt(e?this.download:void 0)}
152
- rel=${gt(e&&this.target?"noreferrer noopener":void 0)}
153
- >
154
- <!-- TODO: Replace this with the loading dots component as soon as it is ready. -->
155
- ${this.loading&&!["icon","icon-secondary"].includes(this.variant)?G`<span class="loader">&#x25cf;&#x25cf;&#x25cf;</span>`:C}
156
- <slot name="leading"></slot>
157
- <slot></slot>
158
- <slot name="trailing"></slot>
159
- </${this.tag}>
160
- `}focus(e){var i;null===(i=t(this,Kt,"a",Qt))||void 0===i||i.focus(e)}}te=new WeakMap,ee=new WeakMap,ie=new WeakMap,oe=new WeakMap,Kt=new WeakSet,Qt=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(".button"))&&void 0!==e?e:null},re=function(){return Boolean(this.href)},ne.styles=[[Zt(),K`
161
- .button.is-loading:not(.-icon, .-icon-secondary) *:not(.loader) {
162
- visibility: hidden;
163
- }
164
-
165
- .button.-primary {
166
- --m-button-background-color: ${_t("color-primary-60")};
167
- --m-button-border-color: ${_t("color-primary-60")};
168
- --m-button-color: ${_t("color-text-inverted")};
169
- }
170
-
171
- ${Xt(".button.-primary")} {
172
- --m-button-background-color: ${_t("color-primary-20")};
173
- --m-button-border-color: ${_t("color-primary-20")};
174
- }
175
-
176
- ${Yt.focus(".button.-primary")} {
177
- --m-button-border-color: ${_t("color-primary-60")};
178
- --m-button-outline-color: ${_t("color-primary-60")};
179
- }
180
-
181
- ${Yt.hover(".button.-primary")},
182
- ${Yt.active(".button.-primary")} {
183
- --m-button-background-color: ${_t("color-primary-100")};
184
- --m-button-border-color: ${_t("color-primary-100")};
185
- }
186
-
187
- .button.-primary.is-loading {
188
- --m-button-background-color: ${_t("color-primary-60")};
189
- --m-button-border-color: ${_t("color-primary-60")};
190
- --m-button-color: ${_t("color-text-inverted")};
191
- }
192
-
193
- .button.-secondary {
194
- --m-button-background-color: transparent;
195
- --m-button-border-color: ${_t("color-primary-100")};
196
- --m-button-color: ${_t("color-primary-100")};
197
- }
198
-
199
- ${Xt(".button.-secondary")} {
200
- --m-button-border-color: ${_t("color-text-disabled")};
201
- --m-button-color: ${_t("color-text-disabled")};
202
- }
203
-
204
- ${Yt.focus(".button.-secondary")} {
205
- --m-button-border-color: ${_t("color-primary-100")};
206
- --m-button-color: ${_t("color-primary-100")};
207
-
208
- --m-button-outline-color: ${_t("color-primary-60")};
209
- }
210
-
211
- ${Yt.hover(".button.-secondary")},
212
- ${Yt.active(".button.-secondary")} {
213
- --m-button-background-color: ${_t("color-background-tertiary")};
214
- --m-button-border-color: ${_t("color-primary-60")};
215
- --m-button-color: ${_t("color-primary-60")};
216
- }
217
-
218
- .button.-secondary.is-loading {
219
- --m-button-background-color: transparent;
220
-
221
- --m-button-border-color: ${_t("color-primary-100")};
222
- --m-button-color: ${_t("color-primary-100")};
223
- }
224
-
225
- .button.-tertiary {
226
- --m-button-background-color: transparent;
227
- --m-button-border-color: transparent;
228
- --m-button-color: ${_t("color-primary-100")};
229
- }
230
-
231
- ${Xt(".button.-tertiary")} {
232
- --m-button-color: ${_t("color-text-disabled")};
233
- }
234
-
235
- ${Yt.focus(".button.-tertiary")} {
236
- --m-button-color: ${_t("color-primary-100")};
237
- --m-button-outline-color: ${_t("color-primary-60")};
238
- }
239
-
240
- ${Yt.hover(".button.-tertiary")} {
241
- --m-button-background-color: ${_t("color-background-tertiary")};
242
- --m-button-border-color: ${_t("color-background-tertiary")};
243
- --m-button-color: ${_t("color-primary-60")};
244
- }
245
-
246
- ${Yt.active(".button.-tertiary")} {
247
- --m-button-background-color: ${_t("color-neutral-20")};
248
- --m-button-border-color: ${_t("color-neutral-20")};
249
- --m-button-color: ${_t("color-primary-60")};
250
- }
251
-
252
- .button.-tertiary.is-loading {
253
- --m-button-background-color: transparent;
254
- --m-button-border-color: transparent;
255
- --m-button-color: ${_t("color-primary-100")};
256
- }
257
-
258
- .button.-warning {
259
- --m-button-background-color: ${_t("color-warning-60")};
260
- --m-button-border-color: ${_t("color-warning-60")};
261
- --m-button-color: ${_t("color-text-primary")};
262
- }
263
-
264
- ${Xt(".button.-warning")} {
265
- --m-button-background-color: ${_t("color-warning-20")};
266
- --m-button-border-color: ${_t("color-warning-20")};
267
- --m-button-color: ${_t("color-text-inverted")};
268
- }
269
-
270
- ${Yt.focus(".button.-warning")} {
271
- --m-button-background-color: ${_t("color-warning-60")};
272
- --m-button-outline-color: ${_t("color-warning-60")};
273
- }
274
-
275
- ${Yt.hover(".button.-warning")},
276
- ${Yt.active(".button.-warning")} {
277
- --m-button-background-color: ${_t("color-warning-100")};
278
- --m-button-border-color: ${_t("color-warning-100")};
279
- --m-button-color: ${_t("color-text-inverted")};
280
- }
281
-
282
- .button.-warning.is-loading {
283
- --m-button-background-color: ${_t("color-warning-60")};
284
- --m-button-border-color: ${_t("color-warning-60")};
285
- --m-button-color: ${_t("color-text-primary")};
286
- }
287
-
288
- .button.-danger {
289
- --m-button-background-color: ${_t("color-danger-60")};
290
- --m-button-border-color: ${_t("color-danger-60")};
291
- --m-button-color: ${_t("color-text-inverted")};
292
- }
293
-
294
- ${Xt(".button.-danger")} {
295
- --m-button-background-color: ${_t("color-danger-20")};
296
- --m-button-border-color: ${_t("color-danger-20")};
297
- }
298
-
299
- ${Yt.focus(".button.-danger")} {
300
- --m-button-background-color: ${_t("color-danger-60")};
301
- --m-button-outline-color: ${_t("color-danger-60")};
302
- }
303
-
304
- ${Yt.hover(".button.-danger")},
305
- ${Yt.active(".button.-danger")} {
306
- --m-button-background-color: ${_t("color-danger-100")};
307
- --m-button-border-color: ${_t("color-danger-100")};
308
- }
309
-
310
- .button.-danger.is-loading {
311
- --m-button-background-color: ${_t("color-danger-60")};
312
- --m-button-border-color: ${_t("color-danger-60")};
313
- --m-button-color: ${_t("color-text-inverted")};
314
- }
315
-
316
- .button.-icon,
317
- .button.-icon-secondary {
318
- --m-button-color: ${_t("color-neutral-90")};
319
- --m-button-padding-x: ${Pt("spacing-1")};
320
- --m-button-padding-y: ${Pt("spacing-1")};
321
- }
322
-
323
- .button.-icon {
324
- --m-button-background-color: ${_t("color-background-tertiary")};
325
- --m-button-border-color: ${_t("color-background-tertiary")};
326
- }
327
-
328
- .button.-icon-secondary {
329
- --m-button-background-color: transparent;
330
- --m-button-border-color: transparent;
331
- }
332
-
333
- .button.-icon slot[name='leading']::slotted(*),
334
- .button.-icon slot[name='trailing']::slotted(*),
335
- .button.-icon-secondary slot[name='leading']::slotted(*),
336
- .button.-icon-secondary slot[name='trailing']::slotted(*) {
337
- display: none;
338
- }
339
-
340
- ${Xt([".button.-icon",".button.-icon-secondary"])} {
341
- --m-button-color: ${_t("color-neutral-40")};
342
- }
343
-
344
- ${Xt(".button.-icon")} {
345
- --m-button-background-color: ${_t("color-neutral-20")};
346
- --m-button-border-color: ${_t("color-neutral-20")};
347
- }
348
-
349
- ${Xt(".button.-icon-secondary")} {
350
- --m-button-background-color: transparent;
351
- --m-button-border-color: transparent;
352
- }
353
-
354
- ${Yt.focus([".button.-icon",".button.-icon-secondary"])} {
355
- --m-button-color: ${_t("color-primary-60")};
356
- --m-button-outline-color: ${_t("color-primary-60")};
357
- }
358
-
359
- ${Yt.focus(".button.-icon")} {
360
- --m-button-background-color: ${_t("color-neutral-20")};
361
- }
362
-
363
- ${Yt.focus(".button.-icon-secondary")} {
364
- --m-button-background-color: transparent;
365
- }
366
-
367
- ${Yt.hover([".button.-icon",".button.-icon-secondary"])},
368
- ${Yt.active([".button.-icon",".button.-icon-secondary"])} {
369
- --m-button-color: ${_t("color-primary-60")};
370
- }
371
-
372
- ${Yt.hover(".button.-icon")},
373
- ${Yt.active(".button.-icon")} {
374
- --m-button-background-color: ${_t("color-background-highlight")};
375
- --m-button-border-color: ${_t("color-background-highlight")};
376
- }
377
-
378
- ${Yt.hover(".button.-icon-secondary")},
379
- ${Yt.active(".button.-icon-secondary")} {
380
- --m-button-background-color: transparent;
381
- --m-button-border-color: transparent;
382
- }
383
-
384
- .button.-small {
385
- --m-button-padding-y: ${Pt("spacing-2")};
386
-
387
- ${Jt("button-sm")};
388
- }
389
-
390
- .button.-large {
391
- --m-button-padding-y: ${Pt("spacing-4")};
392
-
393
- ${Jt("button-lg")};
394
- }
395
-
396
- /* TODO: to be removed when the loading dots component is ready */
397
- .loader {
398
- position: absolute;
399
- inset: 0;
400
-
401
- display: flex;
402
- align-items: center;
403
- justify-content: center;
404
-
405
- pointer-events: none;
406
- }
407
- `]],window.customElements.define("m-button",ne);class se extends ne{constructor(){super(),this.size="small"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","primary-action")}}window.customElements.define("m-banner-action-primary",se);class ae extends ne{constructor(){super(),this.variant="tertiary",this.size="small"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","secondary-action")}}window.customElements.define("m-banner-action-secondary",ae);class le extends ut{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","actions")}render(){return k`
408
- <slot name="secondary-action"></slot>
409
- <slot name="primary-action"></slot>
410
- `}}le.styles=[K`
411
- :host {
412
- display: flex;
413
- justify-content: flex-end;
414
- gap: ${Pt("spacing-2")};
415
- }
416
- `],window.customElements.define("m-banner-actions",le);class ce extends ut{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","description")}render(){return k`<slot></slot>`}}ce.styles=[K`
417
- :host {
418
- ${Jt("body-md")};
419
- color: ${_t("color-text-secondary")};
420
- }
421
- `],window.customElements.define("m-banner-description",ce);class de extends ut{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","icon")}render(){return k`<slot></slot>`}}window.customElements.define("m-banner-icon",de);class he extends ut{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","title")}render(){return k`<slot></slot>`}}he.styles=[K`
422
- :host {
423
- ${Jt("body-md-bold")};
424
- color: ${_t("color-text-secondary")};
425
- }
426
- `],window.customElements.define("m-banner-title",he);class ue extends ut{constructor(){super(...arguments),this.emit=(t,e)=>{const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,...e});this.dispatchEvent(i)},this.reemit=t=>{!function(t,e){!e.bubbles||t.shadowRoot&&!e.composed||e.stopPropagation();const i=Reflect.construct(e.constructor,[e.type,e]),o=t.dispatchEvent(i);o||e.preventDefault()}(this,t)}}}var pe={BASE_PIXELS:16,toRem:function(t,e=16){return parseInt(String(t),10)/e+"rem"}},ge=kt(pe.toRem);function be(t,e){return Z(ge(t,e))}const me=new Map([["alert-circle",()=>import("./attention-26b6818f.js")],["attention",()=>import("./attention-26b6818f.js")],["bell",()=>import("./bell-dc0111a0.js")],["check",()=>import("./check-e87dc5cc.js")],["close",()=>import("./close-5c0b1a30.js")],["indeterminate",()=>import("./indeterminate-635ae13a.js")],["info-circle",()=>import("./info-circle-a2563417.js")]]);var fe,ye,ve,$e;me.keys();class we extends ue{static get properties(){return{name:{type:String},size:{type:String},color:{type:String},loading:{state:!0}}}constructor(){super(),this.icon=null,fe.set(this,(async()=>{me.has(this.name);try{this.icon=null;const{default:t}=await me.get(this.name)();this.icon=t}catch{}finally{this.requestUpdate()}})),this.icon=null}connectedCallback(){super.connectedCallback(),t(this,fe,"f").call(this)}update(e){super.update(e),e.has("name")&&t(this,fe,"f").call(this)}updated(t){super.updated(t),t.has("size")&&null!=this.size&&this.style.setProperty("--m-icon-size",`${parseInt(String(this.size),10)||16}px`),t.has("color")&&null!=this.color&&this.style.setProperty("--m-icon-color",St(this.color))}render(){return null!=this.name&&me.has(this.name)&&null!=this.icon?this.icon:C}}fe=new WeakMap,we.styles=[[K`
427
- :host {
428
- --m-icon-size: 16px;
429
- --m-icon-color: ${_t("color-text-primary")};
430
-
431
- display: inline-flex;
432
- align-items: center;
433
- justify-content: center;
434
-
435
- inline-size: var(--m-icon-size);
436
- block-size: var(--m-icon-size);
437
- }
438
-
439
- svg {
440
- ${Ht([{property:"color"},{property:"fill"}])};
441
-
442
- inline-size: var(--m-icon-size);
443
- block-size: var(--m-icon-size);
444
-
445
- color: var(--m-icon-color);
446
- fill: var(--m-icon-color);
447
- }
448
- `]],window.customElements.define("m-icon",we);class xe extends ue{static get properties(){return{controls:{type:String},disabled:{type:Boolean},inverted:{type:Boolean},label:{type:String},size:{type:String}}}constructor(){super(),ye.add(this),$e.set(this,(()=>{this.emit("m-close")})),this.disabled=!1,this.inverted=!1,this.label="Close",this.size="default"}render(){var e;return k`
449
- <button
450
- type="button"
451
- aria-controls="${gt(this.controls)}"
452
- aria-label="${gt(this.label)}"
453
- class=${yt({"close-button":!0,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size,"-inverted":null!==(e=this.inverted)&&void 0!==e&&e})}
454
- ?disabled="${this.disabled}"
455
- @click=${t(this,$e,"f")}
456
- >
457
- <m-icon name="close"></m-icon>
458
- </button>
459
- `}focus(e){var i;null===(i=t(this,ye,"a",ve))||void 0===i||i.focus(e)}}$e=new WeakMap,ye=new WeakSet,ve=function(){var t;return null!==(t=this.renderRoot.querySelector("button"))&&void 0!==t?t:null},xe.styles=[K`
460
- :host {
461
- --m-close-button-color: ${_t("color-text-primary")};
462
- --m-close-button-outline-color: ${_t("color-primary-100")};
463
- --m-close-button-outline-offset: 2px;
464
- }
465
-
466
- .close-button {
467
- --button-color: transparent;
468
- --icon-color: var(--m-close-button-color);
469
-
470
- width: var(--button-size);
471
- height: var(--button-size);
472
- ${Nt(0)};
473
- ${Gt(0)};
474
- background-color: var(--button-color);
475
- border: none;
476
- border-radius: 50%;
477
- display: flex;
478
- align-items: center;
479
- justify-content: center;
480
- cursor: pointer;
481
-
482
- ${Ht([{property:"background-color"}])};
483
- }
484
-
485
- .close-button.-size-small {
486
- --button-size: ${be("12px")};
487
- --icon-size: ${be("8px")};
488
- }
489
-
490
- .close-button.-size-default {
491
- --button-size: ${be("16px")};
492
- --icon-size: ${be("12px")};
493
- }
494
-
495
- .close-button.-size-large {
496
- --button-size: ${be("20px")};
497
- --icon-size: ${be("16px")};
498
- }
499
-
500
- .close-button.-inverted {
501
- --button-color: transparent;
502
- --icon-color: ${_t("color-text-inverted")};
503
- }
504
-
505
- m-icon {
506
- --m-icon-size: var(--icon-size);
507
- --m-icon-color: var(--icon-color);
508
-
509
- display: block;
510
- }
511
-
512
- ${Yt.focus(".close-button")} {
513
- outline: 1px solid var(--m-close-button-outline-color);
514
- outline-offset: var(--m-close-button-outline-offset);
515
- }
516
-
517
- ${Yt.hover(".close-button")} {
518
- --button-color: var(--m-close-button-color);
519
- --icon-color: ${_t("color-text-inverted")};
520
- }
521
-
522
- ${Yt.hover(".close-button.-inverted")} {
523
- --button-color: ${_t("color-text-inverted")};
524
- --icon-color: var(--m-close-button-color);
525
- }
526
-
527
- ${Xt(".close-button")} {
528
- --icon-color: ${_t("color-text-disabled")};
529
- cursor: default;
530
- }
531
-
532
- ${Xt(".close-button","*")} {
533
- pointer-events: none;
534
- }
535
- `],window.customElements.define("m-close-button",xe);
536
- /**
537
- * @license
538
- * Copyright 2018 Google LLC
539
- * SPDX-License-Identifier: BSD-3-Clause
540
- */
541
- const ke="important",ze=" !"+ke,Se=mt(class extends ft{constructor(t){var e;if(super(t),t.type!==bt||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,i)=>{const o=t[i];return null==o?e:e+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ut){this.ut=new Set;for(const t in e)this.ut.add(t);return this.render(e)}this.ut.forEach((t=>{null==e[t]&&(this.ut.delete(t),t.includes("-")?i.removeProperty(t):i[t]="")}));for(const t in e){const o=e[t];if(null!=o){this.ut.add(t);const e="string"==typeof o&&o.endsWith(ze);t.includes("-")||e?i.setProperty(t,e?o.slice(0,-11):o,e?ke:""):i[t]=o}}return S}});class Ce extends(vt(ut,["h1","h2","h3","h4","h5","h6","p","span"],"span")){static get properties(){return{color:{type:String},ellipsized:{type:Boolean,reflect:!0},variant:{type:String,reflect:!0}}}constructor(){super(),this.as="span",this.color="color-text-primary",this.ellipsized=!1,this.variant="body-md"}render(){return G`
542
- <${this.tag}
543
- class=${yt({"m-text":!0,"-body-lg-bold":"body-lg-bold"===this.variant,"-body-lg":"body-lg"===this.variant,"-body-md-bold-underline":"body-md-bold-underline"===this.variant,"-body-md-bold":"body-md-bold"===this.variant,"-body-md-underline":"body-md-underline"===this.variant,"-body-md":"body-md"===this.variant,"-body-sm-bold-underline":"body-sm-bold-underline"===this.variant,"-body-sm-bold":"body-sm-bold"===this.variant,"-body-sm-underline":"body-sm-underline"===this.variant,"-body-sm":"body-sm"===this.variant,"-button-lg":"button-lg"===this.variant,"-button-md":"button-md"===this.variant,"-button-sm":"button-sm"===this.variant,"-chips-md":"chips-md"===this.variant,"-chips-sm":"chips-sm"===this.variant,"-heading-lg-bold":"heading-lg-bold"===this.variant,"-heading-lg":"heading-lg"===this.variant,"-heading-md-bold":"heading-md-bold"===this.variant,"-heading-md":"heading-md"===this.variant,"-heading-sm-bold":"heading-sm-bold"===this.variant,"-heading-sm":"heading-sm"===this.variant,"-hero-lg-bold":"hero-lg-bold"===this.variant,"-hero-lg":"hero-lg"===this.variant,"-hero-md-bold":"hero-md-bold"===this.variant,"-hero-md":"hero-md"===this.variant,"-hero-sm-bold":"hero-sm-bold"===this.variant,"-hero-sm":"hero-sm"===this.variant,"-number-md":"number-md"===this.variant,"-number-sm":"number-sm"===this.variant,"-table-header-md":"table-header-md"===this.variant,"-table-header-sm":"table-header-sm"===this.variant,"-ellipsized":Boolean(this.ellipsized)})}
544
- style=${Se({"--m-text-color":St(this.color)})}
545
- >
546
- <slot></slot>
547
- </${this.tag}>
548
- `}}var Me,We;Ce.styles=[K`
549
- :host {
550
- --m-text-color: ${_t("color-text-primary")};
551
- --m-text-display: inline-block;
552
- --m-text-max-width: initial;
553
- --m-text-padding: 0;
554
- --m-text-margin: 0;
555
-
556
- display: contents;
557
- }
558
-
559
- .m-text {
560
- ${Ht([{property:"color"}])};
561
-
562
- ${Jt()};
563
-
564
- color: var(--m-text-color);
565
- display: var(--m-text-display);
566
- padding: var(--m-text-padding);
567
- margin: var(--m-text-margin);
568
- }
569
-
570
- .-body-lg-bold {
571
- ${Jt("body-lg-bold")};
572
- }
573
-
574
- .-body-lg {
575
- ${Jt("body-lg")};
576
- }
577
-
578
- .-body-md-bold-underline {
579
- ${Jt("body-md-bold-underline")};
580
- }
581
-
582
- .-body-md-bold {
583
- ${Jt("body-md-bold")};
584
- }
585
-
586
- .-body-md-underline {
587
- ${Jt("body-md-underline")};
588
- }
589
-
590
- .-body-md {
591
- ${Jt("body-md")};
592
- }
593
-
594
- .-body-sm-bold-underline {
595
- ${Jt("body-sm-bold-underline")};
596
- }
597
-
598
- .-body-sm-bold {
599
- ${Jt("body-sm-bold")};
600
- }
601
-
602
- .-body-sm-underline {
603
- ${Jt("body-sm-underline")};
604
- }
605
-
606
- .-body-sm {
607
- ${Jt("body-sm")};
608
- }
609
-
610
- .-button-lg {
611
- ${Jt("button-lg")};
612
- }
613
-
614
- .-button-md {
615
- ${Jt("button-md")};
616
- }
617
-
618
- .-button-sm {
619
- ${Jt("button-sm")};
620
- }
621
-
622
- .-chips-md {
623
- ${Jt("chips-md")};
624
- }
625
-
626
- .-chips-sm {
627
- ${Jt("chips-sm")};
628
- }
629
-
630
- .-heading-lg-bold {
631
- ${Jt("heading-lg-bold")};
632
- }
633
-
634
- .-heading-lg {
635
- ${Jt("heading-lg")};
636
- }
637
-
638
- .-heading-md-bold {
639
- ${Jt("heading-md-bold")};
640
- }
641
-
642
- .-heading-md {
643
- ${Jt("heading-md")};
644
- }
645
-
646
- .-heading-sm-bold {
647
- ${Jt("heading-sm-bold")};
648
- }
649
-
650
- .-heading-sm {
651
- ${Jt("heading-sm")};
652
- }
653
-
654
- .-hero-lg-bold {
655
- ${Jt("hero-lg-bold")};
656
- }
657
-
658
- .-hero-lg {
659
- ${Jt("hero-lg")};
660
- }
661
-
662
- .-hero-md-bold {
663
- ${Jt("hero-md-bold")};
664
- }
665
-
666
- .-hero-md {
667
- ${Jt("hero-md")};
668
- }
669
-
670
- .-hero-sm-bold {
671
- ${Jt("hero-sm-bold")};
672
- }
673
-
674
- .-hero-sm {
675
- ${Jt("hero-sm")};
676
- }
677
-
678
- .-number-md {
679
- ${Jt("number-md")};
680
- }
681
-
682
- .-number-sm {
683
- ${Jt("number-sm")};
684
- }
685
-
686
- .-table-header-md {
687
- ${Jt("table-header-md")};
688
- }
689
-
690
- .-table-header-sm {
691
- ${Jt("table-header-sm")};
692
- }
693
-
694
- .-ellipsized {
695
- overflow: hidden;
696
- text-overflow: ellipsis;
697
- white-space: nowrap;
698
- max-width: var(--m-text-max-width);
699
- }
700
- `],window.customElements.define("m-text",Ce);class Ae extends ue{static get properties(){return{variant:{type:String},dismissible:{type:Boolean},dismissed:{type:Boolean,reflect:!0}}}constructor(){super(),Me.set(this,void 0),We.set(this,(()=>{this.dismissed=!0,this.emit("m-dismiss",{composed:!0})})),this.variant="neutral",this.dismissible=!1,this.dismissed=!1}get primaryAction(){return null==t(this,Me,"f")&&e(this,Me,this.querySelector("m-banner-action-primary"),"f"),t(this,Me,"f")}updated(t){super.updated(t),t.has("variant")&&null!=this.primaryAction&&(this.primaryAction.variant=function(t){switch(t){case"warning":return"warning";case"danger":return"danger";default:return"primary"}}(this.variant))}render(){if(this.dismissed)return C;const e=null!=this.querySelector("*[slot='description']"),i=null!=this.querySelector("*[slot='actions']"),o=k`
701
- <m-close-button
702
- id="close"
703
- label="Dismiss"
704
- @click=${t(this,We,"f")}
705
- ></m-close-button>
706
- `;return k`
707
- <div
708
- class=${yt({banner:!0,"-success":"success"===this.variant,"-warning":"warning"===this.variant,"-danger":"danger"===this.variant,"-with-description":e})}
709
- >
710
- <div class="wrapper">
711
- <slot name="icon">
712
- <m-icon name="${function(t){switch(t){case"success":return"check";case"warning":case"danger":return"attention";default:return"info-circle"}}(this.variant)}"></m-icon>
713
- </slot>
714
- <div class="content">
715
- <slot name="title"></slot>
716
- <slot name="description"></slot>
717
- </div>
718
- ${this.dismissible&&!i?o:C}
719
- </div>
720
- <slot name="actions"></slot>
721
- </div>
722
- `}}Me=new WeakMap,We=new WeakMap,Ae.styles=[K`
723
- :host {
724
- display: block;
725
- width: 100%;
726
- }
727
-
728
- :host([dismissed]) {
729
- display: none;
730
- }
731
-
732
- .banner {
733
- background-color: var(
734
- --m-banner-background-color,
735
- ${_t("color-background-secondary")}
736
- );
737
- border: var(--m-banner-border, 1px solid ${_t("color-border")});
738
- border-radius: var(--m-banner-border-radius, ${Pt("border-radius-m")});
739
- padding-inline: var(--m-banner-padding-x, ${Pt("spacing-6")});
740
- padding-block: var(--m-banner-padding-y, ${Pt("spacing-4")});
741
- display: flex;
742
- flex-wrap: wrap;
743
- justify-content: flex-end;
744
- gap: ${Pt("spacing-6")};
745
- }
746
-
747
- .banner.-success {
748
- --m-banner-background-color: ${_t("color-success-20")};
749
- --m-banner-border: 1px solid ${_t("color-success-20")};
750
- --m-banner-icon-color: ${_t("color-success-60")};
751
- }
752
-
753
- .banner.-warning {
754
- --m-banner-background-color: ${_t("color-warning-20")};
755
- --m-banner-border: 1px solid ${_t("color-warning-20")};
756
- --m-banner-icon-color: ${_t("color-warning-100")};
757
- }
758
-
759
- .banner.-danger {
760
- --m-banner-background-color: ${_t("color-danger-20")};
761
- --m-banner-border: 1px solid ${_t("color-danger-20")};
762
- --m-banner-icon-color: ${_t("color-danger-60")};
763
- }
764
-
765
- .banner.-with-description {
766
- flex-direction: column;
767
- }
768
-
769
- .wrapper {
770
- display: flex;
771
- gap: ${Pt("spacing-6")};
772
- align-items: center;
773
- flex-grow: 1;
774
- }
775
-
776
- slot[name='icon'] > m-icon,
777
- slot[name='icon']::slotted(*) {
778
- --m-icon-color: var(--m-banner-icon-color, ${_t("color-neutral-90")});
779
- --m-icon-size: var(--m-banner-icon-size, 24px);
780
-
781
- fill: var(--m-banner-icon-color, ${_t("color-neutral-90")});
782
- block-size: var(--m-banner-icon-size, 24px);
783
- inline-size: var(--m-banner-icon-size, 24px);
784
- }
785
-
786
- .content {
787
- display: flex;
788
- flex-direction: column;
789
- flex-grow: 1;
790
- gap: ${Pt("spacing-1")};
791
- }
792
- `],window.customElements.define("m-banner",Ae);class je extends ut{static get properties(){return{flagged:{type:Boolean},flagColor:{type:String,attribute:"flag-color"}}}constructor(){super(),this.flagged=!1,this.flagColor="color-background-inverted"}render(){return k`
793
- <div
794
- class="m-card"
795
- style="${Se({"--m-card-flag-color":St(this.flagColor)})}"
796
- >
797
- ${this.flagged?k`<span class="m-card-flag"></span>`:C}
798
- <div class="m-card-content">
799
- <slot name="title"></slot>
800
- <slot name="subtitle"></slot>
801
- <slot name="divider"></slot>
802
- <slot name="body"></slot>
803
- </div>
804
- </div>
805
- `}}je.styles=[K`
806
- :host {
807
- --m-card-background-color: ${_t("color-background-primary")};
808
- }
809
-
810
- .m-card {
811
- position: relative;
812
- display: flex;
813
- flex-direction: row;
814
-
815
- background-color: var(--m-card-background-color);
816
- border-radius: ${Pt("border-radius-s")};
817
- border: solid 1px ${_t("color-divider")};
818
- }
819
-
820
- .m-card-flag {
821
- position: absolute;
822
- top: -1px;
823
- bottom: -1px;
824
- left: -1px;
825
- display: block;
826
-
827
- box-sizing: border-box;
828
- border: 1px solid var(--m-card-flag-color);
829
- background-color: var(--m-card-flag-color);
830
- width: ${Pt("border-thick")};
831
- border-top-left-radius: ${Pt("border-radius-s")};
832
- border-top-right-radius: 0;
833
- border-bottom-right-radius: 0;
834
- border-bottom-left-radius: ${Pt("border-radius-s")};
835
- }
836
-
837
- .m-card-content {
838
- display: flex;
839
- flex: 1;
840
- flex-direction: column;
841
- }
842
-
843
- ::slotted(m-divider) {
844
- --m-divider-margin-top: ${Pt("spacing-4")};
845
- }
846
- `],window.customElements.define("m-card",je);class Be extends ut{static get properties(){return{slot:{type:String}}}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","body")}render(){return k`
847
- <div class="m-card-body">
848
- <slot></slot>
849
- </div>
850
- `}}Be.styles=[K`
851
- :host {
852
- --m-card-body-padding-x: ${Pt("spacing-4")};
853
- --m-card-body-padding-y: ${Pt("spacing-4")};
854
- }
855
-
856
- .m-card-body {
857
- padding: var(--m-card-body-padding-y) var(--m-card-body-padding-x);
858
- }
859
- `],window.customElements.define("m-card-body",Be);class Ee extends ut{static get properties(){return{slot:{type:String}}}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","subtitle")}render(){return k`
860
- <div class="m-card-subtitle">
861
- <slot></slot>
862
- </div>
863
- `}}Ee.styles=[K`
864
- :host {
865
- --m-card-subtitle-margin-top: ${Pt("spacing-2")};
866
- --m-card-subtitle-padding-x: ${Pt("spacing-4")};
867
- --m-card-subtitle-padding-y: 0;
868
- }
869
-
870
- .m-card-subtitle {
871
- ${Jt("body-md")};
872
-
873
- margin-block-start: var(--m-card-subtitle-margin-top);
874
- padding: var(--m-card-subtitle-padding-y) var(--m-card-subtitle-padding-x);
875
-
876
- color: ${_t("color-text-tertiary")};
877
- }
878
- `],window.customElements.define("m-card-subtitle",Ee);class Re extends ut{static get properties(){return{slot:{type:String}}}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","title")}render(){return k`
879
- <div class="m-card-title">
880
- <slot name="leading"></slot>
881
- <slot></slot>
882
- </div>
883
- `}}Re.styles=[K`
884
- :host {
885
- --m-card-title-padding-x: ${Pt("spacing-4")};
886
- --m-card-title-padding-top: ${Pt("spacing-4")};
887
- }
888
-
889
- .m-card-title {
890
- padding: var(--m-card-title-padding-top) var(--m-card-title-padding-x) 0;
891
-
892
- ${Jt("heading-sm-bold")};
893
- color: ${_t("color-text-primary")};
894
- }
895
-
896
- slot[name='leading']::slotted(*) {
897
- display: inline-flex;
898
- flex-flow: row nowrap;
899
- align-items: center;
900
- justify-content: center;
901
- pointer-events: none;
902
- margin-inline-end: ${Pt("spacing-1")};
903
- }
904
- `],window.customElements.define("m-card-title",Re);class Te extends ut{render(){return k`<hr class="m-divider" />`}}Te.styles=[K`
905
- .m-divider {
906
- border: 0;
907
- border-block-end: solid 1px ${_t("color-divider")};
908
- margin-block-start: var(
909
- --m-divider-margin-top,
910
- var(--m-divider-margin-y, 0)
911
- );
912
- margin-block-end: var(
913
- --m-divider-margin-bottom,
914
- var(--m-divider-margin-y, 0)
915
- );
916
- }
917
- `],window.customElements.define("m-divider",Te);class Pe extends Te{constructor(){super(),this.slot="divider"}}Pe.styles=[...Te.styles,K`
918
- :host {
919
- --m-divider-margin-top: ${Pt("spacing-4")};
920
- }
921
- `],Pe.properties={slot:{attribute:!0,type:String,reflect:!0}},window.customElements.define("m-card-divider",Pe);const _e={delay:"0s",duration:"0.35s",easing:"ease-in-out"};var Oe,De,Ue;class qe extends ut{static get properties(){return{name:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0},indeterminate:{type:Boolean,reflect:!0}}}constructor(){super(),Oe.add(this),Ue.set(this,(t=>{const e=t.target,i=new CustomEvent("m-change",{cancelable:!1,composed:!1,bubbles:!0,detail:{checked:e.checked,indeterminate:e.indeterminate}});this.dispatchEvent(i),this.checked=e.checked,this.indeterminate=e.indeterminate})),this.name=void 0,this.disabled=!1,this.checked=!1,this.indeterminate=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","checkbox")}disconnectedCallback(){super.connectedCallback()}firstUpdated(){this.input=this.renderRoot.querySelector("input"),this.label=this.renderRoot.querySelector("label")}updated(){t(this,Oe,"m",De).call(this)}render(){return k`
922
- <label for="${gt(this.id)}" class="check-input-label">
923
- <input
924
- id="${gt(this.id)}"
925
- name="${gt(this.name)}"
926
- type="checkbox"
927
- class="check-input"
928
- ?disabled="${this.disabled}"
929
- ?checked="${this.checked}"
930
- @change=${t(this,Ue,"f")}
931
- />
932
- <m-icon name="check" class="check-icon"></m-icon>
933
- <m-icon name="indeterminate" class="indeterminate-icon"></m-icon>
934
- <slot name="leading"></slot>
935
- <slot></slot>
936
- </label>
937
- `}focus(t){var e;null===(e=this.input)||void 0===e||e.focus(t)}}Ue=new WeakMap,Oe=new WeakSet,De=function(){this.setAttribute("aria-disabled",this.disabled.toString()),this.setAttribute("aria-checked",this.indeterminate?"mixed":this.checked.toString()),this.input.indeterminate=this.indeterminate},qe.styles=[K`
938
- ${Yt.focus(".check-input-label")} {
939
- border-radius: 2px;
940
- outline: 1px solid ${_t("color-primary-60")};
941
- }
942
-
943
- .check-input-label {
944
- ${Jt("body-md")};
945
-
946
- gap: ${Pt("spacing-1")};
947
- align-items: center;
948
- display: inline-flex;
949
- padding: 4px 2px;
950
- position: relative;
951
- }
952
-
953
- .check-input-label,
954
- .check-input {
955
- cursor: pointer;
956
- }
957
-
958
- .check-input {
959
- --checkbox-input-size: ${Pt("font-size-4")};
960
-
961
- color: ${_t("color-text-tertiary")};
962
- width: var(--checkbox-input-size);
963
- height: var(--checkbox-input-size);
964
- background: ${_t("color-neutral-0")};
965
- appearance: none;
966
- outline: none;
967
- border-style: solid;
968
- border-radius: ${Pt("border-radius-s")};
969
- border-color: ${_t("color-border")};
970
- border-width: ${Pt("border-thin")};
971
- margin: 0;
972
- flex-grow: 0;
973
- flex-shrink: 0;
974
- flex-basis: var(--checkbox-input-size);
975
- ${Ht([{property:"border",..._e},{property:"background",..._e}])};
976
- }
977
-
978
- .check-input:indeterminate,
979
- .check-input:checked {
980
- background: ${_t("color-primary-60")};
981
- border-color: ${_t("color-primary-60")};
982
- }
983
-
984
- ${Xt(".check-input")} {
985
- background: ${_t("color-background-tertiary")};
986
- cursor: not-allowed;
987
- }
988
-
989
- ${Xt(".check-input:indeterminate")},
990
- ${Xt(".check-input:checked")} {
991
- background: ${_t("color-neutral-40")};
992
- border-color: ${_t("color-neutral-40")};
993
- }
994
-
995
- ${Yt.hover(".check-input:indeterminate")},
996
- ${Yt.hover(".check-input:checked")} {
997
- background: ${_t("color-primary-100")};
998
- border-color: ${_t("color-primary-100")};
999
- }
1000
-
1001
- ${Yt.hover(".check-input")} {
1002
- border-color: ${_t("color-primary-100")};
1003
- }
1004
-
1005
- :host([disabled]) .check-input-label {
1006
- cursor: not-allowed;
1007
- color: ${_t("color-text-disabled")};
1008
- }
1009
-
1010
- .check-icon,
1011
- .indeterminate-icon {
1012
- --m-icon-size: 1em;
1013
- --m-icon-color: ${_t("color-neutral-0")};
1014
-
1015
- position: absolute;
1016
-
1017
- pointer-events: none;
1018
- border-width: ${Pt("border-thin")};
1019
- border-style: solid;
1020
- border-color: transparent;
1021
- border-radius: ${Pt("border-radius-s")};
1022
- display: none;
1023
- }
1024
-
1025
- .check-input:checked:not(:indeterminate) ~ .check-icon,
1026
- .check-input:indeterminate:not(:checked) ~ .indeterminate-icon {
1027
- display: inline-flex;
1028
- }
1029
- `],window.customElements.define("m-checkbox",qe);
1030
- /**
1031
- * @license
1032
- * Copyright 2021 Google LLC
1033
- * SPDX-License-Identifier: BSD-3-Clause
1034
- */
1035
- let Le=class extends Event{constructor(t,e,i){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=e,this.subscribe=i}};
1036
- /**
1037
- * @license
1038
- * Copyright 2021 Google LLC
1039
- * SPDX-License-Identifier: BSD-3-Clause
1040
- */
1041
- /**
1042
- * @license
1043
- * Copyright 2021 Google LLC
1044
- * SPDX-License-Identifier: BSD-3-Clause
1045
- */
1046
- let Ne=class{constructor(t,e,i,o){var r;if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(t,e)=>{this.unsubscribe&&(this.unsubscribe!==e&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,e)),this.unsubscribe=e},this.host=t,void 0!==e.context){const t=e;this.context=t.context,this.callback=t.callback,this.subscribe=null!==(r=t.subscribe)&&void 0!==r&&r}else this.context=e,this.callback=i,this.subscribe=null!=o&&o;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Le(this.context,this.t,this.subscribe))}},Fe=class{constructor(t){this.disposers=new Map,this.updateObservers=()=>{for(const[t,e]of this.disposers)t(this.o,e)},void 0!==t&&(this.value=t)}get value(){return this.o}set value(t){this.setValue(t)}setValue(t,e=!1){const i=e||!Object.is(t,this.o);this.o=t,i&&this.updateObservers()}addCallback(t,e){if(e){this.disposers.has(t)||this.disposers.set(t,(()=>{this.disposers.delete(t)}));const e=this.disposers.get(t);t(this.value,e)}else t(this.value)}clearCallbacks(){this.disposers.clear()}},Ie=class extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}},Ge=class extends Fe{constructor(t,e,i){super(void 0!==e.context?e.initialValue:i),this.onContextRequest=t=>{t.context===this.context&&t.composedPath()[0]!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,t.subscribe))},this.host=t,void 0!==e.context?this.context=e.context:this.context=e,this.attachListeners(),this.host.addController(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest)}hostConnected(){this.host.dispatchEvent(new Ie(this.context))}};
1047
- /**
1048
- * @license
1049
- * Copyright 2021 Google LLC
1050
- * SPDX-License-Identifier: BSD-3-Clause
1051
- */var Ve=async function(t,e){const i=t.getAnimations(e).map((({finished:t})=>t));await Promise.allSettled(i)};let He=!1;function Je(){if(He)return;const t=new class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{const e=this.pendingContextRequests.get(t.context);if(void 0===e)return;this.pendingContextRequests.delete(t.context);const{requests:i}=e;for(const{elementRef:e,callbackRef:o}of i){const i=e.deref(),r=o.deref();void 0===i||void 0===r||i.dispatchEvent(new Le(t.context,r,!0))}},this.onContextRequest=t=>{if(!0!==t.subscribe)return;const e=t.composedPath()[0],i=t.callback;let o=this.pendingContextRequests.get(t.context);void 0===o&&this.pendingContextRequests.set(t.context,o={callbacks:new WeakMap,requests:[]});let r=o.callbacks.get(e);void 0===r&&o.callbacks.set(e,r=new WeakSet),r.has(i)||(r.add(i),o.requests.push({elementRef:new WeakRef(e),callbackRef:new WeakRef(i)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};t.attach(document.body),He=!0}const Xe=Symbol("dialog");var Ye,Ze,Ke,Qe,ti,ei,ii,oi;Je();class ri extends ue{static get properties(){return{open:{type:Boolean,reflect:!0},size:{type:String,reflect:!0},variant:{type:String,reflect:!0}}}constructor(){super(),Ye.add(this),Ze.set(this,new Ge(this,Xe,{variant:"neutral"})),this.open=!1,this.size="small",this.variant="neutral"}render(){return k`
1052
- <dialog
1053
- class="${yt({"-size-small":"small"===this.size||!this.size,"-size-medium":"medium"===this.size,"-size-large":"large"===this.size,"-size-extra-large":"extra-large"===this.size})}"
1054
- @click=${t(this,Ye,"m",ii)}
1055
- @cancel=${t(this,Ye,"m",oi)}
1056
- >
1057
- <slot name="header"></slot>
1058
- <slot name="body"></slot>
1059
- <slot name="footer"></slot>
1060
- <slot name="actions"></slot>
1061
- </dialog>
1062
- `}updated(e){var i;super.updated(e),e.has("variant")&&t(this,Ze,"f").setValue({variant:null!==(i=this.variant)&&void 0!==i?i:"neutral"}),e.has("open")&&t(this,Ye,"m",Qe).call(this,e.get("open"))}show(){this.open=!0}hide(){this.open=!1}}Ze=new WeakMap,Ye=new WeakSet,Ke=function(){var t;return null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("dialog")},Qe=async function(e){const i=t(this,Ye,"a",Ke);i&&(!e&&this.open?(this.style.display="block",t(this,Ye,"m",ti).call(this,"m-opening"),i.showModal(),await Ve(i),t(this,Ye,"m",ti).call(this,"m-opened")):e&&!this.open?(t(this,Ye,"m",ti).call(this,"m-closing"),i.classList.add("is-hiding"),await Ve(i),i.classList.remove("is-hiding"),i.close(),t(this,Ye,"m",ti).call(this,"m-closed"),this.style.display="none"):null!=e||this.open||(this.style.display="none"))},ti=function(t){this.emit(t,{cancelable:!1,bubbles:!1})},ei=function(){this.open&&this.emit("m-close")},ii=function(e){var i;const o=e.target instanceof HTMLDialogElement,r=null===(i=t(this,Ye,"a",Ke))||void 0===i?void 0:i.getBoundingClientRect();if(o&&r){(e.clientY<r.top||e.clientY>r.bottom||e.clientX<r.left||e.clientX>r.right)&&(e.preventDefault(),e.stopPropagation(),t(this,Ye,"m",ei).call(this))}},oi=function(e){e.preventDefault(),t(this,Ye,"m",ei).call(this)},ri.styles=[K`
1063
- :host {
1064
- --margin: ${Pt("spacing-6")};
1065
- --padding: ${Pt("spacing-6")};
1066
- --gap: ${Pt("spacing-6")};
1067
- }
1068
-
1069
- slot::slotted(*) {
1070
- padding-inline: var(--padding);
1071
- padding-block: calc(var(--gap) / 2);
1072
- }
1073
-
1074
- dialog {
1075
- box-sizing: border-box;
1076
- padding: calc(var(--padding) - (var(--gap) / 2)) 0;
1077
- border: none;
1078
- border-radius: ${Pt("border-radius-m")};
1079
- background-color: white;
1080
- box-shadow: ${Pt("elevation-4")};
1081
- width: auto;
1082
- max-height: calc(100% - var(--margin));
1083
-
1084
- ${Ht([{property:"max-width"}])}
1085
- }
1086
-
1087
- dialog[open] {
1088
- display: flex;
1089
- flex-direction: column;
1090
- }
1091
-
1092
- dialog.-size-small {
1093
- max-width: min(${be("400px")}, calc(100vw - var(--margin)));
1094
- }
1095
-
1096
- dialog.-size-medium {
1097
- max-width: min(${be("600px")}, calc(100% - var(--margin)));
1098
- }
1099
-
1100
- dialog.-size-large {
1101
- max-width: min(${be("800px")}, calc(100% - var(--margin)));
1102
- }
1103
-
1104
- dialog.-size-extra-large {
1105
- max-width: min(${be("1000px")}, calc(100% - var(--margin)));
1106
- }
1107
-
1108
- dialog::backdrop {
1109
- background-color: ${_t("color-background-secondary-inverted",.4)};
1110
- }
1111
-
1112
- @media (prefers-reduced-motion: no-preference) {
1113
- dialog[open] {
1114
- animation: show-dialog 0.25s ease forwards;
1115
- }
1116
-
1117
- dialog.is-hiding {
1118
- animation: hide-dialog 0.25s ease forwards;
1119
- }
1120
-
1121
- dialog[open]::backdrop {
1122
- animation: show-backdrop 0.25s ease forwards;
1123
- }
1124
-
1125
- dialog.is-hiding::backdrop {
1126
- animation: hide-backdrop 0.25s ease forwards;
1127
- }
1128
- }
1129
-
1130
- @keyframes show-dialog {
1131
- from {
1132
- opacity: 0;
1133
- transform: translateY(250px);
1134
- }
1135
- }
1136
-
1137
- @keyframes hide-dialog {
1138
- to {
1139
- opacity: 0;
1140
- transform: scale(0.75);
1141
- }
1142
- }
1143
-
1144
- @keyframes show-backdrop {
1145
- from {
1146
- opacity: 0;
1147
- }
1148
- }
1149
-
1150
- @keyframes hide-backdrop {
1151
- to {
1152
- opacity: 0;
1153
- }
1154
- }
1155
- `],window.customElements.define("m-dialog",ri);const ni=["small","medium","large","extra-large"],si=["neutral","success","warning","danger"];var ai,li;class ci extends ne{constructor(){super(),ai.set(this,(t=>{switch(t.variant){case"danger":this.variant="danger";break;case"warning":this.variant="warning";break;default:this.variant="primary"}})),this.type="button",this.variant="primary",this.context=new Ne(this,Xe,t(this,ai,"f"),!0)}}ai=new WeakMap,window.customElements.define("m-dialog-action-primary",ci);class di extends ne{constructor(){super(),this.type="button",this.variant="secondary"}}window.customElements.define("m-dialog-action-secondary",di);class hi extends ne{constructor(){super(),this.type="button",this.variant="tertiary"}}window.customElements.define("m-dialog-action-tertiary",hi);class ui extends ut{constructor(){super(...arguments),li.set(this,((t,e)=>{e?this.style.setProperty(t,zt(e)):this.style.removeProperty(t)}))}static get properties(){return{padding:{type:String},paddingX:{type:String,attribute:"padding-x"},paddingY:{type:String,attribute:"padding-y"},paddingT:{type:String,attribute:"padding-t"},paddingB:{type:String,attribute:"padding-b"},paddingL:{type:String,attribute:"padding-l"},paddingR:{type:String,attribute:"padding-r"}}}getCSSPropertiesPrefix(){return"layout"}update(e){super.update(e);const i=this.getCSSPropertiesPrefix();e.has("padding")&&this.style.setProperty(`--m-${i}-padding`,zt(this.padding)),e.has("paddingX")&&t(this,li,"f").call(this,`--m-${i}-padding-x`,this.paddingX),e.has("paddingY")&&t(this,li,"f").call(this,`--m-${i}-padding-y`,this.paddingY),e.has("paddingT")&&t(this,li,"f").call(this,`--m-${i}-padding-t`,this.paddingT),e.has("paddingB")&&t(this,li,"f").call(this,`--m-${i}-padding-b`,this.paddingB),e.has("paddingL")&&t(this,li,"f").call(this,`--m-${i}-padding-l`,this.paddingL),e.has("paddingR")&&t(this,li,"f").call(this,`--m-${i}-padding-r`,this.paddingR)}render(){return k`<slot></slot>`}}function pi(t){return K`
1156
- :host {
1157
- /** reset layout custom properties to avoid inheritance */
1158
- --m-${Z(t)}-padding-x: initial;
1159
- --m-${Z(t)}-padding-y: initial;
1160
- --m-${Z(t)}-padding-t: initial;
1161
- --m-${Z(t)}-padding-r: initial;
1162
- --m-${Z(t)}-padding-b: initial;
1163
- --m-${Z(t)}-padding-l: initial;
1164
- --m-${Z(t)}-padding: initial;
1165
-
1166
- padding-block-start: var(
1167
- --m-${Z(t)}-padding-t,
1168
- var(
1169
- --m-${Z(t)}-padding-y,
1170
- var(--m-${Z(t)}-padding, 0)
1171
- )
1172
- );
1173
- padding-block-end: var(
1174
- --m-${Z(t)}-padding-b,
1175
- var(
1176
- --m-${Z(t)}-padding-y,
1177
- var(--m-${Z(t)}-padding, 0)
1178
- )
1179
- );
1180
- padding-inline-start: var(
1181
- --m-${Z(t)}-padding-l,
1182
- var(
1183
- --m-${Z(t)}-padding-x,
1184
- var(--m-${Z(t)}-padding, 0)
1185
- )
1186
- );
1187
- padding-inline-end: var(
1188
- --m-${Z(t)}-padding-r,
1189
- var(
1190
- --m-${Z(t)}-padding-x,
1191
- var(--m-${Z(t)}-padding, 0)
1192
- )
1193
- );
1194
- }
1195
- `}li=new WeakMap;const gi={gap:"spacing-4",align:"stretch",justify:"flex-start"};class bi extends ui{static get properties(){return{...super.properties,gap:{type:String},align:{type:String},justify:{type:String}}}constructor(){super(),this.gap=gi.gap,this.align=gi.align,this.justify=gi.justify}getCSSPropertiesPrefix(){return bi.CSSPropertiesPrefix}update(t){super.update(t),this.style.setProperty("--m-group-gap",zt(this.gap,gi.gap)),this.style.setProperty("--m-group-align",this.align||gi.align),this.style.setProperty("--m-group-justify",this.justify||gi.justify)}render(){return k`<slot></slot>`}}bi.CSSPropertiesPrefix="group",bi.styles=[pi(bi.CSSPropertiesPrefix),K`
1196
- :host {
1197
- --m-group-gap: ${Pt(gi.gap)};
1198
- --m-group-align: ${Z(gi.align)};
1199
- --m-group-justify: ${Z(gi.justify)};
1200
-
1201
- display: flex;
1202
- flex-wrap: wrap;
1203
- gap: var(--m-group-gap);
1204
- align-items: var(--m-group-align);
1205
- justify-content: var(--m-group-justify);
1206
- }
1207
- `],window.customElements.define("m-group",bi);class mi extends bi{constructor(){super(),this.align="center",this.gap="spacing-3",this.justify="flex-end"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","actions")}}window.customElements.define("m-dialog-actions",mi);class fi extends ut{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","body")}render(){return k`<slot></slot>`}}fi.styles=[K`
1208
- :host {
1209
- overflow-y: auto;
1210
- overscroll-behavior: contain;
1211
-
1212
- ${Jt("body-md")};
1213
- }
1214
- `],window.customElements.define("m-dialog-body",fi);class yi extends xe{constructor(){super(),this.size="large"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","close")}}window.customElements.define("m-dialog-close",yi);class vi extends ut{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","footer")}render(){return k`<slot></slot>`}}window.customElements.define("m-dialog-footer",vi);const $i=["center","flex-start","flex-end","stretch"],wi=["center","flex-start","flex-end","space-between","space-around","space-evenly"],xi={padding:"spacing-4",borderRadius:"border-radius-s",borderWidth:"border-none",borderColor:"color-background-highlight",textAlign:"left"};class ki extends ui{static get properties(){return{...super.properties,backgroundColor:{type:String,attribute:"background-color"},borderRadius:{type:String,attribute:"border-radius"},borderWidth:{type:String,attribute:"border-width"},borderColor:{type:String,attribute:"border-color"},textAlign:{type:String,attribute:"text-align"}}}constructor(){super(),this.padding=xi.padding,this.borderRadius=xi.borderRadius,this.borderWidth=xi.borderWidth,this.borderColor=xi.borderColor,this.textAlign=xi.textAlign}getCSSPropertiesPrefix(){return ki.CSSPropertiesPrefix}update(t){var e,i,o,r;super.update(t),t.has("backgroundColor")&&this.style.setProperty("--m-box-background-color",null!==(e=this.backgroundColor&&St(this.backgroundColor))&&void 0!==e?e:"transparent"),t.has("borderRadius")&&this.style.setProperty("--m-box-border-radius",null!==(i=this.borderRadius&&St(this.borderRadius))&&void 0!==i?i:St(xi.borderRadius)),t.has("borderWidth")&&this.style.setProperty("--m-box-border-width",null!==(o=this.borderWidth&&St(this.borderWidth))&&void 0!==o?o:St(xi.borderWidth)),t.has("borderColor")&&this.style.setProperty("--m-box-border-color",null!==(r=this.borderColor&&St(this.borderColor))&&void 0!==r?r:St(xi.borderColor)),t.has("textAlign")&&this.style.setProperty("--m-box-text-align",this.textAlign||xi.textAlign)}render(){return k`<slot></slot>`}}ki.CSSPropertiesPrefix="box",ki.styles=[pi(ki.CSSPropertiesPrefix),K`
1215
- :host {
1216
- --m-box-padding: ${Pt(xi.padding)};
1217
- --m-box-background-color: transparent;
1218
- --m-box-border-radius: ${Pt(xi.borderRadius)};
1219
- --m-box-border-width: ${Pt(xi.borderWidth)};
1220
- --m-box-border-color: ${_t(xi.borderColor)};
1221
- --m-box-text-align: ${Z(xi.textAlign)};
1222
-
1223
- box-sizing: border-box;
1224
-
1225
- background-color: var(--m-box-background-color);
1226
- border-radius: var(--m-box-border-radius);
1227
- border-style: solid;
1228
- border-width: var(--m-box-border-width);
1229
- border-color: var(--m-box-border-color);
1230
- text-align: var(--m-box-text-align);
1231
- display: block;
1232
- }
1233
- `],window.customElements.define("m-box",ki);const zi={gap:"spacing-4",align:"stretch",justify:"flex-start"};class Si extends ui{static get properties(){return{...super.properties,gap:{type:String},align:{type:String},justify:{type:String}}}constructor(){super(),this.gap=zi.gap,this.align=zi.align,this.justify=zi.justify}getCSSPropertiesPrefix(){return Si.CSSPropertiesPrefix}update(t){super.update(t),this.style.setProperty("--m-stack-gap",zt(this.gap,zi.gap)),this.style.setProperty("--m-stack-align",this.align||zi.align),this.style.setProperty("--m-stack-justify",this.justify||zi.justify)}render(){return k`<slot></slot>`}}Si.CSSPropertiesPrefix="stack",Si.styles=[pi(Si.CSSPropertiesPrefix),K`
1234
- :host {
1235
- --m-stack-gap: ${Pt(zi.gap)};
1236
- --m-stack-align: ${Z(zi.align)};
1237
- --m-stack-justify: ${Z(zi.justify)};
1238
-
1239
- display: flex;
1240
- flex-direction: column;
1241
-
1242
- row-gap: var(--m-stack-gap);
1243
- align-items: var(--m-stack-align);
1244
- justify-content: var(--m-stack-justify);
1245
- }
1246
- `],window.customElements.define("m-stack",Si);const Ci={gap:"spacing-4",minColumnWidth:Ct("spacing-30")};class Mi extends ui{static get properties(){return{...super.properties,gap:{type:String},rowGap:{type:String,attribute:"row-gap"},columnGap:{type:String,attribute:"column-gap"},minColumnWidth:{type:String,attribute:"min-column-width"}}}constructor(){super(),this.gap=Ci.gap,this.minColumnWidth=Ci.minColumnWidth}getCSSPropertiesPrefix(){return Mi.CSSPropertiesPrefix}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-grid-gap",zt(this.gap,Ci.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-grid-row-gap",zt(this.rowGap)):this.style.removeProperty("--m-grid-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-grid-column-gap",zt(this.columnGap)):this.style.removeProperty("--m-grid-column-gap")),t.has("minColumnWidth")&&this.style.setProperty("--m-grid-min-column-width",this.minColumnWidth||Ci.minColumnWidth)}render(){return k`<slot></slot>`}}Mi.CSSPropertiesPrefix="grid",Mi.styles=[pi(Mi.CSSPropertiesPrefix),K`
1247
- :host {
1248
- --m-grid-gap: ${Pt(Ci.gap)};
1249
- --m-grid-min-column-width: ${Z(Ci.minColumnWidth)};
1250
-
1251
- display: grid;
1252
-
1253
- row-gap: var(--m-grid-row-gap, var(--m-grid-gap));
1254
- column-gap: var(--m-grid-column-gap, var(--m-grid-gap));
1255
-
1256
- grid-template-columns: repeat(
1257
- auto-fit,
1258
- minmax(min(var(--m-grid-min-column-width), 100%), 1fr)
1259
- );
1260
- }
1261
- `],window.customElements.define("m-grid",Mi);const Wi={gap:"spacing-4",sideWidth:"auto",minContentWidth:"50%",reversed:!1};function Ai(t){return t?"row-reverse":"row"}class ji extends ui{static get properties(){return{...super.properties,gap:{type:String},sideWidth:{type:String,attribute:"side-width"},minContentWidth:{type:String,attribute:"min-content-width"},reversed:{type:Boolean}}}constructor(){super(),this.gap=Wi.gap,this.sideWidth=Wi.sideWidth,this.minContentWidth=Wi.minContentWidth,this.reversed=Wi.reversed}getCSSPropertiesPrefix(){return ji.CSSPropertiesPrefix}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-sidebar-gap",zt(this.gap,Wi.gap)),t.has("sideWidth")&&this.style.setProperty("--m-sidebar-side-width",this.sideWidth||Wi.sideWidth),t.has("minContentWidth")&&this.style.setProperty("--m-sidebar-min-content-width",this.minContentWidth||Wi.minContentWidth),t.has("reversed")&&this.style.setProperty("--m-sidebar-flex-direction",Ai(this.reversed))}render(){return k`
1262
- <slot name="sidebar"></slot>
1263
- <slot name="content"></slot>
1264
- `}}ji.CSSPropertiesPrefix="sidebar",ji.styles=[pi(ji.CSSPropertiesPrefix),K`
1265
- :host {
1266
- --m-sidebar-gap: ${Pt(Wi.gap)};
1267
- --m-sidebar-flex-direction: ${Z(Ai(Wi.reversed))};
1268
- --m-sidebar-side-width: ${Z(Wi.sideWidth)};
1269
- --m-sidebar-min-content-width: ${Z(Wi.minContentWidth)};
1270
-
1271
- display: flex;
1272
- flex-wrap: wrap;
1273
- flex-direction: var(--m-sidebar-flex-direction);
1274
-
1275
- gap: var(--m-sidebar-gap);
1276
- }
1277
-
1278
- slot[name='sidebar']::slotted(*) {
1279
- flex-basis: var(--m-sidebar-side-width);
1280
- flex-grow: 1;
1281
- }
1282
-
1283
- slot[name='content']::slotted(*) {
1284
- flex-basis: 0;
1285
- flex-grow: 999;
1286
- min-width: var(--m-sidebar-min-content-width);
1287
- }
1288
- `],window.customElements.define("m-sidebar",ji);const Bi={gap:"spacing-4",threshold:"10rem"};class Ei extends ui{static get properties(){return{...super.properties,gap:{type:String},rowGap:{type:String,attribute:"row-gap"},columnGap:{type:String,attribute:"column-gap"},threshold:{type:String},limit:{type:Number}}}constructor(){super(),this.gap=Bi.gap,this.threshold=Bi.threshold}getCSSPropertiesPrefix(){return Ei.CSSPropertiesPrefix}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-switcher-gap",zt(this.gap,Bi.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-switcher-row-gap",zt(this.rowGap)):this.style.removeProperty("--m-switcher-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-switcher-column-gap",zt(this.columnGap)):this.style.removeProperty("--m-switcher-column-gap")),t.has("threshold")&&this.style.setProperty("--m-switcher-threshold",this.threshold||Bi.threshold)}render(){const t=this.limit?k`
1289
- <style>
1290
- ::slotted(*:nth-last-child(n + ${this.limit+1})) {
1291
- flex-basis: 100%;
1292
- }
1293
- ::slotted(*:nth-last-child(n + ${this.limit+1}) ~ *) {
1294
- flex-basis: 100%;
1295
- }
1296
- </style>
1297
- `:"";return k`
1298
- ${t}
1299
- <slot></slot>
1300
- `}}var Ri,Ti,Pi;Ei.CSSPropertiesPrefix="switcher",Ei.styles=[pi(Ei.CSSPropertiesPrefix),K`
1301
- :host {
1302
- --m-switcher-gap: ${Pt(Bi.gap)};
1303
- --m-switcher-threshold: ${Z(Bi.threshold)};
1304
-
1305
- display: flex;
1306
- flex-wrap: wrap;
1307
-
1308
- row-gap: var(--m-switcher-row-gap, var(--m-switcher-gap));
1309
- column-gap: var(--m-switcher-column-gap, var(--m-switcher-gap));
1310
- }
1311
-
1312
- ::slotted(*) {
1313
- flex-basis: calc((var(--m-switcher-threshold) - 100%) * 999);
1314
- flex-grow: 1;
1315
- }
1316
- `],window.customElements.define("m-switcher",Ei);class _i extends ue{constructor(){super(),Ri.add(this),Ti.set(this,void 0),e(this,Ti,new Ne(this,Xe,void 0,!0),"f")}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","header")}render(){return k`
1317
- <m-group gap="spacing-6" align="center">
1318
- <m-group gap="spacing-1" align="center" style="flex-grow: 1;">
1319
- ${t(this,Ri,"a",Pi)}
1320
- <h1><slot></slot></h1>
1321
- </m-group>
1322
- <slot name="close"></slot>
1323
- </m-group>
1324
- `}}Ti=new WeakMap,Ri=new WeakSet,Pi=function(){const{value:e}=t(this,Ti,"f");let i,o;switch(null==e?void 0:e.variant){case"danger":i="attention",o="color-danger-60";break;case"warning":i="alert-circle",o="color-warning-60";break;case"success":i="check",o="color-success-60";break;default:return C}return k`
1325
- <m-icon name=${i} color=${o} size="24" aria-hidden="true"></m-icon>
1326
- `},_i.styles=[K`
1327
- h1 {
1328
- margin: 0;
1329
- padding: 0;
1330
-
1331
- ${Jt("heading-md-bold")};
1332
- }
1333
- `],window.customElements.define("m-dialog-header",_i);const Oi="field";var Di,Ui,qi,Li,Ni;class Fi extends ue{static get properties(){return{status:{type:String},slot:{type:String}}}constructor(){super(),Di.add(this),this.field=new Ne(this,Oi,void 0,!0),this.slot="hint"}render(){const e={"-status-default":"default"===t(this,Di,"m",Ui).call(this),"-status-danger":"danger"===t(this,Di,"m",Ui).call(this)};return k` <m-group
1334
- gap="spacing-0-5"
1335
- align="center"
1336
- class=${yt(e)}
1337
- >
1338
- <slot name="leading"
1339
- >${"danger"===t(this,Di,"m",Ui).call(this)?k`<m-icon
1340
- name="attention"
1341
- size="10"
1342
- color="color-danger-60"
1343
- ></m-icon>`:C}</slot
1344
- >
1345
- <span
1346
- class=${yt({hint:!0,...e})}
1347
- ><slot></slot>
1348
- </span>
1349
- </m-group>`}}Di=new WeakSet,Ui=function(){var t;return this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status)},Fi.styles=[[K`
1350
- :host {
1351
- --m-field-hint-color: ${_t("color-text-tertiary")};
1352
- }
1353
-
1354
- m-group {
1355
- ${Ft(Pt("spacing-2"))};
1356
- }
1357
-
1358
- .-status-danger {
1359
- --m-field-hint-color: ${_t("color-danger-60")};
1360
- }
1361
-
1362
- .hint {
1363
- ${Jt("body-sm")};
1364
- color: var(--m-field-hint-color);
1365
- }
1366
- `]],window.customElements.define("m-field-hint",Fi);class Ii extends ue{static get properties(){return{required:{type:Boolean},size:{type:String},slot:{type:String}}}constructor(){super(),qi.add(this),this.field=new Ne(this,Oi,void 0,!0),this.slot="hint"}render(){return k`<label
1367
- class=${yt({label:!0,"-size-default":"default"===t(this,qi,"m",Li).call(this),"-size-small":"small"===t(this,qi,"m",Li).call(this)})}
1368
- ><slot></slot>
1369
- ${t(this,qi,"m",Ni).call(this)?k`<span class="required">*</span>`:C}
1370
- </label>`}}qi=new WeakSet,Li=function(){var t;return this.size||(null===(t=this.field.value)||void 0===t?void 0:t.size)},Ni=function(){var t;return null!=this.required?this.required:Boolean(null===(t=this.field.value)||void 0===t?void 0:t.required)},Ii.styles=[[K`
1371
- :host {
1372
- display: flex;
1373
- align-items: center;
1374
- justify-content: flex-start;
1375
- gap: ${Pt("spacing-0-5")};
1376
- }
1377
-
1378
- .label {
1379
- ${Jt("body-md")};
1380
-
1381
- display: inline-flex;
1382
- align-items: center;
1383
- justify-content: flex-start;
1384
-
1385
- margin: 0;
1386
- padding: 0;
1387
-
1388
- color: ${_t("color-text-tertiary")};
1389
- }
1390
-
1391
- .required {
1392
- ${Jt("body-md")};
1393
-
1394
- color: ${_t("color-text-error")};
1395
-
1396
- content: '*';
1397
-
1398
- ${Ut(Pt("spacing-1"))};
1399
- }
1400
-
1401
- .label.-size-small,
1402
- .label.-size-small .required {
1403
- ${Jt("body-sm")};
1404
- }
1405
- `]],window.customElements.define("m-field-label",Ii),Je();class Gi extends ue{static get properties(){return{label:{type:String},hint:{type:String},required:{type:Boolean},status:{type:String},size:{type:String},align:{type:String}}}constructor(){super(),this.provider=new Ge(this,Oi,{required:!1,size:"default",status:"default"}),this.required=!1,this.status="default",this.size="default",this.align="stretch"}update(t){super.update(t),(t.has("required")||t.has("status")||t.has("size"))&&this.provider.setValue({required:this.required,status:this.status,size:this.size})}render(){return k`<m-stack gap="spacing-1" align="${this.align}">
1406
- ${this.label?k`<m-field-label>${this.label}</m-field-label>`:k`<slot name="label"></slot>`}
1407
-
1408
- <slot></slot>
1409
-
1410
- ${this.hint?k`<m-field-hint>${this.hint}</m-field-hint>`:k`<slot name="hint"></slot>`}
1411
- </m-stack>`}}window.customElements.define("m-field",Gi);const Vi=["default","danger"];var Hi,Ji,Xi;class Yi extends ut{static get properties(){return{variant:{type:String,reflect:!0},value:{type:Number,reflect:!0},max:{type:Number,reflect:!0}}}constructor(){super(),Hi.add(this),this.variant="default",this.value=0,this.max=100}connectedCallback(){super.connectedCallback(),this.setAttribute("role","progressbar"),this.setAttribute("aria-valuemin","0")}updated(){this.setAttribute("aria-valuenow",String(this.value)),this.setAttribute("aria-valuemax",String(this.max))}get percentage(){return 100*t(this,Hi,"a",Xi)/t(this,Hi,"a",Ji)}get currentVariant(){return this.variant}render(){return k`
1412
- <div class="bar">
1413
- <span
1414
- class=${yt({progress:!0,"-default":"default"===this.currentVariant,"-success":"success"===this.currentVariant,"-warning":"warning"===this.currentVariant,"-danger":"danger"===this.currentVariant})}
1415
- style=${Se({width:`${this.percentage}%`})}
1416
- ></span>
1417
- </div>
1418
- `}}Hi=new WeakSet,Ji=function(){return this.max<=0?100:this.max},Xi=function(){return e=this.value,i=0,o=t(this,Hi,"a",Ji),Math.min(Math.max(i,e),o);var e,i,o},Yi.styles=[K`
1419
- .bar {
1420
- display: flex;
1421
- flex-grow: 0;
1422
- flex-shrink: 1;
1423
- align-items: center;
1424
- justify-content: center;
1425
-
1426
- position: relative;
1427
- overflow: hidden;
1428
-
1429
- width: 100%;
1430
- height: ${be("8px")};
1431
-
1432
- border-radius: ${Pt("border-radius-s")};
1433
- background-color: ${_t("color-background-tertiary")};
1434
- }
1435
-
1436
- .progress {
1437
- position: absolute;
1438
- top: 0;
1439
- left: 0;
1440
-
1441
- ${Ht([{property:"width"},{property:"background"}])};
1442
-
1443
- height: ${be("8px")};
1444
-
1445
- border-radius: ${Pt("border-radius-s")};
1446
-
1447
- background: var(--m-progress-bar-progress-background);
1448
- }
1449
-
1450
- .-default {
1451
- --m-progress-bar-progress-background: linear-gradient(
1452
- 45deg,
1453
- ${_t("color-brand-accent-1")} 22%,
1454
- ${_t("color-brand-accent-2")} 88%
1455
- );
1456
- }
1457
-
1458
- .-success {
1459
- --m-progress-bar-progress-background: ${_t("color-success-60")};
1460
- }
1461
-
1462
- .-warning {
1463
- --m-progress-bar-progress-background: ${_t("color-warning-60")};
1464
- }
1465
-
1466
- .-danger {
1467
- --m-progress-bar-progress-background: ${_t("color-danger-60")};
1468
- }
1469
- `],window.customElements.define("m-progress-bar",Yi);class Zi extends Yi{get currentVariant(){return this.percentage>=66?"success":this.percentage>=33?"warning":"danger"}}window.customElements.define("m-progress-bar-countdown",Zi);const Ki="m-check";var Qi,to,eo,io,oo;class ro extends ut{static get properties(){return{value:{type:String},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0}}}constructor(){super(),Qi.add(this),eo.set(this,(t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();const e={detail:{value:this.value,type:"select"},bubbles:!0,composed:!1};this.dispatchEvent(new CustomEvent(Ki,e))})),io.set(this,(()=>{this.setAttribute("aria-disabled",String(this.disabled))})),oo.set(this,(()=>{this.setAttribute("aria-checked",String(this.checked))})),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio"),this.addEventListener("click",t(this,eo,"f"))}updated(e){super.updated(e),e.has("disabled")&&t(this,io,"f").call(this),e.has("checked")&&t(this,oo,"f").call(this)}render(){return k`
1470
- <button
1471
- type="button"
1472
- class="radio-button"
1473
- role="radio"
1474
- ?disabled=${this.disabled}
1475
- aria-checked=${this.checked}
1476
- >
1477
- <span class="radio-input"></span>
1478
- <slot name="leading"></slot>
1479
- <slot></slot>
1480
- </button>
1481
- `}focus(e){var i;null===(i=t(this,Qi,"a",to))||void 0===i||i.focus(e)}}eo=new WeakMap,io=new WeakMap,oo=new WeakMap,Qi=new WeakSet,to=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("button"))&&void 0!==e?e:null},ro.styles=[K`
1482
- :host {
1483
- --m-radio-border-color: ${_t("color-border")};
1484
- --m-radio-dot-check-color: ${_t("color-primary-60")};
1485
- --m-radio-size: 14px;
1486
- --m-radio-background-color: white;
1487
- --m-radio-border-width: ${Pt("border-thin")};
1488
- --m-radio-label-color: ${_t("color-text-tertiary")};
1489
- --m-radio-outline-color: ${_t("color-primary-60")};
1490
- --m-radio-outline-offset: 2px;
1491
- }
1492
-
1493
- .radio-button {
1494
- ${Jt("body-md")};
1495
- color: var(--m-radio-label-color);
1496
-
1497
- border: none;
1498
- background: none;
1499
-
1500
- height: ${Pt("global-height-small")};
1501
- display: inline-flex;
1502
- gap: ${Pt("spacing-1")};
1503
- align-items: center;
1504
- border-radius: ${Pt("border-radius-s")};
1505
- ${Ht({property:"color"})};
1506
- }
1507
-
1508
- ${Yt.focus(".radio-button")} {
1509
- outline: 1px solid var(--m-radio-outline-color);
1510
- outline-offset: var(--m-radio-outline-offset);
1511
- }
1512
-
1513
- .radio-button .radio-input {
1514
- width: var(--m-radio-size);
1515
- height: var(--m-radio-size);
1516
- background-color: var(--m-radio-background-color);
1517
- border-color: var(--m-radio-border-color);
1518
- border-width: var(--m-radio-border-width);
1519
- border-style: solid;
1520
- border-radius: 50%;
1521
- position: relative;
1522
- display: inline-flex;
1523
-
1524
- ${Ht({property:"border-color"})};
1525
- }
1526
-
1527
- .radio-button .radio-input::before {
1528
- content: '';
1529
- width: 0;
1530
- height: 0;
1531
- border-radius: 50%;
1532
- transform: translate(-50%, -50%);
1533
- top: 50%;
1534
- left: 50%;
1535
- display: block;
1536
- position: absolute;
1537
- ${Ht([{property:"background-color"},{property:"height",duration:"120ms"},{property:"width",duration:"120ms"}])};
1538
- }
1539
-
1540
- .radio-button[aria-checked='true'] .radio-input::before {
1541
- width: 10px;
1542
- height: 10px;
1543
- }
1544
-
1545
- ${Xt(".radio-button")} {
1546
- cursor: default;
1547
- --m-radio-label-color: ${_t("color-neutral-40")};
1548
- --m-radio-background-color: ${_t("color-background-tertiary")};
1549
- }
1550
-
1551
- ${Xt('.radio-button[aria-checked="true"]',".radio-input")} {
1552
- --m-radio-border-color: ${_t("color-border")};
1553
- }
1554
-
1555
- ${Xt(".radio-button",".radio-input::before")} {
1556
- --m-radio-dot-check-color: ${_t("color-neutral-40")};
1557
- }
1558
-
1559
- .radio-button .radio-input::before {
1560
- background-color: var(--m-radio-dot-check-color);
1561
- }
1562
-
1563
- .radio-button[aria-checked='true'] .radio-input {
1564
- --m-radio-dot-check-color: ${_t("color-primary-60")};
1565
- --m-radio-border-color: ${_t("color-primary-60")};
1566
- }
1567
-
1568
- .radio-button .radio-input {
1569
- --m-radio-border-color: ${_t("color-border")};
1570
- }
1571
-
1572
- ${Yt.hover(".radio-button")} .radio-input {
1573
- --m-radio-border-color: ${_t("color-primary-100")};
1574
- --m-radio-dot-check-color: ${_t("color-primary-100")};
1575
- }
1576
-
1577
- ${Yt.hover(".radio-button")} {
1578
- --m-radio-label-color: ${_t("color-text-primary")};
1579
- }
1580
-
1581
- ${Xt(".radio-button","*")} {
1582
- pointer-event: none;
1583
- }
1584
- `],window.customElements.define("m-radio",ro);var no,so={};Object.defineProperty(so,"i",{value:!0});var ao=Ot;const lo=(t,e)=>{const i=ao(t);if(0===i.length)return e;const o=new Set;return o.add(String(i.at(-1))),o},co=(t,e)=>{const i=ao(t);if(0===i.length)return e;const o=new Set(e);for(const t of i)o.add(String(t));return o},ho={type:"single",init:t=>lo(t,new Set),select:lo,unselect(t,e){const i=ao(t);if(0===i.length||0===e.size)return e;const o=new Set(e);for(const t of i)o.delete(String(t));return o},toggle(t,e){const i=ao(t);if(0===i.length)return e;const o=new Set;for(const t of i){const i=String(t);e.has(i)||(o.clear(),o.add(i))}return o},reset:t=>null==t?new Set:t,value(t){if(null==t||0===t.size)return null;const[e]=Array.from(t);return e}},uo={type:"single-strict",init:t=>lo(t,new Set),select:lo,unselect(t,e){const i=ao(t);if(0===i.length||0===e.size)return e;const o=new Set(e);for(let t=0;t<i.length&&e.size>1;t++)o.delete(String(i[t]));return o},toggle(t,e){const i=ao(t);if(0===i.length)return e;const o=new Set(e);for(const t of i){const i=String(t);e.has(i)||(o.clear(),o.add(i))}return o},reset:t=>null==t?new Set:t,value(t){if(null==t||0===t.size)return null;const[e]=Array.from(t);return e}},po={type:"multiple",init:t=>co(t,new Set),select:co,unselect(t,e){const i=ao(t);if(0===i.length||0===e.size)return e;const o=new Set(e);for(const t of i)o.delete(String(t));return o},toggle(t,e){const i=ao(t);if(0===i.length)return e;const o=new Set(e);for(const t of i){const i=String(t);e.has(i)?o.delete(i):o.add(i)}return o},reset:t=>null==t?new Set:t,value:t=>null==t||0===t.size?null:Array.from(t)};var go,bo,mo,fo,yo,vo,$o,wo,xo;so.SELECTION_TYPES=["single","single-strict","multiple"],no=so.default=function(t){const{type:e="multiple"}=t;return"single"===e?ho:"single-strict"===e?uo:po};class ko{constructor(e,i,o){go.add(this),this.disabled=!1,this.event="m-select",bo.set(this,(t=>{if(this.disabled)return;if(null==this.type)return;const{detail:{type:e,value:i}}=t;switch(e){case"select":this.select(Dt(i));break;case"unselect":this.unselect(Dt(i));break;case"toggle":this.toggle(Dt(i))}})),this.init=t=>{this.host.selection=this.strategy.init(t)},this.select=e=>{this.host.selection=this.strategy.select(e,this.host.selection),t(this,go,"m",mo).call(this)},this.unselect=e=>{this.host.selection=this.strategy.unselect(e,this.host.selection),t(this,go,"m",mo).call(this)},this.toggle=e=>{this.host.selection=this.strategy.toggle(e,this.host.selection),t(this,go,"m",mo).call(this)},this.subscribe=()=>{this.host.addEventListener(this.event,t(this,bo,"f"))},this.unsubscribe=()=>{this.host.removeEventListener(this.event,t(this,bo,"f"))},this.host=e,this.type=i,this.event=o,this.strategy=no({type:i}),this.host.addController(this)}hostConnected(){this.subscribe()}hostDisconnected(){this.unsubscribe()}hostUpdate(){null!=this.host.type&&this.host.type!==this.type&&(this.unsubscribe(),this.host.removeController(this))}}bo=new WeakMap,go=new WeakSet,mo=function(){const t={detail:{type:this.type,value:this.strategy.value(this.host.selection)},bubbles:!0,composed:!1};this.host.dispatchEvent(new CustomEvent("m-change",t))};class zo extends ut{static get properties(){return{value:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},selection:{state:!0},orientation:{type:String}}}constructor(){super(),fo.set(this,null),yo.set(this,null),vo.set(this,(()=>{var e;return null===(e=t(this,$o,"f").call(this)[0])||void 0===e?void 0:e.value})),$o.set(this,(()=>{var i,o,r;e(this,yo,null!==(i=t(this,yo,"f"))&&void 0!==i?i:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(r=null===(o=t(this,yo,"f"))||void 0===o?void 0:o.assignedElements({flatten:!0}))&&void 0!==r?r:[]].filter((t=>"m-radio"===t.tagName.toLowerCase()))})),wo.set(this,(t=>{t.checked=this.selection.has(t.value)})),xo.set(this,(t=>{t.disabled=this.disabled})),this.disabled=!1,this.selection=new Set,this.value="",this.orientation="vertical",this.type="single-strict"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio-group"),e(this,fo,new ko(this,this.type,Ki),"f")}update(e){super.update(e),e.has("value")&&t(this,fo,"f")&&t(this,fo,"f").init(Dt(this.value||t(this,vo,"f").call(this))),e.has("selection")&&([this.value]=this.selection)}updated(e){super.updated(e),e.has("selection")&&t(this,$o,"f").call(this).forEach((e=>{t(this,wo,"f").call(this,e)})),e.has("disabled")&&t(this,$o,"f").call(this).forEach((e=>{t(this,xo,"f").call(this,e)}))}render(){return k`
1585
- <div
1586
- class=${yt({"radio-group":!0,"-vertical":"vertical"===this.orientation,"-horizontal":"horizontal"===this.orientation})}
1587
- >
1588
- <slot></slot>
1589
- </div>
1590
- `}}fo=new WeakMap,yo=new WeakMap,vo=new WeakMap,$o=new WeakMap,wo=new WeakMap,xo=new WeakMap,zo.styles=[K`
1591
- .radio-group {
1592
- display: flex;
1593
- gap: ${Pt("spacing-2")};
1594
- }
1595
- .radio-group.-vertical {
1596
- flex-direction: column;
1597
- }
1598
- .radio-group.-horizontal {
1599
- flex-direction: row;
1600
- }
1601
- `],window.customElements.define("m-radio-group",zo);const So="tabs",Co="m-select-tab";var Mo,Wo,Ao,jo,Bo,Eo,Ro,To,Po,_o,Oo,Do,Uo,qo,Lo,No,Fo,Io,Go,Vo;class Ho extends ue{static get properties(){return{activeTab:{type:String,attribute:"active-tab",reflect:!0},disabled:{type:Boolean,reflect:!0},lazy:{type:Boolean},selection:{state:!0},tabContentDirection:{type:String,attribute:"tab-content-direction"}}}constructor(){super(),Mo.set(this,null),Wo.set(this,null),this.provider=new Ge(this,So,{tabContentDirection:"horizontal",disabled:!1,lazy:!1,selection:new Set("")}),Ao.set(this,(t=>{t.stopPropagation();const[e]=Array.from(this.selection),i={detail:{value:String(e)}};this.emit("m-tab-change",i)})),jo.set(this,(()=>{var e;return null===(e=t(this,Bo,"f").call(this)[0])||void 0===e?void 0:e.name})),Bo.set(this,(()=>{var i,o,r;e(this,Wo,null!==(i=t(this,Wo,"f"))&&void 0!==i?i:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(r=null===(o=t(this,Wo,"f"))||void 0===o?void 0:o.assignedElements({flatten:!0}))&&void 0!==r?r:[]].filter((t=>"m-tab"===t.tagName.toLowerCase()))})),this.activeTab="",this.tabContentDirection="horizontal",this.disabled=!1,this.lazy=!1,this.type="single-strict",this.selection=new Set}connectedCallback(){super.connectedCallback(),e(this,Mo,new ko(this,this.type,Co),"f"),this.addEventListener("m-change",t(this,Ao,"f"))}update(e){super.update(e),e.has("activeTab")&&t(this,Mo,"f")&&t(this,Mo,"f").init(Dt(this.activeTab||t(this,jo,"f").call(this)));const[i]=Array.from(this.selection);!e.has("selection")||this.activeTab&&i===this.activeTab||(this.activeTab=i),(e.has("tabContentDirection")||e.has("disabled")||e.has("lazy")||e.has("selection"))&&this.provider.setValue({tabContentDirection:this.tabContentDirection,disabled:this.disabled,lazy:this.lazy,selection:this.selection})}render(){return k`
1602
- <div class="tablist" role="tablist"><slot name="tab"></slot></div>
1603
- <slot></slot>
1604
- `}}Mo=new WeakMap,Wo=new WeakMap,Ao=new WeakMap,jo=new WeakMap,Bo=new WeakMap,Ho.styles=[K`
1605
- :host {
1606
- --m-tabs-border-width: ${Pt("border-thin")};
1607
- --m-tabs-border-color: ${_t("color-divider")};
1608
- }
1609
-
1610
- .tablist {
1611
- display: flex;
1612
- flex-direction: row;
1613
- gap: 1px;
1614
- border-bottom-style: solid;
1615
- border-bottom-width: var(--m-tabs-border-width);
1616
- border-bottom-color: var(--m-tabs-border-color);
1617
- }
1618
- `],window.customElements.define("m-tabs",Ho);class Jo extends ue{static get properties(){return{name:{type:String},disabled:{type:Boolean,reflect:!0},slot:{type:String,reflect:!0}}}constructor(){super(),Eo.add(this),this.tabs=new Ne(this,So,void 0,!0),To.set(this,(t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();const e={detail:{value:this.name,type:"select"},bubbles:!0,composed:!1};this.emit(Co,e)})),Po.set(this,(()=>{var t;return null===(t=this.tabs.value)||void 0===t?void 0:t.tabContentDirection})),_o.set(this,(()=>{var t;return Boolean(null===(t=this.tabs.value)||void 0===t?void 0:t.selection.has(this.name))})),Oo.set(this,(()=>{var t;return this.disabled||Boolean(null===(t=this.tabs.value)||void 0===t?void 0:t.disabled)})),this.disabled=!1}connectedCallback(){super.connectedCallback(),this.id=`${this.name}-tab`,this.setAttribute("slot","tab"),this.setAttribute("role","tab"),this.setAttribute("aria-controls",`${this.name}-panel`),this.setAttribute("aria-selected","false"),this.addEventListener("click",t(this,To,"f"))}updated(e){super.updated(e),t(this,_o,"f").call(this)?this.setAttribute("aria-selected","true"):this.setAttribute("aria-selected","false"),e.has("name")&&(this.id=`${this.name}-tab`,this.setAttribute("aria-controls",`${this.name}-panel`)),e.has("disabled")&&this.setAttribute("aria-disabled",String(this.disabled))}render(){return k`
1619
- <button
1620
- type="button"
1621
- class=${yt({tab:!0,"-vertical":"vertical"===t(this,Po,"f").call(this),"-horizontal":"horizontal"===t(this,Po,"f").call(this)})}
1622
- ?disabled=${t(this,Oo,"f").call(this)}
1623
- aria-selected=${t(this,_o,"f").call(this)}
1624
- >
1625
- <slot name="leading"></slot>
1626
- <slot></slot>
1627
- </button>
1628
- `}focus(e){var i;null===(i=t(this,Eo,"a",Ro))||void 0===i||i.focus(e)}}To=new WeakMap,Po=new WeakMap,_o=new WeakMap,Oo=new WeakMap,Eo=new WeakSet,Ro=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("button"))&&void 0!==e?e:null},Jo.styles=[K`
1629
- :host {
1630
- --m-tab-border-width: ${Pt("border-thin")};
1631
- --m-tab-border-color: ${_t("color-divider")};
1632
- --m-tab-border-radius: ${Pt("border-radius-s")};
1633
- --m-tab-background-color: none;
1634
- --m-tab-label-color: ${_t("color-text-tertiary")};
1635
- --m-tab-leading-color: ${_t("color-text-tertiary")};
1636
-
1637
- --m-tab-outline-color: ${_t("color-primary-60")};
1638
-
1639
- --m-tab-padding-x: ${Pt("spacing-6")};
1640
- --m-tab-height: ${Pt("spacing-12")};
1641
- }
1642
-
1643
- .tab {
1644
- cursor: pointer;
1645
- position: relative;
1646
- padding-bottom: 1px;
1647
- bottom: -1px;
1648
- display: inline-flex;
1649
- align-items: center;
1650
- justify-content: center;
1651
- gap: ${Pt("spacing-3")};
1652
- height: var(--m-tab-height);
1653
- padding-inline: var(--m-tab-padding-x);
1654
-
1655
- ${Jt("body-md")};
1656
- color: var(--m-tab-label-color);
1657
-
1658
- background-color: var(--m-tab-background-color);
1659
- border: none;
1660
- border-bottom-style: solid;
1661
- border-bottom-width: var(--m-tab-border-width);
1662
- border-bottom-color: var(--m-tab-border-color);
1663
- border-top-left-radius: var(--m-tab-border-radius);
1664
- border-top-right-radius: var(--m-tab-border-radius);
1665
-
1666
- @media (prefers-reduced-motion: no-preference) {
1667
- ${Ht([{property:"background-color"},{property:"border-color"},{property:"color"}])};
1668
- }
1669
- }
1670
- .tab.-vertical {
1671
- flex-direction: column;
1672
- --m-tab-height: ${Pt("spacing-20")};
1673
- }
1674
- .tab.-horizontal {
1675
- flex-direction: row;
1676
- }
1677
-
1678
- slot[name='leading']::slotted(*) {
1679
- display: contents;
1680
- color: var(--m-tab-leading-color);
1681
- }
1682
-
1683
- ${Yt.hover(".tab")} {
1684
- --m-tab-background-color: ${_t("color-background-tertiary")};
1685
- }
1686
-
1687
- ${Yt.focus(".tab")} {
1688
- outline: 1px solid var(--m-tab-outline-color);
1689
- }
1690
-
1691
- .tab[aria-selected='true'] {
1692
- --m-tab-border-width: ${Pt("border-medium")};
1693
- --m-tab-border-color: ${_t("color-primary-60")};
1694
- --m-tab-label-color: ${_t("color-text-secondary")};
1695
- --m-tab-leading-color: ${_t("color-primary-60")};
1696
- padding-bottom: 0;
1697
- }
1698
-
1699
- ${Xt(".tab")} {
1700
- cursor: default;
1701
- --m-tab-label-color: ${_t("color-text-disabled")};
1702
- --m-tab-leading-color: ${_t("color-text-disabled")};
1703
- --m-tab-border-color: ${_t("color-divider")};
1704
- }
1705
-
1706
- ${Xt(".tab","*")} {
1707
- pointer-events: none;
1708
- }
1709
- `],window.customElements.define("m-tab",Jo);class Xo extends(Uo=ki){static get properties(){return{...super.properties,forTab:{type:String,attribute:"for-tab"},lazy:{type:Boolean}}}constructor(){super(),this.tabs=new Ne(this,So,void 0,!0),qo.set(this,(()=>{var t;return Boolean(null===(t=this.tabs.value)||void 0===t?void 0:t.selection.has(this.forTab))})),Lo.set(this,(()=>{var t;return this.lazy||Boolean(null===(t=this.tabs.value)||void 0===t?void 0:t.lazy)})),this.lazy=!1,this.padding="none",this.paddingY="spacing-8"}connectedCallback(){super.connectedCallback(),this.id=`${this.forTab}-panel`,this.setAttribute("role","tabpanel"),this.setAttribute("aria-labelledby",`${this.forTab}-tab`)}updated(e){super.updated(e),t(this,qo,"f").call(this)?(this.style.setProperty("--m-tab-panel-display","block"),this.removeAttribute("aria-hidden")):(this.style.setProperty("--m-tab-panel-display","none"),this.setAttribute("aria-hidden","true")),e.has("forTab")&&(this.id=`${this.forTab}-panel`,this.setAttribute("aria-labelledby",`${this.forTab}-tab`))}render(){return t(this,Lo,"f").call(this)&&!t(this,qo,"f").call(this)?k``:k`<slot></slot>`}}Do=Xo,qo=new WeakMap,Lo=new WeakMap,Xo.styles=[...Reflect.get(Uo,"styles",Do),K`
1710
- :host {
1711
- --m-tab-panel-display: none;
1712
-
1713
- display: var(--m-tab-panel-display);
1714
- }
1715
- `],window.customElements.define("m-tab-panel",Xo);class Yo extends ut{static get properties(){return{variant:{type:String},size:{type:String},isSkeleton:{type:Boolean,attribute:"is-skeleton"}}}constructor(){super(),this.variant="neutral",this.size="default",this.isSkeleton=!1}render(){return k`
1716
- <span
1717
- class=${yt({tag:!0,"-success":"success"===this.variant,"-neutral":"neutral"===this.variant,"-warning":"warning"===this.variant,"-danger":"danger"===this.variant,"-is-skeleton":this.isSkeleton,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size})}
1718
- >
1719
- ${this.isSkeleton?k``:k`<slot name="leading"></slot>`}
1720
- <slot></slot>
1721
- </span>
1722
- `}}Yo.styles=[[K`
1723
- @keyframes skeleton-loading {
1724
- 0% {
1725
- background-color: ${_t("color-background-tertiary")};
1726
- opacity: 0.3;
1727
- }
1728
- 50% {
1729
- background-color: ${_t("color-background-tertiary")};
1730
- opacity: 0.6;
1731
- }
1732
- 100% {
1733
- background-color: ${_t("color-background-tertiary")};
1734
- }
1735
- }
1736
- `,K`
1737
- :host {
1738
- --m-tag-skeleton-width: 100px;
1739
-
1740
- display: contents;
1741
- }
1742
- .tag {
1743
- display: inline-block;
1744
- white-space: nowrap;
1745
- overflow: hidden;
1746
- text-overflow: ellipsis;
1747
- box-sizing: border-box;
1748
- max-width: 200px;
1749
- border-radius: 100px;
1750
- line-height: ${Pt("line-height-1")};
1751
- cursor: default;
1752
- }
1753
-
1754
- .tag slot[name='leading']::slotted(*) {
1755
- margin-inline-end: ${Pt("spacing-1")};
1756
- vertical-align: middle;
1757
- }
1758
-
1759
- .-size-small {
1760
- ${Jt("chips-sm")};
1761
- padding: ${Pt("spacing-1")} ${Pt("spacing-2")};
1762
- block-size: ${be("18px")};
1763
- }
1764
- .-size-default {
1765
- ${Jt("chips-md")};
1766
- padding: ${Pt("spacing-2")} ${Pt("spacing-3")};
1767
- block-size: ${Pt("global-height-small")};
1768
- }
1769
- .-size-large {
1770
- ${Jt("button-lg")};
1771
- padding: ${Pt("spacing-3")} ${Pt("spacing-4")};
1772
- block-size: ${Pt("global-height-default")};
1773
- }
1774
-
1775
- .-success {
1776
- color: ${_t("color-success-60")};
1777
- background: ${_t("color-success-20")};
1778
- }
1779
- .-neutral {
1780
- color: ${_t("color-text-tertiary")};
1781
- background: ${_t("color-background-tertiary")};
1782
- }
1783
- .-warning {
1784
- color: ${_t("color-warning-100")};
1785
- background: ${_t("color-warning-20")};
1786
- }
1787
- .-danger {
1788
- color: ${_t("color-danger-60")};
1789
- background: ${_t("color-danger-20")};
1790
- }
1791
-
1792
- .-is-skeleton {
1793
- ${Z("animation: skeleton-loading 1s linear infinite alternate;")};
1794
- width: var(--m-tag-skeleton-width);
1795
- }
1796
- `]],window.customElements.define("m-tag",Yo);class Zo extends ue{static get properties(){return{clearable:{type:Boolean},disabled:{type:Boolean,reflect:!0},max:{type:String},maxLength:{type:Number,reflect:!0,attribute:"max-length"},min:{type:String},minLength:{type:Number,reflect:!0,attribute:"min-length"},pattern:{type:String},placeholder:{type:String},readOnly:{type:Boolean,reflect:!0,attribute:"read-only"},size:{type:String},status:{type:String},step:{type:String},type:{type:String},value:{type:String}}}constructor(){super(),No.add(this),this.inputElement=null,this.field=new Ne(this,Oi,void 0,!0),Go.set(this,(t=>{this.value=t.target.value,this.reemit(t)})),Vo.set(this,(t=>{t.stopPropagation(),this.clear()})),this.clearable=!1,this.disabled=!1,this.placeholder=void 0,this.size="default",this.type="text",this.value=void 0,this.max=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","textbox")}render(){return k`
1797
- <div
1798
- class=${yt({container:!0,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size,"is-disabled":Boolean(this.disabled),"-status-default":"default"===t(this,No,"m",Io).call(this),"-status-danger":"danger"===t(this,No,"m",Io).call(this)})}
1799
- >
1800
- <slot name="leading"></slot>
1801
- <input
1802
- id="${gt(this.id)}"
1803
- type="${gt(this.type)}"
1804
- class="text-field"
1805
- aria-disabled=${this.disabled?"true":"false"}
1806
- ?disabled="${this.disabled}"
1807
- ?readonly=${this.readOnly}
1808
- max=${this.max||C}
1809
- maxlength=${null!=this.maxLength&&this.maxLength>-1?this.maxLength:C}
1810
- min=${this.min||C}
1811
- minlength=${null!=this.minLength&&this.minLength>-1?this.minLength:C}
1812
- pattern=${gt(this.pattern)}
1813
- placeholder="${gt(this.placeholder)}"
1814
- step=${this.step||C}
1815
- value="${gt(this.value)}"
1816
- @change=${this.reemit}
1817
- @input=${t(this,Go,"f")}
1818
- />
1819
- ${this.clearable?k`<m-close-button
1820
- class=${yt({clear:!0,"is-visible":t(this,No,"m",Fo).call(this)})}
1821
- controls="${gt(this.id)}"
1822
- @m-close=${t(this,Vo,"f")}
1823
- label="Clear input"
1824
- ></m-close-button>`:C}
1825
- <slot name="trailing"></slot>
1826
- </div>
1827
- `}get input(){var t,e;return null==this.inputElement&&(this.inputElement=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("input"))&&void 0!==e?e:null),this.inputElement}clear(){this.value="",this.input&&(this.input.value=""),this.emit("m-clear"),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Go=new WeakMap,Vo=new WeakMap,No=new WeakSet,Fo=function(){const t=this.value||"";return!this.disabled&&t.length>0},Io=function(){var t;return this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status)},Zo.styles=[K`
1828
- :host {
1829
- --m-text-field-background-color: transparent;
1830
- --m-text-field-border-color: ${_t("color-border")};
1831
- --m-text-field-height: ${Pt("global-height-default")};
1832
- --m-text-field-outline-color: ${_t("color-primary-100")};
1833
- --m-text-field-outline-offset: 2px;
1834
- --m-text-field-padding-y: ${Pt("spacing-2")};
1835
- --m-text-field-placeholder-color: ${_t("color-text-placeholder")};
1836
- --m-text-field-color: ${_t("color-text-primary")};
1837
- }
1838
-
1839
- .container {
1840
- ${Jt("body-md")};
1841
- ${Ht([{property:"background-color"},{property:"border-color"}])};
1842
-
1843
- display: inline-flex;
1844
- align-items: center;
1845
- justify-content: start;
1846
- gap: ${Pt("spacing-2")};
1847
-
1848
- position: relative;
1849
- box-sizing: border-box;
1850
- width: 100%;
1851
- block-size: var(--m-text-field-height);
1852
-
1853
- ${Ft(Pt("spacing-2"))};
1854
-
1855
- background-color: var(--m-text-field-background-color);
1856
- border-radius: ${Pt("border-radius-s")};
1857
- border: 1px solid var(--m-text-field-border-color);
1858
- }
1859
-
1860
- .container.-size-small {
1861
- --m-text-field-height: ${Pt("global-height-small")};
1862
- --m-text-field-padding-y: 0;
1863
- }
1864
-
1865
- .container.-size-small,
1866
- .container.-size-small .text-field {
1867
- ${Jt("body-sm")};
1868
- }
1869
-
1870
- .container.-size-large {
1871
- --m-text-field-height: ${Pt("global-height-large")};
1872
- --m-text-field-padding-y: ${Pt("spacing-3")};
1873
- }
1874
-
1875
- .container.-status-danger {
1876
- --m-text-field-border-color: ${_t("color-danger-60")};
1877
- }
1878
-
1879
- ${Xt(".container")} {
1880
- --m-text-field-background-color: ${_t("color-background-tertiary")};
1881
-
1882
- cursor: default;
1883
- }
1884
-
1885
- ${Xt(".container","*")} {
1886
- pointer-events: none;
1887
- }
1888
-
1889
- slot[name='leading']::slotted(*),
1890
- slot[name='trailing']::slotted(*) {
1891
- display: inline-flex;
1892
- flex: 0 0 auto;
1893
- align-items: center;
1894
- cursor: default;
1895
- }
1896
-
1897
- ${Yt.hover(".container")} {
1898
- --m-text-field-border-color: ${_t("color-primary-60")};
1899
- }
1900
-
1901
- ${Yt.focus(".container")} {
1902
- --m-text-field-border-color: ${_t("color-primary-60")};
1903
-
1904
- outline: 1px solid var(--m-text-field-outline-color);
1905
- outline-offset: var(--m-text-field-outline-offset);
1906
- }
1907
-
1908
- .text-field {
1909
- ${Jt("body-md")};
1910
-
1911
- border: none;
1912
- outline: none;
1913
- flex: 1;
1914
- min-width: 0;
1915
-
1916
- ${Ft(0)};
1917
- padding-block: var(--m-text-field-padding-y);
1918
-
1919
- background-color: var(--m-text-field-background-color);
1920
- color: var(--m-text-field-color);
1921
- }
1922
-
1923
- .text-field::placeholder {
1924
- color: var(--m-text-field-placeholder-color);
1925
- }
1926
-
1927
- ${Yt.active(".text-field")},
1928
- ${Yt.focus(".text-field")} {
1929
- -webkit-appearance: none;
1930
- background: none;
1931
- border: none;
1932
- outline: none;
1933
- }
1934
-
1935
- .clear {
1936
- visibility: hidden;
1937
- }
1938
-
1939
- .clear.is-visible {
1940
- visibility: visible;
1941
- }
1942
- `],window.customElements.define("m-text-field",Zo);const Ko="m-toggle";var Qo,tr,er,ir,or,rr,nr,sr,ar,lr,cr;class dr extends ut{static get properties(){return{disabled:{type:Boolean},role:{type:String,reflect:!0},showCheck:{type:Boolean,attribute:"show-check"},size:{type:String,reflect:!0},type:{type:String},value:{},selection:{state:!0}}}constructor(){super(),Qo.set(this,null),tr.set(this,null),er.set(this,(()=>{var i,o,r;e(this,tr,null!==(i=t(this,tr,"f"))&&void 0!==i?i:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(r=null===(o=t(this,tr,"f"))||void 0===o?void 0:o.assignedElements({flatten:!0}))&&void 0!==r?r:[]].filter((t=>"m-toggle"===t.tagName.toLowerCase()))})),ir.set(this,(t=>{t.setAttribute("role",["single","single-strict"].includes(this.type)?"radio":"checkbox")})),or.set(this,(t=>{t.checked=this.selection.has(t.value)})),rr.set(this,(t=>{t.disabled=this.disabled})),this.showCheck=!1,this.size="default",this.type="single",this.selection=new Set}update(i){super.update(i),(null!=i.get("type")&&null!=this.type||null==t(this,Qo,"f"))&&(e(this,Qo,new ko(this,this.type,Ko),"f"),t(this,Qo,"f").init(Dt(this.value)),this.role=["single","single-strict"].includes(this.type)?"radiogroup":"group"),i.has("value")&&t(this,Qo,"f").init(Dt(this.value))}updated(e){super.updated(e),e.has("selection")&&t(this,er,"f").call(this).forEach((e=>{t(this,or,"f").call(this,e)})),e.has("disabled")&&t(this,er,"f").call(this).forEach((e=>{t(this,rr,"f").call(this,e)})),e.has("role")&&t(this,er,"f").call(this).forEach((e=>{t(this,ir,"f").call(this,e)}))}render(){return k`
1943
- <m-group
1944
- class=${yt({"toggle-group":!0,"-single":"single"===this.type,"-single-strict":"single-strict"===this.type,"-multiple":"multiple"===this.type,"-small":"small"===this.size,"-show-check":this.showCheck})}
1945
- gap="spacing-1"
1946
- >
1947
- <slot></slot>
1948
- </m-group>
1949
- `}}Qo=new WeakMap,tr=new WeakMap,er=new WeakMap,ir=new WeakMap,or=new WeakMap,rr=new WeakMap,dr.styles=[[K`
1950
- .toggle-group {
1951
- inline-size: max-content;
1952
-
1953
- border: 1px solid ${_t("color-border")};
1954
- padding: ${Pt("spacing-1")};
1955
-
1956
- border-radius: ${Pt("border-radius-s")};
1957
- box-sizing: border-box;
1958
-
1959
- block-size: ${Pt("global-height-default")};
1960
- }
1961
-
1962
- .toggle-group.-small {
1963
- block-size: ${Pt("global-height-small")};
1964
- }
1965
-
1966
- .toggle-group.-small ::slotted(m-toggle) {
1967
- --m-toggle-base-size: 18px;
1968
- --m-toggle-font-size: ${Pt("font-size-2")};
1969
- --m-toggle-icon-size: 10px;
1970
- }
1971
-
1972
- .toggle-group.-show-check ::slotted(m-toggle[aria-checked='true']) {
1973
- --m-toggle-icon-display: inline-flex;
1974
- }
1975
- `]],window.customElements.define("m-toggle-group",dr);class hr extends ut{static get properties(){return{checked:{type:Boolean},disabled:{type:Boolean,reflect:!0},role:{type:String,reflect:!0},value:{type:String,reflect:!0}}}constructor(){super(),nr.add(this),ar.set(this,(()=>{if(this.disabled)return;this.checked=!this.checked;const t={detail:{value:this.value,type:"toggle"},bubbles:!0,composed:!1};this.dispatchEvent(new CustomEvent(Ko,t))})),lr.set(this,(()=>{this.setAttribute("aria-disabled",String(this.disabled))})),cr.set(this,(()=>{this.setAttribute("aria-checked",String(this.checked))})),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t(this,ar,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,ar,"f"))}updated(e){super.updated(e),e.has("disabled")&&t(this,lr,"f").call(this),e.has("checked")&&t(this,cr,"f").call(this)}render(){return k`
1976
- <button
1977
- type="button"
1978
- class=${yt({button:!0,toggle:!0})}
1979
- role="${this.role}"
1980
- aria-checked="${this.checked}"
1981
- ?disabled="${this.disabled}"
1982
- >
1983
- <slot name="leading" slot="leading">
1984
- <m-icon name="check" class="check-icon"></m-icon>
1985
- </slot>
1986
-
1987
- <slot></slot>
1988
- </button>
1989
- `}focus(e){var i;null===(i=t(this,nr,"a",sr))||void 0===i||i.focus(e)}}ar=new WeakMap,lr=new WeakMap,cr=new WeakMap,nr=new WeakSet,sr=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("button"))&&void 0!==e?e:null},hr.styles=[[Zt(),K`
1990
- :host {
1991
- /*
1992
- * These custom properties are here because they are meant to be
1993
- * overriden via toggle-group styles.
1994
- */
1995
- --m-toggle-base-size: 30px;
1996
- --m-toggle-font-size: ${Pt("font-size-3")};
1997
- --m-toggle-icon-size: 12px;
1998
- --m-toggle-icon-display: none;
1999
-
2000
- --m-button-border-color: transparent;
2001
- --m-button-color: ${_t("color-primary-100")};
2002
- --m-button-padding-x: ${Pt("spacing-2")};
2003
- --m-button-padding-y: 0;
2004
-
2005
- --m-button-base-size: var(--m-toggle-base-size);
2006
- --m-button-font-size: var(--m-toggle-font-size);
2007
- }
2008
-
2009
- ${Xt([".toggle"])} {
2010
- --m-button-color: ${_t("color-text-disabled")};
2011
- }
2012
-
2013
- [aria-checked='true'] {
2014
- --m-button-background-color: ${_t("color-primary-20")};
2015
- }
2016
-
2017
- ${Yt.hover(".toggle")} {
2018
- --m-button-background-color: ${_t("color-background-tertiary")};
2019
- --m-button-border-color: ${_t("color-background-tertiary")};
2020
- --m-button-color: ${_t("color-primary-100")};
2021
- }
2022
-
2023
- .check-icon {
2024
- --m-icon-size: var(--m-toggle-icon-size);
2025
- --m-icon-color: var(--m-button-color);
2026
-
2027
- display: var(--m-toggle-icon-display);
2028
- }
2029
- `]],window.customElements.define("m-toggle",hr);class ur extends ut{render(){return k`
2030
- <slot name="title"></slot>
2031
- <m-divider></m-divider>
2032
- <slot></slot>
2033
- `}}ur.styles=[K`
2034
- :host {
2035
- display: block;
2036
- }
2037
- `],window.customElements.define("m-section",ur);class pr extends(vt(ut,["h1","h2","h3","h4","h5","h6","p","span"],"span")){static get properties(){return{slot:{type:String,reflect:!0},size:{type:String}}}constructor(){super(),this.slot="title",this.size="default",this.as="span"}render(){return G`
2038
- <${this.tag} class=${yt({title:!0,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size})}>
2039
- <slot name="leading"></slot>
2040
- <slot></slot>
2041
- </${this.tag}>
2042
- `}}function gr(t){return t.trim()}function br(t){return t?String(t).split(/[\s,]+/).map(gr).filter(Boolean):["hover"]}function mr(t){return t.split("-")[1]}function fr(t){return"y"===t?"height":"width"}function yr(t){return t.split("-")[0]}function vr(t){return["top","bottom"].includes(yr(t))?"x":"y"}function $r(t,e,i){let{reference:o,floating:r}=t;const n=o.x+o.width/2-r.width/2,s=o.y+o.height/2-r.height/2,a=vr(e),l=fr(a),c=o[l]/2-r[l]/2,d="x"===a;let h;switch(yr(e)){case"top":h={x:n,y:o.y-r.height};break;case"bottom":h={x:n,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:s};break;case"left":h={x:o.x-r.width,y:s};break;default:h={x:o.x,y:o.y}}switch(mr(e)){case"start":h[a]-=c*(i&&d?-1:1);break;case"end":h[a]+=c*(i&&d?-1:1)}return h}pr.styles=[K`
2043
- :host {
2044
- color: ${_t("color-text-primary")};
2045
- display: block;
2046
- }
2047
-
2048
- slot[name='leading']::slotted(*) {
2049
- display: inline-flex;
2050
- flex-flow: row nowrap;
2051
- align-items: center;
2052
- justify-content: center;
2053
- pointer-events: none;
2054
- margin-inline-end: ${Pt("spacing-1")};
2055
- }
2056
-
2057
- .title {
2058
- height: 100%;
2059
- width: 100%;
2060
- }
2061
-
2062
- .-size-small {
2063
- ${Jt("heading-sm")};
2064
- margin: 0 0 ${Pt("spacing-1")} 0;
2065
- }
2066
- .-size-default {
2067
- ${Jt("heading-md")};
2068
- margin: 0 0 ${Pt("spacing-2")} 0;
2069
- }
2070
- .-size-large {
2071
- ${Jt("heading-lg-bold")};
2072
- margin: 0 0 ${Pt("spacing-2")} 0;
2073
- }
2074
- `],window.customElements.define("m-section-title",pr);function wr(t,e){return"function"==typeof t?t(e):t}function xr(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function kr(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function zr(t,e){var i;void 0===e&&(e={});const{x:o,y:r,platform:n,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=wr(e,t),g=xr(p),b=a[u?"floating"===h?"reference":"floating":h],m=kr(await n.getClippingRect({element:null==(i=await(null==n.isElement?void 0:n.isElement(b)))||i?b:b.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),f="floating"===h?{...s.floating,x:o,y:r}:s.reference,y=await(null==n.getOffsetParent?void 0:n.getOffsetParent(a.floating)),v=await(null==n.isElement?void 0:n.isElement(y))&&await(null==n.getScale?void 0:n.getScale(y))||{x:1,y:1},$=kr(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:f,offsetParent:y,strategy:l}):f);return{top:(m.top-$.top+g.top)/v.y,bottom:($.bottom-m.bottom+g.bottom)/v.y,left:(m.left-$.left+g.left)/v.x,right:($.right-m.right+g.right)/v.x}}const Sr=Math.min,Cr=Math.max;function Mr(t,e,i){return Cr(t,Sr(e,i))}const Wr=t=>({name:"arrow",options:t,async fn(e){const{x:i,y:o,placement:r,rects:n,platform:s,elements:a}=e,{element:l,padding:c=0}=wr(t,e)||{};if(null==l)return{};const d=xr(c),h={x:i,y:o},u=vr(r),p=fr(u),g=await s.getDimensions(l),b="y"===u,m=b?"top":"left",f=b?"bottom":"right",y=b?"clientHeight":"clientWidth",v=n.reference[p]+n.reference[u]-h[u]-n.floating[p],$=h[u]-n.reference[u],w=await(null==s.getOffsetParent?void 0:s.getOffsetParent(l));let x=w?w[y]:0;x&&await(null==s.isElement?void 0:s.isElement(w))||(x=a.floating[y]||n.floating[p]);const k=v/2-$/2,z=x/2-g[p]/2-1,S=Sr(d[m],z),C=Sr(d[f],z),M=S,W=x-g[p]-C,A=x/2-g[p]/2+k,j=Mr(M,A,W),B=null!=mr(r)&&A!=j&&n.reference[p]/2-(A<M?S:C)-g[p]/2<0?A<M?M-A:W-A:0;return{[u]:h[u]-B,data:{[u]:j,centerOffset:A-j+B}}}}),Ar={left:"right",right:"left",bottom:"top",top:"bottom"};function jr(t){return t.replace(/left|right|bottom|top/g,(t=>Ar[t]))}const Br={start:"end",end:"start"};function Er(t){return t.replace(/start|end/g,(t=>Br[t]))}const Rr=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i;const{placement:o,middlewareData:r,rects:n,initialPlacement:s,platform:a,elements:l}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...b}=wr(t,e),m=yr(o),f=yr(s)===s,y=await(null==a.isRTL?void 0:a.isRTL(l.floating)),v=h||(f||!g?[jr(s)]:function(t){const e=jr(t);return[Er(t),e,Er(e)]}(s));h||"none"===p||v.push(...function(t,e,i,o){const r=mr(t);let n=function(t,e,i){const o=["left","right"],r=["right","left"],n=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return i?e?r:o:e?o:r;case"left":case"right":return e?n:s;default:return[]}}(yr(t),"start"===i,o);return r&&(n=n.map((t=>t+"-"+r)),e&&(n=n.concat(n.map(Er)))),n}(s,g,p,y));const $=[s,...v],w=await zr(e,b),x=[];let k=(null==(i=r.flip)?void 0:i.overflows)||[];if(c&&x.push(w[m]),d){const{main:t,cross:e}=function(t,e,i){void 0===i&&(i=!1);const o=mr(t),r=vr(t),n=fr(r);let s="x"===r?o===(i?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[n]>e.floating[n]&&(s=jr(s)),{main:s,cross:jr(s)}}(o,n,y);x.push(w[t],w[e])}if(k=[...k,{placement:o,overflows:x}],!x.every((t=>t<=0))){var z,S;const t=((null==(z=r.flip)?void 0:z.index)||0)+1,e=$[t];if(e)return{data:{index:t,overflows:k},reset:{placement:e}};let i=null==(S=k.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:S.placement;if(!i)switch(u){case"bestFit":{var C;const t=null==(C=k.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:C[0];t&&(i=t);break}case"initialPlacement":i=s}if(o!==i)return{reset:{placement:i}}}return{}}}};const Tr=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:i,y:o}=e,r=await async function(t,e){const{placement:i,platform:o,elements:r}=t,n=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=yr(i),a=mr(i),l="x"===vr(i),c=["left","top"].includes(s)?-1:1,d=n&&l?-1:1,h=wr(e,t);let{mainAxis:u,crossAxis:p,alignmentAxis:g}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&"number"==typeof g&&(p="end"===a?-1*g:g),l?{x:p*d,y:u*c}:{x:u*c,y:p*d}}(e,t);return{x:i+r.x,y:o+r.y,data:r}}}};function Pr(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function _r(t){return Pr(t).getComputedStyle(t)}function Or(t){return t instanceof Pr(t).Node}function Dr(t){return Or(t)?(t.nodeName||"").toLowerCase():"#document"}function Ur(t){return t instanceof Pr(t).HTMLElement}function qr(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Pr(t).ShadowRoot||t instanceof ShadowRoot)}function Lr(t){const{overflow:e,overflowX:i,overflowY:o,display:r}=_r(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+i)&&!["inline","contents"].includes(r)}function Nr(t){return["table","td","th"].includes(Dr(t))}function Fr(t){const e=Ir(),i=_r(t);return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some((t=>(i.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(i.contain||"").includes(t)))}function Ir(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Gr(t){return["html","body","#document"].includes(Dr(t))}const Vr=Math.min,Hr=Math.max,Jr=Math.round,Xr=Math.floor,Yr=t=>({x:t,y:t});function Zr(t){const e=_r(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=Ur(t),n=r?t.offsetWidth:i,s=r?t.offsetHeight:o,a=Jr(i)!==n||Jr(o)!==s;return a&&(i=n,o=s),{width:i,height:o,$:a}}function Kr(t){return t instanceof Pr(t).Element}function Qr(t){return Kr(t)?t:t.contextElement}function tn(t){const e=Qr(t);if(!Ur(e))return Yr(1);const i=e.getBoundingClientRect(),{width:o,height:r,$:n}=Zr(e);let s=(n?Jr(i.width):i.width)/o,a=(n?Jr(i.height):i.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const en=Yr(0);function on(t){const e=Pr(t);return Ir()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:en}function rn(t,e,i,o){void 0===e&&(e=!1),void 0===i&&(i=!1);const r=t.getBoundingClientRect(),n=Qr(t);let s=Yr(1);e&&(o?Kr(o)&&(s=tn(o)):s=tn(t));const a=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==Pr(t))&&e}(n,i,o)?on(n):Yr(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,d=r.width/s.x,h=r.height/s.y;if(n){const t=Pr(n),e=o&&Kr(o)?Pr(o):o;let i=t.frameElement;for(;i&&o&&e!==t;){const t=tn(i),e=i.getBoundingClientRect(),o=getComputedStyle(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,n=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x,c*=t.y,d*=t.x,h*=t.y,l+=r,c+=n,i=Pr(i).frameElement}}return kr({width:d,height:h,x:l,y:c})}function nn(t){return Kr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function sn(t){return((Or(t)?t.ownerDocument:t.document)||window.document).documentElement}function an(t){return rn(sn(t)).left+nn(t).scrollLeft}function ln(t){if("html"===Dr(t))return t;const e=t.assignedSlot||t.parentNode||qr(t)&&t.host||sn(t);return qr(e)?e.host:e}function cn(t){const e=ln(t);return Gr(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ur(e)&&Lr(e)?e:cn(e)}function dn(t,e){var i;void 0===e&&(e=[]);const o=cn(t),r=o===(null==(i=t.ownerDocument)?void 0:i.body),n=Pr(o);return r?e.concat(n,n.visualViewport||[],Lr(o)?o:[]):e.concat(o,dn(o))}function hn(t,e,i){let o;if("viewport"===e)o=function(t,e){const i=Pr(t),o=sn(t),r=i.visualViewport;let n=o.clientWidth,s=o.clientHeight,a=0,l=0;if(r){n=r.width,s=r.height;const t=Ir();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:n,height:s,x:a,y:l}}(t,i);else if("document"===e)o=function(t){const e=sn(t),i=nn(t),o=t.ownerDocument.body,r=Hr(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),n=Hr(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-i.scrollLeft+an(t);const a=-i.scrollTop;return"rtl"===_r(o).direction&&(s+=Hr(e.clientWidth,o.clientWidth)-r),{width:r,height:n,x:s,y:a}}(sn(t));else if(Kr(e))o=function(t,e){const i=rn(t,!0,"fixed"===e),o=i.top+t.clientTop,r=i.left+t.clientLeft,n=Ur(t)?tn(t):Yr(1);return{width:t.clientWidth*n.x,height:t.clientHeight*n.y,x:r*n.x,y:o*n.y}}(e,i);else{const i=on(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return kr(o)}function un(t,e){const i=ln(t);return!(i===e||!Kr(i)||Gr(i))&&("fixed"===_r(i).position||un(i,e))}function pn(t,e,i){const o=Ur(e),r=sn(e),n="fixed"===i,s=rn(t,!0,n,e);let a={scrollLeft:0,scrollTop:0};const l=Yr(0);if(o||!o&&!n)if(("body"!==Dr(e)||Lr(r))&&(a=nn(e)),Ur(e)){const t=rn(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=an(r));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function gn(t,e){return Ur(t)&&"fixed"!==_r(t).position?e?e(t):t.offsetParent:null}function bn(t,e){const i=Pr(t);if(!Ur(t))return i;let o=gn(t,e);for(;o&&Nr(o)&&"static"===_r(o).position;)o=gn(o,e);return o&&("html"===Dr(o)||"body"===Dr(o)&&"static"===_r(o).position&&!Fr(o))?i:o||function(t){let e=ln(t);for(;Ur(e)&&!Gr(e);){if(Fr(e))return e;e=ln(e)}return null}(t)||i}const mn={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:i,strategy:o}=t;const r=Ur(i),n=sn(i);if(i===n)return e;let s={scrollLeft:0,scrollTop:0},a=Yr(1);const l=Yr(0);if((r||!r&&"fixed"!==o)&&(("body"!==Dr(i)||Lr(n))&&(s=nn(i)),Ur(i))){const t=rn(i);a=tn(i),l.x=t.x+i.clientLeft,l.y=t.y+i.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-s.scrollLeft*a.x+l.x,y:e.y*a.y-s.scrollTop*a.y+l.y}},getDocumentElement:sn,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:o,strategy:r}=t;const n=[..."clippingAncestors"===i?function(t,e){const i=e.get(t);if(i)return i;let o=dn(t).filter((t=>Kr(t)&&"body"!==Dr(t))),r=null;const n="fixed"===_r(t).position;let s=n?ln(t):t;for(;Kr(s)&&!Gr(s);){const e=_r(s),i=Fr(s);i||"fixed"!==e.position||(r=null),(n?!i&&!r:!i&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||Lr(s)&&!i&&un(t,s))?o=o.filter((t=>t!==s)):r=e,s=ln(s)}return e.set(t,o),o}(e,this._c):[].concat(i),o],s=n[0],a=n.reduce(((t,i)=>{const o=hn(e,i,r);return t.top=Hr(o.top,t.top),t.right=Vr(o.right,t.right),t.bottom=Vr(o.bottom,t.bottom),t.left=Hr(o.left,t.left),t}),hn(e,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:bn,getElementRects:async function(t){let{reference:e,floating:i,strategy:o}=t;const r=this.getOffsetParent||bn,n=this.getDimensions;return{reference:pn(e,await r(i),o),floating:{x:0,y:0,...await n(i)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return Zr(t)},getScale:tn,isElement:Kr,isRTL:function(t){return"rtl"===getComputedStyle(t).direction}};function fn(t,e,i,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:n=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=Qr(t),d=r||n?[...c?dn(c):[],...dn(e)]:[];d.forEach((t=>{r&&t.addEventListener("scroll",i,{passive:!0}),n&&t.addEventListener("resize",i)}));const h=c&&a?function(t,e){let i,o=null;const r=sn(t);function n(){clearTimeout(i),o&&o.disconnect(),o=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),n();const{left:c,top:d,width:h,height:u}=t.getBoundingClientRect();if(a||e(),!h||!u)return;const p={rootMargin:-Xr(d)+"px "+-Xr(r.clientWidth-(c+h))+"px "+-Xr(r.clientHeight-(d+u))+"px "+-Xr(c)+"px",threshold:Hr(0,Vr(1,l))||1};let g=!0;function b(t){const e=t[0].intersectionRatio;if(e!==l){if(!g)return s();e?s(!1,e):i=setTimeout((()=>{s(!1,1e-7)}),100)}g=!1}try{o=new IntersectionObserver(b,{...p,root:r.ownerDocument})}catch(t){o=new IntersectionObserver(b,p)}o.observe(t)}(!0),n}(c,i):null;let u,p=-1,g=null;s&&(g=new ResizeObserver((t=>{let[o]=t;o&&o.target===c&&g&&(g.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{g&&g.observe(e)}))),i()})),c&&!l&&g.observe(c),g.observe(e));let b=l?rn(t):null;return l&&function e(){const o=rn(t);!b||o.x===b.x&&o.y===b.y&&o.width===b.width&&o.height===b.height||i();b=o,u=requestAnimationFrame(e)}(),i(),()=>{d.forEach((t=>{r&&t.removeEventListener("scroll",i),n&&t.removeEventListener("resize",i)})),h&&h(),g&&g.disconnect(),g=null,l&&cancelAnimationFrame(u)}}const yn=(t,e,i)=>{const o=new Map,r={platform:mn,...i},n={...r.platform,_c:o};return(async(t,e,i)=>{const{placement:o="bottom",strategy:r="absolute",middleware:n=[],platform:s}=i,a=n.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:d,y:h}=$r(c,o,l),u=o,p={},g=0;for(let i=0;i<a.length;i++){const{name:n,fn:b}=a[i],{x:m,y:f,data:y,reset:v}=await b({x:d,y:h,initialPlacement:o,placement:u,strategy:r,middlewareData:p,rects:c,platform:s,elements:{reference:t,floating:e}});d=null!=m?m:d,h=null!=f?f:h,p={...p,[n]:{...p[n],...y}},v&&g<=50&&(g++,"object"==typeof v&&(v.placement&&(u=v.placement),v.rects&&(c=!0===v.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):v.rects),({x:d,y:h}=$r(c,u,l))),i=-1)}return{x:d,y:h,placement:u,strategy:r,middlewareData:p}})(t,e,{...r,platform:n})};var vn,$n;const wn={top:"",bottom:"",left:"",right:""};class xn extends ue{static get properties(){return{position:{type:String,reflect:!0},placement:{type:String},open:{type:Boolean,reflect:!0}}}constructor(){super(),vn.set(this,void 0),this.getFloatingOffset=()=>20,this.renderArrow=()=>k`<span id="arrow">
2075
- <svg viewBox="0 0 20 10">
2076
- <polygon stroke-width="0" points="0,10 20,10 10,0" />
2077
- </svg>
2078
- </span>`,this.reposition=async e=>{var i,o;if(null==this.floating||null==this.reference)return;const{x:r,y:n,placement:s,middlewareData:a}=await yn(this.reference,this.floating,{strategy:null!==(i=this.position)&&void 0!==i?i:"fixed",placement:null!==(o=this.placement)&&void 0!==o?o:"bottom-start",middleware:[Tr(this.getFloatingOffset()),Rr(),(void 0===l&&(l={}),{name:"shift",options:l,async fn(t){const{x:e,y:i,placement:o}=t,{mainAxis:r=!0,crossAxis:n=!1,limiter:s={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...a}=wr(l,t),c={x:e,y:i},d=await zr(t,a),h=vr(yr(o)),u="x"===h?"y":"x";let p=c[h],g=c[u];if(r){const t="y"===h?"bottom":"right";p=Mr(p+d["y"===h?"top":"left"],p,p-d[t])}if(n){const t="y"===u?"bottom":"right";g=Mr(g+d["y"===u?"top":"left"],g,g-d[t])}const b=s.fn({...t,[h]:p,[u]:g});return{...b,data:{x:b.x-e,y:b.y-i}}}}),this.arrow?Wr({element:this.arrow,padding:16}):void 0]});var l;Object.assign(this.floating.style,{top:`${n}px`,left:`${r}px`}),null!=this.arrow&&a.arrow&&Object.assign(this.arrow.style,t(this,$n,"f").call(this,s,a.arrow)),this.emit("m-popover-reposition",{detail:{reason:e}})},$n.set(this,((t,e)=>{if(null==this.floating||null==this.reference||null==this.arrow||null==e)return{};const[i,o]=t.split("-"),{x:r,y:n}=e,s={top:"bottom",bottom:"top",left:"right",right:"left"}[i],a={top:"180deg",bottom:"0deg",left:"90deg",right:"-90deg"}[i],l=null!=o,c=this.reference.offsetWidth>this.floating.offsetWidth,d=this.reference.offsetHeight>this.floating.offsetHeight,h=["top","bottom"].includes(i),u=l&&(h?c:d),p=this.reference.getBoundingClientRect(),g=`calc(var(--m-popover-arrow-offset) + ${{top:p.height,bottom:p.height,right:p.width,left:p.width}[s]}px + ${this.getFloatingOffset()}px)`;let b={transform:`rotate(${a})`,...wn};if(u){const e={"top-start":"left","top-end":"right","bottom-start":"left","bottom-end":"right"}[t];b={...b,[s]:g,[e]:"10px"}}else b={...b,left:null!=r?`${r}px`:"",top:null!=n?`${n}px`:"",[s]:g};return b})),this.position="fixed",this.placement="top-end",this.open=!1}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=t(this,vn,"f"))||void 0===e||e.call(this)}firstUpdated(){this.open&&this.reposition("show"),e(this,vn,fn(this.reference,this.floating,(()=>{this.reposition("auto")})),"f")}updated(t){super.updated(t),this.open&&null!=t.get("placement")&&null!=this.placement&&this.reposition("placement")}get reference(){return this.getReferenceElement()}get floating(){return this.getFloatingElement()}get arrow(){return this.getArrowElement()}show(){this.open||(this.open=!0,this.reposition("show"))}hide(){this.open&&(this.open=!1)}toggle(){this.open?this.hide():this.show()}}var kn,zn,Sn,Cn,Mn,Wn,An,jn,Bn;vn=new WeakMap,$n=new WeakMap;class En extends xn{static get properties(){return{...xn.properties,trigger:{type:String,converter:{fromAttribute:br}}}}constructor(){super(),kn.set(this,void 0),zn.set(this,void 0),Sn.set(this,(()=>{t(this,Bn,"f").call(this,"focus")&&(clearTimeout(t(this,zn,"f")),e(this,zn,window.setTimeout((()=>this.show()),450),"f"))})),Cn.set(this,(()=>{t(this,Bn,"f").call(this,"focus")&&(clearTimeout(t(this,zn,"f")),e(this,zn,window.setTimeout((()=>this.hide()),450),"f"))})),Mn.set(this,(()=>{t(this,Bn,"f").call(this,"click")&&this.toggle()})),Wn.set(this,(t=>{this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide())})),An.set(this,(()=>{t(this,Bn,"f").call(this,"hover")&&(clearTimeout(t(this,kn,"f")),e(this,kn,window.setTimeout((()=>this.show()),450),"f"))})),jn.set(this,(()=>{t(this,Bn,"f").call(this,"hover")&&(clearTimeout(t(this,kn,"f")),e(this,kn,window.setTimeout((()=>this.hide()),450),"f"))})),Bn.set(this,(t=>this.trigger.includes(t))),this.position="fixed",this.placement="top-start",this.trigger=["hover","focus"]}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",t(this,Cn,"f"),!0),this.addEventListener("click",t(this,Mn,"f")),this.addEventListener("focus",t(this,Sn,"f"),!0),this.addEventListener("keydown",t(this,Wn,"f")),this.addEventListener("mouseout",t(this,jn,"f")),this.addEventListener("mouseover",t(this,An,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",t(this,Cn,"f"),!0),this.removeEventListener("focus",t(this,Sn,"f"),!0),this.removeEventListener("click",t(this,Mn,"f")),this.removeEventListener("keydown",t(this,Wn,"f")),this.removeEventListener("mouseover",t(this,An,"f")),this.removeEventListener("mouseout",t(this,jn,"f"))}getReferenceElement(){const t=this.shadowRoot.querySelector('slot[name="reference"]'),[e]=t.assignedElements({flatten:!0});return e}getFloatingElement(){const t=this.shadowRoot.querySelector('slot[name="floating"]'),[e]=t.assignedElements({flatten:!0});return e}getArrowElement(){return this.shadowRoot.querySelector("#arrow")}render(){return k`
2079
- ${this.renderArrow()}
2080
- <slot name="reference" aria-describedby="floating"></slot>
2081
- <slot
2082
- name="floating"
2083
- id="floating"
2084
- role="tooltip"
2085
- aria-live=${this.open?"polite":"off"}
2086
- ></slot>
2087
- `}}kn=new WeakMap,zn=new WeakMap,Sn=new WeakMap,Cn=new WeakMap,Mn=new WeakMap,Wn=new WeakMap,An=new WeakMap,jn=new WeakMap,Bn=new WeakMap,En.styles=[[[K`
2088
- :host {
2089
- --m-popover-background-color: ${_t("color-background-secondary-inverted")};
2090
- --m-popover-border-radius: ${Pt("border-radius-m")};
2091
- --m-popover-border-width: 0;
2092
- --m-popover-border-style: none;
2093
- --m-popover-border-color: transparent;
2094
- --m-popover-color: ${_t("color-text-inverted")};
2095
- --m-popover-elevation: ${Pt("elevation-2")};
2096
- --m-popover-width: max-content;
2097
- --m-popover-z-index: 10;
2098
- --m-popover-floating-spacing-x: ${Pt("spacing-4")};
2099
- --m-popover-floating-spacing-y: ${Pt("spacing-2")};
2100
-
2101
- --m-popover-arrow-size: 20px;
2102
- --m-popover-arrow-offset: calc(-1 * (var(--m-popover-arrow-size) / 2));
2103
-
2104
- position: relative;
2105
- }
2106
-
2107
- slot[name='reference']::slotted(*) {
2108
- display: inline-flex;
2109
- }
2110
-
2111
- slot[name='floating']::slotted(*) {
2112
- ${Ht([{property:"box-shadow"}])};
2113
- ${Jt("body-md")};
2114
-
2115
- padding-inline: var(--m-popover-floating-spacing-x);
2116
- padding-block: var(--m-popover-floating-spacing-y);
2117
- margin: 0;
2118
-
2119
- display: none;
2120
-
2121
- min-height: ${Pt("global-height-default")};
2122
- width: var(--m-popover-width);
2123
- min-width: 80px;
2124
- max-width: 80ch;
2125
-
2126
- overflow-x: hidden;
2127
-
2128
- border-width: var(--m-popover-border-width);
2129
- border-style: var(--m-popover-border-style);
2130
- border-color: var(--m-popover-border-color);
2131
- border-radius: var(--m-popover-border-radius);
2132
-
2133
- background-color: var(--m-popover-background-color);
2134
- color: var(--m-popover-color);
2135
-
2136
- box-shadow: var(--m-popover-elevation);
2137
- z-index: var(--m-popover-z-index);
2138
- }
2139
-
2140
- :host([position='absolute']) slot[name='floating']::slotted(*) {
2141
- position: absolute;
2142
- }
2143
-
2144
- :host([position='fixed']) slot[name='floating']::slotted(*) {
2145
- position: fixed;
2146
- }
2147
-
2148
- :host([open]) slot[name='floating']::slotted(*),
2149
- :host([open]) #arrow {
2150
- display: inline-block;
2151
- }
2152
-
2153
- #arrow {
2154
- display: none;
2155
- position: absolute;
2156
- width: var(--m-popover-arrow-size);
2157
- height: var(--m-popover-arrow-size);
2158
- fill: var(--m-popover-background-color);
2159
-
2160
- z-index: calc(var(--m-popover-z-index) + 1);
2161
- }
2162
-
2163
- #arrow > svg {
2164
- height: calc(var(--m-popover-arrow-size) / 2);
2165
- }
2166
-
2167
- .-absolute {
2168
- position: absolute;
2169
- }
2170
-
2171
- .-fixed {
2172
- position: fixed;
2173
- }
2174
- `],K`
2175
- :host {
2176
- display: inline-block;
2177
- }
2178
- `]],window.customElements.define("m-tooltip",En);const Rn=["top","left","right","bottom","top-start","top-end","bottom-start","bottom-end"];export{Yo as $,Ii as A,se as B,je as C,ri as D,Vi as E,Gi as F,$i as G,ki as H,xi as I,wi as J,bi as K,gi as L,zi as M,Mi as N,Ci as O,ji as P,Wi as Q,Ei as R,Si as S,Bi as T,Yi as U,Zi as V,ro as W,zo as X,Ho as Y,Jo as Z,Xo as _,ae as a,Ce as a0,Zo as a1,dr as a2,hr as a3,ur as a4,pr as a5,En as a6,Rn as a7,z as b,le as c,ce as d,de as e,he as f,Ae as g,ne as h,Be as i,Ee as j,Re as k,Pe as l,qe as m,xe as n,ni as o,si as p,ci as q,di as r,hi as s,mi as t,fi as u,yi as v,vi as w,_i as x,Te as y,Fi as z};
2179
- //# sourceMappingURL=index-70ec393a.js.map