@getvitops/core 0.1.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/README.md +29 -0
- package/css/animation.css +526 -0
- package/css/global.css +17 -0
- package/css/index.css +58 -0
- package/css/layout.css +723 -0
- package/css/patterns/anchor-link.css +66 -0
- package/css/patterns/banner.css +64 -0
- package/css/patterns/carousel.css +269 -0
- package/css/patterns/cluster.css +64 -0
- package/css/patterns/code.css +17 -0
- package/css/patterns/combobox.css +97 -0
- package/css/patterns/comment.css +88 -0
- package/css/patterns/copy.css +82 -0
- package/css/patterns/details.css +87 -0
- package/css/patterns/dialog.css +99 -0
- package/css/patterns/drawer.css +108 -0
- package/css/patterns/dropdown.css +45 -0
- package/css/patterns/forms.css +335 -0
- package/css/patterns/grouped.css +86 -0
- package/css/patterns/horizontal-scroll.css +40 -0
- package/css/patterns/icon.css +72 -0
- package/css/patterns/lightbox.css +156 -0
- package/css/patterns/list.css +272 -0
- package/css/patterns/marquee.css +68 -0
- package/css/patterns/masonry.css +40 -0
- package/css/patterns/media.css +70 -0
- package/css/patterns/nav.css +241 -0
- package/css/patterns/notification.css +114 -0
- package/css/patterns/overlay.css +28 -0
- package/css/patterns/popover.css +68 -0
- package/css/patterns/pull-quote.css +71 -0
- package/css/patterns/scroll-based.css +227 -0
- package/css/patterns/scroll-target.css +124 -0
- package/css/patterns/separator.css +130 -0
- package/css/patterns/sitenav.css +582 -0
- package/css/patterns/split-link.css +113 -0
- package/css/patterns/splitter.css +212 -0
- package/css/patterns/stack.css +67 -0
- package/css/patterns/sticky.css +127 -0
- package/css/patterns/subgrid.css +178 -0
- package/css/patterns/svg.css +166 -0
- package/css/patterns/table.css +106 -0
- package/css/patterns/tag.css +75 -0
- package/css/patterns/text-effects.css +317 -0
- package/css/patterns/tooltip.css +68 -0
- package/css/patterns/tree.css +126 -0
- package/css/utilities.css +351 -0
- package/dist/deferred.js +1 -0
- package/dist/elements.js +887 -0
- package/dist/polyfills/adoptedStyleSheets.js +1 -0
- package/dist/polyfills/css-anchor-positioning-fn.js +17 -0
- package/dist/polyfills/global.esm.js +1 -0
- package/dist/polyfills/popover.js +63 -0
- package/dist/polyfills/template-shadowroot.js +24 -0
- package/dist/polyfills/webcomponents-bundle.js +27 -0
- package/dist/polyfills.js +1 -0
- package/package.json +33 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){if(typeof document>`u`||`adoptedStyleSheets`in document)return;var e=`ShadyCSS`in window&&!ShadyCSS.nativeShadow,t=document.implementation.createHTMLDocument(``),n=new WeakMap,r=typeof DOMException==`object`?Error:DOMException,i=Object.defineProperty,a=Array.prototype.forEach,o=/@import.+?;?$/gm;function s(e){var t=e.replace(o,``);return t!==e&&console.warn(`@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418`),t.trim()}function c(e){return`isConnected`in e?e.isConnected:document.contains(e)}function l(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function u(e,t){return e.filter(function(e){return t.indexOf(e)===-1})}function d(e){e.parentNode.removeChild(e)}function f(e){return e.shadowRoot||n.get(e)}var p=[`addRule`,`deleteRule`,`insertRule`,`removeRule`],m=CSSStyleSheet.prototype;m.replace=function(){return Promise.reject(new r(`Can't call replace on non-constructed CSSStyleSheets.`))},m.replaceSync=function(){throw new r(`Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.`)};function h(e){return typeof e==`object`?D.isPrototypeOf(e)||m.isPrototypeOf(e):!1}function g(e){return typeof e==`object`?m.isPrototypeOf(e):!1}var _=new WeakMap,v=new WeakMap,y=new WeakMap,b=new WeakMap;function x(e,t){var n=document.createElement(`style`);return y.get(e).set(t,n),v.get(e).push(t),n}function S(e,t){return y.get(e).get(t)}function C(e,t){y.get(e).delete(t),v.set(e,v.get(e).filter(function(e){return e!==t}))}function w(e,t){requestAnimationFrame(function(){t.textContent=_.get(e).textContent,b.get(e).forEach(function(e){return t.sheet[e.method].apply(t.sheet,e.args)})})}function T(e){if(!_.has(e))throw TypeError(`Illegal invocation`)}function E(){var e=this,n=document.createElement(`style`);t.body.appendChild(n),_.set(e,n),v.set(e,[]),y.set(e,new WeakMap),b.set(e,[])}var D=E.prototype;D.replace=function(e){try{return this.replaceSync(e),Promise.resolve(this)}catch(e){return Promise.reject(e)}},D.replaceSync=function(e){if(T(this),typeof e==`string`){var t=this;_.get(t).textContent=s(e),b.set(t,[]),v.get(t).forEach(function(e){e.isConnected()&&w(t,S(t,e))})}},i(D,`cssRules`,{configurable:!0,enumerable:!0,get:function(){return T(this),_.get(this).sheet.cssRules}}),i(D,`media`,{configurable:!0,enumerable:!0,get:function(){return T(this),_.get(this).sheet.media}}),p.forEach(function(e){D[e]=function(){var t=this;T(t);var n=arguments;b.get(t).push({method:e,args:n}),v.get(t).forEach(function(r){if(r.isConnected()){var i=S(t,r).sheet;i[e].apply(i,n)}});var r=_.get(t).sheet;return r[e].apply(r,n)}}),i(E,Symbol.hasInstance,{configurable:!0,value:h});var O={childList:!0,subtree:!0},k=new WeakMap;function A(e){var t=k.get(e);return t||(t=new z(e),k.set(e,t)),t}function j(e){i(e.prototype,`adoptedStyleSheets`,{configurable:!0,enumerable:!0,get:function(){return A(this).sheets},set:function(e){A(this).update(e)}})}function M(e,t){for(var n=document.createNodeIterator(e,NodeFilter.SHOW_ELEMENT,function(e){return f(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},null,!1),r=void 0;r=n.nextNode();)t(f(r))}var N=new WeakMap,P=new WeakMap,F=new WeakMap;function I(e,t){return t instanceof HTMLStyleElement&&P.get(e).some(function(t){return S(t,e)})}function L(e){var t=N.get(e);return t instanceof Document?t.body:t}function R(e){var t=document.createDocumentFragment(),n=P.get(e),r=F.get(e),i=L(e);r.disconnect(),n.forEach(function(n){t.appendChild(S(n,e)||x(n,e))}),i.insertBefore(t,null),r.observe(i,O),n.forEach(function(t){w(t,S(t,e))})}function z(t){var n=this;n.sheets=[],N.set(n,t),P.set(n,[]),F.set(n,new MutationObserver(function(t,r){if(!document){r.disconnect();return}t.forEach(function(t){e||a.call(t.addedNodes,function(e){e instanceof Element&&M(e,function(e){A(e).connect()})}),a.call(t.removedNodes,function(t){t instanceof Element&&(I(n,t)&&R(n),e||M(t,function(e){A(e).disconnect()}))})})}))}if(z.prototype={isConnected:function(){var e=N.get(this);return e instanceof Document?e.readyState!==`loading`:c(e.host)},connect:function(){var e=L(this);F.get(this).observe(e,O),P.get(this).length>0&&R(this),M(e,function(e){A(e).connect()})},disconnect:function(){F.get(this).disconnect()},update:function(e){var t=this,n=N.get(t)===document?`Document`:`ShadowRoot`;if(!Array.isArray(e))throw TypeError(`Failed to set the 'adoptedStyleSheets' property on `+n+`: Iterator getter is not callable.`);if(!e.every(h))throw TypeError(`Failed to set the 'adoptedStyleSheets' property on `+n+`: Failed to convert value to 'CSSStyleSheet'`);if(e.some(g))throw TypeError(`Failed to set the 'adoptedStyleSheets' property on `+n+`: Can't adopt non-constructed stylesheets`);t.sheets=e;var r=P.get(t),i=l(e);u(r,i).forEach(function(e){d(S(e,t)),C(e,t)}),P.set(t,i),t.isConnected()&&i.length>0&&R(t)}},window.CSSStyleSheet=E,j(Document),`ShadowRoot`in window){j(ShadowRoot);var B=Element.prototype,V=B.attachShadow;B.attachShadow=function(e){var t=V.call(this,e);return e.mode===`closed`&&n.set(this,t),t}}var H=A(document);H.isConnected()?H.connect():document.addEventListener(`DOMContentLoaded`,H.connect.bind(H))})();
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,o=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,s=(e,t)=>{for(var n in t||={})i.call(t,n)&&o(e,n,t[n]);if(r)for(var n of r(t))a.call(t,n)&&o(e,n,t[n]);return e},c=(e,r)=>t(e,n(r)),l=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())});const u=Math.min,d=Math.max,f=Math.round,p=Math.floor,m=e=>({x:e,y:e});function h(e,t){return typeof e==`function`?e(t):e}function g(e){return s({top:0,right:0,bottom:0,left:0},e)}function ee(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:g(e)}function _(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function v(e,t){return l(this,null,function*(){var n;t===void 0&&(t={});let{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l=`clippingAncestors`,rootBoundary:u=`viewport`,elementContext:d=`floating`,altBoundary:f=!1,padding:p=0}=h(t,e),m=ee(p),g=s[f?d===`floating`?`reference`:`floating`:d],v=_(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(g))==null||n?g:g.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),y=d===`floating`?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=yield a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating),x=(yield a.isElement==null?void 0:a.isElement(b))&&(yield a.getScale==null?void 0:a.getScale(b))||{x:1,y:1},S=_(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:c}):y);return{top:(v.top-S.top+m.top)/x.y,bottom:(S.bottom-v.bottom+m.bottom)/x.y,left:(v.left-S.left+m.left)/x.x,right:(S.right-v.right+m.right)/x.x}})}function y(){return typeof window<`u`}function b(e){return te(e)?(e.nodeName||``).toLowerCase():`#document`}function x(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function S(e){return((te(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function te(e){return y()?e instanceof Node||e instanceof x(e).Node:!1}function C(e){return y()?e instanceof Element||e instanceof x(e).Element:!1}function w(e){return y()?e instanceof HTMLElement||e instanceof x(e).HTMLElement:!1}function ne(e){return!y()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof x(e).ShadowRoot}const re=new Set([`inline`,`contents`]);function ie(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=E(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!re.has(i)}const ae=new Set([`table`,`td`,`th`]);function oe(e){return ae.has(b(e))}const se=[`:popover-open`,`:modal`];function ce(e){return se.some(t=>{try{return e.matches(t)}catch{return!1}})}const le=[`transform`,`translate`,`scale`,`rotate`,`perspective`],ue=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],de=[`paint`,`layout`,`strict`,`content`];function fe(e){let t=me(),n=C(e)?E(e):e;return le.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||ue.some(e=>(n.willChange||``).includes(e))||de.some(e=>(n.contain||``).includes(e))}function pe(e){let t=D(e);for(;w(t)&&!T(t);){if(fe(t))return t;if(ce(t))return null;t=D(t)}return null}function me(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}const he=new Set([`html`,`body`,`#document`]);function T(e){return he.has(b(e))}function E(e){return x(e).getComputedStyle(e)}function ge(e){return C(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function D(e){if(b(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ne(e)&&e.host||S(e);return ne(t)?t.host:t}function _e(e){let t=D(e);return T(t)?e.ownerDocument?e.ownerDocument.body:e.body:w(t)&&ie(t)?t:_e(t)}function O(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=_e(e),i=r===e.ownerDocument?.body,a=x(r);if(i){let e=ve(a);return t.concat(a,a.visualViewport||[],ie(r)?r:[],e&&n?O(e):[])}return t.concat(r,O(r,[],n))}function ve(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ye(e){let t=E(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=w(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=f(n)!==a||f(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function be(e){return C(e)?e:e.contextElement}function k(e){let t=be(e);if(!w(t))return m(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ye(t),o=(a?f(n.width):n.width)/r,s=(a?f(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const xe=m(0);function Se(e){let t=x(e);return!me()||!t.visualViewport?xe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ce(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==x(e)?!1:t}function A(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=be(e),o=m(1);t&&(r?C(r)&&(o=k(r)):o=k(e));let s=Ce(a,n,r)?Se(a):m(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=x(a),t=r&&C(r)?x(r):r,n=e,i=ve(n);for(;i&&r&&t!==n;){let e=k(i),t=i.getBoundingClientRect(),r=E(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=x(i),i=ve(n)}}return _({width:u,height:d,x:c,y:l})}function we(e,t){let n=ge(e).scrollLeft;return t?t.left+n:A(S(e)).left+n}function Te(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-we(e,n),y:n.top+t.scrollTop}}function Ee(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=S(r),s=t?ce(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=m(1),u=m(0),d=w(r);if((d||!d&&!a)&&((b(r)!==`body`||ie(o))&&(c=ge(r)),w(r))){let e=A(r);l=k(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Te(o,c):m(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function De(e){return Array.from(e.getClientRects())}function Oe(e){let t=S(e),n=ge(e),r=e.ownerDocument.body,i=d(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=d(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+we(e),s=-n.scrollTop;return E(r).direction===`rtl`&&(o+=d(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function ke(e,t){let n=x(e),r=S(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=me();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=we(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=25&&(a-=o)}else l<=25&&(a+=l);return{width:a,height:o,x:s,y:c}}const Ae=new Set([`absolute`,`fixed`]);function je(e,t){let n=A(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=w(e)?k(e):m(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Me(e,t,n){let r;if(t===`viewport`)r=ke(e,n);else if(t===`document`)r=Oe(S(e));else if(C(t))r=je(t,n);else{let n=Se(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return _(r)}function Ne(e,t){let n=D(e);return n===t||!C(n)||T(n)?!1:E(n).position===`fixed`||Ne(n,t)}function Pe(e,t){let n=t.get(e);if(n)return n;let r=O(e,[],!1).filter(e=>C(e)&&b(e)!==`body`),i=null,a=E(e).position===`fixed`,o=a?D(e):e;for(;C(o)&&!T(o);){let t=E(o),n=fe(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&Ae.has(i.position)||ie(o)&&!n&&Ne(e,o))?r=r.filter(e=>e!==o):i=t,o=D(o)}return t.set(e,r),r}function Fe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ce(t)?[]:Pe(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=Me(t,n,i);return e.top=d(r.top,e.top),e.right=u(r.right,e.right),e.bottom=u(r.bottom,e.bottom),e.left=d(r.left,e.left),e},Me(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Ie(e){let{width:t,height:n}=ye(e);return{width:t,height:n}}function Le(e,t,n){let r=w(t),i=S(t),a=n===`fixed`,o=A(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=m(0);function l(){c.x=we(i)}if(r||!r&&!a)if((b(t)!==`body`||ie(i))&&(s=ge(t)),r){let e=A(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Te(i,s):m(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Re(e){return E(e).position===`static`}function ze(e,t){if(!w(e)||E(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return S(e)===n&&(n=n.ownerDocument.body),n}function Be(e,t){let n=x(e);if(ce(e))return n;if(!w(e)){let t=D(e);for(;t&&!T(t);){if(C(t)&&!Re(t))return t;t=D(t)}return n}let r=ze(e,t);for(;r&&oe(r)&&Re(r);)r=ze(r,t);return r&&T(r)&&Re(r)&&!fe(r)?n:r||pe(e)||n}const Ve=function(e){return l(this,null,function*(){let t=this.getOffsetParent||Be,n=this.getDimensions,r=yield n(e.floating);return{reference:Le(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function He(e){return E(e).direction===`rtl`}const j={convertOffsetParentRelativeRectToViewportRelativeRect:Ee,getDocumentElement:S,getClippingRect:Fe,getOffsetParent:Be,getElementRects:Ve,getClientRects:De,getDimensions:Ie,getScale:k,isElement:C,isRTL:He};function Ue(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function We(e,t){let n=null,r,i=S(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(l,f){l===void 0&&(l=!1),f===void 0&&(f=1),a();let m=e.getBoundingClientRect(),{left:h,top:g,width:ee,height:_}=m;if(l||t(),!ee||!_)return;let v=p(g),y=p(i.clientWidth-(h+ee)),b=p(i.clientHeight-(g+_)),x=p(h),S={rootMargin:-v+`px `+-y+`px `+-b+`px `+-x+`px`,threshold:d(0,u(1,f))||1},te=!0;function C(t){let n=t[0].intersectionRatio;if(n!==f){if(!te)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ue(m,e.getBoundingClientRect())&&o(),te=!1}try{n=new IntersectionObserver(C,c(s({},S),{root:i.ownerDocument}))}catch{n=new IntersectionObserver(C,S)}n.observe(e)}return o(!0),a}function Ge(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=be(e),u=i||a?[...l?O(l):[],...O(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?We(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?A(e):null;c&&g();function g(){let t=A(e);h&&!Ue(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const Ke=v;let M=null;var qe=class e{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(t){return e.createItem(t)}allocateCursor(e,t){let n;return M===null?n={prev:e,next:t,cursor:this.cursor}:(n=M,M=M.cursor,n.prev=e,n.next=t,n.cursor=this.cursor),this.cursor=n,n}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=M,M=e}updateCursors(e,t,n,r){let{cursor:i}=this;for(;i!==null;)i.prev===e&&(i.prev=t),i.next===n&&(i.next=r),i=i.cursor}*[Symbol.iterator](){for(let e=this.head;e!==null;e=e.next)yield e.data}get size(){let e=0;for(let t=this.head;t!==null;t=t.next)e++;return e}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(t){let n=null;this.head=null;for(let r of t){let t=e.createItem(r);n===null?this.head=t:n.next=t,t.prev=n,n=t}return this.tail=n,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,t=this){let n=this.allocateCursor(null,this.head);for(;n.next!==null;){let r=n.next;n.next=r.next,e.call(t,r.data,r,this)}this.releaseCursor()}forEachRight(e,t=this){let n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){let r=n.prev;n.prev=r.prev,e.call(t,r.data,r,this)}this.releaseCursor()}reduce(e,t,n=this){let r=this.allocateCursor(null,this.head),i=t,a;for(;r.next!==null;)a=r.next,r.next=a.next,i=e.call(n,i,a.data,a,this);return this.releaseCursor(),i}reduceRight(e,t,n=this){let r=this.allocateCursor(this.tail,null),i=t,a;for(;r.prev!==null;)a=r.prev,r.prev=a.prev,i=e.call(n,i,a.data,a,this);return this.releaseCursor(),i}some(e,t=this){for(let n=this.head;n!==null;n=n.next)if(e.call(t,n.data,n,this))return!0;return!1}map(t,n=this){let r=new e;for(let e=this.head;e!==null;e=e.next)r.appendData(t.call(n,e.data,e,this));return r}filter(t,n=this){let r=new e;for(let e=this.head;e!==null;e=e.next)t.call(n,e.data,e,this)&&r.appendData(e.data);return r}nextUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(null,e);for(;r.next!==null;){let e=r.next;if(r.next=e.next,t.call(n,e.data,e,this))break}this.releaseCursor()}prevUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(e,null);for(;r.prev!==null;){let e=r.prev;if(r.prev=e.prev,t.call(n,e.data,e,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let t=new e;for(let e of this)t.appendData(e);return t}prepend(e){return this.updateCursors(null,e,this.head,e),this.head===null?this.tail=e:(this.head.prev=e,e.next=this.head),this.head=e,this}prependData(t){return this.prepend(e.createItem(t))}append(e){return this.insert(e)}appendData(t){return this.insert(e.createItem(t))}insert(e,t=null){if(t!==null)if(this.updateCursors(t.prev,e,t,e),t.prev===null){if(this.head!==t)throw Error(`before doesn't belong to list`);this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),this.tail===null?this.head=e:(this.tail.next=e,e.prev=this.tail),this.tail=e;return this}insertData(t,n){return this.insert(e.createItem(t),n)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),e.prev!==null)e.prev.next=e.next;else{if(this.head!==e)throw Error(`item doesn't belong to list`);this.head=e.next}if(e.next!==null)e.next.prev=e.prev;else{if(this.tail!==e)throw Error(`item doesn't belong to list`);this.tail=e.prev}return e.prev=null,e.next=null,e}push(t){this.insert(e.createItem(t))}pop(){return this.tail===null?null:this.remove(this.tail)}unshift(t){this.prepend(e.createItem(t))}shift(){return this.head===null?null:this.remove(this.head)}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,t){return e.head===null?this:(t==null?(this.updateCursors(this.tail,e.tail,null,e.head),this.tail===null?this.head=e.head:(this.tail.next=e.head,e.head.prev=this.tail),this.tail=e.tail):(this.updateCursors(t.prev,e.tail,t,e.head),t.prev===null?this.head=e.head:(t.prev.next=e.head,e.head.prev=t.prev),t.prev=e.tail,e.tail.next=t),e.head=null,e.tail=null,this)}replace(e,t){`head`in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}};function Je(e){let t={};for(let n of Object.keys(e)){let r=e[n];r&&(Array.isArray(r)||r instanceof qe?r=r.map(Je):r.constructor===Object&&(r=Je(r))),t[n]=r}return t}function N(e){return e>=48&&e<=57}function P(e){return N(e)||e>=65&&e<=70||e>=97&&e<=102}function Ye(e){return e>=65&&e<=90}function Xe(e){return e>=97&&e<=122}function Ze(e){return Ye(e)||Xe(e)}function Qe(e){return e>=128}function $e(e){return Ze(e)||Qe(e)||e===95}function et(e){return $e(e)||N(e)||e===45}function tt(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function nt(e){return e===10||e===13||e===12}function F(e){return nt(e)||e===32||e===9}function I(e,t){return!(e!==92||nt(t)||t===0)}function rt(e,t,n){return e===45?$e(t)||t===45||I(t,n):$e(e)?!0:e===92?I(e,t):!1}function it(e,t,n){return e===43||e===45?N(t)?2:t===46&&N(n)?3:0:e===46?N(t)?2:0:+!!N(e)}function at(e){return+(e===65279||e===65534)}const ot=Array(128);for(let e=0;e<ot.length;e++)ot[e]=F(e)&&130||N(e)&&131||$e(e)&&132||tt(e)&&133||e||128;function st(e){return e<128?ot[e]:132}function L(e,t){return t<e.length?e.charCodeAt(t):0}function ct(e,t,n){return n===13&&L(e,t+1)===10?2:1}function lt(e,t,n){let r=e.charCodeAt(t);return Ye(r)&&(r|=32),r===n}function ut(e,t,n,r){if(n-t!==r.length||t<0||n>e.length)return!1;for(let i=t;i<n;i++){let n=r.charCodeAt(i-t),a=e.charCodeAt(i);if(Ye(a)&&(a|=32),a!==n)return!1}return!0}function dt(e,t){for(;t>=0&&F(e.charCodeAt(t));t--);return t+1}function ft(e,t){for(;t<e.length&&F(e.charCodeAt(t));t++);return t}function pt(e,t){for(;t<e.length&&N(e.charCodeAt(t));t++);return t}function R(e,t){if(t+=2,P(L(e,t-1))){for(let n=Math.min(e.length,t+5);t<n&&P(L(e,t));t++);let n=L(e,t);F(n)&&(t+=ct(e,t,n))}return t}function mt(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(!et(n)){if(I(n,L(e,t+1))){t=R(e,t)-1;continue}break}}return t}function ht(e,t){let n=e.charCodeAt(t);if((n===43||n===45)&&(n=e.charCodeAt(t+=1)),N(n)&&(t=pt(e,t+1),n=e.charCodeAt(t)),n===46&&N(e.charCodeAt(t+1))&&(t+=2,t=pt(e,t)),lt(e,t,101)){let r=0;n=e.charCodeAt(t+1),(n===45||n===43)&&(r=1,n=e.charCodeAt(t+2)),N(n)&&(t=pt(e,t+1+r+1))}return t}function gt(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n===41){t++;break}I(n,L(e,t+1))&&(t=R(e,t))}return t}function _t(e){if(e.length===1&&!P(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(t===0||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}const vt=`EOF-token.ident-token.function-token.at-keyword-token.hash-token.string-token.bad-string-token.url-token.bad-url-token.delim-token.number-token.percentage-token.dimension-token.whitespace-token.CDO-token.CDC-token.colon-token.semicolon-token.comma-token.[-token.]-token.(-token.)-token.{-token.}-token.comment-token`.split(`.`);function yt(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}function bt(e){let t=e.source,n=t.length,r=t.length>0?at(t.charCodeAt(0)):0,i=yt(e.lines,n),a=yt(e.columns,n),o=e.startLine,s=e.startColumn;for(let e=r;e<n;e++){let r=t.charCodeAt(e);i[e]=o,a[e]=s++,(r===10||r===13||r===12)&&(r===13&&e+1<n&&t.charCodeAt(e+1)===10&&(e++,i[e]=o,a[e]=s),o++,s=1)}i[n]=o,a[n]=s,e.lines=i,e.columns=a,e.computed=!0}var xt=class{constructor(e,t,n,r){this.setSource(e,t,n,r),this.lines=null,this.columns=null}setSource(e=``,t=0,n=1,r=1){this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,t){return this.computed||bt(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||bt(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}};const z=16777215,B=new Uint8Array(32);B[2]=22,B[21]=22,B[19]=20,B[23]=24;function St(e){return B[e]!==0}var Ct=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e=``,t=()=>{}){e=String(e||``);let n=e.length,r=yt(this.offsetAndType,e.length+1),i=yt(this.balance,e.length+1),a=0,o=-1,s=0,c=e.length;this.offsetAndType=null,this.balance=null,i.fill(0),t(e,(e,t,n)=>{let l=a++;if(r[l]=e<<24|n,o===-1&&(o=t),i[l]=c,e===s){let e=i[c];i[c]=l,c=e,s=B[r[e]>>24]}else St(e)&&(c=l,s=B[e])}),r[a]=0|n,i[a]=a;for(let e=0;e<a;e++){let t=i[e];if(t<=e){let n=i[t];n!==e&&(i[e]=n)}else t>a&&(i[e]=a)}this.source=e,this.firstCharOffset=o===-1?0:o,this.tokenCount=a,this.offsetAndType=r,this.balance=i,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>24:0}lookupTypeNonSC(e){for(let t=this.tokenIndex;t<this.tokenCount;t++){let n=this.offsetAndType[t]>>24;if(n!==13&&n!==25&&e--===0)return n}return 0}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&z:this.source.length}lookupOffsetNonSC(e){for(let t=this.tokenIndex;t<this.tokenCount;t++){let n=this.offsetAndType[t]>>24;if(n!==13&&n!==25&&e--===0)return t-this.tokenIndex}return 0}lookupValue(e,t){return e+=this.tokenIndex,e<this.tokenCount?ut(this.source,this.offsetAndType[e-1]&z,this.offsetAndType[e]&z,t):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&z:this.offsetAndType[this.tokenCount]&z:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?this.lookupType(t)===9&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&z,t=this.offsetAndType[t],this.tokenType=t>>24,this.tokenEnd=t&z):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>24,this.tokenEnd=e&z):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(e,t){let n=e,r=0,i=0;t:for(;n<this.tokenCount;n++){if(r=this.balance[n],r<e)break t;switch(i=n>0?this.offsetAndType[n-1]&z:this.firstCharOffset,t(this.source.charCodeAt(i))){case 1:break t;case 2:n++;break t;default:St(this.offsetAndType[n]>>24)&&(n=r)}}this.skip(n-this.tokenIndex)}forEachToken(e){for(let t=0,n=this.firstCharOffset;t<this.tokenCount;t++){let r=n,i=this.offsetAndType[t],a=i&z,o=i>>24;n=a,e(o,r,a,t)}}dump(){let e=Array(this.tokenCount);return this.forEachToken((t,n,r,i)=>{e[i]={idx:i,type:vt[t],chunk:this.source.substring(n,r),balance:this.balance[i]}}),e}};function wt(e,t){function n(t){return t<s?e.charCodeAt(t):0}function r(){if(l=ht(e,l),rt(n(l),n(l+1),n(l+2))){u=12,l=mt(e,l);return}if(n(l)===37){u=11,l++;return}u=10}function i(){let t=l;if(l=mt(e,l),ut(e,t,l,`url`)&&n(l)===40){if(l=ft(e,l+1),n(l)===34||n(l)===39){u=2,l=t+4;return}o();return}if(n(l)===40){u=2,l++;return}u=1}function a(t){for(t||=n(l++),u=5;l<e.length;l++){let r=e.charCodeAt(l);switch(st(r)){case t:l++;return;case 130:if(nt(r)){l+=ct(e,l,r),u=6;return}break;case 92:if(l===e.length-1)break;let i=n(l+1);nt(i)?l+=ct(e,l+1,i):I(r,i)&&(l=R(e,l)-1);break}}}function o(){for(u=7,l=ft(e,l);l<e.length;l++){let t=e.charCodeAt(l);switch(st(t)){case 41:l++;return;case 130:if(l=ft(e,l),n(l)===41||l>=e.length){l<e.length&&l++;return}l=gt(e,l),u=8;return;case 34:case 39:case 40:case 133:l=gt(e,l),u=8;return;case 92:if(I(t,n(l+1))){l=R(e,l)-1;break}l=gt(e,l),u=8;return}}}e=String(e||``);let s=e.length,c=at(n(0)),l=c,u;for(;l<s;){let o=e.charCodeAt(l);switch(st(o)){case 130:u=13,l=ft(e,l+1);break;case 34:a();break;case 35:et(n(l+1))||I(n(l+1),n(l+2))?(u=4,l=mt(e,l+1)):(u=9,l++);break;case 39:a();break;case 40:u=21,l++;break;case 41:u=22,l++;break;case 43:it(o,n(l+1),n(l+2))?r():(u=9,l++);break;case 44:u=18,l++;break;case 45:it(o,n(l+1),n(l+2))?r():n(l+1)===45&&n(l+2)===62?(u=15,l+=3):rt(o,n(l+1),n(l+2))?i():(u=9,l++);break;case 46:it(o,n(l+1),n(l+2))?r():(u=9,l++);break;case 47:n(l+1)===42?(u=25,l=e.indexOf(`*/`,l+2),l=l===-1?e.length:l+2):(u=9,l++);break;case 58:u=16,l++;break;case 59:u=17,l++;break;case 60:n(l+1)===33&&n(l+2)===45&&n(l+3)===45?(u=14,l+=4):(u=9,l++);break;case 64:rt(n(l+1),n(l+2),n(l+3))?(u=3,l=mt(e,l+1)):(u=9,l++);break;case 91:u=19,l++;break;case 92:I(o,n(l+1))?i():(u=9,l++);break;case 93:u=20,l++;break;case 123:u=23,l++;break;case 125:u=24,l++;break;case 131:r();break;case 132:i();break;default:u=9,l++}t(u,c,c=l)}}function Tt(e,t){return t||=0,e.length-t>=2&&e.charCodeAt(t)===45&&e.charCodeAt(t+1)===45}function Et(e){let t=e.length,n=e.charCodeAt(0),r=+(n===34||n===39),i=r===1&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,a=``;for(let n=r;n<=i;n++){let r=e.charCodeAt(n);if(r===92){if(n===i){n!==t-1&&(a=e.substr(n+1));break}if(r=e.charCodeAt(++n),I(92,r)){let t=n-1,r=R(e,t);n=r-1,a+=_t(e.substring(t+1,r))}else r===13&&e.charCodeAt(n+1)===10&&n++}else a+=e[n]}return a}function Dt(e,t){let n=``,r=!1;for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);if(i===0){n+=`�`;continue}if(i<=31||i===127){n+=`\\`+i.toString(16),r=!0;continue}i===34||i===92?(n+=`\\`+e.charAt(t),r=!1):(r&&(P(i)||F(i))&&(n+=` `),n+=e.charAt(t),r=!1)}return`"`+n+`"`}function Ot(e){let t=e.length,n=4,r=e.charCodeAt(t-1)===41?t-2:t-1,i=``;for(;n<r&&F(e.charCodeAt(n));)n++;for(;n<r&&F(e.charCodeAt(r));)r--;for(let a=n;a<=r;a++){let n=e.charCodeAt(a);if(n===92){if(a===r){a!==t-1&&(i=e.substr(a+1));break}if(n=e.charCodeAt(++a),I(92,n)){let t=a-1,n=R(e,t);a=n-1,i+=_t(e.substring(t+1,n))}else n===13&&e.charCodeAt(a+1)===10&&a++}else i+=e[a]}return i}function kt(e){let t=``,n=!1;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(i===0){t+=`�`;continue}if(i<=31||i===127){t+=`\\`+i.toString(16),n=!0;continue}i===32||i===92||i===34||i===39||i===40||i===41?(t+=`\\`+e.charAt(r),n=!1):(n&&P(i)&&(t+=` `),t+=e.charAt(r),n=!1)}return`url(`+t+`)`}const{hasOwnProperty:At}=Object.prototype,V=function(){};function jt(e){return typeof e==`function`?e:V}function Mt(e,t){return function(n,r,i){n.type===t&&e.call(this,n,r,i)}}function Nt(e,t){let n=t.structure,r=[];for(let e in n){if(At.call(n,e)===!1)continue;let t=n[e],i={name:e,type:!1,nullable:!1};Array.isArray(t)||(t=[t]);for(let e of t)e===null?i.nullable=!0:typeof e==`string`?i.type=`node`:Array.isArray(e)&&(i.type=`list`);i.type&&r.push(i)}return r.length?{context:t.walkContext,fields:r}:null}function Pt(e){let t={};for(let n in e.node)if(At.call(e.node,n)){let r=e.node[n];if(!r.structure)throw Error("Missed `structure` field in `"+n+"` node type definition");t[n]=Nt(n,r)}return t}function Ft(e,t){let n=e.fields.slice(),r=e.context,i=typeof r==`string`;return t&&n.reverse(),function(e,a,o,s){let c;i&&(c=a[r],a[r]=e);for(let r of n){let n=e[r.name];if(!r.nullable||n){if(r.type===`list`){if(t?n.reduceRight(s,!1):n.reduce(s,!1))return!0}else if(o(n))return!0}}i&&(a[r]=c)}}function It({StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:i}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Rule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Declaration:{StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:i}}}function Lt(e){let t=Pt(e),n={},r={},i=Symbol(`break-walk`),a=Symbol(`skip-node`);for(let e in t)At.call(t,e)&&t[e]!==null&&(n[e]=Ft(t[e],!1),r[e]=Ft(t[e],!0));let o=It(n),s=It(r),c=function(e,c){function l(e,t,n){let r=u.call(m,e,t,n);return r===i?!0:r===a?!1:!!(f.hasOwnProperty(e.type)&&f[e.type](e,m,l,p)||d.call(m,e,t,n)===i)}let u=V,d=V,f=n,p=(e,t,n,r)=>e||l(t,n,r),m={break:i,skip:a,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof c==`function`)u=c;else if(c&&(u=jt(c.enter),d=jt(c.leave),c.reverse&&(f=r),c.visit)){if(o.hasOwnProperty(c.visit))f=c.reverse?s[c.visit]:o[c.visit];else if(!t.hasOwnProperty(c.visit))throw Error("Bad value `"+c.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(`, `)+`)`);u=Mt(u,c.visit),d=Mt(d,c.visit)}if(u===V&&d===V)throw Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");l(e)};return c.break=i,c.skip=a,c.find=function(e,t){let n=null;return c(e,function(e,r,a){if(t.call(this,e,r,a))return n=e,i}),n},c.findLast=function(e,t){let n=null;return c(e,{reverse:!0,enter(e,r,a){if(t.call(this,e,r,a))return n=e,i}}),n},c.findAll=function(e,t){let n=[];return c(e,function(e,r,i){t.call(this,e,r,i)&&n.push(e)}),n},c}function Rt(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===43||r===45)&&(t&&this.error(`Number sign is not allowed`),n++);n<this.tokenEnd;n++)N(this.charCodeAt(n))||this.error(`Integer is expected`,n)}function H(e){return Rt.call(this,0,e)}function U(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n=``;switch(t){case 110:n=`N is expected`;break;case 45:n=`HyphenMinus is expected`;break}this.error(n,this.tokenStart+e)}}function zt(){let e=0,t=0,n=this.tokenType;for(;n===13||n===25;)n=this.lookupType(++e);if(n!==10)if(this.isDelim(43,e)||this.isDelim(45,e)){t=this.isDelim(43,e)?43:45;do n=this.lookupType(++e);while(n===13||n===25);n!==10&&(this.skip(e),H.call(this,!0))}else return null;return e>0&&this.skip(e),t===0&&(n=this.charCodeAt(this.tokenStart),n!==43&&n!==45&&this.error(`Number sign is expected`)),H.call(this,t!==0),t===45?`-`+this.consume(10):this.consume(10)}const Bt={a:[String,null],b:[String,null]};function Vt(){let e=this.tokenStart,t=null,n=null;if(this.tokenType===10)H.call(this,!1),n=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,45))switch(t=`-1`,U.call(this,1,110),this.tokenEnd-this.tokenStart){case 2:this.next(),n=zt.call(this);break;case 3:U.call(this,2,45),this.next(),this.skipSC(),H.call(this,!0),n=`-`+this.consume(10);break;default:U.call(this,2,45),Rt.call(this,3,!0),this.next(),n=this.substrToCursor(e+2)}else if(this.tokenType===1||this.isDelim(43)&&this.lookupType(1)===1){let r=0;switch(t=`1`,this.isDelim(43)&&(r=1,this.next()),U.call(this,0,110),this.tokenEnd-this.tokenStart){case 1:this.next(),n=zt.call(this);break;case 2:U.call(this,1,45),this.next(),this.skipSC(),H.call(this,!0),n=`-`+this.consume(10);break;default:U.call(this,1,45),Rt.call(this,2,!0),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===12){let r=this.charCodeAt(this.tokenStart),i=r===43||r===45,a=this.tokenStart+i;for(;a<this.tokenEnd&&N(this.charCodeAt(a));a++);a===this.tokenStart+i&&this.error(`Integer is expected`,this.tokenStart+i),U.call(this,a-this.tokenStart,110),t=this.substring(e,a),a+1===this.tokenEnd?(this.next(),n=zt.call(this)):(U.call(this,a-this.tokenStart+1,45),a+2===this.tokenEnd?(this.next(),this.skipSC(),H.call(this,!0),n=`-`+this.consume(10)):(Rt.call(this,a-this.tokenStart+2,!0),this.next(),n=this.substrToCursor(a+1)))}else this.error();return t!==null&&t.charCodeAt(0)===43&&(t=t.substr(1)),n!==null&&n.charCodeAt(0)===43&&(n=n.substr(1)),{type:`AnPlusB`,loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function Ht(e){if(e.a){let t=e.a===`+1`&&`n`||e.a===`1`&&`n`||e.a===`-1`&&`-n`||e.a+`n`;if(e.b){let n=e.b[0]===`-`||e.b[0]===`+`?e.b:`+`+e.b;this.tokenize(t+n)}else this.tokenize(t)}else this.tokenize(e.b)}const Ut=Object.freeze(Object.defineProperty({__proto__:null,generate:Ht,name:`AnPlusB`,parse:Vt,structure:Bt},Symbol.toStringTag,{value:`Module`}));function Wt(){return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function Gt(){for(let e=1,t;t=this.lookupType(e);e++){if(t===24)return!0;if(t===23||t===3)return!1}return!1}const Kt={name:String,prelude:[`AtrulePrelude`,`Raw`,null],block:[`Block`,null]};function qt(e=!1){let t=this.tokenStart,n,r,i=null,a=null;switch(this.eat(3),n=this.substrToCursor(t+1),r=n.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(i=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,n,e),Wt):Wt.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:a=hasOwnProperty.call(this.atrule,r)&&typeof this.atrule[r].block==`function`?this.atrule[r].block.call(this,e):this.Block(Gt.call(this));break}return{type:`Atrule`,loc:this.getLocation(t,this.tokenStart),name:n,prelude:i,block:a}}function Jt(e){this.token(3,`@`+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,`;`)}const Yt=Object.freeze(Object.defineProperty({__proto__:null,generate:Jt,name:`Atrule`,parse:qt,structure:Kt,walkContext:`atrule`},Symbol.toStringTag,{value:`Module`})),Xt={children:[[]]};function Zt(e){let t=null;return e!==null&&(e=e.toLowerCase()),this.skipSC(),t=hasOwnProperty.call(this.atrule,e)&&typeof this.atrule[e].prelude==`function`?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error(`Semicolon or block is expected`),{type:`AtrulePrelude`,loc:this.getLocationFromList(t),children:t}}function Qt(e){this.children(e)}const $t=Object.freeze(Object.defineProperty({__proto__:null,generate:Qt,name:`AtrulePrelude`,parse:Zt,structure:Xt,walkContext:`atrulePrelude`},Symbol.toStringTag,{value:`Module`}));function en(){this.eof&&this.error(`Unexpected end of input`);let e=this.tokenStart,t=!1;return this.isDelim(42)?(t=!0,this.next()):this.isDelim(124)||this.eat(1),this.isDelim(124)?this.charCodeAt(this.tokenStart+1)===61?t&&this.error(`Identifier is expected`,this.tokenEnd):(this.next(),this.eat(1)):t&&this.error(`Vertical line is expected`),{type:`Identifier`,loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function tn(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==61&&t!==126&&t!==94&&t!==36&&t!==42&&t!==124&&this.error(`Attribute selector (=, ~=, ^=, $=, *=, |=) is expected`),this.next(),t!==61&&(this.isDelim(61)||this.error(`Equal sign is expected`),this.next()),this.substrToCursor(e)}const nn={name:`Identifier`,matcher:[String,null],value:[`String`,`Identifier`,null],flags:[String,null]};function rn(){let e=this.tokenStart,t,n=null,r=null,i=null;return this.eat(19),this.skipSC(),t=en.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(n=tn.call(this),this.skipSC(),r=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(i=this.consume(1),this.skipSC())),this.eat(20),{type:`AttributeSelector`,loc:this.getLocation(e,this.tokenStart),name:t,matcher:n,value:r,flags:i}}function an(e){this.token(9,`[`),this.node(e.name),e.matcher!==null&&(this.tokenize(e.matcher),this.node(e.value)),e.flags!==null&&this.token(1,e.flags),this.token(9,`]`)}const on=Object.freeze(Object.defineProperty({__proto__:null,generate:an,name:`AttributeSelector`,parse:rn,structure:nn},Symbol.toStringTag,{value:`Module`}));function sn(){return this.Raw(null,!0)}function cn(){return this.parseWithFallback(this.Rule,sn)}function ln(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}function un(){if(this.tokenType===17)return ln.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,ln);return this.tokenType===17&&this.next(),e}const dn={children:[[`Atrule`,`Rule`,`Declaration`]]};function fn(e){let t=e?un:cn,n=this.tokenStart,r=this.createList();this.eat(23);t:for(;!this.eof;)switch(this.tokenType){case 24:break t;case 13:case 25:this.next();break;case 3:r.push(this.parseWithFallback(this.Atrule.bind(this,e),sn));break;default:e&&this.isDelim(38)?r.push(cn.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:`Block`,loc:this.getLocation(n,this.tokenStart),children:r}}function pn(e){this.token(23,`{`),this.children(e,e=>{e.type===`Declaration`&&this.token(17,`;`)}),this.token(24,`}`)}const mn=Object.freeze(Object.defineProperty({__proto__:null,generate:pn,name:`Block`,parse:fn,structure:dn,walkContext:`block`},Symbol.toStringTag,{value:`Module`})),hn={children:[[]]};function gn(e,t){let n=this.tokenStart,r=null;return this.eat(19),r=e.call(this,t),this.eof||this.eat(20),{type:`Brackets`,loc:this.getLocation(n,this.tokenStart),children:r}}function _n(e){this.token(9,`[`),this.children(e),this.token(9,`]`)}const vn=Object.freeze(Object.defineProperty({__proto__:null,generate:_n,name:`Brackets`,parse:gn,structure:hn},Symbol.toStringTag,{value:`Module`})),yn=[];function bn(){let e=this.tokenStart;return this.eat(15),{type:`CDC`,loc:this.getLocation(e,this.tokenStart)}}function xn(){this.token(15,`-->`)}const Sn=Object.freeze(Object.defineProperty({__proto__:null,generate:xn,name:`CDC`,parse:bn,structure:yn},Symbol.toStringTag,{value:`Module`})),Cn=[];function wn(){let e=this.tokenStart;return this.eat(14),{type:`CDO`,loc:this.getLocation(e,this.tokenStart)}}function Tn(){this.token(14,`<!--`)}const En=Object.freeze(Object.defineProperty({__proto__:null,generate:Tn,name:`CDO`,parse:wn,structure:Cn},Symbol.toStringTag,{value:`Module`})),Dn={name:String};function On(){return this.eatDelim(46),{type:`ClassSelector`,loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function kn(e){this.token(9,`.`),this.token(1,e.name)}const An=Object.freeze(Object.defineProperty({__proto__:null,generate:kn,name:`ClassSelector`,parse:On,structure:Dn},Symbol.toStringTag,{value:`Module`})),jn={name:String};function Mn(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=` `;break;case 9:switch(this.charCodeAt(this.tokenStart)){case 62:case 43:case 126:this.next();break;case 47:this.next(),this.eatIdent(`deep`),this.eatDelim(47);break;default:this.error(`Combinator is expected`)}t=this.substrToCursor(e);break}return{type:`Combinator`,loc:this.getLocation(e,this.tokenStart),name:t}}function Nn(e){this.tokenize(e.name)}const Pn=Object.freeze(Object.defineProperty({__proto__:null,generate:Nn,name:`Combinator`,parse:Mn,structure:jn},Symbol.toStringTag,{value:`Module`})),Fn={value:String};function In(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===42&&this.charCodeAt(t-1)===47&&(t-=2),{type:`Comment`,loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function Ln(e){this.token(25,`/*`+e.value+`*/`)}const Rn=Object.freeze(Object.defineProperty({__proto__:null,generate:Ln,name:`Comment`,parse:In,structure:Fn},Symbol.toStringTag,{value:`Module`})),zn=new Set([16,22,0]),Bn={kind:String,children:[[`Identifier`,`Feature`,`FeatureFunction`,`FeatureRange`,`SupportsDeclaration`]]};function Vn(e){return this.lookupTypeNonSC(1)===1&&zn.has(this.lookupTypeNonSC(2))?this.Feature(e):this.FeatureRange(e)}const Hn={media:Vn,container:Vn,supports(){return this.SupportsDeclaration()}};function Un(e=`media`){let t=this.createList();t:for(;!this.eof;)switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t.push(this.Identifier());break;case 21:{let n=this.parseWithFallback(()=>Hn[e].call(this,e),()=>null);n||=this.parseWithFallback(()=>{this.eat(21);let t=this.Condition(e);return this.eat(22),t},()=>this.GeneralEnclosed(e)),t.push(n);break}case 2:{let n=this.parseWithFallback(()=>this.FeatureFunction(e),()=>null);n||=this.GeneralEnclosed(e),t.push(n);break}default:break t}return t.isEmpty&&this.error(`Condition is expected`),{type:`Condition`,loc:this.getLocationFromList(t),kind:e,children:t}}function Wn(e){e.children.forEach(e=>{e.type===`Condition`?(this.token(21,`(`),this.node(e),this.token(22,`)`)):this.node(e)})}const Gn=Object.freeze(Object.defineProperty({__proto__:null,generate:Wn,name:`Condition`,parse:Un,structure:Bn},Symbol.toStringTag,{value:`Module`}));function Kn(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!0)}function qn(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1)}function Jn(){let e=this.tokenIndex,t=this.Value();return t.type!==`Raw`&&this.eof===!1&&this.tokenType!==17&&this.isDelim(33)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}const Yn={important:[Boolean,String],property:String,value:[`Value`,`Raw`]};function Xn(){let e=this.tokenStart,t=this.tokenIndex,n=Qn.call(this),r=Tt(n),i=r?this.parseCustomProperty:this.parseValue,a=r?qn:Kn,o=!1,s;this.skipSC(),this.eat(16);let c=this.tokenIndex;if(r||this.skipSC(),s=i?this.parseWithFallback(Jn,a):a.call(this,this.tokenIndex),r&&s.type===`Value`&&s.children.isEmpty){for(let e=c-this.tokenIndex;e<=0;e++)if(this.lookupType(e)===13){s.children.appendData({type:`WhiteSpace`,loc:null,value:` `});break}}return this.isDelim(33)&&(o=$n.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(t)===!1&&this.error(),{type:`Declaration`,loc:this.getLocation(e,this.tokenStart),important:o,property:n,value:s}}function Zn(e){this.token(1,e.property),this.token(16,`:`),this.node(e.value),e.important&&(this.token(9,`!`),this.token(1,e.important===!0?`important`:e.important))}function Qn(){let e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.next();break;case 47:this.next(),this.isDelim(47)&&this.next();break}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function $n(){this.eat(9),this.skipSC();let e=this.consume(1);return e===`important`?!0:e}const er=Object.freeze(Object.defineProperty({__proto__:null,generate:Zn,name:`Declaration`,parse:Xn,structure:Yn,walkContext:`declaration`},Symbol.toStringTag,{value:`Module`}));function tr(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}const nr={children:[[`Declaration`,`Atrule`,`Rule`]]};function rr(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),tr));break;default:this.isDelim(38)?e.push(this.parseWithFallback(this.Rule,tr)):e.push(this.parseWithFallback(this.Declaration,tr))}return{type:`DeclarationList`,loc:this.getLocationFromList(e),children:e}}function ir(e){this.children(e,e=>{e.type===`Declaration`&&this.token(17,`;`)})}const ar=Object.freeze(Object.defineProperty({__proto__:null,generate:ir,name:`DeclarationList`,parse:rr,structure:nr},Symbol.toStringTag,{value:`Module`})),or={value:String,unit:String};function sr(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:`Dimension`,loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function cr(e){this.token(12,e.value+e.unit)}const lr=Object.freeze(Object.defineProperty({__proto__:null,generate:cr,name:`Dimension`,parse:sr,structure:or},Symbol.toStringTag,{value:`Module`})),ur={kind:String,name:String,value:[`Identifier`,`Number`,`Dimension`,`Ratio`,`Function`,null]};function dr(e){let t=this.tokenStart,n,r=null;if(this.eat(21),this.skipSC(),n=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:r=this.lookupNonWSType(1)===9?this.Ratio():this.Number();break;case 12:r=this.Dimension();break;case 1:r=this.Identifier();break;case 2:r=this.parseWithFallback(()=>{let e=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(47)&&this.error(),e},()=>this.Ratio());break;default:this.error(`Number, dimension, ratio or identifier is expected`)}this.skipSC()}return this.eof||this.eat(22),{type:`Feature`,loc:this.getLocation(t,this.tokenStart),kind:e,name:n,value:r}}function fr(e){this.token(21,`(`),this.token(1,e.name),e.value!==null&&(this.token(16,`:`),this.node(e.value)),this.token(22,`)`)}const pr=Object.freeze(Object.defineProperty({__proto__:null,generate:fr,name:`Feature`,parse:dr,structure:ur},Symbol.toStringTag,{value:`Module`})),mr={kind:String,feature:String,value:[`Declaration`,`Selector`]};function hr(e,t){let n=(this.features[e]||{})[t];return typeof n!=`function`&&this.error(`Unknown feature ${t}()`),n}function gr(e=`unknown`){let t=this.tokenStart,n=this.consumeFunctionName(),r=hr.call(this,e,n.toLowerCase());this.skipSC();let i=this.parseWithFallback(()=>{let e=this.tokenIndex,t=r.call(this);return this.eof===!1&&this.isBalanceEdge(e)===!1&&this.error(),t},()=>this.Raw(null,!1));return this.eof||this.eat(22),{type:`FeatureFunction`,loc:this.getLocation(t,this.tokenStart),kind:e,feature:n,value:i}}function _r(e){this.token(2,e.feature+`(`),this.node(e.value),this.token(22,`)`)}const vr=Object.freeze(Object.defineProperty({__proto__:null,generate:_r,name:`FeatureFunction`,parse:gr,structure:mr},Symbol.toStringTag,{value:`Module`})),yr={kind:String,left:[`Identifier`,`Number`,`Dimension`,`Ratio`,`Function`],leftComparison:String,middle:[`Identifier`,`Number`,`Dimension`,`Ratio`,`Function`],rightComparison:[String,null],right:[`Identifier`,`Number`,`Dimension`,`Ratio`,`Function`,null]};function br(){switch(this.skipSC(),this.tokenType){case 10:return this.isDelim(47,this.lookupOffsetNonSC(1))?this.Ratio():this.Number();case 12:return this.Dimension();case 1:return this.Identifier();case 2:return this.parseWithFallback(()=>{let e=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(47)&&this.error(),e},()=>this.Ratio());default:this.error(`Number, dimension, ratio or identifier is expected`)}}function xr(e){if(this.skipSC(),this.isDelim(60)||this.isDelim(62)){let e=this.source[this.tokenStart];return this.next(),this.isDelim(61)?(this.next(),e+`=`):e}if(this.isDelim(61))return`=`;this.error(`Expected ${e?`":", `:``}"<", ">", "=" or ")"`)}function Sr(e=`unknown`){let t=this.tokenStart;this.skipSC(),this.eat(21);let n=br.call(this),r=xr.call(this,n.type===`Identifier`),i=br.call(this),a=null,o=null;return this.lookupNonWSType(0)!==22&&(a=xr.call(this),o=br.call(this)),this.skipSC(),this.eat(22),{type:`FeatureRange`,loc:this.getLocation(t,this.tokenStart),kind:e,left:n,leftComparison:r,middle:i,rightComparison:a,right:o}}function Cr(e){this.token(21,`(`),this.node(e.left),this.tokenize(e.leftComparison),this.node(e.middle),e.right&&(this.tokenize(e.rightComparison),this.node(e.right)),this.token(22,`)`)}const wr=Object.freeze(Object.defineProperty({__proto__:null,generate:Cr,name:`FeatureRange`,parse:Sr,structure:yr},Symbol.toStringTag,{value:`Module`})),Tr={name:String,children:[[]]};function Er(e,t){let n=this.tokenStart,r=this.consumeFunctionName(),i=r.toLowerCase(),a;return a=t.hasOwnProperty(i)?t[i].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:`Function`,loc:this.getLocation(n,this.tokenStart),name:r,children:a}}function Dr(e){this.token(2,e.name+`(`),this.children(e),this.token(22,`)`)}const Or=Object.freeze(Object.defineProperty({__proto__:null,generate:Dr,name:`Function`,parse:Er,structure:Tr,walkContext:`function`},Symbol.toStringTag,{value:`Module`})),kr={kind:String,function:[String,null],children:[[]]};function Ar(e){let t=this.tokenStart,n=null;this.tokenType===2?n=this.consumeFunctionName():this.eat(21);let r=this.parseWithFallback(()=>{let e=this.tokenIndex,t=this.readSequence(this.scope.Value);return this.eof===!1&&this.isBalanceEdge(e)===!1&&this.error(),t},()=>this.createSingleNodeList(this.Raw(null,!1)));return this.eof||this.eat(22),{type:`GeneralEnclosed`,loc:this.getLocation(t,this.tokenStart),kind:e,function:n,children:r}}function jr(e){e.function?this.token(2,e.function+`(`):this.token(21,`(`),this.children(e),this.token(22,`)`)}const Mr=Object.freeze(Object.defineProperty({__proto__:null,generate:jr,name:`GeneralEnclosed`,parse:Ar,structure:kr},Symbol.toStringTag,{value:`Module`})),Nr={value:String};function Pr(){let e=this.tokenStart;return this.eat(4),{type:`Hash`,loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function Fr(e){this.token(4,`#`+e.value)}const Ir=Object.freeze(Object.defineProperty({__proto__:null,generate:Fr,name:`Hash`,parse:Pr,structure:Nr,xxx:`XXX`},Symbol.toStringTag,{value:`Module`})),Lr={name:String};function Rr(){return{type:`Identifier`,loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function zr(e){this.token(1,e.name)}const Br=Object.freeze(Object.defineProperty({__proto__:null,generate:zr,name:`Identifier`,parse:Rr,structure:Lr},Symbol.toStringTag,{value:`Module`})),Vr={name:String};function Hr(){let e=this.tokenStart;return this.eat(4),{type:`IdSelector`,loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function Ur(e){this.token(9,`#`+e.name)}const Wr=Object.freeze(Object.defineProperty({__proto__:null,generate:Ur,name:`IdSelector`,parse:Hr,structure:Vr},Symbol.toStringTag,{value:`Module`})),Gr={name:String};function Kr(){let e=this.tokenStart,t=this.consume(1);for(;this.isDelim(46);)this.eat(9),t+=`.`+this.consume(1);return{type:`Layer`,loc:this.getLocation(e,this.tokenStart),name:t}}function qr(e){this.tokenize(e.name)}const Jr=Object.freeze(Object.defineProperty({__proto__:null,generate:qr,name:`Layer`,parse:Kr,structure:Gr},Symbol.toStringTag,{value:`Module`})),Yr={children:[[`Layer`]]};function Xr(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.Layer()),this.lookupTypeNonSC(0)===18);)this.skipSC(),this.next(),this.skipSC();return{type:`LayerList`,loc:this.getLocationFromList(e),children:e}}function Zr(e){this.children(e,()=>this.token(18,`,`))}const Qr=Object.freeze(Object.defineProperty({__proto__:null,generate:Zr,name:`LayerList`,parse:Xr,structure:Yr},Symbol.toStringTag,{value:`Module`})),$r={modifier:[String,null],mediaType:[String,null],condition:[`Condition`,null]};function ei(){let e=this.tokenStart,t=null,n=null,r=null;if(this.skipSC(),this.tokenType===1&&this.lookupTypeNonSC(1)!==21){let e=this.consume(1),i=e.toLowerCase();switch(i===`not`||i===`only`?(this.skipSC(),t=i,n=this.consume(1)):n=e,this.lookupTypeNonSC(0)){case 1:this.skipSC(),this.eatIdent(`and`),r=this.Condition(`media`);break;case 23:case 17:case 18:case 0:break;default:this.error(`Identifier or parenthesis is expected`)}}else switch(this.tokenType){case 1:case 21:case 2:r=this.Condition(`media`);break;case 23:case 17:case 0:break;default:this.error(`Identifier or parenthesis is expected`)}return{type:`MediaQuery`,loc:this.getLocation(e,this.tokenStart),modifier:t,mediaType:n,condition:r}}function ti(e){e.mediaType?(e.modifier&&this.token(1,e.modifier),this.token(1,e.mediaType),e.condition&&(this.token(1,`and`),this.node(e.condition))):e.condition&&this.node(e.condition)}const ni=Object.freeze(Object.defineProperty({__proto__:null,generate:ti,name:`MediaQuery`,parse:ei,structure:$r},Symbol.toStringTag,{value:`Module`})),ri={children:[[`MediaQuery`]]};function ii(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===18);)this.next();return{type:`MediaQueryList`,loc:this.getLocationFromList(e),children:e}}function ai(e){this.children(e,()=>this.token(18,`,`))}const oi=Object.freeze(Object.defineProperty({__proto__:null,generate:ai,name:`MediaQueryList`,parse:ii,structure:ri},Symbol.toStringTag,{value:`Module`})),si={};function ci(){let e=this.tokenStart;return this.eatDelim(38),{type:`NestingSelector`,loc:this.getLocation(e,this.tokenStart)}}function li(){this.token(9,`&`)}const ui=Object.freeze(Object.defineProperty({__proto__:null,generate:li,name:`NestingSelector`,parse:ci,structure:si},Symbol.toStringTag,{value:`Module`})),di={nth:[`AnPlusB`,`Identifier`],selector:[`SelectorList`,null]};function fi(){this.skipSC();let e=this.tokenStart,t=e,n=null,r;return r=this.lookupValue(0,`odd`)||this.lookupValue(0,`even`)?this.Identifier():this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,`of`)&&(this.next(),n=this.SelectorList(),t=this.tokenStart),{type:`Nth`,loc:this.getLocation(e,t),nth:r,selector:n}}function pi(e){this.node(e.nth),e.selector!==null&&(this.token(1,`of`),this.node(e.selector))}const mi=Object.freeze(Object.defineProperty({__proto__:null,generate:pi,name:`Nth`,parse:fi,structure:di},Symbol.toStringTag,{value:`Module`})),hi={value:String};function gi(){return{type:`Number`,loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function _i(e){this.token(10,e.value)}const vi=Object.freeze(Object.defineProperty({__proto__:null,generate:_i,name:`Number`,parse:gi,structure:hi},Symbol.toStringTag,{value:`Module`})),yi={value:String};function bi(){let e=this.tokenStart;return this.next(),{type:`Operator`,loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function xi(e){this.tokenize(e.value)}const Si=Object.freeze(Object.defineProperty({__proto__:null,generate:xi,name:`Operator`,parse:bi,structure:yi},Symbol.toStringTag,{value:`Module`})),Ci={children:[[]]};function wi(e,t){let n=this.tokenStart,r=null;return this.eat(21),r=e.call(this,t),this.eof||this.eat(22),{type:`Parentheses`,loc:this.getLocation(n,this.tokenStart),children:r}}function Ti(e){this.token(21,`(`),this.children(e),this.token(22,`)`)}const Ei=Object.freeze(Object.defineProperty({__proto__:null,generate:Ti,name:`Parentheses`,parse:wi,structure:Ci},Symbol.toStringTag,{value:`Module`})),Di={value:String};function Oi(){return{type:`Percentage`,loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function ki(e){this.token(11,e.value+`%`)}const Ai=Object.freeze(Object.defineProperty({__proto__:null,generate:ki,name:`Percentage`,parse:Oi,structure:Di},Symbol.toStringTag,{value:`Module`})),ji={name:String,children:[[`Raw`],null]};function Mi(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):n=this.consume(1),{type:`PseudoClassSelector`,loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function Ni(e){this.token(16,`:`),e.children===null?this.token(1,e.name):(this.token(2,e.name+`(`),this.children(e),this.token(22,`)`))}const Pi=Object.freeze(Object.defineProperty({__proto__:null,generate:Ni,name:`PseudoClassSelector`,parse:Mi,structure:ji,walkContext:`function`},Symbol.toStringTag,{value:`Module`})),Fi={name:String,children:[[`Raw`],null]};function Ii(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):n=this.consume(1),{type:`PseudoElementSelector`,loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function Li(e){this.token(16,`:`),this.token(16,`:`),e.children===null?this.token(1,e.name):(this.token(2,e.name+`(`),this.children(e),this.token(22,`)`))}const Ri=Object.freeze(Object.defineProperty({__proto__:null,generate:Li,name:`PseudoElementSelector`,parse:Ii,structure:Fi,walkContext:`function`},Symbol.toStringTag,{value:`Module`}));function zi(){switch(this.skipSC(),this.tokenType){case 10:return this.Number();case 2:return this.Function(this.readSequence,this.scope.Value);default:this.error(`Number of function is expected`)}}const Bi={left:[`Number`,`Function`],right:[`Number`,`Function`,null]};function Vi(){let e=this.tokenStart,t=zi.call(this),n=null;return this.skipSC(),this.isDelim(47)&&(this.eatDelim(47),n=zi.call(this)),{type:`Ratio`,loc:this.getLocation(e,this.tokenStart),left:t,right:n}}function Hi(e){this.node(e.left),this.token(9,`/`),e.right?this.node(e.right):this.node(10,1)}const Ui=Object.freeze(Object.defineProperty({__proto__:null,generate:Hi,name:`Ratio`,parse:Vi,structure:Bi},Symbol.toStringTag,{value:`Module`}));function Wi(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}const Gi={value:String};function Ki(e,t){let n=this.getTokenStart(this.tokenIndex),r;return this.skipUntilBalanced(this.tokenIndex,e||this.consumeUntilBalanceEnd),r=t&&this.tokenStart>n?Wi.call(this):this.tokenStart,{type:`Raw`,loc:this.getLocation(n,r),value:this.substring(n,r)}}function qi(e){this.tokenize(e.value)}const Ji=Object.freeze(Object.defineProperty({__proto__:null,generate:qi,name:`Raw`,parse:Ki,structure:Gi},Symbol.toStringTag,{value:`Module`}));function Yi(){return this.Raw(this.consumeUntilLeftCurlyBracket,!0)}function Xi(){let e=this.SelectorList();return e.type!==`Raw`&&this.eof===!1&&this.tokenType!==23&&this.error(),e}const Zi={prelude:[`SelectorList`,`Raw`],block:[`Block`]};function Qi(){let e=this.tokenIndex,t=this.tokenStart,n,r;return n=this.parseRulePrelude?this.parseWithFallback(Xi,Yi):Yi.call(this,e),r=this.Block(!0),{type:`Rule`,loc:this.getLocation(t,this.tokenStart),prelude:n,block:r}}function $i(e){this.node(e.prelude),this.node(e.block)}const ea=Object.freeze(Object.defineProperty({__proto__:null,generate:$i,name:`Rule`,parse:Qi,structure:Zi,walkContext:`rule`},Symbol.toStringTag,{value:`Module`})),ta={root:[`SelectorList`,`Raw`,null],limit:[`SelectorList`,`Raw`,null]};function na(){let e=null,t=null;this.skipSC();let n=this.tokenStart;return this.tokenType===21&&(this.next(),this.skipSC(),e=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),this.lookupNonWSType(0)===1&&(this.skipSC(),this.eatIdent(`to`),this.skipSC(),this.eat(21),this.skipSC(),t=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),{type:`Scope`,loc:this.getLocation(n,this.tokenStart),root:e,limit:t}}function ra(e){e.root&&(this.token(21,`(`),this.node(e.root),this.token(22,`)`)),e.limit&&(this.token(1,`to`),this.token(21,`(`),this.node(e.limit),this.token(22,`)`))}const ia=Object.freeze(Object.defineProperty({__proto__:null,generate:ra,name:`Scope`,parse:na,structure:ta},Symbol.toStringTag,{value:`Module`})),aa={children:[[`TypeSelector`,`IdSelector`,`ClassSelector`,`AttributeSelector`,`PseudoClassSelector`,`PseudoElementSelector`,`Combinator`]]};function oa(){let e=this.readSequence(this.scope.Selector);return this.getFirstListNode(e)===null&&this.error(`Selector is expected`),{type:`Selector`,loc:this.getLocationFromList(e),children:e}}function sa(e){this.children(e)}const ca=Object.freeze(Object.defineProperty({__proto__:null,generate:sa,name:`Selector`,parse:oa,structure:aa},Symbol.toStringTag,{value:`Module`})),la={children:[[`Selector`,`Raw`]]};function ua(){let e=this.createList();for(;!this.eof;){if(e.push(this.Selector()),this.tokenType===18){this.next();continue}break}return{type:`SelectorList`,loc:this.getLocationFromList(e),children:e}}function da(e){this.children(e,()=>this.token(18,`,`))}const fa=Object.freeze(Object.defineProperty({__proto__:null,generate:da,name:`SelectorList`,parse:ua,structure:la,walkContext:`selector`},Symbol.toStringTag,{value:`Module`})),pa={value:String};function ma(){return{type:`String`,loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Et(this.consume(5))}}function ha(e){this.token(5,Dt(e.value))}const ga=Object.freeze(Object.defineProperty({__proto__:null,generate:ha,name:`String`,parse:ma,structure:pa},Symbol.toStringTag,{value:`Module`}));function _a(){return this.Raw(null,!1)}const va={children:[[`Comment`,`CDO`,`CDC`,`Atrule`,`Rule`,`Raw`]]};function ya(){let e=this.tokenStart,t=this.createList(),n;for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==33){this.next();continue}n=this.Comment();break;case 14:n=this.CDO();break;case 15:n=this.CDC();break;case 3:n=this.parseWithFallback(this.Atrule,_a);break;default:n=this.parseWithFallback(this.Rule,_a)}t.push(n)}return{type:`StyleSheet`,loc:this.getLocation(e,this.tokenStart),children:t}}function ba(e){this.children(e)}const xa=Object.freeze(Object.defineProperty({__proto__:null,generate:ba,name:`StyleSheet`,parse:ya,structure:va,walkContext:`stylesheet`},Symbol.toStringTag,{value:`Module`})),Sa={declaration:`Declaration`};function Ca(){let e=this.tokenStart;this.eat(21),this.skipSC();let t=this.Declaration();return this.eof||this.eat(22),{type:`SupportsDeclaration`,loc:this.getLocation(e,this.tokenStart),declaration:t}}function wa(e){this.token(21,`(`),this.node(e.declaration),this.token(22,`)`)}const Ta=Object.freeze(Object.defineProperty({__proto__:null,generate:wa,name:`SupportsDeclaration`,parse:Ca,structure:Sa},Symbol.toStringTag,{value:`Module`}));function Ea(){this.tokenType!==1&&this.isDelim(42)===!1&&this.error(`Identifier or asterisk is expected`),this.next()}const Da={name:String};function Oa(){let e=this.tokenStart;return this.isDelim(124)?(this.next(),Ea.call(this)):(Ea.call(this),this.isDelim(124)&&(this.next(),Ea.call(this))),{type:`TypeSelector`,loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function ka(e){this.tokenize(e.name)}const Aa=Object.freeze(Object.defineProperty({__proto__:null,generate:ka,name:`TypeSelector`,parse:Oa,structure:Da},Symbol.toStringTag,{value:`Module`}));function ja(e,t){let n=0;for(let r=this.tokenStart+e;r<this.tokenEnd;r++){let i=this.charCodeAt(r);if(i===45&&t&&n!==0)return ja.call(this,e+n+1,!1),-1;P(i)||this.error(t&&n!==0?`Hyphen minus`+(n<6?` or hex digit`:``)+` is expected`:n<6?`Hex digit is expected`:`Unexpected input`,r),++n>6&&this.error(`Too many hex digits`,r)}return this.next(),n}function Ma(e){let t=0;for(;this.isDelim(63);)++t>e&&this.error(`Too many question marks`),this.next()}function Na(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===43?`Plus sign`:`Hyphen minus`)+` is expected`)}function Pa(){let e=0;switch(this.tokenType){case 10:if(e=ja.call(this,1,!0),this.isDelim(63)){Ma.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){Na.call(this,45),ja.call(this,1,!1);break}break;case 12:e=ja.call(this,1,!0),e>0&&Ma.call(this,6-e);break;default:if(this.eatDelim(43),this.tokenType===1){e=ja.call(this,0,!0),e>0&&Ma.call(this,6-e);break}if(this.isDelim(63)){this.next(),Ma.call(this,5);break}this.error(`Hex digit or question mark is expected`)}}const Fa={value:String};function Ia(){let e=this.tokenStart;return this.eatIdent(`u`),Pa.call(this),{type:`UnicodeRange`,loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function La(e){this.tokenize(e.value)}const Ra=Object.freeze(Object.defineProperty({__proto__:null,generate:La,name:`UnicodeRange`,parse:Ia,structure:Fa},Symbol.toStringTag,{value:`Module`})),za={value:String};function Ba(){let e=this.tokenStart,t;switch(this.tokenType){case 7:t=Ot(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,`url(`)||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),t=Et(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error(`Url or Function is expected`)}return{type:`Url`,loc:this.getLocation(e,this.tokenStart),value:t}}function Va(e){this.token(7,kt(e.value))}const Ha=Object.freeze(Object.defineProperty({__proto__:null,generate:Va,name:`Url`,parse:Ba,structure:za},Symbol.toStringTag,{value:`Module`})),Ua={children:[[]]};function Wa(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:`Value`,loc:this.getLocation(e,this.tokenStart),children:t}}function Ga(e){this.children(e)}const Ka=Object.freeze(Object.defineProperty({__proto__:null,generate:Ga,name:`Value`,parse:Wa,structure:Ua},Symbol.toStringTag,{value:`Module`})),qa=Object.freeze({type:`WhiteSpace`,loc:null,value:` `}),Ja={value:String};function Ya(){return this.eat(13),qa}function Xa(e){this.token(13,e.value)}const W=Lt({node:Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:Ut,Atrule:Yt,AtrulePrelude:$t,AttributeSelector:on,Block:mn,Brackets:vn,CDC:Sn,CDO:En,ClassSelector:An,Combinator:Pn,Comment:Rn,Condition:Gn,Declaration:er,DeclarationList:ar,Dimension:lr,Feature:pr,FeatureFunction:vr,FeatureRange:wr,Function:Or,GeneralEnclosed:Mr,Hash:Ir,IdSelector:Wr,Identifier:Br,Layer:Jr,LayerList:Qr,MediaQuery:ni,MediaQueryList:oi,NestingSelector:ui,Nth:mi,Number:vi,Operator:Si,Parentheses:Ei,Percentage:Ai,PseudoClassSelector:Pi,PseudoElementSelector:Ri,Ratio:Ui,Raw:Ji,Rule:ea,Scope:ia,Selector:ca,SelectorList:fa,String:ga,StyleSheet:xa,SupportsDeclaration:Ta,TypeSelector:Aa,UnicodeRange:Ra,Url:Ha,Value:Ka,WhiteSpace:Object.freeze(Object.defineProperty({__proto__:null,generate:Xa,name:`WhiteSpace`,parse:Ya,structure:Ja},Symbol.toStringTag,{value:`Module`}))},Symbol.toStringTag,{value:`Module`}))}),Za=[`left`,`right`,`top`,`bottom`,`inset-block-start`,`inset-block-end`,`inset-inline-start`,`inset-inline-end`,`inset-block`,`inset-inline`,`inset`];function Qa(e){return Za.includes(e)}const $a=[`margin-block-start`,`margin-block-end`,`margin-block`,`margin-inline-start`,`margin-inline-end`,`margin-inline`,`margin-bottom`,`margin-left`,`margin-right`,`margin-top`,`margin`];function eo(e){return $a.includes(e)}const to=[`width`,`height`,`min-width`,`min-height`,`max-width`,`max-height`,`block-size`,`inline-size`,`min-block-size`,`min-inline-size`,`max-block-size`,`max-inline-size`];function no(e){return to.includes(e)}const ro=[`justify-self`,`align-self`,`place-self`];function io(e){return ro.includes(e)}const ao=[...Za,...$a,...to,...ro,`position-anchor`,`position-area`],oo=[...to,...Za,...$a];function so(e){return oo.includes(e)}const co=[`top`,`left`,`right`,`bottom`,`start`,`end`,`self-start`,`self-end`,`center`,`inside`,`outside`];function lo(e){return co.includes(e)}const uo=[`width`,`height`,`block`,`inline`,`self-block`,`self-inline`];function fo(e){return uo.includes(e)}const po=new Set([`Atrule`,`Selector`,`Declaration`]);function mo(e){let t=new SourceMapGenerator,n={line:1,column:0},r={line:0,column:0},i={line:1,column:0},a={generated:i},o=1,s=0,c=!1,l=e.node;e.node=function(e){if(e.loc&&e.loc.start&&po.has(e.type)){let l=e.loc.start.line,u=e.loc.start.column-1;(r.line!==l||r.column!==u)&&(r.line=l,r.column=u,n.line=o,n.column=s,c&&(c=!1,(n.line!==i.line||n.column!==i.column)&&t.addMapping(a)),c=!0,t.addMapping({source:e.loc.source,original:r,generated:n}))}l.call(this,e),c&&po.has(e.type)&&(i.line=o,i.column=s)};let u=e.emit;e.emit=function(e,t,n){for(let t=0;t<e.length;t++)e.charCodeAt(t)===10?(o++,s=0):s++;u(e,t,n)};let d=e.result;return e.result=function(){return c&&t.addMapping(a),{css:d(),map:t}},e}const ho=(e,t)=>{if(e===9&&(e=t),typeof e==`string`){let t=e.charCodeAt(0);return t>127?32768:t<<8}return e},go=[[1,1],[1,2],[1,7],[1,8],[1,`-`],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,`-`],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,`-`],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,`-`],[12,10],[12,11],[12,12],[12,15],[`#`,1],[`#`,2],[`#`,7],[`#`,8],[`#`,`-`],[`#`,10],[`#`,11],[`#`,12],[`#`,15],[`-`,1],[`-`,2],[`-`,7],[`-`,8],[`-`,`-`],[`-`,10],[`-`,11],[`-`,12],[`-`,15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,`%`],[10,15],[`@`,1],[`@`,2],[`@`,7],[`@`,8],[`@`,`-`],[`@`,15],[`.`,10],[`.`,11],[`.`,12],[`+`,10],[`+`,11],[`+`,12],[`/`,`*`]],_o=go.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,`-`],[22,1],[22,2],[22,11],[22,12],[22,4],[22,`-`]]);function vo(e){let t=new Set(e.map(([e,t])=>ho(e)<<16|ho(t)));return function(e,n,r){let i=ho(n,r),a=r.charCodeAt(0);return(a===45&&n!==1&&n!==2&&n!==15||a===43?t.has(e<<16|a<<8):t.has(e<<16|i))&&this.emit(` `,13,!0),i}}const yo=vo(go),bo=vo(_o),xo=Object.freeze(Object.defineProperty({__proto__:null,safe:bo,spec:yo},Symbol.toStringTag,{value:`Module`}));function So(e,t){if(typeof t==`function`){let n=null;e.children.forEach(e=>{n!==null&&t.call(this,n),this.node(e),n=e});return}e.children.forEach(this.node,this)}function Co(e){wt(e,(t,n,r)=>{this.token(t,e.slice(n,r))})}function wo(e){let t=new Map;for(let[n,r]of Object.entries(e.node))typeof(r.generate||r)==`function`&&t.set(n,r.generate||r);return function(e,n){let r=``,i=0,a={node(e){if(t.has(e.type))t.get(e.type).call(o,e);else throw Error(`Unknown node type: `+e.type)},tokenBefore:bo,token(e,t){i=this.tokenBefore(i,e,t),this.emit(t,e,!1),e===9&&t.charCodeAt(0)===92&&this.emit(`
|
|
2
|
+
`,13,!0)},emit(e){r+=e},result(){return r}};n&&(typeof n.decorator==`function`&&(a=n.decorator(a)),n.sourceMap&&(a=mo(a)),n.mode in xo&&(a.tokenBefore=xo[n.mode]));let o={node:e=>a.node(e),children:So,token:(e,t)=>a.token(e,t),tokenize:Co};return a.node(e),a.result()}}const To=wo({node:Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:Ht,Atrule:Jt,AtrulePrelude:Qt,AttributeSelector:an,Block:pn,Brackets:_n,CDC:xn,CDO:Tn,ClassSelector:kn,Combinator:Nn,Comment:Ln,Condition:Wn,Declaration:Zn,DeclarationList:ir,Dimension:cr,Feature:fr,FeatureFunction:_r,FeatureRange:Cr,Function:Dr,GeneralEnclosed:jr,Hash:Fr,IdSelector:Ur,Identifier:zr,Layer:qr,LayerList:Zr,MediaQuery:ti,MediaQueryList:ai,NestingSelector:li,Nth:pi,Number:_i,Operator:xi,Parentheses:Ti,Percentage:ki,PseudoClassSelector:Ni,PseudoElementSelector:Li,Ratio:Hi,Raw:qi,Rule:$i,Scope:ra,Selector:sa,SelectorList:da,String:ha,StyleSheet:ba,SupportsDeclaration:wa,TypeSelector:ka,UnicodeRange:La,Url:Va,Value:Ga,WhiteSpace:Xa},Symbol.toStringTag,{value:`Module`}))});function Eo(e,t){let n=Object.create(SyntaxError.prototype),r=Error();return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||``).replace(/^(.+\n){1,3}/,`${e}: ${t}
|
|
3
|
+
`)}})}function Do({source:e,line:t,column:n,baseLine:r,baseColumn:i},a){function o(e,t){return s.slice(e,t).map((t,n)=>String(e+n+1).padStart(u)+` |`+t).join(`
|
|
4
|
+
`)}let s=(`
|
|
5
|
+
`.repeat(Math.max(r-1,0))+` `.repeat(Math.max(i-1,0))+e).split(/\r\n?|\n|\f/),c=Math.max(1,t-a)-1,l=Math.min(t+a,s.length+1),u=Math.max(4,String(l).length)+1,d=0;n+=3*(s[t-1].substr(0,n-1).match(/\t/g)||[]).length,n>100&&(d=n-60+3,n=58);for(let e=c;e<=l;e++)e>=0&&e<s.length&&(s[e]=s[e].replace(/\t/g,` `),s[e]=(d>0&&s[e].length>d?`…`:``)+s[e].substr(d,98)+(s[e].length>d+100-1?`…`:``));return[o(c,t),Array(n+u+2).join(`-`)+`^`,o(t,l)].filter(Boolean).join(`
|
|
6
|
+
`).replace(/^(\s+\d+\s+\|\n)+/,``).replace(/\n(\s+\d+\s+\|)+$/,``)}function Oo(e,t,n,r,i,a=1,o=1){return Object.assign(Eo(`SyntaxError`,e),{source:t,offset:n,line:r,column:i,sourceFragment(e){return Do({source:t,line:r,column:i,baseLine:a,baseColumn:o},isNaN(e)?0:e)},get formattedMessage(){return`Parse error: ${e}
|
|
7
|
+
`+Do({source:t,line:r,column:i,baseLine:a,baseColumn:o},2)}})}function ko(e){let t=this.createList(),n=!1,r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:n=!0,this.next();continue}let i=e.getNode.call(this,r);if(i===void 0)break;n&&=(e.onWhiteSpace&&e.onWhiteSpace.call(this,i,t,r),!1),t.push(i)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}const Ao=()=>{};function jo(e){return function(){return this[e]()}}function Mo(e){let t=Object.create(null);for(let n of Object.keys(e)){let r=e[n],i=r.parse||r;i&&(t[n]=i)}return t}function No(e){let t={context:Object.create(null),features:Object.assign(Object.create(null),e.features),scope:Object.assign(Object.create(null),e.scope),atrule:Mo(e.atrule),pseudo:Mo(e.pseudo),node:Mo(e.node)};for(let[n,r]of Object.entries(e.parseContext))switch(typeof r){case`function`:t.context[n]=r;break;case`string`:t.context[n]=jo(r);break}return s(s({config:t},t),t.node)}function Po(e){let t=``,n=`<unknown>`,r=!1,i=Ao,a=!1,o=new xt,s=Object.assign(new Ct,No(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:ko,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(e){return+(e===123)},consumeUntilLeftCurlyBracketOrSemicolon(e){return+(e===123||e===59)},consumeUntilExclamationMarkOrSemicolon(e){return+(e===33||e===59)},consumeUntilSemicolonIncluded(e){return e===59?2:0},createList(){return new qe},createSingleNodeList(e){return new qe().appendData(e)},getFirstListNode(e){return e&&e.first},getLastListNode(e){return e&&e.last},parseWithFallback(e,t){let n=this.tokenIndex;try{return e.call(this)}catch(e){if(a)throw e;this.skip(n-this.tokenIndex);let r=t.call(this);return a=!0,i(e,r),a=!1,r}},lookupNonWSType(e){let t;do if(t=this.lookupType(e++),t!==13&&t!==25)return t;while(t!==0);return 0},charCodeAt(e){return e>=0&&e<t.length?t.charCodeAt(e):0},substring(e,n){return t.substring(e,n)},substrToCursor(e){return this.source.substring(e,this.tokenStart)},cmpChar(e,n){return lt(t,e,n)},cmpStr(e,n,r){return ut(t,e,n,r)},consume(e){let t=this.tokenStart;return this.eat(e),this.substrToCursor(t)},consumeFunctionName(){let e=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),e},consumeNumber(e){let n=t.substring(this.tokenStart,ht(t,this.tokenStart));return this.eat(e),n},eat(e){if(this.tokenType!==e){let t=vt[e].slice(0,-6).replace(/-/g,` `).replace(/^./,e=>e.toUpperCase()),n=`${/[[\](){}]/.test(t)?`"${t}"`:t} is expected`,r=this.tokenStart;switch(e){case 1:this.tokenType===2||this.tokenType===7?(r=this.tokenEnd-1,n=`Identifier is expected but function found`):n=`Identifier is expected`;break;case 4:this.isDelim(35)&&(this.next(),r++,n=`Name is expected`);break;case 11:this.tokenType===10&&(r=this.tokenEnd,n=`Percent sign is expected`);break}this.error(n,r)}this.next()},eatIdent(e){(this.tokenType!==1||this.lookupValue(0,e)===!1)&&this.error(`Identifier "${e}" is expected`),this.next()},eatDelim(e){this.isDelim(e)||this.error(`Delim "${String.fromCharCode(e)}" is expected`),this.next()},getLocation(e,t){return r?o.getLocationRange(e,t,n):null},getLocationFromList(e){if(r){let t=this.getFirstListNode(e),r=this.getLastListNode(e);return o.getLocationRange(t===null?this.tokenStart:t.loc.start.offset-o.startOffset,r===null?this.tokenStart:r.loc.end.offset-o.startOffset,n)}return null},error(e,n){let r=n!==void 0&&n<t.length?o.getLocation(n):this.eof?o.getLocation(dt(t,t.length-1)):o.getLocation(this.tokenStart);throw new Oo(e||`Unexpected input`,t,r.offset,r.line,r.column,o.startLine,o.startColumn)}});return Object.assign(function(e,c){t=e,c||={},s.setSource(t,wt),o.setSource(t,c.offset,c.line,c.column),n=c.filename||`<unknown>`,r=!!c.positions,i=typeof c.onParseError==`function`?c.onParseError:Ao,a=!1,s.parseAtrulePrelude=`parseAtrulePrelude`in c?!!c.parseAtrulePrelude:!0,s.parseRulePrelude=`parseRulePrelude`in c?!!c.parseRulePrelude:!0,s.parseValue=`parseValue`in c?!!c.parseValue:!0,s.parseCustomProperty=`parseCustomProperty`in c?!!c.parseCustomProperty:!1;let{context:l=`default`,onComment:u}=c;if(!(l in s.context))throw Error("Unknown context `"+l+"`");typeof u==`function`&&s.forEachToken((e,n,r)=>{if(e===25){let e=s.getLocation(n,r);u(ut(t,r-2,r,`*/`)?t.slice(n+2,r-2):t.slice(n+2,r),e)}});let d=s.context[l].call(s,c);return s.eof||s.error(),d},{SyntaxError:Oo,config:s.config})}function Fo(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,`url(`)?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,117)&&this.cmpChar(this.tokenStart+1,43)?this.UnicodeRange():this.Identifier();case 9:{let e=this.charCodeAt(this.tokenStart);if(e===47||e===42||e===43||e===45)return this.Operator();e===35&&this.error(`Hex or identifier is expected`,this.tokenStart+1);break}}}const Io={getNode:Fo};function Lo(e,t){t.last!==null&&t.last.type!==`Combinator`&&e!==null&&e.type!==`Combinator`&&t.push({type:`Combinator`,loc:null,name:` `})}function Ro(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===46&&this.error(`Identifier is expected`,this.tokenStart+1);break;case 9:switch(this.charCodeAt(this.tokenStart)){case 43:case 62:case 126:case 47:return this.Combinator();case 46:return this.ClassSelector();case 42:case 124:return this.TypeSelector();case 35:return this.IdSelector();case 38:return this.NestingSelector()}break}}const zo={onWhiteSpace:Lo,getNode:Ro};function Bo(){return this.createSingleNodeList(this.Raw(null,!1))}function Vo(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),this.tokenType===18){e.push(this.Operator());let t=this.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1);if(n.type===`Value`&&n.children.isEmpty){for(let e=t-this.tokenIndex;e<=0;e++)if(this.lookupType(e)===13){n.children.appendData({type:`WhiteSpace`,loc:null,value:` `});break}}e.push(n)}return e}function Ho(e){return e!==null&&e.type===`Operator`&&(e.value[e.value.length-1]===`-`||e.value[e.value.length-1]===`+`)}const Uo=Object.freeze(Object.defineProperty({__proto__:null,AtrulePrelude:Io,Selector:zo,Value:{getNode:Fo,onWhiteSpace(e,t){Ho(e)&&(e.value=` `+e.value),Ho(t.last)&&(t.last.value+=` `)},expression:Bo,var:Vo}},Symbol.toStringTag,{value:`Module`})),Wo=new Set([`none`,`and`,`not`,`or`]),Go={parse:{prelude(){let e=this.createList();if(this.tokenType===1){let t=this.substring(this.tokenStart,this.tokenEnd);Wo.has(t.toLowerCase())||e.push(this.Identifier())}return e.push(this.Condition(`container`)),e},block(e=!1){return this.Block(e)}}},Ko={parse:{prelude:null,block(){return this.Block(!0)}}};function qo(e,t){return this.parseWithFallback(()=>{try{return e.call(this)}finally{this.skipSC(),this.lookupNonWSType(0)!==22&&this.error()}},t||(()=>this.Raw(null,!0)))}const Jo={layer(){this.skipSC();let e=this.createList(),t=qo.call(this,this.Layer);return(t.type!==`Raw`||t.value!==``)&&e.push(t),e},supports(){this.skipSC();let e=this.createList(),t=qo.call(this,this.Declaration,()=>qo.call(this,()=>this.Condition(`supports`)));return(t.type!==`Raw`||t.value!==``)&&e.push(t),e}},Yo={container:Go,"font-face":Ko,import:{parse:{prelude(){let e=this.createList();switch(this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error(`String or url() is expected`)}return this.skipSC(),this.tokenType===1&&this.cmpStr(this.tokenStart,this.tokenEnd,`layer`)?e.push(this.Identifier()):this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,`layer(`)&&e.push(this.Function(null,Jo)),this.skipSC(),this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,`supports(`)&&e.push(this.Function(null,Jo)),(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&e.push(this.MediaQueryList()),e},block:null}},layer:{parse:{prelude(){return this.createSingleNodeList(this.LayerList())},block(){return this.Block(!1)}}},media:{parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}},nest:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},page:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},scope:{parse:{prelude(){return this.createSingleNodeList(this.Scope())},block(e=!1){return this.Block(e)}}},"starting-style":{parse:{prelude:null,block(e=!1){return this.Block(e)}}},supports:{parse:{prelude(){return this.createSingleNodeList(this.Condition(`supports`))},block(e=!1){return this.Block(e)}}}};function Xo(){let e=this.createList();this.skipSC();t:for(;!this.eof;){switch(this.tokenType){case 1:e.push(this.Identifier());break;case 5:e.push(this.String());break;case 18:e.push(this.Operator());break;case 22:break t;default:this.error(`Identifier, string or comma is expected`)}this.skipSC()}return e}const G={parse(){return this.createSingleNodeList(this.SelectorList())}},Zo={parse(){return this.createSingleNodeList(this.Selector())}},Qo={parse(){return this.createSingleNodeList(this.Identifier())}},$o={parse:Xo},es={parse(){return this.createSingleNodeList(this.Nth())}},ts=Po({parseContext:{default:`StyleSheet`,stylesheet:`StyleSheet`,atrule:`Atrule`,atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:`MediaQueryList`,mediaQuery:`MediaQuery`,condition(e){return this.Condition(e.kind)},rule:`Rule`,selectorList:`SelectorList`,selector:`Selector`,block(){return this.Block(!0)},declarationList:`DeclarationList`,declaration:`Declaration`,value:`Value`},features:{supports:{selector(){return this.Selector()}},container:{style(){return this.Declaration()}}},scope:Uo,atrule:Yo,pseudo:{dir:Qo,has:G,lang:$o,matches:G,is:G,"-moz-any":G,"-webkit-any":G,where:G,not:G,"nth-child":es,"nth-last-child":es,"nth-last-of-type":es,"nth-of-type":es,slotted:Zo,host:Zo,"host-context":Zo},node:Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:Vt,Atrule:qt,AtrulePrelude:Zt,AttributeSelector:rn,Block:fn,Brackets:gn,CDC:bn,CDO:wn,ClassSelector:On,Combinator:Mn,Comment:In,Condition:Un,Declaration:Xn,DeclarationList:rr,Dimension:sr,Feature:dr,FeatureFunction:gr,FeatureRange:Sr,Function:Er,GeneralEnclosed:Ar,Hash:Pr,IdSelector:Hr,Identifier:Rr,Layer:Kr,LayerList:Xr,MediaQuery:ei,MediaQueryList:ii,NestingSelector:ci,Nth:fi,Number:gi,Operator:bi,Parentheses:wi,Percentage:Oi,PseudoClassSelector:Mi,PseudoElementSelector:Ii,Ratio:Vi,Raw:Ki,Rule:Qi,Scope:na,Selector:oa,SelectorList:ua,String:ma,StyleSheet:ya,SupportsDeclaration:Ca,TypeSelector:Oa,UnicodeRange:Ia,Url:Ba,Value:Wa,WhiteSpace:Ya},Symbol.toStringTag,{value:`Module`}))});let K=(e=21)=>{let t=``,n=e|0;for(;n--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[Math.random()*64|0];return t};const ns=K(),rs=new Set;function is(e){return!!(e&&e.type===`Function`&&e.name===`anchor`)}function q(e,t=!1){return ts(e,{parseAtrulePrelude:!1,parseCustomProperty:!0,onParseError:e=>{t&&rs.add(e)}})}function J(e){return To(e,{mode:`spec`})}function as(e){return e.type===`Declaration`}function os(e){return e.toArray().reduce((e,t)=>t.type===`Operator`&&t.value===`,`?(e.push([]),e):(t.type===`Identifier`&&e[e.length-1].push(t),e),[[]])}function ss(e){return e?e.children.map(e=>{let t;e.children.last?.type===`PseudoElementSelector`&&(e=Je(e),t=J(e.children.last),e.children.pop());let n=J(e);return{selector:n+(t??``),elementPart:n,pseudoElementPart:t}}).toArray():[]}function cs(){rs.size>0&&(console.group(`The CSS anchor positioning polyfill was not applied due to ${rs.size===1?`a CSS parse error`:`CSS parse errors`}.`),rs.forEach(e=>{console.warn(e.formattedMessage)}),console.groupEnd())}function ls(){rs.clear()}const us=[...ao,`anchor-scope`,`anchor-name`].reduce((e,t)=>(e[t]=`--${t}-${ns}`,e),{});function ds(e,t){return as(e)&&us[e.property]&&t?(t.children.appendData(c(s({},e),{property:us[e.property]})),{updated:!0}):{updated:!1}}function fs(e,t){if(!as(e)||!t||![`inset`,`inset-block`,`inset-inline`].includes(e.property))return{updated:!1};let n=(n,r)=>{r&&t.children.appendData(c(s({},e),{property:n,value:{type:`Value`,children:new qe().fromArray([r])}}))};if(e.property===`inset`){let t=e.value.children.toArray(),[r,i,a,o]=(()=>{switch(t.length){case 1:return[t[0],t[0],t[0],t[0]];case 2:return[t[0],t[1],t[0],t[1]];case 3:return[t[0],t[1],t[2],t[1]];case 4:return[t[0],t[1],t[2],t[3]];default:return[]}})();n(`top`,r),n(`right`,i),n(`bottom`,a),n(`left`,o)}else if(e.property===`inset-block`){let t=e.value.children.toArray(),[r,i]=(()=>{switch(t.length){case 1:return[t[0],t[0]];case 2:return[t[0],t[1]];default:return[]}})();n(`inset-block-start`,r),n(`inset-block-end`,i)}else if(e.property===`inset-inline`){let t=e.value.children.toArray(),[r,i]=(()=>{switch(t.length){case 1:return[t[0],t[0]];case 2:return[t[0],t[1]];default:return[]}})();n(`inset-inline-start`,r),n(`inset-inline-end`,i)}return{updated:!0}}function ps(e){for(let t of e){let e=!1,n=q(t.css,!0);W(n,{visit:`Declaration`,enter(t){let n=this.rule?.block,{updated:r}=fs(t,n),{updated:i}=ds(t,n);(i||r)&&(e=!0)}}),e&&(t.css=J(n),t.changed=!0)}return e.some(e=>e.changed===!0)}var ms=(e=>(e.All=`all`,e.None=`none`,e))(ms||{});function Y(e,t){return t=us[t]??t,(e instanceof HTMLElement?getComputedStyle(e):e.computedStyle).getPropertyValue(t).trim()}function X(e,t,n){return Y(e,t)===n}function hs(e,{selector:t,pseudoElementPart:n}){let r=getComputedStyle(e,n),i=document.createElement(`div`),a=document.createElement(`style`);i.id=`fake-pseudo-element-${K()}`;for(let e of Array.from(r)){let t=r.getPropertyValue(e);i.style.setProperty(e,t)}a.textContent+=`#${i.id}${n} { content: ${r.content}; }`,a.textContent+=`${t} { display: none !important; }`,document.head.append(a);let o=n===`::before`?`afterbegin`:`beforeend`;return e.insertAdjacentElement(o,i),{fakePseudoElement:i,sheet:a,computedStyle:r}}function gs(e){let t=e;for(;t;){if(X(t,`overflow`,`scroll`))return t;t=t.parentElement}return t}function _s(e){let t=gs(e);return t===document.documentElement&&(t=null),t??{scrollTop:0,scrollLeft:0}}function vs(e,t){let{elementPart:n,pseudoElementPart:r}=e,i=[];if(r&&!(r===`::before`||r===`::after`))return i;let a=Ss(t.roots,n);if(!r)return i.push(...a),i;for(let t of a){let{fakePseudoElement:n,sheet:r,computedStyle:a}=hs(t,e),o=n.getBoundingClientRect(),{scrollY:s,scrollX:c}=globalThis,l=_s(t);i.push({fakePseudoElement:n,computedStyle:a,removeFakePseudoElement(){n.remove(),r.remove()},contextElement:t,getBoundingClientRect(){let{scrollY:e,scrollX:t}=globalThis,{scrollTop:n,scrollLeft:r}=l;return DOMRect.fromRect({y:o.y+(s-e)+(l.scrollTop-n),x:o.x+(c-t)+(l.scrollLeft-r),width:o.width,height:o.height})}})}return i}function ys(e,t){let n=Y(e,`anchor-name`);return t?n.split(`,`).map(e=>e.trim()).includes(t):!n}function bs(e,t){let n=Y(e,`anchor-scope`);return n===t||n===`all`}const xs=e=>l(null,null,function*(){let t=yield j.getOffsetParent?.call(j,e);return(yield j.isElement?.call(j,t))||(t=(yield j.getDocumentElement?.call(j,e))||window.document.documentElement),t}),Ss=(e,t)=>e.flatMap(e=>[...e.querySelectorAll(t)]),Cs=`InvalidMimeType`;function ws(e){return!!((e.type===`text/css`||e.rel===`stylesheet`)&&e.href)}function Ts(e){let t=new URL(e.href,document.baseURI);if(ws(e)&&t.origin===location.origin)return t}function Es(e){return l(this,null,function*(){return(yield Promise.all(e.map(e=>l(null,null,function*(){var t;if(!e.url)return e;if((t=e.el)!=null&&t.disabled)return null;try{let t=yield fetch(e.url.toString()),n=t.headers.get(`content-type`);if(!(n!=null&&n.startsWith(`text/css`))){let t=Error(`Error loading ${e.url}: expected content-type "text/css", got "${n}".`);throw t.name=Cs,t}let r=yield t.text();return c(s({},e),{css:r})}catch(e){if(e instanceof Error&&e.name===Cs)return console.warn(e),null;throw e}})))).filter(e=>e!==null)})}const Ds=`[style*="anchor"]`,Os=`[style*="position-area"]`;function ks(e){let t=e?e.filter(e=>e instanceof HTMLElement&&(e.matches(Ds)||e.matches(Os))):Array.from(document.querySelectorAll([Ds,Os].join(`,`))),n=[];return t.filter(e=>e instanceof HTMLElement).forEach(e=>{let t=K(12),r=`data-has-inline-styles`;e.setAttribute(r,t);let i=`[${r}="${t}"] { ${e.getAttribute(`style`)} }`;n.push({el:e,css:i})}),n}function As(e){return l(this,null,function*(){let t=e.elements??Ss(e.roots,`link, style`),n=[];t.filter(e=>e instanceof HTMLElement).forEach(e=>{if(e.tagName.toLowerCase()===`link`){let t=Ts(e);t&&n.push({el:e,url:t})}e.tagName.toLowerCase()===`style`&&n.push({el:e,css:e.innerHTML})});let r=ks(e.excludeInlineStyles?e.elements??[]:void 0);return yield Es([...n,...r])})}let js=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[n[e]&63];return t};const Ms=`--pa-cascade-property`,Ns=`data-anchor-position-wrapper`,Ps=`data-pa-wrapper-for-`,Fs=`POLYFILL-POSITION-AREA`,Is=`left.center.right.span-left.span-right.x-start.x-end.span-x-start.span-x-end.self-x-start.self-x-end.span-self-x-start.span-self-x-end.span-all.top.bottom.span-top.span-bottom.y-start.y-end.span-y-start.span-y-end.self-y-start.self-y-end.span-self-y-start.span-self-y-end.block-start.block-end.span-block-start.span-block-end.inline-start.inline-end.span-inline-start.span-inline-end.self-block-start.self-block-end.span-self-block-start.span-self-block-end.self-inline-start.self-inline-end.span-self-inline-start.span-self-inline-end.start.end.span-start.span-end.self-start.self-end.span-self-start.span-self-end`.split(`.`);function Ls(e){return Is.includes(e)}const Rs={left:[0,1,`Irrelevant`],center:[1,2,`Irrelevant`],right:[2,3,`Irrelevant`],"span-left":[0,2,`Irrelevant`],"span-right":[1,3,`Irrelevant`],"x-start":[0,1,`Physical`],"x-end":[2,3,`Physical`],"span-x-start":[0,2,`Physical`],"span-x-end":[1,3,`Physical`],"self-x-start":[0,1,`PhysicalSelf`],"self-x-end":[2,3,`PhysicalSelf`],"span-self-x-start":[0,2,`PhysicalSelf`],"span-self-x-end":[1,3,`PhysicalSelf`],"span-all":[0,3,`Irrelevant`],top:[0,1,`Irrelevant`],bottom:[2,3,`Irrelevant`],"span-top":[0,2,`Irrelevant`],"span-bottom":[1,3,`Irrelevant`],"y-start":[0,1,`Physical`],"y-end":[2,3,`Physical`],"span-y-start":[0,2,`Physical`],"span-y-end":[1,3,`Physical`],"self-y-start":[0,1,`PhysicalSelf`],"self-y-end":[2,3,`PhysicalSelf`],"span-self-y-start":[0,2,`PhysicalSelf`],"span-self-y-end":[1,3,`PhysicalSelf`],"block-start":[0,1,`Logical`],"block-end":[2,3,`Logical`],"span-block-start":[0,2,`Logical`],"span-block-end":[1,3,`Logical`],"inline-start":[0,1,`Logical`],"inline-end":[2,3,`Logical`],"span-inline-start":[0,2,`Logical`],"span-inline-end":[1,3,`Logical`],"self-block-start":[0,1,`LogicalSelf`],"self-block-end":[2,3,`LogicalSelf`],"span-self-block-start":[0,2,`LogicalSelf`],"span-self-block-end":[1,3,`LogicalSelf`],"self-inline-start":[0,1,`LogicalSelf`],"self-inline-end":[2,3,`LogicalSelf`],"span-self-inline-start":[0,2,`LogicalSelf`],"span-self-inline-end":[1,3,`LogicalSelf`],start:[0,1,`Logical`],end:[2,3,`Logical`],"span-start":[0,2,`Logical`],"span-end":[1,3,`Logical`],"self-start":[0,1,`LogicalSelf`],"self-end":[2,3,`LogicalSelf`],"span-self-start":[0,2,`LogicalSelf`],"span-self-end":[1,3,`LogicalSelf`]},zs=[`left`,`center`,`right`,`span-left`,`span-right`,`x-start`,`x-end`,`span-x-start`,`span-x-end`,`self-x-start`,`self-x-end`,`span-self-x-start`,`span-self-x-end`,`span-all`],Bs=[`top`,`center`,`bottom`,`span-top`,`span-bottom`,`y-start`,`y-end`,`span-y-start`,`span-y-end`,`self-y-start`,`self-y-end`,`span-self-y-start`,`span-self-y-end`,`span-all`],Vs=[`block-start`,`center`,`block-end`,`span-block-start`,`span-block-end`,`span-all`],Hs=[`inline-start`,`center`,`inline-end`,`span-inline-start`,`span-inline-end`,`span-all`],Us=[`self-block-start`,`center`,`self-block-end`,`span-self-block-start`,`span-self-block-end`,`span-all`],Ws=[`self-inline-start`,`center`,`self-inline-end`,`span-self-inline-start`,`span-self-inline-end`,`span-all`],Gs=[`start`,`center`,`end`,`span-start`,`span-end`,`span-all`],Ks=[`self-start`,`center`,`self-end`,`span-self-start`,`span-self-end`,`span-all`],qs=[`block`,`top`,`bottom`,`y`],Js=[`inline`,`left`,`right`,`x`];function Ys(e){let t=e.split(`-`);for(let e of t){if(qs.includes(e))return`block`;if(Js.includes(e))return`inline`}return`ambiguous`}function Xs(e,t){return t[0].includes(e[0])&&t[1].includes(e[1])||t[0].includes(e[1])&&t[1].includes(e[0])}const Zs=[[zs,Bs],[Vs,Hs],[Us,Ws],[Gs,Gs],[Ks,Ks]];function Qs(e){for(let t of Zs)if(Xs(e,t))return!0;return!1}const $s=e=>{let t=getComputedStyle(e);return{writingMode:t.writingMode,direction:t.direction}},ec=(e,t)=>l(null,null,function*(){let n=yield xs(e);switch(t){case`Logical`:case`Physical`:return $s(n);case`LogicalSelf`:case`PhysicalSelf`:return $s(e);default:return null}}),tc=e=>e.reverse().map(e=>3-e),nc=(e,t)=>e===`Irrelevant`?t:e,rc=(e,t)=>l(null,[e,t],function*({block:e,inline:t},n){let r=yield ec(n,nc(e[2],t[2])),i={block:[e[0],e[1]],inline:[t[0],t[1]]};if(r){if(r.direction===`rtl`&&(i.inline=tc(i.inline)),r.writingMode.startsWith(`vertical`)){let e=i.block;i.block=i.inline,i.inline=e}if(r.writingMode.startsWith(`sideways`)){let e=i.block;i.block=i.inline,i.inline=e,r.writingMode.endsWith(`lr`)&&(i.block=tc(i.block))}r.writingMode.endsWith(`rl`)&&(i.inline=tc(i.inline))}return i}),ic=({block:e,inline:t})=>{let n=[0,`top`,`bottom`,0],r=[0,`left`,`right`,0];return{block:[n[e[0]],n[e[1]]],inline:[r[t[0]],r[t[1]]]}};function ac([e,t]){return e===0&&t===3?`center`:e===0?`end`:t===3?`start`:`center`}function oc(e){return e.type===`Declaration`&&e.property===`position-area`}function sc(e){let t=e.value.children.toArray().map(({name:e})=>e);return t.length===1&&(Ys(t[0])===`ambiguous`?t.push(t[0]):t.push(`span-all`)),t}function cc(e){if(!oc(e))return;let t=sc(e);if(!Qs(t))return;let n={};switch(Ys(t[0])){case`block`:n.block=t[0],n.inline=t[1];break;case`inline`:n.inline=t[0],n.block=t[1];break;case`ambiguous`:Ys(t[1])==`block`?(n.block=t[1],n.inline=t[0]):(n.inline=t[1],n.block=t[0]);break}return{values:n,grid:{block:Rs[n.block],inline:Rs[n.inline]},selectorUUID:`--pa-declaration-${js(12)}`}}function lc(e,t){[`justify-self`,`align-self`].forEach(e=>{t.children.appendData({type:`Declaration`,property:e,value:{type:`Raw`,value:`var(--pa-value-${e})`},important:!1})}),t.children.appendData({type:`Declaration`,property:Ms,value:{type:`Raw`,value:e.selectorUUID},important:!1})}function uc(e,t){var n;let r;if(e.parentElement?.tagName===Fs)r=e.parentElement;else{r=document.createElement(Fs),r.style.display=`grid`,r.style.position=`absolute`;let t=getComputedStyle(e).pointerEvents;r.style.pointerEvents=`none`,e.style.pointerEvents=t,[`top`,`left`,`right`,`bottom`].forEach(e=>{r.style.setProperty(e,`var(--pa-value-${e})`)}),(n=e.parentElement)==null||n.insertBefore(r,e),r.appendChild(e)}return r.setAttribute(`${Ps}${t}`,``),r}function dc(e,t,n){return l(this,null,function*(){let r=`--pa-target-${js(12)}`,i=yield rc(t.grid,e),a=ic(i),o=nc(t.grid.block[2],t.grid.inline[2]),s=[`LogicalSelf`,`PhysicalSelf`].includes(o)?i:t.grid;return{insets:a,alignments:{block:ac([s.block[0],s.block[1]]),inline:ac([s.inline[0],s.inline[1]])},targetUUID:r,targetEl:e,anchorEl:n,wrapperEl:uc(e,r),values:t.values,grid:t.grid,selectorUUID:t.selectorUUID}})}function fc(e,t){return`
|
|
8
|
+
[${Ns}="${t}"][${Ps}${e}] {
|
|
9
|
+
--pa-value-top: var(${e}-top);
|
|
10
|
+
--pa-value-left: var(${e}-left);
|
|
11
|
+
--pa-value-right: var(${e}-right);
|
|
12
|
+
--pa-value-bottom: var(${e}-bottom);
|
|
13
|
+
--pa-value-justify-self: var(${e}-justify-self);
|
|
14
|
+
--pa-value-align-self: var(${e}-align-self);
|
|
15
|
+
}
|
|
16
|
+
`.replaceAll(`
|
|
17
|
+
`,``)}const pc=[`normal`,`most-width`,`most-height`,`most-block-size`,`most-inline-size`],mc=[`flip-block`,`flip-inline`,`flip-start`];function hc(e){return e.type===`Declaration`}function gc(e){return e.type===`Declaration`&&e.property===`position-try-fallbacks`}function _c(e){return e.type===`Declaration`&&e.property===`position-try-order`}function vc(e){return e.type===`Declaration`&&e.property===`position-try`}function yc(e){return e.type===`Atrule`&&e.name===`position-try`}function bc(e){return mc.includes(e)}function xc(e){return pc.includes(e)}function Sc(e,t){let n=document.querySelector(e);if(n){let e=wc(n);return t.forEach(t=>{e=Nc(e,t)}),e}}function Cc(e,t){let n=e.declarations;return t.forEach(e=>{n=Nc(n,e)}),n}function wc(e){let t={};return ao.forEach(n=>{let r=Y(e,`--${n}-${ns}`);r&&(t[n]=r)}),t}const Tc={"flip-block":{top:`bottom`,bottom:`top`,"inset-block-start":`inset-block-end`,"inset-block-end":`inset-block-start`,"margin-top":`margin-bottom`,"margin-bottom":`margin-top`},"flip-inline":{left:`right`,right:`left`,"inset-inline-start":`inset-inline-end`,"inset-inline-end":`inset-inline-start`,"margin-left":`margin-right`,"margin-right":`margin-left`},"flip-start":{left:`top`,right:`bottom`,top:`left`,bottom:`right`,"inset-block-start":`inset-block-end`,"inset-block-end":`inset-block-start`,"inset-inline-start":`inset-inline-end`,"inset-inline-end":`inset-inline-start`,"inset-block":`inset-inline`,"inset-inline":`inset-block`}},Ec={"flip-block":{top:`bottom`,bottom:`top`,start:`end`,end:`start`,"self-end":`self-start`,"self-start":`self-end`},"flip-inline":{left:`right`,right:`left`,start:`end`,end:`start`,"self-end":`self-start`,"self-start":`self-end`},"flip-start":{top:`left`,left:`top`,right:`bottom`,bottom:`right`}},Dc={"flip-block":{top:`bottom`,bottom:`top`,start:`end`,end:`start`},"flip-inline":{left:`right`,right:`left`,start:`end`,end:`start`},"flip-start":{}};function Oc(e,t){return Tc[t][e]||e}function kc(e,t){return Ec[t][e]||e}function Ac(e,t){if(t===`flip-start`)return e;{let n=Dc[t];return e.split(`-`).map(e=>n[e]||e).join(`-`)}}function jc(e,t,n){if(e===`margin`){let[e,r,i,a]=t.children.toArray();n===`flip-block`?a?t.children.fromArray([i,r,e,a]):i&&t.children.fromArray([i,r,e]):n===`flip-inline`&&a&&t.children.fromArray([e,a,i,r])}else if(e===`margin-block`){let[e,r]=t.children.toArray();n===`flip-block`&&r&&t.children.fromArray([r,e])}else if(e===`margin-inline`){let[e,r]=t.children.toArray();n===`flip-inline`&&r&&t.children.fromArray([r,e])}}const Mc=(e,t)=>(q(`#id{${e}: ${t};}`).children.first?.block.children.first).value;function Nc(e,t){let n={};return Object.entries(e).forEach(([e,r])=>{let i=e,a=Mc(i,r),o=Oc(i,t);o!==i&&(n[i]??(n[i]=`revert`)),W(a,{visit:`Function`,enter(e){is(e)&&e.children.forEach(e=>{nl(e)&&lo(e.name)&&(e.name=kc(e.name,t))})}}),i===`position-area`&&a.children.forEach(e=>{nl(e)&&Ls(e.name)&&(e.name=Ac(e.name,t))}),i.startsWith(`margin`)&&jc(i,a,t),n[o]=J(a)}),n}function Pc(e){let t=os(e),n=[];return t.forEach(e=>{let t={atRules:[],tactics:[],positionAreas:[]};e.forEach(e=>{bc(e.name)?t.tactics.push(e.name):e.name.startsWith(`--`)?t.atRules.push(e.name):Ls(e.name)&&t.positionAreas.push(e.name)}),t.positionAreas.length?n.push({positionArea:t.positionAreas[0],type:`position-area`}):t.atRules.length&&t.tactics.length?n.push({tactics:t.tactics,atRule:t.atRules[0],type:`at-rule-with-try-tactic`}):t.atRules.length?n.push({atRule:t.atRules[0],type:`at-rule`}):t.tactics.length&&n.push({tactics:t.tactics,type:`try-tactic`})}),n}function Fc(e){return gc(e)&&e.value.children.first?Pc(e.value.children):[]}function Ic(e){if(vc(e)&&e.value.children.first){let t=Je(e),n,r=t.value.children.first.name;r&&xc(r)&&(n=r,t.value.children.shift());let i=Pc(t.value.children);return{order:n,options:i}}return{}}function Lc(e){return _c(e)&&e.value.children.first?{order:e.value.children.first.name}:{}}function Rc(e){let{order:t,options:n}=Ic(e);if(t||n)return{order:t,options:n};let{order:r}=Lc(e),i=Fc(e);return r||i?{order:r,options:i}:{}}function zc(e){return Qa(e.property)||eo(e.property)||no(e.property)||io(e.property)||[`position-anchor`,`position-area`].includes(e.property)}function Bc(e){var t,n;if(yc(e)&&(t=e.prelude)!=null&&t.value&&(n=e.block)!=null&&n.children){let t=e.prelude.value,n=e.block.children.filter(e=>hc(e)&&zc(e));return{name:t,tryBlock:{uuid:`${t}-try-${K(12)}`,declarations:Object.fromEntries(n.map(e=>[e.property,J(e.value)]))}}}return{}}function Vc(e){let t={},n={},r={};for(let n of e)W(q(n.css),{visit:`Atrule`,enter(e){let{name:n,tryBlock:r}=Bc(e);n&&r&&(t[n]=r)}});for(let i of e){let e=!1,a=new Set,o=q(i.css);W(o,{visit:`Declaration`,enter(i){let o=ss(this.rule?.prelude);if(!o.length)return;let{order:s,options:c}=Rc(i),l={};s&&(l.order=s),o.forEach(({selector:i})=>{var o;c?.forEach(r=>{var o;let s;if(r.type===`at-rule`)s=r.atRule;else if(r.type===`try-tactic`){s=`${i}-${r.tactics.join(`-`)}`;let e=Sc(i,r.tactics);e&&(t[s]={uuid:`${i}-${r.tactics.join(`-`)}-try-${K(12)}`,declarations:e})}else if(r.type===`at-rule-with-try-tactic`){s=`${i}-${r.atRule}-${r.tactics.join(`-`)}`;let e=t[r.atRule],n=Cc(e,r.tactics);n&&(t[s]={uuid:`${i}-${r.atRule}-${r.tactics.join(`-`)}-try-${K(12)}`,declarations:n})}if(s&&t[s]){let r=`[data-anchor-polyfill="${t[s].uuid}"]`;n[r]??(n[r]=[]),n[r].push(i),a.has(s)||(l.fallbacks??=[],l.fallbacks.push(t[s]),a.add(s),(o=this.stylesheet)==null||o.children.prependData({type:`Rule`,prelude:{type:`Raw`,value:r},block:{type:`Block`,children:new qe().fromArray(Object.entries(t[s].declarations).map(([e,t])=>({type:`Declaration`,important:!0,property:e,value:{type:`Raw`,value:t}})))}}),e=!0)}}),Object.keys(l).length>0&&(r[i]?(l.order&&(r[i].order=l.order),l.fallbacks&&((o=r[i]).fallbacks??(o.fallbacks=[]),r[i].fallbacks.push(...l.fallbacks))):r[i]=l)})}}),e&&(i.css=J(o),i.changed=!0)}return{fallbackTargets:n,validPositions:r}}function Hc(e,t){return!e||e===t?!1:Uc(e)?e.document.contains(t):e.contains(t)}function Uc(e){return!!(e&&e===e.window)}function Wc(e){return X(e,`position`,`fixed`)}function Gc(e){return!!(e&&(Wc(e)||X(e,`position`,`absolute`)))}function Kc(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING}function qc(e){return l(this,null,function*(){return yield j.getOffsetParent(e)})}function Jc(e){return l(this,null,function*(){if(![`absolute`,`fixed`].includes(Y(e,`position`)))return yield qc(e);let t=e.parentElement;for(;t;){if(!X(t,`position`,`static`)&&X(t,`display`,`block`))return t;t=t.parentElement}return window})}function Yc(e,t,n,r){return l(this,null,function*(){let i=yield Jc(e),a=yield Jc(n);if(!(Hc(a,e)||Uc(a))||i===a&&!(!Gc(e)||Kc(e,n)))return!1;if(i!==a){let e,t=[];for(e=i;e&&e!==a&&e!==window;)t.push(e),e=yield Jc(e);let r=t[t.length-1];if(r instanceof HTMLElement&&!(!Gc(r)||Kc(r,n)))return!1}{let t=e.parentElement;for(;t;){if(X(t,`content-visibility`,`hidden`))return!1;t=t.parentElement}}return!(t&&r&&Xc(e,t,r)!==Xc(n,t,r))})}function Xc(e,t,n){for(;!(e.matches(n)&&bs(e,t));){if(!e.parentElement)return null;e=e.parentElement}return e}function Zc(e,t,n,r,i){return l(this,null,function*(){if(!(e instanceof HTMLElement&&n.length&&Gc(e)))return null;let a=n.flatMap(e=>vs(e,i)).filter(e=>ys(e,t)),o=r.map(e=>e.selector).join(`,`)||null;for(let n=a.length-1;n>=0;n--){let r=a[n],i=`fakePseudoElement`in r;if(yield Yc(i?r.fakePseudoElement:r,t,e,o))return i&&r.removeFakePseudoElement(),r}return null})}function Qc(e){return e.type===`Declaration`&&e.property===`anchor-name`}function $c(e){return e.type===`Declaration`&&e.property===`anchor-scope`}function el(e){return!!(e&&e.type===`Function`&&e.name===`anchor-size`)}function tl(e){return!!(e&&e.type===`Function`&&e.name===`var`)}function nl(e){return!!(e.type===`Identifier`&&e.name)}function rl(e){return!!(e.type===`Percentage`&&e.value)}function il(e,t){let n,r,i,a=``,o=!1,s,c=[];e.children.toArray().forEach(e=>{if(o){a=`${a}${J(e)}`;return}if(e.type===`Operator`&&e.value===`,`){o=!0;return}c.push(e)});let[l,u]=c;if(u||(u=l,l=void 0),l&&(nl(l)&&l.name.startsWith(`--`)?n=l.name:tl(l)&&l.children.first&&(s=l.children.first.name)),u)if(is(e)){if(nl(u)&&lo(u.name))r=u.name;else if(rl(u)){let e=Number(u.value);r=Number.isNaN(e)?void 0:e}}else el(e)&&nl(u)&&fo(u.name)&&(i=u.name);let d=`--anchor-${K(12)}`;return Object.assign(e,{type:`Raw`,value:`var(${d})`,children:null}),Reflect.deleteProperty(e,`name`),{anchorName:n,anchorSide:r,anchorSize:i,fallbackValue:a,customPropName:s,uuid:d}}function al(e){return e.value.children.map(({name:e})=>e)}let ol={},Z={},Q={},sl={},$={};function cl(){ol={},Z={},Q={},sl={},$={}}function ll(e,t){if((is(e)||el(e))&&t){if(t.property.startsWith(`--`)){let n=J(t.value),r=il(e);return sl[r.uuid]=n,Q[t.property]=[...Q[t.property]??[],r],{changed:!0}}if(is(e)&&Qa(t.property)||el(e)&&so(t.property)){let n=il(e);return{prop:t.property,data:n,changed:!0}}}return{}}function ul(e,t,n){return l(this,null,function*(){let r=t?.anchorName,i=t?.customPropName;if(e&&!r){let t=Y(e,`position-anchor`);t?r=t:i&&(r=Y(e,i))}let a=r&&ol[r]||[],o=r&&Z[ms.All]||[],s=r&&Z[r]||[];return yield Zc(e,r||null,a,[...o,...s],{roots:n.roots})})}function dl(e,t){return l(this,null,function*(){var n;let r={},i={};cl();let{fallbackTargets:a,validPositions:o}=Vc(e);for(let t of e){let e=!1,n=q(t.css);W(n,function(t){let n=ss(this.rule?.prelude);if(Qc(t)&&n.length)for(let e of al(t))ol[e]??(ol[e]=[]),ol[e].push(...n);if($c(t)&&n.length)for(let e of al(t))Z[e]??(Z[e]=[]),Z[e].push(...n);let{prop:a,data:o,changed:l}=ll(t,this.declaration);if(a&&o&&n.length)for(let{selector:e}of n)r[e]=c(s({},r[e]),{[a]:[...r[e]?.[a]??[],o]});let u;if(this.block&&(u=cc(t),u)){lc(u,this.block);for(let{selector:e}of n)i[e]=[...i[e]??[],u]}(l||u)&&(e=!0)}),e&&(t.css=J(n),t.changed=!0)}let l=new Set(Object.keys(Q)),u={},d=e=>{var t;let n=[],r=new Set(u[e]?.names??[]);for(;r.size>0;)for(let e of r)n.push(...Q[e]??[]),r.delete(e),(t=u[e]?.names)!=null&&t.length&&u[e].names.forEach(e=>r.add(e));return n};for(;l.size>0;){let t=[];for(let n of e){let e=!1,r=q(n.css);W(r,{visit:`Function`,enter(n){let r=this.rule?.prelude,i=this.declaration,a=i?.property;if(r?.children.isEmpty===!1&&tl(n)&&i&&a&&n.children.first&&l.has(n.children.first.name)&&a.startsWith(`--`)){let r=n.children.first,o=Q[r.name]??[],s=d(r.name);if(!(o.length||s.length))return;let c=`${r.name}-anchor-${K(12)}`,l=J(i.value);sl[c]=l,u[a]||(u[a]={names:[],uuids:[]});let f=u[a];f.names.includes(r.name)||f.names.push(r.name),f.uuids.push(c),t.push(a),r.name=c,e=!0}}}),e&&(n.css=J(r),n.changed=!0)}l.clear(),t.forEach(e=>l.add(e))}for(let t of e){let e=!1,n=q(t.css);W(n,{visit:`Function`,enter(t){var n,i,a;let o=this.rule?.prelude,l=this.declaration,f=l?.property;if(o?.children.isEmpty===!1&&tl(t)&&l&&f&&t.children.first&&(Qa(f)||no(f))){let l=t.children.first,p=Q[l.name]??[],m=d(l.name);if(!(p.length||m.length))return;let h=`${f}-${K(12)}`;if(m.length){let e=new Set([l.name]);for(;e.size>0;)for(let t of e){let r=u[t];if((n=r?.names)!=null&&n.length&&(i=r?.uuids)!=null&&i.length)for(let e of r.names)for(let t of r.uuids)$[t]=c(s({},$[t]),{[h]:`${e}-${h}`});e.delete(t),(a=r?.names)!=null&&a.length&&r.names.forEach(t=>e.add(t))}}let g=ss(o);for(let e of[...p,...m]){let t=s({},e),n=`--anchor-${K(12)}-${f}`,i=t.uuid;t.uuid=n;for(let{selector:e}of g)r[e]=c(s({},r[e]),{[f]:[...r[e]?.[f]??[],t]});$[i]=c(s({},$[i]),{[h]:n})}l.name=`${l.name}-${h}`,e=!0}}}),e&&(t.css=J(n),t.changed=!0)}if(Object.keys($).length>0)for(let t of e){let e=!1,n=q(t.css);W(n,{visit:`Function`,enter(t){var n,r;if(tl(t)&&(n=t.children.first?.name)!=null&&n.startsWith(`--`)&&(r=this.declaration?.property)!=null&&r.startsWith(`--`)&&this.block){let n=t.children.first,r=$[n.name];if(r)for(let[t,i]of Object.entries(r))this.block.children.appendData({type:`Declaration`,important:!1,property:`${this.declaration.property}-${t}`,value:{type:`Raw`,value:J(this.declaration.value).replace(`var(${n.name})`,`var(${i})`)}}),e=!0;sl[n.name]&&(this.declaration.value={type:`Raw`,value:sl[n.name]},e=!0)}}}),e&&(t.css=J(n),t.changed=!0)}let f=new Map;for(let[e,i]of Object.entries(r)){let r;r=e.startsWith(`[data-anchor-polyfill=`)&&(n=a[e])!=null&&n.length?Ss(t.roots,a[e].join(`,`)):Ss(t.roots,e);for(let[n,a]of Object.entries(i))for(let i of a)for(let a of r){let r=yield ul(a,i,{roots:t.roots}),l=`--anchor-${K(12)}`;f.set(a,c(s({},f.get(a)??{}),{[i.uuid]:l})),a.setAttribute(`style`,`${i.uuid}: var(${l}); ${a.getAttribute(`style`)??``}`),o[e]=c(s({},o[e]),{declarations:c(s({},o[e]?.declarations),{[n]:[...o[e]?.declarations?.[n]??[],c(s({},i),{anchorEl:r,targetEl:a,uuid:l})]})})}}let p={el:document.createElement(`link`),changed:!1,created:!0,css:``};e.push(p);for(let[e,n]of Object.entries(i)){let r=Ss(t.roots,e);for(let i of r){let r=yield ul(i,null,{roots:t.roots});for(let t of n){let n=yield dc(i,t,r);p.css+=fc(n.targetUUID,t.selectorUUID),p.changed=!0,o[e]=c(s({},o[e]),{declarations:c(s({},o[e]?.declarations),{"position-area":[...o[e]?.declarations?.[`position-area`]??[],n]})})}}}return{rules:o,inlineStyles:f,anchorScopes:Z}})}const fl=[`as`,`blocking`,`crossorigin`,`disabled`,`fetchpriority`,`href`,`hreflang`,`integrity`,`referrerpolicy`,`rel`,`type`];function pl(e,t,n=!1){let r=[];for(let{el:i,css:a,changed:o,created:s=!1}of e){let e={el:i,css:a,changed:!1};if(o){if(i.tagName.toLowerCase()===`style`)i.innerHTML=a;else if(i instanceof HTMLLinkElement){let t=document.createElement(`style`);t.textContent=a;for(let e of i.getAttributeNames())if(!e.startsWith(`on`)&&!fl.includes(e)){let n=i.getAttribute(e);n!==null&&t.setAttribute(e,n)}i.hasAttribute(`href`)&&t.setAttribute(`data-original-href`,i.getAttribute(`href`)),s?(t.setAttribute(`data-generated-by-polyfill`,`true`),document.head.insertAdjacentElement(`beforeend`,t)):(i.insertAdjacentElement(`beforebegin`,t),i.remove()),e.el=t}else if(i.hasAttribute(`data-has-inline-styles`)){let e=i.getAttribute(`data-has-inline-styles`);if(e){let n=`[data-has-inline-styles="${e}"]{`,r=a.slice(n.length,-1),o=t?.get(i);if(o)for(let[e,t]of Object.entries(o))r=`${e}: var(${t}); ${r}`;i.setAttribute(`style`,r)}}}n&&i.hasAttribute(`data-has-inline-styles`)&&i.removeAttribute(`data-has-inline-styles`),r.push(e)}return r}const ml=c(s({},j),{_c:new Map}),hl=(e,t)=>{let n;switch(e){case`start`:case`self-start`:n=0;break;case`end`:case`self-end`:n=100;break;default:typeof e==`number`&&!Number.isNaN(e)&&(n=e)}if(n!==void 0)return t?100-n:n},gl=(e,t)=>{let n;switch(e){case`block`:case`self-block`:n=t?`width`:`height`;break;case`inline`:case`self-inline`:n=t?`height`:`width`;break}return n},_l=e=>{switch(e){case`top`:case`bottom`:case`inset-block-start`:case`inset-block-end`:return`y`;case`left`:case`right`:case`inset-inline-start`:case`inset-inline-end`:return`x`}return null},vl=e=>{switch(e){case`x`:return`width`;case`y`:return`height`}return null},yl=e=>Y(e,`display`)===`inline`,bl=(e,t)=>(t===`x`?[`border-left-width`,`border-right-width`]:[`border-top-width`,`border-bottom-width`]).reduce((t,n)=>t+parseInt(Y(e,n),10),0)||0,xl=(e,t)=>parseInt(Y(e,`margin-${t}`),10)||0,Sl=e=>({top:xl(e,`top`),right:xl(e,`right`),bottom:xl(e,`bottom`),left:xl(e,`left`)}),Cl=e=>l(null,[e],function*({targetEl:e,targetProperty:t,anchorRect:n,anchorSide:r,anchorSize:i,fallback:a=null}){if(!((i||r!==void 0)&&e&&n))return a;if(i){if(!so(t))return a;let r;switch(i){case`width`:case`height`:r=i;break;default:{let t=!1,n=Y(e,`writing-mode`);t=n.startsWith(`vertical-`)||n.startsWith(`sideways-`),r=gl(i,t)}}return r?`${n[r]}px`:a}if(r!==void 0){let i,o,s=_l(t);if(!(Qa(t)&&s&&(!Qa(r)||s===_l(r))))return a;let c=[`top`,`left`,`inset-block-start`,`inset-inline-start`],l=[`bottom`,`right`,`inset-block-end`,`inset-inline-end`];switch(r){case`left`:case`top`:i=0;break;case`right`:case`bottom`:i=100;break;case`center`:i=50;break;case`inside`:i=c.includes(t)?0:100;break;case`outside`:i=c.includes(t)?100:0;break;default:e&&(i=hl(r,(yield j.isRTL?.call(j,e))||!1))}let u=typeof i==`number`&&!Number.isNaN(i),d=vl(s);if(u&&d){l.includes(t)&&(o=yield xs(e));let r=n[s]+n[d]*(i/100);switch(t){case`bottom`:case`inset-block-end`:{if(!o)break;let e=o.clientHeight;if(e===0&&yl(o)){let t=bl(o,s);e=o.offsetHeight-t}r=e-r;break}case`right`:case`inset-inline-end`:{if(!o)break;let e=o.clientWidth;if(e===0&&yl(o)){let t=bl(o,s);e=o.offsetWidth-t}r=e-r;break}}return`${r}px`}}return a}),wl=e=>`wrapperEl`in e,Tl=e=>`uuid`in e;function El(e,t=!1){return l(this,null,function*(){let n=document.documentElement;for(let[r,i]of Object.entries(e))for(let e of i){let i=e.anchorEl,a=e.targetEl;if(i&&a)if(wl(e)){let r=e.wrapperEl,o=(e,t,n)=>l(null,null,function*(){return e===0?`0px`:yield Cl({targetEl:r,targetProperty:t,anchorRect:n,anchorSide:e})});Ge(i,r,()=>l(null,null,function*(){let t=Y(a,Ms);r.setAttribute(Ns,t);let s=yield j.getElementRects({reference:i,floating:r,strategy:`absolute`}),c=e.insets,l=yield o(c.block[0],`top`,s.reference),u=yield o(c.block[1],`bottom`,s.reference),d=yield o(c.inline[0],`left`,s.reference),f=yield o(c.inline[1],`right`,s.reference);n.style.setProperty(`${e.targetUUID}-top`,l||null),n.style.setProperty(`${e.targetUUID}-left`,d||null),n.style.setProperty(`${e.targetUUID}-right`,f||null),n.style.setProperty(`${e.targetUUID}-bottom`,u||null),n.style.setProperty(`${e.targetUUID}-justify-self`,e.alignments.inline),n.style.setProperty(`${e.targetUUID}-align-self`,e.alignments.block)}),{animationFrame:t})}else Ge(i,a,()=>l(null,null,function*(){let t=yield Cl({targetEl:a,targetProperty:r,anchorRect:(yield j.getElementRects({reference:i,floating:a,strategy:`absolute`})).reference,anchorSide:e.anchorSide,anchorSize:e.anchorSize,fallback:e.fallbackValue});n.style.setProperty(e.uuid,t)}),{animationFrame:t});else if(Tl(e)){let t=yield Cl({targetProperty:r,anchorSide:e.anchorSide,anchorSize:e.anchorSize,fallback:e.fallbackValue});n.style.setProperty(e.uuid,t)}}})}function Dl(e,t){return l(this,null,function*(){let n=yield j.getElementRects({reference:e,floating:e,strategy:`absolute`});return yield Ke({x:e.offsetLeft,y:e.offsetTop,platform:ml,rects:n,elements:{floating:e,reference:t},strategy:`absolute`},{padding:Sl(e)})})}function Ol(e,t,n=!1){return l(this,null,function*(){if(!t.length)return;let r=document.querySelectorAll(e);for(let e of r){let r=!1,i=yield xs(e);Ge({},e,()=>l(null,null,function*(){if(r)return;r=!0,e.removeAttribute(`data-anchor-polyfill`);let n=yield Dl(e,i);if(Object.values(n).every(e=>e<=0)){e.removeAttribute(`data-anchor-polyfill-last-successful`),r=!1;return}for(let[n,{uuid:a}]of t.entries()){e.setAttribute(`data-anchor-polyfill`,a);let o=yield Dl(e,i);if(Object.values(o).every(e=>e<=0)){e.setAttribute(`data-anchor-polyfill-last-successful`,a),r=!1;break}if(n===t.length-1){let t=e.getAttribute(`data-anchor-polyfill-last-successful`);t?e.setAttribute(`data-anchor-polyfill`,t):e.removeAttribute(`data-anchor-polyfill`),r=!1;break}}}),{animationFrame:n,layoutShift:!1})}})}function kl(e,t=!1){return l(this,null,function*(){for(let n of Object.values(e))yield El(n.declarations??{},t);for(let[n,r]of Object.entries(e))yield Ol(n,r.fallbacks??[],t)})}function Al(e={}){let t=typeof e==`boolean`?{useAnimationFrame:e}:e,n=t.useAnimationFrame===void 0?!!window.UPDATE_ANCHOR_ON_ANIMATION_FRAME:t.useAnimationFrame;return Array.isArray(t.elements)||(t.elements=void 0),(!Array.isArray(t.roots)||t.roots.length===0)&&(t.roots=[document]),Object.assign(t,{useAnimationFrame:n})}function jl(e){return l(this,null,function*(){let t=Al(e??window.ANCHOR_POSITIONING_POLYFILL_OPTIONS),n=yield As(t),r={},i;ls();try{ps(n)&&(n=pl(n));let e=yield dl(n,{roots:t.roots});r=e.rules,i=e.inlineStyles}catch(e){throw cs(),e}return Object.values(r).length&&(pl(n,i,!0),yield kl(r,t.useAnimationFrame)),r})}export{jl as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=(e,t)=>`Non-positive ${e}: ${t}`,t=(e,t)=>`Non-finite ${e}: ${t}`,n=e=>`Cannot convert bigint to ${e}`,r=(e,t,n,r)=>i(e,t)+`; must be between ${n}-${r}`,i=(e,t)=>`Invalid ${e}: ${t}`;function a(e){return e===void 0?Object.create(null):f(e)}function o(e,r=`number`){if(typeof e==`bigint`)throw TypeError(n(r));if(e=Number(e),!Number.isFinite(e))throw RangeError(t(r,e));return e}function s(e,t){return Math.trunc(o(e,t))||0}function c(e,t){return l(s(e,t),t)}function l(t,n=`number`){if(t<=0)throw RangeError(e(n,t));return t}function u(e,t,n){return Math.min(Math.max(e,t),n)}function d(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function f(e){if(!d(e))throw TypeError(`Invalid object`);return e}const p=i,m=e=>`Missing ${e}`,ee=e=>`No valid fields: `+e.join(),h=(e,t,n)=>i(e,t)+`; must be `+Object.keys(n).join(),te=e=>`Missing year`+(e?`/era/eraYear`:``),ne=`Invalid leap month`,re=e=>i(`Calendar`,e),ie=(e,t)=>`Unknown calendar ${e}; might need ${t}`,ae=e=>i(`TimeZone`,e),oe=e=>`Cannot parse: ${e}`,se=e=>`Invalid substring: ${e}`,ce=e=>`Cannot format ${e}`,le=u,g=d;function _(e){throw RangeError(e)}function v(e){throw TypeError(e)}function ue(e,t,n,r,i){return de(t,((e,t)=>{let n=e[t];return n===void 0&&v(m(t)),n})(e,t),n,r,i)}function de(e,t,n,i,a,o){let s=le(t,n,i);return a&&t!==s&&_(((e,t,n,i,a)=>a?r(e,a[t],a[n],a[i]):r(e,t,n,i))(e,t,n,i,o)),s}function fe(e,t=Map){let n=new t;return(t,...r)=>{if(n.has(t))return n.get(t);let i=e(t,...r);return n.set(t,i),i}}const pe=e=>me({name:e},1),me=(e,t)=>ge(e=>({value:e,configurable:1,writable:!t}),e),he=e=>({[Symbol.toStringTag]:{value:e,configurable:1}});function ge(e,t){let n={};for(let r in t)n[r]=e(t[r],r);return n}function _e(e,t){let n={};for(let r of e)n[r]=t;return n}function ve(e){let t={};for(let n of e)t[n]=e=>e[n];return t}function y(e,t,n=Object.create(null)){for(let r of e)n[r]=t[r];return n}function ye(e,t,n){for(let r of e)if(t[r]!==n[r])return 0;return 1}function be(e,t,n){let r={...n};for(let n=0;n<t;n++)r[e[n]]=0;return r}function b(e,...t){return(...n)=>e(...t,...n)}function xe(e){return e}function Se(){}function Ce(e){return e[0].toUpperCase()+e.substring(1)}function x(...e){return[].concat(...e).sort()}function we(e){return RegExp(`^${e}$`,`i`)}function Te(e){return parseInt(e.padEnd(9,`0`))}function Ee(e){return e&&e!==`+`?-1:1}function De(e){return e===void 0?0:parseInt(e)}function Oe(e,t){return String(t).padStart(e,`0`)}const ke=b(Oe,2);function Ae(e,t){return Math.sign(e-t)}function S(e,t){return e<t?-1:+(e>t)}function je(e,t){let n=e/t;return e%t<0n?n-1n:n}function Me(e,t){let n=je(e,t);return[n,e-n*t]}function Ne(e,t){return[Math.floor(e/t),Pe(e,t)]}function Pe(e,t){return(e%t+t)%t}function Fe(e,t){return Math.trunc(e/t)||0}function Ie(e,t){return e%t||0}function Le(e,t=1){return t*(.5+e/5)}function Re(e){return Math.abs(e%1)===.5}const ze={bce:-1,ce:0};function Be(e){let t=e.normalize(`NFD`).toLowerCase().replace(/[^a-z0-9]/g,``);return t===`bc`||t===`b`?`bce`:t===`ad`||t===`a`?`ce`:t}function Ve(e){return e===void 0?`iso8601`:e===0?`gregory`:e.id}const He=/^M(\d{2})(L?)$/;function Ue(e){let t=He.exec(e);return t||_((e=>`Invalid monthCode: ${e}`)(e)),[parseInt(t[1]),!!t[2]]}function We(e,t){return`M`+ke(e)+(t?`L`:``)}function Ge(e,t,n){return e+(t||n&&e>=n?1:0)}const Ke={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},qe=Object.keys(Ke),Je=1e3,Ye=1e6,Xe=1e9,Ze=6e10,Qe=36e11,$e=864e11,C=[1,Je,Ye,Xe,Ze,Qe,$e],et=BigInt(Je),tt=BigInt(Ye),nt=BigInt(Xe),rt=BigInt(Ze),it=BigInt(Qe),w=BigInt($e);function at(e,t){let n=Number(e/w),r=Number(e%w);return $e/t*n+(Math.trunc(r/t)+r%t/t)}const T=qe.slice(0,6),ot=ve(T),st=[`year`],ct=[`day`],lt=[`day`,`month`,`year`],ut=[`offset`],dt=[`timeZone`],ft=[`era`,`eraYear`],pt=[`era`,`eraYear`,`year`],mt=[`month`,`monthCode`],ht=[`day`,`month`,`monthCode`],gt=x(T),_t=x(ft,st),vt=x(mt,st),yt=x(ft,vt),bt=x([`monthCode`],st),xt=x(ft,bt),St=x(ct,[`monthCode`]),Ct=x(ct,vt),wt=x(ct,ft,vt),Tt=x(Ct,T),Et=x(wt,T),Dt=x(Ct,T,ut),Ot=x(wt,T,ut),kt=x(Ct,T,ut,dt),At=x(wt,T,ut,dt),jt=x(ct,bt),Mt=x(ct,ft,bt),Nt=_e(T,0);function Pt(e){return It(e,1),e}const Ft={hour:23,minute:59,second:59};function It(e,t){let n={};for(let r of T)n[r]=de(r,e[r],0,Ft[r]||999,t);return n}function E(e){return Rt(e)*Xe+zt(e)}function Lt(e){return 1e3*Rt(e)+e.millisecond}function Rt(e){return 3600*e.hour+60*e.minute+e.second}function zt(e){return e.millisecond*Ye+e.microsecond*Je+e.nanosecond}function Bt(e){let[t,n]=Ne(e,$e);return[Vt(n),t]}function Vt(e){let[t,n]=Ne(e,Ye),[r,i]=Ne(n,Je);return Ht(t,r,i)}function Ht(e,t=0,n=0){let[r,i]=Ne(e,36e5),[a,o]=Ne(i,6e4),[s,c]=Ne(o,1e3);return{hour:r,minute:a,second:s,millisecond:c,microsecond:t,nanosecond:n}}function Ut(e){let[t,n]=Me(e,nt);return[Number(t),Number(n)]}function Wt(e){return Kt(e)+BigInt(E(e))}function Gt(e){return qt(e)+Lt(e)}function Kt(e){return BigInt(Jt(e))*w}function qt(e){return 864e5*Jt(e)}function Jt(e){return Yt(e.year,e.month,e.day)}function Yt(e,t=1,n=1){let r=t-1;return e+=Math.floor(r/12),t=Pe(r,12),Date.UTC(e%400-400,t,0)/864e5+146097*(Fe(e,400)+1)+n}function Xt(e){let[t,n]=Me(e,w);return{...Zt(Number(t)),...Vt(Number(n))}}function Zt(e){let t=new Date(864e5*Pe(e,146097));return{year:t.getUTCFullYear()+400*Math.floor(e/146097),month:t.getUTCMonth()+1,day:t.getUTCDate()}}function Qt(e){return[e,0]}function $t(e,t){if(!t)return{year:1972,month:e}}function en(e,t,n){return{year:e,month:t,day:n}}function tn(e,t){switch(t){case 2:return rn(e)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function nn(e){return rn(e)?366:365}function rn(e){return e%4==0&&(e%100!=0||e%400==0)}function an(e,t,n){return e+=Fe(n,12),(t+=Ie(n,12))<1?(e--,t+=12):t>12&&(e++,t-=12),{year:e,month:t}}function on(e,t,n,r){return 12*(n-e)+r-t}function sn(e){return Pe(Yt(e.year,e.month,e.day)+4,7)||7}function cn(e){return Yt(e.year,e.month,e.day)-Yt(e.year)+1}function ln(e){let t=e.year,n=Math.floor((cn(e)-sn(e)+10)/7),r=un(t);return n<1?n=r=un(--t):n>r&&(n=1,r=un(++t)),{weekOfYear:n,yearOfWeek:t,Ie:r}}function un(e){let t=sn({year:e,month:1,day:1});return t===4||t===3&&rn(e)?53:52}function dn({year:e}){return e<1?{era:`bce`,eraYear:1-e}:{era:`ce`,eraYear:e}}function fn(e){return pn(e),Pt(e)}function pn(e){return hn(e,1),e}function mn(e){return ye(lt,e,hn(e))}function hn(e,t){let{year:n}=e,r=ue(e,`month`,1,12,t);return{year:n,month:r,day:ue(e,`day`,1,tn(n,r),t)}}function D(e,t){return e?e.ie(t):t}function gn(e,t,n){return e?e.O(t,n):Qt(n)}function _n(e,t){return e===0?dn(t):e?e.h(t):{}}function vn(e,t,n,r){return e?e.je(t,n,r):en(t,n,r)}function yn(e,t){return e?e.k(t):12}function bn(e,t,n){return e?e.p(t,n):tn(t,n)}function xn(e,t){let{year:n,month:r}=D(e,t),[i,a]=gn(e,n,r);return We(i,a)}function Sn(e,t){let{year:n}=D(e,t);return e?e.u(n):rn(n)}function Cn(e,t){let{year:n}=D(e,t);return yn(e,n)}function wn(e,t){let{year:n,month:r}=D(e,t);return bn(e,n,r)}function Tn(e,t){let{year:n}=D(e,t);return e?e.j(n):nn(n)}function En(e,t){if(!e)return cn(t);let{year:n}=D(e,t),r=vn(e,n,1,1);return Jt(t)-Jt(r)+1}function Dn(e,t){return e===void 0?ln(t).weekOfYear:void 0}function On(e,t){return e===void 0?ln(t).yearOfWeek:void 0}const O=qe.map(e=>e+`s`),kn=ve(O),An=x(O),jn=O.slice(0,6),Mn=O.slice(6),Nn=Mn.slice(1),Pn=O.reduce((e,t,n)=>(e[t]=n,e),{}),k=_e(O,0),Fn=_e(jn,0),In=b(be,O);function Ln(e,t){return t??_(m(e)),t}const A=b(Rn,`string`);function Rn(e,t,n=e){return typeof t!==e&&v(p(n,t)),t}function zn(e,t=`number`){return Number.isInteger(e)||_(((e,t)=>`Non-integer ${e}: ${t}`)(t,e)),e||0}function Bn(e){return typeof e==`symbol`&&v(`Cannot convert Symbol to string`),String(e)}function Vn(e,t){return d(e)?String(e):A(e,t)}function Hn(e){return typeof e==`boolean`?BigInt(+!!e):typeof e==`string`?BigInt(e):(typeof e!=`bigint`&&v(`Invalid bigint: ${e}`),e)}function Un(e,t){return zn(o(e,t),t)}function Wn(e,t){return typeof e==`string`?((e,t)=>{let n=Object.create(null);return n[e]=t,n})(t,e):f(e)}const Gn=`smallestUnit`,Kn={constrain:0,reject:1},qn={compatible:0,reject:1,earlier:2,later:3},Jn={reject:0,use:1,prefer:2,ignore:3},Yn={auto:0,never:1,critical:2,always:3},Xn={auto:0,never:1,critical:2},Zn={auto:0,never:1},Qn={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},$n=[Math.floor,e=>Re(e)?Math.floor(e):Math.round(e),Math.ceil,e=>Re(e)?Math.ceil(e):Math.round(e),Math.trunc,e=>Re(e)?Math.trunc(e)||0:Math.round(e),e=>e<0?Math.floor(e):Math.ceil(e),e=>Math.sign(e)*Math.round(Math.abs(e))||0,e=>Re(e)?(e=Math.trunc(e)||0)+e%2:Math.round(e)],er={previous:-1,next:1};function tr(e){let t=e.roundingIncrement;return t===void 0?1:s(t,`roundingIncrement`)}function nr(e){let t=e.fractionalSecondDigits;if(t!==void 0){if(typeof t!=`number`){if(Bn(t)===`auto`)return;_(p(`fractionalSecondDigits`,t))}t=de(`fractionalSecondDigits`,Math.floor(t),0,9,1)}return t}function rr(e,t,n=0,r){let i=t[e];if(i===void 0)return r?n:void 0;if(i=Bn(i),i===`auto`)return r?n:null;let a=Ke[i];return a===void 0&&(a=Pn[i]),a===void 0&&_(h(e,i,Ke)),a}function ir(e,t,n,r=0){let i=n[e];if(i===void 0)return r;let a=Bn(i),o=t[a];return o===void 0&&_(h(e,a,t)),o}const ar=b(rr,Gn),or=b(rr,`largestUnit`),sr=b(rr,`unit`),cr=b(ir,`overflow`,Kn),lr=b(ir,`disambiguation`,qn),ur=b(ir,`offset`,Jn),dr=b(ir,`calendarName`,Yn),fr=b(ir,`timeZoneName`,Xn),pr=b(ir,`offset`,Zn),mr=b(ir,`roundingMode`,Qn),hr=b(ir,`direction`,er);function gr(e,t,n,r){let i=r?$e:C[t+1];if(i){let n=C[t];i%((e=de(`roundingIncrement`,e,1,i/n-+!r,1))*n)&&_(p(`roundingIncrement`,e))}else e=de(`roundingIncrement`,e,1,n?10**9:1,1);return e}function _r(e,t,n,r){return t!=null&&de(e,t,n,r,1,qe),t}function vr(e,t){t>e&&_(`smallestUnit > largestUnit`)}function yr(e,t,n,r=9,i=0,o=4){t=a(t);let s=or(t,i),c=tr(t),l=mr(t,o),u=ar(t,i,1);return s=_r(`largestUnit`,s,i,r),u=_r(Gn,u,i,r),s==null?s=Math.max(n,u):vr(s,u),c=gr(c,u,1),e&&(l=(e=>e<4?(e+2)%4:e)(l)),[s,u,c,l]}function br(e,t=6,n){let r=tr(e=Wn(e,Gn)),i=mr(e,7),a=ar(e);return a=Ln(Gn,a),a=_r(Gn,a,0,t),r=gr(r,a,void 0,n),[a,r,i]}function j(e,t){return y(lt,e,y(T,t))}function M(e){return e===void 0?0:cr(f(e))}function xr(e,t=0){e=a(e);let n=lr(e),r=ur(e,t);return[cr(e),r,n]}const Sr=BigInt(1e8)*w,Cr=BigInt(-1e8)*w,wr=Cr-w,Tr=-3261848;function Er(e){let t=12*e.year+e.month;return(t<Tr||t>3309129)&&_(`Out-of-bounds date`),e}function N(e,t=1){return Or(Kt(e),t),e}function Dr(e){let t=Kt(e);return Or(t),t!==wr||E(e)||_(`Out-of-bounds date`),e}function Or(e,t=1){(e<(t?wr:Cr)||e>Sr)&&_(`Out-of-bounds date`)}function kr(e){return(e<Cr||e>Sr)&&_(`Out-of-bounds date`),e}function Ar(e,t){return kr(Kt(e)+BigInt(E(e)-t))}function jr(e){return{epochNanoseconds:e}}function Mr(e,t,n){return{calendar:n,timeZone:t,epochNanoseconds:e}}function Nr(e,t){return y(T,e,P(e,t))}function P(e,t){return y(lt,e,{calendar:t})}function Pr(e){return y(T,e)}function F(e){return y(O,e,{sign:na(e)})}function Fr(e){return t=e.epochNanoseconds,Number(je(t,tt));var t}function Ir(e){return e.epochNanoseconds}function Lr(e,t,n){let r=da(t),[i,a]=((e,t)=>{let n=t((e=Wn(e,`unit`)).relativeTo),r=sr(e);return r=Ln(`unit`,r),[r,n]})(n,e);if(!a&&Ji(Math.max(i,r),a))return zr(t,i);if(a||_(`Missing relativeTo`),!t.sign&&Ji(i,a))return 0;let o=Hi(a),s=o.G(o.i,t);Gi(o,s);let c=o.re(o.i,s,i);return Ji(i,a)?zr(c,i):Rr(c,o.V(s),i,o)}function Rr(e,t,n,r){let i=na(e)||1,a=Br(In(n,e),n,i,r,t),o=a.ae,s=a.de,c=Number(s-o),l=Number(t-o);return a.ye[O[n]]+l/c*i}function zr(e,t){return at(aa(e),C[t])}function Br(e,t,n,r,i){let a=O[t],o=e,s=0,c=Vr(o,a,n,r);return i&&!((e,t,n,r)=>r>0?S(t,e)<=0&&S(e,n)<=0:S(n,e)<=0&&S(e,t)<=0)(i,c.ae,c.de,Math.sign(n))&&(o={...e,[a]:e[a]+n},s=1,c=Vr(o,a,n,r)),{...c,ye:o,He:s}}function Vr(e,t,n,r){let i={...e,[t]:e[t]+n};return{ae:Ui(r,e),de:Ui(r,i),Ae:i}}function Hr(e,t,n){let r=n-t,i=e-t;if(!i)return 0;let a=i<0n?-i:i,o=r<0n?-r:r,s=S(i,0n)===S(r,0n)?1:-1;return S(a,o)<=0?a===o?s:Le(S(2n*a,o),s):Number(i)/Number(r)}function Ur(e,t,n,r){let{epochNanoseconds:i}=e,{timeZone:a,calendar:o}=e;if(t===0&&n===1)return{epochNanoseconds:i,timeZone:a,calendar:o};if(t===6){let t=j(I(e),Nt),n=j(yi(t,1),Nt),o=di(a,t),s=di(a,n);i=ri(Hr(i,o,s),r)?s:o}else{let o=I(e),s=o.offsetNanoseconds;i=li(a,Kr(o,Yr(t,n),r),s,2,0,1)}return{epochNanoseconds:i,timeZone:a,calendar:o}}function Wr(e){let{timeZone:t}=e,n=j(I(e),Nt),r=j(yi(n,1),Nt),i=di(t,n);return at(di(t,r)-i,Qe)}function Gr(e){let{timeZone:t,calendar:n}=e;return Mr(di(t,j(I(e),Nt)),t,n)}function Kr(e,t,n){let[r,i]=qr(e,t,n),a=j(yi(e,i),r);return Dr(a),a}function qr(e,t,n){return Bt(ni(E(e),t,n))}function Jr(e){return ni(e,Ze,7)}function Yr(e,t){return C[e]*t}function Xr(e,t){return BigInt(C[e])*BigInt(t)}function Zr(e,t,n){let r=Math.min(da(e),6);return ca($r(aa(e),BigInt(t),n),r)}function Qr(e,t,n,r,i,a,o){if(r===0&&i===1)return e;let s=na(e)||1,[c,l,u]=(Ji(r,o.i)?Wi(o.i)&&r<6&&n>=6?ai:ii:oi)(s,e,t,n,r,i,a,o);return u&&r!==7&&(c=((e,t,n,r,i,a)=>{for(let o=r+1;o<=n;o++){if(o===7&&n!==7)continue;let r=In(o,e);r[O[o]]+=i;let s=S(t,Ui(a,r));if(s&&s!==i)break;e=r}return e})(c,l,n,Math.max(6,r),s,o)),c}function $r(e,t,n){return ti(e,t,n,e/t%2n)}function ei(e,t,n){let[r,i]=Me(e,w),a=r*w;return a+ti(i,t,n,(a/t+i/t)%2n)}function ti(e,t,n,r){let i=e/t,a=e%t,o=0;a&&(o=Le(S(2n*(a<0n?-a:a),t),Math.sign(Number(a))));let s=ri(Number(r)+o,n);return(i-r+BigInt(s))*t}function ni(e,t,n){return ri(e/t,n)*t}function ri(e,t){return $n[t](e)}function ii(e,t,n,r,i,a,o){let s=aa(t),c=$r(s,Xr(i,a),o),l=c-s,u=Math.sign(Number(c/w)-Number(s/w))===e,d=ca(c,Math.min(r,6));return[{...t,...d},n+l,u]}function ai(e,t,n,r,i,a,o,s){let c=Number(oa(t)),l=Yr(i,a),u=ni(c,l,o),d=Br({...t,...Fn},6,e,s,n),f=d.ae,p=d.de,m=u-Number(p-f),ee=0;m&&Math.sign(m)!==e?n=f+BigInt(u):(ee+=e,u=ni(m,l,o),n=p+BigInt(u));let h=la(u);return[{...t,...h,days:t.days+ee},n,!!ee]}function oi(e,t,n,r,i,a,o,s){let c=O[i],l=In(i,t);i===7&&(t={...t,weeks:t.weeks+Math.trunc(t.days/7)}),l[c]=Fe(t[c],a)*a;let u=Br(l,i,a*e,s,n),d=u.ae,f=u.de,p=Hr(n,d,f),m=u.ye[c],ee=u.Ae[c],h=ni(m+p*e*a,a,o),te=h===ee;return l[c]=h,[l,te?f:d,u.He||te]}function si(e,t){return e.timeZone.U(e.epochNanoseconds,(e=>{let t=hr(Wn(e,`direction`),0);return t||_(p(`direction`,t)),t})(t))}const I=fe(ci,WeakMap);function ci(e){let{epochNanoseconds:t,timeZone:n}=e,r=n.C(t);return{...Xt(t+BigInt(r)),offsetNanoseconds:r}}function li(e,t,n,r=0,i=0,a,o){if(n!==void 0&&r===1&&(r===1||o))return Ar(t,n);r!==2&&r!==0||N(t,0);let s=e.R(t);if(n!==void 0&&r!==3){let e=((e,t,n,r)=>{let i=Wt(t);r&&(n=Jr(n));for(let t of e){let e=Number(i-t);if(r&&(e=Jr(e)),e===n)return t}})(s,t,n,a);if(e!==void 0)return e;r===0&&_(`Invalid TimeZone offset`)}return o?Wt(t):ui(e,t,i,s)}function ui(e,t,n=0,r=e.R(t)){if(r.length===1)return r[0];if(n===1&&_(`Ambiguous offset`),r.length)return r[+(n===3)];let i=Wt(t),a=((e,t)=>{let n=e.C(t-w);return(e=>(e>864e11&&_(`Out-of-bounds TimeZone gap`),e))(e.C(t+w)-n)})(e,i),o=Xt(i+BigInt(a*(n===2?-1:1)));return(r=e.R(o))[n===2?0:r.length-1]}function di(e,t){let n=e.R(t);if(n.length)return n[0];let r=Wt(t)-w;return e.U(r,1)}function fi(e,t,n,r,i){let a=M(i);return r.sign&&da(r)<8&&_(`Cannot use small units`),_i(t,bi(t,N(_i(t,n)),e?L(r):r,a))}function pi(e,t){return kr(e+(ua(n=t)&&_(`Cannot use large units`),oa(n)));var n}function mi(e,t,n){let{calendar:r,epochNanoseconds:i,timeZone:a}=e,o=oa(t),s=i;if(ua(t)){let i=I(e);s=ui(a,j(gi(r,i,{...t,...Fn},n),i))+o}else s+=o,M(n);return{...e,epochNanoseconds:kr(s)}}function hi(e,t,n,r){let[i,a]=vi(t,n),o=j(gi(e,t,{...n,...Fn,days:n.days+a},r),i);return Dr(o),o}function gi(e,t,n,r){if(n.years||n.months||n.weeks)return bi(e,t,n,M(r));M(r);let i=n.days+Number(oa(n)/w);return i?N(yi(t,i)):t}function _i(e,t){return yi(t,1-D(e,t).day)}function vi(e,t){let n=oa(t),r=Number(n/w),i=Number(n%w),[a,o]=Bt(E(e)+i);return[a,r+o]}function yi(e,t){return t?Zt(Jt(e)+t):e}function bi(e,t,n,r){let{years:i,months:a,weeks:o,days:s}=n,c;if(s+=Number(oa(n)/w),i||a)c=xi(e,t,i,a,r);else{if(!o&&!s)return t;c=t}return(o||s)&&(c=yi(c,7*o+s)),N(c)}function xi(e,t,n,r,i){let{year:a,month:o,day:s}=D(e,t);if(n){let[t,r]=gn(e,a,o);a+=n,o=Si(e,t,r,e?e.q(a):void 0,i),o=de(`month`,o,1,yn(e,a),i)}if(r){let t=e?e.N(a,o,r):an(a,o,r);({year:a,month:o}=t)}return s=de(`day`,s,1,bn(e,a,o),i),vn(e,a,o,s)}function Si(e,t,n,r,i){if(n){let n=e?e.m:void 0;return r!==void 0&&(n<0||r===t+1)?r:(i===1&&_(ne),n<0?-n:t)}return Ge(t,0,r)}function Ci(e,t){return Ve(e)!==Ve(t)&&_(`Mismatching Calendars`),e}function wi(e,t){return e.o!==t.o&&_(`Mismatching TimeZones`),e}function Ti(e){return e.timeZone.id}function Ei(e,t,n,r){let[i,a,o,s]=yr(e,r,3,5),c=zi(t.epochNanoseconds,n.epochNanoseconds,i,a,o,s);return F(e?L(c):c)}function Di(e,t,n,r,i){let[a,o,s,c]=yr(e,i,5),l=n.epochNanoseconds,u=r.epochNanoseconds,d;return S(u,l)?a<6?d=zi(l,u,a,o,s,c):(d=Ni(wi(n.timeZone,r.timeZone),t,n,r,a),d=Qr(d,u,a,o,s,c,Vi(n,Ir,mi))):d=k,F(e?L(d):d)}function Oi(e,t,n,r,i){let[a,o,s,c]=yr(e,i,6),l=Wt(n),u=Wt(r),d=S(u,l),f;return d?a<=6?f=zi(l,u,a,o,s,c):(f=Fi(t,n,r,d,a),f=Qr(f,u,a,o,s,c,Vi(n,Wt,b(hi,t)))):f=k,F(e?L(f):f)}function ki(e,t,n,r,i){let[a,o,s,c]=yr(e,i,6,9,6);return ji(e,t,n,r,a,o,s,c)}function Ai(e,t,n,r,i){let[a,o,s,c]=yr(e,i,9,9,8),l=_i(t,n),u=_i(t,r);return Li(l,u)?ji(e,t,N(l),N(u),a,o,s,c,8):F(k)}function ji(e,t,n,r,i,a,o,s,c=6){let l=Kt(n),u=Kt(r),d;return S(u,l)?i===6?d=zi(l,u,i,a,o,s):(d=Ii(t,n,r,i),a===c&&o===1||(d=Qr(d,u,i,a,o,s,Vi(n,Kt,b(gi,t))))):d=k,F(e?L(d):d)}function Mi(e,t,n,r){let[i,a,o,s]=yr(e,r,5,5),c=ni(E(n)-E(t),Yr(a,o),s),l={...k,...la(c,i)};return F(e?L(l):l)}function Ni(e,t,n,r,i){let a=S(r.epochNanoseconds,n.epochNanoseconds);if(!a)return k;if(i<6)return{...k,...ca(r.epochNanoseconds-n.epochNanoseconds,i)};if(!Li(I(n),I(r)))return{...k,...ca(r.epochNanoseconds-n.epochNanoseconds,5)};let[o,s,c]=Ri(e,n,r,a);return{...i===6?{...k,days:Bi(o,s)}:Ii(t,o,s,i),...la(c)}}function Pi(e,t,n,r){let i=Wt(t),a=Wt(n),o=S(a,i);return o?r<=6?{...k,...ca(a-i,r)}:Fi(e,t,n,o,r):k}function Fi(e,t,n,r,i){let a=n,o=E(n)-E(t);return Math.sign(o)===-r&&(a=yi(n,-r),o+=864e11*r),{...Ii(e,t,a,i),...la(o)}}function Ii(e,t,n,r){if(r<=7){let e=Bi(t,n);return r===7?{...k,weeks:Fe(e,7),days:Ie(e,7)}:{...k,days:e}}let i=D(e,t),a=D(e,n);if(r===8){let{year:r,month:o,day:s}=i,{year:c,month:l,day:u}=a,d=Math.sign(Ae(c,r)||Ae(l,o)||Bi(t,n)),f=0,p=0;if(d){f=e?e.ne(r,o,c,l):on(r,o,c,l);let i=xi(e,t,0,f,0);d*Ae(s,u)>0&&(f-=d,i=xi(e,t,0,f,0)),p=Bi(i,n)}return{...k,months:f,days:p}}let{year:o,month:s,day:c}=i,{year:l,month:u,day:d}=a,f=l-o,p=u-s,m=d-c;if(f||p){let t=Math.sign(f||p),n=bn(e,l,u),r=0;if(Math.sign(d-c)===-t){let i=n,a=e?e.N(l,u,-t):an(l,u,-t);({year:l,month:u}=a),f=l-o,p=u-s,n=bn(e,l,u),r=t<0?-i:n}if(m=d-Math.min(c,n)+r,f){let[n,r]=gn(e,o,s),[i,a]=gn(e,l,u),c=e?e.m:void 0;if(p=c!==void 0&&r&&!a&&(c<0?t>0&&i===-c:t<0&&i===n)?0:i-n||Number(a)-Number(r),Math.sign(p)===-t){let i=t<0&&-yn(e,l);l-=t,f=l-o,p=u-Si(e,n,r,e?e.q(l):void 0,0)+(i||yn(e,l))}else if(e){let t=Si(e,n,r,e.q(l),0);p=e.ne(l,t,l,u)}}}return{...k,years:f,months:p,days:m}}function Li(e,t){return Ae(e.year,t.year)||Ae(e.month,t.month)||Ae(e.day,t.day)}function Ri(e,t,n,r){let i=I(t),a=I(n),o=n.epochNanoseconds,s=0,c=E(a)-E(i);Math.sign(c)===-r&&s++;let l=s+ +(r>0);for(;s<=l;s++){let t=yi(a,s*-r),n=ui(e,j(t,i));if(S(o,n)!==-r)return[i,t,Number(o-n)]}}function zi(e,t,n,r,i,a){return{...k,...ca($r(t-e,Xr(r,i),a),n)}}function Bi(e,t){return Jt(t)-Jt(e)}function Vi(e,t,n){return{i:e,V:t,G:n}}function Hi(e){let{calendar:t}=e;if(Wi(e)){let{timeZone:n}=e;return{i:e,V:Ir,G:mi,re:b(Ni,n,t)}}return{i:Ki(e),V:Wt,G:b(hi,t),re:b(Pi,t)}}function Ui(e,t){return e.V(e.G(e.i,t))}function Wi(e){return`timeZone`in e}function Gi(e,t){Wi(e.i)||(qi(e.i),qi(t))}function Ki(e){return j(e,`hour`in e?e:Nt)}function qi(e){Dr(Ki(e))}function Ji(e,t){return e<=6-(t&&Wi(t)?1:0)}function Yi(e,t,n){let r={};for(let i=t;i>=0;i--){let t=C[i];r[n[i]]=Fe(e,t),e=Ie(e,t)}return r}const Xi=2**53;function Zi(e,t,n,r,i){let o=e(a(i).relativeTo),s=Math.max(da(n),da(r));if(Ji(s,o))return Qi(t,n,r,s);o||_(`Missing relativeTo`),t&&(r=L(r));let c=Hi(o),l=c.G(c.i,n),u=c.G(l,r);return F(c.re(c.i,u,s))}function Qi(e,t,n,r){return F(ra(((e,t,n,r)=>{let i=aa(e)+aa(t)*BigInt(r?-1:1);return Number.isFinite(Number(i/w))||_(`Out-of-bounds date`),{...k,...ca(i,n)}})(t,n,r,e)))}function $i(e,t,n){let r=da(t),[i,a,o,s,c]=((e,t,n)=>{e=Wn(e,Gn);let r=or(e),i=n(e.relativeTo),a=tr(e),o=mr(e,7),s=ar(e);return r===void 0&&s===void 0&&_(`Required smallestUnit or largestUnit`),s??=0,r??=Math.max(s,t),vr(r,s),a=gr(a,s,1),a>1&&s>5&&r!==s&&_(`For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit`),[r,s,a,o,i]})(n,r,e);if(!c&&Math.max(r,i)<=6)return F(ra(((e,t,n,r,i)=>{let a=$r(aa(e),Xr(n,r),i);return{...k,...ca(a,t)}})(t,i,a,o,s)));let l=c&&Wi(c)&&i>=6&&a<6;if(!t.sign&&!l)return t;c||_(`Missing relativeTo`);let u=Hi(c),d=u.G(u.i,t);Gi(u,d);let f=u.re(u.i,d,i);return f=Qr(f,u.V(d),i,a,o,s,u),F(f)}function ea(e){return e.sign===-1?ta(e):e}function ta(e){return F(L(e))}function L(e){let t={};for(let n of O)t[n]=-1*e[n]||0;return t}function na(e,t=O){let n=0;for(let r of t){let t=Math.sign(e[r]);t&&(n&&n!==t&&_(`Cannot mix duration signs`),n=t)}return n}function ra(e){for(let t of Nn)de(t,e[t],-4294967295,4294967295,1);let t=aa(e);return ia(Number(t/nt)),e}function ia(e){Number.isSafeInteger(e)||_(`Out-of-bounds duration`)}function aa(e){return BigInt(e.days)*w+oa(e)}function oa(e){return BigInt(e.hours)*it+BigInt(e.minutes)*rt+sa(e)}function sa(e){return BigInt(e.seconds)*nt+BigInt(e.milliseconds)*tt+BigInt(e.microseconds)*et+BigInt(e.nanoseconds)}function ca(e,t=6){let n=Number(e/w),r=Number(e%w),i=C[t],a=t<=3?Number(e/BigInt(i)):$e/i*n+Fe(r,i);Number.isFinite(a)||_(`Out-of-bounds date`),t<=3&&Math.abs(a)/(Xe/C[t])>=Xi&&_(`Out-of-bounds date`);let o=Yi(r,t,O);return o[O[t]]=a,o}function la(e,t=5){return Yi(e,t,O)}function ua(e){return!!na(e,Mn)}function da(e){let t=9;for(;t>0&&!e[O[t]];t--);return t}function fa(e,t){return S(e.epochNanoseconds,t.epochNanoseconds)}function pa(e,t){return S(e.epochNanoseconds,t.epochNanoseconds)}function ma(e,t,n,r){let i=e(a(r).relativeTo),o=Math.max(da(t),da(n));if(ye(O,t,n))return 0;if(Ji(o,i))return S(aa(t),aa(n));i||_(`Missing relativeTo`);let s=Hi(i);return S(Ui(s,t),Ui(s,n))}function ha(e,t){return ga(e,t)||_a(e,t)}function ga(e,t){return Ae(Jt(e),Jt(t))}function _a(e,t){return Ae(E(e),E(t))}function va(e,t){return!fa(e,t)}function ya(e,t){return!pa(e,t)&&e.timeZone.o===t.timeZone.o&&e.calendar===t.calendar}function ba(e,t){return!ha(e,t)&&e.calendar===t.calendar}function xa(e,t){return!ga(e,t)&&e.calendar===t.calendar}function Sa(e,t){return!ga(e,t)&&e.calendar===t.calendar}function Ca(e,t){return!ga(e,t)&&e.calendar===t.calendar}function wa(e,t){return!_a(e,t)}function Ta(e){return e===0?ze:e?e.l:void 0}function R(e,t,n=t){return Ta(e)?n:t}function Ea(e,t){let n=e||void 0,r=Ta(e),{era:i,eraYear:a,year:o}=t;if(o!==void 0&&(o=s(o,`year`)),a!==void 0&&(a=s(a,`eraYear`)),i!==void 0||a!==void 0){i!==void 0&&a!==void 0||v(`Mismatching era/eraYear`),r||_(`Forbidden era/eraYear`);let e=Be(i),t=r[e];t===void 0&&_((e=>`Invalid era: ${e}`)(i));let s=n?.te?n.te(a,e,t):ka(a,t);o!==void 0&&o!==s&&_(`Mismatching year/eraYear`),o=s}else o===void 0&&v(te(r));return o}function Da(e,t,n,r,i){let{month:a,monthCode:o}=t;if(o!==void 0){let t=((e,t,n,r,i=Ue(t))=>{let a=e?e.q(n):void 0,[o,s]=i,c=Ge(o,s,a);if(s){let t=e?e.m:void 0;t===void 0&&_(ne),t>0?(c>t&&_(ne),a!==c&&(r===1&&_(ne),c=Ge(o,0,a))):(c!==-t&&_(ne),a===void 0&&r===1&&_(ne))}return c})(e,o,n,r,i);a!==void 0&&a!==t&&_(`Mismatching month/monthCode`),a=t,r=1}else a===void 0&&v(`Missing month/monthCode`);return de(`month`,a,1,yn(e,n),r)}function Oa(e,t,n,r,i){return ue(t,`day`,1,bn(e,r,n),i)}function ka(e,t){return(t+e)*(Math.sign(t)||1)||0}function Aa(e,t){return It(y(T,{...Nt,...e}),t)}const ja=we(`([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?`);function Ma(e){let t=Na(e);return t===void 0&&_(oe(e)),t}function Na(e,t){let n=ja.exec(e);if(n&&(e=>(e=>{e[0]!==`T`&&e[0]!==`t`||(e=e.slice(1));let t=e.search(/[.,]/),n=t<0?e:e.slice(0,t),r=n.split(`:`);return r.length===1?/^(?:\d{2}|\d{4}|\d{6})$/i.test(n):(r.length===2||r.length===3)&&r.every(e=>e.length===2&&/^\d{2}$/i.test(e))})(e.slice(1)))(n[0]))return((e,t)=>{let n=e[4]||e[5];return t&&n&&_(se(n)),r=(De(e[2])*Qe+De(e[3])*Ze+De(e[4])*Xe+Te(e[5]||``))*Ee(e[1]),Math.abs(r)>=864e11&&_(`Out-of-bounds offset`),r;var r})(n,t)}const z={era:Vn,month:c,monthCode(e,t=`monthCode`){return((e,t)=>{if(typeof e==`string`)return e;if(e&&typeof e==`object`){let n=e.toString;if(typeof n==`function`)return A(n.call(e),t)}return A(e,t)})(e,t)},day:c},Pa=_e(T,s),Fa=_e(O,Un),Ia={offset(e){return Ma(Vn(e))}},La=Object.assign({},z,Pa),Ra=Object.assign({},La,Ia);function B(e,t,n,r,i=!r){let a={},o=0;for(let i of t){let t=e[i];if(t!==void 0){o=1;let e=n[i];e&&(t=e(t,i)),a[i]=t}else r&&r.includes(i)&&v(m(i))}return i&&!o&&v(ee(t)),a}function za(e,t=Nt,n){let r=j(e,t);return Dr(r),Nr(r,n)}function Ba(e,t,n){return Ha(e,t,Wa(e,t),M(n))}function Va(e,t,n){let r=Wa(e,t),i=n();return[Ha(e,t,r,i[0]),...i]}function Ha(e,t,n,r){let i=n[1],a=Da(e,t,i,r,n[0]);return P(N(vn(e,i,a,Oa(e,t,a,i,r))),e)}function Ua(e){if(e.monthCode!==void 0)return Ue(e.monthCode)}function Wa(e,t){let n=Ta(e);return t.year!==void 0||t.era!==void 0&&t.eraYear!==void 0||v(te(n)),t.monthCode===void 0&&t.month===void 0&&v(`Missing month/monthCode`),t.day===void 0&&v(m(`day`)),[Ua(t),Ea(e,t)]}function Ga(e,t,n){let r=Ta(e);t.year!==void 0||t.era!==void 0&&t.eraYear!==void 0||v(te(r)),t.monthCode===void 0&&t.month===void 0&&v(`Missing month/monthCode`);let i=Ua(t),a=Ea(e,t);return P(Er(vn(e,a,Da(e,t,a,M(n),i),1)),e)}function Ka(e,t,n){let r=e===void 0,i=Ta(e);t.day===void 0&&v(m(`day`)),r||t.month===void 0||t.year!==void 0||t.era!==void 0&&t.eraYear!==void 0||v(te(i));let a=Ua(t),o=t.eraYear!==void 0||t.year!==void 0?Ea(e,t):void 0,s=M(n),c,l,u;if(o===void 0&&r&&(o=1972),o!==void 0){r||N(vn(e,o,1,1));let n=Da(e,t,o,s,a);c=Oa(e,t,n,o,s),[l,u]=gn(e,o,n)}else{t.monthCode===void 0&&v(`Missing month/monthCode`),[l,u]=a;let n=e?e.ge:1972;if(n!==void 0)c=Oa(e,t,Da(e,t,n,s,a),n,s);else{let n=s===0&&e?e.ke?.(l,u,t.day):void 0;c=n===void 0?t.day:n}}u&&((e&&e.Z?.[l])??1/0)<t.day&&(s===1&&_(ne),u=0,c=le(t.day,1,(e&&e.X)??1/0));let d=e?e.v(l,!!u,c):$t(l,!!u);for(;!d&&s===0&&c>1;)c--,d=e?e.v(l,!!u,c):$t(l,!!u);d||_(`Cannot guess year`);let{year:f,month:p}=d;return P(N(vn(e,f,p,c)),e)}const V=Intl.DateTimeFormat;function qa(e,t){t<-864e13&&_(`Out-of-bounds date`);let n=e.formatToParts(t),r={};for(let e of n)r[e.type]=e.value;return r}const Ja={El_Aaiun:17,Tucuman:12,Tirane:11,Riga:10,Simferopol:9,Vienna:9,Tunis:8,Boa_Vista:6,Fortaleza:6,Maceio:6,Noronha:6,Recife:6,Gaza:6,Hebron:6,DeNoronha:6},Ya=-388152e4;function Xa(e,t=4){let n=nr(e);return[mr(e,4),...$a(_r(Gn,ar(e),0,t),n)]}function Za(e){return dr(a(e))}function Qa(e,t){return Xa(a(e),t)}function $a(e,t){return e==null?[t===void 0?1:10**(9-t),t]:[C[e],e<4?9-3*e:-1]}function eo(e,t,n){let[r,i,o,s]=(e=>{let t=nr(e=a(e)),n=mr(e,4),r=ar(e);return[e.timeZone,n,...$a(_r(Gn,r,0,4),t)]})(n),c=r!==void 0;return((e,t,n,r,i,a)=>{n=ei(n,BigInt(i),r);let o=t.C(n);return po(Xt(n+BigInt(o)),a)+(e?vo(Jr(o)):`Z`)})(c,H(c?e(r):`UTC`),t.epochNanoseconds,i,o,s)}function to(e,t){let n=(e=>{e=a(e);let t=dr(e),n=nr(e),r=pr(e),i=mr(e,4),o=ar(e);return[t,fr(e),r,i,...$a(_r(Gn,o,0,4),n)]})(t);return((e,t,n,r,i,a,o,s,c,l)=>{r=ei(r,BigInt(c),s);let u=n.C(r);return po(Xt(r+BigInt(u)),l)+vo(Jr(u),o)+yo(t,a)+bo(e,i)})(e.calendar,e.timeZone.id,e.timeZone,e.epochNanoseconds,...n)}function no(e,t){let n=(e=>(e=a(e),[dr(e),...Xa(e)]))(t);return((e,t,n,r,i,a)=>po(Kr(t,i,r),a)+bo(e,n))(e.calendar,e,...n)}function ro(e,t){return n=e.calendar,r=e,i=Za(t),mo(r)+bo(n,i);var n,r,i}function io(e,t){return oo(e.calendar,ho,e,Za(t))}function ao(e,t){return oo(e.calendar,go,e,Za(t))}function oo(e,t,n,r){return r===1?e===void 0?t(n):mo(n):r>1||r===0&&e!==void 0?mo(n)+xo(Ve(e),r===2):t(n)}function so(e,t){return((e,t,n,r)=>_o(qr(e,n,t)[0],r))(e,...Qa(t))}function co(e,t){let[n,r,i]=Qa(t,3);return r>1&&ra(e={...e,...Zr(e,r,n)}),lo(e,i)}function lo(e,t){let{sign:n}=e,r=n===-1?L(e):e,{hours:i,minutes:a}=r,o=sa(r),s=Number(o/nt),c=Number(o%nt);ia(s);let l=Co(c,t),u=t>=0||!n||l;return(n<0?`-`:``)+`P`+uo({Y:fo(r.years),M:fo(r.months),W:fo(r.weeks),D:fo(r.days)})+(i||a||s||u?`T`+uo({H:fo(i),M:fo(a),S:fo(s,u)+l}):``)}function uo(e){let t=[];for(let n in e){let r=e[n];r&&t.push(r,n)}return t.join(``)}function fo(e,t){if(!e&&!t)return``;let n=Object.create(null);return n.useGrouping=0,e.toLocaleString(`fullwide`,n)}function po(e,t){return mo(e)+`T`+_o(e,t)}function mo(e){return ho(e)+`-`+ke(e.day)}function ho(e){let{year:t}=e;return(t<0||t>9999?wo(t)+Oe(6,Math.abs(t)):Oe(4,t))+`-`+ke(e.month)}function go(e){return ke(e.month)+`-`+ke(e.day)}function _o(e,t){let n=[ke(e.hour),ke(e.minute)];return t!==-1&&n.push(ke(e.second)+((e,t,n,r)=>Co(e*Ye+t*Je+n,r))(e.millisecond,e.microsecond,e.nanosecond,t)),n.join(`:`)}function vo(e,t=0){if(t===1)return``;let[n,r]=Ne(Math.abs(e),Qe),[i,a]=Ne(r,Ze),[o,s]=Ne(a,Xe);return wo(e)+ke(n)+`:`+ke(i)+(o||s?`:`+ke(o)+Co(s):``)}function yo(e,t){return t===1?``:`[`+(t===2?`!`:``)+e+`]`}function bo(e,t){return t>1||t===0&&e!==void 0?xo(Ve(e),t===2):``}function xo(e,t){return`[`+(t?`!`:``)+`u-ca=`+e+`]`}const So=/0+$/;function Co(e,t){let n=Oe(9,e);return n=t===void 0?n.replace(So,``):n.slice(0,t),n?`.`+n:``}function wo(e){return e<0?`-`:`+`}const To=/^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/,Eo=/[^\w\/:+-]+/;function Do(e){return Oo(A(e))}function Oo(e){return ko(e).id}function ko(e){let t=e.toUpperCase(),n=(e=>{let t=Na(e,1);if(t!==void 0)return{id:vo(t),_:t,o:t}})(t);return n?{kind:`fixed`,...n}:Ao(t===`UTC`?`UTC`:(e=>(Eo.test(e)&&_(ae(e)),To.test(e)&&_(`Forbidden ICU TimeZone`),e.toLowerCase().split(`/`).map((e,t)=>(e.length<=3||/\d/.test(e))&&!/etc|yap/.test(e)?e.toUpperCase():e.replace(/baja|dumont|[a-z]+/g,(e,n)=>e.length<=2&&!t||e===`in`||e===`chat`?e.toUpperCase():e.length>2||!n?Ce(e).replace(/island|noronha|murdo|rivadavia|urville/,Ce):e)).join(`/`)))(e))}const Ao=fe(e=>{if(e===`UTC`)return{kind:`utc`,id:e,o:e};let t=jo(e.toUpperCase());return{kind:`named`,id:e,format:t,o:t.resolvedOptions().timeZone}}),jo=fe(e=>new V(`en-u-hc-h23`,{calendar:`iso8601`,timeZone:e,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}));function H(e){let t=ko(e);return Mo(t.id,t)}const Mo=fe((e,t)=>t.kind===`named`?new Po(e,t.o,t.format):new No(e,t.o,t.kind===`fixed`?t._:0));var No=class{constructor(e,t,n){this.id=e,this.o=t,this._=n}C(){return this._}R(e){return[Ar(e,this._)]}U(){}},Po=class{constructor(e,t,n){this.id=e,this.o=t,this.qe=((e,t)=>{let n=fe(e),r=fe(Io),i=86400*t;function a(e){let[t,a]=Lo(e,i),s=Ro(t),c=Ro(a),l=n(s),u=n(c);return l===u?l:o(r(s,c),l,u,e)}function o(t,n,r,i){let a,o;for(;(i===void 0||(a=i<t[0]?n:i>=t[1]?r:void 0)===void 0)&&(o=t[1]-t[0]);){let n=t[0]+Math.floor(o/2);e(n)===r?t[1]=n:t[0]=n+1}return a}return{Ee(e){let t=a(e-86400),n=a(e+86400),r=e-t,i=e-n;if(t===n)return[r];let o=a(r);return o===a(i)?[e-o]:t>n?[r,i]:[]},De:a,U:function e(t,a){if(a>0&&t>=864e10)return;if(a<0){if(t<=Ya)return;let n=Fo()+94867200;if(t>n)return e(n,-1)}let[s,c]=Lo(a>0?Math.max(t,Ya):t,i),l=i*a,u=a>0?Math.max(t,Fo())+94867200:Ya,d=()=>a<0?c>u:s<u;for(;d();){let e=Ro(s),i=Ro(c),u=n(e),d=n(i);if(u!==d){let n=r(e,i);o(n,u,d);let s=n[0];if((Ae(s,t)||1)===a)return s}s+=l,c+=l}}}})((e=>t=>{let n=qa(e,1e3*t);return 86400*Yt((e=>{let t=e.relatedYear;if(t!==void 0)return parseInt(t);let n=parseInt(e.year);return e.era!==void 0&&Be(e.era)===`bce`?1-n:n})(n),parseInt(n.month),parseInt(n.day))+3600*parseInt(n.hour)+60*parseInt(n.minute)+parseInt(n.second)-t})(n),(e=>Ja[e.split(`/`).pop()]||60)(e))}C(e){return this.qe.De((e=>Ut(e)[0])(e))*Xe}R(e){let t=86400*Jt(e)+Rt(e),n=zt(e);return this.qe.Ee(t).map(e=>kr(BigInt(e)*nt+BigInt(n)))}U(e,t){let[n,r]=Ut(e),i=this.qe.U(n+(t>0||r?1:0),t);if(i!==void 0)return BigInt(i)*nt}};function Fo(){return Math.floor(Date.now()/1e3)}function Io(e,t){return[e,t]}function Lo(e,t){let n=Math.floor(e/t)*t;return[n,n+t]}function Ro(e){return le(e,-1e10,864e10)}function zo(e,t,n){let r=B(n,R(t,kt,At),Ra,[],0);if(r.timeZone!==void 0){let n=Ba(t,r),i=Aa(r),a=H(e(r.timeZone));return{epochNanoseconds:li(a,j(n,i),r.offset),timeZone:a,calendar:t}}return Ba(t,r)}function Bo(e,t,n,r){let i=B(n,R(t,kt,At),Ra,dt,0),a=e(i.timeZone),[o,s,c,l]=Va(t,i,()=>xr(r)),u=Aa(i,s),d=H(a);return Mr(li(d,j(o,u),i.offset,c,l),d,t)}function Vo(e,t,n){let r=B(t,R(e,Tt,Et),La,[],0),[i,a]=Va(e,r,()=>[M(n)]);return za(i,Aa(r,a),e)}function Ho(e,t,n,r=[]){return Ba(e,B(t,R(e,Ct,wt),z,r),n)}function Uo(e,t,n,r){return Ga(e,B(t,R(e,vt,yt),z,r),n)}function Wo(e,t,n,r){let i=B(n,R(e,Ct,wt),z,ct,0);return t&&i.month!==void 0&&i.monthCode===void 0&&i.year===void 0&&(i.year=1972),Ka(e,i,r)}function Go(e,t){return Aa(B(e,gt,Pa,[],1),M(t))}function Ko(e){let t=B(e,An,Fa);return F(ra({...k,...t}))}function U(e){_(oe(e))}function qo(e){let t=xs(e=Vn(e)),n;return t||U(e),t.F?n=0:t.offset?n=Ma(t.offset):U(e),t.timeZoneId&&Na(t.timeZoneId,1),fn(t),jr(Ar(t,n))}function Jo(e,t){let n=xs(A(e));return n||U(e),n.timeZoneId?ls(n,t,void 0):(n.F&&U(e),ds(n,t))}function Yo(e,t,n){let r=xs(A(e));return r&&r.timeZoneId||U(e),ls(r,t,n)}function Xo(e,t){let n=xs(A(e));return n&&!n.F||U(e),us(n,t)}function Zo(e,t){let n=os(as(A(e)),void 0,t);return P(n,n.calendar)}function Qo(e,t){let n=Ss(A(e));if(n)return $o(n),P(Er(pn(n)),t(n.calendarId));let r=os(as(e),ss,t),{calendar:i}=r;return P(_i(i,r),i)}function $o(e){e.calendarId!==`iso8601`&&_(se(e.calendarId))}function es(e,t){let n=Cs(A(e));if(n)return $o(n),P(pn(n),t(n.calendarId));let r=os(as(e),cs,t),{calendar:i}=r,{year:a,month:o,day:s}=D(i,r),[c,l]=gn(i,a,o),{year:u,month:d}=((e,t,n,r)=>{let i=e?e.v(t,n,r):$t(t,n);return i||_(`Cannot guess year`),i})(i,c,l,s);return P(N(vn(i,u,d,s)),i)}function ts(e){let t=(e=>{let t=ws(e);return t?(Ds(t[13]),Ts(t,1)):void 0})(e=A(e)),n;return t||(t=xs(e),t?(t.fe||U(e),t.F&&_(se(`Z`)),$o(t)):U(e)),(n=Ss(e))&&mn(n)&&U(e),(n=Cs(e))&&mn(n)&&U(e),Pr(Pt(t))}function ns(e){let t=(e=>{let t=bs.exec(e);return t?(e=>{let t=0,n=0,r=0,i={years:a(e[2]),months:a(e[3]),weeks:a(e[4]),days:a(e[5]),hours:a(e[6],e[7],5),minutes:a(e[8],e[9],4),seconds:a(e[10],e[11],3),...Yi(r,2,O)};return t||_(ee(O)),Ee(e[1])<0&&(i=L(i)),i;function a(e,i,a){let o=0,s=0;return a&&([o,r]=Ne(r,C[a])),e!==void 0&&(n&&_(se(e)),s=(e=>{let t=parseInt(e);return Number.isFinite(t)||_(se(e)),t})(e),t=1,i&&(r=Te(i)*(C[a]/Xe),n=1)),o+s}})(t):void 0})(A(e));return t||U(e),F(ra(t))}function rs(e){let t=xs(e)||Ss(e)||Cs(e);if(t)return t.calendarId;let n=ws(e);return n?Ds(n[13]).calendarId:e}function is(e){let t=xs(e);return t&&(t.timeZoneId||t.F&&`UTC`||t.offset)||e}function as(e){let t=xs(e);return t&&!t.F||U(e),t}function os(e,t,n){return t&&e.calendarId===`iso8601`?(pn(e),e.fe&&Pt(e),ds(t(e),n)):e.fe?us(e,n):ds(e,n)}function ss(e){let t=12*e.year+e.month===Tr?20:1;return{...e,day:t}}function cs(e){return{...e,year:1972}}function ls(e,t,n){let r=H(Oo(e.timeZoneId)),i;if(fn(e),e.fe){let t=e.offset?Ma(e.offset):void 0,[,o,s]=xr(n);i=li(r,e,t,o,s,!(r._||e.offset===void 0||(a=e.offset,a.replace(/\D/g,``).length>4)),e.F)}else xr(n),i=di(r,e);var a;return kr(i),Mr(i,r,t(e.calendarId))}function us(e,t){return fn(e),Dr(e),{...j(e,e),calendar:t(e.calendarId)}}function ds(e,t){return pn(e),N(e),{calendar:t(e.calendarId),year:e.year,month:e.month,day:e.day}}function fs(e){return`(\\d{2})(?:(:?)(\\d{2})(?:\\${e}(\\d{2})(?:[.,](\\d{1,9}))?)?)?`}function ps(e){return`([+-])`+fs(e)}const ms=`(?:(?:([+-])(\\d{6}))|(\\d{4}))(-?)(\\d{2})\\4(\\d{2})(?:[T ]`+fs(8)+`(Z|`+ps(15)+`)?)?`,hs=we(`(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})`),gs=we(`(?:--)?(\\d{2})-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})`),_s=we(ms+`((?:\\[(!?)([^\\]]*)\\]){0,9})`),vs=we(`T?`+fs(2)+`(${ps(9)})?((?:\\[(!?)([^\\]]*)\\]){0,9})`),ys=RegExp(`\\[(!?)([^\\]]*)\\]`,`g`),bs=we(`([+-])?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?:(\\d+)(?:[.,](\\d{1,9}))?H)?(?:(\\d+)(?:[.,](\\d{1,9}))?M)?(?:(\\d+)(?:[.,](\\d{1,9}))?S)?)?`);function xs(e){let t=_s.exec(e);return t?(e=>{let t=e[12],n=(t||``).toUpperCase()===`Z`;return{year:Es(e),month:parseInt(e[5]),day:parseInt(e[6]),...Ts(e,7),...Ds(e[19]),fe:!!e[7],F:n,offset:n?void 0:t}})(t):void 0}function Ss(e){let t=hs.exec(e);if(t)return(e=>({year:Es(e),month:parseInt(e[4]),day:1,...Ds(e[5])}))(t)}function Cs(e){let t=gs.exec(e);return t?(e=>({year:1972,month:parseInt(e[1]),day:parseInt(e[2]),...Ds(e[3])}))(t):void 0}function ws(e){let t=vs.exec(e);if(t)return t[6]&&Ma(t[6]),t}function Ts(e,t){let n=De(e[t+3]);return{...Bt(Te(e[t+4]||``))[0],hour:De(e[t]),minute:De(e[t+2]),second:n===60?59:n}}function Es(e){let t=Ee(e[1]),n=parseInt(e[2]||e[3]);return t<0&&!n&&_(se(-0)),t*n}function Ds(e){let t,n,r=[];return e.replace(ys,(e,i,a)=>{let o=!!i,[s,c]=a.split(`=`).reverse();return c?c===`u-ca`?(r.push(s.toLowerCase()),t||=o):(o||/[A-Z]/.test(c))&&_(se(e)):(n&&_(se(e)),n=s),``}),r.length>1&&t&&_(se(e)),{timeZoneId:n,calendarId:r[0]||`iso8601`}}function Os(e,t,n){let r=Object.assign(Object.create(null),t);return ks(r,n,mt),Ta(e)&&(ks(r,n,pt),e&&e.le&&ks(r,n,ht,ft)),r}function ks(e,t,n,r){let i=0,a=[];for(let e of n)t[e]===void 0?a.push(e):i=1;if(Object.assign(e,t),i)for(let t of r||a)delete e[t]}function As(e,t,n){let{calendar:r,timeZone:i}=e,a=R(r,Dt,Ot),o=I(e),{year:s,month:c,day:l}=D(r,o),u={year:s,monthCode:Ls(r,s,c),day:l,hour:o.hour,minute:o.minute,second:o.second,millisecond:o.millisecond,microsecond:o.microsecond,nanosecond:o.nanosecond,offset:o.offsetNanoseconds},d=B(t,a,Ra),f=Os(r,u,d),p={...u,...d},[m,ee,h,te]=Va(r,f,()=>xr(n,2));return Mr(li(i,j(m,It(p,ee)),p.offset,h,te),i,r)}function js(e,t,n){let{calendar:r}=e,i=R(r,Tt,Et),{year:a,month:o,day:s}=D(r,e),c={year:a,monthCode:Ls(r,a,o),day:s,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond,microsecond:e.microsecond,nanosecond:e.nanosecond},l=B(t,i,La),u=Os(r,c,l),d={...c,...l},[f,p]=Va(r,u,()=>[M(n)]);return za(f,It(d,p),r)}function Ms(e,t,n){let{calendar:r}=e,i=R(r,Ct,wt),{year:a,month:o,day:s}=D(r,e);return Ba(r,Os(r,{year:a,monthCode:Ls(r,a,o),day:s},B(t,i,z)),n)}function Ns(e,t,n){let{calendar:r}=e,i=R(r,vt,yt),{year:a,month:o}=D(r,e);return Ga(r,Os(r,{year:a,monthCode:Ls(r,a,o)},B(t,i,z)),n)}function Ps(e,t,n){let{calendar:r}=e,i=R(r,Ct,wt),{year:a,month:o,day:s}=D(r,e);return Ka(r,Os(r,{monthCode:Ls(r,a,o),day:s},B(t,i,z)),n)}function Fs(e,t,n){return((e,t,n)=>Aa({...y(gt,e),...B(t,gt,Pa)},M(n)))(e,t,n)}function Is(e,t){return F((n=e,r=t,ra({...n,...B(r,An,Fa)})));var n,r}function Ls(e,t,n){let[r,i]=gn(e,t,n);return We(r,i)}function Rs(e,t,n){return Mr(e.epochNanoseconds,t,n)}function zs(e){return jr(e.epochNanoseconds)}function Bs(e){return Nr(I(e),e.calendar)}function Vs(e){return P(I(e),e.calendar)}function Hs(e){return Pr(I(e))}function Us(e,t,n){return Mr(kr(((e,t,n)=>ui(e,t,(e=>lr(a(e)))(n)))(t,e,n)),t,e.calendar)}function Ws(e,t,n,r){let i=e(r.timeZone),a=r.plainTime,o=a===void 0?void 0:t(a),s=H(i),c;return c=o?ui(s,j(n,o)):di(s,j(n,Nt)),Mr(c,s,n.calendar)}function Gs(e,t,n){return Ys(e,y(R(e,bt,xt),t),B(f(n),ct,z,[]))}function Ks(e,t,n){let r=R(e,st,_t);return Ys(e,y(St,t),B(f(n),r,z,[]))}function qs(e,t){return Ka(e,B(t,St,z))}function Js(e,t,n){return Ga(e,B(t,R(e,bt,xt),z),n)}function Ys(e,t,n){let r=R(e,jt,Mt),i=Os(e,t,n);return i=B(i,r,z,[]),Ba(e,i)}function Xs(e){return jr(kr(BigInt(Un(e))*tt))}function Zs(e){return jr(kr(Hn(e)))}function Qs(e){return e.timeZone=`UTC`,[`full`,`long`].includes(e.timeStyle)&&(e.timeStyle=`medium`),e}function $s(e,t){return e.timeZone!==void 0&&v(`Cannot specify TimeZone`),e.timeZone=t,e}function ec(e,t,n){let r=e.resolvedOptions().calendar;!n&&t.calendar===void 0||Ve(t.calendar)===r||_(`Mismatching Calendars`)}function tc(e,t,n,r,i){let a=new Set(e),o=new Set(t),s=new Set(n);return(e,t)=>{let n=((e,t,n,r)=>{let i={dateStyle:void 0,timeStyle:void 0,me:{},pe:{},xe:{},oe:0,ue:0};for(let a of Object.keys(e)){let o=e[a];o===void 0||r.has(a)||(t.has(a)?a===`dateStyle`?i.dateStyle=o:a===`timeStyle`?i.timeStyle=o:i.me[a]=o:a===`era`?i.pe[a]=o:n.has(a)?a===`dateStyle`||a===`timeStyle`?i.ue=1:i.oe=1:i.xe[a]=o)}return i})(e,a,o,s),c=n.dateStyle!==void 0,l=n.timeStyle!==void 0,u=c||l,d=Object.keys(n.me).length>0,f=n.oe||n.ue,p=d||c||l,m=Object.keys(n.pe).length>0,ee=d||m||n.oe;(!t&&f||t&&f&&!p||u&&ee)&&v(`Invalid formatting options`);let h={};return u||p||Object.assign(h,r),Object.assign(h,n.me,n.pe,n.xe),c&&(i?Object.assign(h,i[n.dateStyle]):h.dateStyle=n.dateStyle),l&&(h.timeStyle=n.timeStyle),h}}const nc={year:`numeric`,month:`numeric`,day:`numeric`},rc={hour:`numeric`,minute:`numeric`,second:`numeric`},ic=Object.assign({},nc,rc),ac=Object.assign({},ic,{timeZoneName:`short`}),oc={year:`numeric`,month:`numeric`},sc={month:`numeric`,day:`numeric`},cc=[`weekday`,`year`,`month`,`day`,`dateStyle`],lc=[`dayPeriod`,`hour`,`minute`,`second`,`fractionalSecondDigits`,`timeStyle`],uc=cc.concat(lc),dc=[`weekday`,`day`].concat(lc),fc=[`weekday`,`year`].concat(lc),pc=tc(uc,[],[],ic),mc=tc(uc,[],[],ac),hc=tc(uc,[],[`timeZoneName`],ic),gc=tc(cc,lc,[`timeZoneName`],nc),_c=tc(lc,cc,[`timeZoneName`,`era`],rc),vc=tc([`year`,`month`,`dateStyle`],dc,[`timeZoneName`],oc,{full:{year:`numeric`,month:`long`},long:{year:`numeric`,month:`long`},medium:{year:`numeric`,month:`short`},short:{year:`2-digit`,month:`numeric`}}),yc=tc([`month`,`day`,`dateStyle`],fc,[`timeZoneName`,`era`],sc,{full:{month:`long`,day:`numeric`},long:{month:`long`,day:`numeric`},medium:{month:`short`,day:`numeric`},short:{month:`numeric`,day:`numeric`}});function bc(e,t){let{timeZone:n}=e,r=I(e),{offsetNanoseconds:i}=r,a=t||Nt,o;return o=t?li(n,j(r,a),i,2):di(n,j(r,a)),Mr(o,n,e.calendar)}function xc(e){let t=Sc(),n=e.C(t);return Xt(t+BigInt(n))}function Sc(){return BigInt(Date.now())*tt}function Cc(){return new V().resolvedOptions().timeZone}function wc(e,t=xe){let n=new WeakMap;function r(e){let t=n.get(e);return t||v(`Invalid calling context`),t}class i{constructor(r,i=Object.create(null)){let a=t(i),o=new V(r,a),s=o.resolvedOptions(),c=y(Object.keys(i),s);n.set(this,{ee:e({t:o,Ge:s.locale,I:c,Je:a}),t:o})}get format(){let e=r(this);return e.ze||=t=>{let[n,...r]=e.ee.B(t);return n.format(...r)}}formatToParts(e){let{ee:t}=r(this),[n,...i]=t.B(e);return n.formatToParts(...i)}resolvedOptions(){return r(this).t.resolvedOptions()}}let{prototype:a}=i;function o(e,t){return new i(e,t)}V.prototype.formatRange&&Object.defineProperties(a,me({formatRange(e,t){let{ee:n}=r(this),[i,a,o]=n.A(e,t);return i.formatRange(a,o)},formatRangeToParts(e,t){let{ee:n}=r(this),[i,a,o]=n.A(e,t);return i.formatRangeToParts(a,o)}}));let s=Object.getOwnPropertyDescriptors(V);return s.prototype.value=a,Object.defineProperties(o,s),a.constructor=o,Object.defineProperties(a,he(`Intl.DateTimeFormat`)),o}const Tc=globalThis.Temporal,Ec=`PlainYearMonth`,Dc=`PlainMonthDay`,Oc=`PlainDate`,kc=`PlainDateTime`,Ac=`PlainTime`,jc=`ZonedDateTime`,Mc=`Instant`,Nc=`Duration`;function Pc(e,t,n,...r){Object.defineProperties(t,pe(e)),Object.defineProperties(t.prototype,he(`Temporal.`+e));for(let e of r)Fc(t.prototype,n,e);return t}function Fc(e,t,n){Object.defineProperties(e,ge(e=>({get(){return e(t(this))},configurable:1}),n))}const Ic=Se.name===`noop`?e=>{Object.defineProperty(e,"_str_",{value:e.toJSON()})}:Se;function Lc(){v(`Invalid calling context`)}function Rc(){v(`Cannot use valueOf`)}const zc={era(e){return _n(e.calendar,e).era},eraYear(e){return _n(e.calendar,e).eraYear},year(e){return D(e.calendar,e).year},month(e){return D(e.calendar,e).month},monthCode(e){return xn(e.calendar,e)}},Bc={era(e){return _n(e.calendar,e).era},eraYear(e){return _n(e.calendar,e).eraYear},year(e){return D(e.calendar,e).year},month(e){return D(e.calendar,e).month},monthCode(e){return xn(e.calendar,e)},day(e){return D(e.calendar,e).day}},Vc={monthCode(e){return xn(e.calendar,e)},day(e){return D(e.calendar,e).day}},Hc={daysInMonth(e){return wn(e.calendar,e)},daysInYear(e){return Tn(e.calendar,e)},monthsInYear(e){return Cn(e.calendar,e)},inLeapYear(e){return Sn(e.calendar,e)}},Uc={dayOfWeek(e){return sn(e)},dayOfYear(e){return En(e.calendar,e)},weekOfYear(e){return Dn(e.calendar,e)},yearOfWeek(e){return On(e.calendar,e)},daysInWeek(){return 7},daysInMonth(e){return wn(e.calendar,e)},daysInYear(e){return Tn(e.calendar,e)},monthsInYear(e){return Cn(e.calendar,e)},inLeapYear(e){return Sn(e.calendar,e)}};function Wc(e){return ve(Object.keys(e))}Wc(Hc),Wc(Uc);function Gc(e){return wc(t=>{let n=fe(e=>((e,t)=>{let n;switch(t){case Mc:n=pc(e.I,1);break;case kc:n=Qs(hc(e.I,1));break;case Oc:n=Qs(gc(e.I,1));break;case Ac:n=Qs(_c(e.I,1));break;case Ec:n=Qs(vc(e.I,1));break;case Dc:n=Qs(yc(e.I,1));break;default:v(ce(t))}return new V(e.Ge,n)})(t,e));return{B(r){if(r===void 0)return[t.t];let i=e(r);if(!i)return[t.t,Number(r)];let[a,o]=i,s=n(a);return Kc(s,a,o),[s,qc(a,o)]},A(r,i){r!==void 0&&i!==void 0||v(`Mismatching types for formatting`);let a=e(r),o=a?void 0:Number(r),s=e(i),c=s?void 0:Number(i);if(!a&&!s)return[t.t,o,c];a&&s||v(`Mismatching types for formatting`);let[l,u]=a,[d,f]=s;l!==d&&v(`Mismatching types for formatting`);let p=n(l);return Kc(p,l,u),Kc(p,l,f),[p,qc(l,u),qc(l,f)]}}})}function Kc(e,t,n){switch(t){case Mc:case Ac:return;case kc:case Oc:ec(e,n);return;case Ec:case Dc:ec(e,n,1);return;default:v(ce(t))}}function qc(e,t){switch(e){case Mc:return Fr(t);case kc:return Gt(t);case Oc:case Ec:case Dc:return qt(t);case Ac:return Lt(t);default:v(ce(e))}}function Jc(e){let t=A(e).toLowerCase();return t===`iso8601`?void 0:t===`gregory`?0:void _(ie(e,`temporal-polyfill/full`))}function Yc(e=`iso8601`){return Jc(e)}const Xc=new WeakMap,Zc=Pc(jc,class{constructor(e,t,n=void 0){let r=kr(Hn(e)),i=H(Do(t)),a=Yc(n);tl(this,Mr(r,i,a))}static from(e,t=void 0){return W(el(e,t))}static compare(e,t){return pa(el(e),el(t))}get calendarId(){return Ve(G(this).calendar)}get timeZoneId(){return G(this).timeZone.id}get epochMilliseconds(){return Fr(G(this))}get epochNanoseconds(){return Ir(G(this))}get offset(){return vo(I(G(this)).offsetNanoseconds)}get offsetNanoseconds(){return I(G(this)).offsetNanoseconds}get hoursInDay(){return Wr(G(this))}with(e,t=void 0){return W(As(G(this),Cl(e),t))}withCalendar(e){return W({...G(this),calendar:Kl(e)})}withTimeZone(e){return W({...G(this),timeZone:H(K(e))})}withPlainTime(e=void 0){return W(bc(G(this),Al(e)))}add(e,t=void 0){return W(mi(G(this),$(e),t))}subtract(e,t=void 0){return W(mi(G(this),L($(e)),t))}until(e,t=void 0){let n=G(this),r=el(e);return Z(F(Di(0,Ci(n.calendar,r.calendar),n,r,t)))}since(e,t=void 0){let n=G(this),r=el(e);return Z(F(Di(1,Ci(n.calendar,r.calendar),n,r,t)))}round(e){let t=G(this),[n,r,i]=br(e);return W(Ur(t,n,r,i))}startOfDay(){return W(Gr(G(this)))}equals(e){return ya(G(this),el(e))}toInstant(){return il(zs(G(this)))}toPlainDateTime(){return Pl(Bs(G(this)))}toPlainDate(){return Bl(Vs(G(this)))}toPlainTime(){return El(Hs(G(this)))}toLocaleString(e=void 0,t={}){let n=G(this),r=new V(e,$s(mc(t),Ti(n)));return ec(r,n),r.format(Fr(n))}toString(e=void 0){return to(G(this),e)}toJSON(){return to(G(this))}getTimeZoneTransition(e){let t=G(this),n=si(t,e);return n?W({...t,epochNanoseconds:n}):null}valueOf(){return Rc()}},Qc,Bc,Uc,ot);function W(e){return tl(Object.create(Zc.prototype),e)}function G(e){return $c(e)||Lc()}function Qc(e){let t=G(e);return{...I(t),calendar:t.calendar}}function $c(e){return Xc.get(e)}function el(e,t){if(g(e)){let n=$c(e);return n?(xr(t),n):Bo(K,Wl(e),e,t)}return Yo(e,Jc,t)}function tl(e,t){return Xc.set(e,t),Ic(e),e}function K(e){if(g(e)){let t=$c(e);return t||v(ae(e)),t.timeZone.id}return(e=>Oo(is(A(e))))(e)}const nl=new WeakMap,rl=Pc(Mc,class{constructor(e){let t=kr(Hn(e));cl(this,jr(t))}static from(e){return il(ol(e))}static fromEpochMilliseconds(e){return il(Xs(e))}static fromEpochNanoseconds(e){return il(Zs(e))}static compare(e,t){return fa(ol(e),ol(t))}get epochMilliseconds(){return Fr(q(this))}get epochNanoseconds(){return Ir(q(this))}add(e){return il(jr(pi(q(this).epochNanoseconds,$(e))))}subtract(e){return il(jr(pi(q(this).epochNanoseconds,L($(e)))))}until(e,t=void 0){return Z(Ei(0,q(this),ol(e),t))}since(e,t=void 0){return Z(Ei(1,q(this),ol(e),t))}round(e){let t=q(this),[n,r,i]=br(e,5,1);return il(jr(ei(t.epochNanoseconds,Xr(n,r),i)))}equals(e){return va(q(this),ol(e))}toZonedDateTimeISO(e){return W(Rs(q(this),H(K(e))))}toLocaleString(e=void 0,t={}){let n=q(this);return new V(e,pc(t)).format(Fr(n))}toString(e=void 0){return eo(K,q(this),e)}toJSON(){return eo(K,q(this))}valueOf(){return Rc()}});function il(e){return cl(Object.create(rl.prototype),e)}function q(e){return al(e)||Lc()}function al(e){return nl.get(e)}function ol(e){if(g(e)){let t=al(e);if(t)return t;let n=$c(e);if(n)return jr(n.epochNanoseconds)}return qo(e)}const{toTemporalInstant:sl}={toTemporalInstant(){let e=Date.prototype.valueOf.call(this);return il(jr(BigInt(zn(e))*tt))}};function cl(e,t){return nl.set(e,t),Ic(e),e}const ll=new WeakMap,ul=Pc(Dc,class{constructor(e,t,n=void 0,r){let i=s(e),a=s(t),o=Yc(n),c=N(pn({year:s(r??1972),month:i,day:a}));hl(this,P(c,o))}static from(e,t=void 0){return dl(ml(e,t))}get calendarId(){return Ve(fl(this).calendar)}with(e,t=void 0){return dl(Ps(fl(this),Cl(e),t))}equals(e){return Ca(fl(this),ml(e))}toPlainDate(e){return Bl(Ks(fl(this).calendar,this,e))}toLocaleString(e=void 0,t={}){let n=fl(this),r=new V(e,Qs(yc(t)));return ec(r,n,1),r.format(qt(n))}toString(e=void 0){return ao(fl(this),e)}toJSON(){return ao(fl(this))}valueOf(){return Rc()}},fl,Vc);function dl(e){return hl(Object.create(ul.prototype),e)}function fl(e){return pl(e)||Lc()}function pl(e){return ll.get(e)}function ml(e,t){if(g(e)){let n=pl(e);if(n)return M(t),n;let r=Gl(e);return Wo(r===void 0?void 0:r,r===void 0,e,t)}let n=es(e,Jc);return M(t),n}function hl(e,t){return ll.set(e,t),Ic(e),e}const gl=new WeakMap,_l=Pc(Ec,class{constructor(e,t,n=void 0,r){let i=s(e),a=s(t),o=Yc(n),c=Er(pn({year:i,month:a,day:s(r??1)}));xl(this,P(c,o))}static from(e,t=void 0){return vl(bl(e,t))}static compare(e,t){return ga(bl(e),bl(t))}get calendarId(){return Ve(J(this).calendar)}with(e,t=void 0){return vl(Ns(J(this),Cl(e),t))}add(e,t=void 0){let n=J(this);return vl(P(fi(0,n.calendar,n,$(e),t),n.calendar))}subtract(e,t=void 0){let n=J(this);return vl(P(fi(1,n.calendar,n,$(e),t),n.calendar))}until(e,t=void 0){let n=J(this),r=bl(e);return Z(Ai(0,Ci(n.calendar,r.calendar),n,r,t))}since(e,t=void 0){let n=J(this),r=bl(e);return Z(Ai(1,Ci(n.calendar,r.calendar),n,r,t))}equals(e){return Sa(J(this),bl(e))}toPlainDate(e){return Bl(Gs(J(this).calendar,this,e))}toLocaleString(e=void 0,t={}){let n=J(this),r=new V(e,Qs(vc(t)));return ec(r,n,1),r.format(qt(n))}toString(e=void 0){return io(J(this),e)}toJSON(){return io(J(this))}valueOf(){return Rc()}},J,zc,Hc);function vl(e){return xl(Object.create(_l.prototype),e)}function J(e){return yl(e)||Lc()}function yl(e){return gl.get(e)}function bl(e,t){if(g(e)){let n=yl(e);return n?(M(t),n):Uo(Wl(e),e,t)}let n=Qo(e,Jc);return M(t),n}function xl(e,t){return gl.set(e,t),Ic(e),e}function Sl(e){if(!g(e))return;let t=al(e);return t?[Mc,t]:(t=$c(e),t?[jc,t]:(t=Fl(e),t?[kc,t]:(t=Vl(e),t?[Oc,t]:(t=Ol(e),t?[Ac,t]:(t=yl(e),t?[Ec,t]:(t=pl(e),t?[Dc,t]:(t=Yl(e),t?[Nc,t]:void 0)))))))}function Cl(e){return(Sl(e)||e.calendar!==void 0||e.timeZone!==void 0)&&v(`Invalid bag`),e}const wl=new WeakMap,Tl=Pc(Ac,class{constructor(e=0,t=0,n=0,r=0,i=0,a=0){let o=Pt(ge(s,{hour:e,minute:t,second:n,millisecond:r,microsecond:i,nanosecond:a}));jl(this,Pr(o))}static from(e,t=void 0){return El(kl(e,t))}static compare(e,t){return _a(kl(e),kl(t))}with(e,t=void 0){return El(Fs(Dl(this),Cl(e),t))}add(e){return El(vi(Dl(this),$(e))[0])}subtract(e){return El(vi(Dl(this),L($(e)))[0])}until(e,t=void 0){return Z(Mi(0,Dl(this),kl(e),t))}since(e,t=void 0){return Z(Mi(1,Dl(this),kl(e),t))}round(e){let t=Dl(this),[n,r,i]=br(e,5);return El(qr(t,Yr(n,r),i)[0])}equals(e){return wa(Dl(this),kl(e))}toLocaleString(e=void 0,t={}){let n=Dl(this);return new V(e,Qs(_c(t))).format(Lt(n))}toString(e=void 0){return so(Dl(this),e)}toJSON(){return so(Dl(this))}valueOf(){return Rc()}},Dl,ot);function El(e){return jl(Object.create(Tl.prototype),e)}function Dl(e){return Ol(e)||Lc()}function Ol(e){return wl.get(e)}function kl(e,t){if(g(e)){let n=Ol(e);if(n)return M(t),n;let r=Fl(e);if(r)return M(t),Pr(r);let i=$c(e);return i?(M(t),Hs(i)):Go(e,t)}let n=ts(e);return M(t),n}function Al(e){return e===void 0?void 0:kl(e)}function jl(e,t){return wl.set(e,t),Ic(e),e}const Ml=new WeakMap,Nl=Pc(kc,class{constructor(e,t,n,r=0,i=0,a=0,o=0,c=0,l=0,u=void 0){let d=Dr(fn(ge(s,{year:e,month:t,day:n,hour:r,minute:i,second:a,millisecond:o,microsecond:c,nanosecond:l}))),f=Yc(u);Ll(this,Nr(d,f))}static from(e,t=void 0){return Pl(Il(e,t))}static compare(e,t){return ha(Il(e),Il(t))}get calendarId(){return Ve(Y(this).calendar)}with(e,t=void 0){return Pl(js(Y(this),Cl(e),t))}withCalendar(e){return Pl(Nr(Y(this),Kl(e)))}withPlainTime(e=void 0){let t=Y(this);return Pl(za(t,Al(e),t.calendar))}add(e,t=void 0){let n=Y(this);return Pl(Nr(hi(n.calendar,n,$(e),t),n.calendar))}subtract(e,t=void 0){let n=Y(this);return Pl(Nr(hi(n.calendar,n,L($(e)),t),n.calendar))}until(e,t=void 0){let n=Y(this),r=Il(e);return Z(Oi(0,Ci(n.calendar,r.calendar),n,r,t))}since(e,t=void 0){let n=Y(this),r=Il(e);return Z(Oi(1,Ci(n.calendar,r.calendar),n,r,t))}round(e){let t=Y(this),[n,r,i]=br(e);return Pl(Nr(Kr(t,Yr(n,r),i),t.calendar))}equals(e){return ba(Y(this),Il(e))}toZonedDateTime(e,t=void 0){return W(Us(Y(this),H(K(e)),t))}toPlainDate(){let e=Y(this);return Bl(P(e,e.calendar))}toPlainTime(){return El(Pr(Y(this)))}toLocaleString(e=void 0,t={}){let n=Y(this),r=new V(e,Qs(hc(t)));return ec(r,n),r.format(Gt(n))}toString(e=void 0){return no(Y(this),e)}toJSON(){return no(Y(this))}valueOf(){return Rc()}},Y,Bc,Uc,ot);function Pl(e){return Ll(Object.create(Nl.prototype),e)}function Y(e){return Fl(e)||Lc()}function Fl(e){return Ml.get(e)}function Il(e,t){if(g(e)){let n=Fl(e);if(n)return M(t),n;let r=Vl(e);if(r)return M(t),Nr(j(r,Nt),r.calendar);let i=$c(e);return i?(M(t),Bs(i)):Vo(Wl(e),e,t)}let n=Xo(e,Jc);return M(t),n}function Ll(e,t){return Ml.set(e,t),Ic(e),e}const Rl=new WeakMap,zl=Pc(Oc,class{constructor(e,t,n,r=void 0){let i=N(pn(ge(s,{year:e,month:t,day:n}))),a=Yc(r);Ul(this,P(i,a))}static from(e,t=void 0){return Bl(Hl(e,t))}static compare(e,t){return ga(Hl(e),Hl(t))}get calendarId(){return Ve(X(this).calendar)}with(e,t=void 0){return Bl(Ms(X(this),Cl(e),t))}withCalendar(e){return Bl(P(X(this),Kl(e)))}add(e,t=void 0){let n=X(this);return Bl(P(gi(n.calendar,n,$(e),t),n.calendar))}subtract(e,t=void 0){let n=X(this);return Bl(P(gi(n.calendar,n,L($(e)),t),n.calendar))}until(e,t=void 0){let n=X(this),r=Hl(e);return Z(ki(0,Ci(n.calendar,r.calendar),n,r,t))}since(e,t=void 0){let n=X(this),r=Hl(e);return Z(ki(1,Ci(n.calendar,r.calendar),n,r,t))}equals(e){return xa(X(this),Hl(e))}toZonedDateTime(e){let t=g(e)?{timeZone:e.timeZone,plainTime:e.plainTime}:{timeZone:e};return W(Ws(K,kl,X(this),t))}toPlainDateTime(e=void 0){let t=X(this);return Pl(za(t,Al(e),t.calendar))}toPlainYearMonth(){return vl(Js(X(this).calendar,this))}toPlainMonthDay(){return dl(qs(X(this).calendar,this))}toLocaleString(e=void 0,t={}){let n=X(this),r=new V(e,Qs(gc(t)));return ec(r,n),r.format(qt(n))}toString(e=void 0){return ro(X(this),e)}toJSON(){return ro(X(this))}valueOf(){return Rc()}},X,Bc,Uc);function Bl(e){return Ul(Object.create(zl.prototype),e)}function X(e){return Vl(e)||Lc()}function Vl(e){return Rl.get(e)}function Hl(e,t){if(g(e)){let n=Vl(e);if(n)return M(t),n;let r=Fl(e);if(r)return M(t),P(r,r.calendar);let i=$c(e);return i?(M(t),Vs(i)):Ho(Wl(e),e,t)}let n=Zo(e,Jc);return M(t),n}function Ul(e,t){return Rl.set(e,t),Ic(e),e}function Wl(e){let t=Gl(e);return t===void 0?void 0:t}function Gl(e){let{calendar:t}=e;if(t!==void 0)return Kl(t)}function Kl(e){if(g(e)){let t=Vl(e)||Fl(e)||$c(e)||pl(e)||yl(e);return t||v(re(e)),t.calendar}return(e=>Jc(rs(A(e))))(e)}const ql=new WeakMap,Jl=Pc(Nc,class{constructor(e=0,t=0,n=0,r=0,i=0,a=0,o=0,s=0,c=0,l=0){let u=ra(ge(Un,{years:e,months:t,weeks:n,days:r,hours:i,minutes:a,seconds:o,milliseconds:s,microseconds:c,nanoseconds:l}));Zl(this,F(u))}static from(e){return Z($(e))}static compare(e,t,n=void 0){return ma(Xl,$(e),$(t),n)}get sign(){return Q(this).sign}get blank(){return!Q(this).sign}with(e){return Z(Is(Q(this),e))}negated(){return Z(ta(Q(this)))}abs(){return Z(ea(Q(this)))}add(e,t=void 0){return Z(Zi(Xl,0,Q(this),$(e),t))}subtract(e,t=void 0){return Z(Zi(Xl,1,Q(this),$(e),t))}round(e){return Z($i(Xl,Q(this),e))}total(e){return Lr(Xl,Q(this),e)}toLocaleString(e=void 0,t){let n=Q(this);return Intl.DurationFormat?new Intl.DurationFormat(e,t).format(n):co(n,t)}toString(e=void 0){return co(Q(this),e)}toJSON(){return co(Q(this))}valueOf(){return Rc()}},Q,kn);function Z(e){return Zl(Object.create(Jl.prototype),e)}function Q(e){return Yl(e)||Lc()}function Yl(e){return ql.get(e)}function $(e){return g(e)?Yl(e)||Ko(e):ns(e)}function Xl(e){if(e!==void 0){if(g(e)){let t=$c(e);if(t)return t;let n=Vl(e);if(n)return n;let r=Fl(e);return r?P(r,r.calendar):zo(K,Wl(e),e)}return Jo(e,Jc)}}function Zl(e,t){return ql.set(e,t),Ic(e),e}const Ql=Object.defineProperties({},{...he(`Temporal.Now`),...me({timeZoneId(){return Cc()},instant(){return il(jr(Sc()))},zonedDateTimeISO(e=Cc()){let t=H(K(e));return W(Mr(Sc(),t))},plainDateTimeISO(e=Cc()){return Pl(Nr(xc(H(K(e)))))},plainDateISO(e=Cc()){return Bl(P(xc(H(K(e)))))},plainTimeISO(e=Cc()){return El(Pr(xc(H(K(e)))))}})}),$l=Object.defineProperties({},{...he(`Temporal`),...me({PlainYearMonth:_l,PlainMonthDay:ul,PlainDate:zl,PlainTime:Tl,PlainDateTime:Nl,ZonedDateTime:Zc,Instant:rl,Duration:Jl,Now:Ql})}),eu=Gc(Sl);function tu(){Object.defineProperties(globalThis,me({Temporal:$l})),Object.defineProperties(Intl,me({DateTimeFormat:eu})),Object.defineProperties(Date.prototype,me({toTemporalInstant:sl}))}function nu(){Tc||tu()}nu();
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var e=class extends Event{oldState;newState;constructor(e,t={}){let n=Object.assign({},t);delete n.oldState,delete n.newState,super(e,n),this.oldState=String(t.oldState||``),this.newState=String(t.newState||``)}},t=new WeakMap;function n(n,r,i){t.set(n,setTimeout(()=>{t.has(n)&&n.dispatchEvent(new e(`toggle`,{cancelable:!1,oldState:r,newState:i}))},0))}var r=globalThis.ShadowRoot||function(){},i=globalThis.HTMLDialogElement||function(){},a=new WeakMap,o=new WeakMap,s=new WeakMap,c=new WeakMap;function l(e){return c.get(e)||`hidden`}var u=new WeakMap;function d(e){return[...e].pop()}function f(e){let t=e.popoverTargetElement;if(!(t instanceof HTMLElement))return;let n=l(t);e.popoverTargetAction===`show`&&n===`showing`||e.popoverTargetAction===`hide`&&n===`hidden`||(n===`showing`?D(t,!0,!0):p(t,!1)&&(u.set(t,e),E(t)))}function p(e,t){return!(e.popover!==`auto`&&e.popover!==`manual`&&e.popover!==`hint`||!e.isConnected||t&&l(e)!==`showing`||!t&&l(e)!==`hidden`||e instanceof i&&e.hasAttribute(`open`)||document.fullscreenElement===e)}function m(e){if(!e)return 0;let t=o.get(document)||new Set,n=s.get(document)||new Set;return n.has(e)?[...n].indexOf(e)+t.size+1:t.has(e)?[...t].indexOf(e)+1:0}function h(e){let t=y(e),n=b(e);return m(t)>m(n)?t:n}function g(e){let t,n=s.get(e)||new Set,r=o.get(e)||new Set,i=n.size>0?n:r.size>0?r:null;return i?(t=d(i),t.isConnected?t:(i.delete(t),g(e))):null}function _(e){for(let t of e||[])if(!t.isConnected)e.delete(t);else return t;return null}function v(e){return typeof e.getRootNode==`function`?e.getRootNode():e.parentNode?v(e.parentNode):e}function y(e){for(;e;){if(e instanceof HTMLElement&&e.popover===`auto`&&c.get(e)===`showing`)return e;if(e=e instanceof Element&&e.assignedSlot||e.parentElement||v(e),e instanceof r&&(e=e.host),e instanceof Document)return}}function b(e){for(;e;){let t=e.popoverTargetElement;if(t instanceof HTMLElement)return t;if(e=e.parentElement||v(e),e instanceof r&&(e=e.host),e instanceof Document)return}}function x(e,t){let n=new Map,r=0;for(let e of t||[])n.set(e,r),r+=1;n.set(e,r),r+=1;let i=null;function a(t){if(!t)return;let r=!1,a=null;for(;!r;){if(a=y(t)||null,a===null||!n.has(a))return;(e.popover===`hint`||a.popover===`auto`)&&(r=!0),r||(t=a.parentElement)}let o=n.get(a)??null;(i===null||n.get(i)<o)&&(i=a)}return a(e.parentElement||v(e)),i}function S(e){return e.hidden||e instanceof r||(e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement||e instanceof HTMLFieldSetElement)&&e.disabled||e instanceof HTMLInputElement&&e.type===`hidden`||e instanceof HTMLAnchorElement&&e.href===``?!1:typeof e.tabIndex==`number`&&e.tabIndex!==-1}function C(e){if(e.shadowRoot&&e.shadowRoot.delegatesFocus!==!0)return null;let t=e;t.shadowRoot&&(t=t.shadowRoot);let n=t.querySelector(`[autofocus]`);if(n)return n;{let e=t.querySelectorAll(`slot`);for(let t of e){let e=t.assignedElements({flatten:!0});for(let t of e)if(t.hasAttribute(`autofocus`))return t;else if(n=t.querySelector(`[autofocus]`),n)return n}}let r=e.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_ELEMENT),i=r.currentNode;for(;i;){if(S(i))return i;i=r.nextNode()}}function w(e){var t;(t=C(e))==null||t.focus()}var T=new WeakMap;function E(t){if(!p(t,!1))return;let r=t.ownerDocument;if(!t.dispatchEvent(new e(`beforetoggle`,{cancelable:!0,oldState:`closed`,newState:`open`}))||!p(t,!1))return;let i=!1,l=t.popover,d=null,f=x(t,o.get(r)||new Set),m=x(t,s.get(r)||new Set);if(l===`auto`&&(k(s.get(r)||new Set,i,!0),j(f||r,i,!0),d=`auto`),l===`hint`&&(m?(j(m,i,!0),d=`hint`):(k(s.get(r)||new Set,i,!0),f?(j(f,i,!0),d=`auto`):d=`hint`)),l===`auto`||l===`hint`){if(l!==t.popover||!p(t,!1))return;g(r)||(i=!0),d===`auto`?(o.has(r)||o.set(r,new Set),o.get(r).add(t)):d===`hint`&&(s.has(r)||s.set(r,new Set),s.get(r).add(t))}T.delete(t);let h=r.activeElement;t.classList.add(`:popover-open`),c.set(t,`showing`),a.has(r)||a.set(r,new Set),a.get(r).add(t),F(u.get(t),!0),w(t),i&&h&&t.popover===`auto`&&T.set(t,h),n(t,`closed`,`open`)}function D(t,r=!1,i=!1){var l,f;if(!p(t,!0))return;let m=t.ownerDocument;if([`auto`,`hint`].includes(t.popover)&&(j(t,r,i),!p(t,!0)))return;let h=o.get(m)||new Set,g=h.has(t)&&d(h)===t;if(F(u.get(t),!1),u.delete(t),i&&(t.dispatchEvent(new e(`beforetoggle`,{oldState:`open`,newState:`closed`})),g&&d(h)!==t&&j(t,r,i),!p(t,!0)))return;(l=a.get(m))==null||l.delete(t),h.delete(t),(f=s.get(m))==null||f.delete(t),t.classList.remove(`:popover-open`),c.set(t,`hidden`),i&&n(t,`open`,`closed`);let _=T.get(t);_&&(T.delete(t),r&&_.focus())}function O(e,t=!1,n=!1){let r=g(e);for(;r;)D(r,t,n),r=g(e)}function k(e,t=!1,n=!1){let r=_(e);for(;r;)D(r,t,n),r=_(e)}function A(e,t,n,r){let i=!1,a=!1;for(;i||!a;){a=!0;let o=null,s=!1;for(let n of t)if(n===e)s=!0;else if(s){o=n;break}if(!o)return;for(;l(o)===`showing`&&t.size;)D(d(t),n,r);t.has(e)&&d(t)!==e&&(i=!0),i&&(r=!1)}}function j(e,t,n){let r=e.ownerDocument||e;if(e instanceof Document)return O(r,t,n);if(s.get(r)?.has(e)){A(e,s.get(r),t,n);return}k(s.get(r)||new Set,t,n),o.get(r)?.has(e)&&A(e,o.get(r),t,n)}var M=new WeakMap;function N(e){if(!e.isTrusted)return;let t=e.composedPath()[0];if(!t)return;let n=t.ownerDocument;if(!g(n))return;let r=h(t);if(r&&e.type===`pointerdown`)M.set(n,r);else if(e.type===`pointerup`){let e=M.get(n)===r;M.delete(n),e&&j(r||n,!1,!0)}}var P=new WeakMap;function F(e,t=!1){if(!e)return;P.has(e)||P.set(e,e.getAttribute(`aria-expanded`));let n=e.popoverTargetElement;if(n instanceof HTMLElement&&n.popover===`auto`)e.setAttribute(`aria-expanded`,String(t));else{let t=P.get(e);t?e.setAttribute(`aria-expanded`,t):e.removeAttribute(`aria-expanded`)}}var I=globalThis.ShadowRoot||function(){},L=`popover-polyfill`;function R(){return typeof HTMLElement<`u`&&typeof HTMLElement.prototype==`object`&&`popover`in HTMLElement.prototype}function z(e,t,n){let r=e[t];Object.defineProperty(e,t,{value(e){return r.call(this,n(e))}})}var B=/(^|[^\\]):popover-open\b/g;function V(){return typeof globalThis.CSSLayerBlockRule==`function`}function H(e){let t=V(),n=CSS.escape(e??window.POPOVER_POLYFILL_OPTIONS?.layerName??L);return`
|
|
2
|
+
${t?`@layer ${n} {`:``}
|
|
3
|
+
:where([popover]) {
|
|
4
|
+
position: fixed;
|
|
5
|
+
z-index: 2147483647;
|
|
6
|
+
inset: 0;
|
|
7
|
+
padding: 0.25em;
|
|
8
|
+
width: fit-content;
|
|
9
|
+
height: fit-content;
|
|
10
|
+
border-width: initial;
|
|
11
|
+
border-color: initial;
|
|
12
|
+
border-image: initial;
|
|
13
|
+
border-style: solid;
|
|
14
|
+
background-color: canvas;
|
|
15
|
+
color: canvastext;
|
|
16
|
+
overflow: auto;
|
|
17
|
+
margin: auto;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:where([popover]:not(.\\:popover-open)) {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where(dialog[popover].\\:popover-open) {
|
|
25
|
+
display: block;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where(dialog[popover][open]) {
|
|
29
|
+
display: revert;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:where([anchor].\\:popover-open) {
|
|
33
|
+
inset: auto;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:where([anchor]:popover-open) {
|
|
37
|
+
inset: auto;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@supports not (background-color: canvas) {
|
|
41
|
+
:where([popover]) {
|
|
42
|
+
background-color: white;
|
|
43
|
+
color: black;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@supports (width: -moz-fit-content) {
|
|
48
|
+
:where([popover]) {
|
|
49
|
+
width: -moz-fit-content;
|
|
50
|
+
height: -moz-fit-content;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@supports not (inset: 0) {
|
|
55
|
+
:where([popover]) {
|
|
56
|
+
top: 0;
|
|
57
|
+
left: 0;
|
|
58
|
+
right: 0;
|
|
59
|
+
bottom: 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
${t?`}`:``}
|
|
63
|
+
`}var U=null;function W(e,t){let n=H(t);if(U===null)try{U=new CSSStyleSheet,U.replaceSync(n)}catch{U=!1}if(U===!1){let t=document.createElement(`style`);t.textContent=n,e instanceof Document?e.head.prepend(t):e.prepend(t)}else e.adoptedStyleSheets=[U,...e.adoptedStyleSheets]}function G(t){if(typeof window>`u`)return;let n=t?.layerName;window.ToggleEvent=window.ToggleEvent||e;function r(e){return e?.includes(`:popover-open`)&&(e=e.replace(B,`$1.\\:popover-open`)),e}z(Document.prototype,`querySelector`,r),z(Document.prototype,`querySelectorAll`,r),z(Element.prototype,`querySelector`,r),z(Element.prototype,`querySelectorAll`,r),z(Element.prototype,`matches`,r),z(Element.prototype,`closest`,r),z(DocumentFragment.prototype,`querySelectorAll`,r),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute(`popover`))return null;let e=(this.getAttribute(`popover`)||``).toLowerCase();return e===``||e==`auto`?`auto`:e==`hint`?`hint`:`manual`},set(e){e===null?this.removeAttribute(`popover`):this.setAttribute(`popover`,e)}},showPopover:{enumerable:!0,configurable:!0,value(e={}){E(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){D(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(e={}){return typeof e==`boolean`&&(e={force:e}),c.get(this)===`showing`&&e.force===void 0||e.force===!1?D(this,!0,!0):(e.force===void 0||e.force===!0)&&E(this),c.get(this)===`showing`}}});let i=Element.prototype.attachShadow;i&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(e){let t=i.call(this,e);return W(t,n),t}}});let a=HTMLElement.prototype.attachInternals;a&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){let e=a.call(this);return e.shadowRoot&&W(e.shadowRoot,n),e}}});let o=new WeakMap;function s(e){Object.defineProperties(e.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(e){if(e===null)this.removeAttribute(`popovertarget`),o.delete(this);else if(e instanceof Element)this.setAttribute(`popovertarget`,``),o.set(this,e);else throw TypeError(`popoverTargetElement must be an element or null`)},get(){if(this.localName!==`button`&&this.localName!==`input`||this.localName===`input`&&this.type!==`reset`&&this.type!==`image`&&this.type!==`button`||this.disabled||this.form&&this.type===`submit`)return null;let e=o.get(this);if(e&&e.isConnected)return e;if(e&&!e.isConnected)return o.delete(this),null;let t=v(this),n=this.getAttribute(`popovertarget`);return(t instanceof Document||t instanceof I)&&n&&t.getElementById(n)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let e=(this.getAttribute(`popovertargetaction`)||``).toLowerCase();return e===`show`||e===`hide`?e:`toggle`},set(e){this.setAttribute(`popovertargetaction`,e)}}})}s(HTMLButtonElement),s(HTMLInputElement);let l=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),n=t[0];if(!(n instanceof Element)||n?.shadowRoot)return;let r=v(n);if(!(r instanceof I||r instanceof Document))return;let i=t.find(e=>e.matches?.call(e,`[popovertargetaction],[popovertarget]`));if(i){f(i),e.preventDefault();return}},u=e=>{let t=e.key,n=e.target;!e.defaultPrevented&&n&&(t===`Escape`||t===`Esc`)&&j(n.ownerDocument,!0,!0)};(e=>{e.addEventListener(`click`,l),e.addEventListener(`keydown`,u),e.addEventListener(`pointerdown`,N),e.addEventListener(`pointerup`,N)})(document),W(document,n)}R()||G();
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
let e;function t(){return e===void 0&&(e=!!new DOMParser().parseFromString(`<div><template shadowrootmode="open"></template></div>`,`text/html`,{includeShadowRoots:!0}).querySelector(`div`)?.shadowRoot),e}
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2019 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*/
|
|
12
|
+
const n=e=>e.parentElement===null,r=e=>e.tagName===`TEMPLATE`,i=e=>e.nodeType===Node.ELEMENT_NODE,a=e=>{
|
|
13
|
+
/**
|
|
14
|
+
* @license
|
|
15
|
+
* Copyright 2019 Google LLC
|
|
16
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
+
*/
|
|
18
|
+
if(t())return;let a=[],o=e.firstElementChild;for(;o!==e&&o!==null;)if(r(o))a.push(o),o=o.content;else if(o.firstElementChild!==null)o=o.firstElementChild;else if(i(o)&&o.nextElementSibling!==null)o=o.nextElementSibling;else{let t;for(;o!==e&&o!==null;)if(n(o)){t=a.pop();let e=t.parentElement,n=t.getAttribute(`shadowrootmode`);if(o=t,n===`open`||n===`closed`){let r=t.hasAttribute(`shadowrootdelegatesfocus`);try{e.attachShadow({mode:n,delegatesFocus:r}).append(t.content)}catch{}}else t=void 0}else{let e=o.nextElementSibling;if(e!=null){o=e,t!==void 0&&t.parentElement.removeChild(t);break}let n=o.parentElement?.nextElementSibling;if(n!=null){o=n,t!==void 0&&t.parentElement.removeChild(t);break}o=o.parentElement,t!==void 0&&(t.parentElement.removeChild(t),t=void 0)}}};
|
|
19
|
+
/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2019 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/
|
|
24
|
+
export{a as hydrateShadowRoots};
|