PageSourceSearch

https://www.oddbird.net/assets/js/css-anchor-positioning-fn-B4YtgiB-.js

js oddbird.net collected 2026-10-01 09:07:00 UTC 118,902 bytes, 2 lines download raw bytes

1var t=Object.defineProperty,e=(e,n)=>{let i={};for(var r in e)t(i,r,{get:e[r],enumerable:!0});return t(i,Symbol.toStringTag,{value:"Module"}),i},n=Math.min,i=Math.max,r=Math.round,s=Math.floor,o=t=>({x:t,y:t});function l(t){let{x:e,y:n,width:i,height:r}=t;return{width:i,height:r,top:n,left:e,right:e+i,bottom:n+r,x:e,y:n}}function a(t,e,n,i,r,s,o){try{var l=t[s](o),a=l.value}catch(t){return void n(t)}l.done?e(a):Promise.resolve(a).then(i,r)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var s=t.apply(e,n);function o(t){a(s,i,r,o,l,"next",t)}function l(t){a(s,i,r,o,l,"throw",t)}o(void 0)})}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function h(t){var e=function(t,e){if("object"!=c(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!=c(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==c(e)?e:e+""}function f(t,e,n){return(e=h(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null==arguments[e]?{}:arguments[e];e%2?p(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function k(){return typeof window<"u"}function m(t){return b(t)?(t.nodeName||"").toLowerCase():"#document"}function y(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function g(t){var e;return null==(e=(b(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function b(t){return!!k()&&(t instanceof Node||t instanceof y(t).Node)}function S(t){return!!k()&&(t instanceof Element||t instanceof y(t).Element)}function v(t){return!!k()&&(t instanceof HTMLElement||t instanceof y(t).HTMLElement)}function C(t){return!(!k()||typeof ShadowRoot>"u")&&(t instanceof ShadowRoot||t instanceof y(t).ShadowRoot)}function x(t){let{overflow:e,overflowX:n,overflowY:i,display:r}=O(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&"inline"!==r&&"contents"!==r}function w(t){return/^(table|td|th)$/.test(m(t))}function L(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}var A,T=/transform|translate|scale|rotate|perspective|filter/,E=/paint|layout|strict|content/,P=t=>!!t&&"none"!==t;function D(t){let e=S(t)?O(t):t;return P(e.transform)||P(e.translate)||P(e.scale)||P(e.rotate)||P(e.perspective)||!R()&&(P(e.backdropFilter)||P(e.filter))||T.test(e.willChange||"")||E.test(e.contain||"")}function R(){return null==A&&(A=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),A}function I(t){return/^(html|body|#document)$/.test(m(t))}function O(t){return y(t).getComputedStyle(t)}function N(t){return S(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function $(t){if("html"===m(t))return t;let e=t.assignedSlot||t.parentNode||C(t)&&t.host||g(t);return C(e)?e.host:e}function F(t){let e=$(t);return I(e)?(t.ownerDocument||t).body:v(e)&&x(e)?e:F(e)}function j(t,e,n){var i;void 0===e&&(e=[]),void 0===n&&(n=!0);let r=F(t),s=r===(null==(i=t.ownerDocument)?void 0:i.body),o=y(r);if(s){let t=B(o);return e.concat(o,o.visualViewport||[],x(r)?r:[],t&&n?j(t):[])}return e.concat(r,j(r,[],n))}function B(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function W(t){let e=O(t),n=parseFloat(e.width)||0,i=parseFloat(e.height)||0,s=v(t),o=s?t.offsetWidth:n,l=s?t.offsetHeight:i,a=r(n)!==o||r(i)!==l;return a&&(n=o,i=l),{width:n,height:i,$:a}}function M(t){return S(t)?t:t.contextElement}function U(t){let e=M(t);if(!v(e))return o(1);let n=e.getBoundingClientRect(),{width:i,height:s,$:l}=W(e),a=(l?r(n.width):n.width)/i,u=(l?r(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}var z=o(0);function V(t){let e=y(t);
1return R()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:z}function H(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1);let r=t.getBoundingClientRect(),s=M(t),a=o(1);e&&(i?S(i)&&(a=U(i)):a=U(t));let u=function(t,e,n){return void 0===e&&(e=!1),!!n&&e&&n===y(t)}(s,n,i)?V(s):o(0),c=(r.left+u.x)/a.x,h=(r.top+u.y)/a.y,f=r.width/a.x,p=r.height/a.y;if(s&&i){let t=y(s),e=S(i)?y(i):i,n=t,r=B(n);for(;r&&e!==n;){let t=U(r),e=r.getBoundingClientRect(),i=O(r),s=e.left+(r.clientLeft+parseFloat(i.paddingLeft))*t.x,o=e.top+(r.clientTop+parseFloat(i.paddingTop))*t.y;c*=t.x,h*=t.y,f*=t.x,p*=t.y,c+=s,h+=o,n=y(r),r=B(n)}}return l({width:f,height:p,x:c,y:h})}function q(t,e){let n=N(t).scrollLeft;return e?e.left+n:H(g(t)).left+n}function Q(t,e){let n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-q(t,n),y:n.top+e.scrollTop}}function G(t){let e=N(t),n=t.ownerDocument.body,r=i(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=i(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),o=-e.scrollLeft+q(t),l=-e.scrollTop;return"rtl"===O(n).direction&&(o+=i(t.clientWidth,n.clientWidth)-r),{width:r,height:s,x:o,y:l}}function _(t,e,n){let i;if("viewport"===e||"layoutViewport"===e)i=function(t,e,n){void 0===n&&(n="viewport");let i="layoutViewport"===n,r=y(t),s=g(t),o=r.visualViewport,l=s.clientWidth,a=s.clientHeight,u=0,c=0;if(o){let t=!R()||"fixed"===e;i?t||(u=-o.offsetLeft,c=-o.offsetTop):(l=o.width,a=o.height,t&&(u=o.offsetLeft,c=o.offsetTop))}if(q(s)<=0){let t=s.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,r=Math.abs(s.clientWidth-e.clientWidth-i),o="stable both-edges"===getComputedStyle(s).scrollbarGutter?r/2:r;o<=25&&(l-=o)}return{width:l,height:a,x:u,y:c}}(t,n,e);else if("document"===e)i=G(g(t));else if(S(e))i=function(t,e){let n=H(t,!0,"fixed"===e),i=n.top+t.clientTop,r=n.left+t.clientLeft,s=U(t);return{width:t.clientWidth*s.x,height:t.clientHeight*s.y,x:r*s.x,y:i*s.y}}(e,n);else{let n=V(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return l(i)}function X(t,e){let n=e.get(t);if(n)return n;let i=j(t,[],!1).filter(t=>S(t)&&"body"!==m(t)),r=null,s="fixed"===O(t).position,o=s?$(t):t;for(;S(o)&&!I(o);){let t=O(o),e=D(o),n=r?r.position:s?"fixed":"";e||"fixed"!==n&&("absolute"!==n||"static"!==t.position)?r=t:i=i.filter(t=>t!==o),o=$(o)}return e.set(t,i),i}function Y(t,e,n){let i=v(e),r=g(e),s="fixed"===n,l=H(t,!0,s,e),a={scrollLeft:0,scrollTop:0},u=o(0);if((i||!s)&&(("body"!==m(e)||x(r))&&(a=N(e)),i)){let t=H(e,!0,s,e);u.x=t.x+e.clientLeft,u.y=t.y+e.clientTop}!i&&r&&(u.x=q(r));let c=!r||i||s?o(0):Q(r,a);return{x:l.left+a.scrollLeft-u.x-c.x,y:l.top+a.scrollTop-u.y-c.y,width:l.width,height:l.height}}function J(t){return"static"===O(t).position}function K(t,e){if(!v(t)||"fixed"===O(t).position)return null;if(e)return e(t);let n=t.offsetParent;return g(t)===n&&(n=n.ownerDocument.body),n}function Z(t,e){let n=y(t);if(L(t))return n;if(!v(t)){let e=$(t);for(;e&&!I(e);){if(S(e)&&!J(e))return e;e=$(e)}return n}let i=K(t,e);for(;i&&w(i)&&J(i);)i=K(i,e);return i&&I(i)&&J(i)&&!D(i)?n:i||function(t){let e=$(t);for(;v(e)&&!I(e);){if(D(e))return e;if(L(e))return null;e=$(e)}return null}(t)||n}var tt=function(){var t=u(function*(t){let e=this.getOffsetParent||Z,n=this.getDimensions,i=yield n(t.floating);return{reference:Y(t.reference,yield e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}});return function(e){return t.apply(this,arguments)}}();var et={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t,s="fixed"===r,l=g(i),a=!!e&&L(e.floating);if(i===l||a&&s)return n;let u={scrollLeft:0,scrollTop:0},c=o(1),h=o(0),f=v(i);if((f||!s)&&(("body"!==m(i)||x(l))&&(u=N(i)),f)){let t=H(i);c=U(i),h.x=t.x+i.clientLeft,h.y=t.y+i.clientTop}let p=!l||f||s?o(0):Q(l,u);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+h.x+p.x,y:n.y*c.y-u.scrollTop*c.y+h.y+p.y}},getDocumentElement:g,getClippingRect:function(t){let{element:e,boundary:r,rootBoundary:s,strategy:o}=t,l=[..."clippingAncestors"===r?L(e)?[]:X(e,this._c):[].concat(r),s],a=_(e,l[0],o),u=a.top,c=a.right,h=a.bottom,f=a.left;for(let t=1;t<l.length;t++){let r=_(e,l[t],o);u=i(r.top,u),c=n(r.right,c),h=n(r.bottom,h),f=i(r.left,f)}return{width:c-f,height:h-u,x:f,y:u}},getOffsetParent:Z,getElementRects:tt,getClientRects:function(t){return t.getClientRects?Array.from(t.getClientRects()):[]},getDimensions:function(t){let{width:e,height:n}=W(t);return{width:e,height:n}},getScale:U,isElement:S,isRTL:function(t){return"rtl"===O(t).direction}};function nt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function it(t,e,r){let o,l=null,a=g(t);function u(){var t;clearTimeout(o),null==(t=l)||t.disconnect(),l=null}function c(r,h){void 0===r&&(r=!1),void 0===h&&(h=1),u();let f=t.getBoundingClientRect(),{left:p,top:k,width:m,height:y}=f;if(r||e(),!m||!y)return;let g={rootMargin:-s(k)+"px "+-s(a.clientWidth-(p+m))+"px "+-s(a.clientHeight-(k+y))+"px "+-s(p)+"px",threshold:i(0,n(1,h))||1},b=!0;function S(e){let n=e[0].intersectionRatio;if(!nt(f,t.getBoundingClientRect()))return c();if(n!==h){if(!b)return c();n?c(!1,n):o=setTimeout(()=>{c(!1,1e-7)},1e3)}b=!1}try{l=new IntersectionObserver(S,d(d({},g),{},{root:a.ownerDocument}))}catch(t){l=new IntersectionObserver(S,g)}l.observe(t)}let h=y(t),f=()=>c(r);return h.addEventListener("resize",f),c(!0),()=>{h.removeEventListener("resize",f),u()}}function rt(t,e,n,i){void 0===i&&(i={});let{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=i,u=M(t),c=r||s?[...u?j(u):[],...e?j(e):[]]:[];
1c.forEach(t=>{r&&t.addEventListener("scroll",n),s&&t.addEventListener("resize",n)});let h=u&&l?it(u,n,s):null,f=-1,p=null;o&&(p=new ResizeObserver(t=>{let[i]=t;i&&i.target===u&&p&&e&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var t;null==(t=p)||t.observe(e)})),n()}),u&&!a&&p.observe(u),e&&p.observe(e));let d,k=a?H(t):null;return a&&function e(){let i=H(t);k&&!nt(k,i)&&n(),k=i,d=requestAnimationFrame(e)}(),n(),()=>{var t;c.forEach(t=>{r&&t.removeEventListener("scroll",n),s&&t.removeEventListener("resize",n)}),null==h||h(),null==(t=p)||t.disconnect(),p=null,a&&cancelAnimationFrame(d)}}var st=null,ot=class t{static createItem(t){return{prev:null,next:null,data:t}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return t.createItem(e)}allocateCursor(t,e){let n;return null===st?n={prev:t,next:e,cursor:this.cursor}:(n=st,st=st.cursor,n.prev=t,n.next=e,n.cursor=this.cursor),this.cursor=n,n}releaseCursor(){let{cursor:t}=this;this.cursor=t.cursor,t.prev=null,t.next=null,t.cursor=st,st=t}updateCursors(t,e,n,i){let{cursor:r}=this;for(;null!==r;)r.prev===t&&(r.prev=e),r.next===n&&(r.next=i),r=r.cursor}*[Symbol.iterator](){for(let t=this.head;null!==t;t=t.next)yield t.data}get size(){let t=0;for(let e=this.head;null!==e;e=e.next)t++;return t}get isEmpty(){return null===this.head}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let n=null;this.head=null;for(let i of e){let e=t.createItem(i);null===n?this.head=e:n.next=e,e.prev=n,n=e}return this.tail=n,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(t,e=this){let n=this.allocateCursor(null,this.head);for(;null!==n.next;){let i=n.next;n.next=i.next,t.call(e,i.data,i,this)}this.releaseCursor()}forEachRight(t,e=this){let n=this.allocateCursor(this.tail,null);for(;null!==n.prev;){let i=n.prev;n.prev=i.prev,t.call(e,i.data,i,this)}this.releaseCursor()}reduce(t,e,n=this){let i,r=this.allocateCursor(null,this.head),s=e;for(;null!==r.next;)i=r.next,r.next=i.next,s=t.call(n,s,i.data,i,this);return this.releaseCursor(),s}reduceRight(t,e,n=this){let i,r=this.allocateCursor(this.tail,null),s=e;for(;null!==r.prev;)i=r.prev,r.prev=i.prev,s=t.call(n,s,i.data,i,this);return this.releaseCursor(),s}some(t,e=this){for(let n=this.head;null!==n;n=n.next)if(t.call(e,n.data,n,this))return!0;return!1}map(e,n=this){let i=new t;for(let t=this.head;null!==t;t=t.next)i.appendData(e.call(n,t.data,t,this));return i}filter(e,n=this){let i=new t;for(let t=this.head;null!==t;t=t.next)e.call(n,t.data,t,this)&&i.appendData(t.data);return i}nextUntil(t,e,n=this){if(null===t)return;let i=this.allocateCursor(null,t);for(;null!==i.next;){let t=i.next;if(i.next=t.next,e.call(n,t.data,t,this))break}this.releaseCursor()}prevUntil(t,e,n=this){if(null===t)return;let i=this.allocateCursor(t,null);for(;null!==i.prev;){let t=i.prev;if(i.prev=t.prev,e.call(n,t.data,t,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let e=new t;for(let t of this)e.appendData(t);return e}prepend(t){return this.updateCursors(null,t,this.head,t),null===this.head?this.tail=t:(this.head.prev=t,t.next=this.head),this.head=t,this}prependData(e){return this.prepend(t.createItem(e))}append(t){return this.insert(t)}appendData(e){return this.insert(t.createItem(e))}insert(t,e=null){if(null!==e)if(this.updateCursors(e.prev,t,e,t),null===e.prev){if(this.head!==e)throw Error("before doesn't belong to list");this.head=t,e.prev=t,t.next=e,this.updateCursors(null,t)}else e.prev.next=t,t.prev=e.prev,e.prev=t,t.next=e;else this.updateCursors(this.tail,t,null,t),null===this.tail?this.head=t:(this.tail.next=t,t.prev=this.tail),this.tail=t;return this}insertData(e,n){return this.insert(t.createItem(e),n)}remove(t){if(this.updateCursors(t,t.prev,t,t.next),null!==t.prev)t.prev.next=t.next;else{if(this.head!==t)throw Error("item doesn't belong to list");this.head=t.next}if(null!==t.next)t.next.prev=t.prev;else{if(this.tail!==t)throw Error("item doesn't belong to list");this.tail=t.prev}return t.prev=null,t.next=null,t}push(e){this.insert(t.createItem(e))}pop(){return null===this.tail?null:this.remove(this.tail)}unshift(e){this.prepend(t.createItem(e))}shift(){return null===this.head?null:this.remove(this.head)}prependList(t){return this.insertList(t,this.head)}appendList(t){return this.insertList(t)}insertList(t,e){return null===t.head||(null==e?(this.updateCursors(this.tail,t.tail,null,t.head),null===this.tail?this.head=t.head:(this.tail.next=t.head,t.head.prev=this.tail),this.tail=t.tail):(this.updateCursors(e.prev,t.tail,e,t.head),null===e.prev?this.head=t.head:(e.prev.next=t.head,t.head.prev=e.prev),e.prev=t.tail,t.tail.next=e),t.head=null,t.tail
1=null),this}replace(t,e){"head"in e?this.insertList(e,t):this.insert(e,t),this.remove(t)}};function lt(t){let e={};for(let n of Object.keys(t)){let i=t[n];i&&(Array.isArray(i)||i instanceof ot?i=i.map(lt):i.constructor===Object&&(i=lt(i))),e[n]=i}return e}function at(t){return t>=48&&t<=57}function ut(t){return at(t)||t>=65&&t<=70||t>=97&&t<=102}function ct(t){return t>=65&&t<=90}function ht(t){return function(t){return ct(t)||function(t){return t>=97&&t<=122}(t)}(t)||function(t){return t>=128}(t)||95===t}function ft(t){return ht(t)||at(t)||45===t}function pt(t){return t>=0&&t<=8||11===t||t>=14&&t<=31||127===t}function dt(t){return 10===t||13===t||12===t}function kt(t){return dt(t)||32===t||9===t}function mt(t,e){return!(92!==t||dt(e)||0===e)}function yt(t,e,n){return 45===t?ht(e)||45===e||mt(e,n):!!ht(t)||92===t&&mt(t,e)}function gt(t,e,n){return 43===t||45===t?at(e)?2:46===e&&at(n)?3:0:46===t?at(e)?2:0:+!!at(t)}function bt(t){return+(65279===t||65534===t)}var St=Array(128);for(let t=0;t<St.length;t++)St[t]=(kt(t)?130:at(t)&&131)||ht(t)&&132||pt(t)&&133||t||128;function vt(t){return t<128?St[t]:132}function Ct(t,e){return e<t.length?t.charCodeAt(e):0}function xt(t,e,n){return 13===n&&10===Ct(t,e+1)?2:1}function wt(t,e,n){let i=t.charCodeAt(e);return ct(i)&&(i|=32),i===n}function Lt(t,e,n,i){if(n-e!==i.length||e<0||n>t.length)return!1;for(let r=e;r<n;r++){let n=i.charCodeAt(r-e),s=t.charCodeAt(r);if(ct(s)&&(s|=32),s!==n)return!1}return!0}function At(t,e){for(;e<t.length&&kt(t.charCodeAt(e));e++);return e}function Tt(t,e){for(;e<t.length&&at(t.charCodeAt(e));e++);return e}function Et(t,e){if(ut(Ct(t,(e+=2)-1))){for(let n=Math.min(t.length,e+5);e<n&&ut(Ct(t,e));e++);let n=Ct(t,e);kt(n)&&(e+=xt(t,e,n))}return e}function Pt(t,e){for(;e<t.length;e++){let n=t.charCodeAt(e);if(!ft(n)){if(mt(n,Ct(t,e+1))){e=Et(t,e)-1;continue}break}}return e}function Dt(t,e){let n=t.charCodeAt(e);if((43===n||45===n)&&(n=t.charCodeAt(e+=1)),at(n)&&(e=Tt(t,e+1),n=t.charCodeAt(e)),46===n&&at(t.charCodeAt(e+1))&&(e=Tt(t,e+=2)),wt(t,e,101)){let i=0;n=t.charCodeAt(e+1),(45===n||43===n)&&(i=1,n=t.charCodeAt(e+2)),at(n)&&(e=Tt(t,e+1+i+1))}return e}function Rt(t,e){for(;e<t.length;e++){let n=t.charCodeAt(e);if(41===n){e++;break}mt(n,Ct(t,e+1))&&(e=Et(t,e))}return e}function It(t){if(1===t.length&&!ut(t.charCodeAt(0)))return t[0];let e=parseInt(t,16);return(0===e||e>=55296&&e<=57343||e>1114111)&&(e=65533),String.fromCodePoint(e)}var Ot="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 Nt(t=null,e){return null===t||t.length<e?new Uint32Array(Math.max(e+1024,16384)):t}function $t(t){let e=t.source,n=e.length,i=e.length>0?bt(e.charCodeAt(0)):0,r=Nt(t.lines,n),s=Nt(t.columns,n),o=t.startLine,l=t.startColumn;for(let t=i;t<n;t++){let i=e.charCodeAt(t);r[t]=o,s[t]=l++,(10===i||13===i||12===i)&&(13===i&&t+1<n&&10===e.charCodeAt(t+1)&&(t++,r[t]=o,s[t]=l),o++,l=1)}r[n]=o,s[n]=l,t.lines=r,t.columns=s,t.computed=!0}var Ft=class{constructor(t,e,n,i){this.setSource(t,e,n,i),this.lines=null,this.columns=null}setSource(t="",e=0,n=1,i=1){this.source=t,this.startOffset=e,this.startLine=n,this.startColumn=i,this.computed=!1}getLocation(t,e){return this.computed||$t(this),{source:e,offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}getLocationRange(t,e,n){return this.computed||$t(this),{source:n,start:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]},end:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}}},jt=16777215,Bt=24,Wt=new Uint8Array(32);Wt[2]=22,Wt[21]=22,Wt[19]=20,Wt[23]=24;var Mt=new Uint8Array(32);function Ut(t,e,n){return t<e?e:t>n?n:t}Mt[2]=1,Mt[21]=1,Mt[19]=1,Mt[23]=1,Mt[22]=2,Mt[20]=2,Mt[24]=2;var zt=class{constructor(t,e){this.setSource(t,e)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(t="",e=()=>{}){let n=(t=String(t||"")).length,i=Nt(this.offsetAndType,t.length+1),r=Nt(this.balance,t.length+1),s=0,o=-1,l=0,a=t.length;this.offsetAndType=null,this.balance=null,r.fill(0),e(t,(t,e,n)=>{let u=s++;
1if(i[u]=t<<Bt|n,-1===o&&(o=e),r[u]=a,t===l){let t=r[a];r[a]=u,a=t,l=Wt[i[t]>>Bt]}else this.isBlockOpenerTokenType(t)&&(a=u,l=Wt[t])}),i[s]=0|n,r[s]=s;for(let t=0;t<s;t++){let e=r[t];if(e<=t){let n=r[e];n!==t&&(r[t]=n)}else e>s&&(r[t]=s)}this.source=t,this.firstCharOffset=-1===o?0:o,this.tokenCount=s,this.offsetAndType=i,this.balance=r,this.reset(),this.next()}lookupType(t){return(t+=this.tokenIndex)<this.tokenCount?this.offsetAndType[t]>>Bt:0}lookupTypeNonSC(t){for(let e=this.tokenIndex;e<this.tokenCount;e++){let n=this.offsetAndType[e]>>Bt;if(13!==n&&25!==n&&0===t--)return n}return 0}lookupOffset(t){return(t+=this.tokenIndex)<this.tokenCount?this.offsetAndType[t-1]&jt:this.source.length}lookupOffsetNonSC(t){for(let e=this.tokenIndex;e<this.tokenCount;e++){let n=this.offsetAndType[e]>>Bt;if(13!==n&&25!==n&&0===t--)return e-this.tokenIndex}return 0}lookupValue(t,e){return(t+=this.tokenIndex)<this.tokenCount&&Lt(this.source,this.offsetAndType[t-1]&jt,this.offsetAndType[t]&jt,e)}getTokenStart(t){return t===this.tokenIndex?this.tokenStart:t>0?t<this.tokenCount?this.offsetAndType[t-1]&jt:this.offsetAndType[this.tokenCount]&jt:this.firstCharOffset}getTokenEnd(t){return t===this.tokenIndex?this.tokenEnd:this.offsetAndType[Ut(t,0,this.tokenCount)]&jt}getTokenType(t){return t===this.tokenIndex?this.tokenType:this.offsetAndType[Ut(t,0,this.tokenCount)]>>Bt}substrToCursor(t){return this.source.substring(t,this.tokenStart)}isBlockOpenerTokenType(t){return 1===Mt[t]}isBlockCloserTokenType(t){return 2===Mt[t]}getBlockTokenPairIndex(t){let e=this.getTokenType(t);if(1===Mt[e]){let n=this.balance[t],i=this.getTokenType(n);return Wt[e]===i?n:-1}if(2===Mt[e]){let n=this.balance[t];return Wt[this.getTokenType(n)]===e?n:-1}return-1}isBalanceEdge(t){return this.balance[this.tokenIndex]<t}isDelim(t,e){return e?9===this.lookupType(e)&&this.source.charCodeAt(this.lookupOffset(e))===t:9===this.tokenType&&this.source.charCodeAt(this.tokenStart)===t}skip(t){let e=this.tokenIndex+t;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.offsetAndType[e-1]&jt,e=this.offsetAndType[e],this.tokenType=e>>Bt,this.tokenEnd=e&jt):(this.tokenIndex=this.tokenCount,this.next())}next(){let t=this.tokenIndex+1;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.tokenEnd,t=this.offsetAndType[t],this.tokenType=t>>Bt,this.tokenEnd=t&jt):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;13===this.tokenType||25===this.tokenType;)this.next()}skipUntilBalanced(t,e){let n=t,i=0,r=0;t:for(;n<this.tokenCount&&(i=this.balance[n],!(i<t));n++)switch(r=n>0?this.offsetAndType[n-1]&jt:this.firstCharOffset,e(this.source.charCodeAt(r))){case 1:break t;case 2:n++;break t;default:this.isBlockOpenerTokenType(this.offsetAndType[n]>>Bt)&&(n=i)}this.skip(n-this.tokenIndex)}forEachToken(t){for(let e=0,n=this.firstCharOffset;e<this.tokenCount;e++){let i=n,r=this.offsetAndType[e],s=r&jt;n=s,t(r>>Bt,i,s,e)}}dump(){let t=Array(this.tokenCount);return this.forEachToken((e,n,i,r)=>{t[r]={idx:r,type:Ot[e],chunk:this.source.substring(n,i),balance:this.balance[r]}}),t}};function Vt(t,e){function n(e){return e<l?t.charCodeAt(e):0}function i(){return u=Dt(t,u),yt(n(u),n(u+1),n(u+2))?(o=12,void(u=Pt(t,u))):37===n(u)?(o=11,void u++):void(o=10)}function r(){let e=u;return u=Pt(t,u),Lt(t,e,u,"url")&&40===n(u)?(u=At(t,u+1),34===n(u)||39===n(u)?(o=2,void(u=e+4)):void function(){for(o=7,u=At(t,u);u<t.length;u++){let e=t.charCodeAt(u);switch(vt(e)){case 41:return void u++;case 130:return u=At(t,u),41===n(u)||u>=t.length?void(u<t.length&&u++):(u=Rt(t,u),void(o=8));case 34:case 39:case 40:case 133:return u=Rt(t,u),void(o=8);case 92:if(mt(e,n(u+1))){u=Et(t,u)-1;break}return u=Rt(t,u),void(o=8)}}}()):40===n(u)?(o=2,void u++):void(o=1)}function s(e){for(e||(e=n(u++)),o=5;u<t.length;u++){let i=t.charCodeAt(u);switch(vt(i)){case e:return void u++;case 130:if(dt(i))return u+=xt(t,u,i),void(o=6);break;case 92:if(u===t.length-1)break;let r=n(u+1);dt(r)?u+=xt(t,u+1,r):mt(i,r)&&(u=Et(t,u)-1)}}}let o,l=(t=String(t||"")).length,a=bt(n(0)),u=a;for(;u<l;){let l=t.charCodeAt(u);switch(vt(l)){case 130:o=13,u=At(t,u+1);break;case 34:case 39:s();break;case 35:ft(n(u+1))||mt(n(u+1),n(u+2))?(o=4,u=Pt(t,u+1)):(o=9,u++);break;case 40:o=21,u++;break;case 41:o=22,u++;break;case 43:case 46:gt(l,n(u+1),n(u+2))?i():(o=9,u++);break;case 44:o=18,u++;break;case 45:gt(l,n(u+1),n(u+2))?i():45===n(u+1)&&62===n(u+2)?(o=15,u+=3):yt(l,n(u+1),n(u+2))?r():(o=9,u++);break;case 47:42===n(u+1)?(o=25,u=t.indexOf("*/",u+2),u=-1===u?t.length:u+2):(o=9,u++);break;case 58:o=16,u++;break;case 59:o=17,u++;break;case 60:33===n(u+1)&&45===n(u+2)&&45===n(u+3)?(o=14,u+=4):(o=9,u++);break;case 64:yt(n(u+1),n(u+2),n(u+3))?(o=3,u=Pt(t,u+1)):(o=9,u++);break;case 91:o=19,u++;break;case 92:mt(l,n(u+1))?r():(o=9,u++);break;case 93:o=20,u++;break;case 123:o=23,u++;break;case 125:o=24,u++;break;case 131:i();break;
1case 132:r();break;default:o=9,u++}e(o,a,a=u)}}function Ht(t){let e=t.length,n=t.charCodeAt(0),i=+(34===n||39===n),r=1===i&&e>1&&t.charCodeAt(e-1)===n?e-2:e-1,s="";for(let n=i;n<=r;n++){let i=t.charCodeAt(n);if(92===i){if(n===r){n!==e-1&&(s=t.substr(n+1));break}if(i=t.charCodeAt(++n),mt(92,i)){let e=n-1,i=Et(t,e);n=i-1,s+=It(t.substring(e+1,i))}else 13===i&&10===t.charCodeAt(n+1)&&n++}else s+=t[n]}return s}var{hasOwnProperty:qt}=Object.prototype,Qt=function(){};function Gt(t){return"function"==typeof t?t:Qt}function _t(t,e){return function(n,i,r){n.type===e&&t.call(this,n,i,r)}}function Xt(t,e){let n=e.structure,i=[];for(let t in n){if(!1===qt.call(n,t))continue;let e=n[t],r={name:t,type:!1,nullable:!1};Array.isArray(e)||(e=[e]);for(let t of e)null===t?r.nullable=!0:"string"==typeof t?r.type="node":Array.isArray(t)&&(r.type="list");r.type&&i.push(r)}return i.length?{context:e.walkContext,fields:i}:null}function Yt(t,e){let n=t.fields.slice(),i=t.context,r="string"==typeof i;return e&&n.reverse(),function(t,s,o,l){let a;r&&(a=s[i],s[i]=t);for(let i of n){let n=t[i.name];if(!i.nullable||n)if("list"===i.type){if(e?n.reduceRight(l,!1):n.reduce(l,!1))return!0}else if(o(n))return!0}r&&(s[i]=a)}}function Jt({StyleSheet:t,Atrule:e,Rule:n,Block:i,DeclarationList:r}){return{Atrule:{StyleSheet:t,Atrule:e,Rule:n,Block:i},Rule:{StyleSheet:t,Atrule:e,Rule:n,Block:i},Declaration:{StyleSheet:t,Atrule:e,Rule:n,Block:i,DeclarationList:r}}}var Kt=e({generate:()=>he,name:()=>ae,parse:()=>ce,structure:()=>ue}),Zt=43,te=45,ee=110,ne=!0,ie=!1;function re(t,e){let n=this.tokenStart+t,i=this.charCodeAt(n);for((i===Zt||i===te)&&(e&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)at(this.charCodeAt(n))||this.error("Integer is expected",n)}function se(t){return re.call(this,0,t)}function oe(t,e){if(!this.cmpChar(this.tokenStart+t,e)){let n="";switch(e){case ee:n="N is expected";break;case te:n="HyphenMinus is expected"}this.error(n,this.tokenStart+t)}}function le(){let t=0,e=0,n=this.tokenType;for(;13===n||25===n;)n=this.lookupType(++t);if(10!==n){if(!this.isDelim(Zt,t)&&!this.isDelim(te,t))return null;e=this.isDelim(Zt,t)?Zt:te;do{n=this.lookupType(++t)}while(13===n||25===n);10!==n&&(this.skip(t),se.call(this,ne))}return t>0&&this.skip(t),0===e&&(n=this.charCodeAt(this.tokenStart),n!==Zt&&n!==te&&this.error("Number sign is expected")),se.call(this,0!==e),e===te?"-"+this.consume(10):this.consume(10)}var ae="AnPlusB",ue={a:[String,null],b:[String,null]};function ce(){let t=this.tokenStart,e=null,n=null;if(10===this.tokenType)se.call(this,ie),n=this.consume(10);else if(1===this.tokenType&&this.cmpChar(this.tokenStart,te))switch(e="-1",oe.call(this,1,ee),this.tokenEnd-this.tokenStart){case 2:this.next(),n=le.call(this);break;case 3:oe.call(this,2,te),this.next(),this.skipSC(),se.call(this,ne),n="-"+this.consume(10);break;default:oe.call(this,2,te),re.call(this,3,ne),this.next(),n=this.substrToCursor(t+2)}else if(1===this.tokenType||this.isDelim(Zt)&&1===this.lookupType(1)){let i=0;switch(e="1",this.isDelim(Zt)&&(i=1,this.next()),oe.call(this,0,ee),this.tokenEnd-this.tokenStart){case 1:this.next(),n=le.call(this);break;case 2:oe.call(this,1,te),this.next(),this.skipSC(),se.call(this,ne),n="-"+this.consume(10);break;default:oe.call(this,1,te),re.call(this,2,ne),this.next(),n=this.substrToCursor(t+i+1)}}else if(12===this.tokenType){let i=this.charCodeAt(this.tokenStart),r=i===Zt||i===te,s=this.tokenStart+r;for(;s<this.tokenEnd&&at(this.charCodeAt(s));s++);s===this.tokenStart+r&&this.error("Integer is expected",this.tokenStart+r),oe.call(this,s-this.tokenStart,ee),e=this.substring(t,s),s+1===this.tokenEnd?(this.next(),n=le.call(this)):(oe.call(this,s-this.tokenStart+1,te),s+2===this.tokenEnd?(this.next(),this.skipSC(),se.call(this,ne),n="-"+this.consume(10)):(re.call(this,s-this.tokenStart+2,ne),this.next(),n=this.substrToCursor(s+1)))}else this.error();return null!==e&&e.charCodeAt(0)===Zt&&(e=e.substr(1)),null!==n&&n.charCodeAt(0)===Zt&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(t,this.tokenStart),a:e,b:n}}function he(t){if(t.a){let e=("+1"===t.a||"1"===t.a?"n":"-1"===t.a&&"-n")||t.a+"n";if(t.b){let n="-"===t.b[0]||"+"===t.b[0]?t.b:"+"+t.b;this.tokenize(e+n)}else this.tokenize(e)}else this.tokenize(t.b)}var fe=e({generate:()=>be,name:()=>ke,parse:()=>ge,structure:()=>ye,walkContext:()=>me});function pe(){return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function de(){for(let t,e=1;t=this.lookupType(e);e++){if(24===t)return!0;
1if(23===t||3===t)return!1}return!1}var ke="Atrule",me="atrule",ye={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function ge(t=!1){let e,n,i=this.tokenStart,r=null,s=null;switch(this.eat(3),e=this.substrToCursor(i+1),n=e.toLowerCase(),this.skipSC(),!1===this.eof&&23!==this.tokenType&&17!==this.tokenType&&(r=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,e,t),pe):pe.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:s=hasOwnProperty.call(this.atrule,n)&&"function"==typeof this.atrule[n].block?this.atrule[n].block.call(this,t):this.Block(de.call(this))}return{type:"Atrule",loc:this.getLocation(i,this.tokenStart),name:e,prelude:r,block:s}}function be(t){this.token(3,"@"+t.name),null!==t.prelude&&this.node(t.prelude),t.block?this.node(t.block):this.token(17,";")}var Se=e({generate:()=>Le,name:()=>ve,parse:()=>we,structure:()=>xe,walkContext:()=>Ce}),ve="AtrulePrelude",Ce="atrulePrelude",xe={children:[[]]};function we(t){let e=null;return null!==t&&(t=t.toLowerCase()),this.skipSC(),e=hasOwnProperty.call(this.atrule,t)&&"function"==typeof this.atrule[t].prelude?this.atrule[t].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.skipSC(),!0!==this.eof&&23!==this.tokenType&&17!==this.tokenType&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(e),children:e}}function Le(t){this.children(t)}var Ae=e({generate:()=>Be,name:()=>$e,parse:()=>je,structure:()=>Fe}),Te=36,Ee=42,Pe=61,De=94,Re=124,Ie=126;function Oe(){this.eof&&this.error("Unexpected end of input");let t=this.tokenStart,e=!1;return this.isDelim(Ee)?(e=!0,this.next()):this.isDelim(Re)||this.eat(1),this.isDelim(Re)?this.charCodeAt(this.tokenStart+1)===Pe?e&&this.error("Identifier is expected",this.tokenEnd):(this.next(),this.eat(1)):e&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t)}}function Ne(){let t=this.tokenStart,e=this.charCodeAt(t);return e!==Pe&&e!==Ie&&e!==De&&e!==Te&&e!==Ee&&e!==Re&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),e!==Pe&&(this.isDelim(Pe)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(t)}var $e="AttributeSelector",Fe={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function je(){let t,e=this.tokenStart,n=null,i=null,r=null;return this.eat(19),this.skipSC(),t=Oe.call(this),this.skipSC(),20!==this.tokenType&&(1!==this.tokenType&&(n=Ne.call(this),this.skipSC(),i=5===this.tokenType?this.String():this.Identifier(),this.skipSC()),1===this.tokenType&&(r=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(e,this.tokenStart),name:t,matcher:n,value:i,flags:r}}function Be(t){this.token(9,"["),this.node(t.name),null!==t.matcher&&(this.tokenize(t.matcher),this.node(t.value)),null!==t.flags&&this.token(1,t.flags),this.token(9,"]")}var We=e({generate:()=>Xe,name:()=>qe,parse:()=>_e,structure:()=>Ge,walkContext:()=>Qe}),Me=38;function Ue(){return this.Raw(null,!0)}function ze(){return this.parseWithFallback(this.Rule,Ue)}function Ve(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}function He(){if(17===this.tokenType)return Ve.call(this,this.tokenIndex);let t=this.parseWithFallback(this.Declaration,Ve);return 17===this.tokenType&&this.next(),t}var qe="Block",Qe="block",Ge={children:[["Atrule","Rule","Declaration"]]};function _e(t){let e=t?He:ze,n=this.tokenStart,i=this.createList(
1);this.eat(23);t:for(;!this.eof;)switch(this.tokenType){case 24:break t;case 13:case 25:this.next();break;case 3:i.push(this.parseWithFallback(this.Atrule.bind(this,t),Ue));break;default:t&&this.isDelim(Me)?i.push(ze.call(this)):i.push(e.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(n,this.tokenStart),children:i}}function Xe(t){this.token(23,"{"),this.children(t,t=>{"Declaration"===t.type&&this.token(17,";")}),this.token(24,"}")}var Ye=e({generate:()=>tn,name:()=>Je,parse:()=>Ze,structure:()=>Ke}),Je="Brackets",Ke={children:[[]]};function Ze(t,e){let n=this.tokenStart,i=null;return this.eat(19),i=t.call(this,e),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(n,this.tokenStart),children:i}}function tn(t){this.token(9,"["),this.children(t),this.token(9,"]")}var en=e({generate:()=>sn,name:()=>"CDC",parse:()=>rn,structure:()=>nn}),nn=[];function rn(){let t=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(t,this.tokenStart)}}function sn(){this.token(15,"--\x3e")}var on=e({generate:()=>un,name:()=>"CDO",parse:()=>an,structure:()=>ln}),ln=[];function an(){let t=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(t,this.tokenStart)}}function un(){this.token(14,"\x3c!--")}var cn=e({generate:()=>kn,name:()=>fn,parse:()=>dn,structure:()=>pn}),hn=46,fn="ClassSelector",pn={name:String};function dn(){return this.eatDelim(hn),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function kn(t){this.token(9,"."),this.token(1,t.name)}
1var mn=e({generate:()=>wn,name:()=>vn,parse:()=>xn,structure:()=>Cn}),yn=43,gn=47,bn=62,Sn=126,vn="Combinator",Cn={name:String};function xn(){let t,e=this.tokenStart;switch(this.tokenType){case 13:t=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case bn:case yn:case Sn:this.next();break;case gn:this.next(),this.eatIdent("deep"),this.eatDelim(gn);break;default:this.error("Combinator is expected")}t=this.substrToCursor(e)}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function wn(t){this.tokenize(t.name)}var Ln=e({generate:()=>Rn,name:()=>En,parse:()=>Dn,structure:()=>Pn}),An=42,Tn=47,En="Comment",Pn={value:String};function Dn(){let t=this.tokenStart,e=this.tokenEnd;return this.eat(25),e-t+2>=2&&this.charCodeAt(e-2)===An&&this.charCodeAt(e-1)===Tn&&(e-=2),{type:"Comment",loc:this.getLocation(t,this.tokenStart),value:this.substring(t+2,e)}}function Rn(t){this.token(25,"/*"+t.value+"*/")}var In=e({generate:()=>Wn,name:()=>Nn,parse:()=>Bn,structure:()=>$n}),On=new Set([16,22,0]),Nn="Condition",$n={kind:String,children:[["Identifier","Feature","FeatureFunction","FeatureRange","SupportsDeclaration"]]};function Fn(t){return 1===this.lookupTypeNonSC(1)&&On.has(this.lookupTypeNonSC(2))?this.Feature(t):this.FeatureRange(t)}var jn={media:Fn,container:Fn,supports(){return this.SupportsDeclaration()}};
1function Bn(t="media"){let e=this.createList();t:for(;!this.eof;)switch(this.tokenType){case 25:case 13:this.next();continue;case 1:e.push(this.Identifier());break;case 21:{let n=this.parseWithFallback(()=>jn[t].call(this,t),()=>null);n||(n=this.parseWithFallback(()=>{this.eat(21);let e=this.Condition(t);return this.eat(22),e},()=>this.GeneralEnclosed(t))),e.push(n);break}case 2:{let n=this.parseWithFallback(()=>this.FeatureFunction(t),()=>null);n||(n=this.GeneralEnclosed(t)),e.push(n);break}default:break t}return e.isEmpty&&this.error("Condition is expected"),{type:"Condition",loc:this.getLocationFromList(e),kind:t,children:e}}function Wn(t){t.children.forEach(t=>{"Condition"===t.type?(this.token(21,"("),this.node(t),this.token(22,")")):this.node(t)})}var Mn=e({generate:()=>ei,name:()=>Jn,parse:()=>ti,structure:()=>Zn,walkContext:()=>Kn}),Un=33,zn=35,Vn=36,Hn=38,qn=42,Qn=43,Gn=47;function _n(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!0)}function Xn(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1)}function Yn(){let t=this.tokenIndex,e=this.Value();return"Raw"!==e.type&&!1===this.eof&&17!==this.tokenType&&!1===this.isDelim(Un)&&!1===this.isBalanceEdge(t)&&this.error(),e}var Jn="Declaration",Kn="declaration",Zn={important:[Boolean,String],property:String,value:["Value","Raw"]};function ti(){let t,e=this.tokenStart,n=this.tokenIndex,i=ni.call(this),r=function(t,e){return e=e||0,t.length-e>=2&&45===t.charCodeAt(e)&&45===t.charCodeAt(e+1)}(i),s=r?this.parseCustomProperty:this.parseValue,o=r?Xn:_n,l=!1;this.skipSC(),this.eat(16);let a=this.tokenIndex;if(r||this.skipSC(),t=s?this.parseWithFallback(Yn,o):o.call(this,this.tokenIndex),r&&"Value"===t.type&&t.children.isEmpty)for(let e=a-this.tokenIndex;e<=0;e++)if(13===this.lookupType(e)){t.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.isDelim(Un)&&(l=ii.call(this),this.skipSC()),!1===this.eof&&17!==this.tokenType&&!1===this.isBalanceEdge(n)&&this.error(),{type:"Declaration",loc:this.getLocation(e,this.tokenStart),important:l,property:i,value:t}}function ei(t){this.token(1,t.property),this.token(16,":"),this.node(t.value),t.important&&(this.token(9,"!"),this.token(1,!0===t.important?"important":t.important))}function ni(){let t=this.tokenStart;if(9===this.tokenType)switch(this.charCodeAt(this.tokenStart)){case qn:case Vn:case Qn:case zn:case Hn:this.next();break;case Gn:this.next(),this.isDelim(Gn)&&this.next()}return 4===this.tokenType?this.eat(4):this.eat(1),this.substrToCursor(t)}function ii(){this.eat(9),this.skipSC();let t=this.consume(1);return"important"===t||t}var ri=e({generate:()=>ci,name:()=>li,parse:()=>ui,structure:()=>ai}),si=38;function oi(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}var li="DeclarationList",ai={children:[["Declaration","Atrule","Rule"]]};
1function ui(){let t=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:t.push(this.parseWithFallback(this.Atrule.bind(this,!0),oi));break;default:this.isDelim(si)?t.push(this.parseWithFallback(this.Rule,oi)):t.push(this.parseWithFallback(this.Declaration,oi))}return{type:"DeclarationList",loc:this.getLocationFromList(t),children:t}}function ci(t){this.children(t,t=>{"Declaration"===t.type&&this.token(17,";")})}var hi=e({generate:()=>ki,name:()=>fi,parse:()=>di,structure:()=>pi}),fi="Dimension",pi={value:String,unit:String};function di(){let t=this.tokenStart,e=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(t,this.tokenStart),value:e,unit:this.substring(t+e.length,this.tokenStart)}}function ki(t){this.token(12,t.value+t.unit)}var mi=e({generate:()=>vi,name:()=>gi,parse:()=>Si,structure:()=>bi}),yi=47,gi="Feature",bi={kind:String,name:String,value:["Identifier","Number","Dimension","Ratio","Function",null]};function Si(t){let e,n=this.tokenStart,i=null;if(this.eat(21),this.skipSC(),e=this.consume(1),this.skipSC(),22!==this.tokenType){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:i=9===this.lookupNonWSType(1)?this.Ratio():this.Number();break;case 12:i=this.Dimension();break;case 1:i=this.Identifier();break;case 2:i=this.parseWithFallback(()=>{let t=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(yi)&&this.error(),t},()=>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(n,this.tokenStart),kind:t,name:e,value:i}}function vi(t){this.token(21,"("),this.token(1,t.name),null!==t.value&&(this.token(16,":"),this.node(t.value)),this.token(22,")")}var Ci=e({generate:()=>Ti,name:()=>xi,parse:()=>Ai,structure:()=>wi}),xi="FeatureFunction",wi={kind:String,feature:String,value:["Declaration","Selector"]};function Li(t,e){let n=(this.features[t]||{})[e];return"function"!=typeof n&&this.error(`Unknown feature ${e}()`),n}function Ai(t="unknown"){let e=this.tokenStart,n=this.consumeFunctionName(),i=Li.call(this,t,n.toLowerCase());this.skipSC();let r=this.parseWithFallback(()=>{let t=this.tokenIndex,e=i.call(this);return!1===this.eof&&!1===this.isBalanceEdge(t)&&this.error(),e},()=>this.Raw(null,!1));return this.eof||this.eat(22),{type:"FeatureFunction",loc:this.getLocation(e,this.tokenStart),kind:t,feature:n,value:r}}function Ti(t){this.token(2,t.feature+"("),this.node(t.value),this.token(22,")")}var Ei=e({generate:()=>Bi,name:()=>Oi,parse:()=>ji,structure:()=>Ni}),Pi=47,Di=60,Ri=61,Ii=62,Oi="FeatureRange",Ni={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 $i(){switch(this.skipSC(),this.tokenType){case 10:return this.isDelim(Pi,this.lookupOffsetNonSC(1))?this.Ratio():this.Number();case 12:return this.Dimension();case 1:return this.Identifier();case 2:return this.parseWithFallback(()=>{let t=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(Pi)&&this.error(),t},()=>this.Ratio());default:this.error("Number, dimension, ratio or identifier is expected")}}function Fi(t){if(this.skipSC(),this.isDelim(Di)||this.isDelim(Ii)){let t=this.source[this.tokenStart];return this.next(),this.isDelim(Ri)?(this.next(),t+"="):t}if(this.isDelim(Ri))return"=";this.error(`Expected ${t?'":", ':""}"<", ">", "=" or ")"`)}function ji(t="unknown"){let e=this.tokenStart;this.skipSC(),this.eat(21);let n=$i.call(this),i=Fi.call(this,"Identifier"===n.type),r=$i.call(this),s=null,o=null;return 22!==this.lookupNonWSType(0)&&(s=Fi.call(this),o=$i.call(this)),this.skipSC(),this.eat(22),{type:"FeatureRange",loc:this.getLocation(e,this.tokenStart),kind:t,left:n,leftComparison:i,middle:r,rightComparison:s,right:o}}function Bi(t){this.token(21,"("),this.node(t.left),this.tokenize(t.leftComparison),this.node(t.middle),t.right&&(this.tokenize(t.rightComparison),this.node(t.right)),this.token(22,")")}var Wi=e({generate:()=>Hi,name:()=>Mi,parse:()=>Vi,structure:()=>zi,walkContext:()=>Ui}),Mi="Function",Ui="function",zi={name:String,children:[[]]};function Vi(t,e){let n,i=this.tokenStart,r=this.consumeFunctionName(),s=r.toLowerCase();return n=e.hasOwnProperty(s)?e[s].call(this,e):t.call(this,e),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(i,this.tokenStart),name:r,children:n}}function Hi(t){this.token(2,t.name+"("),this.children(t),this.token(22,")")}var qi=e({generate:()=>Xi,name:()=>Qi,parse:()=>_i,structure:()=>Gi}),Qi="GeneralEnclosed",Gi={kind:String,function:[String,null],children:[[]]};function _i(t){let e=this.tokenStart,n=null;2===this.tokenType?n=this.consumeFunctionName():this.eat(21);let i=this.parseWithFallback(()=>{let t=this.tokenIndex,e=this.readSequence(this.scope.Value);return!1===this.eof&&!1===this.isBalanceEdge(t)&&this.error(),e},()=>this.createSingleNodeList(this.Raw(null,!1)));return this.eof||this.eat(22),{type:"GeneralEnclosed",loc:this.getLocation(e,this.tokenStart),kind:t,function:n,children:i}}function Xi(t){t.function?this.token(2,t.function+"("):this.token(21,"("),this.children(t),this.token(22,")")}var Yi=e({generate:()=>tr,name:()=>Ji,parse:()=>Zi,structure:()=>Ki,xxx:()=>"XXX"}),Ji="Hash",Ki={value:String};function Zi(){let t=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(t,this.tokenStart),value:this.substrToCursor(t+1)}}function tr(t){this.token(4,"#"+t.value)}var er=e({generate:()=>sr,name:()=>nr,parse:()=>rr,structure:()=>ir}),nr="Identifier",ir={name:String};function rr(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function sr(t){this.token(1,t.name)}
1var or=e({generate:()=>cr,name:()=>lr,parse:()=>ur,structure:()=>ar}),lr="IdSelector",ar={name:String};function ur(){let t=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t+1)}}function cr(t){this.token(9,"#"+t.name)}var hr=e({generate:()=>mr,name:()=>pr,parse:()=>kr,structure:()=>dr}),fr=46,pr="Layer",dr={name:String};function kr(){let t=this.tokenStart,e=this.consume(1);for(;this.isDelim(fr);)this.eat(9),e+="."+this.consume(1);return{type:"Layer",loc:this.getLocation(t,this.tokenStart),name:e}}function mr(t){this.tokenize(t.name)}var yr=e({generate:()=>vr,name:()=>gr,parse:()=>Sr,structure:()=>br}),gr="LayerList",br={children:[["Layer"]]};function Sr(){let t=this.createList();for(this.skipSC();!this.eof&&(t.push(this.Layer()),18===this.lookupTypeNonSC(0));)this.skipSC(),this.next(),this.skipSC();return{type:"LayerList",loc:this.getLocationFromList(t),children:t}}function vr(t){this.children(t,()=>this.token(18,","))}var Cr=e({generate:()=>Ar,name:()=>xr,parse:()=>Lr,structure:()=>wr}),xr="MediaQuery",wr={modifier:[String,null],mediaType:[String,null],condition:["Condition",null]};function Lr(){let t=this.tokenStart,e=null,n=null,i=null;if(this.skipSC(),1===this.tokenType&&21!==this.lookupTypeNonSC(1)){let t=this.consume(1),r=t.toLowerCase();switch("not"===r||"only"===r?(this.skipSC(),e=r,n=this.consume(1)):n=t,this.lookupTypeNonSC(0)){case 1:this.skipSC(),this.eatIdent("and"),i=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:i=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(t,this.tokenStart),modifier:e,mediaType:n,condition:i}}function Ar(t){t.mediaType?(t.modifier&&this.token(1,t.modifier),this.token(1,t.mediaType),t.condition&&(this.token(1,"and"),this.node(t.condition))):t.condition&&this.node(t.condition)}var Tr=e({generate:()=>Rr,name:()=>Er,parse:()=>Dr,structure:()=>Pr}),Er="MediaQueryList",Pr={children:[["MediaQuery"]]};
1function Dr(){let t=this.createList();for(this.skipSC();!this.eof&&(t.push(this.MediaQuery()),18===this.tokenType);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(t),children:t}}function Rr(t){this.children(t,()=>this.token(18,","))}var Ir=e({generate:()=>jr,name:()=>Nr,parse:()=>Fr,structure:()=>$r}),Or=38,Nr="NestingSelector",$r={};function Fr(){let t=this.tokenStart;return this.eatDelim(Or),{type:"NestingSelector",loc:this.getLocation(t,this.tokenStart)}}function jr(){this.token(9,"&")}var Br=e({generate:()=>Ur,name:()=>"Nth",parse:()=>Mr,structure:()=>Wr}),Wr={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function Mr(){this.skipSC();let t,e=this.tokenStart,n=e,i=null;return t=this.lookupValue(0,"odd")||this.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),n=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),i=this.SelectorList(),n=this.tokenStart),{type:"Nth",loc:this.getLocation(e,n),nth:t,selector:i}}function Ur(t){this.node(t.nth),null!==t.selector&&(this.token(1,"of"),this.node(t.selector))}var zr=e({generate:()=>Qr,name:()=>Vr,parse:()=>qr,structure:()=>Hr}),Vr="Number",Hr={value:String};function qr(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function Qr(t){this.token(10,t.value)}var Gr=e({generate:()=>Jr,name:()=>_r,parse:()=>Yr,structure:()=>Xr}),_r="Operator",Xr={value:String};function Yr(){let t=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(t,this.tokenStart),value:this.substrToCursor(t)}}function Jr(t){this.tokenize(t.value)}var Kr=e({generate:()=>ns,name:()=>Zr,parse:()=>es,structure:()=>ts}),Zr="Parentheses",ts={children:[[]]};function es(t,e){let n=this.tokenStart,i=null;return this.eat(21),i=t.call(this,e),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(n,this.tokenStart),children:i}}function ns(t){this.token(21,"("),this.children(t),this.token(22,")")}var is=e({generate:()=>ls,name:()=>rs,parse:()=>os,structure:()=>ss}),rs="Percentage",ss={value:String};function os(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function ls(t){this.token(11,t.value+"%")}var as=e({generate:()=>ps,name:()=>us,parse:()=>fs,structure:()=>hs,walkContext:()=>cs}),us="PseudoClassSelector",cs="function",hs={name:String,children:[["Raw"],null]};function fs(){let t,e,n=this.tokenStart,i=null;return this.eat(16),2===this.tokenType?(t=this.consumeFunctionName(),e=t.toLowerCase(),22==this.lookupNonWSType(0)?i=this.createList(
1):hasOwnProperty.call(this.pseudo,e)?(this.skipSC(),i=this.pseudo[e].call(this),this.skipSC()):(i=this.createList(),i.push(this.Raw(null,!1))),this.eat(22)):t=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(n,this.tokenStart),name:t,children:i}}function ps(t){this.token(16,":"),null===t.children?this.token(1,t.name):(this.token(2,t.name+"("),this.children(t),this.token(22,")"))}var ds=e({generate:()=>bs,name:()=>ks,parse:()=>gs,structure:()=>ys,walkContext:()=>ms}),ks="PseudoElementSelector",ms="function",ys={name:String,children:[["Raw"],null]};function gs(){let t,e,n=this.tokenStart,i=null;return this.eat(16),this.eat(16),2===this.tokenType?(t=this.consumeFunctionName(),e=t.toLowerCase(),22==this.lookupNonWSType(0)?i=this.createList():hasOwnProperty.call(this.pseudo,e)?(this.skipSC(),i=this.pseudo[e].call(this),this.skipSC()):(i=this.createList(),i.push(this.Raw(null,!1))),this.eat(22)):t=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(n,this.tokenStart),name:t,children:i}}function bs(t){this.token(16,":"),this.token(16,":"),null===t.children?this.token(1,t.name):(this.token(2,t.name+"("),this.children(t),this.token(22,")"))}var Ss=e({generate:()=>As,name:()=>xs,parse:()=>Ls,structure:()=>ws}),vs=47;function Cs(){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")}}var xs="Ratio",ws={left:["Number","Function"],right:["Number","Function",null]};function Ls(){let t=this.tokenStart,e=Cs.call(this),n=null;return this.skipSC(),this.isDelim(vs)&&(this.eatDelim(vs),n=Cs.call(this)),{type:"Ratio",loc:this.getLocation(t,this.tokenStart),left:e,right:n}}function As(t){this.node(t.left),this.token(9,"/"),t.right?this.node(t.right):this.node(10,1)}var Ts=e({generate:()=>Rs,name:()=>"Raw",parse:()=>Ds,structure:()=>Ps});function Es(){return this.tokenIndex>0&&13===this.lookupType(-1)?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}var Ps={value:String};function Ds(t,e){let n,i=this.getTokenStart(this.tokenIndex);return this.skipUntilBalanced(this.tokenIndex,t||this.consumeUntilBalanceEnd),n=e&&this.tokenStart>i?Es.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(i,n),value:this.substring(i,n)}}function Rs(t){this.tokenize(t.value)}var Is=e({generate:()=>Ws,name:()=>$s,parse:()=>Bs,structure:()=>js,walkContext:()=>Fs});function Os(){return this.Raw(this.consumeUntilLeftCurlyBracket,!0)}function Ns(){let t=this.SelectorList();return"Raw"!==t.type&&!1===this.eof&&23!==this.tokenType&&this.error(),t}var $s="Rule",Fs="rule",js={prelude:["SelectorList","Raw"],block:["Block"]};function Bs(){let t,e,n=this.tokenIndex,i=this.tokenStart;return t=this.parseRulePrelude?this.parseWithFallback(Ns,Os):Os.call(this,n),e=this.Block(!0),{type:"Rule",loc:this.getLocation(i,this.tokenStart),prelude:t,block:e}}function Ws(t){this.node(t.prelude),this.node(t.block)}var Ms=e({generate:()=>Hs,name:()=>Us,parse:()=>Vs,structure:()=>zs}),Us="Scope",zs={root:["SelectorList","Raw",null],limit:["SelectorList","Raw",null]};function Vs(){let t=null,e=null;this.skipSC();let n=this.tokenStart;return 21===this.tokenType&&(this.next(),this.skipSC(),t=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),1===this.lookupNonWSType(0)&&(this.skipSC(),this.eatIdent("to"),this.skipSC(),this.eat(21),this.skipSC(),e=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),{type:"Scope",loc:this.getLocation(n,this.tokenStart),root:t,limit:e}}function Hs(t){t.root&&(this.token(21,"("),this.node(t.root),this.token(22,")")),t.limit&&(this.token(1,"to"),this.token(21,"("),this.node(t.limit),this.token(22,")"))}var qs=e({generate:()=>Xs,name:()=>Qs,parse:()=>_s,structure:()=>Gs}),Qs="Selector",Gs={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator"]]};function _s(){let t=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(t)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(t),children:t}}function Xs(t){this.children(t)}var Ys=e({generate:()=>eo,name:()=>Js,parse:()=>to,structure:()=>Zs,walkContext:()=>Ks}),Js="SelectorList",Ks="selector",Zs={children:[["Selector","Raw"]]};
1function to(){let t=this.createList();for(;!this.eof&&(t.push(this.Selector()),18===this.tokenType);)this.next();return{type:"SelectorList",loc:this.getLocationFromList(t),children:t}}function eo(t){this.children(t,()=>this.token(18,","))}var no=e({generate:()=>oo,name:()=>io,parse:()=>so,structure:()=>ro}),io="String",ro={value:String};function so(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Ht(this.consume(5))}}function oo(t){this.token(5,function(t){let e="",n=!1;for(let i=0;i<t.length;i++){let r=t.charCodeAt(i);0!==r?r<=31||127===r?(e+="\\"+r.toString(16),n=!0):34===r||92===r?(e+="\\"+t.charAt(i),n=!1):(n&&(ut(r)||kt(r))&&(e+=" "),e+=t.charAt(i),n=!1):e+="�"}return'"'+e+'"'}(t.value))}var lo=e({generate:()=>ko,name:()=>co,parse:()=>po,structure:()=>fo,walkContext:()=>ho}),ao=33;function uo(){return this.Raw(null,!1)}var co="StyleSheet",ho="stylesheet",fo={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function po(){let t,e=this.tokenStart,n=this.createList();for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==ao){this.next();continue}t=this.Comment();break;case 14:t=this.CDO();break;case 15:t=this.CDC();break;case 3:t=this.parseWithFallback(this.Atrule,uo);break;default:t=this.parseWithFallback(this.Rule,uo)}n.push(t)}return{type:"StyleSheet",loc:this.getLocation(e,this.tokenStart),children:n}}function ko(t){this.children(t)}var mo=e({generate:()=>So,name:()=>yo,parse:()=>bo,structure:()=>go}),yo="SupportsDeclaration",go={declaration:"Declaration"};function bo(){let t=this.tokenStart;this.eat(21),this.skipSC();let e=this.Declaration();return this.eof||this.eat(22),{type:"SupportsDeclaration",loc:this.getLocation(t,this.tokenStart),declaration:e}}function So(t){this.token(21,"("),this.node(t.declaration),this.token(22,")")}var vo=e({generate:()=>Eo,name:()=>Lo,parse:()=>To,structure:()=>Ao}),Co=42,xo=124;function wo(){1!==this.tokenType&&!1===this.isDelim(Co)&&this.error("Identifier or asterisk is expected"),this.next()}var Lo="TypeSelector",Ao={name:String};function To(){let t=this.tokenStart;return this.isDelim(xo)?(this.next(),wo.call(this)):(wo.call(this),this.isDelim(xo)&&(this.next(),wo.call(this))),{type:"TypeSelector",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t)}}function Eo(t){this.tokenize(t.name)}var Po=e({generate:()=>Mo,name:()=>jo,parse:()=>Wo,structure:()=>Bo}),Do=43,Ro=45,Io=63;function Oo(t,e){let n=0;for(let i=this.tokenStart+t;i<this.tokenEnd;i++){let r=this.charCodeAt(i);if(r===Ro&&e&&0!==n)return Oo.call(this,t+n+1,!1),-1;ut(r)||this.error(e&&0!==n?"Hyphen minus"+(n<6?" or hex digit":"")+" is expected":n<6?"Hex digit is expected":"Unexpected input",i),++n>6&&this.error("Too many hex digits",i)}return this.next(),n}function No(t){let e=0;for(;this.isDelim(Io);)++e>t&&this.error("Too many question marks"),this.next()}function $o(t){this.charCodeAt(this.tokenStart)!==t&&this.error((t===Do?"Plus sign":"Hyphen minus")+" is expected")}function Fo(){let t=0;switch(this.tokenType){case 10:if(t=Oo.call(this,1,!0),this.isDelim(Io)){No.call(this,6-t);break}if(12===this.tokenType||10===this.tokenType){$o.call(this,Ro),Oo.call(this,1,!1);break}break;case 12:t=Oo.call(this,1,!0),t>0&&No.call(this,6-t);break;default:if(this.eatDelim(Do),1===this.tokenType){t=Oo.call(this,0,!0),t>0&&No.call(this,6-t);break}if(this.isDelim(Io)){this.next(),No.call(this,5);break}this.error("Hex digit or question mark is expected")}}var jo="UnicodeRange",Bo={value:String};function Wo(){let t=this.tokenStart;return this.eatIdent("u"),Fo.call(this),{type:"UnicodeRange",loc:this.getLocation(t,this.tokenStart),value:this.substrToCursor(t)}}function Mo(t){this.tokenize(t.value)}var Uo=e({generate:()=>Ho,name:()=>"Url",parse:()=>Vo,structure:()=>zo}),zo={value:String};function Vo(){let t,e=this.tokenStart;switch(this.tokenType){case 7:t=function(t){let e=t.length,n=4,i=41===t.charCodeAt(e-1)?e-2:e-1,r="";for(;n<i&&kt(t.charCodeAt(n));)n++;for(;n<i&&kt(t.charCodeAt(i));)i--;for(let s=n;s<=i;s++){let n=t.charCodeAt(s);if(92===n){if(s===i){s!==e-1&&(r=t.substr(s+1));break}if(n=t.charCodeAt(++s),mt(92,n)){let e=s-1,n=Et(t,e);s=n-1,r+=It(t.substring(e+1,n))}else 13===n&&10===t.charCodeAt(s+1)&&s++}else r+=t[s]}return r}(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=Ht(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 Ho(t){this.token(7,function(t){let e="",n=!1;for(let i=0;i<t.length;i++){let r=t.charCodeAt(i);0!==r?r<=31||127===r?(e+="\\"+r.toString(16),n=!0):32===r||92===r||34===r||39===r||40===r||41===r?(e+="\\"+t.charAt(i),n=!1):(n&&ut(r)&&(e+=" "),e+=t.charAt(i),n=!1):e+="�"}
1return"url("+e+")"}(t.value))}var qo=e({generate:()=>Xo,name:()=>Qo,parse:()=>_o,structure:()=>Go}),Qo="Value",Go={children:[[]]};function _o(){let t=this.tokenStart,e=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(t,this.tokenStart),children:e}}function Xo(t){this.children(t)}var Yo=e({generate:()=>el,name:()=>Ko,parse:()=>tl,structure:()=>Zo}),Jo=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),Ko="WhiteSpace",Zo={value:String};function tl(){return this.eat(13),Jo}function el(t){this.token(13,t.value)}var nl=function(t){let e=function(t){let e={};for(let n in t.node)if(qt.call(t.node,n)){let i=t.node[n];if(!i.structure)throw Error("Missed `structure` field in `"+n+"` node type definition");e[n]=Xt(0,i)}return e}(t),n={},i={},r=Symbol("break-walk"),s=Symbol("skip-node");for(let t in e)qt.call(e,t)&&null!==e[t]&&(n[t]=Yt(e[t],!1),i[t]=Yt(e[t],!0));let o=Jt(n),l=Jt(i),a=function(t,a){function u(t,e,n){let i=c.call(d,t,e,n);return i===r||i!==s&&!!(f.hasOwnProperty(t.type)&&f[t.type](t,d,u,p)||h.call(d,t,e,n)===r)}let c=Qt,h=Qt,f=n,p=(t,e,n,i)=>t||u(e,n,i),d={break:r,skip:s,root:t,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if("function"==typeof a)c=a;else if(a&&(c=Gt(a.enter),h=Gt(a.leave),a.reverse&&(f=i),a.visit)){if(o.hasOwnProperty(a.visit))f=a.reverse?l[a.visit]:o[a.visit];else if(!e.hasOwnProperty(a.visit))throw Error("Bad value `"+a.visit+"` for `visit` option (should be: "+Object.keys(e).sort().join(", ")+")");c=_t(c,a.visit),h=_t(h,a.visit)}if(c===Qt&&h===Qt)throw Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");u(t)};return a.break=r,a.skip=s,a.find=function(t,e){let n=null;return a(t,function(t,i,s){if(e.call(this,t,i,s))return n=t,r}),n},a.findLast=function(t,e){let n=null;return a(t,{reverse:!0,enter(t,i,s){if(e.call(this,t,i,s))return n=t,r}}),n},a.findAll=function(t,e){let n=[];return a(t,function(t,i,r){e.call(this,t,i,r)&&n.push(t)}),n},a}({node:e({AnPlusB:()=>Kt,Atrule:()=>fe,AtrulePrelude:()=>Se,AttributeSelector:()=>Ae,Block:()=>We,Brackets:()=>Ye,CDC:()=>en,CDO:()=>on,ClassSelector:()=>cn,Combinator:()=>mn,Comment:()=>Ln,Condition:()=>In,Declaration:()=>Mn,DeclarationList:()=>ri,Dimension:()=>hi,Feature:()=>mi,FeatureFunction:()=>Ci,FeatureRange:()=>Ei,Function:()=>Wi,GeneralEnclosed:()=>qi,Hash:()=>Yi,IdSelector:()=>or,Identifier:()=>er,Layer:()=>hr,LayerList:()=>yr,MediaQuery:()=>Cr,MediaQueryList:()=>Tr,NestingSelector:()=>Ir,Nth:()=>Br,Number:()=>zr,Operator:()=>Gr,Parentheses:()=>Kr,Percentage:()=>is,PseudoClassSelector:()=>as,PseudoElementSelector:()=>ds,Ratio:()=>Ss,Raw:()=>Ts,Rule:()=>Is,Scope:()=>Ms,Selector:()=>qs,SelectorList:()=>Ys,String:()=>no,StyleSheet:()=>lo,SupportsDeclaration:()=>mo,TypeSelector:()=>vo,UnicodeRange:()=>Po,Url:()=>Uo,Value:()=>qo,WhiteSpace:()=>Yo})}),il=["left","right","top","bottom","inset-block-start","inset-block-end","inset-inline-start","inset-inline-end","inset-block","inset-inline","inset"];function rl(t){return il.includes(t)}var sl=["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"];var ol=["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 ll(t){return ol.includes(t)}var al=["padding","padding-top","padding-right","padding-bottom","padding-left","padding-block","padding-inline","padding-block-start","padding-block-end","padding-inline-start","padding-inline-end"],ul=["justify-self","align-self","place-self"];var cl=[...il,...sl,...ol,...ul,"position-anchor","position-area"],hl=[...ol,...il,...sl];function fl(t){return hl.includes(t)}var pl=["top","left","right","bottom","start","end","self-start","self-end","center","inside","outside"];function dl(t){return pl.includes(t)}var kl=["width","height","block","inline","self-block","self-inline"];var ml=new Set(["Atrule","Selector","Declaration"]);var yl=e({safe:()=>xl,spec:()=>Cl}),gl=(t,e)=>(9===t&&(t=e),"string"==typeof t&&(t=Math.min(t.charCodeAt(0),128)<<6),t<<1),bl=[[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],["/","*"]],Sl=bl.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 vl(t){let e=new Set(t.map(([t,e])=>gl(t)<<16|gl(e)));return function(t,n,i){let r=gl(n,i),s=i.charCodeAt(0);return r|(45===s&&1!==n&&2!==n&&15!==n||43===s?e.has((65534&t)<<16|s<<7):e.has((65534&t)<<16|r))}}var Cl=vl(bl),xl=vl(Sl);function wl(t,e){if("function"==typeof e){let n=null;
1return void t.children.forEach(t=>{null!==n&&e.call(this,n),this.node(t),n=t})}t.children.forEach(this.node,this)}var Ll=function(t){let e=new Map;for(let[n,i]of Object.entries(t.node))"function"==typeof(i.generate||i)&&e.set(n,i.generate||i);return function(t,n){let i="",r=0,s={node(t){if(!e.has(t.type))throw Error("Unknown node type: "+t.type);e.get(t.type).call(o,t)},tokenBefore:xl,token(t,e,n){r=this.tokenBefore(r,t,e),!n&&1&r&&this.emit(" ",13,!0),this.emit(e,t,!1),9===t&&92===e.charCodeAt(0)&&this.emit("\n",13,!0)},emit(t){i+=t},result:()=>i};n&&("function"==typeof n.decorator&&(s=n.decorator(s)),n.sourceMap&&(s=function(t){let e=new SourceMapGenerator,n={line:1,column:0},i={line:0,column:0},r={line:1,column:0},s={generated:r},o=1,l=0,a=!1,u=t.node;t.node=function(t){if(t.loc&&t.loc.start&&ml.has(t.type)){let u=t.loc.start.line,c=t.loc.start.column-1;(i.line!==u||i.column!==c)&&(i.line=u,i.column=c,n.line=o,n.column=l,a&&(a=!1,(n.line!==r.line||n.column!==r.column)&&e.addMapping(s)),a=!0,e.addMapping({source:t.loc.source,original:i,generated:n}))}u.call(this,t),a&&ml.has(t.type)&&(r.line=o,r.column=l)};let c=t.emit;t.emit=function(t,e,n){for(let e=0;e<t.length;e++)10===t.charCodeAt(e)?(o++,l=0):l++;c(t,e,n)};let h=t.result;return t.result=function(){return a&&e.addMapping(s),{css:h(),map:e}},t}(s)),n.mode in yl&&(s.tokenBefore=yl[n.mode]));let o={node:t=>s.node(t),children:wl,token:(t,e)=>s.token(t,e),tokenize:t=>Vt(t,(e,n,i)=>{s.token(e,t.slice(n,i),0!==n)})};return s.node(t),s.result()}}({node:e({AnPlusB:()=>he,Atrule:()=>be,AtrulePrelude:()=>Le,AttributeSelector:()=>Be,Block:()=>Xe,Brackets:()=>tn,CDC:()=>sn,CDO:()=>un,ClassSelector:()=>kn,Combinator:()=>wn,Comment:()=>Rn,Condition:()=>Wn,Declaration:()=>ei,DeclarationList:()=>ci,Dimension:()=>ki,Feature:()=>vi,FeatureFunction:()=>Ti,FeatureRange:()=>Bi,Function:()=>Hi,GeneralEnclosed:()=>Xi,Hash:()=>tr,IdSelector:()=>cr,Identifier:()=>sr,Layer:()=>mr,LayerList:()=>vr,MediaQuery:()=>Ar,MediaQueryList:()=>Rr,NestingSelector:()=>jr,Nth:()=>Ur,Number:()=>Qr,Operator:()=>Jr,Parentheses:()=>ns,Percentage:()=>ls,PseudoClassSelector:()=>ps,PseudoElementSelector:()=>bs,Ratio:()=>As,Raw:()=>Rs,Rule:()=>Ws,Scope:()=>Hs,Selector:()=>Xs,SelectorList:()=>eo,String:()=>oo,StyleSheet:()=>ko,SupportsDeclaration:()=>So,TypeSelector:()=>Eo,UnicodeRange:()=>Mo,Url:()=>Ho,Value:()=>Xo,WhiteSpace:()=>el})});function Al({source:t,line:e,column:n,baseLine:i,baseColumn:r},s){function o(t,e){return l.slice(t,e).map((e,n)=>String(t+n+1).padStart(c)+" |"+e).join("\n")}let l=("\n".repeat(Math.max(i-1,0))+" ".repeat(Math.max(r-1,0))+t).split(/\r\n?|\n|\f/),a=Math.max(1,e-s)-1,u=Math.min(e+s,l.length+1),c=Math.max(4,String(u).length)+1,h=0;(n+=3*(l[e-1].substr(0,n-1).match(/\t/g)||[]).length)>100&&(h=n-60+3,n=58);for(let t=a;t<=u;t++)t>=0&&t<l.length&&(l[t]=l[t].replace(/\t/g,"    "),l[t]=(h>0&&l[t].length>h?"…":"")+l[t].substr(h,98)+(l[t].length>h+100-1?"…":""));return[o(a,e),Array(n+c+2).join("-")+"^",o(e,u)].filter(Boolean).join("\n").replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}function Tl(t,e,n,i,r,s=1,o=1){return Object.assign(function(t,e){let n=Object.create(SyntaxError.prototype),i=Error();return Object.assign(n,{name:t,message:e,get stack(){return(i.stack||"").replace(/^(.+\n){1,3}/,`${t}: ${e}\n`)}})}("SyntaxError",t),{source:e,offset:n,line:i,column:r,sourceFragment:t=>Al({source:e,line:i,column:r,baseLine:s,baseColumn:o},isNaN(t)?0:t),get formattedMessage(){return`Parse error: ${t}\n`+Al({source:e,line:i,column:r,baseLine:s,baseColumn:o},2)}})}
1function El(t){let e=this.createList(),n=!1,i={recognizer:t};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:n=!0,this.next();continue}let r=t.getNode.call(this,i);if(void 0===r)break;n&&(t.onWhiteSpace&&t.onWhiteSpace.call(this,r,e,i),n=!1),e.push(r)}return n&&t.onWhiteSpace&&t.onWhiteSpace.call(this,null,e,i),e}var Pl=()=>{},Dl={createList:()=>[],createSingleNodeList:t=>[t],getFirstListNode:t=>t&&t[0]||null,getLastListNode:t=>t&&t.length>0?t[t.length-1]:null},Rl={createList:()=>new ot,createSingleNodeList:t=>(new ot).appendData(t),getFirstListNode:t=>t&&t.first,getLastListNode:t=>t&&t.last};function Il(t){return function(){return this[t]()}}function Ol(t){let e=Object.create(null);for(let n of Object.keys(t)){let i=t[n],r=i.parse||i;r&&(e[n]=r)}return e}function Nl(t){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,t.recognizer);case 19:return this.Brackets(this.readSequence,t.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,t.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 t=this.charCodeAt(this.tokenStart);if(47===t||42===t||43===t||45===t)return this.Operator();35===t&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}var $l={getNode:Nl};var Fl={onWhiteSpace:function(t,e){null!==e.last&&"Combinator"!==e.last.type&&null!==t&&"Combinator"!==t.type&&e.push({type:"Combinator",loc:null,name:" "})},getNode:function(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return 16===this.lookupType(1)?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:46===this.charCodeAt(this.tokenStart)&&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()}}}};function jl(t){return null!==t&&"Operator"===t.type&&("-"===t.value[t.value.length-1]||"+"===t.value[t.value.length-1])}var Bl={getNode:Nl,onWhiteSpace(t,e){jl(t)&&(t.value=" "+t.value),jl(e.last)&&(e.last.value+=" ")},expression:function(){return this.createSingleNodeList(this.Raw(null,!1))}
1,var:function(){let t=this.createList();if(this.skipSC(),t.push(this.Identifier()),this.skipSC(),18===this.tokenType){t.push(this.Operator());let e=this.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1);if("Value"===n.type&&n.children.isEmpty)for(let t=e-this.tokenIndex;t<=0;t++)if(13===this.lookupType(t)){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}t.push(n)}return t}},Wl=e({AtrulePrelude:()=>$l,Selector:()=>Fl,Value:()=>Bl}),Ml=new Set(["none","and","not","or"]),Ul={parse:{prelude(){let t=this.createList();if(1===this.tokenType){let e=this.substring(this.tokenStart,this.tokenEnd);Ml.has(e.toLowerCase())||t.push(this.Identifier())}return t.push(this.Condition("container")),t},block(t=!1){return this.Block(t)}}},zl={parse:{prelude:null,block(){return this.Block(!0)}}};function Vl(t,e){return this.parseWithFallback(()=>{try{return t.call(this)}finally{this.skipSC(),22!==this.lookupNonWSType(0)&&this.error()}},e||(()=>this.Raw(null,!0)))}var Hl={layer(){this.skipSC();
1let t=this.createList(),e=Vl.call(this,this.Layer);return("Raw"!==e.type||""!==e.value)&&t.push(e),t},supports(){this.skipSC();let t=this.createList(),e=Vl.call(this,this.Declaration,()=>Vl.call(this,()=>this.Condition("supports")));return("Raw"!==e.type||""!==e.value)&&t.push(e),t}},ql={container:Ul,"font-face":zl,import:{parse:{prelude(){let t=this.createList();switch(this.tokenType){case 5:t.push(this.String());break;case 7:case 2:t.push(this.Url());break;default:this.error("String or url() is expected")}return this.skipSC(),1===this.tokenType&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer")?t.push(this.Identifier()):2===this.tokenType&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer(")&&t.push(this.Function(null,Hl)),this.skipSC(),2===this.tokenType&&this.cmpStr(this.tokenStart,this.tokenEnd,"supports(")&&t.push(this.Function(null,Hl)),(1===this.lookupNonWSType(0)||21===this.lookupNonWSType(0))&&t.push(this.MediaQueryList()),t},block:null}},layer:{parse:{prelude(){return this.createSingleNodeList(this.LayerList())},block(){return this.Block(!1)}}},media:{parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(t=!1){return this.Block(t)}}},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(t=!1){return this.Block(t)}}},"starting-style":{parse:{prelude:null,block(t=!1){return this.Block(t)}}},supports:{parse:{prelude(){return this.createSingleNodeList(this.Condition("supports"))},block(t=!1){return this.Block(t)}}}};var Ql={parse(){return this.createSingleNodeList(this.SelectorList())}},Gl={parse(){return this.createSingleNodeList(this.Selector())}},_l={parse(){return this.createSingleNodeList(this.Identifier())}}
1,Xl={parse:function(){let t=this.createList();this.skipSC();t:for(;!this.eof;){switch(this.tokenType){case 1:t.push(this.Identifier());break;case 5:t.push(this.String());break;case 18:t.push(this.Operator());break;case 22:break t;default:this.error("Identifier, string or comma is expected")}this.skipSC()}return t}},Yl={parse(){return this.createSingleNodeList(this.Nth())}},Jl=function(t){let e="",n="<unknown>",i=!1,r=Pl,s=!1,o=new Ft,l=Object.assign(new zt,function(t){let e={context:Object.create(null),features:Object.assign(Object.create(null),t.features),scope:Object.assign(Object.create(null),t.scope),atrule:Ol(t.atrule),pseudo:Ol(t.pseudo),node:Ol(t.node)};for(let[n,i]of Object.entries(t.parseContext))switch(typeof i){case"function":e.context[n]=i;break;case"string":e.context[n]=Il(i)}return d(d({config:e},e),e.node)}(t||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:El,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket:t=>+(123===t),consumeUntilLeftCurlyBracketOrSemicolon:t=>+(123===t||59===t),consumeUntilExclamationMarkOrSemicolon:t=>+(33===t||59===t),consumeUntilSemicolonIncluded:t=>59===t?2:0,createList:Pl,createSingleNodeList:Pl,getFirstListNode:Pl,getLastListNode:Pl,parseWithFallback(t,e){let n=this.tokenIndex;try{return t.call(this)}catch(t){if(s)throw t;this.skip(n-this.tokenIndex);let i=e.call(this);return s=!0,r(t,i),s=!1,i}},lookupNonWSType(t){let e;do{if(e=this.lookupType(t++),13!==e&&25!==e)return e}while(0!==e);return 0}
1,charCodeAt:t=>t>=0&&t<e.length?e.charCodeAt(t):0,substring:(t,n)=>e.substring(t,n),substrToCursor(t){return this.source.substring(t,this.tokenStart)},cmpChar:(t,n)=>wt(e,t,n),cmpStr:(t,n,i)=>Lt(e,t,n,i),consume(t){let e=this.tokenStart;return this.eat(t),this.substrToCursor(e)},consumeFunctionName(){let t=e.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),t},consumeNumber(t){let n=e.substring(this.tokenStart,Dt(e,this.tokenStart));return this.eat(t),n},eat(t){if(this.tokenType!==t){let e=Ot[t].slice(0,-6).replace(/-/g," ").replace(/^./,t=>t.toUpperCase()),n=`${/[[\](){}]/.test(e)?`"${e}"`:e} is expected`,i=this.tokenStart;switch(t){case 1:2===this.tokenType||7===this.tokenType?(i=this.tokenEnd-1,n="Identifier is expected but function found"):n="Identifier is expected";break;case 4:this.isDelim(35)&&(this.next(),i++,n="Name is expected");break;case 11:10===this.tokenType&&(i=this.tokenEnd,n="Percent sign is expected")}this.error(n,i)}this.next()},eatIdent(t){(1!==this.tokenType||!1===this.lookupValue(0,t))&&this.error(`Identifier "${t}" is expected`),this.next()},eatDelim(t){this.isDelim(t)||this.error(`Delim "${String.fromCharCode(t)}" is expected`),this.next()},getLocation:(t,e)=>i?o.getLocationRange(t,e,n):null,getLocationFromList(t){if(i){let e=this.getFirstListNode(t),i=this.getLastListNode(t);return o.getLocationRange(null===e?this.tokenStart:e.loc.start.offset-o.startOffset,null===i?this.tokenStart:i.loc.end.offset-o.startOffset,n)}return null},error(t,n){let i=void 0!==n&&n<e.length?o.getLocation(n):this.eof?o.getLocation(function(t,e){for(;e>=0&&kt(t.charCodeAt(e));e--);return e+1}(e,e.length-1)):o.getLocation(this.tokenStart);throw new Tl(t||"Unexpected input",e,i.offset,i.line,i.column,o.startLine,o.startColumn)}});return Object.assign(function(t,a){e=t,a=a||{},l.setSource(e,Vt),o.setSource(e,a.offset,a.line,a.column),n=a.filename||"<unknown>",i=!!a.positions,r="function"==typeof a.onParseError?a.onParseError:Pl,s=!1,l.parseAtrulePrelude=!("parseAtrulePrelude"in a)||!!a.parseAtrulePrelude,l.parseRulePrelude=!("parseRulePrelude"in a)||!!a.parseRulePrelude,l.parseValue=!("parseValue"in a)||!!a.parseValue,l.parseCustomProperty="parseCustomProperty"in a&&!!a.parseCustomProperty;let{context:u="default",list:c=!0,onComment:h,onToken:f}=a;if(!(u in l.context))throw Error("Unknown context `"+u+"`");Object.assign(l,c?Rl:Dl),Array.isArray(f)?l.forEachToken((t,e,n)=>{f.push({type:t,start:e,end:n})}):"function"==typeof f&&l.forEachToken(f.bind({filename:n,source:e,tokenCount:l.tokenCount,getTokenType:t=>l.getTokenType(t),getTokenTypeName:t=>Ot[l.getTokenType(t)],getTokenStart:t=>l.getTokenStart(t),getTokenEnd:t=>l.getTokenEnd(t),getTokenValue:t=>l.source.substring(l.getTokenStart(t),l.getTokenEnd(t)),substring:(t,e)=>l.source.substring(t,e),balance:l.balance.subarray(0,l.tokenCount+1),isBlockOpenerTokenType:l.isBlockOpenerTokenType,isBlockCloserTokenType:l.isBlockCloserTokenType,getBlockTokenPairIndex:t=>l.getBlockTokenPairIndex(t),getLocation:t=>o.getLocation(t,n),getRangeLocation:(t,e)=>o.getLocationRange(t,e,n)})),"function"==typeof h&&l.forEachToken((t,n,i)=>{if(25===t){let t=l.getLocation(n,i),r=Lt(e,i-2,i,"*/")?e.slice(n+2,i-2):e.slice(n+2,i);h(r,t)}});let p=l.context[u].call(l,a);return l.eof||l.error(),p},{SyntaxError:Tl,config:l.config})}({parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(t){return this.AtrulePrelude(t.atrule?String(t.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",condition(t){return this.Condition(t.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:Wl,atrule:ql,pseudo:{dir:_l,has:Ql,lang:Xl,matches:Ql,is:Ql,"-moz-any":Ql,"-webkit-any":Ql,where:Ql,not:Ql,"nth-child":Yl,"nth-last-child":Yl,"nth-last-of-type":Yl,"nth-of-type":Yl,slotted:Gl,host:Gl,"host-context":Gl},node:e({AnPlusB:()=>ce,Atrule:()=>ge,AtrulePrelude:()=>we,AttributeSelector:()=>je,Block:()=>_e,Brackets:()=>Ze,CDC:()=>rn,CDO:()=>an,ClassSelector:()=>dn,Combinator:()=>xn,Comment:()=>Dn,Condition:()=>Bn,Declaration:()=>ti,DeclarationList:()=>ui,Dimension:()=>di,Feature:()=>Si,FeatureFunction:()=>Ai,FeatureRange:()=>ji,Function:()=>Vi,GeneralEnclosed:()=>_i,Hash:()=>Zi,IdSelector:()=>ur,Identifier:()=>rr,Layer:()=>kr,LayerList:()=>Sr,MediaQuery:()=>Lr,MediaQueryList:()=>Dr,NestingSelector:()=>Fr,Nth:()=>Mr,Number:()=>qr,Operator:()=>Yr,Parentheses:()=>es,Percentage:()=>os,PseudoClassSelector:()=>fs,PseudoElementSelector:()=>gs,Ratio:()=>Ls,Raw:()=>Ds,Rule:()=>Bs,Scope:()=>Vs,Selector:()=>_s,SelectorList:()=>
1to,String:()=>so,StyleSheet:()=>po,SupportsDeclaration:()=>bo,TypeSelector:()=>To,UnicodeRange:()=>Wo,Url:()=>Vo,Value:()=>_o,WhiteSpace:()=>tl})}),Kl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Zl=(t=21)=>{let e="",n=0|t;for(;n-- >0;)e+=Kl[64*Math.random()|0];return e},ta="all";function ea(t,e){var n;return e=null==(n=Pa[e])?e:n,(t instanceof HTMLElement?getComputedStyle(t):t.computedStyle).getPropertyValue(e).trim()}function na(t,e,n){return ea(t,e)===n}function ia(t,{selector:e,pseudoElementPart:n}){var i;let r=getComputedStyle(t,n),s=document.createElement("div"),o=document.createElement("style");s.id=`fake-pseudo-element-${Zl()}`;for(let t of Array.from(r)){let e=r.getPropertyValue(t);s.style.setProperty(t,e)}o.textContent+=`#${s.id}${n} { content: ${r.content}; }`,o.textContent+=`${e} { display: none !important; }`,null==(i=va(t))||i.append(o);let l="::before"===n?"afterbegin":"beforeend";return t.insertAdjacentElement(l,s),{fakePseudoElement:s,sheet:o,computedStyle:r}}function ra(t){var e;let n=function(t){let e=t;for(;e;){if(na(e,"overflow","scroll"))return e;e=e.parentElement}return e}(t);return n===document.documentElement&&(n=null),null==(e=n)?{scrollTop:0,scrollLeft:0}:e}function sa(t,e){let n=ea(t,"anchor-scope");return n===e||n===ta}var oa=function(){var t=u(function*(t){var e,n;let i=yield null==(e=et.getOffsetParent)?void 0:e.call(et,t);var r;(yield null==(n=et.isElement)?void 0:n.call(et,i))||(i=(yield null==(r=et.getDocumentElement)?void 0:r.call(et,t))||window.document.documentElement);return i});return function(e){return t.apply(this,arguments)}}();var la,aa,ua=(t,e)=>t.flatMap(t=>{let n=[...t.querySelectorAll(e)];if(t instanceof ShadowRoot){let i=t.host;(function(t,e){let n=e.trim();if(":host"===n)return!0;let i=/^:host\(\s*(.+?)\s*\)$/.exec(n);if(i)try{return t.matches(i[1])}catch(t){return!1}return!1})(i,e)&&n.push(i)}return n}),ca=Zl(),ha=new Set;function fa(t){return!(!t||"Function"!==t.type||"anchor"!==t.name)}function pa(t,e=!1){return Jl(t,{parseAtrulePrelude:!1,parseCustomProperty:!0,onParseError:t=>{e&&ha.add(t)}})}function da(t){return Ll(t,{mode:"spec"})}function ka(t){return"Declaration"===t.type}var ma=null==(la=null==(aa=globalThis.CSSStyleSheet)?void 0:aa.prototype.replaceSync)?()=>{}:la,ya=new WeakMap;function ga(t){let e=ya.get(t);return void 0===e?Array.from(t.cssRules).map(t=>t.cssText).join("\n"):e}var ba=new WeakSet;function Sa(t,e,n){if(!ba.has(t)){let i=(null==n?[]:n).filter(e=>"adoptedStyleSheets"in e&&e.adoptedStyleSheets.includes(t));if(i.length){let n=new CSSStyleSheet({media:t.media,disabled:t.disabled});ma.call(n,e),ba.add(n);for(let e of i)e.adoptedStyleSheets=e.adoptedStyleSheets.map(e=>e===t?n:e);return n}}return ma.call(t,e),t}function va(t){if(t instanceof ShadowRoot)return t;if(t instanceof Document)return t.head;let e=t.getRootNode();return e instanceof ShadowRoot?e:e instanceof Document?e.head:null}var Ca=["top","left","right","bottom"],xa=[...Ca,"justify-self","align-self"],wa=new Map(xa.map(t=>[t,`--pa-value-${t}-${ca}`])),La=new Map(Ca.map(t=>[t,`--pa-wrapper-${t}-${ca}`])),Aa=[...wa.values(),...La.values()];function Ta(t){return t?t.children.map(t=>{var e,n;let i;"PseudoElementSelector"===(null==(e=t.children.last)?void 0:e.type)&&(i=da((t=lt(t)).children.last),t.children.pop());let r=da(t);return{selector:r+(null==(n=i)?"":n),elementPart:r,pseudoElementPart:i}}).toArray():[]}var Ea=t=>"fixed"===ea(t,"position")?"fixed":"absolute",Pa=[...cl,...al,"anchor-scope","anchor-name"].reduce((t,e)=>(t[e]=`--${e}-${ca}`,t),{}),Da="data-generated-by-polyfill",Ra=!1;function Ia(t,e){return ka(t)&&Pa[t.property]&&e?(e.children.appendData(d(d({},t),{},{property:Pa[t.property]})),{updated:!0}):{updated:!1}}function Oa(t,e){if(!ka(t)||!e||!["inset","inset-block","inset-inline"].includes(t.property))return{updated:!1};let n=(n,i)=>{i&&e.children.appendData(d(d({},t),{},{property:n,value:{type:"Value",children:(new ot).fromArray([i])}}))};if("inset"===t.property){let e=t.value.children.toArray(),[i,r,s,o]=(()=>{switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return[e[0],e[1],e[2],e[3]];default:return[]}})();n("top",i),n("right",r),n("bottom",s),n("left",o)}else if("inset-block"===t.property){let e=t.value.children.toArray(),[i,r]=(()=>{switch(e.length){case 1:return[e[0],e[0]];case 2:return[e[0],e[1]];default:return[]}})();n("inset-block-start",i),n("inset-block-end",r)}else if("inset-inline"===t.property){let e=t.value.children.toArray(),[i,r]=(()=>{switch(e.length){case 1:return[e[0],e[0]];case 2:return[e[0],e[1]];default:return[]}})();n("inset-inline-start",i),n("inset-inline-end",r)}return{updated:!0}}function Na(t,e){!function(t=[document]){if(typeof CSS>"u")return;let e=[...Object.values(Pa),...Aa];if("function"==typeof CSS.registerProperty){if(Ra)return;for(let n of e)try{CSS.registerProperty({name:n,syntax:"*",inherits:!1})}catch(t){}Ra=!0}else if(typeof document<"u"){let[n]=e,i=e.map(t=>`${t}: initial;`).join("\n  ");for(let e of t){let t=va(e);if(!t||[...t.querySelectorAll("style[data-generated-by-polyfill]")].some(t=>{var e;return null==(e=t.textContent)?void 0:e.includes(`${n}: initial`)}))continue;let r=document.createElement("style");r.setAttribute(Da,"true"),r.textContent=`*,\n::before,\n::after {\n  ${i}\n}`,t.append(r)}}}(e);for(let e of t){let t=!1,n=pa(e.css,!0);nl(n,{visit:"Declaration",enter(e){var n;let i=null==(n=this.rule)?void 0:n.block,{updated:r}=Oa(e,i),{updated:s}=Ia(e,i);(s||r)&&(t=!0)}}),t&&(e.css=da(n),e.changed=!0)}return t.some(t=>!0===t.changed)}var $a,Fa="InvalidMimeType";function ja(){return ja=u(function*(t){return(yield Promise.all(t.map(function(){var t=u(function*(t){var e;if(!t.url)return t;if(null!=(e=t.el)&&e.disabled)return null;try{let e=yield fetch(t.url.toString()),n=e.headers.get("content-type");if(null==n||!n.startsWith("text/css")){let e=Error(`Error loading ${t.url}: expected content-type "text/css", got "${n}".`);throw e.name=Fa,e}let i=yield e.text();return d(d({},t),{},{css:i})}catch(t){if(t instanceof Error&&t.name===Fa)return console.warn(t),null;throw t}});return function(e){return t.apply(this,arguments)}}()))).filter(t=>null!==t)}),ja.apply(this,arguments)}function Ba(t){let e=(null==t?Array.from(document.querySelectorAll("[style]")):t).filter(t=>t instanceof HTMLElement&&function(t){var e;if(!$a){let t=["anchor",...Object.keys(Pa)];$a=RegExp(`(?:^|;)\\s*(?:${t.join("|")})`,"i")}return $a.test(null==(e=t.getAttribute("style"))?"":e)}(t)),n=[];return e.forEach(t=>{var e;let i="data-has-inline-styles",r=null==(e=t.getAttribute(i))?Zl(12):e;t.setAttribute(i,r);let s=`[${i}="${r}"] { ${t.getAttribute("style")} }`;n.push({el:t,css:s})}),n}function Wa(){return Wa=u(function*(t){var e,n;let i=null==(e=t.elements)?ua(t.roots,"link, style"):e,r=[];i.filter(t=>t instanceof HTMLElement).filter(t=>
1!t.hasAttribute(Da)).forEach(t=>{if("link"===t.tagName.toLowerCase()){let e=function(t){let e=new URL(t.href,document.baseURI);if(function(t){return!("text/css"!==t.type&&"stylesheet"!==t.rel||!t.href)}(t)&&e.origin===location.origin)return e}(t);e&&r.push({el:t,url:e})}"style"===t.tagName.toLowerCase()&&r.push({el:t,css:t.innerHTML})});let s=Ba(t.excludeInlineStyles?null==(n=t.elements)?[]:n:void 0),o=t.elements?[]:function(t){let e=[],n=new Set;for(let i of t){let t=i.adoptedStyleSheets;if(t)for(let i of t)n.has(i)||(n.add(i),e.push({css:ga(i),sheet:i}))}return e}(t.roots);return yield function(t){return ja.apply(this,arguments)}([...r,...s,...o])}),Wa.apply(this,arguments)}var Ma=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=Kl[63&n[t]];return e},Ua=`--pa-cascade-property-${ca}`,za="data-anchor-position-wrapper",Va="data-anchor-position-area",Ha="data-pa-wrapper-for-",qa="data-pa-target-for-",Qa="POLYFILL-POSITION-AREA";function Ga(t){for(let e of ol){let n=ea(t,e);if(["%","stretch","fit-content","-webkit-fill-available"].some(t=>n.includes(t)))return!0}for(let e of sl){let n=ea(t,e);if(["%","auto"].some(t=>n.includes(t)))return!0}for(let e of al)if(ea(t,e).includes("%"))return!0;for(let e of ul){let n=ea(t,e);if(["stretch","anchor-center"].some(t=>n.includes(t)))return!0}return!1}var _a={Logical:"Logical",LogicalSelf:"LogicalSelf",Physical:"Physical",PhysicalSelf:"PhysicalSelf",Irrelevant:"Irrelevant"},Xa="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 Ya(t){return Xa.includes(t)}var Ja={left:[0,1,_a.Irrelevant],center:[1,2,_a.Irrelevant],right:[2,3,_a.Irrelevant],"span-left":[0,2,_a.Irrelevant],"span-right":[1,3,_a.Irrelevant],"x-start":[0,1,_a.Physical],"x-end":[2,3,_a.Physical],"span-x-start":[0,2,_a.Physical],"span-x-end":[1,3,_a.Physical],"self-x-start":[0,1,_a.PhysicalSelf],"self-x-end":[2,3,_a.PhysicalSelf],"span-self-x-start":[0,2,_a.PhysicalSelf],"span-self-x-end":[1,3,_a.PhysicalSelf],"span-all":[0,3,_a.Irrelevant],top:[0,1,_a.Irrelevant],bottom:[2,3,_a.Irrelevant],"span-top":[0,2,_a.Irrelevant],"span-bottom":[1,3,_a.Irrelevant],"y-start":[0,1,_a.Physical],"y-end":[2,3,_a.Physical],"span-y-start":[0,2,_a.Physical],"span-y-end":[1,3,_a.Physical],"self-y-start":[0,1,_a.PhysicalSelf],"self-y-end":[2,3,_a.PhysicalSelf],"span-self-y-start":[0,2,_a.PhysicalSelf],"span-self-y-end":[1,3,_a.PhysicalSelf],"block-start":[0,1,_a.Logical],"block-end":[2,3,_a.Logical],"span-block-start":[0,2,_a.Logical],"span-block-end":[1,3,_a.Logical],"inline-start":[0,1,_a.Logical],"inline-end":[2,3,_a.Logical],"span-inline-start":[0,2,_a.Logical],"span-inline-end":[1,3,_a.Logical],"self-block-start":[0,1,_a.LogicalSelf],"self-block-end":[2,3,_a.LogicalSelf],"span-self-block-start":[0,2,_a.LogicalSelf],"span-self-block-end":[1,3,_a.LogicalSelf],"self-inline-start":[0,1,_a.LogicalSelf],"self-inline-end":[2,3,_a.LogicalSelf],"span-self-inline-start":[0,2,_a.LogicalSelf],"span-self-inline-end":[1,3,_a.LogicalSelf],start:[0,1,_a.Logical],end:[2,3,_a.Logical],"span-start":[0,2,_a.Logical],"span-end":[1,3,_a.Logical],"self-start":[0,1,_a.LogicalSelf],"self-end":[2,3,_a.LogicalSelf],"span-self-start":[0,2,_a.LogicalSelf],"span-self-end":[1,3,_a.LogicalSelf]},Ka=["start","center","end","span-start","span-end","span-all"],Za=["self-start","center","self-end","span-self-start","span-self-end","span-all"],tu=["block","top","bottom","y"],eu=["inline","left","right","x"];function nu(t){let e=t.split("-");for(let t of e){if(tu.includes(t))return"block";if(eu.includes(t))return"inline"}return"ambiguous"}function iu(t,e){return e[0].includes(t[0])&&e[1].includes(t[1])||e[0].includes(t[1])&&e[1].includes(t[0])}var ru=[[["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","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-e
1nd","span-all"]],[["block-start","center","block-end","span-block-start","span-block-end","span-all"],["inline-start","center","inline-end","span-inline-start","span-inline-end","span-all"]],[["self-block-start","center","self-block-end","span-self-block-start","span-self-block-end","span-all"],["self-inline-start","center","self-inline-end","span-self-inline-start","span-self-inline-end","span-all"]],[Ka,Ka],[Za,Za]];var su=t=>{let e=getComputedStyle(t);return{writingMode:e.writingMode,direction:e.direction}},ou=function(){var t=u(function*(t,e){let n=yield oa(t);switch(e){case _a.Logical:case _a.Physical:return su(n);case _a.LogicalSelf:case _a.PhysicalSelf:return su(t);default:return null}});return function(e,n){return t.apply(this,arguments)}}(),lu=t=>t.reverse().map(t=>3-t),au=(t,e)=>t===_a.Irrelevant?e:t,uu=function(){var t=u(function*({block:t,inline:e},n){let i=yield ou(n,au(t[2],e[2])),r={block:[t[0],t[1]],inline:[e[0],e[1]]};if(i){if("rtl"===i.direction&&(r.inline=lu(r.inline)),i.writingMode.startsWith("vertical")){let t=r.block;r.block=r.inline,r.inline=t}if(i.writingMode.startsWith("sideways")){let t=r.block;r.block=r.inline,r.inline=t,i.writingMode.endsWith("lr")&&(r.block=lu(r.block))}i.writingMode.endsWith("rl")&&(r.inline=lu(r.inline))}return r});return function(e,n){return t.apply(this,arguments)}}();function cu([t,e]){return 0===t&&3===e?"center":0===t?"end":3===e?"start":"center"}function hu(t){if(!function(t){return"Declaration"===t.type&&"position-area"===t.property}(t))return;let e=function(t){let e=t.value.children.toArray().map(({name:t})=>t);return 1===e.length&&("ambiguous"===nu(e[0])?e.push(e[0]):e.push("span-all")),e}(t);if(!function(t){for(let e of ru)if(iu(t,e))return!0;return!1}(e))return;let n={};switch(nu(e[0])){case"block":n.block=e[0],n.inline=e[1];break;case"inline":n.inline=e[0],n.block=e[1];break;case"ambiguous":"block"==nu(e[1])?(n.block=e[1],n.inline=e[0]):(n.inline=e[1],n.block=e[0])}return{values:n,grid:{block:Ja[n.block],inline:Ja[n.inline]},selectorUUID:`--pa-declaration-${Ma(12)}`}}function fu(t,e,n=!0){let i=(t,n)=>{e.children.appendData({type:"Declaration",property:t,value:{type:"Raw",value:n},important:!1})};"auto"===n?(i("justify-self",`var(${wa.get("justify-self")}, normal)`),i("align-self",`var(${wa.get("align-self")}, normal)`),Ca.forEach(t=>i(t,`var(${wa.get(t)}, auto)`))):(n?["justify-self","align-self"]:[...Ca]).forEach(t=>i(t,`var(${wa.get(t)})`)),i(Ua,t.selectorUUID)}function pu(t,e,n){return du.apply(this,arguments)}function du(){return du=u(function*(t,e,n,i=!0){let r,s=`--pa-target-${Ma(12)}`,o=yield uu(e.grid,t),l=(({block:t,inline:e})=>{let n=[0,"top","bottom",0],i=[0,"left","right",0];return{block:[n[t[0]],n[t[1]]],inline:[i[e[0]],i[e[1]]]}})(o);if(i){let t=au(e.grid.block[2],e.grid.inline[2]);r=[_a.LogicalSelf,_a.PhysicalSelf].includes(t)?o:e.grid}else r=o;let a,u={block:cu([r.block[0],r.block[1]]),inline:cu([r.inline[0],r.inline[1]])};return i?a=function(t,e){var n;let i;if((null==(n=t.parentElement)?void 0:n.tagName)===Qa)i=t.parentElement;else{i=document.createElement(Qa),i.style.display="grid",i.style.position=Ea(t);let e=getComputedStyle(t).pointerEvents;if(i.style.pointerEvents="none",t.style.pointerEvents=e,t.hasAttribute("popover")){let e=getComputedStyle(t);["top","right","bottom","left"].forEach(t=>{let n=e[t];n&&"auto"!==n&&0!==parseFloat(n)&&i.style.setProperty(`padding-${t}`,n)}),t.style.inset="auto"}Ca.forEach(t=>{i.style.setProperty(t,`var(${La.get(t)})`)}),t.insertAdjacentElement("beforebegin",i),i.appendChild(t)}return i.setAttribute(`${Ha}${e}`,""),i}(t,s):function(t,e){t.setAttribute(`${qa}${e}`,"")}(t,s),{insets:l,alignments:u,targetUUID:s,targetEl:t,anchorEl:n,wrapperEl:a,values:e.values,grid:e.grid,selectorUUID:e.selectorUUID}}),du.apply(this,arguments)}function ku(t,e){return`\n    [${za}="${e}"][${Ha}${t}] {\n      ${Ca.map(e=>`${La.get(e)}: var(${t}-${e});`).join("\n      ")}\n    }\n    [${za}="${e}"][${Ha}${t}] > * {\n      ${wa.get("justify-self")}: var(${t}-justify-self);\n      ${wa.get("align-self")}: var(${t}-align-self);\n    }\n  `.replaceAll("\n","")}function mu(t,e){return`\n    [${Va}="${e}"][${qa}${t}] {\n      ${Ca.map(e=>`${wa.get(e)}: var(${t}-${e});`).join("\n      ")}\n    }\n  `.replaceAll("\n","")}var yu=["normal","most-width","most-height","most-block-size","most-inline-size"],gu=["flip-block","flip-inline","flip-start"];function bu(t,e){let n=document.querySelector(t);if(n){let t=function(t){let e={};return cl.forEach(n=>{let i=ea(t,`--${n}-${ca}`);i&&(e[n]=i)}),e}(n);
1return e.forEach(e=>{t=Lu(t,e)}),t}}function Su(t,e){let n=t.declarations;return e.forEach(t=>{n=Lu(n,t)}),n}var vu={"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"}},Cu={"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"}},xu={"flip-block":{top:"bottom",bottom:"top",start:"end",end:"start"},"flip-inline":{left:"right",right:"left",start:"end",end:"start"},"flip-start":{}};var wu=(t,e)=>{var n;return(null==(n=pa(`#id{${t}: ${e};}`).children.first)?void 0:n.block.children.first).value};function Lu(t,e){let n={};return Object.entries(t).forEach(([t,i])=>{let r=t,s=wu(r,i),o=function(t,e){return vu[e][t]||t}(r,e);o!==r&&(null!=n[r]||(n[r]="revert")),nl(s,{visit:"Function",enter(t){fa(t)&&t.children.forEach(t=>{qu(t)&&dl(t.name)&&(t.name=function(t,e){return Cu[e][t]||t}(t.name,e))})}}),"position-area"===r&&s.children.forEach(t=>{qu(t)&&Ya(t.name)&&(t.name=function(t,e){if("flip-start"===e)return t;{let n=xu[e];return t.split("-").map(t=>n[t]||t).join("-")}}(t.name,e))}),r.startsWith("margin")&&function(t,e,n){if("margin"===t){let[t,i,r,s]=e.children.toArray();"flip-block"===n?s?e.children.fromArray([r,i,t,s]):r&&e.children.fromArray([r,i,t]):"flip-inline"===n&&s&&e.children.fromArray([t,s,r,i])}else if("margin-block"===t){let[t,i]=e.children.toArray();"flip-block"===n&&i&&e.children.fromArray([i,t])}else if("margin-inline"===t){let[t,i]=e.children.toArray();"flip-inline"===n&&i&&e.children.fromArray([i,t])}}(r,s,e),n[o]=da(s)}),n}function Au(t){let e=function(t){return t.toArray().reduce((t,e)=>"Operator"===e.type&&","===e.value?(t.push([]),t):("Identifier"===e.type&&t[t.length-1].push(e),t),[[]])}(t),n=[];return e.forEach(t=>{let e={atRules:[],tactics:[],positionAreas:[]};t.forEach(t=>{!function(t){return gu.includes(t)}(t.name)?t.name.startsWith("--")?e.atRules.push(t.name):Ya(t.name)&&e.positionAreas.push(t.name):e.tactics.push(t.name)}),e.positionAreas.length?n.push({positionArea:e.positionAreas[0],type:"position-area"}):e.atRules.length&&e.tactics.length?n.push({tactics:e.tactics,atRule:e.atRules[0],type:"at-rule-with-try-tactic"}):e.atRules.length?n.push({atRule:e.atRules[0],type:"at-rule"}):e.tactics.length&&n.push({tactics:e.tactics,type:"try-tactic"})}),n}function Tu(t){if(function(t){return"Declaration"===t.type&&"position-try"===t.property}(t)&&t.value.children.first){let e,n=lt(t),i=n.value.children.first.name;return i&&function(t){return yu.includes(t)}(i)&&(e=i,n.value.children.shift()),{order:e,options:Au(n.value.children)}}return{}}function Eu(t){let{order:e,options:n}=Tu(t);if(e||n)return{order:e,options:n};let{order:i}=function(t){return function(t){return"Declaration"===t.type&&"position-try-order"===t.property}(t)&&t.value.children.first?{order:t.value.children.first.name}:{}}(t),r=function(t){return function(t){return"Declaration"===t.type&&"position-try-fallbacks"===t.property}(t)&&t.value.children.first?Au(t.value.children):[]}(t);return i||r?{order:i,options:r}:{}}function Pu(t){return rl(t.property)||function(t){return sl.includes(t)}(t.property)||ll(t.property)||function(t){return ul.includes(t)}(t.property)||["position-anchor","position-area"].includes(t.property)}function Du(t){var e,n;if(function(t){return"Atrule"===t.type&&"position-try"===t.name}(t)&&null!=(e=t.prelude)&&e.value&&null!=(n=t.block)&&n.children){let e=t.prelude.value,n=t.block.children.filter(t=>function(t){return"Declaration"===t.type}(t)&&Pu(t));return{name:e,tryBlock:{uuid:`${e}-try-${Zl(12)}`,declarations:Object.fromEntries(n.map(t=>[t.property,da(t.value)]))}}}return{}}function Ru(t){return!(!t||t!==t.window)}function Iu(t){return!(!t||!function(t){return na(t,"position","fixed")}(t)&&!na(t,"position","absolute"))}function Ou(t,e){return t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING}function Nu(){return Nu=u(function*(t){return yield et.getOffsetParent(t)}),Nu.apply(this,arguments)}function $u(t){return Fu.apply(this,arguments)}function Fu(){return Fu=u(function*(t){if(!["absolute","fixed"].includes(ea(t,"position")))return yield function(t){return Nu.apply(this,arguments)}(t);let e=t.parentElement;for(;e;){if(!na(e,"position","static")&&na(e,"display","block"))return e;e=e.parentElement}return window}
1),Fu.apply(this,arguments)}function ju(t,e,n,i){return Bu.apply(this,arguments)}function Bu(){return Bu=u(function*(t,e,n,i){let r=yield $u(t),s=yield $u(n);if(!function(t,e){return!(!t||t===e)&&(Ru(t)?t.document.contains(e):t.contains(e))}(s,t)&&!Ru(s)||r===s&&Iu(t)&&!Ou(t,n))return!1;if(r!==s){let t,e=[];for(t=r;t&&t!==s&&t!==window;)e.push(t),t=yield $u(t);let i=e[e.length-1];if(i instanceof HTMLElement&&Iu(i)&&!Ou(i,n))return!1}{let e=t.parentElement;for(;e;){if(na(e,"content-visibility","hidden"))return!1;e=e.parentElement}}return!(e&&i&&Wu(t,e,i)!==Wu(n,e,i))}),Bu.apply(this,arguments)}function Wu(t,e,n){for(;!t.matches(n)||!sa(t,e);){if(!t.parentElement)return null;t=t.parentElement}return t}function Mu(){return Mu=u(function*(t,e,n,i,r){if(!(t instanceof HTMLElement&&n.length&&Iu(t)))return null;let s=n.flatMap(t=>function(t,e){let{elementPart:n,pseudoElementPart:i}=t,r=[];if(i&&"::before"!==i&&"::after"!==i)return r;let s=ua(e.roots,n);if(!i)return r.push(...s),r;for(let e of s){let{fakePseudoElement:n,sheet:i,computedStyle:s}=ia(e,t),o=n.getBoundingClientRect(),{scrollY:l,scrollX:a}=globalThis,u=ra(e);r.push({fakePseudoElement:n,computedStyle:s,removeFakePseudoElement(){n.remove(),i.remove()},contextElement:e,getBoundingClientRect(){let{scrollY:t,scrollX:e}=globalThis,{scrollTop:n,scrollLeft:i}=u;return DOMRect.fromRect({y:o.y+(l-t)+(u.scrollTop-n),x:o.x+(a-e)+(u.scrollLeft-i),width:o.width,height:o.height})}})}return r}(t,r)).filter(t=>function(t,e){let n=ea(t,"anchor-name");return e?n.split(",").map(t=>t.trim()).includes(e):!n}(t,e)),o=i.map(t=>t.selector).join(",")||null;for(let n=s.length-1;n>=0;n--){let i=s[n],r="fakePseudoElement"in i;if(yield ju(r?i.fakePseudoElement:i,e,t,o))return r&&i.removeFakePseudoElement(),i}return null}),Mu.apply(this,arguments)}function Uu(t){return"Declaration"===t.type&&"anchor-name"===t.property}function zu(t){return"Declaration"===t.type&&"anchor-scope"===t.property}function Vu(t){return!(!t||"Function"!==t.type||"anchor-size"!==t.name)}function Hu(t){return!(!t||"Function"!==t.type||"var"!==t.name)}function qu(t){return!("Identifier"!==t.type||!t.name)}function Qu(t,e){let n,i,r,s,o="",l=!1,a=[];t.children.toArray().forEach(t=>{l?o=`${o}${da(t)}`:"Operator"!==t.type||","!==t.value?a.push(t):l=!0});let[u,c]=a;if(c||(c=u,u=void 0),u&&(qu(u)&&u.name.startsWith("--")?n=u.name:Hu(u)&&u.children.first&&(s=u.children.first.name)),c)if(fa(t)){if(qu(c)&&dl(c.name))i=c.name;else if(function(t){return!("Percentage"!==t.type||!t.value)}(c)){let t=Number(c.value);i=Number.isNaN(t)?void 0:t}}else Vu(t)&&qu(c)&&function(t){return kl.includes(t)}(c.name)&&(r=c.name);let h=`--anchor-${Zl(12)}`;return Object.assign(t,{type:"Raw",value:`var(${h})`,children:null}),Reflect.deleteProperty(t,"name"),{anchorName:n,anchorSide:i,anchorSize:r,fallbackValue:o,customPropName:s,uuid:h}}function Gu(t){return t.value.children.map(({name:t})=>t)}var _u={},Xu={},Yu={},Ju={},Ku={};function Zu(t,e){if((fa(t)||Vu(t))&&e){if(e.property.startsWith("--")){var n;let i=da(e.value),r=Qu(t);return Ju[r.uuid]=i,Yu[e.property]=[...null==(n=Yu[e.property])?[]:n,r],{changed:!0}}if(fa(t)&&rl(e.property)||Vu(t)&&fl(e.property)){let n=Qu(t);return{prop:e.property,data:n,changed:!0}}}return{}}function tc(t,e,n,i,r){return ec.apply(this,arguments)}function ec(){return ec=u(function*(t,e,n,i,r){let s=null==e?void 0:e.anchorName,o=null==e?void 0:e.customPropName,l=!1;if(t&&!s){let e=ea(t,"position-anchor");e?(s=e,l=function(t){let e=t.getAttribute("style");return!!e&&/(?:^|;)\s*position-anchor\s*:/i.test(e)}(t)):o&&(s=ea(t,o))}let a=s&&i[s]||[],u=s&&r[ta]||[],c=s&&r[s]||[],h=n.roots,f=null==t?void 0:t.getRootNode();return l&&(f instanceof Document||f instanceof ShadowRoot)&&!h.includes(f)&&(h=[...h,f]),yield function(t,e,n,i,r){return Mu.apply(this,arguments)}(t,s||null,a,[...u,...c],{roots:h})}),ec.apply(this,arguments)}function nc(){return nc=u(function*(t,e){let n={},i={},r=e.positionAreaContainingBlock;_u={},Xu={},Yu={},Ju={},Ku={};let{fallbackTargets:s,validPositions:o}=function(t){let e={},n={},i={};for(let n of t)nl(pa(n.css),{visit:"Atrule",enter(t){let{name:n,tryBlock:i}=Du(t);n&&i&&(e[n]=i)}});for(let r of t){let t=!1,s=new Set,o=pa(r.css);nl(o,{visit:"Declaration",enter(r){var o;let l=Ta(null==(o=this.rule)?void 0:o.prelude);if(!l.length)return;let{order:a,options:u}=Eu(r);l.forEach(({selector:r})=>{let o={};a&&(o.order=a);let l=new Set;var c;null==u||u.forEach(i=>
1{let a;if("at-rule"===i.type)a=i.atRule;else if("try-tactic"===i.type){a=`${r}-${i.tactics.join("-")}`;let t=bu(r,i.tactics);t&&(e[a]={uuid:`${r}-${i.tactics.join("-")}-try-${Zl(12)}`,declarations:t})}else if("at-rule-with-try-tactic"===i.type){a=`${r}-${i.atRule}-${i.tactics.join("-")}`;let t=Su(e[i.atRule],i.tactics);t&&(e[a]={uuid:`${r}-${i.atRule}-${i.tactics.join("-")}-try-${Zl(12)}`,declarations:t})}if(a&&e[a]){let i=`[data-anchor-polyfill="${e[a].uuid}"]`;var u;null!=n[i]||(n[i]=[]),n[i].push(r),!l.has(a)&&(l.add(a),null!=o.fallbacks||(o.fallbacks=[]),o.fallbacks.push(e[a])),s.has(a)||(s.add(a),null==(u=this.stylesheet)||u.children.prependData({type:"Rule",prelude:{type:"Raw",value:i},block:{type:"Block",children:(new ot).fromArray(Object.entries(e[a].declarations).map(([t,e])=>({type:"Declaration",important:!0,property:t,value:{type:"Raw",value:e}})))}}),t=!0)}}),Object.keys(o).length>0&&(i[r]?(o.order&&(i[r].order=o.order),o.fallbacks&&(null!=(c=i[r]).fallbacks||(c.fallbacks=[]),i[r].fallbacks.push(...o.fallbacks))):i[r]=o)})}}),t&&(r.css=da(o),r.changed=!0)}return{fallbackTargets:n,validPositions:i}}(t);for(let e of t){let t=!1,s=pa(e.css);nl(s,function(e){var s;let o=Ta(null==(s=this.rule)?void 0:s.prelude);if(Uu(e)&&o.length)for(let t of Gu(e)){var l;null!=(l=_u)[t]||(l[t]=[]),_u[t].push(...o)}if(zu(e)&&o.length)for(let t of Gu(e)){var a;null!=(a=Xu)[t]||(a[t]=[]),Xu[t].push(...o)}let u,{prop:c,data:h,changed:f}=Zu(e,this.declaration);if(c&&h&&o.length)for(let{selector:t}of o){var p,k;n[t]=d(d({},n[t]),{},{[c]:[...null==(p=null==(k=n[t])?void 0:k[c])?[]:p,h]})}if(this.block&&(u=hu(e),u)){fu(u,this.block,r);for(let{selector:t}of o){var m;i[t]=[...null==(m=i[t])?[]:m,u]}}(f||u)&&(t=!0)}),t&&(e.css=da(s),e.changed=!0)}let l=new Set(Object.keys(Yu)),a={},u=t=>{var e,n;let i=[],r=new Set(null==(e=null==(n=a[t])?void 0:n.names)?[]:e);for(;r.size>0;)for(let t of r){var s,o;i.push(...null==(s=Yu[t])?[]:s),r.delete(t),null!=(o=a[t])&&null!=(o=o.names)&&o.length&&a[t].names.forEach(t=>r.add(t))}return i};for(;l.size>0;){let e=[];for(let n of t){let t=!1,i=pa(n.css);nl(i,{visit:"Function",enter(n){var i;let r=null==(i=this.rule)?void 0:i.prelude,s=this.declaration,o=null==s?void 0:s.property;if(!1===(null==r?void 0:r.children.isEmpty)&&Hu(n)&&s&&o&&n.children.first&&l.has(n.children.first.name)&&o.startsWith("--")){var c;let i=n.children.first,r=null==(c=Yu[i.name])?[]:c,l=u(i.name);if(!r.length&&!l.length)return;let h=`${i.name}-anchor-${Zl(12)}`,f=da(s.value);Ju[h]=f,a[o]||(a[o]={names:[],uuids:[]});let p=a[o];p.names.includes(i.name)||p.names.push(i.name),p.uuids.push(h),e.push(o),i.name=h,t=!0}}}),t&&(n.css=da(i),n.changed=!0)}l.clear(),e.forEach(t=>l.add(t))}for(let e of t){let t=!1,i=pa(e.css);nl(i,{visit:"Function",enter(e){var i;let r=null==(i=this.rule)?void 0:i.prelude,s=this.declaration,o=null==s?void 0:s.property;if(!1===(null==r?void 0:r.children.isEmpty)&&Hu(e)&&s&&o&&e.children.first&&(rl(o)||ll(o))){var l;let i=e.children.first,s=null==(l=Yu[i.name])?[]:l,m=u(i.name);if(!s.length&&!m.length)return;let y=`${o}-${Zl(12)}`;if(m.length){let t=new Set([i.name]);for(;t.size>0;)for(let e of t){var c,h,f;let n=a[e];if(null!=n&&null!=(c=n.names)&&c.length&&null!=n&&null!=(h=n.uuids)&&h.length)for(let t of n.names)for(let e of n.uuids)Ku[e]=d(d({},Ku[e]),{},{[y]:`${t}-${y}`});t.delete(e),null!=n&&null!=(f=n.names)&&f.length&&n.names.forEach(e=>t.add(e))}}let g=Ta(r);for(let t of[...s,...m]){let e=d({},t),i=`--anchor-${Zl(12)}-${o}`,r=e.uuid;e.uuid=i;for(let{selector:t}of g){var p,k;n[t]=d(d({},n[t]),{},{[o]:[...null==(p=null==(k=n[t])?void 0:k[o])?[]:p,e]})}Ku[r]=d(d({},Ku[r]),{},{[y]:i})}i.name=`${i.name}-${y}`,t=!0}}}),t&&(e.css=da(i),e.changed=!0)}if(Object.keys(Ku).length>0)for(let e of t){let t=!1,n=pa(e.css);nl(n,{visit:"Function",enter(e){var n,i;if(Hu(e)&&null!=(n=e.children.first)&&null!=(n=n.name)&&n.startsWith("--")&&null!=(i=this.declaration)&&null!=(i=i.property)&&i.startsWith("--")&&this.block){let n=e.children.first,i=Ku[n.name];if(i)for(let[e,r]of Object.entries(i))this.block.children.appendData({type:"Declaration",important:!1,property:`${this.declaration.property}-${e}`,value:{type:"Raw",value:da(this.declaration.value).replace(`var(${n.name})`,`var(${r})`)}}),t=!0;Ju[n.name]&&(this.declaration.value={type:"Raw",value:Ju[n.name]},t=!0)}}}),t&&(e.css=da(n),e.changed=!0)}let c=_u,h=Xu,f=new Map;for(let[t,i]of Object.entries(n)){var p;let n;n=t.startsWith("[data-anchor-polyfill=")&&null!=(p=s[t])&&p.length?ua(e.roots,s[t].join(",")):ua(e.roots,t);for(let[r,s]of Object.entries(i))for(let i of s)for(let s of n){var k,m,y,g,b;let n=yield tc(s,i,{roots:e.roots},c,h),l=`--anchor-${Zl(12)}`;f.set(s,d(d({},null==(k=f.get(s))?{}:k),{},{[i.uuid]:l})),s.setAttribute("style",`${i.uuid}: var(${l});
1 ${null==(m=s.getAttribute("style"))?"":m}`),o[t]=d(d({},o[t]),{},{declarations:d(d({},null==(y=o[t])?void 0:y.declarations),{},{[r]:[...null==(g=null==(b=o[t])||null==(b=b.declarations)?void 0:b[r])?[]:g,d(d({},i),{},{anchorEl:n,targetEl:s,uuid:l})]})})}}let S=new Map,v=Object.entries(i).map(([t,n])=>({targetSel:t,positions:n,targets:ua(e.roots,t)}));for(let{targetSel:t,positions:n,targets:i}of v)for(let s of i){let i=yield tc(s,null,{roots:e.roots},c,h),l="auto"===r?Ga(s):r;for(let e of n){var C,x,w;let n=yield pu(s,e,i,l),r=l?ku:mu,a=va(s);var L;if(a)S.set(a,(null==(L=S.get(a))?"":L)+r(n.targetUUID,e.selectorUUID));o[t]=d(d({},o[t]),{},{declarations:d(d({},null==(C=o[t])?void 0:C.declarations),{},{"position-area":[...null==(x=null==(w=o[t])||null==(w=w.declarations)?void 0:w["position-area"])?[]:x,n]})})}}return{rules:o,inlineStyles:f,anchorScopes:Xu,positionAreaStyles:S}}),nc.apply(this,arguments)}var ic=["as","blocking","crossorigin","disabled","fetchpriority","href","hreflang","integrity","referrerpolicy","rel","type"];function rc(t,e,n){let i=[];for(let{el:s,css:o,changed:l,sheet:a}
1of t){let t={el:s,css:o,changed:!1,sheet:a};if(l)if(a)t.sheet=Sa(a,o,n);else if("style"===(null==s?void 0:s.tagName.toLowerCase()))s.innerHTML=o;else if(s instanceof HTMLLinkElement){let e=document.createElement("style");e.textContent=o;for(let t of s.getAttributeNames())if(!t.startsWith("on")&&!ic.includes(t)){let n=s.getAttribute(t);null!==n&&e.setAttribute(t,n)}s.hasAttribute("href")&&e.setAttribute("data-original-href",s.getAttribute("href")),s.insertAdjacentElement("beforebegin",e),s.remove(),t.el=e}else if(null!=s&&s.hasAttribute("data-has-inline-styles")){let t=s.getAttribute("data-has-inline-styles");if(t){var r;let n=`[data-has-inline-styles="${t}"]{`,i=o.slice(n.length,-1),l=null==e?void 0:e.get(s);if(l)for(let[t,e]of Object.entries(l))i=`${t}: var(${e}); ${i}`;let a=(null==(r=s.getAttribute("style"))?"":r).split(";").map(t=>t.trim()).filter(t=>{let e=t.slice(0,t.indexOf(":")).trim();return e.startsWith("--anchor-")&&!i.includes(`${e}:`)});a.length&&(i=`${a.join("; ")}; ${i}`),s.setAttribute("style",i)}}i.push(t)}return i}var sc=t=>{switch(t){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},oc=t=>"inline"===ea(t,"display"),lc=(t,e)=>("x"===e?["border-left-width","border-right-width"]:["border-top-width","border-bottom-width"]).reduce((e,n)=>e+parseFloat(ea(t,n)),0)||0,ac=(t,e)=>parseFloat(getComputedStyle(t).getPropertyValue(`border-${e}-width`))||0,uc=t=>{let e=getComputedStyle(t),n=t=>parseFloat(e.getPropertyValue(`margin-${t}`))||0;return{top:n("top"),right:n("right"),bottom:n("bottom"),left:n("left")}},cc=function(){var t=u(function*({targetEl:t,targetProperty:e,anchorRect:n,anchorSide:i,anchorSize:r,fallback:s=null}){if(!r&&void 0===i||!t||!n)return s;if(r){if(!fl(e))return s;let i;switch(r){case"width":case"height":i=r;break;default:{let e=ea(t,"writing-mode");i=((t,e)=>{let n;switch(t){case"block":case"self-block":n=e?"width":"height";break;case"inline":case"self-inline":n=e?"height":"width"}return n})(r,e.startsWith("vertical-")||e.startsWith("sideways-"))}}return i?`${n[i]}px`:s}if(void 0!==i){let r,l,a=sc(e);if(!rl(e)||!a||rl(i)&&a!==sc(i))return s;let u=["top","left","inset-block-start","inset-inline-start"],c=["bottom","right","inset-block-end","inset-inline-end"];switch(i){case"left":case"top":r=0;break;case"right":case"bottom":r=100;break;case"center":r=50;break;case"inside":r=u.includes(e)?0:100;break;case"outside":r=u.includes(e)?100:0;break;default:var o;if(t)r=((t,e)=>{let n;switch(t){case"start":case"self-start":n=0;break;case"end":case"self-end":n=100;break;default:"number"==typeof t&&!Number.isNaN(t)&&(n=t)}if(void 0!==n)return e?100-n:n})(i,(yield null==(o=et.isRTL)?void 0:o.call(et,t))||!1)}let h="number"==typeof r&&!Number.isNaN(r),f=(t=>{switch(t){case"x":return"width";
1case"y":return"height"}return null})(a);if(h&&f){c.includes(e)&&(l=yield oa(t));let i=n[a]+n[f]*(r/100);switch(e){case"bottom":case"inset-block-end":{if(!l)break;let t=l.clientHeight;if(0===t&&oc(l)){let e=lc(l,a);t=l.offsetHeight-e}i=t-i;break}case"right":case"inset-inline-end":{if(!l)break;let t=l.clientWidth;if(0===t&&oc(l)){let e=lc(l,a);t=l.offsetWidth-e}i=t-i;break}}return`${i}px`}}return s});return function(e){return t.apply(this,arguments)}}(),hc=t=>"targetUUID"in t,fc=t=>"uuid"in t,pc=(t,e,n,i,r)=>{switch(t){case"start":return[null==e?"0px":e,"auto"];case"end":return["auto",null==n?"0px":n];case"center":{let t=parseFloat(null==e?"0":e);return[`${t+(i-t-parseFloat(null==n?"0":n)-r)/2}px`,"auto"]}}};function dc(t){return kc.apply(this,arguments)}function kc(){return kc=u(function*(t,e=!1){let n=document.documentElement;for(let[i,r]of Object.entries(t))for(let t of r){let r=t.anchorEl,s=t.targetEl;if(r&&s){let o=Ea(s);if(hc(t)){let i=t.wrapperEl,o=null==i?s:i,l=function(){var t=u(function*(t,e,n){return 0===t?"0px":yield cc({targetEl:o,targetProperty:e,anchorRect:n,anchorSide:t})});return function(e,n,i){return t.apply(this,arguments)}}();rt(r,o,u(function*(){let e=ea(s,Ua);i?i.setAttribute(za,e):s.setAttribute(Va,e);let a,u,c,h,f=yield et.getElementRects({reference:r,floating:o,strategy:Ea(o)}),p=t.insets,d=yield l(p.block[0],"top",f.reference),k=yield l(p.block[1],"bottom",f.reference),m=yield l(p.inline[0],"left",f.reference),y=yield l(p.inline[1],"right",f.reference);if(i)[a,u,c,h]=[d,k,m,y],n.style.setProperty(`${t.targetUUID}-justify-self`,t.alignments.inline),n.style.setProperty(`${t.targetUUID}-align-self`,t.alignments.block);else{let e=yield oa(s),n=uc(s);[a,u]=pc(t.alignments.block,d,k,e.clientHeight,f.floating.height+n.top+n.bottom),[c,h]=pc(t.alignments.inline,m,y,e.clientWidth,f.floating.width+n.left+n.right)}n.style.setProperty(`${t.targetUUID}-top`,a||null),n.style.setProperty(`${t.targetUUID}-left`,c||null),n.style.setProperty(`${t.targetUUID}-right`,h||null),n.style.setProperty(`${t.targetUUID}-bottom`,u||null)}),{animationFrame:e})}else rt(r,s,u(function*(){let e=yield et.getElementRects({reference:r,floating:s,strategy:o}),l=yield cc({targetEl:s,targetProperty:i,anchorRect:e.reference,anchorSide:t.anchorSide,anchorSize:t.anchorSize,fallback:t.fallbackValue});n.style.setProperty(t.uuid,l)}),{animationFrame:e})}else if(fc(t)){let e=yield cc({targetProperty:i,anchorSide:t.anchorSide,anchorSize:t.anchorSize,fallback:t.fallbackValue});n.style.setProperty(t.uuid,e)}}}),kc.apply(this,arguments)}function mc(t,e){let n=t.getBoundingClientRect(),i=uc(t),r=n.top-i.top,s=n.bottom+i.bottom,o=n.left-i.left,l=n.right+i.right,a=e===document.documentElement?{top:0,left:0,right:document.documentElement.clientWidth,bottom:document.documentElement.clientHeight}:(()=>{let t=e.getBoundingClientRect();return{top:t.top+ac(e,"top"),left:t.left+ac(e,"left"),right:t.right-ac(e,"right"),bottom:t.bottom-ac(e,"bottom")}})();return{top:a.top-r,bottom:s-a.bottom,left:a.left-o,right:l-a.right}}function yc(t,e){return gc.apply(this,arguments)}function gc(){return gc=u(function*(t,e,n=!1){if(!e.length)return;let i=document.querySelectorAll(t);for(let t of i){let i=!1,r=yield oa(t);rt({},t,u(function*(){if(i)return;i=!0,t.removeAttribute("data-anchor-polyfill");let n=mc(t,r);if(Object.values(n).every(t=>t<=0))return t.removeAttribute("data-anchor-polyfill-last-successful"),void(i=!1);for(let[n,{uuid:s}]of e.entries()){t.setAttribute("data-anchor-polyfill",s);let o=mc(t,r);if(Object.values(o).every(t=>t<=0)){t.setAttribute("data-anchor-polyfill-last-successful",s),i=!1;break}if(n===e.length-1){let e=t.getAttribute("data-anchor-polyfill-last-successful");e?t.setAttribute("data-anchor-polyfill",e):t.removeAttribute("data-anchor-polyfill"),i=!1;break}}}),{animationFrame:n,layoutShift:!1})}}),gc.apply(this,arguments)}function bc(){return bc=u(function*(t,e=!1){for(let i of Object.values(t)){var n;yield dc(null==(n=i.declarations)?{}:n,e)}for(let[n,r]of Object.entries(t)){var i;yield yc(n,null==(i=r.fallbacks)?[]:i,e)}}),bc.apply(this,arguments)}function Sc(){return Sc=u(function*(t){let e,n,i=function(t={}){var e;let n="boolean"==typeof t?{useAnimationFrame:t}:t,i=void 0===n.useAnimationFrame?!!window.UPDATE_ANCHOR_ON_ANIMATION_FRAME:n.useAnimationFrame;return Array.isArray(n.elements)||(n.elements=void 0),(!Array.isArray(n.roots)||0===n.roots.length)&&(n.roots=[document]),Object.assign(n,{useAnimationFrame:i,positionAreaContainingBlock:null==(e=n.positionAreaContainingBlock)||e})}(null==t?window.ANCHOR_POSITIONING_POLYFILL_OPTIONS:t),r=yield function(t){return Wa.apply(this,arguments)}(i),s={};ha.clear();try{Na(r,i.roots)&&(r=rc(r,void 0,i.roots));let t=yield function(t,e){return nc.apply(this,arguments)}(r,i);s=t.rules,e=t.inlineStyles,n=t.positionAreaStyles}catch(t){throw ha.size>0&&(console.group(`The CSS anchor positioning polyfill was not applied due to ${1===ha.size?"a CSS parse error":"CSS parse errors"}
1.`),ha.forEach(t=>{console.warn(t.formattedMessage)}),console.groupEnd()),t}return Object.values(s).length&&(rc(r,e,i.roots),function(t){for(let[e,n]of t){if(!n)continue;let t=document.createElement("style");t.setAttribute(Da,"true"),t.textContent=n,e.append(t)}}(n),yield function(t){return bc.apply(this,arguments)}(s,i.useAnimationFrame)),s}),Sc.apply(this,arguments)}var vc=function(t){return Sc.apply(this,arguments)};export{vc as default};
2//# sourceMappingURL=css-anchor-positioning-fn-B4YtgiB-.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.