1
2
3
4
5
6
7
8
9
| !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";const{getOwnPropertyDescriptor:e}=Object,{DOCUMENT_POSITION_CONTAINED_BY:t,DOCUMENT_POSITION_CONTAINS:r,DOCUMENT_POSITION_PRECEDING:n,DOCUMENT_POSITION_FOLLOWING:o,ELEMENT_NODE:i,TEXT_NODE:s,CDATA_SECTION_NODE:a,PROCESSING_INSTRUCTION_NODE:u,COMMENT_NODE:c,DOCUMENT_FRAGMENT_NODE:l}=Node,{appendChild:f,cloneNode:p,compareDocumentPosition:h,insertBefore:d,removeChild:v,replaceChild:y,hasChildNodes:g,getRootNode:b}=Node.prototype,T=e(Node.prototype,"firstChild").get,m=e(Node.prototype,"lastChild").get;e(Node.prototype,"textContent").get;const w=e(Node.prototype,"parentNode").get;e(Node.prototype,"ownerDocument").get;const E=e(Node.prototype,"parentElement").get,S=e(Node.prototype,"textContent").get,_=e(Node.prototype,"childNodes").get;e(Node.prototype,"isConnected").get;const{getOwnPropertyDescriptor:P,hasOwnProperty:O}=Object,{addEventListener:k,getAttribute:I,getBoundingClientRect:x,getElementsByTagName:D,getElementsByTagNameNS:N,getElementsByClassName:L,matches:A,closest:M,hasAttribute:C,querySelector:R,querySelectorAll:F,removeAttribute:j,removeEventListener:q,setAttribute:G}=Element.prototype;O.call(Element.prototype,"attachShadow")&&Element.prototype.attachShadow;const U=P(Element.prototype,"childElementCount").get,B=P(Element.prototype,"firstElementChild").get,W=P(Element.prototype,"lastElementChild").get,Y=P(Element.prototype,"innerHTML"),V=Y.get;Y.set;const H=P(Element.prototype,"outerHTML"),Q=H.get;H.set;const $=P(Element.prototype,"tagName").get,K=P(HTMLElement.prototype,"tabIndex");K.get,K.set;const z=P(Element.prototype,"children").get,X=P(Element.prototype,"shadowRoot").get,{getOwnPropertyDescriptor:J}=Object;J(Document.prototype,"activeElement").get,J(Document.prototype,"defaultView").get;const{createComment:Z,querySelector:ee,querySelectorAll:te,getElementById:re,getElementsByName:ne,getElementsByClassName:oe,getElementsByTagName:ie,getElementsByTagNameNS:se}=Document.prototype,{setPrototypeOf:ae}=Reflect;var ue;function ce(){const e=`${()=>1}`.includes("*"),t=Symbol.for("@@lockerLiveValue"),r=Symbol.for("@@lockerMagicValue"),{toStringTag:n}=Symbol,o=Symbol.for("@@membraneUndefinedValue"),i=Array,{isArray:s}=i,{isView:a}=ArrayBuffer,u=Object,{defineProperties:c,freeze:l,getOwnPropertyDescriptors:f,isFrozen:p,isSealed:h,prototype:d,seal:v}=u,{hasOwnProperty:y,toString:g}=d,{revocable:b}=Proxy,{apply:T,construct:m,defineProperty:w,deleteProperty:E,get:S,getOwnPropertyDescriptor:_,getPrototypeOf:P,has:O,isExtensible:k,ownKeys:I,preventExtensions:x,set:D,setPrototypeOf:N}=Reflect,{slice:L}=String.prototype,A=TypeError,{get:M,set:C}=WeakMap.prototype,R=console,{warn:F}=R,j=eval,q="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||(w(Object.prototype,"globalThis",{__proto__:null,configurable:!0,get(){return E(Object.prototype,"globalThis"),this||self}}),globalThis);let G,U,B;return function(e){e[e.None=0]="None",e[e.MagicMarker=1]="MagicMarker"}(G||(G={})),N(G,null),function(e){e[e.None=0]="None",e[e.IsNotExtensible=1]="IsNotExtensible",e[e.IsSealed=2]="IsSealed",e[e.IsFrozen=4]="IsFrozen",e[e.Revoked=8]="Revoked"}(U||(U={})),N(U,null),function(e){e[e.None=0]="None",e[e.IsArray=1]="IsArray",e[e.IsFunction=2]="IsFunction",e[e.IsArrowFunction=4]="IsArrowFunction",e[e.IsObject=8]="IsObject",e[e.Revoked=16]="Revoked"}(B||(B={})),N(B,null),function(W,Y,V=ue.None,H,Q){const{distortionCallback:$=(e=>e),instrumentation:K}=Q||{__proto__:null},z=new WeakMap,X=`to:${W}`,J=`from:${W}`,Z=!!(V&G.MagicMarker);let ee,te,re,ne,oe,ie,se,ae,ce,le,fe,pe,he,de,ve,ye,ge,be,Te;function me(e,t){he(t,((...t)=>{const r={};for(let e=0,n=t.length;e<n;e+=7){r[t[e]]=we(t[e+1],t[e+2],t[e+3],t[e+4],t[e+5],t[e+6])}c(e,r)}))}function we(e,t,r,n,i,s){const a={__proto__:null};return e!==o&&(a.configurable=!!e),t!==o&&(a.enumerable=!!t),r!==o&&(a.writable=!!r),i!==o&&(a.get=Oe(i)),s!==o&&(a.set=Oe(s)),n!==o&&(a.value=Oe(n)),a}function Ee(t){const r=()=>{Te=t};return e&&(r["[[OriginalTarget]]"]=t,r["[[Color]]"]=W),r}function Se(e){return function(...t){try{return T(e,this,t)}catch(e){const t=ke();if(void 0===t)throw new A(null==e?void 0:e.message);throw t}}}function _e(e){const t=Re(e),{configurable:r,enumerable:n,writable:i,value:s,get:a,set:u}=t;return["configurable"in t?!!r:o,"enumerable"in t?!!n:o,"writable"in t?!!i:o,"value"in t?xe(s):o,"get"in t?xe(a):o,"set"in t?xe(u):o]}function Pe(e,t){let r=Le(e);for(;r;){const e=_(r,t);if(e)return Re(e);r=P(r)}}function Oe(e){return"function"==typeof e?(e(),ke()):e}function ke(){const e=Te;return Te=void 0,e}function Ie(e){let t=T(M,z,[e]);if(t)return t;const r=function(e){let t;try{return t=$(e),t}finally{if(t!==e&&typeof t!=typeof e)throw new A(`Invalid distortion ${e}.`)}}(e),n=Ee(r),o=function(e){let t=B.None;if("function"==typeof e){t|=B.IsFunction;try{t|=+!("prototype"in e)&&B.IsArrowFunction}catch(e){}}else{let r=!1;try{r=s(e)}catch(e){t|=B.Revoked}t|=+r&&B.IsArray,t|=+!r&&B.IsObject}return t}(r);let i;if("function"==typeof e)try{const t=_(e,"name");if(t){i=Re(t).value}}catch(e){}return t=ee(n,o,i),T(C,z,[e,t]),t}function xe(e){if(void 0!==e)return null===e||"function"!=typeof e&&"object"!=typeof e?e:Ie(e)}function De(e,t,r){return K?function(...n){const o=K.startActivity(t,{crossingDirection:r});try{return T(e,this,n)}catch(e){throw o.error(e),e}finally{o.stop()}}:e}function Ne(e,t,r){let n;return ie(e,r,((e,o,i,s,a,u)=>{n=we(e,o,i,s,a,u),!1===n.configurable&&w(t,r,n)})),n}function Le(e){return Oe(se(e))}function Ae(e,t,n,o,i,s){const a=Ne(e,t,n),u=a||Pe(e,n);if(u){if("get"in u||"set"in u){const{set:e}=u;return!!e&&(T(e,i,[o]),!0)}if(!1===u.writable)return!1}let c;if(s)c=a;else{if(null===i||"function"!=typeof i&&"object"!=typeof i)return!1;const e=_(i,n);e&&(c=Re(e))}return c?!("get"in c)&&!("set"in c)&&!1!==c.writable&&(!function(e){return Z&&T(y,e,[r])}(i)?w(i,n,{__proto__:null,value:o}):fe(e,n,xe(o),Ie(i)),!0):w(i,n,{__proto__:null,configurable:!0,enumerable:!0,value:o,writable:!0})}function Me(e,t){me(e,t);const r=Le(t);N(e,r),x(e)}function Ce(e){const t=xe(e);return"function"==typeof t&&t(),e}function Re(e){return N(e,null),e}class Fe{constructor(t,r,n){this.color=W,this.apply=function(e,t,r){const{foreignTargetPointer:n}=this,o=[n,xe(t)],{length:i}=r,{length:s}=o;o.length+=i;for(let e=0,t=i;e<t;e+=1){const t=r[e],n=e+s;o[n]=void 0===t?void 0:null===t||"function"!=typeof t&&"object"!=typeof t?t:Ie(t)}return Oe(T(te,void 0,o))},this.construct=function(e,t,r){if(void 0===r)throw new A;const{foreignTargetPointer:n}=this,o=[n,xe(r)],{length:i}=t,{length:s}=o;o.length+=i;for(let e=0,r=i;e<r;e+=1){const r=t[e],n=e+s;o[n]=void 0===r?void 0:null===r||"function"!=typeof r&&"object"!=typeof r?r:Ie(r)}return Oe(T(re,void 0,o))};const o=function(t,r){let n;return t&B.IsFunction?(n=t&B.IsArrowFunction?()=>{}:function(){},e&&w(n,"name",{__proto__:null,configurable:!0,enumerable:!1,value:r,writable:!1})):n=t&B.IsArray?[]:{},n}(r,n),{proxy:i,revoke:s}=b(o,this);this.foreignTargetPointer=t,this.proxy=i,this.revoke=s,this.defineProperty=Fe.defaultDefinePropertyTrap,this.deleteProperty=Fe.defaultDeletePropertyTrap,this.isExtensible=Fe.defaultIsExtensibleTrap,this.getOwnPropertyDescriptor=Fe.defaultGetOwnPropertyDescriptorTrap,this.getPrototypeOf=Fe.defaultGetPrototypeOfTrap,this.get=Fe.defaultGetTrap,this.has=Fe.defaultHasTrap,this.ownKeys=Fe.defaultOwnKeysTrap,this.preventExtensions=Fe.defaultPreventExtensionsTrap,this.setPrototypeOf=Fe.defaultSetPrototypeOfTrap,this.set=Fe.defaultSetTrap,r&B.Revoked&&s(),Y?r&B.IsArray&&this.makeProxyLive():l(this)}makeProxyLive(){this.defineProperty=Fe.liveDefinePropertyTrap,this.deleteProperty=Fe.liveDeletePropertyTrap,this.preventExtensions=Fe.livePreventExtensionsTrap,this.set=Fe.liveSetTrap,this.setPrototypeOf=Fe.liveSetPrototypeOfTrap,l(this)}makeProxyStatic(t){const{foreignTargetPointer:r}=this;if(e)try{be("Mutations on the membrane of an object originating outside of the sandbox will not be reflected on the object itself:",r)}catch(e){}const n=de(r);if(n&U.Revoked)this.revoke();else{try{const e=Le(r);N(t,e)}catch(e){return void this.revoke()}me(t,r),n&U.IsFrozen?l(t):n&U.IsSealed?v(t):n&U.IsNotExtensible&&x(t),this.defineProperty=Fe.staticDefinePropertyTrap,this.deleteProperty=Fe.staticDeletePropertyTrap,this.get=Fe.staticGetTrap,this.getOwnPropertyDescriptor=Fe.staticGetOwnPropertyDescriptorTrap,this.getPrototypeOf=Fe.staticGetPrototypeOfTrap,this.has=Fe.staticHasTrap,this.isExtensible=Fe.staticIsExtensibleTrap,this.ownKeys=Fe.staticOwnKeysTrap,this.preventExtensions=Fe.staticPreventExtensionsTrap,this.set=Fe.staticSetTrap,this.setPrototypeOf=Fe.staticSetPrototypeOfTrap,l(this)}}makeProxyUnambiguous(e){ge(this.foreignTargetPointer)?this.makeProxyLive():this.makeProxyStatic(e)}static liveDefinePropertyTrap(e,t,r){return function(e,t,r,n){const o=_e(n),i=ne(e,r,o[0],o[1],o[2],o[3],o[4],o[5]);return i&&!1===o[0]&&ie(e,r,((e,n,o,i,s,a)=>{w(t,r,we(e,n,o,i,s,a))})),i}(this.foreignTargetPointer,e,t,r)}static liveDeletePropertyTrap(e,t){return function(e,t,r){return oe(e,r)}(this.foreignTargetPointer,0,t)}static liveGetOwnPropertyDescriptorTrap(e,t){return Ne(this.foreignTargetPointer,e,t)}static liveGetPrototypeOfTrap(e){return Le(this.foreignTargetPointer)}static liveGetTrap(e,t,r){return function(e,t,r,o){const i=Ne(e,t,r)||Pe(e,r);if(i){const{get:e,value:t}=i;return e?T(e,o,[]):t}if(r===n)return ve(e)}(this.foreignTargetPointer,e,t,r)}static liveHasTrap(e,t){return function(e,t){if(ye(e,t))return!0;let r=Le(e);for(;r;){if(T(y,r,[t]))return!0;r=P(r)}return!1}(this.foreignTargetPointer,t)}static liveIsExtensibleTrap(e){return function(e,t){if(k(t)){if(ae(e))return!0;Me(t,e)}return!1}(this.foreignTargetPointer,e)}static liveOwnKeysTrap(e){return function(e){let t;return ce(e,((...e)=>{t=e})),t||[]}(this.foreignTargetPointer)}static livePreventExtensionsTrap(e){return function(e,t){if(k(t)){if(!le(e))return ae(e)||Me(t,e),!1;Me(t,e)}return!0}(this.foreignTargetPointer,e)}static liveSetPrototypeOfTrap(e,t){return function(e,t){const r=t?Ie(t):t;return pe(e,r)}(this.foreignTargetPointer,t)}static liveSetTrap(e,t,r,n){const o=this.proxy===n;return Ae(this.foreignTargetPointer,e,t,r,n,o)}static pendingDefinePropertyTrap(e,t,r){return this.makeProxyUnambiguous(e),this.defineProperty(e,t,r)}static pendingDeletePropertyTrap(e,t){return this.makeProxyUnambiguous(e),this.deleteProperty(e,t)}static pendingPreventExtensionsTrap(e){return this.makeProxyUnambiguous(e),this.preventExtensions(e)}static pendingSetPrototypeOfTrap(e,t){return this.makeProxyUnambiguous(e),this.setPrototypeOf(e,t)}static pendingSetTrap(e,t,r,n){return this.makeProxyUnambiguous(e),this.set(e,t,r,n)}static staticGetTrap(e,t,r){return t===n?ve(this.foreignTargetPointer):S(e,t,r)}}return Fe.staticDefinePropertyTrap=w,Fe.staticDeletePropertyTrap=E,Fe.staticGetOwnPropertyDescriptorTrap=_,Fe.staticGetPrototypeOfTrap=P,Fe.staticHasTrap=O,Fe.staticIsExtensibleTrap=k,Fe.staticOwnKeysTrap=I,Fe.staticPreventExtensionsTrap=x,Fe.staticSetTrap=D,Fe.staticSetPrototypeOfTrap=N,Fe.defaultGetTrap=Fe.liveGetTrap,Fe.defaultGetOwnPropertyDescriptorTrap=Fe.liveGetOwnPropertyDescriptorTrap,Fe.defaultGetPrototypeOfTrap=Fe.liveGetPrototypeOfTrap,Fe.defaultHasTrap=Fe.liveHasTrap,Fe.defaultIsExtensibleTrap=Fe.liveIsExtensibleTrap,Fe.defaultOwnKeysTrap=Fe.liveOwnKeysTrap,Fe.defaultDefinePropertyTrap=Y?Fe.pendingDefinePropertyTrap:Fe.liveDefinePropertyTrap,Fe.defaultDeletePropertyTrap=Y?Fe.pendingDeletePropertyTrap:Fe.liveDeletePropertyTrap,Fe.defaultPreventExtensionsTrap=Y?Fe.pendingPreventExtensionsTrap:Fe.livePreventExtensionsTrap,Fe.defaultSetTrap=Y?Fe.pendingSetTrap:Fe.liveSetTrap,Fe.defaultSetPrototypeOfTrap=Y?Fe.pendingSetPrototypeOfTrap:Fe.liveSetPrototypeOfTrap,N(Fe.prototype,null),l(Fe.prototype),H(Ee(q),ke,xe,((e,t)=>{e();return Ee(ke()[t])}),(e=>{try{return xe(j(e))}catch(e){throw Ce(e)}}),((e,t)=>{e();const r=ke();T(C,z,[r,t])}),((e,t,r)=>{const{proxy:n}=new Fe(e,t,r);return T(C,z,[n,e]),Ee(n)}),De(((e,t,...r)=>{e();const n=Te;Te=void 0;let o=t;"function"==typeof t&&(t(),o=Te,Te=void 0);const{length:s}=r,a=new i(s);for(let e=0,t=s;e<t;e+=1){const t=r[e];let n=t;"function"==typeof t&&(t(),n=Te,Te=void 0),a[e]=n}let u;try{u=T(n,o,a)}catch(e){throw Ce(e)}if(void 0!==u)return null===u||"function"!=typeof u&&"object"!=typeof u?u:Ie(u)}),"callableApply",X),De(((e,t,...r)=>{e();const n=Te;let o=t;"function"==typeof t&&(t(),o=Te,Te=void 0);const{length:s}=r,a=new i(s);for(let e=0,t=s;e<t;e+=1){const t=r[e];let n=t;"function"==typeof t&&(t(),n=Te,Te=void 0),a[e]=n}let u;try{u=m(n,a,o)}catch(e){throw Ce(e)}if(void 0!==u)return null===u||"function"!=typeof u&&"object"!=typeof u?u:Ie(u)}),"callableConstruct",X),De(((e,t,r,n,o,i,s,a)=>{e();const u=ke();try{return w(u,t,we(r,n,o,i,s,a))}catch(e){throw Ce(e)}}),"callableDefineProperty",X),De(((e,t)=>{e();const r=ke();try{return E(r,t)}catch(e){throw Ce(e)}}),"callableDeleteProperty",X),De(((e,t,r)=>{e();const n=ke();let o;try{o=_(n,t)}catch(e){throw Ce(e)}if(o){const e=_e(o);r(e[0],e[1],e[2],e[3],e[4],e[5])}}),"callableGetOwnPropertyDescriptor",X),De((e=>{e();const t=ke();let r;try{r=P(t)}catch(e){throw Ce(e)}return r?Ie(r):r}),"callableGetPrototypeOf",X),De((e=>{e();const t=ke();try{return k(t)}catch(e){throw Ce(e)}}),"callableIsExtensible",X),De(((e,t)=>{e();const r=ke();let n;try{n=I(r)}catch(e){throw Ce(e)}T(t,void 0,n)}),"callableOwnKeys",X),De((e=>{e();const t=ke();try{return x(t)}catch(e){throw Ce(e)}}),"callablePreventExtensions",X),De(((e,t,r,n)=>{e();const o=ke();try{return D(o,t,Oe(r),Oe(n))}catch(e){throw Ce(e)}}),"callableSet",X),De(((e,t)=>{e();const r=ke(),n=Oe(t);try{return N(r,n)}catch(e){throw Ce(e)}}),"callableSetPrototypeOf",X),De(((e,t)=>{e();const r=ke();let n;try{n=f(r)}catch(e){throw Ce(e)}const s=I(n),{length:a}=s,u=new i(7*a);for(let e=0,t=0,r=a;e<r;e+=1,t+=7){const r=s[e],i=Re(n[r]),{configurable:a,enumerable:c,writable:l,value:f,get:p,set:h}=i;u[t]=r,u[t+1]="configurable"in i?a:o,u[t+2]="enumerable"in i?c:o,u[t+3]="writable"in i?l:o,u[t+4]="value"in i?xe(f):o,u[t+5]="get"in i?xe(p):o,u[t+6]="set"in i?xe(h):o}T(t,void 0,u)}),"callableGetOwnPropertyDescriptors",X),De((e=>{e();return function(e){let t=U.None;try{p(e)?t|=U.IsSealed&U.IsFrozen&U.IsNotExtensible:h(e)?t|=U.IsSealed:k(e)||(t|=U.IsNotExtensible),s(e)}catch(e){t|=U.Revoked}return t}(ke())}),"callableGetTargetIntegrityTraits",X),De((e=>{e();const t=ke();try{if("object"==typeof t&&null!==t&&!s(t)){const e=T(g,t,[]);return T(L,e,[8,-1])}}catch(e){}}),"callableGetUnbrandedTag",X),De(((e,t)=>{e();const r=ke();try{return T(y,r,[t])}catch(e){throw Ce(e)}}),"callableHasOwnProperty",X),De((e=>{e();const r=ke();try{return function(e){if(e===d)return!1;if("object"==typeof e){if(a(e))return!0;const{constructor:t}=e;if(t===u)return!0;if(null===P(e))return"function"!=typeof t||t.prototype!==e}return T(y,e,[t])}(r)}catch(e){throw Ce(e)}}),"callableIsLiveTarget",X),De(((...e)=>{for(let t=0,r=e.length;t<r;t+=1)e[t]=Oe(e[t]);try{T(F,R,e)}catch(e){throw Ce(e)}}),"callableWarn",X)),(...e)=>{const{6:t,7:r,8:n,9:o,10:i,11:s,12:a,13:u,14:c,15:l,16:f,17:p,18:h,19:d,20:v,21:y,22:g,23:b}=e;ee=t,te=Se(De(r,"callableApply",J)),re=Se(De(n,"callableConstruct",J)),ne=Se(De(o,"callableDefineProperty",J)),oe=Se(De(i,"callableDeleteProperty",J)),ie=Se(De(s,"callableGetOwnPropertyDescriptor",J)),se=Se(De(a,"callableGetPrototypeOf",J)),ae=Se(De(u,"callableIsExtensible",J)),ce=Se(De(c,"callableOwnKeys",J)),le=Se(De(l,"callablePreventExtensions",J)),fe=Se(De(f,"callableSet",J)),pe=Se(De(p,"callableSetPrototypeOf",J)),he=Se(De(h,"callableGetOwnPropertyDescriptors",J)),de=Se(De(d,"callableGetTargetIntegrityTraits",J)),ve=Se(De(v,"callableGetUnbrandedTag",J)),ye=Se(De(y,"callableHasOwnProperty",J)),ge=Se(De(g,"callableIsLiveTarget",J)),be=Se(De(b,"callableWarn",J))}}}!function(e){e[e.None=0]="None",e[e.MagicMarker=1]="MagicMarker"}(ue||(ue={})),ae(ue,null);const le=TypeError,fe=`\n(function(){\n 'use strict';\n (${function(){if("function"!=typeof Error.prepareStackTrace){const e=(()=>{var e;Error.prepareStackTrace=(e,t)=>t;const t=(new Error).stack;return delete Error.prepareStackTrace,Array.isArray(t)&&t.length>0?null==(e=t[0])?void 0:e.constructor:void 0})();if("function"==typeof e){const t=`${()=>1}`.includes("*"),r=`$LWS${""}`,{toString:n}=Error.prototype,{apply:o,defineProperty:i}=Reflect,{endsWith:s,includes:a}=String.prototype,{getEvalOrigin:u,getFunctionName:c,toString:l}=e.prototype,f=function(e,t){let i="";try{i=o(n,e,[])}catch(e){i="<error>"}let f=!1;for(let e=0,{length:n}=t;e<n;e+=1){const n=t[e],p=o(c,n,[]);let h=!1;if("string"==typeof p&&"eval"!==p&&o(s,p,[r])&&(h=!0),!h){const e=o(u,n,[]);"string"==typeof e&&o(a,e,[r])&&(h=!0)}if(h)f||(f=!0,i+="\n at LWS");else{f=!1;try{i+=`\n at ${o(l,n,[])}`}catch(e){}}}return i};i(Error,"prepareStackTrace",{__proto__:null,enumerable:!0,value:function(e,t){return f(e,t)}}),i(Error,"stackTraceLimit",{__proto__:null,configurable:t,enumerable:!0,value:20,writable:t})}}}.toString()})();\n return (${ce.toString()})\n})()`;const pe=Symbol.for("@@membraneUndefinedValue"),he=Error,{assign:de,keys:ve}=Object,{apply:ye,ownKeys:ge}=Reflect,{slice:be,toUpperCase:Te}=String.prototype;function me(e){const{length:t}=e;if(!t)return e;const r=ye(Te,e[0],[]);return 1===t?r:r+ye(be,e,[1])}class we{constructor(e){if(void 0===e)throw new he("Missing VirtualEnvironmentOptions options bag.");const{blueConnector:t,redConnector:r,distortionCallback:n,support:o,instrumentation:i}=e;this.blueConnector=t,this.redConnector=r;let s=ue.None;const a=o?ve(o):[];for(let e=0,{length:t}=a;e<t;e+=1){const t=me(a[e]);s|=ue[t]}let u,c;const l=t("blue",false,s,((...e)=>{u=e}),{distortionCallback:n,instrumentation:i}),f=r("red",true,s,((...e)=>{c=e}));ye(l,void 0,c),ye(f,void 0,u);const{0:p,1:h,2:d,3:v,5:y}=u;this.blueGlobalThisPointer=p,this.blueGetSelectedTarget=h,this.blueGetTransferableValue=d,this.blueCallableGetPropertyValuePointer=v,this.blueCallableLinkPointers=y;const{0:g,3:b,4:T,5:m,9:w,17:E}=c;this.redGlobalThisPointer=g,this.redCallableEvaluate=T,this.redCallableSetPrototypeOf=E,this.redCallableDefineProperty=w,this.redCallableGetPropertyValuePointer=b,this.redCallableLinkPointers=m}evaluate(e){try{const t=this.redCallableEvaluate(e);return"function"==typeof t?(t(),this.blueGetSelectedTarget()):t}catch(e){const t=this.blueGetSelectedTarget();if(t)throw t;throw e}}link(...e){let t=this.blueGlobalThisPointer,r=this.redGlobalThisPointer;for(let n=0,{length:o}=e;n<o;n+=1){const o=e[n];t=this.blueCallableGetPropertyValuePointer(t,o),r=this.redCallableGetPropertyValuePointer(r,o)}this.redCallableLinkPointers(r,t),this.blueCallableLinkPointers(t,r)}remap(e,t){const r=ge(t),n=this.blueGetTransferableValue(e);for(let e=0,{length:o}=r;e<o;e+=1){const o=r[e],i=t[o],s=de({__proto__:null},i);this.redCallableDefineProperty(n,o,"configurable"in s?!!s.configurable:pe,"enumerable"in s?!!s.enumerable:pe,"writable"in s?!!s.writable:pe,"value"in s?this.blueGetTransferableValue(s.value):pe,"get"in s?this.blueGetTransferableValue(s.get):pe,"set"in s?this.blueGetTransferableValue(s.set):pe)}}remapProto(e,t){const r=this.blueGetTransferableValue(e),n=t?this.blueGetTransferableValue(t):t;this.redCallableSetPrototypeOf(r,n)}}const{includes:Ee}=Array.prototype,{apply:Se,getOwnPropertyDescriptor:_e,ownKeys:Pe}=Reflect,Oe=["AggregateError","Array","Error","EvalError","Function","Object","Proxy","RangeError","ReferenceError","SyntaxError","TypeError","URIError","eval"],ke=["globalThis","Infinity","NaN","undefined","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","BigInt","Boolean","FinalizationRegistry","Number","RegExp","String","Symbol","WeakRef","JSON","Math","Reflect","escape","unescape",...Oe];function Ie(e,t){const r=Pe(t);for(let n=0,{length:o}=r;n<o;n+=1){const o=r[n];if(!Se(Ee,ke,[o])){const r=_e(t,o);r&&(e[o]=r)}}return e}const xe=TypeError;const{assign:De,getOwnPropertyDescriptors:Ne}=Object,{getPrototypeOf:Le,apply:Ae}=Reflect,{get:Me,set:Ce}=WeakMap.prototype,Re=new WeakMap;function Fe(e){let t=Ae(Me,Re,[e]);return t||(t=function(e){const t={__proto__:null};return t.window=e.window,t.document=e.document,t.WindowProto=Le(t.window),t.WindowPropertiesProto=Le(t.WindowProto),t.EventTargetProto=Le(t.WindowPropertiesProto),t.DocumentProto=Le(t.document),t}(e),Ae(Ce,Re,[e,t]),t.EventTargetProtoDescriptors=Ne(t.EventTargetProto),t)}function je(e,t,r){e.remapProto(t.document,t.DocumentProto);const n=function(e){const t={};return De(t,e),delete t.document,delete t.location,delete t.top,delete t.window,delete t.chrome,t}(r);e.remap(t.window,n),e.remap(t.EventTargetProto,t.EventTargetProtoDescriptors)}Fe(window);const{close:qe,createElement:Ge,open:Ue}=document,{remove:Be,setAttribute:We}=Element.prototype,{appendChild:Ye}=Node.prototype,{assign:Ve}=Object,{__lookupGetter__:He}=Object.prototype,{apply:Qe}=Reflect,$e=Qe(He,Document.prototype,["body"]),Ke=Qe(He,HTMLElement.prototype,["style"]),ze=Qe(He,HTMLIFrameElement.prototype,["contentWindow"]),Xe=Qe(He,Node.prototype,["isConnected"]),Je=Qe(He,Node.prototype,["lastChild"]);function Ze(){const e=(t=document,Qe(Ge,t,["iframe"]));var t;const r=function(e){return Qe($e,e,[])}(document)||function(e){return Qe(Je,e,[])}(document);return Qe(Ke,e,[]).display="none",function(e,t,r){Qe(We,e,[t,r])}(e,"sandbox","allow-same-origin allow-scripts"),function(e,t){Qe(Ye,e,[t])}(r,e),e}function et(e){(function(e){return Qe(Xe,e,[])})(e)&&Qe(Be,e,[])}const tt=ce();function rt(e){const t=e.length,r=[];if(t>0)for(let n=0;n<t;n++)r[n]=e[n];return r}const{assign:nt,create:ot,defineProperties:it,defineProperty:st,freeze:at,getOwnPropertyDescriptor:ut,getOwnPropertyNames:ct,getPrototypeOf:lt,hasOwnProperty:ft,keys:pt,seal:ht,setPrototypeOf:dt}=Object,{filter:vt,find:yt,indexOf:gt,join:bt,map:Tt,push:mt,reduce:wt,reverse:Et,slice:St,splice:_t,unshift:Pt,forEach:Ot}=Array.prototype;function kt(e){return void 0===e}function It(e){return null===e}function xt(e){return!0===e}function Dt(e){return"string"==typeof e}const Nt=e=>new Map(e);function Lt(e){return Symbol(e)}function At(e,t,r){e[t]=r}function Mt(e,t){return e[t]}function Ct(e){return e instanceof HTMLElement&&!!X.call(e)}function Rt(e){return X.call(e)}const Ft=Lt("StaticNodeListItems");function jt(){throw new TypeError("Illegal constructor")}function qt(e){const t=ot(jt.prototype);return At(t,Ft,e),Ot.call(e,((e,r)=>{st(t,r,{value:e,enumerable:!0,configurable:!0})})),t}jt.prototype=ot(NodeList.prototype,{constructor:{writable:!0,configurable:!0,value:jt},item:{writable:!0,enumerable:!0,configurable:!0,value(e){return this[e]}},length:{enumerable:!0,configurable:!0,get(){return Mt(this,Ft).length}},forEach:{writable:!0,enumerable:!0,configurable:!0,value(e,t){Ot.call(Mt(this,Ft),e,t)}},entries:{writable:!0,enumerable:!0,configurable:!0,value(){return Tt.call(Mt(this,Ft),((e,t)=>[t,e]))}},keys:{writable:!0,enumerable:!0,configurable:!0,value(){return Tt.call(Mt(this,Ft),((e,t)=>t))}},values:{writable:!0,enumerable:!0,configurable:!0,value(){return Mt(this,Ft)}},[Symbol.iterator]:{writable:!0,configurable:!0,value(){let e=0;return{next:()=>{const t=Mt(this,Ft);return e<t.length?{value:t[e++],done:!1}:{done:!0}}}}},[Symbol.toStringTag]:{configurable:!0,get:()=>"NodeList"}}),dt(jt,NodeList);const Gt=ut(Element.prototype,"assignedSlot").get;function Ut(e){return e instanceof HTMLSlotElement}function Bt(e){return Ut(e)?e.assignedNodes({flatten:!0}):Ct(e)?rt(_.call(Rt(e))):rt(_.call(e))}function Wt(e){switch(e.nodeType){case i:case l:{const t=Bt(e);let r="";for(let e=0,n=t.length;e<n;e+=1){const n=t[e];n.nodeType!==c&&(r+=Wt(n))}return r}default:return e.nodeValue}}var Yt=Nt([[T,function(){const e=Bt(this);return e.length>0?e[0]:null}],[m,function(){const e=Bt(this);return e.length>0?e[e.length-1]:null}],[S,function(){return Wt(this)}],[w,function(){const e=Gt.call(this);if(e)return e;const t=w.call(this);return t&&t instanceof ShadowRoot?t.host:t}],[E,function(){const e=Gt.call(this);if(e)return e;const t=w.call(this);return t&&t instanceof ShadowRoot?t.host:E.call(this)}],[_,function(){return qt(Bt(this))}],[g,function(){return Bt(this).length>0}],[b,function(){return this.isConnected?this.ownerDocument:b.call(this)}]]);var Vt=Nt([[ut(Text.prototype,"assignedSlot").get,function(){return null}]]);const{assignedNodes:Ht,assignedElements:Qt}=HTMLSlotElement.prototype;var $t=Nt([[Qt,function(e){return!kt(e)&&xt(e.flatten)?Qt.call(this,{flatten:!0}):[]}],[Ht,function(e){return!kt(e)&&xt(e.flatten)?Ht.call(this,{flatten:!0}):[]}]]);const Kt=Lt("StaticHTMLCollectionItems");function zt(){throw new TypeError("Illegal constructor")}function Xt(e){let t="";for(let r=0,n=e.length;r<n;r+=1)t+=ar(e[r]);return t}function Jt(e){return Ut(e)?Xt(e.assignedNodes({flatten:!0})):Ct(e)?Xt(_.call(Rt(e))):Xt(_.call(e))}zt.prototype=ot(HTMLCollection.prototype,{constructor:{writable:!0,configurable:!0,value:zt},item:{writable:!0,enumerable:!0,configurable:!0,value(e){return this[e]}},length:{enumerable:!0,configurable:!0,get(){return Mt(this,Kt).length}},namedItem:{writable:!0,enumerable:!0,configurable:!0,value(e){if(""===e)return null;const t=Mt(this,Kt);for(let r=0,n=t.length;r<n;r++){const r=t[n];if(e===I.call(r,"id")||e===I.call(r,"name"))return r}return null}},forEach:{writable:!0,enumerable:!0,configurable:!0,value(e,t){Ot.call(Mt(this,Kt),e,t)}},entries:{writable:!0,enumerable:!0,configurable:!0,value(){return Tt.call(Mt(this,Kt),((e,t)=>[t,e]))}},keys:{writable:!0,enumerable:!0,configurable:!0,value(){return Tt.call(Mt(this,Kt),((e,t)=>t))}},values:{writable:!0,enumerable:!0,configurable:!0,value(){return Mt(this,Kt)}},[Symbol.iterator]:{writable:!0,configurable:!0,value(){let e=0;return{next:()=>{const t=Mt(this,Kt);return e<t.length?{value:t[e++],done:!1}:{done:!0}}}}},[Symbol.toStringTag]:{configurable:!0,get:()=>"HTMLCollection"}}),dt(zt,HTMLCollection);const Zt=/[&\u00A0"]/g,er=/[&\u00A0<>]/g,{replace:tr,toLowerCase:rr}=String.prototype;function nr(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" ";default:return""}}function or(e){return tr.call(e,Zt,nr)}const ir=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"]),sr=new Set(["STYLE","SCRIPT","XMP","IFRAME","NOEMBED","NOFRAMES","PLAINTEXT","NOSCRIPT"]);function ar(e){switch(e.nodeType){case i:{const{attributes:t}=e,r=$.call(e);let n="<"+rr.call(r);for(let e,r=0;e=t[r];r++)n+=" "+e.name+'="'+or(e.value)+'"';return n+=">",ir.has(r)?n:n+Jt(e)+"</"+rr.call(r)+">"}case s:{const{data:r,parentNode:n}=e;return n instanceof Element&&sr.has($.call(n))?r:(t=r,tr.call(t,er,nr))}case a:return`<!CDATA[[${e.data}]]>`;case u:return`<?${e.target} ${e.data}?>`;case c:return`\x3c!--${e.data}--\x3e`;default:return""}var t}const ur=ut(Event.prototype,"target").get,cr=ut(FocusEvent.prototype,"relatedTarget").get,{composedPath:lr}=Event.prototype,fr=new WeakMap;function pr(e){let t=fr.get(e);return t||(t={target:ur.call(e),composedPath:lr.call(e)},e instanceof FocusEvent&&(t.relatedTarget=cr.call(e)),fr.set(e,t),t)}var hr=Nt([[ur,function(){return pr(this).target}],[lr,function(){return vt.call(pr(this).composedPath,(e=>!(e instanceof ShadowRoot)))}],[cr,function(){return pr(this).relatedTarget}]]);
| /*! http://mths.be/startswith v0.2.0 by @mathias */String.prototype.startsWith||function(){var e=function(){try{var e={},t=Object.defineProperty,r=t(e,e,e)&&t}catch(e){}return r}(),t={}.toString,r=function(e){if(null==this)throw TypeError();var r=String(this);if(e&&"[object RegExp]"==t.call(e))throw TypeError();var n=r.length,o=String(e),i=o.length,s=arguments.length>1?arguments[1]:void 0,a=s?Number(s):0;a!=a&&(a=0);var u=Math.min(Math.max(a,0),n);if(i+u>n)return!1;for(var c=-1;++c<i;)if(r.charCodeAt(u+c)!=o.charCodeAt(c))return!1;return!0};e?e(String.prototype,"startsWith",{value:r,configurable:!0,writable:!0}):String.prototype.startsWith=r}()
| /*! http://mths.be/endswith v0.2.0 by @mathias */,String.prototype.endsWith||function(){var e=function(){try{var e={},t=Object.defineProperty,r=t(e,e,e)&&t}catch(e){}return r}(),t={}.toString,r=function(e){if(null==this)throw TypeError();var r=String(this);if(e&&"[object RegExp]"==t.call(e))throw TypeError();var n=r.length,o=String(e),i=o.length,s=n;if(arguments.length>1){var a=arguments[1];void 0!==a&&(s=a?Number(a):0)!=s&&(s=0)}var u=Math.min(Math.max(s,0),n),c=u-i;if(c<0)return!1;for(var l=-1;++l<i;)if(r.charCodeAt(c+l)!=o.charCodeAt(l))return!1;return!0};e?e(String.prototype,"endsWith",{value:r,configurable:!0,writable:!0}):String.prototype.endsWith=r}()
| /*
| object-assign
| (c) Sindre Sorhus
| @license MIT
| */;var dr=Object.getOwnPropertySymbols,vr=Object.prototype.hasOwnProperty,yr=Object.prototype.propertyIsEnumerable;function gr(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var br=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,n,o=arguments,i=gr(e),s=1;s<arguments.length;s++){for(var a in r=Object(o[s]))vr.call(r,a)&&(i[a]=r[a]);if(dr){n=dr(r);for(var u=0;u<n.length;u++)yr.call(r,n[u])&&(i[n[u]]=r[n[u]])}}return i},Tr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function mr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wr(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var Er=function(e,t){for(var r=-1,n=[];-1!==(r=e.indexOf(t,r+1));)n.push(r);return n};var Sr=function(e,t,r){return 0===e.length?e:t?(r||e.sort(t),function(e,t){for(var r=1,n=e.length,o=e[0],i=e[0],s=1;s<n;++s)if(i=o,t(o=e[s],i)){if(s===r){r++;continue}e[r++]=o}return e.length=r,e}(e,t)):(r||e.sort(),function(e){for(var t=1,r=e.length,n=e[0],o=e[0],i=1;i<r;++i,o=n)if(o=n,(n=e[i])!==o){if(i===t){t++;continue}e[t++]=n}return e.length=t,e}(e))},_r=wr((function(e,t){t.__esModule=!0,t.default=function(e){return e.replace(r,(function(e,t,r){var n="0x"+t-65536;return n!=n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)}))};var r=new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig");e.exports=t.default})),Pr=wr((function(e,t){t.__esModule=!0,t.default=function(e){for(var t=arguments,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=t[o];for(;n.length>0;){var i=n.shift();if(!e[i])return;e=e[i]}return e},e.exports=t.default})),Or=wr((function(e,t){t.__esModule=!0,t.default=function(e){for(var t=arguments,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=t[o];for(;n.length>0;){var i=n.shift();e[i]||(e[i]={}),e=e[i]}},e.exports=t.default})),kr=wr((function(e,t){t.__esModule=!0,t.default=function(e){var t="",r=e.indexOf("/*"),n=0;for(;r>=0;){t+=e.slice(n,r);var o=e.indexOf("*/",r+2);if(o<0)return t;n=o+2,r=e.indexOf("/*",n)}return t+=e.slice(n)},e.exports=t.default})),Ir=wr((function(e,t){t.__esModule=!0,t.stripComments=t.ensureObject=t.getProp=t.unesc=void 0;var r=s(_r);t.unesc=r.default;var n=s(Pr);t.getProp=n.default;var o=s(Or);t.ensureObject=o.default;var i=s(kr);function s(e){return e&&e.__esModule?e:{default:e}}t.stripComments=i.default})),xr=wr((function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}t.__esModule=!0,t.default=void 0;var n=function e(t,r){if("object"!=typeof t||null===t)return t;var n=new t.constructor;for(var o in t)if(t.hasOwnProperty(o)){var i=t[o];"parent"===o&&"object"===typeof i?r&&(n[o]=r):n[o]=i instanceof Array?i.map((function(t){return e(t,n)})):e(i,n)}return n},o=function(){function e(e){void 0===e&&(e={}),br(this,e),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}var t,o,i,s=e.prototype;return s.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},s.replaceWith=function(){var e=arguments;if(this.parent){for(var t in arguments)this.parent.insertBefore(this,e[t]);this.remove()}return this},s.next=function(){return this.parent.at(this.parent.index(this)+1)},s.prev=function(){return this.parent.at(this.parent.index(this)-1)},s.clone=function(e){void 0===e&&(e={});var t=n(this);for(var r in e)t[r]=e[r];return t},s.appendToPropertyAndEscape=function(e,t,r){this.raws||(this.raws={});var n=this[e],o=this.raws[e];this[e]=n+t,o||r!==t?this.raws[e]=(o||n)+r:delete this.raws[e]},s.setPropertyAndEscape=function(e,t,r){this.raws||(this.raws={}),this[e]=t,this.raws[e]=r},s.setPropertyWithoutEscape=function(e,t){this[e]=t,this.raws&&delete this.raws[e]},s.isAtPosition=function(e,t){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>e)&&(!(this.source.end.line<e)&&(!(this.source.start.line===e&&this.source.start.column>t)&&!(this.source.end.line===e&&this.source.end.column<t)))},s.stringifyProperty=function(e){return this.raws&&this.raws[e]||this[e]},s.valueToString=function(){return String(this.stringifyProperty("value"))},s.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},t=e,(o=[{key:"rawSpaceBefore",get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.before;return void 0===e&&(e=this.spaces&&this.spaces.before),e||""},set:function(e){(0,Ir.ensureObject)(this,"raws","spaces"),this.raws.spaces.before=e}},{key:"rawSpaceAfter",get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.after;return void 0===e&&(e=this.spaces.after),e||""},set:function(e){(0,Ir.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=e}}])&&r(t.prototype,o),i&&r(t,i),e}();t.default=o,e.exports=t.default})),Dr=wr((function(e,t){t.__esModule=!0,t.UNIVERSAL=t.ATTRIBUTE=t.CLASS=t.COMBINATOR=t.COMMENT=t.ID=t.NESTING=t.PSEUDO=t.ROOT=t.SELECTOR=t.STRING=t.TAG=void 0;t.TAG="tag";t.STRING="string";t.SELECTOR="selector";t.ROOT="root";t.PSEUDO="pseudo";t.NESTING="nesting";t.ID="id";t.COMMENT="comment";t.COMBINATOR="combinator";t.CLASS="class";t.ATTRIBUTE="attribute";t.UNIVERSAL="universal"})),Nr=wr((function(e,t){t.__esModule=!0,t.default=void 0;var r,n=(r=xr)&&r.__esModule?r:{default:r},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(Dr);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).nodes||(r.nodes=[]),r}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var s,a,u,c=n.prototype;return c.append=function(e){return e.parent=this,this.nodes.push(e),this},c.prepend=function(e){return e.parent=this,this.nodes.unshift(e),this},c.at=function(e){return this.nodes[e]},c.index=function(e){return"number"==typeof e?e:this.nodes.indexOf(e)},c.removeChild=function(e){var t;for(var r in e=this.index(e),this.at(e).parent=void 0,this.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this},c.removeAll=function(){var e=this.nodes,t=Array.isArray(e),r=0;for(e=t?e:e[Symbol.iterator]();;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if((r=e.next()).done)break;n=r.value}n.parent=void 0}return this.nodes=[],this},c.empty=function(){return this.removeAll()},c.insertAfter=function(e,t){t.parent=this;var r,n=this.index(e);for(var o in this.nodes.splice(n+1,0,t),t.parent=this,this.indexes)n<=(r=this.indexes[o])&&(this.indexes[o]=r+1);return this},c.insertBefore=function(e,t){t.parent=this;var r,n=this.index(e);for(var o in this.nodes.splice(n,0,t),t.parent=this,this.indexes)(r=this.indexes[o])<=n&&(this.indexes[o]=r+1);return this},c._findChildAtPosition=function(e,t){var r=void 0;return this.each((function(n){if(n.atPosition){var o=n.atPosition(e,t);if(o)return r=o,!1}else if(n.isAtPosition(e,t))return r=n,!1})),r},c.atPosition=function(e,t){return this.isAtPosition(e,t)?this._findChildAtPosition(e,t)||this:void 0},c._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},br(this.source.end,this.last.source.end))},c.each=function(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var t=this.lastEach;if(this.indexes[t]=0,this.length){for(var r,n;this.indexes[t]<this.length&&(r=this.indexes[t],!1!==(n=e(this.at(r),r)));)this.indexes[t]+=1;return delete this.indexes[t],!1!==n&&void 0}},c.walk=function(e){return this.each((function(t,r){var n=e(t,r);if(!1!==n&&t.length&&(n=t.walk(e)),!1===n)return!1}))},c.walkAttributes=function(e){var t=this;return this.walk((function(r){if(r.type===o.ATTRIBUTE)return e.call(t,r)}))},c.walkClasses=function(e){var t=this;return this.walk((function(r){if(r.type===o.CLASS)return e.call(t,r)}))},c.walkCombinators=function(e){var t=this;return this.walk((function(r){if(r.type===o.COMBINATOR)return e.call(t,r)}))},c.walkComments=function(e){var t=this;return this.walk((function(r){if(r.type===o.COMMENT)return e.call(t,r)}))},c.walkIds=function(e){var t=this;return this.walk((function(r){if(r.type===o.ID)return e.call(t,r)}))},c.walkNesting=function(e){var t=this;return this.walk((function(r){if(r.type===o.NESTING)return e.call(t,r)}))},c.walkPseudos=function(e){var t=this;return this.walk((function(r){if(r.type===o.PSEUDO)return e.call(t,r)}))},c.walkTags=function(e){var t=this;return this.walk((function(r){if(r.type===o.TAG)return e.call(t,r)}))},c.walkUniversals=function(e){var t=this;return this.walk((function(r){if(r.type===o.UNIVERSAL)return e.call(t,r)}))},c.split=function(e){var t=this,r=[];return this.reduce((function(n,o,i){var s=e.call(t,o);return r.push(o),s?(n.push(r),r=[]):i===t.length-1&&n.push(r),n}),[])},c.map=function(e){return this.nodes.map(e)},c.reduce=function(e,t){return this.nodes.reduce(e,t)},c.every=function(e){return this.nodes.every(e)},c.some=function(e){return this.nodes.some(e)},c.filter=function(e){return this.nodes.filter(e)},c.sort=function(e){return this.nodes.sort(e)},c.toString=function(){return this.map(String).join("")},s=n,(a=[{key:"first",get:function(){return this.at(0)}},{key:"last",get:function(){return this.at(this.length-1)}},{key:"length",get:function(){return this.nodes.length}}])&&i(s.prototype,a),u&&i(s,u),n}(n.default);t.default=s,e.exports=t.default})),Lr=wr((function(e,t){var r;function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}t.__esModule=!0,t.default=void 0;var o=function(e){var t,r;function o(t){var r;return(r=e.call(this,t)||this).type=Dr.ROOT,r}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var i,s,a,u=o.prototype;return u.toString=function(){var e=this.reduce((function(e,t){return e.push(String(t)),e}),[]).join(",");return this.trailingComma?e+",":e},u.error=function(e,t){return this._error?this._error(e,t):new Error(e)},i=o,(s=[{key:"errorGenerator",set:function(e){this._error=e}}])&&n(i.prototype,s),a&&n(i,a),o}(((r=Nr)&&r.__esModule?r:{default:r}).default);t.default=o,e.exports=t.default})),Ar=wr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Dr.SELECTOR,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n}(((r=Nr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),Mr={}.hasOwnProperty,Cr=/[ -,\.\/:-@\[-\^`\{-~]/,Rr=/[ -,\.\/:-@\[\]\^`\{-~]/,Fr=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,jr=function e(t,r){"single"!=(r=function(e,t){if(!e)return t;var r={};for(var n in t)r[n]=Mr.call(e,n)?e[n]:t[n];return r}(r,e.options)).quotes&&"double"!=r.quotes&&(r.quotes="single");for(var n="double"==r.quotes?'"':"'",o=r.isIdentifier,i=t.charAt(0),s="",a=0,u=t.length;a<u;){var c=t.charAt(a++),l=c.charCodeAt(),f=void 0;if(l<32||l>126){if(l>=55296&&l<=56319&&a<u){var p=t.charCodeAt(a++);56320==(64512&p)?l=((1023&l)<<10)+(1023&p)+65536:a--}f="\\"+l.toString(16).toUpperCase()+" "}else f=r.escapeEverything?Cr.test(c)?"\\"+c:"\\"+l.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(c)?"\\"+l.toString(16).toUpperCase()+" ":"\\"==c||!o&&('"'==c&&n==c||"'"==c&&n==c)||o&&Rr.test(c)?"\\"+c:c;s+=f}return o&&(/^-[-\d]/.test(s)?s="\\-"+s.slice(1):/\d/.test(i)&&(s="\\3"+i+" "+s.slice(1))),s=s.replace(Fr,(function(e,t,r){return t&&t.length%2?e:(t||"")+r})),!o&&r.wrap?n+s+n:s};jr.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1},jr.version="3.0.0";var qr=jr,Gr=wr((function(e,t){t.__esModule=!0,t.default=void 0;var r=n(qr);function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i=function(e){var t,n,i,s,a;function u(t){var r;return(r=e.call(this,t)||this).type=Dr.CLASS,r._constructed=!0,r}return n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,u.prototype.valueToString=function(){return"."+e.prototype.valueToString.call(this)},i=u,(s=[{key:"value",set:function(e){if(this._constructed){var t=(0,r.default)(e,{isIdentifier:!0});t!==e?((0,Ir.ensureObject)(this,"raws"),this.raws.value=t):this.raws&&delete this.raws.value}this._value=e},get:function(){return this._value}}])&&o(i.prototype,s),a&&o(i,a),u}(n(xr).default);t.default=i,e.exports=t.default})),Ur=wr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Dr.COMMENT,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n}(((r=xr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),Br=wr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Dr.ID,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.valueToString=function(){return"#"+e.prototype.valueToString.call(this)},n}(((r=xr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),Wr=wr((function(e,t){t.__esModule=!0,t.default=void 0;var r=n(qr);function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s,a,u,c=i.prototype;return c.qualifiedName=function(e){return this.namespace?this.namespaceString+"|"+e:e},c.valueToString=function(){return this.qualifiedName(e.prototype.valueToString.call(this))},s=i,a=[{key:"namespace",get:function(){return this._namespace},set:function(e){if(!0===e||"*"===e||"&"===e)return this._namespace=e,void(this.raws&&delete this.raws.namespace);var t=(0,r.default)(e,{isIdentifier:!0});this._namespace=e,t!==e?((0,Ir.ensureObject)(this,"raws"),this.raws.namespace=t):this.raws&&delete this.raws.namespace}},{key:"ns",get:function(){return this._namespace},set:function(e){this.namespace=e}},{key:"namespaceString",get:function(){if(this.namespace){var e=this.stringifyProperty("namespace");return!0===e?"":e}return""}}],a&&o(s.prototype,a),u&&o(s,u),i}(n(xr).default);t.default=i,e.exports=t.default})),Yr=wr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Dr.TAG,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n}(((r=Wr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),Vr=wr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Dr.STRING,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n}(((r=xr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),Hr=wr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Dr.PSEUDO,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.toString=function(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),e,this.rawSpaceAfter].join("")},n}(((r=Nr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),Qr=function(e,t){if($r("noDeprecation"))return e;var r=!1;return function(){if(!r){if($r("throwDeprecation"))throw new Error(t);$r("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}};function $r(e){try{if(!Tr.localStorage)return!1}catch(e){return!1}var t=Tr.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}var Kr=wr((function(e,t){t.__esModule=!0,t.unescapeValue=p,t.default=void 0;var r,n=s(qr),o=s(_r),i=s(Wr);function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=/^('|")(.*)\1$/,c=Qr((function(){}),"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),l=Qr((function(){}),"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),f=Qr((function(){}),"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function p(e){var t=!1,r=null,n=e,i=n.match(u);return i&&(r=i[1],n=i[2]),(n=(0,o.default)(n))!==e&&(t=!0),{deprecatedUsage:t,unescaped:n,quoteMark:r}}var h=function(e){var t,r;function o(t){var r;return void 0===t&&(t={}),r=e.call(this,function(e){if(void 0!==e.quoteMark)return e;if(void 0===e.value)return e;f();var t=p(e.value),r=t.quoteMark,n=t.unescaped;return e.raws||(e.raws={}),void 0===e.raws.value&&(e.raws.value=e.value),e.value=n,e.quoteMark=r,e}(t))||this,r.type=Dr.ATTRIBUTE,r.raws=r.raws||{},Object.defineProperty(r.raws,"unquoted",{get:Qr((function(){return r.value}),"attr.raws.unquoted is deprecated. Call attr.value instead."),set:Qr((function(){return r.value}),"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),r._constructed=!0,r}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var i,s,u,h=o.prototype;return h.getQuotedValue=function(e){void 0===e&&(e={});var t=this._determineQuoteMark(e),r=d[t];return(0,n.default)(this._value,r)},h._determineQuoteMark=function(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)},h.setValue=function(e,t){void 0===t&&(t={}),this._value=e,this._quoteMark=this._determineQuoteMark(t),this._syncRawValue()},h.smartQuoteMark=function(e){var t=this.value,r=t.replace(/[^']/g,"").length,i=t.replace(/[^"]/g,"").length;if(r+i===0){var s=(0,n.default)(t,{isIdentifier:!0});if(s===t)return o.NO_QUOTE;var a=this.preferredQuoteMark(e);if(a===o.NO_QUOTE){var u=this.quoteMark||e.quoteMark||o.DOUBLE_QUOTE,c=d[u];if((0,n.default)(t,c).length<s.length)return u}return a}return i===r?this.preferredQuoteMark(e):i<r?o.DOUBLE_QUOTE:o.SINGLE_QUOTE},h.preferredQuoteMark=function(e){var t=e.preferCurrentQuoteMark?this.quoteMark:e.quoteMark;return void 0===t&&(t=e.preferCurrentQuoteMark?e.quoteMark:this.quoteMark),void 0===t&&(t=o.DOUBLE_QUOTE),t},h._syncRawValue=function(){var e=(0,n.default)(this._value,d[this.quoteMark]);e===this._value?this.raws&&delete this.raws.value:this.raws.value=e},h._handleEscapes=function(e,t){if(this._constructed){var r=(0,n.default)(t,{isIdentifier:!0});r!==t?this.raws[e]=r:delete this.raws[e]}},h._spacesFor=function(e){var t=this.spaces[e]||{},r=this.raws.spaces&&this.raws.spaces[e]||{};return br({before:"",after:""},t,r)},h._stringFor=function(e,t,r){void 0===t&&(t=e),void 0===r&&(r=v);var n=this._spacesFor(t);return r(this.stringifyProperty(e),n)},h.offsetOf=function(e){var t=1,r=this._spacesFor("attribute");if(t+=r.before.length,"namespace"===e||"ns"===e)return this.namespace?t:-1;if("attributeNS"===e)return t;if(t+=this.namespaceString.length,this.namespace&&(t+=1),"attribute"===e)return t;t+=this.stringifyProperty("attribute").length,t+=r.after.length;var n=this._spacesFor("operator");t+=n.before.length;var o=this.stringifyProperty("operator");if("operator"===e)return o?t:-1;t+=o.length,t+=n.after.length;var i=this._spacesFor("value");t+=i.before.length;var s=this.stringifyProperty("value");return"value"===e?s?t:-1:(t+=s.length,t+=i.after.length,t+=this._spacesFor("insensitive").before.length,"insensitive"===e&&this.insensitive?t:-1)},h.toString=function(){var e=this,t=[this.rawSpaceBefore,"["];return t.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||""===this.value)&&(t.push(this._stringFor("operator")),t.push(this._stringFor("value")),t.push(this._stringFor("insensitiveFlag","insensitive",(function(t,r){return!(t.length>0)||e.quoted||0!==r.before.length||e.spaces.value&&e.spaces.value.after||(r.before=" "),v(t,r)})))),t.push("]"),t.push(this.rawSpaceAfter),t.join("")},i=o,(s=[{key:"quoted",get:function(){var e=this.quoteMark;return"'"===e||'"'===e},set:function(e){l()}},{key:"quoteMark",get:function(){return this._quoteMark},set:function(e){this._constructed?this._quoteMark!==e&&(this._quoteMark=e,this._syncRawValue()):this._quoteMark=e}},{key:"qualifiedAttribute",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function(){return this.insensitive?"i":""}},{key:"value",get:function(){return this._value},set:function(e){if(this._constructed){var t=p(e),r=t.deprecatedUsage,n=t.unescaped,o=t.quoteMark;if(r&&c(),n===this._value&&o===this._quoteMark)return;this._value=n,this._quoteMark=o,this._syncRawValue()}else this._value=e}},{key:"attribute",get:function(){return this._attribute},set:function(e){this._handleEscapes("attribute",e),this._attribute=e}}])&&a(i.prototype,s),u&&a(i,u),o}(i.default);t.default=h,h.NO_QUOTE=null,h.SINGLE_QUOTE="'",h.DOUBLE_QUOTE='"';var d=((r={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}}).null={isIdentifier:!0},r);function v(e,t){return""+t.before+e+t.after}})),zr=wr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Dr.UNIVERSAL,r.value="*",r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n}(((r=Wr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),Xr=wr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Dr.COMBINATOR,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n}(((r=xr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),Jr=wr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Dr.NESTING,r.value="&",r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n}(((r=xr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),Zr=wr((function(e,t){t.__esModule=!0,t.default=function(e){return e.sort((function(e,t){return e-t}))},e.exports=t.default})),en=wr((function(e,t){t.__esModule=!0,t.combinator=t.word=t.comment=t.str=t.tab=t.newline=t.feed=t.cr=t.backslash=t.bang=t.slash=t.doubleQuote=t.singleQuote=t.space=t.greaterThan=t.pipe=t.equals=t.plus=t.caret=t.tilde=t.dollar=t.closeSquare=t.openSquare=t.closeParenthesis=t.openParenthesis=t.semicolon=t.colon=t.comma=t.at=t.asterisk=t.ampersand=void 0;t.ampersand=38;t.asterisk=42;t.at=64;t.comma=44;t.colon=58;t.semicolon=59;t.openParenthesis=40;t.closeParenthesis=41;t.openSquare=91;t.closeSquare=93;t.dollar=36;t.tilde=126;t.caret=94;t.plus=43;t.equals=61;t.pipe=124;t.greaterThan=62;t.space=32;t.singleQuote=39;t.doubleQuote=34;t.slash=47;t.bang=33;t.backslash=92;t.cr=13;t.feed=12;t.newline=10;t.tab=9;t.str=39;t.comment=-1;t.word=-2;t.combinator=-3})),tn=wr((function(e,t){t.__esModule=!0,t.default=function(e){var t,r,n,i,s,a,u,c,f,p,h,d,v,y=[],g=e.css.valueOf(),b=g.length,T=-1,m=1,w=0,E=0;function S(t,r){if(!e.safe)throw e.error("Unclosed "+t,m,w-T,w);f=(g+=r).length-1}for(;w<b;){switch((t=g.charCodeAt(w))===o.newline&&(T=w,m+=1),t){case o.space:case o.tab:case o.newline:case o.cr:case o.feed:f=w;do{f+=1,(t=g.charCodeAt(f))===o.newline&&(T=f,m+=1)}while(t===o.space||t===o.newline||t===o.tab||t===o.cr||t===o.feed);v=o.space,i=m,n=f-T-1,E=f;break;case o.plus:case o.greaterThan:case o.tilde:case o.pipe:f=w;do{f+=1,t=g.charCodeAt(f)}while(t===o.plus||t===o.greaterThan||t===o.tilde||t===o.pipe);v=o.combinator,i=m,n=w-T,E=f;break;case o.asterisk:case o.ampersand:case o.bang:case o.comma:case o.equals:case o.dollar:case o.caret:case o.openSquare:case o.closeSquare:case o.colon:case o.semicolon:case o.openParenthesis:case o.closeParenthesis:v=t,i=m,n=w-T,E=(f=w)+1;break;case o.singleQuote:case o.doubleQuote:d=t===o.singleQuote?"'":'"',f=w;do{for(s=!1,-1===(f=g.indexOf(d,f+1))&&S("quote",d),a=f;g.charCodeAt(a-1)===o.backslash;)a-=1,s=!s}while(s);v=o.str,i=m,n=w-T,E=f+1;break;default:t===o.slash&&g.charCodeAt(w+1)===o.asterisk?(0===(f=g.indexOf("*/",w+2)+1)&&S("comment","*/"),r=g.slice(w,f+1),c=r.split("\n"),(u=c.length-1)>0?(p=m+u,h=f-c[u].length):(p=m,h=T),v=o.comment,m=p,i=p,n=f-h):t===o.slash?(v=t,i=m,n=w-T,E=(f=w)+1):(f=l(g,w),v=o.word,i=m,n=f-T),E=f+1}y.push([v,m,w-T,i,n,w,E]),h&&(T=h,h=null),w=E}return y},t.FIELDS=void 0;var r,n,o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(en);for(var i=((r={})[o.tab]=!0,r[o.newline]=!0,r[o.cr]=!0,r[o.feed]=!0,r),s=((n={})[o.space]=!0,n[o.tab]=!0,n[o.newline]=!0,n[o.cr]=!0,n[o.feed]=!0,n[o.ampersand]=!0,n[o.asterisk]=!0,n[o.bang]=!0,n[o.comma]=!0,n[o.colon]=!0,n[o.semicolon]=!0,n[o.openParenthesis]=!0,n[o.closeParenthesis]=!0,n[o.openSquare]=!0,n[o.closeSquare]=!0,n[o.singleQuote]=!0,n[o.doubleQuote]=!0,n[o.plus]=!0,n[o.pipe]=!0,n[o.tilde]=!0,n[o.greaterThan]=!0,n[o.equals]=!0,n[o.dollar]=!0,n[o.caret]=!0,n[o.slash]=!0,n),a={},u="0123456789abcdefABCDEF",c=0;c<u.length;c++)a[u.charCodeAt(c)]=!0;function l(e,t){var r,n=t;do{if(r=e.charCodeAt(n),s[r])return n-1;r===o.backslash?n=f(e,n)+1:n++}while(n<e.length);return n-1}function f(e,t){var r=t,n=e.charCodeAt(r+1);if(i[n]);else if(a[n]){var s=0;do{r++,s++,n=e.charCodeAt(r+1)}while(a[n]&&s<6);s<6&&n===o.space&&r++}else r++;return r}t.FIELDS={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6}})),rn=wr((function(e,t){t.__esModule=!0,t.default=void 0;var r,n,o=S(Er),i=S(Sr),s=S(Lr),a=S(Ar),u=S(Gr),c=S(Ur),l=S(Br),f=S(Yr),p=S(Vr),h=S(Hr),d=E(Kr),v=S(zr),y=S(Xr),g=S(Jr),b=S(Zr),T=E(tn),m=E(en),w=E(Dr);function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}function _(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var P=((r={})[m.space]=!0,r[m.cr]=!0,r[m.feed]=!0,r[m.newline]=!0,r[m.tab]=!0,r),O=br({},P,((n={})[m.comment]=!0,n));function k(e){return{line:e[T.FIELDS.START_LINE],column:e[T.FIELDS.START_COL]}}function I(e){return{line:e[T.FIELDS.END_LINE],column:e[T.FIELDS.END_COL]}}function x(e,t,r,n){return{start:{line:e,column:t},end:{line:r,column:n}}}function D(e){return x(e[T.FIELDS.START_LINE],e[T.FIELDS.START_COL],e[T.FIELDS.END_LINE],e[T.FIELDS.END_COL])}function N(e,t){if(e)return x(e[T.FIELDS.START_LINE],e[T.FIELDS.START_COL],t[T.FIELDS.END_LINE],t[T.FIELDS.END_COL])}function L(e,t){var r=e[t];if("string"==typeof r)return-1!==r.indexOf("\\")&&((0,Ir.ensureObject)(e,"raws"),e[t]=(0,Ir.unesc)(r),void 0===e.raws[t]&&(e.raws[t]=r)),e}var A=function(){function e(e,t){void 0===t&&(t={}),this.rule=e,this.options=br({lossy:!1,safe:!1},t),this.position=0,this.css="string"==typeof this.rule?this.rule:this.rule.selector,this.tokens=(0,T.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var r=N(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new s.default({source:r}),this.root.errorGenerator=this._errorGenerator();var n=new a.default({source:{start:{line:1,column:1}}});this.root.append(n),this.current=n,this.loop()}var t,r,n,E=e.prototype;return E._errorGenerator=function(){var e=this;return function(t,r){return"string"==typeof e.rule?new Error(t):e.rule.error(t,r)}},E.attribute=function(){var e=[],t=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[T.FIELDS.TYPE]!==m.closeSquare;)e.push(this.currToken),this.position++;if(this.currToken[T.FIELDS.TYPE]!==m.closeSquare)return this.expected("closing square bracket",this.currToken[T.FIELDS.START_POS]);var r=e.length,n={source:x(t[1],t[2],this.currToken[3],this.currToken[4]),sourceIndex:t[T.FIELDS.START_POS]};if(1===r&&!~[m.word].indexOf(e[0][T.FIELDS.TYPE]))return this.expected("attribute",e[0][T.FIELDS.START_POS]);for(var o=0,i="",s="",a=null,u=!1;o<r;){var c=e[o],l=this.content(c),f=e[o+1];switch(c[T.FIELDS.TYPE]){case m.space:if(u=!0,this.options.lossy)break;if(a){(0,Ir.ensureObject)(n,"spaces",a);var p=n.spaces[a].after||"";n.spaces[a].after=p+l;var h=(0,Ir.getProp)(n,"raws","spaces",a,"after")||null;h&&(n.raws.spaces[a].after=h+l)}else i+=l,s+=l;break;case m.asterisk:if(f[T.FIELDS.TYPE]===m.equals)n.operator=l,a="operator";else if((!n.namespace||"namespace"===a&&!u)&&f){i&&((0,Ir.ensureObject)(n,"spaces","attribute"),n.spaces.attribute.before=i,i=""),s&&((0,Ir.ensureObject)(n,"raws","spaces","attribute"),n.raws.spaces.attribute.before=i,s=""),n.namespace=(n.namespace||"")+l,((0,Ir.getProp)(n,"raws","namespace")||null)&&(n.raws.namespace+=l),a="namespace"}u=!1;break;case m.dollar:if("value"===a){var v=(0,Ir.getProp)(n,"raws","value");n.value+="$",v&&(n.raws.value=v+"$");break}case m.caret:f[T.FIELDS.TYPE]===m.equals&&(n.operator=l,a="operator"),u=!1;break;case m.combinator:if("~"===l&&f[T.FIELDS.TYPE]===m.equals&&(n.operator=l,a="operator"),"|"!==l){u=!1;break}f[T.FIELDS.TYPE]===m.equals?(n.operator=l,a="operator"):n.namespace||n.attribute||(n.namespace=!0),u=!1;break;case m.word:if(f&&"|"===this.content(f)&&e[o+2]&&e[o+2][T.FIELDS.TYPE]!==m.equals&&!n.operator&&!n.namespace)n.namespace=l,a="namespace";else if(!n.attribute||"attribute"===a&&!u){i&&((0,Ir.ensureObject)(n,"spaces","attribute"),n.spaces.attribute.before=i,i=""),s&&((0,Ir.ensureObject)(n,"raws","spaces","attribute"),n.raws.spaces.attribute.before=s,s=""),n.attribute=(n.attribute||"")+l,((0,Ir.getProp)(n,"raws","attribute")||null)&&(n.raws.attribute+=l),a="attribute"}else if(!n.value&&""!==n.value||"value"===a&&!u){var y=(0,Ir.unesc)(l),g=(0,Ir.getProp)(n,"raws","value")||"",b=n.value||"";n.value=b+y,n.quoteMark=null,(y!==l||g)&&((0,Ir.ensureObject)(n,"raws"),n.raws.value=(g||b)+l),a="value"}else{var w="i"===l||"I"===l;!n.value&&""!==n.value||!n.quoteMark&&!u?(n.value||""===n.value)&&(a="value",n.value+=l,n.raws.value&&(n.raws.value+=l)):(n.insensitive=w,w&&"I"!==l||((0,Ir.ensureObject)(n,"raws"),n.raws.insensitiveFlag=l),a="insensitive",i&&((0,Ir.ensureObject)(n,"spaces","insensitive"),n.spaces.insensitive.before=i,i=""),s&&((0,Ir.ensureObject)(n,"raws","spaces","insensitive"),n.raws.spaces.insensitive.before=s,s=""))}u=!1;break;case m.str:if(!n.attribute||!n.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:c[T.FIELDS.START_POS]});var E=(0,d.unescapeValue)(l),S=E.unescaped,_=E.quoteMark;n.value=S,n.quoteMark=_,a="value",(0,Ir.ensureObject)(n,"raws"),n.raws.value=l,u=!1;break;case m.equals:if(!n.attribute)return this.expected("attribute",c[T.FIELDS.START_POS],l);if(n.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:c[T.FIELDS.START_POS]});n.operator=n.operator?n.operator+l:l,a="operator",u=!1;break;case m.comment:if(a)if(u||f&&f[T.FIELDS.TYPE]===m.space||"insensitive"===a){var P=(0,Ir.getProp)(n,"spaces",a,"after")||"",O=(0,Ir.getProp)(n,"raws","spaces",a,"after")||P;(0,Ir.ensureObject)(n,"raws","spaces",a),n.raws.spaces[a].after=O+l}else{var k=n[a]||"",I=(0,Ir.getProp)(n,"raws",a)||k;(0,Ir.ensureObject)(n,"raws"),n.raws[a]=I+l}else s+=l;break;default:return this.error('Unexpected "'+l+'" found.',{index:c[T.FIELDS.START_POS]})}o++}L(n,"attribute"),L(n,"namespace"),this.newNode(new d.default(n)),this.position++},E.parseWhitespaceEquivalentTokens=function(e){e<0&&(e=this.tokens.length);var t=this.position,r=[],n="",o=void 0;do{if(P[this.currToken[T.FIELDS.TYPE]])this.options.lossy||(n+=this.content());else if(this.currToken[T.FIELDS.TYPE]===m.comment){var i={};n&&(i.before=n,n=""),o=new c.default({value:this.content(),source:D(this.currToken),sourceIndex:this.currToken[T.FIELDS.START_POS],spaces:i}),r.push(o)}}while(++this.position<e);if(n)if(o)o.spaces.after=n;else if(!this.options.lossy){var s=this.tokens[t],a=this.tokens[this.position-1];r.push(new p.default({value:"",source:x(s[T.FIELDS.START_LINE],s[T.FIELDS.START_COL],a[T.FIELDS.END_LINE],a[T.FIELDS.END_COL]),sourceIndex:s[T.FIELDS.START_POS],spaces:{before:n,after:""}}))}return r},E.convertWhitespaceNodesToSpace=function(e,t){var r=this;void 0===t&&(t=!1);var n="",o="";return e.forEach((function(e){var i=r.lossySpace(e.spaces.before,t),s=r.lossySpace(e.rawSpaceBefore,t);n+=i+r.lossySpace(e.spaces.after,t&&0===i.length),o+=i+e.value+r.lossySpace(e.rawSpaceAfter,t&&0===s.length)})),o===n&&(o=void 0),{space:n,rawSpace:o}},E.isNamedCombinator=function(e){return void 0===e&&(e=this.position),this.tokens[e+0]&&this.tokens[e+0][T.FIELDS.TYPE]===m.slash&&this.tokens[e+1]&&this.tokens[e+1][T.FIELDS.TYPE]===m.word&&this.tokens[e+2]&&this.tokens[e+2][T.FIELDS.TYPE]===m.slash},E.namedCombinator=function(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]),t=(0,Ir.unesc)(e).toLowerCase(),r={};t!==e&&(r.value="/"+e+"/");var n=new y.default({value:"/"+t+"/",source:x(this.currToken[T.FIELDS.START_LINE],this.currToken[T.FIELDS.START_COL],this.tokens[this.position+2][T.FIELDS.END_LINE],this.tokens[this.position+2][T.FIELDS.END_COL]),sourceIndex:this.currToken[T.FIELDS.START_POS],raws:r});return this.position=this.position+3,n}this.unexpected()},E.combinator=function(){var e=this;if("|"===this.content())return this.namespace();var t=this.locateNextMeaningfulToken(this.position);if(!(t<0||this.tokens[t][T.FIELDS.TYPE]===m.comma)){var r,n=this.currToken,o=void 0;if(t>this.position&&(o=this.parseWhitespaceEquivalentTokens(t)),this.isNamedCombinator()?r=this.namedCombinator():this.currToken[T.FIELDS.TYPE]===m.combinator?(r=new y.default({value:this.content(),source:D(this.currToken),sourceIndex:this.currToken[T.FIELDS.START_POS]}),this.position++):P[this.currToken[T.FIELDS.TYPE]]||o||this.unexpected(),r){if(o){var i=this.convertWhitespaceNodesToSpace(o),s=i.space,a=i.rawSpace;r.spaces.before=s,r.rawSpaceBefore=a}}else{var u=this.convertWhitespaceNodesToSpace(o,!0),c=u.space,l=u.rawSpace;l||(l=c);var f={},p={spaces:{}};c.endsWith(" ")&&l.endsWith(" ")?(f.before=c.slice(0,c.length-1),p.spaces.before=l.slice(0,l.length-1)):c.startsWith(" ")&&l.startsWith(" ")?(f.after=c.slice(1),p.spaces.after=l.slice(1)):p.value=l,r=new y.default({value:" ",source:N(n,this.tokens[this.position-1]),sourceIndex:n[T.FIELDS.START_POS],spaces:f,raws:p})}return this.currToken&&this.currToken[T.FIELDS.TYPE]===m.space&&(r.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(r)}var h=this.parseWhitespaceEquivalentTokens(t);if(h.length>0){var d=this.current.last;if(d){var v=this.convertWhitespaceNodesToSpace(h),g=v.space,b=v.rawSpace;void 0!==b&&(d.rawSpaceAfter+=b),d.spaces.after+=g}else h.forEach((function(t){return e.newNode(t)}))}},E.comma=function(){if(this.position===this.tokens.length-1)return this.root.trailingComma=!0,void this.position++;this.current._inferEndPosition();var e=new a.default({source:{start:k(this.tokens[this.position+1])}});this.current.parent.append(e),this.current=e,this.position++},E.comment=function(){var e=this.currToken;this.newNode(new c.default({value:this.content(),source:D(e),sourceIndex:e[T.FIELDS.START_POS]})),this.position++},E.error=function(e,t){throw this.root.error(e,t)},E.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[T.FIELDS.START_POS]})},E.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[T.FIELDS.START_POS])},E.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[T.FIELDS.START_POS])},E.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[T.FIELDS.START_POS])},E.namespace=function(){var e=this.prevToken&&this.content(this.prevToken)||!0;return this.nextToken[T.FIELDS.TYPE]===m.word?(this.position++,this.word(e)):this.nextToken[T.FIELDS.TYPE]===m.asterisk?(this.position++,this.universal(e)):void 0},E.nesting=function(){if(this.nextToken&&"|"===this.content(this.nextToken))return void this.position++;var e=this.currToken;this.newNode(new g.default({value:this.content(),source:D(e),sourceIndex:e[T.FIELDS.START_POS]})),this.position++},E.parentheses=function(){var e=this.current.last,t=1;if(this.position++,e&&e.type===w.PSEUDO){var r=new a.default({source:{start:k(this.tokens[this.position-1])}}),n=this.current;for(e.append(r),this.current=r;this.position<this.tokens.length&&t;)this.currToken[T.FIELDS.TYPE]===m.openParenthesis&&t++,this.currToken[T.FIELDS.TYPE]===m.closeParenthesis&&t--,t?this.parse():(this.current.source.end=I(this.currToken),this.current.parent.source.end=I(this.currToken),this.position++);this.current=n}else{for(var o,i=this.currToken,s="(";this.position<this.tokens.length&&t;)this.currToken[T.FIELDS.TYPE]===m.openParenthesis&&t++,this.currToken[T.FIELDS.TYPE]===m.closeParenthesis&&t--,o=this.currToken,s+=this.parseParenthesisToken(this.currToken),this.position++;e?e.appendToPropertyAndEscape("value",s,s):this.newNode(new p.default({value:s,source:x(i[T.FIELDS.START_LINE],i[T.FIELDS.START_COL],o[T.FIELDS.END_LINE],o[T.FIELDS.END_COL]),sourceIndex:i[T.FIELDS.START_POS]}))}if(t)return this.expected("closing parenthesis",this.currToken[T.FIELDS.START_POS])},E.pseudo=function(){for(var e=this,t="",r=this.currToken;this.currToken&&this.currToken[T.FIELDS.TYPE]===m.colon;)t+=this.content(),this.position++;return this.currToken?this.currToken[T.FIELDS.TYPE]!==m.word?this.expected(["pseudo-class","pseudo-element"],this.currToken[T.FIELDS.START_POS]):void this.splitWord(!1,(function(n,o){t+=n,e.newNode(new h.default({value:t,source:N(r,e.currToken),sourceIndex:r[T.FIELDS.START_POS]})),o>1&&e.nextToken&&e.nextToken[T.FIELDS.TYPE]===m.openParenthesis&&e.error("Misplaced parenthesis.",{index:e.nextToken[T.FIELDS.START_POS]})})):this.expected(["pseudo-class","pseudo-element"],this.position-1)},E.space=function(){var e=this.content();0===this.position||this.prevToken[T.FIELDS.TYPE]===m.comma||this.prevToken[T.FIELDS.TYPE]===m.openParenthesis||this.current.nodes.every((function(e){return"comment"===e.type}))?(this.spaces=this.optionalSpace(e),this.position++):this.position===this.tokens.length-1||this.nextToken[T.FIELDS.TYPE]===m.comma||this.nextToken[T.FIELDS.TYPE]===m.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(e),this.position++):this.combinator()},E.string=function(){var e=this.currToken;this.newNode(new p.default({value:this.content(),source:D(e),sourceIndex:e[T.FIELDS.START_POS]})),this.position++},E.universal=function(e){var t=this.nextToken;if(t&&"|"===this.content(t))return this.position++,this.namespace();var r=this.currToken;this.newNode(new v.default({value:this.content(),source:D(r),sourceIndex:r[T.FIELDS.START_POS]}),e),this.position++},E.splitWord=function(e,t){for(var r=this,n=this.nextToken,s=this.content();n&&~[m.dollar,m.caret,m.equals,m.word].indexOf(n[T.FIELDS.TYPE]);){this.position++;var a=this.content();if(s+=a,a.lastIndexOf("\\")===a.length-1){var c=this.nextToken;c&&c[T.FIELDS.TYPE]===m.space&&(s+=this.requiredSpace(this.content(c)),this.position++)}n=this.nextToken}var p=(0,o.default)(s,".").filter((function(e){return"\\"!==s[e-1]})),h=(0,o.default)(s,"#").filter((function(e){return"\\"!==s[e-1]})),d=(0,o.default)(s,"#{");d.length&&(h=h.filter((function(e){return!~d.indexOf(e)})));var v=(0,b.default)((0,i.default)([0].concat(p,h)));v.forEach((function(n,o){var i,a=v[o+1]||s.length,c=s.slice(n,a);if(0===o&&t)return t.call(r,c,v.length);var d=r.currToken,y=d[T.FIELDS.START_POS]+v[o],g=x(d[1],d[2]+n,d[3],d[2]+(a-1));if(~p.indexOf(n)){var b={value:c.slice(1),source:g,sourceIndex:y};i=new u.default(L(b,"value"))}else if(~h.indexOf(n)){var m={value:c.slice(1),source:g,sourceIndex:y};i=new l.default(L(m,"value"))}else{var w={value:c,source:g,sourceIndex:y};L(w,"value"),i=new f.default(w)}r.newNode(i,e),e=null})),this.position++},E.word=function(e){var t=this.nextToken;return t&&"|"===this.content(t)?(this.position++,this.namespace()):this.splitWord(e)},E.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},E.parse=function(e){switch(this.currToken[T.FIELDS.TYPE]){case m.space:this.space();break;case m.comment:this.comment();break;case m.openParenthesis:this.parentheses();break;case m.closeParenthesis:e&&this.missingParenthesis();break;case m.openSquare:this.attribute();break;case m.dollar:case m.caret:case m.equals:case m.word:this.word();break;case m.colon:this.pseudo();break;case m.comma:this.comma();break;case m.asterisk:this.universal();break;case m.ampersand:this.nesting();break;case m.slash:case m.combinator:this.combinator();break;case m.str:this.string();break;case m.closeSquare:this.missingSquareBracket();case m.semicolon:this.missingBackslash();default:this.unexpected()}},E.expected=function(e,t,r){if(Array.isArray(e)){var n=e.pop();e=e.join(", ")+" or "+n}var o=/^[aeiou]/.test(e[0])?"an":"a";return r?this.error("Expected "+o+" "+e+', found "'+r+'" instead.',{index:t}):this.error("Expected "+o+" "+e+".",{index:t})},E.requiredSpace=function(e){return this.options.lossy?" ":e},E.optionalSpace=function(e){return this.options.lossy?"":e},E.lossySpace=function(e,t){return this.options.lossy?t?" ":"":e},E.parseParenthesisToken=function(e){var t=this.content(e);return e[T.FIELDS.TYPE]===m.space?this.requiredSpace(t):t},E.newNode=function(e,t){return t&&(/^ +$/.test(t)&&(this.options.lossy||(this.spaces=(this.spaces||"")+t),t=!0),e.namespace=t,L(e,"namespace")),this.spaces&&(e.spaces.before=this.spaces,this.spaces=""),this.current.append(e)},E.content=function(e){return void 0===e&&(e=this.currToken),this.css.slice(e[T.FIELDS.START_POS],e[T.FIELDS.END_POS])},E.locateNextMeaningfulToken=function(e){void 0===e&&(e=this.position+1);for(var t=e;t<this.tokens.length;){if(!O[this.tokens[t][T.FIELDS.TYPE]])return t;t++}return-1},t=e,(r=[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}])&&_(t.prototype,r),n&&_(t,n),e}();t.default=A,e.exports=t.default})),nn=wr((function(e,t){t.__esModule=!0,t.default=void 0;var r,n=(r=rn)&&r.__esModule?r:{default:r};var o=function(){function e(e,t){this.func=e||function(){},this.funcRes=null,this.options=t}var t=e.prototype;return t._shouldUpdateSelector=function(e,t){return void 0===t&&(t={}),!1!==br({},this.options,t).updateSelector&&"string"!=typeof e},t._isLossy=function(e){return void 0===e&&(e={}),!1===br({},this.options,e).lossless},t._root=function(e,t){return void 0===t&&(t={}),new n.default(e,this._parseOptions(t)).root},t._parseOptions=function(e){return{lossy:this._isLossy(e)}},t._run=function(e,t){var r=this;return void 0===t&&(t={}),new Promise((function(n,o){try{var i=r._root(e,t);Promise.resolve(r.func(i)).then((function(n){var o=void 0;return r._shouldUpdateSelector(e,t)&&(o=i.toString(),e.selector=o),{transform:n,root:i,string:o}})).then(n,o)}catch(e){return void o(e)}}))},t._runSync=function(e,t){void 0===t&&(t={});var r=this._root(e,t),n=this.func(r);if(n&&"function"==typeof n.then)throw new Error("Selector processor returned a promise to a synchronous call.");var o=void 0;return t.updateSelector&&"string"!=typeof e&&(o=r.toString(),e.selector=o),{transform:n,root:r,string:o}},t.ast=function(e,t){return this._run(e,t).then((function(e){return e.root}))},t.astSync=function(e,t){return this._runSync(e,t).root},t.transform=function(e,t){return this._run(e,t).then((function(e){return e.transform}))},t.transformSync=function(e,t){return this._runSync(e,t).transform},t.process=function(e,t){return this._run(e,t).then((function(e){return e.string||e.root.toString()}))},t.processSync=function(e,t){var r=this._runSync(e,t);return r.string||r.root.toString()},e}();t.default=o,e.exports=t.default})),on=wr((function(e,t){t.__esModule=!0,t.universal=t.tag=t.string=t.selector=t.root=t.pseudo=t.nesting=t.id=t.comment=t.combinator=t.className=t.attribute=void 0;var r=d(Kr),n=d(Gr),o=d(Xr),i=d(Ur),s=d(Br),a=d(Jr),u=d(Hr),c=d(Lr),l=d(Ar),f=d(Vr),p=d(Yr),h=d(zr);function d(e){return e&&e.__esModule?e:{default:e}}t.attribute=function(e){return new r.default(e)};t.className=function(e){return new n.default(e)};t.combinator=function(e){return new o.default(e)};t.comment=function(e){return new i.default(e)};t.id=function(e){return new s.default(e)};t.nesting=function(e){return new a.default(e)};t.pseudo=function(e){return new u.default(e)};t.root=function(e){return new c.default(e)};t.selector=function(e){return new l.default(e)};t.string=function(e){return new f.default(e)};t.tag=function(e){return new p.default(e)};t.universal=function(e){return new h.default(e)}})),sn=wr((function(e,t){var r;t.__esModule=!0,t.isNode=o,t.isPseudoElement=b,t.isPseudoClass=function(e){return p(e)&&!b(e)},t.isContainer=function(e){return!(!o(e)||!e.walk)},t.isNamespace=function(e){return s(e)||y(e)},t.isUniversal=t.isTag=t.isString=t.isSelector=t.isRoot=t.isPseudo=t.isNesting=t.isIdentifier=t.isComment=t.isCombinator=t.isClassName=t.isAttribute=void 0;var n=((r={})[Dr.ATTRIBUTE]=!0,r[Dr.CLASS]=!0,r[Dr.COMBINATOR]=!0,r[Dr.COMMENT]=!0,r[Dr.ID]=!0,r[Dr.NESTING]=!0,r[Dr.PSEUDO]=!0,r[Dr.ROOT]=!0,r[Dr.SELECTOR]=!0,r[Dr.STRING]=!0,r[Dr.TAG]=!0,r[Dr.UNIVERSAL]=!0,r);function o(e){return"object"==typeof e&&n[e.type]}function i(e,t){return o(t)&&t.type===e}var s=i.bind(null,Dr.ATTRIBUTE);t.isAttribute=s;var a=i.bind(null,Dr.CLASS);t.isClassName=a;var u=i.bind(null,Dr.COMBINATOR);t.isCombinator=u;var c=i.bind(null,Dr.COMMENT);t.isComment=c;var l=i.bind(null,Dr.ID);t.isIdentifier=l;var f=i.bind(null,Dr.NESTING);t.isNesting=f;var p=i.bind(null,Dr.PSEUDO);t.isPseudo=p;var h=i.bind(null,Dr.ROOT);t.isRoot=h;var d=i.bind(null,Dr.SELECTOR);t.isSelector=d;var v=i.bind(null,Dr.STRING);t.isString=v;var y=i.bind(null,Dr.TAG);t.isTag=y;var g=i.bind(null,Dr.UNIVERSAL);function b(e){return p(e)&&e.value&&(e.value.startsWith("::")||":before"===e.value.toLowerCase()||":after"===e.value.toLowerCase())}t.isUniversal=g})),an=wr((function(e,t){t.__esModule=!0,Object.keys(Dr).forEach((function(e){"default"!==e&&"__esModule"!==e&&(t[e]=Dr[e])})),Object.keys(on).forEach((function(e){"default"!==e&&"__esModule"!==e&&(t[e]=on[e])})),Object.keys(sn).forEach((function(e){"default"!==e&&"__esModule"!==e&&(t[e]=sn[e])}))})),un=wr((function(e,t){t.__esModule=!0,t.default=void 0;var r,n=(r=nn)&&r.__esModule?r:{default:r},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(an);var i=function(e){return new n.default(e)};br(i,o),delete i.__esModule;var s=i;t.default=s,e.exports=t.default})),cn=mr(un),ln=Element.prototype.matches||Element.prototype.msMatchesSelector;var fn=function(e){this._queue=[e],this.next()};function pn(e){for(var t=[],r=e.length-1;r>=0;r--){var n=e[r];if("combinator"===n.type)break;t.push(n)}return t.reverse()}function hn(e){if("function"!=typeof e.assignedElements&&e.assignedSlot&&e.assignedSlot.parentElement)return e.assignedSlot.parentElement;if(e.parentElement)return e.parentElement;var t=e.getRootNode();return t!==document?t.host:void 0}function dn(e,t){for(var r=hn(e);r;){if(yn(r,{nodes:t}))return r;r=hn(r)}}function vn(e,t){for(var r=e.previousElementSibling;r;){if(yn(r,{nodes:t}))return r;r=r.previousElementSibling}}function yn(e,t){for(var r=t.nodes,n=r.length-1;n>=0;n--){var o=r[n];if("id"===o.type){if(e.id!==o.value)return!1}else if("class"===o.type){if(!e.classList.contains(o.value))return!1}else if("tag"===o.type){if(e.tagName.toLowerCase()!==o.value.toLowerCase())return!1}else if("pseudo"===o.type||"attribute"===o.type){if(!ln.call(e,o.sourceCode))return!1}else if("combinator"===o.type)if(" "===o.value){var i=pn(r.slice(0,n)),s=dn(e,i);if(!s)return!1;e=s,n-=i.length}else if(">"===o.value){var a=pn(r.slice(0,n)),u=hn(e);if(!u||!yn(u,{nodes:a}))return!1;e=u,n-=1}else if("+"===o.value){var c=pn(r.slice(0,n)),l=e.previousElementSibling;if(!l||!yn(l,{nodes:c}))return!1;n-=c.length}else if("~"===o.value){var f=pn(r.slice(0,n));if(!vn(e,f))return!1;n-=f.length}}return!0}function gn(e,t){for(var r=0,n=e.nodes;r<n.length;r+=1){var o=n[r];if("pseudo"===o.type||"attribute"===o.type){for(var i=t.split("\n"),s=o.source,a=s.start,u=s.end,c="",l=a.line-1;l<u.line;l++){var f=i[l],p=l===a.line-1?a.column:0,h=l===u.line-1?u.column:f.length;c+=f.substring(p,h)}o.sourceCode=("pseudo"===o.type?":":"[")+c}o.nodes&&gn(o,t)}}function bn(e){if(11!==e.nodeType&&9!==e.nodeType)throw new TypeError("Provided context must be of type Document or ShadowRoot")}function Tn(e){var t=cn().astSync(e);return gn(t,e),t}function mn(e,t,r){var n=Tn(e);return function(e,t,r){for(var n,o=r?[]:null;n=e.next();)for(var i=0,s=t.nodes;i<s.length;i+=1)if(yn(n,s[i])){if(!r)return n;o.push(n)}return o}(new fn(t),n,r)}function wn(e,t){return void 0===t&&(t=document),mn(e,t,!1)}function En(e,t){return void 0===t&&(t=document),mn(e,t,!0)}function Sn(e,t){!function(e){if(!e||1!==e.nodeType)throw new TypeError("Provided context must be of type Element")}(t);for(var r=0,n=Tn(e).nodes;r<n.length;r+=1){if(yn(t,n[r]))return!0}return!1}fn.prototype.next=function(){var e=this._queue.pop();if(e){var t=function(e){return e.documentElement?[e.documentElement]:e.shadowRoot?e.shadowRoot.children:"function"==typeof e.assignedElements&&e.assignedNodes().length?e.assignedElements():e.children}(e);if(t)for(var r=t.length-1;r>=0;r--)this._queue.push(t[r])}return e};const _n=ut(Element.prototype,"assignedSlot").get,Pn=ut(DocumentFragment.prototype,"children").get;function On(e){return Ut(e)?e.assignedElements({flatten:!0}):Ct(e)?rt(Pn.call(Rt(e))):rt(z.call(e))}var kn=Nt([[V,function(){return Jt(this)}],[Q,function(){return ar(this)}],[X,function(){return null}],[z,function(){return function(e){const t=ot(zt.prototype);return At(t,Kt,e),Ot.call(e,((e,r)=>{st(t,r,{value:e,enumerable:!0,configurable:!0})})),t}(On(this))}],[U,function(){return On(this).length}],[B,function(){return On(this)[0]}],[W,function(){const e=On(this);return e[e.length-1]}],[_n,function(){return null}],[R,function(e){return wn(e,this)}],[F,function(e){return qt(En(e,this))}],[L,function(e){const t=function(e,t){return void 0===t&&(t=document),function(e,t){for(var r,n=[],o=function(){var e=r.classList,o=t.every((function(t){return e.contains(t)}));o&&n.push(r)};r=e.next();)o();return n}(new fn(t),e.trim().split(/\s+/))}(e,this);return qt(t)}],[D,function(e){const t=function(e,t){return void 0===t&&(t=document),function(e,t){for(var r,n=[],o=t.toLowerCase();r=e.next();)"*"!==t&&o!==r.tagName.toLowerCase()||n.push(r);return n}(new fn(t),e)}(e,this);return qt(t)}],[N,function(e,t){const r=function(e,t,r){return void 0===r&&(r=document),function(e,t,r){var n,o=[];if(!t)return o;for(;n=e.next();){var i=n.outerHTML.toUpperCase().indexOf(n.tagName.toUpperCase()),s=r===n.outerHTML.substr(i,n.tagName.length)||"*"===r,a=n.namespaceURI===t||"*"===t;s&&a&&o.push(n)}return o}(new fn(r),e,t)}(e,t,this);return qt(r)}],[A,function(e){return Sn(e,this)}],[M,function(e){return function(e,t){for(var r=0,n=Tn(e).nodes;r<n.length;r+=1){var o=n[r];if(yn(t,o))return t;var i=dn(t,o.nodes);if(i)return i}return null}(e,this)}]]);const{attachShadow:In}=Element.prototype;function xn(e){pr(e)}function Dn(){const e=new Map;let t=Array.from(document.querySelectorAll("*")).filter((e=>Ct(e)));for(;t.length>0;){const r=t.shift();if(!e.has(r)){const n=Rt(r);if(n){e.set(r,n);const o=Array.from(n.querySelectorAll("*")).filter((e=>Ct(e)));t=t.concat(o)}}}return e}st(Element.prototype,"attachShadow",{value:function(e){const t=In.call(this,e);return Reflect.ownKeys(Nn).forEach((e=>k.call(t,e,xn))),t},enumerable:!0,writable:!0,configurable:!0});const Nn=ot(null);function Ln(e){Nn[e]||(Nn[e]=1,Dn().forEach((t=>{k.call(t,e,xn)})))}const An=ut(Document.prototype,"activeElement").get;var Mn=Nt([[An,function(){let e=An.call(this);for(;e;){const t=Rt(e);if(!t)return e;e=t.activeElement}return e}],[re,function(e){return function(e,t){return void 0===t&&(t=document),bn(t),function(e,t){for(var r;r=e.next();)if(r.id===t)return r;return null}(new fn(t),e)}(e,this)}],[ne,function(e){return function(e,t){return void 0===t&&(t=document),bn(t),function(e,t){for(var r,n=[];r=e.next();)r.name===t&&n.push(r);return n}(new fn(t),e)}(e,this)}],[ee,function(e){return wn(e,this)}],[te,function(e){return En(e,this)}]]);const{addEventListener:Cn,dispatchEvent:Rn}=EventTarget.prototype;var Fn=Nt([[Cn,function(...e){const[t]=e;return Ln(t),Cn.apply(this,e)}]]);const{createElement:jn}=document,{prepend:qn,append:Gn,appendChild:Un,insertBefore:Bn,setAttribute:Wn}=Element.prototype,Yn=Reflect.getOwnPropertyDescriptor(Document.prototype,"body").get;const Vn=Object.create(Object.prototype,{$oasisExternalDefineProperty$:{value:function(e,t){Reflect.defineProperty(window,e,t)}},$oasisExternalGetProperty$:{value:function(e){return window[e]}}});function Hn(e){return e instanceof HTMLScriptElement}const Qn=function(e){const t=new Map;return e.forEach((e=>{e.forEach(((e,r)=>{t.set(r,e)}))})),t}([Nt([[Un,function(...e){const[t]=e;return Hn(t)?(ro(t),t):Un.apply(this,e)}],[Bn,function(...e){const[t]=e;return Hn(t)?(ro(t),t):Bn.apply(this,e)}],[Gn,function(...e){const[t]=e;Dt(t)||!Hn(t)?Gn.apply(this,e):ro(t)}],[qn,function(...e){const[t]=e;Dt(t)||!Hn(t)?qn.apply(this,e):ro(t)}]]),Yt,Vt,$t,kn,hr,Mn,Fn]),$n=function(e,t,r){!function(e,t){if(!e)throw new xe("Missing global object shape.");if(!t)throw new xe("Missing global object virtualization target.")}(e,t);const n=Ve({__proto__:null,keepAlive:!1},r),{distortionCallback:o,endowments:i={},keepAlive:s,support:a,instrumentation:u}=n,c=Ze(),l=function(e){return Qe(ze,e,[])}(c).window,{document:f}=l,p=tt,h=function(e){if("function"!=typeof e)throw new le("Missing evaluator function.");return e(fe)()}(l.eval),d=Fe(t),v=new we({blueConnector:p,distortionCallback:o,redConnector:h,support:a,instrumentation:u});return v.link("window"),function(e,t){for(let r=0,{length:n}=Oe;r<n;r+=1){const n=Oe[r],o=t[n];o&&(e.link(n),o.prototype&&e.link(n,"prototype"))}}(v,t),function(e,t){t.EventTarget&&t instanceof EventTarget&&(e.link("document"),e.link("__proto__"),e.link("__proto__","__proto__"),e.link("__proto__","__proto__","__proto__"))}(v,t),je(v,d,function(...e){const t={};for(let r=0,{length:n}=e;r<n;r+=1){const n=e[r];n&&Ie(t,n)}return t}(e,i)),!0!==s?et(c):(Qe(Ue,f,[]),function(e){Qe(qe,e,[])}(f)),v}(window,window,{distortionCallback:e=>Qn.get(e)||e,endowments:Vn,keepAlive:!0}),Kn=document.querySelector("iframe");if(It(Kn))throw new Error("Invalid Initialization");const zn=Kn.contentWindow.document,Xn=Yn.call(zn),Jn=Reflect.getOwnPropertyDescriptor(HTMLIFrameElement.prototype,"contentWindow"),Zn=Jn.get;Jn.get=function(){return this===Kn?null:Zn.call(this)},Reflect.defineProperty(HTMLIFrameElement.prototype,"contentWindow",Jn);const eo=Reflect.getOwnPropertyDescriptor(HTMLIFrameElement.prototype,"contentDocument"),to=eo.get;function ro(e){const{attributes:t,textContent:r}=e,n=jn.call(zn,"script");for(let e=0,r=t.length;e<r;e+=1){const r=t.item(e);It(r)||0===r.name.indexOf("on")||Wn.call(n,r.name,r.value)}""!==so&&t.getNamedItem("nonce")&&Wn.call(n,"nonce",so),Cn.call(n,"error",(t=>{Rn.call(e,new ErrorEvent("error",t))})),Cn.call(n,"load",(()=>Rn.call(e,new Event("load")))),Cn.call(zn,"securitypolicyviolation",(t=>{Rn.call(e,new SecurityPolicyViolationEvent("securitypolicyviolation",t))})),r&&(n.textContent=r),Un.call(Xn,n)}function no(e){return It(e)||kt(e)?[]:e.split(",").map((e=>e.trim())).filter((e=>io.test(e)))}function oo(e){e.evaluate||(e.evaluate=!0,no(e.exportedGlobalNames).forEach((e=>{$n.evaluate(`\n 'use strict';\n const key = \`${e}\`;\n $oasisExternalDefineProperty$(key, {\n get() { return window[key]; },\n enumerable: true,\n configurable: true,\n });\n `)})),function(e){e.forEach((e=>{$n.evaluate(`\n 'use strict';\n const key = \`${e}\`;\n Object.defineProperty(window, key, {\n get() { return $oasisExternalGetProperty$(key); },\n enumerable: true,\n configurable: true,\n });\n `)}))}(no(e.importedGlobalNames)),ro(e))}eo.get=function(){return this===Kn?null:to.call(this)},Reflect.defineProperty(HTMLIFrameElement.prototype,"contentDocument",eo),$n.evaluate("\n // This initialization will prevent any of these APIs to be polyfilled\n // on the blue realm that can affect this sandbox.\n [\n HTMLElement.prototype,\n Element.prototype,\n Node.prototype,\n Event.prototype,\n Document.prototype,\n EventTarget.prototype,\n MutationObserver.prototype,\n HTMLCollection.prototype,\n NodeList.prototype,\n ShadowRoot.prototype,\n HTMLSlotElement.prototype,\n Text.prototype,\n ].forEach(o => delete o.$);\n");const io=/^\S+$/;let so="";class ao extends HTMLElement{static get observedAttributes(){return["nonce"]}constructor(){super();const e=document.createElement("slot");Cn.call(e,"slotchange",(()=>oo(this)),{once:!0}),this.attachShadow({mode:"open"}).appendChild(e)}get exportedGlobalNames(){return this.getAttribute("exported-global-names")}set exportedGlobalNames(e){It(e)||kt(e)||""===e?this.removeAttribute("exported-global-names"):this.setAttribute("exported-global-names",e)}get importedGlobalNames(){return this.getAttribute("imported-global-names")}set importedGlobalNames(e){It(e)||kt(e)||""===e?this.removeAttribute("imported-global-names"):this.setAttribute("imported-global-names",e)}get src(){var e;return null!==(e=this.getAttribute("src"))&&void 0!==e?e:""}set src(e){It(e)||kt(e)||""===e?this.removeAttribute("src"):this.setAttribute("src",e)}attributeChangedCallback(e,t,r){"nonce"===e&&""!==r&&(so=r)}connectedCallback(){this.setAttribute("hidden","true");const{src:e}=this;(e&&e.length||this.textContent)&&oo(this)}}customElements.define("x-oasis-script",ao)}));
| //# sourceMappingURL=oasis.min.js.map
|
|