@m3e/core 1.1.10 → 1.2.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.
package/dist/index.min.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2025 matraic
|
|
4
4
|
* See LICENSE file in the project root for full license text.
|
|
5
5
|
*/
|
|
6
|
-
import{isServer as e,nothing as t,noChange as s,unsafeCSS as i,html as r,css as a,LitElement as n}from"lit";function o(e,t,s,i){var r,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(n=(a<3?r(n):a>3?r(t,s,n):r(t,s))||n);return a>3&&n&&Object.defineProperty(t,s,n),n}function l(e,t,s,i){if("a"===s&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?i:"a"===s?i.call(e):i?i.value:t.get(e)}function h(e,t,s,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,s):r?r.value=s:t.set(e,s),s}var c,d,p,u,m,f,v,y,g,b,x,w,$,k,E,_,S,A,C,L,M,z,W,P,T,H,F,O,D,U,N,I,R,B,q,V,j,X,Z,K,Y,Q,G,J,ee,te,se,ie,re,ae,ne,oe,le,he,ce,de,pe,ue,me,fe,ve,ye,ge,be,xe,we,$e,ke,Ee,_e,Se,Ae,Ce,Le,Me,ze,We,Pe,Te,He,Fe,Oe;"function"==typeof SuppressedError&&SuppressedError;class De{constructor(e,t){c.set(this,null),d.set(this,0),p.set(this,!1),u.set(this,void 0),m.set(this,()=>{if(!l(this,p,"f"))return;const e=performance.now();l(this,u,"f").call(this,(e-l(this,d,"f"))/1e3,e/1e3),h(this,d,e,"f"),h(this,c,requestAnimationFrame(l(this,m,"f")),"f")}),h(this,u,t,"f"),e.addController(this)}hostDisconnected(){this.stop()}start(){l(this,p,"f")||(h(this,p,!0,"f"),h(this,d,performance.now(),"f"),l(this,m,"f").call(this))}stop(){l(this,p,"f")&&(h(this,p,!1,"f"),null!==l(this,c,"f")&&(cancelAnimationFrame(l(this,c,"f")),h(this,c,null,"f")))}}c=new WeakMap,d=new WeakMap,p=new WeakMap,u=new WeakMap,m=new WeakMap;class Ue{constructor(e,t){f.set(this,void 0),v.set(this,void 0),y.set(this,new Set),h(this,f,e,"f"),h(this,v,t.target,"f"),l(this,f,"f").addController(this)}get targets(){return l(this,y,"f").values()}hostConnected(){null!==l(this,v,"f")&&this.observe(l(this,v,"f")??l(this,f,"f"))}hostDisconnected(){l(this,y,"f").forEach(e=>this.unobserve(e)),l(this,y,"f").clear()}observe(e){l(this,y,"f").has(e)||(l(this,y,"f").add(e),this._observe(e))}isObserving(e){return l(this,y,"f").has(e)}unobserve(e){l(this,y,"f").delete(e)&&this._unobserve(e)}}function Ne(e){const t=parseFloat(getComputedStyle(e).lineHeight);return isNaN(t)||t<=0?0:Math.round(e.scrollHeight/t)}async function Ie(e,t=200){e.focus();const s=performance.now();for(;e.shadowRoot?.activeElement!==e;){if(!e.isConnected||performance.now()-s>t)return!1;await new Promise(requestAnimationFrame),e.focus()}return!0}function Re(){return!e&&matchMedia("(forced-colors: active)").matches}function Be(e,t,s){return e+(t-e)*s}function qe(e,t,s,i){return{x:Math.pow(1-i,2)*e.x+2*(1-i)*i*t.x+Math.pow(i,2)*s.x,y:Math.pow(1-i,2)*e.y+2*(1-i)*i*t.y+Math.pow(i,2)*s.y}}function Ve(e,t,s,i,r){return{x:Math.pow(1-r,3)*e.x+3*Math.pow(1-r,2)*r*t.x+3*(1-r)*Math.pow(r,2)*s.x+Math.pow(r,3)*i.x,y:Math.pow(1-r,3)*e.y+3*Math.pow(1-r,2)*r*t.y+3*(1-r)*Math.pow(r,2)*s.y+Math.pow(r,3)*i.y}}function je(e,t){const s=function(e){return(e.match(/[a-zA-Z][^a-zA-Z]*/g)||[]).map(e=>({type:e[0],nums:e.slice(1).trim().split(/[\s,]+/).filter(Boolean).map(Number)}))}(e);let i={x:0,y:0},r={x:0,y:0};const a=[];for(const e of s)if("M"===e.type)i={x:e.nums[0],y:e.nums[1]},r=i;else if("L"===e.type){const t={x:e.nums[0],y:e.nums[1]},s=t.x-i.x,r=t.y-i.y;a.push({type:"L",pts:[i,t],length:Math.hypot(s,r)}),i=t}else if("H"===e.type){const t={x:e.nums[0],y:i.y},s=t.x-i.x;a.push({type:"L",pts:[i,t],length:Math.abs(s)}),i=t}else if("V"===e.type){const t={x:i.x,y:e.nums[0]},s=t.y-i.y;a.push({type:"L",pts:[i,t],length:Math.abs(s)}),i=t}else if("Q"===e.type){const t={x:e.nums[0],y:e.nums[1]},s={x:e.nums[2],y:e.nums[3]};let r=0,n=i;const o=20;for(let e=1;e<=o;e++){const a=qe(i,t,s,e/o);r+=Math.hypot(a.x-n.x,a.y-n.y),n=a}a.push({type:"Q",pts:[i,t,s],length:r}),i=s}else if("C"===e.type){const t={x:e.nums[0],y:e.nums[1]},s={x:e.nums[2],y:e.nums[3]},r={x:e.nums[4],y:e.nums[5]};let n=0,o=i;const l=20;for(let e=1;e<=l;e++){const a=Ve(i,t,s,r,e/l);n+=Math.hypot(a.x-o.x,a.y-o.y),o=a}a.push({type:"C",pts:[i,t,s,r],length:n}),i=r}else if("Z"===e.type){const e=r.x-i.x,t=r.y-i.y;a.push({type:"L",pts:[i,r],length:Math.hypot(e,t)}),i=r}const n=a.reduce((e,t)=>e+t.length,0),o=n/(t-1),l=[];let h=0,c=0;for(let e=0;e<t;e++){const t=e*o;for(;c<a.length&&h+a[c].length<t;)h+=a[c].length,c++;const s=a[c];if(!s)break;const i=(t-h)/s.length;if("L"===s.type){const[e,t]=s.pts;l.push({x:Be(e.x,t.x,i),y:Be(e.y,t.y,i)})}else if("Q"===s.type){const[e,t,r]=s.pts;l.push(qe(e,t,r,i))}else if("C"===s.type){const[e,t,r,a]=s.pts;l.push(Ve(e,t,r,a,i))}}return l}function Xe(e,t,s){return Math.max(t,Math.min(s,e))}function Ze(e,t){const s=e.length,i=new Array(s);for(let r=0;r<s;r++)i[r]=e[(r+t)%s];return i}function Ke(e,t){const s=e.length;let i=0,r=1/0;for(let a=0;a<s;a++){let n=0;for(let i=0;i<s;i++){const o=t[(i+a)%s],l=e[i],h=o.x-l.x,c=o.y-l.y;if(n+=h*h+c*c,n>=r)break}n<r&&(r=n,i=a)}return i}function Ye(e){let t=0;const s=e.length;for(let i=0;i<s;i++){const r=e[i],a=e[(i+1)%s];t+=r.x*a.y-a.x*r.y}return t/2}function Qe(e,t){return function(e){const t=e.map(e=>{const t=function(e){let t=1/0,s=1/0,i=-1/0,r=-1/0;for(const a of e)a.x<t&&(t=a.x),a.x>i&&(i=a.x),a.y<s&&(s=a.y),a.y>r&&(r=a.y);return{minX:t,minY:s,maxX:i,maxY:r,width:i-t,height:r-s}}(e),s=e.map(e=>({x:e.x-t.minX,y:e.y-t.minY})),i=Math.max(t.width,t.height)||1,r=s.map(e=>({x:e.x/i,y:e.y/i})),a=t.width/i,n=t.height/i,o=(1-a)/2,l=(1-n)/2;return r.map(e=>({x:e.x+o,y:e.y+l}))}),s=t[0],i=Math.sign(Ye(s));for(let e=1;e<t.length;e++){let r=t[e];const a=Math.sign(Ye(r));0!==a&&a!==i&&(r=r.slice().reverse());const n=Ke(s,r);t[e]=Ze(r,n)}return t}(e.map(e=>je(e,t))).map(e=>function(e){const t=e.map(e=>{const t=Xe(100*e.x,0,100),s=Xe(100*e.y,0,100);return`${t.toFixed(2)}% ${s.toFixed(2)}%`});return`${t.join(", ")}`}(e))}function Ge(e,t=!1){let s="";switch(e.nodeType){case Node.TEXT_NODE:s=e.nodeValue??"";break;case Node.ELEMENT_NODE:if(e instanceof HTMLSlotElement)for(const i of e.assignedNodes({flatten:!0}))s+=Ge(i,t);else for(const i of e.childNodes)s+=Ge(i,t)}return t&&(s=s.trim()),s}function Je(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function et(e){return e.assignedNodes({flatten:!0}).length>0}function tt(e,t,s){const i=Object.getOwnPropertyDescriptor(e,t)??Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t);if(!i)throw new Error(`Property ${String(t)} not found on target.`);const r=i.get?.bind(e),a=i.set?.bind(e);return Object.defineProperty(e,t,{configurable:!0,enumerable:i.enumerable,get:()=>s.get?s.get(()=>r?.()):r?.(),set(e){s.set?s.set(e,e=>a?.(e)):a?.(e)}}),()=>Object.defineProperty(e,t,i)}function st(){return e||matchMedia("(prefers-reduced-motion)").matches}function it(e,t=document){return new Promise(s=>{const i=t.querySelector(`#${e}`);i?s(i):"complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",()=>s(t.querySelector(`#${e}`)),{once:!0}):s(t.querySelector(`#${e}`))})}function rt(e){const t=document?.location??null;return`url(${t?(t.pathname+t.search).split("#")[0]:""}#${e})`}function at(e,t,s){const i=t.getBoundingClientRect(),r=e.getBoundingClientRect();(r.top<i.top||r.bottom>i.bottom)&&e.scrollIntoView(s)}f=new WeakMap,v=new WeakMap,y=new WeakMap;class nt extends Ue{constructor(e,t){super(e,t),g.add(this),b.set(this,!1),x.set(this,void 0),w.set(this,e=>l(this,g,"m",L).call(this,e)),$.set(this,e=>l(this,g,"m",M).call(this,e)),k.set(this,e=>l(this,g,"m",z).call(this,e)),E.set(this,()=>h(this,b,!0,"f")),_.set(this,()=>h(this,b,!1,"f")),S.set(this,!1),A.set(this,()=>h(this,S,!0,"f")),C.set(this,()=>h(this,S,!1,"f")),h(this,x,t.callback,"f")}hostConnected(){super.hostConnected(),window?.addEventListener("keydown",l(this,A,"f"),{capture:!0,passive:!0}),window?.addEventListener("pointerdown",l(this,C,"f"),{capture:!0})}hostDisconnected(){super.hostDisconnected(),window?.removeEventListener("keydown",l(this,A,"f"),{capture:!0}),window?.removeEventListener("pointerdown",l(this,C,"f"),{capture:!0})}_observe(e){e.addEventListener("keydown",l(this,w,"f")),e.addEventListener("focusin",l(this,$,"f")),e.addEventListener("focusout",l(this,k,"f")),e.addEventListener("touchstart",l(this,E,"f")),e.addEventListener("touchend",l(this,_,"f")),e.addEventListener("touchcancel",l(this,_,"f"))}_unobserve(e){e.removeEventListener("keydown",l(this,w,"f")),e.removeEventListener("focusin",l(this,$,"f")),e.removeEventListener("focusout",l(this,k,"f")),e.removeEventListener("touchstart",l(this,E,"f")),e.removeEventListener("touchend",l(this,_,"f")),e.removeEventListener("touchcancel",l(this,_,"f"))}}b=new WeakMap,x=new WeakMap,w=new WeakMap,$=new WeakMap,k=new WeakMap,E=new WeakMap,_=new WeakMap,S=new WeakMap,A=new WeakMap,C=new WeakMap,g=new WeakSet,L=function(e){e.currentTarget.matches(":focus-within")&&l(this,g,"m",M).call(this,e)},M=function(e){if(l(this,b,"f"))return;const t=e.currentTarget;l(this,x,"f").call(this,!0,t.matches(":focus-visible")||l(this,S,"f")||Re(),t)},z=function(e){l(this,b,"f")||l(this,x,"f").call(this,!1,!1,e.currentTarget)};class ot extends Ue{constructor(e,t){super(e,t),W.add(this),P.set(this,void 0),T.set(this,new Map),H.set(this,new Map),F.set(this,e=>l(this,W,"m",I).call(this,e)),O.set(this,e=>l(this,W,"m",R).call(this,e)),h(this,P,t.callback,"f"),this.startDelay=t.startDelay??0,this.endDelay=t.endDelay??0}clearDelays(){for(const e of this.targets)l(this,W,"m",D).call(this,e)}_observe(e){e.addEventListener("pointerenter",l(this,F,"f")),e.addEventListener("pointerleave",l(this,O,"f"))}_unobserve(e){e.removeEventListener("pointerenter",l(this,F,"f")),e.removeEventListener("pointerleave",l(this,O,"f"))}}P=new WeakMap,T=new WeakMap,H=new WeakMap,F=new WeakMap,O=new WeakMap,W=new WeakSet,D=function(e){l(this,W,"m",U).call(this,e),l(this,W,"m",N).call(this,e)},U=function(e){return!!l(this,T,"f").has(e)&&(clearTimeout(l(this,T,"f").get(e)),l(this,T,"f").delete(e))},N=function(e){return!!l(this,H,"f").has(e)&&(clearTimeout(l(this,H,"f").get(e)),l(this,H,"f").delete(e))},I=function(e){const t=e.target;l(this,W,"m",N).call(this,t),this.startDelay>0?(l(this,W,"m",U).call(this,t),l(this,T,"f").set(t,setTimeout(()=>{l(this,T,"f").delete(t),l(this,P,"f").call(this,!0,t)},this.startDelay))):l(this,P,"f").call(this,!0,t)},R=function(e){const t=e.target;l(this,W,"m",U).call(this,t)||(this.endDelay>0?(l(this,W,"m",N).call(this,t),l(this,H,"f").set(t,setTimeout(()=>{l(this,H,"f").delete(t),l(this,P,"f").call(this,!1,t)},this.endDelay))):l(this,P,"f").call(this,!1,t))};class lt extends Ue{constructor(t,s){super(t,s),B.set(this,void 0),q.set(this,void 0),V.set(this,!1),j.set(this,void 0),X.set(this,!0),h(this,B,t,"f"),h(this,q,s.callback,"f"),h(this,V,s.skipInitial??!1,"f"),e||(window.IntersectionObserver?h(this,j,new IntersectionObserver((e,t)=>{l(this,q,"f").call(this,e,t),l(this,B,"f").requestUpdate()},s.init),"f"):console.warn("IntersectionController error: the browser does not support IntersectionObserver."))}async hostUpdated(){l(this,j,"f")&&!l(this,V,"f")&&l(this,X,"f")&&l(this,q,"f").call(this,[],l(this,j,"f")),h(this,X,!1,"f")}_observe(e){l(this,j,"f")?.observe(e),h(this,X,!0,"f"),l(this,B,"f").requestUpdate()}_unobserve(e){l(this,j,"f")?.unobserve(e)}}B=new WeakMap,q=new WeakMap,V=new WeakMap,j=new WeakMap,X=new WeakMap;class ht extends Ue{constructor(e,t){super(e,t),Z.add(this),K.set(this,void 0),Y.set(this,void 0),Q.set(this,new Set),G.set(this,new Map),J.set(this,e=>l(this,Z,"m",te).call(this,e)),ee.set(this,e=>l(this,Z,"m",se).call(this,e)),h(this,K,t.callback,"f"),h(this,Y,t.threshold??500,"f")}_observe(e){e.addEventListener("touchstart",l(this,J,"f"),{passive:!0}),e.addEventListener("touchend",l(this,ee,"f")),e.addEventListener("touchcancel",l(this,ee,"f"))}_unobserve(e){e.removeEventListener("touchstart",l(this,J,"f")),e.removeEventListener("touchend",l(this,ee,"f")),e.removeEventListener("touchcancel",l(this,ee,"f"))}}K=new WeakMap,Y=new WeakMap,Q=new WeakMap,G=new WeakMap,J=new WeakMap,ee=new WeakMap,Z=new WeakSet,te=function(e){if(e.currentTarget instanceof HTMLElement&&this.isObserving(e.currentTarget)){const t=e.currentTarget;l(this,G,"f").set(t,setTimeout(()=>{l(this,Q,"f").add(t),l(this,G,"f").delete(t),l(this,K,"f").call(this,!0,t)},l(this,Y,"f")))}},se=function(e){if(e.currentTarget instanceof HTMLElement&&this.isObserving(e.currentTarget)){const t=e.currentTarget;l(this,Q,"f").has(t)&&(l(this,K,"f").call(this,!1,t),l(this,Q,"f").delete(t)),l(this,G,"f").has(t)&&(clearTimeout(l(this,G,"f").get(t)),l(this,G,"f").delete(t))}};class ct extends Ue{constructor(t,s){super(t,s),ie.set(this,void 0),re.set(this,void 0),ae.set(this,!1),ne.set(this,void 0),oe.set(this,void 0),le.set(this,!0),h(this,ie,t,"f"),h(this,re,s.callback,"f"),h(this,ae,s.skipInitial??!1,"f"),h(this,ne,s.config,"f"),e||(window.MutationObserver?h(this,oe,new MutationObserver((e,t)=>{l(this,re,"f").call(this,e,t),l(this,ie,"f").requestUpdate()}),"f"):console.warn("MutationController error: the browser does not support MutationObserver."))}async hostUpdated(){if(l(this,oe,"f")&&!l(this,ae,"f")&&l(this,le,"f")){const e=l(this,oe,"f").takeRecords();e.length>0&&l(this,re,"f").call(this,e,l(this,oe,"f"))}h(this,le,!1,"f")}hostDisconnected(){super.hostDisconnected(),l(this,oe,"f")?.disconnect()}_observe(e){l(this,oe,"f")?.observe(e,l(this,ne,"f")),h(this,le,!0,"f"),l(this,ie,"f").requestUpdate()}_unobserve(){l(this,oe,"f")?.disconnect();for(const e of this.targets)l(this,oe,"f")?.observe(e,l(this,ne,"f"))}}ie=new WeakMap,re=new WeakMap,ae=new WeakMap,ne=new WeakMap,oe=new WeakMap,le=new WeakMap;class dt extends Ue{constructor(e,t){super(e,t),he.add(this),ce.set(this,void 0),de.set(this,void 0),pe.set(this,void 0),ue.set(this,new Map),me.set(this,void 0),fe.set(this,e=>l(this,he,"m",xe).call(this,e)),ve.set(this,e=>l(this,he,"m",we).call(this,e)),ye.set(this,e=>l(this,he,"m",$e).call(this,e)),ge.set(this,e=>l(this,he,"m",ke).call(this,e)),be.set(this,e=>l(this,he,"m",Ee).call(this,e)),h(this,ce,t.capture,"f"),h(this,de,t.callback,"f"),h(this,pe,t.isPressedKey,"f"),h(this,me,t.minPressedDuration??0,"f")}hostConnected(){document.addEventListener("pointerup",l(this,ve,"f"),{capture:l(this,ce,"f")}),document.addEventListener("touchend",l(this,ye,"f"),{capture:l(this,ce,"f")}),document.addEventListener("touchcancel",l(this,ye,"f"),{capture:l(this,ce,"f")}),super.hostConnected()}hostDisconnected(){document.removeEventListener("pointerup",l(this,ve,"f"),{capture:l(this,ce,"f")}),document.addEventListener("touchend",l(this,ye,"f"),{capture:l(this,ce,"f")}),document.addEventListener("touchcancel",l(this,ye,"f"),{capture:l(this,ce,"f")}),super.hostDisconnected(),l(this,ue,"f").clear()}_observe(e){e.addEventListener("pointerdown",l(this,fe,"f"),{capture:l(this,ce,"f")}),l(this,pe,"f")&&(e.addEventListener("keydown",l(this,ge,"f"),{capture:l(this,ce,"f")}),e.addEventListener("keyup",l(this,be,"f"),{capture:l(this,ce,"f")}))}_unobserve(e){e.removeEventListener("pointerdown",l(this,fe,"f"),{capture:l(this,ce,"f")}),l(this,pe,"f")&&(e.removeEventListener("keydown",l(this,ge,"f"),{capture:l(this,ce,"f")}),e.removeEventListener("keyup",l(this,be,"f"),{capture:l(this,ce,"f")}))}}ce=new WeakMap,de=new WeakMap,pe=new WeakMap,ue=new WeakMap,me=new WeakMap,fe=new WeakMap,ve=new WeakMap,ye=new WeakMap,ge=new WeakMap,be=new WeakMap,he=new WeakSet,xe=function(e){if(!("mouse"===e.pointerType&&e.button>1))for(const t of e.composedPath())if(t instanceof HTMLElement&&this.isObserving(t)){l(this,ue,"f").has(t)||(l(this,ue,"f").set(t,performance.now()),l(this,de,"f").call(this,!0,{x:e.x,y:e.y},t));break}},we=function(e){if("mouse"===e.pointerType&&e.button>1)return;const t=e.x,s=e.y;for(const e of l(this,ue,"f").keys()){const i=l(this,me,"f")-(performance.now()-l(this,ue,"f").get(e));i>0?setTimeout(()=>{l(this,ue,"f").delete(e),l(this,de,"f").call(this,!1,{x:t,y:s},e)},i):(l(this,ue,"f").delete(e),l(this,de,"f").call(this,!1,{x:t,y:s},e))}},$e=function(e){const t=e.touches[0]?.clientX??0,s=e.touches[0]?.clientY??0;for(const e of l(this,ue,"f").keys()){const i=l(this,me,"f")-(performance.now()-l(this,ue,"f").get(e));i>0?setTimeout(()=>{l(this,ue,"f").delete(e),l(this,de,"f").call(this,!1,{x:t,y:s},e)},i):(l(this,ue,"f").delete(e),l(this,de,"f").call(this,!1,{x:t,y:s},e))}},ke=function(e){if(e.target!==e.currentTarget)return;const t=e.currentTarget;if(l(this,pe,"f")?.call(this,e.key)&&(" "===e.key&&e.preventDefault(),!l(this,ue,"f").has(t))){l(this,ue,"f").set(t,performance.now());const e=t.getBoundingClientRect();l(this,de,"f").call(this,!0,{x:e.x+e.width/2,y:e.y+e.height/2},t)}},Ee=function(e){const t=e.target;if(l(this,ue,"f").has(t)&&l(this,pe,"f")?.call(this,e.key)){const e=l(this,me,"f")-(performance.now()-l(this,ue,"f").get(t)),s=t.getBoundingClientRect();e>0?setTimeout(()=>{l(this,ue,"f").delete(t),l(this,de,"f").call(this,!1,{x:s.x+s.width/2,y:s.y+s.height/2},t)},e):(l(this,ue,"f").delete(t),l(this,de,"f").call(this,!1,{x:s.x+s.width/2,y:s.y+s.height/2},t))}};class pt extends Ue{constructor(t,s){super(t,s),_e.set(this,void 0),Se.set(this,void 0),Ae.set(this,void 0),Ce.set(this,void 0),Le.set(this,void 0),Me.set(this,!0),h(this,_e,t,"f"),h(this,Se,s.callback,"f"),h(this,Ae,s.skipInitial??!1,"f"),h(this,Ce,s.config,"f"),e||(window.ResizeObserver?h(this,Le,new ResizeObserver((e,t)=>{l(this,Se,"f").call(this,e,t),l(this,_e,"f").requestUpdate()}),"f"):console.warn("ResizeController error: the browser does not support ResizeObserver."))}async hostUpdated(){l(this,Le,"f")&&!l(this,Ae,"f")&&l(this,Me,"f")&&l(this,Se,"f").call(this,[],l(this,Le,"f")),h(this,Me,!1,"f")}_observe(e){l(this,Le,"f")?.observe(e,l(this,Ce,"f")),h(this,Me,!0,"f"),l(this,_e,"f").requestUpdate()}_unobserve(e){l(this,Le,"f")?.unobserve(e)}}function ut(e){const t=Symbol("_id");return(s,i,r)=>{const a=r.value;return r.value=function(...s){clearTimeout(this[t]),this[t]=setTimeout(()=>a.apply(this,s),e)},r}}_e=new WeakMap,Se=new WeakMap,Ae=new WeakMap,Ce=new WeakMap,Le=new WeakMap,Me=new WeakMap;class mt extends Ue{constructor(e,t){super(e,t),ze.add(this),We.set(this,void 0),Pe.set(this,void 0),Te.set(this,e=>l(this,ze,"m",Oe).call(this,e)),He.set(this,new Map),h(this,We,!0===t.debounce,"f"),h(this,Pe,t.callback,"f")}getScrollContainers(e){return l(this,He,"f").get(e)}_observe(e){const t=l(this,ze,"m",Fe).call(this,e);if(t.length>0){l(this,He,"f").set(e,t);for(const e of t)(e===document.documentElement?document:e).addEventListener("scroll",l(this,Te,"f"),{passive:!0})}}_unobserve(e){if(l(this,He,"f").has(e)){for(const t of l(this,He,"f").get(e))(t===document.documentElement?document:t).removeEventListener("scroll",l(this,Te,"f"));l(this,He,"f").delete(e)}}_debounceCallback(e){l(this,Pe,"f").call(this,e)}}We=new WeakMap,Pe=new WeakMap,Te=new WeakMap,He=new WeakMap,ze=new WeakSet,Fe=function(e){const t=new Array;let s=e;for(;s;){const e=getComputedStyle(s);/(auto|scroll)/.test(e.overflow+e.overflowY+e.overflowX)&&t.push(s),s=s.parentElement}return t},Oe=function(e){const t=e.target===document?document.documentElement:e.target;l(this,We,"f")?this._debounceCallback(t):l(this,Pe,"f").call(this,t)},o([ut(40)],mt.prototype,"_debounceCallback",null);
|
|
6
|
+
import{isServer as e,nothing as t,noChange as s,unsafeCSS as i,html as r,css as a,LitElement as n}from"lit";function o(e,t,s,i){var r,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(n=(a<3?r(n):a>3?r(t,s,n):r(t,s))||n);return a>3&&n&&Object.defineProperty(t,s,n),n}function l(e,t,s,i){if("a"===s&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?i:"a"===s?i.call(e):i?i.value:t.get(e)}function h(e,t,s,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,s):r?r.value=s:t.set(e,s),s}var c,d,p,u,m,f,v,y,g,b,x,w,$,k,E,_,S,A,C,L,M,z,W,P,T,H,F,O,D,U,N,I,R,B,q,V,j,X,Z,K,Y,Q,G,J,ee,te,se,ie,re,ae,ne,oe,le,he,ce,de,pe,ue,me,fe,ve,ye,ge,be,xe,we,$e,ke,Ee,_e,Se,Ae,Ce,Le,Me,ze,We,Pe,Te,He,Fe,Oe;"function"==typeof SuppressedError&&SuppressedError;class De{constructor(e,t){c.set(this,null),d.set(this,0),p.set(this,!1),u.set(this,void 0),m.set(this,()=>{if(!l(this,p,"f"))return;const e=performance.now();l(this,u,"f").call(this,(e-l(this,d,"f"))/1e3,e/1e3),h(this,d,e,"f"),h(this,c,requestAnimationFrame(l(this,m,"f")),"f")}),h(this,u,t,"f"),e.addController(this)}hostDisconnected(){this.stop()}start(){l(this,p,"f")||(h(this,p,!0,"f"),h(this,d,performance.now(),"f"),l(this,m,"f").call(this))}stop(){l(this,p,"f")&&(h(this,p,!1,"f"),null!==l(this,c,"f")&&(cancelAnimationFrame(l(this,c,"f")),h(this,c,null,"f")))}}c=new WeakMap,d=new WeakMap,p=new WeakMap,u=new WeakMap,m=new WeakMap;class Ue{constructor(e,t){f.set(this,void 0),v.set(this,void 0),y.set(this,new Set),h(this,f,e,"f"),h(this,v,t.target,"f"),l(this,f,"f").addController(this)}get targets(){return l(this,y,"f").values()}hostConnected(){null!==l(this,v,"f")&&this.observe(l(this,v,"f")??l(this,f,"f"))}hostDisconnected(){l(this,y,"f").forEach(e=>this.unobserve(e)),l(this,y,"f").clear()}observe(e){l(this,y,"f").has(e)||(l(this,y,"f").add(e),this._observe(e))}isObserving(e){return l(this,y,"f").has(e)}unobserve(e){l(this,y,"f").delete(e)&&this._unobserve(e)}}function Ne(e){const t=parseFloat(getComputedStyle(e).lineHeight);return isNaN(t)||t<=0?0:Math.round(e.scrollHeight/t)}async function Ie(e,t=200){e.focus();const s=performance.now();for(;e.shadowRoot?.activeElement!==e;){if(!e.isConnected||performance.now()-s>t)return!1;await new Promise(requestAnimationFrame),e.focus()}return!0}function Re(){return!e&&matchMedia("(forced-colors: active)").matches}function Be(e,t,s){return e+(t-e)*s}function qe(e,t,s,i){return{x:Math.pow(1-i,2)*e.x+2*(1-i)*i*t.x+Math.pow(i,2)*s.x,y:Math.pow(1-i,2)*e.y+2*(1-i)*i*t.y+Math.pow(i,2)*s.y}}function Ve(e,t,s,i,r){return{x:Math.pow(1-r,3)*e.x+3*Math.pow(1-r,2)*r*t.x+3*(1-r)*Math.pow(r,2)*s.x+Math.pow(r,3)*i.x,y:Math.pow(1-r,3)*e.y+3*Math.pow(1-r,2)*r*t.y+3*(1-r)*Math.pow(r,2)*s.y+Math.pow(r,3)*i.y}}function je(e,t){const s=function(e){return(e.match(/[a-zA-Z][^a-zA-Z]*/g)||[]).map(e=>({type:e[0],nums:e.slice(1).trim().split(/[\s,]+/).filter(Boolean).map(Number)}))}(e);let i={x:0,y:0},r={x:0,y:0};const a=[];for(const e of s)if("M"===e.type)i={x:e.nums[0],y:e.nums[1]},r=i;else if("L"===e.type){const t={x:e.nums[0],y:e.nums[1]},s=t.x-i.x,r=t.y-i.y;a.push({type:"L",pts:[i,t],length:Math.hypot(s,r)}),i=t}else if("H"===e.type){const t={x:e.nums[0],y:i.y},s=t.x-i.x;a.push({type:"L",pts:[i,t],length:Math.abs(s)}),i=t}else if("V"===e.type){const t={x:i.x,y:e.nums[0]},s=t.y-i.y;a.push({type:"L",pts:[i,t],length:Math.abs(s)}),i=t}else if("Q"===e.type){const t={x:e.nums[0],y:e.nums[1]},s={x:e.nums[2],y:e.nums[3]};let r=0,n=i;const o=20;for(let e=1;e<=o;e++){const a=qe(i,t,s,e/o);r+=Math.hypot(a.x-n.x,a.y-n.y),n=a}a.push({type:"Q",pts:[i,t,s],length:r}),i=s}else if("C"===e.type){const t={x:e.nums[0],y:e.nums[1]},s={x:e.nums[2],y:e.nums[3]},r={x:e.nums[4],y:e.nums[5]};let n=0,o=i;const l=20;for(let e=1;e<=l;e++){const a=Ve(i,t,s,r,e/l);n+=Math.hypot(a.x-o.x,a.y-o.y),o=a}a.push({type:"C",pts:[i,t,s,r],length:n}),i=r}else if("Z"===e.type){const e=r.x-i.x,t=r.y-i.y;a.push({type:"L",pts:[i,r],length:Math.hypot(e,t)}),i=r}const n=a.reduce((e,t)=>e+t.length,0),o=n/(t-1),l=[];let h=0,c=0;for(let e=0;e<t;e++){const t=e*o;for(;c<a.length&&h+a[c].length<t;)h+=a[c].length,c++;const s=a[c];if(!s)break;const i=(t-h)/s.length;if("L"===s.type){const[e,t]=s.pts;l.push({x:Be(e.x,t.x,i),y:Be(e.y,t.y,i)})}else if("Q"===s.type){const[e,t,r]=s.pts;l.push(qe(e,t,r,i))}else if("C"===s.type){const[e,t,r,a]=s.pts;l.push(Ve(e,t,r,a,i))}}return l}function Xe(e,t,s){return Math.max(t,Math.min(s,e))}function Ze(e,t){const s=e.length,i=new Array(s);for(let r=0;r<s;r++)i[r]=e[(r+t)%s];return i}function Ke(e,t){const s=Math.min(t.length,e.length);let i=0,r=1/0;for(let a=0;a<s;a++){let n=0;for(let i=0;i<s;i++){const o=t[(i+a)%s],l=e[i],h=o.x-l.x,c=o.y-l.y;if(n+=h*h+c*c,n>=r)break}n<r&&(r=n,i=a)}return i}function Ye(e){let t=0;const s=e.length;for(let i=0;i<s;i++){const r=e[i],a=e[(i+1)%s];t+=r.x*a.y-a.x*r.y}return t/2}function Qe(e,t){return function(e){const t=e.map(e=>{const t=function(e){let t=1/0,s=1/0,i=-1/0,r=-1/0;for(const a of e)a.x<t&&(t=a.x),a.x>i&&(i=a.x),a.y<s&&(s=a.y),a.y>r&&(r=a.y);return{minX:t,minY:s,maxX:i,maxY:r,width:i-t,height:r-s}}(e),s=e.map(e=>({x:e.x-t.minX,y:e.y-t.minY})),i=Math.max(t.width,t.height)||1,r=s.map(e=>({x:e.x/i,y:e.y/i})),a=t.width/i,n=t.height/i,o=(1-a)/2,l=(1-n)/2;return r.map(e=>({x:e.x+o,y:e.y+l}))}),s=t[0],i=Math.sign(Ye(s));for(let e=1;e<t.length;e++){let r=t[e];const a=Math.sign(Ye(r));0!==a&&a!==i&&(r=r.slice().reverse());const n=Ke(s,r);t[e]=Ze(r,n)}return t}(e.map(e=>je(e,t))).map(e=>function(e){const t=e.map(e=>{const t=Xe(100*e.x,0,100),s=Xe(100*e.y,0,100);return`${t.toFixed(2)}% ${s.toFixed(2)}%`});return`${t.join(", ")}`}(e))}function Ge(e,t=!1){let s="";switch(e.nodeType){case Node.TEXT_NODE:s=e.nodeValue??"";break;case Node.ELEMENT_NODE:if(e instanceof HTMLSlotElement)for(const i of e.assignedNodes({flatten:!0}))s+=Ge(i,t);else for(const i of e.childNodes)s+=Ge(i,t)}return t&&(s=s.trim()),s}function Je(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function et(e){return e.assignedNodes({flatten:!0}).length>0}function tt(e,t,s){const i=Object.getOwnPropertyDescriptor(e,t)??Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t);if(!i)throw new Error(`Property ${String(t)} not found on target.`);const r=i.get?.bind(e),a=i.set?.bind(e);return Object.defineProperty(e,t,{configurable:!0,enumerable:i.enumerable,get:()=>s.get?s.get(()=>r?.()):r?.(),set(e){s.set?s.set(e,e=>a?.(e)):a?.(e)}}),()=>Object.defineProperty(e,t,i)}function st(){return e||matchMedia("(prefers-reduced-motion)").matches}function it(e,t=document){return new Promise(s=>{const i=t.querySelector(`#${e}`);i?s(i):"complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",()=>s(t.querySelector(`#${e}`)),{once:!0}):s(t.querySelector(`#${e}`))})}function rt(e){const t=document?.location??null;return`url(${t?(t.pathname+t.search).split("#")[0]:""}#${e})`}function at(e,t,s){const i=t.getBoundingClientRect(),r=e.getBoundingClientRect();(r.top<i.top||r.bottom>i.bottom)&&e.scrollIntoView(s)}f=new WeakMap,v=new WeakMap,y=new WeakMap;class nt extends Ue{constructor(e,t){super(e,t),g.add(this),b.set(this,!1),x.set(this,void 0),w.set(this,e=>l(this,g,"m",L).call(this,e)),$.set(this,e=>l(this,g,"m",M).call(this,e)),k.set(this,e=>l(this,g,"m",z).call(this,e)),E.set(this,()=>h(this,b,!0,"f")),_.set(this,()=>h(this,b,!1,"f")),S.set(this,!1),A.set(this,()=>h(this,S,!0,"f")),C.set(this,()=>h(this,S,!1,"f")),h(this,x,t.callback,"f")}hostConnected(){super.hostConnected(),window?.addEventListener("keydown",l(this,A,"f"),{capture:!0,passive:!0}),window?.addEventListener("pointerdown",l(this,C,"f"),{capture:!0})}hostDisconnected(){super.hostDisconnected(),window?.removeEventListener("keydown",l(this,A,"f"),{capture:!0}),window?.removeEventListener("pointerdown",l(this,C,"f"),{capture:!0})}_observe(e){e.addEventListener("keydown",l(this,w,"f")),e.addEventListener("focusin",l(this,$,"f")),e.addEventListener("focusout",l(this,k,"f")),e.addEventListener("touchstart",l(this,E,"f")),e.addEventListener("touchend",l(this,_,"f")),e.addEventListener("touchcancel",l(this,_,"f"))}_unobserve(e){e.removeEventListener("keydown",l(this,w,"f")),e.removeEventListener("focusin",l(this,$,"f")),e.removeEventListener("focusout",l(this,k,"f")),e.removeEventListener("touchstart",l(this,E,"f")),e.removeEventListener("touchend",l(this,_,"f")),e.removeEventListener("touchcancel",l(this,_,"f"))}}b=new WeakMap,x=new WeakMap,w=new WeakMap,$=new WeakMap,k=new WeakMap,E=new WeakMap,_=new WeakMap,S=new WeakMap,A=new WeakMap,C=new WeakMap,g=new WeakSet,L=function(e){e.currentTarget.matches(":focus-within")&&l(this,g,"m",M).call(this,e)},M=function(e){if(l(this,b,"f"))return;const t=e.currentTarget;l(this,x,"f").call(this,!0,t.matches(":focus-visible")||l(this,S,"f")||Re(),t)},z=function(e){l(this,b,"f")||l(this,x,"f").call(this,!1,!1,e.currentTarget)};class ot extends Ue{constructor(e,t){super(e,t),W.add(this),P.set(this,void 0),T.set(this,new Map),H.set(this,new Map),F.set(this,e=>l(this,W,"m",I).call(this,e)),O.set(this,e=>l(this,W,"m",R).call(this,e)),h(this,P,t.callback,"f"),this.startDelay=t.startDelay??0,this.endDelay=t.endDelay??0}clearDelays(){for(const e of this.targets)l(this,W,"m",D).call(this,e)}_observe(e){e.addEventListener("pointerenter",l(this,F,"f")),e.addEventListener("pointerleave",l(this,O,"f"))}_unobserve(e){e.removeEventListener("pointerenter",l(this,F,"f")),e.removeEventListener("pointerleave",l(this,O,"f"))}}P=new WeakMap,T=new WeakMap,H=new WeakMap,F=new WeakMap,O=new WeakMap,W=new WeakSet,D=function(e){l(this,W,"m",U).call(this,e),l(this,W,"m",N).call(this,e)},U=function(e){return!!l(this,T,"f").has(e)&&(clearTimeout(l(this,T,"f").get(e)),l(this,T,"f").delete(e))},N=function(e){return!!l(this,H,"f").has(e)&&(clearTimeout(l(this,H,"f").get(e)),l(this,H,"f").delete(e))},I=function(e){const t=e.target;l(this,W,"m",N).call(this,t),this.startDelay>0?(l(this,W,"m",U).call(this,t),l(this,T,"f").set(t,setTimeout(()=>{l(this,T,"f").delete(t),l(this,P,"f").call(this,!0,t)},this.startDelay))):l(this,P,"f").call(this,!0,t)},R=function(e){const t=e.target;l(this,W,"m",U).call(this,t)||(this.endDelay>0?(l(this,W,"m",N).call(this,t),l(this,H,"f").set(t,setTimeout(()=>{l(this,H,"f").delete(t),l(this,P,"f").call(this,!1,t)},this.endDelay))):l(this,P,"f").call(this,!1,t))};class lt extends Ue{constructor(t,s){super(t,s),B.set(this,void 0),q.set(this,void 0),V.set(this,!1),j.set(this,void 0),X.set(this,!0),h(this,B,t,"f"),h(this,q,s.callback,"f"),h(this,V,s.skipInitial??!1,"f"),e||(window.IntersectionObserver?h(this,j,new IntersectionObserver((e,t)=>{l(this,q,"f").call(this,e,t),l(this,B,"f").requestUpdate()},s.init),"f"):console.warn("IntersectionController error: the browser does not support IntersectionObserver."))}async hostUpdated(){l(this,j,"f")&&!l(this,V,"f")&&l(this,X,"f")&&l(this,q,"f").call(this,[],l(this,j,"f")),h(this,X,!1,"f")}_observe(e){l(this,j,"f")?.observe(e),h(this,X,!0,"f"),l(this,B,"f").requestUpdate()}_unobserve(e){l(this,j,"f")?.unobserve(e)}}B=new WeakMap,q=new WeakMap,V=new WeakMap,j=new WeakMap,X=new WeakMap;class ht extends Ue{constructor(e,t){super(e,t),Z.add(this),K.set(this,void 0),Y.set(this,void 0),Q.set(this,new Set),G.set(this,new Map),J.set(this,e=>l(this,Z,"m",te).call(this,e)),ee.set(this,e=>l(this,Z,"m",se).call(this,e)),h(this,K,t.callback,"f"),h(this,Y,t.threshold??500,"f")}_observe(e){e.addEventListener("touchstart",l(this,J,"f"),{passive:!0}),e.addEventListener("touchend",l(this,ee,"f")),e.addEventListener("touchcancel",l(this,ee,"f"))}_unobserve(e){e.removeEventListener("touchstart",l(this,J,"f")),e.removeEventListener("touchend",l(this,ee,"f")),e.removeEventListener("touchcancel",l(this,ee,"f"))}}K=new WeakMap,Y=new WeakMap,Q=new WeakMap,G=new WeakMap,J=new WeakMap,ee=new WeakMap,Z=new WeakSet,te=function(e){if(e.currentTarget instanceof HTMLElement&&this.isObserving(e.currentTarget)){const t=e.currentTarget;l(this,G,"f").set(t,setTimeout(()=>{l(this,Q,"f").add(t),l(this,G,"f").delete(t),l(this,K,"f").call(this,!0,t)},l(this,Y,"f")))}},se=function(e){if(e.currentTarget instanceof HTMLElement&&this.isObserving(e.currentTarget)){const t=e.currentTarget;l(this,Q,"f").has(t)&&(l(this,K,"f").call(this,!1,t),l(this,Q,"f").delete(t)),l(this,G,"f").has(t)&&(clearTimeout(l(this,G,"f").get(t)),l(this,G,"f").delete(t))}};class ct extends Ue{constructor(t,s){super(t,s),ie.set(this,void 0),re.set(this,void 0),ae.set(this,!1),ne.set(this,void 0),oe.set(this,void 0),le.set(this,!0),h(this,ie,t,"f"),h(this,re,s.callback,"f"),h(this,ae,s.skipInitial??!1,"f"),h(this,ne,s.config,"f"),e||(window.MutationObserver?h(this,oe,new MutationObserver((e,t)=>{l(this,re,"f").call(this,e,t),l(this,ie,"f").requestUpdate()}),"f"):console.warn("MutationController error: the browser does not support MutationObserver."))}async hostUpdated(){if(l(this,oe,"f")&&!l(this,ae,"f")&&l(this,le,"f")){const e=l(this,oe,"f").takeRecords();e.length>0&&l(this,re,"f").call(this,e,l(this,oe,"f"))}h(this,le,!1,"f")}hostDisconnected(){super.hostDisconnected(),l(this,oe,"f")?.disconnect()}_observe(e){l(this,oe,"f")?.observe(e,l(this,ne,"f")),h(this,le,!0,"f"),l(this,ie,"f").requestUpdate()}_unobserve(){l(this,oe,"f")?.disconnect();for(const e of this.targets)l(this,oe,"f")?.observe(e,l(this,ne,"f"))}}ie=new WeakMap,re=new WeakMap,ae=new WeakMap,ne=new WeakMap,oe=new WeakMap,le=new WeakMap;class dt extends Ue{constructor(e,t){super(e,t),he.add(this),ce.set(this,void 0),de.set(this,void 0),pe.set(this,void 0),ue.set(this,new Map),me.set(this,void 0),fe.set(this,e=>l(this,he,"m",xe).call(this,e)),ve.set(this,e=>l(this,he,"m",we).call(this,e)),ye.set(this,e=>l(this,he,"m",$e).call(this,e)),ge.set(this,e=>l(this,he,"m",ke).call(this,e)),be.set(this,e=>l(this,he,"m",Ee).call(this,e)),h(this,ce,t.capture,"f"),h(this,de,t.callback,"f"),h(this,pe,t.isPressedKey,"f"),h(this,me,t.minPressedDuration??0,"f")}hostConnected(){document.addEventListener("pointerup",l(this,ve,"f"),{capture:l(this,ce,"f")}),document.addEventListener("touchend",l(this,ye,"f"),{capture:l(this,ce,"f")}),document.addEventListener("touchcancel",l(this,ye,"f"),{capture:l(this,ce,"f")}),super.hostConnected()}hostDisconnected(){document.removeEventListener("pointerup",l(this,ve,"f"),{capture:l(this,ce,"f")}),document.addEventListener("touchend",l(this,ye,"f"),{capture:l(this,ce,"f")}),document.addEventListener("touchcancel",l(this,ye,"f"),{capture:l(this,ce,"f")}),super.hostDisconnected(),l(this,ue,"f").clear()}_observe(e){e.addEventListener("pointerdown",l(this,fe,"f"),{capture:l(this,ce,"f")}),l(this,pe,"f")&&(e.addEventListener("keydown",l(this,ge,"f"),{capture:l(this,ce,"f")}),e.addEventListener("keyup",l(this,be,"f"),{capture:l(this,ce,"f")}))}_unobserve(e){e.removeEventListener("pointerdown",l(this,fe,"f"),{capture:l(this,ce,"f")}),l(this,pe,"f")&&(e.removeEventListener("keydown",l(this,ge,"f"),{capture:l(this,ce,"f")}),e.removeEventListener("keyup",l(this,be,"f"),{capture:l(this,ce,"f")}))}}ce=new WeakMap,de=new WeakMap,pe=new WeakMap,ue=new WeakMap,me=new WeakMap,fe=new WeakMap,ve=new WeakMap,ye=new WeakMap,ge=new WeakMap,be=new WeakMap,he=new WeakSet,xe=function(e){if(!("mouse"===e.pointerType&&e.button>1))for(const t of e.composedPath())if(t instanceof HTMLElement&&this.isObserving(t)){l(this,ue,"f").has(t)||(l(this,ue,"f").set(t,performance.now()),l(this,de,"f").call(this,!0,{x:e.x,y:e.y},t));break}},we=function(e){if("mouse"===e.pointerType&&e.button>1)return;const t=e.x,s=e.y;for(const e of l(this,ue,"f").keys()){const i=l(this,me,"f")-(performance.now()-l(this,ue,"f").get(e));i>0?setTimeout(()=>{l(this,ue,"f").delete(e),l(this,de,"f").call(this,!1,{x:t,y:s},e)},i):(l(this,ue,"f").delete(e),l(this,de,"f").call(this,!1,{x:t,y:s},e))}},$e=function(e){const t=e.touches[0]?.clientX??0,s=e.touches[0]?.clientY??0;for(const e of l(this,ue,"f").keys()){const i=l(this,me,"f")-(performance.now()-l(this,ue,"f").get(e));i>0?setTimeout(()=>{l(this,ue,"f").delete(e),l(this,de,"f").call(this,!1,{x:t,y:s},e)},i):(l(this,ue,"f").delete(e),l(this,de,"f").call(this,!1,{x:t,y:s},e))}},ke=function(e){if(e.target!==e.currentTarget)return;const t=e.currentTarget;if(l(this,pe,"f")?.call(this,e.key)&&(" "===e.key&&e.preventDefault(),!l(this,ue,"f").has(t))){l(this,ue,"f").set(t,performance.now());const e=t.getBoundingClientRect();l(this,de,"f").call(this,!0,{x:e.x+e.width/2,y:e.y+e.height/2},t)}},Ee=function(e){const t=e.target;if(l(this,ue,"f").has(t)&&l(this,pe,"f")?.call(this,e.key)){const e=l(this,me,"f")-(performance.now()-l(this,ue,"f").get(t)),s=t.getBoundingClientRect();e>0?setTimeout(()=>{l(this,ue,"f").delete(t),l(this,de,"f").call(this,!1,{x:s.x+s.width/2,y:s.y+s.height/2},t)},e):(l(this,ue,"f").delete(t),l(this,de,"f").call(this,!1,{x:s.x+s.width/2,y:s.y+s.height/2},t))}};class pt extends Ue{constructor(t,s){super(t,s),_e.set(this,void 0),Se.set(this,void 0),Ae.set(this,void 0),Ce.set(this,void 0),Le.set(this,void 0),Me.set(this,!0),h(this,_e,t,"f"),h(this,Se,s.callback,"f"),h(this,Ae,s.skipInitial??!1,"f"),h(this,Ce,s.config,"f"),e||(window.ResizeObserver?h(this,Le,new ResizeObserver((e,t)=>{l(this,Se,"f").call(this,e,t),l(this,_e,"f").requestUpdate()}),"f"):console.warn("ResizeController error: the browser does not support ResizeObserver."))}async hostUpdated(){l(this,Le,"f")&&!l(this,Ae,"f")&&l(this,Me,"f")&&l(this,Se,"f").call(this,[],l(this,Le,"f")),h(this,Me,!1,"f")}_observe(e){l(this,Le,"f")?.observe(e,l(this,Ce,"f")),h(this,Me,!0,"f"),l(this,_e,"f").requestUpdate()}_unobserve(e){l(this,Le,"f")?.unobserve(e)}}function ut(e){const t=Symbol("_id");return(s,i,r)=>{const a=r.value;return r.value=function(...s){clearTimeout(this[t]),this[t]=setTimeout(()=>a.apply(this,s),e)},r}}_e=new WeakMap,Se=new WeakMap,Ae=new WeakMap,Ce=new WeakMap,Le=new WeakMap,Me=new WeakMap;class mt extends Ue{constructor(e,t){super(e,t),ze.add(this),We.set(this,void 0),Pe.set(this,void 0),Te.set(this,e=>l(this,ze,"m",Oe).call(this,e)),He.set(this,new Map),h(this,We,!0===t.debounce,"f"),h(this,Pe,t.callback,"f")}getScrollContainers(e){return l(this,He,"f").get(e)}_observe(e){const t=l(this,ze,"m",Fe).call(this,e);if(t.length>0){l(this,He,"f").set(e,t);for(const e of t)(e===document.documentElement?document:e).addEventListener("scroll",l(this,Te,"f"),{passive:!0})}}_unobserve(e){if(l(this,He,"f").has(e)){for(const t of l(this,He,"f").get(e))(t===document.documentElement?document:t).removeEventListener("scroll",l(this,Te,"f"));l(this,He,"f").delete(e)}}_debounceCallback(e){l(this,Pe,"f").call(this,e)}}We=new WeakMap,Pe=new WeakMap,Te=new WeakMap,He=new WeakMap,ze=new WeakSet,Fe=function(e){const t=new Array;let s=e;for(;s;){const e=getComputedStyle(s);/(auto|scroll)/.test(e.overflow+e.overflowY+e.overflowX)&&t.push(s),s=s.parentElement}return t},Oe=function(e){const t=e.target===document?document.documentElement:e.target;l(this,We,"f")?this._debounceCallback(t):l(this,Pe,"f").call(this,t)},o([ut(40)],mt.prototype,"_debounceCallback",null);
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
@@ -41,7 +41,7 @@ const Xt={attribute:!0,type:String,converter:Bt,reflect:!1,hasChanged:qt},Zt=(e=
|
|
|
41
41
|
* Copyright 2017 Google LLC
|
|
42
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
43
|
*/
|
|
44
|
-
function Yt(e,t){return(t,s,i)=>((e,t,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,s),s))(t,s,{get(){return(t=>t.renderRoot?.querySelector(e)??null)(this)}})}function Qt(e){return xt(e,"checked")}function Gt(e){class t extends e{constructor(){super(...arguments),this.checked=!1}update(e){super.update(e),e.has("checked")&&("button"===this.role?(this.ariaPressed=`${this.checked}`,this.ariaChecked=null):this.role&&"none"!==this.role&&"presentation"!==this.role&&(this.ariaChecked=`${this.checked}`,this.ariaPressed=null))}}return o([Kt({type:Boolean,reflect:!0})],t.prototype,"checked",void 0),t}function Jt(e){return xt(e,"indeterminate")&&Qt(e)}function es(e){class t extends(Gt(e)){constructor(){super(...arguments),this.indeterminate=!1}update(e){super.update(e),e.has("indeterminate")&&this.role&&"none"!==this.role&&"presentation"!==this.role&&(this.ariaChecked=!this.checked&&this.indeterminate?"mixed":`${this.checked}`)}}return o([Kt({type:Boolean,reflect:!0})],t.prototype,"indeterminate",void 0),t}function ts(e){return xt(e,"selected")}function ss(e){class t extends e{constructor(){super(...arguments),this.selected=!1}update(e){super.update(e),e.has("selected")&&("button"===this.role?(this.ariaPressed=`${this.selected}`,this.ariaSelected=null,this.ariaChecked=null):"radio"===this.role?(this.ariaChecked=`${this.selected}`,this.ariaSelected=null,this.ariaPressed=null):this.role&&"none"!==this.role&&"presentation"!==this.role&&(this.ariaSelected=`${this.selected}`,this.ariaPressed=null,this.ariaChecked=null))}}return o([Kt({type:Boolean,reflect:!0})],t.prototype,"selected",void 0),t}function is(e){return Qt(e)||ts(e)}function rs(e){return Qt(e)&&e.checked||ts(e)&&e.selected}function as(e,t){Qt(e)?e.checked=t:e.selected=t}function ns(e){return xt(e,"dirty","pristine","markAsDirty","markAsPristine")}const os=Symbol("_eventHandler");function ls(e){var t;return t=os,class extends e{constructor(){super(...arguments),this[t]=()=>this.markAsDirty()}get dirty(){return this.classList.contains("-dirty")}get pristine(){return!this.dirty}connectedCallback(){this.markAsPristine(),super.connectedCallback(),this.addEventListener("change",this[os])}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",this[os])}markAsPristine(){this.classList.toggle("-dirty",!1)}markAsDirty(){this.classList.toggle("-dirty",!0)}}}function hs(e){return xt(e,"touched","untouched","markAsTouched","markAsUntouched")}const cs=Symbol("_eventHandler");function ds(e){var t;return t=cs,class extends e{constructor(){super(...arguments),this[t]=()=>this.markAsTouched()}get touched(){return this.classList.contains("-touched")}get untouched(){return!this.touched}connectedCallback(){this.markAsUntouched(),super.connectedCallback(),this.addEventListener("focusout",this[cs],{capture:!0})}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusout",this[cs],{capture:!0})}markAsTouched(){this.classList.toggle("-touched",!0)}markAsUntouched(){this.classList.toggle("-touched",!1)}}}const ps={primary:i("var(--md-sys-color-primary, #6750A4)"),onPrimary:i("var(--md-sys-color-on-primary, #FFFFFF)"),primaryContainer:i("var(--md-sys-color-primary-container, #EADDFF)"),onPrimaryContainer:i("var(--md-sys-color-on-primary-container, #4F378B)"),primaryFixed:i("var(--md-sys-color-primary-fixed, #EADDFF)"),primaryFixedDim:i("var(--md-sys-color-primary-fixed-dim, #D0BCFF)"),onPrimaryFixed:i("var(--md-sys-color-on-primary-fixed, #21005D)"),onPrimaryFixedVariant:i("var(--md-sys-color-on-primary-fixed-variant, #4F378B)"),secondary:i("var(--md-sys-color-secondary, #625B71)"),onSecondary:i("var(--md-sys-color-on-secondary, #FFFFFF)"),secondaryContainer:i("var(--md-sys-color-secondary-container, #E8DEF8)"),onSecondaryContainer:i("var(--md-sys-color-on-secondary-container, #4A4458)"),secondaryFixed:i("var(--md-sys-color-secondary-fixed, #E8DEF8)"),secondaryFixedDim:i("var(--md-sys-color-secondary-fixed-dim, #CCC2DC)"),onSecondaryFixed:i("var(--md-sys-color-on-secondary-fixed, #1D192B)"),onSecondaryFixedVariant:i("var(--md-sys-color-on-secondary-fixed-variant, #4A4458)"),tertiary:i("var(--md-sys-color-tertiary, #7D5260)"),onTertiary:i("var(--md-sys-color-on-tertiary, #FFFFFF)"),tertiaryContainer:i("var(--md-sys-color-tertiary-container, #FFD8E4)"),onTertiaryContainer:i("var(--md-sys-color-on-tertiary-container, #633B48)"),tertiaryFixed:i("var(--md-sys-color-tertiary-fixed, #FFD8E4)"),tertiaryFixedDim:i("var(--md-sys-color-tertiary-fixed-dim, #EFB8C8)"),onTertiaryFixed:i("var(--md-sys-color-on-tertiary-fixed, #31111D)"),onTertiaryFixedVariant:i("var(--md-sys-color-on-tertiary-fixed-variant, #633B48)"),error:i("var(--md-sys-color-error, #B3261E)"),onError:i("var(--md-sys-color-on-error, #FFFFFF)"),errorContainer:i("var(--md-sys-color-error-container, #F9DEDC)"),onErrorContainer:i("var(--md-sys-color-on-error-container, #8C1D18)"),surface:i("var(--md-sys-color-surface, #FEF7FF)"),onSurface:i("var(--md-sys-color-on-surface, #1D1B20)"),onSurfaceVariant:i("var(--md-sys-color-on-surface-variant, #49454F)"),surfaceContainerLowest:i("var(--md-sys-color-surface-container-lowest, #FFFFFF)"),surfaceContainerLow:i("var(--md-sys-color-surface-container-low, #F7F2FA)"),surfaceContainer:i("var(--md-sys-color-surface-container, #F3EDF7)"),surfaceContainerHigh:i("var(--md-sys-color-surface-container-high, #ECE6F0)"),surfaceContainerHighest:i("var(--md-sys-color-surface-container-highest, #E6E0E9)"),surfaceDim:i("var(--md-sys-color-surface-dim, #DED8E1)"),surfaceBright:i("var(--md-sys-color-surface-bright, #FEF7FF)"),surfaceVariant:i("var(--md-sys-color-surface-variant, #E7E0EC)"),inverseSurface:i("var(--md-sys-color-inverse-surface, #322F35)"),inverseOnSurface:i("var(--md-sys-color-inverse-on-surface, #F5EFF7)"),inversePrimary:i("var(--md-sys-color-inverse-primary, #D0BCFF)"),outline:i("var(--md-sys-color-outline, #79747E)"),outlineVariant:i("var(--md-sys-color-outline-variant, #CAC4D0)"),shadow:i("var(--md-sys-color-shadow, #000000)"),scrim:i("var(--md-sys-color-scrim, #000000)")},us={scale:i("var(--md-sys-density-scale, 0)"),size:i("var(--md-sys-density-size, 0.25rem)")},ms={...us,calc:e=>i(`calc(max(${e}, ${us.scale}) * ${us.size})`)},fs=`color-mix(in srgb, var(--m3e-elevation-color, ${ps.shadow}) 20%, transparent)`,vs=["0px 0px 0px 0px","0px 2px 1px -1px","0px 3px 1px -2px","0px 3px 3px -2px","0px 2px 4px -1px","0px 3px 5px -1px","0px 3px 5px -1px","0px 4px 5px -2px","0px 5px 5px -3px","0px 5px 6px -3px","0px 6px 6px -3px","0px 6px 7px -4px","0px 7px 8px -4px","0px 7px 8px -4px","0px 7px 9px -4px","0px 8px 9px -5px","0px 8px 10px -5px","0px 8px 11px -5px","0px 9px 11px -5px","0px 9px 12px -6px","0px 10px 13px -6px","0px 10px 13px -6px","0px 10px 14px -6px","0px 11px 14px -7px","0px 11px 15px -7px"],ys=`color-mix(in srgb, var(--m3e-elevation-color, ${ps.shadow}) 14%, transparent)`,gs=["0px 0px 0px 0px","0px 1px 1px 0px","0px 2px 2px 0px","0px 3px 4px 0px","0px 4px 5px 0px","0px 5px 8px 0px","0px 6px 10px 0px","0px 7px 10px 1px","0px 8px 10px 1px","0px 9px 12px 1px","0px 10px 14px 1px","0px 11px 15px 1px","0px 12px 17px 2px","0px 13px 19px 2px","0px 14px 21px 2px","0px 15px 22px 2px","0px 16px 24px 2px","0px 17px 26px 2px","0px 18px 28px 2px","0px 19px 29px 2px","0px 20px 31px 3px","0px 21px 33px 3px","0px 22px 35px 3px","0px 23px 36px 3px","0px 24px 38px 3px"],bs=`color-mix(in srgb, var(--m3e-elevation-color, ${ps.shadow}) 12%, transparent)`,xs=["0px 0px 0px 0px","0px 1px 3px 0px","0px 1px 5px 0px","0px 1px 8px 0px","0px 1px 10px 0px","0px 1px 14px 0px","0px 1px 18px 0px","0px 2px 16px 1px","0px 3px 14px 2px","0px 3px 16px 2px","0px 4px 18px 3px","0px 4px 20px 3px","0px 5px 22px 4px","0px 5px 24px 4px","0px 5px 26px 4px","0px 6px 28px 5px","0px 6px 30px 5px","0px 6px 32px 5px","0px 7px 34px 6px","0px 7px 36px 6px","0px 8px 38px 7px","0px 8px 40px 7px","0px 8px 42px 7px","0px 9px 44px 8px","0px 9px 46px 8px"];function ws(e){return`${fs} ${vs[e]},${ys} ${gs[e]},${bs} ${xs[e]}`}const $s={level0:i(`var(--md-sys-elevation-level0, ${ws(0)})`),level1:i(`var(--md-sys-elevation-level1, ${ws(1)})`),level2:i(`var(--md-sys-elevation-level2, ${ws(3)})`),level3:i(`var(--md-sys-elevation-level3, ${ws(6)})`),level4:i(`var(--md-sys-elevation-level4, ${ws(8)})`),level5:i(`var(--md-sys-elevation-level5, ${ws(12)})`)},ks={emphasized:i("var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0.0, 0, 1.0))"),emphasizedDecelerate:i("var(--md-sys-motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1.0))"),emphasizedAccelerate:i("var(--md-sys-motion-easing-emphasized-accelerate, cubic-bezier(0.3, 0.0, 0.8, 0.15))"),standard:i("var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0.0, 0, 1.0))"),standardDecelerate:i("var(--md-sys-motion-easing-standard-decelerate, cubic-bezier(0, 0, 0, 1))"),standardAccelerate:i("var(--md-sys-motion-easing-standard-accelerate, cubic-bezier(0.3, 0, 1, 1))")},Es={fastSpatial:i("var(--md-sys-motion-spring-fast-spatial, 350ms cubic-bezier(0.27, 1.06, 0.18, 1.00))"),defaultSpatial:i("var(--md-sys-motion-spring-default-spatial, 500ms cubic-bezier(0.27, 1.06, 0.18, 1.00))"),slowSpatial:i("var(--md-sys-motion-spring-slow-spatial, 750ms cubic-bezier(0.27, 1.06, 0.18, 1.00))"),fastEffects:i("var(--md-sys-motion-spring-fast-effects, 150ms cubic-bezier(0.31, 0.94, 0.34, 1.00))"),defaultEffects:i("var(--md-sys-motion-spring-default-effects, 200ms cubic-bezier(0.34, 0.80, 0.34, 1.00))"),slowEffects:i("var(--md-sys-motion-spring-slow-effects, 200ms cubic-bezier(0.34, 0.88, 0.34, 1.00))")},_s={easing:ks,duration:{short1:i("var(--md-sys-motion-duration-short-1, 50ms)"),short2:i("var(--md-sys-motion-duration-short-2, 100ms)"),short3:i("var(--md-sys-motion-duration-short-3, 150ms)"),short4:i("var(--md-sys-motion-duration-short-4, 200ms)"),medium1:i("var(--md-sys-motion-duration-medium-1, 250ms)"),medium2:i("var(--md-sys-motion-duration-medium-2, 300ms)"),medium3:i("var(--md-sys-motion-duration-medium-3, 350ms)"),medium4:i("var(--md-sys-motion-duration-medium-4, 400ms)"),long1:i("var(--md-sys-motion-duration-long-1, 450ms)"),long2:i("var(--md-sys-motion-duration-long-2, 500ms)"),long3:i("var(--md-sys-motion-duration-long-3, 550ms)"),long4:i("var(--md-sys-motion-duration-long-4, 600ms)"),extraLong1:i("var(--md-sys-motion-duration-extra-long-1, 700ms)"),extraLong2:i("var(--md-sys-motion-duration-extra-long-2, 800ms)"),extraLong3:i("var(--md-sys-motion-duration-extra-long-3, 900ms)"),extraLong4:i("var(--md-sys-motion-duration-extra-long-4, 1000ms)")},spring:Es},Ss={width:i("var(--m3e-scrollbar-width, auto)"),thinWidth:i("var(--m3e-scrollbar-thin-width, thin)"),color:i("var(--m3e-scrollbar-thumb-color, #938f94) var(--m3e-scrollbar-track-color, transparent)")},As={none:i("var(--md-sys-shape-corner-value-none, 0)"),extraSmall:i("var(--md-sys-shape-corner-value-extra-small, 0.25rem)"),small:i("var(--md-sys-shape-corner-value-small, 0.5rem)"),medium:i("var(--md-sys-shape-corner-value-medium, 0.75rem)"),large:i("var(--md-sys-shape-corner-value-large, 1rem)"),largeIncreased:i("var(--md-sys-shape-corner-value-large-increased, 1.25rem)"),extraLarge:i("var(--md-sys-shape-corner-value-extra-large, 1.75rem)"),extraLargeIncreased:i("var(--md-sys-shape-corner-value-extra-large-increased, 2rem)"),extraExtraLarge:i("var(--md-sys-shape-corner-value-extra-extra-large, 3rem)")},Cs={color:ps,elevation:$s,motion:_s,shape:{corner:{full:i("var(--md-sys-shape-corner-full, 624.9375rem)"),extraLargeTop:i(`var(--md-sys-shape-corner-extra-large-top, ${As.extraLarge} ${As.extraLarge} ${As.none} ${As.none})`),extraLarge:i(`var(--md-sys-shape-corner-extra-large, ${As.extraLarge})`),extraLargeEnd:i(`${As.none} ${As.extraLarge} ${As.extraLarge} ${As.none}`),extraLargeStart:i(`${As.extraLarge} ${As.none} ${As.none} ${As.extraLarge}`),largeTop:i(`var(--md-sys-shape-corner-large-top, ${As.large} ${As.large} ${As.none} ${As.none})`),largeEnd:i(`var(--md-sys-shape-corner-large-end, ${As.none} ${As.large} ${As.large} ${As.none})`),largeStart:i(`var(--md-sys-shape-corner-large-end, ${As.large} ${As.none} ${As.none} ${As.large})`),large:i(`var(--md-sys-shape-corner-large, ${As.large})`),medium:i(`var(--md-sys-shape-corner-medium, ${As.medium})`),mediumTop:i(`${As.medium} ${As.medium} ${As.none} ${As.none}`),mediumEnd:i(`${As.none} ${As.medium} ${As.medium} ${As.none}`),mediumStart:i(`${As.medium} ${As.none} ${As.none} ${As.medium}`),small:i(`var(--md-sys-shape-corner-small, ${As.small})`),smallTop:i(`${As.small} ${As.small} ${As.none} ${As.none}`),smallEnd:i(`${As.none} ${As.small} ${As.small} ${As.none}`),smallStart:i(`${As.small} ${As.none} ${As.none} ${As.small}`),extraSmallTop:i(`var(--md-sys-shape-corner-extra-small-top, ${As.extraSmall} ${As.extraSmall} ${As.none} ${As.none})`),extraSmall:i(`var(--md-sys-shape-corner-extra-small, ${As.extraSmall})`),extraSmallEnd:i(`${As.none} ${As.extraSmall} ${As.extraSmall} ${As.none}`),extraSmallStart:i(`${As.extraSmall} ${As.none} ${As.none} ${As.extraSmall}`),extraSmallBottom:i(`${As.none} ${As.none} ${As.extraSmall} ${As.extraSmall}`),none:i(`var(--md-sys-shape-corner-none, ${As.none})`),largeIncreased:i(`var(--md-sys-shape-corner-large-increased, ${As.largeIncreased})`),extraLargeIncreased:i(`var(--md-sys-shape-corner-extra-large-increased, ${As.extraLargeIncreased})`),extraExtraLarge:i(`var(--md-sys-shape-corner-extra-extra-large, ${As.extraExtraLarge})`),value:As}},state:{focusStateLayerOpacity:i("var(--md-sys-state-focus-state-layer-opacity, 10%)"),hoverStateLayerOpacity:i("var(--md-sys-state-hover-state-layer-opacity, 8%)"),pressedStateLayerOpacity:i("var(--md-sys-state-pressed-state-layer-opacity, 10%)")},typescale:{standard:{display:{large:{fontSize:i("var(--md-sys-typescale-display-large-font-size, 3.5625rem)"),fontWeight:i("var(--md-sys-typescale-display-large-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-display-large-line-height, 4rem)"),tracking:i("var(--md-sys-typescale-display-large-tracking, 0.015625rem)")},medium:{fontSize:i("var(--md-sys-typescale-display-medium-font-size, 2.8125rem)"),fontWeight:i("var(--md-sys-typescale-display-medium-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-display-medium-line-height, 3.25rem)"),tracking:i("var(--md-sys-typescale-display-medium-tracking, 0)")},small:{fontSize:i("var(--md-sys-typescale-display-small-font-size, 2.25rem)"),fontWeight:i("var(--md-sys-typescale-display-small-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-display-small-line-height, 2.75rem)"),tracking:i("var(--md-sys-typescale-display-small-tracking, 0)")}},headline:{large:{fontSize:i("var(--md-sys-typescale-headline-large-font-size, 2rem)"),fontWeight:i("var(--md-sys-typescale-headline-large-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-headline-large-line-height, 2.5rem)"),tracking:i("var(--md-sys-typescale-headline-large-tracking, 0)")},medium:{fontSize:i("var(--md-sys-typescale-headline-medium-font-size, 1.75rem)"),fontWeight:i("var(--md-sys-typescale-headline-medium-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-headline-medium-line-height, 2.25rem)"),tracking:i("var(--md-sys-typescale-headline-medium-tracking, 0)")},small:{fontSize:i("var(--md-sys-typescale-headline-small-font-size, 1.5rem)"),fontWeight:i("var(--md-sys-typescale-headline-small-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-headline-small-line-height, 2rem)"),tracking:i("var(--md-sys-typescale-headline-small-tracking, 0)")}},title:{large:{fontSize:i("var(--md-sys-typescale-title-large-font-size, 1.375rem)"),fontWeight:i("var(--md-sys-typescale-title-large-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-title-large-line-height, 1.75rem)"),tracking:i("var(--md-sys-typescale-title-large-tracking, 0)")},medium:{fontSize:i("var(--md-sys-typescale-title-medium-font-size, 1rem)"),fontWeight:i("var(--md-sys-typescale-title-medium-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-title-medium-line-height, 1.5rem)"),tracking:i("var(--md-sys-typescale-title-medium-tracking, 0.009375rem)")},small:{fontSize:i("var(--md-sys-typescale-title-small-font-size, 0.875rem)"),fontWeight:i("var(--md-sys-typescale-title-small-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-title-small-line-height, 1.25rem)"),tracking:i("var(--md-sys-typescale-title-small-tracking, 0.00625rem)")}},body:{large:{fontSize:i("var(--md-sys-typescale-body-large-font-size, 1rem)"),fontWeight:i("var(--md-sys-typescale-body-large-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-body-large-line-height, 1.5rem)"),tracking:i("var(--md-sys-typescale-body-large-tracking, 0.03125rem)")},medium:{fontSize:i("var(--md-sys-typescale-body-medium-font-size, 0.875rem)"),fontWeight:i("var(--md-sys-typescale-body-medium-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-body-medium-line-height, 1.25rem)"),tracking:i("var(--md-sys-typescale-body-medium-tracking, 0.015625rem)")},small:{fontSize:i("var(--md-sys-typescale-body-small-font-size, 0.75rem)"),fontWeight:i("var(--md-sys-typescale-body-small-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-body-small-line-height, 1rem)"),tracking:i("var(--md-sys-typescale-body-small-tracking, 0.025rem)")}},label:{large:{fontSize:i("var(--md-sys-typescale-label-large-font-size, 0.875rem)"),fontWeight:i("var(--md-sys-typescale-label-large-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-label-large-line-height, 1.25rem)"),tracking:i("var(--md-sys-typescale-label-large-tracking, 0.00625rem)")},medium:{fontSize:i("var(--md-sys-typescale-label-medium-font-size, 0.75rem)"),fontWeight:i("var(--md-sys-typescale-label-medium-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-label-medium-line-height, 1rem)"),tracking:i("var(--md-sys-typescale-label-medium-tracking, 0.03125rem)")},small:{fontSize:i("var(--md-sys-typescale-label-small-font-size, 0.6875rem)"),fontWeight:i("var(--md-sys-typescale-label-small-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-label-small-line-height, 1rem)"),tracking:i("var(--md-sys-typescale-label-small-tracking, 0.03125rem)")}}},emphasized:{display:{large:{fontSize:i("var(--md-sys-typescale-emphasized-display-large-font-size, 3.5625rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-display-large-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-display-large-line-height, 4rem)"),tracking:i("var(--md-sys-typescale-emphasized-display-large-tracking, 0.015625rem)")},medium:{fontSize:i("var(--md-sys-typescale-emphasized-display-medium-font-size, 2.8125rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-display-medium-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-display-medium-line-height, 3.25rem)"),tracking:i("var(--md-sys-typescale-emphasized-display-medium-tracking, 0)")},small:{fontSize:i("var(--md-sys-typescale-emphasized-display-small-font-size, 2.25rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-display-small-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-display-small-line-height, 2.75rem)"),tracking:i("var(--md-sys-typescale-emphasized-display-small-tracking, 0)")}},headline:{large:{fontSize:i("var(--md-sys-typescale-emphasized-headline-large-font-size, 2rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-headline-large-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-headline-large-line-height, 2.5rem)"),tracking:i("var(--md-sys-typescale-emphasized-headline-large-tracking, 0)")},medium:{fontSize:i("var(--md-sys-typescale-emphasized-headline-medium-font-size, 1.75rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-headline-medium-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-headline-medium-line-height, 2.25rem)"),tracking:i("var(--md-sys-typescale-emphasized-headline-medium-tracking, 0)")},small:{fontSize:i("var(--md-sys-typescale-emphasized-headline-small-font-size, 1.5rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-headline-small-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-headline-small-line-height, 2rem)"),tracking:i("var(--md-sys-typescale-emphasized-headline-small-tracking, 0)")}},title:{large:{fontSize:i("var(--md-sys-typescale-emphasized-title-large-font-size, 1.375rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-title-large-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-title-large-line-height, 1.75rem)"),tracking:i("var(--md-sys-typescale-emphasized-title-large-tracking, 0)")},medium:{fontSize:i("var(--md-sys-typescale-emphasized-title-medium-font-size, 1rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-title-medium-font-weight, 700)"),lineHeight:i("var(--md-sys-typescale-emphasized-title-medium-line-height, 3.5rem)"),tracking:i("var(--md-sys-typescale-emphasized-title-medium-tracking, 0.009375rem)")},small:{fontSize:i("var(--md-sys-typescale-emphasized-title-small-font-size, 0.875rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-title-small-font-weight, 700)"),lineHeight:i("var(--md-sys-typescale-emphasized-title-small-line-height, 1.25rem)"),tracking:i("var(--md-sys-typescale-emphasized-title-small-tracking, 0.00625rem)")}},body:{large:{fontSize:i("var(--md-sys-typescale-emphasized-body-large-font-size, 1rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-body-large-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-body-large-line-height, 1.5rem)"),tracking:i("var(--md-sys-typescale-emphasized-body-large-tracking, 0.03125rem)")},medium:{fontSize:i("var(--md-sys-typescale-emphasized-body-medium-font-size, 0.875rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-body-medium-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-body-medium-line-height, 1.25rem)"),tracking:i("var(--md-sys-typescale-emphasized-body-medium-tracking, 0.015625rem)")},small:{fontSize:i("var(--md-sys-typescale-emphasized-body-small-font-size, 0.75rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-body-small-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-body-small-line-height, 1rem)"),tracking:i("var(--md-sys-typescale-emphasized-body-small-tracking, 0.025rem)")}},label:{large:{fontSize:i("var(--md-sys-typescale-emphasized-label-large-font-size, 0.875rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-label-large-font-weight, 700)"),lineHeight:i("var(--md-sys-typescale-emphasized-label-large-line-height, 1.25rem)"),tracking:i("var(--md-sys-typescale-emphasized-label-large-tracking, 0.00625rem)")},medium:{fontSize:i("var(--md-sys-typescale-emphasized-label-medium-font-size, 0.75rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-label-medium-font-weight, 700)"),lineHeight:i("var(--md-sys-typescale-emphasized-label-medium-line-height, 1rem)"),tracking:i("var(--md-sys-typescale-emphasized-label-medium-tracking, 0.03125rem)")},small:{fontSize:i("var(--md-sys-typescale-emphasized-label-small-font-size, 0.6875rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-label-small-font-weight, 700)"),lineHeight:i("var(--md-sys-typescale-emphasized-label-small-line-height, 1rem)"),tracking:i("var(--md-sys-typescale-emphasized-label-small-tracking, 0.03125rem)")}}}},scrollbar:Ss,density:ms};function Ls(e){return xt(e,"disabled")}function Ms(e,t=!0){class s extends e{constructor(){super(...arguments),this.disabled=!1}update(e){super.update(e),e.has("disabled")&&this.role&&"none"!==this.role&&"presentation"!==this.role&&(this.ariaDisabled=this.disabled?"true":null)}}return o([Kt({type:Boolean,reflect:t})],s.prototype,"disabled",void 0),s}function zs(e){return xt(e,"disabledInteractive")&&Ls(e)}const Ws=["click","dblclick","auxclick","keydown","keyup"],Ps=["Tab","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Left","Up","Right","Down"],Ts=Symbol("_suppressedEventHandler");function Hs(e){var t;class s extends e{constructor(){super(...arguments),this[t]=e=>{if(this.disabledInteractive){if(e instanceof KeyboardEvent&&Ps.includes(e.key))return;e.stopImmediatePropagation(),e.preventDefault()}},this.disabledInteractive=!1}connectedCallback(){Ws.forEach(e=>this.addEventListener(e,this[Ts],!0)),super.connectedCallback()}disconnectedCallback(){Ws.forEach(e=>this.removeEventListener(e,this[Ts],!0)),super.disconnectedCallback()}update(e){super.update(e),(e.has("disabled")||e.has("disabledInteractive"))&&this.role&&"none"!==this.role&&"presentation"!==this.role&&"none"!==this.role&&(this.ariaDisabled=this.disabled||this.disabledInteractive?"true":null)}}return t=Ts,o([Kt({attribute:"disabled-interactive",type:Boolean,reflect:!0})],s.prototype,"disabledInteractive",void 0),s}const Fs=Symbol("updateLabels");function Os(e){return xt(e,"labels")&&$t(e)}const Ds=Symbol("_eventHandler");function Us(e){var t;class s extends e{constructor(){super(...arguments),this[t]=e=>{e.defaultPrevented||this[Fs]()}}get labels(){return this[wt].labels}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this[Ds]),this.addEventListener("change",this[Ds])}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusout",this[Ds]),this.removeEventListener("change",this[Ds])}update(e){super.update(e),this[Fs]()}[(t=Ds,Fs)](){const e=this.hasAttribute("tabindex"),t=Ls(this)&&this.disabled||zs(this)&&this.disabledInteractive,s=hs(this)&&this.touched&&(this.ariaInvalid||this.classList.contains("-invalid"));for(const i of this.labels??[])i.style.userSelect=e?"none":"",i.style.cursor=!t&&e?"pointer":"",!t&&e?i.style.setProperty("-webkit-tap-highlight-color","rgba(0, 0, 0, 0)"):i.style.removeProperty("-webkit-tap-highlight-color"),i.style.color=t?`color-mix(in srgb, ${Cs.color.onSurface} 38%, transparent)`:s?`${Cs.color.error}`:""}}return s.formAssociated=!0,s}const Ns=Symbol("formValue"),Is=Symbol("defaultValue");function Rs(e){return xt(e,"disabled","form","name")&&Os(e)&&$t(e)}const Bs=Symbol("_defaultValue"),qs=Symbol("_defaultIndeterminate"),Vs=Symbol("_formDisabled");function js(e){var t,s;class i extends e{constructor(){super(...arguments),this[t]=!1,this[s]=!1}get form(){return this[wt].form}get labels(){return this[wt].labels}get[(t=qs,s=Vs,Ns)](){return null}get[Is](){return this[Bs]}get name(){return this.getAttribute("name")??""}set name(e){e?this.setAttribute("name",e):this.removeAttribute("name")}get disabled(){return super.disabled||this[Vs]}set disabled(e){super.disabled=e}connectedCallback(){super.connectedCallback(),Qt(this)?(this[Bs]=this.checked,Jt(this)&&(this[qs]=this.indeterminate)):"value"in this&&(this[Bs]=this.value)}requestUpdate(e,t,s){super.requestUpdate(e,t,s),this[wt].setFormValue(this[Ns])}formDisabledCallback(e){const t=this.disabled;this[Vs]=e,this.disabled!=t&&this.requestUpdate("disabled",t)}formResetCallback(){Qt(this)?(this.checked=!0===this[Bs],Jt(this)&&(this.indeterminate=this[qs])):"value"in this&&(this.value=this[Is]),ns(this)&&this.markAsPristine(),hs(this)&&this.markAsUntouched()}}return i.formAssociated=!0,o([Kt({noAccessor:!0})],i.prototype,"name",null),o([Kt({type:Boolean})],i.prototype,"disabled",null),i}const Xs=Symbol("validate");function Zs(e){return xt(e,"willValidate","validity","validationMessage","reportValidity","checkValidity","setCustomValidity")&&Rs(e)}const Ks=Symbol("_updateValidity"),Ys=Symbol("_validityMessage");function Qs(t){var s,i;class r extends t{constructor(){super(...arguments),s.add(this)}get willValidate(){return this[wt].willValidate}get validity(){return this[Ks](),this[wt].validity}get validationMessage(){return this[Ks](),this[wt].validationMessage}[(s=new WeakSet,Xs)](){return this[Ys]?{customError:!0}:void 0}reportValidity(){return hs(this)&&this.markAsTouched(),this[Ks](),this[wt].reportValidity()}checkValidity(){return this[Ks](),this[wt].checkValidity()}setCustomValidity(e){this[Ys]=e||void 0,this[Ks]()}requestUpdate(e,t,s){super.requestUpdate(e,t,s),this[Ks]()}firstUpdated(e){super.firstUpdated(e),this[Ks]()}[Ks](){if(e||!this.isConnected)return;const t=this[Xs](),r=t&&Object.keys(t).some(e=>!0===t[e]);let a=t?.customError?this[Ys]:"";t&&!a&&(a=l(this,s,"m",i).call(this,t)),this[wt].setValidity(t,a),this.ariaInvalid=r?"true":null,this.classList.toggle("-invalid",!0===r),Os(this)&&this[Fs]?.()}}return i=function(e){const t=document.createElement("input");return t.type="text",e.valueMissing&&(t.required=!0,t.value=""),e.typeMismatch&&(t.type="email",t.value="not-an-email"),e.patternMismatch&&(t.pattern="[0-9]{4}",t.value="abcd"),e.tooShort&&(t.minLength=5,t.value="abc"),e.tooLong&&(t.maxLength=2,t.value="abcdef"),e.rangeUnderflow&&(t.type="number",t.min="10",t.value="5"),e.rangeOverflow&&(t.type="number",t.max="5",t.value="10"),e.stepMismatch&&(t.type="number",t.step="2",t.value="3"),e.badInput&&(t.type="number",t.value="abc"),t.setCustomValidity(""),t.checkValidity(),t.validationMessage},r}function Gs(e,...t){return class extends e{dispatchEvent(e){if(t.includes(e.type)){const t=this.getAttribute(`on${e.type}`);t&&new Function("e",`${t};`).call(this,e)}return super.dispatchEvent(e)}}}const Js=Symbol("_tabindex");function ei(e){var t;return t=Js,class extends e{constructor(){super(...arguments),this[t]=0}connectedCallback(){this[Js]=Number.parseInt(this.getAttribute("tabindex")??"0"),super.connectedCallback()}firstUpdated(e){super.firstUpdated(e),this.hasAttribute("tabindex")||e.has("disabled")||this.setAttribute("tabindex",`${this[Js]}`)}update(e){if(super.update(e),e.has("disabled"))if(this.disabled||"none"===this.role){const e=this.getAttribute("tabindex");e&&(this[Js]=Number.parseInt(e)),this.removeAttribute("tabindex")}else this.hasAttribute("tabindex")||this.setAttribute("tabindex",`${this[Js]}`)}}}function ti(e){return xt(e,"name","type","value")&&$t(e)}const si=Symbol("_clickHandler");function ii(e){var t;class s extends e{constructor(){super(...arguments),this.type="button",this[t]=async e=>{if(e.defaultPrevented||Ls(this)&&this.disabled||zs(this)&&this.disabledInteractive)return;const t=this[wt].form;if(t&&"button"!==this.type&&(await new Promise(e=>setTimeout(e)),!e.defaultPrevented))switch(this.type){case"reset":t.reset();break;case"submit":t.addEventListener("submit",e=>Object.defineProperty(e,"submitter",{configurable:!0,enumerable:!0,get:()=>this}),{capture:!0,once:!0}),this[wt].setFormValue(this.value),t.requestSubmit()}}}get name(){return this.getAttribute("name")??""}set name(e){e?this.setAttribute("name",e):this.removeAttribute("name")}get value(){return this.getAttribute("value")}set value(e){null!=e?this.setAttribute("value",e):this.removeAttribute("value")}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this[si])}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this[si])}}return t=si,s.formAssociated=!0,o([Kt()],s.prototype,"name",null),o([Kt()],s.prototype,"value",null),o([Kt()],s.prototype,"type",void 0),s}function ri(e){return xt(e,"htmlFor","control","attach","detach")}const ai=Symbol("_control"),ni=Symbol("_firstUpdated");function oi(e){var t,s;class i extends e{constructor(){super(...arguments),this[t]=null,this[s]=!1,this.htmlFor=null}get control(){return this[ai]}firstUpdated(e){super.firstUpdated(e),this[ni]=!0}update(e){if(super.update(e),e.has("htmlFor"))if(this.htmlFor){const e=this.getRootNode();e&&it(this.htmlFor,e).then(e=>{e!==this.control&&(this.control&&this.detach(),e instanceof HTMLElement&&this.attach(e))})}else this.control&&this[ni]&&this.detach()}attach(e){this[ai]=e}detach(){this[ai]=null}}return t=ai,s=ni,o([Kt({attribute:"for"})],i.prototype,"htmlFor",void 0),i}function li(e,t=!0){var s,i,r,a,n,o,c;return i=new WeakMap,r=new WeakMap,a=new WeakMap,n=new WeakMap,s=new WeakSet,o=function(e){e.defaultPrevented||e.target!==e.currentTarget||Ls(this)&&this.disabled||zs(this)&&this.disabledInteractive||(" "===e.key||t&&"Enter"===e.key)&&h(this,i,!0,"f")},c=function(e){e.defaultPrevented||e.target!==e.currentTarget||Ls(this)&&this.disabled||zs(this)&&this.disabledInteractive||!l(this,i,"f")||this.dispatchEvent(new MouseEvent("click",{cancelable:!0,bubbles:!0,composed:!0}))},class extends e{constructor(){super(...arguments),s.add(this),i.set(this,!1),r.set(this,e=>l(this,s,"m",o).call(this,e)),a.set(this,e=>l(this,s,"m",c).call(this,e)),n.set(this,()=>h(this,i,!1,"f"))}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",l(this,r,"f")),this.addEventListener("keyup",l(this,a,"f")),this.addEventListener("focusout",l(this,n,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",l(this,r,"f")),this.removeEventListener("keyup",l(this,a,"f")),this.removeEventListener("focusout",l(this,n,"f"))}}}
|
|
44
|
+
function Yt(e,t){return(t,s,i)=>((e,t,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,s),s))(t,s,{get(){return(t=>t.renderRoot?.querySelector(e)??null)(this)}})}function Qt(e){return xt(e,"checked")}function Gt(e){class t extends e{constructor(){super(...arguments),this.checked=!1}update(e){super.update(e),e.has("checked")&&("button"===this.role?(this.ariaPressed=`${this.checked}`,this.ariaChecked=null):this.role&&"none"!==this.role&&"presentation"!==this.role&&(this.ariaChecked=`${this.checked}`,this.ariaPressed=null))}}return o([Kt({type:Boolean,reflect:!0})],t.prototype,"checked",void 0),t}function Jt(e){return xt(e,"indeterminate")&&Qt(e)}function es(e){class t extends(Gt(e)){constructor(){super(...arguments),this.indeterminate=!1}update(e){super.update(e),e.has("indeterminate")&&this.role&&"none"!==this.role&&"presentation"!==this.role&&(this.ariaChecked=!this.checked&&this.indeterminate?"mixed":`${this.checked}`)}}return o([Kt({type:Boolean,reflect:!0})],t.prototype,"indeterminate",void 0),t}function ts(e){return xt(e,"selected")}function ss(e){class t extends e{constructor(){super(...arguments),this.selected=!1}update(e){super.update(e),e.has("selected")&&("button"===this.role?(this.ariaPressed=`${this.selected}`,this.ariaSelected=null,this.ariaChecked=null):"radio"===this.role?(this.ariaChecked=`${this.selected}`,this.ariaSelected=null,this.ariaPressed=null):this.role&&"none"!==this.role&&"presentation"!==this.role&&(this.ariaSelected=`${this.selected}`,this.ariaPressed=null,this.ariaChecked=null))}}return o([Kt({type:Boolean,reflect:!0})],t.prototype,"selected",void 0),t}function is(e){return Qt(e)||ts(e)}function rs(e){return Qt(e)&&e.checked||ts(e)&&e.selected}function as(e,t){Qt(e)?e.checked=t:e.selected=t}function ns(e){return xt(e,"dirty","pristine","markAsDirty","markAsPristine")}const os=Symbol("_eventHandler");function ls(e){var t;return t=os,class extends e{constructor(){super(...arguments),this[t]=()=>this.markAsDirty()}get dirty(){return this.classList.contains("-dirty")}get pristine(){return!this.dirty}connectedCallback(){this.markAsPristine(),super.connectedCallback(),this.addEventListener("change",this[os])}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",this[os])}markAsPristine(){this.classList.toggle("-dirty",!1)}markAsDirty(){this.classList.toggle("-dirty",!0)}}}function hs(e){return xt(e,"touched","untouched","markAsTouched","markAsUntouched")}const cs=Symbol("_eventHandler");function ds(e){var t;return t=cs,class extends e{constructor(){super(...arguments),this[t]=()=>this.markAsTouched()}get touched(){return this.classList.contains("-touched")}get untouched(){return!this.touched}connectedCallback(){this.markAsUntouched(),super.connectedCallback(),this.addEventListener("focusout",this[cs],{capture:!0})}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusout",this[cs],{capture:!0})}markAsTouched(){this.classList.toggle("-touched",!0)}markAsUntouched(){this.classList.toggle("-touched",!1)}}}const ps={primary:i("var(--md-sys-color-primary, #6750A4)"),onPrimary:i("var(--md-sys-color-on-primary, #FFFFFF)"),primaryContainer:i("var(--md-sys-color-primary-container, #EADDFF)"),onPrimaryContainer:i("var(--md-sys-color-on-primary-container, #4F378B)"),primaryFixed:i("var(--md-sys-color-primary-fixed, #EADDFF)"),primaryFixedDim:i("var(--md-sys-color-primary-fixed-dim, #D0BCFF)"),onPrimaryFixed:i("var(--md-sys-color-on-primary-fixed, #21005D)"),onPrimaryFixedVariant:i("var(--md-sys-color-on-primary-fixed-variant, #4F378B)"),secondary:i("var(--md-sys-color-secondary, #625B71)"),onSecondary:i("var(--md-sys-color-on-secondary, #FFFFFF)"),secondaryContainer:i("var(--md-sys-color-secondary-container, #E8DEF8)"),onSecondaryContainer:i("var(--md-sys-color-on-secondary-container, #4A4458)"),secondaryFixed:i("var(--md-sys-color-secondary-fixed, #E8DEF8)"),secondaryFixedDim:i("var(--md-sys-color-secondary-fixed-dim, #CCC2DC)"),onSecondaryFixed:i("var(--md-sys-color-on-secondary-fixed, #1D192B)"),onSecondaryFixedVariant:i("var(--md-sys-color-on-secondary-fixed-variant, #4A4458)"),tertiary:i("var(--md-sys-color-tertiary, #7D5260)"),onTertiary:i("var(--md-sys-color-on-tertiary, #FFFFFF)"),tertiaryContainer:i("var(--md-sys-color-tertiary-container, #FFD8E4)"),onTertiaryContainer:i("var(--md-sys-color-on-tertiary-container, #633B48)"),tertiaryFixed:i("var(--md-sys-color-tertiary-fixed, #FFD8E4)"),tertiaryFixedDim:i("var(--md-sys-color-tertiary-fixed-dim, #EFB8C8)"),onTertiaryFixed:i("var(--md-sys-color-on-tertiary-fixed, #31111D)"),onTertiaryFixedVariant:i("var(--md-sys-color-on-tertiary-fixed-variant, #633B48)"),error:i("var(--md-sys-color-error, #B3261E)"),onError:i("var(--md-sys-color-on-error, #FFFFFF)"),errorContainer:i("var(--md-sys-color-error-container, #F9DEDC)"),onErrorContainer:i("var(--md-sys-color-on-error-container, #8C1D18)"),surface:i("var(--md-sys-color-surface, #FEF7FF)"),onSurface:i("var(--md-sys-color-on-surface, #1D1B20)"),onSurfaceVariant:i("var(--md-sys-color-on-surface-variant, #49454F)"),surfaceContainerLowest:i("var(--md-sys-color-surface-container-lowest, #FFFFFF)"),surfaceContainerLow:i("var(--md-sys-color-surface-container-low, #F7F2FA)"),surfaceContainer:i("var(--md-sys-color-surface-container, #F3EDF7)"),surfaceContainerHigh:i("var(--md-sys-color-surface-container-high, #ECE6F0)"),surfaceContainerHighest:i("var(--md-sys-color-surface-container-highest, #E6E0E9)"),surfaceDim:i("var(--md-sys-color-surface-dim, #DED8E1)"),surfaceBright:i("var(--md-sys-color-surface-bright, #FEF7FF)"),surfaceVariant:i("var(--md-sys-color-surface-variant, #E7E0EC)"),inverseSurface:i("var(--md-sys-color-inverse-surface, #322F35)"),inverseOnSurface:i("var(--md-sys-color-inverse-on-surface, #F5EFF7)"),inversePrimary:i("var(--md-sys-color-inverse-primary, #D0BCFF)"),outline:i("var(--md-sys-color-outline, #79747E)"),outlineVariant:i("var(--md-sys-color-outline-variant, #CAC4D0)"),shadow:i("var(--md-sys-color-shadow, #000000)"),scrim:i("var(--md-sys-color-scrim, #000000)")},us={scale:i("var(--md-sys-density-scale, 0)"),size:i("var(--md-sys-density-size, 0.25rem)")},ms={...us,calc:e=>i(`calc(max(${e}, ${us.scale}) * ${us.size})`)},fs=`color-mix(in srgb, var(--m3e-elevation-color, ${ps.shadow}) 20%, transparent)`,vs=["0px 0px 0px 0px","0px 2px 1px -1px","0px 3px 1px -2px","0px 3px 3px -2px","0px 2px 4px -1px","0px 3px 5px -1px","0px 3px 5px -1px","0px 4px 5px -2px","0px 5px 5px -3px","0px 5px 6px -3px","0px 6px 6px -3px","0px 6px 7px -4px","0px 7px 8px -4px","0px 7px 8px -4px","0px 7px 9px -4px","0px 8px 9px -5px","0px 8px 10px -5px","0px 8px 11px -5px","0px 9px 11px -5px","0px 9px 12px -6px","0px 10px 13px -6px","0px 10px 13px -6px","0px 10px 14px -6px","0px 11px 14px -7px","0px 11px 15px -7px"],ys=`color-mix(in srgb, var(--m3e-elevation-color, ${ps.shadow}) 14%, transparent)`,gs=["0px 0px 0px 0px","0px 1px 1px 0px","0px 2px 2px 0px","0px 3px 4px 0px","0px 4px 5px 0px","0px 5px 8px 0px","0px 6px 10px 0px","0px 7px 10px 1px","0px 8px 10px 1px","0px 9px 12px 1px","0px 10px 14px 1px","0px 11px 15px 1px","0px 12px 17px 2px","0px 13px 19px 2px","0px 14px 21px 2px","0px 15px 22px 2px","0px 16px 24px 2px","0px 17px 26px 2px","0px 18px 28px 2px","0px 19px 29px 2px","0px 20px 31px 3px","0px 21px 33px 3px","0px 22px 35px 3px","0px 23px 36px 3px","0px 24px 38px 3px"],bs=`color-mix(in srgb, var(--m3e-elevation-color, ${ps.shadow}) 12%, transparent)`,xs=["0px 0px 0px 0px","0px 1px 3px 0px","0px 1px 5px 0px","0px 1px 8px 0px","0px 1px 10px 0px","0px 1px 14px 0px","0px 1px 18px 0px","0px 2px 16px 1px","0px 3px 14px 2px","0px 3px 16px 2px","0px 4px 18px 3px","0px 4px 20px 3px","0px 5px 22px 4px","0px 5px 24px 4px","0px 5px 26px 4px","0px 6px 28px 5px","0px 6px 30px 5px","0px 6px 32px 5px","0px 7px 34px 6px","0px 7px 36px 6px","0px 8px 38px 7px","0px 8px 40px 7px","0px 8px 42px 7px","0px 9px 44px 8px","0px 9px 46px 8px"];function ws(e){return`${fs} ${vs[e]},${ys} ${gs[e]},${bs} ${xs[e]}`}const $s={level0:i(`var(--md-sys-elevation-level0, ${ws(0)})`),level1:i(`var(--md-sys-elevation-level1, ${ws(1)})`),level2:i(`var(--md-sys-elevation-level2, ${ws(3)})`),level3:i(`var(--md-sys-elevation-level3, ${ws(6)})`),level4:i(`var(--md-sys-elevation-level4, ${ws(8)})`),level5:i(`var(--md-sys-elevation-level5, ${ws(12)})`)},ks={emphasized:i("var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0.0, 0, 1.0))"),emphasizedDecelerate:i("var(--md-sys-motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1.0))"),emphasizedAccelerate:i("var(--md-sys-motion-easing-emphasized-accelerate, cubic-bezier(0.3, 0.0, 0.8, 0.15))"),standard:i("var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0.0, 0, 1.0))"),standardDecelerate:i("var(--md-sys-motion-easing-standard-decelerate, cubic-bezier(0, 0, 0, 1))"),standardAccelerate:i("var(--md-sys-motion-easing-standard-accelerate, cubic-bezier(0.3, 0, 1, 1))")},Es={fastSpatial:i("var(--md-sys-motion-spring-fast-spatial, 350ms cubic-bezier(0.27, 1.06, 0.18, 1.00))"),defaultSpatial:i("var(--md-sys-motion-spring-default-spatial, 500ms cubic-bezier(0.27, 1.06, 0.18, 1.00))"),slowSpatial:i("var(--md-sys-motion-spring-slow-spatial, 750ms cubic-bezier(0.27, 1.06, 0.18, 1.00))"),fastEffects:i("var(--md-sys-motion-spring-fast-effects, 150ms cubic-bezier(0.31, 0.94, 0.34, 1.00))"),defaultEffects:i("var(--md-sys-motion-spring-default-effects, 200ms cubic-bezier(0.34, 0.80, 0.34, 1.00))"),slowEffects:i("var(--md-sys-motion-spring-slow-effects, 200ms cubic-bezier(0.34, 0.88, 0.34, 1.00))")},_s={easing:ks,duration:{short1:i("var(--md-sys-motion-duration-short-1, 50ms)"),short2:i("var(--md-sys-motion-duration-short-2, 100ms)"),short3:i("var(--md-sys-motion-duration-short-3, 150ms)"),short4:i("var(--md-sys-motion-duration-short-4, 200ms)"),medium1:i("var(--md-sys-motion-duration-medium-1, 250ms)"),medium2:i("var(--md-sys-motion-duration-medium-2, 300ms)"),medium3:i("var(--md-sys-motion-duration-medium-3, 350ms)"),medium4:i("var(--md-sys-motion-duration-medium-4, 400ms)"),long1:i("var(--md-sys-motion-duration-long-1, 450ms)"),long2:i("var(--md-sys-motion-duration-long-2, 500ms)"),long3:i("var(--md-sys-motion-duration-long-3, 550ms)"),long4:i("var(--md-sys-motion-duration-long-4, 600ms)"),extraLong1:i("var(--md-sys-motion-duration-extra-long-1, 700ms)"),extraLong2:i("var(--md-sys-motion-duration-extra-long-2, 800ms)"),extraLong3:i("var(--md-sys-motion-duration-extra-long-3, 900ms)"),extraLong4:i("var(--md-sys-motion-duration-extra-long-4, 1000ms)")},spring:Es},Ss={width:i("var(--m3e-scrollbar-width, auto)"),thinWidth:i("var(--m3e-scrollbar-thin-width, thin)"),color:i("var(--m3e-scrollbar-thumb-color, #938f94) var(--m3e-scrollbar-track-color, transparent)")},As={none:i("var(--md-sys-shape-corner-value-none, 0)"),extraSmall:i("var(--md-sys-shape-corner-value-extra-small, 0.25rem)"),small:i("var(--md-sys-shape-corner-value-small, 0.5rem)"),medium:i("var(--md-sys-shape-corner-value-medium, 0.75rem)"),large:i("var(--md-sys-shape-corner-value-large, 1rem)"),largeIncreased:i("var(--md-sys-shape-corner-value-large-increased, 1.25rem)"),extraLarge:i("var(--md-sys-shape-corner-value-extra-large, 1.75rem)"),extraLargeIncreased:i("var(--md-sys-shape-corner-value-extra-large-increased, 2rem)"),extraExtraLarge:i("var(--md-sys-shape-corner-value-extra-extra-large, 3rem)")},Cs={color:ps,elevation:$s,motion:_s,shape:{corner:{full:i("var(--md-sys-shape-corner-full, 624.9375rem)"),extraLargeTop:i(`var(--md-sys-shape-corner-extra-large-top, ${As.extraLarge} ${As.extraLarge} ${As.none} ${As.none})`),extraLarge:i(`var(--md-sys-shape-corner-extra-large, ${As.extraLarge})`),extraLargeEnd:i(`${As.none} ${As.extraLarge} ${As.extraLarge} ${As.none}`),extraLargeStart:i(`${As.extraLarge} ${As.none} ${As.none} ${As.extraLarge}`),largeTop:i(`var(--md-sys-shape-corner-large-top, ${As.large} ${As.large} ${As.none} ${As.none})`),largeEnd:i(`var(--md-sys-shape-corner-large-end, ${As.none} ${As.large} ${As.large} ${As.none})`),largeStart:i(`var(--md-sys-shape-corner-large-end, ${As.large} ${As.none} ${As.none} ${As.large})`),large:i(`var(--md-sys-shape-corner-large, ${As.large})`),medium:i(`var(--md-sys-shape-corner-medium, ${As.medium})`),mediumTop:i(`${As.medium} ${As.medium} ${As.none} ${As.none}`),mediumEnd:i(`${As.none} ${As.medium} ${As.medium} ${As.none}`),mediumStart:i(`${As.medium} ${As.none} ${As.none} ${As.medium}`),small:i(`var(--md-sys-shape-corner-small, ${As.small})`),smallTop:i(`${As.small} ${As.small} ${As.none} ${As.none}`),smallEnd:i(`${As.none} ${As.small} ${As.small} ${As.none}`),smallStart:i(`${As.small} ${As.none} ${As.none} ${As.small}`),extraSmallTop:i(`var(--md-sys-shape-corner-extra-small-top, ${As.extraSmall} ${As.extraSmall} ${As.none} ${As.none})`),extraSmall:i(`var(--md-sys-shape-corner-extra-small, ${As.extraSmall})`),extraSmallEnd:i(`${As.none} ${As.extraSmall} ${As.extraSmall} ${As.none}`),extraSmallStart:i(`${As.extraSmall} ${As.none} ${As.none} ${As.extraSmall}`),extraSmallBottom:i(`${As.none} ${As.none} ${As.extraSmall} ${As.extraSmall}`),none:i(`var(--md-sys-shape-corner-none, ${As.none})`),largeIncreased:i(`var(--md-sys-shape-corner-large-increased, ${As.largeIncreased})`),extraLargeIncreased:i(`var(--md-sys-shape-corner-extra-large-increased, ${As.extraLargeIncreased})`),extraExtraLarge:i(`var(--md-sys-shape-corner-extra-extra-large, ${As.extraExtraLarge})`),value:As}},state:{focusStateLayerOpacity:i("var(--md-sys-state-focus-state-layer-opacity, 10%)"),hoverStateLayerOpacity:i("var(--md-sys-state-hover-state-layer-opacity, 8%)"),pressedStateLayerOpacity:i("var(--md-sys-state-pressed-state-layer-opacity, 10%)")},typescale:{standard:{display:{large:{fontSize:i("var(--md-sys-typescale-display-large-font-size, 3.5625rem)"),fontWeight:i("var(--md-sys-typescale-display-large-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-display-large-line-height, 4rem)"),tracking:i("var(--md-sys-typescale-display-large-tracking, 0.015625rem)")},medium:{fontSize:i("var(--md-sys-typescale-display-medium-font-size, 2.8125rem)"),fontWeight:i("var(--md-sys-typescale-display-medium-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-display-medium-line-height, 3.25rem)"),tracking:i("var(--md-sys-typescale-display-medium-tracking, 0)")},small:{fontSize:i("var(--md-sys-typescale-display-small-font-size, 2.25rem)"),fontWeight:i("var(--md-sys-typescale-display-small-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-display-small-line-height, 2.75rem)"),tracking:i("var(--md-sys-typescale-display-small-tracking, 0)")}},headline:{large:{fontSize:i("var(--md-sys-typescale-headline-large-font-size, 2rem)"),fontWeight:i("var(--md-sys-typescale-headline-large-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-headline-large-line-height, 2.5rem)"),tracking:i("var(--md-sys-typescale-headline-large-tracking, 0)")},medium:{fontSize:i("var(--md-sys-typescale-headline-medium-font-size, 1.75rem)"),fontWeight:i("var(--md-sys-typescale-headline-medium-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-headline-medium-line-height, 2.25rem)"),tracking:i("var(--md-sys-typescale-headline-medium-tracking, 0)")},small:{fontSize:i("var(--md-sys-typescale-headline-small-font-size, 1.5rem)"),fontWeight:i("var(--md-sys-typescale-headline-small-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-headline-small-line-height, 2rem)"),tracking:i("var(--md-sys-typescale-headline-small-tracking, 0)")}},title:{large:{fontSize:i("var(--md-sys-typescale-title-large-font-size, 1.375rem)"),fontWeight:i("var(--md-sys-typescale-title-large-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-title-large-line-height, 1.75rem)"),tracking:i("var(--md-sys-typescale-title-large-tracking, 0)")},medium:{fontSize:i("var(--md-sys-typescale-title-medium-font-size, 1rem)"),fontWeight:i("var(--md-sys-typescale-title-medium-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-title-medium-line-height, 1.5rem)"),tracking:i("var(--md-sys-typescale-title-medium-tracking, 0.009375rem)")},small:{fontSize:i("var(--md-sys-typescale-title-small-font-size, 0.875rem)"),fontWeight:i("var(--md-sys-typescale-title-small-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-title-small-line-height, 1.25rem)"),tracking:i("var(--md-sys-typescale-title-small-tracking, 0.00625rem)")}},body:{large:{fontSize:i("var(--md-sys-typescale-body-large-font-size, 1rem)"),fontWeight:i("var(--md-sys-typescale-body-large-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-body-large-line-height, 1.5rem)"),tracking:i("var(--md-sys-typescale-body-large-tracking, 0.03125rem)")},medium:{fontSize:i("var(--md-sys-typescale-body-medium-font-size, 0.875rem)"),fontWeight:i("var(--md-sys-typescale-body-medium-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-body-medium-line-height, 1.25rem)"),tracking:i("var(--md-sys-typescale-body-medium-tracking, 0.015625rem)")},small:{fontSize:i("var(--md-sys-typescale-body-small-font-size, 0.75rem)"),fontWeight:i("var(--md-sys-typescale-body-small-font-weight, 400)"),lineHeight:i("var(--md-sys-typescale-body-small-line-height, 1rem)"),tracking:i("var(--md-sys-typescale-body-small-tracking, 0.025rem)")}},label:{large:{fontSize:i("var(--md-sys-typescale-label-large-font-size, 0.875rem)"),fontWeight:i("var(--md-sys-typescale-label-large-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-label-large-line-height, 1.25rem)"),tracking:i("var(--md-sys-typescale-label-large-tracking, 0.00625rem)")},medium:{fontSize:i("var(--md-sys-typescale-label-medium-font-size, 0.75rem)"),fontWeight:i("var(--md-sys-typescale-label-medium-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-label-medium-line-height, 1rem)"),tracking:i("var(--md-sys-typescale-label-medium-tracking, 0.03125rem)")},small:{fontSize:i("var(--md-sys-typescale-label-small-font-size, 0.6875rem)"),fontWeight:i("var(--md-sys-typescale-label-small-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-label-small-line-height, 1rem)"),tracking:i("var(--md-sys-typescale-label-small-tracking, 0.03125rem)")}}},emphasized:{display:{large:{fontSize:i("var(--md-sys-typescale-emphasized-display-large-font-size, 3.5625rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-display-large-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-display-large-line-height, 4rem)"),tracking:i("var(--md-sys-typescale-emphasized-display-large-tracking, 0.015625rem)")},medium:{fontSize:i("var(--md-sys-typescale-emphasized-display-medium-font-size, 2.8125rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-display-medium-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-display-medium-line-height, 3.25rem)"),tracking:i("var(--md-sys-typescale-emphasized-display-medium-tracking, 0)")},small:{fontSize:i("var(--md-sys-typescale-emphasized-display-small-font-size, 2.25rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-display-small-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-display-small-line-height, 2.75rem)"),tracking:i("var(--md-sys-typescale-emphasized-display-small-tracking, 0)")}},headline:{large:{fontSize:i("var(--md-sys-typescale-emphasized-headline-large-font-size, 2rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-headline-large-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-headline-large-line-height, 2.5rem)"),tracking:i("var(--md-sys-typescale-emphasized-headline-large-tracking, 0)")},medium:{fontSize:i("var(--md-sys-typescale-emphasized-headline-medium-font-size, 1.75rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-headline-medium-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-headline-medium-line-height, 2.25rem)"),tracking:i("var(--md-sys-typescale-emphasized-headline-medium-tracking, 0)")},small:{fontSize:i("var(--md-sys-typescale-emphasized-headline-small-font-size, 1.5rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-headline-small-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-headline-small-line-height, 2rem)"),tracking:i("var(--md-sys-typescale-emphasized-headline-small-tracking, 0)")}},title:{large:{fontSize:i("var(--md-sys-typescale-emphasized-title-large-font-size, 1.375rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-title-large-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-title-large-line-height, 1.75rem)"),tracking:i("var(--md-sys-typescale-emphasized-title-large-tracking, 0)")},medium:{fontSize:i("var(--md-sys-typescale-emphasized-title-medium-font-size, 1rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-title-medium-font-weight, 700)"),lineHeight:i("var(--md-sys-typescale-emphasized-title-medium-line-height, 3.5rem)"),tracking:i("var(--md-sys-typescale-emphasized-title-medium-tracking, 0.009375rem)")},small:{fontSize:i("var(--md-sys-typescale-emphasized-title-small-font-size, 0.875rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-title-small-font-weight, 700)"),lineHeight:i("var(--md-sys-typescale-emphasized-title-small-line-height, 1.25rem)"),tracking:i("var(--md-sys-typescale-emphasized-title-small-tracking, 0.00625rem)")}},body:{large:{fontSize:i("var(--md-sys-typescale-emphasized-body-large-font-size, 1rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-body-large-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-body-large-line-height, 1.5rem)"),tracking:i("var(--md-sys-typescale-emphasized-body-large-tracking, 0.03125rem)")},medium:{fontSize:i("var(--md-sys-typescale-emphasized-body-medium-font-size, 0.875rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-body-medium-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-body-medium-line-height, 1.25rem)"),tracking:i("var(--md-sys-typescale-emphasized-body-medium-tracking, 0.015625rem)")},small:{fontSize:i("var(--md-sys-typescale-emphasized-body-small-font-size, 0.75rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-body-small-font-weight, 500)"),lineHeight:i("var(--md-sys-typescale-emphasized-body-small-line-height, 1rem)"),tracking:i("var(--md-sys-typescale-emphasized-body-small-tracking, 0.025rem)")}},label:{large:{fontSize:i("var(--md-sys-typescale-emphasized-label-large-font-size, 0.875rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-label-large-font-weight, 700)"),lineHeight:i("var(--md-sys-typescale-emphasized-label-large-line-height, 1.25rem)"),tracking:i("var(--md-sys-typescale-emphasized-label-large-tracking, 0.00625rem)")},medium:{fontSize:i("var(--md-sys-typescale-emphasized-label-medium-font-size, 0.75rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-label-medium-font-weight, 700)"),lineHeight:i("var(--md-sys-typescale-emphasized-label-medium-line-height, 1rem)"),tracking:i("var(--md-sys-typescale-emphasized-label-medium-tracking, 0.03125rem)")},small:{fontSize:i("var(--md-sys-typescale-emphasized-label-small-font-size, 0.6875rem)"),fontWeight:i("var(--md-sys-typescale-emphasized-label-small-font-weight, 700)"),lineHeight:i("var(--md-sys-typescale-emphasized-label-small-line-height, 1rem)"),tracking:i("var(--md-sys-typescale-emphasized-label-small-tracking, 0.03125rem)")}}}},scrollbar:Ss,density:ms};function Ls(e){return xt(e,"disabled")}function Ms(e,t=!0){class s extends e{constructor(){super(...arguments),this.disabled=!1}update(e){super.update(e),e.has("disabled")&&this.role&&"none"!==this.role&&"presentation"!==this.role&&(this.ariaDisabled=this.disabled?"true":null)}}return o([Kt({type:Boolean,reflect:t})],s.prototype,"disabled",void 0),s}function zs(e){return xt(e,"disabledInteractive")&&Ls(e)}const Ws=["click","dblclick","auxclick","keydown","keyup"],Ps=["Tab","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Left","Up","Right","Down"],Ts=Symbol("_suppressedEventHandler");function Hs(e){var t;class s extends e{constructor(){super(...arguments),this[t]=e=>{if(this.disabledInteractive){if(e instanceof KeyboardEvent&&Ps.includes(e.key))return;e.stopImmediatePropagation(),e.preventDefault()}},this.disabledInteractive=!1}connectedCallback(){Ws.forEach(e=>this.addEventListener(e,this[Ts],!0)),super.connectedCallback()}disconnectedCallback(){Ws.forEach(e=>this.removeEventListener(e,this[Ts],!0)),super.disconnectedCallback()}update(e){super.update(e),(e.has("disabled")||e.has("disabledInteractive"))&&this.role&&"none"!==this.role&&"presentation"!==this.role&&"none"!==this.role&&(this.ariaDisabled=this.disabled||this.disabledInteractive?"true":null)}}return t=Ts,o([Kt({attribute:"disabled-interactive",type:Boolean,reflect:!0})],s.prototype,"disabledInteractive",void 0),s}const Fs=Symbol("updateLabels");function Os(e){return xt(e,"labels")&&$t(e)}const Ds=Symbol("_eventHandler");function Us(e){var t;class s extends e{constructor(){super(...arguments),this[t]=e=>{e.defaultPrevented||this[Fs]()}}get labels(){return this[wt].labels}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this[Ds]),this.addEventListener("change",this[Ds])}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusout",this[Ds]),this.removeEventListener("change",this[Ds])}update(e){super.update(e),this[Fs]()}[(t=Ds,Fs)](){const e=this.hasAttribute("tabindex"),t=Ls(this)&&this.disabled||zs(this)&&this.disabledInteractive,s=hs(this)&&this.touched&&(this.ariaInvalid||this.classList.contains("-invalid"));for(const i of this.labels??[])i.style.userSelect=e?"none":"",i.style.cursor=!t&&e?"pointer":"",!t&&e?i.style.setProperty("-webkit-tap-highlight-color","rgba(0, 0, 0, 0)"):i.style.removeProperty("-webkit-tap-highlight-color"),i.style.color=t?`color-mix(in srgb, ${Cs.color.onSurface} 38%, transparent)`:s?`${Cs.color.error}`:""}}return s.formAssociated=!0,s}const Ns=Symbol("formValue"),Is=Symbol("defaultValue");function Rs(e){return xt(e,"disabled","form","name")&&Os(e)&&$t(e)}const Bs=Symbol("_defaultValue"),qs=Symbol("_defaultIndeterminate"),Vs=Symbol("_formDisabled");function js(e){var t,s;class i extends e{constructor(){super(...arguments),this[t]=!1,this[s]=!1}get form(){return this[wt].form}get labels(){return this[wt].labels}get[(t=qs,s=Vs,Ns)](){return null}get[Is](){return this[Bs]}get name(){return this.getAttribute("name")??""}set name(e){e?this.setAttribute("name",e):this.removeAttribute("name")}get disabled(){return super.disabled||this[Vs]}set disabled(e){super.disabled=e}connectedCallback(){super.connectedCallback(),Qt(this)?(this[Bs]=this.checked,Jt(this)&&(this[qs]=this.indeterminate)):"value"in this&&(this[Bs]=this.value)}requestUpdate(e,t,s){super.requestUpdate(e,t,s),this[wt].setFormValue(this[Ns])}formDisabledCallback(e){const t=this.disabled;this[Vs]=e,this.disabled!=t&&this.requestUpdate("disabled",t)}formResetCallback(){Qt(this)?(this.checked=!0===this[Bs],Jt(this)&&(this.indeterminate=this[qs])):"value"in this&&(this.value=this[Is]),ns(this)&&this.markAsPristine(),hs(this)&&this.markAsUntouched()}}return i.formAssociated=!0,o([Kt({noAccessor:!0})],i.prototype,"name",null),o([Kt({type:Boolean})],i.prototype,"disabled",null),i}const Xs=Symbol("validate");function Zs(e){return xt(e,"willValidate","validity","validationMessage","reportValidity","checkValidity","setCustomValidity")&&Rs(e)}const Ks=Symbol("_updateValidity"),Ys=Symbol("_validityMessage");function Qs(t){var s,i;class r extends t{constructor(){super(...arguments),s.add(this)}get willValidate(){return this[wt].willValidate}get validity(){return this[Ks](),this[wt].validity}get validationMessage(){return this[Ks](),this[wt].validationMessage}[(s=new WeakSet,Xs)](){return this[Ys]?{customError:!0}:void 0}reportValidity(){return hs(this)&&this.markAsTouched(),this[Ks](),this[wt].reportValidity()}checkValidity(){return this[Ks](),this[wt].checkValidity()}setCustomValidity(e){this[Ys]=e||void 0,this[Ks]()}requestUpdate(e,t,s){super.requestUpdate(e,t,s),this[Ks]()}firstUpdated(e){super.firstUpdated(e),this[Ks]()}[Ks](){if(e||!this.isConnected)return;const t=this[Xs](),r=t&&Object.keys(t).some(e=>!0===t[e]);let a=t?.customError?this[Ys]:"";t&&!a&&(a=l(this,s,"m",i).call(this,t)),this[wt].setValidity(t,a),this.ariaInvalid=r?"true":null,this.classList.toggle("-invalid",!0===r),Os(this)&&this[Fs]?.()}}return i=function(e){const t=document.createElement("input");return t.type="text",e.valueMissing&&(t.required=!0,t.value=""),e.typeMismatch&&(t.type="email",t.value="not-an-email"),e.patternMismatch&&(t.pattern="[0-9]{4}",t.value="abcd"),e.tooShort&&(t.minLength=5,t.value="abc"),e.tooLong&&(t.maxLength=2,t.value="abcdef"),e.rangeUnderflow&&(t.type="number",t.min="10",t.value="5"),e.rangeOverflow&&(t.type="number",t.max="5",t.value="10"),e.stepMismatch&&(t.type="number",t.step="2",t.value="3"),e.badInput&&(t.type="number",t.value="abc"),t.setCustomValidity(""),t.checkValidity(),t.validationMessage},r}function Gs(e,...t){return class extends e{dispatchEvent(e){if(t.includes(e.type)){const t=this.getAttribute(`on${e.type}`);t&&new Function("e",`${t};`).call(this,e)}return super.dispatchEvent(e)}}}const Js=Symbol("_tabindex");function ei(e){var t;return t=Js,class extends e{constructor(){super(...arguments),this[t]=0}connectedCallback(){this[Js]=Number.parseInt(this.getAttribute("tabindex")??"0"),super.connectedCallback()}firstUpdated(e){super.firstUpdated(e),this.hasAttribute("tabindex")||e.has("disabled")||this.setAttribute("tabindex",`${this[Js]}`)}update(e){if(super.update(e),e.has("disabled"))if(this.disabled||"none"===this.role){const e=this.getAttribute("tabindex");e&&(this[Js]=Number.parseInt(e)),this.removeAttribute("tabindex")}else this.hasAttribute("tabindex")||this.setAttribute("tabindex",`${this[Js]}`)}}}function ti(e){return xt(e,"name","type","value")&&$t(e)}const si=Symbol("_clickHandler");function ii(e){var t;class s extends e{constructor(){super(...arguments),this.type="button",this[t]=async e=>{if(e.defaultPrevented||Ls(this)&&this.disabled||zs(this)&&this.disabledInteractive)return;const t=this[wt].form;if(t&&"button"!==this.type&&(await new Promise(e=>setTimeout(e)),!e.defaultPrevented))switch(this.type){case"reset":t.reset();break;case"submit":t.addEventListener("submit",e=>Object.defineProperty(e,"submitter",{configurable:!0,enumerable:!0,get:()=>this}),{capture:!0,once:!0}),this[wt].setFormValue(this.value),t.requestSubmit()}}}get name(){return this.getAttribute("name")??""}set name(e){e?this.setAttribute("name",e):this.removeAttribute("name")}get value(){return this.getAttribute("value")}set value(e){null!=e?this.setAttribute("value",e):this.removeAttribute("value")}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this[si])}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this[si])}}return t=si,s.formAssociated=!0,o([Kt()],s.prototype,"name",null),o([Kt()],s.prototype,"value",null),o([Kt()],s.prototype,"type",void 0),s}function ri(e){return xt(e,"htmlFor","control","attach","detach")}const ai=Symbol("_control"),ni=Symbol("_firstUpdated");function oi(e){var t,s;class i extends e{constructor(){super(...arguments),this[t]=null,this[s]=!1,this.htmlFor=null}get control(){return this[ai]}firstUpdated(e){super.firstUpdated(e),this[ni]=!0}update(e){if(super.update(e),e.has("htmlFor"))if(this.htmlFor){const e=this.getRootNode();e&&it(this.htmlFor,e).then(e=>{e!==this.control&&(this.control&&this.detach(),e instanceof HTMLElement&&this.attach(e))})}else this.control&&this[ni]&&this.detach()}attach(e){this[ai]=e}detach(){this[ai]=null}}return t=ai,s=ni,o([Kt({attribute:"for"})],i.prototype,"htmlFor",void 0),i}function li(e,t=!0){var s,i,r,a,n,o,c;return i=new WeakMap,r=new WeakMap,a=new WeakMap,n=new WeakMap,s=new WeakSet,o=function(e){e.target!==e.currentTarget||Ls(this)&&this.disabled||zs(this)&&this.disabledInteractive?h(this,i,!1,"f"):(" "===e.key||t&&"Enter"===e.key)&&h(this,i,!0,"f")},c=function(e){e.target!==e.currentTarget||Ls(this)&&this.disabled||zs(this)&&this.disabledInteractive||!l(this,i,"f")?h(this,i,!1,"f"):(h(this,i,!1,"f"),this.dispatchEvent(new MouseEvent("click",{cancelable:!0,bubbles:!0,composed:!0})))},class extends e{constructor(){super(...arguments),s.add(this),i.set(this,!1),r.set(this,e=>l(this,s,"m",o).call(this,e)),a.set(this,e=>l(this,s,"m",c).call(this,e)),n.set(this,()=>h(this,i,!1,"f"))}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",l(this,r,"f")),this.addEventListener("keyup",l(this,a,"f")),this.addEventListener("focusout",l(this,n,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",l(this,r,"f")),this.removeEventListener("keyup",l(this,a,"f")),this.removeEventListener("focusout",l(this,n,"f"))}}}
|
|
45
45
|
/**
|
|
46
46
|
* @license
|
|
47
47
|
* Copyright 2017 Google LLC
|
|
@@ -52,5 +52,5 @@ function Yt(e,t){return(t,s,i)=>((e,t,s)=>(s.configurable=!0,s.enumerable=!0,Ref
|
|
|
52
52
|
* Copyright 2018 Google LLC
|
|
53
53
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
54
54
|
*/
|
|
55
|
-
const qi=e=>e??Li,Vi=Symbol("renderPseudoLink");function ji(e){return xt(e,"download","href","rel","target")}const Xi=Symbol("_clickHandler");function Zi(e){var s,i,a,n,h;class c extends e{constructor(){super(...arguments),s.add(this),this[h]=async e=>{if(zs(this)&&this.disabledInteractive&&(e.preventDefault(),e.stopPropagation()),await new Promise(e=>e()),!e.defaultPrevented&&this.href){e.preventDefault(),e.stopImmediatePropagation();const t=document.createElement("a");t.href=this.href,t.rel=this.rel,t.target=this.target,null!=this.download&&(t.download=this.download),t.addEventListener("click",async()=>{await new Promise(e=>e()),t.remove()}),document.body.appendChild(t),t.click()}},this.href="",this.target="",this.rel=""}get download(){return this.getAttribute("download")}set download(e){const t=this.download;t!==e&&(e?this.setAttribute("download",e):this.removeAttribute("download"),this.requestUpdate("download",t))}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this[Xi]),this.hasAttribute("href")&&"button"===this.role&&(this.role="link")}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this[Xi])}[(s=new WeakSet,h=Xi,Vi)](){const e=Ls(this)&&this.disabled,o=zs(this)&&this.disabledInteractive;return e||o||!this.href?t:r`<a href="${this.href}" target="${qi(this.target||void 0)}" rel="${qi(this.rel||void 0)}" download="${qi(this.download||void 0)}" tabindex="-1" aria-hidden="true" @pointerdown="${l(this,s,"m",i)}" @focus="${l(this,s,"m",a)}" @blur="${l(this,s,"m",n)}"></a>`}}return i=function(e){2!==e.button?(e.preventDefault(),e.stopImmediatePropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))):e.target.removeAttribute("aria-hidden")},a=function(e){e.target.blur(),this.focus()},n=function(e){e.target.setAttribute("aria-hidden","true")},o([Kt()],c.prototype,"href",void 0),o([Kt()],c.prototype,"target",void 0),o([Kt()],c.prototype,"rel",void 0),o([Kt({reflect:!1})],c.prototype,"download",null),c}function Ki(e){return xt(e,"readOnly")}function Yi(e,t=!0){class s extends e{constructor(){super(...arguments),this.readOnly=!1}update(e){super.update(e),e.has("readOnly")&&(this.ariaReadOnly=this.readOnly?"true":null)}}return o([Kt({attribute:"readonly",type:Boolean,reflect:t})],s.prototype,"readOnly",void 0),s}function Qi(e){return xt(e,"required","optional")}function Gi(e){class t extends e{constructor(){super(...arguments),this.required=!1}get optional(){return!this.required}update(e){super.update(e),e.has("required")&&(this.ariaRequired=`${this.required}`)}}return o([Kt({type:Boolean,reflect:!0})],t.prototype,"required",void 0),t}function Ji(e){return Qi(e)&&Zs(e)}function er(e){return class extends e{[Xs](){const e=super[Xs]();if(!e&&this.required){if(Qt(this)&&!this.checked)return{valueMissing:!0};if(!this.value)return{valueMissing:!0}}return e}}}function tr(e,t){return class extends e{connectedCallback(){this.role=this.role||t,super.connectedCallback()}}}function sr(e){return xt(e,"vertical")}function ir(e){class t extends e{constructor(){super(...arguments),this.vertical=!1}update(e){super.update(e),e.has("vertical")&&(this.ariaOrientation=this.vertical?"vertical":"horizontal")}}return o([Kt({type:Boolean,reflect:!0})],t.prototype,"vertical",void 0),t}var rr,ar,nr,or,lr,hr,cr,dr;class pr extends n{constructor(){super(...arguments),rr.set(this,e=>{e.defaultPrevented||this._onClick(e)})}connectedCallback(){super.connectedCallback(),this.parentElement?.addEventListener("click",l(this,rr,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.parentElement?.removeEventListener("click",l(this,rr,"f"))}render(){return r`<slot></slot>`}}rr=new WeakMap,pr.styles=a`:host { display: contents; } ::slotted(.material-icons) { font-size: inherit !important; }`;let ur=class extends(Gs(n,"opening","opened","closing","closed")){constructor(){super(...arguments),ar.add(this),nr.set(this,!1),or.set(this,!1),this.open=!1}update(e){if(super.update(e),this.classList.toggle("-no-animate",!0),!l(this,nr,"f"))return this.open&&(h(this,or,!0,"f"),l(this,ar,"m",hr).call(this)),void h(this,nr,!0,"f");this.toggleAttribute("inert",!this.open),this.open?(h(this,or,!0,"f"),st()||(l(this,ar,"m",hr).call(this),this.classList.toggle("-overflows",this.clientHeight<this.scrollHeight),l(this,ar,"m",cr).call(this)),this.classList.toggle("-closing",!1),this.classList.toggle("-opening",!0),this.dispatchEvent(new Event("opening")),l(this,ar,"m",cr).call(this),this.classList.toggle("-no-animate",!1),l(this,ar,"m",dr).call(this),st()?(l(this,ar,"m",hr).call(this),this.classList.toggle("-opening",!1),this.dispatchEvent(new Event("opened"))):this.addEventListener("transitionend",()=>{this.open&&(l(this,ar,"m",hr).call(this),this.classList.toggle("-opening",!1),this.dispatchEvent(new Event("opened")))},{once:!0})):(this.classList.toggle("-opening",!1),this.classList.toggle("-closing",!0),this.dispatchEvent(new Event("closing")),l(this,ar,"m",dr).call(this),l(this,or,"f")&&this.classList.toggle("-no-animate",!1),st()?(l(this,ar,"m",cr).call(this),this.classList.toggle("-closing",!1),this.dispatchEvent(new Event("closed"))):requestAnimationFrame(()=>{l(this,ar,"m",cr).call(this),this.addEventListener("transitionend",()=>{this.open||(this.classList.toggle("-closing",!1),this.dispatchEvent(new Event("closed")))},{once:!0})}))}render(){return r`<slot @slotchange="${l(this,ar,"m",lr)}"></slot>`}};nr=new WeakMap,or=new WeakMap,ar=new WeakSet,lr=function(){h(this,nr,!0,"f")},hr=function(){this.style.height="auto"},cr=function(){this.style.height=""},dr=function(){this.style.height=`${this.scrollHeight}px`},ur.styles=a`:host { display: block; height: 0px; overflow: hidden; transition: ${i(`visibility var(--m3e-collapsible-animation-duration, ${Cs.motion.duration.medium1})\n ${Cs.motion.easing.standard},\n height var(--m3e-collapsible-animation-duration, ${Cs.motion.duration.medium1})\n ${Cs.motion.easing.standard},\n padding-top var(--m3e-collapsible-animation-duration, ${Cs.motion.duration.medium1})\n ${Cs.motion.easing.standard},\n padding-bottom var(--m3e-collapsible-animation-duration, ${Cs.motion.duration.medium1})\n ${Cs.motion.easing.standard}`)}; } :host(:not(.-closing):not([open])) { visibility: hidden; } :host(:not([open])) { min-height: unset !important; padding-top: 0px !important; padding-bottom: 0px !important; } :host(.-no-animate) { transition-duration: 0ms; } :host(.-opening), :host(.-closing) { overflow-y: hidden !important; } :host(.-overflows) { scrollbar-gutter: stable; } ::slotted(*) { --m3e-collapsible-animation-duration: initial; } @media (prefers-reduced-motion) { :host { transition: none; } }`,o([Kt({type:Boolean,reflect:!0})],ur.prototype,"open",void 0),ur=o([_t("m3e-collapsible")],ur);const mr=i(`var(--m3e-elevation-lift-duration, ${Cs.motion.duration.short4})`),fr=i(`var(--m3e-elevation-lift-easing, ${Cs.motion.easing.standard})`),vr=i(`var(--m3e-elevation-settle-duration, ${Cs.motion.duration.short3})`),yr=i(`var(--m3e-elevation-settle-easing, ${Cs.motion.easing.standardAccelerate})`),gr=i(`var(--m3e-elevation-level, ${Cs.elevation.level0})`),br=i(`var(--m3e-elevation-hover-level, ${Cs.elevation.level0})`),xr=i(`var(--m3e-elevation-focus-level, ${Cs.elevation.level0})`),wr=i(`var(--m3e-elevation-pressed-level, ${Cs.elevation.level0})`);var $r,kr,Er,_r,Sr,Ar,Cr;let Lr=class extends(oi(tr(n,"none"))){constructor(){super(...arguments),$r.add(this),kr.set(this,new ot(this,{target:null,callback:e=>l(this,$r,"m",Sr).call(this,e)})),Er.set(this,new nt(this,{target:null,callback:e=>l(this,$r,"m",Ar).call(this,e)})),_r.set(this,new dt(this,{target:null,callback:e=>l(this,$r,"m",Cr).call(this,e)})),this.disabled=!1,this.level=null}attach(e){super.attach(e),l(this,kr,"f").observe(e),l(this,Er,"f").observe(e),l(this,_r,"f").observe(e)}detach(){this.control&&(l(this,kr,"f").unobserve(this.control),l(this,Er,"f").unobserve(this.control),l(this,_r,"f").unobserve(this.control)),super.detach()}connectedCallback(){this.ariaHidden="true",super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._shadow?.classList.toggle("hover",!1),this._shadow?.classList.toggle("focus",!1),this._shadow?.classList.toggle("pressed",!1),this._shadow?.classList.toggle("resting",!1)}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&(this._shadow?.classList.toggle("hover",!1),this._shadow?.classList.toggle("focus",!1),this._shadow?.classList.toggle("pressed",!1),this._shadow?.classList.toggle("resting",!0))}render(){return r`<div class="shadow"></div>`}};kr=new WeakMap,Er=new WeakMap,_r=new WeakMap,$r=new WeakSet,Sr=function(e){this.disabled||(this._shadow?.classList.toggle("hover",e),this._shadow?.classList.toggle("resting",!e))},Ar=function(e){this.disabled||this._shadow?.classList.toggle("focus",e)},Cr=function(e){this.disabled||this._shadow?.classList.toggle("pressed",e)},Lr.styles=a`:host { display: block; } :host, .shadow { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; } .shadow.resting, .shadow.focus, .shadow.pressed { will-change: box-shadow; transition: ${i(`box-shadow ${vr} ${yr};`)}; } .shadow.hover { will-change: box-shadow; transition: ${i(`box-shadow ${mr} ${fr};`)}; } .shadow { box-shadow: ${gr}; } .shadow.focus { box-shadow: ${xr}; } .shadow.hover { box-shadow: ${br}; } .shadow.pressed { box-shadow: ${wr}; } :host([level="0"]) .shadow { --m3e-elevation-level: ${Cs.elevation.level0}; --m3e-elevation-hover-level: ${Cs.elevation.level1}; } :host([level="1"]) .shadow { --m3e-elevation-level: ${Cs.elevation.level1}; --m3e-elevation-hover-level: ${Cs.elevation.level2}; } :host([level="2"]) .shadow { --m3e-elevation-level: ${Cs.elevation.level2}; --m3e-elevation-hover-level: ${Cs.elevation.level3}; } :host([level="3"]) .shadow { --m3e-elevation-level: ${Cs.elevation.level3}; --m3e-elevation-hover-level: ${Cs.elevation.level4}; } :host([level="4"]) .shadow { --m3e-elevation-level: ${Cs.elevation.level4}; --m3e-elevation-hover-level: ${Cs.elevation.level5}; } :host([level="5"]) .shadow { --m3e-elevation-level: ${Cs.elevation.level5}; --m3e-elevation-hover-level: ${gr}; } :host([level]) .shadow { --m3e-elevation-focus-level: ${gr}; --m3e-elevation-pressed-level: ${gr}; } @media (prefers-reduced-motion) { .shadow.resting, .shadow.pressed, .shadow.focus, .shadow.hover { transition: none; } } @media (forced-colors: active) { .shadow { display: none; } }`,o([Yt(".shadow")],Lr.prototype,"_shadow",void 0),o([Kt({type:Boolean,reflect:!0})],Lr.prototype,"disabled",void 0),o([Kt({type:Number,reflect:!0})],Lr.prototype,"level",void 0),Lr=o([_t("m3e-elevation")],Lr);const Mr=i(`var(--m3e-focus-ring-color, ${Cs.color.secondary})`),zr=i(`var(--m3e-focus-ring-duration, ${Cs.motion.duration.long2})`),Wr=i("var(--m3e-focus-ring-thickness, 0.1875rem)"),Pr=i("var(--m3e-focus-ring-visibility, visible)"),Tr=i("var(--m3e-focus-ring-growth-factor, 2)");var Hr,Fr,Or;let Dr=class extends(oi(tr(n,"none"))){constructor(){super(...arguments),Hr.add(this),Fr.set(this,new nt(this,{target:null,callback:(e,t)=>l(this,Hr,"m",Or).call(this,t)})),this.inward=!1,this.disabled=!1}show(){this._outline?.classList.toggle("visible",!0)}hide(){this._outline?.classList.toggle("visible",!1)}attach(e){super.attach(e),l(this,Fr,"f").observe(e)}detach(){this.control&&l(this,Fr,"f").unobserve(this.control),super.detach()}connectedCallback(){this.ariaHidden="true",super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.hide()}render(){return r`<div class="outline"></div>`}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&this.hide()}};Fr=new WeakMap,Hr=new WeakSet,Or=function(e){this.disabled||(e?this.show():this.hide())},Dr.styles=a`:host { display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; outline: none; } .outline { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; z-index: 1; outline-color: ${Mr}; outline-width: ${Wr}; visibility: ${Pr}; } .outline.visible { outline-style: solid; } :host(:not([inward])) .outline { outline-offset: calc(${Wr} / ${Tr}); } :host([inward]) .outline { outline-offset: calc(0px - ${Wr}); } :host(:not([inward])) .outline.visible { animation: grow-shrink ${zr}; } :host([inward]) .outline.visible { animation: shrink-grow ${zr}; } @keyframes grow-shrink { 50% { outline-width: calc(${Wr} * ${Tr}); } } @keyframes shrink-grow { 50% { outline-offset: calc(0px - calc(${Wr} * ${Tr})); outline-width: calc(${Wr} * ${Tr}); } } @media (prefers-reduced-motion) { :host(:not([inward])) .outline.visible, :host([inward]) .outline.visible { animation: none; } } @media (forced-colors: active) { .outline { outline-color: Highlight; } }`,o([Yt(".outline")],Dr.prototype,"_outline",void 0),o([Kt({type:Boolean,reflect:!0})],Dr.prototype,"inward",void 0),o([Kt({type:Boolean,reflect:!0})],Dr.prototype,"disabled",void 0),Dr=o([_t("m3e-focus-ring")],Dr);let Ur=class extends(es(Ms(tr(n,"none")))){connectedCallback(){super.connectedCallback(),this.ariaHidden="true"}render(){return this.indeterminate?r`<svg viewBox="0 -960 960 960" fill="currentColor"><path Required d="M240-440v-80h480v80H240Z"/></svg>`:this.checked?r`<svg viewBox="0 -960 960 960" fill="currentColor"><path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg>`:t}};Ur.styles=a`:host { display: inline-block; vertical-align: middle; width: var(--m3e-checkbox-icon-size, 1.125rem); height: var(--m3e-checkbox-icon-size, 1.125rem); border-radius: var(--m3e-checkbox-container-shape, 0.125rem); box-sizing: border-box; flex: none; } :host(:not([checked]):not([indeterminate])) { border-width: var(--m3e-checkbox-unselected-outline-thickness, 0.125rem); border-style: solid; } :host(:not([disabled])[checked]), :host(:not([disabled])[indeterminate]) { background-color: var(--m3e-checkbox-selected-container-color, ${Cs.color.primary}); color: var(--m3e-checkbox-selected-icon-color, ${Cs.color.onPrimary}); } :host(:not([disabled]):not([checked]):not([indeterminate])) { border-color: var(--m3e-checkbox-unselected-outline-color, ${Cs.color.onSurfaceVariant}); } :host([disabled]:not([checked]):not([indeterminate])) { border-color: color-mix( in srgb, var(--m3e-checkbox-unselected-disabled-outline-color, ${Cs.color.onSurface}) var(--m3e-checkbox-unselected-disabled-outline-opacity, 38%), transparent ); } :host([disabled][checked]), :host([disabled][indeterminate]) { background-color: color-mix( in srgb, var(--m3e-checkbox-selected-disabled-container-color, ${Cs.color.onSurface}) var(--m3e-checkbox-selected-disabled-container-opacity, 38%), transparent ); color: color-mix( in srgb, var(--m3e-checkbox-selected-disabled-icon-color, ${Cs.color.surface}) var(--m3e-checkbox-selected-disabled-icon-opacity, 100%), transparent ); }`,Ur=o([_t("m3e-pseudo-checkbox")],Ur);let Nr=class extends(Gt(Ms(tr(n,"none")))){connectedCallback(){super.connectedCallback(),this.ariaHidden="true"}render(){return r`<svg class="icon" viewBox="0 0 20 20"><mask id="cutout2"><rect width="100%" height="100%" fill="white"></rect><circle cx="10" cy="10" r="8" fill="black"></circle></mask><circle class="outer circle" cx="10" cy="10" r="10" mask="url(#cutout2)"></circle><circle class="inner circle" cx="10" cy="10" r="5"></circle></svg>`}};Nr.styles=a`:host { display: inline-block; vertical-align: middle; box-sizing: border-box; width: var(--m3e-radio-icon-size, 1.25rem); height: var(--m3e-radio-icon-size, 1.25rem); flex: none; } .circle { fill: currentColor; } :host(:not([checked])) .circle.inner { opacity: 0; } :host(:not([checked])) { color: var(--m3e-radio-unselected-icon-color, ${Cs.color.onSurfaceVariant}); } :host([checked]) { color: var(--m3e-radio-selected-icon-color, ${Cs.color.primary}); } :host([disabled]) { color: color-mix(in srgb, var(--m3e-radio-disabled-icon-color, ${Cs.color.onSurface}) 38%, transparent); }`,Nr=o([_t("m3e-pseudo-radio")],Nr);const Ir=i(`var(--m3e-ripple-color, ${Cs.color.onSurface})`),Rr=i(`var(--m3e-ripple-opacity, ${Cs.state.pressedStateLayerOpacity})`),Br=i(`var(--m3e-ripple-enter-duration, ${Cs.motion.duration.long4})`),qr=i(`var(--m3e-ripple-exit-duration, ${Cs.motion.duration.short2})`),Vr=i("var(--m3e-ripple-scale-factor, 2.5)");var jr,Xr,Zr,Kr,Yr,Qr;let Gr=class extends(oi(tr(n,"none"))){constructor(){super(...arguments),jr.add(this),Xr.set(this,null),Zr.set(this,new dt(this,{target:null,minPressedDuration:150,isPressedKey:e=>" "===e,callback:(e,{x:t,y:s})=>l(this,jr,"m",Qr).call(this,e,t,s)})),this.disabled=!1,this.centered=!1,this.unbounded=!1,this.radius=null}get visible(){return null!==l(this,Xr,"f")}show(e,t,s=!1){l(this,jr,"m",Kr).call(this);const i=this.getBoundingClientRect();this.centered&&(e=i.left+i.width/2,t=i.top+i.height/2);let r=this.radius;if(!r||isNaN(r)){const s=Math.max(Math.abs(e-i.left),Math.abs(e-i.right)),a=Math.max(Math.abs(t-i.top),Math.abs(t-i.bottom));r=Math.sqrt(s*s+a*a)}const a=e-i.left,n=t-i.top;h(this,Xr,document.createElement("div"),"f"),l(this,Xr,"f").classList.add("ripple"),s&&l(this,Xr,"f").classList.add("persistent"),l(this,Xr,"f").style.left=a-r+"px",l(this,Xr,"f").style.top=n-r+"px",l(this,Xr,"f").style.width=2*r+"px",l(this,Xr,"f").style.height=2*r+"px",l(this,Xr,"f").addEventListener("animationend",()=>l(this,jr,"m",Yr).call(this,s),{once:!0}),l(this,Xr,"f").addEventListener("transitionend",()=>l(this,jr,"m",Kr).call(this),{once:!0}),this.shadowRoot?.appendChild(l(this,Xr,"f"))}hide(){l(this,Xr,"f")?.classList.add("exit")}attach(e){super.attach(e),l(this,Zr,"f").observe(e)}detach(){this.control&&l(this,Zr,"f").unobserve(this.control),super.detach()}connectedCallback(){this.ariaHidden="true",super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),l(this,jr,"m",Kr).call(this)}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&this.hide()}};var Jr;Xr=new WeakMap,Zr=new WeakMap,jr=new WeakSet,Kr=function(){l(this,Xr,"f")?.remove(),h(this,Xr,null,"f")},Yr=function(e){e?l(this,Xr,"f")?.classList.add("pressed"):this.hide()},Qr=function(e,t,s){this.disabled||(e?this.show(t,s,!0):this.hide())},Gr.styles=a`:host { display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; } :host(:not([unbounded])) { overflow: hidden; } .ripple { display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; transform: scale(0); border-radius: ${Cs.shape.corner.full}; background-color: color-mix(in srgb, ${Ir} ${Rr}, transparent); will-change: background-color, opacity; animation: ripple ${Br} linear; } .ripple.persistent.pressed { transform: scale(${Vr}); } .ripple.exit { transition: opacity ${qr} cubic-bezier(0, 0, 0.2, 0.1); opacity: 0; } @keyframes ripple { to { transform: scale(${Vr}); } } @media (prefers-reduced-motion) { .ripple { transform: scale(${Vr}); animation-duration: 90ms; } .ripple.exit { transition-duration: 10ms; } } @media (forced-colors: active) { .ripple { display: none; } }`,o([Kt({type:Boolean,reflect:!0})],Gr.prototype,"disabled",void 0),o([Kt({type:Boolean,reflect:!0})],Gr.prototype,"centered",void 0),o([Kt({type:Boolean,reflect:!0})],Gr.prototype,"unbounded",void 0),o([Kt({type:Number})],Gr.prototype,"radius",void 0),Gr=o([_t("m3e-ripple")],Gr);let ea=class extends n{constructor(){super(...arguments),Jr.set(this,()=>this._updateScroll()),this.dividers="above-below",this.thin=!1}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("scroll",l(this,Jr,"f"))}update(e){super.update(e),e.has("dividers")&&(this.removeEventListener("scroll",l(this,Jr,"f")),"none"!==this.dividers&&this.addEventListener("scroll",l(this,Jr,"f"),{passive:!0}))}render(){return r`<slot @slotchange="${this._updateScroll}"></slot>`}_updateScroll(){const e=("above"===this.dividers||"above-below"===this.dividers)&&this.scrollTop>0,t=("below"===this.dividers||"above-below"===this.dividers)&&this.scrollHeight-this.scrollTop-this.clientHeight>1;this.classList.toggle("-above",e),this.classList.toggle("-below",t)}};var ta,sa,ia,ra;Jr=new WeakMap,ea.styles=a`:host { display: block; overflow-y: auto; position: relative; box-sizing: border-box; scrollbar-color: ${Cs.scrollbar.color}; border-top: var(--m3e-divider-thickness, 1px) solid transparent; border-bottom: var(--m3e-divider-thickness, 1px) solid transparent; outline: var(--m3e-focus-ring-color, ${Cs.color.secondary}); outline-width: var(--m3e-focus-ring-thickness, 0.25rem); outline-offset: calc(var(--m3e-focus-ring-thickness, 0.25rem) / 2); } :host([thin]) { scrollbar-width: ${Cs.scrollbar.thinWidth}; } :host(:not([thin])) { scrollbar-width: ${Cs.scrollbar.width}; } :host(:not(:focus-visible).-above) { border-top-color: var(--m3e-divider-color, ${Cs.color.outlineVariant}); } :host(:not(:focus-visible).-below) { border-bottom-color: var(--m3e-divider-color, ${Cs.color.outlineVariant}); } :host(:focus-visible) { outline-style: solid; animation: grow-shrink var(--m3e-focus-ring-duration, ${Cs.motion.duration.long2}); } @keyframes grow-shrink { 50% { outline-width: calc(var(--m3e-focus-ring-thickness, 0.25rem) * var(--m3e-focus-ring-factor, 2)); } } @media (forced-colors: active) { :host { border-top: var(--m3e-divider-thickness, 1px) solid Canvas; border-bottom: var(--m3e-divider-thickness, 1px) solid Canvas; } :host(:not(:focus-visible).-above) { border-top-color: GrayText; } :host(:not(:focus-visible).-below) { border-bottom-color: GrayText; } } @media (prefers-reduced-motion) { :host(:focus-visible) { animation: none; } }`,o([Kt()],ea.prototype,"dividers",void 0),o([Kt({type:Boolean,reflect:!0})],ea.prototype,"thin",void 0),o([ut(40)],ea.prototype,"_updateScroll",null),ea=o([_t("m3e-scroll-container")],ea);let aa=class extends n{constructor(){super(...arguments),ta.add(this),sa.set(this,new Array),this.selectedIndex=null}connectedCallback(){super.connectedCallback(),this.classList.toggle("-no-animate",!0)}update(e){super.update(e),e.has("selectedIndex")&&(null===this.selectedIndex&&this.classList.toggle("-no-animate",!0),l(this,ta,"m",ra).call(this),null!==this.selectedIndex&&this.classList.contains("-no-animate")&&requestAnimationFrame(()=>{null!==this.selectedIndex&&this.classList.toggle("-no-animate",!1)}))}render(){return r`<slot @slotchange="${l(this,ta,"m",ia)}"></slot>`}};sa=new WeakMap,ta=new WeakSet,ia=function(e){const t=[...e.target.assignedElements({flatten:!0})];for(const e of l(this,sa,"f").filter(e=>!t.includes(e)))e.classList.remove("-before"),e.classList.remove("-after"),e.removeAttribute("inert");h(this,sa,t,"f"),l(this,ta,"m",ra).call(this)},ra=function(){const e=this.selectedIndex??l(this,sa,"f").length;for(let t=0;t<l(this,sa,"f").length;t++){const s=l(this,sa,"f")[t];s.classList.toggle("-before",t<e),s.classList.toggle("-after",t>e),s.toggleAttribute("inert",t!==e)}},aa.styles=a`:host { display: flex; position: relative; overflow: hidden; } ::slotted(*) { width: 100%; top: 0; transition: ${i(`inset-inline-start var(--m3e-slide-animation-duration, ${Cs.motion.duration.long2}) ${Cs.motion.easing.standard},\n visibility var(--m3e-slide-animation-duration, ${Cs.motion.duration.long2}) ${Cs.motion.easing.standard} allow-discrete`)}; } ::slotted(.-before), ::slotted(.-after) { visibility: hidden; position: absolute; } ::slotted(.-before) { inset-inline-start: -100%; } ::slotted(.-after) { inset-inline-start: 100%; } ::slotted(:not(.-before):not(.-after)) { position: relative; inset-inline-start: 0; } :host(.-no-animate) ::slotted(*) { transition: none; } @media (prefers-reduced-motion) { ::slotted(*) { transition: none; } }`,o([Kt({attribute:"selected-index",type:Number,reflect:!0})],aa.prototype,"selectedIndex",void 0),aa=o([_t("m3e-slide")],aa);const na=i(`var(--m3e-state-layer-hover-color, ${Cs.color.onSurface})`),oa=i(`var(--m3e-state-layer-hover-opacity, ${Cs.state.hoverStateLayerOpacity})`),la=i(`var(--m3e-state-layer-focus-color, ${Cs.color.onSurface})`),ha=i(`var(--m3e-state-layer-focus-opacity, ${Cs.state.focusStateLayerOpacity})`),ca=i(`var(--m3e-state-layer-duration, ${Cs.motion.duration.medium1})`),da=i(`var(--m3e-state-layer-easing, ${Cs.motion.easing.standard})`);var pa,ua,ma,fa,va;let ya=class extends(oi(tr(n,"none"))){constructor(){super(...arguments),pa.add(this),ua.set(this,new ot(this,{target:null,callback:e=>l(this,pa,"m",fa).call(this,e)})),ma.set(this,new nt(this,{target:null,callback:(e,t)=>l(this,pa,"m",va).call(this,e&&t)})),this.disabled=!1,this.disableHover=!1}show(e){this._layer?.classList.toggle(e,!0)}hide(e){this._layer?.classList.toggle(e,!1)}attach(e){super.attach(e),l(this,ua,"f").observe(e),l(this,ma,"f").observe(e)}detach(){this.control&&(l(this,ua,"f").unobserve(this.control),l(this,ma,"f").unobserve(this.control)),super.detach()}connectedCallback(){this.ariaHidden="true",super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.hide("hover"),this.hide("focused")}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&(this.hide("hover"),this.hide("focused")),e.has("disableHover")&&this.disableHover&&this.hide("hover")}render(){return r`<div class="layer"></div>`}};ua=new WeakMap,ma=new WeakMap,pa=new WeakSet,fa=function(e){this.disabled||this.disableHover||(e?this.show("hover"):this.hide("hover"))},va=function(e){this.disabled||(e?this.show("focused"):this.hide("focused"))},ya.styles=a`:host { display: block; } :host, .layer { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; } .layer { will-change: background-color; transition: ${i(`background-color ${ca} ${da}`)}; } .layer.focused { background-color: color-mix(in srgb, ${la} ${ha}, transparent); } .layer.hover { background-color: color-mix(in srgb, ${na} ${oa}, transparent); } @media (prefers-reduced-motion) { .layer { transition: none; } } @media (forced-colors: active) { .layer { display: none; } }`,o([Yt(".layer")],ya.prototype,"_layer",void 0),o([Kt({type:Boolean,reflect:!0})],ya.prototype,"disabled",void 0),o([Kt({attribute:"disable-hover",type:Boolean,reflect:!0})],ya.prototype,"disableHover",void 0),ya=o([_t("m3e-state-layer")],ya);let ga=class extends n{render(){return r`<span class="base"><slot></slot></span>`}};var ba,xa,wa,$a,ka,Ea,_a,Sa;ga.styles=a`:host { flex: 1 1 auto; display: inline-flex; align-items: center; flex-wrap: nowrap; min-width: 0; } .base { flex: 1 1 auto; display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }`,ga=o([_t("m3e-text-overflow")],ga);let Aa=Sa=class extends n{constructor(){super(),ba.add(this),xa.set(this,"m3e-text-highlight-"+Sa.__nextId++),wa.set(this,new Array),$a.set(this,null),this.disabled=!1,this.term="",this.caseSensitive=!1,this.isSupported&&(h(this,$a,new CSSStyleSheet,"f"),l(this,$a,"f").replaceSync(a`::highlight(${i(l(this,xa,"f"))}) { background-color: var(--m3e-text-highlight-container-color, ${Cs.color.secondaryContainer}); color: var(--m3e-text-highlight-color, ${Cs.color.onSecondaryContainer}); text-decoration: var(--m3e-text-highlight-decoration); text-shadow: var(--m3e-text-highlight-shadow); }`.toString()))}get isSupported(){return!(e||!CSS.highlights)}get ranges(){return l(this,wa,"f")}firstUpdated(e){super.firstUpdated(e),this.shadowRoot&&l(this,$a,"f")&&!this.shadowRoot.adoptedStyleSheets.includes(l(this,$a,"f"))&&this.shadowRoot.adoptedStyleSheets.push(l(this,$a,"f"))}updated(e){super.updated(e),(e.has("term")||e.has("caseSensitive")||e.has("disabled"))&&l(this,ba,"m",_a).call(this)}render(){return r`<slot @slotchange="${l(this,ba,"m",_a)}"></slot>`}};xa=new WeakMap,wa=new WeakMap,$a=new WeakMap,ba=new WeakSet,ka=function(e){return!/^(\\s|\\n)+$/gi.test(e.data)},Ea=function e(t,s){t instanceof HTMLSlotElement?t.assignedElements({flatten:!0}).forEach(t=>{switch(t.nodeType){case Node.TEXT_NODE:l(this,ba,"m",ka).call(this,t)&&s.push(t);break;case Node.ELEMENT_NODE:l(this,ba,"m",e).call(this,t,s)}}):t.childNodes.forEach(t=>{switch(t.nodeType){case Node.TEXT_NODE:l(this,ba,"m",ka).call(this,t)&&s.push(t);break;case Node.ELEMENT_NODE:l(this,ba,"m",e).call(this,t,s)}})},_a=function(){if(!this.isSupported||!this.isConnected)return;if(CSS.highlights.delete(l(this,xa,"f")),l(this,wa,"f").length=0,this.disabled)return;if(!this.term)return void this.dispatchEvent(new CustomEvent("highlight",{detail:[...l(this,wa,"f")],bubbles:!1,composed:!1}));const e=new Array;l(this,ba,"m",Ea).call(this,this,e);const t=this.caseSensitive?this.term:this.term.toLowerCase();h(this,wa,e.map(e=>({el:e,text:(this.caseSensitive?e.textContent:e.textContent?.toLowerCase())??""})).map(({el:e,text:s})=>{const i=new Array;let r=0;for(;r<s.length;){const e=s.indexOf(t,r);if(-1===e)break;i.push(e),r=e+t.length}return i.map(s=>{const i=new Range;return i.setStart(e,s),i.setEnd(e,s+t.length),i})}).flat(),"f"),l(this,wa,"f").length>0&&CSS.highlights.set(l(this,xa,"f"),new Highlight(...l(this,wa,"f"))),this.dispatchEvent(new CustomEvent("highlight",{detail:[...l(this,wa,"f")],bubbles:!1,composed:!1}))},Aa.styles=a`:host { display: contents; }`,Aa.__nextId=0,o([Kt({type:Boolean,reflect:!0})],Aa.prototype,"disabled",void 0),o([Kt()],Aa.prototype,"term",void 0),o([Kt({attribute:"case-sensitive",type:Boolean})],Aa.prototype,"caseSensitive",void 0),Aa=Sa=o([_t("m3e-text-highlight")],Aa);export{pr as ActionElementBase,De as AnimationLoopController,Et as AttachInternals,Gt as Checked,es as CheckedIndeterminate,Qs as ConstraintValidation,Cs as DesignToken,ls as Dirty,Ms as Disabled,Hs as DisabledInteractive,Gs as EventAttribute,nt as FocusController,ei as Focusable,js as FormAssociated,ii as FormSubmitter,ot as HoverController,oi as HtmlFor,lt as IntersectionController,li as KeyboardClick,Us as Labelled,Zi as LinkButton,ht as LongPressController,ur as M3eCollapsibleElement,Lr as M3eElevationElement,Dr as M3eFocusRingElement,Ur as M3ePseudoCheckboxElement,Nr as M3ePseudoRadioElement,Gr as M3eRippleElement,ea as M3eScrollContainerElement,aa as M3eSlideElement,ya as M3eStateLayerElement,Aa as M3eTextHighlightElement,ga as M3eTextOverflowElement,ct as MutationController,dt as PressedController,Yi as ReadOnly,Gi as Required,er as RequiredConstraintValidation,pt as ResizeController,tr as Role,mt as ScrollController,ss as Selected,ds as Touched,ir as Vertical,as as checkOrSelect,Ne as computeLineCount,ut as debounce,Is as defaultValue,Ie as focusWhenReady,Re as forcedColorsActive,Ns as formValue,Qe as generateClipPaths,Ge as getTextContent,Je as guid,et as hasAssignedNodes,xt as hasKeys,tt as interceptProperty,wt as internals,$t as isAttachInternalsMixin,Jt as isCheckedIndeterminateMixin,Qt as isCheckedMixin,rs as isCheckedOrSelected,is as isCheckedOrSelectedMixin,Zs as isConstraintValidationMixin,ns as isDirtyMixin,zs as isDisabledInteractiveMixin,Ls as isDisabledMixin,Rs as isFormAssociatedMixin,ti as isFormSubmitterMixin,ri as isHtmlForMixin,Os as isLabelledMixin,ji as isLinkButtonMixin,Ki as isReadOnlyMixin,Ji as isRequiredConstraintValidationMixin,Qi as isRequiredMixin,ts as isSelectedMixin,hs as isTouchedMixin,sr as isVerticalMixin,st as prefersReducedMotion,Vi as renderPseudoLink,it as resolveElementById,rt as resolveFragmentUrl,bt as safeStyleMap,at as scrollIntoViewIfNeeded,Fs as updateLabels,Xs as validate};
|
|
55
|
+
const qi=e=>e??Li,Vi=Symbol("renderPseudoLink");function ji(e){return xt(e,"download","href","rel","target")}const Xi=Symbol("_clickHandler");function Zi(e){var s,i,a,n,h;class c extends e{constructor(){super(...arguments),s.add(this),this[h]=async e=>{if(zs(this)&&this.disabledInteractive&&(e.preventDefault(),e.stopPropagation()),await new Promise(e=>e()),!e.defaultPrevented&&this.href){e.preventDefault(),e.stopImmediatePropagation();const t=document.createElement("a");t.href=this.href,t.rel=this.rel,t.target=this.target,null!=this.download&&(t.download=this.download),t.addEventListener("click",async()=>{await new Promise(e=>e()),t.remove()}),document.body.appendChild(t),t.click()}},this.href="",this.target="",this.rel=""}get download(){return this.getAttribute("download")}set download(e){const t=this.download;t!==e&&(e?this.setAttribute("download",e):this.removeAttribute("download"),this.requestUpdate("download",t))}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this[Xi]),this.hasAttribute("href")&&"button"===this.role&&(this.role="link")}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this[Xi])}[(s=new WeakSet,h=Xi,Vi)](){const e=Ls(this)&&this.disabled,o=zs(this)&&this.disabledInteractive;return e||o||!this.href?t:r`<a href="${this.href}" target="${qi(this.target||void 0)}" rel="${qi(this.rel||void 0)}" download="${qi(this.download||void 0)}" tabindex="-1" aria-hidden="true" @pointerdown="${l(this,s,"m",i)}" @focus="${l(this,s,"m",a)}" @blur="${l(this,s,"m",n)}"></a>`}}return i=function(e){2!==e.button?(e.preventDefault(),e.stopImmediatePropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))):e.target.removeAttribute("aria-hidden")},a=function(e){e.target.blur(),this.focus()},n=function(e){e.target.setAttribute("aria-hidden","true")},o([Kt()],c.prototype,"href",void 0),o([Kt()],c.prototype,"target",void 0),o([Kt()],c.prototype,"rel",void 0),o([Kt({reflect:!1})],c.prototype,"download",null),c}function Ki(e){return xt(e,"readOnly")}function Yi(e,t=!0){class s extends e{constructor(){super(...arguments),this.readOnly=!1}update(e){super.update(e),e.has("readOnly")&&(this.ariaReadOnly=this.readOnly?"true":null)}}return o([Kt({attribute:"readonly",type:Boolean,reflect:t})],s.prototype,"readOnly",void 0),s}function Qi(e){return xt(e,"required","optional")}function Gi(e){class t extends e{constructor(){super(...arguments),this.required=!1}get optional(){return!this.required}update(e){super.update(e),e.has("required")&&(this.ariaRequired=`${this.required}`)}}return o([Kt({type:Boolean,reflect:!0})],t.prototype,"required",void 0),t}function Ji(e){return Qi(e)&&Zs(e)}function er(e){return class extends e{[Xs](){const e=super[Xs]();if(!e&&this.required){if(Qt(this)&&!this.checked)return{valueMissing:!0};if(!this.value)return{valueMissing:!0}}return e}}}function tr(e,t){return class extends e{connectedCallback(){this.role=this.role||t,super.connectedCallback()}}}function sr(e){return xt(e,"vertical")}function ir(e){class t extends e{constructor(){super(...arguments),this.vertical=!1}update(e){super.update(e),e.has("vertical")&&(this.ariaOrientation=this.vertical?"vertical":"horizontal")}}return o([Kt({type:Boolean,reflect:!0})],t.prototype,"vertical",void 0),t}var rr,ar,nr,or,lr,hr,cr,dr;class pr extends n{constructor(){super(...arguments),rr.set(this,e=>{e.defaultPrevented||this._onClick(e)})}connectedCallback(){super.connectedCallback(),this.parentElement?.addEventListener("click",l(this,rr,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.parentElement?.removeEventListener("click",l(this,rr,"f"))}render(){return r`<slot></slot>`}}rr=new WeakMap,pr.styles=a`:host { display: contents; } ::slotted(.material-icons) { font-size: inherit !important; }`;let ur=class extends(Gs(n,"opening","opened","closing","closed")){constructor(){super(...arguments),ar.add(this),nr.set(this,!1),or.set(this,!1),this.open=!1}update(e){if(super.update(e),this.classList.toggle("-no-animate",!0),!l(this,nr,"f"))return this.open&&(h(this,or,!0,"f"),l(this,ar,"m",hr).call(this)),void h(this,nr,!0,"f");this.toggleAttribute("inert",!this.open),this.open?(h(this,or,!0,"f"),st()||(l(this,ar,"m",hr).call(this),this.classList.toggle("-overflows",this.clientHeight<this.scrollHeight),l(this,ar,"m",cr).call(this)),this.classList.toggle("-closing",!1),this.classList.toggle("-opening",!0),this.dispatchEvent(new Event("opening")),l(this,ar,"m",cr).call(this),this.classList.toggle("-no-animate",!1),l(this,ar,"m",dr).call(this),st()?(l(this,ar,"m",hr).call(this),this.classList.toggle("-opening",!1),this.dispatchEvent(new Event("opened"))):this.addEventListener("transitionend",()=>{this.open&&(l(this,ar,"m",hr).call(this),this.classList.toggle("-opening",!1),this.dispatchEvent(new Event("opened")))},{once:!0})):(this.classList.toggle("-opening",!1),this.classList.toggle("-closing",!0),this.dispatchEvent(new Event("closing")),l(this,ar,"m",dr).call(this),l(this,or,"f")&&this.classList.toggle("-no-animate",!1),st()?(l(this,ar,"m",cr).call(this),this.classList.toggle("-closing",!1),this.dispatchEvent(new Event("closed"))):requestAnimationFrame(()=>{l(this,ar,"m",cr).call(this),this.addEventListener("transitionend",()=>{this.open||(this.classList.toggle("-closing",!1),this.dispatchEvent(new Event("closed")))},{once:!0})}))}render(){return r`<slot @slotchange="${l(this,ar,"m",lr)}"></slot>`}};nr=new WeakMap,or=new WeakMap,ar=new WeakSet,lr=function(){h(this,nr,!0,"f")},hr=function(){this.style.height="auto"},cr=function(){this.style.height=""},dr=function(){this.style.height=`${this.scrollHeight}px`},ur.styles=a`:host { display: block; height: 0px; overflow: hidden; transition: ${i(`visibility var(--m3e-collapsible-animation-duration, ${Cs.motion.duration.medium1})\n ${Cs.motion.easing.standard},\n height var(--m3e-collapsible-animation-duration, ${Cs.motion.duration.medium1})\n ${Cs.motion.easing.standard},\n padding-top var(--m3e-collapsible-animation-duration, ${Cs.motion.duration.medium1})\n ${Cs.motion.easing.standard},\n padding-bottom var(--m3e-collapsible-animation-duration, ${Cs.motion.duration.medium1})\n ${Cs.motion.easing.standard}`)}; } :host(:not(.-closing):not([open])) { visibility: hidden; } :host(:not([open])) { min-height: unset !important; padding-top: 0px !important; padding-bottom: 0px !important; } :host(.-no-animate) { transition-duration: 0ms; } :host(.-opening), :host(.-closing) { overflow-y: hidden !important; } :host(.-overflows) { scrollbar-gutter: stable; } ::slotted(*) { --m3e-collapsible-animation-duration: initial; } @media (prefers-reduced-motion) { :host { transition: none; } }`,o([Kt({type:Boolean,reflect:!0})],ur.prototype,"open",void 0),ur=o([_t("m3e-collapsible")],ur);const mr=i(`var(--m3e-elevation-lift-duration, ${Cs.motion.duration.short4})`),fr=i(`var(--m3e-elevation-lift-easing, ${Cs.motion.easing.standard})`),vr=i(`var(--m3e-elevation-settle-duration, ${Cs.motion.duration.short3})`),yr=i(`var(--m3e-elevation-settle-easing, ${Cs.motion.easing.standardAccelerate})`),gr=i(`var(--m3e-elevation-level, ${Cs.elevation.level0})`),br=i(`var(--m3e-elevation-hover-level, ${Cs.elevation.level0})`),xr=i(`var(--m3e-elevation-focus-level, ${Cs.elevation.level0})`),wr=i(`var(--m3e-elevation-pressed-level, ${Cs.elevation.level0})`);var $r,kr,Er,_r,Sr,Ar,Cr;let Lr=class extends(oi(tr(n,"none"))){constructor(){super(...arguments),$r.add(this),kr.set(this,new ot(this,{target:null,callback:e=>l(this,$r,"m",Sr).call(this,e)})),Er.set(this,new nt(this,{target:null,callback:e=>l(this,$r,"m",Ar).call(this,e)})),_r.set(this,new dt(this,{target:null,callback:e=>l(this,$r,"m",Cr).call(this,e)})),this.disabled=!1,this.level=null}attach(e){super.attach(e),l(this,kr,"f").observe(e),l(this,Er,"f").observe(e),l(this,_r,"f").observe(e)}detach(){this.control&&(l(this,kr,"f").unobserve(this.control),l(this,Er,"f").unobserve(this.control),l(this,_r,"f").unobserve(this.control)),super.detach()}connectedCallback(){this.ariaHidden="true",super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._shadow?.classList.toggle("hover",!1),this._shadow?.classList.toggle("focus",!1),this._shadow?.classList.toggle("pressed",!1),this._shadow?.classList.toggle("resting",!1)}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&(this._shadow?.classList.toggle("hover",!1),this._shadow?.classList.toggle("focus",!1),this._shadow?.classList.toggle("pressed",!1),this._shadow?.classList.toggle("resting",!0))}render(){return r`<div class="shadow"></div>`}};kr=new WeakMap,Er=new WeakMap,_r=new WeakMap,$r=new WeakSet,Sr=function(e){this.disabled||(this._shadow?.classList.toggle("hover",e),this._shadow?.classList.toggle("resting",!e))},Ar=function(e){this.disabled||this._shadow?.classList.toggle("focus",e)},Cr=function(e){this.disabled||this._shadow?.classList.toggle("pressed",e)},Lr.styles=a`:host { display: block; } :host, .shadow { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; } .shadow.resting, .shadow.focus, .shadow.pressed { will-change: box-shadow; transition: ${i(`box-shadow ${vr} ${yr};`)}; } .shadow.hover { will-change: box-shadow; transition: ${i(`box-shadow ${mr} ${fr};`)}; } .shadow { box-shadow: ${gr}; } .shadow.focus { box-shadow: ${xr}; } .shadow.hover { box-shadow: ${br}; } .shadow.pressed { box-shadow: ${wr}; } :host([level="0"]) .shadow { --m3e-elevation-level: ${Cs.elevation.level0}; --m3e-elevation-hover-level: ${Cs.elevation.level1}; } :host([level="1"]) .shadow { --m3e-elevation-level: ${Cs.elevation.level1}; --m3e-elevation-hover-level: ${Cs.elevation.level2}; } :host([level="2"]) .shadow { --m3e-elevation-level: ${Cs.elevation.level2}; --m3e-elevation-hover-level: ${Cs.elevation.level3}; } :host([level="3"]) .shadow { --m3e-elevation-level: ${Cs.elevation.level3}; --m3e-elevation-hover-level: ${Cs.elevation.level4}; } :host([level="4"]) .shadow { --m3e-elevation-level: ${Cs.elevation.level4}; --m3e-elevation-hover-level: ${Cs.elevation.level5}; } :host([level="5"]) .shadow { --m3e-elevation-level: ${Cs.elevation.level5}; --m3e-elevation-hover-level: ${gr}; } :host([level]) .shadow { --m3e-elevation-focus-level: ${gr}; --m3e-elevation-pressed-level: ${gr}; } @media (prefers-reduced-motion) { .shadow.resting, .shadow.pressed, .shadow.focus, .shadow.hover { transition: none; } } @media (forced-colors: active) { .shadow { display: none; } }`,o([Yt(".shadow")],Lr.prototype,"_shadow",void 0),o([Kt({type:Boolean,reflect:!0})],Lr.prototype,"disabled",void 0),o([Kt({type:Number,reflect:!0})],Lr.prototype,"level",void 0),Lr=o([_t("m3e-elevation")],Lr);const Mr=i(`var(--m3e-focus-ring-color, ${Cs.color.secondary})`),zr=i(`var(--m3e-focus-ring-duration, ${Cs.motion.duration.long2})`),Wr=i("var(--m3e-focus-ring-thickness, 0.1875rem)"),Pr=i("var(--m3e-focus-ring-visibility, visible)"),Tr=i("var(--m3e-focus-ring-growth-factor, 2)");var Hr,Fr,Or;let Dr=class extends(oi(tr(n,"none"))){constructor(){super(...arguments),Hr.add(this),Fr.set(this,new nt(this,{target:null,callback:(e,t)=>l(this,Hr,"m",Or).call(this,t)})),this.inward=!1,this.disabled=!1}show(){this._outline?.classList.toggle("visible",!0)}hide(){this._outline?.classList.toggle("visible",!1)}attach(e){super.attach(e),l(this,Fr,"f").observe(e)}detach(){this.control&&l(this,Fr,"f").unobserve(this.control),super.detach()}connectedCallback(){this.ariaHidden="true",super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.hide()}render(){return r`<div class="outline"></div>`}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&this.hide()}};Fr=new WeakMap,Hr=new WeakSet,Or=function(e){this.disabled||(e?this.show():this.hide())},Dr.styles=a`:host { display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; outline: none; } .outline { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; z-index: 1; outline-color: ${Mr}; outline-width: ${Wr}; visibility: ${Pr}; } .outline.visible { outline-style: solid; } :host(:not([inward])) .outline { outline-offset: calc(${Wr} / ${Tr}); } :host([inward]) .outline { outline-offset: calc(0px - ${Wr}); } :host(:not([inward])) .outline.visible { animation: grow-shrink ${zr}; } :host([inward]) .outline.visible { animation: shrink-grow ${zr}; } @keyframes grow-shrink { 50% { outline-width: calc(${Wr} * ${Tr}); } } @keyframes shrink-grow { 50% { outline-offset: calc(0px - calc(${Wr} * ${Tr})); outline-width: calc(${Wr} * ${Tr}); } } @media (prefers-reduced-motion) { :host(:not([inward])) .outline.visible, :host([inward]) .outline.visible { animation: none; } } @media (forced-colors: active) { .outline { outline-color: Highlight; } }`,o([Yt(".outline")],Dr.prototype,"_outline",void 0),o([Kt({type:Boolean,reflect:!0})],Dr.prototype,"inward",void 0),o([Kt({type:Boolean,reflect:!0})],Dr.prototype,"disabled",void 0),Dr=o([_t("m3e-focus-ring")],Dr);let Ur=class extends(es(Ms(tr(n,"none")))){connectedCallback(){super.connectedCallback(),this.ariaHidden="true"}render(){return this.indeterminate?r`<svg viewBox="0 -960 960 960" fill="currentColor"><path Required d="M240-440v-80h480v80H240Z"/></svg>`:this.checked?r`<svg viewBox="0 -960 960 960" fill="currentColor"><path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg>`:t}};Ur.styles=a`:host { display: inline-block; vertical-align: middle; width: var(--m3e-checkbox-icon-size, 1.125rem); height: var(--m3e-checkbox-icon-size, 1.125rem); border-radius: var(--m3e-checkbox-container-shape, 0.125rem); box-sizing: border-box; flex: none; } :host(:not([checked]):not([indeterminate])) { border-width: var(--m3e-checkbox-unselected-outline-thickness, 0.125rem); border-style: solid; } :host(:not([disabled])[checked]), :host(:not([disabled])[indeterminate]) { background-color: var(--m3e-checkbox-selected-container-color, ${Cs.color.primary}); color: var(--m3e-checkbox-selected-icon-color, ${Cs.color.onPrimary}); } :host(:not([disabled]):not([checked]):not([indeterminate])) { border-color: var(--m3e-checkbox-unselected-outline-color, ${Cs.color.onSurfaceVariant}); } :host([disabled]:not([checked]):not([indeterminate])) { border-color: color-mix( in srgb, var(--m3e-checkbox-unselected-disabled-outline-color, ${Cs.color.onSurface}) var(--m3e-checkbox-unselected-disabled-outline-opacity, 38%), transparent ); } :host([disabled][checked]), :host([disabled][indeterminate]) { background-color: color-mix( in srgb, var(--m3e-checkbox-selected-disabled-container-color, ${Cs.color.onSurface}) var(--m3e-checkbox-selected-disabled-container-opacity, 38%), transparent ); color: color-mix( in srgb, var(--m3e-checkbox-selected-disabled-icon-color, ${Cs.color.surface}) var(--m3e-checkbox-selected-disabled-icon-opacity, 100%), transparent ); }`,Ur=o([_t("m3e-pseudo-checkbox")],Ur);let Nr=class extends(Gt(Ms(tr(n,"none")))){connectedCallback(){super.connectedCallback(),this.ariaHidden="true"}render(){return r`<svg class="icon" viewBox="0 0 20 20"><mask id="cutout2"><rect width="100%" height="100%" fill="white"></rect><circle cx="10" cy="10" r="8" fill="black"></circle></mask><circle class="outer circle" cx="10" cy="10" r="10" mask="url(#cutout2)"></circle><circle class="inner circle" cx="10" cy="10" r="5"></circle></svg>`}};Nr.styles=a`:host { display: inline-block; vertical-align: middle; box-sizing: border-box; width: var(--m3e-radio-icon-size, 1.25rem); height: var(--m3e-radio-icon-size, 1.25rem); flex: none; } .circle { fill: currentColor; } :host(:not([checked])) .circle.inner { opacity: 0; } :host(:not([checked])) { color: var(--m3e-radio-unselected-icon-color, ${Cs.color.onSurfaceVariant}); } :host([checked]) { color: var(--m3e-radio-selected-icon-color, ${Cs.color.primary}); } :host([disabled]) { color: color-mix(in srgb, var(--m3e-radio-disabled-icon-color, ${Cs.color.onSurface}) 38%, transparent); }`,Nr=o([_t("m3e-pseudo-radio")],Nr);const Ir=i(`var(--m3e-ripple-color, ${Cs.color.onSurface})`),Rr=i(`var(--m3e-ripple-opacity, ${Cs.state.pressedStateLayerOpacity})`),Br=i(`var(--m3e-ripple-enter-duration, ${Cs.motion.duration.long4})`),qr=i(`var(--m3e-ripple-exit-duration, ${Cs.motion.duration.short2})`),Vr=i("var(--m3e-ripple-scale-factor, 2.5)");var jr,Xr,Zr,Kr,Yr,Qr;let Gr=class extends(oi(tr(n,"none"))){constructor(){super(...arguments),jr.add(this),Xr.set(this,null),Zr.set(this,new dt(this,{target:null,minPressedDuration:150,isPressedKey:e=>" "===e,callback:(e,{x:t,y:s})=>l(this,jr,"m",Qr).call(this,e,t,s)})),this.disabled=!1,this.centered=!1,this.unbounded=!1,this.radius=null}get visible(){return null!==l(this,Xr,"f")}show(e,t,s=!1){l(this,jr,"m",Kr).call(this);const i=this.getBoundingClientRect();this.centered&&(e=i.left+i.width/2,t=i.top+i.height/2);let r=this.radius;if(!r||isNaN(r)){const s=Math.max(Math.abs(e-i.left),Math.abs(e-i.right)),a=Math.max(Math.abs(t-i.top),Math.abs(t-i.bottom));r=Math.sqrt(s*s+a*a)}const a=e-i.left,n=t-i.top;h(this,Xr,document.createElement("div"),"f"),l(this,Xr,"f").classList.add("ripple"),s&&l(this,Xr,"f").classList.add("persistent"),l(this,Xr,"f").style.left=a-r+"px",l(this,Xr,"f").style.top=n-r+"px",l(this,Xr,"f").style.width=2*r+"px",l(this,Xr,"f").style.height=2*r+"px",l(this,Xr,"f").addEventListener("animationend",()=>l(this,jr,"m",Yr).call(this,s),{once:!0}),l(this,Xr,"f").addEventListener("transitionend",()=>l(this,jr,"m",Kr).call(this),{once:!0}),this.shadowRoot?.appendChild(l(this,Xr,"f"))}hide(){l(this,Xr,"f")?.classList.add("exit")}attach(e){super.attach(e),l(this,Zr,"f").observe(e)}detach(){this.control&&l(this,Zr,"f").unobserve(this.control),super.detach()}connectedCallback(){this.ariaHidden="true",super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),l(this,jr,"m",Kr).call(this)}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&this.hide()}};var Jr;Xr=new WeakMap,Zr=new WeakMap,jr=new WeakSet,Kr=function(){l(this,Xr,"f")?.remove(),h(this,Xr,null,"f")},Yr=function(e){e?l(this,Xr,"f")?.classList.add("pressed"):this.hide()},Qr=function(e,t,s){this.disabled||(e?this.show(t,s,!0):this.hide())},Gr.styles=a`:host { display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; } :host(:not([unbounded])) { overflow: hidden; } .ripple { display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; transform: scale(0); border-radius: ${Cs.shape.corner.full}; background-color: color-mix(in srgb, ${Ir} ${Rr}, transparent); will-change: background-color, opacity; animation: ripple ${Br} linear; } .ripple.persistent.pressed { transform: scale(${Vr}); } .ripple.exit { transition: opacity ${qr} cubic-bezier(0, 0, 0.2, 0.1); opacity: 0; } @keyframes ripple { to { transform: scale(${Vr}); } } @media (prefers-reduced-motion) { .ripple { transform: scale(${Vr}); animation-duration: 90ms; } .ripple.exit { transition-duration: 10ms; } } @media (forced-colors: active) { .ripple { display: none; } }`,o([Kt({type:Boolean,reflect:!0})],Gr.prototype,"disabled",void 0),o([Kt({type:Boolean,reflect:!0})],Gr.prototype,"centered",void 0),o([Kt({type:Boolean,reflect:!0})],Gr.prototype,"unbounded",void 0),o([Kt({type:Number})],Gr.prototype,"radius",void 0),Gr=o([_t("m3e-ripple")],Gr);let ea=class extends n{constructor(){super(...arguments),Jr.set(this,()=>this._updateScroll()),this.dividers="above-below",this.thin=!1}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("scroll",l(this,Jr,"f"))}update(e){super.update(e),e.has("dividers")&&(this.removeEventListener("scroll",l(this,Jr,"f")),"none"!==this.dividers&&this.addEventListener("scroll",l(this,Jr,"f"),{passive:!0}))}render(){return r`<slot @slotchange="${this._updateScroll}"></slot>`}_updateScroll(){const e=("above"===this.dividers||"above-below"===this.dividers)&&this.scrollTop>0,t=("below"===this.dividers||"above-below"===this.dividers)&&this.scrollHeight-this.scrollTop-this.clientHeight>1;this.classList.toggle("-above",e),this.classList.toggle("-below",t)}};var ta,sa,ia,ra;Jr=new WeakMap,ea.styles=a`:host { display: block; overflow-y: auto; position: relative; box-sizing: border-box; scrollbar-color: ${Cs.scrollbar.color}; border-top: var(--m3e-divider-thickness, 1px) solid transparent; border-bottom: var(--m3e-divider-thickness, 1px) solid transparent; outline: var(--m3e-focus-ring-color, ${Cs.color.secondary}); outline-width: var(--m3e-focus-ring-thickness, 0.25rem); outline-offset: calc(var(--m3e-focus-ring-thickness, 0.25rem) / 2); } :host([thin]) { scrollbar-width: ${Cs.scrollbar.thinWidth}; } :host(:not([thin])) { scrollbar-width: ${Cs.scrollbar.width}; } :host(:not(:focus-visible).-above) { border-top-color: var(--m3e-divider-color, ${Cs.color.outlineVariant}); } :host(:not(:focus-visible).-below) { border-bottom-color: var(--m3e-divider-color, ${Cs.color.outlineVariant}); } :host(:focus-visible) { outline-style: solid; animation: grow-shrink var(--m3e-focus-ring-duration, ${Cs.motion.duration.long2}); } @keyframes grow-shrink { 50% { outline-width: calc(var(--m3e-focus-ring-thickness, 0.25rem) * var(--m3e-focus-ring-factor, 2)); } } @media (forced-colors: active) { :host { border-top: var(--m3e-divider-thickness, 1px) solid Canvas; border-bottom: var(--m3e-divider-thickness, 1px) solid Canvas; } :host(:not(:focus-visible).-above) { border-top-color: GrayText; } :host(:not(:focus-visible).-below) { border-bottom-color: GrayText; } } @media (prefers-reduced-motion) { :host(:focus-visible) { animation: none; } }`,o([Kt()],ea.prototype,"dividers",void 0),o([Kt({type:Boolean,reflect:!0})],ea.prototype,"thin",void 0),o([ut(40)],ea.prototype,"_updateScroll",null),ea=o([_t("m3e-scroll-container")],ea);let aa=class extends n{constructor(){super(...arguments),ta.add(this),sa.set(this,new Array),this.selectedIndex=null}connectedCallback(){super.connectedCallback(),this.classList.toggle("-no-animate",!0)}update(e){super.update(e),e.has("selectedIndex")&&(null===this.selectedIndex&&this.classList.toggle("-no-animate",!0),l(this,ta,"m",ra).call(this),null!==this.selectedIndex&&this.classList.contains("-no-animate")&&requestAnimationFrame(()=>{null!==this.selectedIndex&&this.classList.toggle("-no-animate",!1)}))}render(){return r`<slot @slotchange="${l(this,ta,"m",ia)}"></slot>`}};sa=new WeakMap,ta=new WeakSet,ia=function(e){const t=[...e.target.assignedElements({flatten:!0})];for(const e of l(this,sa,"f").filter(e=>!t.includes(e)))e.classList.remove("-before"),e.classList.remove("-after"),e.removeAttribute("inert");h(this,sa,t,"f"),l(this,ta,"m",ra).call(this)},ra=function(){const e=this.selectedIndex??l(this,sa,"f").length;for(let t=0;t<l(this,sa,"f").length;t++){const s=l(this,sa,"f")[t];s.classList.toggle("-before",t<e),s.classList.toggle("-after",t>e),s.toggleAttribute("inert",t!==e)}},aa.styles=a`:host { display: flex; position: relative; overflow: hidden; } ::slotted(*) { width: 100%; top: 0; transition: ${i(`inset-inline-start var(--m3e-slide-animation-duration, ${Cs.motion.duration.long2}) ${Cs.motion.easing.standard},\n visibility var(--m3e-slide-animation-duration, ${Cs.motion.duration.long2}) ${Cs.motion.easing.standard} allow-discrete`)}; } ::slotted(.-before), ::slotted(.-after) { visibility: hidden; position: absolute; } ::slotted(.-before) { inset-inline-start: -100%; } ::slotted(.-after) { inset-inline-start: 100%; } ::slotted(:not(.-before):not(.-after)) { position: relative; inset-inline-start: 0; } :host(.-no-animate) ::slotted(*) { transition: none; } @media (prefers-reduced-motion) { ::slotted(*) { transition: none; } }`,o([Kt({attribute:"selected-index",type:Number,reflect:!0})],aa.prototype,"selectedIndex",void 0),aa=o([_t("m3e-slide")],aa);const na=i(`var(--m3e-state-layer-hover-color, ${Cs.color.onSurface})`),oa=i(`var(--m3e-state-layer-hover-opacity, ${Cs.state.hoverStateLayerOpacity})`),la=i(`var(--m3e-state-layer-focus-color, ${Cs.color.onSurface})`),ha=i(`var(--m3e-state-layer-focus-opacity, ${Cs.state.focusStateLayerOpacity})`),ca=i(`var(--m3e-state-layer-duration, ${Cs.motion.duration.medium1})`),da=i(`var(--m3e-state-layer-easing, ${Cs.motion.easing.standard})`);var pa,ua,ma,fa,va;let ya=class extends(oi(tr(n,"none"))){constructor(){super(...arguments),pa.add(this),ua.set(this,new ot(this,{target:null,callback:e=>l(this,pa,"m",fa).call(this,e)})),ma.set(this,new nt(this,{target:null,callback:(e,t)=>l(this,pa,"m",va).call(this,t)})),this.disabled=!1,this.disableHover=!1}show(e){this._layer?.classList.toggle(e,!0)}hide(e){this._layer?.classList.toggle(e,!1)}attach(e){super.attach(e),l(this,ua,"f").observe(e),l(this,ma,"f").observe(e)}detach(){this.control&&(l(this,ua,"f").unobserve(this.control),l(this,ma,"f").unobserve(this.control)),super.detach()}connectedCallback(){this.ariaHidden="true",super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.hide("hover"),this.hide("focused")}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&(this.hide("hover"),this.hide("focused")),e.has("disableHover")&&this.disableHover&&this.hide("hover")}render(){return r`<div class="layer"></div>`}};ua=new WeakMap,ma=new WeakMap,pa=new WeakSet,fa=function(e){this.disabled||this.disableHover||(e?this.show("hover"):this.hide("hover"))},va=function(e){this.disabled||(e?this.show("focused"):this.hide("focused"))},ya.styles=a`:host { display: block; } :host, .layer { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; } .layer { will-change: background-color; transition: ${i(`background-color ${ca} ${da}`)}; } .layer.focused { background-color: color-mix(in srgb, ${la} ${ha}, transparent); } .layer.hover { background-color: color-mix(in srgb, ${na} ${oa}, transparent); } @media (prefers-reduced-motion) { .layer { transition: none; } } @media (forced-colors: active) { .layer { display: none; } }`,o([Yt(".layer")],ya.prototype,"_layer",void 0),o([Kt({type:Boolean,reflect:!0})],ya.prototype,"disabled",void 0),o([Kt({attribute:"disable-hover",type:Boolean,reflect:!0})],ya.prototype,"disableHover",void 0),ya=o([_t("m3e-state-layer")],ya);let ga=class extends n{render(){return r`<span class="base"><slot></slot></span>`}};var ba,xa,wa,$a,ka,Ea,_a,Sa;ga.styles=a`:host { flex: 1 1 auto; display: inline-flex; align-items: center; flex-wrap: nowrap; min-width: 0; } .base { flex: 1 1 auto; display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }`,ga=o([_t("m3e-text-overflow")],ga);let Aa=Sa=class extends n{constructor(){super(),ba.add(this),xa.set(this,"m3e-text-highlight-"+Sa.__nextId++),wa.set(this,new Array),$a.set(this,null),this.disabled=!1,this.term="",this.caseSensitive=!1,this.isSupported&&(h(this,$a,new CSSStyleSheet,"f"),l(this,$a,"f").replaceSync(a`::highlight(${i(l(this,xa,"f"))}) { background-color: var(--m3e-text-highlight-container-color, ${Cs.color.secondaryContainer}); color: var(--m3e-text-highlight-color, ${Cs.color.onSecondaryContainer}); text-decoration: var(--m3e-text-highlight-decoration); text-shadow: var(--m3e-text-highlight-shadow); }`.toString()))}get isSupported(){return!(e||!CSS.highlights)}get ranges(){return l(this,wa,"f")}firstUpdated(e){super.firstUpdated(e),this.shadowRoot&&l(this,$a,"f")&&!this.shadowRoot.adoptedStyleSheets.includes(l(this,$a,"f"))&&this.shadowRoot.adoptedStyleSheets.push(l(this,$a,"f"))}updated(e){super.updated(e),(e.has("term")||e.has("caseSensitive")||e.has("disabled"))&&l(this,ba,"m",_a).call(this)}render(){return r`<slot @slotchange="${l(this,ba,"m",_a)}"></slot>`}};xa=new WeakMap,wa=new WeakMap,$a=new WeakMap,ba=new WeakSet,ka=function(e){return!/^(\\s|\\n)+$/gi.test(e.data)},Ea=function e(t,s){t instanceof HTMLSlotElement?t.assignedElements({flatten:!0}).forEach(t=>{switch(t.nodeType){case Node.TEXT_NODE:l(this,ba,"m",ka).call(this,t)&&s.push(t);break;case Node.ELEMENT_NODE:l(this,ba,"m",e).call(this,t,s)}}):t.childNodes.forEach(t=>{switch(t.nodeType){case Node.TEXT_NODE:l(this,ba,"m",ka).call(this,t)&&s.push(t);break;case Node.ELEMENT_NODE:l(this,ba,"m",e).call(this,t,s)}})},_a=function(){if(!this.isSupported||!this.isConnected)return;if(CSS.highlights.delete(l(this,xa,"f")),l(this,wa,"f").length=0,this.disabled)return;if(!this.term)return void this.dispatchEvent(new CustomEvent("highlight",{detail:[...l(this,wa,"f")],bubbles:!1,composed:!1}));const e=new Array;l(this,ba,"m",Ea).call(this,this,e);const t=this.caseSensitive?this.term:this.term.toLowerCase();h(this,wa,e.map(e=>({el:e,text:(this.caseSensitive?e.textContent:e.textContent?.toLowerCase())??""})).map(({el:e,text:s})=>{const i=new Array;let r=0;for(;r<s.length;){const e=s.indexOf(t,r);if(-1===e)break;i.push(e),r=e+t.length}return i.map(s=>{const i=new Range;return i.setStart(e,s),i.setEnd(e,s+t.length),i})}).flat(),"f"),l(this,wa,"f").length>0&&CSS.highlights.set(l(this,xa,"f"),new Highlight(...l(this,wa,"f"))),this.dispatchEvent(new CustomEvent("highlight",{detail:[...l(this,wa,"f")],bubbles:!1,composed:!1}))},Aa.styles=a`:host { display: contents; }`,Aa.__nextId=0,o([Kt({type:Boolean,reflect:!0})],Aa.prototype,"disabled",void 0),o([Kt()],Aa.prototype,"term",void 0),o([Kt({attribute:"case-sensitive",type:Boolean})],Aa.prototype,"caseSensitive",void 0),Aa=Sa=o([_t("m3e-text-highlight")],Aa);export{pr as ActionElementBase,De as AnimationLoopController,Et as AttachInternals,Gt as Checked,es as CheckedIndeterminate,Qs as ConstraintValidation,Cs as DesignToken,ls as Dirty,Ms as Disabled,Hs as DisabledInteractive,Gs as EventAttribute,nt as FocusController,ei as Focusable,js as FormAssociated,ii as FormSubmitter,ot as HoverController,oi as HtmlFor,lt as IntersectionController,li as KeyboardClick,Us as Labelled,Zi as LinkButton,ht as LongPressController,ur as M3eCollapsibleElement,Lr as M3eElevationElement,Dr as M3eFocusRingElement,Ur as M3ePseudoCheckboxElement,Nr as M3ePseudoRadioElement,Gr as M3eRippleElement,ea as M3eScrollContainerElement,aa as M3eSlideElement,ya as M3eStateLayerElement,Aa as M3eTextHighlightElement,ga as M3eTextOverflowElement,ct as MutationController,dt as PressedController,Yi as ReadOnly,Gi as Required,er as RequiredConstraintValidation,pt as ResizeController,tr as Role,mt as ScrollController,ss as Selected,ds as Touched,ir as Vertical,as as checkOrSelect,Ne as computeLineCount,ut as debounce,Is as defaultValue,Ie as focusWhenReady,Re as forcedColorsActive,Ns as formValue,Qe as generateClipPaths,Ge as getTextContent,Je as guid,et as hasAssignedNodes,xt as hasKeys,tt as interceptProperty,wt as internals,$t as isAttachInternalsMixin,Jt as isCheckedIndeterminateMixin,Qt as isCheckedMixin,rs as isCheckedOrSelected,is as isCheckedOrSelectedMixin,Zs as isConstraintValidationMixin,ns as isDirtyMixin,zs as isDisabledInteractiveMixin,Ls as isDisabledMixin,Rs as isFormAssociatedMixin,ti as isFormSubmitterMixin,ri as isHtmlForMixin,Os as isLabelledMixin,ji as isLinkButtonMixin,Ki as isReadOnlyMixin,Ji as isRequiredConstraintValidationMixin,Qi as isRequiredMixin,ts as isSelectedMixin,hs as isTouchedMixin,sr as isVerticalMixin,st as prefersReducedMotion,Vi as renderPseudoLink,it as resolveElementById,rt as resolveFragmentUrl,bt as safeStyleMap,at as scrollIntoViewIfNeeded,Fs as updateLabels,Xs as validate};
|
|
56
56
|
//# sourceMappingURL=index.min.js.map
|