@billgangcom/theme-lib 1.111.7 → 1.112.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/{builder-iDTY-5V6.cjs → builder-BJi41gLj.cjs} +2 -2
  2. package/dist/{builder-CVkU9IhV.js → builder-BPcwschw.js} +5 -5
  3. package/dist/{builder-components-Bgp-Ty-V.cjs → builder-components-DiSJ943W.cjs} +1 -1
  4. package/dist/{builder-components-C5ikkE9d.js → builder-components-Dzh-02cy.js} +4 -4
  5. package/dist/builder.cjs.js +1 -1
  6. package/dist/builder.es.js +22 -22
  7. package/dist/{charge-DpDinsX8.js → charge-BXhHGVZ9.js} +1654 -1624
  8. package/dist/{charge-u_nBOUZM.cjs → charge-Ud-AcF5N.cjs} +21 -21
  9. package/dist/{checkout-DOWk8tpf.cjs → checkout-C6Krps7T.cjs} +1 -1
  10. package/dist/{checkout-CB2oKUQS.js → checkout-CJf-hrQS.js} +5 -5
  11. package/dist/exports.cjs.js +1 -1
  12. package/dist/exports.es.js +6 -6
  13. package/dist/{index-C0o5qJiP.cjs → index-BJRGrwnd.cjs} +1 -1
  14. package/dist/{index-BQpvc-IY.js → index-BOlJB8PY.js} +5 -5
  15. package/dist/{index-CDzE4F39.js → index-BubR1-4r.js} +1 -1
  16. package/dist/{index-CDvIVBhf.js → index-C1RZaf85.js} +5 -5
  17. package/dist/{index-BFRcuDVu.cjs → index-C79AL-SX.cjs} +1 -1
  18. package/dist/{index-CQ-gkekH.js → index-CTAMb5Ws.js} +5 -5
  19. package/dist/{index-BD7IfwmI.cjs → index-Cm1WxtE8.cjs} +1 -1
  20. package/dist/{index-BWZ2h_7x.cjs → index-DZA2Qg7A.cjs} +1 -1
  21. package/dist/{index-BQQCnV_m.cjs → index-DnOKr-Mo.cjs} +1 -1
  22. package/dist/{index-_d_pN1E3.js → index-HqoVN9QS.js} +5 -5
  23. package/dist/index.cjs.js +1 -1
  24. package/dist/index.es.js +6 -6
  25. package/dist/order-BAgqXjj2.cjs +1 -0
  26. package/dist/order-BRLSB3Nu.js +318 -0
  27. package/dist/src/storefront/components/RefundNotificationModal/index.d.ts +9 -0
  28. package/dist/src/storefront/models/order.d.ts +4 -0
  29. package/dist/style.css +1 -1
  30. package/dist/{subscription-6XMGDbBf.js → subscription-CX2OMarS.js} +5 -5
  31. package/dist/{subscription-CPAjLrRF.cjs → subscription-ytzGgkBp.cjs} +1 -1
  32. package/dist/{ticket-DnsQQIx0.js → ticket-Bw4zmgVj.js} +142 -142
  33. package/dist/{ticket-CF6cbjcW.cjs → ticket-Cf9H1nLd.cjs} +4 -4
  34. package/dist/{top-up-CYG44xXH.cjs → top-up-B6LSLdw1.cjs} +1 -1
  35. package/dist/{top-up-CwepC-U_.js → top-up-CLwqsSvK.js} +5 -5
  36. package/dist/{ui-components-y9HAFfSv.cjs → ui-components-BM4zwk9v.cjs} +1 -1
  37. package/dist/{ui-components-BnzhZmPH.js → ui-components-DvdK_Pju.js} +4 -4
  38. package/dist/ui.cjs.js +1 -1
  39. package/dist/ui.es.js +1 -1
  40. package/dist/{validation-C18qAKPo.cjs → validation-B_VyjaOh.cjs} +1 -1
  41. package/dist/{validation-Dc9nm0Et.js → validation-DBN8rMc3.js} +5 -5
  42. package/package.json +1 -1
  43. package/dist/order-DZ1zWuuY.js +0 -228
  44. package/dist/order-VojuN1Fs.cjs +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";const b=require("./builder-iDTY-5V6.cjs"),s=require("react/jsx-runtime"),P=require("react"),w=require("./ui-components-y9HAFfSv.cjs"),Vd=require("./builder-components-Bgp-Ty-V.cjs"),Wc=require("./ticket-CF6cbjcW.cjs");require("react-dom");const Yc=require("./order-VojuN1Fs.cjs"),$d=require("./subscription-CPAjLrRF.cjs");function zd(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const se=zd(P),qd=()=>typeof document<"u"?document.documentElement.hasAttribute("translated")||document.documentElement.querySelector(".translated-ltr, .translated-rtl")!==null||document.head.querySelector('meta[name="_translator"]')!==null:!1,Gc=({children:e,className:t,as:n="span",...r})=>{const[u,a]=P.useState(!1);return P.useEffect(()=>{typeof window<"u"&&a(qd())},[]),u?s.jsx(n,{className:t,...r,"data-stable-text":e,dangerouslySetInnerHTML:{__html:""}}):s.jsx(n,{className:t,...r,children:e})};async function Zd(e){const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.storeApi}/shops/${n}/general`+(e?`?password=${e}`:"");return(await b.request({method:"get",url:r,withToken:!1})).data}const Wd=async()=>{const e=b.useApiStore.getState().apiUrls,t=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain")||"flagship-theme.pages.dev":window.location.hostname,n=`${e.storeApi}/v2/shops/${t}/settings-theme`;return await b.request({url:n,withToken:!0,method:"get"})},Yd=async e=>{const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/balance/top-up/${n}`;return await b.request({url:r,method:"post",body:e,withToken:!1})},Gd=async(e,t)=>{const r=`${b.useApiStore.getState().apiUrls.cashappApi}/v1/${t}/cashapp/link`;return await b.request({url:r,method:"post",body:e,withToken:!1})},Tr=async e=>{const t=b.useApiStore.getState().apiUrls;if(!localStorage.getItem("token"))throw new Error("No access token");const r=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${t.customersApi}/v2/${r}/customers/${e}`;return await b.request({url:u,withToken:!0,method:"get",typeToken:"customer"})},Xd=()=>Tr("dash/info"),Kd=()=>Tr("dash/dashboard/home"),Qd=()=>Tr("rewards"),Jd=()=>Tr("balance"),e2=()=>Tr("balance/top-up/settings"),t2=()=>Tr("referral-system"),zi=e=>{const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.storeApi}/shops/${n}/${e}`;return b.request({url:r,withToken:!1,method:"get"})},n2=()=>zi("terms"),r2=()=>zi("refund-policy"),u2=()=>zi("privacy-policy"),mi=10,na=async({url:e,PageNumber:t})=>{var o;const n=b.useApiStore.getState().apiUrls,r=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.customersApi}/v2/${r}/${e}?PageNumber=${t}&PageSize=${mi}`,a=await b.request({url:u,withToken:!0,method:"get",typeToken:"customer"}),i=Number((o=a.headers)==null?void 0:o["x-pagination-total"]);return{list:a.data,totalCount:i}},iu=async(e,t="get",n)=>{const r=b.useApiStore.getState().apiUrls,u=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/orders/${u}/${e}`;return await b.request({url:a,method:t,withToken:!0,body:n,typeToken:"customer"})},a2=e=>iu("","post",e),i2=({PageNumber:e})=>na({url:"customers/orders",PageNumber:e}),s2=e=>iu(e),o2=e=>iu(e),c2=(e,t,n)=>iu(`${e}/${t}/replacement-requests`,"post",n),l2=(e,t,n)=>iu(`${e}/${t}/replacement-requests/${n}/cancel`,"post"),d2=async e=>{const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/${n}/subscriptions`;return await b.request({url:r,method:"post",withToken:!1,body:e})},f2=async(e,t)=>{const n=b.useApiStore.getState().apiUrls,r=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/${t}`;return await b.request({url:u,method:"get",withToken:!1})},h2=async(e,t)=>{const n=b.useApiStore.getState().apiUrls,r=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v1/${r}/subscriptions/${e}/${t}/upgrades`;return await b.request({url:u,method:"get",withToken:!1})},p2=async(e,t,n)=>{const r=b.useApiStore.getState().apiUrls,u=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/${u}/subscriptions/${e}/${t}/cancel`;return await b.request({url:a,method:"post",withToken:!1,body:n})},m2=async(e,t)=>{const n=b.useApiStore.getState().apiUrls,r=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/change-gateway`;return await b.request({url:u,method:"post",withToken:!1,body:{gateway:t}})},g2=({PageNumber:e})=>na({url:"customers/subscriptions",PageNumber:e}),b2=async({id:e,accessToken:t})=>await h2(e,t),_2=async(e,t)=>{const n=b.useApiStore.getState().apiUrls,r=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/order`;return await b.request({url:u,method:"post",withToken:!1,body:t})},x2=async(e,t)=>{const n=b.useApiStore.getState().apiUrls,r=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v1/public/${r}/tickets/${e}/${t}`;return await b.request({url:u,method:"get",withToken:!1})},C2=async(e,t,n,r,u)=>{const a=b.useApiStore.getState().apiUrls,i=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,o=`${a.slApi}/v1/public/${i}/tickets/${e}/${t}/answer`;return(await b.request({url:o,method:"post",body:{message:n,recaptcha:r,tsId:u},withToken:!1})).data},E2=({PageNumber:e})=>na({url:"customers/tickets",PageNumber:e}),T2=({PageNumber:e})=>na({url:"customers/balance/transactions",PageNumber:e}),y2=async(e,t,n)=>{const r=b.useApiStore.getState().apiUrls,u=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/reviews/${u}/${t}/${n}`;return await b.request({url:a,method:"post",withToken:!1,body:e})},k2=async e=>{const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/charges/${n}/${e}`;return await b.request({url:r,method:"get",withToken:!1})},A2=async e=>{const t=b.useApiStore.getState().apiUrls,n=e.map(i=>["names",i]),r=new URLSearchParams(n),u=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${t.slApi}/v2/gateways?shopDomain=${u}&${r.toString()}`;return await b.request({url:a,method:"get",withToken:!1})},Cu=new Map,Xc=async e=>{const t=b.useApiStore.getState().apiUrls,r=Array.from(new Set(e)).sort().map(l=>["names",l]),u=new URLSearchParams(r),a=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${t.slApi}/v2/checkout?shopDomain=${a}&${u.toString()}`,o=`${i}`;if(Cu.has(o))return Cu.get(o);const c=b.request({url:i,method:"get",withToken:!1}).catch(l=>{throw Cu.delete(o),l});return Cu.set(o,c),c},Kc=async({email:e,recaptcha:t,tsId:n})=>{const r=b.useApiStore.getState().apiUrls,u=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.customersApi}/v2/${u}/auth/otp/request`;return(await b.request({url:a,body:{email:e,recaptcha:t,tsId:n},method:"post",withToken:!1})).data?{requested:!0,email:e}:{requested:!1,email:void 0}},Qc=async({email:e,otp:t,recaptcha:n,tsId:r})=>{const u=b.useApiStore.getState().apiUrls,a=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${u.customersApi}/v2/${a}/auth/otp/login`,{data:o}=await b.request({url:i,method:"post",body:{email:e,otp:t,recaptcha:n,tsId:r},withToken:!1});return b.useStorefrontStore.getState().setToken(o.data),localStorage.setItem("token",o.data),{token:o.data,requested:!1}},gi=async()=>{b.useStorefrontStore.getState().setToken(""),b.useCustomerDashboardStore.getState().setDashInfo(null),localStorage.removeItem("token")},S2=Object.freeze(Object.defineProperty({__proto__:null,loginCustomer:Qc,logoutCustomer:gi,requestOtp:Kc},Symbol.toStringTag,{value:"Module"})),I2=async e=>{const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v2/coupons/${n}/validate`;return await b.request({url:r,method:"post",body:e,withToken:!1})},N2=async e=>{const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.customersApi}/v2/${n}/customers/referral-system/signup`;return(await b.request({url:r,withToken:!0,method:"post",body:e,typeToken:"customer"})).data},v2=async()=>{const{data:e}=await t2();return e},w2=async e=>{const{data:t}=await N2(e);return t},D2=async e=>{const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/discord/${n}`;return await b.request({url:r,method:"post",body:e,withToken:!1})},L2=async e=>{const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/discord/${n}/${e.id}?customerEmail=${e.customerEmail}`;return await b.request({url:r,method:"get",withToken:!1})};async function P2(e){const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.customersApi}/v2/${n}/customers/rewards/${e.id}/claim`;return b.request({url:r,method:"post",withToken:!0,typeToken:"customer"})}const wa="Balance",Dn={Number:"NUMBER",Textarea:"LARGE_TEXT",Checkbox:"CHECK_BOX",Hidden:"HIDDEN"},R2={customerEmail:"",recaptcha:"",gateway:"",paymentMethod:"",parts:[],customFields:{},discordSocialConnectId:null,coupon:null,tsId:""},Bs=(e,t)=>{var l;const{productId:n,productVariantId:r,quantity:u,chargeType:a}=t,i=e.find(h=>h.id===n);if(!i)throw new Error("Product does not exist");const o=i.variants.find(h=>h.id===r);if(!o)throw new Error("Variant does not exist");if(a==="RECURRING"&&!o.subscriptionSettings)throw new Error("Variant does not have subscription settings");if(u!==void 0&&((l=o.quantity)!=null&&l.available)&&o.quantity.available<u)throw new Error("Not enough quantity available");const c=b.useCartStore.getState().cart;if(c.parts.length>0){const h=e.find(m=>m.id===c.parts[0].productId),f=h==null?void 0:h.variants.find(m=>m.id===c.parts[0].productVariantId);if(f&&o.price.currency!==f.price.currency)throw new Error("Product have different currency")}return o},O2=(e,t)=>{if(!e.volumeDiscounts||e.volumeDiscounts.length===0)return 0;const n=e.volumeDiscounts.filter(u=>t>=u.amount);return n.length===0?0:n.reduce((u,a)=>a.amount>u.amount?a:u).percentage},M2=(e,t)=>{let n=0,r=0;return e.forEach(u=>{var m,p;const a=t.find(g=>(g==null?void 0:g.id)===u.productId),i=a==null?void 0:a.variants.find(g=>g.id===u.productVariantId);if(!i)return;const{gateway:o}=b.useCartStore.getState().cart,c=(i==null?void 0:i.gateways)||[],l=c.some(g=>g.name===o&&g.overrodePrice)?(m=c.find(g=>g.name===o))==null?void 0:m.overrodePrice:null;let h=0,f=0;if(u.chargeType==="ONE_TIME"?(h=(l==null?void 0:l.amount)||(i==null?void 0:i.price.amount)||0,f=h*u.quantity):f=i!=null&&i.subscriptionSettings?i.subscriptionSettings.price.amount+(((p=i.subscriptionSettings.entryFee)==null?void 0:p.amount)||0):0,n+=f,u.chargeType==="ONE_TIME"){const g=O2(i,u.quantity),x=f*(1-g/100);r+=x}else r+=f}),{total:n,totalWithVolumeDiscounts:r}},F2=(e,t)=>({isRequired:t.some(r=>{var a;const u=e.find(i=>(i==null?void 0:i.id)===r.productId);return(a=u==null?void 0:u.variants.find(i=>i.id===r.productVariantId))==null?void 0:a.discordSettings.isRequired}),isEnabled:t.some(r=>{var a;const u=e.find(i=>(i==null?void 0:i.id)===r.productId);return(a=u==null?void 0:u.variants.find(i=>i.id===r.productVariantId))==null?void 0:a.discordSettings.isEnabled})}),js=e=>new Set(e.gateways.map(t=>t.name)),Da={availableGateways:[],requiresSignInGateways:[]},Hs=(e,t)=>{if(t.length===0)return Da;const n=e[0];if(!n)return Da;const r=t.find(o=>o.id===n.productId),u=r==null?void 0:r.variants.find(o=>o.id===n.productVariantId);if(!u)return Da;const a=js(u);for(const o of e){const c=t.find(f=>f.id===o.productId);if(!c)continue;const l=c.variants.find(f=>f.id===o.productVariantId);if(!l)continue;const h=js(l);for(const f of a)h.has(f)||a.delete(f)}return!localStorage.getItem("token")&&a.has(wa)?(a.delete(wa),{availableGateways:[...a],requiresSignInGateways:[wa]}):{availableGateways:[...a],requiresSignInGateways:[]}},Us=(e,t)=>{if(e.length===0)return[];const r=e.map(a=>{const i=t.find(c=>c.id===a.productId),o=i==null?void 0:i.variants.find(c=>c.id===a.productVariantId);return(o==null?void 0:o.customFields)??[]}).flat().reduce((a,i)=>{const o=a[i.name];return o?(i.required&&!o.required&&(a[i.name]={...i,value:i.defaultValue}),a):(a[i.name]={...i,value:i.defaultValue},a)},{});return Object.values(r).map(a=>({...a,value:""}))},B2=(e,t)=>{const n=t.find(u=>u.id===e.productId),r=n==null?void 0:n.variants.find(u=>u.id===e.productVariantId);return e.chargeType==="RECURRING"?!!(r!=null&&r.subscriptionSettings):!1},su=()=>{const{cart:e,products:t,coupon:n,pending:r,applyCouponPending:u,customerEmail:a,setCart:i,setProducts:o,setCoupon:c,setPending:l,setApplyCouponPending:h}=b.useCartStore(),f=async x=>{var M;h(!0);const{cart:C}=b.useCartStore.getState(),{gateway:_,parts:v}=C,{notifications:k,setNotifications:D}=b.useNotificationStore.getState();_||(h(!1),D([...k,{message:"There should be a gateway for the coupon",status:"error",id:b.v4()}]));const S=v.map(q=>q.productId);let I=null;try{const{data:q}=await I2({gateway:_,couponName:x,productIds:S});I=q.data,D([...k,{message:"Coupon is applied",status:"success",id:b.v4()}]),i(U=>({...U,coupon:x}))}catch(q){const U=q;D([...k,{message:`Coupon is not applied: ${U.message}`,status:"error",id:b.v4()}]),i(L=>({...L,coupon:null})),c(null),h(!1)}if(h(!1),(M=I==null?void 0:I.restrictToProductIds)!=null&&M.length&&!S.every(q=>{var U;return(U=I==null?void 0:I.restrictToProductIds)==null?void 0:U.includes(q)}))throw new Error("Coupon can't be applied to such products");return c(I),I},g={reset(){i({...R2})},addProducts:x=>{const C=b.useCartStore.getState().products,_=x.filter(v=>!C.some(k=>k.id===v.id));o([...C,..._])},addProductToCart:x=>{const C=b.useCartStore.getState().cart;try{Bs(t,x)}catch(v){throw new Error(v)}const _=C.parts.find(v=>v.productId===x.productId&&v.productVariantId===x.productVariantId&&v.chargeType===x.chargeType);if(_)return g.updateQuantityOfProduct({..._,quantity:(_.quantity||1)+(x.quantity||1),chargeType:x.chargeType});if(C.parts.length&&Hs([...C.parts,x],t).availableGateways.length===0)throw new Error("No common payment gateways available");i({...C,parts:[...C.parts,x]}),C.coupon&&f(C.coupon)},removeProduct({productId:x,productVariantId:C}){i(_=>({..._,parts:_.parts.filter(v=>v.productId!==x||v.productVariantId!==C)})),e.coupon&&f(e.coupon)},getPossibleGateways(){return Hs(e.parts,t)},removeCoupon(){c(null)},getDiscordSettings(){return F2(t,e.parts)},updateQuantityOfProduct(x){Bs(t,x),i(C=>({...C,parts:C.parts.map(_=>_.productId===x.productId&&_.productVariantId===x.productVariantId?{..._,quantity:x.quantity,chargeType:x.chargeType}:_)})),e.coupon&&f(e.coupon)},getTotalAndDiscount(){const{coupon:x}=b.useCartStore.getState(),{total:C,totalWithVolumeDiscounts:_}=M2(e.parts,t);let v;const k=_;return x&&x.discount?!x.isFixed&&x.discount===100?v=0:v=x.isFixed?Math.max(0,k-x.discount):k*(1-x.discount/100):_!==C&&(v=_),{total:C,totalWithVolumeDiscounts:_!==C?_:void 0,totalWithDiscount:v}},setGateway(x){i(_=>({..._,gateway:x}));const{isAntistock:C}=b.useGeneralStore.getState();e.coupon&&!C&&f(e.coupon)},setPaymentMethod(x){i(C=>({...C,paymentMethod:x}))},async submitCart(x){l(!0);const{cart:C}=b.useCartStore.getState(),{discordInfo:_}=b.useDiscordStore.getState();let v;if(C.parts&&a&&B2(C.parts[0],t))try{const{data:k}=await d2({gateway:C.gateway,coupon:C.coupon,partOrder:C.parts[0],referralCode:localStorage.getItem("referralCode"),discordSocialConnectId:_!=null&&_.authorized?_.id:null,customerEmail:a,recaptcha:x,customFields:{...C.customFields},tsId:b.useGetTsId()});v=k.data}catch(k){console.error(k)}else try{const{data:k}=await a2({gateway:C.gateway,parts:[...C.parts],coupon:C.coupon,customerEmail:C.customerEmail,referralCode:localStorage.getItem("referralCode"),recaptcha:x,customFields:{...C.customFields},tsId:b.useGetTsId(),discordSocialConnectId:_!=null&&_.authorized?_.id:null,usePriorityReplacement:C.usePriorityReplacement===!0});v=k.data}catch(k){const D=k,{notifications:S,setNotifications:I}=b.useNotificationStore.getState();I([...S,{message:`Failed to create order: ${D.message}`,status:"error",id:b.v4()}])}if(l(!1),v)return v;throw new Error("Failed to create order")},setDiscordSocialConnectId(x){i(C=>({...C,discordSocialConnectId:x}))},setCustomFields(x){i(C=>({...C,customFields:{...x}}))}};return P.useEffect(()=>{i(x=>({...x,customerEmail:a??""}))},[a,i]),{cart:e,products:t,coupon:n,pending:r,applyCouponPending:u,applyCoupon:f,...g}},Jn=()=>{const{notifications:e,setNotifications:t}=b.useNotificationStore();return n=>{navigator.clipboard.writeText(n),t([...e,{status:"success",message:"Successfully copied",id:b.v4()}])}};var bi={exports:{}},Eu={exports:{}},we={};/** @license React v16.13.1
1
+ "use strict";const b=require("./builder-BJi41gLj.cjs"),s=require("react/jsx-runtime"),P=require("react"),w=require("./ui-components-BM4zwk9v.cjs"),Vd=require("./builder-components-DiSJ943W.cjs"),Wc=require("./ticket-Cf9H1nLd.cjs");require("react-dom");const Yc=require("./order-BAgqXjj2.cjs"),$d=require("./subscription-ytzGgkBp.cjs");function zd(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const se=zd(P),qd=()=>typeof document<"u"?document.documentElement.hasAttribute("translated")||document.documentElement.querySelector(".translated-ltr, .translated-rtl")!==null||document.head.querySelector('meta[name="_translator"]')!==null:!1,Gc=({children:e,className:t,as:n="span",...r})=>{const[u,a]=P.useState(!1);return P.useEffect(()=>{typeof window<"u"&&a(qd())},[]),u?s.jsx(n,{className:t,...r,"data-stable-text":e,dangerouslySetInnerHTML:{__html:""}}):s.jsx(n,{className:t,...r,children:e})};async function Zd(e){const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.storeApi}/shops/${n}/general`+(e?`?password=${e}`:"");return(await b.request({method:"get",url:r,withToken:!1})).data}const Wd=async()=>{const e=b.useApiStore.getState().apiUrls,t=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain")||"flagship-theme.pages.dev":window.location.hostname,n=`${e.storeApi}/v2/shops/${t}/settings-theme`;return await b.request({url:n,withToken:!0,method:"get"})},Yd=async e=>{const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/balance/top-up/${n}`;return await b.request({url:r,method:"post",body:e,withToken:!1})},Gd=async(e,t)=>{const r=`${b.useApiStore.getState().apiUrls.cashappApi}/v1/${t}/cashapp/link`;return await b.request({url:r,method:"post",body:e,withToken:!1})},Tr=async e=>{const t=b.useApiStore.getState().apiUrls;if(!localStorage.getItem("token"))throw new Error("No access token");const r=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${t.customersApi}/v2/${r}/customers/${e}`;return await b.request({url:u,withToken:!0,method:"get",typeToken:"customer"})},Xd=()=>Tr("dash/info"),Kd=()=>Tr("dash/dashboard/home"),Qd=()=>Tr("rewards"),Jd=()=>Tr("balance"),e2=()=>Tr("balance/top-up/settings"),t2=()=>Tr("referral-system"),zi=e=>{const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.storeApi}/shops/${n}/${e}`;return b.request({url:r,withToken:!1,method:"get"})},n2=()=>zi("terms"),r2=()=>zi("refund-policy"),u2=()=>zi("privacy-policy"),mi=10,na=async({url:e,PageNumber:t})=>{var o;const n=b.useApiStore.getState().apiUrls,r=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.customersApi}/v2/${r}/${e}?PageNumber=${t}&PageSize=${mi}`,a=await b.request({url:u,withToken:!0,method:"get",typeToken:"customer"}),i=Number((o=a.headers)==null?void 0:o["x-pagination-total"]);return{list:a.data,totalCount:i}},iu=async(e,t="get",n)=>{const r=b.useApiStore.getState().apiUrls,u=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/orders/${u}/${e}`;return await b.request({url:a,method:t,withToken:!0,body:n,typeToken:"customer"})},a2=e=>iu("","post",e),i2=({PageNumber:e})=>na({url:"customers/orders",PageNumber:e}),s2=e=>iu(e),o2=e=>iu(e),c2=(e,t,n)=>iu(`${e}/${t}/replacement-requests`,"post",n),l2=(e,t,n)=>iu(`${e}/${t}/replacement-requests/${n}/cancel`,"post"),d2=async e=>{const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/${n}/subscriptions`;return await b.request({url:r,method:"post",withToken:!1,body:e})},f2=async(e,t)=>{const n=b.useApiStore.getState().apiUrls,r=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/${t}`;return await b.request({url:u,method:"get",withToken:!1})},h2=async(e,t)=>{const n=b.useApiStore.getState().apiUrls,r=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v1/${r}/subscriptions/${e}/${t}/upgrades`;return await b.request({url:u,method:"get",withToken:!1})},p2=async(e,t,n)=>{const r=b.useApiStore.getState().apiUrls,u=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/${u}/subscriptions/${e}/${t}/cancel`;return await b.request({url:a,method:"post",withToken:!1,body:n})},m2=async(e,t)=>{const n=b.useApiStore.getState().apiUrls,r=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/change-gateway`;return await b.request({url:u,method:"post",withToken:!1,body:{gateway:t}})},g2=({PageNumber:e})=>na({url:"customers/subscriptions",PageNumber:e}),b2=async({id:e,accessToken:t})=>await h2(e,t),_2=async(e,t)=>{const n=b.useApiStore.getState().apiUrls,r=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/order`;return await b.request({url:u,method:"post",withToken:!1,body:t})},x2=async(e,t)=>{const n=b.useApiStore.getState().apiUrls,r=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v1/public/${r}/tickets/${e}/${t}`;return await b.request({url:u,method:"get",withToken:!1})},C2=async(e,t,n,r,u)=>{const a=b.useApiStore.getState().apiUrls,i=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,o=`${a.slApi}/v1/public/${i}/tickets/${e}/${t}/answer`;return(await b.request({url:o,method:"post",body:{message:n,recaptcha:r,tsId:u},withToken:!1})).data},E2=({PageNumber:e})=>na({url:"customers/tickets",PageNumber:e}),T2=({PageNumber:e})=>na({url:"customers/balance/transactions",PageNumber:e}),y2=async(e,t,n)=>{const r=b.useApiStore.getState().apiUrls,u=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/reviews/${u}/${t}/${n}`;return await b.request({url:a,method:"post",withToken:!1,body:e})},k2=async e=>{const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/charges/${n}/${e}`;return await b.request({url:r,method:"get",withToken:!1})},A2=async e=>{const t=b.useApiStore.getState().apiUrls,n=e.map(i=>["names",i]),r=new URLSearchParams(n),u=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${t.slApi}/v2/gateways?shopDomain=${u}&${r.toString()}`;return await b.request({url:a,method:"get",withToken:!1})},Cu=new Map,Xc=async e=>{const t=b.useApiStore.getState().apiUrls,r=Array.from(new Set(e)).sort().map(l=>["names",l]),u=new URLSearchParams(r),a=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${t.slApi}/v2/checkout?shopDomain=${a}&${u.toString()}`,o=`${i}`;if(Cu.has(o))return Cu.get(o);const c=b.request({url:i,method:"get",withToken:!1}).catch(l=>{throw Cu.delete(o),l});return Cu.set(o,c),c},Kc=async({email:e,recaptcha:t,tsId:n})=>{const r=b.useApiStore.getState().apiUrls,u=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.customersApi}/v2/${u}/auth/otp/request`;return(await b.request({url:a,body:{email:e,recaptcha:t,tsId:n},method:"post",withToken:!1})).data?{requested:!0,email:e}:{requested:!1,email:void 0}},Qc=async({email:e,otp:t,recaptcha:n,tsId:r})=>{const u=b.useApiStore.getState().apiUrls,a=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${u.customersApi}/v2/${a}/auth/otp/login`,{data:o}=await b.request({url:i,method:"post",body:{email:e,otp:t,recaptcha:n,tsId:r},withToken:!1});return b.useStorefrontStore.getState().setToken(o.data),localStorage.setItem("token",o.data),{token:o.data,requested:!1}},gi=async()=>{b.useStorefrontStore.getState().setToken(""),b.useCustomerDashboardStore.getState().setDashInfo(null),localStorage.removeItem("token")},S2=Object.freeze(Object.defineProperty({__proto__:null,loginCustomer:Qc,logoutCustomer:gi,requestOtp:Kc},Symbol.toStringTag,{value:"Module"})),I2=async e=>{const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v2/coupons/${n}/validate`;return await b.request({url:r,method:"post",body:e,withToken:!1})},N2=async e=>{const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.customersApi}/v2/${n}/customers/referral-system/signup`;return(await b.request({url:r,withToken:!0,method:"post",body:e,typeToken:"customer"})).data},v2=async()=>{const{data:e}=await t2();return e},w2=async e=>{const{data:t}=await N2(e);return t},D2=async e=>{const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/discord/${n}`;return await b.request({url:r,method:"post",body:e,withToken:!1})},L2=async e=>{const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/discord/${n}/${e.id}?customerEmail=${e.customerEmail}`;return await b.request({url:r,method:"get",withToken:!1})};async function P2(e){const t=b.useApiStore.getState().apiUrls,n=b.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.customersApi}/v2/${n}/customers/rewards/${e.id}/claim`;return b.request({url:r,method:"post",withToken:!0,typeToken:"customer"})}const wa="Balance",Dn={Number:"NUMBER",Textarea:"LARGE_TEXT",Checkbox:"CHECK_BOX",Hidden:"HIDDEN"},R2={customerEmail:"",recaptcha:"",gateway:"",paymentMethod:"",parts:[],customFields:{},discordSocialConnectId:null,coupon:null,tsId:""},Bs=(e,t)=>{var l;const{productId:n,productVariantId:r,quantity:u,chargeType:a}=t,i=e.find(h=>h.id===n);if(!i)throw new Error("Product does not exist");const o=i.variants.find(h=>h.id===r);if(!o)throw new Error("Variant does not exist");if(a==="RECURRING"&&!o.subscriptionSettings)throw new Error("Variant does not have subscription settings");if(u!==void 0&&((l=o.quantity)!=null&&l.available)&&o.quantity.available<u)throw new Error("Not enough quantity available");const c=b.useCartStore.getState().cart;if(c.parts.length>0){const h=e.find(m=>m.id===c.parts[0].productId),f=h==null?void 0:h.variants.find(m=>m.id===c.parts[0].productVariantId);if(f&&o.price.currency!==f.price.currency)throw new Error("Product have different currency")}return o},O2=(e,t)=>{if(!e.volumeDiscounts||e.volumeDiscounts.length===0)return 0;const n=e.volumeDiscounts.filter(u=>t>=u.amount);return n.length===0?0:n.reduce((u,a)=>a.amount>u.amount?a:u).percentage},M2=(e,t)=>{let n=0,r=0;return e.forEach(u=>{var m,p;const a=t.find(g=>(g==null?void 0:g.id)===u.productId),i=a==null?void 0:a.variants.find(g=>g.id===u.productVariantId);if(!i)return;const{gateway:o}=b.useCartStore.getState().cart,c=(i==null?void 0:i.gateways)||[],l=c.some(g=>g.name===o&&g.overrodePrice)?(m=c.find(g=>g.name===o))==null?void 0:m.overrodePrice:null;let h=0,f=0;if(u.chargeType==="ONE_TIME"?(h=(l==null?void 0:l.amount)||(i==null?void 0:i.price.amount)||0,f=h*u.quantity):f=i!=null&&i.subscriptionSettings?i.subscriptionSettings.price.amount+(((p=i.subscriptionSettings.entryFee)==null?void 0:p.amount)||0):0,n+=f,u.chargeType==="ONE_TIME"){const g=O2(i,u.quantity),x=f*(1-g/100);r+=x}else r+=f}),{total:n,totalWithVolumeDiscounts:r}},F2=(e,t)=>({isRequired:t.some(r=>{var a;const u=e.find(i=>(i==null?void 0:i.id)===r.productId);return(a=u==null?void 0:u.variants.find(i=>i.id===r.productVariantId))==null?void 0:a.discordSettings.isRequired}),isEnabled:t.some(r=>{var a;const u=e.find(i=>(i==null?void 0:i.id)===r.productId);return(a=u==null?void 0:u.variants.find(i=>i.id===r.productVariantId))==null?void 0:a.discordSettings.isEnabled})}),js=e=>new Set(e.gateways.map(t=>t.name)),Da={availableGateways:[],requiresSignInGateways:[]},Hs=(e,t)=>{if(t.length===0)return Da;const n=e[0];if(!n)return Da;const r=t.find(o=>o.id===n.productId),u=r==null?void 0:r.variants.find(o=>o.id===n.productVariantId);if(!u)return Da;const a=js(u);for(const o of e){const c=t.find(f=>f.id===o.productId);if(!c)continue;const l=c.variants.find(f=>f.id===o.productVariantId);if(!l)continue;const h=js(l);for(const f of a)h.has(f)||a.delete(f)}return!localStorage.getItem("token")&&a.has(wa)?(a.delete(wa),{availableGateways:[...a],requiresSignInGateways:[wa]}):{availableGateways:[...a],requiresSignInGateways:[]}},Us=(e,t)=>{if(e.length===0)return[];const r=e.map(a=>{const i=t.find(c=>c.id===a.productId),o=i==null?void 0:i.variants.find(c=>c.id===a.productVariantId);return(o==null?void 0:o.customFields)??[]}).flat().reduce((a,i)=>{const o=a[i.name];return o?(i.required&&!o.required&&(a[i.name]={...i,value:i.defaultValue}),a):(a[i.name]={...i,value:i.defaultValue},a)},{});return Object.values(r).map(a=>({...a,value:""}))},B2=(e,t)=>{const n=t.find(u=>u.id===e.productId),r=n==null?void 0:n.variants.find(u=>u.id===e.productVariantId);return e.chargeType==="RECURRING"?!!(r!=null&&r.subscriptionSettings):!1},su=()=>{const{cart:e,products:t,coupon:n,pending:r,applyCouponPending:u,customerEmail:a,setCart:i,setProducts:o,setCoupon:c,setPending:l,setApplyCouponPending:h}=b.useCartStore(),f=async x=>{var M;h(!0);const{cart:C}=b.useCartStore.getState(),{gateway:_,parts:v}=C,{notifications:k,setNotifications:D}=b.useNotificationStore.getState();_||(h(!1),D([...k,{message:"There should be a gateway for the coupon",status:"error",id:b.v4()}]));const S=v.map(q=>q.productId);let I=null;try{const{data:q}=await I2({gateway:_,couponName:x,productIds:S});I=q.data,D([...k,{message:"Coupon is applied",status:"success",id:b.v4()}]),i(U=>({...U,coupon:x}))}catch(q){const U=q;D([...k,{message:`Coupon is not applied: ${U.message}`,status:"error",id:b.v4()}]),i(L=>({...L,coupon:null})),c(null),h(!1)}if(h(!1),(M=I==null?void 0:I.restrictToProductIds)!=null&&M.length&&!S.every(q=>{var U;return(U=I==null?void 0:I.restrictToProductIds)==null?void 0:U.includes(q)}))throw new Error("Coupon can't be applied to such products");return c(I),I},g={reset(){i({...R2})},addProducts:x=>{const C=b.useCartStore.getState().products,_=x.filter(v=>!C.some(k=>k.id===v.id));o([...C,..._])},addProductToCart:x=>{const C=b.useCartStore.getState().cart;try{Bs(t,x)}catch(v){throw new Error(v)}const _=C.parts.find(v=>v.productId===x.productId&&v.productVariantId===x.productVariantId&&v.chargeType===x.chargeType);if(_)return g.updateQuantityOfProduct({..._,quantity:(_.quantity||1)+(x.quantity||1),chargeType:x.chargeType});if(C.parts.length&&Hs([...C.parts,x],t).availableGateways.length===0)throw new Error("No common payment gateways available");i({...C,parts:[...C.parts,x]}),C.coupon&&f(C.coupon)},removeProduct({productId:x,productVariantId:C}){i(_=>({..._,parts:_.parts.filter(v=>v.productId!==x||v.productVariantId!==C)})),e.coupon&&f(e.coupon)},getPossibleGateways(){return Hs(e.parts,t)},removeCoupon(){c(null)},getDiscordSettings(){return F2(t,e.parts)},updateQuantityOfProduct(x){Bs(t,x),i(C=>({...C,parts:C.parts.map(_=>_.productId===x.productId&&_.productVariantId===x.productVariantId?{..._,quantity:x.quantity,chargeType:x.chargeType}:_)})),e.coupon&&f(e.coupon)},getTotalAndDiscount(){const{coupon:x}=b.useCartStore.getState(),{total:C,totalWithVolumeDiscounts:_}=M2(e.parts,t);let v;const k=_;return x&&x.discount?!x.isFixed&&x.discount===100?v=0:v=x.isFixed?Math.max(0,k-x.discount):k*(1-x.discount/100):_!==C&&(v=_),{total:C,totalWithVolumeDiscounts:_!==C?_:void 0,totalWithDiscount:v}},setGateway(x){i(_=>({..._,gateway:x}));const{isAntistock:C}=b.useGeneralStore.getState();e.coupon&&!C&&f(e.coupon)},setPaymentMethod(x){i(C=>({...C,paymentMethod:x}))},async submitCart(x){l(!0);const{cart:C}=b.useCartStore.getState(),{discordInfo:_}=b.useDiscordStore.getState();let v;if(C.parts&&a&&B2(C.parts[0],t))try{const{data:k}=await d2({gateway:C.gateway,coupon:C.coupon,partOrder:C.parts[0],referralCode:localStorage.getItem("referralCode"),discordSocialConnectId:_!=null&&_.authorized?_.id:null,customerEmail:a,recaptcha:x,customFields:{...C.customFields},tsId:b.useGetTsId()});v=k.data}catch(k){console.error(k)}else try{const{data:k}=await a2({gateway:C.gateway,parts:[...C.parts],coupon:C.coupon,customerEmail:C.customerEmail,referralCode:localStorage.getItem("referralCode"),recaptcha:x,customFields:{...C.customFields},tsId:b.useGetTsId(),discordSocialConnectId:_!=null&&_.authorized?_.id:null,usePriorityReplacement:C.usePriorityReplacement===!0});v=k.data}catch(k){const D=k,{notifications:S,setNotifications:I}=b.useNotificationStore.getState();I([...S,{message:`Failed to create order: ${D.message}`,status:"error",id:b.v4()}])}if(l(!1),v)return v;throw new Error("Failed to create order")},setDiscordSocialConnectId(x){i(C=>({...C,discordSocialConnectId:x}))},setCustomFields(x){i(C=>({...C,customFields:{...x}}))}};return P.useEffect(()=>{i(x=>({...x,customerEmail:a??""}))},[a,i]),{cart:e,products:t,coupon:n,pending:r,applyCouponPending:u,applyCoupon:f,...g}},Jn=()=>{const{notifications:e,setNotifications:t}=b.useNotificationStore();return n=>{navigator.clipboard.writeText(n),t([...e,{status:"success",message:"Successfully copied",id:b.v4()}])}};var bi={exports:{}},Eu={exports:{}},we={};/** @license React v16.13.1
2
2
  * react-is.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -74,36 +74,36 @@ and limitations under the License.
74
74
  --nojs-bg: black !important;
75
75
  --nojs-fg: white !important;
76
76
  }
77
- }`;const K4="_authContainer_1uyf7_2",Q4="_authWrapper_1uyf7_12",J4="_inModal_1uyf7_19",e5="_formHeaderTitle_1uyf7_26",t5="_formHeaderSubtitle_1uyf7_33",n5="_formLabel_1uyf7_39",r5="_formError_1uyf7_51",u5="_submitButton_1uyf7_57",a5="_submitButtonAntistock_1uyf7_57",i5="_backButton_1uyf7_67",s5="_otpContainer_1uyf7_78",o5="_otpSlots_1uyf7_85",c5="_otpSlot_1uyf7_85",l5="_active_1uyf7_108",d5="_otpSlotEmpty_1uyf7_113",f5="_actionRow_1uyf7_117",h5="_authForm_1uyf7_124",p5="_formHeader_1uyf7_26",m5="_input_1uyf7_135",Ye={authContainer:K4,authWrapper:Q4,inModal:J4,formHeaderTitle:e5,formHeaderSubtitle:t5,formLabel:n5,formError:r5,submitButton:u5,submitButtonAntistock:a5,backButton:i5,otpContainer:s5,otpSlots:o5,otpSlot:c5,active:l5,otpSlotEmpty:d5,actionRow:f5,authForm:h5,formHeader:p5,input:m5},g5=P.forwardRef(({value:e,onChange:t,onComplete:n},r)=>s.jsx(Kl,{ref:r,value:e,onChange:t,onComplete:n,maxLength:6,containerClassName:Ye.otpContainer,render:({slots:u})=>s.jsx("div",{className:Ye.otpSlots,children:u.map(a=>s.jsx(b5,{...a},crypto.randomUUID()))})}));function b5({char:e,isActive:t}){return s.jsx("div",{className:b.clx(Ye.otpSlot,{[Ye.active]:t}),children:e?s.jsx("div",{children:e}):s.jsx("div",{className:Ye.otpSlotEmpty,children:"0"})})}const _5=e=>{const t=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return e.trim()?t.test(e)?null:"Please enter a valid email.":"The email field cannot be empty."},x5=e=>/^[0-9]{6}$/.test(e)?null:"Invalid verification code. The code should be a six-digit number. Please try again",Ql=({title:e,subtitle:t,isAntistock:n})=>s.jsxs("div",{className:Ye.formHeader,style:{textAlign:n?"center":void 0},children:[s.jsx("h3",{id:"h3",className:Ye.formHeaderTitle,children:e}),t?s.jsx("div",{className:Ye.formHeaderSubtitle,children:t}):null]}),Jl=({error:e})=>e?s.jsx("div",{className:Ye.formError,children:e}):null,e0=()=>{const[e,t]=P.useState(""),[n,r]=P.useState(null),[u,a]=P.useState(!1),{executeRecaptcha:i}=ou(),{setOtpRequest:o}=b.useCustomerDashboardStore(),{isAntistock:c}=b.useGeneralStore(),l=async h=>{h.preventDefault(),r(null);const f=_5(e);if(f){r(f);return}a(!0);try{const m=await i();if(!m)throw new Error("ReCaptcha verification failed");await Kc({email:e,recaptcha:m,tsId:b.useGetTsId()}),o({requested:!0,email:e})}catch{r("Failed to request OTP. Please try again.")}finally{a(!1)}};return s.jsxs("form",{onSubmit:l,className:Ye.authForm,children:[s.jsx(Ql,{title:c?"My Account":"Sign In",subtitle:c?"":"To continue, enter your email address below.",isAntistock:c}),s.jsxs("div",{className:Ye.input,children:[s.jsx(w.Input,{label:c?"Email":"Email Address",placeholder:"your@email.com",value:e,onChange:h=>{t(h),r(null)}}),s.jsx(Jl,{error:n})]}),s.jsx(w.Button,{type:"Primary",className:c?Ye.submitButtonAntistock:Ye.submitButton,disabled:u,children:u?c?s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[s.jsx(w.Loader,{}),s.jsx("span",{children:"Continue"})]}):s.jsx(w.Loader,{}):c?"Continue":"Sign In"}),s.jsx("span",{style:{color:"var(--text-secondary)",paddingTop:"8px",fontSize:"var(--font-body-md-size)",textAlign:"center"},children:"You will receive a 6-digit account code via email."})]})},t0=({onSignIn:e})=>{const{otpRequest:t,setOtpRequest:n}=b.useCustomerDashboardStore(),{isAntistock:r}=b.useGeneralStore(),[u,a]=P.useState(""),[i,o]=P.useState(null),[c,l]=P.useState(!1),{executeRecaptcha:h}=ou(),f=async()=>{o(null);const p=x5(u);if(p){o(p);return}l(!0);try{const g=await h();if(!g)throw new Error("ReCaptcha verification failed");await Qc({email:t.email,otp:u,recaptcha:g||"",tsId:b.useGetTsId()}),e&&e()}catch{o("Invalid OTP. Please try again.")}finally{l(!1)}},m=()=>n({requested:!1,email:""});return s.jsxs("form",{onSubmit:f,className:Ye.authForm,children:[s.jsx(Ql,{title:"Check Your Email",subtitle:`Enter the 6-digit code we sent to ${t.email}`,isAntistock:r}),s.jsxs("label",{className:Ye.formLabel,children:["Code",s.jsx(g5,{onChange:p=>{a(p),o(null)},value:u,onComplete:f})]}),s.jsx(Jl,{error:i}),s.jsxs("div",{className:Ye.actionRow,children:[s.jsx(w.Button,{onClick:m,type:"Secondary",className:Ye.backButton,children:"Back"}),s.jsx(w.Button,{type:"Primary",className:r?Ye.submitButtonAntistock:Ye.submitButton,disabled:c,children:c?s.jsx(w.Loader,{}):r?"Continue":"Sign In"})]})]})},us=({inModal:e,onSignIn:t})=>{const{otpRequest:n,setOtpRequest:r}=b.useCustomerDashboardStore();return P.useEffect(()=>{n.requested&&r({requested:!1,email:""})},[]),s.jsx("div",{className:Ye.authContainer,children:n?s.jsx("div",{className:b.clx(Ye.authWrapper,e&&Ye.inModal),children:n.requested?s.jsx(t0,{onSignIn:t}):s.jsx(e0,{})}):s.jsx(w.Loader,{})})};function C5(){const e=new URL(window.location.href);window.history.replaceState(null,"",e.pathname+e.hash)}var as=(e=>(e.ADD_BALANCE="AddBalance",e))(as||{});function E5(){const e=new URLSearchParams(document.location.search),t=e.get("page"),n=e.get("action");return{page:t,action:n}}function T5(){const{page:e,action:t}=E5(),{setRoute:n,setAction:r}=b.useCustomerDashboardStore.getState();e&&Object.values(b.Routes).includes(e)&&n(e),t&&Object.values(as).includes(t)&&r(t),C5()}const y5=()=>typeof b.Routes>"u"?(console.warn("Routes not available for RouteToRouteComponent"),{}):{[b.Routes.Home]:Zl,[b.Routes.Orders]:Yc.Orders,[b.Routes.Rewards]:Wl,[b.Routes.Balance]:zl,[b.Routes.Subscriptions]:$d.Subscriptions,[b.Routes.Tickets]:Wc.Tickets},k5=()=>typeof b.Routes>"u"?(console.warn("Routes not available for RouteToAntistockRouteComponent"),{}):{[b.Routes.Home]:Zl,[b.Routes.Orders]:Yc.Orders,[b.Routes.Rewards]:Wl,[b.Routes.Balance]:zl,[b.Routes.Tickets]:Wc.Tickets},A5=()=>{const{route:e,action:t,setRoute:n,setIsBalanceModalOpen:r}=b.useCustomerDashboardStore(),{resetPage:u}=b.usePaginationPagesStore(),{token:a}=b.useStorefrontStore(),{isAntistock:i}=b.useGeneralStore(),o=i?k5()[e]:y5()[e];return P.useEffect(()=>{u(),T5()},[a,e,u]),P.useEffect(()=>{t===as.ADD_BALANCE&&e===b.Routes.Balance&&r(!0)},[e,t]),P.useEffect(()=>{window.location.pathname.includes("/ticket")&&n(b.Routes.Tickets)},[window.location.pathname]),a?s.jsx("div",{style:{maxWidth:"var(--max-width-store)",margin:"0 auto",height:"100%"},children:s.jsx(w.Wrapper,{notPadding:!0,style:{height:"100%"},maxWidth:"var(--max-width-store)",children:c=>s.jsxs("main",{className:b.clx($n.appContainer,{[$n.mobile]:c!=="desktop",[$n.noAnimation]:i,[$n.appContainerAntistock]:i}),children:[s.jsx(Ol,{adaptiveStyles:c}),s.jsx("div",{className:b.clx($n.contentContainer,{[$n.mobile]:c!=="desktop",[$n.contentContainerAntistock]:i}),children:s.jsx(o,{adaptiveStyles:c})})]})})}):s.jsx(us,{})},S5=()=>s.jsx(Gi,{children:s.jsx(A5,{})}),I5="_referralBlock_kla2r_2",N5="_skeleton_kla2r_3",v5="_mobile_kla2r_13",w5="_referralContainer_kla2r_18",D5="_title_kla2r_30",L5="_description_kla2r_36",P5="_linkContainer_kla2r_56",R5="_modalContainer_kla2r_77",O5="_steps_kla2r_86",M5="_joinButton_kla2r_92",F5="_stepItem_kla2r_97",B5="_iconContainer_kla2r_103",j5="_index_kla2r_111",H5="_bar_kla2r_123",U5="_content_kla2r_130",V5="_caption_kla2r_135",$5="_descriptionStep_kla2r_141",z5="_error_kla2r_151",q5="_infoBlock_kla2r_155",Z5="_infoIcon_kla2r_164",W5="_infoText_kla2r_173",Y5="_actions_kla2r_178",G5="_cancelButton_kla2r_183",X5="_referralStats_kla2r_187",K5="_referralInfo_kla2r_204",Q5="_referralStatsItem_kla2r_210",J5="_referralStatsItemValue_kla2r_220",em="_referralStatsItemLabel_kla2r_225",tm="_referral_kla2r_2",nm="_header_kla2r_244",rm="_contentModal_kla2r_254",fe={referralBlock:I5,skeleton:N5,mobile:v5,referralContainer:w5,title:D5,description:L5,linkContainer:P5,modalContainer:R5,steps:O5,joinButton:M5,stepItem:F5,iconContainer:B5,index:j5,bar:H5,content:U5,caption:V5,descriptionStep:$5,error:z5,infoBlock:q5,infoIcon:Z5,infoText:W5,actions:Y5,cancelButton:G5,referralStats:X5,referralInfo:K5,referralStatsItem:Q5,referralStatsItemValue:J5,referralStatsItemLabel:em,referral:tm,header:nm,contentModal:rm},um=({caption:e,description:t,index:n,bar:r=!0})=>s.jsxs("div",{className:fe.stepItem,children:[s.jsxs("div",{className:fe.iconContainer,children:[s.jsx("div",{className:fe.index,children:n}),r&&s.jsx("div",{className:fe.bar})]}),s.jsxs("div",{className:fe.content,children:[s.jsx("div",{className:fe.caption,children:e}),s.jsx("div",{className:fe.descriptionStep,children:t})]})]}),am=({setIsOpen:e,setIsLoading:t})=>{const[n,r]=P.useState(""),[u,a]=P.useState(""),{notifications:i,setNotifications:o}=b.useNotificationStore(),{setIsOpen:c}=b.useModalStore(),l=async f=>{if(f.preventDefault(),n.length<3){a("Referral Code should have minimum length of 3");return}t(!0),h();try{await w2({referralCode:n}),o([...i,{message:"Referral Code has been applied",status:"success",id:b.v4()}])}catch(m){const p=m;o([...i,{message:p.message,status:"error",id:b.v4()}])}t(!1),e(!1),r(""),a("")},h=()=>{c(!1),setTimeout(()=>{e(!1)},300)};return s.jsxs("div",{onClick:f=>f.stopPropagation(),className:fe.modalContainer,children:[s.jsxs("div",{className:fe.header,children:[s.jsx("div",{id:"h3",children:"Create an affiliate code"}),s.jsx(w.Icon,{name:"X",onClick:h,hoverable:!0,fill:"var(--text-primary)"})]}),s.jsxs("div",{className:fe.contentModal,children:[s.jsx(w.Input,{value:n,onChange:f=>r(f),placeholder:"Enter code here (e.g., Join)",label:"Affiliate Code"}),u&&s.jsx("div",{className:fe.error,children:u}),s.jsxs("div",{className:fe.infoBlock,children:[s.jsx("div",{className:fe.infoIcon,children:s.jsx(w.Icon,{name:"Info"})}),s.jsx("div",{className:fe.infoText,children:"Once you join our referral program, you'll gain access to special deals, rewards, and potentially earn a percentage (%) of revenue."})]}),s.jsxs("div",{className:fe.actions,children:[s.jsx(w.Button,{type:"Secondary",className:fe.cancelButton,onClick:h,children:"Cancel"}),s.jsx(w.Button,{type:"Primary",onClick:l,children:"Create"})]})]})]})},Nu=()=>s.jsx("div",{style:{display:"flex",alignItems:"center",width:"100%"},children:s.jsxs("svg",{width:"100%",height:"64",viewBox:"0 0 208 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsxs("g",{clipPath:"url(#clip0_2098_5511)",children:[s.jsx("mask",{id:"path-1-inside-1_2098_5511",fill:"white",children:s.jsx("path",{d:"M0 0H208V16H0V0Z"})}),s.jsx("path",{d:"M208 16.5C208.276 16.5 208.5 16.2761 208.5 16C208.5 15.7239 208.276 15.5 208 15.5V16.5ZM0 15.5C-0.276142 15.5 -0.5 15.7239 -0.5 16C-0.5 16.2761 -0.276142 16.5 0 16.5V15.5ZM4 16.5C4.27614 16.5 4.5 16.2761 4.5 16C4.5 15.7239 4.27614 15.5 4 15.5V16.5ZM12 15.5C11.7239 15.5 11.5 15.7239 11.5 16C11.5 16.2761 11.7239 16.5 12 16.5V15.5ZM20 16.5C20.2761 16.5 20.5 16.2761 20.5 16C20.5 15.7239 20.2761 15.5 20 15.5V16.5ZM28 15.5C27.7239 15.5 27.5 15.7239 27.5 16C27.5 16.2761 27.7239 16.5 28 16.5V15.5ZM36 16.5C36.2761 16.5 36.5 16.2761 36.5 16C36.5 15.7239 36.2761 15.5 36 15.5V16.5ZM44 15.5C43.7239 15.5 43.5 15.7239 43.5 16C43.5 16.2761 43.7239 16.5 44 16.5V15.5ZM52 16.5C52.2761 16.5 52.5 16.2761 52.5 16C52.5 15.7239 52.2761 15.5 52 15.5V16.5ZM60 15.5C59.7239 15.5 59.5 15.7239 59.5 16C59.5 16.2761 59.7239 16.5 60 16.5V15.5ZM68 16.5C68.2761 16.5 68.5 16.2761 68.5 16C68.5 15.7239 68.2761 15.5 68 15.5V16.5ZM76 15.5C75.7239 15.5 75.5 15.7239 75.5 16C75.5 16.2761 75.7239 16.5 76 16.5V15.5ZM84 16.5C84.2761 16.5 84.5 16.2761 84.5 16C84.5 15.7239 84.2761 15.5 84 15.5V16.5ZM92 15.5C91.7239 15.5 91.5 15.7239 91.5 16C91.5 16.2761 91.7239 16.5 92 16.5V15.5ZM100 16.5C100.276 16.5 100.5 16.2761 100.5 16C100.5 15.7239 100.276 15.5 100 15.5V16.5ZM108 15.5C107.724 15.5 107.5 15.7239 107.5 16C107.5 16.2761 107.724 16.5 108 16.5V15.5ZM116 16.5C116.276 16.5 116.5 16.2761 116.5 16C116.5 15.7239 116.276 15.5 116 15.5V16.5ZM124 15.5C123.724 15.5 123.5 15.7239 123.5 16C123.5 16.2761 123.724 16.5 124 16.5V15.5ZM132 16.5C132.276 16.5 132.5 16.2761 132.5 16C132.5 15.7239 132.276 15.5 132 15.5V16.5ZM140 15.5C139.724 15.5 139.5 15.7239 139.5 16C139.5 16.2761 139.724 16.5 140 16.5V15.5ZM148 16.5C148.276 16.5 148.5 16.2761 148.5 16C148.5 15.7239 148.276 15.5 148 15.5V16.5ZM156 15.5C155.724 15.5 155.5 15.7239 155.5 16C155.5 16.2761 155.724 16.5 156 16.5V15.5ZM164 16.5C164.276 16.5 164.5 16.2761 164.5 16C164.5 15.7239 164.276 15.5 164 15.5V16.5ZM172 15.5C171.724 15.5 171.5 15.7239 171.5 16C171.5 16.2761 171.724 16.5 172 16.5V15.5ZM180 16.5C180.276 16.5 180.5 16.2761 180.5 16C180.5 15.7239 180.276 15.5 180 15.5V16.5ZM188 15.5C187.724 15.5 187.5 15.7239 187.5 16C187.5 16.2761 187.724 16.5 188 16.5V15.5ZM196 16.5C196.276 16.5 196.5 16.2761 196.5 16C196.5 15.7239 196.276 15.5 196 15.5V16.5ZM204 15.5C203.724 15.5 203.5 15.7239 203.5 16C203.5 16.2761 203.724 16.5 204 16.5V15.5ZM0 16.5H4V15.5H0V16.5ZM12 16.5H20V15.5H12V16.5ZM28 16.5H36V15.5H28V16.5ZM44 16.5H52V15.5H44V16.5ZM60 16.5H68V15.5H60V16.5ZM76 16.5H84V15.5H76V16.5ZM92 16.5H100V15.5H92V16.5ZM108 16.5H116V15.5H108V16.5ZM124 16.5H132V15.5H124V16.5ZM140 16.5H148V15.5H140V16.5ZM156 16.5H164V15.5H156V16.5ZM172 16.5H180V15.5H172V16.5ZM188 16.5H196V15.5H188V16.5ZM204 16.5H208V15.5H204V16.5ZM208 17C208.552 17 209 16.5523 209 16C209 15.4477 208.552 15 208 15V17ZM0 15C-0.552285 15 -1 15.4477 -1 16C-1 16.5523 -0.552285 17 0 17V15ZM4 17C4.55228 17 5 16.5523 5 16C5 15.4477 4.55228 15 4 15V17ZM12 15C11.4477 15 11 15.4477 11 16C11 16.5523 11.4477 17 12 17V15ZM20 17C20.5523 17 21 16.5523 21 16C21 15.4477 20.5523 15 20 15V17ZM28 15C27.4477 15 27 15.4477 27 16C27 16.5523 27.4477 17 28 17V15ZM36 17C36.5523 17 37 16.5523 37 16C37 15.4477 36.5523 15 36 15V17ZM44 15C43.4477 15 43 15.4477 43 16C43 16.5523 43.4477 17 44 17V15ZM52 17C52.5523 17 53 16.5523 53 16C53 15.4477 52.5523 15 52 15V17ZM60 15C59.4477 15 59 15.4477 59 16C59 16.5523 59.4477 17 60 17V15ZM68 17C68.5523 17 69 16.5523 69 16C69 15.4477 68.5523 15 68 15V17ZM76 15C75.4477 15 75 15.4477 75 16C75 16.5523 75.4477 17 76 17V15ZM84 17C84.5523 17 85 16.5523 85 16C85 15.4477 84.5523 15 84 15V17ZM92 15C91.4477 15 91 15.4477 91 16C91 16.5523 91.4477 17 92 17V15ZM100 17C100.552 17 101 16.5523 101 16C101 15.4477 100.552 15 100 15V17ZM108 15C107.448 15 107 15.4477 107 16C107 16.5523 107.448 17 108 17V15ZM116 17C116.552 17 117 16.5523 117 16C117 15.4477 116.552 15 116 15V17ZM124 15C123.448 15 123 15.4477 123 16C123 16.5523 123.448 17 124 17V15ZM132 17C132.552 17 133 16.5523 133 16C133 15.4477 132.552 15 132 15V17ZM140 15C139.448 15 139 15.4477 139 16C139 16.5523 139.448 17 140 17V15ZM148 17C148.552 17 149 16.5523 149 16C149 15.4477 148.552 15 148 15V17ZM156 15C155.448 15 155 15.4477 155 16C155 16.5523 155.448 17 156 17V15ZM164 17C164.552 17 165 16.5523 165 16C165 15.4477 164.552 15 164 15V17ZM172 15C171.448 15 171 15.4477 171 16C171 16.5523 171.448 17 172 17V15ZM180 17C180.552 17 181 16.5523 181 16C181 15.4477 180.552 15 180 15V17ZM188 15C187.448 15 187 15.4477 187 16C187 16.5523 187.448 17 188 17V15ZM196 17C196.552 17 197 16.5523 197 16C197 15.4477 196.552 15 196 15V17ZM204 15C203.448 15 203 15.4477 203 16C203 16.5523 203.448 17 204 17V15ZM0 17H4V15H0V17ZM12 17H20V15H12V17ZM28 17H36V15H28V17ZM44 17H52V15H44V17ZM60 17H68V15H60V17ZM76 17H84V15H76V17ZM92 17H100V15H92V17ZM108 17H116V15H108V17ZM124 17H132V15H124V17ZM140 17H148V15H140V17ZM156 17H164V15H156V17ZM172 17H180V15H172V17ZM188 17H196V15H188V17ZM204 17H208V15H204V17Z",fill:"#F8F8F8",mask:"url(#path-1-inside-1_2098_5511)"}),s.jsx("mask",{id:"path-3-inside-2_2098_5511",fill:"white",children:s.jsx("path",{d:"M0 16H208V32H0V16Z"})}),s.jsx("path",{d:"M208 32.5C208.276 32.5 208.5 32.2761 208.5 32C208.5 31.7239 208.276 31.5 208 31.5V32.5ZM0 31.5C-0.276142 31.5 -0.5 31.7239 -0.5 32C-0.5 32.2761 -0.276142 32.5 0 32.5V31.5ZM4 32.5C4.27614 32.5 4.5 32.2761 4.5 32C4.5 31.7239 4.27614 31.5 4 31.5V32.5ZM12 31.5C11.7239 31.5 11.5 31.7239 11.5 32C11.5 32.2761 11.7239 32.5 12 32.5V31.5ZM20 32.5C20.2761 32.5 20.5 32.2761 20.5 32C20.5 31.7239 20.2761 31.5 20 31.5V32.5ZM28 31.5C27.7239 31.5 27.5 31.7239 27.5 32C27.5 32.2761 27.7239 32.5 28 32.5V31.5ZM36 32.5C36.2761 32.5 36.5 32.2761 36.5 32C36.5 31.7239 36.2761 31.5 36 31.5V32.5ZM44 31.5C43.7239 31.5 43.5 31.7239 43.5 32C43.5 32.2761 43.7239 32.5 44 32.5V31.5ZM52 32.5C52.2761 32.5 52.5 32.2761 52.5 32C52.5 31.7239 52.2761 31.5 52 31.5V32.5ZM60 31.5C59.7239 31.5 59.5 31.7239 59.5 32C59.5 32.2761 59.7239 32.5 60 32.5V31.5ZM68 32.5C68.2761 32.5 68.5 32.2761 68.5 32C68.5 31.7239 68.2761 31.5 68 31.5V32.5ZM76 31.5C75.7239 31.5 75.5 31.7239 75.5 32C75.5 32.2761 75.7239 32.5 76 32.5V31.5ZM84 32.5C84.2761 32.5 84.5 32.2761 84.5 32C84.5 31.7239 84.2761 31.5 84 31.5V32.5ZM92 31.5C91.7239 31.5 91.5 31.7239 91.5 32C91.5 32.2761 91.7239 32.5 92 32.5V31.5ZM100 32.5C100.276 32.5 100.5 32.2761 100.5 32C100.5 31.7239 100.276 31.5 100 31.5V32.5ZM108 31.5C107.724 31.5 107.5 31.7239 107.5 32C107.5 32.2761 107.724 32.5 108 32.5V31.5ZM116 32.5C116.276 32.5 116.5 32.2761 116.5 32C116.5 31.7239 116.276 31.5 116 31.5V32.5ZM124 31.5C123.724 31.5 123.5 31.7239 123.5 32C123.5 32.2761 123.724 32.5 124 32.5V31.5ZM132 32.5C132.276 32.5 132.5 32.2761 132.5 32C132.5 31.7239 132.276 31.5 132 31.5V32.5ZM140 31.5C139.724 31.5 139.5 31.7239 139.5 32C139.5 32.2761 139.724 32.5 140 32.5V31.5ZM148 32.5C148.276 32.5 148.5 32.2761 148.5 32C148.5 31.7239 148.276 31.5 148 31.5V32.5ZM156 31.5C155.724 31.5 155.5 31.7239 155.5 32C155.5 32.2761 155.724 32.5 156 32.5V31.5ZM164 32.5C164.276 32.5 164.5 32.2761 164.5 32C164.5 31.7239 164.276 31.5 164 31.5V32.5ZM172 31.5C171.724 31.5 171.5 31.7239 171.5 32C171.5 32.2761 171.724 32.5 172 32.5V31.5ZM180 32.5C180.276 32.5 180.5 32.2761 180.5 32C180.5 31.7239 180.276 31.5 180 31.5V32.5ZM188 31.5C187.724 31.5 187.5 31.7239 187.5 32C187.5 32.2761 187.724 32.5 188 32.5V31.5ZM196 32.5C196.276 32.5 196.5 32.2761 196.5 32C196.5 31.7239 196.276 31.5 196 31.5V32.5ZM204 31.5C203.724 31.5 203.5 31.7239 203.5 32C203.5 32.2761 203.724 32.5 204 32.5V31.5ZM0 32.5H4V31.5H0V32.5ZM12 32.5H20V31.5H12V32.5ZM28 32.5H36V31.5H28V32.5ZM44 32.5H52V31.5H44V32.5ZM60 32.5H68V31.5H60V32.5ZM76 32.5H84V31.5H76V32.5ZM92 32.5H100V31.5H92V32.5ZM108 32.5H116V31.5H108V32.5ZM124 32.5H132V31.5H124V32.5ZM140 32.5H148V31.5H140V32.5ZM156 32.5H164V31.5H156V32.5ZM172 32.5H180V31.5H172V32.5ZM188 32.5H196V31.5H188V32.5ZM204 32.5H208V31.5H204V32.5ZM208 33C208.552 33 209 32.5523 209 32C209 31.4477 208.552 31 208 31V33ZM0 31C-0.552285 31 -1 31.4477 -1 32C-1 32.5523 -0.552285 33 0 33V31ZM4 33C4.55228 33 5 32.5523 5 32C5 31.4477 4.55228 31 4 31V33ZM12 31C11.4477 31 11 31.4477 11 32C11 32.5523 11.4477 33 12 33V31ZM20 33C20.5523 33 21 32.5523 21 32C21 31.4477 20.5523 31 20 31V33ZM28 31C27.4477 31 27 31.4477 27 32C27 32.5523 27.4477 33 28 33V31ZM36 33C36.5523 33 37 32.5523 37 32C37 31.4477 36.5523 31 36 31V33ZM44 31C43.4477 31 43 31.4477 43 32C43 32.5523 43.4477 33 44 33V31ZM52 33C52.5523 33 53 32.5523 53 32C53 31.4477 52.5523 31 52 31V33ZM60 31C59.4477 31 59 31.4477 59 32C59 32.5523 59.4477 33 60 33V31ZM68 33C68.5523 33 69 32.5523 69 32C69 31.4477 68.5523 31 68 31V33ZM76 31C75.4477 31 75 31.4477 75 32C75 32.5523 75.4477 33 76 33V31ZM84 33C84.5523 33 85 32.5523 85 32C85 31.4477 84.5523 31 84 31V33ZM92 31C91.4477 31 91 31.4477 91 32C91 32.5523 91.4477 33 92 33V31ZM100 33C100.552 33 101 32.5523 101 32C101 31.4477 100.552 31 100 31V33ZM108 31C107.448 31 107 31.4477 107 32C107 32.5523 107.448 33 108 33V31ZM116 33C116.552 33 117 32.5523 117 32C117 31.4477 116.552 31 116 31V33ZM124 31C123.448 31 123 31.4477 123 32C123 32.5523 123.448 33 124 33V31ZM132 33C132.552 33 133 32.5523 133 32C133 31.4477 132.552 31 132 31V33ZM140 31C139.448 31 139 31.4477 139 32C139 32.5523 139.448 33 140 33V31ZM148 33C148.552 33 149 32.5523 149 32C149 31.4477 148.552 31 148 31V33ZM156 31C155.448 31 155 31.4477 155 32C155 32.5523 155.448 33 156 33V31ZM164 33C164.552 33 165 32.5523 165 32C165 31.4477 164.552 31 164 31V33ZM172 31C171.448 31 171 31.4477 171 32C171 32.5523 171.448 33 172 33V31ZM180 33C180.552 33 181 32.5523 181 32C181 31.4477 180.552 31 180 31V33ZM188 31C187.448 31 187 31.4477 187 32C187 32.5523 187.448 33 188 33V31ZM196 33C196.552 33 197 32.5523 197 32C197 31.4477 196.552 31 196 31V33ZM204 31C203.448 31 203 31.4477 203 32C203 32.5523 203.448 33 204 33V31ZM0 33H4V31H0V33ZM12 33H20V31H12V33ZM28 33H36V31H28V33ZM44 33H52V31H44V33ZM60 33H68V31H60V33ZM76 33H84V31H76V33ZM92 33H100V31H92V33ZM108 33H116V31H108V33ZM124 33H132V31H124V33ZM140 33H148V31H140V33ZM156 33H164V31H156V33ZM172 33H180V31H172V33ZM188 33H196V31H188V33ZM204 33H208V31H204V33Z",fill:"#F8F8F8",mask:"url(#path-3-inside-2_2098_5511)"}),s.jsx("mask",{id:"path-5-inside-3_2098_5511",fill:"white",children:s.jsx("path",{d:"M0 32H208V48H0V32Z"})}),s.jsx("path",{d:"M208 48.5C208.276 48.5 208.5 48.2761 208.5 48C208.5 47.7239 208.276 47.5 208 47.5V48.5ZM0 47.5C-0.276142 47.5 -0.5 47.7239 -0.5 48C-0.5 48.2761 -0.276142 48.5 0 48.5V47.5ZM4 48.5C4.27614 48.5 4.5 48.2761 4.5 48C4.5 47.7239 4.27614 47.5 4 47.5V48.5ZM12 47.5C11.7239 47.5 11.5 47.7239 11.5 48C11.5 48.2761 11.7239 48.5 12 48.5V47.5ZM20 48.5C20.2761 48.5 20.5 48.2761 20.5 48C20.5 47.7239 20.2761 47.5 20 47.5V48.5ZM28 47.5C27.7239 47.5 27.5 47.7239 27.5 48C27.5 48.2761 27.7239 48.5 28 48.5V47.5ZM36 48.5C36.2761 48.5 36.5 48.2761 36.5 48C36.5 47.7239 36.2761 47.5 36 47.5V48.5ZM44 47.5C43.7239 47.5 43.5 47.7239 43.5 48C43.5 48.2761 43.7239 48.5 44 48.5V47.5ZM52 48.5C52.2761 48.5 52.5 48.2761 52.5 48C52.5 47.7239 52.2761 47.5 52 47.5V48.5ZM60 47.5C59.7239 47.5 59.5 47.7239 59.5 48C59.5 48.2761 59.7239 48.5 60 48.5V47.5ZM68 48.5C68.2761 48.5 68.5 48.2761 68.5 48C68.5 47.7239 68.2761 47.5 68 47.5V48.5ZM76 47.5C75.7239 47.5 75.5 47.7239 75.5 48C75.5 48.2761 75.7239 48.5 76 48.5V47.5ZM84 48.5C84.2761 48.5 84.5 48.2761 84.5 48C84.5 47.7239 84.2761 47.5 84 47.5V48.5ZM92 47.5C91.7239 47.5 91.5 47.7239 91.5 48C91.5 48.2761 91.7239 48.5 92 48.5V47.5ZM100 48.5C100.276 48.5 100.5 48.2761 100.5 48C100.5 47.7239 100.276 47.5 100 47.5V48.5ZM108 47.5C107.724 47.5 107.5 47.7239 107.5 48C107.5 48.2761 107.724 48.5 108 48.5V47.5ZM116 48.5C116.276 48.5 116.5 48.2761 116.5 48C116.5 47.7239 116.276 47.5 116 47.5V48.5ZM124 47.5C123.724 47.5 123.5 47.7239 123.5 48C123.5 48.2761 123.724 48.5 124 48.5V47.5ZM132 48.5C132.276 48.5 132.5 48.2761 132.5 48C132.5 47.7239 132.276 47.5 132 47.5V48.5ZM140 47.5C139.724 47.5 139.5 47.7239 139.5 48C139.5 48.2761 139.724 48.5 140 48.5V47.5ZM148 48.5C148.276 48.5 148.5 48.2761 148.5 48C148.5 47.7239 148.276 47.5 148 47.5V48.5ZM156 47.5C155.724 47.5 155.5 47.7239 155.5 48C155.5 48.2761 155.724 48.5 156 48.5V47.5ZM164 48.5C164.276 48.5 164.5 48.2761 164.5 48C164.5 47.7239 164.276 47.5 164 47.5V48.5ZM172 47.5C171.724 47.5 171.5 47.7239 171.5 48C171.5 48.2761 171.724 48.5 172 48.5V47.5ZM180 48.5C180.276 48.5 180.5 48.2761 180.5 48C180.5 47.7239 180.276 47.5 180 47.5V48.5ZM188 47.5C187.724 47.5 187.5 47.7239 187.5 48C187.5 48.2761 187.724 48.5 188 48.5V47.5ZM196 48.5C196.276 48.5 196.5 48.2761 196.5 48C196.5 47.7239 196.276 47.5 196 47.5V48.5ZM204 47.5C203.724 47.5 203.5 47.7239 203.5 48C203.5 48.2761 203.724 48.5 204 48.5V47.5ZM0 48.5H4V47.5H0V48.5ZM12 48.5H20V47.5H12V48.5ZM28 48.5H36V47.5H28V48.5ZM44 48.5H52V47.5H44V48.5ZM60 48.5H68V47.5H60V48.5ZM76 48.5H84V47.5H76V48.5ZM92 48.5H100V47.5H92V48.5ZM108 48.5H116V47.5H108V48.5ZM124 48.5H132V47.5H124V48.5ZM140 48.5H148V47.5H140V48.5ZM156 48.5H164V47.5H156V48.5ZM172 48.5H180V47.5H172V48.5ZM188 48.5H196V47.5H188V48.5ZM204 48.5H208V47.5H204V48.5ZM208 49C208.552 49 209 48.5523 209 48C209 47.4477 208.552 47 208 47V49ZM0 47C-0.552285 47 -1 47.4477 -1 48C-1 48.5523 -0.552285 49 0 49V47ZM4 49C4.55228 49 5 48.5523 5 48C5 47.4477 4.55228 47 4 47V49ZM12 47C11.4477 47 11 47.4477 11 48C11 48.5523 11.4477 49 12 49V47ZM20 49C20.5523 49 21 48.5523 21 48C21 47.4477 20.5523 47 20 47V49ZM28 47C27.4477 47 27 47.4477 27 48C27 48.5523 27.4477 49 28 49V47ZM36 49C36.5523 49 37 48.5523 37 48C37 47.4477 36.5523 47 36 47V49ZM44 47C43.4477 47 43 47.4477 43 48C43 48.5523 43.4477 49 44 49V47ZM52 49C52.5523 49 53 48.5523 53 48C53 47.4477 52.5523 47 52 47V49ZM60 47C59.4477 47 59 47.4477 59 48C59 48.5523 59.4477 49 60 49V47ZM68 49C68.5523 49 69 48.5523 69 48C69 47.4477 68.5523 47 68 47V49ZM76 47C75.4477 47 75 47.4477 75 48C75 48.5523 75.4477 49 76 49V47ZM84 49C84.5523 49 85 48.5523 85 48C85 47.4477 84.5523 47 84 47V49ZM92 47C91.4477 47 91 47.4477 91 48C91 48.5523 91.4477 49 92 49V47ZM100 49C100.552 49 101 48.5523 101 48C101 47.4477 100.552 47 100 47V49ZM108 47C107.448 47 107 47.4477 107 48C107 48.5523 107.448 49 108 49V47ZM116 49C116.552 49 117 48.5523 117 48C117 47.4477 116.552 47 116 47V49ZM124 47C123.448 47 123 47.4477 123 48C123 48.5523 123.448 49 124 49V47ZM132 49C132.552 49 133 48.5523 133 48C133 47.4477 132.552 47 132 47V49ZM140 47C139.448 47 139 47.4477 139 48C139 48.5523 139.448 49 140 49V47ZM148 49C148.552 49 149 48.5523 149 48C149 47.4477 148.552 47 148 47V49ZM156 47C155.448 47 155 47.4477 155 48C155 48.5523 155.448 49 156 49V47ZM164 49C164.552 49 165 48.5523 165 48C165 47.4477 164.552 47 164 47V49ZM172 47C171.448 47 171 47.4477 171 48C171 48.5523 171.448 49 172 49V47ZM180 49C180.552 49 181 48.5523 181 48C181 47.4477 180.552 47 180 47V49ZM188 47C187.448 47 187 47.4477 187 48C187 48.5523 187.448 49 188 49V47ZM196 49C196.552 49 197 48.5523 197 48C197 47.4477 196.552 47 196 47V49ZM204 47C203.448 47 203 47.4477 203 48C203 48.5523 203.448 49 204 49V47ZM0 49H4V47H0V49ZM12 49H20V47H12V49ZM28 49H36V47H28V49ZM44 49H52V47H44V49ZM60 49H68V47H60V49ZM76 49H84V47H76V49ZM92 49H100V47H92V49ZM108 49H116V47H108V49ZM124 49H132V47H124V49ZM140 49H148V47H140V49ZM156 49H164V47H156V49ZM172 49H180V47H172V49ZM188 49H196V47H188V49ZM204 49H208V47H204V49Z",fill:"#F8F8F8",mask:"url(#path-5-inside-3_2098_5511)"}),s.jsx("mask",{id:"path-7-inside-4_2098_5511",fill:"white",children:s.jsx("path",{d:"M0 48H208V64H0V48Z"})}),s.jsx("path",{d:"M208 64.5C208.276 64.5 208.5 64.2761 208.5 64C208.5 63.7239 208.276 63.5 208 63.5V64.5ZM0 63.5C-0.276142 63.5 -0.5 63.7239 -0.5 64C-0.5 64.2761 -0.276142 64.5 0 64.5V63.5ZM4 64.5C4.27614 64.5 4.5 64.2761 4.5 64C4.5 63.7239 4.27614 63.5 4 63.5V64.5ZM12 63.5C11.7239 63.5 11.5 63.7239 11.5 64C11.5 64.2761 11.7239 64.5 12 64.5V63.5ZM20 64.5C20.2761 64.5 20.5 64.2761 20.5 64C20.5 63.7239 20.2761 63.5 20 63.5V64.5ZM28 63.5C27.7239 63.5 27.5 63.7239 27.5 64C27.5 64.2761 27.7239 64.5 28 64.5V63.5ZM36 64.5C36.2761 64.5 36.5 64.2761 36.5 64C36.5 63.7239 36.2761 63.5 36 63.5V64.5ZM44 63.5C43.7239 63.5 43.5 63.7239 43.5 64C43.5 64.2761 43.7239 64.5 44 64.5V63.5ZM52 64.5C52.2761 64.5 52.5 64.2761 52.5 64C52.5 63.7239 52.2761 63.5 52 63.5V64.5ZM60 63.5C59.7239 63.5 59.5 63.7239 59.5 64C59.5 64.2761 59.7239 64.5 60 64.5V63.5ZM68 64.5C68.2761 64.5 68.5 64.2761 68.5 64C68.5 63.7239 68.2761 63.5 68 63.5V64.5ZM76 63.5C75.7239 63.5 75.5 63.7239 75.5 64C75.5 64.2761 75.7239 64.5 76 64.5V63.5ZM84 64.5C84.2761 64.5 84.5 64.2761 84.5 64C84.5 63.7239 84.2761 63.5 84 63.5V64.5ZM92 63.5C91.7239 63.5 91.5 63.7239 91.5 64C91.5 64.2761 91.7239 64.5 92 64.5V63.5ZM100 64.5C100.276 64.5 100.5 64.2761 100.5 64C100.5 63.7239 100.276 63.5 100 63.5V64.5ZM108 63.5C107.724 63.5 107.5 63.7239 107.5 64C107.5 64.2761 107.724 64.5 108 64.5V63.5ZM116 64.5C116.276 64.5 116.5 64.2761 116.5 64C116.5 63.7239 116.276 63.5 116 63.5V64.5ZM124 63.5C123.724 63.5 123.5 63.7239 123.5 64C123.5 64.2761 123.724 64.5 124 64.5V63.5ZM132 64.5C132.276 64.5 132.5 64.2761 132.5 64C132.5 63.7239 132.276 63.5 132 63.5V64.5ZM140 63.5C139.724 63.5 139.5 63.7239 139.5 64C139.5 64.2761 139.724 64.5 140 64.5V63.5ZM148 64.5C148.276 64.5 148.5 64.2761 148.5 64C148.5 63.7239 148.276 63.5 148 63.5V64.5ZM156 63.5C155.724 63.5 155.5 63.7239 155.5 64C155.5 64.2761 155.724 64.5 156 64.5V63.5ZM164 64.5C164.276 64.5 164.5 64.2761 164.5 64C164.5 63.7239 164.276 63.5 164 63.5V64.5ZM172 63.5C171.724 63.5 171.5 63.7239 171.5 64C171.5 64.2761 171.724 64.5 172 64.5V63.5ZM180 64.5C180.276 64.5 180.5 64.2761 180.5 64C180.5 63.7239 180.276 63.5 180 63.5V64.5ZM188 63.5C187.724 63.5 187.5 63.7239 187.5 64C187.5 64.2761 187.724 64.5 188 64.5V63.5ZM196 64.5C196.276 64.5 196.5 64.2761 196.5 64C196.5 63.7239 196.276 63.5 196 63.5V64.5ZM204 63.5C203.724 63.5 203.5 63.7239 203.5 64C203.5 64.2761 203.724 64.5 204 64.5V63.5ZM0 64.5H4V63.5H0V64.5ZM12 64.5H20V63.5H12V64.5ZM28 64.5H36V63.5H28V64.5ZM44 64.5H52V63.5H44V64.5ZM60 64.5H68V63.5H60V64.5ZM76 64.5H84V63.5H76V64.5ZM92 64.5H100V63.5H92V64.5ZM108 64.5H116V63.5H108V64.5ZM124 64.5H132V63.5H124V64.5ZM140 64.5H148V63.5H140V64.5ZM156 64.5H164V63.5H156V64.5ZM172 64.5H180V63.5H172V64.5ZM188 64.5H196V63.5H188V64.5ZM204 64.5H208V63.5H204V64.5ZM208 65C208.552 65 209 64.5523 209 64C209 63.4477 208.552 63 208 63V65ZM0 63C-0.552285 63 -1 63.4477 -1 64C-1 64.5523 -0.552285 65 0 65V63ZM4 65C4.55228 65 5 64.5523 5 64C5 63.4477 4.55228 63 4 63V65ZM12 63C11.4477 63 11 63.4477 11 64C11 64.5523 11.4477 65 12 65V63ZM20 65C20.5523 65 21 64.5523 21 64C21 63.4477 20.5523 63 20 63V65ZM28 63C27.4477 63 27 63.4477 27 64C27 64.5523 27.4477 65 28 65V63ZM36 65C36.5523 65 37 64.5523 37 64C37 63.4477 36.5523 63 36 63V65ZM44 63C43.4477 63 43 63.4477 43 64C43 64.5523 43.4477 65 44 65V63ZM52 65C52.5523 65 53 64.5523 53 64C53 63.4477 52.5523 63 52 63V65ZM60 63C59.4477 63 59 63.4477 59 64C59 64.5523 59.4477 65 60 65V63ZM68 65C68.5523 65 69 64.5523 69 64C69 63.4477 68.5523 63 68 63V65ZM76 63C75.4477 63 75 63.4477 75 64C75 64.5523 75.4477 65 76 65V63ZM84 65C84.5523 65 85 64.5523 85 64C85 63.4477 84.5523 63 84 63V65ZM92 63C91.4477 63 91 63.4477 91 64C91 64.5523 91.4477 65 92 65V63ZM100 65C100.552 65 101 64.5523 101 64C101 63.4477 100.552 63 100 63V65ZM108 63C107.448 63 107 63.4477 107 64C107 64.5523 107.448 65 108 65V63ZM116 65C116.552 65 117 64.5523 117 64C117 63.4477 116.552 63 116 63V65ZM124 63C123.448 63 123 63.4477 123 64C123 64.5523 123.448 65 124 65V63ZM132 65C132.552 65 133 64.5523 133 64C133 63.4477 132.552 63 132 63V65ZM140 63C139.448 63 139 63.4477 139 64C139 64.5523 139.448 65 140 65V63ZM148 65C148.552 65 149 64.5523 149 64C149 63.4477 148.552 63 148 63V65ZM156 63C155.448 63 155 63.4477 155 64C155 64.5523 155.448 65 156 65V63ZM164 65C164.552 65 165 64.5523 165 64C165 63.4477 164.552 63 164 63V65ZM172 63C171.448 63 171 63.4477 171 64C171 64.5523 171.448 65 172 65V63ZM180 65C180.552 65 181 64.5523 181 64C181 63.4477 180.552 63 180 63V65ZM188 63C187.448 63 187 63.4477 187 64C187 64.5523 187.448 65 188 65V63ZM196 65C196.552 65 197 64.5523 197 64C197 63.4477 196.552 63 196 63V65ZM204 63C203.448 63 203 63.4477 203 64C203 64.5523 203.448 65 204 65V63ZM0 65H4V63H0V65ZM12 65H20V63H12V65ZM28 65H36V63H28V65ZM44 65H52V63H44V65ZM60 65H68V63H60V65ZM76 65H84V63H76V65ZM92 65H100V63H92V65ZM108 65H116V63H108V65ZM124 65H132V63H124V65ZM140 65H148V63H140V65ZM156 65H164V63H156V65ZM172 65H180V63H172V65ZM188 65H196V63H188V65ZM204 65H208V63H204V65Z",fill:"#F8F8F8",mask:"url(#path-7-inside-4_2098_5511)"}),s.jsx("path",{opacity:"0.25",d:"M188.216 21.8308L192.267 33.3363C192.984 35.3729 195.553 36.0079 197.136 34.5401L200.346 31.5644C200.704 31.2324 200.976 30.8179 201.137 30.357L202.893 25.3492L207.891 8.63898C207.962 8.40249 207.998 8.15696 207.998 7.91011V61C207.998 62.6569 206.655 64 204.998 64H2.99805C1.34119 64 -0.00195312 62.6569 -0.00195312 61V38.199C-0.00195312 37.5477 0.209976 36.9142 0.601822 36.394L4.07924 31.7775C5.46086 29.9434 8.30679 30.2781 9.22513 32.3828L13.7407 42.7321C14.1196 43.6005 14.8865 44.2389 15.8092 44.454L20.4905 45.5454C21.1539 45.7 21.8501 45.6244 22.4647 45.3308L27.6593 42.8495C28.3218 42.533 28.8452 41.9846 29.1305 41.3081L33.0958 31.9045C34.1272 29.4587 37.593 29.4587 38.6244 31.9045L39.704 34.4648C40.8065 37.0793 44.5863 36.8438 45.3559 34.1128L49.5889 19.0897C49.9533 17.7966 51.133 16.9033 52.4765 16.9033H56.4941C57.0707 16.9033 57.6351 16.7372 58.1197 16.4247L61.1576 14.466C62.8476 13.3764 65.11 14.2251 65.6662 16.1575L70.599 33.2936C71.1572 35.2328 73.4323 36.079 75.122 34.9758L75.9273 34.45C77.4802 33.4361 79.5719 34.0601 80.3156 35.7591L84.8676 46.1586C85.5306 47.6733 87.2942 48.366 88.8108 47.7074L91.9453 46.3462C92.765 45.9903 93.3833 45.2875 93.632 44.4292L99.0729 25.6458C99.6874 23.5244 102.321 22.7938 103.941 24.2955C105.587 25.8222 108.267 25.0377 108.831 22.864L112.541 8.54954C113.26 5.77543 117.087 5.49227 118.207 8.13037L120.305 13.0767C121.105 14.9603 123.513 15.5086 125.049 14.1567L125.58 13.6896C127.224 12.2425 129.814 12.9875 130.438 15.0869L134.329 28.1818C135.073 30.6853 138.439 31.1086 139.779 28.8673L142.671 24.0333C143.159 23.2175 144.004 22.6813 144.95 22.5878L149.822 22.1065C150.344 22.0549 150.843 21.8672 151.271 21.5621L154.984 18.9089C156.467 17.8494 158.544 18.346 159.388 19.9617L161.285 23.5972C162.565 26.0491 166.199 25.6102 166.858 22.9241L169.511 12.1165C170.239 9.14844 174.421 9.04274 175.298 11.9702L177.723 20.0592C178.406 22.3382 181.343 22.9532 182.883 21.1398L183.099 20.8852C184.598 19.1202 187.447 19.6467 188.216 21.8308Z",fill:"url(#paint0_linear_2098_5511)"}),s.jsx("path",{d:"M207.998 8.42336L201.106 31.2146C200.924 31.8169 200.557 32.3467 200.057 32.729L196.94 35.1136C195.319 36.3534 192.96 35.6482 192.286 33.7223L188.181 22.0024C187.422 19.8338 184.606 19.289 183.092 21.0179L182.846 21.2991C181.3 23.0654 178.416 22.4516 177.723 20.2087L175.29 12.336C174.395 9.4396 170.259 9.54691 169.515 12.4858L166.857 22.9946C166.185 25.6477 162.603 26.0903 161.306 23.6803L159.382 20.1042C158.534 18.5278 156.503 18.0404 155.031 19.0601L151.262 21.6725C150.84 21.9649 150.35 22.1442 149.839 22.1931L144.931 22.6636C143.996 22.7532 143.157 23.2757 142.664 24.0754L139.754 28.7942C138.4 30.9907 135.088 30.5657 134.332 28.0982L130.441 15.3948C129.808 13.3298 127.267 12.5895 125.624 13.9921L125.005 14.5209C123.474 15.8283 121.115 15.2863 120.308 13.4417L118.191 8.60225C117.054 6.00226 113.277 6.28847 112.544 9.03014L108.848 22.8647C108.27 25.0292 105.606 25.8158 103.94 24.3175V24.3175C102.303 22.8447 99.6856 23.5762 99.0555 25.6864L93.6445 43.8072C93.388 44.6663 92.7608 45.3656 91.9346 45.7136L88.763 47.0496C87.2632 47.6814 85.5332 47.0022 84.8638 45.5188L80.3156 35.4387C79.5653 33.7759 77.517 33.1621 75.9758 34.1381L75.0745 34.709C73.393 35.774 71.1595 34.9362 70.5933 33.028L65.672 16.4433C65.1078 14.5419 62.8867 13.7015 61.2051 14.7533L58.1073 16.6909C57.6303 16.9892 57.079 17.1474 56.5164 17.1474H52.4575C51.123 17.1474 49.9489 18.029 49.5766 19.3106L45.3511 33.8582C44.5676 36.5556 40.8386 36.7934 39.7188 34.2174L38.6114 31.6698C37.5658 29.2644 34.1544 29.2644 33.1088 31.6698L29.1425 40.7941C28.8495 41.4681 28.3193 42.0111 27.6525 42.3201L22.4421 44.7345C21.8411 45.0129 21.165 45.0847 20.519 44.9386L15.803 43.872C14.8836 43.6641 14.1154 43.0362 13.7288 42.1765L9.21662 32.1447C8.28874 30.0817 5.49845 29.7487 4.11113 31.5353L-0.00196201 36.8322",stroke:"#FF3F19"})]}),s.jsxs("defs",{children:[s.jsxs("linearGradient",{id:"paint0_linear_2098_5511",x1:"103.998",y1:"0",x2:"103.998",y2:"64",gradientUnits:"userSpaceOnUse",children:[s.jsx("stop",{stopColor:"#FF3F19"}),s.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]}),s.jsx("clipPath",{id:"clip0_2098_5511",children:s.jsx("rect",{width:"208",height:"64",fill:"white"})})]})]})}),n0=({adaptiveStyles:e})=>{const[t,n]=P.useState(null),[r,u]=P.useState(!1),[a,i]=P.useState(!1),[o,c]=P.useState(!1);if(P.useEffect(()=>{u(!0),i(!0),(async()=>{const p=await v2();n(p)})(),u(!1),i(!1)},[]),!t)return s.jsx(w.Loader,{});const{isAvailable:l,isActivated:h,info:f}=t.data;return l?s.jsxs("div",{children:[s.jsxs("div",{className:b.clx(fe.referral,{[fe.mobile]:e!=="desktop"}),children:[s.jsx("div",{className:b.clx(fe.referralBlock,{[fe.mobile]:e!=="desktop"}),children:r?s.jsx(a0,{adaptiveStyles:e}):s.jsxs("div",{className:fe.referralContainer,children:[s.jsx("div",{id:"h2",className:fe.title,children:"Refer friends"}),s.jsx("div",{className:fe.description,id:"lg",children:"Refer friends. Earn rewards. Make bank."}),h?s.jsx(s.Fragment,{children:s.jsx(u0,{referral:t})}):s.jsx(s.Fragment,{children:s.jsx(r0,{setIsOpen:c})})]})}),a?s.jsx("div",{className:fe.referralStats}):s.jsxs("div",{className:b.clx(fe.referralStats,{[fe.mobile]:e!=="desktop"}),children:[s.jsxs("div",{className:fe.referralStatsItem,children:[s.jsx("div",{id:"lg",className:fe.referralStatsItemLabel,children:"Referrals"}),s.jsx("div",{id:"h2",className:fe.referralStatsItemValue,children:f!=null&&f.totalReferrals?`${f.totalReferrals} person`:"-"}),s.jsx(Nu,{})]}),s.jsxs("div",{className:fe.referralStatsItem,children:[s.jsx("div",{id:"lg",className:fe.referralStatsItemLabel,children:"Earned"}),s.jsx("div",{id:"h2",className:fe.referralStatsItemValue,children:"-"}),s.jsx(Nu,{})]}),s.jsxs("div",{className:fe.referralStatsItem,children:[s.jsx("div",{id:"lg",className:fe.referralStatsItemLabel,children:"Total Revenue"}),s.jsx("div",{id:"h2",className:fe.referralStatsItemValue,children:b.formatPrice({amount:(f==null?void 0:f.totalRevenueUsd)||0})}),s.jsx(Nu,{})]}),s.jsxs("div",{className:fe.referralStatsItem,children:[s.jsx("div",{id:"lg",className:fe.referralStatsItemLabel,children:"Earn Procent"}),s.jsx("div",{id:"h2",className:fe.referralStatsItemValue,children:`${t.data.earnPercent}%`||"-"}),s.jsx(Nu,{})]})]})]}),o&&s.jsx(w.Modal,{close:()=>c(!1),children:s.jsx(am,{setIsOpen:c,setIsLoading:u})})]}):null},r0=({setIsOpen:e})=>{const{setIsOpen:t}=b.useModalStore();return s.jsxs("div",{className:fe.steps,onClick:n=>n.stopPropagation(),children:[s.jsx(w.Button,{type:"Primary",className:fe.joinButton,onClick:()=>{e(!0),t(!0)},children:"Join the referral Program"}),s.jsx("div",{children:b.referralSteps.map(({caption:n,description:r},u,a)=>s.jsx(um,{caption:n,description:r,index:u+1,bar:u+1!==a.length},n))})]})},u0=({referral:e})=>{var a,i;const{shopDomain:t}=b.useStorefrontStore(),n=`https://${t}/?r=${(a=e.data.info)==null?void 0:a.referralCode}`,{notifications:r,setNotifications:u}=b.useNotificationStore();return s.jsxs("div",{className:fe.referralInfo,children:[s.jsx(w.Input,{onChange:()=>{},label:"Affiliate Code",value:((i=e.data.info)==null?void 0:i.referralCode)||"",disabled:!0}),s.jsx("div",{className:fe.linkContainer,children:s.jsx(w.Input,{onChange:()=>{},label:"Affiliate Link",value:n,disabled:!0,rightIcon:s.jsx(w.Icon,{name:"Copy",fill:"var(--text-action)",onClick:()=>{navigator.clipboard.writeText(n),u([...r,{message:"Link copied to clipboard",status:"success",id:b.v4()}])},hoverable:!0})})})]})},a0=({adaptiveStyles:e})=>s.jsxs(er,{speed:2,width:500,height:"100%",viewBox:"0 0 500 305",backgroundColor:"var(--surface-secondary)",foregroundColor:"var(--surface-disabled)",className:b.clx(fe.skeleton,{[fe.mobile]:e!=="desktop"}),style:{borderRadius:"var(--border-radius)"},children:[s.jsx("rect",{x:"0",y:"0",rx:"10",ry:"10",width:"264",height:"40"}),s.jsx("rect",{x:"0",y:"45",rx:"10",ry:"10",width:"160",height:"24"}),s.jsx("rect",{x:"0",y:"100",rx:"10",ry:"10",width:"100",height:"40"}),s.jsx("rect",{x:"0",y:"150",rx:"10",ry:"10",width:"476",height:"40"}),s.jsx("rect",{x:"0",y:"220",rx:"10",ry:"10",width:"428",height:"50"})]}),im="_title_u8oqs_1",sm="_heading_u8oqs_10",om="_description_u8oqs_15",Za={title:im,heading:sm,description:om},fa=({title:e,description:t})=>s.jsxs("div",{className:Za.title,children:[s.jsx("div",{id:"h3",className:Za.heading,children:e}),t&&s.jsx("div",{className:Za.description,id:"lg",children:t})]}),cm="_noItemsBlock_yefnm_4",lm="_noItemsBlockIcon_yefnm_13",dm="_noItemsBlockTitle_yefnm_21",fm="_noItemsBlockDescription_yefnm_31",hm="_centered_yefnm_37",Pr={noItemsBlock:cm,noItemsBlockIcon:lm,noItemsBlockTitle:dm,noItemsBlockDescription:fm,centered:hm},ha=({title:e,description:t,className:n,centered:r=!1})=>s.jsxs("div",{className:b.clx(Pr.noItemsBlock,n,{[Pr.centered]:r}),children:[s.jsx("div",{className:Pr.noItemsBlockIcon,children:s.jsx(w.Icon,{name:"Info",fill:"var(--text-secondary)"})}),s.jsx("div",{className:Pr.noItemsBlockTitle,id:"h4",children:e}),s.jsx("div",{className:Pr.noItemsBlockDescription,id:"md",children:t})]}),pm="_ordersTable_1btyq_2",mm="_gatewayItem_1btyq_10",gm="_gatewayIcon_1btyq_15",bm="_orderTime_1btyq_20",_m="_reviewContainer_1btyq_25",xm="_reviewRating_1btyq_35",Cm="_tableLoader_1btyq_39",Em="_tableItem_1btyq_48",Ot={ordersTable:pm,gatewayItem:mm,gatewayIcon:gm,orderTime:bm,reviewContainer:_m,reviewRating:xm,tableLoader:Cm,tableItem:Em};var Bn=(e=>(e[e.SUCCESS=1]="SUCCESS",e[e.WARNING=2]="WARNING",e[e.ERROR=3]="ERROR",e))(Bn||{});const Tm={[Ce.New]:2,[Ce.Pending]:2,[Ce.Completed]:1,[Ce.Cancelled]:3,[Ce.Expired]:3,[Ce.FullDeliveryFailure]:3,[Ce.PartiallyDelivered]:2,[Ce.Refunded]:2,[Ce.Failed]:3},ym=(e,t)=>{const n=t.find(r=>r.name===e);return n?s.jsxs("div",{className:Ot.gatewayItem,children:[(n==null?void 0:n.name)==="ForebitPayments"?s.jsx(Fl,{}):n.name==="Balance"?s.jsx(w.Icon,{name:"Wallet",fill:"var(--text-primary)",width:20,height:20,style:{marginRight:"0.25rem"}}):s.jsx("img",{alt:n.displayName,src:b.convertCfImageIdToUrl(n.logoCfImageId,"100"),className:Ot.gatewayIcon}),s.jsx("div",{id:"md",children:n.displayName})]}):null},km=({item:e,gatewaysDetail:t})=>{const[n,r]=b.extractDateAndTime(e.time),{isAntistock:u}=b.useGeneralStore();return s.jsxs(P.Fragment,{children:[s.jsx(at,{copyText:e.id,children:s.jsx(b.NavLink,{to:`/orders/${e.id}/${e.accessToken}`,id:"md",children:e.id})}),s.jsx(at,{children:s.jsx(b.NavLink,{to:`/orders/${e.id}/${e.accessToken}`,children:s.jsx(c0,{status:e.status,variant:Tm[e.status]})})}),s.jsx(at,{children:b.formatPrice(e.price)}),s.jsx(at,{children:ym(e.gatewayName,t)}),s.jsx(at,{children:s.jsxs("div",{children:[s.jsx("div",{id:"md",children:n}),s.jsx("div",{className:Ot.orderTime,id:"md",children:r})]})}),!u&&s.jsx(at,{children:e.review?s.jsxs("div",{className:Ot.reviewContainer,children:[s.jsx(w.Icon,{name:"Star",fill:"var(--text-secondary)"}),s.jsx("div",{className:Ot.reviewRating,id:"md",children:e.review.rating})]}):s.jsx("span",{id:"md",children:"None"})})]},e.id)},i0=({orders:e,gatewaysDetail:t,totalCount:n,isLoading:r})=>{const{page:u,setPage:a}=b.usePaginationPagesStore(),{isAntistock:i}=b.useGeneralStore(),c=!(!(e!=null&&e.length)||!t)&&e.length>0;return s.jsxs("div",{className:Ot.ordersTable,children:[s.jsxs(pa,{children:[s.jsx(It,{className:Ot.tableItem,children:"Invoice ID"}),s.jsx(It,{className:Ot.tableItem,children:"Status"}),s.jsx(It,{className:Ot.tableItem,children:"Value"}),s.jsx(It,{className:Ot.tableItem,children:"Payment"}),s.jsx(It,{className:Ot.tableItem,children:"Date"}),!i&&s.jsx(It,{className:Ot.tableItem,children:"Review"}),c&&!r&&e.map(l=>s.jsx(km,{item:l,gatewaysDetail:t},l.id))]}),(!c||r)&&s.jsx("div",{className:Ot.tableLoader,children:s.jsx(w.Loader,{})}),c&&!r&&s.jsx(hu,{currentPage:u,totalCount:n,onPageChange:a})]})},Am="_ticketsTable_1ney1_4",Sm="_antistockTable_1ney1_4",Im="_table_1ney1_4",Nm="_tableItem_1ney1_22",vm="_text_1ney1_47",wm="_tableItemTitle_1ney1_54",hr={ticketsTable:Am,antistockTable:Sm,table:Im,tableItem:Nm,text:vm,tableItemTitle:wm},at=({children:e,className:t,onClick:n,copyText:r,id:u})=>{const a=Jn();return s.jsxs("div",{className:b.clx(hr.tableItem,t),onClick:n,style:{cursor:n?"pointer":"default"},children:[s.jsx("span",{className:hr.text,id:u||"md",children:e})," ",r&&s.jsx("div",{style:{minWidth:"24px"},children:s.jsx(w.Icon,{name:"Copy",hoverable:!0,onClick:()=>a(r),width:24,height:24})})]})},It=({children:e,className:t})=>s.jsx(at,{className:b.clx(hr.tableItemTitle,t),id:"lg",children:e}),pa=({children:e,className:t})=>{const{isAntistock:n}=b.useGeneralStore(),r=t==null?void 0:t.includes("ticketsTable");return s.jsx("div",{className:b.clx(t,r?hr.ticketsTable:n?hr.antistockTable:hr.table),children:e})},Dm="_paginationContainer_pt4l5_4",Lm="_paginationWithRange_pt4l5_16",Pm="_paginationWithRangeText_pt4l5_33",Rm="_paginationWithRangePagination_pt4l5_45",Hu={paginationContainer:Dm,paginationWithRange:Lm,paginationWithRangeText:Pm,paginationWithRangePagination:Rm},vu=(e,t)=>Array.from({length:t-e+1},(n,r)=>e+r),Om=(e,t,n)=>{const r=n*2+3+2;if(t<=r)return vu(1,t);const u=Math.max(e-n,1),a=Math.min(e+n,t),i=u>2,o=a<t-2;return!i&&o?[...vu(1,3+2*n),"right-ellipsis",t]:i&&!o?[1,"left-ellipsis",...vu(t-(3+2*n)+1,t)]:[1,"left-ellipsis",...vu(u,a),"right-ellipsis",t]},s0=({currentPage:e,totalPages:t,onPageChange:n,siblingCount:r=1})=>{const u=c=>{const l=r*2+1;n(c?Math.max(e-l,1):Math.min(e+l,t))},a=e===1,i=e===t,o=c=>s.jsx(w.Button,{type:typeof c=="number"&&c===e?"Primary":"Secondary",onClick:()=>typeof c=="string"?u(c==="left-ellipsis"):n(c),"aria-current":typeof c=="number"&&c===e?"page":void 0,children:typeof c=="string"?"…":c},c);return s.jsxs("div",{className:Hu.paginationContainer,children:[s.jsx(w.Button,{type:"Secondary",onClick:()=>!a&&n(e-1),disabled:a,children:s.jsx(w.Icon,{name:"ArrowLeft"})}),Om(e,t,r).map(o),s.jsx(w.Button,{type:"Secondary",onClick:()=>!i&&n(e+1),disabled:i,children:s.jsx(w.Icon,{name:"ArrowRight"})})]})},o0=(e,t,n)=>{const r=(e-1)*n+1,u=Math.min(e*n,t);return`Showing ${r}-${u} entries of ${t}`},hu=({className:e,totalCount:t,...n})=>{const r=Math.ceil(t/mi);return r<2?null:s.jsxs("div",{className:`${Hu.paginationWithRange} ${e}`,children:[s.jsx("div",{className:Hu.paginationWithRangeText,id:"md",children:o0(n.currentPage,t,mi)}),s.jsx("div",{className:Hu.paginationWithRangePagination,children:s.jsx(s0,{...n,totalPages:r})})]})},Mm="_statusIndicator_bvd17_4",Fm="_antistockStatus_bvd17_11",Bm="_statusIndicatorSuccess_bvd17_16",jm="_statusIndicatorWarning_bvd17_20",Hm="_statusIndicatorError_bvd17_24",Um="_statusIndicatorText_bvd17_28",pr={statusIndicator:Mm,antistockStatus:Fm,statusIndicatorSuccess:Bm,statusIndicatorWarning:jm,statusIndicatorError:Hm,statusIndicatorText:Um},Vm=()=>s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:s.jsx("path",{d:"M11.2105 5.91453C11.2628 5.96677 11.3043 6.02881 11.3326 6.0971C11.3609 6.16538 11.3754 6.23858 11.3754 6.3125C11.3754 6.38642 11.3609 6.45962 11.3326 6.5279C11.3043 6.59619 11.2628 6.65823 11.2105 6.71047L7.27297 10.648C7.22073 10.7003 7.15869 10.7418 7.09041 10.7701C7.02212 10.7984 6.94892 10.8129 6.875 10.8129C6.80108 10.8129 6.72789 10.7984 6.6596 10.7701C6.59131 10.7418 6.52928 10.7003 6.47703 10.648L4.78953 8.96047C4.68399 8.85492 4.62469 8.71177 4.62469 8.5625C4.62469 8.41323 4.68399 8.27008 4.78953 8.16453C4.89508 8.05898 5.03824 7.99969 5.1875 7.99969C5.33677 7.99969 5.47992 8.05898 5.58547 8.16453L6.875 9.45477L10.4145 5.91453C10.4668 5.86223 10.5288 5.82074 10.5971 5.79244C10.6654 5.76413 10.7386 5.74956 10.8125 5.74956C10.8864 5.74956 10.9596 5.76413 11.0279 5.79244C11.0962 5.82074 11.1582 5.86223 11.2105 5.91453ZM15.3125 8C15.3125 9.44628 14.8836 10.8601 14.0801 12.0626C13.2766 13.2651 12.1346 14.2024 10.7984 14.7559C9.46219 15.3093 7.99189 15.4541 6.57341 15.172C5.15492 14.8898 3.85196 14.1934 2.82928 13.1707C1.80661 12.148 1.11017 10.8451 0.828011 9.4266C0.545857 8.00811 0.690668 6.53781 1.24413 5.20163C1.7976 3.86544 2.73486 2.72339 3.9374 1.91988C5.13993 1.11637 6.55373 0.6875 8 0.6875C9.93877 0.689547 11.7975 1.46063 13.1685 2.83154C14.5394 4.20246 15.3105 6.06123 15.3125 8ZM14.1875 8C14.1875 6.77623 13.8246 5.57994 13.1447 4.56241C12.4648 3.54488 11.4985 2.75181 10.3679 2.2835C9.23724 1.81518 7.99314 1.69264 6.79288 1.93139C5.59262 2.17014 4.49012 2.75944 3.62478 3.62478C2.75944 4.49011 2.17014 5.59262 1.93139 6.79288C1.69265 7.99314 1.81518 9.23724 2.2835 10.3679C2.75182 11.4985 3.54488 12.4648 4.56241 13.1447C5.57994 13.8246 6.77623 14.1875 8 14.1875C9.64046 14.1856 11.2132 13.5331 12.3732 12.3732C13.5331 11.2132 14.1856 9.64046 14.1875 8Z",fill:"#338B13"})}),$m=()=>s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:s.jsx("path",{d:"M8 0.6875C6.55373 0.6875 5.13993 1.11637 3.9374 1.91988C2.73486 2.72339 1.7976 3.86544 1.24413 5.20163C0.690668 6.53781 0.545857 8.00811 0.828011 9.4266C1.11017 10.8451 1.80661 12.148 2.82928 13.1707C3.85196 14.1934 5.15492 14.8898 6.57341 15.172C7.99189 15.4541 9.46219 15.3093 10.7984 14.7559C12.1346 14.2024 13.2766 13.2651 14.0801 12.0626C14.8836 10.8601 15.3125 9.44628 15.3125 8C15.3105 6.06123 14.5394 4.20246 13.1685 2.83154C11.7975 1.46063 9.93877 0.689547 8 0.6875ZM8 14.1875C6.77623 14.1875 5.57994 13.8246 4.56241 13.1447C3.54488 12.4648 2.75182 11.4985 2.2835 10.3679C1.81518 9.23724 1.69265 7.99314 1.93139 6.79288C2.17014 5.59262 2.75944 4.49011 3.62478 3.62478C4.49012 2.75944 5.59262 2.17014 6.79288 1.93139C7.99314 1.69264 9.23724 1.81518 10.3679 2.2835C11.4985 2.75181 12.4648 3.54488 13.1447 4.56241C13.8246 5.57994 14.1875 6.77623 14.1875 8C14.1856 9.64046 13.5331 11.2132 12.3732 12.3732C11.2132 13.5331 9.64046 14.1856 8 14.1875ZM12.5 8C12.5 8.14918 12.4407 8.29226 12.3353 8.39775C12.2298 8.50324 12.0867 8.5625 11.9375 8.5625H8C7.85082 8.5625 7.70775 8.50324 7.60226 8.39775C7.49677 8.29226 7.4375 8.14918 7.4375 8V4.0625C7.4375 3.91332 7.49677 3.77024 7.60226 3.66475C7.70775 3.55926 7.85082 3.5 8 3.5C8.14919 3.5 8.29226 3.55926 8.39775 3.66475C8.50324 3.77024 8.5625 3.91332 8.5625 4.0625V7.4375H11.9375C12.0867 7.4375 12.2298 7.49676 12.3353 7.60225C12.4407 7.70774 12.5 7.85082 12.5 8Z",fill:"#C1972A"})}),zm=()=>s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[s.jsx("path",{d:"M9 17.0625C4.5525 17.0625 0.9375 13.4475 0.9375 9C0.9375 4.5525 4.5525 0.9375 9 0.9375C13.4475 0.9375 17.0625 4.5525 17.0625 9C17.0625 13.4475 13.4475 17.0625 9 17.0625ZM9 2.0625C5.175 2.0625 2.0625 5.175 2.0625 9C2.0625 12.825 5.175 15.9375 9 15.9375C12.825 15.9375 15.9375 12.825 15.9375 9C15.9375 5.175 12.825 2.0625 9 2.0625Z",fill:"#C12A2A"}),s.jsx("path",{d:"M6.87752 11.685C6.73502 11.685 6.59252 11.6325 6.48002 11.52C6.26252 11.3025 6.26252 10.9425 6.48002 10.725L10.725 6.48C10.9425 6.2625 11.3025 6.2625 11.52 6.48C11.7375 6.6975 11.7375 7.0575 11.52 7.275L7.27502 11.52C7.17002 11.6325 7.02002 11.685 6.87752 11.685Z",fill:"#C12A2A"}),s.jsx("path",{d:"M11.1225 11.685C10.98 11.685 10.8375 11.6325 10.725 11.52L6.48002 7.275C6.26252 7.0575 6.26252 6.6975 6.48002 6.48C6.69752 6.2625 7.05752 6.2625 7.27502 6.48L11.52 10.725C11.7375 10.9425 11.7375 11.3025 11.52 11.52C11.4075 11.6325 11.265 11.685 11.1225 11.685Z",fill:"#C12A2A"})]}),qm={[Bn.SUCCESS]:Vm,[Bn.WARNING]:$m,[Bn.ERROR]:zm},Zm={[Bn.SUCCESS]:pr.statusIndicatorSuccess,[Bn.WARNING]:pr.statusIndicatorWarning,[Bn.ERROR]:pr.statusIndicatorError},c0=({status:e,variant:t})=>{const{isAntistock:n}=b.useGeneralStore(),r=qm[t];return s.jsxs("div",{className:b.clx(pr.statusIndicator,Zm[t],{[pr.antistockStatus]:n}),children:[s.jsx(r,{}),s.jsx("span",{className:pr.statusIndicatorText,id:"md",children:e})]})},Wm="_checkoutItemsContainer_1kn61_2",Ym="_innerContainer_1kn61_16",Gm="_headerSection_1kn61_22",Xm="_header_1kn61_22",Km="_productsContainer_1kn61_47",Qm="_couponContainer_1kn61_54",Jm="_checkoutFooter_1kn61_58",zn={checkoutItemsContainer:Wm,innerContainer:Ym,headerSection:Gm,header:Xm,productsContainer:Km,couponContainer:Qm,checkoutFooter:Jm},e8="_checkoutFooter_sum4s_1",t8="_antistock_sum4s_12",n8="_footerBranding_sum4s_22",r8="_poweredText_sum4s_27",u8="_antistockLink_sum4s_31",a8="_footerNav_sum4s_39",yn={checkoutFooter:e8,antistock:t8,footerBranding:n8,poweredText:r8,antistockLink:u8,footerNav:a8},i8="data:image/svg+xml,%3csvg%20width='100'%20height='26'%20viewBox='0%200%20100%2026'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.3996%203.39999V12.8228L16.2964%2014.1313V8.89738L7.69363%2011.587V6.87107L20.3996%203.39999Z'%20fill='%23FF3F19'/%3e%3cpath%20d='M16.2964%2014.1313L16.2962%2018.6292L3.59961%2022.6V12.7592L7.69363%2011.587L7.69344%2016.9118L16.2964%2014.1313Z'%20fill='%23FF3F19'/%3e%3cpath%20d='M95.6308%2022C93.4931%2022%2091.8804%2020.882%2091.4678%2019.1776L93.118%2019.0676C93.4181%2019.984%2094.0931%2020.5338%2095.6308%2020.5338C97.4311%2020.5338%2098.4249%2019.8373%2098.4249%2018.4078V16.8316C97.9374%2017.858%2096.8122%2018.5178%2095.5183%2018.5178C92.9868%2018.5178%2091.1865%2016.575%2091.1865%2013.8076C91.1865%2011.0401%2092.9492%209.09737%2095.4433%209.09737C96.831%209.09737%2098.0499%209.77549%2098.5%2010.8568V9.3173H100V18.3711C100%2020.6438%2098.3687%2022%2095.6308%2022ZM95.5933%2017.0515C97.2998%2017.0515%2098.4062%2015.8053%2098.4249%2013.8076C98.4624%2011.8099%2097.3186%2010.5636%2095.5933%2010.5636C93.8494%2010.5636%2092.8367%2011.8099%2092.8367%2013.8076C92.8367%2015.8053%2093.8869%2017.0515%2095.5933%2017.0515Z'%20fill='%23252525'/%3e%3cpath%20d='M81.1836%2019.0309V9.3173H82.6275L82.665%2011.0584C83.1901%209.72051%2084.3527%209.09737%2085.7217%209.09737C87.9907%209.09737%2089.0783%2010.7285%2089.0783%2012.7812V19.0309H87.5031V13.2211C87.5031%2011.425%2086.8843%2010.4536%2085.3841%2010.4536C83.8464%2010.4536%2082.7588%2011.425%2082.7588%2013.2211V19.0309H81.1836Z'%20fill='%23252525'/%3e%3cpath%20d='M73.3176%2019.2509C71.2549%2019.2509%2069.9609%2018.2795%2069.9609%2016.6117C69.9609%2014.9622%2070.9173%2014.0458%2073.0926%2013.6426L76.618%2013.0011C76.618%2011.37%2075.8304%2010.5636%2074.2552%2010.5636C72.8676%2010.5636%2072.0987%2011.1867%2071.7987%2012.3047L70.1297%2012.1764C70.5048%2010.3436%2072.0049%209.09737%2074.2552%209.09737C76.8056%209.09737%2078.1932%2010.6002%2078.1932%2013.0561V17.0699C78.1932%2017.5097%2078.3433%2017.6747%2078.7183%2017.6747H79.1121V19.0309C78.9996%2019.0493%2078.7558%2019.0676%2078.512%2019.0676C77.3119%2019.0676%2076.7681%2018.6094%2076.6368%2017.5281C76.1492%2018.5361%2074.7803%2019.2509%2073.3176%2019.2509ZM73.4676%2017.8946C75.4554%2017.8946%2076.618%2016.6483%2076.618%2015.0355V14.3391L73.3926%2014.9255C72.0425%2015.1638%2071.6111%2015.6586%2071.6111%2016.4651C71.6111%2017.3814%2072.305%2017.8946%2073.4676%2017.8946Z'%20fill='%23252525'/%3e%3cpath%20d='M63.2168%2022C61.079%2022%2059.4663%2020.882%2059.0537%2019.1776L60.704%2019.0676C61.004%2019.984%2061.6791%2020.5338%2063.2168%2020.5338C65.017%2020.5338%2066.0109%2019.8373%2066.0109%2018.4078V16.8316C65.5233%2017.858%2064.3982%2018.5178%2063.1043%2018.5178C60.5727%2018.5178%2058.7725%2016.575%2058.7725%2013.8076C58.7725%2011.0401%2060.5352%209.09737%2063.0293%209.09737C64.4169%209.09737%2065.6358%209.77549%2066.0859%2010.8568V9.3173H67.5861V18.3711C67.5861%2020.6438%2065.9546%2022%2063.2168%2022ZM63.1793%2017.0515C64.8857%2017.0515%2065.9921%2015.8053%2066.0109%2013.8076C66.0484%2011.8099%2064.9045%2010.5636%2063.1793%2010.5636C61.4353%2010.5636%2060.4227%2011.8099%2060.4227%2013.8076C60.4227%2015.8053%2061.4728%2017.0515%2063.1793%2017.0515Z'%20fill='%23252525'/%3e%3cpath%20d='M56.2141%2019.0309C55.0515%2019.0309%2054.2451%2018.4811%2054.2451%2017.1982L54.2639%206.01834H55.8391V17.0699C55.8391%2017.4731%2056.0453%2017.6747%2056.4579%2017.6747H57.3205V19.0309H56.2141Z'%20fill='%23252525'/%3e%3cpath%20d='M51.0686%2019.0309C49.906%2019.0309%2049.0996%2018.4811%2049.0996%2017.1982L49.1184%206.01834H50.6936V17.0699C50.6936%2017.4731%2050.8998%2017.6747%2051.3124%2017.6747H52.175V19.0309H51.0686Z'%20fill='%23252525'/%3e%3cpath%20d='M44.5209%2019.0309V9.3173H46.0961V19.0309H44.5209ZM44.4834%207.79611V6H46.1336V7.79611H44.4834Z'%20fill='%23252525'/%3e%3cpath%20d='M32%2019.0309V6.01834H36.5756C39.726%206.01834%2041.3012%207.09967%2041.3012%209.51891C41.3012%2010.9851%2040.4198%2012.0481%2038.9384%2012.3047C40.7574%2012.5613%2041.8638%2013.7709%2041.8638%2015.4571C41.8638%2017.8213%2040.2323%2019.0309%2037.3257%2019.0309H32ZM37.3257%2017.4914C39.1447%2017.4914%2040.176%2016.74%2040.176%2015.3654C40.176%2013.9908%2039.1447%2013.1844%2037.3257%2013.1844H33.6127V17.4914H37.3257ZM36.5756%2011.6449C38.5258%2011.6449%2039.6135%2010.8935%2039.6135%209.59222C39.6135%208.21765%2038.6008%207.55786%2036.5756%207.55786H33.6127V11.6449H36.5756Z'%20fill='%23252525'/%3e%3c/svg%3e",Hn=({className:e})=>{const{shopTerms:t,shopPrivacyPolicy:n,shopRefundPolicy:r,shopLogo:u}=b.useStorefrontStore(),{isAntistock:a}=b.useGeneralStore(),{settings:i}=b.useSettingsStore();return s.jsxs("footer",{className:`${yn.checkoutFooter} ${e} ${a?yn.antistock:""}`,children:[a&&(i==null?void 0:i.showPoweredBy)&&s.jsxs("div",{className:yn.footerBranding,children:[s.jsx("p",{className:yn.poweredText,id:"md",style:{color:"var(--text-action)"},children:"Powered by"}),s.jsxs("a",{className:yn.antistockLink,href:"https://antistock.io",target:"_blank",rel:"noopener noreferrer",children:[s.jsx(ql,{width:14,height:18}),"Antistock"]})]}),!a&&s.jsxs("div",{className:yn.footerBranding,children:[s.jsx("p",{className:yn.poweredText,id:"md",children:"Powered by"}),u||s.jsx("img",{src:i8,alt:"Billgang"})]}),s.jsx("nav",{children:s.jsxs("ul",{className:yn.footerNav,children:[(t==null?void 0:t.showTermsOfServiceOnProduct)&&!a&&s.jsx("li",{children:s.jsx("a",{href:t.termsOfService,target:"_blank",rel:"noopener noreferrer",children:"Terms"})}),(n==null?void 0:n.showPrivacyPolicyOnProduct)&&s.jsx("li",{children:s.jsx("a",{href:n.privacyPolicy,target:"_blank",rel:"noopener noreferrer",children:"Privacy"})}),(r==null?void 0:r.showRefundPolicyOnProduct)&&s.jsx("li",{children:s.jsx("a",{href:r.refundPolicy,target:"_blank",rel:"noopener noreferrer",children:"Refund"})})]})})]})},s8="_checkoutHeader_1stm3_1",o8="_leftContainer_1stm3_20",c8="_backArrow_1stm3_26",l8="_logoContainer_1stm3_38",d8="_logo_1stm3_38",f8="_antistockLink_1stm3_48",ir={checkoutHeader:s8,leftContainer:o8,backArrow:c8,logoContainer:l8,logo:d8,antistockLink:f8},h8="_activeBadge_1yb5i_1",p8="_activeBadgeText_1yb5i_12",Ao={activeBadge:h8,activeBadgeText:p8},m8=({className:e})=>s.jsxs("div",{className:b.clx(Ao.activeBadge,e),children:[s.jsx(w.Icon,{name:"Check",width:20,height:20}),s.jsx("p",{className:Ao.activeBadgeText,children:"Active"})]}),g8="_timerContainer_rh66p_2",b8="_timerText_rh66p_12",_8="_timerContainerAntistock_rh66p_16",Wa={timerContainer:g8,timerText:b8,timerContainerAntistock:_8},x8=({expiresAt:e})=>{const[t,n]=P.useState(u()),{isAntistock:r}=b.useGeneralStore();function u(){const a=new Date,i=new Date(e).getTime()-a.getTime();if(i<=0)return{hours:"00",minutes:"00",seconds:"00"};const o=Math.floor(i/(1e3*60*60)),c=Math.floor(i%(1e3*60*60)/(1e3*60)),l=Math.floor(i%(1e3*60)/1e3);return{hours:String(o).padStart(2,"0"),minutes:String(c).padStart(2,"0"),seconds:String(l).padStart(2,"0")}}return P.useEffect(()=>{const a=setInterval(()=>{n(u())},1e3);return()=>clearInterval(a)},[e]),t.hours==="00"&&t.minutes==="00"&&t.seconds==="00"?null:r?s.jsxs("div",{className:Wa.timerContainerAntistock,children:[s.jsxs("span",{children:[t.hours,":",t.minutes,":",t.seconds]}),s.jsx("span",{children:"remaining"})]}):s.jsxs("div",{className:Wa.timerContainer,children:[s.jsx(w.Icon,{name:"Clock"}),s.jsxs("p",{className:Wa.timerText,id:"md",children:[t.hours,":",t.minutes,":",t.seconds]})]})},C8="_progressBar_mcabf_4",E8="_progressBarLabel_mcabf_12",T8="_progressBarTrack_mcabf_17",y8="_progressBarFill_mcabf_28",wu={progressBar:C8,progressBarLabel:E8,progressBarTrack:T8,progressBarFill:y8},l0=({color:e,percent:t,disablePercentLabel:n})=>s.jsxs("div",{className:wu.progressBar,children:[!n&&s.jsxs("p",{className:wu.progressBarLabel,children:[t,"%"]}),s.jsx("div",{className:wu.progressBarTrack,children:s.jsx("div",{style:{width:`${t}%`,background:e||void 0},className:wu.progressBarFill})})]}),k8="_rating_1bpps_4",A8="_disabled_1bpps_9",S8="_ratingStar_1bpps_14",I8="_inactive_1bpps_22",Du={rating:k8,disabled:A8,ratingStar:S8,inactive:I8},N8=({setRating:e,rating:t,disabled:n})=>{const[r,u]=P.useState(0),a=o=>{n||u(+o.currentTarget.id)},i=o=>{n||e(o)};return s.jsx("div",{className:b.clx(Du.rating,{[Du.disabled]:n}),onMouseLeave:()=>u(0),children:[1,2,3,4,5].map(o=>s.jsx("div",{id:o.toString(),className:b.clx(Du.ratingStar,{[Du.inactive]:!(t>=o||r>=o)}),onMouseEnter:a,onClick:()=>i(o),children:t>=o||r>=o?s.jsx(Xp,{}):s.jsx(w.Icon,{name:"Star",fill:"var(--text-secondary)",width:22,height:21})},o))})},v8="_inputRange_iv6ow_4",w8="_inputRangeLabel_iv6ow_14",D8="_progressBar_iv6ow_22",L8="_progressBarFill_iv6ow_29",P8="_stepsContainer_iv6ow_40",R8="_step_iv6ow_40",O8="_stepDot_iv6ow_57",M8="_current_iv6ow_61",F8="_active_iv6ow_69",B8="_inactive_iv6ow_72",j8="_tooltip_iv6ow_77",Ht={inputRange:v8,inputRangeLabel:w8,progressBar:D8,progressBarFill:L8,stepsContainer:P8,step:R8,stepDot:O8,current:M8,default:"_default_iv6ow_65",active:F8,inactive:B8,tooltip:j8},H8=({totalSteps:e,step:t,onStepChange:n,label:r})=>{const[u,a]=P.useState(t),i=u===1?0:(u-1)/(e-1)*100,o=c=>{a(c),n(c)};return s.jsxs("div",{className:Ht.inputRange,children:[r&&s.jsx("div",{className:Ht.inputRangeLabel,children:r}),s.jsxs("div",{className:Ht.progressBar,children:[s.jsx("div",{className:Ht.progressBarFill,style:{width:`${Math.ceil(i)}%`}}),s.jsx("div",{className:Ht.stepsContainer,children:[...Array(e)].map((c,l)=>{const h=l+1,f=h<=u,m=h===u;return s.jsxs("div",{className:Ht.step,onClick:()=>o(h),children:[s.jsx("div",{className:b.clx(Ht.stepDot,m?Ht.current:Ht.default,f?Ht.active:Ht.inactive)}),m&&s.jsxs("div",{className:Ht.tooltip,style:{transform:`translateX(calc(50% - ${i<99?"40px":"70px"}))`},children:[s.jsx("span",{children:u}),s.jsx("span",{children:u===1?"month":"months"})]})]},h)})})]})]})},ma=({className:e,expiresAt:t})=>{const{shopGeneral:n}=b.useStorefrontStore(),r=b.useNavigate(),{isAntistock:u}=b.useGeneralStore();return s.jsxs("header",{className:`${ir.checkoutHeader} ${e}`,children:[s.jsxs("div",{className:ir.leftContainer,children:[s.jsx("div",{className:ir.backArrow,onClick:()=>{window.history.length>2?r(-1):r("/")},children:s.jsx(w.Icon,{name:"ArrowUp"})}),(n==null?void 0:n.info.logo)&&s.jsx("div",{className:ir.logoContainer,children:u?s.jsx("a",{className:ir.antistockLink,href:"https://antistock.io",target:"_blank",rel:"noopener noreferrer",children:"Antistock"}):s.jsx("img",{className:ir.logo,src:b.convertCfImageIdToUrl(n.info.logo.cfId,"200")})})]}),t&&s.jsx(x8,{expiresAt:t})]})},U8="_checkoutPrices_7fn88_1",V8="_priceRow_7fn88_12",$8="_label_7fn88_22",z8="_labelContainer_7fn88_26",q8="_tooltipContainer_7fn88_34",Z8="_infoIcon_7fn88_40",W8="_tooltip_7fn88_34",Y8="_totalRow_7fn88_94",G8="_totalLabel_7fn88_105",X8="_totalValue_7fn88_110",Ze={checkoutPrices:U8,priceRow:V8,label:$8,labelContainer:z8,tooltipContainer:q8,infoIcon:Z8,tooltip:W8,totalRow:Y8,totalLabel:G8,totalValue:X8},kr=({formatter:e,coupon:t,discount:n,totalWithDiscount:r,total:u,className:a,isShowSubtotal:i=!0,feeOrDiscount:o,serviceFeeAmount:c,replacementLabel:l,replacementAmount:h})=>{const f=Math.max(0,n),[m,p]=P.useState(!1),[g,x]=P.useState(!1),{priceAdjustment:C}=b.useCartStore(),{isAntistock:_}=b.useGeneralStore(),{settings:v}=b.useSettingsStore(),k={isDiscount:!1,fixedAmount:10,percentage:10},S=(()=>{const I=r!==void 0?r:u-f;if((!C||o===null||o===void 0)&&h==null&&(!k||c===null||c===void 0))return Math.max(I,0);let M=I;return C&&o!==null&&o!==void 0&&(C.isDiscount?M=Math.max(M-o,0):M=Math.max(M+o,0)),h!=null&&(M=Math.max(M+h,0)),k&&c!==null&&c!==void 0&&(k.isDiscount?M=Math.max(M-c,0):M=Math.max(M+c,0)),M})();return s.jsxs("div",{className:`${Ze.checkoutPrices} ${a||""}`,style:{border:_?"1px solid var(--border-secondary)":void 0},children:[i&&s.jsxs("div",{className:Ze.priceRow,children:[s.jsx("p",{className:Ze.label,id:"md",children:"Subtotal"}),s.jsx("p",{id:"md",children:e.format(u)})]}),(t||f>0)&&s.jsxs("div",{className:Ze.priceRow,children:[s.jsxs("p",{className:Ze.label,id:"md",children:["Discount ",t&&!(t!=null&&t.isFixed)&&`(${t==null?void 0:t.discount}%)`]}),s.jsx("p",{id:"md",children:t&&!(t!=null&&t.isFixed)&&(t==null?void 0:t.discount)===100?`-${e.format(u)}`:`-${e.format(f)}`})]}),o!=null&&o!==0&&C&&(C.fixedAmount!==0||C.percentage!==0)&&s.jsxs("div",{className:Ze.priceRow,children:[s.jsx("p",{className:Ze.label,id:"md",children:C.isDiscount?"Gateway Discount":"Gateway Fee"}),s.jsx("p",{id:"md",children:e.format(o)})]}),h!=null&&h!==0&&s.jsxs("div",{className:Ze.priceRow,children:[s.jsxs("div",{className:Ze.labelContainer,children:[s.jsx("p",{className:Ze.label,id:"md",children:l||"Priority Replacement"}),_&&s.jsxs("div",{className:Ze.tooltipContainer,children:[s.jsx("div",{className:Ze.infoIcon,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:s.jsx(w.Icon,{name:"Info",fill:"var(--text-secondary)"})}),m&&s.jsx("div",{className:Ze.tooltip,children:"This is an optional add-on you enabled to protect your checkout."})]})]}),s.jsx("p",{id:"md",children:e.format(h)})]}),c!=null&&c!==0&&k&&(k.fixedAmount!==0||k.percentage!==0)&&s.jsxs("div",{className:Ze.priceRow,children:[s.jsxs("div",{className:Ze.labelContainer,children:[s.jsx("p",{className:Ze.label,id:"md",children:k.isDiscount?"Platform Discount":"Platform Fee"}),_&&s.jsxs("div",{className:Ze.tooltipContainer,children:[s.jsx("div",{className:Ze.infoIcon,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:s.jsx(w.Icon,{name:"Info",fill:"var(--text-secondary)"})}),g&&s.jsxs("div",{className:Ze.tooltip,children:["Platform ",k.isDiscount?"discount":"fee",(v==null?void 0:v.showPoweredBy)&&" charged by Antistock"," for processing your payment."]})]})]}),s.jsx("p",{id:"md",children:e.format(c)})]}),s.jsxs("div",{className:Ze.totalRow,children:[s.jsx("p",{className:Ze.totalLabel,id:"md-bold",children:"Total Due"}),s.jsx("p",{className:Ze.totalValue,id:"md-bold",children:e.format(S)})]})]})},K8="_checkoutProduct_8yrle_1",Q8="_isOrder_8yrle_1",J8="_productDetails_8yrle_14",e7="_productImage_8yrle_20",t7="_isOrderImage_8yrle_30",n7="_productImageAntistock_8yrle_34",r7="_image_8yrle_39",u7="_productInfo_8yrle_44",a7="_productInfoOverrodePrice_8yrle_51",i7="_productHeader_8yrle_55",s7="_quantityBadge_8yrle_61",o7="_productPrice_8yrle_79",c7="_priceContainer_8yrle_88",l7="_originalPrice_8yrle_97",d7="_overridePrice_8yrle_103",f7="_deliveryCategories_8yrle_107",h7="_customerNote_8yrle_115",p7="_noteHeader_8yrle_122",m7="_logoContainer_8yrle_128",g7="_shopName_8yrle_140",b7="_noteContent_8yrle_144",_7="_productName_8yrle_150",x7="_replacementRequests_8yrle_165",C7="_replacementRequestsTitle_8yrle_175",E7="_replacementButton_8yrle_182",T7="_replacementButtonText_8yrle_186",y7="_replacementRequestsList_8yrle_190",Me={checkoutProduct:K8,isOrder:Q8,productDetails:J8,productImage:e7,isOrderImage:t7,productImageAntistock:n7,image:r7,productInfo:u7,productInfoOverrodePrice:a7,productHeader:i7,quantityBadge:s7,productPrice:o7,priceContainer:c7,originalPrice:l7,overridePrice:d7,deliveryCategories:f7,customerNote:h7,noteHeader:p7,logoContainer:m7,shopName:g7,noteContent:b7,productName:_7,replacementRequests:x7,replacementRequestsTitle:C7,replacementButton:E7,replacementButtonText:T7,replacementRequestsList:y7},k7="_deliveryItem_1x3fg_1",A7="_deliveryItemText_1x3fg_10",Vr={deliveryItem:k7,deliveryItemText:A7},Si={[ve.Text]:"View",[ve.Serial]:"View",[ve.Ebook]:"View",[ve.Link]:"Visit",[ve.Download]:"",[ve.Custom]:"View",[ve.Discord]:"Access",[ve.Telegram]:"Telegram"},Ii={[ve.Text]:"Content",[ve.Serial]:"Content",[ve.Ebook]:"Ebook",[ve.Link]:"Link",[ve.Download]:"Download",[ve.Custom]:"Content",[ve.Discord]:"Discord",[ve.Telegram]:"Telegram"},d0=()=>({[ve.Text]:s.jsx(w.Icon,{name:"FileText",fill:"var(--text-secondary)"}),[ve.Serial]:s.jsx(w.Icon,{name:"FileText",fill:"var(--text-secondary)"}),[ve.Ebook]:s.jsx(w.Icon,{name:"BookOpen",fill:"var(--text-secondary)"}),[ve.Link]:s.jsx(w.Icon,{name:"ArrowLineUpRight",fill:"var(--text-secondary)"}),[ve.Download]:s.jsx(w.Icon,{name:"DownloadSimple",fill:"var(--text-secondary)"}),[ve.Custom]:s.jsx(w.Icon,{name:"FileText",fill:"var(--text-secondary)"}),[ve.Discord]:s.jsx(w.Icon,{name:"DiscordLogo",fill:"var(--text-secondary)"}),[ve.Telegram]:s.jsx(w.Icon,{name:"TelegramLogo",fill:"var(--text-secondary)"})}),S7=({deliveryConfiguration:e})=>{const t=e.type;return t===ve.Text||t===ve.Custom||t===ve.Serial||t===ve.Discord?s.jsx(I7,{deliveryConfiguration:e}):s.jsx(N7,{deliveryConfiguration:e})},I7=({deliveryConfiguration:e})=>{const t=e.type,[n,r]=P.useState(!1),{setIsOpen:u}=b.useModalStore(),{isAntistock:a}=b.useGeneralStore(),i=()=>{u(!0),r(!0)};return s.jsxs(s.Fragment,{children:[a?s.jsx(w.Button,{type:"Secondary",onClick:o=>{o.stopPropagation(),i()},children:s.jsx("p",{className:Vr.deliveryItemText,children:e.customName??`${Si[t]} ${Ii[t]}`})}):s.jsxs(w.Button,{type:"Secondary",className:Vr.deliveryItem,onClick:o=>{o.stopPropagation(),i()},children:[d0()[t],s.jsx("p",{className:Vr.deliveryItemText,children:e.customName??`${Si[t]} ${Ii[t]}`})]}),n&&s.jsx(w.Modal,{close:()=>r(!1),withAnimation:!a,children:s.jsx(Cd,{deliveryConfiguration:e,setIsOpen:r})})]})},N7=({deliveryConfiguration:e})=>{const t=e.type;return s.jsxs(w.Button,{type:"Secondary",className:Vr.deliveryItem,onClick:()=>window.open(e.deliveryItems[0].textData,"_blank"),children:[d0()[t],s.jsx("p",{className:Vr.deliveryItemText,children:e.customName??`${Si[t]} ${Ii[t]}`})]})},v7="_replacementRequestItem_1sd2r_1",w7="_replacementRequestHeader_1sd2r_11",D7="_replacementRequestId_1sd2r_18",L7="_replacementRequestDescription_1sd2r_24",P7="_statusBadge_1sd2r_30",R7="_statusPending_1sd2r_38",O7="_statusApproved_1sd2r_43",M7="_statusDeclined_1sd2r_48",F7="_statusCancelled_1sd2r_53",B7="_replacementModal_1sd2r_58",j7="_replacementModalAntistock_1sd2r_68",H7="_replacementModalHeader_1sd2r_73",U7="_closeButton_1sd2r_87",V7="_replacementModalContent_1sd2r_101",$7="_statusSection_1sd2r_110",z7="_statusTitle_1sd2r_116",q7="_statusDescription_1sd2r_123",Z7="_actionButtons_1sd2r_130",W7="_productsSection_1sd2r_137",Y7="_productsList_1sd2r_151",G7="_productItem_1sd2r_157",X7="_noProducts_1sd2r_164",K7="_previouslyDeliveredSection_1sd2r_171",Q7="_previouslyDeliveredHeader_1sd2r_179",J7="_previouslyDeliveredTitle_1sd2r_186",e9="_caretIcon_1sd2r_192",t9="_caretIconRotated_1sd2r_196",n9="_previouslyDeliveredContent_1sd2r_200",r9="_previouslyDeliveredProductItem_1sd2r_209",Ie={replacementRequestItem:v7,replacementRequestHeader:w7,replacementRequestId:D7,replacementRequestDescription:L7,statusBadge:P7,statusPending:R7,statusApproved:O7,statusDeclined:M7,statusCancelled:F7,replacementModal:B7,replacementModalAntistock:j7,replacementModalHeader:H7,closeButton:U7,replacementModalContent:V7,statusSection:$7,statusTitle:z7,statusDescription:q7,actionButtons:Z7,productsSection:W7,productsList:Y7,productItem:G7,noProducts:X7,previouslyDeliveredSection:K7,previouslyDeliveredHeader:Q7,previouslyDeliveredTitle:J7,caretIcon:e9,caretIconRotated:t9,previouslyDeliveredContent:n9,previouslyDeliveredProductItem:r9},u9=({item:e,orderId:t,accessToken:n,onCancel:r})=>{var D,S;const[u,a]=P.useState(!1),[i,o]=P.useState(!1),[c,l]=P.useState(!1),{setIsOpen:h}=b.useModalStore(),{isAntistock:f}=b.useGeneralStore(),{setNotifications:m,notifications:p}=b.useNotificationStore(),g=()=>{h(!0),a(!0)},x=async()=>{var I,M;if(!t||!n){m([...p,{id:b.v4(),message:"Missing order information",status:"error"}]);return}o(!0);try{const q=await l2(t,n,e.id);m([...p,{id:b.v4(),message:((I=q.data)==null?void 0:I.message)||"Replacement request cancelled successfully",status:"success"}]),r==null||r(),a(!1)}catch(q){let U="Failed to cancel replacement request",L="";const j=q;if((M=j==null?void 0:j.response)!=null&&M.data){const F=j.response.data;F.message&&F.errors&&Array.isArray(F.errors)?(L=F.message,U=F.errors.join(", ")):F.errors&&Array.isArray(F.errors)?U=F.errors.join(", "):F.message&&(U=F.message)}else q instanceof Error&&(U=q.message);m([...p,{id:b.v4(),message:U,status:"error",label:L}])}finally{o(!1)}},C=()=>{if(!e.replacementItems||e.replacementItems.length===0){m([...p,{id:b.v4(),message:"No products to copy",status:"error"}]);return}const I=e.replacementItems.map(M=>`${M.originalSerialKey} -> ${M.replacementSerialKey}`).join(`
77
+ }`;const K4="_authContainer_1uyf7_2",Q4="_authWrapper_1uyf7_12",J4="_inModal_1uyf7_19",e5="_formHeaderTitle_1uyf7_26",t5="_formHeaderSubtitle_1uyf7_33",n5="_formLabel_1uyf7_39",r5="_formError_1uyf7_51",u5="_submitButton_1uyf7_57",a5="_submitButtonAntistock_1uyf7_57",i5="_backButton_1uyf7_67",s5="_otpContainer_1uyf7_78",o5="_otpSlots_1uyf7_85",c5="_otpSlot_1uyf7_85",l5="_active_1uyf7_108",d5="_otpSlotEmpty_1uyf7_113",f5="_actionRow_1uyf7_117",h5="_authForm_1uyf7_124",p5="_formHeader_1uyf7_26",m5="_input_1uyf7_135",Ye={authContainer:K4,authWrapper:Q4,inModal:J4,formHeaderTitle:e5,formHeaderSubtitle:t5,formLabel:n5,formError:r5,submitButton:u5,submitButtonAntistock:a5,backButton:i5,otpContainer:s5,otpSlots:o5,otpSlot:c5,active:l5,otpSlotEmpty:d5,actionRow:f5,authForm:h5,formHeader:p5,input:m5},g5=P.forwardRef(({value:e,onChange:t,onComplete:n},r)=>s.jsx(Kl,{ref:r,value:e,onChange:t,onComplete:n,maxLength:6,containerClassName:Ye.otpContainer,render:({slots:u})=>s.jsx("div",{className:Ye.otpSlots,children:u.map(a=>s.jsx(b5,{...a},crypto.randomUUID()))})}));function b5({char:e,isActive:t}){return s.jsx("div",{className:b.clx(Ye.otpSlot,{[Ye.active]:t}),children:e?s.jsx("div",{children:e}):s.jsx("div",{className:Ye.otpSlotEmpty,children:"0"})})}const _5=e=>{const t=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return e.trim()?t.test(e)?null:"Please enter a valid email.":"The email field cannot be empty."},x5=e=>/^[0-9]{6}$/.test(e)?null:"Invalid verification code. The code should be a six-digit number. Please try again",Ql=({title:e,subtitle:t,isAntistock:n})=>s.jsxs("div",{className:Ye.formHeader,style:{textAlign:n?"center":void 0},children:[s.jsx("h3",{id:"h3",className:Ye.formHeaderTitle,children:e}),t?s.jsx("div",{className:Ye.formHeaderSubtitle,children:t}):null]}),Jl=({error:e})=>e?s.jsx("div",{className:Ye.formError,children:e}):null,e0=()=>{const[e,t]=P.useState(""),[n,r]=P.useState(null),[u,a]=P.useState(!1),{executeRecaptcha:i}=ou(),{setOtpRequest:o}=b.useCustomerDashboardStore(),{isAntistock:c}=b.useGeneralStore(),l=async h=>{h.preventDefault(),r(null);const f=_5(e);if(f){r(f);return}a(!0);try{const m=await i();if(!m)throw new Error("ReCaptcha verification failed");await Kc({email:e,recaptcha:m,tsId:b.useGetTsId()}),o({requested:!0,email:e})}catch{r("Failed to request OTP. Please try again.")}finally{a(!1)}};return s.jsxs("form",{onSubmit:l,className:Ye.authForm,children:[s.jsx(Ql,{title:c?"My Account":"Sign In",subtitle:c?"":"To continue, enter your email address below.",isAntistock:c}),s.jsxs("div",{className:Ye.input,children:[s.jsx(w.Input,{label:c?"Email":"Email Address",placeholder:"your@email.com",value:e,onChange:h=>{t(h),r(null)}}),s.jsx(Jl,{error:n})]}),s.jsx(w.Button,{type:"Primary",className:c?Ye.submitButtonAntistock:Ye.submitButton,disabled:u,children:u?c?s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[s.jsx(w.Loader,{}),s.jsx("span",{children:"Continue"})]}):s.jsx(w.Loader,{}):c?"Continue":"Sign In"}),s.jsx("span",{style:{color:"var(--text-secondary)",paddingTop:"8px",fontSize:"var(--font-body-md-size)",textAlign:"center"},children:"You will receive a 6-digit account code via email."})]})},t0=({onSignIn:e})=>{const{otpRequest:t,setOtpRequest:n}=b.useCustomerDashboardStore(),{isAntistock:r}=b.useGeneralStore(),[u,a]=P.useState(""),[i,o]=P.useState(null),[c,l]=P.useState(!1),{executeRecaptcha:h}=ou(),f=async()=>{o(null);const p=x5(u);if(p){o(p);return}l(!0);try{const g=await h();if(!g)throw new Error("ReCaptcha verification failed");await Qc({email:t.email,otp:u,recaptcha:g||"",tsId:b.useGetTsId()}),e&&e()}catch{o("Invalid OTP. Please try again.")}finally{l(!1)}},m=()=>n({requested:!1,email:""});return s.jsxs("form",{onSubmit:f,className:Ye.authForm,children:[s.jsx(Ql,{title:"Check Your Email",subtitle:`Enter the 6-digit code we sent to ${t.email}`,isAntistock:r}),s.jsxs("label",{className:Ye.formLabel,children:["Code",s.jsx(g5,{onChange:p=>{a(p),o(null)},value:u,onComplete:f})]}),s.jsx(Jl,{error:i}),s.jsxs("div",{className:Ye.actionRow,children:[s.jsx(w.Button,{onClick:m,type:"Secondary",className:Ye.backButton,children:"Back"}),s.jsx(w.Button,{type:"Primary",className:r?Ye.submitButtonAntistock:Ye.submitButton,disabled:c,children:c?s.jsx(w.Loader,{}):r?"Continue":"Sign In"})]})]})},us=({inModal:e,onSignIn:t})=>{const{otpRequest:n,setOtpRequest:r}=b.useCustomerDashboardStore();return P.useEffect(()=>{n.requested&&r({requested:!1,email:""})},[]),s.jsx("div",{className:Ye.authContainer,children:n?s.jsx("div",{className:b.clx(Ye.authWrapper,e&&Ye.inModal),children:n.requested?s.jsx(t0,{onSignIn:t}):s.jsx(e0,{})}):s.jsx(w.Loader,{})})};function C5(){const e=new URL(window.location.href);window.history.replaceState(null,"",e.pathname+e.hash)}var as=(e=>(e.ADD_BALANCE="AddBalance",e))(as||{});function E5(){const e=new URLSearchParams(document.location.search),t=e.get("page"),n=e.get("action");return{page:t,action:n}}function T5(){const{page:e,action:t}=E5(),{setRoute:n,setAction:r}=b.useCustomerDashboardStore.getState();e&&Object.values(b.Routes).includes(e)&&n(e),t&&Object.values(as).includes(t)&&r(t),C5()}const y5=()=>typeof b.Routes>"u"?(console.warn("Routes not available for RouteToRouteComponent"),{}):{[b.Routes.Home]:Zl,[b.Routes.Orders]:Yc.Orders,[b.Routes.Rewards]:Wl,[b.Routes.Balance]:zl,[b.Routes.Subscriptions]:$d.Subscriptions,[b.Routes.Tickets]:Wc.Tickets},k5=()=>typeof b.Routes>"u"?(console.warn("Routes not available for RouteToAntistockRouteComponent"),{}):{[b.Routes.Home]:Zl,[b.Routes.Orders]:Yc.Orders,[b.Routes.Rewards]:Wl,[b.Routes.Balance]:zl,[b.Routes.Tickets]:Wc.Tickets},A5=()=>{const{route:e,action:t,setRoute:n,setIsBalanceModalOpen:r}=b.useCustomerDashboardStore(),{resetPage:u}=b.usePaginationPagesStore(),{token:a}=b.useStorefrontStore(),{isAntistock:i}=b.useGeneralStore(),o=i?k5()[e]:y5()[e];return P.useEffect(()=>{u(),T5()},[a,e,u]),P.useEffect(()=>{t===as.ADD_BALANCE&&e===b.Routes.Balance&&r(!0)},[e,t]),P.useEffect(()=>{window.location.pathname.includes("/ticket")&&n(b.Routes.Tickets)},[window.location.pathname]),a?s.jsx("div",{style:{maxWidth:"var(--max-width-store)",margin:"0 auto",height:"100%"},children:s.jsx(w.Wrapper,{notPadding:!0,style:{height:"100%"},maxWidth:"var(--max-width-store)",children:c=>s.jsxs("main",{className:b.clx($n.appContainer,{[$n.mobile]:c!=="desktop",[$n.noAnimation]:i,[$n.appContainerAntistock]:i}),children:[s.jsx(Ol,{adaptiveStyles:c}),s.jsx("div",{className:b.clx($n.contentContainer,{[$n.mobile]:c!=="desktop",[$n.contentContainerAntistock]:i}),children:s.jsx(o,{adaptiveStyles:c})})]})})}):s.jsx(us,{})},S5=()=>s.jsx(Gi,{children:s.jsx(A5,{})}),I5="_referralBlock_kla2r_2",N5="_skeleton_kla2r_3",v5="_mobile_kla2r_13",w5="_referralContainer_kla2r_18",D5="_title_kla2r_30",L5="_description_kla2r_36",P5="_linkContainer_kla2r_56",R5="_modalContainer_kla2r_77",O5="_steps_kla2r_86",M5="_joinButton_kla2r_92",F5="_stepItem_kla2r_97",B5="_iconContainer_kla2r_103",j5="_index_kla2r_111",H5="_bar_kla2r_123",U5="_content_kla2r_130",V5="_caption_kla2r_135",$5="_descriptionStep_kla2r_141",z5="_error_kla2r_151",q5="_infoBlock_kla2r_155",Z5="_infoIcon_kla2r_164",W5="_infoText_kla2r_173",Y5="_actions_kla2r_178",G5="_cancelButton_kla2r_183",X5="_referralStats_kla2r_187",K5="_referralInfo_kla2r_204",Q5="_referralStatsItem_kla2r_210",J5="_referralStatsItemValue_kla2r_220",em="_referralStatsItemLabel_kla2r_225",tm="_referral_kla2r_2",nm="_header_kla2r_244",rm="_contentModal_kla2r_254",fe={referralBlock:I5,skeleton:N5,mobile:v5,referralContainer:w5,title:D5,description:L5,linkContainer:P5,modalContainer:R5,steps:O5,joinButton:M5,stepItem:F5,iconContainer:B5,index:j5,bar:H5,content:U5,caption:V5,descriptionStep:$5,error:z5,infoBlock:q5,infoIcon:Z5,infoText:W5,actions:Y5,cancelButton:G5,referralStats:X5,referralInfo:K5,referralStatsItem:Q5,referralStatsItemValue:J5,referralStatsItemLabel:em,referral:tm,header:nm,contentModal:rm},um=({caption:e,description:t,index:n,bar:r=!0})=>s.jsxs("div",{className:fe.stepItem,children:[s.jsxs("div",{className:fe.iconContainer,children:[s.jsx("div",{className:fe.index,children:n}),r&&s.jsx("div",{className:fe.bar})]}),s.jsxs("div",{className:fe.content,children:[s.jsx("div",{className:fe.caption,children:e}),s.jsx("div",{className:fe.descriptionStep,children:t})]})]}),am=({setIsOpen:e,setIsLoading:t})=>{const[n,r]=P.useState(""),[u,a]=P.useState(""),{notifications:i,setNotifications:o}=b.useNotificationStore(),{setIsOpen:c}=b.useModalStore(),l=async f=>{if(f.preventDefault(),n.length<3){a("Referral Code should have minimum length of 3");return}t(!0),h();try{await w2({referralCode:n}),o([...i,{message:"Referral Code has been applied",status:"success",id:b.v4()}])}catch(m){const p=m;o([...i,{message:p.message,status:"error",id:b.v4()}])}t(!1),e(!1),r(""),a("")},h=()=>{c(!1),setTimeout(()=>{e(!1)},300)};return s.jsxs("div",{onClick:f=>f.stopPropagation(),className:fe.modalContainer,children:[s.jsxs("div",{className:fe.header,children:[s.jsx("div",{id:"h3",children:"Create an affiliate code"}),s.jsx(w.Icon,{name:"X",onClick:h,hoverable:!0,fill:"var(--text-primary)"})]}),s.jsxs("div",{className:fe.contentModal,children:[s.jsx(w.Input,{value:n,onChange:f=>r(f),placeholder:"Enter code here (e.g., Join)",label:"Affiliate Code"}),u&&s.jsx("div",{className:fe.error,children:u}),s.jsxs("div",{className:fe.infoBlock,children:[s.jsx("div",{className:fe.infoIcon,children:s.jsx(w.Icon,{name:"Info"})}),s.jsx("div",{className:fe.infoText,children:"Once you join our referral program, you'll gain access to special deals, rewards, and potentially earn a percentage (%) of revenue."})]}),s.jsxs("div",{className:fe.actions,children:[s.jsx(w.Button,{type:"Secondary",className:fe.cancelButton,onClick:h,children:"Cancel"}),s.jsx(w.Button,{type:"Primary",onClick:l,children:"Create"})]})]})]})},Nu=()=>s.jsx("div",{style:{display:"flex",alignItems:"center",width:"100%"},children:s.jsxs("svg",{width:"100%",height:"64",viewBox:"0 0 208 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsxs("g",{clipPath:"url(#clip0_2098_5511)",children:[s.jsx("mask",{id:"path-1-inside-1_2098_5511",fill:"white",children:s.jsx("path",{d:"M0 0H208V16H0V0Z"})}),s.jsx("path",{d:"M208 16.5C208.276 16.5 208.5 16.2761 208.5 16C208.5 15.7239 208.276 15.5 208 15.5V16.5ZM0 15.5C-0.276142 15.5 -0.5 15.7239 -0.5 16C-0.5 16.2761 -0.276142 16.5 0 16.5V15.5ZM4 16.5C4.27614 16.5 4.5 16.2761 4.5 16C4.5 15.7239 4.27614 15.5 4 15.5V16.5ZM12 15.5C11.7239 15.5 11.5 15.7239 11.5 16C11.5 16.2761 11.7239 16.5 12 16.5V15.5ZM20 16.5C20.2761 16.5 20.5 16.2761 20.5 16C20.5 15.7239 20.2761 15.5 20 15.5V16.5ZM28 15.5C27.7239 15.5 27.5 15.7239 27.5 16C27.5 16.2761 27.7239 16.5 28 16.5V15.5ZM36 16.5C36.2761 16.5 36.5 16.2761 36.5 16C36.5 15.7239 36.2761 15.5 36 15.5V16.5ZM44 15.5C43.7239 15.5 43.5 15.7239 43.5 16C43.5 16.2761 43.7239 16.5 44 16.5V15.5ZM52 16.5C52.2761 16.5 52.5 16.2761 52.5 16C52.5 15.7239 52.2761 15.5 52 15.5V16.5ZM60 15.5C59.7239 15.5 59.5 15.7239 59.5 16C59.5 16.2761 59.7239 16.5 60 16.5V15.5ZM68 16.5C68.2761 16.5 68.5 16.2761 68.5 16C68.5 15.7239 68.2761 15.5 68 15.5V16.5ZM76 15.5C75.7239 15.5 75.5 15.7239 75.5 16C75.5 16.2761 75.7239 16.5 76 16.5V15.5ZM84 16.5C84.2761 16.5 84.5 16.2761 84.5 16C84.5 15.7239 84.2761 15.5 84 15.5V16.5ZM92 15.5C91.7239 15.5 91.5 15.7239 91.5 16C91.5 16.2761 91.7239 16.5 92 16.5V15.5ZM100 16.5C100.276 16.5 100.5 16.2761 100.5 16C100.5 15.7239 100.276 15.5 100 15.5V16.5ZM108 15.5C107.724 15.5 107.5 15.7239 107.5 16C107.5 16.2761 107.724 16.5 108 16.5V15.5ZM116 16.5C116.276 16.5 116.5 16.2761 116.5 16C116.5 15.7239 116.276 15.5 116 15.5V16.5ZM124 15.5C123.724 15.5 123.5 15.7239 123.5 16C123.5 16.2761 123.724 16.5 124 16.5V15.5ZM132 16.5C132.276 16.5 132.5 16.2761 132.5 16C132.5 15.7239 132.276 15.5 132 15.5V16.5ZM140 15.5C139.724 15.5 139.5 15.7239 139.5 16C139.5 16.2761 139.724 16.5 140 16.5V15.5ZM148 16.5C148.276 16.5 148.5 16.2761 148.5 16C148.5 15.7239 148.276 15.5 148 15.5V16.5ZM156 15.5C155.724 15.5 155.5 15.7239 155.5 16C155.5 16.2761 155.724 16.5 156 16.5V15.5ZM164 16.5C164.276 16.5 164.5 16.2761 164.5 16C164.5 15.7239 164.276 15.5 164 15.5V16.5ZM172 15.5C171.724 15.5 171.5 15.7239 171.5 16C171.5 16.2761 171.724 16.5 172 16.5V15.5ZM180 16.5C180.276 16.5 180.5 16.2761 180.5 16C180.5 15.7239 180.276 15.5 180 15.5V16.5ZM188 15.5C187.724 15.5 187.5 15.7239 187.5 16C187.5 16.2761 187.724 16.5 188 16.5V15.5ZM196 16.5C196.276 16.5 196.5 16.2761 196.5 16C196.5 15.7239 196.276 15.5 196 15.5V16.5ZM204 15.5C203.724 15.5 203.5 15.7239 203.5 16C203.5 16.2761 203.724 16.5 204 16.5V15.5ZM0 16.5H4V15.5H0V16.5ZM12 16.5H20V15.5H12V16.5ZM28 16.5H36V15.5H28V16.5ZM44 16.5H52V15.5H44V16.5ZM60 16.5H68V15.5H60V16.5ZM76 16.5H84V15.5H76V16.5ZM92 16.5H100V15.5H92V16.5ZM108 16.5H116V15.5H108V16.5ZM124 16.5H132V15.5H124V16.5ZM140 16.5H148V15.5H140V16.5ZM156 16.5H164V15.5H156V16.5ZM172 16.5H180V15.5H172V16.5ZM188 16.5H196V15.5H188V16.5ZM204 16.5H208V15.5H204V16.5ZM208 17C208.552 17 209 16.5523 209 16C209 15.4477 208.552 15 208 15V17ZM0 15C-0.552285 15 -1 15.4477 -1 16C-1 16.5523 -0.552285 17 0 17V15ZM4 17C4.55228 17 5 16.5523 5 16C5 15.4477 4.55228 15 4 15V17ZM12 15C11.4477 15 11 15.4477 11 16C11 16.5523 11.4477 17 12 17V15ZM20 17C20.5523 17 21 16.5523 21 16C21 15.4477 20.5523 15 20 15V17ZM28 15C27.4477 15 27 15.4477 27 16C27 16.5523 27.4477 17 28 17V15ZM36 17C36.5523 17 37 16.5523 37 16C37 15.4477 36.5523 15 36 15V17ZM44 15C43.4477 15 43 15.4477 43 16C43 16.5523 43.4477 17 44 17V15ZM52 17C52.5523 17 53 16.5523 53 16C53 15.4477 52.5523 15 52 15V17ZM60 15C59.4477 15 59 15.4477 59 16C59 16.5523 59.4477 17 60 17V15ZM68 17C68.5523 17 69 16.5523 69 16C69 15.4477 68.5523 15 68 15V17ZM76 15C75.4477 15 75 15.4477 75 16C75 16.5523 75.4477 17 76 17V15ZM84 17C84.5523 17 85 16.5523 85 16C85 15.4477 84.5523 15 84 15V17ZM92 15C91.4477 15 91 15.4477 91 16C91 16.5523 91.4477 17 92 17V15ZM100 17C100.552 17 101 16.5523 101 16C101 15.4477 100.552 15 100 15V17ZM108 15C107.448 15 107 15.4477 107 16C107 16.5523 107.448 17 108 17V15ZM116 17C116.552 17 117 16.5523 117 16C117 15.4477 116.552 15 116 15V17ZM124 15C123.448 15 123 15.4477 123 16C123 16.5523 123.448 17 124 17V15ZM132 17C132.552 17 133 16.5523 133 16C133 15.4477 132.552 15 132 15V17ZM140 15C139.448 15 139 15.4477 139 16C139 16.5523 139.448 17 140 17V15ZM148 17C148.552 17 149 16.5523 149 16C149 15.4477 148.552 15 148 15V17ZM156 15C155.448 15 155 15.4477 155 16C155 16.5523 155.448 17 156 17V15ZM164 17C164.552 17 165 16.5523 165 16C165 15.4477 164.552 15 164 15V17ZM172 15C171.448 15 171 15.4477 171 16C171 16.5523 171.448 17 172 17V15ZM180 17C180.552 17 181 16.5523 181 16C181 15.4477 180.552 15 180 15V17ZM188 15C187.448 15 187 15.4477 187 16C187 16.5523 187.448 17 188 17V15ZM196 17C196.552 17 197 16.5523 197 16C197 15.4477 196.552 15 196 15V17ZM204 15C203.448 15 203 15.4477 203 16C203 16.5523 203.448 17 204 17V15ZM0 17H4V15H0V17ZM12 17H20V15H12V17ZM28 17H36V15H28V17ZM44 17H52V15H44V17ZM60 17H68V15H60V17ZM76 17H84V15H76V17ZM92 17H100V15H92V17ZM108 17H116V15H108V17ZM124 17H132V15H124V17ZM140 17H148V15H140V17ZM156 17H164V15H156V17ZM172 17H180V15H172V17ZM188 17H196V15H188V17ZM204 17H208V15H204V17Z",fill:"#F8F8F8",mask:"url(#path-1-inside-1_2098_5511)"}),s.jsx("mask",{id:"path-3-inside-2_2098_5511",fill:"white",children:s.jsx("path",{d:"M0 16H208V32H0V16Z"})}),s.jsx("path",{d:"M208 32.5C208.276 32.5 208.5 32.2761 208.5 32C208.5 31.7239 208.276 31.5 208 31.5V32.5ZM0 31.5C-0.276142 31.5 -0.5 31.7239 -0.5 32C-0.5 32.2761 -0.276142 32.5 0 32.5V31.5ZM4 32.5C4.27614 32.5 4.5 32.2761 4.5 32C4.5 31.7239 4.27614 31.5 4 31.5V32.5ZM12 31.5C11.7239 31.5 11.5 31.7239 11.5 32C11.5 32.2761 11.7239 32.5 12 32.5V31.5ZM20 32.5C20.2761 32.5 20.5 32.2761 20.5 32C20.5 31.7239 20.2761 31.5 20 31.5V32.5ZM28 31.5C27.7239 31.5 27.5 31.7239 27.5 32C27.5 32.2761 27.7239 32.5 28 32.5V31.5ZM36 32.5C36.2761 32.5 36.5 32.2761 36.5 32C36.5 31.7239 36.2761 31.5 36 31.5V32.5ZM44 31.5C43.7239 31.5 43.5 31.7239 43.5 32C43.5 32.2761 43.7239 32.5 44 32.5V31.5ZM52 32.5C52.2761 32.5 52.5 32.2761 52.5 32C52.5 31.7239 52.2761 31.5 52 31.5V32.5ZM60 31.5C59.7239 31.5 59.5 31.7239 59.5 32C59.5 32.2761 59.7239 32.5 60 32.5V31.5ZM68 32.5C68.2761 32.5 68.5 32.2761 68.5 32C68.5 31.7239 68.2761 31.5 68 31.5V32.5ZM76 31.5C75.7239 31.5 75.5 31.7239 75.5 32C75.5 32.2761 75.7239 32.5 76 32.5V31.5ZM84 32.5C84.2761 32.5 84.5 32.2761 84.5 32C84.5 31.7239 84.2761 31.5 84 31.5V32.5ZM92 31.5C91.7239 31.5 91.5 31.7239 91.5 32C91.5 32.2761 91.7239 32.5 92 32.5V31.5ZM100 32.5C100.276 32.5 100.5 32.2761 100.5 32C100.5 31.7239 100.276 31.5 100 31.5V32.5ZM108 31.5C107.724 31.5 107.5 31.7239 107.5 32C107.5 32.2761 107.724 32.5 108 32.5V31.5ZM116 32.5C116.276 32.5 116.5 32.2761 116.5 32C116.5 31.7239 116.276 31.5 116 31.5V32.5ZM124 31.5C123.724 31.5 123.5 31.7239 123.5 32C123.5 32.2761 123.724 32.5 124 32.5V31.5ZM132 32.5C132.276 32.5 132.5 32.2761 132.5 32C132.5 31.7239 132.276 31.5 132 31.5V32.5ZM140 31.5C139.724 31.5 139.5 31.7239 139.5 32C139.5 32.2761 139.724 32.5 140 32.5V31.5ZM148 32.5C148.276 32.5 148.5 32.2761 148.5 32C148.5 31.7239 148.276 31.5 148 31.5V32.5ZM156 31.5C155.724 31.5 155.5 31.7239 155.5 32C155.5 32.2761 155.724 32.5 156 32.5V31.5ZM164 32.5C164.276 32.5 164.5 32.2761 164.5 32C164.5 31.7239 164.276 31.5 164 31.5V32.5ZM172 31.5C171.724 31.5 171.5 31.7239 171.5 32C171.5 32.2761 171.724 32.5 172 32.5V31.5ZM180 32.5C180.276 32.5 180.5 32.2761 180.5 32C180.5 31.7239 180.276 31.5 180 31.5V32.5ZM188 31.5C187.724 31.5 187.5 31.7239 187.5 32C187.5 32.2761 187.724 32.5 188 32.5V31.5ZM196 32.5C196.276 32.5 196.5 32.2761 196.5 32C196.5 31.7239 196.276 31.5 196 31.5V32.5ZM204 31.5C203.724 31.5 203.5 31.7239 203.5 32C203.5 32.2761 203.724 32.5 204 32.5V31.5ZM0 32.5H4V31.5H0V32.5ZM12 32.5H20V31.5H12V32.5ZM28 32.5H36V31.5H28V32.5ZM44 32.5H52V31.5H44V32.5ZM60 32.5H68V31.5H60V32.5ZM76 32.5H84V31.5H76V32.5ZM92 32.5H100V31.5H92V32.5ZM108 32.5H116V31.5H108V32.5ZM124 32.5H132V31.5H124V32.5ZM140 32.5H148V31.5H140V32.5ZM156 32.5H164V31.5H156V32.5ZM172 32.5H180V31.5H172V32.5ZM188 32.5H196V31.5H188V32.5ZM204 32.5H208V31.5H204V32.5ZM208 33C208.552 33 209 32.5523 209 32C209 31.4477 208.552 31 208 31V33ZM0 31C-0.552285 31 -1 31.4477 -1 32C-1 32.5523 -0.552285 33 0 33V31ZM4 33C4.55228 33 5 32.5523 5 32C5 31.4477 4.55228 31 4 31V33ZM12 31C11.4477 31 11 31.4477 11 32C11 32.5523 11.4477 33 12 33V31ZM20 33C20.5523 33 21 32.5523 21 32C21 31.4477 20.5523 31 20 31V33ZM28 31C27.4477 31 27 31.4477 27 32C27 32.5523 27.4477 33 28 33V31ZM36 33C36.5523 33 37 32.5523 37 32C37 31.4477 36.5523 31 36 31V33ZM44 31C43.4477 31 43 31.4477 43 32C43 32.5523 43.4477 33 44 33V31ZM52 33C52.5523 33 53 32.5523 53 32C53 31.4477 52.5523 31 52 31V33ZM60 31C59.4477 31 59 31.4477 59 32C59 32.5523 59.4477 33 60 33V31ZM68 33C68.5523 33 69 32.5523 69 32C69 31.4477 68.5523 31 68 31V33ZM76 31C75.4477 31 75 31.4477 75 32C75 32.5523 75.4477 33 76 33V31ZM84 33C84.5523 33 85 32.5523 85 32C85 31.4477 84.5523 31 84 31V33ZM92 31C91.4477 31 91 31.4477 91 32C91 32.5523 91.4477 33 92 33V31ZM100 33C100.552 33 101 32.5523 101 32C101 31.4477 100.552 31 100 31V33ZM108 31C107.448 31 107 31.4477 107 32C107 32.5523 107.448 33 108 33V31ZM116 33C116.552 33 117 32.5523 117 32C117 31.4477 116.552 31 116 31V33ZM124 31C123.448 31 123 31.4477 123 32C123 32.5523 123.448 33 124 33V31ZM132 33C132.552 33 133 32.5523 133 32C133 31.4477 132.552 31 132 31V33ZM140 31C139.448 31 139 31.4477 139 32C139 32.5523 139.448 33 140 33V31ZM148 33C148.552 33 149 32.5523 149 32C149 31.4477 148.552 31 148 31V33ZM156 31C155.448 31 155 31.4477 155 32C155 32.5523 155.448 33 156 33V31ZM164 33C164.552 33 165 32.5523 165 32C165 31.4477 164.552 31 164 31V33ZM172 31C171.448 31 171 31.4477 171 32C171 32.5523 171.448 33 172 33V31ZM180 33C180.552 33 181 32.5523 181 32C181 31.4477 180.552 31 180 31V33ZM188 31C187.448 31 187 31.4477 187 32C187 32.5523 187.448 33 188 33V31ZM196 33C196.552 33 197 32.5523 197 32C197 31.4477 196.552 31 196 31V33ZM204 31C203.448 31 203 31.4477 203 32C203 32.5523 203.448 33 204 33V31ZM0 33H4V31H0V33ZM12 33H20V31H12V33ZM28 33H36V31H28V33ZM44 33H52V31H44V33ZM60 33H68V31H60V33ZM76 33H84V31H76V33ZM92 33H100V31H92V33ZM108 33H116V31H108V33ZM124 33H132V31H124V33ZM140 33H148V31H140V33ZM156 33H164V31H156V33ZM172 33H180V31H172V33ZM188 33H196V31H188V33ZM204 33H208V31H204V33Z",fill:"#F8F8F8",mask:"url(#path-3-inside-2_2098_5511)"}),s.jsx("mask",{id:"path-5-inside-3_2098_5511",fill:"white",children:s.jsx("path",{d:"M0 32H208V48H0V32Z"})}),s.jsx("path",{d:"M208 48.5C208.276 48.5 208.5 48.2761 208.5 48C208.5 47.7239 208.276 47.5 208 47.5V48.5ZM0 47.5C-0.276142 47.5 -0.5 47.7239 -0.5 48C-0.5 48.2761 -0.276142 48.5 0 48.5V47.5ZM4 48.5C4.27614 48.5 4.5 48.2761 4.5 48C4.5 47.7239 4.27614 47.5 4 47.5V48.5ZM12 47.5C11.7239 47.5 11.5 47.7239 11.5 48C11.5 48.2761 11.7239 48.5 12 48.5V47.5ZM20 48.5C20.2761 48.5 20.5 48.2761 20.5 48C20.5 47.7239 20.2761 47.5 20 47.5V48.5ZM28 47.5C27.7239 47.5 27.5 47.7239 27.5 48C27.5 48.2761 27.7239 48.5 28 48.5V47.5ZM36 48.5C36.2761 48.5 36.5 48.2761 36.5 48C36.5 47.7239 36.2761 47.5 36 47.5V48.5ZM44 47.5C43.7239 47.5 43.5 47.7239 43.5 48C43.5 48.2761 43.7239 48.5 44 48.5V47.5ZM52 48.5C52.2761 48.5 52.5 48.2761 52.5 48C52.5 47.7239 52.2761 47.5 52 47.5V48.5ZM60 47.5C59.7239 47.5 59.5 47.7239 59.5 48C59.5 48.2761 59.7239 48.5 60 48.5V47.5ZM68 48.5C68.2761 48.5 68.5 48.2761 68.5 48C68.5 47.7239 68.2761 47.5 68 47.5V48.5ZM76 47.5C75.7239 47.5 75.5 47.7239 75.5 48C75.5 48.2761 75.7239 48.5 76 48.5V47.5ZM84 48.5C84.2761 48.5 84.5 48.2761 84.5 48C84.5 47.7239 84.2761 47.5 84 47.5V48.5ZM92 47.5C91.7239 47.5 91.5 47.7239 91.5 48C91.5 48.2761 91.7239 48.5 92 48.5V47.5ZM100 48.5C100.276 48.5 100.5 48.2761 100.5 48C100.5 47.7239 100.276 47.5 100 47.5V48.5ZM108 47.5C107.724 47.5 107.5 47.7239 107.5 48C107.5 48.2761 107.724 48.5 108 48.5V47.5ZM116 48.5C116.276 48.5 116.5 48.2761 116.5 48C116.5 47.7239 116.276 47.5 116 47.5V48.5ZM124 47.5C123.724 47.5 123.5 47.7239 123.5 48C123.5 48.2761 123.724 48.5 124 48.5V47.5ZM132 48.5C132.276 48.5 132.5 48.2761 132.5 48C132.5 47.7239 132.276 47.5 132 47.5V48.5ZM140 47.5C139.724 47.5 139.5 47.7239 139.5 48C139.5 48.2761 139.724 48.5 140 48.5V47.5ZM148 48.5C148.276 48.5 148.5 48.2761 148.5 48C148.5 47.7239 148.276 47.5 148 47.5V48.5ZM156 47.5C155.724 47.5 155.5 47.7239 155.5 48C155.5 48.2761 155.724 48.5 156 48.5V47.5ZM164 48.5C164.276 48.5 164.5 48.2761 164.5 48C164.5 47.7239 164.276 47.5 164 47.5V48.5ZM172 47.5C171.724 47.5 171.5 47.7239 171.5 48C171.5 48.2761 171.724 48.5 172 48.5V47.5ZM180 48.5C180.276 48.5 180.5 48.2761 180.5 48C180.5 47.7239 180.276 47.5 180 47.5V48.5ZM188 47.5C187.724 47.5 187.5 47.7239 187.5 48C187.5 48.2761 187.724 48.5 188 48.5V47.5ZM196 48.5C196.276 48.5 196.5 48.2761 196.5 48C196.5 47.7239 196.276 47.5 196 47.5V48.5ZM204 47.5C203.724 47.5 203.5 47.7239 203.5 48C203.5 48.2761 203.724 48.5 204 48.5V47.5ZM0 48.5H4V47.5H0V48.5ZM12 48.5H20V47.5H12V48.5ZM28 48.5H36V47.5H28V48.5ZM44 48.5H52V47.5H44V48.5ZM60 48.5H68V47.5H60V48.5ZM76 48.5H84V47.5H76V48.5ZM92 48.5H100V47.5H92V48.5ZM108 48.5H116V47.5H108V48.5ZM124 48.5H132V47.5H124V48.5ZM140 48.5H148V47.5H140V48.5ZM156 48.5H164V47.5H156V48.5ZM172 48.5H180V47.5H172V48.5ZM188 48.5H196V47.5H188V48.5ZM204 48.5H208V47.5H204V48.5ZM208 49C208.552 49 209 48.5523 209 48C209 47.4477 208.552 47 208 47V49ZM0 47C-0.552285 47 -1 47.4477 -1 48C-1 48.5523 -0.552285 49 0 49V47ZM4 49C4.55228 49 5 48.5523 5 48C5 47.4477 4.55228 47 4 47V49ZM12 47C11.4477 47 11 47.4477 11 48C11 48.5523 11.4477 49 12 49V47ZM20 49C20.5523 49 21 48.5523 21 48C21 47.4477 20.5523 47 20 47V49ZM28 47C27.4477 47 27 47.4477 27 48C27 48.5523 27.4477 49 28 49V47ZM36 49C36.5523 49 37 48.5523 37 48C37 47.4477 36.5523 47 36 47V49ZM44 47C43.4477 47 43 47.4477 43 48C43 48.5523 43.4477 49 44 49V47ZM52 49C52.5523 49 53 48.5523 53 48C53 47.4477 52.5523 47 52 47V49ZM60 47C59.4477 47 59 47.4477 59 48C59 48.5523 59.4477 49 60 49V47ZM68 49C68.5523 49 69 48.5523 69 48C69 47.4477 68.5523 47 68 47V49ZM76 47C75.4477 47 75 47.4477 75 48C75 48.5523 75.4477 49 76 49V47ZM84 49C84.5523 49 85 48.5523 85 48C85 47.4477 84.5523 47 84 47V49ZM92 47C91.4477 47 91 47.4477 91 48C91 48.5523 91.4477 49 92 49V47ZM100 49C100.552 49 101 48.5523 101 48C101 47.4477 100.552 47 100 47V49ZM108 47C107.448 47 107 47.4477 107 48C107 48.5523 107.448 49 108 49V47ZM116 49C116.552 49 117 48.5523 117 48C117 47.4477 116.552 47 116 47V49ZM124 47C123.448 47 123 47.4477 123 48C123 48.5523 123.448 49 124 49V47ZM132 49C132.552 49 133 48.5523 133 48C133 47.4477 132.552 47 132 47V49ZM140 47C139.448 47 139 47.4477 139 48C139 48.5523 139.448 49 140 49V47ZM148 49C148.552 49 149 48.5523 149 48C149 47.4477 148.552 47 148 47V49ZM156 47C155.448 47 155 47.4477 155 48C155 48.5523 155.448 49 156 49V47ZM164 49C164.552 49 165 48.5523 165 48C165 47.4477 164.552 47 164 47V49ZM172 47C171.448 47 171 47.4477 171 48C171 48.5523 171.448 49 172 49V47ZM180 49C180.552 49 181 48.5523 181 48C181 47.4477 180.552 47 180 47V49ZM188 47C187.448 47 187 47.4477 187 48C187 48.5523 187.448 49 188 49V47ZM196 49C196.552 49 197 48.5523 197 48C197 47.4477 196.552 47 196 47V49ZM204 47C203.448 47 203 47.4477 203 48C203 48.5523 203.448 49 204 49V47ZM0 49H4V47H0V49ZM12 49H20V47H12V49ZM28 49H36V47H28V49ZM44 49H52V47H44V49ZM60 49H68V47H60V49ZM76 49H84V47H76V49ZM92 49H100V47H92V49ZM108 49H116V47H108V49ZM124 49H132V47H124V49ZM140 49H148V47H140V49ZM156 49H164V47H156V49ZM172 49H180V47H172V49ZM188 49H196V47H188V49ZM204 49H208V47H204V49Z",fill:"#F8F8F8",mask:"url(#path-5-inside-3_2098_5511)"}),s.jsx("mask",{id:"path-7-inside-4_2098_5511",fill:"white",children:s.jsx("path",{d:"M0 48H208V64H0V48Z"})}),s.jsx("path",{d:"M208 64.5C208.276 64.5 208.5 64.2761 208.5 64C208.5 63.7239 208.276 63.5 208 63.5V64.5ZM0 63.5C-0.276142 63.5 -0.5 63.7239 -0.5 64C-0.5 64.2761 -0.276142 64.5 0 64.5V63.5ZM4 64.5C4.27614 64.5 4.5 64.2761 4.5 64C4.5 63.7239 4.27614 63.5 4 63.5V64.5ZM12 63.5C11.7239 63.5 11.5 63.7239 11.5 64C11.5 64.2761 11.7239 64.5 12 64.5V63.5ZM20 64.5C20.2761 64.5 20.5 64.2761 20.5 64C20.5 63.7239 20.2761 63.5 20 63.5V64.5ZM28 63.5C27.7239 63.5 27.5 63.7239 27.5 64C27.5 64.2761 27.7239 64.5 28 64.5V63.5ZM36 64.5C36.2761 64.5 36.5 64.2761 36.5 64C36.5 63.7239 36.2761 63.5 36 63.5V64.5ZM44 63.5C43.7239 63.5 43.5 63.7239 43.5 64C43.5 64.2761 43.7239 64.5 44 64.5V63.5ZM52 64.5C52.2761 64.5 52.5 64.2761 52.5 64C52.5 63.7239 52.2761 63.5 52 63.5V64.5ZM60 63.5C59.7239 63.5 59.5 63.7239 59.5 64C59.5 64.2761 59.7239 64.5 60 64.5V63.5ZM68 64.5C68.2761 64.5 68.5 64.2761 68.5 64C68.5 63.7239 68.2761 63.5 68 63.5V64.5ZM76 63.5C75.7239 63.5 75.5 63.7239 75.5 64C75.5 64.2761 75.7239 64.5 76 64.5V63.5ZM84 64.5C84.2761 64.5 84.5 64.2761 84.5 64C84.5 63.7239 84.2761 63.5 84 63.5V64.5ZM92 63.5C91.7239 63.5 91.5 63.7239 91.5 64C91.5 64.2761 91.7239 64.5 92 64.5V63.5ZM100 64.5C100.276 64.5 100.5 64.2761 100.5 64C100.5 63.7239 100.276 63.5 100 63.5V64.5ZM108 63.5C107.724 63.5 107.5 63.7239 107.5 64C107.5 64.2761 107.724 64.5 108 64.5V63.5ZM116 64.5C116.276 64.5 116.5 64.2761 116.5 64C116.5 63.7239 116.276 63.5 116 63.5V64.5ZM124 63.5C123.724 63.5 123.5 63.7239 123.5 64C123.5 64.2761 123.724 64.5 124 64.5V63.5ZM132 64.5C132.276 64.5 132.5 64.2761 132.5 64C132.5 63.7239 132.276 63.5 132 63.5V64.5ZM140 63.5C139.724 63.5 139.5 63.7239 139.5 64C139.5 64.2761 139.724 64.5 140 64.5V63.5ZM148 64.5C148.276 64.5 148.5 64.2761 148.5 64C148.5 63.7239 148.276 63.5 148 63.5V64.5ZM156 63.5C155.724 63.5 155.5 63.7239 155.5 64C155.5 64.2761 155.724 64.5 156 64.5V63.5ZM164 64.5C164.276 64.5 164.5 64.2761 164.5 64C164.5 63.7239 164.276 63.5 164 63.5V64.5ZM172 63.5C171.724 63.5 171.5 63.7239 171.5 64C171.5 64.2761 171.724 64.5 172 64.5V63.5ZM180 64.5C180.276 64.5 180.5 64.2761 180.5 64C180.5 63.7239 180.276 63.5 180 63.5V64.5ZM188 63.5C187.724 63.5 187.5 63.7239 187.5 64C187.5 64.2761 187.724 64.5 188 64.5V63.5ZM196 64.5C196.276 64.5 196.5 64.2761 196.5 64C196.5 63.7239 196.276 63.5 196 63.5V64.5ZM204 63.5C203.724 63.5 203.5 63.7239 203.5 64C203.5 64.2761 203.724 64.5 204 64.5V63.5ZM0 64.5H4V63.5H0V64.5ZM12 64.5H20V63.5H12V64.5ZM28 64.5H36V63.5H28V64.5ZM44 64.5H52V63.5H44V64.5ZM60 64.5H68V63.5H60V64.5ZM76 64.5H84V63.5H76V64.5ZM92 64.5H100V63.5H92V64.5ZM108 64.5H116V63.5H108V64.5ZM124 64.5H132V63.5H124V64.5ZM140 64.5H148V63.5H140V64.5ZM156 64.5H164V63.5H156V64.5ZM172 64.5H180V63.5H172V64.5ZM188 64.5H196V63.5H188V64.5ZM204 64.5H208V63.5H204V64.5ZM208 65C208.552 65 209 64.5523 209 64C209 63.4477 208.552 63 208 63V65ZM0 63C-0.552285 63 -1 63.4477 -1 64C-1 64.5523 -0.552285 65 0 65V63ZM4 65C4.55228 65 5 64.5523 5 64C5 63.4477 4.55228 63 4 63V65ZM12 63C11.4477 63 11 63.4477 11 64C11 64.5523 11.4477 65 12 65V63ZM20 65C20.5523 65 21 64.5523 21 64C21 63.4477 20.5523 63 20 63V65ZM28 63C27.4477 63 27 63.4477 27 64C27 64.5523 27.4477 65 28 65V63ZM36 65C36.5523 65 37 64.5523 37 64C37 63.4477 36.5523 63 36 63V65ZM44 63C43.4477 63 43 63.4477 43 64C43 64.5523 43.4477 65 44 65V63ZM52 65C52.5523 65 53 64.5523 53 64C53 63.4477 52.5523 63 52 63V65ZM60 63C59.4477 63 59 63.4477 59 64C59 64.5523 59.4477 65 60 65V63ZM68 65C68.5523 65 69 64.5523 69 64C69 63.4477 68.5523 63 68 63V65ZM76 63C75.4477 63 75 63.4477 75 64C75 64.5523 75.4477 65 76 65V63ZM84 65C84.5523 65 85 64.5523 85 64C85 63.4477 84.5523 63 84 63V65ZM92 63C91.4477 63 91 63.4477 91 64C91 64.5523 91.4477 65 92 65V63ZM100 65C100.552 65 101 64.5523 101 64C101 63.4477 100.552 63 100 63V65ZM108 63C107.448 63 107 63.4477 107 64C107 64.5523 107.448 65 108 65V63ZM116 65C116.552 65 117 64.5523 117 64C117 63.4477 116.552 63 116 63V65ZM124 63C123.448 63 123 63.4477 123 64C123 64.5523 123.448 65 124 65V63ZM132 65C132.552 65 133 64.5523 133 64C133 63.4477 132.552 63 132 63V65ZM140 63C139.448 63 139 63.4477 139 64C139 64.5523 139.448 65 140 65V63ZM148 65C148.552 65 149 64.5523 149 64C149 63.4477 148.552 63 148 63V65ZM156 63C155.448 63 155 63.4477 155 64C155 64.5523 155.448 65 156 65V63ZM164 65C164.552 65 165 64.5523 165 64C165 63.4477 164.552 63 164 63V65ZM172 63C171.448 63 171 63.4477 171 64C171 64.5523 171.448 65 172 65V63ZM180 65C180.552 65 181 64.5523 181 64C181 63.4477 180.552 63 180 63V65ZM188 63C187.448 63 187 63.4477 187 64C187 64.5523 187.448 65 188 65V63ZM196 65C196.552 65 197 64.5523 197 64C197 63.4477 196.552 63 196 63V65ZM204 63C203.448 63 203 63.4477 203 64C203 64.5523 203.448 65 204 65V63ZM0 65H4V63H0V65ZM12 65H20V63H12V65ZM28 65H36V63H28V65ZM44 65H52V63H44V65ZM60 65H68V63H60V65ZM76 65H84V63H76V65ZM92 65H100V63H92V65ZM108 65H116V63H108V65ZM124 65H132V63H124V65ZM140 65H148V63H140V65ZM156 65H164V63H156V65ZM172 65H180V63H172V65ZM188 65H196V63H188V65ZM204 65H208V63H204V65Z",fill:"#F8F8F8",mask:"url(#path-7-inside-4_2098_5511)"}),s.jsx("path",{opacity:"0.25",d:"M188.216 21.8308L192.267 33.3363C192.984 35.3729 195.553 36.0079 197.136 34.5401L200.346 31.5644C200.704 31.2324 200.976 30.8179 201.137 30.357L202.893 25.3492L207.891 8.63898C207.962 8.40249 207.998 8.15696 207.998 7.91011V61C207.998 62.6569 206.655 64 204.998 64H2.99805C1.34119 64 -0.00195312 62.6569 -0.00195312 61V38.199C-0.00195312 37.5477 0.209976 36.9142 0.601822 36.394L4.07924 31.7775C5.46086 29.9434 8.30679 30.2781 9.22513 32.3828L13.7407 42.7321C14.1196 43.6005 14.8865 44.2389 15.8092 44.454L20.4905 45.5454C21.1539 45.7 21.8501 45.6244 22.4647 45.3308L27.6593 42.8495C28.3218 42.533 28.8452 41.9846 29.1305 41.3081L33.0958 31.9045C34.1272 29.4587 37.593 29.4587 38.6244 31.9045L39.704 34.4648C40.8065 37.0793 44.5863 36.8438 45.3559 34.1128L49.5889 19.0897C49.9533 17.7966 51.133 16.9033 52.4765 16.9033H56.4941C57.0707 16.9033 57.6351 16.7372 58.1197 16.4247L61.1576 14.466C62.8476 13.3764 65.11 14.2251 65.6662 16.1575L70.599 33.2936C71.1572 35.2328 73.4323 36.079 75.122 34.9758L75.9273 34.45C77.4802 33.4361 79.5719 34.0601 80.3156 35.7591L84.8676 46.1586C85.5306 47.6733 87.2942 48.366 88.8108 47.7074L91.9453 46.3462C92.765 45.9903 93.3833 45.2875 93.632 44.4292L99.0729 25.6458C99.6874 23.5244 102.321 22.7938 103.941 24.2955C105.587 25.8222 108.267 25.0377 108.831 22.864L112.541 8.54954C113.26 5.77543 117.087 5.49227 118.207 8.13037L120.305 13.0767C121.105 14.9603 123.513 15.5086 125.049 14.1567L125.58 13.6896C127.224 12.2425 129.814 12.9875 130.438 15.0869L134.329 28.1818C135.073 30.6853 138.439 31.1086 139.779 28.8673L142.671 24.0333C143.159 23.2175 144.004 22.6813 144.95 22.5878L149.822 22.1065C150.344 22.0549 150.843 21.8672 151.271 21.5621L154.984 18.9089C156.467 17.8494 158.544 18.346 159.388 19.9617L161.285 23.5972C162.565 26.0491 166.199 25.6102 166.858 22.9241L169.511 12.1165C170.239 9.14844 174.421 9.04274 175.298 11.9702L177.723 20.0592C178.406 22.3382 181.343 22.9532 182.883 21.1398L183.099 20.8852C184.598 19.1202 187.447 19.6467 188.216 21.8308Z",fill:"url(#paint0_linear_2098_5511)"}),s.jsx("path",{d:"M207.998 8.42336L201.106 31.2146C200.924 31.8169 200.557 32.3467 200.057 32.729L196.94 35.1136C195.319 36.3534 192.96 35.6482 192.286 33.7223L188.181 22.0024C187.422 19.8338 184.606 19.289 183.092 21.0179L182.846 21.2991C181.3 23.0654 178.416 22.4516 177.723 20.2087L175.29 12.336C174.395 9.4396 170.259 9.54691 169.515 12.4858L166.857 22.9946C166.185 25.6477 162.603 26.0903 161.306 23.6803L159.382 20.1042C158.534 18.5278 156.503 18.0404 155.031 19.0601L151.262 21.6725C150.84 21.9649 150.35 22.1442 149.839 22.1931L144.931 22.6636C143.996 22.7532 143.157 23.2757 142.664 24.0754L139.754 28.7942C138.4 30.9907 135.088 30.5657 134.332 28.0982L130.441 15.3948C129.808 13.3298 127.267 12.5895 125.624 13.9921L125.005 14.5209C123.474 15.8283 121.115 15.2863 120.308 13.4417L118.191 8.60225C117.054 6.00226 113.277 6.28847 112.544 9.03014L108.848 22.8647C108.27 25.0292 105.606 25.8158 103.94 24.3175V24.3175C102.303 22.8447 99.6856 23.5762 99.0555 25.6864L93.6445 43.8072C93.388 44.6663 92.7608 45.3656 91.9346 45.7136L88.763 47.0496C87.2632 47.6814 85.5332 47.0022 84.8638 45.5188L80.3156 35.4387C79.5653 33.7759 77.517 33.1621 75.9758 34.1381L75.0745 34.709C73.393 35.774 71.1595 34.9362 70.5933 33.028L65.672 16.4433C65.1078 14.5419 62.8867 13.7015 61.2051 14.7533L58.1073 16.6909C57.6303 16.9892 57.079 17.1474 56.5164 17.1474H52.4575C51.123 17.1474 49.9489 18.029 49.5766 19.3106L45.3511 33.8582C44.5676 36.5556 40.8386 36.7934 39.7188 34.2174L38.6114 31.6698C37.5658 29.2644 34.1544 29.2644 33.1088 31.6698L29.1425 40.7941C28.8495 41.4681 28.3193 42.0111 27.6525 42.3201L22.4421 44.7345C21.8411 45.0129 21.165 45.0847 20.519 44.9386L15.803 43.872C14.8836 43.6641 14.1154 43.0362 13.7288 42.1765L9.21662 32.1447C8.28874 30.0817 5.49845 29.7487 4.11113 31.5353L-0.00196201 36.8322",stroke:"#FF3F19"})]}),s.jsxs("defs",{children:[s.jsxs("linearGradient",{id:"paint0_linear_2098_5511",x1:"103.998",y1:"0",x2:"103.998",y2:"64",gradientUnits:"userSpaceOnUse",children:[s.jsx("stop",{stopColor:"#FF3F19"}),s.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]}),s.jsx("clipPath",{id:"clip0_2098_5511",children:s.jsx("rect",{width:"208",height:"64",fill:"white"})})]})]})}),n0=({adaptiveStyles:e})=>{const[t,n]=P.useState(null),[r,u]=P.useState(!1),[a,i]=P.useState(!1),[o,c]=P.useState(!1);if(P.useEffect(()=>{u(!0),i(!0),(async()=>{const p=await v2();n(p)})(),u(!1),i(!1)},[]),!t)return s.jsx(w.Loader,{});const{isAvailable:l,isActivated:h,info:f}=t.data;return l?s.jsxs("div",{children:[s.jsxs("div",{className:b.clx(fe.referral,{[fe.mobile]:e!=="desktop"}),children:[s.jsx("div",{className:b.clx(fe.referralBlock,{[fe.mobile]:e!=="desktop"}),children:r?s.jsx(a0,{adaptiveStyles:e}):s.jsxs("div",{className:fe.referralContainer,children:[s.jsx("div",{id:"h2",className:fe.title,children:"Refer friends"}),s.jsx("div",{className:fe.description,id:"lg",children:"Refer friends. Earn rewards. Make bank."}),h?s.jsx(s.Fragment,{children:s.jsx(u0,{referral:t})}):s.jsx(s.Fragment,{children:s.jsx(r0,{setIsOpen:c})})]})}),a?s.jsx("div",{className:fe.referralStats}):s.jsxs("div",{className:b.clx(fe.referralStats,{[fe.mobile]:e!=="desktop"}),children:[s.jsxs("div",{className:fe.referralStatsItem,children:[s.jsx("div",{id:"lg",className:fe.referralStatsItemLabel,children:"Referrals"}),s.jsx("div",{id:"h2",className:fe.referralStatsItemValue,children:f!=null&&f.totalReferrals?`${f.totalReferrals} person`:"-"}),s.jsx(Nu,{})]}),s.jsxs("div",{className:fe.referralStatsItem,children:[s.jsx("div",{id:"lg",className:fe.referralStatsItemLabel,children:"Earned"}),s.jsx("div",{id:"h2",className:fe.referralStatsItemValue,children:"-"}),s.jsx(Nu,{})]}),s.jsxs("div",{className:fe.referralStatsItem,children:[s.jsx("div",{id:"lg",className:fe.referralStatsItemLabel,children:"Total Revenue"}),s.jsx("div",{id:"h2",className:fe.referralStatsItemValue,children:b.formatPrice({amount:(f==null?void 0:f.totalRevenueUsd)||0})}),s.jsx(Nu,{})]}),s.jsxs("div",{className:fe.referralStatsItem,children:[s.jsx("div",{id:"lg",className:fe.referralStatsItemLabel,children:"Earn Procent"}),s.jsx("div",{id:"h2",className:fe.referralStatsItemValue,children:`${t.data.earnPercent}%`||"-"}),s.jsx(Nu,{})]})]})]}),o&&s.jsx(w.Modal,{close:()=>c(!1),children:s.jsx(am,{setIsOpen:c,setIsLoading:u})})]}):null},r0=({setIsOpen:e})=>{const{setIsOpen:t}=b.useModalStore();return s.jsxs("div",{className:fe.steps,onClick:n=>n.stopPropagation(),children:[s.jsx(w.Button,{type:"Primary",className:fe.joinButton,onClick:()=>{e(!0),t(!0)},children:"Join the referral Program"}),s.jsx("div",{children:b.referralSteps.map(({caption:n,description:r},u,a)=>s.jsx(um,{caption:n,description:r,index:u+1,bar:u+1!==a.length},n))})]})},u0=({referral:e})=>{var a,i;const{shopDomain:t}=b.useStorefrontStore(),n=`https://${t}/?r=${(a=e.data.info)==null?void 0:a.referralCode}`,{notifications:r,setNotifications:u}=b.useNotificationStore();return s.jsxs("div",{className:fe.referralInfo,children:[s.jsx(w.Input,{onChange:()=>{},label:"Affiliate Code",value:((i=e.data.info)==null?void 0:i.referralCode)||"",disabled:!0}),s.jsx("div",{className:fe.linkContainer,children:s.jsx(w.Input,{onChange:()=>{},label:"Affiliate Link",value:n,disabled:!0,rightIcon:s.jsx(w.Icon,{name:"Copy",fill:"var(--text-action)",onClick:()=>{navigator.clipboard.writeText(n),u([...r,{message:"Link copied to clipboard",status:"success",id:b.v4()}])},hoverable:!0})})})]})},a0=({adaptiveStyles:e})=>s.jsxs(er,{speed:2,width:500,height:"100%",viewBox:"0 0 500 305",backgroundColor:"var(--surface-secondary)",foregroundColor:"var(--surface-disabled)",className:b.clx(fe.skeleton,{[fe.mobile]:e!=="desktop"}),style:{borderRadius:"var(--border-radius)"},children:[s.jsx("rect",{x:"0",y:"0",rx:"10",ry:"10",width:"264",height:"40"}),s.jsx("rect",{x:"0",y:"45",rx:"10",ry:"10",width:"160",height:"24"}),s.jsx("rect",{x:"0",y:"100",rx:"10",ry:"10",width:"100",height:"40"}),s.jsx("rect",{x:"0",y:"150",rx:"10",ry:"10",width:"476",height:"40"}),s.jsx("rect",{x:"0",y:"220",rx:"10",ry:"10",width:"428",height:"50"})]}),im="_title_u8oqs_1",sm="_heading_u8oqs_10",om="_description_u8oqs_15",Za={title:im,heading:sm,description:om},fa=({title:e,description:t})=>s.jsxs("div",{className:Za.title,children:[s.jsx("div",{id:"h3",className:Za.heading,children:e}),t&&s.jsx("div",{className:Za.description,id:"lg",children:t})]}),cm="_noItemsBlock_yefnm_4",lm="_noItemsBlockIcon_yefnm_13",dm="_noItemsBlockTitle_yefnm_21",fm="_noItemsBlockDescription_yefnm_31",hm="_centered_yefnm_37",Pr={noItemsBlock:cm,noItemsBlockIcon:lm,noItemsBlockTitle:dm,noItemsBlockDescription:fm,centered:hm},ha=({title:e,description:t,className:n,centered:r=!1})=>s.jsxs("div",{className:b.clx(Pr.noItemsBlock,n,{[Pr.centered]:r}),children:[s.jsx("div",{className:Pr.noItemsBlockIcon,children:s.jsx(w.Icon,{name:"Info",fill:"var(--text-secondary)"})}),s.jsx("div",{className:Pr.noItemsBlockTitle,id:"h4",children:e}),s.jsx("div",{className:Pr.noItemsBlockDescription,id:"md",children:t})]}),pm="_ordersTable_1btyq_2",mm="_gatewayItem_1btyq_10",gm="_gatewayIcon_1btyq_15",bm="_orderTime_1btyq_20",_m="_reviewContainer_1btyq_25",xm="_reviewRating_1btyq_35",Cm="_tableLoader_1btyq_39",Em="_tableItem_1btyq_48",Ot={ordersTable:pm,gatewayItem:mm,gatewayIcon:gm,orderTime:bm,reviewContainer:_m,reviewRating:xm,tableLoader:Cm,tableItem:Em};var Bn=(e=>(e[e.SUCCESS=1]="SUCCESS",e[e.WARNING=2]="WARNING",e[e.ERROR=3]="ERROR",e))(Bn||{});const Tm={[Ce.New]:2,[Ce.Pending]:2,[Ce.Completed]:1,[Ce.Cancelled]:3,[Ce.Expired]:3,[Ce.FullDeliveryFailure]:3,[Ce.PartiallyDelivered]:2,[Ce.Refunded]:2,[Ce.Failed]:3},ym=(e,t)=>{const n=t.find(r=>r.name===e);return n?s.jsxs("div",{className:Ot.gatewayItem,children:[(n==null?void 0:n.name)==="ForebitPayments"?s.jsx(Fl,{}):n.name==="Balance"?s.jsx(w.Icon,{name:"Wallet",fill:"var(--text-primary)",width:20,height:20,style:{marginRight:"0.25rem"}}):s.jsx("img",{alt:n.displayName,src:b.convertCfImageIdToUrl(n.logoCfImageId,"100"),className:Ot.gatewayIcon}),s.jsx("div",{id:"md",children:n.displayName})]}):null},km=({item:e,gatewaysDetail:t})=>{const[n,r]=b.extractDateAndTime(e.time),{isAntistock:u}=b.useGeneralStore();return s.jsxs(P.Fragment,{children:[s.jsx(at,{copyText:e.id,children:s.jsx(b.NavLink,{to:`/orders/${e.id}/${e.accessToken}`,id:"md",children:e.id})}),s.jsx(at,{children:s.jsx(b.NavLink,{to:`/orders/${e.id}/${e.accessToken}`,children:s.jsx(c0,{status:e.status,variant:Tm[e.status]})})}),s.jsx(at,{children:b.formatPrice(e.price)}),s.jsx(at,{children:ym(e.gatewayName,t)}),s.jsx(at,{children:s.jsxs("div",{children:[s.jsx("div",{id:"md",children:n}),s.jsx("div",{className:Ot.orderTime,id:"md",children:r})]})}),!u&&s.jsx(at,{children:e.review?s.jsxs("div",{className:Ot.reviewContainer,children:[s.jsx(w.Icon,{name:"Star",fill:"var(--text-secondary)"}),s.jsx("div",{className:Ot.reviewRating,id:"md",children:e.review.rating})]}):s.jsx("span",{id:"md",children:"None"})})]},e.id)},i0=({orders:e,gatewaysDetail:t,totalCount:n,isLoading:r})=>{const{page:u,setPage:a}=b.usePaginationPagesStore(),{isAntistock:i}=b.useGeneralStore(),c=!(!(e!=null&&e.length)||!t)&&e.length>0;return s.jsxs("div",{className:Ot.ordersTable,children:[s.jsxs(pa,{children:[s.jsx(It,{className:Ot.tableItem,children:"Invoice ID"}),s.jsx(It,{className:Ot.tableItem,children:"Status"}),s.jsx(It,{className:Ot.tableItem,children:"Value"}),s.jsx(It,{className:Ot.tableItem,children:"Payment"}),s.jsx(It,{className:Ot.tableItem,children:"Date"}),!i&&s.jsx(It,{className:Ot.tableItem,children:"Review"}),c&&!r&&e.map(l=>s.jsx(km,{item:l,gatewaysDetail:t},l.id))]}),(!c||r)&&s.jsx("div",{className:Ot.tableLoader,children:s.jsx(w.Loader,{})}),c&&!r&&s.jsx(hu,{currentPage:u,totalCount:n,onPageChange:a})]})},Am="_ticketsTable_1ney1_4",Sm="_antistockTable_1ney1_4",Im="_table_1ney1_4",Nm="_tableItem_1ney1_22",vm="_text_1ney1_47",wm="_tableItemTitle_1ney1_54",hr={ticketsTable:Am,antistockTable:Sm,table:Im,tableItem:Nm,text:vm,tableItemTitle:wm},at=({children:e,className:t,onClick:n,copyText:r,id:u})=>{const a=Jn();return s.jsxs("div",{className:b.clx(hr.tableItem,t),onClick:n,style:{cursor:n?"pointer":"default"},children:[s.jsx("span",{className:hr.text,id:u||"md",children:e})," ",r&&s.jsx("div",{style:{minWidth:"24px"},children:s.jsx(w.Icon,{name:"Copy",hoverable:!0,onClick:()=>a(r),width:24,height:24})})]})},It=({children:e,className:t})=>s.jsx(at,{className:b.clx(hr.tableItemTitle,t),id:"lg",children:e}),pa=({children:e,className:t})=>{const{isAntistock:n}=b.useGeneralStore(),r=t==null?void 0:t.includes("ticketsTable");return s.jsx("div",{className:b.clx(t,r?hr.ticketsTable:n?hr.antistockTable:hr.table),children:e})},Dm="_paginationContainer_pt4l5_4",Lm="_paginationWithRange_pt4l5_16",Pm="_paginationWithRangeText_pt4l5_33",Rm="_paginationWithRangePagination_pt4l5_45",Hu={paginationContainer:Dm,paginationWithRange:Lm,paginationWithRangeText:Pm,paginationWithRangePagination:Rm},vu=(e,t)=>Array.from({length:t-e+1},(n,r)=>e+r),Om=(e,t,n)=>{const r=n*2+3+2;if(t<=r)return vu(1,t);const u=Math.max(e-n,1),a=Math.min(e+n,t),i=u>2,o=a<t-2;return!i&&o?[...vu(1,3+2*n),"right-ellipsis",t]:i&&!o?[1,"left-ellipsis",...vu(t-(3+2*n)+1,t)]:[1,"left-ellipsis",...vu(u,a),"right-ellipsis",t]},s0=({currentPage:e,totalPages:t,onPageChange:n,siblingCount:r=1})=>{const u=c=>{const l=r*2+1;n(c?Math.max(e-l,1):Math.min(e+l,t))},a=e===1,i=e===t,o=c=>s.jsx(w.Button,{type:typeof c=="number"&&c===e?"Primary":"Secondary",onClick:()=>typeof c=="string"?u(c==="left-ellipsis"):n(c),"aria-current":typeof c=="number"&&c===e?"page":void 0,children:typeof c=="string"?"…":c},c);return s.jsxs("div",{className:Hu.paginationContainer,children:[s.jsx(w.Button,{type:"Secondary",onClick:()=>!a&&n(e-1),disabled:a,children:s.jsx(w.Icon,{name:"ArrowLeft"})}),Om(e,t,r).map(o),s.jsx(w.Button,{type:"Secondary",onClick:()=>!i&&n(e+1),disabled:i,children:s.jsx(w.Icon,{name:"ArrowRight"})})]})},o0=(e,t,n)=>{const r=(e-1)*n+1,u=Math.min(e*n,t);return`Showing ${r}-${u} entries of ${t}`},hu=({className:e,totalCount:t,...n})=>{const r=Math.ceil(t/mi);return r<2?null:s.jsxs("div",{className:`${Hu.paginationWithRange} ${e}`,children:[s.jsx("div",{className:Hu.paginationWithRangeText,id:"md",children:o0(n.currentPage,t,mi)}),s.jsx("div",{className:Hu.paginationWithRangePagination,children:s.jsx(s0,{...n,totalPages:r})})]})},Mm="_statusIndicator_1gt2z_4",Fm="_antistockStatus_1gt2z_11",Bm="_statusIndicatorSuccess_1gt2z_16",jm="_statusIndicatorWarning_1gt2z_20",Hm="_statusIndicatorError_1gt2z_24",Um="_statusIndicatorText_1gt2z_28",pr={statusIndicator:Mm,antistockStatus:Fm,statusIndicatorSuccess:Bm,statusIndicatorWarning:jm,statusIndicatorError:Hm,statusIndicatorText:Um},Vm=()=>s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:s.jsx("path",{d:"M11.2105 5.91453C11.2628 5.96677 11.3043 6.02881 11.3326 6.0971C11.3609 6.16538 11.3754 6.23858 11.3754 6.3125C11.3754 6.38642 11.3609 6.45962 11.3326 6.5279C11.3043 6.59619 11.2628 6.65823 11.2105 6.71047L7.27297 10.648C7.22073 10.7003 7.15869 10.7418 7.09041 10.7701C7.02212 10.7984 6.94892 10.8129 6.875 10.8129C6.80108 10.8129 6.72789 10.7984 6.6596 10.7701C6.59131 10.7418 6.52928 10.7003 6.47703 10.648L4.78953 8.96047C4.68399 8.85492 4.62469 8.71177 4.62469 8.5625C4.62469 8.41323 4.68399 8.27008 4.78953 8.16453C4.89508 8.05898 5.03824 7.99969 5.1875 7.99969C5.33677 7.99969 5.47992 8.05898 5.58547 8.16453L6.875 9.45477L10.4145 5.91453C10.4668 5.86223 10.5288 5.82074 10.5971 5.79244C10.6654 5.76413 10.7386 5.74956 10.8125 5.74956C10.8864 5.74956 10.9596 5.76413 11.0279 5.79244C11.0962 5.82074 11.1582 5.86223 11.2105 5.91453ZM15.3125 8C15.3125 9.44628 14.8836 10.8601 14.0801 12.0626C13.2766 13.2651 12.1346 14.2024 10.7984 14.7559C9.46219 15.3093 7.99189 15.4541 6.57341 15.172C5.15492 14.8898 3.85196 14.1934 2.82928 13.1707C1.80661 12.148 1.11017 10.8451 0.828011 9.4266C0.545857 8.00811 0.690668 6.53781 1.24413 5.20163C1.7976 3.86544 2.73486 2.72339 3.9374 1.91988C5.13993 1.11637 6.55373 0.6875 8 0.6875C9.93877 0.689547 11.7975 1.46063 13.1685 2.83154C14.5394 4.20246 15.3105 6.06123 15.3125 8ZM14.1875 8C14.1875 6.77623 13.8246 5.57994 13.1447 4.56241C12.4648 3.54488 11.4985 2.75181 10.3679 2.2835C9.23724 1.81518 7.99314 1.69264 6.79288 1.93139C5.59262 2.17014 4.49012 2.75944 3.62478 3.62478C2.75944 4.49011 2.17014 5.59262 1.93139 6.79288C1.69265 7.99314 1.81518 9.23724 2.2835 10.3679C2.75182 11.4985 3.54488 12.4648 4.56241 13.1447C5.57994 13.8246 6.77623 14.1875 8 14.1875C9.64046 14.1856 11.2132 13.5331 12.3732 12.3732C13.5331 11.2132 14.1856 9.64046 14.1875 8Z",fill:"#338B13"})}),$m=()=>s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:s.jsx("path",{d:"M8 0.6875C6.55373 0.6875 5.13993 1.11637 3.9374 1.91988C2.73486 2.72339 1.7976 3.86544 1.24413 5.20163C0.690668 6.53781 0.545857 8.00811 0.828011 9.4266C1.11017 10.8451 1.80661 12.148 2.82928 13.1707C3.85196 14.1934 5.15492 14.8898 6.57341 15.172C7.99189 15.4541 9.46219 15.3093 10.7984 14.7559C12.1346 14.2024 13.2766 13.2651 14.0801 12.0626C14.8836 10.8601 15.3125 9.44628 15.3125 8C15.3105 6.06123 14.5394 4.20246 13.1685 2.83154C11.7975 1.46063 9.93877 0.689547 8 0.6875ZM8 14.1875C6.77623 14.1875 5.57994 13.8246 4.56241 13.1447C3.54488 12.4648 2.75182 11.4985 2.2835 10.3679C1.81518 9.23724 1.69265 7.99314 1.93139 6.79288C2.17014 5.59262 2.75944 4.49011 3.62478 3.62478C4.49012 2.75944 5.59262 2.17014 6.79288 1.93139C7.99314 1.69264 9.23724 1.81518 10.3679 2.2835C11.4985 2.75181 12.4648 3.54488 13.1447 4.56241C13.8246 5.57994 14.1875 6.77623 14.1875 8C14.1856 9.64046 13.5331 11.2132 12.3732 12.3732C11.2132 13.5331 9.64046 14.1856 8 14.1875ZM12.5 8C12.5 8.14918 12.4407 8.29226 12.3353 8.39775C12.2298 8.50324 12.0867 8.5625 11.9375 8.5625H8C7.85082 8.5625 7.70775 8.50324 7.60226 8.39775C7.49677 8.29226 7.4375 8.14918 7.4375 8V4.0625C7.4375 3.91332 7.49677 3.77024 7.60226 3.66475C7.70775 3.55926 7.85082 3.5 8 3.5C8.14919 3.5 8.29226 3.55926 8.39775 3.66475C8.50324 3.77024 8.5625 3.91332 8.5625 4.0625V7.4375H11.9375C12.0867 7.4375 12.2298 7.49676 12.3353 7.60225C12.4407 7.70774 12.5 7.85082 12.5 8Z",fill:"#C1972A"})}),zm=()=>s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[s.jsx("path",{d:"M9 17.0625C4.5525 17.0625 0.9375 13.4475 0.9375 9C0.9375 4.5525 4.5525 0.9375 9 0.9375C13.4475 0.9375 17.0625 4.5525 17.0625 9C17.0625 13.4475 13.4475 17.0625 9 17.0625ZM9 2.0625C5.175 2.0625 2.0625 5.175 2.0625 9C2.0625 12.825 5.175 15.9375 9 15.9375C12.825 15.9375 15.9375 12.825 15.9375 9C15.9375 5.175 12.825 2.0625 9 2.0625Z",fill:"#C12A2A"}),s.jsx("path",{d:"M6.87752 11.685C6.73502 11.685 6.59252 11.6325 6.48002 11.52C6.26252 11.3025 6.26252 10.9425 6.48002 10.725L10.725 6.48C10.9425 6.2625 11.3025 6.2625 11.52 6.48C11.7375 6.6975 11.7375 7.0575 11.52 7.275L7.27502 11.52C7.17002 11.6325 7.02002 11.685 6.87752 11.685Z",fill:"#C12A2A"}),s.jsx("path",{d:"M11.1225 11.685C10.98 11.685 10.8375 11.6325 10.725 11.52L6.48002 7.275C6.26252 7.0575 6.26252 6.6975 6.48002 6.48C6.69752 6.2625 7.05752 6.2625 7.27502 6.48L11.52 10.725C11.7375 10.9425 11.7375 11.3025 11.52 11.52C11.4075 11.6325 11.265 11.685 11.1225 11.685Z",fill:"#C12A2A"})]}),qm={[Bn.SUCCESS]:Vm,[Bn.WARNING]:$m,[Bn.ERROR]:zm},Zm={[Bn.SUCCESS]:pr.statusIndicatorSuccess,[Bn.WARNING]:pr.statusIndicatorWarning,[Bn.ERROR]:pr.statusIndicatorError},Wm=e=>{switch(e){case"NEW":return"New";case"COMPLETED":return"Completed";case"CANCELLED":return"Cancelled";case"EXPIRED":return"Expired";case"FAILED":return"Failed";case"FULL_DELIVERY_FAILURE":return"Delivery Failed";case"PARTIALLY_DELIVERED":return"Partial Delivery Failed";case"REFUNDED":return"Refunded";case"PENDING":return"Pending";case"PROCESSING":return"Processing";case"APPROVED":return"Approved";case"DECLINED":return"Declined";case"AUTO_APPROVED":return"Auto Approved"}return e},c0=({status:e,variant:t})=>{const{isAntistock:n}=b.useGeneralStore(),r=qm[t];return s.jsxs("div",{className:b.clx(pr.statusIndicator,Zm[t],{[pr.antistockStatus]:n}),children:[s.jsx(r,{}),s.jsx("span",{className:pr.statusIndicatorText,id:"md",children:Wm(e)})]})},Ym="_checkoutItemsContainer_1kn61_2",Gm="_innerContainer_1kn61_16",Xm="_headerSection_1kn61_22",Km="_header_1kn61_22",Qm="_productsContainer_1kn61_47",Jm="_couponContainer_1kn61_54",e8="_checkoutFooter_1kn61_58",zn={checkoutItemsContainer:Ym,innerContainer:Gm,headerSection:Xm,header:Km,productsContainer:Qm,couponContainer:Jm,checkoutFooter:e8},t8="_checkoutFooter_sum4s_1",n8="_antistock_sum4s_12",r8="_footerBranding_sum4s_22",u8="_poweredText_sum4s_27",a8="_antistockLink_sum4s_31",i8="_footerNav_sum4s_39",yn={checkoutFooter:t8,antistock:n8,footerBranding:r8,poweredText:u8,antistockLink:a8,footerNav:i8},s8="data:image/svg+xml,%3csvg%20width='100'%20height='26'%20viewBox='0%200%20100%2026'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.3996%203.39999V12.8228L16.2964%2014.1313V8.89738L7.69363%2011.587V6.87107L20.3996%203.39999Z'%20fill='%23FF3F19'/%3e%3cpath%20d='M16.2964%2014.1313L16.2962%2018.6292L3.59961%2022.6V12.7592L7.69363%2011.587L7.69344%2016.9118L16.2964%2014.1313Z'%20fill='%23FF3F19'/%3e%3cpath%20d='M95.6308%2022C93.4931%2022%2091.8804%2020.882%2091.4678%2019.1776L93.118%2019.0676C93.4181%2019.984%2094.0931%2020.5338%2095.6308%2020.5338C97.4311%2020.5338%2098.4249%2019.8373%2098.4249%2018.4078V16.8316C97.9374%2017.858%2096.8122%2018.5178%2095.5183%2018.5178C92.9868%2018.5178%2091.1865%2016.575%2091.1865%2013.8076C91.1865%2011.0401%2092.9492%209.09737%2095.4433%209.09737C96.831%209.09737%2098.0499%209.77549%2098.5%2010.8568V9.3173H100V18.3711C100%2020.6438%2098.3687%2022%2095.6308%2022ZM95.5933%2017.0515C97.2998%2017.0515%2098.4062%2015.8053%2098.4249%2013.8076C98.4624%2011.8099%2097.3186%2010.5636%2095.5933%2010.5636C93.8494%2010.5636%2092.8367%2011.8099%2092.8367%2013.8076C92.8367%2015.8053%2093.8869%2017.0515%2095.5933%2017.0515Z'%20fill='%23252525'/%3e%3cpath%20d='M81.1836%2019.0309V9.3173H82.6275L82.665%2011.0584C83.1901%209.72051%2084.3527%209.09737%2085.7217%209.09737C87.9907%209.09737%2089.0783%2010.7285%2089.0783%2012.7812V19.0309H87.5031V13.2211C87.5031%2011.425%2086.8843%2010.4536%2085.3841%2010.4536C83.8464%2010.4536%2082.7588%2011.425%2082.7588%2013.2211V19.0309H81.1836Z'%20fill='%23252525'/%3e%3cpath%20d='M73.3176%2019.2509C71.2549%2019.2509%2069.9609%2018.2795%2069.9609%2016.6117C69.9609%2014.9622%2070.9173%2014.0458%2073.0926%2013.6426L76.618%2013.0011C76.618%2011.37%2075.8304%2010.5636%2074.2552%2010.5636C72.8676%2010.5636%2072.0987%2011.1867%2071.7987%2012.3047L70.1297%2012.1764C70.5048%2010.3436%2072.0049%209.09737%2074.2552%209.09737C76.8056%209.09737%2078.1932%2010.6002%2078.1932%2013.0561V17.0699C78.1932%2017.5097%2078.3433%2017.6747%2078.7183%2017.6747H79.1121V19.0309C78.9996%2019.0493%2078.7558%2019.0676%2078.512%2019.0676C77.3119%2019.0676%2076.7681%2018.6094%2076.6368%2017.5281C76.1492%2018.5361%2074.7803%2019.2509%2073.3176%2019.2509ZM73.4676%2017.8946C75.4554%2017.8946%2076.618%2016.6483%2076.618%2015.0355V14.3391L73.3926%2014.9255C72.0425%2015.1638%2071.6111%2015.6586%2071.6111%2016.4651C71.6111%2017.3814%2072.305%2017.8946%2073.4676%2017.8946Z'%20fill='%23252525'/%3e%3cpath%20d='M63.2168%2022C61.079%2022%2059.4663%2020.882%2059.0537%2019.1776L60.704%2019.0676C61.004%2019.984%2061.6791%2020.5338%2063.2168%2020.5338C65.017%2020.5338%2066.0109%2019.8373%2066.0109%2018.4078V16.8316C65.5233%2017.858%2064.3982%2018.5178%2063.1043%2018.5178C60.5727%2018.5178%2058.7725%2016.575%2058.7725%2013.8076C58.7725%2011.0401%2060.5352%209.09737%2063.0293%209.09737C64.4169%209.09737%2065.6358%209.77549%2066.0859%2010.8568V9.3173H67.5861V18.3711C67.5861%2020.6438%2065.9546%2022%2063.2168%2022ZM63.1793%2017.0515C64.8857%2017.0515%2065.9921%2015.8053%2066.0109%2013.8076C66.0484%2011.8099%2064.9045%2010.5636%2063.1793%2010.5636C61.4353%2010.5636%2060.4227%2011.8099%2060.4227%2013.8076C60.4227%2015.8053%2061.4728%2017.0515%2063.1793%2017.0515Z'%20fill='%23252525'/%3e%3cpath%20d='M56.2141%2019.0309C55.0515%2019.0309%2054.2451%2018.4811%2054.2451%2017.1982L54.2639%206.01834H55.8391V17.0699C55.8391%2017.4731%2056.0453%2017.6747%2056.4579%2017.6747H57.3205V19.0309H56.2141Z'%20fill='%23252525'/%3e%3cpath%20d='M51.0686%2019.0309C49.906%2019.0309%2049.0996%2018.4811%2049.0996%2017.1982L49.1184%206.01834H50.6936V17.0699C50.6936%2017.4731%2050.8998%2017.6747%2051.3124%2017.6747H52.175V19.0309H51.0686Z'%20fill='%23252525'/%3e%3cpath%20d='M44.5209%2019.0309V9.3173H46.0961V19.0309H44.5209ZM44.4834%207.79611V6H46.1336V7.79611H44.4834Z'%20fill='%23252525'/%3e%3cpath%20d='M32%2019.0309V6.01834H36.5756C39.726%206.01834%2041.3012%207.09967%2041.3012%209.51891C41.3012%2010.9851%2040.4198%2012.0481%2038.9384%2012.3047C40.7574%2012.5613%2041.8638%2013.7709%2041.8638%2015.4571C41.8638%2017.8213%2040.2323%2019.0309%2037.3257%2019.0309H32ZM37.3257%2017.4914C39.1447%2017.4914%2040.176%2016.74%2040.176%2015.3654C40.176%2013.9908%2039.1447%2013.1844%2037.3257%2013.1844H33.6127V17.4914H37.3257ZM36.5756%2011.6449C38.5258%2011.6449%2039.6135%2010.8935%2039.6135%209.59222C39.6135%208.21765%2038.6008%207.55786%2036.5756%207.55786H33.6127V11.6449H36.5756Z'%20fill='%23252525'/%3e%3c/svg%3e",Hn=({className:e})=>{const{shopTerms:t,shopPrivacyPolicy:n,shopRefundPolicy:r,shopLogo:u}=b.useStorefrontStore(),{isAntistock:a}=b.useGeneralStore(),{settings:i}=b.useSettingsStore();return s.jsxs("footer",{className:`${yn.checkoutFooter} ${e} ${a?yn.antistock:""}`,children:[a&&(i==null?void 0:i.showPoweredBy)&&s.jsxs("div",{className:yn.footerBranding,children:[s.jsx("p",{className:yn.poweredText,id:"md",style:{color:"var(--text-action)"},children:"Powered by"}),s.jsxs("a",{className:yn.antistockLink,href:"https://antistock.io",target:"_blank",rel:"noopener noreferrer",children:[s.jsx(ql,{width:14,height:18}),"Antistock"]})]}),!a&&s.jsxs("div",{className:yn.footerBranding,children:[s.jsx("p",{className:yn.poweredText,id:"md",children:"Powered by"}),u||s.jsx("img",{src:s8,alt:"Billgang"})]}),s.jsx("nav",{children:s.jsxs("ul",{className:yn.footerNav,children:[(t==null?void 0:t.showTermsOfServiceOnProduct)&&!a&&s.jsx("li",{children:s.jsx("a",{href:t.termsOfService,target:"_blank",rel:"noopener noreferrer",children:"Terms"})}),(n==null?void 0:n.showPrivacyPolicyOnProduct)&&s.jsx("li",{children:s.jsx("a",{href:n.privacyPolicy,target:"_blank",rel:"noopener noreferrer",children:"Privacy"})}),(r==null?void 0:r.showRefundPolicyOnProduct)&&s.jsx("li",{children:s.jsx("a",{href:r.refundPolicy,target:"_blank",rel:"noopener noreferrer",children:"Refund"})})]})})]})},o8="_checkoutHeader_1stm3_1",c8="_leftContainer_1stm3_20",l8="_backArrow_1stm3_26",d8="_logoContainer_1stm3_38",f8="_logo_1stm3_38",h8="_antistockLink_1stm3_48",ir={checkoutHeader:o8,leftContainer:c8,backArrow:l8,logoContainer:d8,logo:f8,antistockLink:h8},p8="_activeBadge_1yb5i_1",m8="_activeBadgeText_1yb5i_12",Ao={activeBadge:p8,activeBadgeText:m8},g8=({className:e})=>s.jsxs("div",{className:b.clx(Ao.activeBadge,e),children:[s.jsx(w.Icon,{name:"Check",width:20,height:20}),s.jsx("p",{className:Ao.activeBadgeText,children:"Active"})]}),b8="_timerContainer_rh66p_2",_8="_timerText_rh66p_12",x8="_timerContainerAntistock_rh66p_16",Wa={timerContainer:b8,timerText:_8,timerContainerAntistock:x8},C8=({expiresAt:e})=>{const[t,n]=P.useState(u()),{isAntistock:r}=b.useGeneralStore();function u(){const a=new Date,i=new Date(e).getTime()-a.getTime();if(i<=0)return{hours:"00",minutes:"00",seconds:"00"};const o=Math.floor(i/(1e3*60*60)),c=Math.floor(i%(1e3*60*60)/(1e3*60)),l=Math.floor(i%(1e3*60)/1e3);return{hours:String(o).padStart(2,"0"),minutes:String(c).padStart(2,"0"),seconds:String(l).padStart(2,"0")}}return P.useEffect(()=>{const a=setInterval(()=>{n(u())},1e3);return()=>clearInterval(a)},[e]),t.hours==="00"&&t.minutes==="00"&&t.seconds==="00"?null:r?s.jsxs("div",{className:Wa.timerContainerAntistock,children:[s.jsxs("span",{children:[t.hours,":",t.minutes,":",t.seconds]}),s.jsx("span",{children:"remaining"})]}):s.jsxs("div",{className:Wa.timerContainer,children:[s.jsx(w.Icon,{name:"Clock"}),s.jsxs("p",{className:Wa.timerText,id:"md",children:[t.hours,":",t.minutes,":",t.seconds]})]})},E8="_progressBar_mcabf_4",T8="_progressBarLabel_mcabf_12",y8="_progressBarTrack_mcabf_17",k8="_progressBarFill_mcabf_28",wu={progressBar:E8,progressBarLabel:T8,progressBarTrack:y8,progressBarFill:k8},l0=({color:e,percent:t,disablePercentLabel:n})=>s.jsxs("div",{className:wu.progressBar,children:[!n&&s.jsxs("p",{className:wu.progressBarLabel,children:[t,"%"]}),s.jsx("div",{className:wu.progressBarTrack,children:s.jsx("div",{style:{width:`${t}%`,background:e||void 0},className:wu.progressBarFill})})]}),A8="_rating_1bpps_4",S8="_disabled_1bpps_9",I8="_ratingStar_1bpps_14",N8="_inactive_1bpps_22",Du={rating:A8,disabled:S8,ratingStar:I8,inactive:N8},v8=({setRating:e,rating:t,disabled:n})=>{const[r,u]=P.useState(0),a=o=>{n||u(+o.currentTarget.id)},i=o=>{n||e(o)};return s.jsx("div",{className:b.clx(Du.rating,{[Du.disabled]:n}),onMouseLeave:()=>u(0),children:[1,2,3,4,5].map(o=>s.jsx("div",{id:o.toString(),className:b.clx(Du.ratingStar,{[Du.inactive]:!(t>=o||r>=o)}),onMouseEnter:a,onClick:()=>i(o),children:t>=o||r>=o?s.jsx(Xp,{}):s.jsx(w.Icon,{name:"Star",fill:"var(--text-secondary)",width:22,height:21})},o))})},w8="_inputRange_iv6ow_4",D8="_inputRangeLabel_iv6ow_14",L8="_progressBar_iv6ow_22",P8="_progressBarFill_iv6ow_29",R8="_stepsContainer_iv6ow_40",O8="_step_iv6ow_40",M8="_stepDot_iv6ow_57",F8="_current_iv6ow_61",B8="_active_iv6ow_69",j8="_inactive_iv6ow_72",H8="_tooltip_iv6ow_77",Ht={inputRange:w8,inputRangeLabel:D8,progressBar:L8,progressBarFill:P8,stepsContainer:R8,step:O8,stepDot:M8,current:F8,default:"_default_iv6ow_65",active:B8,inactive:j8,tooltip:H8},U8=({totalSteps:e,step:t,onStepChange:n,label:r})=>{const[u,a]=P.useState(t),i=u===1?0:(u-1)/(e-1)*100,o=c=>{a(c),n(c)};return s.jsxs("div",{className:Ht.inputRange,children:[r&&s.jsx("div",{className:Ht.inputRangeLabel,children:r}),s.jsxs("div",{className:Ht.progressBar,children:[s.jsx("div",{className:Ht.progressBarFill,style:{width:`${Math.ceil(i)}%`}}),s.jsx("div",{className:Ht.stepsContainer,children:[...Array(e)].map((c,l)=>{const h=l+1,f=h<=u,m=h===u;return s.jsxs("div",{className:Ht.step,onClick:()=>o(h),children:[s.jsx("div",{className:b.clx(Ht.stepDot,m?Ht.current:Ht.default,f?Ht.active:Ht.inactive)}),m&&s.jsxs("div",{className:Ht.tooltip,style:{transform:`translateX(calc(50% - ${i<99?"40px":"70px"}))`},children:[s.jsx("span",{children:u}),s.jsx("span",{children:u===1?"month":"months"})]})]},h)})})]})]})},ma=({className:e,expiresAt:t})=>{const{shopGeneral:n}=b.useStorefrontStore(),r=b.useNavigate(),{isAntistock:u}=b.useGeneralStore();return s.jsxs("header",{className:`${ir.checkoutHeader} ${e}`,children:[s.jsxs("div",{className:ir.leftContainer,children:[s.jsx("div",{className:ir.backArrow,onClick:()=>{window.history.length>2?r(-1):r("/")},children:s.jsx(w.Icon,{name:"ArrowUp"})}),(n==null?void 0:n.info.logo)&&s.jsx("div",{className:ir.logoContainer,children:u?s.jsx("a",{className:ir.antistockLink,href:"https://antistock.io",target:"_blank",rel:"noopener noreferrer",children:"Antistock"}):s.jsx("img",{className:ir.logo,src:b.convertCfImageIdToUrl(n.info.logo.cfId,"200")})})]}),t&&s.jsx(C8,{expiresAt:t})]})},V8="_checkoutPrices_7fn88_1",$8="_priceRow_7fn88_12",z8="_label_7fn88_22",q8="_labelContainer_7fn88_26",Z8="_tooltipContainer_7fn88_34",W8="_infoIcon_7fn88_40",Y8="_tooltip_7fn88_34",G8="_totalRow_7fn88_94",X8="_totalLabel_7fn88_105",K8="_totalValue_7fn88_110",Ze={checkoutPrices:V8,priceRow:$8,label:z8,labelContainer:q8,tooltipContainer:Z8,infoIcon:W8,tooltip:Y8,totalRow:G8,totalLabel:X8,totalValue:K8},kr=({formatter:e,coupon:t,discount:n,totalWithDiscount:r,total:u,className:a,isShowSubtotal:i=!0,feeOrDiscount:o,serviceFeeAmount:c,replacementLabel:l,replacementAmount:h})=>{const f=Math.max(0,n),[m,p]=P.useState(!1),[g,x]=P.useState(!1),{priceAdjustment:C}=b.useCartStore(),{isAntistock:_}=b.useGeneralStore(),{settings:v}=b.useSettingsStore(),k={isDiscount:!1,fixedAmount:10,percentage:10},S=(()=>{const I=r!==void 0?r:u-f;if((!C||o===null||o===void 0)&&h==null&&(!k||c===null||c===void 0))return Math.max(I,0);let M=I;return C&&o!==null&&o!==void 0&&(C.isDiscount?M=Math.max(M-o,0):M=Math.max(M+o,0)),h!=null&&(M=Math.max(M+h,0)),k&&c!==null&&c!==void 0&&(k.isDiscount?M=Math.max(M-c,0):M=Math.max(M+c,0)),M})();return s.jsxs("div",{className:`${Ze.checkoutPrices} ${a||""}`,style:{border:_?"1px solid var(--border-secondary)":void 0},children:[i&&s.jsxs("div",{className:Ze.priceRow,children:[s.jsx("p",{className:Ze.label,id:"md",children:"Subtotal"}),s.jsx("p",{id:"md",children:e.format(u)})]}),(t||f>0)&&s.jsxs("div",{className:Ze.priceRow,children:[s.jsxs("p",{className:Ze.label,id:"md",children:["Discount ",t&&!(t!=null&&t.isFixed)&&`(${t==null?void 0:t.discount}%)`]}),s.jsx("p",{id:"md",children:t&&!(t!=null&&t.isFixed)&&(t==null?void 0:t.discount)===100?`-${e.format(u)}`:`-${e.format(f)}`})]}),o!=null&&o!==0&&C&&(C.fixedAmount!==0||C.percentage!==0)&&s.jsxs("div",{className:Ze.priceRow,children:[s.jsx("p",{className:Ze.label,id:"md",children:C.isDiscount?"Gateway Discount":"Gateway Fee"}),s.jsx("p",{id:"md",children:e.format(o)})]}),h!=null&&h!==0&&s.jsxs("div",{className:Ze.priceRow,children:[s.jsxs("div",{className:Ze.labelContainer,children:[s.jsx("p",{className:Ze.label,id:"md",children:l||"Priority Replacement"}),_&&s.jsxs("div",{className:Ze.tooltipContainer,children:[s.jsx("div",{className:Ze.infoIcon,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:s.jsx(w.Icon,{name:"Info",fill:"var(--text-secondary)"})}),m&&s.jsx("div",{className:Ze.tooltip,children:"This is an optional add-on you enabled to protect your checkout."})]})]}),s.jsx("p",{id:"md",children:e.format(h)})]}),c!=null&&c!==0&&k&&(k.fixedAmount!==0||k.percentage!==0)&&s.jsxs("div",{className:Ze.priceRow,children:[s.jsxs("div",{className:Ze.labelContainer,children:[s.jsx("p",{className:Ze.label,id:"md",children:k.isDiscount?"Platform Discount":"Platform Fee"}),_&&s.jsxs("div",{className:Ze.tooltipContainer,children:[s.jsx("div",{className:Ze.infoIcon,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:s.jsx(w.Icon,{name:"Info",fill:"var(--text-secondary)"})}),g&&s.jsxs("div",{className:Ze.tooltip,children:["Platform ",k.isDiscount?"discount":"fee",(v==null?void 0:v.showPoweredBy)&&" charged by Antistock"," for processing your payment."]})]})]}),s.jsx("p",{id:"md",children:e.format(c)})]}),s.jsxs("div",{className:Ze.totalRow,children:[s.jsx("p",{className:Ze.totalLabel,id:"md-bold",children:"Total Due"}),s.jsx("p",{className:Ze.totalValue,id:"md-bold",children:e.format(S)})]})]})},Q8="_checkoutProduct_8yrle_1",J8="_isOrder_8yrle_1",e7="_productDetails_8yrle_14",t7="_productImage_8yrle_20",n7="_isOrderImage_8yrle_30",r7="_productImageAntistock_8yrle_34",u7="_image_8yrle_39",a7="_productInfo_8yrle_44",i7="_productInfoOverrodePrice_8yrle_51",s7="_productHeader_8yrle_55",o7="_quantityBadge_8yrle_61",c7="_productPrice_8yrle_79",l7="_priceContainer_8yrle_88",d7="_originalPrice_8yrle_97",f7="_overridePrice_8yrle_103",h7="_deliveryCategories_8yrle_107",p7="_customerNote_8yrle_115",m7="_noteHeader_8yrle_122",g7="_logoContainer_8yrle_128",b7="_shopName_8yrle_140",_7="_noteContent_8yrle_144",x7="_productName_8yrle_150",C7="_replacementRequests_8yrle_165",E7="_replacementRequestsTitle_8yrle_175",T7="_replacementButton_8yrle_182",y7="_replacementButtonText_8yrle_186",k7="_replacementRequestsList_8yrle_190",Me={checkoutProduct:Q8,isOrder:J8,productDetails:e7,productImage:t7,isOrderImage:n7,productImageAntistock:r7,image:u7,productInfo:a7,productInfoOverrodePrice:i7,productHeader:s7,quantityBadge:o7,productPrice:c7,priceContainer:l7,originalPrice:d7,overridePrice:f7,deliveryCategories:h7,customerNote:p7,noteHeader:m7,logoContainer:g7,shopName:b7,noteContent:_7,productName:x7,replacementRequests:C7,replacementRequestsTitle:E7,replacementButton:T7,replacementButtonText:y7,replacementRequestsList:k7},A7="_deliveryItem_1x3fg_1",S7="_deliveryItemText_1x3fg_10",Vr={deliveryItem:A7,deliveryItemText:S7},Si={[ve.Text]:"View",[ve.Serial]:"View",[ve.Ebook]:"View",[ve.Link]:"Visit",[ve.Download]:"",[ve.Custom]:"View",[ve.Discord]:"Access",[ve.Telegram]:"Telegram"},Ii={[ve.Text]:"Content",[ve.Serial]:"Content",[ve.Ebook]:"Ebook",[ve.Link]:"Link",[ve.Download]:"Download",[ve.Custom]:"Content",[ve.Discord]:"Discord",[ve.Telegram]:"Telegram"},d0=()=>({[ve.Text]:s.jsx(w.Icon,{name:"FileText",fill:"var(--text-secondary)"}),[ve.Serial]:s.jsx(w.Icon,{name:"FileText",fill:"var(--text-secondary)"}),[ve.Ebook]:s.jsx(w.Icon,{name:"BookOpen",fill:"var(--text-secondary)"}),[ve.Link]:s.jsx(w.Icon,{name:"ArrowLineUpRight",fill:"var(--text-secondary)"}),[ve.Download]:s.jsx(w.Icon,{name:"DownloadSimple",fill:"var(--text-secondary)"}),[ve.Custom]:s.jsx(w.Icon,{name:"FileText",fill:"var(--text-secondary)"}),[ve.Discord]:s.jsx(w.Icon,{name:"DiscordLogo",fill:"var(--text-secondary)"}),[ve.Telegram]:s.jsx(w.Icon,{name:"TelegramLogo",fill:"var(--text-secondary)"})}),I7=({deliveryConfiguration:e})=>{const t=e.type;return t===ve.Text||t===ve.Custom||t===ve.Serial||t===ve.Discord?s.jsx(N7,{deliveryConfiguration:e}):s.jsx(v7,{deliveryConfiguration:e})},N7=({deliveryConfiguration:e})=>{const t=e.type,[n,r]=P.useState(!1),{setIsOpen:u}=b.useModalStore(),{isAntistock:a}=b.useGeneralStore(),i=()=>{u(!0),r(!0)};return s.jsxs(s.Fragment,{children:[a?s.jsx(w.Button,{type:"Secondary",onClick:o=>{o.stopPropagation(),i()},children:s.jsx("p",{className:Vr.deliveryItemText,children:e.customName??`${Si[t]} ${Ii[t]}`})}):s.jsxs(w.Button,{type:"Secondary",className:Vr.deliveryItem,onClick:o=>{o.stopPropagation(),i()},children:[d0()[t],s.jsx("p",{className:Vr.deliveryItemText,children:e.customName??`${Si[t]} ${Ii[t]}`})]}),n&&s.jsx(w.Modal,{close:()=>r(!1),withAnimation:!a,children:s.jsx(Cd,{deliveryConfiguration:e,setIsOpen:r})})]})},v7=({deliveryConfiguration:e})=>{const t=e.type;return s.jsxs(w.Button,{type:"Secondary",className:Vr.deliveryItem,onClick:()=>window.open(e.deliveryItems[0].textData,"_blank"),children:[d0()[t],s.jsx("p",{className:Vr.deliveryItemText,children:e.customName??`${Si[t]} ${Ii[t]}`})]})},w7="_replacementRequestItem_1sd2r_1",D7="_replacementRequestHeader_1sd2r_11",L7="_replacementRequestId_1sd2r_18",P7="_replacementRequestDescription_1sd2r_24",R7="_statusBadge_1sd2r_30",O7="_statusPending_1sd2r_38",M7="_statusApproved_1sd2r_43",F7="_statusDeclined_1sd2r_48",B7="_statusCancelled_1sd2r_53",j7="_replacementModal_1sd2r_58",H7="_replacementModalAntistock_1sd2r_68",U7="_replacementModalHeader_1sd2r_73",V7="_closeButton_1sd2r_87",$7="_replacementModalContent_1sd2r_101",z7="_statusSection_1sd2r_110",q7="_statusTitle_1sd2r_116",Z7="_statusDescription_1sd2r_123",W7="_actionButtons_1sd2r_130",Y7="_productsSection_1sd2r_137",G7="_productsList_1sd2r_151",X7="_productItem_1sd2r_157",K7="_noProducts_1sd2r_164",Q7="_previouslyDeliveredSection_1sd2r_171",J7="_previouslyDeliveredHeader_1sd2r_179",e9="_previouslyDeliveredTitle_1sd2r_186",t9="_caretIcon_1sd2r_192",n9="_caretIconRotated_1sd2r_196",r9="_previouslyDeliveredContent_1sd2r_200",u9="_previouslyDeliveredProductItem_1sd2r_209",Ie={replacementRequestItem:w7,replacementRequestHeader:D7,replacementRequestId:L7,replacementRequestDescription:P7,statusBadge:R7,statusPending:O7,statusApproved:M7,statusDeclined:F7,statusCancelled:B7,replacementModal:j7,replacementModalAntistock:H7,replacementModalHeader:U7,closeButton:V7,replacementModalContent:$7,statusSection:z7,statusTitle:q7,statusDescription:Z7,actionButtons:W7,productsSection:Y7,productsList:G7,productItem:X7,noProducts:K7,previouslyDeliveredSection:Q7,previouslyDeliveredHeader:J7,previouslyDeliveredTitle:e9,caretIcon:t9,caretIconRotated:n9,previouslyDeliveredContent:r9,previouslyDeliveredProductItem:u9},a9=({item:e,orderId:t,accessToken:n,onCancel:r})=>{var D,S;const[u,a]=P.useState(!1),[i,o]=P.useState(!1),[c,l]=P.useState(!1),{setIsOpen:h}=b.useModalStore(),{isAntistock:f}=b.useGeneralStore(),{setNotifications:m,notifications:p}=b.useNotificationStore(),g=()=>{h(!0),a(!0)},x=async()=>{var I,M;if(!t||!n){m([...p,{id:b.v4(),message:"Missing order information",status:"error"}]);return}o(!0);try{const q=await l2(t,n,e.id);m([...p,{id:b.v4(),message:((I=q.data)==null?void 0:I.message)||"Replacement request cancelled successfully",status:"success"}]),r==null||r(),a(!1)}catch(q){let U="Failed to cancel replacement request",L="";const j=q;if((M=j==null?void 0:j.response)!=null&&M.data){const F=j.response.data;F.message&&F.errors&&Array.isArray(F.errors)?(L=F.message,U=F.errors.join(", ")):F.errors&&Array.isArray(F.errors)?U=F.errors.join(", "):F.message&&(U=F.message)}else q instanceof Error&&(U=q.message);m([...p,{id:b.v4(),message:U,status:"error",label:L}])}finally{o(!1)}},C=()=>{if(!e.replacementItems||e.replacementItems.length===0){m([...p,{id:b.v4(),message:"No products to copy",status:"error"}]);return}const I=e.replacementItems.map(M=>`${M.originalSerialKey} -> ${M.replacementSerialKey}`).join(`
78
78
  `);navigator.clipboard.writeText(I).then(()=>{m([...p,{id:b.v4(),message:"Copied to clipboard",status:"success"}])})},_=()=>{if(!e.replacementItems||e.replacementItems.length===0){m([...p,{id:b.v4(),message:"No products to download",status:"error"}]);return}const I=e.replacementItems.map(L=>`${L.originalSerialKey} -> ${L.replacementSerialKey}`).join(`
79
- `),M=new Blob([I],{type:"text/plain"}),q=URL.createObjectURL(M),U=document.createElement("a");U.href=q,U.download=`replacement-request-${e.id}.txt`,document.body.appendChild(U),U.click(),document.body.removeChild(U),URL.revokeObjectURL(q)},v=I=>{switch(I){case de.PENDING:case de.PROCESSING:return Ie.statusPending;case de.APPROVED:case de.AUTO_APPROVED:case de.COMPLETED:return Ie.statusApproved;case de.DECLINED:return Ie.statusDeclined;case de.CANCELLED:case de.EXPIRED:return Ie.statusCancelled;default:return Ie.statusPending}},k=I=>{switch(I){case de.PENDING:case de.PROCESSING:return"In Progress";case de.APPROVED:case de.AUTO_APPROVED:case de.COMPLETED:return"Approved";case de.DECLINED:return"Denied";case de.CANCELLED:case de.EXPIRED:return"Cancelled";default:return"In Progress"}};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:Ie.replacementRequestItem,onClick:I=>{I.stopPropagation(),g()},children:[s.jsxs("div",{className:Ie.replacementRequestHeader,children:[s.jsxs("span",{className:Ie.replacementRequestId,children:["ID: ",e.id]}),s.jsx("span",{className:b.clx(Ie.statusBadge,v(e.status)),children:k(e.status)})]}),s.jsxs("div",{className:Ie.replacementRequestDescription,children:[(e.status===de.PENDING||e.status===de.PROCESSING)&&"We're currently investigating your replacement. It may take a minimum of 24-48 hours for our team to get back to you.",(e.status===de.APPROVED||e.status===de.AUTO_APPROVED||e.status===de.COMPLETED)&&"We've approved your replacement request. Your replaced products are attached to this section.",e.status===de.DECLINED&&"We've denied your replacement request. You will not be able to request a replacement for these products in the future.",(e.status===de.CANCELLED||e.status===de.EXPIRED)&&"Your replacement request has been cancelled."]})]}),u&&s.jsx(w.Modal,{close:()=>a(!1),withAnimation:!f,children:s.jsxs("div",{className:b.clx(Ie.replacementModal,{[Ie.replacementModalAntistock]:f}),onClick:I=>I.stopPropagation(),children:[s.jsxs("div",{className:Ie.replacementModalHeader,children:[s.jsx("h3",{id:"h3",children:"Replacement Request"}),s.jsx("button",{className:Ie.closeButton,onClick:()=>a(!1),children:s.jsx(w.Icon,{name:"X"})})]}),s.jsxs("div",{className:Ie.replacementModalContent,children:[s.jsxs("div",{className:Ie.statusSection,children:[s.jsx("span",{className:b.clx(Ie.statusBadge,v(e.status)),children:k(e.status)}),s.jsxs("h4",{className:Ie.statusTitle,children:[(e.status===de.PENDING||e.status===de.PROCESSING)&&"Your Replacement Is In Progress",(e.status===de.APPROVED||e.status===de.AUTO_APPROVED||e.status===de.COMPLETED)&&"Your Replacement Was Approved",e.status===de.DECLINED&&"Your Replacement Was Denied",(e.status===de.CANCELLED||e.status===de.EXPIRED)&&"Your Replacement Was Cancelled"]}),s.jsxs("p",{className:Ie.statusDescription,children:[(e.status===de.PENDING||e.status===de.PROCESSING)&&"We're currently investigating your request. It may take a minimum of 24-48 hours for our team to get back to you.",(e.status===de.APPROVED||e.status===de.AUTO_APPROVED||e.status===de.COMPLETED)&&"We've approved your replacement request. Your replaced products are attached below.",e.status===de.DECLINED&&"We've denied your replacement request. You will not be able to request a replacement for these products in the future.",(e.status===de.CANCELLED||e.status===de.EXPIRED)&&"Your replacement request has been cancelled."]})]}),(e.status===de.APPROVED||e.status===de.AUTO_APPROVED||e.status===de.COMPLETED)&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:Ie.productsSection,children:[s.jsxs("div",{className:Ie.actionButtons,children:[s.jsxs(w.Button,{type:"Secondary",onClick:C,style:{display:"flex",alignItems:"center",gap:"5px",height:"32px"},children:[s.jsx(w.Icon,{name:"Copy"}),"Copy"]}),s.jsxs(w.Button,{type:"Secondary",onClick:_,style:{display:"flex",alignItems:"center",gap:"5px",height:"32px"},children:[s.jsx(w.Icon,{name:"ArrowLineDown"}),"Download"]})]}),s.jsx("div",{className:Ie.productsList,children:(D=e.replacementItems)==null?void 0:D.map((I,M)=>s.jsx("div",{className:Ie.productItem,children:s.jsx("span",{children:I.replacementSerialKey})},M))})]}),s.jsxs("div",{className:Ie.previouslyDeliveredSection,children:[s.jsxs("div",{className:Ie.previouslyDeliveredHeader,onClick:()=>l(!c),children:[s.jsx("span",{className:Ie.previouslyDeliveredTitle,children:"Previously Delivered Products"}),s.jsx(w.Icon,{name:"CaretDown",width:16,height:16,fill:"var(--text-secondary)",className:b.clx(Ie.caretIcon,{[Ie.caretIconRotated]:c})})]}),c&&s.jsx("div",{className:Ie.previouslyDeliveredContent,children:((S=e.replacementItems)==null?void 0:S.map((I,M)=>s.jsx("div",{className:Ie.previouslyDeliveredProductItem,children:s.jsx("span",{children:I.originalSerialKey})},M)))||s.jsx("div",{className:Ie.noProducts,children:"No products found"})})]})]})]}),s.jsx("div",{className:Ie.replacementModalFooter,children:e.status===de.PENDING&&s.jsx(w.Button,{type:"Secondary",onClick:x,disabled:i,style:{width:"fit-content",margin:"0 auto 8px"},children:i?"CANCELLING...":"CANCEL REPLACEMENT REQUEST"})})]})})]})},a9="_replacementModal_4liek_1",i9="_replacementModalAntistock_4liek_12",s9="_replacementModalHeader_4liek_17",o9="_title_4liek_25",c9="_closeButton_4liek_32",l9="_replacementModalContent_4liek_46",d9="_bottomSheet_4liek_53",f9="_content_4liek_61",h9="_productReplaceContainer_4liek_65",p9="_scrollableBox_4liek_76",m9="_searchContainer_4liek_90",g9="_productItem_4liek_94",b9="_productItemError_4liek_125",_9="_scrollIndicator_4liek_129",x9="_noResults_4liek_138",C9="_replacementForm_4liek_148",E9="_formField_4liek_155",T9="_imageDescription_4liek_167",y9="_imageInputContainer_4liek_174",k9="_addButton_4liek_181",A9="_imagesList_4liek_190",S9="_imageItem_4liek_197",I9="_imageUrl_4liek_207",N9="_removeButton_4liek_214",v9="_replacementModalFooter_4liek_263",w9="_fieldError_4liek_269",D9="_requestButton_4liek_275",Le={replacementModal:a9,replacementModalAntistock:i9,replacementModalHeader:s9,title:o9,closeButton:c9,replacementModalContent:l9,bottomSheet:d9,content:f9,productReplaceContainer:h9,scrollableBox:p9,searchContainer:m9,productItem:g9,productItemError:b9,scrollIndicator:_9,noResults:x9,replacementForm:C9,formField:E9,imageDescription:T9,imageInputContainer:y9,addButton:k9,imagesList:A9,imageItem:S9,imageUrl:I9,removeButton:N9,replacementModalFooter:v9,fieldError:w9,requestButton:D9},L9=({isOpen:e,onClose:t,product:n,orderId:r,accessToken:u,onSuccess:a,allowedReplacementReasons:i})=>{const{isAntistock:o}=b.useGeneralStore(),{setNotifications:c,notifications:l}=b.useNotificationStore(),[h,f]=P.useState([]),[m,p]=P.useState(""),[g,x]=P.useState((i==null?void 0:i[0])||""),[C,_]=P.useState(""),[v,k]=P.useState(""),[D,S]=P.useState([]),[I,M]=P.useState(!1),[q,U]=P.useState({}),L=/^https:\/\/i\.imgur\.com\/[A-Za-z0-9_-]+\.(?:jpg|jpeg|png|gif|webp|mp4)$/,j=y=>L.test(y),F=P.useMemo(()=>{var y;return((y=n.deliveryCategories)==null?void 0:y.filter(z=>z.type==="SERIALS").flatMap(z=>z.deliveryItems))||[]},[n.deliveryCategories]),Q=P.useMemo(()=>n.replacementRequests?new Set(n.replacementRequests.flatMap(y=>y.replacementItems||[]).map(y=>y.originalSerialKey)):new Set,[n.replacementRequests]),ae=P.useMemo(()=>F.filter(y=>!Q.has(y.serialKey)),[F,Q]),ee=P.useMemo(()=>new Vd.Fuse(ae,{keys:["serialKey"],threshold:.4}),[ae]),he=P.useMemo(()=>v.trim()?ee.search(v).map(y=>y.item):ae,[v,ee,ae]),Ee=()=>{const y=m.trim();if(U(z=>({...z,images:void 0})),!y){U(z=>({...z,images:"Please enter an image URL"}));return}if(!j(y)){U(z=>({...z,images:"Please enter a valid Imgur link (e.g., https://i.imgur.com/example.jpg)"}));return}if(h.includes(y)){U(z=>({...z,images:"This image URL has already been added"}));return}f(z=>[...z,y]),p("")},je=y=>{f(z=>z.filter((re,J)=>J!==y))},ke=y=>{S(z=>z.includes(y)?z.filter(re=>re!==y):[...z,y]),q.selectedItems&&U(z=>({...z,selectedItems:void 0}))},E=()=>{S([]),f([]),p(""),x((i==null?void 0:i[0])||""),_(""),k(""),U({})},Z=()=>{E(),t()},ne=async()=>{var z,re,J,ie;U({});const y={};if(D.length===0&&(y.selectedItems="Please select at least one item to replace"),h.length===0&&(y.images="Please add at least one image"),g.trim()||(y.reason="Please select a reason for replacement"),Object.keys(y).length>0){U(y);return}if(!r||!u){c([...l,{id:b.v4(),message:"Missing order information",status:"error"}]);return}M(!0);try{const te=await c2(r,u,{partOrderId:n.id,deliveryItemIds:D,imageUrls:h,reason:g,message:C});c([...l,{id:b.v4(),message:((z=te.data)==null?void 0:z.message)||"Replacement request submitted successfully",status:"success"}]),(re=te.data)!=null&&re.id&&((J=te.data)!=null&&J.status)&&(a==null||a({id:te.data.id,status:te.data.status})),Z()}catch(te){console.log({error:te});let oe="Failed to submit replacement request",ce="";const Pe=te;if((ie=Pe==null?void 0:Pe.response)!=null&&ie.data){const H=Pe.response.data;H.message&&H.errors&&Array.isArray(H.errors)?(ce=H.message,oe=H.errors.join(", ")):H.errors&&Array.isArray(H.errors)?oe=H.errors.join(", "):H.message&&(oe=H.message)}else te instanceof Error&&(oe=te.message);c([...l,{id:b.v4(),message:oe,status:"error",label:ce}])}finally{M(!1)}};return!e||ae.length===0?null:s.jsx(w.Modal,{close:Z,withAnimation:!o,children:s.jsxs("div",{className:b.clx(Le.replacementModal,{[Le.replacementModalAntistock]:o}),onClick:y=>y.stopPropagation(),children:[s.jsxs("div",{className:Le.replacementModalHeader,children:[s.jsx("h3",{id:"h3 ",className:Le.title,children:"Request Replacement"}),s.jsx("button",{className:Le.closeButton,onClick:Z,children:s.jsx(w.Icon,{name:"X"})})]}),s.jsx("div",{className:Le.replacementModalContent,children:s.jsx("div",{className:Le.bottomSheet,children:s.jsxs("div",{className:Le.content,children:[s.jsx(w.Tip,{type:"info",message:"Info: Based on your replacement policy, it may take up to 24-48 hours for our team to review your request.",showCloseButton:!1,style:{marginBottom:"16px"}}),s.jsxs("div",{className:Le.productReplaceContainer,children:[s.jsx("div",{className:Le.searchContainer,children:s.jsx(w.Input,{onChange:y=>{k(y)},isSearch:!0,value:v,placeholder:"Search for delivered stock",label:"Product Replace List *"})}),s.jsx("div",{className:b.clx(Le.scrollableBox,{[Le.scrollableBoxAntistock]:o}),children:he.length>0?he.map(y=>s.jsxs("div",{className:b.clx(Le.productItem,{[Le.productItemError]:q.selectedItems&&!D.includes(y.id)}),onClick:()=>ke(y.id),children:[s.jsx(w.Checkbox,{value:D.includes(y.id),onChange:()=>ke(y.id)}),s.jsx("span",{children:y.serialKey})]},y.id)):s.jsx("div",{className:Le.noResults,children:s.jsxs("p",{children:['No items found matching "',v,'"']})})}),q.selectedItems&&s.jsx("div",{className:Le.fieldError,children:q.selectedItems}),s.jsx("div",{className:Le.scrollIndicator,children:s.jsx("p",{children:"To continue with your replacement request, scroll down."})})]}),s.jsxs("div",{className:Le.replacementForm,children:[s.jsxs("div",{className:Le.formField,children:[s.jsxs("div",{className:Le.imageInputContainer,children:[s.jsx(w.Input,{onChange:y=>{p(y),q.images&&U(z=>({...z,images:void 0}))},value:m,type:"text",placeholder:"https://i.imgur.com/image-link.png",label:"Images *",error:q.images,style:{paddingRight:"60px"}}),s.jsx(w.Button,{type:"Primary",className:Le.addButton,onClick:Ee,children:"Add"})]}),s.jsx("div",{className:Le.imageDescription,children:s.jsx("p",{children:"We recommend uploading your image with IMGUR then copying the image link and pasting the link here."})}),h.length>0&&s.jsx("div",{className:Le.imagesList,children:h.map((y,z)=>s.jsxs("div",{className:Le.imageItem,children:[s.jsx("span",{className:Le.imageUrl,children:y}),s.jsx("button",{className:Le.removeButton,onClick:()=>je(z),children:s.jsx(w.Icon,{name:"Trash"})})]},z))})]}),s.jsx("div",{className:Le.formField,children:s.jsx(w.Select,{options:(i==null?void 0:i.filter(y=>y!==g))||[],onChange:y=>{x(y),q.reason&&U(z=>({...z,reason:void 0}))},value:g,isSearch:!1,label:"Reason *",isMaxLength:!1,error:q.reason})}),s.jsx("div",{className:Le.formField,children:s.jsx(w.Textarea,{placeholder:"Use this space to provide our team with additional details regarding your replacement request.",onChange:_,label:"Your Message (Optional)",value:C})})]})]})})}),s.jsx("div",{className:Le.replacementModalFooter,children:s.jsx(w.Button,{type:"Primary",className:Le.requestButton,onClick:ne,disabled:I,children:I?"SUBMITTING...":"REQUEST REPLACEMENT"})})]})})},ga=({isOrder:e,product:t,isApplicableForReplacement:n,orderId:r,accessToken:u,allowedReplacementReasons:a})=>{var C;const{shopGeneral:i}=b.useStorefrontStore(),o=t.subscriptionSettings,{cart:c}=su(),{isAntistock:l}=b.useGeneralStore(),[h,f]=P.useState(!1),{setIsOpen:m}=b.useModalStore(),p=P.useMemo(()=>t.replacementRequests?new Set(t.replacementRequests.flatMap(_=>_.replacementItems||[]).map(_=>_.originalSerialKey)):new Set,[t.replacementRequests]),g=P.useMemo(()=>{var v;return(((v=t.deliveryCategories)==null?void 0:v.filter(k=>k.type==="SERIALS").flatMap(k=>k.deliveryItems))||[]).filter(k=>!p.has(k.serialKey)).length},[t.deliveryCategories,p]),x=()=>{m(!0),f(!0)};return s.jsxs("div",{className:`${Me.checkoutProduct} ${e?Me.isOrder:""}`,children:[s.jsxs("div",{className:Me.productDetails,children:[s.jsx("div",{className:`${Me.productImage} ${e?Me.isOrderImage:""} ${l?Me.productImageAntistock:""}`,children:t!=null&&t.image?s.jsx("img",{className:Me.image,src:b.convertCfImageIdToUrl(t.image.cfId,"100")}):s.jsx(w.Icon,{name:"Image",fill:"var(--text-secondary)"})}),s.jsx("div",{className:b.clx(Me.productInfo,{[Me.productInfoOverrodePrice]:t.variantsGateways&&c.gateway&&t.variantsGateways.some(_=>_.name===c.gateway&&_.overrodePrice)}),children:s.jsxs("div",{className:Me.productHeader,children:[s.jsx("h2",{className:Me.productName,id:"h5",children:t.name}),s.jsxs("span",{className:Me.quantityBadge,id:"md",children:[t.price.quantity,"x"]})]})}),t.chargeType==="RECURRING"&&s.jsx("p",{className:Me.productPrice,id:"md",children:o&&`${b.formatPrice(o.price)} / ${b.normalizeInterval(o.recurringIntervalDays||0)}${o.entryFee?" + "+b.formatPrice(o.entryFee):""}`}),t.chargeType==="ONE_TIME"&&s.jsx(s.Fragment,{children:t.variantsGateways&&c.gateway&&t.variantsGateways.some(_=>_.name===c.gateway&&_.overrodePrice)?s.jsxs("div",{className:Me.priceContainer,children:[s.jsx("span",{className:Me.originalPrice,id:"md",children:b.formatPrice(t.price)}),s.jsx("span",{className:Me.overridePrice,id:"md",children:b.formatPrice(((C=t.variantsGateways.find(_=>_.name===c.gateway))==null?void 0:C.overrodePrice)||t.price)})]}):s.jsx("p",{className:Me.productPrice,id:"md",children:b.formatPrice(t.price)})})]}),t.deliveryCategories&&s.jsx("div",{className:Me.deliveryCategories,children:t.deliveryCategories.map(_=>s.jsx(S7,{deliveryConfiguration:_},_.id))}),t.customerNote&&s.jsxs("div",{className:Me.customerNote,style:l?{border:"1px solid var(--border-secondary)"}:void 0,children:[s.jsxs("div",{className:Me.noteHeader,children:[(i==null?void 0:i.info.logo)&&s.jsx("div",{className:Me.logoContainer,children:s.jsx("img",{src:b.convertCfImageIdToUrl(i==null?void 0:i.info.logo.cfId,"200")})}),s.jsx("p",{className:Me.shopName,id:"md",children:i==null?void 0:i.info.name})]}),s.jsx("p",{className:Me.noteContent,id:"md",children:t.customerNote})]}),t.replacementRequests&&t.replacementRequests.length===0&&n&&g>0&&s.jsx(w.Button,{type:"Secondary",className:Me.replacementButton,onClick:_=>{_.stopPropagation(),x()},children:s.jsx("p",{className:Me.replacementButtonText,children:"Request Replacement"})}),t.replacementRequests&&t.replacementRequests.length>0&&n&&s.jsxs("div",{className:Me.replacementRequests,children:[s.jsx("h4",{className:Me.replacementRequestsTitle,children:"Replacements"}),s.jsx("div",{className:Me.replacementRequestsList,children:t.replacementRequests.map(_=>s.jsx(u9,{item:_,orderId:r,accessToken:u,onCancel:()=>{}},_.id))}),g>0&&s.jsx(w.Button,{type:"Secondary",onClick:_=>{_.stopPropagation(),x()},children:s.jsx("p",{className:Me.replacementButtonText,children:"Request New Replacement"})})]}),s.jsx(L9,{isOpen:h,onClose:()=>f(!1),product:t,orderId:r,accessToken:u,allowedReplacementReasons:a})]})},P9="_coupon_dkjzv_1",R9="_couponApplied_dkjzv_7",O9="_discount_dkjzv_17",M9="_removeButton_dkjzv_23",F9="_removeButtonText_dkjzv_27",B9="_couponInput_dkjzv_31",j9="_couponInputContainer_dkjzv_37",kn={coupon:P9,couponApplied:R9,discount:O9,removeButton:M9,removeButtonText:F9,couponInput:B9,couponInputContainer:j9},H9=({applyCoupon:e,couponData:t,discount:n,removeCoupon:r,gateway:u})=>{const[a,i]=P.useState(null),[o,c]=P.useState(!1),{isAntistock:l}=b.useGeneralStore();return s.jsxs("div",{className:kn.coupon,children:[o&&s.jsx(er,{speed:2,width:500,height:48,viewBox:"0 0 500 48",backgroundColor:"var(--surface-secondary)",foregroundColor:"var(--surface-disabled)",className:kn.skeleton,style:{borderRadius:"var(--border-radius)"},children:s.jsx("rect",{x:"0",y:"0",rx:"10",ry:"10",width:"100%",height:"48"})}),!o&&(t?s.jsxs("div",{className:kn.couponApplied,style:l?{border:"1px solid var(--border-secondary)"}:void 0,children:[s.jsx(w.Icon,{name:"Check",fill:"var(--text-success)"}),s.jsxs("p",{id:"md",style:{color:l?"var(--text-primary)":void 0},children:[a," is applied"," ",s.jsxs("span",{className:kn.discount,children:["-",n," ",!t.isFixed&&`(${t.discount}%)`]})]}),s.jsx("button",{className:kn.removeButton,onClick:r,children:s.jsx("span",{className:kn.removeButtonText,children:"Remove"})})]}):s.jsxs("div",{className:kn.couponInput,children:[s.jsxs("div",{className:kn.couponInputContainer,children:[s.jsx(w.Input,{placeholder:"Enter a discount code",value:a||"",onChange:h=>{i(h===""?null:h)}}),s.jsx(w.Button,{onClick:async()=>{c(!0),a&&await e(a),c(!1)},disabled:!u||!a,type:"Primary",children:"Apply"})]}),!l&&!u&&s.jsx(w.Tip,{type:"warning",message:"The discount is related to the method of payment. Select to enter.",id:"md"})]}))]})},f0=({cart:e,products:t,applyCoupon:n,applyCouponPending:r,coupon:u,totalAndDiscount:a,removeCoupon:i})=>{const{priceAdjustment:o,serviceFee:c,replacementConfig:l}=b.useCartStore(),[h,f]=P.useState(!1),m=P.useMemo(()=>e.parts.map(k=>{const D=t.find(I=>I.id===k.productId),S=D==null?void 0:D.variants.find(I=>I.id===k.productVariantId);return k.chargeType==="RECURRING"&&f(!0),{id:(D==null?void 0:D.id)||0,image:D==null?void 0:D.images[0],name:(()=>{const I=(D==null?void 0:D.name)||"",M=(S==null?void 0:S.name)||"";return!I&&!M?"":!M||I===M?I:I?`${I} (${M})`:M})(),description:"",price:{quantity:k.quantity,amount:(S==null?void 0:S.price.amount)||0,currency:S==null?void 0:S.price.currency},subscriptionSettings:S==null?void 0:S.subscriptionSettings,chargeType:k.chargeType,variantsGateways:S==null?void 0:S.gateways}}),[e,t]),p=P.useMemo(()=>{const k=m[0];if(k!=null&&k.variantsGateways&&e.gateway){const D=k.variantsGateways.find(S=>S.name===e.gateway&&S.overrodePrice);if(D!=null&&D.overrodePrice)return D.overrodePrice.currency}return(k==null?void 0:k.price.currency)||"USD"},[m,e.gateway]),g=new Intl.NumberFormat("en-US",{style:"currency",currency:p}),x=P.useMemo(()=>u&&!u.isFixed&&u.discount===100||u&&u.isFixed&&u.discount&&u.discount>=a.total?a.total:a.totalWithDiscount?a.total-a.totalWithDiscount:0,[a,u]),C=o?(o==null?void 0:o.fixedAmount)+Math.round((a.totalWithDiscount!==void 0?a.totalWithDiscount:a.total-x)*((o==null?void 0:o.percentage)/100)):null,_=P.useMemo(()=>{const k=e.usePriorityReplacement===!0,D=k?l==null?void 0:l.priorityReplacement:null;if(!k||!(D!=null&&D.enabled))return{label:"",amount:null};const S=a.totalWithDiscount!==void 0?a.totalWithDiscount:a.total-x,I=(D.fixedFee||0)+S*(D.feePercentage||0)/100;return{label:D.name||"Priority Replacement",amount:I}},[e.usePriorityReplacement,l,a,x]),v=P.useMemo(()=>{if(!c)return null;const k=a.totalWithDiscount!==void 0?a.totalWithDiscount:a.total-x,I=((o&&C!==null&&C!==void 0?o.isDiscount?k-C:k+C:k)+(_.amount||0))*(c.percentage/100);return c.fixedAmount+I},[c,a,x,o,C,_]);return s.jsx("div",{className:zn.checkoutItemsContainer,children:s.jsxs("div",{className:zn.innerContainer,children:[s.jsx(ma,{}),s.jsxs("div",{className:zn.headerSection,children:[s.jsx("header",{className:zn.header,children:s.jsx("h1",{id:"h3",children:"Checkout"})}),s.jsx("div",{className:zn.productsContainer,children:m.map(k=>s.jsx(ga,{product:k},k.id))}),s.jsx("div",{className:zn.couponContainer,children:s.jsx(H9,{applyCoupon:n,applyCouponPending:r,couponData:u,discount:g.format(x),removeCoupon:i,gateway:e.gateway})}),s.jsx(kr,{formatter:g,coupon:u,total:a.total,discount:x,totalWithDiscount:a.totalWithDiscount,feeOrDiscount:h?null:C,serviceFeeAmount:h?null:v,replacementLabel:_.amount?_.label:"",replacementAmount:h?null:_.amount})]}),s.jsx("div",{className:zn.checkoutFooter,children:s.jsx(Hn,{})})]})})},U9="_checkoutOperational_b62bq_1",V9="_innerContainer_b62bq_17",$9="_innerContainerAntistock_b62bq_27",z9="_paymentMethodsSectionAntistock_b62bq_39",q9="_continueButtonAntistock_b62bq_49",Z9="_checkoutFooterAntistock_b62bq_59",W9="_antistock_b62bq_70",Y9="_paymentMethodsSection_b62bq_39",G9="_socialConnectSection_b62bq_81",X9="_socialConnectLabel_b62bq_84",K9="_socialConnectContent_b62bq_88",Q9="_continueButton_b62bq_49",J9="_button_b62bq_96",eg="_checkoutFooter_b62bq_59",gt={checkoutOperational:U9,innerContainer:V9,innerContainerAntistock:$9,paymentMethodsSectionAntistock:z9,continueButtonAntistock:q9,checkoutFooterAntistock:Z9,antistock:W9,paymentMethodsSection:Y9,socialConnectSection:G9,socialConnectLabel:X9,socialConnectContent:K9,continueButton:Q9,button:J9,checkoutFooter:eg},tg="_customFields_uhcib_2",ng="_checkboxWrapper_uhcib_9",rg="_textareaWrapper_uhcib_16",ug="_inputWrapper_uhcib_17",ag="_requiredStar_uhcib_27",cr={customFields:tg,checkboxWrapper:ng,textareaWrapper:rg,inputWrapper:ug,requiredStar:ag},h0=({customFields:e,setCustomFields:t})=>{if(e.length===0)return null;const n=e.map(r=>s.jsx(p0,{customField:r,setCustomFields:t},r.name));return s.jsx("div",{className:cr.customFields,children:n})},p0=({customField:e,setCustomFields:t})=>{const n=r=>{t(u=>u.map(a=>a.name===e.name?{...a,value:r}:a))};return s.jsx(ig,{value:e.value??"",placeholder:e.placeholder,required:e.required,defaultValue:e.defaultValue,type:e.type,onValueChange:n,label:e.name,regex:e.regex})},ig=({label:e,type:t,defaultValue:n,value:r,placeholder:u,regex:a,required:i,onValueChange:o})=>{if(P.useEffect(()=>{r===""&&n!==void 0&&o(String(n))},[]),t===Dn.Checkbox)return s.jsxs("label",{className:cr.checkboxWrapper,children:[s.jsx(w.CheckboxSettings,{value:r==="true",onChange:l=>o(l?"true":"false")}),s.jsxs("p",{className:cr.checkboxLabel,children:[e,i&&s.jsx("span",{className:cr.requiredStar,children:"*"})]})]});if(t===Dn.Hidden)return s.jsx("input",{type:"hidden",value:String(n??""),required:i});const c=l=>{let h;if(t===Dn.Number)h=/^\d*$/;else if(a)try{h=new RegExp(a)}catch(f){console.error("Invalid regex pattern:",a,f),h=/.*/}else h=/.*/;h.test(l)&&o(l)};return t===Dn.Textarea?s.jsx("div",{className:cr.textareaWrapper,children:s.jsx(w.Textarea,{label:e,value:r,placeholder:u,onChange:c,required:i})}):s.jsx("div",{className:cr.inputWrapper,children:s.jsx(w.Input,{type:t===Dn.Number?"number":"text",placeholder:t===Dn.Number?"Type something number...":u,label:e,value:r,required:i,onChange:c})})},sg="_connectedContainer_1rxr8_1",og="_userInfo_1rxr8_10",cg="_avatar_1rxr8_16",lg="_avatarImage_1rxr8_26",Lu={connectedContainer:sg,userInfo:og,avatar:cg,avatarImage:lg},m0=({customerEmail:e})=>{const{discordInfo:t,setDiscordInfo:n}=b.useDiscordStore(),{notifications:r,setNotifications:u}=b.useNotificationStore(),[a,i]=P.useState(!1),[o,c]=P.useState(0),[l,h]=P.useState(null),f=20,m=x=>{var C,_,v,k;return(_=(C=x==null?void 0:x.response)==null?void 0:C.data)!=null&&_.error?x.response.data.error:(k=(v=x==null?void 0:x.response)==null?void 0:v.data)!=null&&k.message?x.response.data.message:x!=null&&x.message?x.message:"Failed to connect to Discord. Please try again later."},p=(x,C)=>{u([...r,{id:b.v4(),message:x,status:C}])};P.useEffect(()=>{if(l&&a){const x=setInterval(()=>{l.closed&&(clearInterval(x),i(!1),h(null))},1e3);return()=>clearInterval(x)}},[l,a]);const g=()=>{e.trim()!==""&&(i(!0),c(0),D2({customerEmail:e,tsId:b.useGetTsId()}).then(({data:x})=>{const C=window.open(x.redirectUrl);h(C),(!C||C.closed||typeof C.closed>"u")&&setTimeout(()=>{const k=document.createElement("a");k.href=x.redirectUrl,k.target="_blank",k.click()});let _;const v=()=>{if(c(k=>k+1),o>=f||C&&C.closed){o>=f&&p("Authorization timeout. Please try again.","error"),i(!1),clearTimeout(_);return}L2({id:x.id,customerEmail:e}).then(({data:k})=>{n({authorized:!0,id:x.id,avatar:k.avatar,username:k.username}),C&&C.close(),i(!1),h(null),p("Discord successfully connected!","success"),clearTimeout(_)}).catch(k=>{var D;if(console.log("Waiting for authorization...",k,{newWindow:C}),C&&C.closed){i(!1),clearTimeout(_);return}if((D=k==null?void 0:k.response)!=null&&D.status&&k.response.status!==404&&k.response.status>=400){p(m(k),"error"),i(!1),clearTimeout(_);return}clearTimeout(_),_=setTimeout(v,1500)})};v()}).catch(x=>{console.log("Could not initiate Discord authorization",x),p(m(x),"error"),i(!1)}))};return t!=null&&t.authorized?s.jsxs("div",{className:Lu.connectedContainer,children:[s.jsxs("div",{className:Lu.userInfo,children:[s.jsx("div",{className:Lu.avatar,children:t.avatar?s.jsx("img",{className:Lu.avatarImage,src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=256`}):s.jsx(w.Icon,{name:"UserCircle"})}),s.jsx("p",{children:t.username}),s.jsx(m8,{})]}),s.jsx(w.Button,{type:"Secondary",onClick:g,children:"Reconnect"})]}):s.jsx(w.Button,{type:"Secondary",onClick:g,style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:"10px"},disabled:a,children:a?s.jsx(w.Loader,{}):s.jsxs(s.Fragment,{children:[s.jsx(w.Icon,{name:"DiscordLogo"}),s.jsx(Gc,{children:"Connect Your Discord"})]})})},dg="_paymentMethodsContainer_1pfqr_2",fg="_antistock_1pfqr_15",So={paymentMethodsContainer:dg,antistock:fg},hg="_paymentMethod_1it0n_3",pg="_selected_1it0n_16",mg="_alignColumn_1it0n_19",gg="_reversed_1it0n_25",bg="_antistock_1it0n_29",_g="_paymentText_1it0n_36",xg="_balanceText_1it0n_50",Cg="_signInLink_1it0n_54",Eg="_iconContainer_1it0n_63",Tg="_gatewayLogo_1it0n_76",yg="_poweredByLogo_1it0n_77",kg="_logo_1it0n_82",Se={paymentMethod:hg,selected:pg,alignColumn:mg,reversed:gg,antistock:bg,paymentText:_g,balanceText:xg,signInLink:Cg,iconContainer:Eg,gatewayLogo:Tg,poweredByLogo:yg,logo:kg},Ag="_bottomSheet_1x8kc_1",Sg="_content_1x8kc_8",Ig="_description_1x8kc_11",Ng="_title_1x8kc_15",vg="_buttonGroup_1x8kc_19",wg="_buttonWrapper_1x8kc_29",Dg="_fullWidthButton_1x8kc_32",Lg="_modal_1x8kc_36",Pg="_header_1x8kc_43",_n={bottomSheet:Ag,content:Sg,description:Ig,title:Ng,buttonGroup:vg,buttonWrapper:wg,fullWidthButton:Dg,modal:Lg,header:Pg},Rg=({setIsOpen:e,balance:t})=>{const n=b.useNavigate(),{setIsOpen:r}=b.useModalStore(),u=()=>{n("/top-up?redirectRoute=checkout")};function a(){r(!1),setTimeout(()=>{e(!1)},300)}return s.jsxs("div",{className:_n.modal,onClick:i=>i.stopPropagation(),children:[s.jsxs("div",{className:_n.header,children:[s.jsx("h3",{id:"h3",className:_n.title,children:"Insufficient Customer Balance"}),s.jsx(w.Icon,{name:"X",hoverable:!0,onClick:a,fill:"var(--text-primary)"})]}),s.jsxs("div",{className:_n.bottomSheet,children:[s.jsx("div",{className:_n.content,children:s.jsxs("p",{className:_n.description,children:["You currently have ",t&&b.formatPrice(t)," in your balance. After topping up the required amount, you can continue to checkout."]})}),s.jsxs("div",{className:_n.buttonGroup,children:[s.jsx("div",{className:_n.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:a,children:"Cancel"})}),s.jsx("div",{className:_n.fullWidthButton,children:s.jsx(w.Button,{type:"Primary",onClick:u,children:"Add Balance"})})]})]})]})},is=({align:e,gateway:t,gatewayDisplayName:n,selected:r,onSelect:u,total:a,onSignInClick:i,reversed:o,isAntistock:c=!1})=>{const{token:l}=b.useStorefrontStore(),{balance:h}=b.useCustomerDashboardStore(),[f,m]=P.useState(!1),{setIsOpen:p}=b.useModalStore(),g=x=>{x.stopPropagation(),u==null||u(t),h&&h.amount<a&&(m(!0),p(!0))};return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:b.clx(Se.paymentMethod,{[Se.selected]:r,[Se.alignColumn]:e==="column",[Se.reversed]:o&&!c,[Se.antistock]:c}),onClick:g,children:c?s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:Se.paymentText,id:"md",children:[n," ",s.jsxs("span",{className:Se.balanceText,id:"md",children:["(",l?h&&b.formatPrice(h):s.jsx("a",{className:Se.signInLink,onClick:i,id:"md",children:"Sign in"}),")"]})]}),s.jsx("div",{className:Se.iconContainer,children:s.jsx(w.Icon,{name:"Wallet",fill:"var(--text-primary)",width:20,height:20})})]}):s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:Se.paymentText,id:"md",children:[n," ",s.jsxs("span",{className:Se.balanceText,id:"md",children:["(",l?h&&b.formatPrice(h):s.jsx("a",{className:Se.signInLink,onClick:i,id:"md",children:"Sign in"}),")"]})]}),s.jsx("div",{className:Se.iconContainer,children:s.jsx(w.Icon,{name:"Wallet",fill:"var(--text-primary)",width:20,height:20})})]})}),f&&s.jsx(w.Modal,{close:()=>m(!1),children:s.jsx(Rg,{setIsOpen:m,balance:h})})]})};var qe=(e=>(e.BankCard="BANK_CARD",e.BankTransfer="BANK_TRANSFER",e.PayPal="PAYPAL",e.CashApp="CASHAPP",e.Crypto="CRYPTO",e.AppleGooglePay="APPLE_AND_GOOGLE_PAY",e.Custom="CUSTOM",e))(qe||{});const Og={[qe.CashApp]:s.jsx(jl,{}),[qe.AppleGooglePay]:s.jsx(Ul,{}),[qe.BankCard]:s.jsx(Bl,{}),[qe.Crypto]:s.jsx(Ml,{}),[qe.PayPal]:s.jsx(Hl,{}),[qe.Custom]:s.jsx("div",{}),[qe.BankTransfer]:s.jsx(Vl,{})},Mg={[qe.CashApp]:s.jsx(jl,{isAntistock:!0}),[qe.AppleGooglePay]:s.jsx(Ul,{isAntistock:!0}),[qe.BankCard]:s.jsx(Bl,{isAntistock:!0}),[qe.Crypto]:s.jsx(Ml,{isAntistock:!0}),[qe.PayPal]:s.jsx(Hl,{}),[qe.Custom]:s.jsx("div",{}),[qe.BankTransfer]:s.jsx(Vl,{isAntistock:!0})},Io={[qe.CashApp]:"Cash App",[qe.AppleGooglePay]:"Apple Pay / Google Pay",[qe.BankCard]:"Debit / Credit Card",[qe.Crypto]:"Cryptocurrency",[qe.PayPal]:"PayPal",[qe.Custom]:"",[qe.BankTransfer]:"Bank Transfer"},ss=({align:e,paymentMethod:t,gatewayDisplayName:n,gatewayLogoCfId:r,poweredByLogoCfId:u,selected:a,onSelect:i,className:o,isAntistock:c=!1})=>{const l=t===qe.Custom;return t?s.jsx("div",{className:b.clx(Se.paymentMethod,{[Se.selected]:a,[Se.alignColumn]:e==="column",[Se.antistock]:c},o),onClick:()=>i&&i(t),children:c?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:Se.paymentText,id:"md",children:l?n:Io[t]}),s.jsxs("div",{className:Se.iconContainer,children:[l?s.jsx("div",{className:Se.gatewayLogo,children:s.jsx("img",{className:Se.logo,src:b.convertCfImageIdToUrl(r,"100"),alt:n})}):Mg[t],u&&s.jsx("div",{className:Se.poweredByLogo,children:s.jsx("img",{className:Se.logo,src:b.convertCfImageIdToUrl(u,"100"),alt:n})})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:Se.paymentText,id:"md",children:l?n:Io[t]}),s.jsxs("div",{className:Se.iconContainer,children:[l?s.jsx("div",{className:Se.gatewayLogo,children:s.jsx("img",{className:Se.logo,src:b.convertCfImageIdToUrl(r,"100"),alt:n})}):Og[t],u&&s.jsx("div",{className:Se.poweredByLogo,children:s.jsx("img",{className:Se.logo,src:b.convertCfImageIdToUrl(u,"100"),alt:n})})]})]})}):s.jsxs("div",{className:b.clx(Se.paymentMethod,o),children:[s.jsx("div",{className:Se.gatewayLogo,children:s.jsx("img",{className:Se.logo,src:b.convertCfImageIdToUrl(r,"100"),alt:n})}),s.jsx("p",{className:Se.paymentText,children:n})]})},os=({possibleGateways:e,setGateway:t,totalAndDiscount:n,onSignInClick:r,setPaymentMethod:u,isAntistock:a=!1})=>{const[i,o]=P.useState(),[c,l]=P.useState(),{setPriceAdjustment:h,setServiceFee:f}=b.useCartStore(),[m,p]=P.useState(null),g=C=>{t(C);const _=m==null?void 0:m.find(v=>v.name===C);h((_==null?void 0:_.priceAdjustment)||null),f((_==null?void 0:_.serviceFee)||null)},x=(C,_)=>{c!==_&&g(_),u(C),o(C),l(_)};return P.useEffect(()=>{if(m&&m.length>0){const C=m[0];if(C.name==="Balance")l(C.name),t(C.name),h(C.priceAdjustment||null),f(C.serviceFee||null);else if(C.paymentMethods&&C.paymentMethods.length>0){const _=C.paymentMethods[0];o(_),l(C.name),t(C.name),u(_),h(C.priceAdjustment||null),f(C.serviceFee||null)}}},[m]),P.useEffect(()=>{const C=async()=>{const{data:_}=await Xc([...e.availableGateways,...e.requiresSignInGateways]),v=Array.isArray(_)?_:_.gateways;p(v)};(e.availableGateways.length||e.requiresSignInGateways.length)&&C()},[]),P.useLayoutEffect(()=>{h(null),f(null)},[]),s.jsxs(s.Fragment,{children:[m&&s.jsx("div",{className:b.clx(So.paymentMethodsContainer,{[So.antistock]:a}),children:m==null?void 0:m.map(C=>C.name==="Balance"?s.jsx(is,{gateway:C.name,gatewayDisplayName:C.displayName,onSelect:_=>{l(_),c!==_&&g(_)},selected:C.name===c,total:n.total,onSignInClick:r,reversed:!0,isAntistock:a},C.name):C.paymentMethods.map(_=>s.jsx(ss,{paymentMethod:_,gateway:C.name,gatewayDisplayName:C.displayName,gatewayLogoCfId:C.logoCfImageId,poweredByLogoCfId:C.poweredByImageCfImageId,onSelect:v=>x(v,C.name),selected:i===_&&c===C.name,isAntistock:a},`${C.name}-${_}`)))}),!m&&(a?s.jsx(w.Loader,{}):s.jsx(er,{speed:2,width:"100%",height:"220px",viewBox:"0 0 600 220",backgroundColor:"var(--surface-secondary)",foregroundColor:"var(--surface-disabled)",style:{borderRadius:"var(--border-radius)"},children:s.jsx("rect",{x:"0",y:"0",rx:"5",ry:"5",width:"100%",height:"100%"})}))]})},Fg="_modal_14r0b_1",Bg={modal:Fg},g0=({setIsOpen:e})=>{const{token:t}=b.useStorefrontStore(),{setIsOpen:n}=b.useModalStore();P.useEffect(()=>{t&&r()},[t]);const r=()=>{n(!1),setTimeout(()=>{e(!1)},300)};return s.jsx("div",{className:Bg.modal,onClick:u=>u.stopPropagation(),children:s.jsx(us,{inModal:!0})})},jg="_container_r8mpd_1",Hg="_text_r8mpd_9",Ug="_link_r8mpd_14",Rr={container:jg,text:Hg,link:Ug};function No(e){const t=[],n=String(e||"");let r=n.indexOf(","),u=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const i=n.slice(u,r).trim();(i||!a)&&t.push(i),u=r+1,r=n.indexOf(",",u)}return t}function b0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Vg=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$g=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zg={};function vo(e,t){return(zg.jsx?$g:Vg).test(e)}const qg=/[ \t\n\f\r]/g;function Zg(e){return typeof e=="object"?e.type==="text"?wo(e.value):!1:wo(e)}function wo(e){return e.replace(qg,"")===""}let pu=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};pu.prototype.normal={};pu.prototype.property={};pu.prototype.space=void 0;function _0(e,t){const n={},r={};for(const u of e)Object.assign(n,u.property),Object.assign(r,u.normal);return new pu(n,r,t)}function nu(e){return e.toLowerCase()}let vt=class{constructor(t,n){this.attribute=n,this.property=t}};vt.prototype.attribute="";vt.prototype.booleanish=!1;vt.prototype.boolean=!1;vt.prototype.commaOrSpaceSeparated=!1;vt.prototype.commaSeparated=!1;vt.prototype.defined=!1;vt.prototype.mustUseProperty=!1;vt.prototype.number=!1;vt.prototype.overloadedBoolean=!1;vt.prototype.property="";vt.prototype.spaceSeparated=!1;vt.prototype.space=void 0;let Wg=0;const pe=tr(),Ke=tr(),x0=tr(),W=tr(),He=tr(),mr=tr(),Pt=tr();function tr(){return 2**++Wg}const Ni=Object.freeze(Object.defineProperty({__proto__:null,boolean:pe,booleanish:Ke,commaOrSpaceSeparated:Pt,commaSeparated:mr,number:W,overloadedBoolean:x0,spaceSeparated:He},Symbol.toStringTag,{value:"Module"})),Ya=Object.keys(Ni);let cs=class extends vt{constructor(t,n,r,u){let a=-1;if(super(t,n),Do(this,"space",u),typeof r=="number")for(;++a<Ya.length;){const i=Ya[a];Do(this,Ya[a],(r&Ni[i])===Ni[i])}}};cs.prototype.defined=!0;function Do(e,t,n){n&&(e[t]=n)}function Ar(e){const t={},n={};for(const[r,u]of Object.entries(e.properties)){const a=new cs(r,e.transform(e.attributes||{},r),u,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[nu(r)]=r,n[nu(a.attribute)]=r}return new pu(t,n,e.space)}const C0=Ar({properties:{ariaActiveDescendant:null,ariaAtomic:Ke,ariaAutoComplete:null,ariaBusy:Ke,ariaChecked:Ke,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:He,ariaCurrent:null,ariaDescribedBy:He,ariaDetails:null,ariaDisabled:Ke,ariaDropEffect:He,ariaErrorMessage:null,ariaExpanded:Ke,ariaFlowTo:He,ariaGrabbed:Ke,ariaHasPopup:null,ariaHidden:Ke,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:He,ariaLevel:W,ariaLive:null,ariaModal:Ke,ariaMultiLine:Ke,ariaMultiSelectable:Ke,ariaOrientation:null,ariaOwns:He,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:Ke,ariaReadOnly:Ke,ariaRelevant:null,ariaRequired:Ke,ariaRoleDescription:He,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:Ke,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function E0(e,t){return t in e?e[t]:t}function T0(e,t){return E0(e,t.toLowerCase())}const Yg=Ar({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:mr,acceptCharset:He,accessKey:He,action:null,allow:null,allowFullScreen:pe,allowPaymentRequest:pe,allowUserMedia:pe,alt:null,as:null,async:pe,autoCapitalize:null,autoComplete:He,autoFocus:pe,autoPlay:pe,blocking:He,capture:null,charSet:null,checked:pe,cite:null,className:He,cols:W,colSpan:null,content:null,contentEditable:Ke,controls:pe,controlsList:He,coords:W|mr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pe,defer:pe,dir:null,dirName:null,disabled:pe,download:x0,draggable:Ke,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pe,formTarget:null,headers:He,height:W,hidden:pe,high:W,href:null,hrefLang:null,htmlFor:He,httpEquiv:He,id:null,imageSizes:null,imageSrcSet:null,inert:pe,inputMode:null,integrity:null,is:null,isMap:pe,itemId:null,itemProp:He,itemRef:He,itemScope:pe,itemType:He,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pe,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:pe,muted:pe,name:null,nonce:null,noModule:pe,noValidate:pe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:pe,optimum:W,pattern:null,ping:He,placeholder:null,playsInline:pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pe,referrerPolicy:null,rel:He,required:pe,reversed:pe,rows:W,rowSpan:W,sandbox:He,scope:null,scoped:pe,seamless:pe,selected:pe,shadowRootClonable:pe,shadowRootDelegatesFocus:pe,shadowRootMode:null,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:Ke,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:pe,useMap:null,value:Ke,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:He,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pe,declare:pe,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:pe,noHref:pe,noShade:pe,noWrap:pe,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:Ke,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pe,disableRemotePlayback:pe,prefix:null,property:null,results:W,security:null,unselectable:null},space:"html",transform:T0}),Gg=Ar({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Pt,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:He,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:mr,g2:mr,glyphName:mr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:Pt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:W,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:He,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pt,rev:Pt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pt,requiredFeatures:Pt,requiredFonts:Pt,requiredFormats:Pt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:Pt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pt,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:E0}),y0=Ar({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),k0=Ar({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:T0}),A0=Ar({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Xg={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Kg=/[A-Z]/g,Lo=/-[a-z]/g,Qg=/^data[-\w.:]+$/i;function ls(e,t){const n=nu(t);let r=t,u=vt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Qg.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Lo,eb);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Lo.test(a)){let i=a.replace(Kg,Jg);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}u=cs}return new u(r,t)}function Jg(e){return"-"+e.toLowerCase()}function eb(e){return e.charAt(1).toUpperCase()}const ba=_0([C0,Yg,y0,k0,A0],"html"),Sr=_0([C0,Gg,y0,k0,A0],"svg");function Po(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function S0(e){return e.join(" ").trim()}var I0={},Ro=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,tb=/\n/g,nb=/^\s*/,rb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ub=/^:\s*/,ab=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ib=/^[;\s]*/,sb=/^\s+|\s+$/g,ob=`
80
- `,Oo="/",Mo="*",Yn="",cb="comment",lb="declaration",db=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function u(g){var x=g.match(tb);x&&(n+=x.length);var C=g.lastIndexOf(ob);r=~C?g.length-C:r+g.length}function a(){var g={line:n,column:r};return function(x){return x.position=new i(g),l(),x}}function i(g){this.start=g,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;function o(g){var x=new Error(t.source+":"+n+":"+r+": "+g);if(x.reason=g,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function c(g){var x=g.exec(e);if(x){var C=x[0];return u(C),e=e.slice(C.length),x}}function l(){c(nb)}function h(g){var x;for(g=g||[];x=f();)x!==!1&&g.push(x);return g}function f(){var g=a();if(!(Oo!=e.charAt(0)||Mo!=e.charAt(1))){for(var x=2;Yn!=e.charAt(x)&&(Mo!=e.charAt(x)||Oo!=e.charAt(x+1));)++x;if(x+=2,Yn===e.charAt(x-1))return o("End of comment missing");var C=e.slice(2,x-2);return r+=2,u(C),e=e.slice(x),r+=2,g({type:cb,comment:C})}}function m(){var g=a(),x=c(rb);if(x){if(f(),!c(ub))return o("property missing ':'");var C=c(ab),_=g({type:lb,property:Fo(x[0].replace(Ro,Yn)),value:C?Fo(C[0].replace(Ro,Yn)):Yn});return c(ib),_}}function p(){var g=[];h(g);for(var x;x=m();)x!==!1&&(g.push(x),h(g));return g}return l(),p()};function Fo(e){return e?e.replace(sb,Yn):Yn}var fb=b.commonjsGlobal&&b.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(I0,"__esModule",{value:!0});var Bo=I0.default=pb,hb=fb(db);function pb(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,hb.default)(e),u=typeof t=="function";return r.forEach(function(a){if(a.type==="declaration"){var i=a.property,o=a.value;u?t(i,o,a):o&&(n=n||{},n[i]=o)}}),n}const mb=Bo.default||Bo,_a=N0("end"),fn=N0("start");function N0(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function gb(e){const t=fn(e),n=_a(e);if(t&&n)return{start:t,end:n}}function $r(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?jo(e.position):"start"in e||"end"in e?jo(e):"line"in e||"column"in e?vi(e):""}function vi(e){return Ho(e&&e.line)+":"+Ho(e&&e.column)}function jo(e){return vi(e&&e.start)+"-"+vi(e&&e.end)}function Ho(e){return e&&typeof e=="number"?e:1}class ht extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let u="",a={},i=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?u=t:!a.cause&&t&&(i=!0,u=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=u,this.line=o?o.line:void 0,this.name=$r(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=i&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}ht.prototype.file="";ht.prototype.name="";ht.prototype.reason="";ht.prototype.message="";ht.prototype.stack="";ht.prototype.column=void 0;ht.prototype.line=void 0;ht.prototype.ancestors=void 0;ht.prototype.cause=void 0;ht.prototype.fatal=void 0;ht.prototype.place=void 0;ht.prototype.ruleId=void 0;ht.prototype.source=void 0;const ds={}.hasOwnProperty,bb=new Map,_b=/[A-Z]/g,xb=/-([a-z])/g,Cb=new Set(["table","tbody","thead","tfoot","tr"]),Eb=new Set(["td","th"]),v0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Tb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=wb(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=vb(n,t.jsx,t.jsxs)}const u={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Sr:ba,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=w0(u,e,void 0);return a&&typeof a!="string"?a:u.create(e,u.Fragment,{children:a||void 0},void 0)}function w0(e,t,n){if(t.type==="element")return yb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return kb(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Sb(e,t,n);if(t.type==="mdxjsEsm")return Ab(e,t);if(t.type==="root")return Ib(e,t,n);if(t.type==="text")return Nb(e,t)}function yb(e,t,n){const r=e.schema;let u=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(u=Sr,e.schema=u),e.ancestors.push(t);const a=L0(e,t.tagName,!1),i=Db(e,t);let o=hs(e,t);return Cb.has(t.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!Zg(c):!0})),D0(e,i,a,t),fs(i,o),e.ancestors.pop(),e.schema=r,e.create(t,a,i,n)}function kb(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ru(e,t.position)}function Ab(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ru(e,t.position)}function Sb(e,t,n){const r=e.schema;let u=r;t.name==="svg"&&r.space==="html"&&(u=Sr,e.schema=u),e.ancestors.push(t);const a=t.name===null?e.Fragment:L0(e,t.name,!0),i=Lb(e,t),o=hs(e,t);return D0(e,i,a,t),fs(i,o),e.ancestors.pop(),e.schema=r,e.create(t,a,i,n)}function Ib(e,t,n){const r={};return fs(r,hs(e,t)),e.create(t,e.Fragment,r,n)}function Nb(e,t){return t.value}function D0(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function fs(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function vb(e,t,n){return r;function r(u,a,i,o){const l=Array.isArray(i.children)?n:t;return o?l(a,i,o):l(a,i)}}function wb(e,t){return n;function n(r,u,a,i){const o=Array.isArray(a.children),c=fn(r);return t(u,a,i,o,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Db(e,t){const n={};let r,u;for(u in t.properties)if(u!=="children"&&ds.call(t.properties,u)){const a=Pb(e,u,t.properties[u]);if(a){const[i,o]=a;e.tableCellAlignToStyle&&i==="align"&&typeof o=="string"&&Eb.has(t.tagName)?r=o:n[i]=o}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Lb(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const i=a.expression;i.type;const o=i.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else ru(e,t.position);else{const u=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else ru(e,t.position);else a=r.value===null?!0:r.value;n[u]=a}return n}function hs(e,t){const n=[];let r=-1;const u=e.passKeys?new Map:bb;for(;++r<t.children.length;){const a=t.children[r];let i;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const l=u.get(c)||0;i=c+"-"+l,u.set(c,l+1)}}const o=w0(e,a,i);o!==void 0&&n.push(o)}return n}function Pb(e,t,n){const r=ls(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?b0(n):S0(n)),r.property==="style"){let u=typeof n=="object"?n:Rb(e,String(n));return e.stylePropertyNameCase==="css"&&(u=Ob(u)),["style",u]}return[e.elementAttributeNameCase==="react"&&r.space?Xg[r.property]||r.property:r.attribute,n]}}function Rb(e,t){const n={};try{mb(t,r)}catch(u){if(!e.ignoreInvalidStyle){const a=u,i=new ht("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=v0+"#cannot-parse-style-attribute",i}}return n;function r(u,a){let i=u;i.slice(0,2)!=="--"&&(i.slice(0,4)==="-ms-"&&(i="ms-"+i.slice(4)),i=i.replace(xb,Fb)),n[i]=a}}function L0(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const u=t.split(".");let a=-1,i;for(;++a<u.length;){const o=vo(u[a])?{type:"Identifier",name:u[a]}:{type:"Literal",value:u[a]};i=i?{type:"MemberExpression",object:i,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}r=i}else r=vo(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const u=r.value;return ds.call(e.components,u)?e.components[u]:u}if(e.evaluater)return e.evaluater.evaluateExpression(r);ru(e)}function ru(e,t){const n=new ht("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=v0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Ob(e){const t={};let n;for(n in e)ds.call(e,n)&&(t[Mb(n)]=e[n]);return t}function Mb(e){let t=e.replace(_b,Bb);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Fb(e,t){return t.toUpperCase()}function Bb(e){return"-"+e.toLowerCase()}const Ga={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},jb={};function ps(e,t){const n=jb,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,u=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return P0(e,r,u)}function P0(e,t,n){if(Hb(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Uo(e.children,t,n)}return Array.isArray(e)?Uo(e,t,n):""}function Uo(e,t,n){const r=[];let u=-1;for(;++u<e.length;)r[u]=P0(e[u],t,n);return r.join("")}function Hb(e){return!!(e&&typeof e=="object")}const Vo=document.createElement("i");function ms(e){const t="&"+e+";";Vo.innerHTML=t;const n=Vo.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ft(e,t,n,r){const u=e.length;let a=0,i;if(t<0?t=-t>u?0:u+t:t=t>u?u:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function $t(e,t){return e.length>0?(Ft(e,e.length,0,t),e):t}const $o={}.hasOwnProperty;function R0(e){const t={};let n=-1;for(;++n<e.length;)Ub(t,e[n]);return t}function Ub(e,t){let n;for(n in t){const u=($o.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let i;if(a)for(i in a){$o.call(u,i)||(u[i]=[]);const o=a[i];Vb(u[i],Array.isArray(o)?o:o?[o]:[])}}}function Vb(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ft(e,0,0,r)}function O0(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Kt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const xt=Un(/[A-Za-z]/),ft=Un(/[\dA-Za-z]/),$b=Un(/[#-'*+\--9=?A-Z^-~]/);function Gu(e){return e!==null&&(e<32||e===127)}const wi=Un(/\d/),zb=Un(/[\dA-Fa-f]/),qb=Un(/[!-/:-@[-`{-~]/);function ue(e){return e!==null&&e<-2}function Be(e){return e!==null&&(e<0||e===32)}function ye(e){return e===-2||e===-1||e===32}const xa=Un(new RegExp("\\p{P}|\\p{S}","u")),Qn=Un(/\s/);function Un(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ir(e){const t=[];let n=-1,r=0,u=0;for(;++n<e.length;){const a=e.charCodeAt(n);let i="";if(a===37&&ft(e.charCodeAt(n+1))&&ft(e.charCodeAt(n+2)))u=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(i=String.fromCharCode(a,o),u=1):i="�"}else i=String.fromCharCode(a);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+u+1,i=""),u&&(n+=u,u=0)}return t.join("")+e.slice(r)}function Ae(e,t,n,r){const u=r?r-1:Number.POSITIVE_INFINITY;let a=0;return i;function i(c){return ye(c)?(e.enter(n),o(c)):t(c)}function o(c){return ye(c)&&a++<u?(e.consume(c),o):(e.exit(n),t(c))}}const Zb={tokenize:Wb};function Wb(e){const t=e.attempt(this.parser.constructs.contentInitial,r,u);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ae(e,t,"linePrefix")}function u(o){return e.enter("paragraph"),a(o)}function a(o){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,i(o)}function i(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return ue(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),i)}}const Yb={tokenize:Gb},zo={tokenize:Xb};function Gb(e){const t=this,n=[];let r=0,u,a,i;return o;function o(k){if(r<n.length){const D=n[r];return t.containerState=D[1],e.attempt(D[0].continuation,c,l)(k)}return l(k)}function c(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,u&&v();const D=t.events.length;let S=D,I;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){I=t.events[S][1].end;break}_(r);let M=D;for(;M<t.events.length;)t.events[M][1].end={...I},M++;return Ft(t.events,S+1,0,t.events.slice(D)),t.events.length=M,l(k)}return o(k)}function l(k){if(r===n.length){if(!u)return m(k);if(u.currentConstruct&&u.currentConstruct.concrete)return g(k);t.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(zo,h,f)(k)}function h(k){return u&&v(),_(r),m(k)}function f(k){return t.parser.lazy[t.now().line]=r!==n.length,i=t.now().offset,g(k)}function m(k){return t.containerState={},e.attempt(zo,p,g)(k)}function p(k){return r++,n.push([t.currentConstruct,t.containerState]),m(k)}function g(k){if(k===null){u&&v(),_(0),e.consume(k);return}return u=u||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:a}),x(k)}function x(k){if(k===null){C(e.exit("chunkFlow"),!0),_(0),e.consume(k);return}return ue(k)?(e.consume(k),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(k),x)}function C(k,D){const S=t.sliceStream(k);if(D&&S.push(null),k.previous=a,a&&(a.next=k),a=k,u.defineSkip(k.start),u.write(S),t.parser.lazy[k.start.line]){let I=u.events.length;for(;I--;)if(u.events[I][1].start.offset<i&&(!u.events[I][1].end||u.events[I][1].end.offset>i))return;const M=t.events.length;let q=M,U,L;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(U){L=t.events[q][1].end;break}U=!0}for(_(r),I=M;I<t.events.length;)t.events[I][1].end={...L},I++;Ft(t.events,q+1,0,t.events.slice(M)),t.events.length=I}}function _(k){let D=n.length;for(;D-- >k;){const S=n[D];t.containerState=S[1],S[0].exit.call(t,e)}n.length=k}function v(){u.write([null]),a=void 0,u=void 0,t.containerState._closeFlow=void 0}}function Xb(e,t,n){return Ae(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function xr(e){if(e===null||Be(e)||Qn(e))return 1;if(xa(e))return 2}function Ca(e,t,n){const r=[];let u=-1;for(;++u<e.length;){const a=e[u].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Di={name:"attention",resolveAll:Kb,tokenize:Qb};function Kb(e,t){let n=-1,r,u,a,i,o,c,l,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},m={...e[n][1].start};qo(f,-c),qo(m,c),i={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},o={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},u={type:c>1?"strong":"emphasis",start:{...i.start},end:{...o.end}},e[r][1].end={...i.start},e[n][1].start={...o.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=$t(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=$t(l,[["enter",u,t],["enter",i,t],["exit",i,t],["enter",a,t]]),l=$t(l,Ca(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=$t(l,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",u,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,l=$t(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Ft(e,r-1,n-r+3,l),n=r+l.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Qb(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,u=xr(r);let a;return i;function i(c){return a=c,e.enter("attentionSequence"),o(c)}function o(c){if(c===a)return e.consume(c),o;const l=e.exit("attentionSequence"),h=xr(c),f=!h||h===2&&u||n.includes(c),m=!u||u===2&&h||n.includes(r);return l._open=!!(a===42?f:f&&(u||!m)),l._close=!!(a===42?m:m&&(h||!f)),t(c)}}function qo(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Jb={name:"autolink",tokenize:e_};function e_(e,t,n){let r=0;return u;function u(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return xt(p)?(e.consume(p),i):p===64?n(p):l(p)}function i(p){return p===43||p===45||p===46||ft(p)?(r=1,o(p)):l(p)}function o(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||ft(p))&&r++<32?(e.consume(p),o):(r=0,l(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Gu(p)?n(p):(e.consume(p),c)}function l(p){return p===64?(e.consume(p),h):$b(p)?(e.consume(p),l):n(p)}function h(p){return ft(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,h):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):m(p)}function m(p){if((p===45||ft(p))&&r++<63){const g=p===45?m:f;return e.consume(p),g}return n(p)}}const mu={partial:!0,tokenize:t_};function t_(e,t,n){return r;function r(a){return ye(a)?Ae(e,u,"linePrefix")(a):u(a)}function u(a){return a===null||ue(a)?t(a):n(a)}}const M0={continuation:{tokenize:r_},exit:u_,name:"blockQuote",tokenize:n_};function n_(e,t,n){const r=this;return u;function u(i){if(i===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),a}return n(i)}function a(i){return ye(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function r_(e,t,n){const r=this;return u;function u(i){return ye(i)?Ae(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):a(i)}function a(i){return e.attempt(M0,t,n)(i)}}function u_(e){e.exit("blockQuote")}const F0={name:"characterEscape",tokenize:a_};function a_(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),u}function u(a){return qb(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const B0={name:"characterReference",tokenize:i_};function i_(e,t,n){const r=this;let u=0,a,i;return o;function o(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),c}function c(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,i=ft,h(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,i=zb,h):(e.enter("characterReferenceValue"),a=7,i=wi,h(f))}function h(f){if(f===59&&u){const m=e.exit("characterReferenceValue");return i===ft&&!ms(r.sliceSerialize(m))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(f)&&u++<a?(e.consume(f),h):n(f)}}const Zo={partial:!0,tokenize:o_},Wo={concrete:!0,name:"codeFenced",tokenize:s_};function s_(e,t,n){const r=this,u={partial:!0,tokenize:S};let a=0,i=0,o;return c;function c(I){return l(I)}function l(I){const M=r.events[r.events.length-1];return a=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,o=I,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(I)}function h(I){return I===o?(i++,e.consume(I),h):i<3?n(I):(e.exit("codeFencedFenceSequence"),ye(I)?Ae(e,f,"whitespace")(I):f(I))}function f(I){return I===null||ue(I)?(e.exit("codeFencedFence"),r.interrupt?t(I):e.check(Zo,x,D)(I)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(I))}function m(I){return I===null||ue(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(I)):ye(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ae(e,p,"whitespace")(I)):I===96&&I===o?n(I):(e.consume(I),m)}function p(I){return I===null||ue(I)?f(I):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(I))}function g(I){return I===null||ue(I)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(I)):I===96&&I===o?n(I):(e.consume(I),g)}function x(I){return e.attempt(u,D,C)(I)}function C(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),_}function _(I){return a>0&&ye(I)?Ae(e,v,"linePrefix",a+1)(I):v(I)}function v(I){return I===null||ue(I)?e.check(Zo,x,D)(I):(e.enter("codeFlowValue"),k(I))}function k(I){return I===null||ue(I)?(e.exit("codeFlowValue"),v(I)):(e.consume(I),k)}function D(I){return e.exit("codeFenced"),t(I)}function S(I,M,q){let U=0;return L;function L(ee){return I.enter("lineEnding"),I.consume(ee),I.exit("lineEnding"),j}function j(ee){return I.enter("codeFencedFence"),ye(ee)?Ae(I,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):F(ee)}function F(ee){return ee===o?(I.enter("codeFencedFenceSequence"),Q(ee)):q(ee)}function Q(ee){return ee===o?(U++,I.consume(ee),Q):U>=i?(I.exit("codeFencedFenceSequence"),ye(ee)?Ae(I,ae,"whitespace")(ee):ae(ee)):q(ee)}function ae(ee){return ee===null||ue(ee)?(I.exit("codeFencedFence"),M(ee)):q(ee)}}}function o_(e,t,n){const r=this;return u;function u(i){return i===null?n(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a)}function a(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}const Xa={name:"codeIndented",tokenize:l_},c_={partial:!0,tokenize:d_};function l_(e,t,n){const r=this;return u;function u(l){return e.enter("codeIndented"),Ae(e,a,"linePrefix",5)(l)}function a(l){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(l):n(l)}function i(l){return l===null?c(l):ue(l)?e.attempt(c_,i,c)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||ue(l)?(e.exit("codeFlowValue"),i(l)):(e.consume(l),o)}function c(l){return e.exit("codeIndented"),t(l)}}function d_(e,t,n){const r=this;return u;function u(i){return r.parser.lazy[r.now().line]?n(i):ue(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),u):Ae(e,a,"linePrefix",5)(i)}function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):ue(i)?u(i):n(i)}}const f_={name:"codeText",previous:p_,resolve:h_,tokenize:m_};function h_(e){let t=e.length-4,n=3,r,u;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)u===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(u=r):(r===t||e[r][1].type==="lineEnding")&&(e[u][1].type="codeTextData",r!==u+2&&(e[u][1].end=e[r-1][1].end,e.splice(u+2,r-u-2),t-=r-u-2,r=u+2),u=void 0);return e}function p_(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function m_(e,t,n){let r=0,u,a;return i;function i(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),r++,o):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(a=e.enter("codeTextSequence"),u=0,h(f)):ue(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||ue(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),l)}function h(f){return f===96?(e.consume(f),u++,h):u===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",l(f))}}class g_{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const u=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return r&&Or(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Or(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Or(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Or(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Or(this.left,n.reverse())}}}function Or(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function j0(e){const t={};let n=-1,r,u,a,i,o,c,l;const h=new g_(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,b_(h,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,u=void 0;a--;)if(i=h.get(a),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank")i[0]==="enter"&&(u&&(h.get(u)[1].type="lineEndingBlank"),i[1].type="lineEnding",u=a);else if(!(i[1].type==="linePrefix"||i[1].type==="listItemIndent"))break;u&&(r[1].end={...h.get(u)[1].start},o=h.slice(u,n),o.unshift(r),h.splice(u,n-u+1,o))}}return Ft(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!l}function b_(e,t){const n=e.get(t)[1],r=e.get(t)[2];let u=t-1;const a=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const o=i.events,c=[],l={};let h,f,m=-1,p=n,g=0,x=0;const C=[x];for(;p;){for(;e.get(++u)[1]!==p;);a.push(u),p._tokenizer||(h=r.sliceStream(p),p.next||h.push(null),f&&i.defineSkip(p.start),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(h),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++m<o.length;)o[m][0]==="exit"&&o[m-1][0]==="enter"&&o[m][1].type===o[m-1][1].type&&o[m][1].start.line!==o[m][1].end.line&&(x=m+1,C.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(i.events=[],p?(p._tokenizer=void 0,p.previous=void 0):C.pop(),m=C.length;m--;){const _=o.slice(C[m],C[m+1]),v=a.pop();c.push([v,v+_.length-1]),e.splice(v,2,_)}for(c.reverse(),m=-1;++m<c.length;)l[g+c[m][0]]=g+c[m][1],g+=c[m][1]-c[m][0]-1;return l}const __={resolve:C_,tokenize:E_},x_={partial:!0,tokenize:T_};function C_(e){return j0(e),e}function E_(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),u(o)}function u(o){return o===null?a(o):ue(o)?e.check(x_,i,a)(o):(e.consume(o),u)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function i(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,u}}function T_(e,t,n){const r=this;return u;function u(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ae(e,a,"linePrefix")}function a(i){if(i===null||ue(i))return n(i);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function H0(e,t,n,r,u,a,i,o,c){const l=c||Number.POSITIVE_INFINITY;let h=0;return f;function f(_){return _===60?(e.enter(r),e.enter(u),e.enter(a),e.consume(_),e.exit(a),m):_===null||_===32||_===41||Gu(_)?n(_):(e.enter(r),e.enter(i),e.enter(o),e.enter("chunkString",{contentType:"string"}),x(_))}function m(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(u),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(_))}function p(_){return _===62?(e.exit("chunkString"),e.exit(o),m(_)):_===null||_===60||ue(_)?n(_):(e.consume(_),_===92?g:p)}function g(_){return _===60||_===62||_===92?(e.consume(_),p):p(_)}function x(_){return!h&&(_===null||_===41||Be(_))?(e.exit("chunkString"),e.exit(o),e.exit(i),e.exit(r),t(_)):h<l&&_===40?(e.consume(_),h++,x):_===41?(e.consume(_),h--,x):_===null||_===32||_===40||Gu(_)?n(_):(e.consume(_),_===92?C:x)}function C(_){return _===40||_===41||_===92?(e.consume(_),x):x(_)}}function U0(e,t,n,r,u,a){const i=this;let o=0,c;return l;function l(p){return e.enter(r),e.enter(u),e.consume(p),e.exit(u),e.enter(a),h}function h(p){return o>999||p===null||p===91||p===93&&!c||p===94&&!o&&"_hiddenFootnoteSupport"in i.parser.constructs?n(p):p===93?(e.exit(a),e.enter(u),e.consume(p),e.exit(u),e.exit(r),t):ue(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||ue(p)||o++>999?(e.exit("chunkString"),h(p)):(e.consume(p),c||(c=!ye(p)),p===92?m:f)}function m(p){return p===91||p===92||p===93?(e.consume(p),o++,f):f(p)}}function V0(e,t,n,r,u,a){let i;return o;function o(m){return m===34||m===39||m===40?(e.enter(r),e.enter(u),e.consume(m),e.exit(u),i=m===40?41:m,c):n(m)}function c(m){return m===i?(e.enter(u),e.consume(m),e.exit(u),e.exit(r),t):(e.enter(a),l(m))}function l(m){return m===i?(e.exit(a),c(i)):m===null?n(m):ue(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Ae(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===i||m===null||ue(m)?(e.exit("chunkString"),l(m)):(e.consume(m),m===92?f:h)}function f(m){return m===i||m===92?(e.consume(m),h):h(m)}}function zr(e,t){let n;return r;function r(u){return ue(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),n=!0,r):ye(u)?Ae(e,r,n?"linePrefix":"lineSuffix")(u):t(u)}}const y_={name:"definition",tokenize:A_},k_={partial:!0,tokenize:S_};function A_(e,t,n){const r=this;let u;return a;function a(p){return e.enter("definition"),i(p)}function i(p){return U0.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function o(p){return u=Kt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):n(p)}function c(p){return Be(p)?zr(e,l)(p):l(p)}function l(p){return H0(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function h(p){return e.attempt(k_,f,f)(p)}function f(p){return ye(p)?Ae(e,m,"whitespace")(p):m(p)}function m(p){return p===null||ue(p)?(e.exit("definition"),r.parser.defined.push(u),t(p)):n(p)}}function S_(e,t,n){return r;function r(o){return Be(o)?zr(e,u)(o):n(o)}function u(o){return V0(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return ye(o)?Ae(e,i,"whitespace")(o):i(o)}function i(o){return o===null||ue(o)?t(o):n(o)}}const I_={name:"hardBreakEscape",tokenize:N_};function N_(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),u}function u(a){return ue(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const v_={name:"headingAtx",resolve:w_,tokenize:D_};function w_(e,t){let n=e.length-2,r=3,u,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(u={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ft(e,r,n-r+1,[["enter",u,t],["enter",a,t],["exit",a,t],["exit",u,t]])),e}function D_(e,t,n){let r=0;return u;function u(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),i(h)}function i(h){return h===35&&r++<6?(e.consume(h),i):h===null||Be(h)?(e.exit("atxHeadingSequence"),o(h)):n(h)}function o(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||ue(h)?(e.exit("atxHeading"),t(h)):ye(h)?Ae(e,o,"whitespace")(h):(e.enter("atxHeadingText"),l(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),o(h))}function l(h){return h===null||h===35||Be(h)?(e.exit("atxHeadingText"),o(h)):(e.consume(h),l)}}const L_=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Yo=["pre","script","style","textarea"],P_={concrete:!0,name:"htmlFlow",resolveTo:M_,tokenize:F_},R_={partial:!0,tokenize:j_},O_={partial:!0,tokenize:B_};function M_(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function F_(e,t,n){const r=this;let u,a,i,o,c;return l;function l(y){return h(y)}function h(y){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(y),f}function f(y){return y===33?(e.consume(y),m):y===47?(e.consume(y),a=!0,x):y===63?(e.consume(y),u=3,r.interrupt?t:E):xt(y)?(e.consume(y),i=String.fromCharCode(y),C):n(y)}function m(y){return y===45?(e.consume(y),u=2,p):y===91?(e.consume(y),u=5,o=0,g):xt(y)?(e.consume(y),u=4,r.interrupt?t:E):n(y)}function p(y){return y===45?(e.consume(y),r.interrupt?t:E):n(y)}function g(y){const z="CDATA[";return y===z.charCodeAt(o++)?(e.consume(y),o===z.length?r.interrupt?t:F:g):n(y)}function x(y){return xt(y)?(e.consume(y),i=String.fromCharCode(y),C):n(y)}function C(y){if(y===null||y===47||y===62||Be(y)){const z=y===47,re=i.toLowerCase();return!z&&!a&&Yo.includes(re)?(u=1,r.interrupt?t(y):F(y)):L_.includes(i.toLowerCase())?(u=6,z?(e.consume(y),_):r.interrupt?t(y):F(y)):(u=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(y):a?v(y):k(y))}return y===45||ft(y)?(e.consume(y),i+=String.fromCharCode(y),C):n(y)}function _(y){return y===62?(e.consume(y),r.interrupt?t:F):n(y)}function v(y){return ye(y)?(e.consume(y),v):L(y)}function k(y){return y===47?(e.consume(y),L):y===58||y===95||xt(y)?(e.consume(y),D):ye(y)?(e.consume(y),k):L(y)}function D(y){return y===45||y===46||y===58||y===95||ft(y)?(e.consume(y),D):S(y)}function S(y){return y===61?(e.consume(y),I):ye(y)?(e.consume(y),S):k(y)}function I(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),c=y,M):ye(y)?(e.consume(y),I):q(y)}function M(y){return y===c?(e.consume(y),c=null,U):y===null||ue(y)?n(y):(e.consume(y),M)}function q(y){return y===null||y===34||y===39||y===47||y===60||y===61||y===62||y===96||Be(y)?S(y):(e.consume(y),q)}function U(y){return y===47||y===62||ye(y)?k(y):n(y)}function L(y){return y===62?(e.consume(y),j):n(y)}function j(y){return y===null||ue(y)?F(y):ye(y)?(e.consume(y),j):n(y)}function F(y){return y===45&&u===2?(e.consume(y),he):y===60&&u===1?(e.consume(y),Ee):y===62&&u===4?(e.consume(y),Z):y===63&&u===3?(e.consume(y),E):y===93&&u===5?(e.consume(y),ke):ue(y)&&(u===6||u===7)?(e.exit("htmlFlowData"),e.check(R_,ne,Q)(y)):y===null||ue(y)?(e.exit("htmlFlowData"),Q(y)):(e.consume(y),F)}function Q(y){return e.check(O_,ae,ne)(y)}function ae(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),ee}function ee(y){return y===null||ue(y)?Q(y):(e.enter("htmlFlowData"),F(y))}function he(y){return y===45?(e.consume(y),E):F(y)}function Ee(y){return y===47?(e.consume(y),i="",je):F(y)}function je(y){if(y===62){const z=i.toLowerCase();return Yo.includes(z)?(e.consume(y),Z):F(y)}return xt(y)&&i.length<8?(e.consume(y),i+=String.fromCharCode(y),je):F(y)}function ke(y){return y===93?(e.consume(y),E):F(y)}function E(y){return y===62?(e.consume(y),Z):y===45&&u===2?(e.consume(y),E):F(y)}function Z(y){return y===null||ue(y)?(e.exit("htmlFlowData"),ne(y)):(e.consume(y),Z)}function ne(y){return e.exit("htmlFlow"),t(y)}}function B_(e,t,n){const r=this;return u;function u(i){return ue(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a):n(i)}function a(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}function j_(e,t,n){return r;function r(u){return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),e.attempt(mu,t,n)}}const H_={name:"htmlText",tokenize:U_};function U_(e,t,n){const r=this;let u,a,i;return o;function o(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),c}function c(E){return E===33?(e.consume(E),l):E===47?(e.consume(E),S):E===63?(e.consume(E),k):xt(E)?(e.consume(E),q):n(E)}function l(E){return E===45?(e.consume(E),h):E===91?(e.consume(E),a=0,g):xt(E)?(e.consume(E),v):n(E)}function h(E){return E===45?(e.consume(E),p):n(E)}function f(E){return E===null?n(E):E===45?(e.consume(E),m):ue(E)?(i=f,Ee(E)):(e.consume(E),f)}function m(E){return E===45?(e.consume(E),p):f(E)}function p(E){return E===62?he(E):E===45?m(E):f(E)}function g(E){const Z="CDATA[";return E===Z.charCodeAt(a++)?(e.consume(E),a===Z.length?x:g):n(E)}function x(E){return E===null?n(E):E===93?(e.consume(E),C):ue(E)?(i=x,Ee(E)):(e.consume(E),x)}function C(E){return E===93?(e.consume(E),_):x(E)}function _(E){return E===62?he(E):E===93?(e.consume(E),_):x(E)}function v(E){return E===null||E===62?he(E):ue(E)?(i=v,Ee(E)):(e.consume(E),v)}function k(E){return E===null?n(E):E===63?(e.consume(E),D):ue(E)?(i=k,Ee(E)):(e.consume(E),k)}function D(E){return E===62?he(E):k(E)}function S(E){return xt(E)?(e.consume(E),I):n(E)}function I(E){return E===45||ft(E)?(e.consume(E),I):M(E)}function M(E){return ue(E)?(i=M,Ee(E)):ye(E)?(e.consume(E),M):he(E)}function q(E){return E===45||ft(E)?(e.consume(E),q):E===47||E===62||Be(E)?U(E):n(E)}function U(E){return E===47?(e.consume(E),he):E===58||E===95||xt(E)?(e.consume(E),L):ue(E)?(i=U,Ee(E)):ye(E)?(e.consume(E),U):he(E)}function L(E){return E===45||E===46||E===58||E===95||ft(E)?(e.consume(E),L):j(E)}function j(E){return E===61?(e.consume(E),F):ue(E)?(i=j,Ee(E)):ye(E)?(e.consume(E),j):U(E)}function F(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),u=E,Q):ue(E)?(i=F,Ee(E)):ye(E)?(e.consume(E),F):(e.consume(E),ae)}function Q(E){return E===u?(e.consume(E),u=void 0,ee):E===null?n(E):ue(E)?(i=Q,Ee(E)):(e.consume(E),Q)}function ae(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||Be(E)?U(E):(e.consume(E),ae)}function ee(E){return E===47||E===62||Be(E)?U(E):n(E)}function he(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):n(E)}function Ee(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),je}function je(E){return ye(E)?Ae(e,ke,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):ke(E)}function ke(E){return e.enter("htmlTextData"),i(E)}}const gs={name:"labelEnd",resolveAll:q_,resolveTo:Z_,tokenize:W_},V_={tokenize:Y_},$_={tokenize:G_},z_={tokenize:X_};function q_(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const u=r.type==="labelImage"?4:2;r.type="data",t+=u}}return e.length!==n.length&&Ft(e,0,e.length,n),e}function Z_(e,t){let n=e.length,r=0,u,a,i,o;for(;n--;)if(u=e[n][1],a){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;e[n][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(i){if(e[n][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(a=n,u.type!=="labelLink")){r=2;break}}else u.type==="labelEnd"&&(i=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[a][1].start},end:{...e[i][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[i-2][1].start}};return o=[["enter",c,t],["enter",l,t]],o=$t(o,e.slice(a+1,a+r+3)),o=$t(o,[["enter",h,t]]),o=$t(o,Ca(t.parser.constructs.insideSpan.null,e.slice(a+r+4,i-3),t)),o=$t(o,[["exit",h,t],e[i-2],e[i-1],["exit",l,t]]),o=$t(o,e.slice(i+1)),o=$t(o,[["exit",c,t]]),Ft(e,a,e.length,o),e}function W_(e,t,n){const r=this;let u=r.events.length,a,i;for(;u--;)if((r.events[u][1].type==="labelImage"||r.events[u][1].type==="labelLink")&&!r.events[u][1]._balanced){a=r.events[u][1];break}return o;function o(m){return a?a._inactive?f(m):(i=r.parser.defined.includes(Kt(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),c):n(m)}function c(m){return m===40?e.attempt(V_,h,i?h:f)(m):m===91?e.attempt($_,h,i?l:f)(m):i?h(m):f(m)}function l(m){return e.attempt(z_,h,f)(m)}function h(m){return t(m)}function f(m){return a._balanced=!0,n(m)}}function Y_(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),u}function u(f){return Be(f)?zr(e,a)(f):a(f)}function a(f){return f===41?h(f):H0(e,i,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function i(f){return Be(f)?zr(e,c)(f):h(f)}function o(f){return n(f)}function c(f){return f===34||f===39||f===40?V0(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):h(f)}function l(f){return Be(f)?zr(e,h)(f):h(f)}function h(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function G_(e,t,n){const r=this;return u;function u(o){return U0.call(r,e,a,i,"reference","referenceMarker","referenceString")(o)}function a(o){return r.parser.defined.includes(Kt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function i(o){return n(o)}}function X_(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),u}function u(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const K_={name:"labelStartImage",resolveAll:gs.resolveAll,tokenize:Q_};function Q_(e,t,n){const r=this;return u;function u(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),i):n(o)}function i(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const J_={name:"labelStartLink",resolveAll:gs.resolveAll,tokenize:ex};function ex(e,t,n){const r=this;return u;function u(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),a}function a(i){return i===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(i):t(i)}}const Ka={name:"lineEnding",tokenize:tx};function tx(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ae(e,t,"linePrefix")}}const Uu={name:"thematicBreak",tokenize:nx};function nx(e,t,n){let r=0,u;return a;function a(l){return e.enter("thematicBreak"),i(l)}function i(l){return u=l,o(l)}function o(l){return l===u?(e.enter("thematicBreakSequence"),c(l)):r>=3&&(l===null||ue(l))?(e.exit("thematicBreak"),t(l)):n(l)}function c(l){return l===u?(e.consume(l),r++,c):(e.exit("thematicBreakSequence"),ye(l)?Ae(e,o,"whitespace")(l):o(l))}}const At={continuation:{tokenize:ix},exit:ox,name:"list",tokenize:ax},rx={partial:!0,tokenize:cx},ux={partial:!0,tokenize:sx};function ax(e,t,n){const r=this,u=r.events[r.events.length-1];let a=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,i=0;return o;function o(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:wi(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Uu,n,l)(p):l(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return n(p)}function c(p){return wi(p)&&++i<10?(e.consume(p),c):(!r.interrupt||i<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):n(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(mu,r.interrupt?n:h,e.attempt(rx,m,f))}function h(p){return r.containerState.initialBlankLine=!0,a++,m(p)}function f(p){return ye(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),m):n(p)}function m(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function ix(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(mu,u,a);function u(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ae(e,t,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!ye(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ux,t,i)(o))}function i(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ae(e,e.attempt(At,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function sx(e,t,n){const r=this;return Ae(e,u,"listItemIndent",r.containerState.size+1);function u(a){const i=r.events[r.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(a):n(a)}}function ox(e){e.exit(this.containerState.type)}function cx(e,t,n){const r=this;return Ae(e,u,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(a){const i=r.events[r.events.length-1];return!ye(a)&&i&&i[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Go={name:"setextUnderline",resolveTo:lx,tokenize:dx};function lx(e,t){let n=e.length,r,u,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(u=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const i={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[u][1].type="setextHeadingText",a?(e.splice(u,0,["enter",i,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=i,e.push(["exit",i,t]),e}function dx(e,t,n){const r=this;let u;return a;function a(l){let h=r.events.length,f;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){f=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),u=l,i(l)):n(l)}function i(l){return e.enter("setextHeadingLineSequence"),o(l)}function o(l){return l===u?(e.consume(l),o):(e.exit("setextHeadingLineSequence"),ye(l)?Ae(e,c,"lineSuffix")(l):c(l))}function c(l){return l===null||ue(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const fx={tokenize:hx};function hx(e){const t=this,n=e.attempt(mu,r,e.attempt(this.parser.constructs.flowInitial,u,Ae(e,e.attempt(this.parser.constructs.flow,u,e.attempt(__,u)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function u(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const px={resolveAll:z0()},mx=$0("string"),gx=$0("text");function $0(e){return{resolveAll:z0(e==="text"?bx:void 0),tokenize:t};function t(n){const r=this,u=this.parser.constructs[e],a=n.attempt(u,i,o);return i;function i(h){return l(h)?a(h):o(h)}function o(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return l(h)?(n.exit("data"),a(h)):(n.consume(h),c)}function l(h){if(h===null)return!0;const f=u[h];let m=-1;if(f)for(;++m<f.length;){const p=f[m];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function z0(e){return t;function t(n,r){let u=-1,a;for(;++u<=n.length;)a===void 0?n[u]&&n[u][1].type==="data"&&(a=u,u++):(!n[u]||n[u][1].type!=="data")&&(u!==a+2&&(n[a][1].end=n[u-1][1].end,n.splice(a+2,u-a-2),u=a+2),a=void 0);return e?e(n,r):n}}function bx(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],u=t.sliceStream(r);let a=u.length,i=-1,o=0,c;for(;a--;){const l=u[a];if(typeof l=="string"){for(i=l.length;l.charCodeAt(i-1)===32;)o++,i--;if(i)break;i=-1}else if(l===-2)c=!0,o++;else if(l!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const l={type:n===e.length||c||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?i:r.start._bufferIndex+i,_index:r.start._index+a,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const _x={42:At,43:At,45:At,48:At,49:At,50:At,51:At,52:At,53:At,54:At,55:At,56:At,57:At,62:M0},xx={91:y_},Cx={[-2]:Xa,[-1]:Xa,32:Xa},Ex={35:v_,42:Uu,45:[Go,Uu],60:P_,61:Go,95:Uu,96:Wo,126:Wo},Tx={38:B0,92:F0},yx={[-5]:Ka,[-4]:Ka,[-3]:Ka,33:K_,38:B0,42:Di,60:[Jb,H_],91:J_,92:[I_,F0],93:gs,95:Di,96:f_},kx={null:[Di,px]},Ax={null:[42,95]},Sx={null:[]},Ix=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Ax,contentInitial:xx,disable:Sx,document:_x,flow:Ex,flowInitial:Cx,insideSpan:kx,string:Tx,text:yx},Symbol.toStringTag,{value:"Module"}));function Nx(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const u={},a=[];let i=[],o=[];const c={attempt:M(S),check:M(I),consume:v,enter:k,exit:D,interrupt:M(I,{interrupt:!0})},l={code:null,containerState:{},defineSkip:x,events:[],now:g,parser:e,previous:null,sliceSerialize:m,sliceStream:p,write:f};let h=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function f(j){return i=$t(i,j),C(),i[i.length-1]!==null?[]:(q(t,0),l.events=Ca(a,l.events,l),l.events)}function m(j,F){return wx(p(j),F)}function p(j){return vx(i,j)}function g(){const{_bufferIndex:j,_index:F,line:Q,column:ae,offset:ee}=r;return{_bufferIndex:j,_index:F,line:Q,column:ae,offset:ee}}function x(j){u[j.line]=j.column,L()}function C(){let j;for(;r._index<i.length;){const F=i[r._index];if(typeof F=="string")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<F.length;)_(F.charCodeAt(r._bufferIndex));else _(F)}}function _(j){h=h(j)}function v(j){ue(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,L()):j!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=j}function k(j,F){const Q=F||{};return Q.type=j,Q.start=g(),l.events.push(["enter",Q,l]),o.push(Q),Q}function D(j){const F=o.pop();return F.end=g(),l.events.push(["exit",F,l]),F}function S(j,F){q(j,F.from)}function I(j,F){F.restore()}function M(j,F){return Q;function Q(ae,ee,he){let Ee,je,ke,E;return Array.isArray(ae)?ne(ae):"tokenize"in ae?ne([ae]):Z(ae);function Z(J){return ie;function ie(te){const oe=te!==null&&J[te],ce=te!==null&&J.null,Pe=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(ce)?ce:ce?[ce]:[]];return ne(Pe)(te)}}function ne(J){return Ee=J,je=0,J.length===0?he:y(J[je])}function y(J){return ie;function ie(te){return E=U(),ke=J,J.partial||(l.currentConstruct=J),J.name&&l.parser.constructs.disable.null.includes(J.name)?re():J.tokenize.call(F?Object.assign(Object.create(l),F):l,c,z,re)(te)}}function z(J){return j(ke,E),ee}function re(J){return E.restore(),++je<Ee.length?y(Ee[je]):he}}}function q(j,F){j.resolveAll&&!a.includes(j)&&a.push(j),j.resolve&&Ft(l.events,F,l.events.length-F,j.resolve(l.events.slice(F),l)),j.resolveTo&&(l.events=j.resolveTo(l.events,l))}function U(){const j=g(),F=l.previous,Q=l.currentConstruct,ae=l.events.length,ee=Array.from(o);return{from:ae,restore:he};function he(){r=j,l.previous=F,l.currentConstruct=Q,l.events.length=ae,o=ee,L()}}function L(){r.line in u&&r.column<2&&(r.column=u[r.line],r.offset+=u[r.line]-1)}}function vx(e,t){const n=t.start._index,r=t.start._bufferIndex,u=t.end._index,a=t.end._bufferIndex;let i;if(n===u)i=[e[n].slice(r,a)];else{if(i=e.slice(n,u),r>-1){const o=i[0];typeof o=="string"?i[0]=o.slice(r):i.shift()}a>0&&i.push(e[u].slice(0,a))}return i}function wx(e,t){let n=-1;const r=[];let u;for(;++n<e.length;){const a=e[n];let i;if(typeof a=="string")i=a;else switch(a){case-5:{i="\r";break}case-4:{i=`
79
+ `),M=new Blob([I],{type:"text/plain"}),q=URL.createObjectURL(M),U=document.createElement("a");U.href=q,U.download=`replacement-request-${e.id}.txt`,document.body.appendChild(U),U.click(),document.body.removeChild(U),URL.revokeObjectURL(q)},v=I=>{switch(I){case de.PENDING:case de.PROCESSING:return Ie.statusPending;case de.APPROVED:case de.AUTO_APPROVED:case de.COMPLETED:return Ie.statusApproved;case de.DECLINED:return Ie.statusDeclined;case de.CANCELLED:case de.EXPIRED:return Ie.statusCancelled;default:return Ie.statusPending}},k=I=>{switch(I){case de.PENDING:case de.PROCESSING:return"In Progress";case de.APPROVED:case de.AUTO_APPROVED:case de.COMPLETED:return"Approved";case de.DECLINED:return"Denied";case de.CANCELLED:case de.EXPIRED:return"Cancelled";default:return"In Progress"}};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:Ie.replacementRequestItem,onClick:I=>{I.stopPropagation(),g()},children:[s.jsxs("div",{className:Ie.replacementRequestHeader,children:[s.jsxs("span",{className:Ie.replacementRequestId,children:["ID: ",e.id]}),s.jsx("span",{className:b.clx(Ie.statusBadge,v(e.status)),children:k(e.status)})]}),s.jsxs("div",{className:Ie.replacementRequestDescription,children:[(e.status===de.PENDING||e.status===de.PROCESSING)&&"We're currently investigating your replacement. It may take a minimum of 24-48 hours for our team to get back to you.",(e.status===de.APPROVED||e.status===de.AUTO_APPROVED||e.status===de.COMPLETED)&&"We've approved your replacement request. Your replaced products are attached to this section.",e.status===de.DECLINED&&"We've denied your replacement request. You will not be able to request a replacement for these products in the future.",(e.status===de.CANCELLED||e.status===de.EXPIRED)&&"Your replacement request has been cancelled."]})]}),u&&s.jsx(w.Modal,{close:()=>a(!1),withAnimation:!f,children:s.jsxs("div",{className:b.clx(Ie.replacementModal,{[Ie.replacementModalAntistock]:f}),onClick:I=>I.stopPropagation(),children:[s.jsxs("div",{className:Ie.replacementModalHeader,children:[s.jsx("h3",{id:"h3",children:"Replacement Request"}),s.jsx("button",{className:Ie.closeButton,onClick:()=>a(!1),children:s.jsx(w.Icon,{name:"X"})})]}),s.jsxs("div",{className:Ie.replacementModalContent,children:[s.jsxs("div",{className:Ie.statusSection,children:[s.jsx("span",{className:b.clx(Ie.statusBadge,v(e.status)),children:k(e.status)}),s.jsxs("h4",{className:Ie.statusTitle,children:[(e.status===de.PENDING||e.status===de.PROCESSING)&&"Your Replacement Is In Progress",(e.status===de.APPROVED||e.status===de.AUTO_APPROVED||e.status===de.COMPLETED)&&"Your Replacement Was Approved",e.status===de.DECLINED&&"Your Replacement Was Denied",(e.status===de.CANCELLED||e.status===de.EXPIRED)&&"Your Replacement Was Cancelled"]}),s.jsxs("p",{className:Ie.statusDescription,children:[(e.status===de.PENDING||e.status===de.PROCESSING)&&"We're currently investigating your request. It may take a minimum of 24-48 hours for our team to get back to you.",(e.status===de.APPROVED||e.status===de.AUTO_APPROVED||e.status===de.COMPLETED)&&"We've approved your replacement request. Your replaced products are attached below.",e.status===de.DECLINED&&"We've denied your replacement request. You will not be able to request a replacement for these products in the future.",(e.status===de.CANCELLED||e.status===de.EXPIRED)&&"Your replacement request has been cancelled."]})]}),(e.status===de.APPROVED||e.status===de.AUTO_APPROVED||e.status===de.COMPLETED)&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:Ie.productsSection,children:[s.jsxs("div",{className:Ie.actionButtons,children:[s.jsxs(w.Button,{type:"Secondary",onClick:C,style:{display:"flex",alignItems:"center",gap:"5px",height:"32px"},children:[s.jsx(w.Icon,{name:"Copy"}),"Copy"]}),s.jsxs(w.Button,{type:"Secondary",onClick:_,style:{display:"flex",alignItems:"center",gap:"5px",height:"32px"},children:[s.jsx(w.Icon,{name:"ArrowLineDown"}),"Download"]})]}),s.jsx("div",{className:Ie.productsList,children:(D=e.replacementItems)==null?void 0:D.map((I,M)=>s.jsx("div",{className:Ie.productItem,children:s.jsx("span",{children:I.replacementSerialKey})},M))})]}),s.jsxs("div",{className:Ie.previouslyDeliveredSection,children:[s.jsxs("div",{className:Ie.previouslyDeliveredHeader,onClick:()=>l(!c),children:[s.jsx("span",{className:Ie.previouslyDeliveredTitle,children:"Previously Delivered Products"}),s.jsx(w.Icon,{name:"CaretDown",width:16,height:16,fill:"var(--text-secondary)",className:b.clx(Ie.caretIcon,{[Ie.caretIconRotated]:c})})]}),c&&s.jsx("div",{className:Ie.previouslyDeliveredContent,children:((S=e.replacementItems)==null?void 0:S.map((I,M)=>s.jsx("div",{className:Ie.previouslyDeliveredProductItem,children:s.jsx("span",{children:I.originalSerialKey})},M)))||s.jsx("div",{className:Ie.noProducts,children:"No products found"})})]})]})]}),s.jsx("div",{className:Ie.replacementModalFooter,children:e.status===de.PENDING&&s.jsx(w.Button,{type:"Secondary",onClick:x,disabled:i,style:{width:"fit-content",margin:"0 auto 8px"},children:i?"CANCELLING...":"CANCEL REPLACEMENT REQUEST"})})]})})]})},i9="_replacementModal_4liek_1",s9="_replacementModalAntistock_4liek_12",o9="_replacementModalHeader_4liek_17",c9="_title_4liek_25",l9="_closeButton_4liek_32",d9="_replacementModalContent_4liek_46",f9="_bottomSheet_4liek_53",h9="_content_4liek_61",p9="_productReplaceContainer_4liek_65",m9="_scrollableBox_4liek_76",g9="_searchContainer_4liek_90",b9="_productItem_4liek_94",_9="_productItemError_4liek_125",x9="_scrollIndicator_4liek_129",C9="_noResults_4liek_138",E9="_replacementForm_4liek_148",T9="_formField_4liek_155",y9="_imageDescription_4liek_167",k9="_imageInputContainer_4liek_174",A9="_addButton_4liek_181",S9="_imagesList_4liek_190",I9="_imageItem_4liek_197",N9="_imageUrl_4liek_207",v9="_removeButton_4liek_214",w9="_replacementModalFooter_4liek_263",D9="_fieldError_4liek_269",L9="_requestButton_4liek_275",Le={replacementModal:i9,replacementModalAntistock:s9,replacementModalHeader:o9,title:c9,closeButton:l9,replacementModalContent:d9,bottomSheet:f9,content:h9,productReplaceContainer:p9,scrollableBox:m9,searchContainer:g9,productItem:b9,productItemError:_9,scrollIndicator:x9,noResults:C9,replacementForm:E9,formField:T9,imageDescription:y9,imageInputContainer:k9,addButton:A9,imagesList:S9,imageItem:I9,imageUrl:N9,removeButton:v9,replacementModalFooter:w9,fieldError:D9,requestButton:L9},P9=({isOpen:e,onClose:t,product:n,orderId:r,accessToken:u,onSuccess:a,allowedReplacementReasons:i})=>{const{isAntistock:o}=b.useGeneralStore(),{setNotifications:c,notifications:l}=b.useNotificationStore(),[h,f]=P.useState([]),[m,p]=P.useState(""),[g,x]=P.useState((i==null?void 0:i[0])||""),[C,_]=P.useState(""),[v,k]=P.useState(""),[D,S]=P.useState([]),[I,M]=P.useState(!1),[q,U]=P.useState({}),L=/^https:\/\/i\.imgur\.com\/[A-Za-z0-9_-]+\.(?:jpg|jpeg|png|gif|webp|mp4)$/,j=y=>L.test(y),F=P.useMemo(()=>{var y;return((y=n.deliveryCategories)==null?void 0:y.filter(z=>z.type==="SERIALS").flatMap(z=>z.deliveryItems))||[]},[n.deliveryCategories]),Q=P.useMemo(()=>n.replacementRequests?new Set(n.replacementRequests.flatMap(y=>y.replacementItems||[]).map(y=>y.originalSerialKey)):new Set,[n.replacementRequests]),ae=P.useMemo(()=>F.filter(y=>!Q.has(y.serialKey)),[F,Q]),ee=P.useMemo(()=>new Vd.Fuse(ae,{keys:["serialKey"],threshold:.4}),[ae]),he=P.useMemo(()=>v.trim()?ee.search(v).map(y=>y.item):ae,[v,ee,ae]),Ee=()=>{const y=m.trim();if(U(z=>({...z,images:void 0})),!y){U(z=>({...z,images:"Please enter an image URL"}));return}if(!j(y)){U(z=>({...z,images:"Please enter a valid Imgur link (e.g., https://i.imgur.com/example.jpg)"}));return}if(h.includes(y)){U(z=>({...z,images:"This image URL has already been added"}));return}f(z=>[...z,y]),p("")},je=y=>{f(z=>z.filter((re,J)=>J!==y))},ke=y=>{S(z=>z.includes(y)?z.filter(re=>re!==y):[...z,y]),q.selectedItems&&U(z=>({...z,selectedItems:void 0}))},E=()=>{S([]),f([]),p(""),x((i==null?void 0:i[0])||""),_(""),k(""),U({})},Z=()=>{E(),t()},ne=async()=>{var z,re,J,ie;U({});const y={};if(D.length===0&&(y.selectedItems="Please select at least one item to replace"),h.length===0&&(y.images="Please add at least one image"),g.trim()||(y.reason="Please select a reason for replacement"),Object.keys(y).length>0){U(y);return}if(!r||!u){c([...l,{id:b.v4(),message:"Missing order information",status:"error"}]);return}M(!0);try{const te=await c2(r,u,{partOrderId:n.id,deliveryItemIds:D,imageUrls:h,reason:g,message:C});c([...l,{id:b.v4(),message:((z=te.data)==null?void 0:z.message)||"Replacement request submitted successfully",status:"success"}]),(re=te.data)!=null&&re.id&&((J=te.data)!=null&&J.status)&&(a==null||a({id:te.data.id,status:te.data.status})),Z()}catch(te){console.log({error:te});let oe="Failed to submit replacement request",ce="";const Pe=te;if((ie=Pe==null?void 0:Pe.response)!=null&&ie.data){const H=Pe.response.data;H.message&&H.errors&&Array.isArray(H.errors)?(ce=H.message,oe=H.errors.join(", ")):H.errors&&Array.isArray(H.errors)?oe=H.errors.join(", "):H.message&&(oe=H.message)}else te instanceof Error&&(oe=te.message);c([...l,{id:b.v4(),message:oe,status:"error",label:ce}])}finally{M(!1)}};return!e||ae.length===0?null:s.jsx(w.Modal,{close:Z,withAnimation:!o,children:s.jsxs("div",{className:b.clx(Le.replacementModal,{[Le.replacementModalAntistock]:o}),onClick:y=>y.stopPropagation(),children:[s.jsxs("div",{className:Le.replacementModalHeader,children:[s.jsx("h3",{id:"h3 ",className:Le.title,children:"Request Replacement"}),s.jsx("button",{className:Le.closeButton,onClick:Z,children:s.jsx(w.Icon,{name:"X"})})]}),s.jsx("div",{className:Le.replacementModalContent,children:s.jsx("div",{className:Le.bottomSheet,children:s.jsxs("div",{className:Le.content,children:[s.jsx(w.Tip,{type:"info",message:"Info: Based on your replacement policy, it may take up to 24-48 hours for our team to review your request.",showCloseButton:!1,style:{marginBottom:"16px"}}),s.jsxs("div",{className:Le.productReplaceContainer,children:[s.jsx("div",{className:Le.searchContainer,children:s.jsx(w.Input,{onChange:y=>{k(y)},isSearch:!0,value:v,placeholder:"Search for delivered stock",label:"Product Replace List *"})}),s.jsx("div",{className:b.clx(Le.scrollableBox,{[Le.scrollableBoxAntistock]:o}),children:he.length>0?he.map(y=>s.jsxs("div",{className:b.clx(Le.productItem,{[Le.productItemError]:q.selectedItems&&!D.includes(y.id)}),onClick:()=>ke(y.id),children:[s.jsx(w.Checkbox,{value:D.includes(y.id),onChange:()=>ke(y.id)}),s.jsx("span",{children:y.serialKey})]},y.id)):s.jsx("div",{className:Le.noResults,children:s.jsxs("p",{children:['No items found matching "',v,'"']})})}),q.selectedItems&&s.jsx("div",{className:Le.fieldError,children:q.selectedItems}),s.jsx("div",{className:Le.scrollIndicator,children:s.jsx("p",{children:"To continue with your replacement request, scroll down."})})]}),s.jsxs("div",{className:Le.replacementForm,children:[s.jsxs("div",{className:Le.formField,children:[s.jsxs("div",{className:Le.imageInputContainer,children:[s.jsx(w.Input,{onChange:y=>{p(y),q.images&&U(z=>({...z,images:void 0}))},value:m,type:"text",placeholder:"https://i.imgur.com/image-link.png",label:"Images *",error:q.images,style:{paddingRight:"60px"}}),s.jsx(w.Button,{type:"Primary",className:Le.addButton,onClick:Ee,children:"Add"})]}),s.jsx("div",{className:Le.imageDescription,children:s.jsx("p",{children:"We recommend uploading your image with IMGUR then copying the image link and pasting the link here."})}),h.length>0&&s.jsx("div",{className:Le.imagesList,children:h.map((y,z)=>s.jsxs("div",{className:Le.imageItem,children:[s.jsx("span",{className:Le.imageUrl,children:y}),s.jsx("button",{className:Le.removeButton,onClick:()=>je(z),children:s.jsx(w.Icon,{name:"Trash"})})]},z))})]}),s.jsx("div",{className:Le.formField,children:s.jsx(w.Select,{options:(i==null?void 0:i.filter(y=>y!==g))||[],onChange:y=>{x(y),q.reason&&U(z=>({...z,reason:void 0}))},value:g,isSearch:!1,label:"Reason *",isMaxLength:!1,error:q.reason})}),s.jsx("div",{className:Le.formField,children:s.jsx(w.Textarea,{placeholder:"Use this space to provide our team with additional details regarding your replacement request.",onChange:_,label:"Your Message (Optional)",value:C})})]})]})})}),s.jsx("div",{className:Le.replacementModalFooter,children:s.jsx(w.Button,{type:"Primary",className:Le.requestButton,onClick:ne,disabled:I,children:I?"SUBMITTING...":"REQUEST REPLACEMENT"})})]})})},ga=({isOrder:e,product:t,isApplicableForReplacement:n,orderId:r,accessToken:u,allowedReplacementReasons:a})=>{var C;const{shopGeneral:i}=b.useStorefrontStore(),o=t.subscriptionSettings,{cart:c}=su(),{isAntistock:l}=b.useGeneralStore(),[h,f]=P.useState(!1),{setIsOpen:m}=b.useModalStore(),p=P.useMemo(()=>t.replacementRequests?new Set(t.replacementRequests.flatMap(_=>_.replacementItems||[]).map(_=>_.originalSerialKey)):new Set,[t.replacementRequests]),g=P.useMemo(()=>{var v;return(((v=t.deliveryCategories)==null?void 0:v.filter(k=>k.type==="SERIALS").flatMap(k=>k.deliveryItems))||[]).filter(k=>!p.has(k.serialKey)).length},[t.deliveryCategories,p]),x=()=>{m(!0),f(!0)};return s.jsxs("div",{className:`${Me.checkoutProduct} ${e?Me.isOrder:""}`,children:[s.jsxs("div",{className:Me.productDetails,children:[s.jsx("div",{className:`${Me.productImage} ${e?Me.isOrderImage:""} ${l?Me.productImageAntistock:""}`,children:t!=null&&t.image?s.jsx("img",{className:Me.image,src:b.convertCfImageIdToUrl(t.image.cfId,"100")}):s.jsx(w.Icon,{name:"Image",fill:"var(--text-secondary)"})}),s.jsx("div",{className:b.clx(Me.productInfo,{[Me.productInfoOverrodePrice]:t.variantsGateways&&c.gateway&&t.variantsGateways.some(_=>_.name===c.gateway&&_.overrodePrice)}),children:s.jsxs("div",{className:Me.productHeader,children:[s.jsx("h2",{className:Me.productName,id:"h5",children:t.name}),s.jsxs("span",{className:Me.quantityBadge,id:"md",children:[t.price.quantity,"x"]})]})}),t.chargeType==="RECURRING"&&s.jsx("p",{className:Me.productPrice,id:"md",children:o&&`${b.formatPrice(o.price)} / ${b.normalizeInterval(o.recurringIntervalDays||0)}${o.entryFee?" + "+b.formatPrice(o.entryFee):""}`}),t.chargeType==="ONE_TIME"&&s.jsx(s.Fragment,{children:t.variantsGateways&&c.gateway&&t.variantsGateways.some(_=>_.name===c.gateway&&_.overrodePrice)?s.jsxs("div",{className:Me.priceContainer,children:[s.jsx("span",{className:Me.originalPrice,id:"md",children:b.formatPrice(t.price)}),s.jsx("span",{className:Me.overridePrice,id:"md",children:b.formatPrice(((C=t.variantsGateways.find(_=>_.name===c.gateway))==null?void 0:C.overrodePrice)||t.price)})]}):s.jsx("p",{className:Me.productPrice,id:"md",children:b.formatPrice(t.price)})})]}),t.deliveryCategories&&s.jsx("div",{className:Me.deliveryCategories,children:t.deliveryCategories.map(_=>s.jsx(I7,{deliveryConfiguration:_},_.id))}),t.customerNote&&s.jsxs("div",{className:Me.customerNote,style:l?{border:"1px solid var(--border-secondary)"}:void 0,children:[s.jsxs("div",{className:Me.noteHeader,children:[(i==null?void 0:i.info.logo)&&s.jsx("div",{className:Me.logoContainer,children:s.jsx("img",{src:b.convertCfImageIdToUrl(i==null?void 0:i.info.logo.cfId,"200")})}),s.jsx("p",{className:Me.shopName,id:"md",children:i==null?void 0:i.info.name})]}),s.jsx("p",{className:Me.noteContent,id:"md",children:t.customerNote})]}),t.replacementRequests&&t.replacementRequests.length===0&&n&&g>0&&s.jsx(w.Button,{type:"Secondary",className:Me.replacementButton,onClick:_=>{_.stopPropagation(),x()},children:s.jsx("p",{className:Me.replacementButtonText,children:"Request Replacement"})}),t.replacementRequests&&t.replacementRequests.length>0&&n&&s.jsxs("div",{className:Me.replacementRequests,children:[s.jsx("h4",{className:Me.replacementRequestsTitle,children:"Replacements"}),s.jsx("div",{className:Me.replacementRequestsList,children:t.replacementRequests.map(_=>s.jsx(a9,{item:_,orderId:r,accessToken:u,onCancel:()=>{}},_.id))}),g>0&&s.jsx(w.Button,{type:"Secondary",onClick:_=>{_.stopPropagation(),x()},children:s.jsx("p",{className:Me.replacementButtonText,children:"Request New Replacement"})})]}),s.jsx(P9,{isOpen:h,onClose:()=>f(!1),product:t,orderId:r,accessToken:u,allowedReplacementReasons:a})]})},R9="_coupon_dkjzv_1",O9="_couponApplied_dkjzv_7",M9="_discount_dkjzv_17",F9="_removeButton_dkjzv_23",B9="_removeButtonText_dkjzv_27",j9="_couponInput_dkjzv_31",H9="_couponInputContainer_dkjzv_37",kn={coupon:R9,couponApplied:O9,discount:M9,removeButton:F9,removeButtonText:B9,couponInput:j9,couponInputContainer:H9},U9=({applyCoupon:e,couponData:t,discount:n,removeCoupon:r,gateway:u})=>{const[a,i]=P.useState(null),[o,c]=P.useState(!1),{isAntistock:l}=b.useGeneralStore();return s.jsxs("div",{className:kn.coupon,children:[o&&s.jsx(er,{speed:2,width:500,height:48,viewBox:"0 0 500 48",backgroundColor:"var(--surface-secondary)",foregroundColor:"var(--surface-disabled)",className:kn.skeleton,style:{borderRadius:"var(--border-radius)"},children:s.jsx("rect",{x:"0",y:"0",rx:"10",ry:"10",width:"100%",height:"48"})}),!o&&(t?s.jsxs("div",{className:kn.couponApplied,style:l?{border:"1px solid var(--border-secondary)"}:void 0,children:[s.jsx(w.Icon,{name:"Check",fill:"var(--text-success)"}),s.jsxs("p",{id:"md",style:{color:l?"var(--text-primary)":void 0},children:[a," is applied"," ",s.jsxs("span",{className:kn.discount,children:["-",n," ",!t.isFixed&&`(${t.discount}%)`]})]}),s.jsx("button",{className:kn.removeButton,onClick:r,children:s.jsx("span",{className:kn.removeButtonText,children:"Remove"})})]}):s.jsxs("div",{className:kn.couponInput,children:[s.jsxs("div",{className:kn.couponInputContainer,children:[s.jsx(w.Input,{placeholder:"Enter a discount code",value:a||"",onChange:h=>{i(h===""?null:h)}}),s.jsx(w.Button,{onClick:async()=>{c(!0),a&&await e(a),c(!1)},disabled:!u||!a,type:"Primary",children:"Apply"})]}),!l&&!u&&s.jsx(w.Tip,{type:"warning",message:"The discount is related to the method of payment. Select to enter.",id:"md"})]}))]})},f0=({cart:e,products:t,applyCoupon:n,applyCouponPending:r,coupon:u,totalAndDiscount:a,removeCoupon:i})=>{const{priceAdjustment:o,serviceFee:c,replacementConfig:l}=b.useCartStore(),[h,f]=P.useState(!1),m=P.useMemo(()=>e.parts.map(k=>{const D=t.find(I=>I.id===k.productId),S=D==null?void 0:D.variants.find(I=>I.id===k.productVariantId);return k.chargeType==="RECURRING"&&f(!0),{id:(D==null?void 0:D.id)||0,image:D==null?void 0:D.images[0],name:(()=>{const I=(D==null?void 0:D.name)||"",M=(S==null?void 0:S.name)||"";return!I&&!M?"":!M||I===M?I:I?`${I} (${M})`:M})(),description:"",price:{quantity:k.quantity,amount:(S==null?void 0:S.price.amount)||0,currency:S==null?void 0:S.price.currency},subscriptionSettings:S==null?void 0:S.subscriptionSettings,chargeType:k.chargeType,variantsGateways:S==null?void 0:S.gateways}}),[e,t]),p=P.useMemo(()=>{const k=m[0];if(k!=null&&k.variantsGateways&&e.gateway){const D=k.variantsGateways.find(S=>S.name===e.gateway&&S.overrodePrice);if(D!=null&&D.overrodePrice)return D.overrodePrice.currency}return(k==null?void 0:k.price.currency)||"USD"},[m,e.gateway]),g=new Intl.NumberFormat("en-US",{style:"currency",currency:p}),x=P.useMemo(()=>u&&!u.isFixed&&u.discount===100||u&&u.isFixed&&u.discount&&u.discount>=a.total?a.total:a.totalWithDiscount?a.total-a.totalWithDiscount:0,[a,u]),C=o?(o==null?void 0:o.fixedAmount)+Math.round((a.totalWithDiscount!==void 0?a.totalWithDiscount:a.total-x)*((o==null?void 0:o.percentage)/100)):null,_=P.useMemo(()=>{const k=e.usePriorityReplacement===!0,D=k?l==null?void 0:l.priorityReplacement:null;if(!k||!(D!=null&&D.enabled))return{label:"",amount:null};const S=a.totalWithDiscount!==void 0?a.totalWithDiscount:a.total-x,I=(D.fixedFee||0)+S*(D.feePercentage||0)/100;return{label:D.name||"Priority Replacement",amount:I}},[e.usePriorityReplacement,l,a,x]),v=P.useMemo(()=>{if(!c)return null;const k=a.totalWithDiscount!==void 0?a.totalWithDiscount:a.total-x,I=((o&&C!==null&&C!==void 0?o.isDiscount?k-C:k+C:k)+(_.amount||0))*(c.percentage/100);return c.fixedAmount+I},[c,a,x,o,C,_]);return s.jsx("div",{className:zn.checkoutItemsContainer,children:s.jsxs("div",{className:zn.innerContainer,children:[s.jsx(ma,{}),s.jsxs("div",{className:zn.headerSection,children:[s.jsx("header",{className:zn.header,children:s.jsx("h1",{id:"h3",children:"Checkout"})}),s.jsx("div",{className:zn.productsContainer,children:m.map(k=>s.jsx(ga,{product:k},k.id))}),s.jsx("div",{className:zn.couponContainer,children:s.jsx(U9,{applyCoupon:n,applyCouponPending:r,couponData:u,discount:g.format(x),removeCoupon:i,gateway:e.gateway})}),s.jsx(kr,{formatter:g,coupon:u,total:a.total,discount:x,totalWithDiscount:a.totalWithDiscount,feeOrDiscount:h?null:C,serviceFeeAmount:h?null:v,replacementLabel:_.amount?_.label:"",replacementAmount:h?null:_.amount})]}),s.jsx("div",{className:zn.checkoutFooter,children:s.jsx(Hn,{})})]})})},V9="_checkoutOperational_b62bq_1",$9="_innerContainer_b62bq_17",z9="_innerContainerAntistock_b62bq_27",q9="_paymentMethodsSectionAntistock_b62bq_39",Z9="_continueButtonAntistock_b62bq_49",W9="_checkoutFooterAntistock_b62bq_59",Y9="_antistock_b62bq_70",G9="_paymentMethodsSection_b62bq_39",X9="_socialConnectSection_b62bq_81",K9="_socialConnectLabel_b62bq_84",Q9="_socialConnectContent_b62bq_88",J9="_continueButton_b62bq_49",eg="_button_b62bq_96",tg="_checkoutFooter_b62bq_59",gt={checkoutOperational:V9,innerContainer:$9,innerContainerAntistock:z9,paymentMethodsSectionAntistock:q9,continueButtonAntistock:Z9,checkoutFooterAntistock:W9,antistock:Y9,paymentMethodsSection:G9,socialConnectSection:X9,socialConnectLabel:K9,socialConnectContent:Q9,continueButton:J9,button:eg,checkoutFooter:tg},ng="_customFields_uhcib_2",rg="_checkboxWrapper_uhcib_9",ug="_textareaWrapper_uhcib_16",ag="_inputWrapper_uhcib_17",ig="_requiredStar_uhcib_27",cr={customFields:ng,checkboxWrapper:rg,textareaWrapper:ug,inputWrapper:ag,requiredStar:ig},h0=({customFields:e,setCustomFields:t})=>{if(e.length===0)return null;const n=e.map(r=>s.jsx(p0,{customField:r,setCustomFields:t},r.name));return s.jsx("div",{className:cr.customFields,children:n})},p0=({customField:e,setCustomFields:t})=>{const n=r=>{t(u=>u.map(a=>a.name===e.name?{...a,value:r}:a))};return s.jsx(sg,{value:e.value??"",placeholder:e.placeholder,required:e.required,defaultValue:e.defaultValue,type:e.type,onValueChange:n,label:e.name,regex:e.regex})},sg=({label:e,type:t,defaultValue:n,value:r,placeholder:u,regex:a,required:i,onValueChange:o})=>{if(P.useEffect(()=>{r===""&&n!==void 0&&o(String(n))},[]),t===Dn.Checkbox)return s.jsxs("label",{className:cr.checkboxWrapper,children:[s.jsx(w.CheckboxSettings,{value:r==="true",onChange:l=>o(l?"true":"false")}),s.jsxs("p",{className:cr.checkboxLabel,children:[e,i&&s.jsx("span",{className:cr.requiredStar,children:"*"})]})]});if(t===Dn.Hidden)return s.jsx("input",{type:"hidden",value:String(n??""),required:i});const c=l=>{let h;if(t===Dn.Number)h=/^\d*$/;else if(a)try{h=new RegExp(a)}catch(f){console.error("Invalid regex pattern:",a,f),h=/.*/}else h=/.*/;h.test(l)&&o(l)};return t===Dn.Textarea?s.jsx("div",{className:cr.textareaWrapper,children:s.jsx(w.Textarea,{label:e,value:r,placeholder:u,onChange:c,required:i})}):s.jsx("div",{className:cr.inputWrapper,children:s.jsx(w.Input,{type:t===Dn.Number?"number":"text",placeholder:t===Dn.Number?"Type something number...":u,label:e,value:r,required:i,onChange:c})})},og="_connectedContainer_1rxr8_1",cg="_userInfo_1rxr8_10",lg="_avatar_1rxr8_16",dg="_avatarImage_1rxr8_26",Lu={connectedContainer:og,userInfo:cg,avatar:lg,avatarImage:dg},m0=({customerEmail:e})=>{const{discordInfo:t,setDiscordInfo:n}=b.useDiscordStore(),{notifications:r,setNotifications:u}=b.useNotificationStore(),[a,i]=P.useState(!1),[o,c]=P.useState(0),[l,h]=P.useState(null),f=20,m=x=>{var C,_,v,k;return(_=(C=x==null?void 0:x.response)==null?void 0:C.data)!=null&&_.error?x.response.data.error:(k=(v=x==null?void 0:x.response)==null?void 0:v.data)!=null&&k.message?x.response.data.message:x!=null&&x.message?x.message:"Failed to connect to Discord. Please try again later."},p=(x,C)=>{u([...r,{id:b.v4(),message:x,status:C}])};P.useEffect(()=>{if(l&&a){const x=setInterval(()=>{l.closed&&(clearInterval(x),i(!1),h(null))},1e3);return()=>clearInterval(x)}},[l,a]);const g=()=>{e.trim()!==""&&(i(!0),c(0),D2({customerEmail:e,tsId:b.useGetTsId()}).then(({data:x})=>{const C=window.open(x.redirectUrl);h(C),(!C||C.closed||typeof C.closed>"u")&&setTimeout(()=>{const k=document.createElement("a");k.href=x.redirectUrl,k.target="_blank",k.click()});let _;const v=()=>{if(c(k=>k+1),o>=f||C&&C.closed){o>=f&&p("Authorization timeout. Please try again.","error"),i(!1),clearTimeout(_);return}L2({id:x.id,customerEmail:e}).then(({data:k})=>{n({authorized:!0,id:x.id,avatar:k.avatar,username:k.username}),C&&C.close(),i(!1),h(null),p("Discord successfully connected!","success"),clearTimeout(_)}).catch(k=>{var D;if(console.log("Waiting for authorization...",k,{newWindow:C}),C&&C.closed){i(!1),clearTimeout(_);return}if((D=k==null?void 0:k.response)!=null&&D.status&&k.response.status!==404&&k.response.status>=400){p(m(k),"error"),i(!1),clearTimeout(_);return}clearTimeout(_),_=setTimeout(v,1500)})};v()}).catch(x=>{console.log("Could not initiate Discord authorization",x),p(m(x),"error"),i(!1)}))};return t!=null&&t.authorized?s.jsxs("div",{className:Lu.connectedContainer,children:[s.jsxs("div",{className:Lu.userInfo,children:[s.jsx("div",{className:Lu.avatar,children:t.avatar?s.jsx("img",{className:Lu.avatarImage,src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=256`}):s.jsx(w.Icon,{name:"UserCircle"})}),s.jsx("p",{children:t.username}),s.jsx(g8,{})]}),s.jsx(w.Button,{type:"Secondary",onClick:g,children:"Reconnect"})]}):s.jsx(w.Button,{type:"Secondary",onClick:g,style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:"10px"},disabled:a,children:a?s.jsx(w.Loader,{}):s.jsxs(s.Fragment,{children:[s.jsx(w.Icon,{name:"DiscordLogo"}),s.jsx(Gc,{children:"Connect Your Discord"})]})})},fg="_paymentMethodsContainer_1pfqr_2",hg="_antistock_1pfqr_15",So={paymentMethodsContainer:fg,antistock:hg},pg="_paymentMethod_1it0n_3",mg="_selected_1it0n_16",gg="_alignColumn_1it0n_19",bg="_reversed_1it0n_25",_g="_antistock_1it0n_29",xg="_paymentText_1it0n_36",Cg="_balanceText_1it0n_50",Eg="_signInLink_1it0n_54",Tg="_iconContainer_1it0n_63",yg="_gatewayLogo_1it0n_76",kg="_poweredByLogo_1it0n_77",Ag="_logo_1it0n_82",Se={paymentMethod:pg,selected:mg,alignColumn:gg,reversed:bg,antistock:_g,paymentText:xg,balanceText:Cg,signInLink:Eg,iconContainer:Tg,gatewayLogo:yg,poweredByLogo:kg,logo:Ag},Sg="_bottomSheet_1x8kc_1",Ig="_content_1x8kc_8",Ng="_description_1x8kc_11",vg="_title_1x8kc_15",wg="_buttonGroup_1x8kc_19",Dg="_buttonWrapper_1x8kc_29",Lg="_fullWidthButton_1x8kc_32",Pg="_modal_1x8kc_36",Rg="_header_1x8kc_43",_n={bottomSheet:Sg,content:Ig,description:Ng,title:vg,buttonGroup:wg,buttonWrapper:Dg,fullWidthButton:Lg,modal:Pg,header:Rg},Og=({setIsOpen:e,balance:t})=>{const n=b.useNavigate(),{setIsOpen:r}=b.useModalStore(),u=()=>{n("/top-up?redirectRoute=checkout")};function a(){r(!1),setTimeout(()=>{e(!1)},300)}return s.jsxs("div",{className:_n.modal,onClick:i=>i.stopPropagation(),children:[s.jsxs("div",{className:_n.header,children:[s.jsx("h3",{id:"h3",className:_n.title,children:"Insufficient Customer Balance"}),s.jsx(w.Icon,{name:"X",hoverable:!0,onClick:a,fill:"var(--text-primary)"})]}),s.jsxs("div",{className:_n.bottomSheet,children:[s.jsx("div",{className:_n.content,children:s.jsxs("p",{className:_n.description,children:["You currently have ",t&&b.formatPrice(t)," in your balance. After topping up the required amount, you can continue to checkout."]})}),s.jsxs("div",{className:_n.buttonGroup,children:[s.jsx("div",{className:_n.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:a,children:"Cancel"})}),s.jsx("div",{className:_n.fullWidthButton,children:s.jsx(w.Button,{type:"Primary",onClick:u,children:"Add Balance"})})]})]})]})},is=({align:e,gateway:t,gatewayDisplayName:n,selected:r,onSelect:u,total:a,onSignInClick:i,reversed:o,isAntistock:c=!1})=>{const{token:l}=b.useStorefrontStore(),{balance:h}=b.useCustomerDashboardStore(),[f,m]=P.useState(!1),{setIsOpen:p}=b.useModalStore(),g=x=>{x.stopPropagation(),u==null||u(t),h&&h.amount<a&&(m(!0),p(!0))};return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:b.clx(Se.paymentMethod,{[Se.selected]:r,[Se.alignColumn]:e==="column",[Se.reversed]:o&&!c,[Se.antistock]:c}),onClick:g,children:c?s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:Se.paymentText,id:"md",children:[n," ",s.jsxs("span",{className:Se.balanceText,id:"md",children:["(",l?h&&b.formatPrice(h):s.jsx("a",{className:Se.signInLink,onClick:i,id:"md",children:"Sign in"}),")"]})]}),s.jsx("div",{className:Se.iconContainer,children:s.jsx(w.Icon,{name:"Wallet",fill:"var(--text-primary)",width:20,height:20})})]}):s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:Se.paymentText,id:"md",children:[n," ",s.jsxs("span",{className:Se.balanceText,id:"md",children:["(",l?h&&b.formatPrice(h):s.jsx("a",{className:Se.signInLink,onClick:i,id:"md",children:"Sign in"}),")"]})]}),s.jsx("div",{className:Se.iconContainer,children:s.jsx(w.Icon,{name:"Wallet",fill:"var(--text-primary)",width:20,height:20})})]})}),f&&s.jsx(w.Modal,{close:()=>m(!1),children:s.jsx(Og,{setIsOpen:m,balance:h})})]})};var qe=(e=>(e.BankCard="BANK_CARD",e.BankTransfer="BANK_TRANSFER",e.PayPal="PAYPAL",e.CashApp="CASHAPP",e.Crypto="CRYPTO",e.AppleGooglePay="APPLE_AND_GOOGLE_PAY",e.Custom="CUSTOM",e))(qe||{});const Mg={[qe.CashApp]:s.jsx(jl,{}),[qe.AppleGooglePay]:s.jsx(Ul,{}),[qe.BankCard]:s.jsx(Bl,{}),[qe.Crypto]:s.jsx(Ml,{}),[qe.PayPal]:s.jsx(Hl,{}),[qe.Custom]:s.jsx("div",{}),[qe.BankTransfer]:s.jsx(Vl,{})},Fg={[qe.CashApp]:s.jsx(jl,{isAntistock:!0}),[qe.AppleGooglePay]:s.jsx(Ul,{isAntistock:!0}),[qe.BankCard]:s.jsx(Bl,{isAntistock:!0}),[qe.Crypto]:s.jsx(Ml,{isAntistock:!0}),[qe.PayPal]:s.jsx(Hl,{}),[qe.Custom]:s.jsx("div",{}),[qe.BankTransfer]:s.jsx(Vl,{isAntistock:!0})},Io={[qe.CashApp]:"Cash App",[qe.AppleGooglePay]:"Apple Pay / Google Pay",[qe.BankCard]:"Debit / Credit Card",[qe.Crypto]:"Cryptocurrency",[qe.PayPal]:"PayPal",[qe.Custom]:"",[qe.BankTransfer]:"Bank Transfer"},ss=({align:e,paymentMethod:t,gatewayDisplayName:n,gatewayLogoCfId:r,poweredByLogoCfId:u,selected:a,onSelect:i,className:o,isAntistock:c=!1})=>{const l=t===qe.Custom;return t?s.jsx("div",{className:b.clx(Se.paymentMethod,{[Se.selected]:a,[Se.alignColumn]:e==="column",[Se.antistock]:c},o),onClick:()=>i&&i(t),children:c?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:Se.paymentText,id:"md",children:l?n:Io[t]}),s.jsxs("div",{className:Se.iconContainer,children:[l?s.jsx("div",{className:Se.gatewayLogo,children:s.jsx("img",{className:Se.logo,src:b.convertCfImageIdToUrl(r,"100"),alt:n})}):Fg[t],u&&s.jsx("div",{className:Se.poweredByLogo,children:s.jsx("img",{className:Se.logo,src:b.convertCfImageIdToUrl(u,"100"),alt:n})})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:Se.paymentText,id:"md",children:l?n:Io[t]}),s.jsxs("div",{className:Se.iconContainer,children:[l?s.jsx("div",{className:Se.gatewayLogo,children:s.jsx("img",{className:Se.logo,src:b.convertCfImageIdToUrl(r,"100"),alt:n})}):Mg[t],u&&s.jsx("div",{className:Se.poweredByLogo,children:s.jsx("img",{className:Se.logo,src:b.convertCfImageIdToUrl(u,"100"),alt:n})})]})]})}):s.jsxs("div",{className:b.clx(Se.paymentMethod,o),children:[s.jsx("div",{className:Se.gatewayLogo,children:s.jsx("img",{className:Se.logo,src:b.convertCfImageIdToUrl(r,"100"),alt:n})}),s.jsx("p",{className:Se.paymentText,children:n})]})},os=({possibleGateways:e,setGateway:t,totalAndDiscount:n,onSignInClick:r,setPaymentMethod:u,isAntistock:a=!1})=>{const[i,o]=P.useState(),[c,l]=P.useState(),{setPriceAdjustment:h,setServiceFee:f}=b.useCartStore(),[m,p]=P.useState(null),g=C=>{t(C);const _=m==null?void 0:m.find(v=>v.name===C);h((_==null?void 0:_.priceAdjustment)||null),f((_==null?void 0:_.serviceFee)||null)},x=(C,_)=>{c!==_&&g(_),u(C),o(C),l(_)};return P.useEffect(()=>{if(m&&m.length>0){const C=m[0];if(C.name==="Balance")l(C.name),t(C.name),h(C.priceAdjustment||null),f(C.serviceFee||null);else if(C.paymentMethods&&C.paymentMethods.length>0){const _=C.paymentMethods[0];o(_),l(C.name),t(C.name),u(_),h(C.priceAdjustment||null),f(C.serviceFee||null)}}},[m]),P.useEffect(()=>{const C=async()=>{const{data:_}=await Xc([...e.availableGateways,...e.requiresSignInGateways]),v=Array.isArray(_)?_:_.gateways;p(v)};(e.availableGateways.length||e.requiresSignInGateways.length)&&C()},[]),P.useLayoutEffect(()=>{h(null),f(null)},[]),s.jsxs(s.Fragment,{children:[m&&s.jsx("div",{className:b.clx(So.paymentMethodsContainer,{[So.antistock]:a}),children:m==null?void 0:m.map(C=>C.name==="Balance"?s.jsx(is,{gateway:C.name,gatewayDisplayName:C.displayName,onSelect:_=>{l(_),c!==_&&g(_)},selected:C.name===c,total:n.total,onSignInClick:r,reversed:!0,isAntistock:a},C.name):C.paymentMethods.map(_=>s.jsx(ss,{paymentMethod:_,gateway:C.name,gatewayDisplayName:C.displayName,gatewayLogoCfId:C.logoCfImageId,poweredByLogoCfId:C.poweredByImageCfImageId,onSelect:v=>x(v,C.name),selected:i===_&&c===C.name,isAntistock:a},`${C.name}-${_}`)))}),!m&&(a?s.jsx(w.Loader,{}):s.jsx(er,{speed:2,width:"100%",height:"220px",viewBox:"0 0 600 220",backgroundColor:"var(--surface-secondary)",foregroundColor:"var(--surface-disabled)",style:{borderRadius:"var(--border-radius)"},children:s.jsx("rect",{x:"0",y:"0",rx:"5",ry:"5",width:"100%",height:"100%"})}))]})},Bg="_modal_14r0b_1",jg={modal:Bg},g0=({setIsOpen:e})=>{const{token:t}=b.useStorefrontStore(),{setIsOpen:n}=b.useModalStore();P.useEffect(()=>{t&&r()},[t]);const r=()=>{n(!1),setTimeout(()=>{e(!1)},300)};return s.jsx("div",{className:jg.modal,onClick:u=>u.stopPropagation(),children:s.jsx(us,{inModal:!0})})},Hg="_container_r8mpd_1",Ug="_text_r8mpd_9",Vg="_link_r8mpd_14",Rr={container:Hg,text:Ug,link:Vg};function No(e){const t=[],n=String(e||"");let r=n.indexOf(","),u=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const i=n.slice(u,r).trim();(i||!a)&&t.push(i),u=r+1,r=n.indexOf(",",u)}return t}function b0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const $g=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zg=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qg={};function vo(e,t){return(qg.jsx?zg:$g).test(e)}const Zg=/[ \t\n\f\r]/g;function Wg(e){return typeof e=="object"?e.type==="text"?wo(e.value):!1:wo(e)}function wo(e){return e.replace(Zg,"")===""}let pu=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};pu.prototype.normal={};pu.prototype.property={};pu.prototype.space=void 0;function _0(e,t){const n={},r={};for(const u of e)Object.assign(n,u.property),Object.assign(r,u.normal);return new pu(n,r,t)}function nu(e){return e.toLowerCase()}let vt=class{constructor(t,n){this.attribute=n,this.property=t}};vt.prototype.attribute="";vt.prototype.booleanish=!1;vt.prototype.boolean=!1;vt.prototype.commaOrSpaceSeparated=!1;vt.prototype.commaSeparated=!1;vt.prototype.defined=!1;vt.prototype.mustUseProperty=!1;vt.prototype.number=!1;vt.prototype.overloadedBoolean=!1;vt.prototype.property="";vt.prototype.spaceSeparated=!1;vt.prototype.space=void 0;let Yg=0;const pe=tr(),Ke=tr(),x0=tr(),W=tr(),He=tr(),mr=tr(),Pt=tr();function tr(){return 2**++Yg}const Ni=Object.freeze(Object.defineProperty({__proto__:null,boolean:pe,booleanish:Ke,commaOrSpaceSeparated:Pt,commaSeparated:mr,number:W,overloadedBoolean:x0,spaceSeparated:He},Symbol.toStringTag,{value:"Module"})),Ya=Object.keys(Ni);let cs=class extends vt{constructor(t,n,r,u){let a=-1;if(super(t,n),Do(this,"space",u),typeof r=="number")for(;++a<Ya.length;){const i=Ya[a];Do(this,Ya[a],(r&Ni[i])===Ni[i])}}};cs.prototype.defined=!0;function Do(e,t,n){n&&(e[t]=n)}function Ar(e){const t={},n={};for(const[r,u]of Object.entries(e.properties)){const a=new cs(r,e.transform(e.attributes||{},r),u,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[nu(r)]=r,n[nu(a.attribute)]=r}return new pu(t,n,e.space)}const C0=Ar({properties:{ariaActiveDescendant:null,ariaAtomic:Ke,ariaAutoComplete:null,ariaBusy:Ke,ariaChecked:Ke,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:He,ariaCurrent:null,ariaDescribedBy:He,ariaDetails:null,ariaDisabled:Ke,ariaDropEffect:He,ariaErrorMessage:null,ariaExpanded:Ke,ariaFlowTo:He,ariaGrabbed:Ke,ariaHasPopup:null,ariaHidden:Ke,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:He,ariaLevel:W,ariaLive:null,ariaModal:Ke,ariaMultiLine:Ke,ariaMultiSelectable:Ke,ariaOrientation:null,ariaOwns:He,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:Ke,ariaReadOnly:Ke,ariaRelevant:null,ariaRequired:Ke,ariaRoleDescription:He,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:Ke,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function E0(e,t){return t in e?e[t]:t}function T0(e,t){return E0(e,t.toLowerCase())}const Gg=Ar({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:mr,acceptCharset:He,accessKey:He,action:null,allow:null,allowFullScreen:pe,allowPaymentRequest:pe,allowUserMedia:pe,alt:null,as:null,async:pe,autoCapitalize:null,autoComplete:He,autoFocus:pe,autoPlay:pe,blocking:He,capture:null,charSet:null,checked:pe,cite:null,className:He,cols:W,colSpan:null,content:null,contentEditable:Ke,controls:pe,controlsList:He,coords:W|mr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pe,defer:pe,dir:null,dirName:null,disabled:pe,download:x0,draggable:Ke,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pe,formTarget:null,headers:He,height:W,hidden:pe,high:W,href:null,hrefLang:null,htmlFor:He,httpEquiv:He,id:null,imageSizes:null,imageSrcSet:null,inert:pe,inputMode:null,integrity:null,is:null,isMap:pe,itemId:null,itemProp:He,itemRef:He,itemScope:pe,itemType:He,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pe,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:pe,muted:pe,name:null,nonce:null,noModule:pe,noValidate:pe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:pe,optimum:W,pattern:null,ping:He,placeholder:null,playsInline:pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pe,referrerPolicy:null,rel:He,required:pe,reversed:pe,rows:W,rowSpan:W,sandbox:He,scope:null,scoped:pe,seamless:pe,selected:pe,shadowRootClonable:pe,shadowRootDelegatesFocus:pe,shadowRootMode:null,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:Ke,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:pe,useMap:null,value:Ke,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:He,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pe,declare:pe,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:pe,noHref:pe,noShade:pe,noWrap:pe,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:Ke,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pe,disableRemotePlayback:pe,prefix:null,property:null,results:W,security:null,unselectable:null},space:"html",transform:T0}),Xg=Ar({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Pt,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:He,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:mr,g2:mr,glyphName:mr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:Pt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:W,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:He,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pt,rev:Pt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pt,requiredFeatures:Pt,requiredFonts:Pt,requiredFormats:Pt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:Pt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pt,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:E0}),y0=Ar({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),k0=Ar({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:T0}),A0=Ar({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Kg={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Qg=/[A-Z]/g,Lo=/-[a-z]/g,Jg=/^data[-\w.:]+$/i;function ls(e,t){const n=nu(t);let r=t,u=vt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Jg.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Lo,tb);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Lo.test(a)){let i=a.replace(Qg,eb);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}u=cs}return new u(r,t)}function eb(e){return"-"+e.toLowerCase()}function tb(e){return e.charAt(1).toUpperCase()}const ba=_0([C0,Gg,y0,k0,A0],"html"),Sr=_0([C0,Xg,y0,k0,A0],"svg");function Po(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function S0(e){return e.join(" ").trim()}var I0={},Ro=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,nb=/\n/g,rb=/^\s*/,ub=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ab=/^:\s*/,ib=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,sb=/^[;\s]*/,ob=/^\s+|\s+$/g,cb=`
80
+ `,Oo="/",Mo="*",Yn="",lb="comment",db="declaration",fb=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function u(g){var x=g.match(nb);x&&(n+=x.length);var C=g.lastIndexOf(cb);r=~C?g.length-C:r+g.length}function a(){var g={line:n,column:r};return function(x){return x.position=new i(g),l(),x}}function i(g){this.start=g,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;function o(g){var x=new Error(t.source+":"+n+":"+r+": "+g);if(x.reason=g,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function c(g){var x=g.exec(e);if(x){var C=x[0];return u(C),e=e.slice(C.length),x}}function l(){c(rb)}function h(g){var x;for(g=g||[];x=f();)x!==!1&&g.push(x);return g}function f(){var g=a();if(!(Oo!=e.charAt(0)||Mo!=e.charAt(1))){for(var x=2;Yn!=e.charAt(x)&&(Mo!=e.charAt(x)||Oo!=e.charAt(x+1));)++x;if(x+=2,Yn===e.charAt(x-1))return o("End of comment missing");var C=e.slice(2,x-2);return r+=2,u(C),e=e.slice(x),r+=2,g({type:lb,comment:C})}}function m(){var g=a(),x=c(ub);if(x){if(f(),!c(ab))return o("property missing ':'");var C=c(ib),_=g({type:db,property:Fo(x[0].replace(Ro,Yn)),value:C?Fo(C[0].replace(Ro,Yn)):Yn});return c(sb),_}}function p(){var g=[];h(g);for(var x;x=m();)x!==!1&&(g.push(x),h(g));return g}return l(),p()};function Fo(e){return e?e.replace(ob,Yn):Yn}var hb=b.commonjsGlobal&&b.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(I0,"__esModule",{value:!0});var Bo=I0.default=mb,pb=hb(fb);function mb(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,pb.default)(e),u=typeof t=="function";return r.forEach(function(a){if(a.type==="declaration"){var i=a.property,o=a.value;u?t(i,o,a):o&&(n=n||{},n[i]=o)}}),n}const gb=Bo.default||Bo,_a=N0("end"),fn=N0("start");function N0(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function bb(e){const t=fn(e),n=_a(e);if(t&&n)return{start:t,end:n}}function $r(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?jo(e.position):"start"in e||"end"in e?jo(e):"line"in e||"column"in e?vi(e):""}function vi(e){return Ho(e&&e.line)+":"+Ho(e&&e.column)}function jo(e){return vi(e&&e.start)+"-"+vi(e&&e.end)}function Ho(e){return e&&typeof e=="number"?e:1}class ht extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let u="",a={},i=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?u=t:!a.cause&&t&&(i=!0,u=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=u,this.line=o?o.line:void 0,this.name=$r(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=i&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}ht.prototype.file="";ht.prototype.name="";ht.prototype.reason="";ht.prototype.message="";ht.prototype.stack="";ht.prototype.column=void 0;ht.prototype.line=void 0;ht.prototype.ancestors=void 0;ht.prototype.cause=void 0;ht.prototype.fatal=void 0;ht.prototype.place=void 0;ht.prototype.ruleId=void 0;ht.prototype.source=void 0;const ds={}.hasOwnProperty,_b=new Map,xb=/[A-Z]/g,Cb=/-([a-z])/g,Eb=new Set(["table","tbody","thead","tfoot","tr"]),Tb=new Set(["td","th"]),v0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function yb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Db(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=wb(n,t.jsx,t.jsxs)}const u={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Sr:ba,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=w0(u,e,void 0);return a&&typeof a!="string"?a:u.create(e,u.Fragment,{children:a||void 0},void 0)}function w0(e,t,n){if(t.type==="element")return kb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ab(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ib(e,t,n);if(t.type==="mdxjsEsm")return Sb(e,t);if(t.type==="root")return Nb(e,t,n);if(t.type==="text")return vb(e,t)}function kb(e,t,n){const r=e.schema;let u=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(u=Sr,e.schema=u),e.ancestors.push(t);const a=L0(e,t.tagName,!1),i=Lb(e,t);let o=hs(e,t);return Eb.has(t.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!Wg(c):!0})),D0(e,i,a,t),fs(i,o),e.ancestors.pop(),e.schema=r,e.create(t,a,i,n)}function Ab(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ru(e,t.position)}function Sb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ru(e,t.position)}function Ib(e,t,n){const r=e.schema;let u=r;t.name==="svg"&&r.space==="html"&&(u=Sr,e.schema=u),e.ancestors.push(t);const a=t.name===null?e.Fragment:L0(e,t.name,!0),i=Pb(e,t),o=hs(e,t);return D0(e,i,a,t),fs(i,o),e.ancestors.pop(),e.schema=r,e.create(t,a,i,n)}function Nb(e,t,n){const r={};return fs(r,hs(e,t)),e.create(t,e.Fragment,r,n)}function vb(e,t){return t.value}function D0(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function fs(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function wb(e,t,n){return r;function r(u,a,i,o){const l=Array.isArray(i.children)?n:t;return o?l(a,i,o):l(a,i)}}function Db(e,t){return n;function n(r,u,a,i){const o=Array.isArray(a.children),c=fn(r);return t(u,a,i,o,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Lb(e,t){const n={};let r,u;for(u in t.properties)if(u!=="children"&&ds.call(t.properties,u)){const a=Rb(e,u,t.properties[u]);if(a){const[i,o]=a;e.tableCellAlignToStyle&&i==="align"&&typeof o=="string"&&Tb.has(t.tagName)?r=o:n[i]=o}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Pb(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const i=a.expression;i.type;const o=i.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else ru(e,t.position);else{const u=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else ru(e,t.position);else a=r.value===null?!0:r.value;n[u]=a}return n}function hs(e,t){const n=[];let r=-1;const u=e.passKeys?new Map:_b;for(;++r<t.children.length;){const a=t.children[r];let i;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const l=u.get(c)||0;i=c+"-"+l,u.set(c,l+1)}}const o=w0(e,a,i);o!==void 0&&n.push(o)}return n}function Rb(e,t,n){const r=ls(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?b0(n):S0(n)),r.property==="style"){let u=typeof n=="object"?n:Ob(e,String(n));return e.stylePropertyNameCase==="css"&&(u=Mb(u)),["style",u]}return[e.elementAttributeNameCase==="react"&&r.space?Kg[r.property]||r.property:r.attribute,n]}}function Ob(e,t){const n={};try{gb(t,r)}catch(u){if(!e.ignoreInvalidStyle){const a=u,i=new ht("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=v0+"#cannot-parse-style-attribute",i}}return n;function r(u,a){let i=u;i.slice(0,2)!=="--"&&(i.slice(0,4)==="-ms-"&&(i="ms-"+i.slice(4)),i=i.replace(Cb,Bb)),n[i]=a}}function L0(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const u=t.split(".");let a=-1,i;for(;++a<u.length;){const o=vo(u[a])?{type:"Identifier",name:u[a]}:{type:"Literal",value:u[a]};i=i?{type:"MemberExpression",object:i,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}r=i}else r=vo(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const u=r.value;return ds.call(e.components,u)?e.components[u]:u}if(e.evaluater)return e.evaluater.evaluateExpression(r);ru(e)}function ru(e,t){const n=new ht("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=v0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Mb(e){const t={};let n;for(n in e)ds.call(e,n)&&(t[Fb(n)]=e[n]);return t}function Fb(e){let t=e.replace(xb,jb);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Bb(e,t){return t.toUpperCase()}function jb(e){return"-"+e.toLowerCase()}const Ga={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Hb={};function ps(e,t){const n=Hb,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,u=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return P0(e,r,u)}function P0(e,t,n){if(Ub(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Uo(e.children,t,n)}return Array.isArray(e)?Uo(e,t,n):""}function Uo(e,t,n){const r=[];let u=-1;for(;++u<e.length;)r[u]=P0(e[u],t,n);return r.join("")}function Ub(e){return!!(e&&typeof e=="object")}const Vo=document.createElement("i");function ms(e){const t="&"+e+";";Vo.innerHTML=t;const n=Vo.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ft(e,t,n,r){const u=e.length;let a=0,i;if(t<0?t=-t>u?0:u+t:t=t>u?u:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function $t(e,t){return e.length>0?(Ft(e,e.length,0,t),e):t}const $o={}.hasOwnProperty;function R0(e){const t={};let n=-1;for(;++n<e.length;)Vb(t,e[n]);return t}function Vb(e,t){let n;for(n in t){const u=($o.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let i;if(a)for(i in a){$o.call(u,i)||(u[i]=[]);const o=a[i];$b(u[i],Array.isArray(o)?o:o?[o]:[])}}}function $b(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ft(e,0,0,r)}function O0(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Kt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const xt=Un(/[A-Za-z]/),ft=Un(/[\dA-Za-z]/),zb=Un(/[#-'*+\--9=?A-Z^-~]/);function Gu(e){return e!==null&&(e<32||e===127)}const wi=Un(/\d/),qb=Un(/[\dA-Fa-f]/),Zb=Un(/[!-/:-@[-`{-~]/);function ue(e){return e!==null&&e<-2}function Be(e){return e!==null&&(e<0||e===32)}function ye(e){return e===-2||e===-1||e===32}const xa=Un(new RegExp("\\p{P}|\\p{S}","u")),Qn=Un(/\s/);function Un(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ir(e){const t=[];let n=-1,r=0,u=0;for(;++n<e.length;){const a=e.charCodeAt(n);let i="";if(a===37&&ft(e.charCodeAt(n+1))&&ft(e.charCodeAt(n+2)))u=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(i=String.fromCharCode(a,o),u=1):i="�"}else i=String.fromCharCode(a);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+u+1,i=""),u&&(n+=u,u=0)}return t.join("")+e.slice(r)}function Ae(e,t,n,r){const u=r?r-1:Number.POSITIVE_INFINITY;let a=0;return i;function i(c){return ye(c)?(e.enter(n),o(c)):t(c)}function o(c){return ye(c)&&a++<u?(e.consume(c),o):(e.exit(n),t(c))}}const Wb={tokenize:Yb};function Yb(e){const t=e.attempt(this.parser.constructs.contentInitial,r,u);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ae(e,t,"linePrefix")}function u(o){return e.enter("paragraph"),a(o)}function a(o){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,i(o)}function i(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return ue(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),i)}}const Gb={tokenize:Xb},zo={tokenize:Kb};function Xb(e){const t=this,n=[];let r=0,u,a,i;return o;function o(k){if(r<n.length){const D=n[r];return t.containerState=D[1],e.attempt(D[0].continuation,c,l)(k)}return l(k)}function c(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,u&&v();const D=t.events.length;let S=D,I;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){I=t.events[S][1].end;break}_(r);let M=D;for(;M<t.events.length;)t.events[M][1].end={...I},M++;return Ft(t.events,S+1,0,t.events.slice(D)),t.events.length=M,l(k)}return o(k)}function l(k){if(r===n.length){if(!u)return m(k);if(u.currentConstruct&&u.currentConstruct.concrete)return g(k);t.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(zo,h,f)(k)}function h(k){return u&&v(),_(r),m(k)}function f(k){return t.parser.lazy[t.now().line]=r!==n.length,i=t.now().offset,g(k)}function m(k){return t.containerState={},e.attempt(zo,p,g)(k)}function p(k){return r++,n.push([t.currentConstruct,t.containerState]),m(k)}function g(k){if(k===null){u&&v(),_(0),e.consume(k);return}return u=u||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:a}),x(k)}function x(k){if(k===null){C(e.exit("chunkFlow"),!0),_(0),e.consume(k);return}return ue(k)?(e.consume(k),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(k),x)}function C(k,D){const S=t.sliceStream(k);if(D&&S.push(null),k.previous=a,a&&(a.next=k),a=k,u.defineSkip(k.start),u.write(S),t.parser.lazy[k.start.line]){let I=u.events.length;for(;I--;)if(u.events[I][1].start.offset<i&&(!u.events[I][1].end||u.events[I][1].end.offset>i))return;const M=t.events.length;let q=M,U,L;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(U){L=t.events[q][1].end;break}U=!0}for(_(r),I=M;I<t.events.length;)t.events[I][1].end={...L},I++;Ft(t.events,q+1,0,t.events.slice(M)),t.events.length=I}}function _(k){let D=n.length;for(;D-- >k;){const S=n[D];t.containerState=S[1],S[0].exit.call(t,e)}n.length=k}function v(){u.write([null]),a=void 0,u=void 0,t.containerState._closeFlow=void 0}}function Kb(e,t,n){return Ae(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function xr(e){if(e===null||Be(e)||Qn(e))return 1;if(xa(e))return 2}function Ca(e,t,n){const r=[];let u=-1;for(;++u<e.length;){const a=e[u].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Di={name:"attention",resolveAll:Qb,tokenize:Jb};function Qb(e,t){let n=-1,r,u,a,i,o,c,l,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},m={...e[n][1].start};qo(f,-c),qo(m,c),i={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},o={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},u={type:c>1?"strong":"emphasis",start:{...i.start},end:{...o.end}},e[r][1].end={...i.start},e[n][1].start={...o.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=$t(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=$t(l,[["enter",u,t],["enter",i,t],["exit",i,t],["enter",a,t]]),l=$t(l,Ca(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=$t(l,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",u,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,l=$t(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Ft(e,r-1,n-r+3,l),n=r+l.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Jb(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,u=xr(r);let a;return i;function i(c){return a=c,e.enter("attentionSequence"),o(c)}function o(c){if(c===a)return e.consume(c),o;const l=e.exit("attentionSequence"),h=xr(c),f=!h||h===2&&u||n.includes(c),m=!u||u===2&&h||n.includes(r);return l._open=!!(a===42?f:f&&(u||!m)),l._close=!!(a===42?m:m&&(h||!f)),t(c)}}function qo(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const e_={name:"autolink",tokenize:t_};function t_(e,t,n){let r=0;return u;function u(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return xt(p)?(e.consume(p),i):p===64?n(p):l(p)}function i(p){return p===43||p===45||p===46||ft(p)?(r=1,o(p)):l(p)}function o(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||ft(p))&&r++<32?(e.consume(p),o):(r=0,l(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Gu(p)?n(p):(e.consume(p),c)}function l(p){return p===64?(e.consume(p),h):zb(p)?(e.consume(p),l):n(p)}function h(p){return ft(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,h):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):m(p)}function m(p){if((p===45||ft(p))&&r++<63){const g=p===45?m:f;return e.consume(p),g}return n(p)}}const mu={partial:!0,tokenize:n_};function n_(e,t,n){return r;function r(a){return ye(a)?Ae(e,u,"linePrefix")(a):u(a)}function u(a){return a===null||ue(a)?t(a):n(a)}}const M0={continuation:{tokenize:u_},exit:a_,name:"blockQuote",tokenize:r_};function r_(e,t,n){const r=this;return u;function u(i){if(i===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),a}return n(i)}function a(i){return ye(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function u_(e,t,n){const r=this;return u;function u(i){return ye(i)?Ae(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):a(i)}function a(i){return e.attempt(M0,t,n)(i)}}function a_(e){e.exit("blockQuote")}const F0={name:"characterEscape",tokenize:i_};function i_(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),u}function u(a){return Zb(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const B0={name:"characterReference",tokenize:s_};function s_(e,t,n){const r=this;let u=0,a,i;return o;function o(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),c}function c(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,i=ft,h(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,i=qb,h):(e.enter("characterReferenceValue"),a=7,i=wi,h(f))}function h(f){if(f===59&&u){const m=e.exit("characterReferenceValue");return i===ft&&!ms(r.sliceSerialize(m))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(f)&&u++<a?(e.consume(f),h):n(f)}}const Zo={partial:!0,tokenize:c_},Wo={concrete:!0,name:"codeFenced",tokenize:o_};function o_(e,t,n){const r=this,u={partial:!0,tokenize:S};let a=0,i=0,o;return c;function c(I){return l(I)}function l(I){const M=r.events[r.events.length-1];return a=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,o=I,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(I)}function h(I){return I===o?(i++,e.consume(I),h):i<3?n(I):(e.exit("codeFencedFenceSequence"),ye(I)?Ae(e,f,"whitespace")(I):f(I))}function f(I){return I===null||ue(I)?(e.exit("codeFencedFence"),r.interrupt?t(I):e.check(Zo,x,D)(I)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(I))}function m(I){return I===null||ue(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(I)):ye(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ae(e,p,"whitespace")(I)):I===96&&I===o?n(I):(e.consume(I),m)}function p(I){return I===null||ue(I)?f(I):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(I))}function g(I){return I===null||ue(I)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(I)):I===96&&I===o?n(I):(e.consume(I),g)}function x(I){return e.attempt(u,D,C)(I)}function C(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),_}function _(I){return a>0&&ye(I)?Ae(e,v,"linePrefix",a+1)(I):v(I)}function v(I){return I===null||ue(I)?e.check(Zo,x,D)(I):(e.enter("codeFlowValue"),k(I))}function k(I){return I===null||ue(I)?(e.exit("codeFlowValue"),v(I)):(e.consume(I),k)}function D(I){return e.exit("codeFenced"),t(I)}function S(I,M,q){let U=0;return L;function L(ee){return I.enter("lineEnding"),I.consume(ee),I.exit("lineEnding"),j}function j(ee){return I.enter("codeFencedFence"),ye(ee)?Ae(I,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):F(ee)}function F(ee){return ee===o?(I.enter("codeFencedFenceSequence"),Q(ee)):q(ee)}function Q(ee){return ee===o?(U++,I.consume(ee),Q):U>=i?(I.exit("codeFencedFenceSequence"),ye(ee)?Ae(I,ae,"whitespace")(ee):ae(ee)):q(ee)}function ae(ee){return ee===null||ue(ee)?(I.exit("codeFencedFence"),M(ee)):q(ee)}}}function c_(e,t,n){const r=this;return u;function u(i){return i===null?n(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a)}function a(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}const Xa={name:"codeIndented",tokenize:d_},l_={partial:!0,tokenize:f_};function d_(e,t,n){const r=this;return u;function u(l){return e.enter("codeIndented"),Ae(e,a,"linePrefix",5)(l)}function a(l){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(l):n(l)}function i(l){return l===null?c(l):ue(l)?e.attempt(l_,i,c)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||ue(l)?(e.exit("codeFlowValue"),i(l)):(e.consume(l),o)}function c(l){return e.exit("codeIndented"),t(l)}}function f_(e,t,n){const r=this;return u;function u(i){return r.parser.lazy[r.now().line]?n(i):ue(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),u):Ae(e,a,"linePrefix",5)(i)}function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):ue(i)?u(i):n(i)}}const h_={name:"codeText",previous:m_,resolve:p_,tokenize:g_};function p_(e){let t=e.length-4,n=3,r,u;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)u===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(u=r):(r===t||e[r][1].type==="lineEnding")&&(e[u][1].type="codeTextData",r!==u+2&&(e[u][1].end=e[r-1][1].end,e.splice(u+2,r-u-2),t-=r-u-2,r=u+2),u=void 0);return e}function m_(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function g_(e,t,n){let r=0,u,a;return i;function i(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),r++,o):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(a=e.enter("codeTextSequence"),u=0,h(f)):ue(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||ue(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),l)}function h(f){return f===96?(e.consume(f),u++,h):u===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",l(f))}}class b_{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const u=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return r&&Or(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Or(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Or(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Or(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Or(this.left,n.reverse())}}}function Or(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function j0(e){const t={};let n=-1,r,u,a,i,o,c,l;const h=new b_(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,__(h,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,u=void 0;a--;)if(i=h.get(a),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank")i[0]==="enter"&&(u&&(h.get(u)[1].type="lineEndingBlank"),i[1].type="lineEnding",u=a);else if(!(i[1].type==="linePrefix"||i[1].type==="listItemIndent"))break;u&&(r[1].end={...h.get(u)[1].start},o=h.slice(u,n),o.unshift(r),h.splice(u,n-u+1,o))}}return Ft(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!l}function __(e,t){const n=e.get(t)[1],r=e.get(t)[2];let u=t-1;const a=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const o=i.events,c=[],l={};let h,f,m=-1,p=n,g=0,x=0;const C=[x];for(;p;){for(;e.get(++u)[1]!==p;);a.push(u),p._tokenizer||(h=r.sliceStream(p),p.next||h.push(null),f&&i.defineSkip(p.start),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(h),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++m<o.length;)o[m][0]==="exit"&&o[m-1][0]==="enter"&&o[m][1].type===o[m-1][1].type&&o[m][1].start.line!==o[m][1].end.line&&(x=m+1,C.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(i.events=[],p?(p._tokenizer=void 0,p.previous=void 0):C.pop(),m=C.length;m--;){const _=o.slice(C[m],C[m+1]),v=a.pop();c.push([v,v+_.length-1]),e.splice(v,2,_)}for(c.reverse(),m=-1;++m<c.length;)l[g+c[m][0]]=g+c[m][1],g+=c[m][1]-c[m][0]-1;return l}const x_={resolve:E_,tokenize:T_},C_={partial:!0,tokenize:y_};function E_(e){return j0(e),e}function T_(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),u(o)}function u(o){return o===null?a(o):ue(o)?e.check(C_,i,a)(o):(e.consume(o),u)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function i(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,u}}function y_(e,t,n){const r=this;return u;function u(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ae(e,a,"linePrefix")}function a(i){if(i===null||ue(i))return n(i);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function H0(e,t,n,r,u,a,i,o,c){const l=c||Number.POSITIVE_INFINITY;let h=0;return f;function f(_){return _===60?(e.enter(r),e.enter(u),e.enter(a),e.consume(_),e.exit(a),m):_===null||_===32||_===41||Gu(_)?n(_):(e.enter(r),e.enter(i),e.enter(o),e.enter("chunkString",{contentType:"string"}),x(_))}function m(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(u),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(_))}function p(_){return _===62?(e.exit("chunkString"),e.exit(o),m(_)):_===null||_===60||ue(_)?n(_):(e.consume(_),_===92?g:p)}function g(_){return _===60||_===62||_===92?(e.consume(_),p):p(_)}function x(_){return!h&&(_===null||_===41||Be(_))?(e.exit("chunkString"),e.exit(o),e.exit(i),e.exit(r),t(_)):h<l&&_===40?(e.consume(_),h++,x):_===41?(e.consume(_),h--,x):_===null||_===32||_===40||Gu(_)?n(_):(e.consume(_),_===92?C:x)}function C(_){return _===40||_===41||_===92?(e.consume(_),x):x(_)}}function U0(e,t,n,r,u,a){const i=this;let o=0,c;return l;function l(p){return e.enter(r),e.enter(u),e.consume(p),e.exit(u),e.enter(a),h}function h(p){return o>999||p===null||p===91||p===93&&!c||p===94&&!o&&"_hiddenFootnoteSupport"in i.parser.constructs?n(p):p===93?(e.exit(a),e.enter(u),e.consume(p),e.exit(u),e.exit(r),t):ue(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||ue(p)||o++>999?(e.exit("chunkString"),h(p)):(e.consume(p),c||(c=!ye(p)),p===92?m:f)}function m(p){return p===91||p===92||p===93?(e.consume(p),o++,f):f(p)}}function V0(e,t,n,r,u,a){let i;return o;function o(m){return m===34||m===39||m===40?(e.enter(r),e.enter(u),e.consume(m),e.exit(u),i=m===40?41:m,c):n(m)}function c(m){return m===i?(e.enter(u),e.consume(m),e.exit(u),e.exit(r),t):(e.enter(a),l(m))}function l(m){return m===i?(e.exit(a),c(i)):m===null?n(m):ue(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Ae(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===i||m===null||ue(m)?(e.exit("chunkString"),l(m)):(e.consume(m),m===92?f:h)}function f(m){return m===i||m===92?(e.consume(m),h):h(m)}}function zr(e,t){let n;return r;function r(u){return ue(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),n=!0,r):ye(u)?Ae(e,r,n?"linePrefix":"lineSuffix")(u):t(u)}}const k_={name:"definition",tokenize:S_},A_={partial:!0,tokenize:I_};function S_(e,t,n){const r=this;let u;return a;function a(p){return e.enter("definition"),i(p)}function i(p){return U0.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function o(p){return u=Kt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):n(p)}function c(p){return Be(p)?zr(e,l)(p):l(p)}function l(p){return H0(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function h(p){return e.attempt(A_,f,f)(p)}function f(p){return ye(p)?Ae(e,m,"whitespace")(p):m(p)}function m(p){return p===null||ue(p)?(e.exit("definition"),r.parser.defined.push(u),t(p)):n(p)}}function I_(e,t,n){return r;function r(o){return Be(o)?zr(e,u)(o):n(o)}function u(o){return V0(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return ye(o)?Ae(e,i,"whitespace")(o):i(o)}function i(o){return o===null||ue(o)?t(o):n(o)}}const N_={name:"hardBreakEscape",tokenize:v_};function v_(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),u}function u(a){return ue(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const w_={name:"headingAtx",resolve:D_,tokenize:L_};function D_(e,t){let n=e.length-2,r=3,u,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(u={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ft(e,r,n-r+1,[["enter",u,t],["enter",a,t],["exit",a,t],["exit",u,t]])),e}function L_(e,t,n){let r=0;return u;function u(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),i(h)}function i(h){return h===35&&r++<6?(e.consume(h),i):h===null||Be(h)?(e.exit("atxHeadingSequence"),o(h)):n(h)}function o(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||ue(h)?(e.exit("atxHeading"),t(h)):ye(h)?Ae(e,o,"whitespace")(h):(e.enter("atxHeadingText"),l(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),o(h))}function l(h){return h===null||h===35||Be(h)?(e.exit("atxHeadingText"),o(h)):(e.consume(h),l)}}const P_=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Yo=["pre","script","style","textarea"],R_={concrete:!0,name:"htmlFlow",resolveTo:F_,tokenize:B_},O_={partial:!0,tokenize:H_},M_={partial:!0,tokenize:j_};function F_(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function B_(e,t,n){const r=this;let u,a,i,o,c;return l;function l(y){return h(y)}function h(y){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(y),f}function f(y){return y===33?(e.consume(y),m):y===47?(e.consume(y),a=!0,x):y===63?(e.consume(y),u=3,r.interrupt?t:E):xt(y)?(e.consume(y),i=String.fromCharCode(y),C):n(y)}function m(y){return y===45?(e.consume(y),u=2,p):y===91?(e.consume(y),u=5,o=0,g):xt(y)?(e.consume(y),u=4,r.interrupt?t:E):n(y)}function p(y){return y===45?(e.consume(y),r.interrupt?t:E):n(y)}function g(y){const z="CDATA[";return y===z.charCodeAt(o++)?(e.consume(y),o===z.length?r.interrupt?t:F:g):n(y)}function x(y){return xt(y)?(e.consume(y),i=String.fromCharCode(y),C):n(y)}function C(y){if(y===null||y===47||y===62||Be(y)){const z=y===47,re=i.toLowerCase();return!z&&!a&&Yo.includes(re)?(u=1,r.interrupt?t(y):F(y)):P_.includes(i.toLowerCase())?(u=6,z?(e.consume(y),_):r.interrupt?t(y):F(y)):(u=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(y):a?v(y):k(y))}return y===45||ft(y)?(e.consume(y),i+=String.fromCharCode(y),C):n(y)}function _(y){return y===62?(e.consume(y),r.interrupt?t:F):n(y)}function v(y){return ye(y)?(e.consume(y),v):L(y)}function k(y){return y===47?(e.consume(y),L):y===58||y===95||xt(y)?(e.consume(y),D):ye(y)?(e.consume(y),k):L(y)}function D(y){return y===45||y===46||y===58||y===95||ft(y)?(e.consume(y),D):S(y)}function S(y){return y===61?(e.consume(y),I):ye(y)?(e.consume(y),S):k(y)}function I(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),c=y,M):ye(y)?(e.consume(y),I):q(y)}function M(y){return y===c?(e.consume(y),c=null,U):y===null||ue(y)?n(y):(e.consume(y),M)}function q(y){return y===null||y===34||y===39||y===47||y===60||y===61||y===62||y===96||Be(y)?S(y):(e.consume(y),q)}function U(y){return y===47||y===62||ye(y)?k(y):n(y)}function L(y){return y===62?(e.consume(y),j):n(y)}function j(y){return y===null||ue(y)?F(y):ye(y)?(e.consume(y),j):n(y)}function F(y){return y===45&&u===2?(e.consume(y),he):y===60&&u===1?(e.consume(y),Ee):y===62&&u===4?(e.consume(y),Z):y===63&&u===3?(e.consume(y),E):y===93&&u===5?(e.consume(y),ke):ue(y)&&(u===6||u===7)?(e.exit("htmlFlowData"),e.check(O_,ne,Q)(y)):y===null||ue(y)?(e.exit("htmlFlowData"),Q(y)):(e.consume(y),F)}function Q(y){return e.check(M_,ae,ne)(y)}function ae(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),ee}function ee(y){return y===null||ue(y)?Q(y):(e.enter("htmlFlowData"),F(y))}function he(y){return y===45?(e.consume(y),E):F(y)}function Ee(y){return y===47?(e.consume(y),i="",je):F(y)}function je(y){if(y===62){const z=i.toLowerCase();return Yo.includes(z)?(e.consume(y),Z):F(y)}return xt(y)&&i.length<8?(e.consume(y),i+=String.fromCharCode(y),je):F(y)}function ke(y){return y===93?(e.consume(y),E):F(y)}function E(y){return y===62?(e.consume(y),Z):y===45&&u===2?(e.consume(y),E):F(y)}function Z(y){return y===null||ue(y)?(e.exit("htmlFlowData"),ne(y)):(e.consume(y),Z)}function ne(y){return e.exit("htmlFlow"),t(y)}}function j_(e,t,n){const r=this;return u;function u(i){return ue(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a):n(i)}function a(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}function H_(e,t,n){return r;function r(u){return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),e.attempt(mu,t,n)}}const U_={name:"htmlText",tokenize:V_};function V_(e,t,n){const r=this;let u,a,i;return o;function o(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),c}function c(E){return E===33?(e.consume(E),l):E===47?(e.consume(E),S):E===63?(e.consume(E),k):xt(E)?(e.consume(E),q):n(E)}function l(E){return E===45?(e.consume(E),h):E===91?(e.consume(E),a=0,g):xt(E)?(e.consume(E),v):n(E)}function h(E){return E===45?(e.consume(E),p):n(E)}function f(E){return E===null?n(E):E===45?(e.consume(E),m):ue(E)?(i=f,Ee(E)):(e.consume(E),f)}function m(E){return E===45?(e.consume(E),p):f(E)}function p(E){return E===62?he(E):E===45?m(E):f(E)}function g(E){const Z="CDATA[";return E===Z.charCodeAt(a++)?(e.consume(E),a===Z.length?x:g):n(E)}function x(E){return E===null?n(E):E===93?(e.consume(E),C):ue(E)?(i=x,Ee(E)):(e.consume(E),x)}function C(E){return E===93?(e.consume(E),_):x(E)}function _(E){return E===62?he(E):E===93?(e.consume(E),_):x(E)}function v(E){return E===null||E===62?he(E):ue(E)?(i=v,Ee(E)):(e.consume(E),v)}function k(E){return E===null?n(E):E===63?(e.consume(E),D):ue(E)?(i=k,Ee(E)):(e.consume(E),k)}function D(E){return E===62?he(E):k(E)}function S(E){return xt(E)?(e.consume(E),I):n(E)}function I(E){return E===45||ft(E)?(e.consume(E),I):M(E)}function M(E){return ue(E)?(i=M,Ee(E)):ye(E)?(e.consume(E),M):he(E)}function q(E){return E===45||ft(E)?(e.consume(E),q):E===47||E===62||Be(E)?U(E):n(E)}function U(E){return E===47?(e.consume(E),he):E===58||E===95||xt(E)?(e.consume(E),L):ue(E)?(i=U,Ee(E)):ye(E)?(e.consume(E),U):he(E)}function L(E){return E===45||E===46||E===58||E===95||ft(E)?(e.consume(E),L):j(E)}function j(E){return E===61?(e.consume(E),F):ue(E)?(i=j,Ee(E)):ye(E)?(e.consume(E),j):U(E)}function F(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),u=E,Q):ue(E)?(i=F,Ee(E)):ye(E)?(e.consume(E),F):(e.consume(E),ae)}function Q(E){return E===u?(e.consume(E),u=void 0,ee):E===null?n(E):ue(E)?(i=Q,Ee(E)):(e.consume(E),Q)}function ae(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||Be(E)?U(E):(e.consume(E),ae)}function ee(E){return E===47||E===62||Be(E)?U(E):n(E)}function he(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):n(E)}function Ee(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),je}function je(E){return ye(E)?Ae(e,ke,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):ke(E)}function ke(E){return e.enter("htmlTextData"),i(E)}}const gs={name:"labelEnd",resolveAll:Z_,resolveTo:W_,tokenize:Y_},$_={tokenize:G_},z_={tokenize:X_},q_={tokenize:K_};function Z_(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const u=r.type==="labelImage"?4:2;r.type="data",t+=u}}return e.length!==n.length&&Ft(e,0,e.length,n),e}function W_(e,t){let n=e.length,r=0,u,a,i,o;for(;n--;)if(u=e[n][1],a){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;e[n][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(i){if(e[n][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(a=n,u.type!=="labelLink")){r=2;break}}else u.type==="labelEnd"&&(i=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[a][1].start},end:{...e[i][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[i-2][1].start}};return o=[["enter",c,t],["enter",l,t]],o=$t(o,e.slice(a+1,a+r+3)),o=$t(o,[["enter",h,t]]),o=$t(o,Ca(t.parser.constructs.insideSpan.null,e.slice(a+r+4,i-3),t)),o=$t(o,[["exit",h,t],e[i-2],e[i-1],["exit",l,t]]),o=$t(o,e.slice(i+1)),o=$t(o,[["exit",c,t]]),Ft(e,a,e.length,o),e}function Y_(e,t,n){const r=this;let u=r.events.length,a,i;for(;u--;)if((r.events[u][1].type==="labelImage"||r.events[u][1].type==="labelLink")&&!r.events[u][1]._balanced){a=r.events[u][1];break}return o;function o(m){return a?a._inactive?f(m):(i=r.parser.defined.includes(Kt(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),c):n(m)}function c(m){return m===40?e.attempt($_,h,i?h:f)(m):m===91?e.attempt(z_,h,i?l:f)(m):i?h(m):f(m)}function l(m){return e.attempt(q_,h,f)(m)}function h(m){return t(m)}function f(m){return a._balanced=!0,n(m)}}function G_(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),u}function u(f){return Be(f)?zr(e,a)(f):a(f)}function a(f){return f===41?h(f):H0(e,i,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function i(f){return Be(f)?zr(e,c)(f):h(f)}function o(f){return n(f)}function c(f){return f===34||f===39||f===40?V0(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):h(f)}function l(f){return Be(f)?zr(e,h)(f):h(f)}function h(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function X_(e,t,n){const r=this;return u;function u(o){return U0.call(r,e,a,i,"reference","referenceMarker","referenceString")(o)}function a(o){return r.parser.defined.includes(Kt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function i(o){return n(o)}}function K_(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),u}function u(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Q_={name:"labelStartImage",resolveAll:gs.resolveAll,tokenize:J_};function J_(e,t,n){const r=this;return u;function u(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),i):n(o)}function i(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const ex={name:"labelStartLink",resolveAll:gs.resolveAll,tokenize:tx};function tx(e,t,n){const r=this;return u;function u(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),a}function a(i){return i===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(i):t(i)}}const Ka={name:"lineEnding",tokenize:nx};function nx(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ae(e,t,"linePrefix")}}const Uu={name:"thematicBreak",tokenize:rx};function rx(e,t,n){let r=0,u;return a;function a(l){return e.enter("thematicBreak"),i(l)}function i(l){return u=l,o(l)}function o(l){return l===u?(e.enter("thematicBreakSequence"),c(l)):r>=3&&(l===null||ue(l))?(e.exit("thematicBreak"),t(l)):n(l)}function c(l){return l===u?(e.consume(l),r++,c):(e.exit("thematicBreakSequence"),ye(l)?Ae(e,o,"whitespace")(l):o(l))}}const At={continuation:{tokenize:sx},exit:cx,name:"list",tokenize:ix},ux={partial:!0,tokenize:lx},ax={partial:!0,tokenize:ox};function ix(e,t,n){const r=this,u=r.events[r.events.length-1];let a=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,i=0;return o;function o(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:wi(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Uu,n,l)(p):l(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return n(p)}function c(p){return wi(p)&&++i<10?(e.consume(p),c):(!r.interrupt||i<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):n(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(mu,r.interrupt?n:h,e.attempt(ux,m,f))}function h(p){return r.containerState.initialBlankLine=!0,a++,m(p)}function f(p){return ye(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),m):n(p)}function m(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function sx(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(mu,u,a);function u(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ae(e,t,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!ye(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ax,t,i)(o))}function i(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ae(e,e.attempt(At,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function ox(e,t,n){const r=this;return Ae(e,u,"listItemIndent",r.containerState.size+1);function u(a){const i=r.events[r.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(a):n(a)}}function cx(e){e.exit(this.containerState.type)}function lx(e,t,n){const r=this;return Ae(e,u,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(a){const i=r.events[r.events.length-1];return!ye(a)&&i&&i[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Go={name:"setextUnderline",resolveTo:dx,tokenize:fx};function dx(e,t){let n=e.length,r,u,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(u=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const i={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[u][1].type="setextHeadingText",a?(e.splice(u,0,["enter",i,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=i,e.push(["exit",i,t]),e}function fx(e,t,n){const r=this;let u;return a;function a(l){let h=r.events.length,f;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){f=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),u=l,i(l)):n(l)}function i(l){return e.enter("setextHeadingLineSequence"),o(l)}function o(l){return l===u?(e.consume(l),o):(e.exit("setextHeadingLineSequence"),ye(l)?Ae(e,c,"lineSuffix")(l):c(l))}function c(l){return l===null||ue(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const hx={tokenize:px};function px(e){const t=this,n=e.attempt(mu,r,e.attempt(this.parser.constructs.flowInitial,u,Ae(e,e.attempt(this.parser.constructs.flow,u,e.attempt(x_,u)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function u(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const mx={resolveAll:z0()},gx=$0("string"),bx=$0("text");function $0(e){return{resolveAll:z0(e==="text"?_x:void 0),tokenize:t};function t(n){const r=this,u=this.parser.constructs[e],a=n.attempt(u,i,o);return i;function i(h){return l(h)?a(h):o(h)}function o(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return l(h)?(n.exit("data"),a(h)):(n.consume(h),c)}function l(h){if(h===null)return!0;const f=u[h];let m=-1;if(f)for(;++m<f.length;){const p=f[m];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function z0(e){return t;function t(n,r){let u=-1,a;for(;++u<=n.length;)a===void 0?n[u]&&n[u][1].type==="data"&&(a=u,u++):(!n[u]||n[u][1].type!=="data")&&(u!==a+2&&(n[a][1].end=n[u-1][1].end,n.splice(a+2,u-a-2),u=a+2),a=void 0);return e?e(n,r):n}}function _x(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],u=t.sliceStream(r);let a=u.length,i=-1,o=0,c;for(;a--;){const l=u[a];if(typeof l=="string"){for(i=l.length;l.charCodeAt(i-1)===32;)o++,i--;if(i)break;i=-1}else if(l===-2)c=!0,o++;else if(l!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const l={type:n===e.length||c||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?i:r.start._bufferIndex+i,_index:r.start._index+a,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const xx={42:At,43:At,45:At,48:At,49:At,50:At,51:At,52:At,53:At,54:At,55:At,56:At,57:At,62:M0},Cx={91:k_},Ex={[-2]:Xa,[-1]:Xa,32:Xa},Tx={35:w_,42:Uu,45:[Go,Uu],60:R_,61:Go,95:Uu,96:Wo,126:Wo},yx={38:B0,92:F0},kx={[-5]:Ka,[-4]:Ka,[-3]:Ka,33:Q_,38:B0,42:Di,60:[e_,U_],91:ex,92:[N_,F0],93:gs,95:Di,96:h_},Ax={null:[Di,mx]},Sx={null:[42,95]},Ix={null:[]},Nx=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Sx,contentInitial:Cx,disable:Ix,document:xx,flow:Tx,flowInitial:Ex,insideSpan:Ax,string:yx,text:kx},Symbol.toStringTag,{value:"Module"}));function vx(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const u={},a=[];let i=[],o=[];const c={attempt:M(S),check:M(I),consume:v,enter:k,exit:D,interrupt:M(I,{interrupt:!0})},l={code:null,containerState:{},defineSkip:x,events:[],now:g,parser:e,previous:null,sliceSerialize:m,sliceStream:p,write:f};let h=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function f(j){return i=$t(i,j),C(),i[i.length-1]!==null?[]:(q(t,0),l.events=Ca(a,l.events,l),l.events)}function m(j,F){return Dx(p(j),F)}function p(j){return wx(i,j)}function g(){const{_bufferIndex:j,_index:F,line:Q,column:ae,offset:ee}=r;return{_bufferIndex:j,_index:F,line:Q,column:ae,offset:ee}}function x(j){u[j.line]=j.column,L()}function C(){let j;for(;r._index<i.length;){const F=i[r._index];if(typeof F=="string")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<F.length;)_(F.charCodeAt(r._bufferIndex));else _(F)}}function _(j){h=h(j)}function v(j){ue(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,L()):j!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=j}function k(j,F){const Q=F||{};return Q.type=j,Q.start=g(),l.events.push(["enter",Q,l]),o.push(Q),Q}function D(j){const F=o.pop();return F.end=g(),l.events.push(["exit",F,l]),F}function S(j,F){q(j,F.from)}function I(j,F){F.restore()}function M(j,F){return Q;function Q(ae,ee,he){let Ee,je,ke,E;return Array.isArray(ae)?ne(ae):"tokenize"in ae?ne([ae]):Z(ae);function Z(J){return ie;function ie(te){const oe=te!==null&&J[te],ce=te!==null&&J.null,Pe=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(ce)?ce:ce?[ce]:[]];return ne(Pe)(te)}}function ne(J){return Ee=J,je=0,J.length===0?he:y(J[je])}function y(J){return ie;function ie(te){return E=U(),ke=J,J.partial||(l.currentConstruct=J),J.name&&l.parser.constructs.disable.null.includes(J.name)?re():J.tokenize.call(F?Object.assign(Object.create(l),F):l,c,z,re)(te)}}function z(J){return j(ke,E),ee}function re(J){return E.restore(),++je<Ee.length?y(Ee[je]):he}}}function q(j,F){j.resolveAll&&!a.includes(j)&&a.push(j),j.resolve&&Ft(l.events,F,l.events.length-F,j.resolve(l.events.slice(F),l)),j.resolveTo&&(l.events=j.resolveTo(l.events,l))}function U(){const j=g(),F=l.previous,Q=l.currentConstruct,ae=l.events.length,ee=Array.from(o);return{from:ae,restore:he};function he(){r=j,l.previous=F,l.currentConstruct=Q,l.events.length=ae,o=ee,L()}}function L(){r.line in u&&r.column<2&&(r.column=u[r.line],r.offset+=u[r.line]-1)}}function wx(e,t){const n=t.start._index,r=t.start._bufferIndex,u=t.end._index,a=t.end._bufferIndex;let i;if(n===u)i=[e[n].slice(r,a)];else{if(i=e.slice(n,u),r>-1){const o=i[0];typeof o=="string"?i[0]=o.slice(r):i.shift()}a>0&&i.push(e[u].slice(0,a))}return i}function Dx(e,t){let n=-1;const r=[];let u;for(;++n<e.length;){const a=e[n];let i;if(typeof a=="string")i=a;else switch(a){case-5:{i="\r";break}case-4:{i=`
81
81
  `;break}case-3:{i=`\r
82
- `;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&u)continue;i=" ";break}default:i=String.fromCharCode(a)}u=a===-2,r.push(i)}return r.join("")}function Dx(e){const r={constructs:R0([Ix,...(e||{}).extensions||[]]),content:u(Zb),defined:[],document:u(Yb),flow:u(fx),lazy:{},string:u(mx),text:u(gx)};return r;function u(a){return i;function i(o){return Nx(r,a,o)}}}function Lx(e){for(;!j0(e););return e}const Xo=/[\0\t\n\r]/g;function Px(){let e=1,t="",n=!0,r;return u;function u(a,i,o){const c=[];let l,h,f,m,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(i||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(Xo.lastIndex=f,l=Xo.exec(a),m=l&&l.index!==void 0?l.index:a.length,p=a.charCodeAt(m),!l){t=a.slice(f);break}if(p===10&&f===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<m&&(c.push(a.slice(f,m)),e+=m-f),p){case 0:{c.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}f=m+1}return o&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Rx=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ox(e){return e.replace(Rx,Mx)}function Mx(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const u=n.charCodeAt(1),a=u===120||u===88;return O0(n.slice(a?2:1),a?16:10)}return ms(n)||e}const q0={}.hasOwnProperty;function Fx(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Bx(n)(Lx(Dx(n).document().write(Px()(e,t,!0))))}function Bx(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Re),autolinkProtocol:U,autolinkEmail:U,atxHeading:a(K),blockQuote:a(ce),characterEscape:U,characterReference:U,codeFenced:a(Pe),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:a(Pe,i),codeText:a(H,i),codeTextData:U,data:U,codeFlowValue:U,definition:a(Te),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:a(G),hardBreakEscape:a(Fe),hardBreakTrailing:a(Fe),htmlFlow:a(tt,i),htmlFlowData:U,htmlText:a(tt,i),htmlTextData:U,image:a(ot),label:i,link:a(Re),listItem:a(Ct),listItemValue:m,listOrdered:a(Ne,f),listUnordered:a(Ne),paragraph:a(mt),reference:y,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:a(K),strong:a(jt),thematicBreak:a(tn)},exit:{atxHeading:c(),atxHeadingSequence:S,autolink:c(),autolinkEmail:oe,autolinkProtocol:te,blockQuote:c(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:J,characterReference:ie,codeFenced:c(C),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:L,codeIndented:c(_),codeText:c(ee),codeTextData:L,data:L,definition:c(),definitionDestinationString:D,definitionLabelString:v,definitionTitleString:k,emphasis:c(),hardBreakEscape:c(F),hardBreakTrailing:c(F),htmlFlow:c(Q),htmlFlowData:L,htmlText:c(ae),htmlTextData:L,image:c(Ee),label:ke,labelText:je,lineEnding:j,link:c(he),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:z,resourceDestinationString:E,resourceTitleString:Z,resource:ne,setextHeading:c(q),setextHeadingLineSequence:M,setextHeadingText:I,strong:c(),thematicBreak:c()}};Z0(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(B){let X={type:"root",children:[]};const le={stack:[X],tokenStack:[],config:t,enter:o,exit:l,buffer:i,resume:h,data:n},_e=[];let Oe=-1;for(;++Oe<B.length;)if(B[Oe][1].type==="listOrdered"||B[Oe][1].type==="listUnordered")if(B[Oe][0]==="enter")_e.push(Oe);else{const wt=_e.pop();Oe=u(B,wt,Oe)}for(Oe=-1;++Oe<B.length;){const wt=t[B[Oe][0]];q0.call(wt,B[Oe][1].type)&&wt[B[Oe][1].type].call(Object.assign({sliceSerialize:B[Oe][2].sliceSerialize},le),B[Oe][1])}if(le.tokenStack.length>0){const wt=le.tokenStack[le.tokenStack.length-1];(wt[1]||Ko).call(le,void 0,wt[0])}for(X.position={start:An(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:An(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},Oe=-1;++Oe<t.transforms.length;)X=t.transforms[Oe](X)||X;return X}function u(B,X,le){let _e=X-1,Oe=-1,wt=!1,pn,ct,mn,Vn;for(;++_e<=le;){const Dt=B[_e];switch(Dt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Dt[0]==="enter"?Oe++:Oe--,Vn=void 0;break}case"lineEndingBlank":{Dt[0]==="enter"&&(pn&&!Vn&&!Oe&&!mn&&(mn=_e),Vn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Vn=void 0}if(!Oe&&Dt[0]==="enter"&&Dt[1].type==="listItemPrefix"||Oe===-1&&Dt[0]==="exit"&&(Dt[1].type==="listUnordered"||Dt[1].type==="listOrdered")){if(pn){let ur=_e;for(ct=void 0;ur--;){const gn=B[ur];if(gn[1].type==="lineEnding"||gn[1].type==="lineEndingBlank"){if(gn[0]==="exit")continue;ct&&(B[ct][1].type="lineEndingBlank",wt=!0),gn[1].type="lineEnding",ct=ur}else if(!(gn[1].type==="linePrefix"||gn[1].type==="blockQuotePrefix"||gn[1].type==="blockQuotePrefixWhitespace"||gn[1].type==="blockQuoteMarker"||gn[1].type==="listItemIndent"))break}mn&&(!ct||mn<ct)&&(pn._spread=!0),pn.end=Object.assign({},ct?B[ct][1].start:Dt[1].end),B.splice(ct||_e,0,["exit",pn,Dt[2]]),_e++,le++}if(Dt[1].type==="listItemPrefix"){const ur={type:"listItem",_spread:!1,start:Object.assign({},Dt[1].start),end:void 0};pn=ur,B.splice(_e,0,["enter",ur,Dt[2]]),_e++,le++,mn=void 0,Vn=!0}}}return B[X][1]._spread=wt,le}function a(B,X){return le;function le(_e){o.call(this,B(_e),_e),X&&X.call(this,_e)}}function i(){this.stack.push({type:"fragment",children:[]})}function o(B,X,le){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([X,le||void 0]),B.position={start:An(X.start),end:void 0}}function c(B){return X;function X(le){B&&B.call(this,le),l.call(this,le)}}function l(B,X){const le=this.stack.pop(),_e=this.tokenStack.pop();if(_e)_e[0].type!==B.type&&(X?X.call(this,B,_e[0]):(_e[1]||Ko).call(this,B,_e[0]));else throw new Error("Cannot close `"+B.type+"` ("+$r({start:B.start,end:B.end})+"): it’s not open");le.position.end=An(B.end)}function h(){return ps(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function m(B){if(this.data.expectingFirstListItemValue){const X=this.stack[this.stack.length-2];X.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function p(){const B=this.resume(),X=this.stack[this.stack.length-1];X.lang=B}function g(){const B=this.resume(),X=this.stack[this.stack.length-1];X.meta=B}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const B=this.resume(),X=this.stack[this.stack.length-1];X.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const B=this.resume(),X=this.stack[this.stack.length-1];X.value=B.replace(/(\r?\n|\r)$/g,"")}function v(B){const X=this.resume(),le=this.stack[this.stack.length-1];le.label=X,le.identifier=Kt(this.sliceSerialize(B)).toLowerCase()}function k(){const B=this.resume(),X=this.stack[this.stack.length-1];X.title=B}function D(){const B=this.resume(),X=this.stack[this.stack.length-1];X.url=B}function S(B){const X=this.stack[this.stack.length-1];if(!X.depth){const le=this.sliceSerialize(B).length;X.depth=le}}function I(){this.data.setextHeadingSlurpLineEnding=!0}function M(B){const X=this.stack[this.stack.length-1];X.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function U(B){const le=this.stack[this.stack.length-1].children;let _e=le[le.length-1];(!_e||_e.type!=="text")&&(_e=Yt(),_e.position={start:An(B.start),end:void 0},le.push(_e)),this.stack.push(_e)}function L(B){const X=this.stack.pop();X.value+=this.sliceSerialize(B),X.position.end=An(B.end)}function j(B){const X=this.stack[this.stack.length-1];if(this.data.atHardBreak){const le=X.children[X.children.length-1];le.position.end=An(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(X.type)&&(U.call(this,B),L.call(this,B))}function F(){this.data.atHardBreak=!0}function Q(){const B=this.resume(),X=this.stack[this.stack.length-1];X.value=B}function ae(){const B=this.resume(),X=this.stack[this.stack.length-1];X.value=B}function ee(){const B=this.resume(),X=this.stack[this.stack.length-1];X.value=B}function he(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=X,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function Ee(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=X,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function je(B){const X=this.sliceSerialize(B),le=this.stack[this.stack.length-2];le.label=Ox(X),le.identifier=Kt(X).toLowerCase()}function ke(){const B=this.stack[this.stack.length-1],X=this.resume(),le=this.stack[this.stack.length-1];if(this.data.inReference=!0,le.type==="link"){const _e=B.children;le.children=_e}else le.alt=X}function E(){const B=this.resume(),X=this.stack[this.stack.length-1];X.url=B}function Z(){const B=this.resume(),X=this.stack[this.stack.length-1];X.title=B}function ne(){this.data.inReference=void 0}function y(){this.data.referenceType="collapsed"}function z(B){const X=this.resume(),le=this.stack[this.stack.length-1];le.label=X,le.identifier=Kt(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function re(B){this.data.characterReferenceType=B.type}function J(B){const X=this.sliceSerialize(B),le=this.data.characterReferenceType;let _e;le?(_e=O0(X,le==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_e=ms(X);const Oe=this.stack[this.stack.length-1];Oe.value+=_e}function ie(B){const X=this.stack.pop();X.position.end=An(B.end)}function te(B){L.call(this,B);const X=this.stack[this.stack.length-1];X.url=this.sliceSerialize(B)}function oe(B){L.call(this,B);const X=this.stack[this.stack.length-1];X.url="mailto:"+this.sliceSerialize(B)}function ce(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function H(){return{type:"inlineCode",value:""}}function Te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function G(){return{type:"emphasis",children:[]}}function K(){return{type:"heading",depth:0,children:[]}}function Fe(){return{type:"break"}}function tt(){return{type:"html",value:""}}function ot(){return{type:"image",title:null,url:"",alt:null}}function Re(){return{type:"link",title:null,url:"",children:[]}}function Ne(B){return{type:"list",ordered:B.type==="listOrdered",start:null,spread:B._spread,children:[]}}function Ct(B){return{type:"listItem",spread:B._spread,checked:null,children:[]}}function mt(){return{type:"paragraph",children:[]}}function jt(){return{type:"strong",children:[]}}function Yt(){return{type:"text",value:""}}function tn(){return{type:"thematicBreak"}}}function An(e){return{line:e.line,column:e.column,offset:e.offset}}function Z0(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Z0(e,r):jx(e,r)}}function jx(e,t){let n;for(n in t)if(q0.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ko(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+$r({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+$r({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+$r({start:t.start,end:t.end})+") is still open")}function Hx(e){const t=this;t.parser=n;function n(r){return Fx(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Ux(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Vx(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
83
- `}]}function $x(e,t){const n=t.value?t.value+`
84
- `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let u={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(u.data={meta:t.meta}),e.patch(t,u),u=e.applyData(t,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(t,u),u}function zx(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qx(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Zx(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),u=Ir(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let i,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=a+1,o+=1,e.footnoteCounts.set(r,o);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+u,id:n+"fnref-"+u+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,c);const l={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Wx(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Yx(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function W0(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const u=e.all(t),a=u[0];a&&a.type==="text"?a.value="["+a.value:u.unshift({type:"text",value:"["});const i=u[u.length-1];return i&&i.type==="text"?i.value+=r:u.push({type:"text",value:r}),u}function Gx(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return W0(e,t);const u={src:Ir(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(u.title=r.title);const a={type:"element",tagName:"img",properties:u,children:[]};return e.patch(t,a),e.applyData(t,a)}function Xx(e,t){const n={src:Ir(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Kx(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Qx(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return W0(e,t);const u={href:Ir(r.url||"")};r.title!==null&&r.title!==void 0&&(u.title=r.title);const a={type:"element",tagName:"a",properties:u,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Jx(e,t){const n={href:Ir(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function eC(e,t,n){const r=e.all(t),u=n?tC(n):Y0(t),a={},i=[];if(typeof t.checked=="boolean"){const h=r[0];let f;h&&h.type==="element"&&h.tagName==="p"?f=h:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const h=r[o];(u||o!==0||h.type!=="element"||h.tagName!=="p")&&i.push({type:"text",value:`
82
+ `;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&u)continue;i=" ";break}default:i=String.fromCharCode(a)}u=a===-2,r.push(i)}return r.join("")}function Lx(e){const r={constructs:R0([Nx,...(e||{}).extensions||[]]),content:u(Wb),defined:[],document:u(Gb),flow:u(hx),lazy:{},string:u(gx),text:u(bx)};return r;function u(a){return i;function i(o){return vx(r,a,o)}}}function Px(e){for(;!j0(e););return e}const Xo=/[\0\t\n\r]/g;function Rx(){let e=1,t="",n=!0,r;return u;function u(a,i,o){const c=[];let l,h,f,m,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(i||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(Xo.lastIndex=f,l=Xo.exec(a),m=l&&l.index!==void 0?l.index:a.length,p=a.charCodeAt(m),!l){t=a.slice(f);break}if(p===10&&f===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<m&&(c.push(a.slice(f,m)),e+=m-f),p){case 0:{c.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}f=m+1}return o&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Ox=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Mx(e){return e.replace(Ox,Fx)}function Fx(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const u=n.charCodeAt(1),a=u===120||u===88;return O0(n.slice(a?2:1),a?16:10)}return ms(n)||e}const q0={}.hasOwnProperty;function Bx(e,t,n){return typeof t!="string"&&(n=t,t=void 0),jx(n)(Px(Lx(n).document().write(Rx()(e,t,!0))))}function jx(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Re),autolinkProtocol:U,autolinkEmail:U,atxHeading:a(K),blockQuote:a(ce),characterEscape:U,characterReference:U,codeFenced:a(Pe),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:a(Pe,i),codeText:a(H,i),codeTextData:U,data:U,codeFlowValue:U,definition:a(Te),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:a(G),hardBreakEscape:a(Fe),hardBreakTrailing:a(Fe),htmlFlow:a(tt,i),htmlFlowData:U,htmlText:a(tt,i),htmlTextData:U,image:a(ot),label:i,link:a(Re),listItem:a(Ct),listItemValue:m,listOrdered:a(Ne,f),listUnordered:a(Ne),paragraph:a(mt),reference:y,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:a(K),strong:a(jt),thematicBreak:a(tn)},exit:{atxHeading:c(),atxHeadingSequence:S,autolink:c(),autolinkEmail:oe,autolinkProtocol:te,blockQuote:c(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:J,characterReference:ie,codeFenced:c(C),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:L,codeIndented:c(_),codeText:c(ee),codeTextData:L,data:L,definition:c(),definitionDestinationString:D,definitionLabelString:v,definitionTitleString:k,emphasis:c(),hardBreakEscape:c(F),hardBreakTrailing:c(F),htmlFlow:c(Q),htmlFlowData:L,htmlText:c(ae),htmlTextData:L,image:c(Ee),label:ke,labelText:je,lineEnding:j,link:c(he),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:z,resourceDestinationString:E,resourceTitleString:Z,resource:ne,setextHeading:c(q),setextHeadingLineSequence:M,setextHeadingText:I,strong:c(),thematicBreak:c()}};Z0(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(B){let X={type:"root",children:[]};const le={stack:[X],tokenStack:[],config:t,enter:o,exit:l,buffer:i,resume:h,data:n},_e=[];let Oe=-1;for(;++Oe<B.length;)if(B[Oe][1].type==="listOrdered"||B[Oe][1].type==="listUnordered")if(B[Oe][0]==="enter")_e.push(Oe);else{const wt=_e.pop();Oe=u(B,wt,Oe)}for(Oe=-1;++Oe<B.length;){const wt=t[B[Oe][0]];q0.call(wt,B[Oe][1].type)&&wt[B[Oe][1].type].call(Object.assign({sliceSerialize:B[Oe][2].sliceSerialize},le),B[Oe][1])}if(le.tokenStack.length>0){const wt=le.tokenStack[le.tokenStack.length-1];(wt[1]||Ko).call(le,void 0,wt[0])}for(X.position={start:An(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:An(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},Oe=-1;++Oe<t.transforms.length;)X=t.transforms[Oe](X)||X;return X}function u(B,X,le){let _e=X-1,Oe=-1,wt=!1,pn,ct,mn,Vn;for(;++_e<=le;){const Dt=B[_e];switch(Dt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Dt[0]==="enter"?Oe++:Oe--,Vn=void 0;break}case"lineEndingBlank":{Dt[0]==="enter"&&(pn&&!Vn&&!Oe&&!mn&&(mn=_e),Vn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Vn=void 0}if(!Oe&&Dt[0]==="enter"&&Dt[1].type==="listItemPrefix"||Oe===-1&&Dt[0]==="exit"&&(Dt[1].type==="listUnordered"||Dt[1].type==="listOrdered")){if(pn){let ur=_e;for(ct=void 0;ur--;){const gn=B[ur];if(gn[1].type==="lineEnding"||gn[1].type==="lineEndingBlank"){if(gn[0]==="exit")continue;ct&&(B[ct][1].type="lineEndingBlank",wt=!0),gn[1].type="lineEnding",ct=ur}else if(!(gn[1].type==="linePrefix"||gn[1].type==="blockQuotePrefix"||gn[1].type==="blockQuotePrefixWhitespace"||gn[1].type==="blockQuoteMarker"||gn[1].type==="listItemIndent"))break}mn&&(!ct||mn<ct)&&(pn._spread=!0),pn.end=Object.assign({},ct?B[ct][1].start:Dt[1].end),B.splice(ct||_e,0,["exit",pn,Dt[2]]),_e++,le++}if(Dt[1].type==="listItemPrefix"){const ur={type:"listItem",_spread:!1,start:Object.assign({},Dt[1].start),end:void 0};pn=ur,B.splice(_e,0,["enter",ur,Dt[2]]),_e++,le++,mn=void 0,Vn=!0}}}return B[X][1]._spread=wt,le}function a(B,X){return le;function le(_e){o.call(this,B(_e),_e),X&&X.call(this,_e)}}function i(){this.stack.push({type:"fragment",children:[]})}function o(B,X,le){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([X,le||void 0]),B.position={start:An(X.start),end:void 0}}function c(B){return X;function X(le){B&&B.call(this,le),l.call(this,le)}}function l(B,X){const le=this.stack.pop(),_e=this.tokenStack.pop();if(_e)_e[0].type!==B.type&&(X?X.call(this,B,_e[0]):(_e[1]||Ko).call(this,B,_e[0]));else throw new Error("Cannot close `"+B.type+"` ("+$r({start:B.start,end:B.end})+"): it’s not open");le.position.end=An(B.end)}function h(){return ps(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function m(B){if(this.data.expectingFirstListItemValue){const X=this.stack[this.stack.length-2];X.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function p(){const B=this.resume(),X=this.stack[this.stack.length-1];X.lang=B}function g(){const B=this.resume(),X=this.stack[this.stack.length-1];X.meta=B}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const B=this.resume(),X=this.stack[this.stack.length-1];X.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const B=this.resume(),X=this.stack[this.stack.length-1];X.value=B.replace(/(\r?\n|\r)$/g,"")}function v(B){const X=this.resume(),le=this.stack[this.stack.length-1];le.label=X,le.identifier=Kt(this.sliceSerialize(B)).toLowerCase()}function k(){const B=this.resume(),X=this.stack[this.stack.length-1];X.title=B}function D(){const B=this.resume(),X=this.stack[this.stack.length-1];X.url=B}function S(B){const X=this.stack[this.stack.length-1];if(!X.depth){const le=this.sliceSerialize(B).length;X.depth=le}}function I(){this.data.setextHeadingSlurpLineEnding=!0}function M(B){const X=this.stack[this.stack.length-1];X.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function U(B){const le=this.stack[this.stack.length-1].children;let _e=le[le.length-1];(!_e||_e.type!=="text")&&(_e=Yt(),_e.position={start:An(B.start),end:void 0},le.push(_e)),this.stack.push(_e)}function L(B){const X=this.stack.pop();X.value+=this.sliceSerialize(B),X.position.end=An(B.end)}function j(B){const X=this.stack[this.stack.length-1];if(this.data.atHardBreak){const le=X.children[X.children.length-1];le.position.end=An(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(X.type)&&(U.call(this,B),L.call(this,B))}function F(){this.data.atHardBreak=!0}function Q(){const B=this.resume(),X=this.stack[this.stack.length-1];X.value=B}function ae(){const B=this.resume(),X=this.stack[this.stack.length-1];X.value=B}function ee(){const B=this.resume(),X=this.stack[this.stack.length-1];X.value=B}function he(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=X,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function Ee(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=X,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function je(B){const X=this.sliceSerialize(B),le=this.stack[this.stack.length-2];le.label=Mx(X),le.identifier=Kt(X).toLowerCase()}function ke(){const B=this.stack[this.stack.length-1],X=this.resume(),le=this.stack[this.stack.length-1];if(this.data.inReference=!0,le.type==="link"){const _e=B.children;le.children=_e}else le.alt=X}function E(){const B=this.resume(),X=this.stack[this.stack.length-1];X.url=B}function Z(){const B=this.resume(),X=this.stack[this.stack.length-1];X.title=B}function ne(){this.data.inReference=void 0}function y(){this.data.referenceType="collapsed"}function z(B){const X=this.resume(),le=this.stack[this.stack.length-1];le.label=X,le.identifier=Kt(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function re(B){this.data.characterReferenceType=B.type}function J(B){const X=this.sliceSerialize(B),le=this.data.characterReferenceType;let _e;le?(_e=O0(X,le==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_e=ms(X);const Oe=this.stack[this.stack.length-1];Oe.value+=_e}function ie(B){const X=this.stack.pop();X.position.end=An(B.end)}function te(B){L.call(this,B);const X=this.stack[this.stack.length-1];X.url=this.sliceSerialize(B)}function oe(B){L.call(this,B);const X=this.stack[this.stack.length-1];X.url="mailto:"+this.sliceSerialize(B)}function ce(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function H(){return{type:"inlineCode",value:""}}function Te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function G(){return{type:"emphasis",children:[]}}function K(){return{type:"heading",depth:0,children:[]}}function Fe(){return{type:"break"}}function tt(){return{type:"html",value:""}}function ot(){return{type:"image",title:null,url:"",alt:null}}function Re(){return{type:"link",title:null,url:"",children:[]}}function Ne(B){return{type:"list",ordered:B.type==="listOrdered",start:null,spread:B._spread,children:[]}}function Ct(B){return{type:"listItem",spread:B._spread,checked:null,children:[]}}function mt(){return{type:"paragraph",children:[]}}function jt(){return{type:"strong",children:[]}}function Yt(){return{type:"text",value:""}}function tn(){return{type:"thematicBreak"}}}function An(e){return{line:e.line,column:e.column,offset:e.offset}}function Z0(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Z0(e,r):Hx(e,r)}}function Hx(e,t){let n;for(n in t)if(q0.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ko(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+$r({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+$r({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+$r({start:t.start,end:t.end})+") is still open")}function Ux(e){const t=this;t.parser=n;function n(r){return Bx(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Vx(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function $x(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
83
+ `}]}function zx(e,t){const n=t.value?t.value+`
84
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let u={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(u.data={meta:t.meta}),e.patch(t,u),u=e.applyData(t,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(t,u),u}function qx(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Zx(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Wx(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),u=Ir(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let i,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=a+1,o+=1,e.footnoteCounts.set(r,o);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+u,id:n+"fnref-"+u+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,c);const l={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Yx(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Gx(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function W0(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const u=e.all(t),a=u[0];a&&a.type==="text"?a.value="["+a.value:u.unshift({type:"text",value:"["});const i=u[u.length-1];return i&&i.type==="text"?i.value+=r:u.push({type:"text",value:r}),u}function Xx(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return W0(e,t);const u={src:Ir(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(u.title=r.title);const a={type:"element",tagName:"img",properties:u,children:[]};return e.patch(t,a),e.applyData(t,a)}function Kx(e,t){const n={src:Ir(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Qx(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Jx(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return W0(e,t);const u={href:Ir(r.url||"")};r.title!==null&&r.title!==void 0&&(u.title=r.title);const a={type:"element",tagName:"a",properties:u,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function eC(e,t){const n={href:Ir(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function tC(e,t,n){const r=e.all(t),u=n?nC(n):Y0(t),a={},i=[];if(typeof t.checked=="boolean"){const h=r[0];let f;h&&h.type==="element"&&h.tagName==="p"?f=h:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const h=r[o];(u||o!==0||h.type!=="element"||h.tagName!=="p")&&i.push({type:"text",value:`
85
85
  `}),h.type==="element"&&h.tagName==="p"&&!u?i.push(...h.children):i.push(h)}const c=r[r.length-1];c&&(u||c.type!=="element"||c.tagName!=="p")&&i.push({type:"text",value:`
86
- `});const l={type:"element",tagName:"li",properties:a,children:i};return e.patch(t,l),e.applyData(t,l)}function tC(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Y0(n[r])}return t}function Y0(e){const t=e.spread;return t??e.children.length>1}function nC(e,t){const n={},r=e.all(t);let u=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++u<r.length;){const i=r[u];if(i.type==="element"&&i.tagName==="li"&&i.properties&&Array.isArray(i.properties.className)&&i.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function rC(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uC(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function aC(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iC(e,t){const n=e.all(t),r=n.shift(),u=[];if(r){const i={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],i),u.push(i)}if(n.length>0){const i={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=fn(t.children[1]),c=_a(t.children[t.children.length-1]);o&&c&&(i.position={start:o,end:c}),u.push(i)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(u,!0)};return e.patch(t,a),e.applyData(t,a)}function sC(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",i=n&&n.type==="table"?n.align:void 0,o=i?i.length:t.children.length;let c=-1;const l=[];for(;++c<o;){const f=t.children[c],m={},p=i?i[c]:void 0;p&&(m.align=p);let g={type:"element",tagName:a,properties:m,children:[]};f&&(g.children=e.all(f),e.patch(f,g),g=e.applyData(f,g)),l.push(g)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,h),e.applyData(t,h)}function oC(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Qo=9,Jo=32;function cC(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),u=0;const a=[];for(;r;)a.push(ec(t.slice(u,r.index),u>0,!0),r[0]),u=r.index+r[0].length,r=n.exec(t);return a.push(ec(t.slice(u),u>0,!1)),a.join("")}function ec(e,t,n){let r=0,u=e.length;if(t){let a=e.codePointAt(r);for(;a===Qo||a===Jo;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(u-1);for(;a===Qo||a===Jo;)u--,a=e.codePointAt(u-1)}return u>r?e.slice(r,u):""}function lC(e,t){const n={type:"text",value:cC(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function dC(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const fC={blockquote:Ux,break:Vx,code:$x,delete:zx,emphasis:qx,footnoteReference:Zx,heading:Wx,html:Yx,imageReference:Gx,image:Xx,inlineCode:Kx,linkReference:Qx,link:Jx,listItem:eC,list:nC,paragraph:rC,root:uC,strong:aC,table:iC,tableCell:oC,tableRow:sC,text:lC,thematicBreak:dC,toml:Pu,yaml:Pu,definition:Pu,footnoteDefinition:Pu};function Pu(){}const G0=-1,Ea=0,qr=1,Xu=2,bs=3,_s=4,xs=5,Cs=6,X0=7,K0=8,tc=typeof self=="object"?self:globalThis,hC=(e,t)=>{const n=(u,a)=>(e.set(a,u),u),r=u=>{if(e.has(u))return e.get(u);const[a,i]=t[u];switch(a){case Ea:case G0:return n(i,u);case qr:{const o=n([],u);for(const c of i)o.push(r(c));return o}case Xu:{const o=n({},u);for(const[c,l]of i)o[r(c)]=r(l);return o}case bs:return n(new Date(i),u);case _s:{const{source:o,flags:c}=i;return n(new RegExp(o,c),u)}case xs:{const o=n(new Map,u);for(const[c,l]of i)o.set(r(c),r(l));return o}case Cs:{const o=n(new Set,u);for(const c of i)o.add(r(c));return o}case X0:{const{name:o,message:c}=i;return n(new tc[o](c),u)}case K0:return n(BigInt(i),u);case"BigInt":return n(Object(BigInt(i)),u);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:o}=new Uint8Array(i);return n(new DataView(o),i)}}return n(new tc[a](i),u)};return r},nc=e=>hC(new Map,e)(0),sr="",{toString:pC}={},{keys:mC}=Object,Mr=e=>{const t=typeof e;if(t!=="object"||!e)return[Ea,t];const n=pC.call(e).slice(8,-1);switch(n){case"Array":return[qr,sr];case"Object":return[Xu,sr];case"Date":return[bs,sr];case"RegExp":return[_s,sr];case"Map":return[xs,sr];case"Set":return[Cs,sr];case"DataView":return[qr,n]}return n.includes("Array")?[qr,n]:n.includes("Error")?[X0,n]:[Xu,n]},Ru=([e,t])=>e===Ea&&(t==="function"||t==="symbol"),gC=(e,t,n,r)=>{const u=(i,o)=>{const c=r.push(i)-1;return n.set(o,c),c},a=i=>{if(n.has(i))return n.get(i);let[o,c]=Mr(i);switch(o){case Ea:{let h=i;switch(c){case"bigint":o=K0,h=i.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return u([G0],i)}return u([o,h],i)}case qr:{if(c){let m=i;return c==="DataView"?m=new Uint8Array(i.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(i)),u([c,[...m]],i)}const h=[],f=u([o,h],i);for(const m of i)h.push(a(m));return f}case Xu:{if(c)switch(c){case"BigInt":return u([c,i.toString()],i);case"Boolean":case"Number":case"String":return u([c,i.valueOf()],i)}if(t&&"toJSON"in i)return a(i.toJSON());const h=[],f=u([o,h],i);for(const m of mC(i))(e||!Ru(Mr(i[m])))&&h.push([a(m),a(i[m])]);return f}case bs:return u([o,i.toISOString()],i);case _s:{const{source:h,flags:f}=i;return u([o,{source:h,flags:f}],i)}case xs:{const h=[],f=u([o,h],i);for(const[m,p]of i)(e||!(Ru(Mr(m))||Ru(Mr(p))))&&h.push([a(m),a(p)]);return f}case Cs:{const h=[],f=u([o,h],i);for(const m of i)(e||!Ru(Mr(m)))&&h.push(a(m));return f}}const{message:l}=i;return u([o,{name:c,message:l}],i)};return a},rc=(e,{json:t,lossy:n}={})=>{const r=[];return gC(!(t||n),!!t,new Map,r)(e),r},Cr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?nc(rc(e,t)):structuredClone(e):(e,t)=>nc(rc(e,t));function bC(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function _C(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function xC(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||bC,r=e.options.footnoteBackLabel||_C,u=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let c=-1;for(;++c<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[c]);if(!l)continue;const h=e.all(l),f=String(l.identifier).toUpperCase(),m=Ir(f.toLowerCase());let p=0;const g=[],x=e.footnoteCounts.get(f);for(;x!==void 0&&++p<=x;){g.length>0&&g.push({type:"text",value:" "});let v=typeof n=="string"?n:n(c,p);typeof v=="string"&&(v={type:"text",value:v}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,p),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const C=h[h.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const v=C.children[C.children.length-1];v&&v.type==="text"?v.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...g)}else h.push(...g);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(h,!0)};e.patch(l,_),o.push(_)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Cr(i),id:"footnote-label"},children:[{type:"text",value:u}]},{type:"text",value:`
86
+ `});const l={type:"element",tagName:"li",properties:a,children:i};return e.patch(t,l),e.applyData(t,l)}function nC(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Y0(n[r])}return t}function Y0(e){const t=e.spread;return t??e.children.length>1}function rC(e,t){const n={},r=e.all(t);let u=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++u<r.length;){const i=r[u];if(i.type==="element"&&i.tagName==="li"&&i.properties&&Array.isArray(i.properties.className)&&i.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function uC(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aC(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function iC(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sC(e,t){const n=e.all(t),r=n.shift(),u=[];if(r){const i={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],i),u.push(i)}if(n.length>0){const i={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=fn(t.children[1]),c=_a(t.children[t.children.length-1]);o&&c&&(i.position={start:o,end:c}),u.push(i)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(u,!0)};return e.patch(t,a),e.applyData(t,a)}function oC(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",i=n&&n.type==="table"?n.align:void 0,o=i?i.length:t.children.length;let c=-1;const l=[];for(;++c<o;){const f=t.children[c],m={},p=i?i[c]:void 0;p&&(m.align=p);let g={type:"element",tagName:a,properties:m,children:[]};f&&(g.children=e.all(f),e.patch(f,g),g=e.applyData(f,g)),l.push(g)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,h),e.applyData(t,h)}function cC(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Qo=9,Jo=32;function lC(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),u=0;const a=[];for(;r;)a.push(ec(t.slice(u,r.index),u>0,!0),r[0]),u=r.index+r[0].length,r=n.exec(t);return a.push(ec(t.slice(u),u>0,!1)),a.join("")}function ec(e,t,n){let r=0,u=e.length;if(t){let a=e.codePointAt(r);for(;a===Qo||a===Jo;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(u-1);for(;a===Qo||a===Jo;)u--,a=e.codePointAt(u-1)}return u>r?e.slice(r,u):""}function dC(e,t){const n={type:"text",value:lC(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function fC(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const hC={blockquote:Vx,break:$x,code:zx,delete:qx,emphasis:Zx,footnoteReference:Wx,heading:Yx,html:Gx,imageReference:Xx,image:Kx,inlineCode:Qx,linkReference:Jx,link:eC,listItem:tC,list:rC,paragraph:uC,root:aC,strong:iC,table:sC,tableCell:cC,tableRow:oC,text:dC,thematicBreak:fC,toml:Pu,yaml:Pu,definition:Pu,footnoteDefinition:Pu};function Pu(){}const G0=-1,Ea=0,qr=1,Xu=2,bs=3,_s=4,xs=5,Cs=6,X0=7,K0=8,tc=typeof self=="object"?self:globalThis,pC=(e,t)=>{const n=(u,a)=>(e.set(a,u),u),r=u=>{if(e.has(u))return e.get(u);const[a,i]=t[u];switch(a){case Ea:case G0:return n(i,u);case qr:{const o=n([],u);for(const c of i)o.push(r(c));return o}case Xu:{const o=n({},u);for(const[c,l]of i)o[r(c)]=r(l);return o}case bs:return n(new Date(i),u);case _s:{const{source:o,flags:c}=i;return n(new RegExp(o,c),u)}case xs:{const o=n(new Map,u);for(const[c,l]of i)o.set(r(c),r(l));return o}case Cs:{const o=n(new Set,u);for(const c of i)o.add(r(c));return o}case X0:{const{name:o,message:c}=i;return n(new tc[o](c),u)}case K0:return n(BigInt(i),u);case"BigInt":return n(Object(BigInt(i)),u);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:o}=new Uint8Array(i);return n(new DataView(o),i)}}return n(new tc[a](i),u)};return r},nc=e=>pC(new Map,e)(0),sr="",{toString:mC}={},{keys:gC}=Object,Mr=e=>{const t=typeof e;if(t!=="object"||!e)return[Ea,t];const n=mC.call(e).slice(8,-1);switch(n){case"Array":return[qr,sr];case"Object":return[Xu,sr];case"Date":return[bs,sr];case"RegExp":return[_s,sr];case"Map":return[xs,sr];case"Set":return[Cs,sr];case"DataView":return[qr,n]}return n.includes("Array")?[qr,n]:n.includes("Error")?[X0,n]:[Xu,n]},Ru=([e,t])=>e===Ea&&(t==="function"||t==="symbol"),bC=(e,t,n,r)=>{const u=(i,o)=>{const c=r.push(i)-1;return n.set(o,c),c},a=i=>{if(n.has(i))return n.get(i);let[o,c]=Mr(i);switch(o){case Ea:{let h=i;switch(c){case"bigint":o=K0,h=i.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return u([G0],i)}return u([o,h],i)}case qr:{if(c){let m=i;return c==="DataView"?m=new Uint8Array(i.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(i)),u([c,[...m]],i)}const h=[],f=u([o,h],i);for(const m of i)h.push(a(m));return f}case Xu:{if(c)switch(c){case"BigInt":return u([c,i.toString()],i);case"Boolean":case"Number":case"String":return u([c,i.valueOf()],i)}if(t&&"toJSON"in i)return a(i.toJSON());const h=[],f=u([o,h],i);for(const m of gC(i))(e||!Ru(Mr(i[m])))&&h.push([a(m),a(i[m])]);return f}case bs:return u([o,i.toISOString()],i);case _s:{const{source:h,flags:f}=i;return u([o,{source:h,flags:f}],i)}case xs:{const h=[],f=u([o,h],i);for(const[m,p]of i)(e||!(Ru(Mr(m))||Ru(Mr(p))))&&h.push([a(m),a(p)]);return f}case Cs:{const h=[],f=u([o,h],i);for(const m of i)(e||!Ru(Mr(m)))&&h.push(a(m));return f}}const{message:l}=i;return u([o,{name:c,message:l}],i)};return a},rc=(e,{json:t,lossy:n}={})=>{const r=[];return bC(!(t||n),!!t,new Map,r)(e),r},Cr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?nc(rc(e,t)):structuredClone(e):(e,t)=>nc(rc(e,t));function _C(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function xC(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function CC(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||_C,r=e.options.footnoteBackLabel||xC,u=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let c=-1;for(;++c<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[c]);if(!l)continue;const h=e.all(l),f=String(l.identifier).toUpperCase(),m=Ir(f.toLowerCase());let p=0;const g=[],x=e.footnoteCounts.get(f);for(;x!==void 0&&++p<=x;){g.length>0&&g.push({type:"text",value:" "});let v=typeof n=="string"?n:n(c,p);typeof v=="string"&&(v={type:"text",value:v}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,p),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const C=h[h.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const v=C.children[C.children.length-1];v&&v.type==="text"?v.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...g)}else h.push(...g);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(h,!0)};e.patch(l,_),o.push(_)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Cr(i),id:"footnote-label"},children:[{type:"text",value:u}]},{type:"text",value:`
87
87
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
88
- `}]}}const Ta=function(e){if(e==null)return yC;if(typeof e=="function")return ya(e);if(typeof e=="object")return Array.isArray(e)?CC(e):EC(e);if(typeof e=="string")return TC(e);throw new Error("Expected function, string, or object as test")};function CC(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ta(e[n]);return ya(r);function r(...u){let a=-1;for(;++a<t.length;)if(t[a].apply(this,u))return!0;return!1}}function EC(e){const t=e;return ya(n);function n(r){const u=r;let a;for(a in e)if(u[a]!==t[a])return!1;return!0}}function TC(e){return ya(t);function t(n){return n&&n.type===e}}function ya(e){return t;function t(n,r,u){return!!(kC(n)&&e.call(this,n,typeof r=="number"?r:void 0,u||void 0))}}function yC(){return!0}function kC(e){return e!==null&&typeof e=="object"&&"type"in e}const Q0=[],AC=!0,Li=!1,SC="skip";function J0(e,t,n,r){let u;typeof t=="function"&&typeof n!="function"?(r=n,n=t):u=t;const a=Ta(u),i=r?-1:1;o(e,void 0,[])();function o(c,l,h){const f=c&&typeof c=="object"?c:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(c.type+(p?"<"+p+">":""))+")"})}return m;function m(){let p=Q0,g,x,C;if((!t||a(c,l,h[h.length-1]||void 0))&&(p=IC(n(c,h)),p[0]===Li))return p;if("children"in c&&c.children){const _=c;if(_.children&&p[0]!==SC)for(x=(r?_.children.length:-1)+i,C=h.concat(_);x>-1&&x<_.children.length;){const v=_.children[x];if(g=o(v,x,C)(),g[0]===Li)return g;x=typeof g[1]=="number"?g[1]:x+i}}return p}}}function IC(e){return Array.isArray(e)?e:typeof e=="number"?[AC,e]:e==null?Q0:[e]}function ka(e,t,n,r){let u,a,i;typeof t=="function"&&typeof n!="function"?(a=void 0,i=t,u=n):(a=t,i=n,u=r),J0(e,a,o,u);function o(c,l){const h=l[l.length-1],f=h?h.children.indexOf(c):void 0;return i(c,f,h)}}const Pi={}.hasOwnProperty,NC={};function vC(e,t){const n=t||NC,r=new Map,u=new Map,a=new Map,i={...fC,...n.handlers},o={all:l,applyData:DC,definitionById:r,footnoteById:u,footnoteCounts:a,footnoteOrder:[],handlers:i,one:c,options:n,patch:wC,wrap:PC};return ka(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const f=h.type==="definition"?r:u,m=String(h.identifier).toUpperCase();f.has(m)||f.set(m,h)}}),o;function c(h,f){const m=h.type,p=o.handlers[m];if(Pi.call(o.handlers,m)&&p)return p(o,h,f);if(o.options.passThrough&&o.options.passThrough.includes(m)){if("children"in h){const{children:x,...C}=h,_=Cr(C);return _.children=o.all(h),_}return Cr(h)}return(o.options.unknownHandler||LC)(o,h,f)}function l(h){const f=[];if("children"in h){const m=h.children;let p=-1;for(;++p<m.length;){const g=o.one(m[p],h);if(g){if(p&&m[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=uc(g.value)),!Array.isArray(g)&&g.type==="element")){const x=g.children[0];x&&x.type==="text"&&(x.value=uc(x.value))}Array.isArray(g)?f.push(...g):f.push(g)}}}return f}}function wC(e,t){e.position&&(t.position=gb(e))}function DC(e,t){let n=t;if(e&&e.data){const r=e.data.hName,u=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const i="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:i}}n.type==="element"&&a&&Object.assign(n.properties,Cr(a)),"children"in n&&n.children&&u!==null&&u!==void 0&&(n.children=u)}return n}function LC(e,t){const n=t.data||{},r="value"in t&&!(Pi.call(n,"hProperties")||Pi.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function PC(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
88
+ `}]}}const Ta=function(e){if(e==null)return kC;if(typeof e=="function")return ya(e);if(typeof e=="object")return Array.isArray(e)?EC(e):TC(e);if(typeof e=="string")return yC(e);throw new Error("Expected function, string, or object as test")};function EC(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ta(e[n]);return ya(r);function r(...u){let a=-1;for(;++a<t.length;)if(t[a].apply(this,u))return!0;return!1}}function TC(e){const t=e;return ya(n);function n(r){const u=r;let a;for(a in e)if(u[a]!==t[a])return!1;return!0}}function yC(e){return ya(t);function t(n){return n&&n.type===e}}function ya(e){return t;function t(n,r,u){return!!(AC(n)&&e.call(this,n,typeof r=="number"?r:void 0,u||void 0))}}function kC(){return!0}function AC(e){return e!==null&&typeof e=="object"&&"type"in e}const Q0=[],SC=!0,Li=!1,IC="skip";function J0(e,t,n,r){let u;typeof t=="function"&&typeof n!="function"?(r=n,n=t):u=t;const a=Ta(u),i=r?-1:1;o(e,void 0,[])();function o(c,l,h){const f=c&&typeof c=="object"?c:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(c.type+(p?"<"+p+">":""))+")"})}return m;function m(){let p=Q0,g,x,C;if((!t||a(c,l,h[h.length-1]||void 0))&&(p=NC(n(c,h)),p[0]===Li))return p;if("children"in c&&c.children){const _=c;if(_.children&&p[0]!==IC)for(x=(r?_.children.length:-1)+i,C=h.concat(_);x>-1&&x<_.children.length;){const v=_.children[x];if(g=o(v,x,C)(),g[0]===Li)return g;x=typeof g[1]=="number"?g[1]:x+i}}return p}}}function NC(e){return Array.isArray(e)?e:typeof e=="number"?[SC,e]:e==null?Q0:[e]}function ka(e,t,n,r){let u,a,i;typeof t=="function"&&typeof n!="function"?(a=void 0,i=t,u=n):(a=t,i=n,u=r),J0(e,a,o,u);function o(c,l){const h=l[l.length-1],f=h?h.children.indexOf(c):void 0;return i(c,f,h)}}const Pi={}.hasOwnProperty,vC={};function wC(e,t){const n=t||vC,r=new Map,u=new Map,a=new Map,i={...hC,...n.handlers},o={all:l,applyData:LC,definitionById:r,footnoteById:u,footnoteCounts:a,footnoteOrder:[],handlers:i,one:c,options:n,patch:DC,wrap:RC};return ka(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const f=h.type==="definition"?r:u,m=String(h.identifier).toUpperCase();f.has(m)||f.set(m,h)}}),o;function c(h,f){const m=h.type,p=o.handlers[m];if(Pi.call(o.handlers,m)&&p)return p(o,h,f);if(o.options.passThrough&&o.options.passThrough.includes(m)){if("children"in h){const{children:x,...C}=h,_=Cr(C);return _.children=o.all(h),_}return Cr(h)}return(o.options.unknownHandler||PC)(o,h,f)}function l(h){const f=[];if("children"in h){const m=h.children;let p=-1;for(;++p<m.length;){const g=o.one(m[p],h);if(g){if(p&&m[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=uc(g.value)),!Array.isArray(g)&&g.type==="element")){const x=g.children[0];x&&x.type==="text"&&(x.value=uc(x.value))}Array.isArray(g)?f.push(...g):f.push(g)}}}return f}}function DC(e,t){e.position&&(t.position=bb(e))}function LC(e,t){let n=t;if(e&&e.data){const r=e.data.hName,u=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const i="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:i}}n.type==="element"&&a&&Object.assign(n.properties,Cr(a)),"children"in n&&n.children&&u!==null&&u!==void 0&&(n.children=u)}return n}function PC(e,t){const n=t.data||{},r="value"in t&&!(Pi.call(n,"hProperties")||Pi.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function RC(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
89
89
  `});++r<e.length;)r&&n.push({type:"text",value:`
90
90
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
91
- `}),n}function uc(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ac(e,t){const n=vC(e,t),r=n.one(e,void 0),u=xC(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return u&&a.children.push({type:"text",value:`
92
- `},u),a}function RC(e,t){return e&&"run"in e?async function(n,r){const u=ac(n,{file:r,...t});await e.run(u,r)}:function(n,r){return ac(n,{file:r,...e||t})}}function ic(e){if(e)throw e}var Vu=Object.prototype.hasOwnProperty,e1=Object.prototype.toString,sc=Object.defineProperty,oc=Object.getOwnPropertyDescriptor,cc=function(t){return typeof Array.isArray=="function"?Array.isArray(t):e1.call(t)==="[object Array]"},lc=function(t){if(!t||e1.call(t)!=="[object Object]")return!1;var n=Vu.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Vu.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var u;for(u in t);return typeof u>"u"||Vu.call(t,u)},dc=function(t,n){sc&&n.name==="__proto__"?sc(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},fc=function(t,n){if(n==="__proto__")if(Vu.call(t,n)){if(oc)return oc(t,n).value}else return;return t[n]},OC=function e(){var t,n,r,u,a,i,o=arguments[0],c=1,l=arguments.length,h=!1;for(typeof o=="boolean"&&(h=o,o=arguments[1]||{},c=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});c<l;++c)if(t=arguments[c],t!=null)for(n in t)r=fc(o,n),u=fc(t,n),o!==u&&(h&&u&&(lc(u)||(a=cc(u)))?(a?(a=!1,i=r&&cc(r)?r:[]):i=r&&lc(r)?r:{},dc(o,{name:n,newValue:e(h,i,u)})):typeof u<"u"&&dc(o,{name:n,newValue:u}));return o};const Qa=b.getDefaultExportFromCjs(OC);function Ri(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function MC(){const e=[],t={run:n,use:r};return t;function n(...u){let a=-1;const i=u.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);o(null,...u);function o(c,...l){const h=e[++a];let f=-1;if(c){i(c);return}for(;++f<u.length;)(l[f]===null||l[f]===void 0)&&(l[f]=u[f]);u=l,h?FC(h,o)(...l):i(null,...l)}}function r(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return e.push(u),t}}function FC(e,t){let n;return r;function r(...i){const o=e.length>i.length;let c;o&&i.push(u);try{c=e.apply(this,i)}catch(l){const h=l;if(o&&n)throw h;return u(h)}o||(c&&c.then&&typeof c.then=="function"?c.then(a,u):c instanceof Error?u(c):a(c))}function u(i,...o){n||(n=!0,t(i,...o))}function a(i){u(null,i)}}const an={basename:BC,dirname:jC,extname:HC,join:UC,sep:"/"};function BC(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');gu(e);let n=0,r=-1,u=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;u--;)if(e.codePointAt(u)===47){if(a){n=u+1;break}}else r<0&&(a=!0,r=u+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let i=-1,o=t.length-1;for(;u--;)if(e.codePointAt(u)===47){if(a){n=u+1;break}}else i<0&&(a=!0,i=u+1),o>-1&&(e.codePointAt(u)===t.codePointAt(o--)?o<0&&(r=u):(o=-1,r=i));return n===r?r=i:r<0&&(r=e.length),e.slice(n,r)}function jC(e){if(gu(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function HC(e){gu(e);let t=e.length,n=-1,r=0,u=-1,a=0,i;for(;t--;){const o=e.codePointAt(t);if(o===47){if(i){r=t+1;break}continue}n<0&&(i=!0,n=t+1),o===46?u<0?u=t:a!==1&&(a=1):u>-1&&(a=-1)}return u<0||n<0||a===0||a===1&&u===n-1&&u===r+1?"":e.slice(u,n)}function UC(...e){let t=-1,n;for(;++t<e.length;)gu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":VC(n)}function VC(e){gu(e);const t=e.codePointAt(0)===47;let n=$C(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function $C(e,t){let n="",r=0,u=-1,a=0,i=-1,o,c;for(;++i<=e.length;){if(i<e.length)o=e.codePointAt(i);else{if(o===47)break;o=47}if(o===47){if(!(u===i-1||a===1))if(u!==i-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),u=i,a=0;continue}}else if(n.length>0){n="",r=0,u=i,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(u+1,i):n=e.slice(u+1,i),r=i-u-1;u=i,a=0}else o===46&&a>-1?a++:a=-1}return n}function gu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const zC={cwd:qC};function qC(){return"/"}function Oi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ZC(e){if(typeof e=="string")e=new URL(e);else if(!Oi(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return WC(e)}function WC(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const u=new TypeError("File URL path must not include encoded / characters");throw u.code="ERR_INVALID_FILE_URL_PATH",u}}return decodeURIComponent(t)}const Ja=["history","path","basename","stem","extname","dirname"];class t1{constructor(t){let n;t?Oi(t)?n={path:t}:typeof t=="string"||YC(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":zC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ja.length;){const a=Ja[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let u;for(u in n)Ja.includes(u)||(this[u]=n[u])}get basename(){return typeof this.path=="string"?an.basename(this.path):void 0}set basename(t){ti(t,"basename"),ei(t,"basename"),this.path=an.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?an.dirname(this.path):void 0}set dirname(t){hc(this.basename,"dirname"),this.path=an.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?an.extname(this.path):void 0}set extname(t){if(ei(t,"extname"),hc(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=an.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Oi(t)&&(t=ZC(t)),ti(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?an.basename(this.path,this.extname):void 0}set stem(t){ti(t,"stem"),ei(t,"stem"),this.path=an.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const u=this.message(t,n,r);throw u.fatal=!0,u}info(t,n,r){const u=this.message(t,n,r);return u.fatal=void 0,u}message(t,n,r){const u=new ht(t,n,r);return this.path&&(u.name=this.path+":"+u.name,u.file=this.path),u.fatal=!1,this.messages.push(u),u}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ei(e,t){if(e&&e.includes(an.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+an.sep+"`")}function ti(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function hc(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function YC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const GC=function(e){const r=this.constructor.prototype,u=r[e],a=function(){return u.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},XC={}.hasOwnProperty;class Es extends GC{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=MC()}copy(){const t=new Es;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Qa(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ui("data",this.frozen),this.namespace[t]=n,this):XC.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ui("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const u=n.call(t,...r);typeof u=="function"&&this.transformers.use(u)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ou(t),r=this.parser||this.Parser;return ni("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ni("process",this.parser||this.Parser),ri("process",this.compiler||this.Compiler),n?u(void 0,n):new Promise(u);function u(a,i){const o=Ou(t),c=r.parse(o);r.run(c,o,function(h,f,m){if(h||!f||!m)return l(h);const p=f,g=r.stringify(p,m);JC(g)?m.value=g:m.result=g,l(h,m)});function l(h,f){h||!f?i(h):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),ni("processSync",this.parser||this.Parser),ri("processSync",this.compiler||this.Compiler),this.process(t,u),mc("processSync","process",n),r;function u(a,i){n=!0,ic(a),r=i}}run(t,n,r){pc(t),this.freeze();const u=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(i,o){const c=Ou(n);u.run(t,c,l);function l(h,f,m){const p=f||t;h?o(h):i?i(p):r(void 0,p,m)}}}runSync(t,n){let r=!1,u;return this.run(t,n,a),mc("runSync","run",r),u;function a(i,o){ic(i),u=o,r=!0}}stringify(t,n){this.freeze();const r=Ou(n),u=this.compiler||this.Compiler;return ri("stringify",u),pc(t),u(t,r)}use(t,...n){const r=this.attachers,u=this.namespace;if(ui("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):i(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")c(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[h,...f]=l;c(h,f)}else i(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function i(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(l.plugins),l.settings&&(u.settings=Qa(!0,u.settings,l.settings))}function o(l){let h=-1;if(l!=null)if(Array.isArray(l))for(;++h<l.length;){const f=l[h];a(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function c(l,h){let f=-1,m=-1;for(;++f<r.length;)if(r[f][0]===l){m=f;break}if(m===-1)r.push([l,...h]);else if(h.length>0){let[p,...g]=h;const x=r[m][1];Ri(x)&&Ri(p)&&(p=Qa(!0,x,p)),r[m]=[l,p,...g]}}}}const KC=new Es().freeze();function ni(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ri(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ui(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function pc(e){if(!Ri(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function mc(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ou(e){return QC(e)?e:new t1(e)}function QC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function JC(e){return typeof e=="string"||eE(e)}function eE(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const tE="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",gc=[],bc={allowDangerousHtml:!0},nE=/^(https?|ircs?|mailto|xmpp)$/i,rE=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Ts(e){const t=uE(e),n=aE(e);return iE(t.runSync(t.parse(n),n),e)}function uE(e){const t=e.rehypePlugins||gc,n=e.remarkPlugins||gc,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...bc}:bc;return KC().use(Hx).use(n).use(RC,r).use(t)}function aE(e){const t=e.children||"",n=new t1;return typeof t=="string"&&(n.value=t),n}function iE(e,t){const n=t.allowedElements,r=t.allowElement,u=t.components,a=t.disallowedElements,i=t.skipHtml,o=t.unwrapDisallowed,c=t.urlTransform||sE;for(const h of rE)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+tE+h.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),ka(e,l),Tb(e,{Fragment:s.Fragment,components:u,ignoreInvalidStyle:!0,jsx:s.jsx,jsxs:s.jsxs,passKeys:!0,passNode:!0});function l(h,f,m){if(h.type==="raw"&&m&&typeof f=="number")return i?m.children.splice(f,1):m.children[f]={type:"text",value:h.value},f;if(h.type==="element"){let p;for(p in Ga)if(Object.hasOwn(Ga,p)&&Object.hasOwn(h.properties,p)){const g=h.properties[p],x=Ga[p];(x===null||x.includes(h.tagName))&&(h.properties[p]=c(String(g||""),p,h))}}if(h.type==="element"){let p=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(h,f,m)),p&&m&&typeof f=="number")return o&&h.children?m.children.splice(f,1,...h.children):m.children.splice(f,1),f}}}function sE(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),u=e.indexOf("/");return t===-1||u!==-1&&t>u||n!==-1&&t>n||r!==-1&&t>r||nE.test(e.slice(0,t))?e:""}function _c(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,u=n.indexOf(t);for(;u!==-1;)r++,u=n.indexOf(t,u+t.length);return r}function oE(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function cE(e,t,n){const u=Ta((n||{}).ignore||[]),a=lE(t);let i=-1;for(;++i<a.length;)J0(e,"text",o);function o(l,h){let f=-1,m;for(;++f<h.length;){const p=h[f],g=m?m.children:void 0;if(u(p,g?g.indexOf(p):void 0,m))return;m=p}if(m)return c(l,h)}function c(l,h){const f=h[h.length-1],m=a[i][0],p=a[i][1];let g=0;const C=f.children.indexOf(l);let _=!1,v=[];m.lastIndex=0;let k=m.exec(l.value);for(;k;){const D=k.index,S={index:k.index,input:k.input,stack:[...h,l]};let I=p(...k,S);if(typeof I=="string"&&(I=I.length>0?{type:"text",value:I}:void 0),I===!1?m.lastIndex=D+1:(g!==D&&v.push({type:"text",value:l.value.slice(g,D)}),Array.isArray(I)?v.push(...I):I&&v.push(I),g=D+k[0].length,_=!0),!m.global)break;k=m.exec(l.value)}return _?(g<l.value.length&&v.push({type:"text",value:l.value.slice(g)}),f.children.splice(C,1,...v)):v=[l],C+v.length}}function lE(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const u=n[r];t.push([dE(u[0]),fE(u[1])])}return t}function dE(e){return typeof e=="string"?new RegExp(oE(e),"g"):e}function fE(e){return typeof e=="function"?e:function(){return e}}const ai="phrasing",ii=["autolink","link","image","label"];function hE(){return{transforms:[CE],enter:{literalAutolink:mE,literalAutolinkEmail:si,literalAutolinkHttp:si,literalAutolinkWww:si},exit:{literalAutolink:xE,literalAutolinkEmail:_E,literalAutolinkHttp:gE,literalAutolinkWww:bE}}}function pE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ai,notInConstruct:ii},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ai,notInConstruct:ii},{character:":",before:"[ps]",after:"\\/",inConstruct:ai,notInConstruct:ii}]}}function mE(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function si(e){this.config.enter.autolinkProtocol.call(this,e)}function gE(e){this.config.exit.autolinkProtocol.call(this,e)}function bE(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function _E(e){this.config.exit.autolinkEmail.call(this,e)}function xE(e){this.exit(e)}function CE(e){cE(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,EE],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),TE]],{ignore:["link","linkReference"]})}function EE(e,t,n,r,u){let a="";if(!n1(u)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!yE(n)))return!1;const i=kE(n+r);if(!i[0])return!1;const o={type:"link",title:null,url:a+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[o,{type:"text",value:i[1]}]:o}function TE(e,t,n,r){return!n1(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function yE(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function kE(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const u=_c(e,"(");let a=_c(e,")");for(;r!==-1&&u>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function n1(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Qn(n)||xa(n))&&(!t||n!==47)}r1.peek=PE;function AE(){this.buffer()}function SE(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function IE(){this.buffer()}function NE(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function vE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Kt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function wE(e){this.exit(e)}function DE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Kt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function LE(e){this.exit(e)}function PE(){return"["}function r1(e,t,n,r){const u=n.createTracker(r);let a=u.move("[^");const i=n.enter("footnoteReference"),o=n.enter("reference");return a+=u.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),i(),a+=u.move("]"),a}function RE(){return{enter:{gfmFootnoteCallString:AE,gfmFootnoteCall:SE,gfmFootnoteDefinitionLabelString:IE,gfmFootnoteDefinition:NE},exit:{gfmFootnoteCallString:vE,gfmFootnoteCall:wE,gfmFootnoteDefinitionLabelString:DE,gfmFootnoteDefinition:LE}}}function OE(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:r1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,u,a,i){const o=a.createTracker(i);let c=o.move("[^");const l=a.enter("footnoteDefinition"),h=a.enter("label");return c+=o.move(a.safe(a.associationId(r),{before:c,after:"]"})),h(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((t?`
93
- `:" ")+a.indentLines(a.containerFlow(r,o.current()),t?u1:ME))),l(),c}}function ME(e,t,n){return t===0?e:u1(e,t,n)}function u1(e,t,n){return(n?"":" ")+e}const FE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];a1.peek=VE;function BE(){return{canContainEols:["delete"],enter:{strikethrough:HE},exit:{strikethrough:UE}}}function jE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:FE}],handlers:{delete:a1}}}function HE(e){this.enter({type:"delete",children:[]},e)}function UE(e){this.exit(e)}function a1(e,t,n,r){const u=n.createTracker(r),a=n.enter("strikethrough");let i=u.move("~~");return i+=n.containerPhrasing(e,{...u.current(),before:i,after:"~"}),i+=u.move("~~"),a(),i}function VE(){return"~"}function $E(e){return e.length}function zE(e,t){const n=t||{},r=(n.align||[]).concat(),u=n.stringLength||$E,a=[],i=[],o=[],c=[];let l=0,h=-1;for(;++h<e.length;){const x=[],C=[];let _=-1;for(e[h].length>l&&(l=e[h].length);++_<e[h].length;){const v=qE(e[h][_]);if(n.alignDelimiters!==!1){const k=u(v);C[_]=k,(c[_]===void 0||k>c[_])&&(c[_]=k)}x.push(v)}i[h]=x,o[h]=C}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<l;)a[f]=xc(r[f]);else{const x=xc(r);for(;++f<l;)a[f]=x}f=-1;const m=[],p=[];for(;++f<l;){const x=a[f];let C="",_="";x===99?(C=":",_=":"):x===108?C=":":x===114&&(_=":");let v=n.alignDelimiters===!1?1:Math.max(1,c[f]-C.length-_.length);const k=C+"-".repeat(v)+_;n.alignDelimiters!==!1&&(v=C.length+v+_.length,v>c[f]&&(c[f]=v),p[f]=v),m[f]=k}i.splice(1,0,m),o.splice(1,0,p),h=-1;const g=[];for(;++h<i.length;){const x=i[h],C=o[h];f=-1;const _=[];for(;++f<l;){const v=x[f]||"";let k="",D="";if(n.alignDelimiters!==!1){const S=c[f]-(C[f]||0),I=a[f];I===114?k=" ".repeat(S):I===99?S%2?(k=" ".repeat(S/2+.5),D=" ".repeat(S/2-.5)):(k=" ".repeat(S/2),D=k):D=" ".repeat(S)}n.delimiterStart!==!1&&!f&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&v==="")&&(n.delimiterStart!==!1||f)&&_.push(" "),n.alignDelimiters!==!1&&_.push(k),_.push(v),n.alignDelimiters!==!1&&_.push(D),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||f!==l-1)&&_.push("|")}g.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return g.join(`
94
- `)}function qE(e){return e==null?"":String(e)}function xc(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const Cc={}.hasOwnProperty;function i1(e,t){const n=t||{};function r(u,...a){let i=r.invalid;const o=r.handlers;if(u&&Cc.call(u,e)){const c=String(u[e]);i=Cc.call(o,c)?o[c]:r.unknown}if(i)return i.call(this,u,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function ZE(e,t,n,r){const u=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const i=n.indentLines(n.containerFlow(e,a.current()),WE);return u(),i}function WE(e,t,n){return">"+(n?"":" ")+e}function YE(e,t){return Ec(e,t.inConstruct,!0)&&!Ec(e,t.notInConstruct,!1)}function Ec(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Tc(e,t,n,r){let u=-1;for(;++u<n.unsafe.length;)if(n.unsafe[u].character===`
95
- `&&YE(n.stack,n.unsafe[u]))return/[ \t]/.test(r.before)?"":" ";return`\\
96
- `}function GE(e,t){const n=String(e);let r=n.indexOf(t),u=r,a=0,i=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===u?++a>i&&(i=a):a=1,u=r+t.length,r=n.indexOf(t,u);return i}function XE(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function KE(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function QE(e,t,n,r){const u=KE(n),a=e.value||"",i=u==="`"?"GraveAccent":"Tilde";if(XE(e,n)){const f=n.enter("codeIndented"),m=n.indentLines(a,JE);return f(),m}const o=n.createTracker(r),c=u.repeat(Math.max(GE(a,u)+1,3)),l=n.enter("codeFenced");let h=o.move(c);if(e.lang){const f=n.enter(`codeFencedLang${i}`);h+=o.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${i}`);h+=o.move(" "),h+=o.move(n.safe(e.meta,{before:h,after:`
91
+ `}),n}function uc(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ac(e,t){const n=wC(e,t),r=n.one(e,void 0),u=CC(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return u&&a.children.push({type:"text",value:`
92
+ `},u),a}function OC(e,t){return e&&"run"in e?async function(n,r){const u=ac(n,{file:r,...t});await e.run(u,r)}:function(n,r){return ac(n,{file:r,...e||t})}}function ic(e){if(e)throw e}var Vu=Object.prototype.hasOwnProperty,e1=Object.prototype.toString,sc=Object.defineProperty,oc=Object.getOwnPropertyDescriptor,cc=function(t){return typeof Array.isArray=="function"?Array.isArray(t):e1.call(t)==="[object Array]"},lc=function(t){if(!t||e1.call(t)!=="[object Object]")return!1;var n=Vu.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Vu.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var u;for(u in t);return typeof u>"u"||Vu.call(t,u)},dc=function(t,n){sc&&n.name==="__proto__"?sc(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},fc=function(t,n){if(n==="__proto__")if(Vu.call(t,n)){if(oc)return oc(t,n).value}else return;return t[n]},MC=function e(){var t,n,r,u,a,i,o=arguments[0],c=1,l=arguments.length,h=!1;for(typeof o=="boolean"&&(h=o,o=arguments[1]||{},c=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});c<l;++c)if(t=arguments[c],t!=null)for(n in t)r=fc(o,n),u=fc(t,n),o!==u&&(h&&u&&(lc(u)||(a=cc(u)))?(a?(a=!1,i=r&&cc(r)?r:[]):i=r&&lc(r)?r:{},dc(o,{name:n,newValue:e(h,i,u)})):typeof u<"u"&&dc(o,{name:n,newValue:u}));return o};const Qa=b.getDefaultExportFromCjs(MC);function Ri(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function FC(){const e=[],t={run:n,use:r};return t;function n(...u){let a=-1;const i=u.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);o(null,...u);function o(c,...l){const h=e[++a];let f=-1;if(c){i(c);return}for(;++f<u.length;)(l[f]===null||l[f]===void 0)&&(l[f]=u[f]);u=l,h?BC(h,o)(...l):i(null,...l)}}function r(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return e.push(u),t}}function BC(e,t){let n;return r;function r(...i){const o=e.length>i.length;let c;o&&i.push(u);try{c=e.apply(this,i)}catch(l){const h=l;if(o&&n)throw h;return u(h)}o||(c&&c.then&&typeof c.then=="function"?c.then(a,u):c instanceof Error?u(c):a(c))}function u(i,...o){n||(n=!0,t(i,...o))}function a(i){u(null,i)}}const an={basename:jC,dirname:HC,extname:UC,join:VC,sep:"/"};function jC(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');gu(e);let n=0,r=-1,u=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;u--;)if(e.codePointAt(u)===47){if(a){n=u+1;break}}else r<0&&(a=!0,r=u+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let i=-1,o=t.length-1;for(;u--;)if(e.codePointAt(u)===47){if(a){n=u+1;break}}else i<0&&(a=!0,i=u+1),o>-1&&(e.codePointAt(u)===t.codePointAt(o--)?o<0&&(r=u):(o=-1,r=i));return n===r?r=i:r<0&&(r=e.length),e.slice(n,r)}function HC(e){if(gu(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function UC(e){gu(e);let t=e.length,n=-1,r=0,u=-1,a=0,i;for(;t--;){const o=e.codePointAt(t);if(o===47){if(i){r=t+1;break}continue}n<0&&(i=!0,n=t+1),o===46?u<0?u=t:a!==1&&(a=1):u>-1&&(a=-1)}return u<0||n<0||a===0||a===1&&u===n-1&&u===r+1?"":e.slice(u,n)}function VC(...e){let t=-1,n;for(;++t<e.length;)gu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":$C(n)}function $C(e){gu(e);const t=e.codePointAt(0)===47;let n=zC(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function zC(e,t){let n="",r=0,u=-1,a=0,i=-1,o,c;for(;++i<=e.length;){if(i<e.length)o=e.codePointAt(i);else{if(o===47)break;o=47}if(o===47){if(!(u===i-1||a===1))if(u!==i-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),u=i,a=0;continue}}else if(n.length>0){n="",r=0,u=i,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(u+1,i):n=e.slice(u+1,i),r=i-u-1;u=i,a=0}else o===46&&a>-1?a++:a=-1}return n}function gu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const qC={cwd:ZC};function ZC(){return"/"}function Oi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function WC(e){if(typeof e=="string")e=new URL(e);else if(!Oi(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return YC(e)}function YC(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const u=new TypeError("File URL path must not include encoded / characters");throw u.code="ERR_INVALID_FILE_URL_PATH",u}}return decodeURIComponent(t)}const Ja=["history","path","basename","stem","extname","dirname"];class t1{constructor(t){let n;t?Oi(t)?n={path:t}:typeof t=="string"||GC(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":qC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ja.length;){const a=Ja[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let u;for(u in n)Ja.includes(u)||(this[u]=n[u])}get basename(){return typeof this.path=="string"?an.basename(this.path):void 0}set basename(t){ti(t,"basename"),ei(t,"basename"),this.path=an.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?an.dirname(this.path):void 0}set dirname(t){hc(this.basename,"dirname"),this.path=an.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?an.extname(this.path):void 0}set extname(t){if(ei(t,"extname"),hc(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=an.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Oi(t)&&(t=WC(t)),ti(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?an.basename(this.path,this.extname):void 0}set stem(t){ti(t,"stem"),ei(t,"stem"),this.path=an.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const u=this.message(t,n,r);throw u.fatal=!0,u}info(t,n,r){const u=this.message(t,n,r);return u.fatal=void 0,u}message(t,n,r){const u=new ht(t,n,r);return this.path&&(u.name=this.path+":"+u.name,u.file=this.path),u.fatal=!1,this.messages.push(u),u}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ei(e,t){if(e&&e.includes(an.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+an.sep+"`")}function ti(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function hc(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function GC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const XC=function(e){const r=this.constructor.prototype,u=r[e],a=function(){return u.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},KC={}.hasOwnProperty;class Es extends XC{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=FC()}copy(){const t=new Es;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Qa(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ui("data",this.frozen),this.namespace[t]=n,this):KC.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ui("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const u=n.call(t,...r);typeof u=="function"&&this.transformers.use(u)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ou(t),r=this.parser||this.Parser;return ni("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ni("process",this.parser||this.Parser),ri("process",this.compiler||this.Compiler),n?u(void 0,n):new Promise(u);function u(a,i){const o=Ou(t),c=r.parse(o);r.run(c,o,function(h,f,m){if(h||!f||!m)return l(h);const p=f,g=r.stringify(p,m);eE(g)?m.value=g:m.result=g,l(h,m)});function l(h,f){h||!f?i(h):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),ni("processSync",this.parser||this.Parser),ri("processSync",this.compiler||this.Compiler),this.process(t,u),mc("processSync","process",n),r;function u(a,i){n=!0,ic(a),r=i}}run(t,n,r){pc(t),this.freeze();const u=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(i,o){const c=Ou(n);u.run(t,c,l);function l(h,f,m){const p=f||t;h?o(h):i?i(p):r(void 0,p,m)}}}runSync(t,n){let r=!1,u;return this.run(t,n,a),mc("runSync","run",r),u;function a(i,o){ic(i),u=o,r=!0}}stringify(t,n){this.freeze();const r=Ou(n),u=this.compiler||this.Compiler;return ri("stringify",u),pc(t),u(t,r)}use(t,...n){const r=this.attachers,u=this.namespace;if(ui("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):i(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")c(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[h,...f]=l;c(h,f)}else i(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function i(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(l.plugins),l.settings&&(u.settings=Qa(!0,u.settings,l.settings))}function o(l){let h=-1;if(l!=null)if(Array.isArray(l))for(;++h<l.length;){const f=l[h];a(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function c(l,h){let f=-1,m=-1;for(;++f<r.length;)if(r[f][0]===l){m=f;break}if(m===-1)r.push([l,...h]);else if(h.length>0){let[p,...g]=h;const x=r[m][1];Ri(x)&&Ri(p)&&(p=Qa(!0,x,p)),r[m]=[l,p,...g]}}}}const QC=new Es().freeze();function ni(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ri(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ui(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function pc(e){if(!Ri(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function mc(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ou(e){return JC(e)?e:new t1(e)}function JC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function eE(e){return typeof e=="string"||tE(e)}function tE(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const nE="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",gc=[],bc={allowDangerousHtml:!0},rE=/^(https?|ircs?|mailto|xmpp)$/i,uE=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Ts(e){const t=aE(e),n=iE(e);return sE(t.runSync(t.parse(n),n),e)}function aE(e){const t=e.rehypePlugins||gc,n=e.remarkPlugins||gc,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...bc}:bc;return QC().use(Ux).use(n).use(OC,r).use(t)}function iE(e){const t=e.children||"",n=new t1;return typeof t=="string"&&(n.value=t),n}function sE(e,t){const n=t.allowedElements,r=t.allowElement,u=t.components,a=t.disallowedElements,i=t.skipHtml,o=t.unwrapDisallowed,c=t.urlTransform||oE;for(const h of uE)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+nE+h.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),ka(e,l),yb(e,{Fragment:s.Fragment,components:u,ignoreInvalidStyle:!0,jsx:s.jsx,jsxs:s.jsxs,passKeys:!0,passNode:!0});function l(h,f,m){if(h.type==="raw"&&m&&typeof f=="number")return i?m.children.splice(f,1):m.children[f]={type:"text",value:h.value},f;if(h.type==="element"){let p;for(p in Ga)if(Object.hasOwn(Ga,p)&&Object.hasOwn(h.properties,p)){const g=h.properties[p],x=Ga[p];(x===null||x.includes(h.tagName))&&(h.properties[p]=c(String(g||""),p,h))}}if(h.type==="element"){let p=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(h,f,m)),p&&m&&typeof f=="number")return o&&h.children?m.children.splice(f,1,...h.children):m.children.splice(f,1),f}}}function oE(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),u=e.indexOf("/");return t===-1||u!==-1&&t>u||n!==-1&&t>n||r!==-1&&t>r||rE.test(e.slice(0,t))?e:""}function _c(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,u=n.indexOf(t);for(;u!==-1;)r++,u=n.indexOf(t,u+t.length);return r}function cE(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function lE(e,t,n){const u=Ta((n||{}).ignore||[]),a=dE(t);let i=-1;for(;++i<a.length;)J0(e,"text",o);function o(l,h){let f=-1,m;for(;++f<h.length;){const p=h[f],g=m?m.children:void 0;if(u(p,g?g.indexOf(p):void 0,m))return;m=p}if(m)return c(l,h)}function c(l,h){const f=h[h.length-1],m=a[i][0],p=a[i][1];let g=0;const C=f.children.indexOf(l);let _=!1,v=[];m.lastIndex=0;let k=m.exec(l.value);for(;k;){const D=k.index,S={index:k.index,input:k.input,stack:[...h,l]};let I=p(...k,S);if(typeof I=="string"&&(I=I.length>0?{type:"text",value:I}:void 0),I===!1?m.lastIndex=D+1:(g!==D&&v.push({type:"text",value:l.value.slice(g,D)}),Array.isArray(I)?v.push(...I):I&&v.push(I),g=D+k[0].length,_=!0),!m.global)break;k=m.exec(l.value)}return _?(g<l.value.length&&v.push({type:"text",value:l.value.slice(g)}),f.children.splice(C,1,...v)):v=[l],C+v.length}}function dE(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const u=n[r];t.push([fE(u[0]),hE(u[1])])}return t}function fE(e){return typeof e=="string"?new RegExp(cE(e),"g"):e}function hE(e){return typeof e=="function"?e:function(){return e}}const ai="phrasing",ii=["autolink","link","image","label"];function pE(){return{transforms:[EE],enter:{literalAutolink:gE,literalAutolinkEmail:si,literalAutolinkHttp:si,literalAutolinkWww:si},exit:{literalAutolink:CE,literalAutolinkEmail:xE,literalAutolinkHttp:bE,literalAutolinkWww:_E}}}function mE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ai,notInConstruct:ii},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ai,notInConstruct:ii},{character:":",before:"[ps]",after:"\\/",inConstruct:ai,notInConstruct:ii}]}}function gE(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function si(e){this.config.enter.autolinkProtocol.call(this,e)}function bE(e){this.config.exit.autolinkProtocol.call(this,e)}function _E(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function xE(e){this.config.exit.autolinkEmail.call(this,e)}function CE(e){this.exit(e)}function EE(e){lE(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,TE],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),yE]],{ignore:["link","linkReference"]})}function TE(e,t,n,r,u){let a="";if(!n1(u)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!kE(n)))return!1;const i=AE(n+r);if(!i[0])return!1;const o={type:"link",title:null,url:a+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[o,{type:"text",value:i[1]}]:o}function yE(e,t,n,r){return!n1(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function kE(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function AE(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const u=_c(e,"(");let a=_c(e,")");for(;r!==-1&&u>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function n1(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Qn(n)||xa(n))&&(!t||n!==47)}r1.peek=RE;function SE(){this.buffer()}function IE(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function NE(){this.buffer()}function vE(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function wE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Kt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function DE(e){this.exit(e)}function LE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Kt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function PE(e){this.exit(e)}function RE(){return"["}function r1(e,t,n,r){const u=n.createTracker(r);let a=u.move("[^");const i=n.enter("footnoteReference"),o=n.enter("reference");return a+=u.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),i(),a+=u.move("]"),a}function OE(){return{enter:{gfmFootnoteCallString:SE,gfmFootnoteCall:IE,gfmFootnoteDefinitionLabelString:NE,gfmFootnoteDefinition:vE},exit:{gfmFootnoteCallString:wE,gfmFootnoteCall:DE,gfmFootnoteDefinitionLabelString:LE,gfmFootnoteDefinition:PE}}}function ME(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:r1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,u,a,i){const o=a.createTracker(i);let c=o.move("[^");const l=a.enter("footnoteDefinition"),h=a.enter("label");return c+=o.move(a.safe(a.associationId(r),{before:c,after:"]"})),h(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((t?`
93
+ `:" ")+a.indentLines(a.containerFlow(r,o.current()),t?u1:FE))),l(),c}}function FE(e,t,n){return t===0?e:u1(e,t,n)}function u1(e,t,n){return(n?"":" ")+e}const BE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];a1.peek=$E;function jE(){return{canContainEols:["delete"],enter:{strikethrough:UE},exit:{strikethrough:VE}}}function HE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:BE}],handlers:{delete:a1}}}function UE(e){this.enter({type:"delete",children:[]},e)}function VE(e){this.exit(e)}function a1(e,t,n,r){const u=n.createTracker(r),a=n.enter("strikethrough");let i=u.move("~~");return i+=n.containerPhrasing(e,{...u.current(),before:i,after:"~"}),i+=u.move("~~"),a(),i}function $E(){return"~"}function zE(e){return e.length}function qE(e,t){const n=t||{},r=(n.align||[]).concat(),u=n.stringLength||zE,a=[],i=[],o=[],c=[];let l=0,h=-1;for(;++h<e.length;){const x=[],C=[];let _=-1;for(e[h].length>l&&(l=e[h].length);++_<e[h].length;){const v=ZE(e[h][_]);if(n.alignDelimiters!==!1){const k=u(v);C[_]=k,(c[_]===void 0||k>c[_])&&(c[_]=k)}x.push(v)}i[h]=x,o[h]=C}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<l;)a[f]=xc(r[f]);else{const x=xc(r);for(;++f<l;)a[f]=x}f=-1;const m=[],p=[];for(;++f<l;){const x=a[f];let C="",_="";x===99?(C=":",_=":"):x===108?C=":":x===114&&(_=":");let v=n.alignDelimiters===!1?1:Math.max(1,c[f]-C.length-_.length);const k=C+"-".repeat(v)+_;n.alignDelimiters!==!1&&(v=C.length+v+_.length,v>c[f]&&(c[f]=v),p[f]=v),m[f]=k}i.splice(1,0,m),o.splice(1,0,p),h=-1;const g=[];for(;++h<i.length;){const x=i[h],C=o[h];f=-1;const _=[];for(;++f<l;){const v=x[f]||"";let k="",D="";if(n.alignDelimiters!==!1){const S=c[f]-(C[f]||0),I=a[f];I===114?k=" ".repeat(S):I===99?S%2?(k=" ".repeat(S/2+.5),D=" ".repeat(S/2-.5)):(k=" ".repeat(S/2),D=k):D=" ".repeat(S)}n.delimiterStart!==!1&&!f&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&v==="")&&(n.delimiterStart!==!1||f)&&_.push(" "),n.alignDelimiters!==!1&&_.push(k),_.push(v),n.alignDelimiters!==!1&&_.push(D),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||f!==l-1)&&_.push("|")}g.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return g.join(`
94
+ `)}function ZE(e){return e==null?"":String(e)}function xc(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const Cc={}.hasOwnProperty;function i1(e,t){const n=t||{};function r(u,...a){let i=r.invalid;const o=r.handlers;if(u&&Cc.call(u,e)){const c=String(u[e]);i=Cc.call(o,c)?o[c]:r.unknown}if(i)return i.call(this,u,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function WE(e,t,n,r){const u=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const i=n.indentLines(n.containerFlow(e,a.current()),YE);return u(),i}function YE(e,t,n){return">"+(n?"":" ")+e}function GE(e,t){return Ec(e,t.inConstruct,!0)&&!Ec(e,t.notInConstruct,!1)}function Ec(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Tc(e,t,n,r){let u=-1;for(;++u<n.unsafe.length;)if(n.unsafe[u].character===`
95
+ `&&GE(n.stack,n.unsafe[u]))return/[ \t]/.test(r.before)?"":" ";return`\\
96
+ `}function XE(e,t){const n=String(e);let r=n.indexOf(t),u=r,a=0,i=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===u?++a>i&&(i=a):a=1,u=r+t.length,r=n.indexOf(t,u);return i}function KE(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function QE(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function JE(e,t,n,r){const u=QE(n),a=e.value||"",i=u==="`"?"GraveAccent":"Tilde";if(KE(e,n)){const f=n.enter("codeIndented"),m=n.indentLines(a,eT);return f(),m}const o=n.createTracker(r),c=u.repeat(Math.max(XE(a,u)+1,3)),l=n.enter("codeFenced");let h=o.move(c);if(e.lang){const f=n.enter(`codeFencedLang${i}`);h+=o.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${i}`);h+=o.move(" "),h+=o.move(n.safe(e.meta,{before:h,after:`
97
97
  `,encode:["`"],...o.current()})),f()}return h+=o.move(`
98
98
  `),a&&(h+=o.move(a+`
99
- `)),h+=o.move(c),l(),h}function JE(e,t,n){return(n?"":" ")+e}function ys(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function eT(e,t,n,r){const u=ys(n),a=u==='"'?"Quote":"Apostrophe",i=n.enter("definition");let o=n.enter("label");const c=n.createTracker(r);let l=c.move("[");return l+=c.move(n.safe(n.associationId(e),{before:l,after:"]",...c.current()})),l+=c.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(o=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":`
100
- `,...c.current()}))),o(),e.title&&(o=n.enter(`title${a}`),l+=c.move(" "+u),l+=c.move(n.safe(e.title,{before:l,after:u,...c.current()})),l+=c.move(u),o()),i(),l}function tT(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function uu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ku(e,t,n){const r=xr(e),u=xr(t);return r===void 0?u===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:u===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?u===void 0?{inside:!1,outside:!1}:u===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:u===void 0?{inside:!1,outside:!1}:u===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}s1.peek=nT;function s1(e,t,n,r){const u=tT(n),a=n.enter("emphasis"),i=n.createTracker(r),o=i.move(u);let c=i.move(n.containerPhrasing(e,{after:u,before:o,...i.current()}));const l=c.charCodeAt(0),h=Ku(r.before.charCodeAt(r.before.length-1),l,u);h.inside&&(c=uu(l)+c.slice(1));const f=c.charCodeAt(c.length-1),m=Ku(r.after.charCodeAt(0),f,u);m.inside&&(c=c.slice(0,-1)+uu(f));const p=i.move(u);return a(),n.attentionEncodeSurroundingInfo={after:m.outside,before:h.outside},o+c+p}function nT(e,t,n){return n.options.emphasis||"*"}function rT(e,t){let n=!1;return ka(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Li}),!!((!e.depth||e.depth<3)&&ps(e)&&(t.options.setext||n))}function uT(e,t,n,r){const u=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(rT(e,n)){const h=n.enter("headingSetext"),f=n.enter("phrasing"),m=n.containerPhrasing(e,{...a.current(),before:`
99
+ `)),h+=o.move(c),l(),h}function eT(e,t,n){return(n?"":" ")+e}function ys(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function tT(e,t,n,r){const u=ys(n),a=u==='"'?"Quote":"Apostrophe",i=n.enter("definition");let o=n.enter("label");const c=n.createTracker(r);let l=c.move("[");return l+=c.move(n.safe(n.associationId(e),{before:l,after:"]",...c.current()})),l+=c.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(o=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":`
100
+ `,...c.current()}))),o(),e.title&&(o=n.enter(`title${a}`),l+=c.move(" "+u),l+=c.move(n.safe(e.title,{before:l,after:u,...c.current()})),l+=c.move(u),o()),i(),l}function nT(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function uu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ku(e,t,n){const r=xr(e),u=xr(t);return r===void 0?u===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:u===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?u===void 0?{inside:!1,outside:!1}:u===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:u===void 0?{inside:!1,outside:!1}:u===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}s1.peek=rT;function s1(e,t,n,r){const u=nT(n),a=n.enter("emphasis"),i=n.createTracker(r),o=i.move(u);let c=i.move(n.containerPhrasing(e,{after:u,before:o,...i.current()}));const l=c.charCodeAt(0),h=Ku(r.before.charCodeAt(r.before.length-1),l,u);h.inside&&(c=uu(l)+c.slice(1));const f=c.charCodeAt(c.length-1),m=Ku(r.after.charCodeAt(0),f,u);m.inside&&(c=c.slice(0,-1)+uu(f));const p=i.move(u);return a(),n.attentionEncodeSurroundingInfo={after:m.outside,before:h.outside},o+c+p}function rT(e,t,n){return n.options.emphasis||"*"}function uT(e,t){let n=!1;return ka(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Li}),!!((!e.depth||e.depth<3)&&ps(e)&&(t.options.setext||n))}function aT(e,t,n,r){const u=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(uT(e,n)){const h=n.enter("headingSetext"),f=n.enter("phrasing"),m=n.containerPhrasing(e,{...a.current(),before:`
101
101
  `,after:`
102
102
  `});return f(),h(),m+`
103
103
  `+(u===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
104
104
  `))+1))}const i="#".repeat(u),o=n.enter("headingAtx"),c=n.enter("phrasing");a.move(i+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
105
- `,...a.current()});return/^[\t ]/.test(l)&&(l=uu(l.charCodeAt(0))+l.slice(1)),l=l?i+" "+l:i,n.options.closeAtx&&(l+=" "+i),c(),o(),l}o1.peek=aT;function o1(e){return e.value||""}function aT(){return"<"}c1.peek=iT;function c1(e,t,n,r){const u=ys(n),a=u==='"'?"Quote":"Apostrophe",i=n.enter("image");let o=n.enter("label");const c=n.createTracker(r);let l=c.move("![");return l+=c.move(n.safe(e.alt,{before:l,after:"]",...c.current()})),l+=c.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(o=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":")",...c.current()}))),o(),e.title&&(o=n.enter(`title${a}`),l+=c.move(" "+u),l+=c.move(n.safe(e.title,{before:l,after:u,...c.current()})),l+=c.move(u),o()),l+=c.move(")"),i(),l}function iT(){return"!"}l1.peek=sT;function l1(e,t,n,r){const u=e.referenceType,a=n.enter("imageReference");let i=n.enter("label");const o=n.createTracker(r);let c=o.move("![");const l=n.safe(e.alt,{before:c,after:"]",...o.current()});c+=o.move(l+"]["),i();const h=n.stack;n.stack=[],i=n.enter("reference");const f=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return i(),n.stack=h,a(),u==="full"||!l||l!==f?c+=o.move(f+"]"):u==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function sT(){return"!"}d1.peek=oT;function d1(e,t,n){let r=e.value||"",u="`",a=-1;for(;new RegExp("(^|[^`])"+u+"([^`]|$)").test(r);)u+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const i=n.unsafe[a],o=n.compilePattern(i);let c;if(i.atBreak)for(;c=o.exec(r);){let l=c.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(c.index+1)}}return u+r+u}function oT(){return"`"}function f1(e,t){const n=ps(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}h1.peek=cT;function h1(e,t,n,r){const u=ys(n),a=u==='"'?"Quote":"Apostrophe",i=n.createTracker(r);let o,c;if(f1(e,n)){const h=n.stack;n.stack=[],o=n.enter("autolink");let f=i.move("<");return f+=i.move(n.containerPhrasing(e,{before:f,after:">",...i.current()})),f+=i.move(">"),o(),n.stack=h,f}o=n.enter("link"),c=n.enter("label");let l=i.move("[");return l+=i.move(n.containerPhrasing(e,{before:l,after:"](",...i.current()})),l+=i.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),l+=i.move("<"),l+=i.move(n.safe(e.url,{before:l,after:">",...i.current()})),l+=i.move(">")):(c=n.enter("destinationRaw"),l+=i.move(n.safe(e.url,{before:l,after:e.title?" ":")",...i.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=i.move(" "+u),l+=i.move(n.safe(e.title,{before:l,after:u,...i.current()})),l+=i.move(u),c()),l+=i.move(")"),o(),l}function cT(e,t,n){return f1(e,n)?"<":"["}p1.peek=lT;function p1(e,t,n,r){const u=e.referenceType,a=n.enter("linkReference");let i=n.enter("label");const o=n.createTracker(r);let c=o.move("[");const l=n.containerPhrasing(e,{before:c,after:"]",...o.current()});c+=o.move(l+"]["),i();const h=n.stack;n.stack=[],i=n.enter("reference");const f=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return i(),n.stack=h,a(),u==="full"||!l||l!==f?c+=o.move(f+"]"):u==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function lT(){return"["}function ks(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function dT(e){const t=ks(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function fT(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function m1(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function hT(e,t,n,r){const u=n.enter("list"),a=n.bulletCurrent;let i=e.ordered?fT(n):ks(n);const o=e.ordered?i==="."?")":".":dT(n);let c=t&&n.bulletLastUsed?i===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((i==="*"||i==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),m1(n)===i&&h){let f=-1;for(;++f<e.children.length;){const m=e.children[f];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(i=o),n.bulletCurrent=i;const l=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=a,u(),l}function pT(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function mT(e,t,n,r){const u=pT(n);let a=n.bulletCurrent||ks(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let i=a.length+1;(u==="tab"||u==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(i=Math.ceil(i/4)*4);const o=n.createTracker(r);o.move(a+" ".repeat(i-a.length)),o.shift(i);const c=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,o.current()),h);return c(),l;function h(f,m,p){return m?(p?"":" ".repeat(i))+f:(p?a:a+" ".repeat(i-a.length))+f}}function gT(e,t,n,r){const u=n.enter("paragraph"),a=n.enter("phrasing"),i=n.containerPhrasing(e,r);return a(),u(),i}const bT=Ta(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function _T(e,t,n,r){return(e.children.some(function(i){return bT(i)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function xT(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}g1.peek=CT;function g1(e,t,n,r){const u=xT(n),a=n.enter("strong"),i=n.createTracker(r),o=i.move(u+u);let c=i.move(n.containerPhrasing(e,{after:u,before:o,...i.current()}));const l=c.charCodeAt(0),h=Ku(r.before.charCodeAt(r.before.length-1),l,u);h.inside&&(c=uu(l)+c.slice(1));const f=c.charCodeAt(c.length-1),m=Ku(r.after.charCodeAt(0),f,u);m.inside&&(c=c.slice(0,-1)+uu(f));const p=i.move(u+u);return a(),n.attentionEncodeSurroundingInfo={after:m.outside,before:h.outside},o+c+p}function CT(e,t,n){return n.options.strong||"*"}function ET(e,t,n,r){return n.safe(e.value,r)}function TT(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function yT(e,t,n){const r=(m1(n)+(n.options.ruleSpaces?" ":"")).repeat(TT(n));return n.options.ruleSpaces?r.slice(0,-1):r}const b1={blockquote:ZE,break:Tc,code:QE,definition:eT,emphasis:s1,hardBreak:Tc,heading:uT,html:o1,image:c1,imageReference:l1,inlineCode:d1,link:h1,linkReference:p1,list:hT,listItem:mT,paragraph:gT,root:_T,strong:g1,text:ET,thematicBreak:yT};function kT(){return{enter:{table:AT,tableData:yc,tableHeader:yc,tableRow:IT},exit:{codeText:NT,table:ST,tableData:oi,tableHeader:oi,tableRow:oi}}}function AT(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function ST(e){this.exit(e),this.data.inTable=void 0}function IT(e){this.enter({type:"tableRow",children:[]},e)}function oi(e){this.exit(e)}function yc(e){this.enter({type:"tableCell",children:[]},e)}function NT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,vT));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function vT(e,t){return t==="|"?t:e}function wT(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,u=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
105
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=uu(l.charCodeAt(0))+l.slice(1)),l=l?i+" "+l:i,n.options.closeAtx&&(l+=" "+i),c(),o(),l}o1.peek=iT;function o1(e){return e.value||""}function iT(){return"<"}c1.peek=sT;function c1(e,t,n,r){const u=ys(n),a=u==='"'?"Quote":"Apostrophe",i=n.enter("image");let o=n.enter("label");const c=n.createTracker(r);let l=c.move("![");return l+=c.move(n.safe(e.alt,{before:l,after:"]",...c.current()})),l+=c.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(o=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":")",...c.current()}))),o(),e.title&&(o=n.enter(`title${a}`),l+=c.move(" "+u),l+=c.move(n.safe(e.title,{before:l,after:u,...c.current()})),l+=c.move(u),o()),l+=c.move(")"),i(),l}function sT(){return"!"}l1.peek=oT;function l1(e,t,n,r){const u=e.referenceType,a=n.enter("imageReference");let i=n.enter("label");const o=n.createTracker(r);let c=o.move("![");const l=n.safe(e.alt,{before:c,after:"]",...o.current()});c+=o.move(l+"]["),i();const h=n.stack;n.stack=[],i=n.enter("reference");const f=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return i(),n.stack=h,a(),u==="full"||!l||l!==f?c+=o.move(f+"]"):u==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function oT(){return"!"}d1.peek=cT;function d1(e,t,n){let r=e.value||"",u="`",a=-1;for(;new RegExp("(^|[^`])"+u+"([^`]|$)").test(r);)u+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const i=n.unsafe[a],o=n.compilePattern(i);let c;if(i.atBreak)for(;c=o.exec(r);){let l=c.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(c.index+1)}}return u+r+u}function cT(){return"`"}function f1(e,t){const n=ps(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}h1.peek=lT;function h1(e,t,n,r){const u=ys(n),a=u==='"'?"Quote":"Apostrophe",i=n.createTracker(r);let o,c;if(f1(e,n)){const h=n.stack;n.stack=[],o=n.enter("autolink");let f=i.move("<");return f+=i.move(n.containerPhrasing(e,{before:f,after:">",...i.current()})),f+=i.move(">"),o(),n.stack=h,f}o=n.enter("link"),c=n.enter("label");let l=i.move("[");return l+=i.move(n.containerPhrasing(e,{before:l,after:"](",...i.current()})),l+=i.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),l+=i.move("<"),l+=i.move(n.safe(e.url,{before:l,after:">",...i.current()})),l+=i.move(">")):(c=n.enter("destinationRaw"),l+=i.move(n.safe(e.url,{before:l,after:e.title?" ":")",...i.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=i.move(" "+u),l+=i.move(n.safe(e.title,{before:l,after:u,...i.current()})),l+=i.move(u),c()),l+=i.move(")"),o(),l}function lT(e,t,n){return f1(e,n)?"<":"["}p1.peek=dT;function p1(e,t,n,r){const u=e.referenceType,a=n.enter("linkReference");let i=n.enter("label");const o=n.createTracker(r);let c=o.move("[");const l=n.containerPhrasing(e,{before:c,after:"]",...o.current()});c+=o.move(l+"]["),i();const h=n.stack;n.stack=[],i=n.enter("reference");const f=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return i(),n.stack=h,a(),u==="full"||!l||l!==f?c+=o.move(f+"]"):u==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function dT(){return"["}function ks(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function fT(e){const t=ks(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function hT(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function m1(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function pT(e,t,n,r){const u=n.enter("list"),a=n.bulletCurrent;let i=e.ordered?hT(n):ks(n);const o=e.ordered?i==="."?")":".":fT(n);let c=t&&n.bulletLastUsed?i===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((i==="*"||i==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),m1(n)===i&&h){let f=-1;for(;++f<e.children.length;){const m=e.children[f];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(i=o),n.bulletCurrent=i;const l=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=a,u(),l}function mT(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function gT(e,t,n,r){const u=mT(n);let a=n.bulletCurrent||ks(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let i=a.length+1;(u==="tab"||u==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(i=Math.ceil(i/4)*4);const o=n.createTracker(r);o.move(a+" ".repeat(i-a.length)),o.shift(i);const c=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,o.current()),h);return c(),l;function h(f,m,p){return m?(p?"":" ".repeat(i))+f:(p?a:a+" ".repeat(i-a.length))+f}}function bT(e,t,n,r){const u=n.enter("paragraph"),a=n.enter("phrasing"),i=n.containerPhrasing(e,r);return a(),u(),i}const _T=Ta(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function xT(e,t,n,r){return(e.children.some(function(i){return _T(i)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function CT(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}g1.peek=ET;function g1(e,t,n,r){const u=CT(n),a=n.enter("strong"),i=n.createTracker(r),o=i.move(u+u);let c=i.move(n.containerPhrasing(e,{after:u,before:o,...i.current()}));const l=c.charCodeAt(0),h=Ku(r.before.charCodeAt(r.before.length-1),l,u);h.inside&&(c=uu(l)+c.slice(1));const f=c.charCodeAt(c.length-1),m=Ku(r.after.charCodeAt(0),f,u);m.inside&&(c=c.slice(0,-1)+uu(f));const p=i.move(u+u);return a(),n.attentionEncodeSurroundingInfo={after:m.outside,before:h.outside},o+c+p}function ET(e,t,n){return n.options.strong||"*"}function TT(e,t,n,r){return n.safe(e.value,r)}function yT(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function kT(e,t,n){const r=(m1(n)+(n.options.ruleSpaces?" ":"")).repeat(yT(n));return n.options.ruleSpaces?r.slice(0,-1):r}const b1={blockquote:WE,break:Tc,code:JE,definition:tT,emphasis:s1,hardBreak:Tc,heading:aT,html:o1,image:c1,imageReference:l1,inlineCode:d1,link:h1,linkReference:p1,list:pT,listItem:gT,paragraph:bT,root:xT,strong:g1,text:TT,thematicBreak:kT};function AT(){return{enter:{table:ST,tableData:yc,tableHeader:yc,tableRow:NT},exit:{codeText:vT,table:IT,tableData:oi,tableHeader:oi,tableRow:oi}}}function ST(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function IT(e){this.exit(e),this.data.inTable=void 0}function NT(e){this.enter({type:"tableRow",children:[]},e)}function oi(e){this.exit(e)}function yc(e){this.enter({type:"tableCell",children:[]},e)}function vT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,wT));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function wT(e,t){return t==="|"?t:e}function DT(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,u=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
106
106
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:i,tableCell:c,tableRow:o}};function i(p,g,x,C){return l(h(p,x,C),p.align)}function o(p,g,x,C){const _=f(p,x,C),v=l([_]);return v.slice(0,v.indexOf(`
107
- `))}function c(p,g,x,C){const _=x.enter("tableCell"),v=x.enter("phrasing"),k=x.containerPhrasing(p,{...C,before:a,after:a});return v(),_(),k}function l(p,g){return zE(p,{align:g,alignDelimiters:r,padding:n,stringLength:u})}function h(p,g,x){const C=p.children;let _=-1;const v=[],k=g.enter("table");for(;++_<C.length;)v[_]=f(C[_],g,x);return k(),v}function f(p,g,x){const C=p.children;let _=-1;const v=[],k=g.enter("tableRow");for(;++_<C.length;)v[_]=c(C[_],p,g,x);return k(),v}function m(p,g,x){let C=b1.inlineCode(p,g,x);return x.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function DT(){return{exit:{taskListCheckValueChecked:kc,taskListCheckValueUnchecked:kc,paragraph:PT}}}function LT(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:RT}}}function kc(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function PT(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const u=t.children;let a=-1,i;for(;++a<u.length;){const o=u[a];if(o.type==="paragraph"){i=o;break}}i===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function RT(e,t,n,r){const u=e.children[0],a=typeof e.checked=="boolean"&&u&&u.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(i);let c=b1.listItem(e,t,n,{...r,...o.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(h){return h+i}}function OT(){return[hE(),RE(),BE(),kT(),DT()]}function MT(e){return{extensions:[pE(),OE(e),jE(),wT(e),LT()]}}const FT={tokenize:$T,partial:!0},_1={tokenize:zT,partial:!0},x1={tokenize:qT,partial:!0},C1={tokenize:ZT,partial:!0},BT={tokenize:WT,partial:!0},E1={name:"wwwAutolink",tokenize:UT,previous:y1},T1={name:"protocolAutolink",tokenize:VT,previous:k1},Tn={name:"emailAutolink",tokenize:HT,previous:A1},hn={};function jT(){return{text:hn}}let qn=48;for(;qn<123;)hn[qn]=Tn,qn++,qn===58?qn=65:qn===91&&(qn=97);hn[43]=Tn;hn[45]=Tn;hn[46]=Tn;hn[95]=Tn;hn[72]=[Tn,T1];hn[104]=[Tn,T1];hn[87]=[Tn,E1];hn[119]=[Tn,E1];function HT(e,t,n){const r=this;let u,a;return i;function i(f){return!Mi(f)||!A1.call(r,r.previous)||As(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(f))}function o(f){return Mi(f)?(e.consume(f),o):f===64?(e.consume(f),c):n(f)}function c(f){return f===46?e.check(BT,h,l)(f):f===45||f===95||ft(f)?(a=!0,e.consume(f),c):h(f)}function l(f){return e.consume(f),u=!0,c}function h(f){return a&&u&&xt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function UT(e,t,n){const r=this;return u;function u(i){return i!==87&&i!==119||!y1.call(r,r.previous)||As(r.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(FT,e.attempt(_1,e.attempt(x1,a),n),n)(i))}function a(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function VT(e,t,n){const r=this;let u="",a=!1;return i;function i(f){return(f===72||f===104)&&k1.call(r,r.previous)&&!As(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),u+=String.fromCodePoint(f),e.consume(f),o):n(f)}function o(f){if(xt(f)&&u.length<5)return u+=String.fromCodePoint(f),e.consume(f),o;if(f===58){const m=u.toLowerCase();if(m==="http"||m==="https")return e.consume(f),c}return n(f)}function c(f){return f===47?(e.consume(f),a?l:(a=!0,c)):n(f)}function l(f){return f===null||Gu(f)||Be(f)||Qn(f)||xa(f)?n(f):e.attempt(_1,e.attempt(x1,h),n)(f)}function h(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function $T(e,t,n){let r=0;return u;function u(i){return(i===87||i===119)&&r<3?(r++,e.consume(i),u):i===46&&r===3?(e.consume(i),a):n(i)}function a(i){return i===null?n(i):t(i)}}function zT(e,t,n){let r,u,a;return i;function i(l){return l===46||l===95?e.check(C1,c,o)(l):l===null||Be(l)||Qn(l)||l!==45&&xa(l)?c(l):(a=!0,e.consume(l),i)}function o(l){return l===95?r=!0:(u=r,r=void 0),e.consume(l),i}function c(l){return u||r||!a?n(l):t(l)}}function qT(e,t){let n=0,r=0;return u;function u(i){return i===40?(n++,e.consume(i),u):i===41&&r<n?a(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(C1,t,a)(i):i===null||Be(i)||Qn(i)?t(i):(e.consume(i),u)}function a(i){return i===41&&r++,e.consume(i),u}}function ZT(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),u):o===60||o===null||Be(o)||Qn(o)?t(o):n(o)}function u(o){return o===null||o===40||o===91||Be(o)||Qn(o)?t(o):r(o)}function a(o){return xt(o)?i(o):n(o)}function i(o){return o===59?(e.consume(o),r):xt(o)?(e.consume(o),i):n(o)}}function WT(e,t,n){return r;function r(a){return e.consume(a),u}function u(a){return ft(a)?n(a):t(a)}}function y1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Be(e)}function k1(e){return!xt(e)}function A1(e){return!(e===47||Mi(e))}function Mi(e){return e===43||e===45||e===46||e===95||ft(e)}function As(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const YT={tokenize:ny,partial:!0};function GT(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:JT,continuation:{tokenize:ey},exit:ty}},text:{91:{name:"gfmFootnoteCall",tokenize:QT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:XT,resolveTo:KT}}}}function XT(e,t,n){const r=this;let u=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;u--;){const c=r.events[u][1];if(c.type==="labelImage"){i=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return o;function o(c){if(!i||!i._balanced)return n(c);const l=Kt(r.sliceSerialize({start:i.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function KT(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};u.end.column++,u.end.offset++,u.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},u.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",u,t],["exit",u,t],["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function QT(e,t,n){const r=this,u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,i;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),c}function c(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(a>999||f===93&&!i||f===null||f===91||Be(f))return n(f);if(f===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return u.includes(Kt(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Be(f)||(i=!0),a++,e.consume(f),f===92?h:l}function h(f){return f===91||f===92||f===93?(e.consume(f),a++,l):l(f)}}function JT(e,t,n){const r=this,u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,i=0,o;return c;function c(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(g)}function h(g){if(i>999||g===93&&!o||g===null||g===91||Be(g))return n(g);if(g===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return a=Kt(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Be(g)||(o=!0),i++,e.consume(g),g===92?f:h}function f(g){return g===91||g===92||g===93?(e.consume(g),i++,h):h(g)}function m(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),u.includes(a)||u.push(a),Ae(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function ey(e,t,n){return e.check(mu,t,e.attempt(YT,t,n))}function ty(e){e.exit("gfmFootnoteDefinition")}function ny(e,t,n){const r=this;return Ae(e,u,"gfmFootnoteDefinitionIndent",5);function u(a){const i=r.events[r.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(a):n(a)}}function ry(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:u};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function u(i,o){let c=-1;for(;++c<i.length;)if(i[c][0]==="enter"&&i[c][1].type==="strikethroughSequenceTemporary"&&i[c][1]._close){let l=c;for(;l--;)if(i[l][0]==="exit"&&i[l][1].type==="strikethroughSequenceTemporary"&&i[l][1]._open&&i[c][1].end.offset-i[c][1].start.offset===i[l][1].end.offset-i[l][1].start.offset){i[c][1].type="strikethroughSequence",i[l][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},i[l][1].start),end:Object.assign({},i[c][1].end)},f={type:"strikethroughText",start:Object.assign({},i[l][1].end),end:Object.assign({},i[c][1].start)},m=[["enter",h,o],["enter",i[l][1],o],["exit",i[l][1],o],["enter",f,o]],p=o.parser.constructs.insideSpan.null;p&&Ft(m,m.length,0,Ca(p,i.slice(l+1,c),o)),Ft(m,m.length,0,[["exit",f,o],["enter",i[c][1],o],["exit",i[c][1],o],["exit",h,o]]),Ft(i,l-1,c-l+3,m),c=l+m.length-2;break}}for(c=-1;++c<i.length;)i[c][1].type==="strikethroughSequenceTemporary"&&(i[c][1].type="data");return i}function a(i,o,c){const l=this.previous,h=this.events;let f=0;return m;function m(g){return l===126&&h[h.length-1][1].type!=="characterEscape"?c(g):(i.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const x=xr(l);if(g===126)return f>1?c(g):(i.consume(g),f++,p);if(f<2&&!n)return c(g);const C=i.exit("strikethroughSequenceTemporary"),_=xr(g);return C._open=!_||_===2&&!!x,C._close=!x||x===2&&!!_,o(g)}}}class uy{constructor(){this.map=[]}add(t,n,r){ay(this,t,n,r)}consume(t){if(this.map.sort(function(a,i){return a[0]-i[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let u=r.pop();for(;u;){for(const a of u)t.push(a);u=r.pop()}this.map.length=0}}function ay(e,t,n,r){let u=0;if(!(n===0&&r.length===0)){for(;u<e.map.length;){if(e.map[u][0]===t){e.map[u][1]+=n,e.map[u][2].push(...r);return}u+=1}e.map.push([t,n,r])}}function iy(e,t){let n=!1;const r=[];for(;t<e.length;){const u=e[t];if(n){if(u[0]==="enter")u[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(u[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(u[1].type==="tableDelimiterRow")break}else u[0]==="enter"&&u[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function sy(){return{flow:{null:{name:"table",tokenize:oy,resolveAll:cy}}}}function oy(e,t,n){const r=this;let u=0,a=0,i;return o;function o(L){let j=r.events.length-1;for(;j>-1;){const ae=r.events[j][1].type;if(ae==="lineEnding"||ae==="linePrefix")j--;else break}const F=j>-1?r.events[j][1].type:null,Q=F==="tableHead"||F==="tableRow"?I:c;return Q===I&&r.parser.lazy[r.now().line]?n(L):Q(L)}function c(L){return e.enter("tableHead"),e.enter("tableRow"),l(L)}function l(L){return L===124||(i=!0,a+=1),h(L)}function h(L){return L===null?n(L):ue(L)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),p):n(L):ye(L)?Ae(e,h,"whitespace")(L):(a+=1,i&&(i=!1,u+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),i=!0,h):(e.enter("data"),f(L)))}function f(L){return L===null||L===124||Be(L)?(e.exit("data"),h(L)):(e.consume(L),L===92?m:f)}function m(L){return L===92||L===124?(e.consume(L),f):f(L)}function p(L){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(L):(e.enter("tableDelimiterRow"),i=!1,ye(L)?Ae(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):g(L))}function g(L){return L===45||L===58?C(L):L===124?(i=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),x):S(L)}function x(L){return ye(L)?Ae(e,C,"whitespace")(L):C(L)}function C(L){return L===58?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),_):L===45?(a+=1,_(L)):L===null||ue(L)?D(L):S(L)}function _(L){return L===45?(e.enter("tableDelimiterFiller"),v(L)):S(L)}function v(L){return L===45?(e.consume(L),v):L===58?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(L))}function k(L){return ye(L)?Ae(e,D,"whitespace")(L):D(L)}function D(L){return L===124?g(L):L===null||ue(L)?!i||u!==a?S(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):S(L)}function S(L){return n(L)}function I(L){return e.enter("tableRow"),M(L)}function M(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),M):L===null||ue(L)?(e.exit("tableRow"),t(L)):ye(L)?Ae(e,M,"whitespace")(L):(e.enter("data"),q(L))}function q(L){return L===null||L===124||Be(L)?(e.exit("data"),M(L)):(e.consume(L),L===92?U:q)}function U(L){return L===92||L===124?(e.consume(L),q):q(L)}}function cy(e,t){let n=-1,r=!0,u=0,a=[0,0,0,0],i=[0,0,0,0],o=!1,c=0,l,h,f;const m=new uy;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(o=!1,c!==0&&(Ac(m,t,c,l,h),h=void 0,c=0),l={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",l,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],i=[0,n+1,0,0],o&&(o=!1,h={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",h,t]])),u=g.type==="tableDelimiterRow"?2:h?3:1):u&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,i[2]===0&&(a[1]!==0&&(i[0]=i[1],f=Mu(m,t,a,u,void 0,f),a=[0,0,0,0]),i[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(i[0]=i[1],f=Mu(m,t,a,u,void 0,f)),a=i,i=[a[1],n,0,0])):g.type==="tableHead"?(o=!0,c=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(c=n,a[1]!==0?(i[0]=i[1],f=Mu(m,t,a,u,n,f)):i[1]!==0&&(f=Mu(m,t,i,u,n,f)),u=0):u&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(i[3]=n)}for(c!==0&&Ac(m,t,c,l,h),m.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=iy(t.events,n))}return e}function Mu(e,t,n,r,u,a){const i=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(a.end=Object.assign({},lr(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=lr(t.events,n[1]);if(a={type:i,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=lr(t.events,n[2]),h=lr(t.events,n[3]),f={type:o,start:Object.assign({},l),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const m=t.events[n[2]],p=t.events[n[3]];if(m[1].end=Object.assign({},p[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,x=n[3]-n[2]-1;e.add(g,x,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return u!==void 0&&(a.end=Object.assign({},lr(t.events,u)),e.add(u,0,[["exit",a,t]]),a=void 0),a}function Ac(e,t,n,r,u){const a=[],i=lr(t.events,n);u&&(u.end=Object.assign({},i),a.push(["exit",u,t])),r.end=Object.assign({},i),a.push(["exit",r,t]),e.add(n+1,0,a)}function lr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const ly={name:"tasklistCheck",tokenize:fy};function dy(){return{text:{91:ly}}}function fy(e,t,n){const r=this;return u;function u(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return Be(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),i):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),i):n(c)}function i(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(c)}function o(c){return ue(c)?t(c):ye(c)?e.check({tokenize:hy},t,n)(c):n(c)}}function hy(e,t,n){return Ae(e,r,"whitespace");function r(u){return u===null?n(u):t(u)}}function py(e){return R0([jT(),GT(),ry(e),sy(),dy()])}const my={};function S1(e){const t=this,n=e||my,r=t.data(),u=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),i=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);u.push(py(n)),a.push(OT()),i.push(MT(n))}const Sc=/[#.]/g;function gy(e,t){const n=e||"",r={};let u=0,a,i;for(;u<n.length;){Sc.lastIndex=u;const o=Sc.exec(n),c=n.slice(u,o?o.index:n.length);c&&(a?a==="#"?r.id=c:Array.isArray(r.className)?r.className.push(c):r.className=[c]:i=c,u+=c.length),o&&(a=o[0],u++)}return{type:"element",tagName:i||t||"div",properties:r,children:[]}}function I1(e,t,n){const r=n?Cy(n):void 0;function u(a,i,...o){let c;if(a==null){c={type:"root",children:[]};const l=i;o.unshift(l)}else{c=gy(a,t);const l=c.tagName.toLowerCase(),h=r?r.get(l):void 0;if(c.tagName=h||l,by(i))o.unshift(i);else for(const[f,m]of Object.entries(i))_y(e,c.properties,f,m)}for(const l of o)Fi(c.children,l);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return u}function by(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const u=t[r];if(u&&typeof u=="object"){if(!Array.isArray(u))return!0;const a=u;for(const i of a)if(typeof i!="number"&&typeof i!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function _y(e,t,n,r){const u=ls(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?u.spaceSeparated?a=Po(r):u.commaSeparated?a=No(r):u.commaOrSpaceSeparated?a=Po(No(r).join(" ")):a=Ic(u,u.property,r):Array.isArray(r)?a=[...r]:a=u.property==="style"?xy(r):String(r);if(Array.isArray(a)){const i=[];for(const o of a)i.push(Ic(u,u.property,o));a=i}u.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[u.property]=a}}function Fi(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Fi(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Fi(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Ic(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||nu(n)===nu(t)))return!0}return n}function xy(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Cy(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Ey=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],Ty=I1(ba,"div"),yy=I1(Sr,"g",Ey);function ky(e){const t=String(e),n=[];return{toOffset:u,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let i=0;for(;;){let o=n[i];if(o===void 0){const c=Nc(t,n[i-1]);o=c===-1?t.length+1:c+1,n[i]=o}if(o>a)return{line:i+1,column:a-(i>0?n[i-1]:0)+1,offset:a};i++}}}function u(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const o=n[n.length-1],c=Nc(t,o),l=c===-1?t.length+1:c+1;if(o===l)break;n.push(l)}const i=(a.line>1?n[a.line-2]:0)+a.column-1;if(i<n[a.line-1])return i}}}function Nc(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
108
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Xn={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},N1={}.hasOwnProperty,Ay=Object.prototype;function Sy(e,t){const n=t||{};return Ss({file:n.file||void 0,location:!1,schema:n.space==="svg"?Sr:ba,verbose:n.verbose||!1},e)}function Ss(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},$u(e,r,n),n}case"#document":case"#document-fragment":{const r=t,u="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:v1(e,t.childNodes),data:{quirksMode:u}},e.file&&e.location){const a=String(e.file),i=ky(a),o=i.toPoint(0),c=i.toPoint(a.length);n.position={start:o,end:c}}return n}case"#documentType":{const r=t;return n={type:"doctype"},$u(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},$u(e,r,n),n}default:return n=Iy(e,t),n}}function v1(e,t){let n=-1;const r=[];for(;++n<t.length;){const u=Ss(e,t[n]);r.push(u)}return r}function Iy(e,t){const n=e.schema;e.schema=t.namespaceURI===Xn.svg?Sr:ba;let r=-1;const u={};for(;++r<t.attrs.length;){const o=t.attrs[r],c=(o.prefix?o.prefix+":":"")+o.name;N1.call(Ay,c)||(u[c]=o.value)}const i=(e.schema.space==="svg"?yy:Ty)(t.tagName,u,v1(e,t.childNodes));if($u(e,t,i),i.tagName==="template"){const o=t,c=o.sourceCodeLocation,l=c&&c.startTag&&dr(c.startTag),h=c&&c.endTag&&dr(c.endTag),f=Ss(e,o.content);l&&h&&e.file&&(f.position={start:l.end,end:h.start}),i.content=f}return e.schema=n,i}function $u(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Ny(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Ny(e,t,n){const r=dr(n);if(t.type==="element"){const u=t.children[t.children.length-1];if(r&&!n.endTag&&u&&u.position&&u.position.end&&(r.end=Object.assign({},u.position.end)),e.verbose){const a={};let i;if(n.attrs)for(i in n.attrs)N1.call(n.attrs,i)&&(a[ls(e.schema,i).property]=dr(n.attrs[i]));n.startTag;const o=dr(n.startTag),c=n.endTag?dr(n.endTag):void 0,l={opening:o};c&&(l.closing=c),l.properties=a,t.data={position:l}}}return r}function dr(e){const t=vc({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=vc({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function vc(e){return e.line&&e.column?e:void 0}class bu{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}bu.prototype.property={};bu.prototype.normal={};bu.prototype.space=null;function w1(e,t){const n={},r={};let u=-1;for(;++u<e.length;)Object.assign(n,e[u].property),Object.assign(r,e[u].normal);return new bu(n,r,t)}function Bi(e){return e.toLowerCase()}class Wt{constructor(t,n){this.property=t,this.attribute=n}}Wt.prototype.space=null;Wt.prototype.boolean=!1;Wt.prototype.booleanish=!1;Wt.prototype.overloadedBoolean=!1;Wt.prototype.number=!1;Wt.prototype.commaSeparated=!1;Wt.prototype.spaceSeparated=!1;Wt.prototype.commaOrSpaceSeparated=!1;Wt.prototype.mustUseProperty=!1;Wt.prototype.defined=!1;let vy=0;const me=nr(),Qe=nr(),D1=nr(),Y=nr(),Ue=nr(),gr=nr(),Rt=nr();function nr(){return 2**++vy}const ji=Object.freeze(Object.defineProperty({__proto__:null,boolean:me,booleanish:Qe,commaOrSpaceSeparated:Rt,commaSeparated:gr,number:Y,overloadedBoolean:D1,spaceSeparated:Ue},Symbol.toStringTag,{value:"Module"})),ci=Object.keys(ji);class Is extends Wt{constructor(t,n,r,u){let a=-1;if(super(t,n),wc(this,"space",u),typeof r=="number")for(;++a<ci.length;){const i=ci[a];wc(this,ci[a],(r&ji[i])===ji[i])}}}Is.prototype.defined=!0;function wc(e,t,n){n&&(e[t]=n)}const wy={}.hasOwnProperty;function Nr(e){const t={},n={};let r;for(r in e.properties)if(wy.call(e.properties,r)){const u=e.properties[r],a=new Is(r,e.transform(e.attributes||{},r),u,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Bi(r)]=r,n[Bi(a.attribute)]=r}return new bu(t,n,e.space)}const L1=Nr({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),P1=Nr({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function R1(e,t){return t in e?e[t]:t}function O1(e,t){return R1(e,t.toLowerCase())}const M1=Nr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:O1,properties:{xmlns:null,xmlnsXLink:null}}),F1=Nr({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Qe,ariaAutoComplete:null,ariaBusy:Qe,ariaChecked:Qe,ariaColCount:Y,ariaColIndex:Y,ariaColSpan:Y,ariaControls:Ue,ariaCurrent:null,ariaDescribedBy:Ue,ariaDetails:null,ariaDisabled:Qe,ariaDropEffect:Ue,ariaErrorMessage:null,ariaExpanded:Qe,ariaFlowTo:Ue,ariaGrabbed:Qe,ariaHasPopup:null,ariaHidden:Qe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ue,ariaLevel:Y,ariaLive:null,ariaModal:Qe,ariaMultiLine:Qe,ariaMultiSelectable:Qe,ariaOrientation:null,ariaOwns:Ue,ariaPlaceholder:null,ariaPosInSet:Y,ariaPressed:Qe,ariaReadOnly:Qe,ariaRelevant:null,ariaRequired:Qe,ariaRoleDescription:Ue,ariaRowCount:Y,ariaRowIndex:Y,ariaRowSpan:Y,ariaSelected:Qe,ariaSetSize:Y,ariaSort:null,ariaValueMax:Y,ariaValueMin:Y,ariaValueNow:Y,ariaValueText:null,role:null}}),Dy=Nr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:O1,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:gr,acceptCharset:Ue,accessKey:Ue,action:null,allow:null,allowFullScreen:me,allowPaymentRequest:me,allowUserMedia:me,alt:null,as:null,async:me,autoCapitalize:null,autoComplete:Ue,autoFocus:me,autoPlay:me,blocking:Ue,capture:null,charSet:null,checked:me,cite:null,className:Ue,cols:Y,colSpan:null,content:null,contentEditable:Qe,controls:me,controlsList:Ue,coords:Y|gr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:me,defer:me,dir:null,dirName:null,disabled:me,download:D1,draggable:Qe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:me,formTarget:null,headers:Ue,height:Y,hidden:me,high:Y,href:null,hrefLang:null,htmlFor:Ue,httpEquiv:Ue,id:null,imageSizes:null,imageSrcSet:null,inert:me,inputMode:null,integrity:null,is:null,isMap:me,itemId:null,itemProp:Ue,itemRef:Ue,itemScope:me,itemType:Ue,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:me,low:Y,manifest:null,max:null,maxLength:Y,media:null,method:null,min:null,minLength:Y,multiple:me,muted:me,name:null,nonce:null,noModule:me,noValidate:me,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:me,optimum:Y,pattern:null,ping:Ue,placeholder:null,playsInline:me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:me,referrerPolicy:null,rel:Ue,required:me,reversed:me,rows:Y,rowSpan:Y,sandbox:Ue,scope:null,scoped:me,seamless:me,selected:me,shadowRootClonable:me,shadowRootDelegatesFocus:me,shadowRootMode:null,shape:null,size:Y,sizes:null,slot:null,span:Y,spellCheck:Qe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Y,step:null,style:null,tabIndex:Y,target:null,title:null,translate:null,type:null,typeMustMatch:me,useMap:null,value:Qe,width:Y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ue,axis:null,background:null,bgColor:null,border:Y,borderColor:null,bottomMargin:Y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:me,declare:me,event:null,face:null,frame:null,frameBorder:null,hSpace:Y,leftMargin:Y,link:null,longDesc:null,lowSrc:null,marginHeight:Y,marginWidth:Y,noResize:me,noHref:me,noShade:me,noWrap:me,object:null,profile:null,prompt:null,rev:null,rightMargin:Y,rules:null,scheme:null,scrolling:Qe,standby:null,summary:null,text:null,topMargin:Y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Y,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:me,disableRemotePlayback:me,prefix:null,property:null,results:Y,security:null,unselectable:null}}),Ly=Nr({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:R1,properties:{about:Rt,accentHeight:Y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Y,amplitude:Y,arabicForm:null,ascent:Y,attributeName:null,attributeType:null,azimuth:Y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Y,by:null,calcMode:null,capHeight:Y,className:Ue,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Y,diffuseConstant:Y,direction:null,display:null,dur:null,divisor:Y,dominantBaseline:null,download:me,dx:null,dy:null,edgeMode:null,editable:null,elevation:Y,enableBackground:null,end:null,event:null,exponent:Y,externalResourcesRequired:null,fill:null,fillOpacity:Y,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:gr,g2:gr,glyphName:gr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Y,horizOriginX:Y,horizOriginY:Y,id:null,ideographic:Y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Y,k:Y,k1:Y,k2:Y,k3:Y,k4:Y,kernelMatrix:Rt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Y,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Y,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Y,overlineThickness:Y,paintOrder:null,panose1:null,path:null,pathLength:Y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ue,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Y,pointsAtY:Y,pointsAtZ:Y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Rt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Rt,rev:Rt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Rt,requiredFeatures:Rt,requiredFonts:Rt,requiredFormats:Rt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Y,specularExponent:Y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Y,strikethroughThickness:Y,string:null,stroke:null,strokeDashArray:Rt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Y,strokeOpacity:Y,strokeWidth:null,style:null,surfaceScale:Y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Rt,tabIndex:Y,tableValues:null,target:null,targetX:Y,targetY:Y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Rt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Y,underlineThickness:Y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Y,values:null,vAlphabetic:Y,vMathematical:Y,vectorEffect:null,vHanging:Y,vIdeographic:Y,version:null,vertAdvY:Y,vertOriginX:Y,vertOriginY:Y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Py=/^data[-\w.:]+$/i,Dc=/-[a-z]/g,Ry=/[A-Z]/g;function Oy(e,t){const n=Bi(t);let r=t,u=Wt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Py.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Dc,Fy);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Dc.test(a)){let i=a.replace(Ry,My);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}u=Is}return new u(r,t)}function My(e){return"-"+e.toLowerCase()}function Fy(e){return e.charAt(1).toUpperCase()}const By=w1([P1,L1,M1,F1,Dy],"html"),B1=w1([P1,L1,M1,F1,Ly],"svg"),jy={},Hy={}.hasOwnProperty,j1=i1("type",{handlers:{root:Vy,element:Wy,text:qy,comment:Zy,doctype:zy}});function Uy(e,t){const r=(t||jy).space;return j1(e,r==="svg"?B1:By)}function Vy(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Ns(e.children,n,t),vr(e,n),n}function $y(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Ns(e.children,n,t),vr(e,n),n}function zy(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return vr(e,t),t}function qy(e){const t={nodeName:"#text",value:e.value,parentNode:null};return vr(e,t),t}function Zy(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return vr(e,t),t}function Wy(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=B1);const u=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&Hy.call(e.properties,a)){const c=Yy(r,a,e.properties[a]);c&&u.push(c)}}const i=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:u,namespaceURI:Xn[i],childNodes:[],parentNode:null};return o.childNodes=Ns(e.children,o,r),vr(e,o),e.tagName==="template"&&e.content&&(o.content=$y(e.content,r)),o}function Yy(e,t,n){const r=Oy(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?b0(n):S0(n));const u={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=u.name.indexOf(":");a<0?u.prefix="":(u.name=u.name.slice(a+1),u.prefix=r.attribute.slice(0,a)),u.namespace=Xn[r.space]}return u}function Ns(e,t,n){let r=-1;const u=[];if(e)for(;++r<e.length;){const a=j1(e[r],n);a.parentNode=t,u.push(a)}return u}function vr(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const Gy=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Xy=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),$e="�";var T;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(T||(T={}));const Et={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function H1(e){return e>=55296&&e<=57343}function Ky(e){return e>=56320&&e<=57343}function Qy(e,t){return(e-55296)*1024+9216+t}function U1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function V1(e){return e>=64976&&e<=65007||Xy.has(e)}var O;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(O||(O={}));const Jy=65536;class ek{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Jy,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:u,offset:a}=this,i=u+n,o=a+n;return{code:t,startLine:r,endLine:r,startCol:i,endCol:i,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Ky(n))return this.pos++,this._addGap(),Qy(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,T.EOF;return this._err(O.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,T.EOF;const r=this.html.charCodeAt(n);return r===T.CARRIAGE_RETURN?T.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,T.EOF;let t=this.html.charCodeAt(this.pos);return t===T.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,T.LINE_FEED):t===T.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,H1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===T.LINE_FEED||t===T.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){U1(t)?this._err(O.controlCharacterInInputStream):V1(t)&&this._err(O.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var xe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(xe||(xe={}));function $1(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const tk=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),nk=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function rk(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=nk.get(e))!==null&&t!==void 0?t:e}var st;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(st||(st={}));const uk=32;var Mn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Mn||(Mn={}));function Hi(e){return e>=st.ZERO&&e<=st.NINE}function ak(e){return e>=st.UPPER_A&&e<=st.UPPER_F||e>=st.LOWER_A&&e<=st.LOWER_F}function ik(e){return e>=st.UPPER_A&&e<=st.UPPER_Z||e>=st.LOWER_A&&e<=st.LOWER_Z||Hi(e)}function sk(e){return e===st.EQUALS||ik(e)}var ut;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ut||(ut={}));var En;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(En||(En={}));class ok{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=ut.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=En.Strict}startEntity(t){this.decodeMode=t,this.state=ut.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case ut.EntityStart:return t.charCodeAt(n)===st.NUM?(this.state=ut.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=ut.NamedEntity,this.stateNamedEntity(t,n));case ut.NumericStart:return this.stateNumericStart(t,n);case ut.NumericDecimal:return this.stateNumericDecimal(t,n);case ut.NumericHex:return this.stateNumericHex(t,n);case ut.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|uk)===st.LOWER_X?(this.state=ut.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=ut.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,u){if(n!==r){const a=r-n;this.result=this.result*Math.pow(u,a)+Number.parseInt(t.substr(n,a),u),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const u=t.charCodeAt(n);if(Hi(u)||ak(u))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(u,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const u=t.charCodeAt(n);if(Hi(u))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(u,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===st.SEMI)this.consumed+=1;else if(this.decodeMode===En.Strict)return 0;return this.emitCodePoint(rk(this.result),this.consumed),this.errors&&(t!==st.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let u=r[this.treeIndex],a=(u&Mn.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const i=t.charCodeAt(n);if(this.treeIndex=ck(r,u,this.treeIndex+Math.max(1,a),i),this.treeIndex<0)return this.result===0||this.decodeMode===En.Attribute&&(a===0||sk(i))?0:this.emitNotTerminatedNamedEntity();if(u=r[this.treeIndex],a=(u&Mn.VALUE_LENGTH)>>14,a!==0){if(i===st.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==En.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,u=(r[n]&Mn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,u,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:u}=this;return this.emitCodePoint(n===1?u[t]&~Mn.VALUE_LENGTH:u[t+1],r),n===3&&this.emitCodePoint(u[t+2],r),r}end(){var t;switch(this.state){case ut.NamedEntity:return this.result!==0&&(this.decodeMode!==En.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ut.NumericDecimal:return this.emitNumericEntity(0,2);case ut.NumericHex:return this.emitNumericEntity(0,3);case ut.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ut.EntityStart:return 0}}}function ck(e,t,n,r){const u=(t&Mn.BRANCH_LENGTH)>>7,a=t&Mn.JUMP_TABLE;if(u===0)return a!==0&&r===a?n:-1;if(a){const c=r-a;return c<0||c>=u?-1:e[n+c]-1}let i=n,o=i+u-1;for(;i<=o;){const c=i+o>>>1,l=e[c];if(l<r)i=c+1;else if(l>r)o=c-1;else return e[c+u]}return-1}var V;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(V||(V={}));var Kn;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Kn||(Kn={}));var zt;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(zt||(zt={}));var R;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(R||(R={}));var d;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(d||(d={}));const lk=new Map([[R.A,d.A],[R.ADDRESS,d.ADDRESS],[R.ANNOTATION_XML,d.ANNOTATION_XML],[R.APPLET,d.APPLET],[R.AREA,d.AREA],[R.ARTICLE,d.ARTICLE],[R.ASIDE,d.ASIDE],[R.B,d.B],[R.BASE,d.BASE],[R.BASEFONT,d.BASEFONT],[R.BGSOUND,d.BGSOUND],[R.BIG,d.BIG],[R.BLOCKQUOTE,d.BLOCKQUOTE],[R.BODY,d.BODY],[R.BR,d.BR],[R.BUTTON,d.BUTTON],[R.CAPTION,d.CAPTION],[R.CENTER,d.CENTER],[R.CODE,d.CODE],[R.COL,d.COL],[R.COLGROUP,d.COLGROUP],[R.DD,d.DD],[R.DESC,d.DESC],[R.DETAILS,d.DETAILS],[R.DIALOG,d.DIALOG],[R.DIR,d.DIR],[R.DIV,d.DIV],[R.DL,d.DL],[R.DT,d.DT],[R.EM,d.EM],[R.EMBED,d.EMBED],[R.FIELDSET,d.FIELDSET],[R.FIGCAPTION,d.FIGCAPTION],[R.FIGURE,d.FIGURE],[R.FONT,d.FONT],[R.FOOTER,d.FOOTER],[R.FOREIGN_OBJECT,d.FOREIGN_OBJECT],[R.FORM,d.FORM],[R.FRAME,d.FRAME],[R.FRAMESET,d.FRAMESET],[R.H1,d.H1],[R.H2,d.H2],[R.H3,d.H3],[R.H4,d.H4],[R.H5,d.H5],[R.H6,d.H6],[R.HEAD,d.HEAD],[R.HEADER,d.HEADER],[R.HGROUP,d.HGROUP],[R.HR,d.HR],[R.HTML,d.HTML],[R.I,d.I],[R.IMG,d.IMG],[R.IMAGE,d.IMAGE],[R.INPUT,d.INPUT],[R.IFRAME,d.IFRAME],[R.KEYGEN,d.KEYGEN],[R.LABEL,d.LABEL],[R.LI,d.LI],[R.LINK,d.LINK],[R.LISTING,d.LISTING],[R.MAIN,d.MAIN],[R.MALIGNMARK,d.MALIGNMARK],[R.MARQUEE,d.MARQUEE],[R.MATH,d.MATH],[R.MENU,d.MENU],[R.META,d.META],[R.MGLYPH,d.MGLYPH],[R.MI,d.MI],[R.MO,d.MO],[R.MN,d.MN],[R.MS,d.MS],[R.MTEXT,d.MTEXT],[R.NAV,d.NAV],[R.NOBR,d.NOBR],[R.NOFRAMES,d.NOFRAMES],[R.NOEMBED,d.NOEMBED],[R.NOSCRIPT,d.NOSCRIPT],[R.OBJECT,d.OBJECT],[R.OL,d.OL],[R.OPTGROUP,d.OPTGROUP],[R.OPTION,d.OPTION],[R.P,d.P],[R.PARAM,d.PARAM],[R.PLAINTEXT,d.PLAINTEXT],[R.PRE,d.PRE],[R.RB,d.RB],[R.RP,d.RP],[R.RT,d.RT],[R.RTC,d.RTC],[R.RUBY,d.RUBY],[R.S,d.S],[R.SCRIPT,d.SCRIPT],[R.SEARCH,d.SEARCH],[R.SECTION,d.SECTION],[R.SELECT,d.SELECT],[R.SOURCE,d.SOURCE],[R.SMALL,d.SMALL],[R.SPAN,d.SPAN],[R.STRIKE,d.STRIKE],[R.STRONG,d.STRONG],[R.STYLE,d.STYLE],[R.SUB,d.SUB],[R.SUMMARY,d.SUMMARY],[R.SUP,d.SUP],[R.TABLE,d.TABLE],[R.TBODY,d.TBODY],[R.TEMPLATE,d.TEMPLATE],[R.TEXTAREA,d.TEXTAREA],[R.TFOOT,d.TFOOT],[R.TD,d.TD],[R.TH,d.TH],[R.THEAD,d.THEAD],[R.TITLE,d.TITLE],[R.TR,d.TR],[R.TRACK,d.TRACK],[R.TT,d.TT],[R.U,d.U],[R.UL,d.UL],[R.SVG,d.SVG],[R.VAR,d.VAR],[R.WBR,d.WBR],[R.XMP,d.XMP]]);function wr(e){var t;return(t=lk.get(e))!==null&&t!==void 0?t:d.UNKNOWN}const $=d,dk={[V.HTML]:new Set([$.ADDRESS,$.APPLET,$.AREA,$.ARTICLE,$.ASIDE,$.BASE,$.BASEFONT,$.BGSOUND,$.BLOCKQUOTE,$.BODY,$.BR,$.BUTTON,$.CAPTION,$.CENTER,$.COL,$.COLGROUP,$.DD,$.DETAILS,$.DIR,$.DIV,$.DL,$.DT,$.EMBED,$.FIELDSET,$.FIGCAPTION,$.FIGURE,$.FOOTER,$.FORM,$.FRAME,$.FRAMESET,$.H1,$.H2,$.H3,$.H4,$.H5,$.H6,$.HEAD,$.HEADER,$.HGROUP,$.HR,$.HTML,$.IFRAME,$.IMG,$.INPUT,$.LI,$.LINK,$.LISTING,$.MAIN,$.MARQUEE,$.MENU,$.META,$.NAV,$.NOEMBED,$.NOFRAMES,$.NOSCRIPT,$.OBJECT,$.OL,$.P,$.PARAM,$.PLAINTEXT,$.PRE,$.SCRIPT,$.SECTION,$.SELECT,$.SOURCE,$.STYLE,$.SUMMARY,$.TABLE,$.TBODY,$.TD,$.TEMPLATE,$.TEXTAREA,$.TFOOT,$.TH,$.THEAD,$.TITLE,$.TR,$.TRACK,$.UL,$.WBR,$.XMP]),[V.MATHML]:new Set([$.MI,$.MO,$.MN,$.MS,$.MTEXT,$.ANNOTATION_XML]),[V.SVG]:new Set([$.TITLE,$.FOREIGN_OBJECT,$.DESC]),[V.XLINK]:new Set,[V.XML]:new Set,[V.XMLNS]:new Set},Ui=new Set([$.H1,$.H2,$.H3,$.H4,$.H5,$.H6]);R.STYLE,R.SCRIPT,R.XMP,R.IFRAME,R.NOEMBED,R.NOFRAMES,R.PLAINTEXT;var A;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(A||(A={}));const Ge={DATA:A.DATA,RCDATA:A.RCDATA,RAWTEXT:A.RAWTEXT,SCRIPT_DATA:A.SCRIPT_DATA,PLAINTEXT:A.PLAINTEXT,CDATA_SECTION:A.CDATA_SECTION};function fk(e){return e>=T.DIGIT_0&&e<=T.DIGIT_9}function Ur(e){return e>=T.LATIN_CAPITAL_A&&e<=T.LATIN_CAPITAL_Z}function hk(e){return e>=T.LATIN_SMALL_A&&e<=T.LATIN_SMALL_Z}function vn(e){return hk(e)||Ur(e)}function Lc(e){return vn(e)||fk(e)}function Fu(e){return e+32}function z1(e){return e===T.SPACE||e===T.LINE_FEED||e===T.TABULATION||e===T.FORM_FEED}function Pc(e){return z1(e)||e===T.SOLIDUS||e===T.GREATER_THAN_SIGN}function pk(e){return e===T.NULL?O.nullCharacterReference:e>1114111?O.characterReferenceOutsideUnicodeRange:H1(e)?O.surrogateCharacterReference:V1(e)?O.noncharacterCharacterReference:U1(e)||e===T.CARRIAGE_RETURN?O.controlCharacterReference:null}class mk{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=A.DATA,this.returnState=A.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new ek(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new ok(tk,(r,u)=>{this.preprocessor.pos=this.entityStartPos+u-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(O.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(O.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const u=pk(r);u&&this._err(u,1)}}:void 0)}_err(t,n=0){var r,u;(u=(r=this.handler).onParseError)===null||u===void 0||u.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:xe.START_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:xe.END_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:xe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:xe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if($1(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const u=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);u[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(O.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=wr(t.tagName),t.type===xe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(O.endTagWithAttributes),t.selfClosing&&this._err(O.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case xe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case xe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case xe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:xe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=z1(t)?xe.WHITESPACE_CHARACTER:t===T.NULL?xe.NULL_CHARACTER:xe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(xe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=A.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?En.Attribute:En.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===A.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===A.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===A.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case A.DATA:{this._stateData(t);break}case A.RCDATA:{this._stateRcdata(t);break}case A.RAWTEXT:{this._stateRawtext(t);break}case A.SCRIPT_DATA:{this._stateScriptData(t);break}case A.PLAINTEXT:{this._statePlaintext(t);break}case A.TAG_OPEN:{this._stateTagOpen(t);break}case A.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case A.TAG_NAME:{this._stateTagName(t);break}case A.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case A.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case A.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case A.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case A.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case A.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case A.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case A.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case A.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case A.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case A.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case A.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case A.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case A.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case A.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case A.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case A.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case A.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case A.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case A.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case A.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case A.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case A.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case A.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case A.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case A.BOGUS_COMMENT:{this._stateBogusComment(t);break}case A.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case A.COMMENT_START:{this._stateCommentStart(t);break}case A.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case A.COMMENT:{this._stateComment(t);break}case A.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case A.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case A.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case A.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case A.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case A.COMMENT_END:{this._stateCommentEnd(t);break}case A.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case A.DOCTYPE:{this._stateDoctype(t);break}case A.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case A.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case A.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case A.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case A.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case A.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case A.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case A.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case A.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case A.CDATA_SECTION:{this._stateCdataSection(t);break}case A.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case A.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case A.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case A.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case T.LESS_THAN_SIGN:{this.state=A.TAG_OPEN;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.NULL:{this._err(O.unexpectedNullCharacter),this._emitCodePoint(t);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case T.AMPERSAND:{this._startCharacterReference();break}case T.LESS_THAN_SIGN:{this.state=A.RCDATA_LESS_THAN_SIGN;break}case T.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars($e);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case T.LESS_THAN_SIGN:{this.state=A.RAWTEXT_LESS_THAN_SIGN;break}case T.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars($e);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case T.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_LESS_THAN_SIGN;break}case T.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars($e);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case T.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars($e);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(vn(t))this._createStartTagToken(),this.state=A.TAG_NAME,this._stateTagName(t);else switch(t){case T.EXCLAMATION_MARK:{this.state=A.MARKUP_DECLARATION_OPEN;break}case T.SOLIDUS:{this.state=A.END_TAG_OPEN;break}case T.QUESTION_MARK:{this._err(O.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=A.BOGUS_COMMENT,this._stateBogusComment(t);break}case T.EOF:{this._err(O.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(O.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=A.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(vn(t))this._createEndTagToken(),this.state=A.TAG_NAME,this._stateTagName(t);else switch(t){case T.GREATER_THAN_SIGN:{this._err(O.missingEndTagName),this.state=A.DATA;break}case T.EOF:{this._err(O.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(O.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=A.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=A.BEFORE_ATTRIBUTE_NAME;break}case T.SOLIDUS:{this.state=A.SELF_CLOSING_START_TAG;break}case T.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentTagToken();break}case T.NULL:{this._err(O.unexpectedNullCharacter),n.tagName+=$e;break}case T.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ur(t)?Fu(t):t)}}_stateRcdataLessThanSign(t){t===T.SOLIDUS?this.state=A.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=A.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){vn(t)?(this.state=A.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=A.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=A.BEFORE_ATTRIBUTE_NAME,!1;case T.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=A.SELF_CLOSING_START_TAG,!1;case T.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=A.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===T.SOLIDUS?this.state=A.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=A.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){vn(t)?(this.state=A.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=A.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case T.SOLIDUS:{this.state=A.SCRIPT_DATA_END_TAG_OPEN;break}case T.EXCLAMATION_MARK:{this.state=A.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=A.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){vn(t)?(this.state=A.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===T.HYPHEN_MINUS?(this.state=A.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===T.HYPHEN_MINUS?(this.state=A.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case T.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case T.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars($e);break}case T.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case T.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case T.NULL:{this._err(O.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_ESCAPED,this._emitChars($e);break}case T.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case T.HYPHEN_MINUS:{this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case T.GREATER_THAN_SIGN:{this.state=A.SCRIPT_DATA,this._emitChars(">");break}case T.NULL:{this._err(O.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_ESCAPED,this._emitChars($e);break}case T.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===T.SOLIDUS?this.state=A.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:vn(t)?(this._emitChars("<"),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){vn(t)?(this.state=A.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Et.SCRIPT,!1)&&Pc(this.preprocessor.peek(Et.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Et.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case T.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case T.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars($e);break}case T.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case T.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case T.NULL:{this._err(O.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars($e);break}case T.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case T.HYPHEN_MINUS:{this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case T.GREATER_THAN_SIGN:{this.state=A.SCRIPT_DATA,this._emitChars(">");break}case T.NULL:{this._err(O.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars($e);break}case T.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===T.SOLIDUS?(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Et.SCRIPT,!1)&&Pc(this.preprocessor.peek(Et.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Et.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=A.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.SOLIDUS:case T.GREATER_THAN_SIGN:case T.EOF:{this.state=A.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case T.EQUALS_SIGN:{this._err(O.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=A.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=A.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:case T.SOLIDUS:case T.GREATER_THAN_SIGN:case T.EOF:{this._leaveAttrName(),this.state=A.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case T.EQUALS_SIGN:{this._leaveAttrName(),this.state=A.BEFORE_ATTRIBUTE_VALUE;break}case T.QUOTATION_MARK:case T.APOSTROPHE:case T.LESS_THAN_SIGN:{this._err(O.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case T.NULL:{this._err(O.unexpectedNullCharacter),this.currentAttr.name+=$e;break}default:this.currentAttr.name+=String.fromCodePoint(Ur(t)?Fu(t):t)}}_stateAfterAttributeName(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.SOLIDUS:{this.state=A.SELF_CLOSING_START_TAG;break}case T.EQUALS_SIGN:{this.state=A.BEFORE_ATTRIBUTE_VALUE;break}case T.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentTagToken();break}case T.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=A.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:{this.state=A.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this.state=A.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(O.missingAttributeValue),this.state=A.DATA,this.emitCurrentTagToken();break}default:this.state=A.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case T.QUOTATION_MARK:{this.state=A.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.NULL:{this._err(O.unexpectedNullCharacter),this.currentAttr.value+=$e;break}case T.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case T.APOSTROPHE:{this.state=A.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.NULL:{this._err(O.unexpectedNullCharacter),this.currentAttr.value+=$e;break}case T.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this._leaveAttrValue(),this.state=A.BEFORE_ATTRIBUTE_NAME;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=A.DATA,this.emitCurrentTagToken();break}case T.NULL:{this._err(O.unexpectedNullCharacter),this.currentAttr.value+=$e;break}case T.QUOTATION_MARK:case T.APOSTROPHE:case T.LESS_THAN_SIGN:case T.EQUALS_SIGN:case T.GRAVE_ACCENT:{this._err(O.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case T.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this._leaveAttrValue(),this.state=A.BEFORE_ATTRIBUTE_NAME;break}case T.SOLIDUS:{this._leaveAttrValue(),this.state=A.SELF_CLOSING_START_TAG;break}case T.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=A.DATA,this.emitCurrentTagToken();break}case T.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this._err(O.missingWhitespaceBetweenAttributes),this.state=A.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case T.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=A.DATA,this.emitCurrentTagToken();break}case T.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this._err(O.unexpectedSolidusInTag),this.state=A.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case T.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentComment(n);break}case T.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case T.NULL:{this._err(O.unexpectedNullCharacter),n.data+=$e;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Et.DASH_DASH,!0)?(this._createCommentToken(Et.DASH_DASH.length+1),this.state=A.COMMENT_START):this._consumeSequenceIfMatch(Et.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Et.DOCTYPE.length+1),this.state=A.DOCTYPE):this._consumeSequenceIfMatch(Et.CDATA_START,!0)?this.inForeignNode?this.state=A.CDATA_SECTION:(this._err(O.cdataInHtmlContent),this._createCommentToken(Et.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=A.BOGUS_COMMENT):this._ensureHibernation()||(this._err(O.incorrectlyOpenedComment),this._createCommentToken(2),this.state=A.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case T.HYPHEN_MINUS:{this.state=A.COMMENT_START_DASH;break}case T.GREATER_THAN_SIGN:{this._err(O.abruptClosingOfEmptyComment),this.state=A.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=A.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{this.state=A.COMMENT_END;break}case T.GREATER_THAN_SIGN:{this._err(O.abruptClosingOfEmptyComment),this.state=A.DATA,this.emitCurrentComment(n);break}case T.EOF:{this._err(O.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=A.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{this.state=A.COMMENT_END_DASH;break}case T.LESS_THAN_SIGN:{n.data+="<",this.state=A.COMMENT_LESS_THAN_SIGN;break}case T.NULL:{this._err(O.unexpectedNullCharacter),n.data+=$e;break}case T.EOF:{this._err(O.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case T.EXCLAMATION_MARK:{n.data+="!",this.state=A.COMMENT_LESS_THAN_SIGN_BANG;break}case T.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=A.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===T.HYPHEN_MINUS?this.state=A.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=A.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===T.HYPHEN_MINUS?this.state=A.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=A.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==T.GREATER_THAN_SIGN&&t!==T.EOF&&this._err(O.nestedComment),this.state=A.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{this.state=A.COMMENT_END;break}case T.EOF:{this._err(O.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=A.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case T.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentComment(n);break}case T.EXCLAMATION_MARK:{this.state=A.COMMENT_END_BANG;break}case T.HYPHEN_MINUS:{n.data+="-";break}case T.EOF:{this._err(O.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=A.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{n.data+="--!",this.state=A.COMMENT_END_DASH;break}case T.GREATER_THAN_SIGN:{this._err(O.incorrectlyClosedComment),this.state=A.DATA,this.emitCurrentComment(n);break}case T.EOF:{this._err(O.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=A.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_NAME;break}case T.GREATER_THAN_SIGN:{this.state=A.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case T.EOF:{this._err(O.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(O.missingWhitespaceBeforeDoctypeName),this.state=A.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ur(t))this._createDoctypeToken(String.fromCharCode(Fu(t))),this.state=A.DOCTYPE_NAME;else switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.NULL:{this._err(O.unexpectedNullCharacter),this._createDoctypeToken($e),this.state=A.DOCTYPE_NAME;break}case T.GREATER_THAN_SIGN:{this._err(O.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case T.EOF:{this._err(O.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=A.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=A.AFTER_DOCTYPE_NAME;break}case T.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case T.NULL:{this._err(O.unexpectedNullCharacter),n.name+=$e;break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ur(t)?Fu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Et.PUBLIC,!1)?this.state=A.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Et.SYSTEM,!1)?this.state=A.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(O.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case T.QUOTATION_MARK:{this._err(O.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this._err(O.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(O.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:{n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(O.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case T.QUOTATION_MARK:{this.state=A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case T.NULL:{this._err(O.unexpectedNullCharacter),n.publicId+=$e;break}case T.GREATER_THAN_SIGN:{this._err(O.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case T.APOSTROPHE:{this.state=A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case T.NULL:{this._err(O.unexpectedNullCharacter),n.publicId+=$e;break}case T.GREATER_THAN_SIGN:{this._err(O.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=A.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case T.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case T.QUOTATION_MARK:{this._err(O.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this._err(O.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case T.QUOTATION_MARK:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case T.QUOTATION_MARK:{this._err(O.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this._err(O.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(O.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(O.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case T.QUOTATION_MARK:{this.state=A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case T.NULL:{this._err(O.unexpectedNullCharacter),n.systemId+=$e;break}case T.GREATER_THAN_SIGN:{this._err(O.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case T.APOSTROPHE:{this.state=A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case T.NULL:{this._err(O.unexpectedNullCharacter),n.systemId+=$e;break}case T.GREATER_THAN_SIGN:{this._err(O.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(O.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case T.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case T.NULL:{this._err(O.unexpectedNullCharacter);break}case T.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case T.RIGHT_SQUARE_BRACKET:{this.state=A.CDATA_SECTION_BRACKET;break}case T.EOF:{this._err(O.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===T.RIGHT_SQUARE_BRACKET?this.state=A.CDATA_SECTION_END:(this._emitChars("]"),this.state=A.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case T.GREATER_THAN_SIGN:{this.state=A.DATA;break}case T.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=A.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(T.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Lc(this.preprocessor.peek(1))?A.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Lc(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===T.SEMICOLON&&this._err(O.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const q1=new Set([d.DD,d.DT,d.LI,d.OPTGROUP,d.OPTION,d.P,d.RB,d.RP,d.RT,d.RTC]),Rc=new Set([...q1,d.CAPTION,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]),Qu=new Set([d.APPLET,d.CAPTION,d.HTML,d.MARQUEE,d.OBJECT,d.TABLE,d.TD,d.TEMPLATE,d.TH]),gk=new Set([...Qu,d.OL,d.UL]),bk=new Set([...Qu,d.BUTTON]),Oc=new Set([d.ANNOTATION_XML,d.MI,d.MN,d.MO,d.MS,d.MTEXT]),Mc=new Set([d.DESC,d.FOREIGN_OBJECT,d.TITLE]),_k=new Set([d.TR,d.TEMPLATE,d.HTML]),xk=new Set([d.TBODY,d.TFOOT,d.THEAD,d.TEMPLATE,d.HTML]),Ck=new Set([d.TABLE,d.TEMPLATE,d.HTML]),Ek=new Set([d.TD,d.TH]);class Tk{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=d.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===d.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===V.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const u=this._indexOf(t)+1;this.items.splice(u,0,n),this.tagIDs.splice(u,0,r),this.stackTop++,u===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,u===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==V.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Ui,V.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Ek,V.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Ck,V.HTML)}clearBackToTableBodyContext(){this.clearBackTo(xk,V.HTML)}clearBackToTableRowContext(){this.clearBackTo(_k,V.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===d.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===d.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const u=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case V.HTML:{if(u===t)return!0;if(n.has(u))return!1;break}case V.SVG:{if(Mc.has(u))return!1;break}case V.MATHML:{if(Oc.has(u))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Qu)}hasInListItemScope(t){return this.hasInDynamicScope(t,gk)}hasInButtonScope(t){return this.hasInDynamicScope(t,bk)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case V.HTML:{if(Ui.has(n))return!0;if(Qu.has(n))return!1;break}case V.SVG:{if(Mc.has(n))return!1;break}case V.MATHML:{if(Oc.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===V.HTML)switch(this.tagIDs[n]){case t:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===V.HTML)switch(this.tagIDs[t]){case d.TBODY:case d.THEAD:case d.TFOOT:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===V.HTML)switch(this.tagIDs[n]){case t:return!0;case d.OPTION:case d.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&q1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Rc.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Rc.has(this.currentTagId);)this.pop()}}const li=3;var sn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(sn||(sn={}));const Fc={type:sn.Marker};class yk{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],u=n.length,a=this.treeAdapter.getTagName(t),i=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const c=this.entries[o];if(c.type===sn.Marker)break;const{element:l}=c;if(this.treeAdapter.getTagName(l)===a&&this.treeAdapter.getNamespaceURI(l)===i){const h=this.treeAdapter.getAttrList(l);h.length===u&&r.push({idx:o,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<li)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<li)return;const u=new Map(n.map(i=>[i.name,i.value]));let a=0;for(let i=0;i<r.length;i++){const o=r[i];o.attrs.every(c=>u.get(c.name)===c.value)&&(a+=1,a>=li&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Fc)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:sn.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:sn.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Fc);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===sn.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===sn.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===sn.Element&&n.element===t)}}const wn={createDocument(){return{nodeName:"#document",mode:zt.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const u=e.childNodes.find(a=>a.nodeName==="#documentType");if(u)u.name=t,u.publicId=n,u.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};wn.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(wn.isTextNode(n)){n.value+=t;return}}wn.appendChild(e,wn.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&wn.isTextNode(r)?r.value+=t:wn.insertBefore(e,wn.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Z1="html",kk="about:legacy-compat",Ak="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",W1=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Sk=[...W1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Ik=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Y1=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Nk=[...Y1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Bc(e,t){return t.some(n=>e.startsWith(n))}function vk(e){return e.name===Z1&&e.publicId===null&&(e.systemId===null||e.systemId===kk)}function wk(e){if(e.name!==Z1)return zt.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Ak)return zt.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Ik.has(n))return zt.QUIRKS;let r=t===null?Sk:W1;if(Bc(n,r))return zt.QUIRKS;if(r=t===null?Y1:Nk,Bc(n,r))return zt.LIMITED_QUIRKS}return zt.NO_QUIRKS}const jc={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Dk="definitionurl",Lk="definitionURL",Pk=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Rk=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:V.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:V.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:V.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:V.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:V.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:V.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:V.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:V.XML}],["xml:space",{prefix:"xml",name:"space",namespace:V.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:V.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:V.XMLNS}]]),Ok=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Mk=new Set([d.B,d.BIG,d.BLOCKQUOTE,d.BODY,d.BR,d.CENTER,d.CODE,d.DD,d.DIV,d.DL,d.DT,d.EM,d.EMBED,d.H1,d.H2,d.H3,d.H4,d.H5,d.H6,d.HEAD,d.HR,d.I,d.IMG,d.LI,d.LISTING,d.MENU,d.META,d.NOBR,d.OL,d.P,d.PRE,d.RUBY,d.S,d.SMALL,d.SPAN,d.STRONG,d.STRIKE,d.SUB,d.SUP,d.TABLE,d.TT,d.U,d.UL,d.VAR]);function Fk(e){const t=e.tagID;return t===d.FONT&&e.attrs.some(({name:r})=>r===Kn.COLOR||r===Kn.SIZE||r===Kn.FACE)||Mk.has(t)}function G1(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Dk){e.attrs[t].name=Lk;break}}function X1(e){for(let t=0;t<e.attrs.length;t++){const n=Pk.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function vs(e){for(let t=0;t<e.attrs.length;t++){const n=Rk.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Bk(e){const t=Ok.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=wr(e.tagName))}function jk(e,t){return t===V.MATHML&&(e===d.MI||e===d.MO||e===d.MN||e===d.MS||e===d.MTEXT)}function Hk(e,t,n){if(t===V.MATHML&&e===d.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Kn.ENCODING){const u=n[r].value.toLowerCase();return u===jc.TEXT_HTML||u===jc.APPLICATION_XML}}return t===V.SVG&&(e===d.FOREIGN_OBJECT||e===d.DESC||e===d.TITLE)}function Uk(e,t,n,r){return(!r||r===V.HTML)&&Hk(e,t,n)||(!r||r===V.MATHML)&&jk(e,t)}const Vk="hidden",$k=8,zk=3;var N;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(N||(N={}));const qk={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},K1=new Set([d.TABLE,d.TBODY,d.TFOOT,d.THEAD,d.TR]),Hc={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:wn,onParseError:null};class Uc{constructor(t,n,r=null,u=null){this.fragmentContext=r,this.scriptHandler=u,this.currentToken=null,this.stopped=!1,this.insertionMode=N.INITIAL,this.originalInsertionMode=N.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Hc,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new mk(this.options,this),this.activeFormattingElements=new yk(this.treeAdapter),this.fragmentContextID=r?wr(this.treeAdapter.getTagName(r)):d.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Tk(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...Hc,...n};t??(t=r.treeAdapter.createElement(R.TEMPLATE,V.HTML,[]));const u=r.treeAdapter.createElement("documentmock",V.HTML,[]),a=new this(r,u,t);return a.fragmentContextID===d.TEMPLATE&&a.tmplInsertionModeStack.unshift(N.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var u;if(!this.onParseError)return;const a=(u=t.location)!==null&&u!==void 0?u:qk,i={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(i)}onItemPush(t,n,r){var u,a;(a=(u=this.treeAdapter).onItemPush)===null||a===void 0||a.call(u,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,u;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(u=(r=this.treeAdapter).onItemPop)===null||u===void 0||u.call(r,t,this.openElements.current),n){let a,i;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,i=this.fragmentContextID):{current:a,currentTagId:i}=this.openElements,this._setContextModes(a,i)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===V.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,V.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=N.TEXT}switchToPlaintextParsing(){this.insertionMode=N.TEXT,this.originalInsertionMode=N.IN_BODY,this.tokenizer.state=Ge.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===R.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==V.HTML))switch(this.fragmentContextID){case d.TITLE:case d.TEXTAREA:{this.tokenizer.state=Ge.RCDATA;break}case d.STYLE:case d.XMP:case d.IFRAME:case d.NOEMBED:case d.NOFRAMES:case d.NOSCRIPT:{this.tokenizer.state=Ge.RAWTEXT;break}case d.SCRIPT:{this.tokenizer.state=Ge.SCRIPT_DATA;break}case d.PLAINTEXT:{this.tokenizer.state=Ge.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",u=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,u),t.location){const i=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));i&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,V.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,V.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(R.HTML,V.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,d.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const u=this.treeAdapter.getChildNodes(n),a=r?u.lastIndexOf(r):u.length,i=u[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){const{endLine:c,endCol:l,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:c,endCol:l,endOffset:h})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,u=this.treeAdapter.getTagName(t),a=n.type===xe.END_TAG&&u===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===d.SVG&&this.treeAdapter.getTagName(n)===R.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===V.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===d.MGLYPH||t.tagID===d.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,V.HTML)}_processToken(t){switch(t.type){case xe.CHARACTER:{this.onCharacter(t);break}case xe.NULL_CHARACTER:{this.onNullCharacter(t);break}case xe.COMMENT:{this.onComment(t);break}case xe.DOCTYPE:{this.onDoctype(t);break}case xe.START_TAG:{this._processStartTag(t);break}case xe.END_TAG:{this.onEndTag(t);break}case xe.EOF:{this.onEof(t);break}case xe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const u=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return Uk(t,u,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(u=>u.type===sn.Marker||this.openElements.contains(u.element)),r=n===-1?t-1:n-1;for(let u=r;u>=0;u--){const a=this.activeFormattingElements.entries[u];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=N.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(d.P),this.openElements.popUntilTagNamePopped(d.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case d.TR:{this.insertionMode=N.IN_ROW;return}case d.TBODY:case d.THEAD:case d.TFOOT:{this.insertionMode=N.IN_TABLE_BODY;return}case d.CAPTION:{this.insertionMode=N.IN_CAPTION;return}case d.COLGROUP:{this.insertionMode=N.IN_COLUMN_GROUP;return}case d.TABLE:{this.insertionMode=N.IN_TABLE;return}case d.BODY:{this.insertionMode=N.IN_BODY;return}case d.FRAMESET:{this.insertionMode=N.IN_FRAMESET;return}case d.SELECT:{this._resetInsertionModeForSelect(t);return}case d.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case d.HTML:{this.insertionMode=this.headElement?N.AFTER_HEAD:N.BEFORE_HEAD;return}case d.TD:case d.TH:{if(t>0){this.insertionMode=N.IN_CELL;return}break}case d.HEAD:{if(t>0){this.insertionMode=N.IN_HEAD;return}break}}this.insertionMode=N.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===d.TEMPLATE)break;if(r===d.TABLE){this.insertionMode=N.IN_SELECT_IN_TABLE;return}}this.insertionMode=N.IN_SELECT}_isElementCausesFosterParenting(t){return K1.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case d.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===V.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case d.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return dk[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ES(this,t);return}switch(this.insertionMode){case N.INITIAL:{Fr(this,t);break}case N.BEFORE_HTML:{Zr(this,t);break}case N.BEFORE_HEAD:{Wr(this,t);break}case N.IN_HEAD:{Yr(this,t);break}case N.IN_HEAD_NO_SCRIPT:{Gr(this,t);break}case N.AFTER_HEAD:{Xr(this,t);break}case N.IN_BODY:case N.IN_CAPTION:case N.IN_CELL:case N.IN_TEMPLATE:{J1(this,t);break}case N.TEXT:case N.IN_SELECT:case N.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case N.IN_TABLE:case N.IN_TABLE_BODY:case N.IN_ROW:{di(this,t);break}case N.IN_TABLE_TEXT:{ad(this,t);break}case N.IN_COLUMN_GROUP:{Ju(this,t);break}case N.AFTER_BODY:{ea(this,t);break}case N.AFTER_AFTER_BODY:{zu(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){CS(this,t);return}switch(this.insertionMode){case N.INITIAL:{Fr(this,t);break}case N.BEFORE_HTML:{Zr(this,t);break}case N.BEFORE_HEAD:{Wr(this,t);break}case N.IN_HEAD:{Yr(this,t);break}case N.IN_HEAD_NO_SCRIPT:{Gr(this,t);break}case N.AFTER_HEAD:{Xr(this,t);break}case N.TEXT:{this._insertCharacters(t);break}case N.IN_TABLE:case N.IN_TABLE_BODY:case N.IN_ROW:{di(this,t);break}case N.IN_COLUMN_GROUP:{Ju(this,t);break}case N.AFTER_BODY:{ea(this,t);break}case N.AFTER_AFTER_BODY:{zu(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Vi(this,t);return}switch(this.insertionMode){case N.INITIAL:case N.BEFORE_HTML:case N.BEFORE_HEAD:case N.IN_HEAD:case N.IN_HEAD_NO_SCRIPT:case N.AFTER_HEAD:case N.IN_BODY:case N.IN_TABLE:case N.IN_CAPTION:case N.IN_COLUMN_GROUP:case N.IN_TABLE_BODY:case N.IN_ROW:case N.IN_CELL:case N.IN_SELECT:case N.IN_SELECT_IN_TABLE:case N.IN_TEMPLATE:case N.IN_FRAMESET:case N.AFTER_FRAMESET:{Vi(this,t);break}case N.IN_TABLE_TEXT:{Br(this,t);break}case N.AFTER_BODY:{Qk(this,t);break}case N.AFTER_AFTER_BODY:case N.AFTER_AFTER_FRAMESET:{Jk(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case N.INITIAL:{eA(this,t);break}case N.BEFORE_HEAD:case N.IN_HEAD:case N.IN_HEAD_NO_SCRIPT:case N.AFTER_HEAD:{this._err(t,O.misplacedDoctype);break}case N.IN_TABLE_TEXT:{Br(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,O.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?TS(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case N.INITIAL:{Fr(this,t);break}case N.BEFORE_HTML:{tA(this,t);break}case N.BEFORE_HEAD:{rA(this,t);break}case N.IN_HEAD:{en(this,t);break}case N.IN_HEAD_NO_SCRIPT:{iA(this,t);break}case N.AFTER_HEAD:{oA(this,t);break}case N.IN_BODY:{pt(this,t);break}case N.IN_TABLE:{Er(this,t);break}case N.IN_TABLE_TEXT:{Br(this,t);break}case N.IN_CAPTION:{uS(this,t);break}case N.IN_COLUMN_GROUP:{Ls(this,t);break}case N.IN_TABLE_BODY:{Ia(this,t);break}case N.IN_ROW:{Na(this,t);break}case N.IN_CELL:{sS(this,t);break}case N.IN_SELECT:{od(this,t);break}case N.IN_SELECT_IN_TABLE:{cS(this,t);break}case N.IN_TEMPLATE:{dS(this,t);break}case N.AFTER_BODY:{hS(this,t);break}case N.IN_FRAMESET:{pS(this,t);break}case N.AFTER_FRAMESET:{gS(this,t);break}case N.AFTER_AFTER_BODY:{_S(this,t);break}case N.AFTER_AFTER_FRAMESET:{xS(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?yS(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case N.INITIAL:{Fr(this,t);break}case N.BEFORE_HTML:{nA(this,t);break}case N.BEFORE_HEAD:{uA(this,t);break}case N.IN_HEAD:{aA(this,t);break}case N.IN_HEAD_NO_SCRIPT:{sA(this,t);break}case N.AFTER_HEAD:{cA(this,t);break}case N.IN_BODY:{Sa(this,t);break}case N.TEXT:{YA(this,t);break}case N.IN_TABLE:{au(this,t);break}case N.IN_TABLE_TEXT:{Br(this,t);break}case N.IN_CAPTION:{aS(this,t);break}case N.IN_COLUMN_GROUP:{iS(this,t);break}case N.IN_TABLE_BODY:{$i(this,t);break}case N.IN_ROW:{sd(this,t);break}case N.IN_CELL:{oS(this,t);break}case N.IN_SELECT:{cd(this,t);break}case N.IN_SELECT_IN_TABLE:{lS(this,t);break}case N.IN_TEMPLATE:{fS(this,t);break}case N.AFTER_BODY:{dd(this,t);break}case N.IN_FRAMESET:{mS(this,t);break}case N.AFTER_FRAMESET:{bS(this,t);break}case N.AFTER_AFTER_BODY:{zu(this,t);break}}}onEof(t){switch(this.insertionMode){case N.INITIAL:{Fr(this,t);break}case N.BEFORE_HTML:{Zr(this,t);break}case N.BEFORE_HEAD:{Wr(this,t);break}case N.IN_HEAD:{Yr(this,t);break}case N.IN_HEAD_NO_SCRIPT:{Gr(this,t);break}case N.AFTER_HEAD:{Xr(this,t);break}case N.IN_BODY:case N.IN_TABLE:case N.IN_CAPTION:case N.IN_COLUMN_GROUP:case N.IN_TABLE_BODY:case N.IN_ROW:case N.IN_CELL:case N.IN_SELECT:case N.IN_SELECT_IN_TABLE:{rd(this,t);break}case N.TEXT:{GA(this,t);break}case N.IN_TABLE_TEXT:{Br(this,t);break}case N.IN_TEMPLATE:{ld(this,t);break}case N.AFTER_BODY:case N.IN_FRAMESET:case N.AFTER_FRAMESET:case N.AFTER_AFTER_BODY:case N.AFTER_AFTER_FRAMESET:{Ds(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===T.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case N.IN_HEAD:case N.IN_HEAD_NO_SCRIPT:case N.AFTER_HEAD:case N.TEXT:case N.IN_COLUMN_GROUP:case N.IN_SELECT:case N.IN_SELECT_IN_TABLE:case N.IN_FRAMESET:case N.AFTER_FRAMESET:{this._insertCharacters(t);break}case N.IN_BODY:case N.IN_CAPTION:case N.IN_CELL:case N.IN_TEMPLATE:case N.AFTER_BODY:case N.AFTER_AFTER_BODY:case N.AFTER_AFTER_FRAMESET:{Q1(this,t);break}case N.IN_TABLE:case N.IN_TABLE_BODY:case N.IN_ROW:{di(this,t);break}case N.IN_TABLE_TEXT:{ud(this,t);break}}}}function Zk(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):nd(e,t),n}function Wk(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const u=e.openElements.items[r];if(u===t.element)break;e._isSpecialElement(u,e.openElements.tagIDs[r])&&(n=u)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Yk(e,t,n){let r=t,u=e.openElements.getCommonAncestor(t);for(let a=0,i=u;i!==n;a++,i=u){u=e.openElements.getCommonAncestor(i);const o=e.activeFormattingElements.getElementEntry(i),c=o&&a>=zk;!o||c?(c&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(i)):(i=Gk(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(i,r),r=i)}return r}function Gk(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Xk(e,t,n){const r=e.treeAdapter.getTagName(t),u=wr(r);if(e._isElementCausesFosterParenting(u))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);u===d.TEMPLATE&&a===V.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Kk(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:u}=n,a=e.treeAdapter.createElement(u.tagName,r,u.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,u),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,u.tagID)}function ws(e,t){for(let n=0;n<$k;n++){const r=Zk(e,t);if(!r)break;const u=Wk(e,r);if(!u)break;e.activeFormattingElements.bookmark=r;const a=Yk(e,u,r.element),i=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),i&&Xk(e,i,a),Kk(e,u,r)}}function Vi(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Qk(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Jk(e,t){e._appendCommentNode(t,e.document)}function Ds(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],u=e.treeAdapter.getNodeSourceCodeLocation(r);if(u&&!u.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],i=e.treeAdapter.getNodeSourceCodeLocation(a);i&&!i.endTag&&e._setEndLocation(a,t)}}}}function eA(e,t){e._setDocumentType(t);const n=t.forceQuirks?zt.QUIRKS:wk(t);vk(t)||e._err(t,O.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=N.BEFORE_HTML}function Fr(e,t){e._err(t,O.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,zt.QUIRKS),e.insertionMode=N.BEFORE_HTML,e._processToken(t)}function tA(e,t){t.tagID===d.HTML?(e._insertElement(t,V.HTML),e.insertionMode=N.BEFORE_HEAD):Zr(e,t)}function nA(e,t){const n=t.tagID;(n===d.HTML||n===d.HEAD||n===d.BODY||n===d.BR)&&Zr(e,t)}function Zr(e,t){e._insertFakeRootElement(),e.insertionMode=N.BEFORE_HEAD,e._processToken(t)}function rA(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.HEAD:{e._insertElement(t,V.HTML),e.headElement=e.openElements.current,e.insertionMode=N.IN_HEAD;break}default:Wr(e,t)}}function uA(e,t){const n=t.tagID;n===d.HEAD||n===d.BODY||n===d.HTML||n===d.BR?Wr(e,t):e._err(t,O.endTagWithoutMatchingOpenElement)}function Wr(e,t){e._insertFakeElement(R.HEAD,d.HEAD),e.headElement=e.openElements.current,e.insertionMode=N.IN_HEAD,e._processToken(t)}function en(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:{e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case d.TITLE:{e._switchToTextParsing(t,Ge.RCDATA);break}case d.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ge.RAWTEXT):(e._insertElement(t,V.HTML),e.insertionMode=N.IN_HEAD_NO_SCRIPT);break}case d.NOFRAMES:case d.STYLE:{e._switchToTextParsing(t,Ge.RAWTEXT);break}case d.SCRIPT:{e._switchToTextParsing(t,Ge.SCRIPT_DATA);break}case d.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=N.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(N.IN_TEMPLATE);break}case d.HEAD:{e._err(t,O.misplacedStartTagForHeadElement);break}default:Yr(e,t)}}function aA(e,t){switch(t.tagID){case d.HEAD:{e.openElements.pop(),e.insertionMode=N.AFTER_HEAD;break}case d.BODY:case d.BR:case d.HTML:{Yr(e,t);break}case d.TEMPLATE:{rr(e,t);break}default:e._err(t,O.endTagWithoutMatchingOpenElement)}}function rr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==d.TEMPLATE&&e._err(t,O.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,O.endTagWithoutMatchingOpenElement)}function Yr(e,t){e.openElements.pop(),e.insertionMode=N.AFTER_HEAD,e._processToken(t)}function iA(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.BASEFONT:case d.BGSOUND:case d.HEAD:case d.LINK:case d.META:case d.NOFRAMES:case d.STYLE:{en(e,t);break}case d.NOSCRIPT:{e._err(t,O.nestedNoscriptInHead);break}default:Gr(e,t)}}function sA(e,t){switch(t.tagID){case d.NOSCRIPT:{e.openElements.pop(),e.insertionMode=N.IN_HEAD;break}case d.BR:{Gr(e,t);break}default:e._err(t,O.endTagWithoutMatchingOpenElement)}}function Gr(e,t){const n=t.type===xe.EOF?O.openElementsLeftAfterEof:O.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=N.IN_HEAD,e._processToken(t)}function oA(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.BODY:{e._insertElement(t,V.HTML),e.framesetOk=!1,e.insertionMode=N.IN_BODY;break}case d.FRAMESET:{e._insertElement(t,V.HTML),e.insertionMode=N.IN_FRAMESET;break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{e._err(t,O.abandonedHeadElementChild),e.openElements.push(e.headElement,d.HEAD),en(e,t),e.openElements.remove(e.headElement);break}case d.HEAD:{e._err(t,O.misplacedStartTagForHeadElement);break}default:Xr(e,t)}}function cA(e,t){switch(t.tagID){case d.BODY:case d.HTML:case d.BR:{Xr(e,t);break}case d.TEMPLATE:{rr(e,t);break}default:e._err(t,O.endTagWithoutMatchingOpenElement)}}function Xr(e,t){e._insertFakeElement(R.BODY,d.BODY),e.insertionMode=N.IN_BODY,Aa(e,t)}function Aa(e,t){switch(t.type){case xe.CHARACTER:{J1(e,t);break}case xe.WHITESPACE_CHARACTER:{Q1(e,t);break}case xe.COMMENT:{Vi(e,t);break}case xe.START_TAG:{pt(e,t);break}case xe.END_TAG:{Sa(e,t);break}case xe.EOF:{rd(e,t);break}}}function Q1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function J1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function lA(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function dA(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function fA(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,V.HTML),e.insertionMode=N.IN_FRAMESET)}function hA(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML)}function pA(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Ui.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,V.HTML)}function mA(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function gA(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML),n||(e.formElement=e.openElements.current))}function bA(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const u=e.openElements.tagIDs[r];if(n===d.LI&&u===d.LI||(n===d.DD||n===d.DT)&&(u===d.DD||u===d.DT)){e.openElements.generateImpliedEndTagsWithExclusion(u),e.openElements.popUntilTagNamePopped(u);break}if(u!==d.ADDRESS&&u!==d.DIV&&u!==d.P&&e._isSpecialElement(e.openElements.items[r],u))break}e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML)}function _A(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML),e.tokenizer.state=Ge.PLAINTEXT}function xA(e,t){e.openElements.hasInScope(d.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.framesetOk=!1}function CA(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);n&&(ws(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function EA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function TA(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(d.NOBR)&&(ws(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,V.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function yA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function kA(e,t){e.treeAdapter.getDocumentMode(e.document)!==zt.QUIRKS&&e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML),e.framesetOk=!1,e.insertionMode=N.IN_TABLE}function ed(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,V.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function td(e){const t=$1(e,Kn.TYPE);return t!=null&&t.toLowerCase()===Vk}function AA(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,V.HTML),td(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function SA(e,t){e._appendElement(t,V.HTML),t.ackSelfClosing=!0}function IA(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._appendElement(t,V.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function NA(e,t){t.tagName=R.IMG,t.tagID=d.IMG,ed(e,t)}function vA(e,t){e._insertElement(t,V.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ge.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=N.TEXT}function wA(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ge.RAWTEXT)}function DA(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ge.RAWTEXT)}function Vc(e,t){e._switchToTextParsing(t,Ge.RAWTEXT)}function LA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===N.IN_TABLE||e.insertionMode===N.IN_CAPTION||e.insertionMode===N.IN_TABLE_BODY||e.insertionMode===N.IN_ROW||e.insertionMode===N.IN_CELL?N.IN_SELECT_IN_TABLE:N.IN_SELECT}function PA(e,t){e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML)}function RA(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,V.HTML)}function OA(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(d.RTC),e._insertElement(t,V.HTML)}function MA(e,t){e._reconstructActiveFormattingElements(),G1(t),vs(t),t.selfClosing?e._appendElement(t,V.MATHML):e._insertElement(t,V.MATHML),t.ackSelfClosing=!0}function FA(e,t){e._reconstructActiveFormattingElements(),X1(t),vs(t),t.selfClosing?e._appendElement(t,V.SVG):e._insertElement(t,V.SVG),t.ackSelfClosing=!0}function $c(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML)}function pt(e,t){switch(t.tagID){case d.I:case d.S:case d.B:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.SMALL:case d.STRIKE:case d.STRONG:{EA(e,t);break}case d.A:{CA(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{pA(e,t);break}case d.P:case d.DL:case d.OL:case d.UL:case d.DIV:case d.DIR:case d.NAV:case d.MAIN:case d.MENU:case d.ASIDE:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.DETAILS:case d.ADDRESS:case d.ARTICLE:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{hA(e,t);break}case d.LI:case d.DD:case d.DT:{bA(e,t);break}case d.BR:case d.IMG:case d.WBR:case d.AREA:case d.EMBED:case d.KEYGEN:{ed(e,t);break}case d.HR:{IA(e,t);break}case d.RB:case d.RTC:{RA(e,t);break}case d.RT:case d.RP:{OA(e,t);break}case d.PRE:case d.LISTING:{mA(e,t);break}case d.XMP:{wA(e,t);break}case d.SVG:{FA(e,t);break}case d.HTML:{lA(e,t);break}case d.BASE:case d.LINK:case d.META:case d.STYLE:case d.TITLE:case d.SCRIPT:case d.BGSOUND:case d.BASEFONT:case d.TEMPLATE:{en(e,t);break}case d.BODY:{dA(e,t);break}case d.FORM:{gA(e,t);break}case d.NOBR:{TA(e,t);break}case d.MATH:{MA(e,t);break}case d.TABLE:{kA(e,t);break}case d.INPUT:{AA(e,t);break}case d.PARAM:case d.TRACK:case d.SOURCE:{SA(e,t);break}case d.IMAGE:{NA(e,t);break}case d.BUTTON:{xA(e,t);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{yA(e,t);break}case d.IFRAME:{DA(e,t);break}case d.SELECT:{LA(e,t);break}case d.OPTION:case d.OPTGROUP:{PA(e,t);break}case d.NOEMBED:case d.NOFRAMES:{Vc(e,t);break}case d.FRAMESET:{fA(e,t);break}case d.TEXTAREA:{vA(e,t);break}case d.NOSCRIPT:{e.options.scriptingEnabled?Vc(e,t):$c(e,t);break}case d.PLAINTEXT:{_A(e,t);break}case d.COL:case d.TH:case d.TD:case d.TR:case d.HEAD:case d.FRAME:case d.TBODY:case d.TFOOT:case d.THEAD:case d.CAPTION:case d.COLGROUP:break;default:$c(e,t)}}function BA(e,t){if(e.openElements.hasInScope(d.BODY)&&(e.insertionMode=N.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function jA(e,t){e.openElements.hasInScope(d.BODY)&&(e.insertionMode=N.AFTER_BODY,dd(e,t))}function HA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function UA(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(d.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(d.FORM):n&&e.openElements.remove(n))}function VA(e){e.openElements.hasInButtonScope(d.P)||e._insertFakeElement(R.P,d.P),e._closePElement()}function $A(e){e.openElements.hasInListItemScope(d.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(d.LI),e.openElements.popUntilTagNamePopped(d.LI))}function zA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function qA(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function ZA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function WA(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(R.BR,d.BR),e.openElements.pop(),e.framesetOk=!1}function nd(e,t){const n=t.tagName,r=t.tagID;for(let u=e.openElements.stackTop;u>0;u--){const a=e.openElements.items[u],i=e.openElements.tagIDs[u];if(r===i&&(r!==d.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=u&&e.openElements.shortenToLength(u);break}if(e._isSpecialElement(a,i))break}}function Sa(e,t){switch(t.tagID){case d.A:case d.B:case d.I:case d.S:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.NOBR:case d.SMALL:case d.STRIKE:case d.STRONG:{ws(e,t);break}case d.P:{VA(e);break}case d.DL:case d.UL:case d.OL:case d.DIR:case d.DIV:case d.NAV:case d.PRE:case d.MAIN:case d.MENU:case d.ASIDE:case d.BUTTON:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.ADDRESS:case d.ARTICLE:case d.DETAILS:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.LISTING:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{HA(e,t);break}case d.LI:{$A(e);break}case d.DD:case d.DT:{zA(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{qA(e);break}case d.BR:{WA(e);break}case d.BODY:{BA(e,t);break}case d.HTML:{jA(e,t);break}case d.FORM:{UA(e);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{ZA(e,t);break}case d.TEMPLATE:{rr(e,t);break}default:nd(e,t)}}function rd(e,t){e.tmplInsertionModeStack.length>0?ld(e,t):Ds(e,t)}function YA(e,t){var n;t.tagID===d.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function GA(e,t){e._err(t,O.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function di(e,t){if(e.openElements.currentTagId!==void 0&&K1.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=N.IN_TABLE_TEXT,t.type){case xe.CHARACTER:{ad(e,t);break}case xe.WHITESPACE_CHARACTER:{ud(e,t);break}}else _u(e,t)}function XA(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,V.HTML),e.insertionMode=N.IN_CAPTION}function KA(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,V.HTML),e.insertionMode=N.IN_COLUMN_GROUP}function QA(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.COLGROUP,d.COLGROUP),e.insertionMode=N.IN_COLUMN_GROUP,Ls(e,t)}function JA(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,V.HTML),e.insertionMode=N.IN_TABLE_BODY}function eS(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.TBODY,d.TBODY),e.insertionMode=N.IN_TABLE_BODY,Ia(e,t)}function tS(e,t){e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function nS(e,t){td(t)?e._appendElement(t,V.HTML):_u(e,t),t.ackSelfClosing=!0}function rS(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,V.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Er(e,t){switch(t.tagID){case d.TD:case d.TH:case d.TR:{eS(e,t);break}case d.STYLE:case d.SCRIPT:case d.TEMPLATE:{en(e,t);break}case d.COL:{QA(e,t);break}case d.FORM:{rS(e,t);break}case d.TABLE:{tS(e,t);break}case d.TBODY:case d.TFOOT:case d.THEAD:{JA(e,t);break}case d.INPUT:{nS(e,t);break}case d.CAPTION:{XA(e,t);break}case d.COLGROUP:{KA(e,t);break}default:_u(e,t)}}function au(e,t){switch(t.tagID){case d.TABLE:{e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode());break}case d.TEMPLATE:{rr(e,t);break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:_u(e,t)}}function _u(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Aa(e,t),e.fosterParentingEnabled=n}function ud(e,t){e.pendingCharacterTokens.push(t)}function ad(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Br(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)_u(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const id=new Set([d.CAPTION,d.COL,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]);function uS(e,t){const n=t.tagID;id.has(n)?e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=N.IN_TABLE,Er(e,t)):pt(e,t)}function aS(e,t){const n=t.tagID;switch(n){case d.CAPTION:case d.TABLE:{e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=N.IN_TABLE,n===d.TABLE&&au(e,t));break}case d.BODY:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:Sa(e,t)}}function Ls(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.COL:{e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case d.TEMPLATE:{en(e,t);break}default:Ju(e,t)}}function iS(e,t){switch(t.tagID){case d.COLGROUP:{e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=N.IN_TABLE);break}case d.TEMPLATE:{rr(e,t);break}case d.COL:break;default:Ju(e,t)}}function Ju(e,t){e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=N.IN_TABLE,e._processToken(t))}function Ia(e,t){switch(t.tagID){case d.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,V.HTML),e.insertionMode=N.IN_ROW;break}case d.TH:case d.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(R.TR,d.TR),e.insertionMode=N.IN_ROW,Na(e,t);break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE,Er(e,t));break}default:Er(e,t)}}function $i(e,t){const n=t.tagID;switch(t.tagID){case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE);break}case d.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE,au(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:case d.TR:break;default:au(e,t)}}function Na(e,t){switch(t.tagID){case d.TH:case d.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,V.HTML),e.insertionMode=N.IN_CELL,e.activeFormattingElements.insertMarker();break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE_BODY,Ia(e,t));break}default:Er(e,t)}}function sd(e,t){switch(t.tagID){case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE_BODY);break}case d.TABLE:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE_BODY,$i(e,t));break}case d.TBODY:case d.TFOOT:case d.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(d.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE_BODY,$i(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:break;default:au(e,t)}}function sS(e,t){const n=t.tagID;id.has(n)?(e.openElements.hasInTableScope(d.TD)||e.openElements.hasInTableScope(d.TH))&&(e._closeTableCell(),Na(e,t)):pt(e,t)}function oS(e,t){const n=t.tagID;switch(n){case d.TD:case d.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=N.IN_ROW);break}case d.TABLE:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),sd(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:break;default:Sa(e,t)}}function od(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._insertElement(t,V.HTML);break}case d.OPTGROUP:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._insertElement(t,V.HTML);break}case d.HR:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case d.INPUT:case d.KEYGEN:case d.TEXTAREA:case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),t.tagID!==d.SELECT&&e._processStartTag(t));break}case d.SCRIPT:case d.TEMPLATE:{en(e,t);break}}}function cd(e,t){switch(t.tagID){case d.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===d.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===d.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop();break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop();break}case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode());break}case d.TEMPLATE:{rr(e,t);break}}}function cS(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e._processStartTag(t)):od(e,t)}function lS(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e.onEndTag(t)):cd(e,t)}function dS(e,t){switch(t.tagID){case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{en(e,t);break}case d.CAPTION:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.tmplInsertionModeStack[0]=N.IN_TABLE,e.insertionMode=N.IN_TABLE,Er(e,t);break}case d.COL:{e.tmplInsertionModeStack[0]=N.IN_COLUMN_GROUP,e.insertionMode=N.IN_COLUMN_GROUP,Ls(e,t);break}case d.TR:{e.tmplInsertionModeStack[0]=N.IN_TABLE_BODY,e.insertionMode=N.IN_TABLE_BODY,Ia(e,t);break}case d.TD:case d.TH:{e.tmplInsertionModeStack[0]=N.IN_ROW,e.insertionMode=N.IN_ROW,Na(e,t);break}default:e.tmplInsertionModeStack[0]=N.IN_BODY,e.insertionMode=N.IN_BODY,pt(e,t)}}function fS(e,t){t.tagID===d.TEMPLATE&&rr(e,t)}function ld(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ds(e,t)}function hS(e,t){t.tagID===d.HTML?pt(e,t):ea(e,t)}function dd(e,t){var n;if(t.tagID===d.HTML){if(e.fragmentContext||(e.insertionMode=N.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===d.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else ea(e,t)}function ea(e,t){e.insertionMode=N.IN_BODY,Aa(e,t)}function pS(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.FRAMESET:{e._insertElement(t,V.HTML);break}case d.FRAME:{e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case d.NOFRAMES:{en(e,t);break}}}function mS(e,t){t.tagID===d.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==d.FRAMESET&&(e.insertionMode=N.AFTER_FRAMESET))}function gS(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.NOFRAMES:{en(e,t);break}}}function bS(e,t){t.tagID===d.HTML&&(e.insertionMode=N.AFTER_AFTER_FRAMESET)}function _S(e,t){t.tagID===d.HTML?pt(e,t):zu(e,t)}function zu(e,t){e.insertionMode=N.IN_BODY,Aa(e,t)}function xS(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.NOFRAMES:{en(e,t);break}}}function CS(e,t){t.chars=$e,e._insertCharacters(t)}function ES(e,t){e._insertCharacters(t),e.framesetOk=!1}function fd(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==V.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function TS(e,t){if(Fk(t))fd(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===V.MATHML?G1(t):r===V.SVG&&(Bk(t),X1(t)),vs(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function yS(e,t){if(t.tagID===d.P||t.tagID===d.BR){fd(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===V.HTML){e._endTagOutsideForeignContent(t);break}const u=e.treeAdapter.getTagName(r);if(u.toLowerCase()===t.tagName){t.tagName=u,e.openElements.shortenToLength(n);break}}}R.AREA,R.BASE,R.BASEFONT,R.BGSOUND,R.BR,R.COL,R.EMBED,R.FRAME,R.HR,R.IMG,R.INPUT,R.KEYGEN,R.LINK,R.META,R.PARAM,R.SOURCE,R.TRACK,R.WBR;const kS=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,AS=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),zc={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function hd(e,t){const n=OS(e),r=i1("type",{handlers:{root:SS,element:IS,text:NS,comment:md,doctype:vS,raw:DS},unknown:LS}),u={parser:n?new Uc(zc):Uc.getFragmentParser(void 0,zc),handle(o){r(o,u)},stitches:!1,options:t||{}};r(e,u),Dr(u,fn());const a=n?u.parser.document:u.parser.getFragment(),i=Sy(a,{file:u.options.file});return u.stitches&&ka(i,"comment",function(o,c,l){const h=o;if(h.value.stitch&&l&&c!==void 0){const f=l.children;return f[c]=h.value.stitch,c}}),i.type==="root"&&i.children.length===1&&i.children[0].type===e.type?i.children[0]:i}function pd(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function SS(e,t){pd(e.children,t)}function IS(e,t){PS(e,t),pd(e.children,t),RS(e,t)}function NS(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:xe.CHARACTER,chars:e.value,location:xu(e)};Dr(t,fn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function vS(e,t){const n={type:xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:xu(e)};Dr(t,fn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function wS(e,t){t.stitches=!0;const n=MS(e);if("children"in e&&"children"in n){const r=hd({type:"root",children:e.children},t.options);n.children=r.children}md({type:"comment",value:{stitch:n}},t)}function md(e,t){const n=e.value,r={type:xe.COMMENT,data:n,location:xu(e)};Dr(t,fn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function DS(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,gd(t,fn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(kS,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function LS(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))wS(n,t);else{let r="";throw AS.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Dr(e,t){gd(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ge.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function gd(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function PS(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ge.PLAINTEXT)return;Dr(t,fn(e));const r=t.parser.openElements.current;let u="namespaceURI"in r?r.namespaceURI:Xn.html;u===Xn.html&&n==="svg"&&(u=Xn.svg);const a=Uy({...e,children:[]},{space:u===Xn.svg?"svg":"html"}),i={type:xe.START_TAG,tagName:n,tagID:wr(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:xu(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function RS(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Gy.includes(n)||t.parser.tokenizer.state===Ge.PLAINTEXT)return;Dr(t,_a(e));const r={type:xe.END_TAG,tagName:n,tagID:wr(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:xu(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ge.RCDATA||t.parser.tokenizer.state===Ge.RAWTEXT||t.parser.tokenizer.state===Ge.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ge.DATA)}function OS(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function xu(e){const t=fn(e)||{line:void 0,column:void 0,offset:void 0},n=_a(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function MS(e){return"children"in e?Cr({...e,children:[]}):Cr(e)}function bd(e){return function(t,n){return hd(t,{...e,file:n})}}const Ps=()=>{const{shopTerms:e}=b.useStorefrontStore(),{isAntistock:t}=b.useGeneralStore();return!(e!=null&&e.showTermsOfServiceOnProduct)||!(e!=null&&e.termsOfService)?null:s.jsxs("div",{className:Rr.container,children:[s.jsx("div",{className:Rr.icon,children:s.jsx(w.Icon,{name:"FileCloud",fill:"var(--text-secondary)"})}),t?s.jsx(la,{text:e.termsOfService}):s.jsx(Ts,{remarkPlugins:[S1],rehypePlugins:[bd],className:Rr.text,components:{a:({node:n,...r})=>s.jsx("a",{...r,target:"_blank",rel:"noopener noreferrer",className:Rr.link,id:"md"}),p:({node:n,...r})=>s.jsx("p",{...r,className:Rr.text,id:"md"})},children:e==null?void 0:e.termsOfService})]})},FS="_securedBySsl_1ng38_2",BS="_text_1ng38_9",fi={securedBySsl:FS,text:BS},Rs=({isAntistock:e})=>s.jsxs("div",{className:fi.securedBySsl,children:[s.jsx("div",{className:fi.iconWrapper,children:s.jsx(w.Icon,{name:"ShieldCheck",fill:"var(--text-secondary)"})}),s.jsx("p",{className:fi.text,id:"md",children:e?"Your data is secured by extended validation SSL certificates (256-bit encryption).":"Your data is secured by extended validation SSL certificates (256-bit encryption). This complies with the strongest payment security standard available today."})]}),jS="_container_152ix_1",HS="_header_152ix_7",US="_backButton_152ix_13",VS="_title_152ix_22",$S="_cards_152ix_28",zS="_card_152ix_28",qS="_selected_152ix_46",ZS="_prioritySelected_152ix_50",WS="_price_152ix_51",YS="_description_152ix_61",Ut={container:jS,header:HS,backButton:US,title:VS,cards:$S,card:zS,selected:qS,prioritySelected:ZS,price:WS,description:YS},qc=(e,t,n)=>e+n*t/100,GS=e=>{if(!e)return!0;try{const t=JSON.parse(e);if(t.blocks&&Array.isArray(t.blocks))return!t.blocks.some(n=>n.text?n.text.replace(/[\s\u00A0\u2000-\u200F\u2028-\u202F\u205F-\u206F\u3000\u3164]/g,"").length>0:!1)}catch{return e.replace(/[\s\u00A0\u2000-\u200F\u2028-\u202F\u205F-\u206F\u3000\u3164]/g,"").length===0}return!1},_d=({config:e,totalAmount:t,selected:n,onSelect:r,onBack:u,formatter:a})=>{if(!e)return null;const{priorityReplacement:i,standardReplacement:o}=e,c=!!(i!=null&&i.enabled),l=!!(o!=null&&o.enabled),f=[{key:"PRIORITY",title:(i==null?void 0:i.name)||"Priority Replacement",desc:(i==null?void 0:i.description)||"",price:qc((i==null?void 0:i.fixedFee)||0,(i==null?void 0:i.feePercentage)||0,t),isPriority:!0,visible:c&&(!l||l)},{key:"STANDARD",title:(o==null?void 0:o.name)||"Standard Replacement",desc:(o==null?void 0:o.description)||"",price:qc((o==null?void 0:o.fixedFee)||0,(o==null?void 0:o.feePercentage)||0,t),isPriority:!1,visible:c&&l?!0:l},{key:"NONE",title:"No Replacements",desc:s.jsxs(s.Fragment,{children:[s.jsx("p",{children:"• No guaranteed refunds or replacements."}),s.jsx("p",{children:"• No priority support."}),s.jsx("p",{children:"• No dedicated buyer resolution team."})]}),price:0,isPriority:!1,visible:c&&!l}].filter(m=>m.visible);return s.jsxs("div",{className:Ut.container,children:[s.jsxs("div",{className:Ut.header,children:[s.jsx("button",{type:"button",className:Ut.backButton,onClick:u,"aria-label":"Back to payment methods",children:"←"}),s.jsx("h4",{className:Ut.title,children:"Protect Your Checkout"})]}),s.jsx("div",{className:Ut.cards,children:f.map(m=>s.jsxs("div",{className:b.clx(Ut.card,{[Ut.selected]:n===m.key,[Ut.prioritySelected]:n==="PRIORITY"&&m.isPriority}),onClick:()=>r(m.key),role:"button",tabIndex:0,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&r(m.key)},children:[s.jsx("div",{className:Ut.title,children:m.title}),s.jsx("div",{className:Ut.price,children:a.format(m.price)}),typeof m.desc=="string"?!GS(m.desc)&&s.jsx("div",{className:Ut.description,children:s.jsx(la,{text:m.desc})}):s.jsx("div",{className:Ut.description,children:m.desc})]},m.key))})]})},xd=({getPossibleGateways:e,setGateway:t,getDiscordSettings:n,cart:r,products:u,submitCart:a,reset:i,setCustomFieldsToCart:o,totalAndDiscount:c,setDiscordSocialConnectId:l,setPaymentMethod:h,isAntistock:f})=>{var Pe;const m=P.useMemo(()=>n(),[]),[p,g]=P.useState([]),{balance:x,setBalance:C}=b.useCustomerDashboardStore(),{token:_}=b.useStorefrontStore(),{general:v}=b.useGeneralStore(),{executeRecaptcha:k}=ou(),{discordInfo:D}=b.useDiscordStore(),{customerEmail:S,setCustomerEmail:I,setUsePriorityReplacement:M,setReplacementConfig:q}=b.useCartStore(),U=D!=null&&D.authorized?D.id:void 0,L=b.useNavigate(),j=P.useMemo(()=>e(),[r.parts]),[F,Q]=P.useState(null),[ae,ee]=P.useState(!1),[he,Ee]=P.useState(null),je=!!((Pe=F==null?void 0:F.priorityReplacement)!=null&&Pe.enabled),ke=ae&&je,[E,Z]=P.useState(!1),{setIsOpen:ne}=b.useModalStore(),{notifications:y,setNotifications:z}=b.useNotificationStore();P.useEffect(()=>{const Te=Us(r.parts,u).map(G=>G.type===Dn.Checkbox?{...G,value:String(G.defaultValue)}:G);g([...Te])},[]),P.useEffect(()=>{const H=Us(r.parts,u);g(Te=>{const G=new Map(Te.map(K=>[K.name,K]));return H.map(K=>{const Fe=G.get(K.name);return Fe&&Fe.value?{...K,value:Fe.value}:K.type===Dn.Checkbox?{...K,value:String(K.defaultValue)}:K})})},[r.parts,u]),P.useEffect(()=>{_&&(async()=>{const Te=await aa();C(Te)})()},[_]);function re(H){return H&&/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(H)}const J=()=>{const H=[];return p.forEach(Te=>{var G;Te.required&&!((G=Te.value)!=null&&G.toString().trim())&&H.push({message:`Field "${Te.name}" is required.`,status:"error",id:b.v4()})}),H.length>0?(z([...y,...H]),!1):!0},ie=async H=>{var Fe,tt,ot,Re;if(H.stopPropagation(),r.gateway==="Balance"&&!_){ne(!0),Z(!0);return}if(!J())return;const Te=!!(F&&((Fe=F.priorityReplacement)!=null&&Fe.enabled));if(Te&&!ke){ee(!0),he===null&&((tt=F==null?void 0:F.priorityReplacement)!=null&&tt.enabled)&&(Ee("PRIORITY"),M(!0));return}Te||(ot=F==null?void 0:F.standardReplacement)!=null&&ot.enabled&&!((Re=F==null?void 0:F.priorityReplacement)!=null&&Re.enabled)&&(he===null&&Ee("STANDARD"),M(!1));const G=Object.fromEntries(p.map(Ne=>[Ne.name,Ne.value||""]));o({...G}),U&&m.isEnabled&&l(U);const K=await k();if(K){const Ne=await a(K),Ct=JSON.parse(localStorage.getItem("orders")||"{}");if(Object.keys(Ct).length>10){const mt=Date.now()-864e5;Object.keys(Ct).forEach(jt=>{Ct[jt].createdAt<=mt&&delete Ct[jt]})}"order"in Ne?Ct[Ne.order.id]={createdAt:Date.now(),fullAccessToken:Ne.order.fullAccessToken}:Ct[Ne.id]={createdAt:Date.now(),fullAccessToken:Ne.fullAccessToken},localStorage.setItem("orders",JSON.stringify(Ct)),L(`/orders/${"order"in Ne?Ne.order.id:Ne.id}/${"order"in Ne?Ne.order.fullAccessToken:Ne.fullAccessToken}`),setTimeout(()=>i(),2e3)}};P.useEffect(()=>{const H=[...j.availableGateways,...j.requiresSignInGateways];if(!H.length)return;let Te=!1;return(async()=>{try{const{data:G}=await Xc(H);if(Te)return;let K=null;Array.isArray(G)||(G&&G.replacement?K=G.replacement:((G==null?void 0:G.priorityReplacement)!==void 0||(G==null?void 0:G.standardReplacement)!==void 0)&&(K={priorityReplacement:G.priorityReplacement,standardReplacement:G.standardReplacement})),Q(K),q(K)}catch{}})(),()=>{Te=!0}},[j.availableGateways.join(","),j.requiresSignInGateways.join(",")]),P.useEffect(()=>{var G,K;if(!F)return;const H=!!((G=F.priorityReplacement)!=null&&G.enabled),Te=!!((K=F.standardReplacement)!=null&&K.enabled);!H&&Te&&(Ee("STANDARD"),M(!1),ee(!1))},[F]);const te=H=>{Ee(H),M(H==="PRIORITY"?!0:H==="STANDARD"?!1:void 0)},oe=P.useMemo(()=>{const H=r.parts[0];if(!H)return"USD";const Te=u.find(K=>K.id===H.productId),G=Te==null?void 0:Te.variants.find(K=>K.id===H.productVariantId);if(G!=null&&G.gateways&&r.gateway){const K=G.gateways.find(Fe=>Fe.name===r.gateway&&Fe.overrodePrice);if(K!=null&&K.overrodePrice)return K.overrodePrice.currency}return(G==null?void 0:G.price.currency)||"USD"},[r.parts,r.gateway,u]),ce=P.useMemo(()=>new Intl.NumberFormat("en-US",{style:"currency",currency:oe}),[oe]);return s.jsxs("div",{className:gt.checkoutOperational,style:f?{borderLeft:"1px solid var(--border-secondary)"}:void 0,children:[s.jsxs("div",{className:`${gt.innerContainer} ${f?gt.innerContainerAntistock:""}`,children:[f&&!ke?s.jsx("h4",{style:{fontSize:"var(--input-label-size)",color:"var(--text-secondary)",paddingBottom:"12px",fontWeight:"400"},children:"Select Payment Method"}):null,r.parts.length>0&&!ke&&s.jsx(os,{possibleGateways:j,setGateway:t,setPaymentMethod:h,balance:x,totalAndDiscount:c,onSignInClick:()=>{Z(!0),ne(!0)},isAntistock:f}),ke?s.jsx("div",{style:{marginTop:"12px"},children:s.jsx(_d,{config:F,totalAmount:c.totalWithDiscount??c.total,selected:he,onSelect:te,onBack:()=>ee(!1),formatter:ce})}):null,!ke&&s.jsx("div",{className:b.clx(gt.paymentMethodsSection,{[gt.antistock]:f,[gt.paymentMethodsSectionAntistock]:f}),children:s.jsx(w.Input,{placeholder:"your@email.com",value:S||"",onChange:H=>I(H),disabled:!!_,label:"Email Address"})}),!ke&&s.jsx(h0,{customFields:p,setCustomFields:g}),m.isEnabled&&!ke&&s.jsxs("div",{className:gt.socialConnectSection,children:[s.jsx("p",{className:gt.socialConnectLabel,id:"md",children:"Social Connect"}),s.jsx("div",{className:gt.socialConnectContent,children:s.jsx(m0,{customerEmail:S||""})})]}),s.jsxs("div",{className:`${gt.continueButton} ${f?gt.continueButtonAntistock:""}`,children:[s.jsx(w.Button,{onClick:ie,disabled:!r.gateway||!re(S||"")||m.isRequired&&!(D!=null&&D.authorized),className:gt.button,children:"Continue to Checkout"}),ke?s.jsxs("div",{style:{marginTop:"1rem",display:"flex",alignItems:"center",gap:"8px"},children:[s.jsx("div",{className:gt.iconWrapper,children:s.jsx(w.Icon,{name:"Shield",fill:"var(--text-secondary)"})}),s.jsxs("p",{style:{color:"var(--text-secondary)",fontSize:"14px"},children:["Protected by ",(v==null?void 0:v.info.name)||"Shop"," Buyer Protection"]})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ps,{}),s.jsx(Rs,{isAntistock:f})]})]}),!ke&&s.jsx(Hn,{className:`${gt.checkoutFooter} ${f?gt.checkoutFooterAntistock:""}`})]}),E&&s.jsx(w.Modal,{close:()=>Z(!1),children:s.jsx(g0,{setIsOpen:Z})})]})},XS="_bottomSheet_1a6cu_1",KS="_title_1a6cu_8",QS="_contentTitle_1a6cu_12",JS="_contentText_1a6cu_16",eI="_discordMessageTitle_1a6cu_20",tI="_content_1a6cu_12",nI="_section_1a6cu_27",rI="_copyButton_1a6cu_32",uI="_scrollableBox_1a6cu_37",aI="_scrollableBoxAntistock_1a6cu_47",iI="_discordMessage_1a6cu_20",sI="_link_1a6cu_61",oI="_buttonGroup_1a6cu_68",cI="_buttonWrapper_1a6cu_80",lI="_modal_1a6cu_84",dI="_modalAntistock_1a6cu_91",fI="_header_1a6cu_96",hI="_copyButtonAntistock_1a6cu_104",nt={bottomSheet:XS,title:KS,contentTitle:QS,contentText:JS,discordMessageTitle:eI,content:tI,section:nI,copyButton:rI,scrollableBox:uI,scrollableBoxAntistock:aI,discordMessage:iI,link:sI,buttonGroup:oI,buttonWrapper:cI,modal:lI,modalAntistock:dI,header:fI,copyButtonAntistock:hI},Cd=({setIsOpen:e,deliveryConfiguration:t})=>{const n=Jn(),r=t.type===ve.Discord,{setIsOpen:u}=b.useModalStore(),{isAntistock:a}=b.useGeneralStore(),i=t.type===ve.Serial?t.deliveryItems.map(c=>c.serialKey).join(`
109
- `):t.deliveryItems[0].textData,o=()=>{u(!1),a?e(!1):setTimeout(()=>{e(!1)},300)};return s.jsxs("div",{className:b.clx(nt.modal,{[nt.modalAntistock]:a}),onClick:c=>c.stopPropagation(),children:[s.jsxs("div",{className:nt.header,children:[s.jsx("h3",{id:"h3",className:nt.title,children:a?"View Content":"Thank you for the purchase!"}),s.jsx(w.Icon,{name:"X",hoverable:!0,onClick:o,fill:"var(--text-primary)"})]}),s.jsxs("div",{className:nt.bottomSheet,children:[s.jsx("div",{className:nt.content,children:r?s.jsx("div",{className:nt.discordMessage,children:s.jsx("p",{className:nt.discordMessageTitle,id:"md",children:"Discord role has been granted"})}):s.jsxs("div",{children:[s.jsxs("div",{className:nt.section,children:[!a&&s.jsx("p",{className:nt.contentTitle,id:"md",children:"Content"}),!a&&s.jsxs(w.Button,{className:nt.copyButton,type:"Secondary",onClick:()=>n(i),children:[s.jsx(w.Icon,{name:"Copy"}),"Copy to Clipboard"]})]}),s.jsx("div",{className:b.clx(nt.scrollableBox,{[nt.scrollableBoxAntistock]:a}),children:s.jsx("p",{className:nt.contentText,id:"md",children:a?s.jsx(la,{text:i}):s.jsx(Ts,{remarkPlugins:[S1],rehypePlugins:[bd],components:{a:({node:c,...l})=>s.jsx("a",{...l,target:"_blank",rel:"noopener noreferrer",className:nt.link})},children:i})})})]})}),a&&s.jsxs(w.Button,{className:nt.copyButtonAntistock,type:"Secondary",onClick:()=>n(i),style:{display:"flex",alignItems:"center",gap:"5px"},children:[s.jsx(w.Icon,{name:"Copy"}),"Copy All"]}),!a&&s.jsx("div",{className:nt.buttonGroup,children:s.jsx("div",{className:nt.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:o,children:"Close"})})})]})]})},pI="_mt1_1l62z_1",mI="_notifyBlock_1l62z_13",gI="_notifyHeader_1l62z_19",bI="_notifyContent_1l62z_25",_I="_buttonBlock_1l62z_30",xI="_imageBlock_1l62z_34",CI="_imageContainer_1l62z_42",EI="_sectionBlock_1l62z_54",TI="_sectionTitle_1l62z_61",yI="_sectionSubtitle_1l62z_64",kI="_inputContainer_1l62z_69",Qt={mt1:pI,notifyBlock:mI,notifyHeader:gI,notifyContent:bI,buttonBlock:_I,imageBlock:xI,imageContainer:CI,sectionBlock:EI,sectionTitle:TI,sectionSubtitle:yI,inputContainer:kI},AI=({props:e})=>{const t=Jn();return s.jsx("div",{className:Qt.mt1,children:s.jsxs("div",{className:Qt.inputContainer,children:[s.jsx(w.Input,{value:e.text,disabled:!0,onChange:()=>{}}),e.shownCopyButton&&s.jsx(w.Button,{type:"Secondary",onClick:()=>t(e.text),children:s.jsx(w.Icon,{name:"Copy"})})]})})},SI=({props:e})=>s.jsx(w.Button,{className:Qt.buttonBlock,onClick:()=>window.open(e.url,"_blank","noopener"),children:e.text}),II=({props:e})=>s.jsx("div",{className:Qt.imageBlock,children:s.jsx("div",{className:Qt.imageContainer,children:s.jsx("img",{src:e.src,alt:""})})}),NI=({props:e})=>s.jsxs("div",{className:Qt.notifyBlock,children:[s.jsxs("div",{className:Qt.notifyHeader,children:[s.jsx(w.Icon,{name:"Info",width:24,height:24,fill:"var(--text-secondary)"}),s.jsx("p",{children:e.heading})]}),s.jsx("p",{className:Qt.notifyContent,children:e.content})]}),vI=({props:e})=>{var t;return s.jsxs("div",{className:Qt.sectionBlock,children:[s.jsx("p",{className:Qt.sectionTitle,children:e.title}),s.jsx("span",{className:Qt.sectionSubtitle,children:e.subTitle}),(t=e.children)==null?void 0:t.map((n,r)=>s.jsx(ta,{block:n},r))]})},ta=({block:e})=>{switch(e.type){case"Section":return s.jsx(vI,{...e});case"ReadOnlyTextInput":return s.jsx(AI,{...e});case"Notify":return s.jsx(NI,{...e});case"Button":return s.jsx(SI,{...e});case"Image":return s.jsx(II,{...e});default:return null}},wI="_chargeStatusBlock_12swd_4",DI="_isAntistock_12swd_13",LI="_chargeStatusIcon_12swd_19",PI="_chargeStatusTitle_12swd_27",RI="_chargeStatusDescription_12swd_33",OI="_pickUpButton_12swd_39",MI="_actionButtons_12swd_49",FI="_actionButton_12swd_49",St={chargeStatusBlock:wI,isAntistock:DI,chargeStatusIcon:LI,chargeStatusTitle:PI,chargeStatusDescription:RI,pickUpButton:OI,actionButtons:MI,actionButton:FI},Gn={[ge.Paid]:"Payment Successful",[ge.Pending]:"Payment Pending",[ge.Expired]:"Payment Expired",[ge.Cancelled]:"Payment Cancelled",[ge.NotPaid]:"Payment Failed",[ge.Refunded]:"Payment Refunded"},Ed={[ge.Paid]:"Your payment has successfully been processed. Tap on the button below to be redirected back to our website.",[ge.Pending]:"Your payment is currently pending. We recommend checking back shortly for confirmation.",[ge.Expired]:"Your payment has expired due to the payment not being sent in time. If you already sent the payment, please contact us below.",[ge.Cancelled]:"You canceled the warrant. If there are any problems, please contact support",[ge.NotPaid]:"Your payment has expired due to the payment not being sent in time. If you already sent the payment, please contact us below.",[ge.Refunded]:"Your payment has been refunded. Please check your payment method for confirmation."},Td=()=>({[ge.Paid]:s.jsx("div",{className:`${St.chargeStatusIcon}`,children:s.jsx(w.Icon,{name:"Check",fill:"var(--text-success)"})}),[ge.Pending]:s.jsx("div",{className:St.chargeStatusIcon,children:s.jsx(w.Icon,{name:"Clock",fill:"var(--text-warning)"})}),[ge.Expired]:s.jsx("div",{className:St.chargeStatusIcon,children:s.jsx(w.Icon,{name:"XCircle",fill:"var(--text-action)"})}),[ge.Cancelled]:s.jsx("div",{className:St.chargeStatusIcon,children:s.jsx(w.Icon,{name:"XCircle",fill:"var(--text-action)"})}),[ge.NotPaid]:s.jsx("div",{className:St.chargeStatusIcon,children:s.jsx(w.Icon,{name:"XCircle",fill:"var(--text-action)"})}),[ge.Refunded]:s.jsx("div",{className:St.chargeStatusIcon,children:s.jsx(w.Icon,{name:"XCircle",fill:"var(--text-warning)"})})}),yd=({charge:e})=>{const t=e.status,n=b.useNavigate(),{shopDomain:r}=b.useStorefrontStore(),{isAntistock:u}=b.useGeneralStore(),a=P.useRef(),[i,o]=b.useSearchParams(),c=()=>{var h,f;if(!((h=e.order)!=null&&h.id))return;const l=i.get("redirectRoute");if((e==null?void 0:e.status)===ge.Paid&&e.redirectUrl&&!a.current){const p=JSON.parse(localStorage.getItem("orders")||"{}")[((f=e==null?void 0:e.order)==null?void 0:f.id)||""];p?window.open(p.fullAccessToken?`${e.redirectUrl}/${p.fullAccessToken}`:`${e.redirectUrl}`,"_self"):window.open(e.redirectUrl,"_self")}(e==null?void 0:e.status)===ge.Paid&&a.current&&n(a.current,{replace:!0}),l&&a&&(a.current=l,i.delete("redirectRoute"),o(i))};return s.jsxs("div",{className:b.clx(St.chargeStatusBlock,{[St.isAntistock]:u}),children:[Td()[t],s.jsx("h2",{className:St.chargeStatusTitle,children:Gn[t]}),s.jsx("p",{className:St.chargeStatusDescription,children:Ed[t]}),t===ge.Paid?s.jsx("div",{className:St.pickUpButton,style:u?{justifyContent:"flex-start"}:void 0,children:s.jsxs(w.Button,{onClick:c,style:{width:"100%",maxWidth:"250px",display:"flex",alignItems:"center",gap:"5px"},type:"Secondary",children:[s.jsx(w.Icon,{name:"ArrowLineUpRight"}),u?"View Order":"Pick up Order"]})}):s.jsxs("div",{className:St.actionButtons,children:[s.jsx("div",{className:St.actionButton,children:s.jsxs(w.Button,{type:"Secondary",onClick:()=>window.open(`https://${r}`),style:{width:"100%",display:"flex",alignItems:"center",gap:"5px"},children:[s.jsx(w.Icon,{name:"ArrowLineUpRight"}),"Visit Website"]})}),s.jsx("div",{className:St.actionButton,children:s.jsxs(w.Button,{type:"Secondary",style:{width:"100%",display:"flex",alignItems:"center",gap:"5px"},onClick:()=>{u?window.open(`https://${r}/support`):n("/contact")},children:[s.jsx(w.Icon,{name:"ChatsTeardrop"}),"Contact Support"]})})]})]})},BI="_bottomSheet_1x4sq_1",jI="_content_1x4sq_8",HI="_agreementList_1x4sq_11",UI="_agreementItem_1x4sq_16",VI="_warning_1x4sq_23",$I="_buttonGroup_1x4sq_31",zI="_buttonWrapper_1x4sq_41",qI="_fullWidthButton_1x4sq_44",ZI="_modal_1x4sq_48",WI="_header_1x4sq_55",Vt={bottomSheet:BI,content:jI,agreementList:HI,agreementItem:UI,warning:VI,buttonGroup:$I,buttonWrapper:zI,fullWidthButton:qI,modal:ZI,header:WI},kd=({setIsOpen:e,price:t})=>{const[n,r]=P.useState({agreeToSendAsFF:!1,agreeToSend:!1,agreeToNotAddNote:!1}),{setIsOpen:u}=b.useModalStore(),a=()=>{u(!1),setTimeout(()=>{e(!1)},300)};return s.jsxs("div",{className:Vt.modal,onClick:i=>i.stopPropagation(),children:[s.jsxs("div",{className:Vt.header,children:[s.jsx("h3",{id:"h3",children:"Note"}),s.jsx(w.Icon,{name:"X",hoverable:!0,onClick:a,fill:"var(--text-primary)"})]}),s.jsxs("div",{className:Vt.bottomSheet,children:[s.jsxs("div",{className:Vt.content,children:[s.jsxs("div",{className:Vt.agreementList,children:[s.jsxs("label",{className:Vt.agreementItem,children:[s.jsx(w.CheckboxSettings,{value:n.agreeToSendAsFF,onChange:i=>r({...n,agreeToSendAsFF:i})}),s.jsx("p",{children:"I agree to send the payment as friends & family"})]}),s.jsxs("label",{className:Vt.agreementItem,children:[s.jsx(w.CheckboxSettings,{value:n.agreeToSend,onChange:i=>r({...n,agreeToSend:i})}),s.jsxs("p",{children:["I agree to send the payment of ",b.formatPrice(t)," ",t.currency]})]}),s.jsxs("label",{className:Vt.agreementItem,children:[s.jsx(w.CheckboxSettings,{value:n.agreeToNotAddNote,onChange:i=>r({...n,agreeToNotAddNote:i})}),s.jsx("p",{children:"I agree to not add a note to this payment"})]})]}),s.jsx("div",{className:Vt.warning,children:s.jsxs("p",{children:["Please note that you are required to send the exact payment of ",b.formatPrice(t)," ",t.currency,". If you were to send any amount over or below, your funds will be lost."]})})]}),s.jsxs("div",{className:Vt.buttonGroup,children:[s.jsx("div",{className:Vt.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",children:s.jsx("span",{className:"text-[var(--text-secondary)]",children:"Cancel"})})}),s.jsx("div",{className:Vt.fullWidthButton,children:s.jsx(w.Button,{type:"Primary",disabled:!(n.agreeToSendAsFF&&n.agreeToNotAddNote&&n.agreeToSend),onClick:a,children:"Continue to Payment"})})]})]})]})},YI="_chargeItemsContainer_vynct_5",GI="_chargeItemsInner_vynct_18",XI="_productsContainer_vynct_25",KI="_antistockLayout_vynct_40",QI="_mainContentAntistock_vynct_53",JI="_desktopTrackPayment_vynct_64",eN="_desktopFooter_vynct_73",tN="_footerContainerAntistock_vynct_94",nN="_chargeHeader_vynct_107",rN="_chargeTitle_vynct_115",uN="_chargeDescription_vynct_121",aN="_copyButton_vynct_127",iN="_productsList_vynct_139",sN="_footerContainer_vynct_94",Tt={chargeItemsContainer:YI,chargeItemsInner:GI,productsContainer:XI,antistockLayout:KI,mainContentAntistock:QI,desktopTrackPayment:JI,desktopFooter:eN,footerContainerAntistock:tN,chargeHeader:nN,chargeTitle:rN,chargeDescription:uN,copyButton:aN,productsList:iN,footerContainer:sN},Ad=({charge:e})=>{var i;const t=Jn(),{isAntistock:n}=b.useGeneralStore(),r=(e==null?void 0:e.price.currency)||"USD",u=new Intl.NumberFormat("en-US",{style:"currency",currency:r}),a=P.useMemo(()=>{var o;return((o=e==null?void 0:e.order)==null?void 0:o.partOrders.map(c=>{var l,h,f,m;return{id:(c==null?void 0:c.id)||0,image:c.productWithVariant.image,name:(()=>{var x,C;const p=((x=c.productWithVariant)==null?void 0:x.name)||"",g=((C=c.productWithVariant)==null?void 0:C.variantName)||"";return!p&&!g?"":!g||p===g?p:p?`${p} (${g})`:g})(),description:"",price:{quantity:c.quantity,amount:((l=c.productWithVariant)==null?void 0:l.price.amount)||0,currency:(h=c.productWithVariant)==null?void 0:h.price.currency},subscriptionSettings:(f=e.order)!=null&&f.subscriptionOrderId?(m=c.productWithVariant)==null?void 0:m.subscriptionSettings:null}}))||[]},[e]);return s.jsx("div",{className:Tt.chargeItemsContainer,children:s.jsxs("div",{className:Tt.chargeItemsInner,children:[s.jsx(ma,{expiresAt:e==null?void 0:e.expiresAt}),s.jsxs("div",{className:`${Tt.productsContainer} ${n?Tt.antistockLayout:""}`,children:[(e==null?void 0:e.name)&&s.jsxs("header",{className:Tt.chargeHeader,children:[s.jsxs("div",{children:[s.jsx("h1",{className:Tt.chargeTitle,id:"h5",children:e.name}),e.description&&s.jsx("p",{className:Tt.chargeDescription,id:"md",children:e.description})]}),((i=e.order)==null?void 0:i.id)&&!n&&s.jsxs(w.Button,{type:"Secondary",className:Tt.copyButton,onClick:()=>{var o;return t(((o=e.order)==null?void 0:o.id)||"")},children:[s.jsx(w.Icon,{name:"Copy"}),"Copy Order ID"]})]}),s.jsxs("div",{className:n?Tt.mainContentAntistock:"",style:n?void 0:{flex:1},children:[!!a.length&&s.jsx("div",{className:Tt.productsList,children:a.map(o=>s.jsx(ga,{product:o},o.id))}),s.jsx(kr,{formatter:u,coupon:null,total:(e==null?void 0:e.price.amount)||0,discount:0,totalWithDiscount:(e==null?void 0:e.price.amount)||0,isShowSubtotal:!1}),n&&e&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:Tt.desktopTrackPayment,children:s.jsx(va,{timeline:e.timeline})}),s.jsx(Hn,{className:Tt.desktopFooter})]})]}),!n&&s.jsx(Hn,{className:`${Tt.footerContainer} ${n?Tt.footerContainerAntistock:""}`})]})]})})},oN="_checkoutOrderMainData_hqf60_1",cN="_orderDetailRow_hqf60_6",lN="_chargeIdRow_hqf60_16",dN="_detailLabel_hqf60_25",fN="_detailValue_hqf60_29",hN="_chargeIdContainer_hqf60_33",pN="_chargeId_hqf60_16",mN="_copyIcon_hqf60_51",Xe={checkoutOrderMainData:oN,orderDetailRow:cN,chargeIdRow:lN,detailLabel:dN,detailValue:fN,chargeIdContainer:hN,chargeId:pN,copyIcon:mN},Os=({lastUpdate:e,invoiceId:t,email:n,paymentType:r,orderId:u})=>{const a=Jn(),[i,o]=P.useState(null),c=i==null?void 0:i.find(h=>h.name===r);P.useEffect(()=>{i||(async()=>{if(!r)return;const m=await cu([r]);o(m)})()},[r,i]);const l=h=>{const f=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],m=h.getDate().toString().padStart(2,"0"),p=f[h.getMonth()],g=h.getFullYear(),x=h.getHours(),C=h.getMinutes().toString().padStart(2,"0"),_=h.getSeconds().toString().padStart(2,"0"),v=x>=12?"PM":"AM",k=(x%12||12).toString().padStart(2,"0");return`${p} ${m}, ${g} at ${k}:${C}:${_} ${v}`};return s.jsxs("div",{className:Xe.checkoutOrderMainData,children:[s.jsxs("div",{className:Xe.orderDetailRow,children:[s.jsx("p",{className:Xe.detailLabel,id:"md",children:"Last Updated"}),s.jsx("p",{className:Xe.detailValue,id:"md",children:l(new Date(e))})]}),r&&s.jsxs("div",{className:Xe.orderDetailRow,children:[s.jsx("p",{className:Xe.detailLabel,id:"md",children:"Payment Type"}),s.jsx("p",{className:Xe.detailValue,id:"md",children:c==null?void 0:c.displayName})]}),s.jsxs("div",{className:Xe.orderDetailRow,children:[s.jsx("p",{className:Xe.detailLabel,id:"md",children:"Email"}),s.jsx("p",{className:Xe.detailValue,id:"md",children:n})]}),t&&s.jsxs("div",{className:Xe.chargeIdRow,children:[s.jsx("p",{className:Xe.detailLabel,id:"md",children:"Charge ID"}),s.jsxs("div",{className:Xe.chargeIdContainer,children:[s.jsx("p",{className:Xe.chargeId,id:"md",children:t}),s.jsx("div",{className:Xe.copyIcon,onClick:()=>a(t),children:s.jsx(w.Icon,{name:"Copy"})})]})]}),u&&s.jsxs("div",{className:Xe.chargeIdRow,children:[s.jsx("p",{className:Xe.detailLabel,id:"md",children:"Order ID"}),s.jsxs("div",{className:Xe.chargeIdContainer,children:[s.jsx("p",{className:Xe.chargeId,id:"md",children:u}),s.jsx("div",{className:Xe.copyIcon,onClick:()=>a(u),children:s.jsx(w.Icon,{name:"Copy"})})]})]})]})},gN="_bottomSheet_1yai1_1",bN="_formContainer_1yai1_8",_N="_error_1yai1_14",xN="_buttonGroup_1yai1_18",CN="_buttonWrapper_1yai1_28",EN="_fullWidthButton_1yai1_31",TN="_modal_1yai1_41",yN="_header_1yai1_48",Sn={bottomSheet:gN,formContainer:bN,error:_N,buttonGroup:xN,buttonWrapper:CN,fullWidthButton:EN,modal:TN,header:yN},Sd=({chargeId:e,setIsOpen:t})=>{const[n,r]=P.useState(""),[u,a]=P.useState(""),{setIsOpen:i}=b.useModalStore(),o=h=>{try{return new URL(h),!0}catch{return!1}},c=async h=>{if(h.preventDefault(),!n){a("The link field cannot be empty.");return}if(!o(n)){a("Please enter a valid URL");return}await Gd({url:n},e)&&(alert("CashApp successfully verified"),t(!1))},l=()=>{i(!1),setTimeout(()=>{t(!1)},300)};return s.jsxs("div",{className:Sn.modal,onClick:h=>h.stopPropagation(),children:[s.jsxs("div",{className:Sn.header,children:[s.jsx("h3",{id:"h3",children:"CashApp Verify"}),s.jsx(w.Icon,{name:"X",hoverable:!0,onClick:l,fill:"var(--text-primary)"})]}),s.jsx("form",{onSubmit:c,children:s.jsxs("div",{className:Sn.bottomSheet,children:[s.jsx("div",{className:Sn.formContainer,children:s.jsxs("div",{children:[s.jsx(w.Input,{value:n,onChange:h=>{r(h),a("")},label:"Enter Cashapp Link",placeholder:"https://cash.app/payments/0000"}),u&&s.jsx("p",{className:Sn.error,children:u})]})}),s.jsxs("div",{className:Sn.buttonGroup,children:[s.jsx("div",{className:Sn.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:l,children:"Cancel"})}),s.jsx("div",{className:Sn.fullWidthButton,children:s.jsx(w.Button,{type:"Primary",children:"Verify"})})]})]})})]})},kN="_trackPaymentContainer_fk3b6_1",AN="_trackPaymentBox_fk3b6_5",SN="_trackPaymentBoxActive_fk3b6_18",IN="_trackPaymentHeader_fk3b6_23",NN="_trackPaymentTitle_fk3b6_27",vN="_trackPaymentTimeline_fk3b6_33",wN="_trackPaymentItem_fk3b6_42",DN="_itemHeader_fk3b6_48",LN="_itemDate_fk3b6_55",PN="_itemMessage_fk3b6_59",RN="_trackPaymentToggle_fk3b6_64",ON="_trackPaymentToggleContent_fk3b6_75",MN="_trackPaymentToggleText_fk3b6_81",FN="_antistock_fk3b6_88",bt={trackPaymentContainer:kN,trackPaymentBox:AN,trackPaymentBoxActive:SN,trackPaymentHeader:IN,trackPaymentTitle:NN,trackPaymentTimeline:vN,trackPaymentItem:wN,itemHeader:DN,itemDate:LN,itemMessage:PN,trackPaymentToggle:RN,trackPaymentToggleContent:ON,trackPaymentToggleText:MN,antistock:FN},Zc=(e,t)=>{const n=e.getDate().toString().padStart(2,"0"),r=(e.getMonth()+1).toString().padStart(2,"0"),u=e.getFullYear(),a=e.getHours(),i=e.getMinutes().toString().padStart(2,"0"),o=e.getSeconds().toString().padStart(2,"0"),c=a>=12?"PM":"AM",l=(a%12||12).toString().padStart(2,"0");return t==="dd.MM.yyyy"?`${n}.${r}.${u}`:t==="hh:mm:ss aa"?`${l}:${i}:${o} ${c}`:""},BN={[ge.Paid]:{displayName:Gn[ge.Paid],displayMessage:"The invoice has been completed and the product has been delivered.",type:"success"},[ge.Pending]:{displayName:Gn[ge.Pending],displayMessage:"The invoice has been created and we are now waiting to receive the payment.",type:"warning"},[ge.Expired]:{displayName:Gn[ge.Expired],displayMessage:"Your payment has expired due to the payment not being sent in time.",type:"error"},[ge.Cancelled]:{displayName:Gn[ge.Cancelled],displayMessage:"The order has been canceled. The payment was not sent within the time limit.",type:"error"},[ge.NotPaid]:{displayName:"New",displayMessage:"The charge has been created and is awaiting payment.",type:"success"},[ge.Refunded]:{displayName:Gn[ge.Refunded],displayMessage:"Your order was refunded. Please check your payment method for confirmation.",type:"warning"}},jN=({date:e,chargeStatus:t})=>(console.log(t),s.jsxs("div",{className:bt.trackPaymentItem,children:[s.jsxs("div",{className:bt.itemHeader,children:[s.jsx("p",{className:bt.itemDate,id:"md-bold",children:Zc(new Date(e),"dd.MM.yyyy")}),s.jsx("p",{className:bt.itemTime,id:"md",children:Zc(new Date(e),"hh:mm:ss aa")})]}),s.jsx("p",{className:bt.itemMessage,id:"md",children:BN[t].displayMessage})]})),va=({timeline:e,className:t})=>{const[n,r]=P.useState(!1),{isAntistock:u}=b.useGeneralStore();return s.jsxs("div",{className:b.clx(bt.trackPaymentContainer,t,{[bt.antistock]:u}),children:[s.jsxs("div",{className:`${bt.trackPaymentBox} ${n?bt.trackPaymentBoxActive:""}`,style:u?{border:"1px solid var(--border-secondary)"}:void 0,children:[s.jsx("header",{className:bt.trackPaymentHeader,children:s.jsx("h2",{className:bt.trackPaymentTitle,id:"h4",children:"Track Payment"})}),s.jsx("div",{className:bt.trackPaymentTimeline,children:Object.keys(e).map(a=>s.jsx(jN,{date:e[a],chargeStatus:a},a))})]}),s.jsxs("div",{className:bt.trackPaymentToggle,onClick:()=>r(!n),style:u?{padding:"1.25rem",border:"1px solid var(--border-secondary)",borderRadius:"var(--border-radius)"}:void 0,children:[s.jsxs("div",{className:bt.trackPaymentToggleContent,children:[u?null:s.jsx(w.Icon,{name:"MagnifyingGlass",fill:"var(--text-secondary)"}),s.jsx("p",{className:bt.trackPaymentToggleText,id:"h5",children:"Track Payment"})]}),s.jsx(w.Icon,{name:"CaretRight",fill:"var(--text-primary)",width:16,height:16})]})]})},HN="_dateTime_1dnnn_11",UN="_tableItem_1dnnn_25",VN="_status_1dnnn_29",$N="_statusInProgress_1dnnn_38",zN="_statusText_1dnnn_42",qN="_statusIcon_1dnnn_46",ZN="_statusInProgressText_1dnnn_52",WN="_statusInProgressIcon_1dnnn_57",YN="_message_1dnnn_63",_t={dateTime:HN,tableItem:UN,status:VN,statusInProgress:$N,statusText:zN,statusIcon:qN,statusInProgressText:ZN,statusInProgressIcon:WN,message:YN},Id=({item:e})=>{const[t,n]=b.extractDateAndTime(e.createdAt),r=b.useNavigate(),a=(i=>i.length>30?i.slice(0,27)+"...":i)(e.latestMessage);return s.jsxs(P.Fragment,{children:[s.jsx(at,{className:_t.tableItem,onClick:()=>r(`/ticket/${e.id}/${e.accessToken}`),children:s.jsxs("span",{id:"md",children:["#",e.id]})}),s.jsx(at,{className:b.clx(_t.message,_t.tableItem),onClick:()=>r(`/ticket/${e.id}/${e.accessToken}`),children:s.jsx("span",{id:"md",children:a})}),s.jsx(at,{className:_t.tableItem,onClick:()=>r(`/ticket/${e.id}/${e.accessToken}`),children:s.jsxs("div",{children:[s.jsx("div",{id:"md",children:t}),s.jsx("div",{className:_t.dateTime,id:"md",children:n})]})}),s.jsx(at,{className:_t.tableItem,onClick:()=>r(`/ticket/${e.id}/${e.accessToken}`),children:s.jsx(GN,{status:e.status})})]},e.id)},GN=({status:e})=>s.jsxs("div",{className:b.clx(_t.status,{[_t.statusClosed]:e==="CLOSED",[_t.statusInProgress]:e!=="CLOSED"}),children:[s.jsx("div",{className:b.clx(_t.statusIcon,{[_t.statusInProgressIcon]:e!=="CLOSED"}),children:e==="CLOSED"?s.jsx(w.Icon,{name:"CheckCircle",className:_t.statusIcon}):s.jsx(w.Icon,{name:"Clock",className:_t.statusInProgressIcon})}),s.jsx("div",{className:b.clx(_t.statusText,{[_t.statusInProgressText]:e!=="CLOSED"}),id:"md",children:e==="CLOSED"?"Closed":"In Progress"})]}),XN="_tableContainer_1eytq_1",KN="_table_1eytq_1",QN="_productInfo_1eytq_19",JN="_productImage_1eytq_26",ev="_productName_1eytq_35",tv="_expirationDate_1eytq_46",nv="_overflowItem_1eytq_51",rv="_gatewayContainer_1eytq_57",uv="_gatewayImage_1eytq_62",av="_dateTime_1eytq_67",iv="_tableLoader_1eytq_72",sv="_tableItem_1eytq_81",lt={tableContainer:XN,table:KN,productInfo:QN,productImage:JN,productName:ev,expirationDate:tv,overflowItem:nv,gatewayContainer:rv,gatewayImage:uv,dateTime:av,tableLoader:iv,tableItem:sv},ov="_badge_1oac8_1",cv="_active_1oac8_12",lv="_awaitingPayment_1oac8_17",dv="_cancelled_1oac8_22",fv="_changedGateway_1oac8_27",hv="_expired_1oac8_32",pv="_rial_1oac8_37",mv="_pastDue_1oac8_42",gv="_replaced_1oac8_47",Cn={badge:ov,active:cv,awaitingPayment:lv,cancelled:dv,changedGateway:fv,expired:hv,rial:pv,pastDue:mv,replaced:gv},bv=()=>({[xn.ACTIVE]:{icon:s.jsx(w.Icon,{name:"CheckCircle"}),title:"Active",className:Cn.active},[xn.AWAITING_PAYMENT]:{icon:s.jsx(w.Icon,{name:"Clock"}),title:"Awaiting Payment",className:Cn.awaitingPayment},[xn.CANCELLED]:{icon:s.jsx(w.Icon,{name:"XCircle"}),title:"Cancelled",className:Cn.cancelled},[xn.CHANGED_GATEWAY]:{icon:s.jsx(w.Icon,{name:"Warning"}),title:"Upgraded",className:Cn.changedGateway},[xn.EXPIRED]:{icon:s.jsx(w.Icon,{name:"XCircle"}),title:"Expired",className:Cn.expired},[xn.RIAL]:{icon:s.jsx(w.Icon,{name:"Clock"}),title:"Active",className:Cn.rial},[xn.PAST_DUE]:{icon:s.jsx(w.Icon,{name:"Clock"}),title:"Trial",className:Cn.pastDue},[xn.REPLACED]:{icon:s.jsx(w.Icon,{name:"Warning"}),title:"Replaced",className:Cn.replaced}}),Ms=({status:e})=>{const t=bv()[e];return s.jsxs("div",{className:`${Cn.badge} ${t.className}`,children:[t.icon,s.jsx("p",{id:"md",children:t.title})]})},_v=(e,t)=>{const n=t.find(r=>r.name===e);return n?s.jsxs("div",{className:lt.gatewayContainer,children:[s.jsx("img",{alt:n.displayName,src:b.convertCfImageIdToUrl(n.logoCfImageId,"100"),className:lt.gatewayImage}),s.jsx("div",{children:n.displayName})]}):null},xv=({item:e,gatewaysDetail:t})=>{const[n,r]=b.extractDateAndTime(e.createdAt),[u]=b.extractDateAndTime(e.activeTo||""),a=Jn();return s.jsxs(P.Fragment,{children:[s.jsx(at,{children:s.jsxs("div",{className:lt.productInfo,children:[s.jsx("div",{className:lt.productImage,children:s.jsx(w.Icon,{name:"Image",width:20,height:20,fill:"var(--text-secondary)"})}),s.jsxs("div",{children:[s.jsx(b.NavLink,{to:`/subscriptions/${e.id}/${e.accessToken}`,className:lt.productName,id:"md",children:e.productName}),s.jsx("p",{className:lt.expirationDate,children:e.activeTo&&`expires at ${u}`})]})]})}),s.jsx(at,{className:lt.overflowItem,onClick:()=>a(e.id),children:e.id}),s.jsx(at,{children:s.jsx(Ms,{status:e.status})}),s.jsx(at,{children:b.formatPrice(e.price)}),s.jsx(at,{children:_v(e.gatewayName,t)}),s.jsx(at,{children:s.jsxs("div",{children:[s.jsx("div",{id:"md",children:n}),s.jsx("div",{className:lt.dateTime,id:"md",children:r})]})})]},e.id)},Nd=({subscriptions:e,gatewaysDetail:t,totalCount:n,page:r,setPage:u})=>{const i=!(!(e!=null&&e.length)||!t);return s.jsxs("div",{className:lt.tableContainer,children:[s.jsxs(pa,{className:lt.table,children:[s.jsx(It,{className:lt.tableItem,children:"Product name"}),s.jsx(It,{className:lt.tableItem,children:"ID"}),s.jsx(It,{className:lt.tableItem,children:"Status"}),s.jsx(It,{className:lt.tableItem,children:"Value"}),s.jsx(It,{className:lt.tableItem,children:"Payment"}),s.jsx(It,{className:lt.tableItem,children:"Date"}),i&&(e==null?void 0:e.map(o=>s.jsx(xv,{item:o,gatewaysDetail:t},o.id)))]}),!i&&s.jsx("div",{className:lt.tableLoader,children:s.jsx(w.Loader,{})}),i&&s.jsx(hu,{currentPage:r,totalCount:n,onPageChange:u})]})},Cv="_pageLoading_1rj3k_2",Ev="_title_1rj3k_11",Tv="_description_1rj3k_17",hi={pageLoading:Cv,title:Ev,description:Tv},yv=({description:e,title:t})=>s.jsxs("div",{className:hi.pageLoading,children:[s.jsx("div",{children:s.jsx(w.Loader,{})}),s.jsx("h1",{className:hi.title,children:t}),s.jsx("p",{className:hi.description,children:e})]}),kv="_container_1opbn_1",Av="_productDetails_1opbn_8",Sv="_imageContainer_1opbn_14",Iv="_image_1opbn_14",Nv="_textContainer_1opbn_32",vv="_header_1opbn_40",wv="_title_1opbn_46",Dv="_price_1opbn_53",Lv="_badgeContainer_1opbn_57",Pv="_description_1opbn_61",nn={container:kv,productDetails:Av,imageContainer:Sv,image:Iv,textContainer:Nv,header:vv,title:wv,price:Dv,badgeContainer:Lv,description:Pv},vd=({subscription:e})=>s.jsxs("div",{className:nn.container,children:[s.jsxs("div",{className:nn.productDetails,children:[s.jsx("div",{className:nn.imageContainer,children:e!=null&&e.image?s.jsx("img",{className:nn.image,src:b.convertCfImageIdToUrl(e.image.cfId),alt:e==null?void 0:e.name}):s.jsx(w.Icon,{name:"Image"})}),s.jsxs("div",{className:nn.textContainer,children:[s.jsx("div",{className:nn.header,children:s.jsx("h2",{className:nn.title,children:e.name})}),s.jsxs("p",{className:nn.price,children:[b.formatPrice(e.price)," / ",e.recurringInterval]})]}),s.jsx("div",{className:nn.badgeContainer,children:s.jsx(Ms,{status:e.status})})]}),e.description&&s.jsx(Ts,{className:nn.description,children:e.description})]}),Rv="_card_69liy_1",Ov="_price_69liy_10",Mv="_interval_69liy_17",Fv="_name_69liy_22",Bv="_description_69liy_28",jv="_currentPlan_69liy_32",Hv="_selectButton_69liy_45",Uv="_progressSection_69liy_50",Vv="_progressLabel_69liy_54",$v="_bottomSheet_69liy_60",zv="_title_69liy_69",qv="_typeSelector_69liy_80",Zv="_typeOption_69liy_90",Wv="_active_69liy_100",Yv="_saveTag_69liy_108",Gv="_planSelector_69liy_117",Xv="_modal_69liy_127",Kv="_inactive_69liy_148",Qv="_notMounted_69liy_151",Jv="_closeButton_69liy_157",We={card:Rv,price:Ov,interval:Mv,name:Fv,description:Bv,currentPlan:jv,selectButton:Hv,progressSection:Uv,progressLabel:Vv,bottomSheet:$v,title:zv,typeSelector:qv,typeOption:Zv,active:Wv,saveTag:Yv,planSelector:Gv,modal:Xv,inactive:Kv,notMounted:Qv,closeButton:Jv},ew=({variant:e,onSelect:t,isCurrent:n})=>{const r=e.subscriptionSettings.recurringIntervalDays===30?"month":e.subscriptionSettings.recurringIntervalDays===365?"year":"period",u=e.subscriptionSettings.price.amount.toFixed(2),a=e.subscriptionSettings.recurringIntervalDays,i=10;return s.jsxs("div",{className:We.card,onClick:t,children:[s.jsxs("h2",{className:We.price,children:["$",u," ",s.jsxs("span",{className:We.interval,children:["/ ",r]})]}),s.jsx("h3",{className:We.name,children:e.name}),e.description&&s.jsx("p",{className:We.description,children:e.description}),n?s.jsxs("div",{className:We.currentPlan,children:[s.jsx(w.Icon,{name:"Check"}),"Your current Plan"]}):s.jsx(w.Button,{type:"Secondary",className:We.selectButton,children:"Select"}),n&&s.jsxs("div",{className:We.progressSection,children:[s.jsx(l0,{percent:i/a*100,disablePercentLabel:!0}),s.jsxs("p",{className:We.progressLabel,children:["Used: ",i," of ",a," days"]})]})]})},wd=({isOpen:e,setIsOpen:t,subscription:n})=>{const[r,u]=P.useState(null),[a,i]=P.useState(null),[o,c]=P.useState(null),{id:l,accessToken:h}=b.useParams(),[f,m]=P.useState(!1),[p,g]=P.useState(!1),{setIsOpen:x}=b.useModalStore();P.useEffect(()=>{e&&m(!0)},[e]);const C=()=>{t(!1)},[_,v]=P.useState(null);P.useEffect(()=>{l&&h&&(async()=>{if(l&&h){const{data:I}=await b2({id:l,accessToken:h});v(I)}})()},[l,h]),P.useEffect(()=>{var S;if(_!=null&&_.data.types[0]){const I=(S=_.data.types.flatMap(M=>M.productVariants).find(M=>M.data.id===(n==null?void 0:n.variantId)))==null?void 0:S.data;I&&(c(I),i(I))}},[_,n]),P.useEffect(()=>{_!=null&&_.data.types[0]&&u(_==null?void 0:_.data.types[0])},[_==null?void 0:_.data.types]);const k=S=>{u(S),i(null)},D=S=>{i(S),x(!0),g(!0)};return s.jsxs("div",{className:b.clx(We.modal,{[We.active]:e,[We.inactive]:!e&&f,[We.notMounted]:!f}),onClick:S=>S.stopPropagation(),children:[s.jsx(w.Icon,{name:"X",onClick:C,hoverable:!0,className:We.closeButton,fill:"var(--text-primary)"}),s.jsxs("div",{className:We.bottomSheet,children:[s.jsx("h3",{id:"h3",className:We.title,children:"Change Plan"}),s.jsx("p",{className:We.description,children:_==null?void 0:_.data.description}),s.jsx("div",{className:We.typeSelector,children:_==null?void 0:_.data.types.map(S=>s.jsxs("div",{className:b.clx(We.typeOption,{[We.active]:(r==null?void 0:r.id)===S.id}),onClick:()=>k(S),children:[S.name,S.name==="Yearly"&&s.jsx("span",{className:We.saveTag,children:"Save %"})]},S.id))}),r&&s.jsx("div",{className:We.planSelector,children:r.productVariants.map(S=>s.jsx(ew,{variant:S.data,isSelected:(a==null?void 0:a.id)===S.data.id,isCurrent:(o==null?void 0:o.id)===S.data.id,onSelect:()=>D(S.data)},S.data.id))})]}),p&&a&&n&&s.jsx(w.Modal,{close:()=>{g(!1)},children:s.jsx(Od,{setIsOpen:g,selectedVariant:a,subscription:n})})]})},tw="_container_nb625_1",nw="_title_nb625_11",rw="_subtitle_nb625_16",uw="_info_nb625_20",Bu={container:tw,title:nw,subtitle:rw,info:uw},Dd=()=>{const{subscription:e}=b.useSubscriptionStore(),[t,n]=b.extractDateAndTime((e==null?void 0:e.activeTo)||""),[r,u]=P.useState(!1),{setIsOpen:a}=b.useModalStore();return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:Bu.container,children:[s.jsxs("div",{className:Bu.info,children:[s.jsx("p",{className:Bu.title,children:"Expiration Date"}),s.jsxs("p",{className:Bu.subtitle,children:[t," at ",n]})]}),s.jsx(w.Button,{type:"Special",onClick:i=>{i.stopPropagation(),a(!0),u(!0)},children:"Extend"})]}),r&&s.jsx(w.Modal,{close:()=>u(!1),children:s.jsx(Hd,{setIsOpen:u})})]})},aw="_couponContainer_1sspa_1",iw="_iconWrapper_1sspa_10",sw="_details_1sspa_21",ow="_title_1sspa_25",cw="_progress_1sspa_29",lw="_foreverText_1sspa_34",or={couponContainer:aw,iconWrapper:iw,details:sw,title:ow,progress:cw,foreverText:lw},Ld=({coupon:e,currency:t})=>{const n=e.isFixed?b.formatPrice({amount:e.discount,currency:t}):`${e.discount}%`,r=e.initialCouponDurationForSubscriptions?b.percentageDifference(e.initialCouponDurationForSubscriptions,e.currentCouponDurationForSubscriptions||1):100;return s.jsxs("div",{className:or.couponContainer,children:[s.jsx("div",{className:or.iconWrapper,children:s.jsx(w.Icon,{name:"CheckCircle"})}),s.jsxs("div",{className:or.details,children:[s.jsxs("p",{className:or.title,children:[e.name,", ",n," discount"]}),s.jsx("div",{className:or.progress,children:s.jsx(l0,{color:"#C2C2C2",percent:r,disablePercentLabel:!0})}),s.jsx("p",{className:or.foreverText,children:"Forever discount code"})]})]})},dw="_paymentMethodContainer_1g0da_4",fw="_paymentMethodTitle_1g0da_15",hw="_activeMethod_1g0da_20",pw="_noMethod_1g0da_28",mw="_activeMethodPaymentMethod_1g0da_37",gw="_paymentMethodLogo_1g0da_47",bw="_paymentMethodNumber_1g0da_57",_w="_method_1g0da_61",Rn={paymentMethodContainer:dw,paymentMethodTitle:fw,activeMethod:hw,noMethod:pw,activeMethodPaymentMethod:mw,paymentMethodLogo:gw,paymentMethodNumber:bw,method:_w},xw="_paymentMethods_1gev0_1",Cw="_modal_1gev0_14",Ew="_header_1gev0_28",Tw="_content_1gev0_37",Zn={paymentMethods:xw,modal:Cw,header:Ew,content:Tw},yw=e=>{const{setIsLoading:t,setIsOpen:n}=e,{subscription:r,setSubscription:u}=b.useSubscriptionStore();if(!r)return null;const{id:a}=b.useParams(),i=b.useNavigate(),{notifications:o,setNotifications:c}=b.useNotificationStore(),{setPaymentMethod:l,setGateway:h,cart:f}=su(),{setIsOpen:m}=b.useModalStore();async function p(){if(g(),t(!0),a&&r){const{data:x}=await m2(a,f.gateway);x.isReconnectPaymentNeeded?i(`/charges/${x.chargeId}`):(c([...o,{status:"success",id:b.v4(),message:"Your action has been successfully completed"}]),u({...r,gatewayName:f.gateway}))}else c([...o,{status:"error",id:b.v4(),message:"Your action has been failed. Try again!"}]);t(!1)}function g(){m(!1),setTimeout(()=>{n(!1)},300)}return s.jsxs("div",{className:Zn.modal,onClick:x=>{x.stopPropagation()},children:[s.jsxs("div",{className:Zn.header,children:[s.jsx("h3",{id:"h3",className:Zn.title,children:"Choose Payment Method"}),s.jsx(w.Icon,{name:"X",onClick:g,hoverable:!0,fill:"var(--text-primary)"})]}),s.jsxs("div",{className:Zn.content,children:[(r==null?void 0:r.availableGateways)&&s.jsx(os,{possibleGateways:{availableGateways:r.availableGateways,requiresSignInGateways:r.availableGateways},setGateway:h,setPaymentMethod:l,totalAndDiscount:{total:(r==null?void 0:r.price.amount)||0,totalWithDiscount:r==null?void 0:r.price.amount},onSignInClick:()=>i("/customer-dash")}),s.jsxs("div",{className:Zn.paymentMethods,children:[s.jsx("div",{className:Zn.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:g,children:"Cancel"})}),s.jsx("div",{className:Zn.buttonWrapper,children:s.jsx(w.Button,{type:"Primary",disabled:!f.gateway,onClick:()=>p(),children:"Continue"})})]})]})]})},kw="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20131.39%2086.9'%3e%3cdefs%3e%3cstyle%3e.a{opacity:0;}.b{fill:%23fff;}.c{fill:%23ff5f00;}.d{fill:%23eb001b;}.e{fill:%23f79e1b;}%3c/style%3e%3c/defs%3e%3ctitle%3eAsset%201%3c/title%3e%3cg%20class='a'%3e%3crect%20class='b'%20width='131.39'%20height='86.9'/%3e%3c/g%3e%3crect%20class='c'%20x='48.37'%20y='15.14'%20width='34.66'%20height='56.61'/%3e%3cpath%20class='d'%20d='M51.94,43.45a35.94,35.94,0,0,1,13.75-28.3,36,36,0,1,0,0,56.61A35.94,35.94,0,0,1,51.94,43.45Z'/%3e%3cpath%20class='e'%20d='M120.5,65.76V64.6H121v-.24h-1.19v.24h.47v1.16Zm2.31,0v-1.4h-.36l-.42,1-.42-1h-.36v1.4h.26V64.7l.39.91h.27l.39-.91v1.06Z'/%3e%3cpath%20class='e'%20d='M123.94,43.45a36,36,0,0,1-58.25,28.3,36,36,0,0,0,0-56.61,36,36,0,0,1,58.25,28.3Z'/%3e%3c/svg%3e",Pd=()=>{var g,x,C;const{subscription:e}=b.useSubscriptionStore(),{cart:t,setPaymentMethod:n}=su(),r=b.useNavigate(),[u,a]=P.useState(null),[i,o]=P.useState(!1),[c,l]=P.useState(!1),{setIsOpen:h}=b.useModalStore();if(!e)return null;const[f,m]=P.useState(e.gatewayName||t.gateway),p=t.paymentMethod;return P.useEffect(()=>{(async()=>{const v=await cu(e.availableGateways);a(v)})()},[]),P.useEffect(()=>{t.gateway!==f&&m(t.gateway)},[t.gateway]),s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:Rn.paymentMethodContainer,children:[s.jsxs("div",{children:[s.jsx("p",{className:Rn.paymentMethodTitle,children:"Active Payment Method"}),e.gatewayInfo&&Object.keys(e.gatewayInfo).length>0&&s.jsx(Aw,{gatewayInfo:e.gatewayInfo}),(!e.gatewayInfo||Object.keys(e.gatewayInfo).length===0)&&f==="Balance"&&s.jsx(is,{gateway:f,gatewayDisplayName:f,total:(e==null?void 0:e.price.amount)||0,onSignInClick:()=>r("/customer-dash")}),(!e.gatewayInfo||Object.keys(e.gatewayInfo).length===0)&&!f&&s.jsx("span",{className:Rn.noMethod,children:"Payment method is not set"}),(!e.gatewayInfo||Object.keys(e.gatewayInfo).length===0)&&f&&s.jsx("div",{className:Rn.activeMethod,children:u&&s.jsx(ss,{align:"row",gatewayLogoCfId:(g=u.find(_=>_.name===f))==null?void 0:g.logoCfImageId,gatewayDisplayName:(x=u.find(_=>_.name===f))==null?void 0:x.displayName,gateway:f,poweredByLogoCfId:(C=u.find(_=>_.name===f))==null?void 0:C.poweredByImageCfImageId,className:Rn.activeMethodPaymentMethod,selected:p===f,onSelect:_=>{n(_)}},f)})]}),s.jsx(w.Button,{type:"Special",onClick:_=>{_.stopPropagation(),h(!0),l(!0)},children:t.gateway?"Change":"Manage"})]}),c&&s.jsx(w.Modal,{close:()=>l(!1),children:s.jsx(yw,{setIsLoading:o,setIsOpen:l})})]})},Aw=({gatewayInfo:e})=>{var t,n,r,u,a;return s.jsxs("div",{className:Rn.method,children:[s.jsxs("div",{className:Rn.paymentMethodLogo,children:[((t=e.card)==null?void 0:t.brand.toLowerCase())==="visa"&&s.jsx(Kp,{}),((n=e.card)==null?void 0:n.brand.toLowerCase())==="mastercard"&&s.jsx("img",{src:kw,alt:"",width:22}),((r=e.card)==null?void 0:r.brand.toLowerCase())!=="visa"&&((u=e.card)==null?void 0:u.brand.toLowerCase())!=="mastercard"&&s.jsx(w.Icon,{name:"CreditCard",width:22})]}),s.jsxs("p",{className:Rn.paymentMethodNumber,children:["•••• •••• •••• ",(a=e.card)==null?void 0:a.last4]})]})},Sw="_subscriptionProductContainer_83ibx_4",Iw="_subscriptionProductImage_83ibx_15",Nw="_subscriptionProductInfo_83ibx_32",vw="_name_83ibx_37",ww="_price_83ibx_40",jr={subscriptionProductContainer:Sw,subscriptionProductImage:Iw,subscriptionProductInfo:Nw,name:vw,price:ww},Rd=({subscription:e,id:t,accessToken:n})=>{const[r,u]=P.useState(!1),{setIsOpen:a}=b.useModalStore();return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:jr.subscriptionProductContainer,onClick:i=>i.stopPropagation(),children:[s.jsx("div",{className:jr.subscriptionProductImage,children:e!=null&&e.image?s.jsx("img",{src:b.convertCfImageIdToUrl(e.image.cfId)}):s.jsx(w.Icon,{name:"Image"})}),s.jsxs("div",{className:jr.subscriptionProductInfo,children:[s.jsx("div",{className:"flex items-center gap-2",children:s.jsx("h2",{className:jr.name,children:e.name})}),s.jsxs("p",{className:jr.price,children:[b.formatPrice(e.price)," / ",e.recurringInterval]})]}),s.jsx(w.Button,{type:"Special",onClick:i=>{i.preventDefault(),u(!0),a(!0)},children:"Cancel"})]}),r&&s.jsx(w.Modal,{close:()=>u(!1),children:s.jsx(Ud,{accessToken:n,id:t,isOpen:r,setIsOpen:u})})]})},Dw="_content_5ctxw_1",Lw="_selectedPlan_5ctxw_37",Pw="_planName_5ctxw_44",Rw="_description_5ctxw_48",Ow="_price_5ctxw_51",Mw="_buttonGroup_5ctxw_79",Fw="_buttonWrapper_5ctxw_84",Bw="_modal_5ctxw_88",jw="_header_5ctxw_95",Xt={content:Dw,selectedPlan:Lw,planName:Pw,description:Rw,price:Ow,buttonGroup:Mw,buttonWrapper:Fw,modal:Bw,header:jw},Od=({setIsOpen:e,selectedVariant:t,subscription:n})=>{if(!t)return null;const{setIsOpen:r}=b.useModalStore(),u=()=>{a()},a=()=>{r(!1),setTimeout(()=>{e(!1)},300)},i=(t.subscriptionSettings.compareAtPrice||t.subscriptionSettings.price).amount,o=t.subscriptionSettings.compareAtPrice?t.subscriptionSettings.compareAtPrice.amount-t.subscriptionSettings.price.amount:t.subscriptionSettings.price.amount,c=i-o,l=new Intl.NumberFormat("en-US",{style:"currency",currency:n.price.currency});return s.jsxs("div",{className:Xt.modal,children:[s.jsxs("div",{className:Xt.header,children:[s.jsx("h3",{id:"h3",children:"Choose upgrade method"}),s.jsx(w.Icon,{name:"X",hoverable:!0,onClick:()=>a(),fill:"var(--text-primary)"})]}),s.jsxs("div",{className:Xt.bottomSheet,children:[s.jsxs("div",{className:Xt.content,children:[s.jsxs("div",{className:Xt.selectedPlan,children:[s.jsx("h2",{className:Xt.planName,children:t.name}),s.jsx("p",{className:Xt.description,children:t.description}),s.jsxs("p",{className:Xt.price,children:["$",t.subscriptionSettings.price.amount.toFixed(2)," /"," ",t.subscriptionSettings.recurringIntervalDays===30?"month":"year"]})]}),s.jsx(kr,{formatter:l,coupon:null,total:c,discount:o})]}),s.jsxs("div",{className:Xt.buttonGroup,children:[s.jsx("div",{className:Xt.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:()=>a(),children:"Stay with us"})}),s.jsx("div",{className:Xt.buttonWrapper,children:s.jsxs(w.Button,{type:"Primary",onClick:u,children:["Upgrade for $",c.toFixed(2)]})})]})]})]})},Hw="_orderStatusBlock_2wo4y_2",Uw="_orderStatusBlockAntistock_2wo4y_11",Vw="_iconWrapper_2wo4y_16",$w="_orderStatusTitle_2wo4y_26",zw="_orderStatusDescription_2wo4y_31",qw="_actionButtons_2wo4y_36",Zw="_actionButton_2wo4y_36",Ww="_button_2wo4y_47",rn={orderStatusBlock:Hw,orderStatusBlockAntistock:Uw,iconWrapper:Vw,orderStatusTitle:$w,orderStatusDescription:zw,actionButtons:qw,actionButton:Zw,button:Ww},Yw={[Ce.New]:"New",[Ce.Pending]:"Order Pending",[Ce.Expired]:"Order Expired",[Ce.Cancelled]:"Order Canceled",[Ce.Failed]:"Order Failed",[Ce.FullDeliveryFailure]:"Delivery Failure",[Ce.PartiallyDelivered]:"Partial Delivery Failure",[Ce.Refunded]:"Order Refunded",[Ce.Completed]:"Order Completed"},Gw={[Ce.New]:"Your order has been created and is awaiting payment.",[Ce.Pending]:"Your order is currently pending. We recommend checking back shortly for confirmation.",[Ce.Expired]:"Your order has expired due to the payment not being sent in time. If you already sent the payment, please contact us below.",[Ce.Cancelled]:"You canceled the warrant. If there are any problems, please contact support.",[Ce.Failed]:"Your order could not be processed due to a payment or system error. Please try again or contact support.",[Ce.FullDeliveryFailure]:"Your payment was successful but the product is currently out of stock. Please contact us below to get this sorted.",[Ce.PartiallyDelivered]:"Your payment was successful but some products were out of stock. Please contact us below to get this sorted.",[Ce.Refunded]:"Your order was refunded. Please check your payment method for confirmation.",[Ce.Completed]:"Your order has successfully been processed. View your products below or check your email for additional information."},Md=()=>({[Ce.Completed]:s.jsx(w.Icon,{name:"Check",fill:"var(--text-success)"}),[Ce.Pending]:s.jsx(w.Icon,{name:"Clock",fill:"var(--text-warning)"}),[Ce.New]:s.jsx(w.Icon,{name:"Clock",fill:"var(--text-warning)"}),[Ce.Expired]:s.jsx(w.Icon,{name:"XCircle",fill:"var(--text-action)"}),[Ce.Cancelled]:s.jsx(w.Icon,{name:"XCircle",fill:"var(--text-action)"}),[Ce.Failed]:s.jsx(w.Icon,{name:"XCircle",fill:"var(--text-action)"}),[Ce.FullDeliveryFailure]:s.jsx(w.Icon,{name:"Warning",fill:"var(--text-warning)"}),[Ce.PartiallyDelivered]:s.jsx(w.Icon,{name:"WarningDiamond",fill:"var(--text-warning)"}),[Ce.Refunded]:s.jsx(w.Icon,{name:"WarningDiamond",fill:"var(--text-warning)"})}),Fd=({orderStatus:e,className:t})=>{const{shopDomain:n}=b.useStorefrontStore(),{isAntistock:r}=b.useGeneralStore(),u=b.useNavigate();return s.jsxs("div",{className:b.clx(rn.orderStatusBlock,t,{[rn.orderStatusBlockAntistock]:r}),children:[s.jsx("div",{className:rn.iconWrapper,style:r?{background:"none"}:void 0,children:Md()[e]}),s.jsx("h2",{className:rn.orderStatusTitle,children:Yw[e]}),s.jsx("p",{className:rn.orderStatusDescription,children:Gw[e]}),s.jsxs("div",{className:rn.actionButtons,children:[s.jsx("div",{className:rn.actionButton,children:s.jsxs(w.Button,{type:"Secondary",className:rn.button,onClick:()=>window.open(`https://${n}`),style:{width:"100%",display:"flex",alignItems:"center",gap:"5px"},children:[s.jsx(w.Icon,{name:"ArrowLineUpRight"}),"Visit Website"]})}),s.jsx("div",{className:rn.actionButton,children:s.jsxs(w.Button,{type:"Secondary",className:rn.button,onClick:()=>{r?window.open(`https://${n}/support`):u("/contact")},style:{width:"100%",display:"flex",alignItems:"center",gap:"5px"},children:[s.jsx(w.Icon,{name:"ChatsTeardrop"}),"Contact Support"]})})]})]})},Xw="_reviewMessage_1t8u4_1",Kw="_leaveReviewContainer_1t8u4_11",Qw="_leaveReviewTitle_1t8u4_20",pi={reviewMessage:Xw,leaveReviewContainer:Kw,leaveReviewTitle:Qw},Bd=({review:e,orderId:t,className:n})=>{const[r,u]=P.useState((e==null?void 0:e.rating)||0),[a,i]=P.useState(!1),{setIsOpen:o}=b.useModalStore(),{notifications:c,setNotifications:l}=b.useNotificationStore(),h=async f=>{e&&"accessToken"in e&&(await y2({comment:f,rating:r,tsId:b.useGetTsId()},t,e.accessToken),l([...c,{status:"success",id:b.v4(),message:"Review left successfully"}]),i(!1))};return P.useEffect(()=>{e&&r&&"accessToken"in e&&!e.rating&&(o(!0),i(!0))},[r]),e?e.rating&&"accessToken"in e?s.jsxs("div",{className:pi.reviewMessage,children:["You left a ",e.rating," star rating"]}):s.jsxs("div",{className:b.clx(pi.leaveReviewContainer,n),children:[s.jsx("p",{className:pi.leaveReviewTitle,children:"Leave a review"}),s.jsx(N8,{rating:r,setRating:u,disabled:!!e.rating||!("accessToken"in e)}),a&&s.jsx(w.Modal,{close:()=>i(!1),children:s.jsx(jd,{setIsOpen:i,onSubmit:h})})]}):null},Jw="_bottomSheet_1bcyj_1",eD="_content_1bcyj_7",tD="_title_1bcyj_18",nD="_buttonGroup_1bcyj_22",rD="_buttonWrapper_1bcyj_33",uD="_modal_1bcyj_37",aD="_header_1bcyj_44",In={bottomSheet:Jw,content:eD,title:tD,buttonGroup:nD,buttonWrapper:rD,modal:uD,header:aD},jd=({setIsOpen:e,onSubmit:t})=>{const[n,r]=P.useState(""),{setIsOpen:u}=b.useModalStore(),a=()=>{u(!1),setTimeout(()=>{e(!1)},300)};return s.jsxs("div",{className:In.modal,onClick:i=>i.stopPropagation(),children:[s.jsxs("div",{className:In.header,children:[s.jsx("h3",{id:"h3",className:In.title,children:"Review Description"}),s.jsx(w.Icon,{name:"X",hoverable:!0,onClick:a,fill:"var(--text-primary)"})]}),s.jsxs("div",{className:In.bottomSheet,children:[s.jsx("div",{className:In.content,children:s.jsx(w.Textarea,{placeholder:"Great product and fast checkout...",value:n,onChange:i=>r(i),label:"Describe your review in detail below"})}),s.jsxs("div",{className:In.buttonGroup,children:[s.jsx("div",{className:In.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:a,children:"Cancel"})}),s.jsx("div",{className:In.buttonWrapper,children:s.jsx(w.Button,{type:"Primary",disabled:!n,onClick:()=>{a(),t(n)},children:"Submit"})})]})]})]})},iD="_container_1idhv_1",sD="_buttonGroup_1idhv_8",oD="_buttonWrapper_1idhv_15",cD="_header_1idhv_19",lD="_content_1idhv_28",Wn={container:iD,buttonGroup:sD,buttonWrapper:oD,header:cD,content:lD},dD="_modal_1rkmj_1",fD="_modalPayment_1rkmj_7",hD="_title_1rkmj_15",pD="_description_1rkmj_20",ju={modal:dD,modalPayment:fD,title:hD,description:pD},Fs=()=>s.jsxs("div",{className:b.clx(ju.modal,ju.modalPayment),onClick:e=>e.stopPropagation(),children:[s.jsx(w.Loader,{style:{border:"4px solid var(--surface-action1)",borderLeftColor:"var(--surface-secondary)",width:"40px",height:"40px"}}),s.jsx("h2",{id:"h3",className:ju.title,children:"Processing Payment"}),s.jsx("p",{className:ju.description,children:"This payment is currently being processed. If you're here, it simply means that the payment was created but not complete."})]}),Hd=({setIsOpen:e})=>{const{subscription:t}=b.useSubscriptionStore(),{getTotalAndDiscount:n,cart:r,coupon:u}=su(),[a,i]=P.useState(1),o=b.useNavigate(),{setIsOpen:c}=b.useModalStore(),{setNotifications:l,notifications:h}=b.useNotificationStore(),[f,m]=P.useState(!1),p=P.useMemo(()=>n(),[u,r]),g=P.useMemo(()=>p.totalWithDiscount?p.total-p.totalWithDiscount:0,[p]);if(f)return s.jsx(Fs,{});const x=(t==null?void 0:t.price.currency)||"USD",C=new Intl.NumberFormat("en-US",{style:"currency",currency:x});async function _(){var k;m(!0);try{const{data:D}=await _2((t==null?void 0:t.id)||"",{});l([{id:b.v4(),message:"Order created successfully",status:"success"}]),o(`/orders/${(k=D.data)==null?void 0:k.id}/${D.data.fullAccessToken}`)}catch(D){const S=D;l([...h,{id:b.v4(),message:`Order creation failed: ${S.message}`,status:"error"}]),v()}finally{m(!1)}}function v(){c(!1),setTimeout(()=>{e(!1)},300)}return s.jsxs("div",{className:Wn.container,onClick:k=>k.stopPropagation(),children:[s.jsxs("div",{className:Wn.header,children:[s.jsx("h3",{id:"h3",className:Wn.title,children:"Extend Subscription"}),s.jsx(w.Icon,{name:"X",onClick:v,hoverable:!0,fill:"var(--text-primary)"})]}),s.jsxs("div",{className:Wn.content,children:[s.jsx(H8,{step:a,totalSteps:12,onStepChange:i,label:"How long would you like to extend your subscription for?"}),s.jsx(kr,{formatter:C,coupon:u,total:p.total,discount:g,totalWithDiscount:p.totalWithDiscount}),s.jsxs("div",{className:Wn.buttonGroup,children:[s.jsx("div",{className:Wn.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:v,children:"Cancel"})}),s.jsx("div",{className:Wn.buttonWrapper,children:s.jsx(w.Button,{type:"Primary",onClick:_,children:"Extend"})})]})]})]})},mD="_bottomSheet_uw5jb_1",gD="_content_uw5jb_7",bD="_radioGroup_uw5jb_11",_D="_confirmation_uw5jb_26",xD="_iconWrapper_uw5jb_33",CD="_title_uw5jb_42",ED="_message_uw5jb_48",TD="_buttonGroup_uw5jb_54",yD="_buttonWrapper_uw5jb_64",kD="_modal_uw5jb_68",AD="_header_uw5jb_77",et={bottomSheet:mD,content:gD,radioGroup:bD,confirmation:_D,iconWrapper:xD,title:CD,message:ED,buttonGroup:TD,buttonWrapper:yD,modal:kD,header:AD},SD={0:"Are you sure?",1:"Just making sure",2:"We're sorry to see you go"},Ud=({isOpen:e,setIsOpen:t,id:n,accessToken:r})=>{const[u,a]=P.useState(0),[i,o]=P.useState(!1),[c,l]=P.useState(""),[h,f]=P.useState(""),{setIsOpen:m}=b.useModalStore(),p=async()=>{if(!c)return;o(!0);const x=await p2(n,r,{reason:c==="Other reason"?h:c});o(!1),x&&a(2)};P.useEffect(()=>{e||(a(0),l(""),f(""))},[e]);const g=()=>{m(!1),setTimeout(()=>{t(!1)},300)};return s.jsxs("div",{className:et.modal,onClick:x=>x.stopPropagation(),children:[s.jsxs("div",{className:et.header,children:[s.jsx("h3",{id:"h3",children:SD[u]||""}),s.jsx(w.Icon,{name:"X",onClick:g,hoverable:!0,fill:"var(--text-primary)"})]}),s.jsxs("div",{className:et.content,children:[u===0&&s.jsxs("div",{className:et.bottomSheet,children:[s.jsx("p",{children:"Before you cancel your subscription can you tell us why?"}),s.jsxs("div",{className:et.radioGroup,children:[s.jsx(w.Radio,{defaultValue:c,onChange:x=>l(x),options:[{value:"Found another company",label:"Found another company"},{value:"Expensive",label:"Expensive"},{value:"Technical problems",label:"Technical problems"},{value:"Support problems",label:"Support problems"},{value:"Other reason",label:"Other reason"}],flexDirection:"column"}),c==="Other reason"&&s.jsx(w.Textarea,{value:h,onChange:x=>f(x),placeholder:"Describe the reason..."})]}),s.jsxs("div",{className:et.buttonGroup,children:[s.jsx("div",{className:et.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:g,children:"Stay with us"})}),s.jsx("div",{className:et.buttonWrapper,children:s.jsx(w.Button,{type:"Primary",onClick:()=>c&&a(1),disabled:!c,children:"Continue"})})]})]}),u===1&&s.jsxs("div",{className:et.bottomSheet,children:[s.jsx("p",{children:"You'll lose access to all of the features and content available within this subscription."}),s.jsxs("div",{className:et.buttonGroup,children:[s.jsx("div",{className:et.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:g,children:"Stay with us"})}),s.jsx("div",{className:et.buttonWrapper,children:s.jsx(w.Button,{type:"Primary",onClick:p,disabled:i,children:"Cancel it anyway"})})]})]}),u===2&&s.jsxs("div",{className:et.bottomSheet,children:[s.jsxs("div",{className:`${et.confirmation}`,children:[s.jsx("div",{className:et.iconWrapper,children:s.jsx(w.Icon,{name:"Check",fill:"var(--text-success)"})}),s.jsx("p",{className:et.title,children:"Subscription Cancelled"}),s.jsx("p",{className:et.message,children:"You'll lose access to all of the features and content available within this subscription."})]}),s.jsx("div",{className:et.buttonGroup,children:s.jsx("div",{className:et.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:g,children:"Close"})})})]})]})]})},ID=Object.freeze(Object.defineProperty({__proto__:null,ActivePaymentMethod:Pd,ActiveSubscriptionProduct:Rd,Auth:us,AuthLogin:t0,AuthModal:g0,AuthRequestOtp:e0,CHARGE_STATUS_DESCRIPTION:Ed,CHARGE_STATUS_DISPLAY_NAME:Gn,CancelSubscription:Ud,CashAppVerify:Sd,ChangeSubscriptionPlan:wd,ChargeBlocksRenderer:ta,ChargeItems:Ad,ChargeStatusBlock:yd,CheckoutBalancePaymentMethod:is,CheckoutFooter:Hn,CheckoutHeader:ma,CheckoutItems:f0,CheckoutOperational:xd,CheckoutOrderMainData:Os,CheckoutPaymentMethod:ss,CheckoutPrices:kr,CheckoutProduct:ga,ChoosePlanUpgradeMethod:Od,ConnectDiscord:m0,CustomField:p0,CustomFields:h0,CustomerDashboard:S5,LeaveAReview:Bd,NoItemsBlock:ha,OpenDelivery:Cd,OrderStatusBlock:Fd,OrdersTable:i0,PageLoading:yv,PageTitle:fa,Pagination:s0,PaginationWithRange:hu,PayPalFFNote:kd,PaymentMethods:os,ProcessingPaymentModal:Fs,ProtectYourCheckout:_d,ReferralBlock:n0,ReferralBlockInfo:u0,ReferralBlockSteps:r0,SecuredBySsl:Rs,Sidebar:Ol,SkeletonReferralBlock:a0,StatItem:kt,StatusIndicator:c0,StatusVariant:Bn,SubmitReview:jd,SubscriptionCoupon:Ld,SubscriptionExpiration:Hd,SubscriptionExpirationDate:Dd,SubscriptionProduct:vd,SubscriptionStatusBadge:Ms,SubscriptionsTable:Nd,Table:pa,TableItem:at,TableItemTitle:It,TermsOfService:Ps,TicketRow:Id,TrackPayment:va,getChargeStatusIcon:Td,getOrderStatusIcon:Md,getPaginationText:o0},Symbol.toStringTag,{value:"Module"})),ND="_chargePageContainer_1azbl_1",vD="_chargeItems_1azbl_14",wD="_mainContent_1azbl_25",DD="_contentWrapper_1azbl_44",LD="_antistockContent_1azbl_53",PD="_statusBlock_1azbl_58",RD="_statusBlockAntistock_1azbl_63",OD="_notPaidSection_1azbl_68",MD="_antistockPayNow_1azbl_82",FD="_antistockFooter_1azbl_86",BD="_antistockTrackPayment_1azbl_96",jD="_footer_1azbl_106",HD="_loaderContainer_1azbl_128",Lt={chargePageContainer:ND,chargeItems:vD,mainContent:wD,contentWrapper:DD,antistockContent:LD,statusBlock:PD,statusBlockAntistock:RD,notPaidSection:OD,antistockPayNow:MD,antistockFooter:FD,antistockTrackPayment:BD,footer:jD,loaderContainer:HD},UD=()=>{const{id:e}=b.useParams(),[t,n]=b.useSearchParams(),[r,u]=P.useState(!1),[a,i]=P.useState(),[o,c]=P.useState(!0),l=b.useNavigate(),h=P.useRef(),f=P.useRef(!1),{setIsOpen:m}=b.useModalStore(),{isAntistock:p}=b.useGeneralStore();return P.useEffect(()=>{const g=async(C,_=!1)=>{_||u(!0);const{data:v}=await k2(C);u(!1),i(v)},x=setInterval(()=>{e&&g(e,!0)},5e3);return e&&g(e),()=>{clearInterval(x)}},[]),P.useEffect(()=>{const g=setTimeout(()=>{var C;console.log("charge timeout",a);const x=t.get("redirectRoute");if((a==null?void 0:a.status)===ge.Paid&&a.redirectUrl&&!h.current){const v=JSON.parse(localStorage.getItem("orders")||"{}")[((C=a==null?void 0:a.order)==null?void 0:C.id)||""];v?window.open(v.fullAccessToken?`${a.redirectUrl}/${v.fullAccessToken}`:`${a.redirectUrl}`,"_self"):window.open(a.redirectUrl,"_self")}(a==null?void 0:a.status)===ge.Paid&&h.current&&(console.log("redirectRouteRef.current",h.current),l(h.current,{replace:!0})),x&&h&&(h.current=x,t.delete("redirectRoute"),n(t))},1e3);return()=>clearTimeout(g)},[a]),P.useEffect(()=>{((a==null?void 0:a.gateway)==="PayPalFF"||(a==null?void 0:a.gateway)==="Сashapp")&&m(!0)},[a]),P.useEffect(()=>{var g;if(a!=null&&a.displayPaymentInfo&&a.displayPaymentInfo.length===1&&a.status===ge.NotPaid&&!f.current){const x=a.displayPaymentInfo[0];x.type==="Button"&&((g=x.props)!=null&&g.url)&&(window.open(x.props.url,"_blank"),f.current=!0)}},[a==null?void 0:a.displayPaymentInfo,a==null?void 0:a.status]),r?s.jsx("div",{className:Lt.loaderContainer,children:s.jsx(w.Loader,{})}):s.jsxs("div",{className:Lt.chargePageContainer,children:[s.jsx("div",{className:Lt.chargeItems,children:s.jsx(Ad,{charge:a})}),s.jsx("div",{className:Lt.mainContent,style:p?{borderLeft:"1px solid var(--border-secondary)"}:void 0,children:s.jsxs("div",{className:b.clx(Lt.contentWrapper,{[Lt.antistockContent]:p}),children:[a&&(a==null?void 0:a.status)!==ge.NotPaid&&s.jsx(yd,{charge:a}),a&&s.jsxs("div",{className:b.clx(Lt.statusBlock,{[Lt.statusBlockAntistock]:p}),children:[s.jsx(Os,{lastUpdate:a.expiresAt,email:a.customerForCharge.email,invoiceId:a.id,paymentType:a.gateway}),p&&(a==null?void 0:a.status)===ge.NotPaid&&s.jsx("div",{className:Lt.antistockPayNow,children:a==null?void 0:a.displayPaymentInfo.map((g,x)=>s.jsx(ta,{block:g},x))}),p&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:Lt.antistockTrackPayment,children:s.jsx(va,{timeline:a.timeline})}),s.jsx(Hn,{className:Lt.antistockFooter})]})]}),!p&&(a==null?void 0:a.status)===ge.NotPaid&&s.jsx("div",{className:Lt.notPaidSection,children:a==null?void 0:a.displayPaymentInfo.map((g,x)=>s.jsx(ta,{block:g},x))}),!p&&s.jsx(Hn,{className:Lt.footer})]})}),(a==null?void 0:a.gateway)==="PayPalFF"&&o&&s.jsx(w.Modal,{close:()=>c(!1),children:s.jsx(kd,{price:a.price,setIsOpen:c})}),(a==null?void 0:a.gateway)==="Сashapp"&&o&&s.jsx(w.Modal,{close:()=>u(!1),children:s.jsx(Sd,{setIsOpen:c,chargeId:a.id})})]})},VD=Object.freeze(Object.defineProperty({__proto__:null,ChargePage:UD},Symbol.toStringTag,{value:"Module"}));exports.ActivePaymentMethod=Pd;exports.ActiveSubscriptionProduct=Rd;exports.BalanceModal=$l;exports.ChangeSubscriptionPlan=wd;exports.ChargeStatus=ge;exports.CheckoutFooter=Hn;exports.CheckoutHeader=ma;exports.CheckoutItems=f0;exports.CheckoutOperational=xd;exports.CheckoutOrderMainData=Os;exports.CheckoutPrices=kr;exports.CheckoutProduct=ga;exports.LeaveAReview=Bd;exports.MarkdownText=la;exports.NoItemsBlock=ha;exports.OrderStatus=Ce;exports.OrderStatusBlock=Fd;exports.OrdersTable=i0;exports.PageTitle=fa;exports.PaginationWithRange=hu;exports.ReCaptchaProvider=Gi;exports.StableText=Gc;exports.SubscriptionCoupon=Ld;exports.SubscriptionExpirationDate=Dd;exports.SubscriptionProduct=vd;exports.SubscriptionsTable=Nd;exports.Table=pa;exports.TableItemTitle=It;exports.TicketRow=Id;exports.TrackPayment=va;exports.auth=S2;exports.fetchAuthorizedOrder=o2;exports.fetchGeneral=Zd;exports.fetchOrder=s2;exports.fetchOrders=i2;exports.fetchPrivacyPolicy=u2;exports.fetchRefundPolicy=r2;exports.fetchSubscription=f2;exports.fetchSubscriptions=g2;exports.fetchTerms=n2;exports.fetchThemeAndSettings=Wd;exports.fetchTicket=x2;exports.fetchTickets=E2;exports.getBalance=aa;exports.getBalanceSettings=ol;exports.getGatewaysDetail=cu;exports.index=ID;exports.index$1=VD;exports.parseDraftJsText=sl;exports.recapcha=mf;exports.sendTicketMessage=C2;exports.useCart=su;exports.useCopy=Jn;exports.useGeneralInfo=nl;exports.useMarkdownIt=Rl;exports.useReCaptcha=ou;
107
+ `))}function c(p,g,x,C){const _=x.enter("tableCell"),v=x.enter("phrasing"),k=x.containerPhrasing(p,{...C,before:a,after:a});return v(),_(),k}function l(p,g){return qE(p,{align:g,alignDelimiters:r,padding:n,stringLength:u})}function h(p,g,x){const C=p.children;let _=-1;const v=[],k=g.enter("table");for(;++_<C.length;)v[_]=f(C[_],g,x);return k(),v}function f(p,g,x){const C=p.children;let _=-1;const v=[],k=g.enter("tableRow");for(;++_<C.length;)v[_]=c(C[_],p,g,x);return k(),v}function m(p,g,x){let C=b1.inlineCode(p,g,x);return x.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function LT(){return{exit:{taskListCheckValueChecked:kc,taskListCheckValueUnchecked:kc,paragraph:RT}}}function PT(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:OT}}}function kc(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function RT(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const u=t.children;let a=-1,i;for(;++a<u.length;){const o=u[a];if(o.type==="paragraph"){i=o;break}}i===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function OT(e,t,n,r){const u=e.children[0],a=typeof e.checked=="boolean"&&u&&u.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(i);let c=b1.listItem(e,t,n,{...r,...o.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(h){return h+i}}function MT(){return[pE(),OE(),jE(),AT(),LT()]}function FT(e){return{extensions:[mE(),ME(e),HE(),DT(e),PT()]}}const BT={tokenize:zT,partial:!0},_1={tokenize:qT,partial:!0},x1={tokenize:ZT,partial:!0},C1={tokenize:WT,partial:!0},jT={tokenize:YT,partial:!0},E1={name:"wwwAutolink",tokenize:VT,previous:y1},T1={name:"protocolAutolink",tokenize:$T,previous:k1},Tn={name:"emailAutolink",tokenize:UT,previous:A1},hn={};function HT(){return{text:hn}}let qn=48;for(;qn<123;)hn[qn]=Tn,qn++,qn===58?qn=65:qn===91&&(qn=97);hn[43]=Tn;hn[45]=Tn;hn[46]=Tn;hn[95]=Tn;hn[72]=[Tn,T1];hn[104]=[Tn,T1];hn[87]=[Tn,E1];hn[119]=[Tn,E1];function UT(e,t,n){const r=this;let u,a;return i;function i(f){return!Mi(f)||!A1.call(r,r.previous)||As(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(f))}function o(f){return Mi(f)?(e.consume(f),o):f===64?(e.consume(f),c):n(f)}function c(f){return f===46?e.check(jT,h,l)(f):f===45||f===95||ft(f)?(a=!0,e.consume(f),c):h(f)}function l(f){return e.consume(f),u=!0,c}function h(f){return a&&u&&xt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function VT(e,t,n){const r=this;return u;function u(i){return i!==87&&i!==119||!y1.call(r,r.previous)||As(r.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(BT,e.attempt(_1,e.attempt(x1,a),n),n)(i))}function a(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function $T(e,t,n){const r=this;let u="",a=!1;return i;function i(f){return(f===72||f===104)&&k1.call(r,r.previous)&&!As(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),u+=String.fromCodePoint(f),e.consume(f),o):n(f)}function o(f){if(xt(f)&&u.length<5)return u+=String.fromCodePoint(f),e.consume(f),o;if(f===58){const m=u.toLowerCase();if(m==="http"||m==="https")return e.consume(f),c}return n(f)}function c(f){return f===47?(e.consume(f),a?l:(a=!0,c)):n(f)}function l(f){return f===null||Gu(f)||Be(f)||Qn(f)||xa(f)?n(f):e.attempt(_1,e.attempt(x1,h),n)(f)}function h(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function zT(e,t,n){let r=0;return u;function u(i){return(i===87||i===119)&&r<3?(r++,e.consume(i),u):i===46&&r===3?(e.consume(i),a):n(i)}function a(i){return i===null?n(i):t(i)}}function qT(e,t,n){let r,u,a;return i;function i(l){return l===46||l===95?e.check(C1,c,o)(l):l===null||Be(l)||Qn(l)||l!==45&&xa(l)?c(l):(a=!0,e.consume(l),i)}function o(l){return l===95?r=!0:(u=r,r=void 0),e.consume(l),i}function c(l){return u||r||!a?n(l):t(l)}}function ZT(e,t){let n=0,r=0;return u;function u(i){return i===40?(n++,e.consume(i),u):i===41&&r<n?a(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(C1,t,a)(i):i===null||Be(i)||Qn(i)?t(i):(e.consume(i),u)}function a(i){return i===41&&r++,e.consume(i),u}}function WT(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),u):o===60||o===null||Be(o)||Qn(o)?t(o):n(o)}function u(o){return o===null||o===40||o===91||Be(o)||Qn(o)?t(o):r(o)}function a(o){return xt(o)?i(o):n(o)}function i(o){return o===59?(e.consume(o),r):xt(o)?(e.consume(o),i):n(o)}}function YT(e,t,n){return r;function r(a){return e.consume(a),u}function u(a){return ft(a)?n(a):t(a)}}function y1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Be(e)}function k1(e){return!xt(e)}function A1(e){return!(e===47||Mi(e))}function Mi(e){return e===43||e===45||e===46||e===95||ft(e)}function As(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const GT={tokenize:ry,partial:!0};function XT(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:ey,continuation:{tokenize:ty},exit:ny}},text:{91:{name:"gfmFootnoteCall",tokenize:JT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:KT,resolveTo:QT}}}}function KT(e,t,n){const r=this;let u=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;u--;){const c=r.events[u][1];if(c.type==="labelImage"){i=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return o;function o(c){if(!i||!i._balanced)return n(c);const l=Kt(r.sliceSerialize({start:i.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function QT(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};u.end.column++,u.end.offset++,u.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},u.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",u,t],["exit",u,t],["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function JT(e,t,n){const r=this,u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,i;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),c}function c(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(a>999||f===93&&!i||f===null||f===91||Be(f))return n(f);if(f===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return u.includes(Kt(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Be(f)||(i=!0),a++,e.consume(f),f===92?h:l}function h(f){return f===91||f===92||f===93?(e.consume(f),a++,l):l(f)}}function ey(e,t,n){const r=this,u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,i=0,o;return c;function c(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(g)}function h(g){if(i>999||g===93&&!o||g===null||g===91||Be(g))return n(g);if(g===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return a=Kt(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Be(g)||(o=!0),i++,e.consume(g),g===92?f:h}function f(g){return g===91||g===92||g===93?(e.consume(g),i++,h):h(g)}function m(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),u.includes(a)||u.push(a),Ae(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function ty(e,t,n){return e.check(mu,t,e.attempt(GT,t,n))}function ny(e){e.exit("gfmFootnoteDefinition")}function ry(e,t,n){const r=this;return Ae(e,u,"gfmFootnoteDefinitionIndent",5);function u(a){const i=r.events[r.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(a):n(a)}}function uy(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:u};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function u(i,o){let c=-1;for(;++c<i.length;)if(i[c][0]==="enter"&&i[c][1].type==="strikethroughSequenceTemporary"&&i[c][1]._close){let l=c;for(;l--;)if(i[l][0]==="exit"&&i[l][1].type==="strikethroughSequenceTemporary"&&i[l][1]._open&&i[c][1].end.offset-i[c][1].start.offset===i[l][1].end.offset-i[l][1].start.offset){i[c][1].type="strikethroughSequence",i[l][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},i[l][1].start),end:Object.assign({},i[c][1].end)},f={type:"strikethroughText",start:Object.assign({},i[l][1].end),end:Object.assign({},i[c][1].start)},m=[["enter",h,o],["enter",i[l][1],o],["exit",i[l][1],o],["enter",f,o]],p=o.parser.constructs.insideSpan.null;p&&Ft(m,m.length,0,Ca(p,i.slice(l+1,c),o)),Ft(m,m.length,0,[["exit",f,o],["enter",i[c][1],o],["exit",i[c][1],o],["exit",h,o]]),Ft(i,l-1,c-l+3,m),c=l+m.length-2;break}}for(c=-1;++c<i.length;)i[c][1].type==="strikethroughSequenceTemporary"&&(i[c][1].type="data");return i}function a(i,o,c){const l=this.previous,h=this.events;let f=0;return m;function m(g){return l===126&&h[h.length-1][1].type!=="characterEscape"?c(g):(i.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const x=xr(l);if(g===126)return f>1?c(g):(i.consume(g),f++,p);if(f<2&&!n)return c(g);const C=i.exit("strikethroughSequenceTemporary"),_=xr(g);return C._open=!_||_===2&&!!x,C._close=!x||x===2&&!!_,o(g)}}}class ay{constructor(){this.map=[]}add(t,n,r){iy(this,t,n,r)}consume(t){if(this.map.sort(function(a,i){return a[0]-i[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let u=r.pop();for(;u;){for(const a of u)t.push(a);u=r.pop()}this.map.length=0}}function iy(e,t,n,r){let u=0;if(!(n===0&&r.length===0)){for(;u<e.map.length;){if(e.map[u][0]===t){e.map[u][1]+=n,e.map[u][2].push(...r);return}u+=1}e.map.push([t,n,r])}}function sy(e,t){let n=!1;const r=[];for(;t<e.length;){const u=e[t];if(n){if(u[0]==="enter")u[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(u[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(u[1].type==="tableDelimiterRow")break}else u[0]==="enter"&&u[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function oy(){return{flow:{null:{name:"table",tokenize:cy,resolveAll:ly}}}}function cy(e,t,n){const r=this;let u=0,a=0,i;return o;function o(L){let j=r.events.length-1;for(;j>-1;){const ae=r.events[j][1].type;if(ae==="lineEnding"||ae==="linePrefix")j--;else break}const F=j>-1?r.events[j][1].type:null,Q=F==="tableHead"||F==="tableRow"?I:c;return Q===I&&r.parser.lazy[r.now().line]?n(L):Q(L)}function c(L){return e.enter("tableHead"),e.enter("tableRow"),l(L)}function l(L){return L===124||(i=!0,a+=1),h(L)}function h(L){return L===null?n(L):ue(L)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),p):n(L):ye(L)?Ae(e,h,"whitespace")(L):(a+=1,i&&(i=!1,u+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),i=!0,h):(e.enter("data"),f(L)))}function f(L){return L===null||L===124||Be(L)?(e.exit("data"),h(L)):(e.consume(L),L===92?m:f)}function m(L){return L===92||L===124?(e.consume(L),f):f(L)}function p(L){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(L):(e.enter("tableDelimiterRow"),i=!1,ye(L)?Ae(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):g(L))}function g(L){return L===45||L===58?C(L):L===124?(i=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),x):S(L)}function x(L){return ye(L)?Ae(e,C,"whitespace")(L):C(L)}function C(L){return L===58?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),_):L===45?(a+=1,_(L)):L===null||ue(L)?D(L):S(L)}function _(L){return L===45?(e.enter("tableDelimiterFiller"),v(L)):S(L)}function v(L){return L===45?(e.consume(L),v):L===58?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(L))}function k(L){return ye(L)?Ae(e,D,"whitespace")(L):D(L)}function D(L){return L===124?g(L):L===null||ue(L)?!i||u!==a?S(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):S(L)}function S(L){return n(L)}function I(L){return e.enter("tableRow"),M(L)}function M(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),M):L===null||ue(L)?(e.exit("tableRow"),t(L)):ye(L)?Ae(e,M,"whitespace")(L):(e.enter("data"),q(L))}function q(L){return L===null||L===124||Be(L)?(e.exit("data"),M(L)):(e.consume(L),L===92?U:q)}function U(L){return L===92||L===124?(e.consume(L),q):q(L)}}function ly(e,t){let n=-1,r=!0,u=0,a=[0,0,0,0],i=[0,0,0,0],o=!1,c=0,l,h,f;const m=new ay;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(o=!1,c!==0&&(Ac(m,t,c,l,h),h=void 0,c=0),l={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",l,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],i=[0,n+1,0,0],o&&(o=!1,h={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",h,t]])),u=g.type==="tableDelimiterRow"?2:h?3:1):u&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,i[2]===0&&(a[1]!==0&&(i[0]=i[1],f=Mu(m,t,a,u,void 0,f),a=[0,0,0,0]),i[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(i[0]=i[1],f=Mu(m,t,a,u,void 0,f)),a=i,i=[a[1],n,0,0])):g.type==="tableHead"?(o=!0,c=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(c=n,a[1]!==0?(i[0]=i[1],f=Mu(m,t,a,u,n,f)):i[1]!==0&&(f=Mu(m,t,i,u,n,f)),u=0):u&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(i[3]=n)}for(c!==0&&Ac(m,t,c,l,h),m.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=sy(t.events,n))}return e}function Mu(e,t,n,r,u,a){const i=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(a.end=Object.assign({},lr(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=lr(t.events,n[1]);if(a={type:i,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=lr(t.events,n[2]),h=lr(t.events,n[3]),f={type:o,start:Object.assign({},l),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const m=t.events[n[2]],p=t.events[n[3]];if(m[1].end=Object.assign({},p[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,x=n[3]-n[2]-1;e.add(g,x,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return u!==void 0&&(a.end=Object.assign({},lr(t.events,u)),e.add(u,0,[["exit",a,t]]),a=void 0),a}function Ac(e,t,n,r,u){const a=[],i=lr(t.events,n);u&&(u.end=Object.assign({},i),a.push(["exit",u,t])),r.end=Object.assign({},i),a.push(["exit",r,t]),e.add(n+1,0,a)}function lr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const dy={name:"tasklistCheck",tokenize:hy};function fy(){return{text:{91:dy}}}function hy(e,t,n){const r=this;return u;function u(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return Be(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),i):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),i):n(c)}function i(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(c)}function o(c){return ue(c)?t(c):ye(c)?e.check({tokenize:py},t,n)(c):n(c)}}function py(e,t,n){return Ae(e,r,"whitespace");function r(u){return u===null?n(u):t(u)}}function my(e){return R0([HT(),XT(),uy(e),oy(),fy()])}const gy={};function S1(e){const t=this,n=e||gy,r=t.data(),u=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),i=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);u.push(my(n)),a.push(MT()),i.push(FT(n))}const Sc=/[#.]/g;function by(e,t){const n=e||"",r={};let u=0,a,i;for(;u<n.length;){Sc.lastIndex=u;const o=Sc.exec(n),c=n.slice(u,o?o.index:n.length);c&&(a?a==="#"?r.id=c:Array.isArray(r.className)?r.className.push(c):r.className=[c]:i=c,u+=c.length),o&&(a=o[0],u++)}return{type:"element",tagName:i||t||"div",properties:r,children:[]}}function I1(e,t,n){const r=n?Ey(n):void 0;function u(a,i,...o){let c;if(a==null){c={type:"root",children:[]};const l=i;o.unshift(l)}else{c=by(a,t);const l=c.tagName.toLowerCase(),h=r?r.get(l):void 0;if(c.tagName=h||l,_y(i))o.unshift(i);else for(const[f,m]of Object.entries(i))xy(e,c.properties,f,m)}for(const l of o)Fi(c.children,l);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return u}function _y(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const u=t[r];if(u&&typeof u=="object"){if(!Array.isArray(u))return!0;const a=u;for(const i of a)if(typeof i!="number"&&typeof i!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function xy(e,t,n,r){const u=ls(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?u.spaceSeparated?a=Po(r):u.commaSeparated?a=No(r):u.commaOrSpaceSeparated?a=Po(No(r).join(" ")):a=Ic(u,u.property,r):Array.isArray(r)?a=[...r]:a=u.property==="style"?Cy(r):String(r);if(Array.isArray(a)){const i=[];for(const o of a)i.push(Ic(u,u.property,o));a=i}u.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[u.property]=a}}function Fi(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Fi(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Fi(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Ic(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||nu(n)===nu(t)))return!0}return n}function Cy(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Ey(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Ty=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],yy=I1(ba,"div"),ky=I1(Sr,"g",Ty);function Ay(e){const t=String(e),n=[];return{toOffset:u,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let i=0;for(;;){let o=n[i];if(o===void 0){const c=Nc(t,n[i-1]);o=c===-1?t.length+1:c+1,n[i]=o}if(o>a)return{line:i+1,column:a-(i>0?n[i-1]:0)+1,offset:a};i++}}}function u(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const o=n[n.length-1],c=Nc(t,o),l=c===-1?t.length+1:c+1;if(o===l)break;n.push(l)}const i=(a.line>1?n[a.line-2]:0)+a.column-1;if(i<n[a.line-1])return i}}}function Nc(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
108
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Xn={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},N1={}.hasOwnProperty,Sy=Object.prototype;function Iy(e,t){const n=t||{};return Ss({file:n.file||void 0,location:!1,schema:n.space==="svg"?Sr:ba,verbose:n.verbose||!1},e)}function Ss(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},$u(e,r,n),n}case"#document":case"#document-fragment":{const r=t,u="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:v1(e,t.childNodes),data:{quirksMode:u}},e.file&&e.location){const a=String(e.file),i=Ay(a),o=i.toPoint(0),c=i.toPoint(a.length);n.position={start:o,end:c}}return n}case"#documentType":{const r=t;return n={type:"doctype"},$u(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},$u(e,r,n),n}default:return n=Ny(e,t),n}}function v1(e,t){let n=-1;const r=[];for(;++n<t.length;){const u=Ss(e,t[n]);r.push(u)}return r}function Ny(e,t){const n=e.schema;e.schema=t.namespaceURI===Xn.svg?Sr:ba;let r=-1;const u={};for(;++r<t.attrs.length;){const o=t.attrs[r],c=(o.prefix?o.prefix+":":"")+o.name;N1.call(Sy,c)||(u[c]=o.value)}const i=(e.schema.space==="svg"?ky:yy)(t.tagName,u,v1(e,t.childNodes));if($u(e,t,i),i.tagName==="template"){const o=t,c=o.sourceCodeLocation,l=c&&c.startTag&&dr(c.startTag),h=c&&c.endTag&&dr(c.endTag),f=Ss(e,o.content);l&&h&&e.file&&(f.position={start:l.end,end:h.start}),i.content=f}return e.schema=n,i}function $u(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=vy(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function vy(e,t,n){const r=dr(n);if(t.type==="element"){const u=t.children[t.children.length-1];if(r&&!n.endTag&&u&&u.position&&u.position.end&&(r.end=Object.assign({},u.position.end)),e.verbose){const a={};let i;if(n.attrs)for(i in n.attrs)N1.call(n.attrs,i)&&(a[ls(e.schema,i).property]=dr(n.attrs[i]));n.startTag;const o=dr(n.startTag),c=n.endTag?dr(n.endTag):void 0,l={opening:o};c&&(l.closing=c),l.properties=a,t.data={position:l}}}return r}function dr(e){const t=vc({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=vc({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function vc(e){return e.line&&e.column?e:void 0}class bu{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}bu.prototype.property={};bu.prototype.normal={};bu.prototype.space=null;function w1(e,t){const n={},r={};let u=-1;for(;++u<e.length;)Object.assign(n,e[u].property),Object.assign(r,e[u].normal);return new bu(n,r,t)}function Bi(e){return e.toLowerCase()}class Wt{constructor(t,n){this.property=t,this.attribute=n}}Wt.prototype.space=null;Wt.prototype.boolean=!1;Wt.prototype.booleanish=!1;Wt.prototype.overloadedBoolean=!1;Wt.prototype.number=!1;Wt.prototype.commaSeparated=!1;Wt.prototype.spaceSeparated=!1;Wt.prototype.commaOrSpaceSeparated=!1;Wt.prototype.mustUseProperty=!1;Wt.prototype.defined=!1;let wy=0;const me=nr(),Qe=nr(),D1=nr(),Y=nr(),Ue=nr(),gr=nr(),Rt=nr();function nr(){return 2**++wy}const ji=Object.freeze(Object.defineProperty({__proto__:null,boolean:me,booleanish:Qe,commaOrSpaceSeparated:Rt,commaSeparated:gr,number:Y,overloadedBoolean:D1,spaceSeparated:Ue},Symbol.toStringTag,{value:"Module"})),ci=Object.keys(ji);class Is extends Wt{constructor(t,n,r,u){let a=-1;if(super(t,n),wc(this,"space",u),typeof r=="number")for(;++a<ci.length;){const i=ci[a];wc(this,ci[a],(r&ji[i])===ji[i])}}}Is.prototype.defined=!0;function wc(e,t,n){n&&(e[t]=n)}const Dy={}.hasOwnProperty;function Nr(e){const t={},n={};let r;for(r in e.properties)if(Dy.call(e.properties,r)){const u=e.properties[r],a=new Is(r,e.transform(e.attributes||{},r),u,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Bi(r)]=r,n[Bi(a.attribute)]=r}return new bu(t,n,e.space)}const L1=Nr({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),P1=Nr({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function R1(e,t){return t in e?e[t]:t}function O1(e,t){return R1(e,t.toLowerCase())}const M1=Nr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:O1,properties:{xmlns:null,xmlnsXLink:null}}),F1=Nr({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Qe,ariaAutoComplete:null,ariaBusy:Qe,ariaChecked:Qe,ariaColCount:Y,ariaColIndex:Y,ariaColSpan:Y,ariaControls:Ue,ariaCurrent:null,ariaDescribedBy:Ue,ariaDetails:null,ariaDisabled:Qe,ariaDropEffect:Ue,ariaErrorMessage:null,ariaExpanded:Qe,ariaFlowTo:Ue,ariaGrabbed:Qe,ariaHasPopup:null,ariaHidden:Qe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ue,ariaLevel:Y,ariaLive:null,ariaModal:Qe,ariaMultiLine:Qe,ariaMultiSelectable:Qe,ariaOrientation:null,ariaOwns:Ue,ariaPlaceholder:null,ariaPosInSet:Y,ariaPressed:Qe,ariaReadOnly:Qe,ariaRelevant:null,ariaRequired:Qe,ariaRoleDescription:Ue,ariaRowCount:Y,ariaRowIndex:Y,ariaRowSpan:Y,ariaSelected:Qe,ariaSetSize:Y,ariaSort:null,ariaValueMax:Y,ariaValueMin:Y,ariaValueNow:Y,ariaValueText:null,role:null}}),Ly=Nr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:O1,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:gr,acceptCharset:Ue,accessKey:Ue,action:null,allow:null,allowFullScreen:me,allowPaymentRequest:me,allowUserMedia:me,alt:null,as:null,async:me,autoCapitalize:null,autoComplete:Ue,autoFocus:me,autoPlay:me,blocking:Ue,capture:null,charSet:null,checked:me,cite:null,className:Ue,cols:Y,colSpan:null,content:null,contentEditable:Qe,controls:me,controlsList:Ue,coords:Y|gr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:me,defer:me,dir:null,dirName:null,disabled:me,download:D1,draggable:Qe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:me,formTarget:null,headers:Ue,height:Y,hidden:me,high:Y,href:null,hrefLang:null,htmlFor:Ue,httpEquiv:Ue,id:null,imageSizes:null,imageSrcSet:null,inert:me,inputMode:null,integrity:null,is:null,isMap:me,itemId:null,itemProp:Ue,itemRef:Ue,itemScope:me,itemType:Ue,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:me,low:Y,manifest:null,max:null,maxLength:Y,media:null,method:null,min:null,minLength:Y,multiple:me,muted:me,name:null,nonce:null,noModule:me,noValidate:me,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:me,optimum:Y,pattern:null,ping:Ue,placeholder:null,playsInline:me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:me,referrerPolicy:null,rel:Ue,required:me,reversed:me,rows:Y,rowSpan:Y,sandbox:Ue,scope:null,scoped:me,seamless:me,selected:me,shadowRootClonable:me,shadowRootDelegatesFocus:me,shadowRootMode:null,shape:null,size:Y,sizes:null,slot:null,span:Y,spellCheck:Qe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Y,step:null,style:null,tabIndex:Y,target:null,title:null,translate:null,type:null,typeMustMatch:me,useMap:null,value:Qe,width:Y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ue,axis:null,background:null,bgColor:null,border:Y,borderColor:null,bottomMargin:Y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:me,declare:me,event:null,face:null,frame:null,frameBorder:null,hSpace:Y,leftMargin:Y,link:null,longDesc:null,lowSrc:null,marginHeight:Y,marginWidth:Y,noResize:me,noHref:me,noShade:me,noWrap:me,object:null,profile:null,prompt:null,rev:null,rightMargin:Y,rules:null,scheme:null,scrolling:Qe,standby:null,summary:null,text:null,topMargin:Y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Y,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:me,disableRemotePlayback:me,prefix:null,property:null,results:Y,security:null,unselectable:null}}),Py=Nr({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:R1,properties:{about:Rt,accentHeight:Y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Y,amplitude:Y,arabicForm:null,ascent:Y,attributeName:null,attributeType:null,azimuth:Y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Y,by:null,calcMode:null,capHeight:Y,className:Ue,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Y,diffuseConstant:Y,direction:null,display:null,dur:null,divisor:Y,dominantBaseline:null,download:me,dx:null,dy:null,edgeMode:null,editable:null,elevation:Y,enableBackground:null,end:null,event:null,exponent:Y,externalResourcesRequired:null,fill:null,fillOpacity:Y,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:gr,g2:gr,glyphName:gr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Y,horizOriginX:Y,horizOriginY:Y,id:null,ideographic:Y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Y,k:Y,k1:Y,k2:Y,k3:Y,k4:Y,kernelMatrix:Rt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Y,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Y,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Y,overlineThickness:Y,paintOrder:null,panose1:null,path:null,pathLength:Y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ue,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Y,pointsAtY:Y,pointsAtZ:Y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Rt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Rt,rev:Rt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Rt,requiredFeatures:Rt,requiredFonts:Rt,requiredFormats:Rt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Y,specularExponent:Y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Y,strikethroughThickness:Y,string:null,stroke:null,strokeDashArray:Rt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Y,strokeOpacity:Y,strokeWidth:null,style:null,surfaceScale:Y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Rt,tabIndex:Y,tableValues:null,target:null,targetX:Y,targetY:Y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Rt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Y,underlineThickness:Y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Y,values:null,vAlphabetic:Y,vMathematical:Y,vectorEffect:null,vHanging:Y,vIdeographic:Y,version:null,vertAdvY:Y,vertOriginX:Y,vertOriginY:Y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Ry=/^data[-\w.:]+$/i,Dc=/-[a-z]/g,Oy=/[A-Z]/g;function My(e,t){const n=Bi(t);let r=t,u=Wt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Ry.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Dc,By);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Dc.test(a)){let i=a.replace(Oy,Fy);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}u=Is}return new u(r,t)}function Fy(e){return"-"+e.toLowerCase()}function By(e){return e.charAt(1).toUpperCase()}const jy=w1([P1,L1,M1,F1,Ly],"html"),B1=w1([P1,L1,M1,F1,Py],"svg"),Hy={},Uy={}.hasOwnProperty,j1=i1("type",{handlers:{root:$y,element:Yy,text:Zy,comment:Wy,doctype:qy}});function Vy(e,t){const r=(t||Hy).space;return j1(e,r==="svg"?B1:jy)}function $y(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Ns(e.children,n,t),vr(e,n),n}function zy(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Ns(e.children,n,t),vr(e,n),n}function qy(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return vr(e,t),t}function Zy(e){const t={nodeName:"#text",value:e.value,parentNode:null};return vr(e,t),t}function Wy(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return vr(e,t),t}function Yy(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=B1);const u=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&Uy.call(e.properties,a)){const c=Gy(r,a,e.properties[a]);c&&u.push(c)}}const i=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:u,namespaceURI:Xn[i],childNodes:[],parentNode:null};return o.childNodes=Ns(e.children,o,r),vr(e,o),e.tagName==="template"&&e.content&&(o.content=zy(e.content,r)),o}function Gy(e,t,n){const r=My(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?b0(n):S0(n));const u={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=u.name.indexOf(":");a<0?u.prefix="":(u.name=u.name.slice(a+1),u.prefix=r.attribute.slice(0,a)),u.namespace=Xn[r.space]}return u}function Ns(e,t,n){let r=-1;const u=[];if(e)for(;++r<e.length;){const a=j1(e[r],n);a.parentNode=t,u.push(a)}return u}function vr(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const Xy=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Ky=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),$e="�";var T;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(T||(T={}));const Et={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function H1(e){return e>=55296&&e<=57343}function Qy(e){return e>=56320&&e<=57343}function Jy(e,t){return(e-55296)*1024+9216+t}function U1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function V1(e){return e>=64976&&e<=65007||Ky.has(e)}var O;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(O||(O={}));const ek=65536;class tk{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=ek,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:u,offset:a}=this,i=u+n,o=a+n;return{code:t,startLine:r,endLine:r,startCol:i,endCol:i,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Qy(n))return this.pos++,this._addGap(),Jy(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,T.EOF;return this._err(O.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,T.EOF;const r=this.html.charCodeAt(n);return r===T.CARRIAGE_RETURN?T.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,T.EOF;let t=this.html.charCodeAt(this.pos);return t===T.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,T.LINE_FEED):t===T.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,H1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===T.LINE_FEED||t===T.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){U1(t)?this._err(O.controlCharacterInInputStream):V1(t)&&this._err(O.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var xe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(xe||(xe={}));function $1(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const nk=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),rk=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function uk(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=rk.get(e))!==null&&t!==void 0?t:e}var st;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(st||(st={}));const ak=32;var Mn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Mn||(Mn={}));function Hi(e){return e>=st.ZERO&&e<=st.NINE}function ik(e){return e>=st.UPPER_A&&e<=st.UPPER_F||e>=st.LOWER_A&&e<=st.LOWER_F}function sk(e){return e>=st.UPPER_A&&e<=st.UPPER_Z||e>=st.LOWER_A&&e<=st.LOWER_Z||Hi(e)}function ok(e){return e===st.EQUALS||sk(e)}var ut;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ut||(ut={}));var En;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(En||(En={}));class ck{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=ut.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=En.Strict}startEntity(t){this.decodeMode=t,this.state=ut.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case ut.EntityStart:return t.charCodeAt(n)===st.NUM?(this.state=ut.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=ut.NamedEntity,this.stateNamedEntity(t,n));case ut.NumericStart:return this.stateNumericStart(t,n);case ut.NumericDecimal:return this.stateNumericDecimal(t,n);case ut.NumericHex:return this.stateNumericHex(t,n);case ut.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|ak)===st.LOWER_X?(this.state=ut.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=ut.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,u){if(n!==r){const a=r-n;this.result=this.result*Math.pow(u,a)+Number.parseInt(t.substr(n,a),u),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const u=t.charCodeAt(n);if(Hi(u)||ik(u))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(u,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const u=t.charCodeAt(n);if(Hi(u))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(u,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===st.SEMI)this.consumed+=1;else if(this.decodeMode===En.Strict)return 0;return this.emitCodePoint(uk(this.result),this.consumed),this.errors&&(t!==st.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let u=r[this.treeIndex],a=(u&Mn.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const i=t.charCodeAt(n);if(this.treeIndex=lk(r,u,this.treeIndex+Math.max(1,a),i),this.treeIndex<0)return this.result===0||this.decodeMode===En.Attribute&&(a===0||ok(i))?0:this.emitNotTerminatedNamedEntity();if(u=r[this.treeIndex],a=(u&Mn.VALUE_LENGTH)>>14,a!==0){if(i===st.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==En.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,u=(r[n]&Mn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,u,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:u}=this;return this.emitCodePoint(n===1?u[t]&~Mn.VALUE_LENGTH:u[t+1],r),n===3&&this.emitCodePoint(u[t+2],r),r}end(){var t;switch(this.state){case ut.NamedEntity:return this.result!==0&&(this.decodeMode!==En.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ut.NumericDecimal:return this.emitNumericEntity(0,2);case ut.NumericHex:return this.emitNumericEntity(0,3);case ut.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ut.EntityStart:return 0}}}function lk(e,t,n,r){const u=(t&Mn.BRANCH_LENGTH)>>7,a=t&Mn.JUMP_TABLE;if(u===0)return a!==0&&r===a?n:-1;if(a){const c=r-a;return c<0||c>=u?-1:e[n+c]-1}let i=n,o=i+u-1;for(;i<=o;){const c=i+o>>>1,l=e[c];if(l<r)i=c+1;else if(l>r)o=c-1;else return e[c+u]}return-1}var V;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(V||(V={}));var Kn;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Kn||(Kn={}));var zt;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(zt||(zt={}));var R;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(R||(R={}));var d;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(d||(d={}));const dk=new Map([[R.A,d.A],[R.ADDRESS,d.ADDRESS],[R.ANNOTATION_XML,d.ANNOTATION_XML],[R.APPLET,d.APPLET],[R.AREA,d.AREA],[R.ARTICLE,d.ARTICLE],[R.ASIDE,d.ASIDE],[R.B,d.B],[R.BASE,d.BASE],[R.BASEFONT,d.BASEFONT],[R.BGSOUND,d.BGSOUND],[R.BIG,d.BIG],[R.BLOCKQUOTE,d.BLOCKQUOTE],[R.BODY,d.BODY],[R.BR,d.BR],[R.BUTTON,d.BUTTON],[R.CAPTION,d.CAPTION],[R.CENTER,d.CENTER],[R.CODE,d.CODE],[R.COL,d.COL],[R.COLGROUP,d.COLGROUP],[R.DD,d.DD],[R.DESC,d.DESC],[R.DETAILS,d.DETAILS],[R.DIALOG,d.DIALOG],[R.DIR,d.DIR],[R.DIV,d.DIV],[R.DL,d.DL],[R.DT,d.DT],[R.EM,d.EM],[R.EMBED,d.EMBED],[R.FIELDSET,d.FIELDSET],[R.FIGCAPTION,d.FIGCAPTION],[R.FIGURE,d.FIGURE],[R.FONT,d.FONT],[R.FOOTER,d.FOOTER],[R.FOREIGN_OBJECT,d.FOREIGN_OBJECT],[R.FORM,d.FORM],[R.FRAME,d.FRAME],[R.FRAMESET,d.FRAMESET],[R.H1,d.H1],[R.H2,d.H2],[R.H3,d.H3],[R.H4,d.H4],[R.H5,d.H5],[R.H6,d.H6],[R.HEAD,d.HEAD],[R.HEADER,d.HEADER],[R.HGROUP,d.HGROUP],[R.HR,d.HR],[R.HTML,d.HTML],[R.I,d.I],[R.IMG,d.IMG],[R.IMAGE,d.IMAGE],[R.INPUT,d.INPUT],[R.IFRAME,d.IFRAME],[R.KEYGEN,d.KEYGEN],[R.LABEL,d.LABEL],[R.LI,d.LI],[R.LINK,d.LINK],[R.LISTING,d.LISTING],[R.MAIN,d.MAIN],[R.MALIGNMARK,d.MALIGNMARK],[R.MARQUEE,d.MARQUEE],[R.MATH,d.MATH],[R.MENU,d.MENU],[R.META,d.META],[R.MGLYPH,d.MGLYPH],[R.MI,d.MI],[R.MO,d.MO],[R.MN,d.MN],[R.MS,d.MS],[R.MTEXT,d.MTEXT],[R.NAV,d.NAV],[R.NOBR,d.NOBR],[R.NOFRAMES,d.NOFRAMES],[R.NOEMBED,d.NOEMBED],[R.NOSCRIPT,d.NOSCRIPT],[R.OBJECT,d.OBJECT],[R.OL,d.OL],[R.OPTGROUP,d.OPTGROUP],[R.OPTION,d.OPTION],[R.P,d.P],[R.PARAM,d.PARAM],[R.PLAINTEXT,d.PLAINTEXT],[R.PRE,d.PRE],[R.RB,d.RB],[R.RP,d.RP],[R.RT,d.RT],[R.RTC,d.RTC],[R.RUBY,d.RUBY],[R.S,d.S],[R.SCRIPT,d.SCRIPT],[R.SEARCH,d.SEARCH],[R.SECTION,d.SECTION],[R.SELECT,d.SELECT],[R.SOURCE,d.SOURCE],[R.SMALL,d.SMALL],[R.SPAN,d.SPAN],[R.STRIKE,d.STRIKE],[R.STRONG,d.STRONG],[R.STYLE,d.STYLE],[R.SUB,d.SUB],[R.SUMMARY,d.SUMMARY],[R.SUP,d.SUP],[R.TABLE,d.TABLE],[R.TBODY,d.TBODY],[R.TEMPLATE,d.TEMPLATE],[R.TEXTAREA,d.TEXTAREA],[R.TFOOT,d.TFOOT],[R.TD,d.TD],[R.TH,d.TH],[R.THEAD,d.THEAD],[R.TITLE,d.TITLE],[R.TR,d.TR],[R.TRACK,d.TRACK],[R.TT,d.TT],[R.U,d.U],[R.UL,d.UL],[R.SVG,d.SVG],[R.VAR,d.VAR],[R.WBR,d.WBR],[R.XMP,d.XMP]]);function wr(e){var t;return(t=dk.get(e))!==null&&t!==void 0?t:d.UNKNOWN}const $=d,fk={[V.HTML]:new Set([$.ADDRESS,$.APPLET,$.AREA,$.ARTICLE,$.ASIDE,$.BASE,$.BASEFONT,$.BGSOUND,$.BLOCKQUOTE,$.BODY,$.BR,$.BUTTON,$.CAPTION,$.CENTER,$.COL,$.COLGROUP,$.DD,$.DETAILS,$.DIR,$.DIV,$.DL,$.DT,$.EMBED,$.FIELDSET,$.FIGCAPTION,$.FIGURE,$.FOOTER,$.FORM,$.FRAME,$.FRAMESET,$.H1,$.H2,$.H3,$.H4,$.H5,$.H6,$.HEAD,$.HEADER,$.HGROUP,$.HR,$.HTML,$.IFRAME,$.IMG,$.INPUT,$.LI,$.LINK,$.LISTING,$.MAIN,$.MARQUEE,$.MENU,$.META,$.NAV,$.NOEMBED,$.NOFRAMES,$.NOSCRIPT,$.OBJECT,$.OL,$.P,$.PARAM,$.PLAINTEXT,$.PRE,$.SCRIPT,$.SECTION,$.SELECT,$.SOURCE,$.STYLE,$.SUMMARY,$.TABLE,$.TBODY,$.TD,$.TEMPLATE,$.TEXTAREA,$.TFOOT,$.TH,$.THEAD,$.TITLE,$.TR,$.TRACK,$.UL,$.WBR,$.XMP]),[V.MATHML]:new Set([$.MI,$.MO,$.MN,$.MS,$.MTEXT,$.ANNOTATION_XML]),[V.SVG]:new Set([$.TITLE,$.FOREIGN_OBJECT,$.DESC]),[V.XLINK]:new Set,[V.XML]:new Set,[V.XMLNS]:new Set},Ui=new Set([$.H1,$.H2,$.H3,$.H4,$.H5,$.H6]);R.STYLE,R.SCRIPT,R.XMP,R.IFRAME,R.NOEMBED,R.NOFRAMES,R.PLAINTEXT;var A;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(A||(A={}));const Ge={DATA:A.DATA,RCDATA:A.RCDATA,RAWTEXT:A.RAWTEXT,SCRIPT_DATA:A.SCRIPT_DATA,PLAINTEXT:A.PLAINTEXT,CDATA_SECTION:A.CDATA_SECTION};function hk(e){return e>=T.DIGIT_0&&e<=T.DIGIT_9}function Ur(e){return e>=T.LATIN_CAPITAL_A&&e<=T.LATIN_CAPITAL_Z}function pk(e){return e>=T.LATIN_SMALL_A&&e<=T.LATIN_SMALL_Z}function vn(e){return pk(e)||Ur(e)}function Lc(e){return vn(e)||hk(e)}function Fu(e){return e+32}function z1(e){return e===T.SPACE||e===T.LINE_FEED||e===T.TABULATION||e===T.FORM_FEED}function Pc(e){return z1(e)||e===T.SOLIDUS||e===T.GREATER_THAN_SIGN}function mk(e){return e===T.NULL?O.nullCharacterReference:e>1114111?O.characterReferenceOutsideUnicodeRange:H1(e)?O.surrogateCharacterReference:V1(e)?O.noncharacterCharacterReference:U1(e)||e===T.CARRIAGE_RETURN?O.controlCharacterReference:null}class gk{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=A.DATA,this.returnState=A.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new tk(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new ck(nk,(r,u)=>{this.preprocessor.pos=this.entityStartPos+u-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(O.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(O.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const u=mk(r);u&&this._err(u,1)}}:void 0)}_err(t,n=0){var r,u;(u=(r=this.handler).onParseError)===null||u===void 0||u.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:xe.START_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:xe.END_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:xe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:xe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if($1(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const u=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);u[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(O.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=wr(t.tagName),t.type===xe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(O.endTagWithAttributes),t.selfClosing&&this._err(O.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case xe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case xe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case xe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:xe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=z1(t)?xe.WHITESPACE_CHARACTER:t===T.NULL?xe.NULL_CHARACTER:xe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(xe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=A.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?En.Attribute:En.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===A.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===A.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===A.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case A.DATA:{this._stateData(t);break}case A.RCDATA:{this._stateRcdata(t);break}case A.RAWTEXT:{this._stateRawtext(t);break}case A.SCRIPT_DATA:{this._stateScriptData(t);break}case A.PLAINTEXT:{this._statePlaintext(t);break}case A.TAG_OPEN:{this._stateTagOpen(t);break}case A.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case A.TAG_NAME:{this._stateTagName(t);break}case A.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case A.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case A.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case A.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case A.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case A.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case A.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case A.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case A.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case A.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case A.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case A.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case A.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case A.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case A.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case A.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case A.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case A.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case A.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case A.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case A.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case A.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case A.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case A.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case A.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case A.BOGUS_COMMENT:{this._stateBogusComment(t);break}case A.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case A.COMMENT_START:{this._stateCommentStart(t);break}case A.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case A.COMMENT:{this._stateComment(t);break}case A.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case A.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case A.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case A.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case A.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case A.COMMENT_END:{this._stateCommentEnd(t);break}case A.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case A.DOCTYPE:{this._stateDoctype(t);break}case A.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case A.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case A.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case A.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case A.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case A.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case A.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case A.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case A.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case A.CDATA_SECTION:{this._stateCdataSection(t);break}case A.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case A.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case A.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case A.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case T.LESS_THAN_SIGN:{this.state=A.TAG_OPEN;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.NULL:{this._err(O.unexpectedNullCharacter),this._emitCodePoint(t);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case T.AMPERSAND:{this._startCharacterReference();break}case T.LESS_THAN_SIGN:{this.state=A.RCDATA_LESS_THAN_SIGN;break}case T.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars($e);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case T.LESS_THAN_SIGN:{this.state=A.RAWTEXT_LESS_THAN_SIGN;break}case T.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars($e);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case T.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_LESS_THAN_SIGN;break}case T.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars($e);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case T.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars($e);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(vn(t))this._createStartTagToken(),this.state=A.TAG_NAME,this._stateTagName(t);else switch(t){case T.EXCLAMATION_MARK:{this.state=A.MARKUP_DECLARATION_OPEN;break}case T.SOLIDUS:{this.state=A.END_TAG_OPEN;break}case T.QUESTION_MARK:{this._err(O.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=A.BOGUS_COMMENT,this._stateBogusComment(t);break}case T.EOF:{this._err(O.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(O.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=A.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(vn(t))this._createEndTagToken(),this.state=A.TAG_NAME,this._stateTagName(t);else switch(t){case T.GREATER_THAN_SIGN:{this._err(O.missingEndTagName),this.state=A.DATA;break}case T.EOF:{this._err(O.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(O.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=A.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=A.BEFORE_ATTRIBUTE_NAME;break}case T.SOLIDUS:{this.state=A.SELF_CLOSING_START_TAG;break}case T.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentTagToken();break}case T.NULL:{this._err(O.unexpectedNullCharacter),n.tagName+=$e;break}case T.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ur(t)?Fu(t):t)}}_stateRcdataLessThanSign(t){t===T.SOLIDUS?this.state=A.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=A.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){vn(t)?(this.state=A.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=A.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=A.BEFORE_ATTRIBUTE_NAME,!1;case T.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=A.SELF_CLOSING_START_TAG,!1;case T.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=A.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===T.SOLIDUS?this.state=A.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=A.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){vn(t)?(this.state=A.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=A.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case T.SOLIDUS:{this.state=A.SCRIPT_DATA_END_TAG_OPEN;break}case T.EXCLAMATION_MARK:{this.state=A.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=A.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){vn(t)?(this.state=A.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===T.HYPHEN_MINUS?(this.state=A.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===T.HYPHEN_MINUS?(this.state=A.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case T.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case T.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars($e);break}case T.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case T.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case T.NULL:{this._err(O.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_ESCAPED,this._emitChars($e);break}case T.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case T.HYPHEN_MINUS:{this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case T.GREATER_THAN_SIGN:{this.state=A.SCRIPT_DATA,this._emitChars(">");break}case T.NULL:{this._err(O.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_ESCAPED,this._emitChars($e);break}case T.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===T.SOLIDUS?this.state=A.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:vn(t)?(this._emitChars("<"),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){vn(t)?(this.state=A.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Et.SCRIPT,!1)&&Pc(this.preprocessor.peek(Et.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Et.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case T.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case T.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars($e);break}case T.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case T.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case T.NULL:{this._err(O.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars($e);break}case T.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case T.HYPHEN_MINUS:{this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case T.GREATER_THAN_SIGN:{this.state=A.SCRIPT_DATA,this._emitChars(">");break}case T.NULL:{this._err(O.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars($e);break}case T.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===T.SOLIDUS?(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Et.SCRIPT,!1)&&Pc(this.preprocessor.peek(Et.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Et.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=A.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.SOLIDUS:case T.GREATER_THAN_SIGN:case T.EOF:{this.state=A.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case T.EQUALS_SIGN:{this._err(O.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=A.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=A.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:case T.SOLIDUS:case T.GREATER_THAN_SIGN:case T.EOF:{this._leaveAttrName(),this.state=A.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case T.EQUALS_SIGN:{this._leaveAttrName(),this.state=A.BEFORE_ATTRIBUTE_VALUE;break}case T.QUOTATION_MARK:case T.APOSTROPHE:case T.LESS_THAN_SIGN:{this._err(O.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case T.NULL:{this._err(O.unexpectedNullCharacter),this.currentAttr.name+=$e;break}default:this.currentAttr.name+=String.fromCodePoint(Ur(t)?Fu(t):t)}}_stateAfterAttributeName(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.SOLIDUS:{this.state=A.SELF_CLOSING_START_TAG;break}case T.EQUALS_SIGN:{this.state=A.BEFORE_ATTRIBUTE_VALUE;break}case T.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentTagToken();break}case T.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=A.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:{this.state=A.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this.state=A.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(O.missingAttributeValue),this.state=A.DATA,this.emitCurrentTagToken();break}default:this.state=A.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case T.QUOTATION_MARK:{this.state=A.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.NULL:{this._err(O.unexpectedNullCharacter),this.currentAttr.value+=$e;break}case T.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case T.APOSTROPHE:{this.state=A.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.NULL:{this._err(O.unexpectedNullCharacter),this.currentAttr.value+=$e;break}case T.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this._leaveAttrValue(),this.state=A.BEFORE_ATTRIBUTE_NAME;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=A.DATA,this.emitCurrentTagToken();break}case T.NULL:{this._err(O.unexpectedNullCharacter),this.currentAttr.value+=$e;break}case T.QUOTATION_MARK:case T.APOSTROPHE:case T.LESS_THAN_SIGN:case T.EQUALS_SIGN:case T.GRAVE_ACCENT:{this._err(O.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case T.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this._leaveAttrValue(),this.state=A.BEFORE_ATTRIBUTE_NAME;break}case T.SOLIDUS:{this._leaveAttrValue(),this.state=A.SELF_CLOSING_START_TAG;break}case T.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=A.DATA,this.emitCurrentTagToken();break}case T.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this._err(O.missingWhitespaceBetweenAttributes),this.state=A.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case T.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=A.DATA,this.emitCurrentTagToken();break}case T.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this._err(O.unexpectedSolidusInTag),this.state=A.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case T.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentComment(n);break}case T.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case T.NULL:{this._err(O.unexpectedNullCharacter),n.data+=$e;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Et.DASH_DASH,!0)?(this._createCommentToken(Et.DASH_DASH.length+1),this.state=A.COMMENT_START):this._consumeSequenceIfMatch(Et.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Et.DOCTYPE.length+1),this.state=A.DOCTYPE):this._consumeSequenceIfMatch(Et.CDATA_START,!0)?this.inForeignNode?this.state=A.CDATA_SECTION:(this._err(O.cdataInHtmlContent),this._createCommentToken(Et.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=A.BOGUS_COMMENT):this._ensureHibernation()||(this._err(O.incorrectlyOpenedComment),this._createCommentToken(2),this.state=A.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case T.HYPHEN_MINUS:{this.state=A.COMMENT_START_DASH;break}case T.GREATER_THAN_SIGN:{this._err(O.abruptClosingOfEmptyComment),this.state=A.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=A.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{this.state=A.COMMENT_END;break}case T.GREATER_THAN_SIGN:{this._err(O.abruptClosingOfEmptyComment),this.state=A.DATA,this.emitCurrentComment(n);break}case T.EOF:{this._err(O.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=A.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{this.state=A.COMMENT_END_DASH;break}case T.LESS_THAN_SIGN:{n.data+="<",this.state=A.COMMENT_LESS_THAN_SIGN;break}case T.NULL:{this._err(O.unexpectedNullCharacter),n.data+=$e;break}case T.EOF:{this._err(O.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case T.EXCLAMATION_MARK:{n.data+="!",this.state=A.COMMENT_LESS_THAN_SIGN_BANG;break}case T.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=A.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===T.HYPHEN_MINUS?this.state=A.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=A.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===T.HYPHEN_MINUS?this.state=A.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=A.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==T.GREATER_THAN_SIGN&&t!==T.EOF&&this._err(O.nestedComment),this.state=A.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{this.state=A.COMMENT_END;break}case T.EOF:{this._err(O.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=A.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case T.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentComment(n);break}case T.EXCLAMATION_MARK:{this.state=A.COMMENT_END_BANG;break}case T.HYPHEN_MINUS:{n.data+="-";break}case T.EOF:{this._err(O.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=A.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{n.data+="--!",this.state=A.COMMENT_END_DASH;break}case T.GREATER_THAN_SIGN:{this._err(O.incorrectlyClosedComment),this.state=A.DATA,this.emitCurrentComment(n);break}case T.EOF:{this._err(O.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=A.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_NAME;break}case T.GREATER_THAN_SIGN:{this.state=A.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case T.EOF:{this._err(O.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(O.missingWhitespaceBeforeDoctypeName),this.state=A.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ur(t))this._createDoctypeToken(String.fromCharCode(Fu(t))),this.state=A.DOCTYPE_NAME;else switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.NULL:{this._err(O.unexpectedNullCharacter),this._createDoctypeToken($e),this.state=A.DOCTYPE_NAME;break}case T.GREATER_THAN_SIGN:{this._err(O.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case T.EOF:{this._err(O.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=A.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=A.AFTER_DOCTYPE_NAME;break}case T.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case T.NULL:{this._err(O.unexpectedNullCharacter),n.name+=$e;break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ur(t)?Fu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Et.PUBLIC,!1)?this.state=A.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Et.SYSTEM,!1)?this.state=A.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(O.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case T.QUOTATION_MARK:{this._err(O.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this._err(O.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(O.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:{n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(O.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case T.QUOTATION_MARK:{this.state=A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case T.NULL:{this._err(O.unexpectedNullCharacter),n.publicId+=$e;break}case T.GREATER_THAN_SIGN:{this._err(O.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case T.APOSTROPHE:{this.state=A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case T.NULL:{this._err(O.unexpectedNullCharacter),n.publicId+=$e;break}case T.GREATER_THAN_SIGN:{this._err(O.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=A.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case T.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case T.QUOTATION_MARK:{this._err(O.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this._err(O.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case T.QUOTATION_MARK:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case T.QUOTATION_MARK:{this._err(O.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this._err(O.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(O.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(O.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case T.QUOTATION_MARK:{this.state=A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case T.NULL:{this._err(O.unexpectedNullCharacter),n.systemId+=$e;break}case T.GREATER_THAN_SIGN:{this._err(O.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case T.APOSTROPHE:{this.state=A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case T.NULL:{this._err(O.unexpectedNullCharacter),n.systemId+=$e;break}case T.GREATER_THAN_SIGN:{this._err(O.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case T.EOF:{this._err(O.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(O.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case T.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case T.NULL:{this._err(O.unexpectedNullCharacter);break}case T.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case T.RIGHT_SQUARE_BRACKET:{this.state=A.CDATA_SECTION_BRACKET;break}case T.EOF:{this._err(O.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===T.RIGHT_SQUARE_BRACKET?this.state=A.CDATA_SECTION_END:(this._emitChars("]"),this.state=A.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case T.GREATER_THAN_SIGN:{this.state=A.DATA;break}case T.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=A.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(T.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Lc(this.preprocessor.peek(1))?A.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Lc(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===T.SEMICOLON&&this._err(O.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const q1=new Set([d.DD,d.DT,d.LI,d.OPTGROUP,d.OPTION,d.P,d.RB,d.RP,d.RT,d.RTC]),Rc=new Set([...q1,d.CAPTION,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]),Qu=new Set([d.APPLET,d.CAPTION,d.HTML,d.MARQUEE,d.OBJECT,d.TABLE,d.TD,d.TEMPLATE,d.TH]),bk=new Set([...Qu,d.OL,d.UL]),_k=new Set([...Qu,d.BUTTON]),Oc=new Set([d.ANNOTATION_XML,d.MI,d.MN,d.MO,d.MS,d.MTEXT]),Mc=new Set([d.DESC,d.FOREIGN_OBJECT,d.TITLE]),xk=new Set([d.TR,d.TEMPLATE,d.HTML]),Ck=new Set([d.TBODY,d.TFOOT,d.THEAD,d.TEMPLATE,d.HTML]),Ek=new Set([d.TABLE,d.TEMPLATE,d.HTML]),Tk=new Set([d.TD,d.TH]);class yk{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=d.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===d.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===V.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const u=this._indexOf(t)+1;this.items.splice(u,0,n),this.tagIDs.splice(u,0,r),this.stackTop++,u===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,u===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==V.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Ui,V.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Tk,V.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Ek,V.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Ck,V.HTML)}clearBackToTableRowContext(){this.clearBackTo(xk,V.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===d.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===d.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const u=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case V.HTML:{if(u===t)return!0;if(n.has(u))return!1;break}case V.SVG:{if(Mc.has(u))return!1;break}case V.MATHML:{if(Oc.has(u))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Qu)}hasInListItemScope(t){return this.hasInDynamicScope(t,bk)}hasInButtonScope(t){return this.hasInDynamicScope(t,_k)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case V.HTML:{if(Ui.has(n))return!0;if(Qu.has(n))return!1;break}case V.SVG:{if(Mc.has(n))return!1;break}case V.MATHML:{if(Oc.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===V.HTML)switch(this.tagIDs[n]){case t:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===V.HTML)switch(this.tagIDs[t]){case d.TBODY:case d.THEAD:case d.TFOOT:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===V.HTML)switch(this.tagIDs[n]){case t:return!0;case d.OPTION:case d.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&q1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Rc.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Rc.has(this.currentTagId);)this.pop()}}const li=3;var sn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(sn||(sn={}));const Fc={type:sn.Marker};class kk{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],u=n.length,a=this.treeAdapter.getTagName(t),i=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const c=this.entries[o];if(c.type===sn.Marker)break;const{element:l}=c;if(this.treeAdapter.getTagName(l)===a&&this.treeAdapter.getNamespaceURI(l)===i){const h=this.treeAdapter.getAttrList(l);h.length===u&&r.push({idx:o,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<li)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<li)return;const u=new Map(n.map(i=>[i.name,i.value]));let a=0;for(let i=0;i<r.length;i++){const o=r[i];o.attrs.every(c=>u.get(c.name)===c.value)&&(a+=1,a>=li&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Fc)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:sn.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:sn.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Fc);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===sn.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===sn.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===sn.Element&&n.element===t)}}const wn={createDocument(){return{nodeName:"#document",mode:zt.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const u=e.childNodes.find(a=>a.nodeName==="#documentType");if(u)u.name=t,u.publicId=n,u.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};wn.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(wn.isTextNode(n)){n.value+=t;return}}wn.appendChild(e,wn.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&wn.isTextNode(r)?r.value+=t:wn.insertBefore(e,wn.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Z1="html",Ak="about:legacy-compat",Sk="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",W1=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Ik=[...W1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Nk=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Y1=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],vk=[...Y1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Bc(e,t){return t.some(n=>e.startsWith(n))}function wk(e){return e.name===Z1&&e.publicId===null&&(e.systemId===null||e.systemId===Ak)}function Dk(e){if(e.name!==Z1)return zt.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Sk)return zt.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Nk.has(n))return zt.QUIRKS;let r=t===null?Ik:W1;if(Bc(n,r))return zt.QUIRKS;if(r=t===null?Y1:vk,Bc(n,r))return zt.LIMITED_QUIRKS}return zt.NO_QUIRKS}const jc={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Lk="definitionurl",Pk="definitionURL",Rk=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Ok=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:V.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:V.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:V.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:V.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:V.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:V.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:V.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:V.XML}],["xml:space",{prefix:"xml",name:"space",namespace:V.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:V.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:V.XMLNS}]]),Mk=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Fk=new Set([d.B,d.BIG,d.BLOCKQUOTE,d.BODY,d.BR,d.CENTER,d.CODE,d.DD,d.DIV,d.DL,d.DT,d.EM,d.EMBED,d.H1,d.H2,d.H3,d.H4,d.H5,d.H6,d.HEAD,d.HR,d.I,d.IMG,d.LI,d.LISTING,d.MENU,d.META,d.NOBR,d.OL,d.P,d.PRE,d.RUBY,d.S,d.SMALL,d.SPAN,d.STRONG,d.STRIKE,d.SUB,d.SUP,d.TABLE,d.TT,d.U,d.UL,d.VAR]);function Bk(e){const t=e.tagID;return t===d.FONT&&e.attrs.some(({name:r})=>r===Kn.COLOR||r===Kn.SIZE||r===Kn.FACE)||Fk.has(t)}function G1(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Lk){e.attrs[t].name=Pk;break}}function X1(e){for(let t=0;t<e.attrs.length;t++){const n=Rk.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function vs(e){for(let t=0;t<e.attrs.length;t++){const n=Ok.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function jk(e){const t=Mk.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=wr(e.tagName))}function Hk(e,t){return t===V.MATHML&&(e===d.MI||e===d.MO||e===d.MN||e===d.MS||e===d.MTEXT)}function Uk(e,t,n){if(t===V.MATHML&&e===d.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Kn.ENCODING){const u=n[r].value.toLowerCase();return u===jc.TEXT_HTML||u===jc.APPLICATION_XML}}return t===V.SVG&&(e===d.FOREIGN_OBJECT||e===d.DESC||e===d.TITLE)}function Vk(e,t,n,r){return(!r||r===V.HTML)&&Uk(e,t,n)||(!r||r===V.MATHML)&&Hk(e,t)}const $k="hidden",zk=8,qk=3;var N;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(N||(N={}));const Zk={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},K1=new Set([d.TABLE,d.TBODY,d.TFOOT,d.THEAD,d.TR]),Hc={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:wn,onParseError:null};class Uc{constructor(t,n,r=null,u=null){this.fragmentContext=r,this.scriptHandler=u,this.currentToken=null,this.stopped=!1,this.insertionMode=N.INITIAL,this.originalInsertionMode=N.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Hc,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new gk(this.options,this),this.activeFormattingElements=new kk(this.treeAdapter),this.fragmentContextID=r?wr(this.treeAdapter.getTagName(r)):d.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new yk(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...Hc,...n};t??(t=r.treeAdapter.createElement(R.TEMPLATE,V.HTML,[]));const u=r.treeAdapter.createElement("documentmock",V.HTML,[]),a=new this(r,u,t);return a.fragmentContextID===d.TEMPLATE&&a.tmplInsertionModeStack.unshift(N.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var u;if(!this.onParseError)return;const a=(u=t.location)!==null&&u!==void 0?u:Zk,i={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(i)}onItemPush(t,n,r){var u,a;(a=(u=this.treeAdapter).onItemPush)===null||a===void 0||a.call(u,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,u;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(u=(r=this.treeAdapter).onItemPop)===null||u===void 0||u.call(r,t,this.openElements.current),n){let a,i;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,i=this.fragmentContextID):{current:a,currentTagId:i}=this.openElements,this._setContextModes(a,i)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===V.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,V.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=N.TEXT}switchToPlaintextParsing(){this.insertionMode=N.TEXT,this.originalInsertionMode=N.IN_BODY,this.tokenizer.state=Ge.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===R.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==V.HTML))switch(this.fragmentContextID){case d.TITLE:case d.TEXTAREA:{this.tokenizer.state=Ge.RCDATA;break}case d.STYLE:case d.XMP:case d.IFRAME:case d.NOEMBED:case d.NOFRAMES:case d.NOSCRIPT:{this.tokenizer.state=Ge.RAWTEXT;break}case d.SCRIPT:{this.tokenizer.state=Ge.SCRIPT_DATA;break}case d.PLAINTEXT:{this.tokenizer.state=Ge.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",u=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,u),t.location){const i=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));i&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,V.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,V.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(R.HTML,V.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,d.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const u=this.treeAdapter.getChildNodes(n),a=r?u.lastIndexOf(r):u.length,i=u[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){const{endLine:c,endCol:l,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:c,endCol:l,endOffset:h})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,u=this.treeAdapter.getTagName(t),a=n.type===xe.END_TAG&&u===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===d.SVG&&this.treeAdapter.getTagName(n)===R.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===V.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===d.MGLYPH||t.tagID===d.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,V.HTML)}_processToken(t){switch(t.type){case xe.CHARACTER:{this.onCharacter(t);break}case xe.NULL_CHARACTER:{this.onNullCharacter(t);break}case xe.COMMENT:{this.onComment(t);break}case xe.DOCTYPE:{this.onDoctype(t);break}case xe.START_TAG:{this._processStartTag(t);break}case xe.END_TAG:{this.onEndTag(t);break}case xe.EOF:{this.onEof(t);break}case xe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const u=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return Vk(t,u,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(u=>u.type===sn.Marker||this.openElements.contains(u.element)),r=n===-1?t-1:n-1;for(let u=r;u>=0;u--){const a=this.activeFormattingElements.entries[u];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=N.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(d.P),this.openElements.popUntilTagNamePopped(d.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case d.TR:{this.insertionMode=N.IN_ROW;return}case d.TBODY:case d.THEAD:case d.TFOOT:{this.insertionMode=N.IN_TABLE_BODY;return}case d.CAPTION:{this.insertionMode=N.IN_CAPTION;return}case d.COLGROUP:{this.insertionMode=N.IN_COLUMN_GROUP;return}case d.TABLE:{this.insertionMode=N.IN_TABLE;return}case d.BODY:{this.insertionMode=N.IN_BODY;return}case d.FRAMESET:{this.insertionMode=N.IN_FRAMESET;return}case d.SELECT:{this._resetInsertionModeForSelect(t);return}case d.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case d.HTML:{this.insertionMode=this.headElement?N.AFTER_HEAD:N.BEFORE_HEAD;return}case d.TD:case d.TH:{if(t>0){this.insertionMode=N.IN_CELL;return}break}case d.HEAD:{if(t>0){this.insertionMode=N.IN_HEAD;return}break}}this.insertionMode=N.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===d.TEMPLATE)break;if(r===d.TABLE){this.insertionMode=N.IN_SELECT_IN_TABLE;return}}this.insertionMode=N.IN_SELECT}_isElementCausesFosterParenting(t){return K1.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case d.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===V.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case d.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return fk[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){TS(this,t);return}switch(this.insertionMode){case N.INITIAL:{Fr(this,t);break}case N.BEFORE_HTML:{Zr(this,t);break}case N.BEFORE_HEAD:{Wr(this,t);break}case N.IN_HEAD:{Yr(this,t);break}case N.IN_HEAD_NO_SCRIPT:{Gr(this,t);break}case N.AFTER_HEAD:{Xr(this,t);break}case N.IN_BODY:case N.IN_CAPTION:case N.IN_CELL:case N.IN_TEMPLATE:{J1(this,t);break}case N.TEXT:case N.IN_SELECT:case N.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case N.IN_TABLE:case N.IN_TABLE_BODY:case N.IN_ROW:{di(this,t);break}case N.IN_TABLE_TEXT:{ad(this,t);break}case N.IN_COLUMN_GROUP:{Ju(this,t);break}case N.AFTER_BODY:{ea(this,t);break}case N.AFTER_AFTER_BODY:{zu(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ES(this,t);return}switch(this.insertionMode){case N.INITIAL:{Fr(this,t);break}case N.BEFORE_HTML:{Zr(this,t);break}case N.BEFORE_HEAD:{Wr(this,t);break}case N.IN_HEAD:{Yr(this,t);break}case N.IN_HEAD_NO_SCRIPT:{Gr(this,t);break}case N.AFTER_HEAD:{Xr(this,t);break}case N.TEXT:{this._insertCharacters(t);break}case N.IN_TABLE:case N.IN_TABLE_BODY:case N.IN_ROW:{di(this,t);break}case N.IN_COLUMN_GROUP:{Ju(this,t);break}case N.AFTER_BODY:{ea(this,t);break}case N.AFTER_AFTER_BODY:{zu(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Vi(this,t);return}switch(this.insertionMode){case N.INITIAL:case N.BEFORE_HTML:case N.BEFORE_HEAD:case N.IN_HEAD:case N.IN_HEAD_NO_SCRIPT:case N.AFTER_HEAD:case N.IN_BODY:case N.IN_TABLE:case N.IN_CAPTION:case N.IN_COLUMN_GROUP:case N.IN_TABLE_BODY:case N.IN_ROW:case N.IN_CELL:case N.IN_SELECT:case N.IN_SELECT_IN_TABLE:case N.IN_TEMPLATE:case N.IN_FRAMESET:case N.AFTER_FRAMESET:{Vi(this,t);break}case N.IN_TABLE_TEXT:{Br(this,t);break}case N.AFTER_BODY:{Jk(this,t);break}case N.AFTER_AFTER_BODY:case N.AFTER_AFTER_FRAMESET:{eA(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case N.INITIAL:{tA(this,t);break}case N.BEFORE_HEAD:case N.IN_HEAD:case N.IN_HEAD_NO_SCRIPT:case N.AFTER_HEAD:{this._err(t,O.misplacedDoctype);break}case N.IN_TABLE_TEXT:{Br(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,O.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?yS(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case N.INITIAL:{Fr(this,t);break}case N.BEFORE_HTML:{nA(this,t);break}case N.BEFORE_HEAD:{uA(this,t);break}case N.IN_HEAD:{en(this,t);break}case N.IN_HEAD_NO_SCRIPT:{sA(this,t);break}case N.AFTER_HEAD:{cA(this,t);break}case N.IN_BODY:{pt(this,t);break}case N.IN_TABLE:{Er(this,t);break}case N.IN_TABLE_TEXT:{Br(this,t);break}case N.IN_CAPTION:{aS(this,t);break}case N.IN_COLUMN_GROUP:{Ls(this,t);break}case N.IN_TABLE_BODY:{Ia(this,t);break}case N.IN_ROW:{Na(this,t);break}case N.IN_CELL:{oS(this,t);break}case N.IN_SELECT:{od(this,t);break}case N.IN_SELECT_IN_TABLE:{lS(this,t);break}case N.IN_TEMPLATE:{fS(this,t);break}case N.AFTER_BODY:{pS(this,t);break}case N.IN_FRAMESET:{mS(this,t);break}case N.AFTER_FRAMESET:{bS(this,t);break}case N.AFTER_AFTER_BODY:{xS(this,t);break}case N.AFTER_AFTER_FRAMESET:{CS(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?kS(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case N.INITIAL:{Fr(this,t);break}case N.BEFORE_HTML:{rA(this,t);break}case N.BEFORE_HEAD:{aA(this,t);break}case N.IN_HEAD:{iA(this,t);break}case N.IN_HEAD_NO_SCRIPT:{oA(this,t);break}case N.AFTER_HEAD:{lA(this,t);break}case N.IN_BODY:{Sa(this,t);break}case N.TEXT:{GA(this,t);break}case N.IN_TABLE:{au(this,t);break}case N.IN_TABLE_TEXT:{Br(this,t);break}case N.IN_CAPTION:{iS(this,t);break}case N.IN_COLUMN_GROUP:{sS(this,t);break}case N.IN_TABLE_BODY:{$i(this,t);break}case N.IN_ROW:{sd(this,t);break}case N.IN_CELL:{cS(this,t);break}case N.IN_SELECT:{cd(this,t);break}case N.IN_SELECT_IN_TABLE:{dS(this,t);break}case N.IN_TEMPLATE:{hS(this,t);break}case N.AFTER_BODY:{dd(this,t);break}case N.IN_FRAMESET:{gS(this,t);break}case N.AFTER_FRAMESET:{_S(this,t);break}case N.AFTER_AFTER_BODY:{zu(this,t);break}}}onEof(t){switch(this.insertionMode){case N.INITIAL:{Fr(this,t);break}case N.BEFORE_HTML:{Zr(this,t);break}case N.BEFORE_HEAD:{Wr(this,t);break}case N.IN_HEAD:{Yr(this,t);break}case N.IN_HEAD_NO_SCRIPT:{Gr(this,t);break}case N.AFTER_HEAD:{Xr(this,t);break}case N.IN_BODY:case N.IN_TABLE:case N.IN_CAPTION:case N.IN_COLUMN_GROUP:case N.IN_TABLE_BODY:case N.IN_ROW:case N.IN_CELL:case N.IN_SELECT:case N.IN_SELECT_IN_TABLE:{rd(this,t);break}case N.TEXT:{XA(this,t);break}case N.IN_TABLE_TEXT:{Br(this,t);break}case N.IN_TEMPLATE:{ld(this,t);break}case N.AFTER_BODY:case N.IN_FRAMESET:case N.AFTER_FRAMESET:case N.AFTER_AFTER_BODY:case N.AFTER_AFTER_FRAMESET:{Ds(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===T.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case N.IN_HEAD:case N.IN_HEAD_NO_SCRIPT:case N.AFTER_HEAD:case N.TEXT:case N.IN_COLUMN_GROUP:case N.IN_SELECT:case N.IN_SELECT_IN_TABLE:case N.IN_FRAMESET:case N.AFTER_FRAMESET:{this._insertCharacters(t);break}case N.IN_BODY:case N.IN_CAPTION:case N.IN_CELL:case N.IN_TEMPLATE:case N.AFTER_BODY:case N.AFTER_AFTER_BODY:case N.AFTER_AFTER_FRAMESET:{Q1(this,t);break}case N.IN_TABLE:case N.IN_TABLE_BODY:case N.IN_ROW:{di(this,t);break}case N.IN_TABLE_TEXT:{ud(this,t);break}}}}function Wk(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):nd(e,t),n}function Yk(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const u=e.openElements.items[r];if(u===t.element)break;e._isSpecialElement(u,e.openElements.tagIDs[r])&&(n=u)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Gk(e,t,n){let r=t,u=e.openElements.getCommonAncestor(t);for(let a=0,i=u;i!==n;a++,i=u){u=e.openElements.getCommonAncestor(i);const o=e.activeFormattingElements.getElementEntry(i),c=o&&a>=qk;!o||c?(c&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(i)):(i=Xk(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(i,r),r=i)}return r}function Xk(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Kk(e,t,n){const r=e.treeAdapter.getTagName(t),u=wr(r);if(e._isElementCausesFosterParenting(u))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);u===d.TEMPLATE&&a===V.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Qk(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:u}=n,a=e.treeAdapter.createElement(u.tagName,r,u.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,u),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,u.tagID)}function ws(e,t){for(let n=0;n<zk;n++){const r=Wk(e,t);if(!r)break;const u=Yk(e,r);if(!u)break;e.activeFormattingElements.bookmark=r;const a=Gk(e,u,r.element),i=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),i&&Kk(e,i,a),Qk(e,u,r)}}function Vi(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Jk(e,t){e._appendCommentNode(t,e.openElements.items[0])}function eA(e,t){e._appendCommentNode(t,e.document)}function Ds(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],u=e.treeAdapter.getNodeSourceCodeLocation(r);if(u&&!u.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],i=e.treeAdapter.getNodeSourceCodeLocation(a);i&&!i.endTag&&e._setEndLocation(a,t)}}}}function tA(e,t){e._setDocumentType(t);const n=t.forceQuirks?zt.QUIRKS:Dk(t);wk(t)||e._err(t,O.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=N.BEFORE_HTML}function Fr(e,t){e._err(t,O.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,zt.QUIRKS),e.insertionMode=N.BEFORE_HTML,e._processToken(t)}function nA(e,t){t.tagID===d.HTML?(e._insertElement(t,V.HTML),e.insertionMode=N.BEFORE_HEAD):Zr(e,t)}function rA(e,t){const n=t.tagID;(n===d.HTML||n===d.HEAD||n===d.BODY||n===d.BR)&&Zr(e,t)}function Zr(e,t){e._insertFakeRootElement(),e.insertionMode=N.BEFORE_HEAD,e._processToken(t)}function uA(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.HEAD:{e._insertElement(t,V.HTML),e.headElement=e.openElements.current,e.insertionMode=N.IN_HEAD;break}default:Wr(e,t)}}function aA(e,t){const n=t.tagID;n===d.HEAD||n===d.BODY||n===d.HTML||n===d.BR?Wr(e,t):e._err(t,O.endTagWithoutMatchingOpenElement)}function Wr(e,t){e._insertFakeElement(R.HEAD,d.HEAD),e.headElement=e.openElements.current,e.insertionMode=N.IN_HEAD,e._processToken(t)}function en(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:{e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case d.TITLE:{e._switchToTextParsing(t,Ge.RCDATA);break}case d.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ge.RAWTEXT):(e._insertElement(t,V.HTML),e.insertionMode=N.IN_HEAD_NO_SCRIPT);break}case d.NOFRAMES:case d.STYLE:{e._switchToTextParsing(t,Ge.RAWTEXT);break}case d.SCRIPT:{e._switchToTextParsing(t,Ge.SCRIPT_DATA);break}case d.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=N.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(N.IN_TEMPLATE);break}case d.HEAD:{e._err(t,O.misplacedStartTagForHeadElement);break}default:Yr(e,t)}}function iA(e,t){switch(t.tagID){case d.HEAD:{e.openElements.pop(),e.insertionMode=N.AFTER_HEAD;break}case d.BODY:case d.BR:case d.HTML:{Yr(e,t);break}case d.TEMPLATE:{rr(e,t);break}default:e._err(t,O.endTagWithoutMatchingOpenElement)}}function rr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==d.TEMPLATE&&e._err(t,O.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,O.endTagWithoutMatchingOpenElement)}function Yr(e,t){e.openElements.pop(),e.insertionMode=N.AFTER_HEAD,e._processToken(t)}function sA(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.BASEFONT:case d.BGSOUND:case d.HEAD:case d.LINK:case d.META:case d.NOFRAMES:case d.STYLE:{en(e,t);break}case d.NOSCRIPT:{e._err(t,O.nestedNoscriptInHead);break}default:Gr(e,t)}}function oA(e,t){switch(t.tagID){case d.NOSCRIPT:{e.openElements.pop(),e.insertionMode=N.IN_HEAD;break}case d.BR:{Gr(e,t);break}default:e._err(t,O.endTagWithoutMatchingOpenElement)}}function Gr(e,t){const n=t.type===xe.EOF?O.openElementsLeftAfterEof:O.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=N.IN_HEAD,e._processToken(t)}function cA(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.BODY:{e._insertElement(t,V.HTML),e.framesetOk=!1,e.insertionMode=N.IN_BODY;break}case d.FRAMESET:{e._insertElement(t,V.HTML),e.insertionMode=N.IN_FRAMESET;break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{e._err(t,O.abandonedHeadElementChild),e.openElements.push(e.headElement,d.HEAD),en(e,t),e.openElements.remove(e.headElement);break}case d.HEAD:{e._err(t,O.misplacedStartTagForHeadElement);break}default:Xr(e,t)}}function lA(e,t){switch(t.tagID){case d.BODY:case d.HTML:case d.BR:{Xr(e,t);break}case d.TEMPLATE:{rr(e,t);break}default:e._err(t,O.endTagWithoutMatchingOpenElement)}}function Xr(e,t){e._insertFakeElement(R.BODY,d.BODY),e.insertionMode=N.IN_BODY,Aa(e,t)}function Aa(e,t){switch(t.type){case xe.CHARACTER:{J1(e,t);break}case xe.WHITESPACE_CHARACTER:{Q1(e,t);break}case xe.COMMENT:{Vi(e,t);break}case xe.START_TAG:{pt(e,t);break}case xe.END_TAG:{Sa(e,t);break}case xe.EOF:{rd(e,t);break}}}function Q1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function J1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function dA(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function fA(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function hA(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,V.HTML),e.insertionMode=N.IN_FRAMESET)}function pA(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML)}function mA(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Ui.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,V.HTML)}function gA(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function bA(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML),n||(e.formElement=e.openElements.current))}function _A(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const u=e.openElements.tagIDs[r];if(n===d.LI&&u===d.LI||(n===d.DD||n===d.DT)&&(u===d.DD||u===d.DT)){e.openElements.generateImpliedEndTagsWithExclusion(u),e.openElements.popUntilTagNamePopped(u);break}if(u!==d.ADDRESS&&u!==d.DIV&&u!==d.P&&e._isSpecialElement(e.openElements.items[r],u))break}e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML)}function xA(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML),e.tokenizer.state=Ge.PLAINTEXT}function CA(e,t){e.openElements.hasInScope(d.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.framesetOk=!1}function EA(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);n&&(ws(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function TA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function yA(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(d.NOBR)&&(ws(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,V.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function kA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function AA(e,t){e.treeAdapter.getDocumentMode(e.document)!==zt.QUIRKS&&e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML),e.framesetOk=!1,e.insertionMode=N.IN_TABLE}function ed(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,V.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function td(e){const t=$1(e,Kn.TYPE);return t!=null&&t.toLowerCase()===$k}function SA(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,V.HTML),td(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function IA(e,t){e._appendElement(t,V.HTML),t.ackSelfClosing=!0}function NA(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._appendElement(t,V.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function vA(e,t){t.tagName=R.IMG,t.tagID=d.IMG,ed(e,t)}function wA(e,t){e._insertElement(t,V.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ge.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=N.TEXT}function DA(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ge.RAWTEXT)}function LA(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ge.RAWTEXT)}function Vc(e,t){e._switchToTextParsing(t,Ge.RAWTEXT)}function PA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===N.IN_TABLE||e.insertionMode===N.IN_CAPTION||e.insertionMode===N.IN_TABLE_BODY||e.insertionMode===N.IN_ROW||e.insertionMode===N.IN_CELL?N.IN_SELECT_IN_TABLE:N.IN_SELECT}function RA(e,t){e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML)}function OA(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,V.HTML)}function MA(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(d.RTC),e._insertElement(t,V.HTML)}function FA(e,t){e._reconstructActiveFormattingElements(),G1(t),vs(t),t.selfClosing?e._appendElement(t,V.MATHML):e._insertElement(t,V.MATHML),t.ackSelfClosing=!0}function BA(e,t){e._reconstructActiveFormattingElements(),X1(t),vs(t),t.selfClosing?e._appendElement(t,V.SVG):e._insertElement(t,V.SVG),t.ackSelfClosing=!0}function $c(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML)}function pt(e,t){switch(t.tagID){case d.I:case d.S:case d.B:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.SMALL:case d.STRIKE:case d.STRONG:{TA(e,t);break}case d.A:{EA(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{mA(e,t);break}case d.P:case d.DL:case d.OL:case d.UL:case d.DIV:case d.DIR:case d.NAV:case d.MAIN:case d.MENU:case d.ASIDE:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.DETAILS:case d.ADDRESS:case d.ARTICLE:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{pA(e,t);break}case d.LI:case d.DD:case d.DT:{_A(e,t);break}case d.BR:case d.IMG:case d.WBR:case d.AREA:case d.EMBED:case d.KEYGEN:{ed(e,t);break}case d.HR:{NA(e,t);break}case d.RB:case d.RTC:{OA(e,t);break}case d.RT:case d.RP:{MA(e,t);break}case d.PRE:case d.LISTING:{gA(e,t);break}case d.XMP:{DA(e,t);break}case d.SVG:{BA(e,t);break}case d.HTML:{dA(e,t);break}case d.BASE:case d.LINK:case d.META:case d.STYLE:case d.TITLE:case d.SCRIPT:case d.BGSOUND:case d.BASEFONT:case d.TEMPLATE:{en(e,t);break}case d.BODY:{fA(e,t);break}case d.FORM:{bA(e,t);break}case d.NOBR:{yA(e,t);break}case d.MATH:{FA(e,t);break}case d.TABLE:{AA(e,t);break}case d.INPUT:{SA(e,t);break}case d.PARAM:case d.TRACK:case d.SOURCE:{IA(e,t);break}case d.IMAGE:{vA(e,t);break}case d.BUTTON:{CA(e,t);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{kA(e,t);break}case d.IFRAME:{LA(e,t);break}case d.SELECT:{PA(e,t);break}case d.OPTION:case d.OPTGROUP:{RA(e,t);break}case d.NOEMBED:case d.NOFRAMES:{Vc(e,t);break}case d.FRAMESET:{hA(e,t);break}case d.TEXTAREA:{wA(e,t);break}case d.NOSCRIPT:{e.options.scriptingEnabled?Vc(e,t):$c(e,t);break}case d.PLAINTEXT:{xA(e,t);break}case d.COL:case d.TH:case d.TD:case d.TR:case d.HEAD:case d.FRAME:case d.TBODY:case d.TFOOT:case d.THEAD:case d.CAPTION:case d.COLGROUP:break;default:$c(e,t)}}function jA(e,t){if(e.openElements.hasInScope(d.BODY)&&(e.insertionMode=N.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function HA(e,t){e.openElements.hasInScope(d.BODY)&&(e.insertionMode=N.AFTER_BODY,dd(e,t))}function UA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function VA(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(d.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(d.FORM):n&&e.openElements.remove(n))}function $A(e){e.openElements.hasInButtonScope(d.P)||e._insertFakeElement(R.P,d.P),e._closePElement()}function zA(e){e.openElements.hasInListItemScope(d.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(d.LI),e.openElements.popUntilTagNamePopped(d.LI))}function qA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function ZA(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function WA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function YA(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(R.BR,d.BR),e.openElements.pop(),e.framesetOk=!1}function nd(e,t){const n=t.tagName,r=t.tagID;for(let u=e.openElements.stackTop;u>0;u--){const a=e.openElements.items[u],i=e.openElements.tagIDs[u];if(r===i&&(r!==d.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=u&&e.openElements.shortenToLength(u);break}if(e._isSpecialElement(a,i))break}}function Sa(e,t){switch(t.tagID){case d.A:case d.B:case d.I:case d.S:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.NOBR:case d.SMALL:case d.STRIKE:case d.STRONG:{ws(e,t);break}case d.P:{$A(e);break}case d.DL:case d.UL:case d.OL:case d.DIR:case d.DIV:case d.NAV:case d.PRE:case d.MAIN:case d.MENU:case d.ASIDE:case d.BUTTON:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.ADDRESS:case d.ARTICLE:case d.DETAILS:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.LISTING:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{UA(e,t);break}case d.LI:{zA(e);break}case d.DD:case d.DT:{qA(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{ZA(e);break}case d.BR:{YA(e);break}case d.BODY:{jA(e,t);break}case d.HTML:{HA(e,t);break}case d.FORM:{VA(e);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{WA(e,t);break}case d.TEMPLATE:{rr(e,t);break}default:nd(e,t)}}function rd(e,t){e.tmplInsertionModeStack.length>0?ld(e,t):Ds(e,t)}function GA(e,t){var n;t.tagID===d.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function XA(e,t){e._err(t,O.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function di(e,t){if(e.openElements.currentTagId!==void 0&&K1.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=N.IN_TABLE_TEXT,t.type){case xe.CHARACTER:{ad(e,t);break}case xe.WHITESPACE_CHARACTER:{ud(e,t);break}}else _u(e,t)}function KA(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,V.HTML),e.insertionMode=N.IN_CAPTION}function QA(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,V.HTML),e.insertionMode=N.IN_COLUMN_GROUP}function JA(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.COLGROUP,d.COLGROUP),e.insertionMode=N.IN_COLUMN_GROUP,Ls(e,t)}function eS(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,V.HTML),e.insertionMode=N.IN_TABLE_BODY}function tS(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.TBODY,d.TBODY),e.insertionMode=N.IN_TABLE_BODY,Ia(e,t)}function nS(e,t){e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function rS(e,t){td(t)?e._appendElement(t,V.HTML):_u(e,t),t.ackSelfClosing=!0}function uS(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,V.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Er(e,t){switch(t.tagID){case d.TD:case d.TH:case d.TR:{tS(e,t);break}case d.STYLE:case d.SCRIPT:case d.TEMPLATE:{en(e,t);break}case d.COL:{JA(e,t);break}case d.FORM:{uS(e,t);break}case d.TABLE:{nS(e,t);break}case d.TBODY:case d.TFOOT:case d.THEAD:{eS(e,t);break}case d.INPUT:{rS(e,t);break}case d.CAPTION:{KA(e,t);break}case d.COLGROUP:{QA(e,t);break}default:_u(e,t)}}function au(e,t){switch(t.tagID){case d.TABLE:{e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode());break}case d.TEMPLATE:{rr(e,t);break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:_u(e,t)}}function _u(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Aa(e,t),e.fosterParentingEnabled=n}function ud(e,t){e.pendingCharacterTokens.push(t)}function ad(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Br(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)_u(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const id=new Set([d.CAPTION,d.COL,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]);function aS(e,t){const n=t.tagID;id.has(n)?e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=N.IN_TABLE,Er(e,t)):pt(e,t)}function iS(e,t){const n=t.tagID;switch(n){case d.CAPTION:case d.TABLE:{e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=N.IN_TABLE,n===d.TABLE&&au(e,t));break}case d.BODY:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:Sa(e,t)}}function Ls(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.COL:{e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case d.TEMPLATE:{en(e,t);break}default:Ju(e,t)}}function sS(e,t){switch(t.tagID){case d.COLGROUP:{e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=N.IN_TABLE);break}case d.TEMPLATE:{rr(e,t);break}case d.COL:break;default:Ju(e,t)}}function Ju(e,t){e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=N.IN_TABLE,e._processToken(t))}function Ia(e,t){switch(t.tagID){case d.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,V.HTML),e.insertionMode=N.IN_ROW;break}case d.TH:case d.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(R.TR,d.TR),e.insertionMode=N.IN_ROW,Na(e,t);break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE,Er(e,t));break}default:Er(e,t)}}function $i(e,t){const n=t.tagID;switch(t.tagID){case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE);break}case d.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE,au(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:case d.TR:break;default:au(e,t)}}function Na(e,t){switch(t.tagID){case d.TH:case d.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,V.HTML),e.insertionMode=N.IN_CELL,e.activeFormattingElements.insertMarker();break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE_BODY,Ia(e,t));break}default:Er(e,t)}}function sd(e,t){switch(t.tagID){case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE_BODY);break}case d.TABLE:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE_BODY,$i(e,t));break}case d.TBODY:case d.TFOOT:case d.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(d.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE_BODY,$i(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:break;default:au(e,t)}}function oS(e,t){const n=t.tagID;id.has(n)?(e.openElements.hasInTableScope(d.TD)||e.openElements.hasInTableScope(d.TH))&&(e._closeTableCell(),Na(e,t)):pt(e,t)}function cS(e,t){const n=t.tagID;switch(n){case d.TD:case d.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=N.IN_ROW);break}case d.TABLE:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),sd(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:break;default:Sa(e,t)}}function od(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._insertElement(t,V.HTML);break}case d.OPTGROUP:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._insertElement(t,V.HTML);break}case d.HR:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case d.INPUT:case d.KEYGEN:case d.TEXTAREA:case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),t.tagID!==d.SELECT&&e._processStartTag(t));break}case d.SCRIPT:case d.TEMPLATE:{en(e,t);break}}}function cd(e,t){switch(t.tagID){case d.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===d.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===d.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop();break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop();break}case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode());break}case d.TEMPLATE:{rr(e,t);break}}}function lS(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e._processStartTag(t)):od(e,t)}function dS(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e.onEndTag(t)):cd(e,t)}function fS(e,t){switch(t.tagID){case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{en(e,t);break}case d.CAPTION:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.tmplInsertionModeStack[0]=N.IN_TABLE,e.insertionMode=N.IN_TABLE,Er(e,t);break}case d.COL:{e.tmplInsertionModeStack[0]=N.IN_COLUMN_GROUP,e.insertionMode=N.IN_COLUMN_GROUP,Ls(e,t);break}case d.TR:{e.tmplInsertionModeStack[0]=N.IN_TABLE_BODY,e.insertionMode=N.IN_TABLE_BODY,Ia(e,t);break}case d.TD:case d.TH:{e.tmplInsertionModeStack[0]=N.IN_ROW,e.insertionMode=N.IN_ROW,Na(e,t);break}default:e.tmplInsertionModeStack[0]=N.IN_BODY,e.insertionMode=N.IN_BODY,pt(e,t)}}function hS(e,t){t.tagID===d.TEMPLATE&&rr(e,t)}function ld(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ds(e,t)}function pS(e,t){t.tagID===d.HTML?pt(e,t):ea(e,t)}function dd(e,t){var n;if(t.tagID===d.HTML){if(e.fragmentContext||(e.insertionMode=N.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===d.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else ea(e,t)}function ea(e,t){e.insertionMode=N.IN_BODY,Aa(e,t)}function mS(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.FRAMESET:{e._insertElement(t,V.HTML);break}case d.FRAME:{e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case d.NOFRAMES:{en(e,t);break}}}function gS(e,t){t.tagID===d.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==d.FRAMESET&&(e.insertionMode=N.AFTER_FRAMESET))}function bS(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.NOFRAMES:{en(e,t);break}}}function _S(e,t){t.tagID===d.HTML&&(e.insertionMode=N.AFTER_AFTER_FRAMESET)}function xS(e,t){t.tagID===d.HTML?pt(e,t):zu(e,t)}function zu(e,t){e.insertionMode=N.IN_BODY,Aa(e,t)}function CS(e,t){switch(t.tagID){case d.HTML:{pt(e,t);break}case d.NOFRAMES:{en(e,t);break}}}function ES(e,t){t.chars=$e,e._insertCharacters(t)}function TS(e,t){e._insertCharacters(t),e.framesetOk=!1}function fd(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==V.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function yS(e,t){if(Bk(t))fd(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===V.MATHML?G1(t):r===V.SVG&&(jk(t),X1(t)),vs(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function kS(e,t){if(t.tagID===d.P||t.tagID===d.BR){fd(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===V.HTML){e._endTagOutsideForeignContent(t);break}const u=e.treeAdapter.getTagName(r);if(u.toLowerCase()===t.tagName){t.tagName=u,e.openElements.shortenToLength(n);break}}}R.AREA,R.BASE,R.BASEFONT,R.BGSOUND,R.BR,R.COL,R.EMBED,R.FRAME,R.HR,R.IMG,R.INPUT,R.KEYGEN,R.LINK,R.META,R.PARAM,R.SOURCE,R.TRACK,R.WBR;const AS=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,SS=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),zc={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function hd(e,t){const n=MS(e),r=i1("type",{handlers:{root:IS,element:NS,text:vS,comment:md,doctype:wS,raw:LS},unknown:PS}),u={parser:n?new Uc(zc):Uc.getFragmentParser(void 0,zc),handle(o){r(o,u)},stitches:!1,options:t||{}};r(e,u),Dr(u,fn());const a=n?u.parser.document:u.parser.getFragment(),i=Iy(a,{file:u.options.file});return u.stitches&&ka(i,"comment",function(o,c,l){const h=o;if(h.value.stitch&&l&&c!==void 0){const f=l.children;return f[c]=h.value.stitch,c}}),i.type==="root"&&i.children.length===1&&i.children[0].type===e.type?i.children[0]:i}function pd(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function IS(e,t){pd(e.children,t)}function NS(e,t){RS(e,t),pd(e.children,t),OS(e,t)}function vS(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:xe.CHARACTER,chars:e.value,location:xu(e)};Dr(t,fn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function wS(e,t){const n={type:xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:xu(e)};Dr(t,fn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function DS(e,t){t.stitches=!0;const n=FS(e);if("children"in e&&"children"in n){const r=hd({type:"root",children:e.children},t.options);n.children=r.children}md({type:"comment",value:{stitch:n}},t)}function md(e,t){const n=e.value,r={type:xe.COMMENT,data:n,location:xu(e)};Dr(t,fn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function LS(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,gd(t,fn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(AS,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function PS(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))DS(n,t);else{let r="";throw SS.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Dr(e,t){gd(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ge.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function gd(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function RS(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ge.PLAINTEXT)return;Dr(t,fn(e));const r=t.parser.openElements.current;let u="namespaceURI"in r?r.namespaceURI:Xn.html;u===Xn.html&&n==="svg"&&(u=Xn.svg);const a=Vy({...e,children:[]},{space:u===Xn.svg?"svg":"html"}),i={type:xe.START_TAG,tagName:n,tagID:wr(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:xu(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function OS(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Xy.includes(n)||t.parser.tokenizer.state===Ge.PLAINTEXT)return;Dr(t,_a(e));const r={type:xe.END_TAG,tagName:n,tagID:wr(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:xu(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ge.RCDATA||t.parser.tokenizer.state===Ge.RAWTEXT||t.parser.tokenizer.state===Ge.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ge.DATA)}function MS(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function xu(e){const t=fn(e)||{line:void 0,column:void 0,offset:void 0},n=_a(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function FS(e){return"children"in e?Cr({...e,children:[]}):Cr(e)}function bd(e){return function(t,n){return hd(t,{...e,file:n})}}const Ps=()=>{const{shopTerms:e}=b.useStorefrontStore(),{isAntistock:t}=b.useGeneralStore();return!(e!=null&&e.showTermsOfServiceOnProduct)||!(e!=null&&e.termsOfService)?null:s.jsxs("div",{className:Rr.container,children:[s.jsx("div",{className:Rr.icon,children:s.jsx(w.Icon,{name:"FileCloud",fill:"var(--text-secondary)"})}),t?s.jsx(la,{text:e.termsOfService}):s.jsx(Ts,{remarkPlugins:[S1],rehypePlugins:[bd],className:Rr.text,components:{a:({node:n,...r})=>s.jsx("a",{...r,target:"_blank",rel:"noopener noreferrer",className:Rr.link,id:"md"}),p:({node:n,...r})=>s.jsx("p",{...r,className:Rr.text,id:"md"})},children:e==null?void 0:e.termsOfService})]})},BS="_securedBySsl_1ng38_2",jS="_text_1ng38_9",fi={securedBySsl:BS,text:jS},Rs=({isAntistock:e})=>s.jsxs("div",{className:fi.securedBySsl,children:[s.jsx("div",{className:fi.iconWrapper,children:s.jsx(w.Icon,{name:"ShieldCheck",fill:"var(--text-secondary)"})}),s.jsx("p",{className:fi.text,id:"md",children:e?"Your data is secured by extended validation SSL certificates (256-bit encryption).":"Your data is secured by extended validation SSL certificates (256-bit encryption). This complies with the strongest payment security standard available today."})]}),HS="_container_152ix_1",US="_header_152ix_7",VS="_backButton_152ix_13",$S="_title_152ix_22",zS="_cards_152ix_28",qS="_card_152ix_28",ZS="_selected_152ix_46",WS="_prioritySelected_152ix_50",YS="_price_152ix_51",GS="_description_152ix_61",Ut={container:HS,header:US,backButton:VS,title:$S,cards:zS,card:qS,selected:ZS,prioritySelected:WS,price:YS,description:GS},qc=(e,t,n)=>e+n*t/100,XS=e=>{if(!e)return!0;try{const t=JSON.parse(e);if(t.blocks&&Array.isArray(t.blocks))return!t.blocks.some(n=>n.text?n.text.replace(/[\s\u00A0\u2000-\u200F\u2028-\u202F\u205F-\u206F\u3000\u3164]/g,"").length>0:!1)}catch{return e.replace(/[\s\u00A0\u2000-\u200F\u2028-\u202F\u205F-\u206F\u3000\u3164]/g,"").length===0}return!1},_d=({config:e,totalAmount:t,selected:n,onSelect:r,onBack:u,formatter:a})=>{if(!e)return null;const{priorityReplacement:i,standardReplacement:o}=e,c=!!(i!=null&&i.enabled),l=!!(o!=null&&o.enabled),f=[{key:"PRIORITY",title:(i==null?void 0:i.name)||"Priority Replacement",desc:(i==null?void 0:i.description)||"",price:qc((i==null?void 0:i.fixedFee)||0,(i==null?void 0:i.feePercentage)||0,t),isPriority:!0,visible:c&&(!l||l)},{key:"STANDARD",title:(o==null?void 0:o.name)||"Standard Replacement",desc:(o==null?void 0:o.description)||"",price:qc((o==null?void 0:o.fixedFee)||0,(o==null?void 0:o.feePercentage)||0,t),isPriority:!1,visible:c&&l?!0:l},{key:"NONE",title:"No Replacements",desc:s.jsxs(s.Fragment,{children:[s.jsx("p",{children:"• No guaranteed refunds or replacements."}),s.jsx("p",{children:"• No priority support."}),s.jsx("p",{children:"• No dedicated buyer resolution team."})]}),price:0,isPriority:!1,visible:c&&!l}].filter(m=>m.visible);return s.jsxs("div",{className:Ut.container,children:[s.jsxs("div",{className:Ut.header,children:[s.jsx("button",{type:"button",className:Ut.backButton,onClick:u,"aria-label":"Back to payment methods",children:"←"}),s.jsx("h4",{className:Ut.title,children:"Protect Your Checkout"})]}),s.jsx("div",{className:Ut.cards,children:f.map(m=>s.jsxs("div",{className:b.clx(Ut.card,{[Ut.selected]:n===m.key,[Ut.prioritySelected]:n==="PRIORITY"&&m.isPriority}),onClick:()=>r(m.key),role:"button",tabIndex:0,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&r(m.key)},children:[s.jsx("div",{className:Ut.title,children:m.title}),s.jsx("div",{className:Ut.price,children:a.format(m.price)}),typeof m.desc=="string"?!XS(m.desc)&&s.jsx("div",{className:Ut.description,children:s.jsx(la,{text:m.desc})}):s.jsx("div",{className:Ut.description,children:m.desc})]},m.key))})]})},xd=({getPossibleGateways:e,setGateway:t,getDiscordSettings:n,cart:r,products:u,submitCart:a,reset:i,setCustomFieldsToCart:o,totalAndDiscount:c,setDiscordSocialConnectId:l,setPaymentMethod:h,isAntistock:f})=>{var Pe;const m=P.useMemo(()=>n(),[]),[p,g]=P.useState([]),{balance:x,setBalance:C}=b.useCustomerDashboardStore(),{token:_}=b.useStorefrontStore(),{general:v}=b.useGeneralStore(),{executeRecaptcha:k}=ou(),{discordInfo:D}=b.useDiscordStore(),{customerEmail:S,setCustomerEmail:I,setUsePriorityReplacement:M,setReplacementConfig:q}=b.useCartStore(),U=D!=null&&D.authorized?D.id:void 0,L=b.useNavigate(),j=P.useMemo(()=>e(),[r.parts]),[F,Q]=P.useState(null),[ae,ee]=P.useState(!1),[he,Ee]=P.useState(null),je=!!((Pe=F==null?void 0:F.priorityReplacement)!=null&&Pe.enabled),ke=ae&&je,[E,Z]=P.useState(!1),{setIsOpen:ne}=b.useModalStore(),{notifications:y,setNotifications:z}=b.useNotificationStore();P.useEffect(()=>{const Te=Us(r.parts,u).map(G=>G.type===Dn.Checkbox?{...G,value:String(G.defaultValue)}:G);g([...Te])},[]),P.useEffect(()=>{const H=Us(r.parts,u);g(Te=>{const G=new Map(Te.map(K=>[K.name,K]));return H.map(K=>{const Fe=G.get(K.name);return Fe&&Fe.value?{...K,value:Fe.value}:K.type===Dn.Checkbox?{...K,value:String(K.defaultValue)}:K})})},[r.parts,u]),P.useEffect(()=>{_&&(async()=>{const Te=await aa();C(Te)})()},[_]);function re(H){return H&&/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(H)}const J=()=>{const H=[];return p.forEach(Te=>{var G;Te.required&&!((G=Te.value)!=null&&G.toString().trim())&&H.push({message:`Field "${Te.name}" is required.`,status:"error",id:b.v4()})}),H.length>0?(z([...y,...H]),!1):!0},ie=async H=>{var Fe,tt,ot,Re;if(H.stopPropagation(),r.gateway==="Balance"&&!_){ne(!0),Z(!0);return}if(!J())return;const Te=!!(F&&((Fe=F.priorityReplacement)!=null&&Fe.enabled));if(Te&&!ke){ee(!0),he===null&&((tt=F==null?void 0:F.priorityReplacement)!=null&&tt.enabled)&&(Ee("PRIORITY"),M(!0));return}Te||(ot=F==null?void 0:F.standardReplacement)!=null&&ot.enabled&&!((Re=F==null?void 0:F.priorityReplacement)!=null&&Re.enabled)&&(he===null&&Ee("STANDARD"),M(!1));const G=Object.fromEntries(p.map(Ne=>[Ne.name,Ne.value||""]));o({...G}),U&&m.isEnabled&&l(U);const K=await k();if(K){const Ne=await a(K),Ct=JSON.parse(localStorage.getItem("orders")||"{}");if(Object.keys(Ct).length>10){const mt=Date.now()-864e5;Object.keys(Ct).forEach(jt=>{Ct[jt].createdAt<=mt&&delete Ct[jt]})}"order"in Ne?Ct[Ne.order.id]={createdAt:Date.now(),fullAccessToken:Ne.order.fullAccessToken}:Ct[Ne.id]={createdAt:Date.now(),fullAccessToken:Ne.fullAccessToken},localStorage.setItem("orders",JSON.stringify(Ct)),L(`/orders/${"order"in Ne?Ne.order.id:Ne.id}/${"order"in Ne?Ne.order.fullAccessToken:Ne.fullAccessToken}`),setTimeout(()=>i(),2e3)}};P.useEffect(()=>{const H=[...j.availableGateways,...j.requiresSignInGateways];if(!H.length)return;let Te=!1;return(async()=>{try{const{data:G}=await Xc(H);if(Te)return;let K=null;Array.isArray(G)||(G&&G.replacement?K=G.replacement:((G==null?void 0:G.priorityReplacement)!==void 0||(G==null?void 0:G.standardReplacement)!==void 0)&&(K={priorityReplacement:G.priorityReplacement,standardReplacement:G.standardReplacement})),Q(K),q(K)}catch{}})(),()=>{Te=!0}},[j.availableGateways.join(","),j.requiresSignInGateways.join(",")]),P.useEffect(()=>{var G,K;if(!F)return;const H=!!((G=F.priorityReplacement)!=null&&G.enabled),Te=!!((K=F.standardReplacement)!=null&&K.enabled);!H&&Te&&(Ee("STANDARD"),M(!1),ee(!1))},[F]);const te=H=>{Ee(H),M(H==="PRIORITY"?!0:H==="STANDARD"?!1:void 0)},oe=P.useMemo(()=>{const H=r.parts[0];if(!H)return"USD";const Te=u.find(K=>K.id===H.productId),G=Te==null?void 0:Te.variants.find(K=>K.id===H.productVariantId);if(G!=null&&G.gateways&&r.gateway){const K=G.gateways.find(Fe=>Fe.name===r.gateway&&Fe.overrodePrice);if(K!=null&&K.overrodePrice)return K.overrodePrice.currency}return(G==null?void 0:G.price.currency)||"USD"},[r.parts,r.gateway,u]),ce=P.useMemo(()=>new Intl.NumberFormat("en-US",{style:"currency",currency:oe}),[oe]);return s.jsxs("div",{className:gt.checkoutOperational,style:f?{borderLeft:"1px solid var(--border-secondary)"}:void 0,children:[s.jsxs("div",{className:`${gt.innerContainer} ${f?gt.innerContainerAntistock:""}`,children:[f&&!ke?s.jsx("h4",{style:{fontSize:"var(--input-label-size)",color:"var(--text-secondary)",paddingBottom:"12px",fontWeight:"400"},children:"Select Payment Method"}):null,r.parts.length>0&&!ke&&s.jsx(os,{possibleGateways:j,setGateway:t,setPaymentMethod:h,balance:x,totalAndDiscount:c,onSignInClick:()=>{Z(!0),ne(!0)},isAntistock:f}),ke?s.jsx("div",{style:{marginTop:"12px"},children:s.jsx(_d,{config:F,totalAmount:c.totalWithDiscount??c.total,selected:he,onSelect:te,onBack:()=>ee(!1),formatter:ce})}):null,!ke&&s.jsx("div",{className:b.clx(gt.paymentMethodsSection,{[gt.antistock]:f,[gt.paymentMethodsSectionAntistock]:f}),children:s.jsx(w.Input,{placeholder:"your@email.com",value:S||"",onChange:H=>I(H),disabled:!!_,label:"Email Address"})}),!ke&&s.jsx(h0,{customFields:p,setCustomFields:g}),m.isEnabled&&!ke&&s.jsxs("div",{className:gt.socialConnectSection,children:[s.jsx("p",{className:gt.socialConnectLabel,id:"md",children:"Social Connect"}),s.jsx("div",{className:gt.socialConnectContent,children:s.jsx(m0,{customerEmail:S||""})})]}),s.jsxs("div",{className:`${gt.continueButton} ${f?gt.continueButtonAntistock:""}`,children:[s.jsx(w.Button,{onClick:ie,disabled:!r.gateway||!re(S||"")||m.isRequired&&!(D!=null&&D.authorized),className:gt.button,children:"Continue to Checkout"}),ke?s.jsxs("div",{style:{marginTop:"1rem",display:"flex",alignItems:"center",gap:"8px"},children:[s.jsx("div",{className:gt.iconWrapper,children:s.jsx(w.Icon,{name:"Shield",fill:"var(--text-secondary)"})}),s.jsxs("p",{style:{color:"var(--text-secondary)",fontSize:"14px"},children:["Protected by ",(v==null?void 0:v.info.name)||"Shop"," Buyer Protection"]})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ps,{}),s.jsx(Rs,{isAntistock:f})]})]}),!ke&&s.jsx(Hn,{className:`${gt.checkoutFooter} ${f?gt.checkoutFooterAntistock:""}`})]}),E&&s.jsx(w.Modal,{close:()=>Z(!1),children:s.jsx(g0,{setIsOpen:Z})})]})},KS="_bottomSheet_1a6cu_1",QS="_title_1a6cu_8",JS="_contentTitle_1a6cu_12",eI="_contentText_1a6cu_16",tI="_discordMessageTitle_1a6cu_20",nI="_content_1a6cu_12",rI="_section_1a6cu_27",uI="_copyButton_1a6cu_32",aI="_scrollableBox_1a6cu_37",iI="_scrollableBoxAntistock_1a6cu_47",sI="_discordMessage_1a6cu_20",oI="_link_1a6cu_61",cI="_buttonGroup_1a6cu_68",lI="_buttonWrapper_1a6cu_80",dI="_modal_1a6cu_84",fI="_modalAntistock_1a6cu_91",hI="_header_1a6cu_96",pI="_copyButtonAntistock_1a6cu_104",nt={bottomSheet:KS,title:QS,contentTitle:JS,contentText:eI,discordMessageTitle:tI,content:nI,section:rI,copyButton:uI,scrollableBox:aI,scrollableBoxAntistock:iI,discordMessage:sI,link:oI,buttonGroup:cI,buttonWrapper:lI,modal:dI,modalAntistock:fI,header:hI,copyButtonAntistock:pI},Cd=({setIsOpen:e,deliveryConfiguration:t})=>{const n=Jn(),r=t.type===ve.Discord,{setIsOpen:u}=b.useModalStore(),{isAntistock:a}=b.useGeneralStore(),i=t.type===ve.Serial?t.deliveryItems.map(c=>c.serialKey).join(`
109
+ `):t.deliveryItems[0].textData,o=()=>{u(!1),a?e(!1):setTimeout(()=>{e(!1)},300)};return s.jsxs("div",{className:b.clx(nt.modal,{[nt.modalAntistock]:a}),onClick:c=>c.stopPropagation(),children:[s.jsxs("div",{className:nt.header,children:[s.jsx("h3",{id:"h3",className:nt.title,children:a?"View Content":"Thank you for the purchase!"}),s.jsx(w.Icon,{name:"X",hoverable:!0,onClick:o,fill:"var(--text-primary)"})]}),s.jsxs("div",{className:nt.bottomSheet,children:[s.jsx("div",{className:nt.content,children:r?s.jsx("div",{className:nt.discordMessage,children:s.jsx("p",{className:nt.discordMessageTitle,id:"md",children:"Discord role has been granted"})}):s.jsxs("div",{children:[s.jsxs("div",{className:nt.section,children:[!a&&s.jsx("p",{className:nt.contentTitle,id:"md",children:"Content"}),!a&&s.jsxs(w.Button,{className:nt.copyButton,type:"Secondary",onClick:()=>n(i),children:[s.jsx(w.Icon,{name:"Copy"}),"Copy to Clipboard"]})]}),s.jsx("div",{className:b.clx(nt.scrollableBox,{[nt.scrollableBoxAntistock]:a}),children:s.jsx("p",{className:nt.contentText,id:"md",children:a?s.jsx(la,{text:i}):s.jsx(Ts,{remarkPlugins:[S1],rehypePlugins:[bd],components:{a:({node:c,...l})=>s.jsx("a",{...l,target:"_blank",rel:"noopener noreferrer",className:nt.link})},children:i})})})]})}),a&&s.jsxs(w.Button,{className:nt.copyButtonAntistock,type:"Secondary",onClick:()=>n(i),style:{display:"flex",alignItems:"center",gap:"5px"},children:[s.jsx(w.Icon,{name:"Copy"}),"Copy All"]}),!a&&s.jsx("div",{className:nt.buttonGroup,children:s.jsx("div",{className:nt.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:o,children:"Close"})})})]})]})},mI="_mt1_1l62z_1",gI="_notifyBlock_1l62z_13",bI="_notifyHeader_1l62z_19",_I="_notifyContent_1l62z_25",xI="_buttonBlock_1l62z_30",CI="_imageBlock_1l62z_34",EI="_imageContainer_1l62z_42",TI="_sectionBlock_1l62z_54",yI="_sectionTitle_1l62z_61",kI="_sectionSubtitle_1l62z_64",AI="_inputContainer_1l62z_69",Qt={mt1:mI,notifyBlock:gI,notifyHeader:bI,notifyContent:_I,buttonBlock:xI,imageBlock:CI,imageContainer:EI,sectionBlock:TI,sectionTitle:yI,sectionSubtitle:kI,inputContainer:AI},SI=({props:e})=>{const t=Jn();return s.jsx("div",{className:Qt.mt1,children:s.jsxs("div",{className:Qt.inputContainer,children:[s.jsx(w.Input,{value:e.text,disabled:!0,onChange:()=>{}}),e.shownCopyButton&&s.jsx(w.Button,{type:"Secondary",onClick:()=>t(e.text),children:s.jsx(w.Icon,{name:"Copy"})})]})})},II=({props:e})=>s.jsx(w.Button,{className:Qt.buttonBlock,onClick:()=>window.open(e.url,"_blank","noopener"),children:e.text}),NI=({props:e})=>s.jsx("div",{className:Qt.imageBlock,children:s.jsx("div",{className:Qt.imageContainer,children:s.jsx("img",{src:e.src,alt:""})})}),vI=({props:e})=>s.jsxs("div",{className:Qt.notifyBlock,children:[s.jsxs("div",{className:Qt.notifyHeader,children:[s.jsx(w.Icon,{name:"Info",width:24,height:24,fill:"var(--text-secondary)"}),s.jsx("p",{children:e.heading})]}),s.jsx("p",{className:Qt.notifyContent,children:e.content})]}),wI=({props:e})=>{var t;return s.jsxs("div",{className:Qt.sectionBlock,children:[s.jsx("p",{className:Qt.sectionTitle,children:e.title}),s.jsx("span",{className:Qt.sectionSubtitle,children:e.subTitle}),(t=e.children)==null?void 0:t.map((n,r)=>s.jsx(ta,{block:n},r))]})},ta=({block:e})=>{switch(e.type){case"Section":return s.jsx(wI,{...e});case"ReadOnlyTextInput":return s.jsx(SI,{...e});case"Notify":return s.jsx(vI,{...e});case"Button":return s.jsx(II,{...e});case"Image":return s.jsx(NI,{...e});default:return null}},DI="_chargeStatusBlock_12swd_4",LI="_isAntistock_12swd_13",PI="_chargeStatusIcon_12swd_19",RI="_chargeStatusTitle_12swd_27",OI="_chargeStatusDescription_12swd_33",MI="_pickUpButton_12swd_39",FI="_actionButtons_12swd_49",BI="_actionButton_12swd_49",St={chargeStatusBlock:DI,isAntistock:LI,chargeStatusIcon:PI,chargeStatusTitle:RI,chargeStatusDescription:OI,pickUpButton:MI,actionButtons:FI,actionButton:BI},Gn={[ge.Paid]:"Payment Successful",[ge.Pending]:"Payment Pending",[ge.Expired]:"Payment Expired",[ge.Cancelled]:"Payment Cancelled",[ge.NotPaid]:"Payment Failed",[ge.Refunded]:"Payment Refunded"},Ed={[ge.Paid]:"Your payment has successfully been processed. Tap on the button below to be redirected back to our website.",[ge.Pending]:"Your payment is currently pending. We recommend checking back shortly for confirmation.",[ge.Expired]:"Your payment has expired due to the payment not being sent in time. If you already sent the payment, please contact us below.",[ge.Cancelled]:"You canceled the warrant. If there are any problems, please contact support",[ge.NotPaid]:"Your payment has expired due to the payment not being sent in time. If you already sent the payment, please contact us below.",[ge.Refunded]:"Your payment has been refunded. Please check your payment method for confirmation."},Td=()=>({[ge.Paid]:s.jsx("div",{className:`${St.chargeStatusIcon}`,children:s.jsx(w.Icon,{name:"Check",fill:"var(--text-success)"})}),[ge.Pending]:s.jsx("div",{className:St.chargeStatusIcon,children:s.jsx(w.Icon,{name:"Clock",fill:"var(--text-warning)"})}),[ge.Expired]:s.jsx("div",{className:St.chargeStatusIcon,children:s.jsx(w.Icon,{name:"XCircle",fill:"var(--text-action)"})}),[ge.Cancelled]:s.jsx("div",{className:St.chargeStatusIcon,children:s.jsx(w.Icon,{name:"XCircle",fill:"var(--text-action)"})}),[ge.NotPaid]:s.jsx("div",{className:St.chargeStatusIcon,children:s.jsx(w.Icon,{name:"XCircle",fill:"var(--text-action)"})}),[ge.Refunded]:s.jsx("div",{className:St.chargeStatusIcon,children:s.jsx(w.Icon,{name:"XCircle",fill:"var(--text-warning)"})})}),yd=({charge:e})=>{const t=e.status,n=b.useNavigate(),{shopDomain:r}=b.useStorefrontStore(),{isAntistock:u}=b.useGeneralStore(),a=P.useRef(),[i,o]=b.useSearchParams(),c=()=>{var h,f;if(!((h=e.order)!=null&&h.id))return;const l=i.get("redirectRoute");if((e==null?void 0:e.status)===ge.Paid&&e.redirectUrl&&!a.current){const p=JSON.parse(localStorage.getItem("orders")||"{}")[((f=e==null?void 0:e.order)==null?void 0:f.id)||""];p?window.open(p.fullAccessToken?`${e.redirectUrl}/${p.fullAccessToken}`:`${e.redirectUrl}`,"_self"):window.open(e.redirectUrl,"_self")}(e==null?void 0:e.status)===ge.Paid&&a.current&&n(a.current,{replace:!0}),l&&a&&(a.current=l,i.delete("redirectRoute"),o(i))};return s.jsxs("div",{className:b.clx(St.chargeStatusBlock,{[St.isAntistock]:u}),children:[Td()[t],s.jsx("h2",{className:St.chargeStatusTitle,children:Gn[t]}),s.jsx("p",{className:St.chargeStatusDescription,children:Ed[t]}),t===ge.Paid?s.jsx("div",{className:St.pickUpButton,style:u?{justifyContent:"flex-start"}:void 0,children:s.jsxs(w.Button,{onClick:c,style:{width:"100%",maxWidth:"250px",display:"flex",alignItems:"center",gap:"5px"},type:"Secondary",children:[s.jsx(w.Icon,{name:"ArrowLineUpRight"}),u?"View Order":"Pick up Order"]})}):s.jsxs("div",{className:St.actionButtons,children:[s.jsx("div",{className:St.actionButton,children:s.jsxs(w.Button,{type:"Secondary",onClick:()=>window.open(`https://${r}`),style:{width:"100%",display:"flex",alignItems:"center",gap:"5px"},children:[s.jsx(w.Icon,{name:"ArrowLineUpRight"}),"Visit Website"]})}),s.jsx("div",{className:St.actionButton,children:s.jsxs(w.Button,{type:"Secondary",style:{width:"100%",display:"flex",alignItems:"center",gap:"5px"},onClick:()=>{u?window.open(`https://${r}/support`):n("/contact")},children:[s.jsx(w.Icon,{name:"ChatsTeardrop"}),"Contact Support"]})})]})]})},jI="_bottomSheet_1x4sq_1",HI="_content_1x4sq_8",UI="_agreementList_1x4sq_11",VI="_agreementItem_1x4sq_16",$I="_warning_1x4sq_23",zI="_buttonGroup_1x4sq_31",qI="_buttonWrapper_1x4sq_41",ZI="_fullWidthButton_1x4sq_44",WI="_modal_1x4sq_48",YI="_header_1x4sq_55",Vt={bottomSheet:jI,content:HI,agreementList:UI,agreementItem:VI,warning:$I,buttonGroup:zI,buttonWrapper:qI,fullWidthButton:ZI,modal:WI,header:YI},kd=({setIsOpen:e,price:t})=>{const[n,r]=P.useState({agreeToSendAsFF:!1,agreeToSend:!1,agreeToNotAddNote:!1}),{setIsOpen:u}=b.useModalStore(),a=()=>{u(!1),setTimeout(()=>{e(!1)},300)};return s.jsxs("div",{className:Vt.modal,onClick:i=>i.stopPropagation(),children:[s.jsxs("div",{className:Vt.header,children:[s.jsx("h3",{id:"h3",children:"Note"}),s.jsx(w.Icon,{name:"X",hoverable:!0,onClick:a,fill:"var(--text-primary)"})]}),s.jsxs("div",{className:Vt.bottomSheet,children:[s.jsxs("div",{className:Vt.content,children:[s.jsxs("div",{className:Vt.agreementList,children:[s.jsxs("label",{className:Vt.agreementItem,children:[s.jsx(w.CheckboxSettings,{value:n.agreeToSendAsFF,onChange:i=>r({...n,agreeToSendAsFF:i})}),s.jsx("p",{children:"I agree to send the payment as friends & family"})]}),s.jsxs("label",{className:Vt.agreementItem,children:[s.jsx(w.CheckboxSettings,{value:n.agreeToSend,onChange:i=>r({...n,agreeToSend:i})}),s.jsxs("p",{children:["I agree to send the payment of ",b.formatPrice(t)," ",t.currency]})]}),s.jsxs("label",{className:Vt.agreementItem,children:[s.jsx(w.CheckboxSettings,{value:n.agreeToNotAddNote,onChange:i=>r({...n,agreeToNotAddNote:i})}),s.jsx("p",{children:"I agree to not add a note to this payment"})]})]}),s.jsx("div",{className:Vt.warning,children:s.jsxs("p",{children:["Please note that you are required to send the exact payment of ",b.formatPrice(t)," ",t.currency,". If you were to send any amount over or below, your funds will be lost."]})})]}),s.jsxs("div",{className:Vt.buttonGroup,children:[s.jsx("div",{className:Vt.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",children:s.jsx("span",{className:"text-[var(--text-secondary)]",children:"Cancel"})})}),s.jsx("div",{className:Vt.fullWidthButton,children:s.jsx(w.Button,{type:"Primary",disabled:!(n.agreeToSendAsFF&&n.agreeToNotAddNote&&n.agreeToSend),onClick:a,children:"Continue to Payment"})})]})]})]})},GI="_chargeItemsContainer_vynct_5",XI="_chargeItemsInner_vynct_18",KI="_productsContainer_vynct_25",QI="_antistockLayout_vynct_40",JI="_mainContentAntistock_vynct_53",eN="_desktopTrackPayment_vynct_64",tN="_desktopFooter_vynct_73",nN="_footerContainerAntistock_vynct_94",rN="_chargeHeader_vynct_107",uN="_chargeTitle_vynct_115",aN="_chargeDescription_vynct_121",iN="_copyButton_vynct_127",sN="_productsList_vynct_139",oN="_footerContainer_vynct_94",Tt={chargeItemsContainer:GI,chargeItemsInner:XI,productsContainer:KI,antistockLayout:QI,mainContentAntistock:JI,desktopTrackPayment:eN,desktopFooter:tN,footerContainerAntistock:nN,chargeHeader:rN,chargeTitle:uN,chargeDescription:aN,copyButton:iN,productsList:sN,footerContainer:oN},Ad=({charge:e})=>{var i;const t=Jn(),{isAntistock:n}=b.useGeneralStore(),r=(e==null?void 0:e.price.currency)||"USD",u=new Intl.NumberFormat("en-US",{style:"currency",currency:r}),a=P.useMemo(()=>{var o;return((o=e==null?void 0:e.order)==null?void 0:o.partOrders.map(c=>{var l,h,f,m;return{id:(c==null?void 0:c.id)||0,image:c.productWithVariant.image,name:(()=>{var x,C;const p=((x=c.productWithVariant)==null?void 0:x.name)||"",g=((C=c.productWithVariant)==null?void 0:C.variantName)||"";return!p&&!g?"":!g||p===g?p:p?`${p} (${g})`:g})(),description:"",price:{quantity:c.quantity,amount:((l=c.productWithVariant)==null?void 0:l.price.amount)||0,currency:(h=c.productWithVariant)==null?void 0:h.price.currency},subscriptionSettings:(f=e.order)!=null&&f.subscriptionOrderId?(m=c.productWithVariant)==null?void 0:m.subscriptionSettings:null}}))||[]},[e]);return s.jsx("div",{className:Tt.chargeItemsContainer,children:s.jsxs("div",{className:Tt.chargeItemsInner,children:[s.jsx(ma,{expiresAt:e==null?void 0:e.expiresAt}),s.jsxs("div",{className:`${Tt.productsContainer} ${n?Tt.antistockLayout:""}`,children:[(e==null?void 0:e.name)&&s.jsxs("header",{className:Tt.chargeHeader,children:[s.jsxs("div",{children:[s.jsx("h1",{className:Tt.chargeTitle,id:"h5",children:e.name}),e.description&&s.jsx("p",{className:Tt.chargeDescription,id:"md",children:e.description})]}),((i=e.order)==null?void 0:i.id)&&!n&&s.jsxs(w.Button,{type:"Secondary",className:Tt.copyButton,onClick:()=>{var o;return t(((o=e.order)==null?void 0:o.id)||"")},children:[s.jsx(w.Icon,{name:"Copy"}),"Copy Order ID"]})]}),s.jsxs("div",{className:n?Tt.mainContentAntistock:"",style:n?void 0:{flex:1},children:[!!a.length&&s.jsx("div",{className:Tt.productsList,children:a.map(o=>s.jsx(ga,{product:o},o.id))}),s.jsx(kr,{formatter:u,coupon:null,total:(e==null?void 0:e.price.amount)||0,discount:0,totalWithDiscount:(e==null?void 0:e.price.amount)||0,isShowSubtotal:!1}),n&&e&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:Tt.desktopTrackPayment,children:s.jsx(va,{timeline:e.timeline})}),s.jsx(Hn,{className:Tt.desktopFooter})]})]}),!n&&s.jsx(Hn,{className:`${Tt.footerContainer} ${n?Tt.footerContainerAntistock:""}`})]})]})})},cN="_checkoutOrderMainData_hqf60_1",lN="_orderDetailRow_hqf60_6",dN="_chargeIdRow_hqf60_16",fN="_detailLabel_hqf60_25",hN="_detailValue_hqf60_29",pN="_chargeIdContainer_hqf60_33",mN="_chargeId_hqf60_16",gN="_copyIcon_hqf60_51",Xe={checkoutOrderMainData:cN,orderDetailRow:lN,chargeIdRow:dN,detailLabel:fN,detailValue:hN,chargeIdContainer:pN,chargeId:mN,copyIcon:gN},Os=({lastUpdate:e,invoiceId:t,email:n,paymentType:r,orderId:u})=>{const a=Jn(),[i,o]=P.useState(null),c=i==null?void 0:i.find(h=>h.name===r);P.useEffect(()=>{i||(async()=>{if(!r)return;const m=await cu([r]);o(m)})()},[r,i]);const l=h=>{const f=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],m=h.getDate().toString().padStart(2,"0"),p=f[h.getMonth()],g=h.getFullYear(),x=h.getHours(),C=h.getMinutes().toString().padStart(2,"0"),_=h.getSeconds().toString().padStart(2,"0"),v=x>=12?"PM":"AM",k=(x%12||12).toString().padStart(2,"0");return`${p} ${m}, ${g} at ${k}:${C}:${_} ${v}`};return s.jsxs("div",{className:Xe.checkoutOrderMainData,children:[s.jsxs("div",{className:Xe.orderDetailRow,children:[s.jsx("p",{className:Xe.detailLabel,id:"md",children:"Last Updated"}),s.jsx("p",{className:Xe.detailValue,id:"md",children:l(new Date(e))})]}),r&&s.jsxs("div",{className:Xe.orderDetailRow,children:[s.jsx("p",{className:Xe.detailLabel,id:"md",children:"Payment Type"}),s.jsx("p",{className:Xe.detailValue,id:"md",children:c==null?void 0:c.displayName})]}),s.jsxs("div",{className:Xe.orderDetailRow,children:[s.jsx("p",{className:Xe.detailLabel,id:"md",children:"Email"}),s.jsx("p",{className:Xe.detailValue,id:"md",children:n})]}),t&&s.jsxs("div",{className:Xe.chargeIdRow,children:[s.jsx("p",{className:Xe.detailLabel,id:"md",children:"Charge ID"}),s.jsxs("div",{className:Xe.chargeIdContainer,children:[s.jsx("p",{className:Xe.chargeId,id:"md",children:t}),s.jsx("div",{className:Xe.copyIcon,onClick:()=>a(t),children:s.jsx(w.Icon,{name:"Copy"})})]})]}),u&&s.jsxs("div",{className:Xe.chargeIdRow,children:[s.jsx("p",{className:Xe.detailLabel,id:"md",children:"Order ID"}),s.jsxs("div",{className:Xe.chargeIdContainer,children:[s.jsx("p",{className:Xe.chargeId,id:"md",children:u}),s.jsx("div",{className:Xe.copyIcon,onClick:()=>a(u),children:s.jsx(w.Icon,{name:"Copy"})})]})]})]})},bN="_bottomSheet_1yai1_1",_N="_formContainer_1yai1_8",xN="_error_1yai1_14",CN="_buttonGroup_1yai1_18",EN="_buttonWrapper_1yai1_28",TN="_fullWidthButton_1yai1_31",yN="_modal_1yai1_41",kN="_header_1yai1_48",Sn={bottomSheet:bN,formContainer:_N,error:xN,buttonGroup:CN,buttonWrapper:EN,fullWidthButton:TN,modal:yN,header:kN},Sd=({chargeId:e,setIsOpen:t})=>{const[n,r]=P.useState(""),[u,a]=P.useState(""),{setIsOpen:i}=b.useModalStore(),o=h=>{try{return new URL(h),!0}catch{return!1}},c=async h=>{if(h.preventDefault(),!n){a("The link field cannot be empty.");return}if(!o(n)){a("Please enter a valid URL");return}await Gd({url:n},e)&&(alert("CashApp successfully verified"),t(!1))},l=()=>{i(!1),setTimeout(()=>{t(!1)},300)};return s.jsxs("div",{className:Sn.modal,onClick:h=>h.stopPropagation(),children:[s.jsxs("div",{className:Sn.header,children:[s.jsx("h3",{id:"h3",children:"CashApp Verify"}),s.jsx(w.Icon,{name:"X",hoverable:!0,onClick:l,fill:"var(--text-primary)"})]}),s.jsx("form",{onSubmit:c,children:s.jsxs("div",{className:Sn.bottomSheet,children:[s.jsx("div",{className:Sn.formContainer,children:s.jsxs("div",{children:[s.jsx(w.Input,{value:n,onChange:h=>{r(h),a("")},label:"Enter Cashapp Link",placeholder:"https://cash.app/payments/0000"}),u&&s.jsx("p",{className:Sn.error,children:u})]})}),s.jsxs("div",{className:Sn.buttonGroup,children:[s.jsx("div",{className:Sn.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:l,children:"Cancel"})}),s.jsx("div",{className:Sn.fullWidthButton,children:s.jsx(w.Button,{type:"Primary",children:"Verify"})})]})]})})]})},AN="_trackPaymentContainer_fk3b6_1",SN="_trackPaymentBox_fk3b6_5",IN="_trackPaymentBoxActive_fk3b6_18",NN="_trackPaymentHeader_fk3b6_23",vN="_trackPaymentTitle_fk3b6_27",wN="_trackPaymentTimeline_fk3b6_33",DN="_trackPaymentItem_fk3b6_42",LN="_itemHeader_fk3b6_48",PN="_itemDate_fk3b6_55",RN="_itemMessage_fk3b6_59",ON="_trackPaymentToggle_fk3b6_64",MN="_trackPaymentToggleContent_fk3b6_75",FN="_trackPaymentToggleText_fk3b6_81",BN="_antistock_fk3b6_88",bt={trackPaymentContainer:AN,trackPaymentBox:SN,trackPaymentBoxActive:IN,trackPaymentHeader:NN,trackPaymentTitle:vN,trackPaymentTimeline:wN,trackPaymentItem:DN,itemHeader:LN,itemDate:PN,itemMessage:RN,trackPaymentToggle:ON,trackPaymentToggleContent:MN,trackPaymentToggleText:FN,antistock:BN},Zc=(e,t)=>{const n=e.getDate().toString().padStart(2,"0"),r=(e.getMonth()+1).toString().padStart(2,"0"),u=e.getFullYear(),a=e.getHours(),i=e.getMinutes().toString().padStart(2,"0"),o=e.getSeconds().toString().padStart(2,"0"),c=a>=12?"PM":"AM",l=(a%12||12).toString().padStart(2,"0");return t==="dd.MM.yyyy"?`${n}.${r}.${u}`:t==="hh:mm:ss aa"?`${l}:${i}:${o} ${c}`:""},jN={[ge.Paid]:{displayName:Gn[ge.Paid],displayMessage:"The invoice has been completed and the product has been delivered.",type:"success"},[ge.Pending]:{displayName:Gn[ge.Pending],displayMessage:"The invoice has been created and we are now waiting to receive the payment.",type:"warning"},[ge.Expired]:{displayName:Gn[ge.Expired],displayMessage:"Your payment has expired due to the payment not being sent in time.",type:"error"},[ge.Cancelled]:{displayName:Gn[ge.Cancelled],displayMessage:"The order has been canceled. The payment was not sent within the time limit.",type:"error"},[ge.NotPaid]:{displayName:"New",displayMessage:"The charge has been created and is awaiting payment.",type:"success"},[ge.Refunded]:{displayName:Gn[ge.Refunded],displayMessage:"Your order was refunded. Please check your payment method for confirmation.",type:"warning"}},HN=({date:e,chargeStatus:t})=>(console.log(t),s.jsxs("div",{className:bt.trackPaymentItem,children:[s.jsxs("div",{className:bt.itemHeader,children:[s.jsx("p",{className:bt.itemDate,id:"md-bold",children:Zc(new Date(e),"dd.MM.yyyy")}),s.jsx("p",{className:bt.itemTime,id:"md",children:Zc(new Date(e),"hh:mm:ss aa")})]}),s.jsx("p",{className:bt.itemMessage,id:"md",children:jN[t].displayMessage})]})),va=({timeline:e,className:t})=>{const[n,r]=P.useState(!1),{isAntistock:u}=b.useGeneralStore();return s.jsxs("div",{className:b.clx(bt.trackPaymentContainer,t,{[bt.antistock]:u}),children:[s.jsxs("div",{className:`${bt.trackPaymentBox} ${n?bt.trackPaymentBoxActive:""}`,style:u?{border:"1px solid var(--border-secondary)"}:void 0,children:[s.jsx("header",{className:bt.trackPaymentHeader,children:s.jsx("h2",{className:bt.trackPaymentTitle,id:"h4",children:"Track Payment"})}),s.jsx("div",{className:bt.trackPaymentTimeline,children:Object.keys(e).map(a=>s.jsx(HN,{date:e[a],chargeStatus:a},a))})]}),s.jsxs("div",{className:bt.trackPaymentToggle,onClick:()=>r(!n),style:u?{padding:"1.25rem",border:"1px solid var(--border-secondary)",borderRadius:"var(--border-radius)"}:void 0,children:[s.jsxs("div",{className:bt.trackPaymentToggleContent,children:[u?null:s.jsx(w.Icon,{name:"MagnifyingGlass",fill:"var(--text-secondary)"}),s.jsx("p",{className:bt.trackPaymentToggleText,id:"h5",children:"Track Payment"})]}),s.jsx(w.Icon,{name:"CaretRight",fill:"var(--text-primary)",width:16,height:16})]})]})},UN="_dateTime_1dnnn_11",VN="_tableItem_1dnnn_25",$N="_status_1dnnn_29",zN="_statusInProgress_1dnnn_38",qN="_statusText_1dnnn_42",ZN="_statusIcon_1dnnn_46",WN="_statusInProgressText_1dnnn_52",YN="_statusInProgressIcon_1dnnn_57",GN="_message_1dnnn_63",_t={dateTime:UN,tableItem:VN,status:$N,statusInProgress:zN,statusText:qN,statusIcon:ZN,statusInProgressText:WN,statusInProgressIcon:YN,message:GN},Id=({item:e})=>{const[t,n]=b.extractDateAndTime(e.createdAt),r=b.useNavigate(),a=(i=>i.length>30?i.slice(0,27)+"...":i)(e.latestMessage);return s.jsxs(P.Fragment,{children:[s.jsx(at,{className:_t.tableItem,onClick:()=>r(`/ticket/${e.id}/${e.accessToken}`),children:s.jsxs("span",{id:"md",children:["#",e.id]})}),s.jsx(at,{className:b.clx(_t.message,_t.tableItem),onClick:()=>r(`/ticket/${e.id}/${e.accessToken}`),children:s.jsx("span",{id:"md",children:a})}),s.jsx(at,{className:_t.tableItem,onClick:()=>r(`/ticket/${e.id}/${e.accessToken}`),children:s.jsxs("div",{children:[s.jsx("div",{id:"md",children:t}),s.jsx("div",{className:_t.dateTime,id:"md",children:n})]})}),s.jsx(at,{className:_t.tableItem,onClick:()=>r(`/ticket/${e.id}/${e.accessToken}`),children:s.jsx(XN,{status:e.status})})]},e.id)},XN=({status:e})=>s.jsxs("div",{className:b.clx(_t.status,{[_t.statusClosed]:e==="CLOSED",[_t.statusInProgress]:e!=="CLOSED"}),children:[s.jsx("div",{className:b.clx(_t.statusIcon,{[_t.statusInProgressIcon]:e!=="CLOSED"}),children:e==="CLOSED"?s.jsx(w.Icon,{name:"CheckCircle",className:_t.statusIcon}):s.jsx(w.Icon,{name:"Clock",className:_t.statusInProgressIcon})}),s.jsx("div",{className:b.clx(_t.statusText,{[_t.statusInProgressText]:e!=="CLOSED"}),id:"md",children:e==="CLOSED"?"Closed":"In Progress"})]}),KN="_tableContainer_1eytq_1",QN="_table_1eytq_1",JN="_productInfo_1eytq_19",ev="_productImage_1eytq_26",tv="_productName_1eytq_35",nv="_expirationDate_1eytq_46",rv="_overflowItem_1eytq_51",uv="_gatewayContainer_1eytq_57",av="_gatewayImage_1eytq_62",iv="_dateTime_1eytq_67",sv="_tableLoader_1eytq_72",ov="_tableItem_1eytq_81",lt={tableContainer:KN,table:QN,productInfo:JN,productImage:ev,productName:tv,expirationDate:nv,overflowItem:rv,gatewayContainer:uv,gatewayImage:av,dateTime:iv,tableLoader:sv,tableItem:ov},cv="_badge_1oac8_1",lv="_active_1oac8_12",dv="_awaitingPayment_1oac8_17",fv="_cancelled_1oac8_22",hv="_changedGateway_1oac8_27",pv="_expired_1oac8_32",mv="_rial_1oac8_37",gv="_pastDue_1oac8_42",bv="_replaced_1oac8_47",Cn={badge:cv,active:lv,awaitingPayment:dv,cancelled:fv,changedGateway:hv,expired:pv,rial:mv,pastDue:gv,replaced:bv},_v=()=>({[xn.ACTIVE]:{icon:s.jsx(w.Icon,{name:"CheckCircle"}),title:"Active",className:Cn.active},[xn.AWAITING_PAYMENT]:{icon:s.jsx(w.Icon,{name:"Clock"}),title:"Awaiting Payment",className:Cn.awaitingPayment},[xn.CANCELLED]:{icon:s.jsx(w.Icon,{name:"XCircle"}),title:"Cancelled",className:Cn.cancelled},[xn.CHANGED_GATEWAY]:{icon:s.jsx(w.Icon,{name:"Warning"}),title:"Upgraded",className:Cn.changedGateway},[xn.EXPIRED]:{icon:s.jsx(w.Icon,{name:"XCircle"}),title:"Expired",className:Cn.expired},[xn.RIAL]:{icon:s.jsx(w.Icon,{name:"Clock"}),title:"Active",className:Cn.rial},[xn.PAST_DUE]:{icon:s.jsx(w.Icon,{name:"Clock"}),title:"Trial",className:Cn.pastDue},[xn.REPLACED]:{icon:s.jsx(w.Icon,{name:"Warning"}),title:"Replaced",className:Cn.replaced}}),Ms=({status:e})=>{const t=_v()[e];return s.jsxs("div",{className:`${Cn.badge} ${t.className}`,children:[t.icon,s.jsx("p",{id:"md",children:t.title})]})},xv=(e,t)=>{const n=t.find(r=>r.name===e);return n?s.jsxs("div",{className:lt.gatewayContainer,children:[s.jsx("img",{alt:n.displayName,src:b.convertCfImageIdToUrl(n.logoCfImageId,"100"),className:lt.gatewayImage}),s.jsx("div",{children:n.displayName})]}):null},Cv=({item:e,gatewaysDetail:t})=>{const[n,r]=b.extractDateAndTime(e.createdAt),[u]=b.extractDateAndTime(e.activeTo||""),a=Jn();return s.jsxs(P.Fragment,{children:[s.jsx(at,{children:s.jsxs("div",{className:lt.productInfo,children:[s.jsx("div",{className:lt.productImage,children:s.jsx(w.Icon,{name:"Image",width:20,height:20,fill:"var(--text-secondary)"})}),s.jsxs("div",{children:[s.jsx(b.NavLink,{to:`/subscriptions/${e.id}/${e.accessToken}`,className:lt.productName,id:"md",children:e.productName}),s.jsx("p",{className:lt.expirationDate,children:e.activeTo&&`expires at ${u}`})]})]})}),s.jsx(at,{className:lt.overflowItem,onClick:()=>a(e.id),children:e.id}),s.jsx(at,{children:s.jsx(Ms,{status:e.status})}),s.jsx(at,{children:b.formatPrice(e.price)}),s.jsx(at,{children:xv(e.gatewayName,t)}),s.jsx(at,{children:s.jsxs("div",{children:[s.jsx("div",{id:"md",children:n}),s.jsx("div",{className:lt.dateTime,id:"md",children:r})]})})]},e.id)},Nd=({subscriptions:e,gatewaysDetail:t,totalCount:n,page:r,setPage:u})=>{const i=!(!(e!=null&&e.length)||!t);return s.jsxs("div",{className:lt.tableContainer,children:[s.jsxs(pa,{className:lt.table,children:[s.jsx(It,{className:lt.tableItem,children:"Product name"}),s.jsx(It,{className:lt.tableItem,children:"ID"}),s.jsx(It,{className:lt.tableItem,children:"Status"}),s.jsx(It,{className:lt.tableItem,children:"Value"}),s.jsx(It,{className:lt.tableItem,children:"Payment"}),s.jsx(It,{className:lt.tableItem,children:"Date"}),i&&(e==null?void 0:e.map(o=>s.jsx(Cv,{item:o,gatewaysDetail:t},o.id)))]}),!i&&s.jsx("div",{className:lt.tableLoader,children:s.jsx(w.Loader,{})}),i&&s.jsx(hu,{currentPage:r,totalCount:n,onPageChange:u})]})},Ev="_pageLoading_1rj3k_2",Tv="_title_1rj3k_11",yv="_description_1rj3k_17",hi={pageLoading:Ev,title:Tv,description:yv},kv=({description:e,title:t})=>s.jsxs("div",{className:hi.pageLoading,children:[s.jsx("div",{children:s.jsx(w.Loader,{})}),s.jsx("h1",{className:hi.title,children:t}),s.jsx("p",{className:hi.description,children:e})]}),Av="_container_1opbn_1",Sv="_productDetails_1opbn_8",Iv="_imageContainer_1opbn_14",Nv="_image_1opbn_14",vv="_textContainer_1opbn_32",wv="_header_1opbn_40",Dv="_title_1opbn_46",Lv="_price_1opbn_53",Pv="_badgeContainer_1opbn_57",Rv="_description_1opbn_61",nn={container:Av,productDetails:Sv,imageContainer:Iv,image:Nv,textContainer:vv,header:wv,title:Dv,price:Lv,badgeContainer:Pv,description:Rv},vd=({subscription:e})=>s.jsxs("div",{className:nn.container,children:[s.jsxs("div",{className:nn.productDetails,children:[s.jsx("div",{className:nn.imageContainer,children:e!=null&&e.image?s.jsx("img",{className:nn.image,src:b.convertCfImageIdToUrl(e.image.cfId),alt:e==null?void 0:e.name}):s.jsx(w.Icon,{name:"Image"})}),s.jsxs("div",{className:nn.textContainer,children:[s.jsx("div",{className:nn.header,children:s.jsx("h2",{className:nn.title,children:e.name})}),s.jsxs("p",{className:nn.price,children:[b.formatPrice(e.price)," / ",e.recurringInterval]})]}),s.jsx("div",{className:nn.badgeContainer,children:s.jsx(Ms,{status:e.status})})]}),e.description&&s.jsx(Ts,{className:nn.description,children:e.description})]}),Ov="_card_69liy_1",Mv="_price_69liy_10",Fv="_interval_69liy_17",Bv="_name_69liy_22",jv="_description_69liy_28",Hv="_currentPlan_69liy_32",Uv="_selectButton_69liy_45",Vv="_progressSection_69liy_50",$v="_progressLabel_69liy_54",zv="_bottomSheet_69liy_60",qv="_title_69liy_69",Zv="_typeSelector_69liy_80",Wv="_typeOption_69liy_90",Yv="_active_69liy_100",Gv="_saveTag_69liy_108",Xv="_planSelector_69liy_117",Kv="_modal_69liy_127",Qv="_inactive_69liy_148",Jv="_notMounted_69liy_151",ew="_closeButton_69liy_157",We={card:Ov,price:Mv,interval:Fv,name:Bv,description:jv,currentPlan:Hv,selectButton:Uv,progressSection:Vv,progressLabel:$v,bottomSheet:zv,title:qv,typeSelector:Zv,typeOption:Wv,active:Yv,saveTag:Gv,planSelector:Xv,modal:Kv,inactive:Qv,notMounted:Jv,closeButton:ew},tw=({variant:e,onSelect:t,isCurrent:n})=>{const r=e.subscriptionSettings.recurringIntervalDays===30?"month":e.subscriptionSettings.recurringIntervalDays===365?"year":"period",u=e.subscriptionSettings.price.amount.toFixed(2),a=e.subscriptionSettings.recurringIntervalDays,i=10;return s.jsxs("div",{className:We.card,onClick:t,children:[s.jsxs("h2",{className:We.price,children:["$",u," ",s.jsxs("span",{className:We.interval,children:["/ ",r]})]}),s.jsx("h3",{className:We.name,children:e.name}),e.description&&s.jsx("p",{className:We.description,children:e.description}),n?s.jsxs("div",{className:We.currentPlan,children:[s.jsx(w.Icon,{name:"Check"}),"Your current Plan"]}):s.jsx(w.Button,{type:"Secondary",className:We.selectButton,children:"Select"}),n&&s.jsxs("div",{className:We.progressSection,children:[s.jsx(l0,{percent:i/a*100,disablePercentLabel:!0}),s.jsxs("p",{className:We.progressLabel,children:["Used: ",i," of ",a," days"]})]})]})},wd=({isOpen:e,setIsOpen:t,subscription:n})=>{const[r,u]=P.useState(null),[a,i]=P.useState(null),[o,c]=P.useState(null),{id:l,accessToken:h}=b.useParams(),[f,m]=P.useState(!1),[p,g]=P.useState(!1),{setIsOpen:x}=b.useModalStore();P.useEffect(()=>{e&&m(!0)},[e]);const C=()=>{t(!1)},[_,v]=P.useState(null);P.useEffect(()=>{l&&h&&(async()=>{if(l&&h){const{data:I}=await b2({id:l,accessToken:h});v(I)}})()},[l,h]),P.useEffect(()=>{var S;if(_!=null&&_.data.types[0]){const I=(S=_.data.types.flatMap(M=>M.productVariants).find(M=>M.data.id===(n==null?void 0:n.variantId)))==null?void 0:S.data;I&&(c(I),i(I))}},[_,n]),P.useEffect(()=>{_!=null&&_.data.types[0]&&u(_==null?void 0:_.data.types[0])},[_==null?void 0:_.data.types]);const k=S=>{u(S),i(null)},D=S=>{i(S),x(!0),g(!0)};return s.jsxs("div",{className:b.clx(We.modal,{[We.active]:e,[We.inactive]:!e&&f,[We.notMounted]:!f}),onClick:S=>S.stopPropagation(),children:[s.jsx(w.Icon,{name:"X",onClick:C,hoverable:!0,className:We.closeButton,fill:"var(--text-primary)"}),s.jsxs("div",{className:We.bottomSheet,children:[s.jsx("h3",{id:"h3",className:We.title,children:"Change Plan"}),s.jsx("p",{className:We.description,children:_==null?void 0:_.data.description}),s.jsx("div",{className:We.typeSelector,children:_==null?void 0:_.data.types.map(S=>s.jsxs("div",{className:b.clx(We.typeOption,{[We.active]:(r==null?void 0:r.id)===S.id}),onClick:()=>k(S),children:[S.name,S.name==="Yearly"&&s.jsx("span",{className:We.saveTag,children:"Save %"})]},S.id))}),r&&s.jsx("div",{className:We.planSelector,children:r.productVariants.map(S=>s.jsx(tw,{variant:S.data,isSelected:(a==null?void 0:a.id)===S.data.id,isCurrent:(o==null?void 0:o.id)===S.data.id,onSelect:()=>D(S.data)},S.data.id))})]}),p&&a&&n&&s.jsx(w.Modal,{close:()=>{g(!1)},children:s.jsx(Od,{setIsOpen:g,selectedVariant:a,subscription:n})})]})},nw="_container_nb625_1",rw="_title_nb625_11",uw="_subtitle_nb625_16",aw="_info_nb625_20",Bu={container:nw,title:rw,subtitle:uw,info:aw},Dd=()=>{const{subscription:e}=b.useSubscriptionStore(),[t,n]=b.extractDateAndTime((e==null?void 0:e.activeTo)||""),[r,u]=P.useState(!1),{setIsOpen:a}=b.useModalStore();return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:Bu.container,children:[s.jsxs("div",{className:Bu.info,children:[s.jsx("p",{className:Bu.title,children:"Expiration Date"}),s.jsxs("p",{className:Bu.subtitle,children:[t," at ",n]})]}),s.jsx(w.Button,{type:"Special",onClick:i=>{i.stopPropagation(),a(!0),u(!0)},children:"Extend"})]}),r&&s.jsx(w.Modal,{close:()=>u(!1),children:s.jsx(Hd,{setIsOpen:u})})]})},iw="_couponContainer_1sspa_1",sw="_iconWrapper_1sspa_10",ow="_details_1sspa_21",cw="_title_1sspa_25",lw="_progress_1sspa_29",dw="_foreverText_1sspa_34",or={couponContainer:iw,iconWrapper:sw,details:ow,title:cw,progress:lw,foreverText:dw},Ld=({coupon:e,currency:t})=>{const n=e.isFixed?b.formatPrice({amount:e.discount,currency:t}):`${e.discount}%`,r=e.initialCouponDurationForSubscriptions?b.percentageDifference(e.initialCouponDurationForSubscriptions,e.currentCouponDurationForSubscriptions||1):100;return s.jsxs("div",{className:or.couponContainer,children:[s.jsx("div",{className:or.iconWrapper,children:s.jsx(w.Icon,{name:"CheckCircle"})}),s.jsxs("div",{className:or.details,children:[s.jsxs("p",{className:or.title,children:[e.name,", ",n," discount"]}),s.jsx("div",{className:or.progress,children:s.jsx(l0,{color:"#C2C2C2",percent:r,disablePercentLabel:!0})}),s.jsx("p",{className:or.foreverText,children:"Forever discount code"})]})]})},fw="_paymentMethodContainer_1g0da_4",hw="_paymentMethodTitle_1g0da_15",pw="_activeMethod_1g0da_20",mw="_noMethod_1g0da_28",gw="_activeMethodPaymentMethod_1g0da_37",bw="_paymentMethodLogo_1g0da_47",_w="_paymentMethodNumber_1g0da_57",xw="_method_1g0da_61",Rn={paymentMethodContainer:fw,paymentMethodTitle:hw,activeMethod:pw,noMethod:mw,activeMethodPaymentMethod:gw,paymentMethodLogo:bw,paymentMethodNumber:_w,method:xw},Cw="_paymentMethods_1gev0_1",Ew="_modal_1gev0_14",Tw="_header_1gev0_28",yw="_content_1gev0_37",Zn={paymentMethods:Cw,modal:Ew,header:Tw,content:yw},kw=e=>{const{setIsLoading:t,setIsOpen:n}=e,{subscription:r,setSubscription:u}=b.useSubscriptionStore();if(!r)return null;const{id:a}=b.useParams(),i=b.useNavigate(),{notifications:o,setNotifications:c}=b.useNotificationStore(),{setPaymentMethod:l,setGateway:h,cart:f}=su(),{setIsOpen:m}=b.useModalStore();async function p(){if(g(),t(!0),a&&r){const{data:x}=await m2(a,f.gateway);x.isReconnectPaymentNeeded?i(`/charges/${x.chargeId}`):(c([...o,{status:"success",id:b.v4(),message:"Your action has been successfully completed"}]),u({...r,gatewayName:f.gateway}))}else c([...o,{status:"error",id:b.v4(),message:"Your action has been failed. Try again!"}]);t(!1)}function g(){m(!1),setTimeout(()=>{n(!1)},300)}return s.jsxs("div",{className:Zn.modal,onClick:x=>{x.stopPropagation()},children:[s.jsxs("div",{className:Zn.header,children:[s.jsx("h3",{id:"h3",className:Zn.title,children:"Choose Payment Method"}),s.jsx(w.Icon,{name:"X",onClick:g,hoverable:!0,fill:"var(--text-primary)"})]}),s.jsxs("div",{className:Zn.content,children:[(r==null?void 0:r.availableGateways)&&s.jsx(os,{possibleGateways:{availableGateways:r.availableGateways,requiresSignInGateways:r.availableGateways},setGateway:h,setPaymentMethod:l,totalAndDiscount:{total:(r==null?void 0:r.price.amount)||0,totalWithDiscount:r==null?void 0:r.price.amount},onSignInClick:()=>i("/customer-dash")}),s.jsxs("div",{className:Zn.paymentMethods,children:[s.jsx("div",{className:Zn.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:g,children:"Cancel"})}),s.jsx("div",{className:Zn.buttonWrapper,children:s.jsx(w.Button,{type:"Primary",disabled:!f.gateway,onClick:()=>p(),children:"Continue"})})]})]})]})},Aw="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20131.39%2086.9'%3e%3cdefs%3e%3cstyle%3e.a{opacity:0;}.b{fill:%23fff;}.c{fill:%23ff5f00;}.d{fill:%23eb001b;}.e{fill:%23f79e1b;}%3c/style%3e%3c/defs%3e%3ctitle%3eAsset%201%3c/title%3e%3cg%20class='a'%3e%3crect%20class='b'%20width='131.39'%20height='86.9'/%3e%3c/g%3e%3crect%20class='c'%20x='48.37'%20y='15.14'%20width='34.66'%20height='56.61'/%3e%3cpath%20class='d'%20d='M51.94,43.45a35.94,35.94,0,0,1,13.75-28.3,36,36,0,1,0,0,56.61A35.94,35.94,0,0,1,51.94,43.45Z'/%3e%3cpath%20class='e'%20d='M120.5,65.76V64.6H121v-.24h-1.19v.24h.47v1.16Zm2.31,0v-1.4h-.36l-.42,1-.42-1h-.36v1.4h.26V64.7l.39.91h.27l.39-.91v1.06Z'/%3e%3cpath%20class='e'%20d='M123.94,43.45a36,36,0,0,1-58.25,28.3,36,36,0,0,0,0-56.61,36,36,0,0,1,58.25,28.3Z'/%3e%3c/svg%3e",Pd=()=>{var g,x,C;const{subscription:e}=b.useSubscriptionStore(),{cart:t,setPaymentMethod:n}=su(),r=b.useNavigate(),[u,a]=P.useState(null),[i,o]=P.useState(!1),[c,l]=P.useState(!1),{setIsOpen:h}=b.useModalStore();if(!e)return null;const[f,m]=P.useState(e.gatewayName||t.gateway),p=t.paymentMethod;return P.useEffect(()=>{(async()=>{const v=await cu(e.availableGateways);a(v)})()},[]),P.useEffect(()=>{t.gateway!==f&&m(t.gateway)},[t.gateway]),s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:Rn.paymentMethodContainer,children:[s.jsxs("div",{children:[s.jsx("p",{className:Rn.paymentMethodTitle,children:"Active Payment Method"}),e.gatewayInfo&&Object.keys(e.gatewayInfo).length>0&&s.jsx(Sw,{gatewayInfo:e.gatewayInfo}),(!e.gatewayInfo||Object.keys(e.gatewayInfo).length===0)&&f==="Balance"&&s.jsx(is,{gateway:f,gatewayDisplayName:f,total:(e==null?void 0:e.price.amount)||0,onSignInClick:()=>r("/customer-dash")}),(!e.gatewayInfo||Object.keys(e.gatewayInfo).length===0)&&!f&&s.jsx("span",{className:Rn.noMethod,children:"Payment method is not set"}),(!e.gatewayInfo||Object.keys(e.gatewayInfo).length===0)&&f&&s.jsx("div",{className:Rn.activeMethod,children:u&&s.jsx(ss,{align:"row",gatewayLogoCfId:(g=u.find(_=>_.name===f))==null?void 0:g.logoCfImageId,gatewayDisplayName:(x=u.find(_=>_.name===f))==null?void 0:x.displayName,gateway:f,poweredByLogoCfId:(C=u.find(_=>_.name===f))==null?void 0:C.poweredByImageCfImageId,className:Rn.activeMethodPaymentMethod,selected:p===f,onSelect:_=>{n(_)}},f)})]}),s.jsx(w.Button,{type:"Special",onClick:_=>{_.stopPropagation(),h(!0),l(!0)},children:t.gateway?"Change":"Manage"})]}),c&&s.jsx(w.Modal,{close:()=>l(!1),children:s.jsx(kw,{setIsLoading:o,setIsOpen:l})})]})},Sw=({gatewayInfo:e})=>{var t,n,r,u,a;return s.jsxs("div",{className:Rn.method,children:[s.jsxs("div",{className:Rn.paymentMethodLogo,children:[((t=e.card)==null?void 0:t.brand.toLowerCase())==="visa"&&s.jsx(Kp,{}),((n=e.card)==null?void 0:n.brand.toLowerCase())==="mastercard"&&s.jsx("img",{src:Aw,alt:"",width:22}),((r=e.card)==null?void 0:r.brand.toLowerCase())!=="visa"&&((u=e.card)==null?void 0:u.brand.toLowerCase())!=="mastercard"&&s.jsx(w.Icon,{name:"CreditCard",width:22})]}),s.jsxs("p",{className:Rn.paymentMethodNumber,children:["•••• •••• •••• ",(a=e.card)==null?void 0:a.last4]})]})},Iw="_subscriptionProductContainer_83ibx_4",Nw="_subscriptionProductImage_83ibx_15",vw="_subscriptionProductInfo_83ibx_32",ww="_name_83ibx_37",Dw="_price_83ibx_40",jr={subscriptionProductContainer:Iw,subscriptionProductImage:Nw,subscriptionProductInfo:vw,name:ww,price:Dw},Rd=({subscription:e,id:t,accessToken:n})=>{const[r,u]=P.useState(!1),{setIsOpen:a}=b.useModalStore();return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:jr.subscriptionProductContainer,onClick:i=>i.stopPropagation(),children:[s.jsx("div",{className:jr.subscriptionProductImage,children:e!=null&&e.image?s.jsx("img",{src:b.convertCfImageIdToUrl(e.image.cfId)}):s.jsx(w.Icon,{name:"Image"})}),s.jsxs("div",{className:jr.subscriptionProductInfo,children:[s.jsx("div",{className:"flex items-center gap-2",children:s.jsx("h2",{className:jr.name,children:e.name})}),s.jsxs("p",{className:jr.price,children:[b.formatPrice(e.price)," / ",e.recurringInterval]})]}),s.jsx(w.Button,{type:"Special",onClick:i=>{i.preventDefault(),u(!0),a(!0)},children:"Cancel"})]}),r&&s.jsx(w.Modal,{close:()=>u(!1),children:s.jsx(Ud,{accessToken:n,id:t,isOpen:r,setIsOpen:u})})]})},Lw="_content_5ctxw_1",Pw="_selectedPlan_5ctxw_37",Rw="_planName_5ctxw_44",Ow="_description_5ctxw_48",Mw="_price_5ctxw_51",Fw="_buttonGroup_5ctxw_79",Bw="_buttonWrapper_5ctxw_84",jw="_modal_5ctxw_88",Hw="_header_5ctxw_95",Xt={content:Lw,selectedPlan:Pw,planName:Rw,description:Ow,price:Mw,buttonGroup:Fw,buttonWrapper:Bw,modal:jw,header:Hw},Od=({setIsOpen:e,selectedVariant:t,subscription:n})=>{if(!t)return null;const{setIsOpen:r}=b.useModalStore(),u=()=>{a()},a=()=>{r(!1),setTimeout(()=>{e(!1)},300)},i=(t.subscriptionSettings.compareAtPrice||t.subscriptionSettings.price).amount,o=t.subscriptionSettings.compareAtPrice?t.subscriptionSettings.compareAtPrice.amount-t.subscriptionSettings.price.amount:t.subscriptionSettings.price.amount,c=i-o,l=new Intl.NumberFormat("en-US",{style:"currency",currency:n.price.currency});return s.jsxs("div",{className:Xt.modal,children:[s.jsxs("div",{className:Xt.header,children:[s.jsx("h3",{id:"h3",children:"Choose upgrade method"}),s.jsx(w.Icon,{name:"X",hoverable:!0,onClick:()=>a(),fill:"var(--text-primary)"})]}),s.jsxs("div",{className:Xt.bottomSheet,children:[s.jsxs("div",{className:Xt.content,children:[s.jsxs("div",{className:Xt.selectedPlan,children:[s.jsx("h2",{className:Xt.planName,children:t.name}),s.jsx("p",{className:Xt.description,children:t.description}),s.jsxs("p",{className:Xt.price,children:["$",t.subscriptionSettings.price.amount.toFixed(2)," /"," ",t.subscriptionSettings.recurringIntervalDays===30?"month":"year"]})]}),s.jsx(kr,{formatter:l,coupon:null,total:c,discount:o})]}),s.jsxs("div",{className:Xt.buttonGroup,children:[s.jsx("div",{className:Xt.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:()=>a(),children:"Stay with us"})}),s.jsx("div",{className:Xt.buttonWrapper,children:s.jsxs(w.Button,{type:"Primary",onClick:u,children:["Upgrade for $",c.toFixed(2)]})})]})]})]})},Uw="_orderStatusBlock_2wo4y_2",Vw="_orderStatusBlockAntistock_2wo4y_11",$w="_iconWrapper_2wo4y_16",zw="_orderStatusTitle_2wo4y_26",qw="_orderStatusDescription_2wo4y_31",Zw="_actionButtons_2wo4y_36",Ww="_actionButton_2wo4y_36",Yw="_button_2wo4y_47",rn={orderStatusBlock:Uw,orderStatusBlockAntistock:Vw,iconWrapper:$w,orderStatusTitle:zw,orderStatusDescription:qw,actionButtons:Zw,actionButton:Ww,button:Yw},Gw={[Ce.New]:"New",[Ce.Pending]:"Order Pending",[Ce.Expired]:"Order Expired",[Ce.Cancelled]:"Order Canceled",[Ce.Failed]:"Order Failed",[Ce.FullDeliveryFailure]:"Delivery Failure",[Ce.PartiallyDelivered]:"Partial Delivery Failure",[Ce.Refunded]:"Order Refunded",[Ce.Completed]:"Order Completed"},Xw={[Ce.New]:"Your order has been created and is awaiting payment.",[Ce.Pending]:"Your order is currently pending. We recommend checking back shortly for confirmation.",[Ce.Expired]:"Your order has expired due to the payment not being sent in time. If you already sent the payment, please contact us below.",[Ce.Cancelled]:"You canceled the warrant. If there are any problems, please contact support.",[Ce.Failed]:"Your order could not be processed due to a payment or system error. Please try again or contact support.",[Ce.FullDeliveryFailure]:"Your payment was successful but the product is currently out of stock. Please contact us below to get this sorted.",[Ce.PartiallyDelivered]:"Your payment was successful but some products were out of stock. Please contact us below to get this sorted.",[Ce.Refunded]:"Your order was refunded. Please check your payment method for confirmation.",[Ce.Completed]:"Your order has successfully been processed. View your products below or check your email for additional information."},Md=()=>({[Ce.Completed]:s.jsx(w.Icon,{name:"Check",fill:"var(--text-success)"}),[Ce.Pending]:s.jsx(w.Icon,{name:"Clock",fill:"var(--text-warning)"}),[Ce.New]:s.jsx(w.Icon,{name:"Clock",fill:"var(--text-warning)"}),[Ce.Expired]:s.jsx(w.Icon,{name:"XCircle",fill:"var(--text-action)"}),[Ce.Cancelled]:s.jsx(w.Icon,{name:"XCircle",fill:"var(--text-action)"}),[Ce.Failed]:s.jsx(w.Icon,{name:"XCircle",fill:"var(--text-action)"}),[Ce.FullDeliveryFailure]:s.jsx(w.Icon,{name:"Warning",fill:"var(--text-warning)"}),[Ce.PartiallyDelivered]:s.jsx(w.Icon,{name:"WarningDiamond",fill:"var(--text-warning)"}),[Ce.Refunded]:s.jsx(w.Icon,{name:"WarningDiamond",fill:"var(--text-warning)"})}),Fd=({orderStatus:e,className:t})=>{const{shopDomain:n}=b.useStorefrontStore(),{isAntistock:r}=b.useGeneralStore(),u=b.useNavigate();return s.jsxs("div",{className:b.clx(rn.orderStatusBlock,t,{[rn.orderStatusBlockAntistock]:r}),children:[s.jsx("div",{className:rn.iconWrapper,style:r?{background:"none"}:void 0,children:Md()[e]}),s.jsx("h2",{className:rn.orderStatusTitle,children:Gw[e]}),s.jsx("p",{className:rn.orderStatusDescription,children:Xw[e]}),s.jsxs("div",{className:rn.actionButtons,children:[s.jsx("div",{className:rn.actionButton,children:s.jsxs(w.Button,{type:"Secondary",className:rn.button,onClick:()=>window.open(`https://${n}`),style:{width:"100%",display:"flex",alignItems:"center",gap:"5px"},children:[s.jsx(w.Icon,{name:"ArrowLineUpRight"}),"Visit Website"]})}),s.jsx("div",{className:rn.actionButton,children:s.jsxs(w.Button,{type:"Secondary",className:rn.button,onClick:()=>{r?window.open(`https://${n}/support`):u("/contact")},style:{width:"100%",display:"flex",alignItems:"center",gap:"5px"},children:[s.jsx(w.Icon,{name:"ChatsTeardrop"}),"Contact Support"]})})]})]})},Kw="_reviewMessage_1t8u4_1",Qw="_leaveReviewContainer_1t8u4_11",Jw="_leaveReviewTitle_1t8u4_20",pi={reviewMessage:Kw,leaveReviewContainer:Qw,leaveReviewTitle:Jw},Bd=({review:e,orderId:t,className:n})=>{const[r,u]=P.useState((e==null?void 0:e.rating)||0),[a,i]=P.useState(!1),{setIsOpen:o}=b.useModalStore(),{notifications:c,setNotifications:l}=b.useNotificationStore(),h=async f=>{e&&"accessToken"in e&&(await y2({comment:f,rating:r,tsId:b.useGetTsId()},t,e.accessToken),l([...c,{status:"success",id:b.v4(),message:"Review left successfully"}]),i(!1))};return P.useEffect(()=>{e&&r&&"accessToken"in e&&!e.rating&&(o(!0),i(!0))},[r]),e?e.rating&&"accessToken"in e?s.jsxs("div",{className:pi.reviewMessage,children:["You left a ",e.rating," star rating"]}):s.jsxs("div",{className:b.clx(pi.leaveReviewContainer,n),children:[s.jsx("p",{className:pi.leaveReviewTitle,children:"Leave a review"}),s.jsx(v8,{rating:r,setRating:u,disabled:!!e.rating||!("accessToken"in e)}),a&&s.jsx(w.Modal,{close:()=>i(!1),children:s.jsx(jd,{setIsOpen:i,onSubmit:h})})]}):null},eD="_bottomSheet_1bcyj_1",tD="_content_1bcyj_7",nD="_title_1bcyj_18",rD="_buttonGroup_1bcyj_22",uD="_buttonWrapper_1bcyj_33",aD="_modal_1bcyj_37",iD="_header_1bcyj_44",In={bottomSheet:eD,content:tD,title:nD,buttonGroup:rD,buttonWrapper:uD,modal:aD,header:iD},jd=({setIsOpen:e,onSubmit:t})=>{const[n,r]=P.useState(""),{setIsOpen:u}=b.useModalStore(),a=()=>{u(!1),setTimeout(()=>{e(!1)},300)};return s.jsxs("div",{className:In.modal,onClick:i=>i.stopPropagation(),children:[s.jsxs("div",{className:In.header,children:[s.jsx("h3",{id:"h3",className:In.title,children:"Review Description"}),s.jsx(w.Icon,{name:"X",hoverable:!0,onClick:a,fill:"var(--text-primary)"})]}),s.jsxs("div",{className:In.bottomSheet,children:[s.jsx("div",{className:In.content,children:s.jsx(w.Textarea,{placeholder:"Great product and fast checkout...",value:n,onChange:i=>r(i),label:"Describe your review in detail below"})}),s.jsxs("div",{className:In.buttonGroup,children:[s.jsx("div",{className:In.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:a,children:"Cancel"})}),s.jsx("div",{className:In.buttonWrapper,children:s.jsx(w.Button,{type:"Primary",disabled:!n,onClick:()=>{a(),t(n)},children:"Submit"})})]})]})]})},sD="_container_1idhv_1",oD="_buttonGroup_1idhv_8",cD="_buttonWrapper_1idhv_15",lD="_header_1idhv_19",dD="_content_1idhv_28",Wn={container:sD,buttonGroup:oD,buttonWrapper:cD,header:lD,content:dD},fD="_modal_1rkmj_1",hD="_modalPayment_1rkmj_7",pD="_title_1rkmj_15",mD="_description_1rkmj_20",ju={modal:fD,modalPayment:hD,title:pD,description:mD},Fs=()=>s.jsxs("div",{className:b.clx(ju.modal,ju.modalPayment),onClick:e=>e.stopPropagation(),children:[s.jsx(w.Loader,{style:{border:"4px solid var(--surface-action1)",borderLeftColor:"var(--surface-secondary)",width:"40px",height:"40px"}}),s.jsx("h2",{id:"h3",className:ju.title,children:"Processing Payment"}),s.jsx("p",{className:ju.description,children:"This payment is currently being processed. If you're here, it simply means that the payment was created but not complete."})]}),Hd=({setIsOpen:e})=>{const{subscription:t}=b.useSubscriptionStore(),{getTotalAndDiscount:n,cart:r,coupon:u}=su(),[a,i]=P.useState(1),o=b.useNavigate(),{setIsOpen:c}=b.useModalStore(),{setNotifications:l,notifications:h}=b.useNotificationStore(),[f,m]=P.useState(!1),p=P.useMemo(()=>n(),[u,r]),g=P.useMemo(()=>p.totalWithDiscount?p.total-p.totalWithDiscount:0,[p]);if(f)return s.jsx(Fs,{});const x=(t==null?void 0:t.price.currency)||"USD",C=new Intl.NumberFormat("en-US",{style:"currency",currency:x});async function _(){var k;m(!0);try{const{data:D}=await _2((t==null?void 0:t.id)||"",{});l([{id:b.v4(),message:"Order created successfully",status:"success"}]),o(`/orders/${(k=D.data)==null?void 0:k.id}/${D.data.fullAccessToken}`)}catch(D){const S=D;l([...h,{id:b.v4(),message:`Order creation failed: ${S.message}`,status:"error"}]),v()}finally{m(!1)}}function v(){c(!1),setTimeout(()=>{e(!1)},300)}return s.jsxs("div",{className:Wn.container,onClick:k=>k.stopPropagation(),children:[s.jsxs("div",{className:Wn.header,children:[s.jsx("h3",{id:"h3",className:Wn.title,children:"Extend Subscription"}),s.jsx(w.Icon,{name:"X",onClick:v,hoverable:!0,fill:"var(--text-primary)"})]}),s.jsxs("div",{className:Wn.content,children:[s.jsx(U8,{step:a,totalSteps:12,onStepChange:i,label:"How long would you like to extend your subscription for?"}),s.jsx(kr,{formatter:C,coupon:u,total:p.total,discount:g,totalWithDiscount:p.totalWithDiscount}),s.jsxs("div",{className:Wn.buttonGroup,children:[s.jsx("div",{className:Wn.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:v,children:"Cancel"})}),s.jsx("div",{className:Wn.buttonWrapper,children:s.jsx(w.Button,{type:"Primary",onClick:_,children:"Extend"})})]})]})]})},gD="_bottomSheet_uw5jb_1",bD="_content_uw5jb_7",_D="_radioGroup_uw5jb_11",xD="_confirmation_uw5jb_26",CD="_iconWrapper_uw5jb_33",ED="_title_uw5jb_42",TD="_message_uw5jb_48",yD="_buttonGroup_uw5jb_54",kD="_buttonWrapper_uw5jb_64",AD="_modal_uw5jb_68",SD="_header_uw5jb_77",et={bottomSheet:gD,content:bD,radioGroup:_D,confirmation:xD,iconWrapper:CD,title:ED,message:TD,buttonGroup:yD,buttonWrapper:kD,modal:AD,header:SD},ID={0:"Are you sure?",1:"Just making sure",2:"We're sorry to see you go"},Ud=({isOpen:e,setIsOpen:t,id:n,accessToken:r})=>{const[u,a]=P.useState(0),[i,o]=P.useState(!1),[c,l]=P.useState(""),[h,f]=P.useState(""),{setIsOpen:m}=b.useModalStore(),p=async()=>{if(!c)return;o(!0);const x=await p2(n,r,{reason:c==="Other reason"?h:c});o(!1),x&&a(2)};P.useEffect(()=>{e||(a(0),l(""),f(""))},[e]);const g=()=>{m(!1),setTimeout(()=>{t(!1)},300)};return s.jsxs("div",{className:et.modal,onClick:x=>x.stopPropagation(),children:[s.jsxs("div",{className:et.header,children:[s.jsx("h3",{id:"h3",children:ID[u]||""}),s.jsx(w.Icon,{name:"X",onClick:g,hoverable:!0,fill:"var(--text-primary)"})]}),s.jsxs("div",{className:et.content,children:[u===0&&s.jsxs("div",{className:et.bottomSheet,children:[s.jsx("p",{children:"Before you cancel your subscription can you tell us why?"}),s.jsxs("div",{className:et.radioGroup,children:[s.jsx(w.Radio,{defaultValue:c,onChange:x=>l(x),options:[{value:"Found another company",label:"Found another company"},{value:"Expensive",label:"Expensive"},{value:"Technical problems",label:"Technical problems"},{value:"Support problems",label:"Support problems"},{value:"Other reason",label:"Other reason"}],flexDirection:"column"}),c==="Other reason"&&s.jsx(w.Textarea,{value:h,onChange:x=>f(x),placeholder:"Describe the reason..."})]}),s.jsxs("div",{className:et.buttonGroup,children:[s.jsx("div",{className:et.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:g,children:"Stay with us"})}),s.jsx("div",{className:et.buttonWrapper,children:s.jsx(w.Button,{type:"Primary",onClick:()=>c&&a(1),disabled:!c,children:"Continue"})})]})]}),u===1&&s.jsxs("div",{className:et.bottomSheet,children:[s.jsx("p",{children:"You'll lose access to all of the features and content available within this subscription."}),s.jsxs("div",{className:et.buttonGroup,children:[s.jsx("div",{className:et.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:g,children:"Stay with us"})}),s.jsx("div",{className:et.buttonWrapper,children:s.jsx(w.Button,{type:"Primary",onClick:p,disabled:i,children:"Cancel it anyway"})})]})]}),u===2&&s.jsxs("div",{className:et.bottomSheet,children:[s.jsxs("div",{className:`${et.confirmation}`,children:[s.jsx("div",{className:et.iconWrapper,children:s.jsx(w.Icon,{name:"Check",fill:"var(--text-success)"})}),s.jsx("p",{className:et.title,children:"Subscription Cancelled"}),s.jsx("p",{className:et.message,children:"You'll lose access to all of the features and content available within this subscription."})]}),s.jsx("div",{className:et.buttonGroup,children:s.jsx("div",{className:et.buttonWrapper,children:s.jsx(w.Button,{type:"Secondary",onClick:g,children:"Close"})})})]})]})]})},ND=Object.freeze(Object.defineProperty({__proto__:null,ActivePaymentMethod:Pd,ActiveSubscriptionProduct:Rd,Auth:us,AuthLogin:t0,AuthModal:g0,AuthRequestOtp:e0,CHARGE_STATUS_DESCRIPTION:Ed,CHARGE_STATUS_DISPLAY_NAME:Gn,CancelSubscription:Ud,CashAppVerify:Sd,ChangeSubscriptionPlan:wd,ChargeBlocksRenderer:ta,ChargeItems:Ad,ChargeStatusBlock:yd,CheckoutBalancePaymentMethod:is,CheckoutFooter:Hn,CheckoutHeader:ma,CheckoutItems:f0,CheckoutOperational:xd,CheckoutOrderMainData:Os,CheckoutPaymentMethod:ss,CheckoutPrices:kr,CheckoutProduct:ga,ChoosePlanUpgradeMethod:Od,ConnectDiscord:m0,CustomField:p0,CustomFields:h0,CustomerDashboard:S5,LeaveAReview:Bd,NoItemsBlock:ha,OpenDelivery:Cd,OrderStatusBlock:Fd,OrdersTable:i0,PageLoading:kv,PageTitle:fa,Pagination:s0,PaginationWithRange:hu,PayPalFFNote:kd,PaymentMethods:os,ProcessingPaymentModal:Fs,ProtectYourCheckout:_d,ReferralBlock:n0,ReferralBlockInfo:u0,ReferralBlockSteps:r0,SecuredBySsl:Rs,Sidebar:Ol,SkeletonReferralBlock:a0,StatItem:kt,StatusIndicator:c0,StatusVariant:Bn,SubmitReview:jd,SubscriptionCoupon:Ld,SubscriptionExpiration:Hd,SubscriptionExpirationDate:Dd,SubscriptionProduct:vd,SubscriptionStatusBadge:Ms,SubscriptionsTable:Nd,Table:pa,TableItem:at,TableItemTitle:It,TermsOfService:Ps,TicketRow:Id,TrackPayment:va,getChargeStatusIcon:Td,getOrderStatusIcon:Md,getPaginationText:o0},Symbol.toStringTag,{value:"Module"})),vD="_chargePageContainer_1azbl_1",wD="_chargeItems_1azbl_14",DD="_mainContent_1azbl_25",LD="_contentWrapper_1azbl_44",PD="_antistockContent_1azbl_53",RD="_statusBlock_1azbl_58",OD="_statusBlockAntistock_1azbl_63",MD="_notPaidSection_1azbl_68",FD="_antistockPayNow_1azbl_82",BD="_antistockFooter_1azbl_86",jD="_antistockTrackPayment_1azbl_96",HD="_footer_1azbl_106",UD="_loaderContainer_1azbl_128",Lt={chargePageContainer:vD,chargeItems:wD,mainContent:DD,contentWrapper:LD,antistockContent:PD,statusBlock:RD,statusBlockAntistock:OD,notPaidSection:MD,antistockPayNow:FD,antistockFooter:BD,antistockTrackPayment:jD,footer:HD,loaderContainer:UD},VD=()=>{const{id:e}=b.useParams(),[t,n]=b.useSearchParams(),[r,u]=P.useState(!1),[a,i]=P.useState(),[o,c]=P.useState(!0),l=b.useNavigate(),h=P.useRef(),f=P.useRef(!1),{setIsOpen:m}=b.useModalStore(),{isAntistock:p}=b.useGeneralStore();return P.useEffect(()=>{const g=async(C,_=!1)=>{_||u(!0);const{data:v}=await k2(C);u(!1),i(v)},x=setInterval(()=>{e&&g(e,!0)},5e3);return e&&g(e),()=>{clearInterval(x)}},[]),P.useEffect(()=>{const g=setTimeout(()=>{var C;console.log("charge timeout",a);const x=t.get("redirectRoute");if((a==null?void 0:a.status)===ge.Paid&&a.redirectUrl&&!h.current){const v=JSON.parse(localStorage.getItem("orders")||"{}")[((C=a==null?void 0:a.order)==null?void 0:C.id)||""];v?window.open(v.fullAccessToken?`${a.redirectUrl}/${v.fullAccessToken}`:`${a.redirectUrl}`,"_self"):window.open(a.redirectUrl,"_self")}(a==null?void 0:a.status)===ge.Paid&&h.current&&(console.log("redirectRouteRef.current",h.current),l(h.current,{replace:!0})),x&&h&&(h.current=x,t.delete("redirectRoute"),n(t))},1e3);return()=>clearTimeout(g)},[a]),P.useEffect(()=>{((a==null?void 0:a.gateway)==="PayPalFF"||(a==null?void 0:a.gateway)==="Сashapp")&&m(!0)},[a]),P.useEffect(()=>{var g;if(a!=null&&a.displayPaymentInfo&&a.displayPaymentInfo.length===1&&a.status===ge.NotPaid&&!f.current){const x=a.displayPaymentInfo[0];x.type==="Button"&&((g=x.props)!=null&&g.url)&&(window.open(x.props.url,"_blank"),f.current=!0)}},[a==null?void 0:a.displayPaymentInfo,a==null?void 0:a.status]),r?s.jsx("div",{className:Lt.loaderContainer,children:s.jsx(w.Loader,{})}):s.jsxs("div",{className:Lt.chargePageContainer,children:[s.jsx("div",{className:Lt.chargeItems,children:s.jsx(Ad,{charge:a})}),s.jsx("div",{className:Lt.mainContent,style:p?{borderLeft:"1px solid var(--border-secondary)"}:void 0,children:s.jsxs("div",{className:b.clx(Lt.contentWrapper,{[Lt.antistockContent]:p}),children:[a&&(a==null?void 0:a.status)!==ge.NotPaid&&s.jsx(yd,{charge:a}),a&&s.jsxs("div",{className:b.clx(Lt.statusBlock,{[Lt.statusBlockAntistock]:p}),children:[s.jsx(Os,{lastUpdate:a.expiresAt,email:a.customerForCharge.email,invoiceId:a.id,paymentType:a.gateway}),p&&(a==null?void 0:a.status)===ge.NotPaid&&s.jsx("div",{className:Lt.antistockPayNow,children:a==null?void 0:a.displayPaymentInfo.map((g,x)=>s.jsx(ta,{block:g},x))}),p&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:Lt.antistockTrackPayment,children:s.jsx(va,{timeline:a.timeline})}),s.jsx(Hn,{className:Lt.antistockFooter})]})]}),!p&&(a==null?void 0:a.status)===ge.NotPaid&&s.jsx("div",{className:Lt.notPaidSection,children:a==null?void 0:a.displayPaymentInfo.map((g,x)=>s.jsx(ta,{block:g},x))}),!p&&s.jsx(Hn,{className:Lt.footer})]})}),(a==null?void 0:a.gateway)==="PayPalFF"&&o&&s.jsx(w.Modal,{close:()=>c(!1),children:s.jsx(kd,{price:a.price,setIsOpen:c})}),(a==null?void 0:a.gateway)==="Сashapp"&&o&&s.jsx(w.Modal,{close:()=>u(!1),children:s.jsx(Sd,{setIsOpen:c,chargeId:a.id})})]})},$D=Object.freeze(Object.defineProperty({__proto__:null,ChargePage:VD},Symbol.toStringTag,{value:"Module"}));exports.ActivePaymentMethod=Pd;exports.ActiveSubscriptionProduct=Rd;exports.BalanceModal=$l;exports.ChangeSubscriptionPlan=wd;exports.ChargeStatus=ge;exports.CheckoutFooter=Hn;exports.CheckoutHeader=ma;exports.CheckoutItems=f0;exports.CheckoutOperational=xd;exports.CheckoutOrderMainData=Os;exports.CheckoutPrices=kr;exports.CheckoutProduct=ga;exports.LeaveAReview=Bd;exports.MarkdownText=la;exports.NoItemsBlock=ha;exports.OrderStatus=Ce;exports.OrderStatusBlock=Fd;exports.OrdersTable=i0;exports.PageTitle=fa;exports.PaginationWithRange=hu;exports.ReCaptchaProvider=Gi;exports.StableText=Gc;exports.SubscriptionCoupon=Ld;exports.SubscriptionExpirationDate=Dd;exports.SubscriptionProduct=vd;exports.SubscriptionsTable=Nd;exports.Table=pa;exports.TableItemTitle=It;exports.TicketRow=Id;exports.TrackPayment=va;exports.auth=S2;exports.fetchAuthorizedOrder=o2;exports.fetchGeneral=Zd;exports.fetchOrder=s2;exports.fetchOrders=i2;exports.fetchPrivacyPolicy=u2;exports.fetchRefundPolicy=r2;exports.fetchSubscription=f2;exports.fetchSubscriptions=g2;exports.fetchTerms=n2;exports.fetchThemeAndSettings=Wd;exports.fetchTicket=x2;exports.fetchTickets=E2;exports.getBalance=aa;exports.getBalanceSettings=ol;exports.getGatewaysDetail=cu;exports.index=ND;exports.index$1=$D;exports.parseDraftJsText=sl;exports.recapcha=mf;exports.sendTicketMessage=C2;exports.useCart=su;exports.useCopy=Jn;exports.useGeneralInfo=nl;exports.useMarkdownIt=Rl;exports.useReCaptcha=ou;