gemi 0.14.2 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/index.js +2 -2
- package/dist/app/index.js.map +1 -1
- package/dist/bin/gemi.js +7 -1
- package/dist/bin/gemi.js.map +4 -4
- package/dist/{chunk-tqzj43a7.js → chunk-00nc1ycm.js} +2 -2
- package/dist/{chunk-tqzj43a7.js.map → chunk-00nc1ycm.js.map} +1 -1
- package/dist/{chunk-4dcj158v.js → chunk-12dsc8ya.js} +3 -3
- package/dist/{chunk-4dcj158v.js.map → chunk-12dsc8ya.js.map} +1 -1
- package/dist/{chunk-7ptvr91c.js → chunk-1vs946fr.js} +2 -2
- package/dist/{chunk-7ptvr91c.js.map → chunk-1vs946fr.js.map} +1 -1
- package/dist/{chunk-wf991m48.js → chunk-2sshh9jw.js} +2 -2
- package/dist/{chunk-wf991m48.js.map → chunk-2sshh9jw.js.map} +1 -1
- package/dist/{chunk-exf16mn0.js → chunk-7dp9xw46.js} +3 -3
- package/dist/{chunk-exf16mn0.js.map → chunk-7dp9xw46.js.map} +1 -1
- package/dist/{chunk-ryg1dde5.js → chunk-9v19kd7s.js} +3 -3
- package/dist/{chunk-ryg1dde5.js.map → chunk-9v19kd7s.js.map} +1 -1
- package/dist/chunk-ac8m7p53.js +5 -0
- package/dist/chunk-ac8m7p53.js.map +11 -0
- package/dist/{chunk-dy5fyccd.js → chunk-acy96d33.js} +2 -2
- package/dist/{chunk-dy5fyccd.js.map → chunk-acy96d33.js.map} +1 -1
- package/dist/{chunk-57z3h6hy.js → chunk-b38shk5c.js} +2 -2
- package/dist/{chunk-57z3h6hy.js.map → chunk-b38shk5c.js.map} +1 -1
- package/dist/{chunk-phkp7w79.js → chunk-cmxfn1e4.js} +3 -3
- package/dist/{chunk-phkp7w79.js.map → chunk-cmxfn1e4.js.map} +1 -1
- package/dist/{chunk-htxxjgd5.js → chunk-e4htsnc2.js} +2 -2
- package/dist/{chunk-htxxjgd5.js.map → chunk-e4htsnc2.js.map} +1 -1
- package/dist/{chunk-2ndhh6td.js → chunk-gngynbtx.js} +2 -2
- package/dist/{chunk-2ndhh6td.js.map → chunk-gngynbtx.js.map} +1 -1
- package/dist/{chunk-g4t4r905.js → chunk-gnxcqb9a.js} +2 -2
- package/dist/{chunk-g4t4r905.js.map → chunk-gnxcqb9a.js.map} +1 -1
- package/dist/{chunk-qdyp0w7x.js → chunk-h3c37nbe.js} +2 -2
- package/dist/{chunk-qdyp0w7x.js.map → chunk-h3c37nbe.js.map} +1 -1
- package/dist/{chunk-yxmc7x64.js → chunk-ke08h1ew.js} +2 -2
- package/dist/{chunk-yxmc7x64.js.map → chunk-ke08h1ew.js.map} +1 -1
- package/dist/{chunk-jmscazht.js → chunk-m118y18n.js} +2 -2
- package/dist/{chunk-jmscazht.js.map → chunk-m118y18n.js.map} +1 -1
- package/dist/{chunk-n8tr3h68.js → chunk-psb1w3j2.js} +2 -2
- package/dist/{chunk-n8tr3h68.js.map → chunk-psb1w3j2.js.map} +1 -1
- package/dist/{chunk-cxxwxz6t.js → chunk-qepwc6py.js} +2 -2
- package/dist/{chunk-cxxwxz6t.js.map → chunk-qepwc6py.js.map} +1 -1
- package/dist/{chunk-r13m0b3y.js → chunk-qsb7ddwv.js} +2 -2
- package/dist/{chunk-r13m0b3y.js.map → chunk-qsb7ddwv.js.map} +1 -1
- package/dist/{chunk-4gfrxz19.js → chunk-t0xrvrt4.js} +2 -2
- package/dist/{chunk-4gfrxz19.js.map → chunk-t0xrvrt4.js.map} +1 -1
- package/dist/{chunk-27xgse4n.js → chunk-v8kgghec.js} +2 -2
- package/dist/{chunk-27xgse4n.js.map → chunk-v8kgghec.js.map} +1 -1
- package/dist/{chunk-bpqf6csg.js → chunk-wwn6qm2v.js} +2 -2
- package/dist/{chunk-bpqf6csg.js.map → chunk-wwn6qm2v.js.map} +1 -1
- package/dist/{chunk-hq7crmd4.js → chunk-xehvtwhb.js} +2 -2
- package/dist/{chunk-hq7crmd4.js.map → chunk-xehvtwhb.js.map} +1 -1
- package/dist/{chunk-ypadv725.js → chunk-xsjhb7em.js} +2 -2
- package/dist/{chunk-ypadv725.js.map → chunk-xsjhb7em.js.map} +1 -1
- package/dist/client/ClientRouter.d.ts.map +1 -1
- package/dist/client/Head.d.ts +7 -0
- package/dist/client/Head.d.ts.map +1 -0
- package/dist/client/OpenGraphImage.d.ts +14 -0
- package/dist/client/OpenGraphImage.d.ts.map +1 -0
- package/dist/client/ServerDataProvider.d.ts +1 -0
- package/dist/client/ServerDataProvider.d.ts.map +1 -1
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +81 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/init.d.ts +1 -1
- package/dist/client/init.d.ts.map +1 -1
- package/dist/facades/Meta.d.ts +8 -0
- package/dist/facades/Meta.d.ts.map +1 -0
- package/dist/facades/index.d.ts +1 -0
- package/dist/facades/index.d.ts.map +1 -1
- package/dist/facades/index.js +66 -4
- package/dist/facades/index.js.map +27 -6
- package/dist/http/HttpRequest.d.ts +6 -0
- package/dist/http/HttpRequest.d.ts.map +1 -1
- package/dist/http/Metadata.d.ts +25 -0
- package/dist/http/Metadata.d.ts.map +1 -0
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +5 -4
- package/dist/http/requestContext.d.ts +7 -0
- package/dist/http/requestContext.d.ts.map +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +1 -1
- package/dist/server/index.js +5 -5
- package/dist/server/index.js.map +4 -4
- package/dist/services/index.js +73 -62
- package/dist/services/index.js.map +16 -4
- package/dist/services/router/ApiRouterServiceContainer.d.ts.map +1 -1
- package/dist/services/router/ViewRouterServiceContainer.d.ts +1 -0
- package/dist/services/router/ViewRouterServiceContainer.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/facades/index.js
CHANGED
|
@@ -1,6 +1,68 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{G as Ds,H as Ys,I as Y,J as is,K,L,M as $,O as Bs,P as R,Q as k,R as z}from"../http/index.js";import{U as B}from"../chunk-e4t6twrj.js";import{V as Ks}from"../chunk-mtbjk5px.js";import{nc as Vs}from"../chunk-ypadv725.js";import{oc as A,qc as Q,rc as hs}from"../chunk-2e5r9zc8.js";import{sc as Ls}from"../chunk-hakywsfq.js";import{uc as M}from"../chunk-5g8wefgj.js";import{wc as Ss}from"../chunk-5zy36vzw.js";import{AsyncLocalStorage as ms}from"async_hooks";class S extends M{service;static _name="BroadcastingServiceContainer";publishCb;context=new ms;constructor(s){super();this.service=s}onPublish(s){this.publishCb=s}publish(...s){let[f,c,w]=s;this.publishCb(f,c,w)}async handleMessage(s,f){let c=JSON.parse(f);if(c.type==="subscribe"){let w=Object.entries(this.service.channels).sort(([i],[b])=>i.length-b.length);for(let[i,b]of w){let l=new URLPattern({pathname:i});if(l.test({pathname:c.topic})){let y=l.exec({pathname:c.topic})?.pathname.groups,O=new b;if(await O.subscribe.call(O,y))s.subscribe(c.topic);break}}}if(c.type==="broadcast")s.publish(c.topic,JSON.stringify({topic:c.topic,data:c.payload}));if(c.type==="unsubscribe")s.unsubscribe(c.topic)}run(s,f){let c=s.get("Cookie"),w=new Map;if(c){let i=c.split(";");for(let b of i){let[l,y]=b.split("=");w.set(l.trim(),y.trim())}}this.context.run({headers:s,cookies:w},f)}}class N{static async user(){let s=L.getStore(),f=S.use().context.getStore(),c="",w="";if(s?.req)c=s.req.cookies.get("access_token"),w=s.req.headers.get("User-Agent");if(f?.cookies)w=f.headers.get("User-Agent"),c=f.cookies.get("access_token");let i=s?.user;if(!i)i=(await z.use().getSession(c,w))?.user,s?.setUser(i);if(i)return i;return null}static async guard(s){let f=await N.user();if(!f)throw new R;try{if(!await s(f))throw new R}catch(c){throw new R}}static async guardSafe(s){let f=await N.user();if(!f)return!1;try{return await s(f)}catch(c){return!1}}static async authenticate(s){await z.use().authenticate(s)}static async createMagicLink(s){return await z.use().createMagicLinkToken(s)}}class V{static getSupportedLocales(){return B.use().service.supportedLocales}static getDefaultLocale(){return B.use().service.defaultLocale}static locale(){return B.use().detectLocale(L.getStore().req)}static setLocale(s=V.locale()){let f=B.use(),c=s;if(!f.service.supportedLocales.includes(s))c=f.service.defaultLocale;return L.getStore().setCookie("i18n-locale",c,{expires:new Date(Date.now()+31536000000)}),c}}var js=Ss(Vs(),1);import{Buffer as Es}from"buffer";class o extends M{service;static _name="FileStorageServiceContainer";constructor(s){super();this.service=s}}class zs{static async put(s){return o.use().service.driver.put(s)}static async metadata(s){let f=Es.from(await s.arrayBuffer());try{return await js.default(f).metadata()}catch{return{}}}static async fetch(s){return o.use().service.driver.fetch(s)}static list(s){return o.use().service.driver.list(s)}static delete(){}}function Ts(s){return Object.fromEntries(Object.entries(s).filter(([,f])=>{return f!==null&&f!==void 0}))}class I extends Error{constructor(){super("Adapter not found");this.name="AdapterNotFound"}}class cs{createSession(){throw new I}deleteSession(){throw new I}findSession(){throw new I}findUserByEmailAddress(){throw new I}updateSession(){throw new I}createUser(){throw new I}}class Js extends ${schema={email:{required:"Email is required",string:"Invalid email",email:"Invalid email"},password:{required:"Password is required"}}}class Ms extends ${schema={name:{string:"Invalid name",required:"Name is required","min:2":"Name must be at least 3 characters"},email:{string:"Invalid email",required:"Email is required",email:"Invalid email"},password:{required:"Password is required","min:8":"Password must be at least 8 characters"}}}class _s extends ${schema={email:{required:"Email is required",email:"Invalid email"}}}class Ws extends ${schema={password:{required:"Password is required",password:"Invalid password"}}}class _ extends Ds{provider=z.use()?.provider;async me(){let s=await N.user();if(!s)throw new Bs;return s}async verifyEmail(s=new $){let f=await s.input(),c=z.use()?.provider,w=await c.adapter.findUserByVerificationToken(f.get("token"));if(!w)return{email:null};if(await c.adapter.verifyUser(w.email),w)return{email:w.email};return{email:null}}async signInWithMagicLink(s=new $){let f=z.use(),c=f.provider,w=s.search.get("token"),i=decodeURIComponent(s.search.get("email")),b=null;try{b=await c.adapter.findUserMagicLinkToken({email:i,token:w})}catch(y){return console.log(y),{error:JSON.stringify(y)}}if(!b)return{error:"Invalid token"};await c.adapter.verifyUser(i),await c.adapter.deleteMagicLinkToken(i);let l=await f.createOrUpdateSession({email:i});return s.ctx().setCookie("access_token",l.token,{expires:l.absoluteExpiresAt}),await c.onSignIn(l),{session:l}}async signInWithPin(s=new $){let f=z.use(),c=f.provider,w=await s.input(),{email:i,pin:b}=w.toJSON();if(!await c.adapter.findUserMagicLinkToken({email:i,pin:b}))throw new K({pin:["Invalid pin"]});await c.adapter.deleteMagicLinkToken(i),await c.adapter.verifyUser(i);let y=await f.createOrUpdateSession({email:i});return s.ctx().setCookie("access_token",y.token,{expires:y.absoluteExpiresAt}),await c.onSignIn(y),{session:y}}async signIn(s=new Js){let f=await s.input(),{email:c,password:w}=f.toJSON(),i=z.use().provider,b=await i.adapter.findUserByEmailAddress(c,i.verifyEmail);if(!b)throw new K({invalid_credentials:["Invalid credentials"]});if(!await i.verifyPassword(w,b.password))throw new K({invalid_credentials:["Invalid credentials"]});let y=await z.use().createOrUpdateSession({email:b.email,id:b.id});s.ctx().setCookie("access_token",y.token,{expires:y.absoluteExpiresAt}),await i.onSignIn(b);let{password:O,...g}=b;return g}async signUp(s=new Ms){let f=await s.input(),{email:c,password:w,name:i,invitationId:b}=f.toJSON(),l=z.use().provider;if(await l.adapter.findUserByEmailAddress(c,!1))throw new K({email:["Email address already exists"]});let O=await l.hashPassword(w),g=B.use().detectLocale(s),p;if(b){if(p=await l.adapter.findInvitation(b,c),p)await l.adapter.deleteInvitationById(b)}let F,n;if(p)F=await l.adapter.createUser({email:c,name:i,password:O,emailVerifiedAt:new Date,locale:g}),await l.adapter.createAccount({organizationId:p.organizationId,userId:F.id,organizationRole:p.role});else n=await l.generateEmailVerificationToken(c),F=await l.adapter.createUser({email:c,name:i,password:O,verificationToken:n,locale:g});return await l.onSignUp(F,n),F}async signOut(s=new $){let f=s.cookies.get("access_token"),c=await N.user(),w=z.use().provider;return await w.adapter.deleteSession({token:f}),s.ctx().setCookie("access_token","",{expires:new Date(0)}),await w.onSignOut(c),{}}async forgotPassword(s=new _s){let f=await s.input(),{email:c}=f.toJSON(),w=z.use().provider,i=await w.adapter.findUserByEmailAddress(c,w.verifyEmail);if(!i)return{};let b=await w.generateForgotPasswordToken(i);return await w.adapter.createPasswordResetToken({user:i,token:b}),await w.onForgotPassword(i,b),{}}async resetPassword(s=new Ws){let f=z.use().provider,c=await s.input(),{password:w,token:i}=c.toJSON(),b=await f.adapter.findPasswordResetToken({token:i});if(!b)throw new K({token:["Invalid token"]});if(k.Instant.from(b.createdAt.toISOString()).add({hours:24}).until(k.Now.instant()).sign>=0)throw new K({token:["Token expired"]});await f.adapter.deletePasswordResetToken({token:i});let y=await f.adapter.findUserByEmailAddress(b.user.email,f.verifyEmail);if(!y)throw new K({email:["User not found"]});let O=await f.hashPassword(w);return await f.adapter.updateUserPassword({id:y.id,password:O}),await f.adapter.deleteAllUserSessions(y.id),await f.onResetPassword(y),{}}async changePassword(s=new $){let f=z.use().provider,c=await N.user(),w=await s.input(),{oldPassword:i,newPassword:b}=w.toJSON(),{password:l}=await f.adapter.findUserByEmailAddress(c.email,f.verifyEmail);if(!await f.verifyPassword(i,l))throw new K({oldPassword:["Incorrect password"]});let O=await f.hashPassword(b);return await f.adapter.updateUserPassword({id:c.id,password:O}),await f.adapter.deleteAllUserSessions(c.id),{}}async oauthRedirect(s=new $){let{provider:f}=s.params,c=z.use().provider.oauthProviders[f];if(!c)throw new Error(`Invalid provider: ${f}`);return{destination:await c.getRedirectUrl(s)}}async oauthCallback(s=new $){let{provider:f}=s.params,c=z.use(),w=c.provider,i=w.oauthProviders[f],{email:b,name:l,username:y,providerId:O}=await i.onCallback(s);if(!y&&!b)throw new Error("Email or username is required");let g=b??`${y}:${f}`,p=await w.adapter.findUserByEmailAddress(g,!1),F=B.use().detectLocale(s);if(!p)p=await w.adapter.createUser({email:g,name:l,locale:F,emailVerifiedAt:new Date}),await w.adapter.createSocialAccount({provider:f,userId:p.id,email:g,username:y,providerId:O,expiresAt:new Date,accessToken:"",refreshToken:""});let n=await c.createOrUpdateSession({email:p.email,id:p.id});return s.ctx().setCookie("access_token",n.token,{expires:n.expiresAt}),await w.onSignIn(p),{destination:w.redirectPath}}async createMagicLinkToken(s=new $){let f=await s.input(),{email:c}=f.toJSON(),w=z.use(),i=w.provider,{user:b,pin:l,token:y}=await w.createMagicLinkToken(c);return await i.onMagicLinkCreated(b,{email:c,pin:l,token:y}),{email:c}}}class Us extends is{routes={"/:provider":this.redirect([_,"oauthRedirect"]),"/:provider/callback":this.redirect([_,"oauthCallback"])}}class ws extends is{routes={"/sign-in/magic-link":this.view("auth/MagicLinkSignIn",[_,"signInWithMagicLink"]),"/oauth":Us}}class bs extends Y{middlewares=["cache:private"];routes={"/sign-in":this.post(_,"signIn"),"/sign-up":this.post(_,"signUp"),"/sign-out":this.post(_,"signOut"),"/forgot-password":this.post(_,"forgotPassword"),"/reset-password":this.post(_,"resetPassword"),"/change-password":this.post(_,"changePassword"),"/verify-email":this.post(_,"verifyEmail"),"/me":this.get(_,"me").middleware(["auth"]),"/magic-link":this.post(_,"createMagicLinkToken"),"/sign-in-with-pin":this.post(_,"signInWithPin")}}class os extends Ls{basePath="/auth";verifyEmail=!0;redirectPath="/dashboard";sessionExpiresInHours=24;sessionAbsoluteExpiresInHours=672;adapter=new cs;oauthProviders={};boot(){}async verifyPassword(s,f){return await Bun.password.verify(s,f)}async hashPassword(s){return await Bun.password.hash(s)}async generateForgotPasswordToken(s){let f=new Bun.CryptoHasher("sha256");return f.update(`${s.email}${Date.now()}`),f.digest("hex")}generateEmailVerificationToken(s){if(!this.verifyEmail)return"";let f=new Bun.CryptoHasher("sha256");return f.update(`${s}${Date.now()}`),f.digest("hex")}generateMagicLinkToken(s){let f=new Bun.CryptoHasher("sha256");return f.update(`${s}${Date.now()}`),f.digest("hex")}extendSession(s){return{}}onSignUp(s,f){}onSignIn(s){}onSignOut(s){}onForgotPassword(s,f){}onResetPassword(s){}onMagicLinkCreated(s,f){return}}class ls extends Y{middlewares=["cache:private,0,no-store"];routes={"/translations/:locale/:scope*":this.get(async()=>{let s=new $,f=`/${s.params.scope??""}`,w=s.params.locale??B.use().detectLocale(s),i=B.use().getPageTranslations(w,f);return s.ctx().setCookie("i18n-locale",w,{expires:new Date(Date.now()+31536000000)}),{[w]:i}})}}class ys extends Y{routes={"/resize":this.file(async()=>{let s=new $,f=new URL(s.rawRequest.url),c=f.searchParams.get("url"),w=Number(f.searchParams.get("w")),i=Number(f.searchParams.get("h")),b=f.searchParams.get("fit")??"cover",l=Number(f.searchParams.get("q"));if(!c)return new Response(JSON.stringify({error:"url query parameter is required"}),{headers:{"Content-Type":"application/json"},status:404});let O=`${c.startsWith("http")?"":`http://localhost:${process.env.PORT||5173}`}${c}`,g=await fetch(O);if(!g.ok)return new Response(JSON.stringify({error:"Image not found",info:O}),{headers:{"Content-Type":"application/json"},status:404});let p=Buffer.from(await g.arrayBuffer()),F=await Xs.use().service.driver.resize(p,{height:i,width:w,fit:b,quality:l});return g.headers.delete("Content-Type"),g.headers.delete("Content-Length"),new Response(F,{headers:{"Content-Type":"image/webp","Content-Length":`${F.byteLength}`,...g.headers.toJSON()}})})}}class Xs extends M{service;static _name="ImageOptimizationServiceContainer";constructor(s){super();this.service=s}}import{mkdir as Os,exists as gs,readdir as ks}from"fs/promises";class C{static channel(s,f){let c=S.use().service.channels[s];if(!c)return console.error(`Channel ${s} not found`),{publish:()=>{}};let w=new c;return{publish:(i,b=!1)=>{let l=Q(s,f);S.use().publish(l,JSON.stringify({topic:l,data:w.publish(i)}),b)}}}}class W extends M{service;static _name="LoggingServiceContainer";writer;isReady=!1;logsDirPath=`${process.env.ROOT_DIR}/storage/logs`;flushTimeout;fileSize=0;writerSize=0;isCreatingFile=!1;currentLogFilePath;constructor(s){super();this.service=s;this.boot().then(()=>{this.isReady=!0})}async boot(){if(!process.env.ROOT_DIR)return;if(!await gs(`${process.env.ROOT_DIR}/storage`))await Os(`${process.env.ROOT_DIR}/storage`);if(!await gs(this.logsDirPath))await Os(this.logsDirPath);this.newLogFile()}async newLogFile(){if(!await gs(this.logsDirPath))await Os(this.logsDirPath);if(this.isCreatingFile=!0,this.currentLogFilePath){this.writer.flush(),this.writer.end(),this.writer=null;let c=new File([await Bun.file(this.currentLogFilePath).arrayBuffer()],this.currentLogFilePath.split("/").pop(),{type:"text/plain"});this.service.onLogFileClosed(c),this.fileSize=0,this.writerSize=0}let f=(await ks(this.logsDirPath)).sort().reverse()[0];if(f){let c=Bun.file(`${this.logsDirPath}/${f}`);if(c.size<this.service.maxFileSize)this.currentLogFilePath=`${this.logsDirPath}/${f}`,this.writer=c.writer(),this.writer.write(await c.text()),this.writer.write(`
|
|
3
|
-
|
|
4
|
-
`),C.channel("/logs/live",{}).publish(JSON.stringify(b)),this.service.onLogCreated(b),this.tryFlush()}async tryFlush(){if(this.fileSize>this.service.maxFileSize){if(!this.isCreatingFile)await this.newLogFile()}if(this.writerSize>this.service.maxFileSize/2)await this.writer.flush(),this.writerSize=0,await this.newLogFile();else clearTimeout(this.flushTimeout),this.flushTimeout=setTimeout(async()=>{await this.writer.flush(),this.writerSize=0},100)}}class ps extends Y{middlewares=["cache:private,0"];routes={"/live":this.get(async()=>{let s=Bun.file(W.use().currentLogFilePath);return new Response(await s.text(),{headers:{"Content-Type":"text/plain"}})})}}function ds(s){let f=new Map;for(let c of s)if(typeof c==="string"){let[w,i=""]=c.split(":");if(w.startsWith("-")){if(f.has(w.replace("-","")))f.delete(w.replace("-",""))}else f.set(w,i.split(",").filter(Boolean))}else f.set(c,[]);return f}class d extends M{service;static _name="MiddlewareServiceContainer";constructor(s){super();this.service=s}runMiddleware(s){let f=new $;return Array.from(ds(s).entries()).map(([c,w])=>{if(typeof c==="string"){let i=this.service.aliases[c];if(i){let b=new i(f);return()=>b.run.call(b,...w)}}else{if(Ys(c)){let i=new c(f);return i.run.bind(i)}return c}}).filter(Boolean).reduce((c,w)=>{return async()=>{return{...await c(),...await w()}}},()=>Promise.resolve({}))()}}function As(s){return"run"in s}function Rs(s){return Object.hasOwn(s,"get")||Object.hasOwn(s,"post")||Object.hasOwn(s,"put")||Object.hasOwn(s,"delete")}function Cs(s){return Object.hasOwn(s,"first")&&Object.hasOwn(s,"second")}function Ps(s){if("__brand"in s)return s.__brand==="ApiRouter";return!1}function Fs(s,f="",c=[]){let w={};function i(b,l,y,O){let g=b==="/"?"":b,p=f==="/"?"":f,F=(`${p}${g}`===""?"/":`${p}${g}`).replaceAll("//","/");if(!w[F])w[F]={};w[F][l.toUpperCase()]={exec:y,middleware:[...c,...O]},w[F].OPTIONS={exec:()=>{let U=new $().ctx().headers;return new Response(null,{headers:U,status:204})},middleware:[]}}for(let[b,l]of Object.entries(s)){if(As(l)){let y=l,O=y.method,g=y.middlewares,p=y.run.bind(y);i(b,O,p,g)}if(Rs(l))for(let[y,O]of Object.entries(l)){let g=O.middlewares,p=O.run.bind(O);i(b,y,p,g)}if(Ps(l)){let y=new l,O=Fs(y.routes,`${f}${b}`,y.middlewares);for(let[g,p]of Object.entries(O))w[g.replaceAll("//","/")]=p}if(Cs(l)){let{first:y,second:O}=l;for(let[g,p]of Object.entries(y)){let F=p.middlewares,n=p.run.bind(p),[U,...T]=b.split("/").reverse();if(!U.startsWith(":"))throw new Error("Resource route must end with a dynamic segment");i(T.reverse().join("/"),g,n,F)}for(let[g,p]of Object.entries(O)){let F=p.middlewares,n=p.run.bind(p);i(b,g,n,F)}}}return Object.fromEntries(Object.entries(w).sort(([b],[l])=>{let y=b.split("/").length+b.split(":").length,O=l.split("/").length+l.split(":").length;return y-O}))}function $s(s){return s.replace(/\([^)]*\)/g,"").replace(/\/\//g,"/")}function P(s){let f={};for(let[c,w]of Object.entries(s))if("run"in w){let i=w;if("children"in i){let b=new i.children,l=P(b.routes);for(let[y,{exec:O,middleware:g}]of Object.entries(l)){let p=c==="/"?y:`${c}${y}`,F=y==="/"&&c!=="/"?c:p,n=(U)=>i.run.call(i,U,c);f[$s(F)]={exec:[n,...O],middleware:[...i.middlewares,...g],viewPath:i.viewPath}}}else{let b=(l)=>i.run.call(i,l,c);f[$s(c)]={exec:[b],middleware:i.middlewares,viewPath:i.viewPath}}}else{let i=new w,b=P(i.routes);for(let[l,{exec:y,middleware:O,viewPath:g}]of Object.entries(b)){let p=c==="/"?l:`${c}${l}`,F=l==="/"&&c!=="/"?c:p;f[$s(F)]={exec:y,middleware:[...i.middlewares,...O],viewPath:g}}}return Object.fromEntries(Object.entries(f).sort(([c],[w])=>{let i=c.split("/").length+c.split(":").length,b=w.split("/").length+w.split(":").length;return i-b}))}import{renderToReadableStream as ts}from"react-dom/server.browser";import{createElement as Zs,Fragment as qs}from"react";function vs(s){return s.replace(/\([^)]*\)/g,"").replace(/\/\//g,"/")}function v(s){let f={};for(let[c,w]of Object.entries(s))if("run"in w){let i=w.viewPath;if("children"in w){f[c]=[i];let b=new w.children,l=v(b.routes);for(let[y,O]of Object.entries(l)){let g=c==="/"?y:`${c}${y}`,p=y==="/"&&c!=="/"?c:g;f[p]=[i,...O]}if(f[c].length===1)delete f[c]}else f[c]=[i]}else{let i=new w,b=v(i.routes);for(let[l,y]of Object.entries(b)){let O=c==="/"?l:`${c}${l}`,g=l==="/"&&c!=="/"?c:O;f[g]=y}}return Object.fromEntries(Object.entries(f).map(([c,w])=>[vs(c),w]))}function t(s){let f=[];for(let[c,w]of Object.entries(s))if("run"in w){let i=w.viewPath;if(i==="__")continue;if(i==="REDIRECT")continue;if("children"in w){let b=new w.children,l=t(b.routes);f.push([i,l])}else f.push([i,[]])}else{let i=new w,b=t(i.routes);f.push(...b)}return f}function ns(s){let f=[];for(let[c,w]of s)f.push(c,...ns(w).flat());return Array.from(new Set(f))}class q{static debug(s,f){W.use().log("debug",s,f)}static info(s,f){W.use().log("info",s,f)}static notice(s,f){W.use().log("notice",s,f)}static warning(s,f){W.use().log("warning",s,f)}static error(s,f){W.use().log("error",s,f)}static critical(s,f){W.use().log("critical",s,f)}static alert(s,f){W.use().log("alert",s,f)}static emergency(s,f){W.use().log("emergency",s,f)}}class xs extends M{service;static _name="ViewRouterServiceContainer";flatViewRoutes={};routeManifest={};componentTree=[];flatComponentTree=[];root=null;constructor(s){super();this.service=s;let f={"/":s.rootRouter,"/auth":ws};this.flatViewRoutes=P(f),this.routeManifest=v(f),this.componentTree=t(f),this.flatComponentTree=ns(this.componentTree),this.root=s.root}boot(){}async onRequestEnd(s){if(!s.cookies.has("session_id"))s.ctx().setCookie("session_id",Bun.randomUUIDv7(),{httpOnly:!0,secure:!0,sameSite:"Strict",expires:new Date(Date.now()+31536000000)});return await this.service.onRequestEnd(s)}async render(s){let{csrfTokenHMAC:f,currentPathName:c,headers:w,i18n:i,params:b,pathname:l,prefetchedData:y,url:O,user:g,viewData:p,breadcrumbs:F,urlLocaleSegment:n}=s,T={kind:"view",data:{pageData:{[l.replace(`/${n}`,"")]:p},__csrf:f.toString("base64"),prefetchedData:y,i18n:i,auth:{user:g},routeManifest:this.routeManifest,breadcrumbs:F,router:{urlLocaleSegment:n,pathname:c,params:b,currentPath:l,searchParams:O.search,is404:!c?!0:!1},componentTree:[["404",[]],...this.componentTree]},head:{}},D=this.root,x=this.routeManifest[c];return async(J)=>{let{bootstrapModules:G,loaders:Z,getStyles:m,viewImportMap:H,cssManifest:X}=J;T.data.cssManifest=X;let r=await ts(Zs(qs,{children:[...await m(x),Zs(D,{data:T.data,viewImportMap:H,key:"root"})]}),{bootstrapScriptContent:`window.__GEMI_DATA__ = ${JSON.stringify(T.data)}; window.loaders=${Z}`,bootstrapModules:G});return new Response(r,{status:!c?404:200,headers:w})}}async handleViewRequest(s){let f=new URL(s.url),c=f.pathname.endsWith(".json"),w=f.pathname.replace(".json",""),[,i,...b]=w.split("/"),l=`/${b.join("/")}`,y=null,O=null;if(!B.use().service.supportedLocales.includes(i))l=w;else y=i,O=i;if(B.use().isEnabled){if(O===null){let T=B.use().detectLocale(new $(s,{},"view",l)),D=f.pathname==="/"?"":f.pathname;return new Response("",{status:302,headers:{"Cache-Control":"private, no-cache, no-store, max-age=0, must-revalidate",Location:`/${T}${D}`}})}}l=l.replace("//","/");let g=[],p=[],F=null,n={};try{for(let[T,D]of Object.entries(this.flatViewRoutes)){let x=new Ks({pathname:T});if(x.test({pathname:l})){F=T,n=x.exec({pathname:l})?.pathname.groups,g=D.exec,p=D.middleware;break}}}catch(T){throw T}let U=new $(s,n,"view",F);return await L.run(U,async()=>{let T=null,D=L.getStore();if(O){let J=O.replaceAll("/","");V.setLocale(J)}else V.setLocale();let x=D.req;try{await d.use().runMiddleware(p);let J=B.use(),G=J.isEnabled,Z={};if(G){let j=null;if(O)j=O.replaceAll("/",""),D.setLocale(j);else j=J.detectLocale(new $(s,x.params)),D.setLocale(j);let E=J.getPageTranslations(j,x.routePath);Z={supportedLocales:J.service.supportedLocales,currentLocale:j,dictionary:{[j]:E}}}let m=await Promise.all([...g.map((j)=>j(x)),...Array.from(D.prefetchPromiseQueue).map((j)=>j())]),H=D.cookies,X=D.headers,r=D.prefetchedResources;T={data:m,cookies:H,headers:X,user:D.user,prefetchedData:Object.fromEntries(r.entries()),currentPathName:x.routePath,params:x.params,urlLocaleSegment:y};let{params:Gs,currentPathName:e,user:Hs}=T,a={},ss={};for(let j of m){let[E,fs]=Object.entries(j)?.[0]??[];if(!E||!fs)continue;ss[`${E}:${e}`]=fs.breadcrumb,a[E]=fs}if(c)return X.set("Content-Type","application/json"),H.forEach((j)=>X.append("Set-Cookie",j.toString())),await this.service.onRequestEnd(x),new Response(JSON.stringify({data:{[l]:a},breadcrumbs:ss,prefetchedData:T.prefetchedData,i18n:Z,is404:!e}),{headers:X});X.set("Content-Type","text/html");for(let j of H)X.append("Set-Cookie",j.toString());let Is=Bun.CSRF.generate(process.env.SECRET);X.append("Set-Cookie",`csrf_token=${Is}; HttpOnly; Secure; SameSite=Strict; Expires=${new Date(Date.now()+86400000).toUTCString()}`);try{await this.onRequestEnd(x)}catch(j){q.error(j?.message??'Error in "onRequestEnd" event handler',{err:JSON.stringify(j)})}return await this.render({csrfTokenHMAC:Buffer.from(""),currentPathName:e,headers:X,i18n:Z,params:Gs,pathname:f.pathname,prefetchedData:T.prefetchedData,url:f,user:Hs,viewData:a,breadcrumbs:ss,urlLocaleSegment:y})}catch(J){if(J.kind===A)if(c){let{status:G=400,data:Z,directive:m,headers:H}=J.payload.api;return new Response(JSON.stringify({data:Z,directive:m}),{headers:H,status:G})}else{let{status:G=400,error:Z}=J.payload.view;return new Response(Z?.message,{...J.payload.view,status:G})}else throw this.service.onRequestFail(x,J),J}})}}class Ns extends Y{routes={"/api-routes":this.get(()=>{let s=h.use().flatRoutes,f=[];for(let[c,w]of Object.entries(s))for(let[i,b]of Object.entries(w)){let{exec:l,middleware:y}=b;f.push({path:c,method:i,middleware:y})}return f}),"/view-routes":this.get(()=>{let s=xs.use().flatViewRoutes,f=[];for(let[c,{middleware:w,viewPath:i}]of Object.entries(s))f.push({path:c,method:"GET",viewPath:i,middleware:w});return f})}}class h extends M{service;static _name="ApiRouterServiceContainer";flatRoutes={};constructor(s){super();this.service=s;this.flatRoutes=Fs({"/":this.service.rootRouter.bind(this.service),"/auth":bs,"/__gemi__/services/i18n":ls,"/__gemi__/services/logs":ps,"/__gemi__/services/image":ys,"/__gemi__/debug":Ns})}getRouteHandlerAndParams(s){let c=new URL(s.url).pathname.replace("/api",""),w={},i;for(let[b]of Object.entries(this.flatRoutes))try{let l=new URLPattern({pathname:b});if(l.test({pathname:c})){i=b,w=l.exec({pathname:c})?.pathname.groups;break}}catch(l){console.error(l)}return{params:w,path:i}}async runRouteMiddleware(s,f){let w=this.flatRoutes[s][f.rawRequest.method].middleware;try{await d.use().runMiddleware(w)}catch(i){if(i.kind===A){if(f.rawRequest.url.includes("/api")){let{status:b=400,data:l,headers:y}=i.payload.api;return new Response(JSON.stringify(l),{status:b,headers:{"Content-Type":"application/json",...y}})}}else throw this.service.onRequestFail(f,i),console.error(i),i}}async getRouteData(s){let f=this.flatRoutes[s],c=L.getStore(),w=f[c.req.rawRequest.method].exec??(()=>Promise.resolve({})),i={};try{i=await w()}catch(b){if(b.kind===A){let{status:l=400,data:y,headers:O}=b.payload.api;return new Response(JSON.stringify(y),{status:l,headers:{"Content-Type":"application/json",...O}})}throw this.service.onRequestFail(c.req,b),console.error(b),b}return i}async handleApiRequest(s){let{params:f,path:c}=this.getRouteHandlerAndParams(s),w=this.flatRoutes[c];if(!w||!w[s.method])return new Response(JSON.stringify({error:{message:"Not found"}}),{status:404});let i=new $(s,f,"api",c);if(!s.url.includes("/__gemi__"))this.service.onRequestStart(i);return await L.run(i,async()=>{let b=L.getStore();b.setRequest(i);let l=await this.runRouteMiddleware(c,i);if(l instanceof Response)return l;let y=await this.getRouteData(c);if(y instanceof Response)return y;let O=b.headers;if(O.append("Content-Type","application/json"),b.cookies.forEach((g)=>O.append("Set-Cookie",g.toString())),b.destroy(),!s.url.includes("/__gemi__"))this.service.onRequestEnd(i);return new Response(JSON.stringify(y),{headers:O})})}}class u{static prepare(s,...f){let c={params:{},search:{}},[w={}]=f,{search:i,params:b}={...c,...w},l=L.getStore();if(l.req.kind==="api")throw new Error("Query.prefetch() cannot be called from an API request");let y=l.req.rawRequest,O=new URL(y.url),g=new URLSearchParams(Ts(i));g.delete("json"),g.sort();let p=[`${Q(s,b)}`,g.toString()].filter((x)=>x.length>0).join("?"),F=`${O.origin}/${p}`,n=new Request(F,{headers:y.headers}),U=new $(n,b),T=(x)=>{l.prefetchedResources.set(Q(s,b),{[g.toString()]:x})},D=()=>{return L.run(U,async()=>{let x=await h.use().getRouteData(s);return T(x),x})};return{instant:D,prefetch:()=>{l.prefetchPromiseQueue.add(D)}}}static instant(s,...f){return u.prepare(s,...f).instant()}static prefetch(s,...f){return u.prepare(s,...f).prefetch()}}class Qs{static absolute(s,...f){return`${process.env.HOST_NAME}${Q(String(s),f[0]??{})}`}static relative(s,...f){return Q(String(s),f[0]??{})}}export{Qs as Url,hs as Redirect,u as Query,q as Log,V as I18n,zs as FileStorage,C as Broadcast,N as Auth};export{S as y,o as z,W as A,os as B,Xs as C,d as D,xs as E,h as F};
|
|
2
|
+
import{G as u4,H as e4,I as A8,J as e9,K as _8,L as F0,M as $0,O as i4,P as s6,Q as N6,R as R0}from"../http/index.js";import{U as C0}from"../chunk-e4t6twrj.js";import{V as dK}from"../chunk-mtbjk5px.js";import{mc as DZ,nc as iK}from"../chunk-xsjhb7em.js";import{oc as i6,qc as g8,rc as AV}from"../chunk-2e5r9zc8.js";import{sc as p4}from"../chunk-hakywsfq.js";import{uc as d0}from"../chunk-5g8wefgj.js";import{wc as i0,xc as g0,yc as aw}from"../chunk-5zy36vzw.js";var U5=g0((OB,z5)=>{var U7=0,X5=-3;function j6(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function KY(J,K){this.source=J,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=K,this.destLen=0,this.ltree=new j6,this.dtree=new j6}var Z5=new j6,Q5=new j6,$7=new Uint8Array(30),V7=new Uint16Array(30),H5=new Uint8Array(30),W5=new Uint16Array(30),YY=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),J5=new j6,G8=new Uint8Array(320);function w5(J,K,Y,X){var Z,Q;for(Z=0;Z<Y;++Z)J[Z]=0;for(Z=0;Z<30-Y;++Z)J[Z+Y]=Z/Y|0;for(Q=X,Z=0;Z<30;++Z)K[Z]=Q,Q+=1<<J[Z]}function XY(J,K){var Y;for(Y=0;Y<7;++Y)J.table[Y]=0;J.table[7]=24,J.table[8]=152,J.table[9]=112;for(Y=0;Y<24;++Y)J.trans[Y]=256+Y;for(Y=0;Y<144;++Y)J.trans[24+Y]=Y;for(Y=0;Y<8;++Y)J.trans[168+Y]=280+Y;for(Y=0;Y<112;++Y)J.trans[176+Y]=144+Y;for(Y=0;Y<5;++Y)K.table[Y]=0;K.table[5]=32;for(Y=0;Y<32;++Y)K.trans[Y]=Y}var K5=new Uint16Array(16);function w7(J,K,Y,X){var Z,Q;for(Z=0;Z<16;++Z)J.table[Z]=0;for(Z=0;Z<X;++Z)J.table[K[Y+Z]]++;J.table[0]=0;for(Q=0,Z=0;Z<16;++Z)K5[Z]=Q,Q+=J.table[Z];for(Z=0;Z<X;++Z)if(K[Y+Z])J.trans[K5[K[Y+Z]]++]=Z}function ZY(J){if(!J.bitcount--)J.tag=J.source[J.sourceIndex++],J.bitcount=7;var K=J.tag&1;return J.tag>>>=1,K}function M8(J,K,Y){if(!K)return Y;while(J.bitcount<24)J.tag|=J.source[J.sourceIndex++]<<J.bitcount,J.bitcount+=8;var X=J.tag&65535>>>16-K;return J.tag>>>=K,J.bitcount-=K,X+Y}function z7(J,K){while(J.bitcount<24)J.tag|=J.source[J.sourceIndex++]<<J.bitcount,J.bitcount+=8;var Y=0,X=0,Z=0,Q=J.tag;do X=2*X+(Q&1),Q>>>=1,++Z,Y+=K.table[Z],X-=K.table[Z];while(X>=0);return J.tag=Q,J.bitcount-=Z,K.trans[Y+X]}function QY(J,K,Y){var X,Z,Q,H,w,W;X=M8(J,5,257),Z=M8(J,5,1),Q=M8(J,4,4);for(H=0;H<19;++H)G8[H]=0;for(H=0;H<Q;++H){var z=M8(J,3,0);G8[YY[H]]=z}w7(J5,G8,0,19);for(w=0;w<X+Z;){var U=z7(J,J5);switch(U){case 16:var $=G8[w-1];for(W=M8(J,2,3);W;--W)G8[w++]=$;break;case 17:for(W=M8(J,3,3);W;--W)G8[w++]=0;break;case 18:for(W=M8(J,7,11);W;--W)G8[w++]=0;break;default:G8[w++]=U;break}}w7(K,G8,0,X),w7(Y,G8,X,Z)}function Y5(J,K,Y){while(!0){var X=z7(J,K);if(X===256)return U7;if(X<256)J.dest[J.destLen++]=X;else{var Z,Q,H,w;X-=257,Z=M8(J,$7[X],V7[X]),Q=z7(J,Y),H=J.destLen-M8(J,H5[Q],W5[Q]);for(w=H;w<H+Z;++w)J.dest[J.destLen++]=J.dest[w]}}}function HY(J){var K,Y,X;while(J.bitcount>8)J.sourceIndex--,J.bitcount-=8;if(K=J.source[J.sourceIndex+1],K=256*K+J.source[J.sourceIndex],Y=J.source[J.sourceIndex+3],Y=256*Y+J.source[J.sourceIndex+2],K!==(~Y&65535))return X5;J.sourceIndex+=4;for(X=K;X;--X)J.dest[J.destLen++]=J.source[J.sourceIndex++];return J.bitcount=0,U7}function WY(J,K){var Y=new KY(J,K),X,Z,Q;do{switch(X=ZY(Y),Z=M8(Y,2,0),Z){case 0:Q=HY(Y);break;case 1:Q=Y5(Y,Z5,Q5);break;case 2:QY(Y,Y.ltree,Y.dtree),Q=Y5(Y,Y.ltree,Y.dtree);break;default:Q=X5}if(Q!==U7)throw new Error("Data error")}while(!X);if(Y.destLen<Y.dest.length)if(typeof Y.dest.slice==="function")return Y.dest.slice(0,Y.destLen);else return Y.dest.subarray(0,Y.destLen);return Y.dest}XY(Z5,Q5);w5($7,V7,4,3);w5(H5,W5,2,1);$7[28]=0;V7[28]=258;z5.exports=WY});var B5=g0((NB,V5)=>{var wY=new Uint8Array(new Uint32Array([305419896]).buffer)[0]===18,$5=(J,K,Y)=>{let X=J[K];J[K]=J[Y],J[Y]=X},zY=(J)=>{let K=J.length;for(let Y=0;Y<K;Y+=4)$5(J,Y,Y+3),$5(J,Y+1,Y+2)},UY=(J)=>{if(wY)zY(J)};V5.exports={swap32LE:UY}});var M5=g0((LB,G5)=>{var q5=U5(),{swap32LE:$Y}=B5();class A5{constructor(J){let K=typeof J.readUInt32BE==="function"&&typeof J.slice==="function";if(K||J instanceof Uint8Array){let Y;if(K)this.highStart=J.readUInt32LE(0),this.errorValue=J.readUInt32LE(4),Y=J.readUInt32LE(8),J=J.slice(12);else{let X=new DataView(J.buffer);this.highStart=X.getUint32(0,!0),this.errorValue=X.getUint32(4,!0),Y=X.getUint32(8,!0),J=J.subarray(12)}J=q5(J,new Uint8Array(Y)),J=q5(J,new Uint8Array(Y)),$Y(J),this.data=new Uint32Array(J.buffer)}else({data:this.data,highStart:this.highStart,errorValue:this.errorValue}=J)}get(J){let K;if(J<0||J>1114111)return this.errorValue;if(J<55296||J>56319&&J<=65535)return K=(this.data[J>>5]<<2)+(J&31),this.data[K];if(J<=65535)return K=(this.data[2048+(J-55296>>5)]<<2)+(J&31),this.data[K];if(J<this.highStart)return K=this.data[2080+(J>>11)],K=this.data[K+(J>>5&63)],K=(K<<2)+(J&31),this.data[K];return this.data[this.data.length-4]}}G5.exports=A5});var O5=g0((t6)=>{var VY="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(J){var K=typeof Uint8Array!=="undefined"?Uint8Array:Array,Y=43,X=47,Z=48,Q=97,H=65,w=45,W=95;function z(V){var B=V.charCodeAt(0);if(B===Y||B===w)return 62;if(B===X||B===W)return 63;if(B<Z)return-1;if(B<Z+10)return B-Z+26+26;if(B<H+26)return B-H;if(B<Q+26)return B-Q+26}function U(V){var B,M,q,G,N,L;if(V.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=V.length;N=V.charAt(_-2)==="="?2:V.charAt(_-1)==="="?1:0,L=new K(V.length*3/4-N),q=N>0?V.length-4:V.length;var D=0;function E(j){L[D++]=j}for(B=0,M=0;B<q;B+=4,M+=3)G=z(V.charAt(B))<<18|z(V.charAt(B+1))<<12|z(V.charAt(B+2))<<6|z(V.charAt(B+3)),E((G&16711680)>>16),E((G&65280)>>8),E(G&255);if(N===2)G=z(V.charAt(B))<<2|z(V.charAt(B+1))>>4,E(G&255);else if(N===1)G=z(V.charAt(B))<<10|z(V.charAt(B+1))<<4|z(V.charAt(B+2))>>2,E(G>>8&255),E(G&255);return L}function $(V){var B,M=V.length%3,q="",G,N;function L(D){return VY.charAt(D)}function _(D){return L(D>>18&63)+L(D>>12&63)+L(D>>6&63)+L(D&63)}for(B=0,N=V.length-M;B<N;B+=3)G=(V[B]<<16)+(V[B+1]<<8)+V[B+2],q+=_(G);switch(M){case 1:G=V[V.length-1],q+=L(G>>2),q+=L(G<<4&63),q+="==";break;case 2:G=(V[V.length-2]<<8)+V[V.length-1],q+=L(G>>10),q+=L(G>>4&63),q+=L(G<<2&63),q+="=";break}return q}J.toByteArray=U,J.fromByteArray=$})(typeof t6==="undefined"?t6.base64js={}:t6)});var P5=g0((EB,C5)=>{var G7=40,M7=41,K9=39,O7=34,N7=92,z6=47,L7=44,j7=58,Y9=42,DY=117,IY=85,TY=43,CY=/^[a-f0-9?-]+$/i;C5.exports=function(J){var K=[],Y=J,X,Z,Q,H,w,W,z,U,$=0,V=Y.charCodeAt($),B=Y.length,M=[{nodes:K}],q=0,G,N="",L="",_="";while($<B)if(V<=32){X=$;do X+=1,V=Y.charCodeAt(X);while(V<=32);if(H=Y.slice($,X),Q=K[K.length-1],V===M7&&q)_=H;else if(Q&&Q.type==="div")Q.after=H,Q.sourceEndIndex+=H.length;else if(V===L7||V===j7||V===z6&&Y.charCodeAt(X+1)!==Y9&&(!G||G&&G.type==="function"&&G.value!=="calc"))L=H;else K.push({type:"space",sourceIndex:$,sourceEndIndex:X,value:H});$=X}else if(V===K9||V===O7){X=$,Z=V===K9?"'":'"',H={type:"string",sourceIndex:$,quote:Z};do if(w=!1,X=Y.indexOf(Z,X+1),~X){W=X;while(Y.charCodeAt(W-1)===N7)W-=1,w=!w}else Y+=Z,X=Y.length-1,H.unclosed=!0;while(w);H.value=Y.slice($+1,X),H.sourceEndIndex=H.unclosed?X:X+1,K.push(H),$=X+1,V=Y.charCodeAt($)}else if(V===z6&&Y.charCodeAt($+1)===Y9){if(X=Y.indexOf("*/",$),H={type:"comment",sourceIndex:$,sourceEndIndex:X+2},X===-1)H.unclosed=!0,X=Y.length,H.sourceEndIndex=X;H.value=Y.slice($+2,X),K.push(H),$=X+2,V=Y.charCodeAt($)}else if((V===z6||V===Y9)&&G&&G.type==="function"&&G.value==="calc")H=Y[$],K.push({type:"word",sourceIndex:$-L.length,sourceEndIndex:$+H.length,value:H}),$+=1,V=Y.charCodeAt($);else if(V===z6||V===L7||V===j7)H=Y[$],K.push({type:"div",sourceIndex:$-L.length,sourceEndIndex:$+H.length,value:H,before:L,after:""}),L="",$+=1,V=Y.charCodeAt($);else if(G7===V){X=$;do X+=1,V=Y.charCodeAt(X);while(V<=32);if(U=$,H={type:"function",sourceIndex:$-N.length,value:N,before:Y.slice(U+1,X)},$=X,N==="url"&&V!==K9&&V!==O7){X-=1;do if(w=!1,X=Y.indexOf(")",X+1),~X){W=X;while(Y.charCodeAt(W-1)===N7)W-=1,w=!w}else Y+=")",X=Y.length-1,H.unclosed=!0;while(w);z=X;do z-=1,V=Y.charCodeAt(z);while(V<=32);if(U<z){if($!==z+1)H.nodes=[{type:"word",sourceIndex:$,sourceEndIndex:z+1,value:Y.slice($,z+1)}];else H.nodes=[];if(H.unclosed&&z+1!==X)H.after="",H.nodes.push({type:"space",sourceIndex:z+1,sourceEndIndex:X,value:Y.slice(z+1,X)});else H.after=Y.slice(z+1,X),H.sourceEndIndex=X}else H.after="",H.nodes=[];$=X+1,H.sourceEndIndex=H.unclosed?X:$,V=Y.charCodeAt($),K.push(H)}else q+=1,H.after="",H.sourceEndIndex=$+1,K.push(H),M.push(H),K=H.nodes=[],G=H;N=""}else if(M7===V&&q)$+=1,V=Y.charCodeAt($),G.after=_,G.sourceEndIndex+=_.length,_="",q-=1,M[M.length-1].sourceEndIndex=$,M.pop(),G=M[q],K=G.nodes;else{X=$;do{if(V===N7)X+=1;X+=1,V=Y.charCodeAt(X)}while(X<B&&!(V<=32||V===K9||V===O7||V===L7||V===j7||V===z6||V===G7||V===Y9&&G&&G.type==="function"&&G.value==="calc"||V===z6&&G.type==="function"&&G.value==="calc"||V===M7&&q));if(H=Y.slice($,X),G7===V)N=H;else if((DY===H.charCodeAt(0)||IY===H.charCodeAt(0))&&TY===H.charCodeAt(1)&&CY.test(H.slice(2)))K.push({type:"unicode-range",sourceIndex:$,sourceEndIndex:X,value:H});else K.push({type:"word",sourceIndex:$,sourceEndIndex:X,value:H});$=X}for($=M.length-1;$;$-=1)M[$].unclosed=!0,M[$].sourceEndIndex=Y.length;return M[0].nodes}});var v5=g0((_B,S5)=>{S5.exports=function J(K,Y,X){var Z,Q,H,w;for(Z=0,Q=K.length;Z<Q;Z+=1){if(H=K[Z],!X)w=Y(H,Z,K);if(w!==!1&&H.type==="function"&&Array.isArray(H.nodes))J(H.nodes,Y,X);if(X)Y(H,Z,K)}}});var x5=g0((RB,g5)=>{function y5(J,K){var{type:Y,value:X}=J,Z,Q;if(K&&(Q=K(J))!==void 0)return Q;else if(Y==="word"||Y==="space")return X;else if(Y==="string")return Z=J.quote||"",Z+X+(J.unclosed?"":Z);else if(Y==="comment")return"/*"+X+(J.unclosed?"":"*/");else if(Y==="div")return(J.before||"")+X+(J.after||"");else if(Array.isArray(J.nodes)){if(Z=k5(J.nodes,K),Y!=="function")return Z;return X+"("+(J.before||"")+Z+(J.after||"")+(J.unclosed?"":")")}return X}function k5(J,K){var Y,X;if(Array.isArray(J)){Y="";for(X=J.length-1;~X;X-=1)Y=y5(J[X],K)+Y;return Y}return y5(J,K)}g5.exports=k5});var b5=g0((DB,h5)=>{var X9=45,Z9=43,F7=46,PY=101,SY=69;function vY(J){var K=J.charCodeAt(0),Y;if(K===Z9||K===X9){if(Y=J.charCodeAt(1),Y>=48&&Y<=57)return!0;var X=J.charCodeAt(2);if(Y===F7&&X>=48&&X<=57)return!0;return!1}if(K===F7){if(Y=J.charCodeAt(1),Y>=48&&Y<=57)return!0;return!1}if(K>=48&&K<=57)return!0;return!1}h5.exports=function(J){var K=0,Y=J.length,X,Z,Q;if(Y===0||!vY(J))return!1;if(X=J.charCodeAt(K),X===Z9||X===X9)K++;while(K<Y){if(X=J.charCodeAt(K),X<48||X>57)break;K+=1}if(X=J.charCodeAt(K),Z=J.charCodeAt(K+1),X===F7&&Z>=48&&Z<=57){K+=2;while(K<Y){if(X=J.charCodeAt(K),X<48||X>57)break;K+=1}}if(X=J.charCodeAt(K),Z=J.charCodeAt(K+1),Q=J.charCodeAt(K+2),(X===PY||X===SY)&&(Z>=48&&Z<=57||(Z===Z9||Z===X9)&&Q>=48&&Q<=57)){K+=Z===Z9||Z===X9?3:2;while(K<Y){if(X=J.charCodeAt(K),X<48||X>57)break;K+=1}}return{number:J.slice(0,K),unit:J.slice(K)}}});var E7=g0((IB,d5)=>{var yY=P5(),m5=v5(),f5=x5();function x8(J){if(this instanceof x8)return this.nodes=yY(J),this;return new x8(J)}x8.prototype.toString=function(){return Array.isArray(this.nodes)?f5(this.nodes):""};x8.prototype.walk=function(J,K){return m5(this.nodes,J,K),this};x8.unit=b5();x8.walk=m5;x8.stringify=f5;d5.exports=x8});var u5=g0((TB,c5)=>{c5.exports=function(J){if(typeof J==="string")return l5(J);return _7(J)};function _7(J){if(!J||typeof J!=="object")return J;if(gY(J)||xY(J))return J;if(kY(J))return mY(J,_7);return fY(bY(J),function(K,Y){var X=l5(Y);return K[X]=_7(J[Y]),K},{})}function l5(J){return J.replace(/[_.-](\w|$)/g,function(K,Y){return Y.toUpperCase()})}var kY=Array.isArray||function(J){return Object.prototype.toString.call(J)==="[object Array]"},gY=function(J){return Object.prototype.toString.call(J)==="[object Date]"},xY=function(J){return Object.prototype.toString.call(J)==="[object RegExp]"},hY=Object.prototype.hasOwnProperty,bY=Object.keys||function(J){var K=[];for(var Y in J)if(hY.call(J,Y))K.push(Y);return K};function mY(J,K){if(J.map)return J.map(K);var Y=[];for(var X=0;X<J.length;X++)Y.push(K(J[X],X));return Y}function fY(J,K,Y){if(J.reduce)return J.reduce(K,Y);for(var X=0;X<J.length;X++)Y=K(Y,J[X],X);return Y}});var p5=g0((CB,dY)=>{dY.exports={black:"#000000",silver:"#c0c0c0",gray:"#808080",white:"#ffffff",maroon:"#800000",red:"#ff0000",purple:"#800080",fuchsia:"#ff00ff",green:"#008000",lime:"#00ff00",olive:"#808000",yellow:"#ffff00",navy:"#000080",blue:"#0000ff",teal:"#008080",aqua:"#00ffff",orange:"#ffa500",aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",blanchedalmond:"#ffebcd",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",limegreen:"#32cd32",linen:"#faf0e6",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",oldlace:"#fdf5e6",olivedrab:"#6b8e23",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",whitesmoke:"#f5f5f5",yellowgreen:"#9acd32",rebeccapurple:"#663399"}});var H9=g0((ZJ)=>{Object.defineProperty(ZJ,"__esModule",{value:!0});function C7(J){return J&&typeof J==="object"&&"default"in J?J.default:J}var r5=E7(),lY=C7(r5),cY=C7(u5()),uY=C7(p5()),pY=function J(K){if(K.type!=="string")return null;return K.value.replace(/\\([0-9a-f]{1,6})(?:\s|$)/gi,function(Y,X){return String.fromCharCode(parseInt(X,16))}).replace(/\\/g,"")},iY=/^(#(?:[0-9a-f]{3,4}){1,2})$/i,oY=/^(rgba?|hsla?|hwb|lab|lch|gray|color)$/,rY=function J(K){if(K.type==="word"&&(iY.test(K.value)||(K.value in uY)||K.value==="transparent"))return K.value;else if(K.type==="function"&&oY.test(K.value))return r5.stringify(K);return null},nY=/^(none)$/i,sY=/^(auto)$/i,aY=/(^-?[_a-z][_a-z0-9-]*$)/i,tY=/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?)$/i,eY=/^(0$|(?:[+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?)(?=px$))/i,JX=/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?(ch|em|ex|rem|vh|vw|vmin|vmax|cm|mm|in|pc|pt))$/i,KX=/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?(?:deg|rad))$/i,YX=/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?%)$/i,P7=function J(K){return function(Y){return K(Y)?"<token>":null}},XX=function J(K){return function(Y){return Y.type===K?Y.value:null}},P0=function J(K,Y){if(Y===void 0)Y=String;return function(X){if(X.type!=="word")return null;var Z=X.value.match(K);if(Z===null)return null;var Q=Y(Z[1]);return Q}},v0=P7(function(J){return J.type==="space"}),n5=P7(function(J){return J.type==="div"&&J.value==="/"}),ZX=P7(function(J){return J.type==="div"&&J.value===","}),QX=XX("word"),S7=P0(nY),I7=P0(sY),$6=P0(tY,Number),o0=P0(eY,Number),R8=P0(JX),s5=P0(KX,function(J){return J.toLowerCase()}),v7=P0(YX),Q9=P0(aY),HX=pY,E6=rY,T7=P0(/^(none|underline|line-through)$/i),WX=function J(K){var Y=K.expect($6);if(K.hasTokens())K.expect(n5),Y/=K.expect($6);return{aspectRatio:Y}},wX=P0(/^(solid|dashed|dotted)$/),zX=1,UX="black",$X="solid",VX=function J(K){var Y,X,Z;if(K.matches(S7))return K.expectEmpty(),{borderWidth:0,borderColor:"black",borderStyle:"solid"};var Q=0;while(Q<3&&K.hasTokens()){if(Q!==0)K.expect(v0);if(Y===void 0&&K.matches(o0,R8))Y=K.lastValue;else if(X===void 0&&K.matches(E6))X=K.lastValue;else if(Z===void 0&&K.matches(wX))Z=K.lastValue;else K.throw();Q+=1}if(K.expectEmpty(),Y===void 0)Y=zX;if(X===void 0)X=UX;if(Z===void 0)Z=$X;return{borderWidth:Y,borderColor:X,borderStyle:Z}},_6=function J(K){var Y=K.types,X=Y===void 0?[o0,R8,v7]:Y,Z=K.directions,Q=Z===void 0?["Top","Right","Bottom","Left"]:Z,H=K.prefix,w=H===void 0?"":H,W=K.suffix,z=W===void 0?"":W;return function(U){var $,V=[];V.push(U.expect.apply(U,X));while(V.length<4&&U.hasTokens())U.expect(v0),V.push(U.expect.apply(U,X));U.expectEmpty();var B=V[0],M=V[1],q=M===void 0?B:M,G=V[2],N=G===void 0?B:G,L=V[3],_=L===void 0?q:L,D=function E(j){return""+w+Q[j]+z};return $={},$[D(0)]=B,$[D(1)]=q,$[D(2)]=N,$[D(3)]=_,$}},a5=function J(K){var Y=K.expect(o0),X=K.matches(v0)?K.expect(o0):Y;return K.expectEmpty(),{width:Y,height:X}},t5=function J(K){var Y,X,Z,Q;if(K.matches(S7))return K.expectEmpty(),{offset:{width:0,height:0},radius:0,color:"black"};var H=!1;while(K.hasTokens()){if(H)K.expect(v0);if(Y===void 0&&K.matches(o0,R8))if(Y=K.lastValue,K.expect(v0),X=K.expect(o0,R8),K.saveRewindPoint(),K.matches(v0)&&K.matches(o0,R8))Z=K.lastValue;else K.rewind();else if(Q===void 0&&K.matches(E6))Q=K.lastValue;else K.throw();H=!0}if(Y===void 0)K.throw();return{offset:{width:Y,height:X},radius:Z!==void 0?Z:0,color:Q!==void 0?Q:"black"}},BX=function J(K){var Y=t5(K),X=Y.offset,Z=Y.radius,Q=Y.color;return{shadowOffset:X,shadowRadius:Z,shadowColor:Q,shadowOpacity:1}},qX=1,AX=1,GX=0,MX=function J(K){var Y,X,Z;if(K.matches(S7))return K.expectEmpty(),{flexGrow:0,flexShrink:0,flexBasis:"auto"};if(K.saveRewindPoint(),K.matches(I7)&&!K.hasTokens())return{flexGrow:1,flexShrink:1,flexBasis:"auto"};K.rewind();var Q=0;while(Q<2&&K.hasTokens()){if(Q!==0)K.expect(v0);if(Y===void 0&&K.matches($6))if(Y=K.lastValue,K.saveRewindPoint(),K.matches(v0)&&K.matches($6))X=K.lastValue;else K.rewind();else if(Z===void 0&&K.matches(o0,R8,v7))Z=K.lastValue;else if(Z===void 0&&K.matches(I7))Z="auto";else K.throw();Q+=1}if(K.expectEmpty(),Y===void 0)Y=qX;if(X===void 0)X=AX;if(Z===void 0)Z=GX;return{flexGrow:Y,flexShrink:X,flexBasis:Z}},OX=P0(/(nowrap|wrap|wrap-reverse)/),NX=P0(/(row|row-reverse|column|column-reverse)/),LX="nowrap",jX="row",FX=function J(K){var Y,X,Z=0;while(Z<2&&K.hasTokens()){if(Z!==0)K.expect(v0);if(Y===void 0&&K.matches(OX))Y=K.lastValue;else if(X===void 0&&K.matches(NX))X=K.lastValue;else K.throw();Z+=1}if(K.expectEmpty(),Y===void 0)Y=LX;if(X===void 0)X=jX;return{flexWrap:Y,flexDirection:X}},e5=function J(K){var Y;if(K.matches(HX))Y=K.lastValue;else{Y=K.expect(Q9);while(K.hasTokens()){K.expect(v0);var X=K.expect(Q9);Y+=" "+X}}return K.expectEmpty(),{fontFamily:Y}},EX=P0(/^(normal)$/),_X=P0(/^(italic)$/),RX=P0(/^([1-9]00|bold)$/),DX=P0(/^(small-caps)$/),IX="normal",TX="normal",CX=[],PX=function J(K){var Y,X,Z,Q,H=0;while(H<3&&K.hasTokens()){if(K.matches(EX));else if(Y===void 0&&K.matches(_X))Y=K.lastValue;else if(X===void 0&&K.matches(RX))X=K.lastValue;else if(Z===void 0&&K.matches(DX))Z=[K.lastValue];else break;K.expect(v0),H+=1}var w=K.expect(o0,R8);if(K.matches(n5))Q=K.expect(o0,R8);K.expect(v0);var W=e5(K),z=W.fontFamily;if(Y===void 0)Y=IX;if(X===void 0)X=TX;if(Z===void 0)Z=CX;var U={fontStyle:Y,fontWeight:X,fontVariant:Z,fontSize:w,fontFamily:z};if(Q!==void 0)U.lineHeight=Q;return U},SX=function J(K){var Y=[K.expect(Q9)];while(K.hasTokens())K.expect(v0),Y.push(K.expect(Q9));return{fontVariant:Y}},vX=P0(/(flex-(?:start|end)|center|stretch|space-(?:between|around))/),yX=P0(/(flex-(?:start|end)|center|space-(?:between|around|evenly))/),kX=function J(K){var Y=K.expect(vX),X;if(K.hasTokens())K.expect(v0),X=K.expect(yX);else X="stretch";return K.expectEmpty(),{alignContent:Y,justifyContent:X}},gX=P0(/^(solid|double|dotted|dashed)$/),xX="none",hX="solid",bX="black",mX=function J(K){var Y,X,Z,Q=!1;while(K.hasTokens()){if(Q)K.expect(v0);if(Y===void 0&&K.matches(T7)){var H=[K.lastValue.toLowerCase()];if(K.saveRewindPoint(),H[0]!=="none"&&K.matches(v0)&&K.matches(T7))H.push(K.lastValue.toLowerCase()),H.sort().reverse();else K.rewind();Y=H.join(" ")}else if(X===void 0&&K.matches(gX))X=K.lastValue;else if(Z===void 0&&K.matches(E6))Z=K.lastValue;else K.throw();Q=!0}return{textDecorationLine:Y!==void 0?Y:xX,textDecorationColor:Z!==void 0?Z:bX,textDecorationStyle:X!==void 0?X:hX}},fX=function J(K){var Y=[],X=!1;while(K.hasTokens()){if(X)K.expect(v0);Y.push(K.expect(T7).toLowerCase()),X=!0}return Y.sort().reverse(),{textDecorationLine:Y.join(" ")}},dX=function J(K){var Y=t5(K),X=Y.offset,Z=Y.radius,Q=Y.color;return{textShadowOffset:X,textShadowRadius:Z,textShadowColor:Q}},y7=function J(K){return function(Y){var X=Y.expect(K);return Y.expectEmpty(),X}},R7=y7($6),i5=y7(o0),U6=y7(s5),k7=function J(K){return function(Y,X){return function(Z){var Q,H,w=Z.expect(K),W;if(Z.hasTokens())Z.expect(ZX),W=Z.expect(K);else if(X!==void 0)W=X;else return w;return Z.expectEmpty(),[(Q={},Q[Y+"Y"]=W,Q),(H={},H[Y+"X"]=w,H)]}}},lX=k7($6),cX=k7(o0),uX=k7(s5),pX={perspective:R7,scale:lX("scale"),scaleX:R7,scaleY:R7,translate:cX("translate",0),translateX:i5,translateY:i5,rotate:U6,rotateX:U6,rotateY:U6,rotateZ:U6,skewX:U6,skewY:U6,skew:uX("skew","0deg")},iX=function J(K){var Y=[],X=!1;while(K.hasTokens()){if(X)K.expect(v0);var Z=K.expectFunction(),Q=Z.functionName,H=pX[Q](Z);if(!Array.isArray(H)){var w;H=[(w={},w[Q]=H,w)]}Y=H.concat(Y),X=!0}return{transform:Y}},oX=function J(K){return{backgroundColor:K.expect(E6)}},rX=_6({types:[E6],prefix:"border",suffix:"Color"}),nX=_6({directions:["TopLeft","TopRight","BottomRight","BottomLeft"],prefix:"border",suffix:"Radius"}),sX=_6({prefix:"border",suffix:"Width"}),aX=_6({types:[o0,R8,v7,I7],prefix:"margin"}),tX=_6({prefix:"padding"}),eX=function J(K){return{fontWeight:K.expect(QX)}},JZ=function J(K){return{shadowOffset:a5(K)}},KZ=function J(K){return{textShadowOffset:a5(K)}},JJ={aspectRatio:WX,background:oX,border:VX,borderColor:rX,borderRadius:nX,borderWidth:sX,boxShadow:BX,flex:MX,flexFlow:FX,font:PX,fontFamily:e5,fontVariant:SX,fontWeight:eX,margin:aX,padding:tX,placeContent:kX,shadowOffset:JZ,textShadow:dX,textShadowOffset:KZ,textDecoration:mX,textDecorationLine:fX,transform:iX},o5,PB=o5!=null?new RegExp(o5.join("|")):null,D7="SYMBOL_MATCH",YZ=function(){function J(Y,X){this.index=0,this.nodes=Y,this.functionName=X!=null?X.value:null,this.lastValue=null,this.rewindIndex=-1}var K=J.prototype;return K.hasTokens=function Y(){return this.index<=this.nodes.length-1},K[D7]=function(){if(!this.hasTokens())return null;var Y=this.nodes[this.index];for(var X=0;X<arguments.length;X+=1){var Z=X<0||arguments.length<=X?void 0:arguments[X],Q=Z(Y);if(Q!==null)return this.index+=1,this.lastValue=Q,Q}return null},K.matches=function Y(){return this[D7].apply(this,arguments)!==null},K.expect=function Y(){var X=this[D7].apply(this,arguments);return X!==null?X:this.throw()},K.matchesFunction=function Y(){var X=this.nodes[this.index];if(X.type!=="function")return null;var Z=new J(X.nodes,X);return this.index+=1,this.lastValue=null,Z},K.expectFunction=function Y(){var X=this.matchesFunction();return X!==null?X:this.throw()},K.expectEmpty=function Y(){if(this.hasTokens())this.throw()},K.throw=function Y(){throw new Error("Unexpected token type: "+this.nodes[this.index].type)},K.saveRewindPoint=function Y(){this.rewindIndex=this.index},K.rewind=function Y(){if(this.rewindIndex===-1)throw new Error("Internal error");this.index=this.rewindIndex,this.lastValue=null},J}(),XZ=/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?)(?:px)?$/i,ZZ=/^true|false$/i,QZ=/^null$/i,HZ=/^undefined$/i,KJ=function J(K,Y){if(!1)var X,Z;var Q=Y.match(XZ);if(Q!==null)return Number(Q[1]);var H=Y.match(ZZ);if(H!==null)return H[0].toLowerCase()==="true";var w=Y.match(QZ);if(w!==null)return null;var W=Y.match(HZ);if(W!==null)return;return Y},WZ=function J(K,Y){var X=lY(Y),Z=new YZ(X.nodes);return JJ[K](Z)},wZ=WZ,YJ=function J(K,Y,X){var Z,Q=X===!1||!(K in JJ),H=Y.trim(),w=Q?(Z={},Z[K]=KJ(K,H),Z):wZ(K,H);return w},XJ=function J(K){var Y=/^--\w+/.test(K);if(Y)return K;return cY(K)},zZ=function J(K,Y){if(Y===void 0)Y=[];return K.reduce(function(X,Z){var Q=XJ(Z[0]),H=Z[1],w=Y.indexOf(Q)===-1;return Object.assign(X,YJ(Q,H,w))},{})};ZJ.default=zZ;ZJ.getPropertyName=XJ;ZJ.getStylesForProperty=YJ;ZJ.transformRawValue=KJ});var HJ=g0((QJ,W9)=>{/*!
|
|
3
|
+
* https://github.com/gilmoreorless/css-background-parser
|
|
4
|
+
* Copyright © 2015 Gilmore Davidson under the MIT license: http://gilmoreorless.mit-license.org/
|
|
5
|
+
*/(function(J){function K(H){if(!(this instanceof K))return new K;this.backgrounds=H||[]}K.prototype.toString=function(){return this.backgrounds.join(", ")};function Y(H){if(!(this instanceof Y))return new Y(H);H=H||{};var w=this;function W(z,U){w[z]=z in H?H[z]:U}W("color",""),W("image","none"),W("attachment","scroll"),W("clip","border-box"),W("origin","padding-box"),W("position","0% 0%"),W("repeat","repeat"),W("size","auto")}Y.prototype.toString=function(){var H=[this.image,this.repeat,this.attachment,this.position+" / "+this.size,this.origin,this.clip];if(this.color)H.unshift(this.color);return H.join(" ")},J.BackgroundList=K,J.Background=Y;function X(H){var w=[],W=/[,\(\)]/,z=0,U="";if(H==null)return w;while(H.length){var $=W.exec(H);if(!$)break;var V=$[0],B=!1;switch(V){case",":if(!z)w.push(U.trim()),U="",B=!0;break;case"(":z++;break;case")":z--;break}var M=$.index+1;U+=H.slice(0,B?M-1:M),H=H.slice(M)}if(U.length||H.length)w.push((U+H).trim());return w}function Z(H){return H.trim()}function Q(H){return(H||"").split(",").map(Z)}J.parseElementStyle=function(H){var w=new K;if(H==null)return w;var W=X(H.backgroundImage),z=H.backgroundColor,U=Q(H.backgroundAttachment),$=Q(H.backgroundClip),V=Q(H.backgroundOrigin),B=Q(H.backgroundPosition),M=Q(H.backgroundRepeat),q=Q(H.backgroundSize),G;for(var N=0,L=W.length;N<L;N++){if(G=new Y({image:W[N],attachment:U[N%U.length],clip:$[N%$.length],origin:V[N%V.length],position:B[N%B.length],repeat:M[N%M.length],size:q[N%q.length]}),N===L-1)G.color=z;w.backgrounds.push(G)}return w}})(function(J){if(typeof W9!=="undefined"&&QJ!==void 0)return QJ;return J.cssBgParser={}}(QJ))});var wJ=g0((vB,WJ)=>{var qZ=/,(?![^\(]*\))/,AZ=/\s(?![^(]*\))/,GZ=/^[0-9]+[a-zA-Z%]+?$/,MZ=(J)=>{let K=J.split(AZ),Y=K.includes("inset"),X=K.slice(-1)[0],Z=!NZ(X)?X:void 0,Q=K.filter((U)=>U!=="inset").filter((U)=>U!==Z).map(LZ),[H,w,W,z]=Q;return{inset:Y,offsetX:H,offsetY:w,blurRadius:W,spreadRadius:z,color:Z}},OZ=(J)=>{let{inset:K,offsetX:Y=0,offsetY:X=0,blurRadius:Z=0,spreadRadius:Q,color:H}=J||{};return[K?"inset":null,Y,X,Z,Q,H].filter((w)=>w!==null&&w!==void 0).map(jZ).map((w)=>(""+w).trim()).join(" ")},NZ=(J)=>J==="0"||GZ.test(J),LZ=(J)=>{if(!/px$/.test(J)&&J!=="0")return J;let K=parseFloat(J);return!isNaN(K)?K:J},jZ=(J)=>typeof J==="number"&&J!==0?J+"px":J,FZ=(J)=>J.split(qZ).map((K)=>K.trim()).map(MZ),EZ=(J)=>J.map(OZ).join(", ");WJ.exports={parse:FZ,stringify:EZ}});var UJ=g0((yB,zJ)=>{var _Z=new RegExp("[^#a-f\\d]","gi"),RZ=new RegExp("^#?[a-f\\d]{3}[a-f\\d]?$|^#?[a-f\\d]{6}([a-f\\d]{2})?$","i");zJ.exports=(J,K={})=>{if(typeof J!=="string"||_Z.test(J)||!RZ.test(J))throw new TypeError("Expected a valid hex string");J=J.replace(/^#/,"");let Y=1;if(J.length===8)Y=Number.parseInt(J.slice(6,8),16)/255,J=J.slice(0,6);if(J.length===4)Y=Number.parseInt(J.slice(3,4).repeat(2),16)/255,J=J.slice(0,3);if(J.length===3)J=J[0]+J[0]+J[1]+J[1]+J[2]+J[2];let X=Number.parseInt(J,16),Z=X>>16,Q=X>>8&255,H=X&255,w=typeof K.alpha==="number"?K.alpha:Y;if(K.format==="array")return[Z,Q,H,w];if(K.format==="css"){let W=w===1?"":` / ${Number((w*100).toFixed(2))}%`;return`rgb(${Z} ${Q} ${H}${W})`}return{red:Z,green:Q,blue:H,alpha:w}}});var GJ=g0((gB,AJ)=>{/*!
|
|
6
|
+
* escape-html
|
|
7
|
+
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
8
|
+
* Copyright(c) 2015 Andreas Lubbe
|
|
9
|
+
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
10
|
+
* MIT Licensed
|
|
11
|
+
*/var oZ=/["'&<>]/;AJ.exports=rZ;function rZ(J){var K=""+J,Y=oZ.exec(K);if(!Y)return K;var X,Z="",Q=0,H=0;for(Q=Y.index;Q<K.length;Q++){switch(K.charCodeAt(Q)){case 34:X=""";break;case 38:X="&";break;case 39:X="'";break;case 60:X="<";break;case 62:X=">";break;default:continue}if(H!==Q)Z+=K.substring(H,Q);H=Q+1,Z+=X}return H!==Q?Z+K.substring(H,Q):Z}});import{AsyncLocalStorage as pK}from"async_hooks";class W6 extends d0{service;static _name="BroadcastingServiceContainer";publishCb;context=new pK;constructor(J){super();this.service=J}onPublish(J){this.publishCb=J}publish(...J){let[K,Y,X]=J;this.publishCb(K,Y,X)}async handleMessage(J,K){let Y=JSON.parse(K);if(Y.type==="subscribe"){let X=Object.entries(this.service.channels).sort(([Z],[Q])=>Z.length-Q.length);for(let[Z,Q]of X){let H=new URLPattern({pathname:Z});if(H.test({pathname:Y.topic})){let w=H.exec({pathname:Y.topic})?.pathname.groups,W=new Q;if(await W.subscribe.call(W,w))J.subscribe(Y.topic);break}}}if(Y.type==="broadcast")J.publish(Y.topic,JSON.stringify({topic:Y.topic,data:Y.payload}));if(Y.type==="unsubscribe")J.unsubscribe(Y.topic)}run(J,K){let Y=J.get("Cookie"),X=new Map;if(Y){let Z=Y.split(";");for(let Q of Z){let[H,w]=Q.split("=");X.set(H.trim(),w.trim())}}this.context.run({headers:J,cookies:X},K)}}class k8{static async user(){let J=F0.getStore(),K=W6.use().context.getStore(),Y="",X="";if(J?.req)Y=J.req.cookies.get("access_token"),X=J.req.headers.get("User-Agent");if(K?.cookies)X=K.headers.get("User-Agent"),Y=K.cookies.get("access_token");let Z=J?.user;if(!Z)Z=(await R0.use().getSession(Y,X))?.user,J?.setUser(Z);if(Z)return Z;return null}static async guard(J){let K=await k8.user();if(!K)throw new s6;try{if(!await J(K))throw new s6}catch(Y){throw new s6}}static async guardSafe(J){let K=await k8.user();if(!K)return!1;try{return await J(K)}catch(Y){return!1}}static async authenticate(J){await R0.use().authenticate(J)}static async createMagicLink(J){return await R0.use().createMagicLinkToken(J)}}class w6{static getSupportedLocales(){return C0.use().service.supportedLocales}static getDefaultLocale(){return C0.use().service.defaultLocale}static locale(){return C0.use().detectLocale(F0.getStore().req)}static setLocale(J=w6.locale()){let K=C0.use(),Y=J;if(!K.service.supportedLocales.includes(J))Y=K.service.defaultLocale;return F0.getStore().setCookie("i18n-locale",Y,{expires:new Date(Date.now()+31536000000)}),Y}}var d4=i0(iK(),1);import{Buffer as oK}from"buffer";class O6 extends d0{service;static _name="FileStorageServiceContainer";constructor(J){super();this.service=J}}class l4{static async put(J){return O6.use().service.driver.put(J)}static async metadata(J){let K=oK.from(await J.arrayBuffer());try{return await d4.default(K).metadata()}catch{return{}}}static async fetch(J){return O6.use().service.driver.fetch(J)}static list(J){return O6.use().service.driver.list(J)}static delete(){}}function c4(J){return Object.fromEntries(Object.entries(J).filter(([,K])=>{return K!==null&&K!==void 0}))}class n8 extends Error{constructor(){super("Adapter not found");this.name="AdapterNotFound"}}class t9{createSession(){throw new n8}deleteSession(){throw new n8}findSession(){throw new n8}findUserByEmailAddress(){throw new n8}updateSession(){throw new n8}createUser(){throw new n8}}class o4 extends $0{schema={email:{required:"Email is required",string:"Invalid email",email:"Invalid email"},password:{required:"Password is required"}}}class r4 extends $0{schema={name:{string:"Invalid name",required:"Name is required","min:2":"Name must be at least 3 characters"},email:{string:"Invalid email",required:"Email is required",email:"Invalid email"},password:{required:"Password is required","min:8":"Password must be at least 8 characters"}}}class n4 extends $0{schema={email:{required:"Email is required",email:"Invalid email"}}}class s4 extends $0{schema={password:{required:"Password is required",password:"Invalid password"}}}class l0 extends u4{provider=R0.use()?.provider;async me(){let J=await k8.user();if(!J)throw new i4;return J}async verifyEmail(J=new $0){let K=await J.input(),Y=R0.use()?.provider,X=await Y.adapter.findUserByVerificationToken(K.get("token"));if(!X)return{email:null};if(await Y.adapter.verifyUser(X.email),X)return{email:X.email};return{email:null}}async signInWithMagicLink(J=new $0){let K=R0.use(),Y=K.provider,X=J.search.get("token"),Z=decodeURIComponent(J.search.get("email")),Q=null;try{Q=await Y.adapter.findUserMagicLinkToken({email:Z,token:X})}catch(w){return console.log(w),{error:JSON.stringify(w)}}if(!Q)return{error:"Invalid token"};await Y.adapter.verifyUser(Z),await Y.adapter.deleteMagicLinkToken(Z);let H=await K.createOrUpdateSession({email:Z});return J.ctx().setCookie("access_token",H.token,{expires:H.absoluteExpiresAt}),await Y.onSignIn(H),{session:H}}async signInWithPin(J=new $0){let K=R0.use(),Y=K.provider,X=await J.input(),{email:Z,pin:Q}=X.toJSON();if(!await Y.adapter.findUserMagicLinkToken({email:Z,pin:Q}))throw new _8({pin:["Invalid pin"]});await Y.adapter.deleteMagicLinkToken(Z),await Y.adapter.verifyUser(Z);let w=await K.createOrUpdateSession({email:Z});return J.ctx().setCookie("access_token",w.token,{expires:w.absoluteExpiresAt}),await Y.onSignIn(w),{session:w}}async signIn(J=new o4){let K=await J.input(),{email:Y,password:X}=K.toJSON(),Z=R0.use().provider,Q=await Z.adapter.findUserByEmailAddress(Y,Z.verifyEmail);if(!Q)throw new _8({invalid_credentials:["Invalid credentials"]});if(!await Z.verifyPassword(X,Q.password))throw new _8({invalid_credentials:["Invalid credentials"]});let w=await R0.use().createOrUpdateSession({email:Q.email,id:Q.id});J.ctx().setCookie("access_token",w.token,{expires:w.absoluteExpiresAt}),await Z.onSignIn(Q);let{password:W,...z}=Q;return z}async signUp(J=new r4){let K=await J.input(),{email:Y,password:X,name:Z,invitationId:Q}=K.toJSON(),H=R0.use().provider;if(await H.adapter.findUserByEmailAddress(Y,!1))throw new _8({email:["Email address already exists"]});let W=await H.hashPassword(X),z=C0.use().detectLocale(J),U;if(Q){if(U=await H.adapter.findInvitation(Q,Y),U)await H.adapter.deleteInvitationById(Q)}let $,V;if(U)$=await H.adapter.createUser({email:Y,name:Z,password:W,emailVerifiedAt:new Date,locale:z}),await H.adapter.createAccount({organizationId:U.organizationId,userId:$.id,organizationRole:U.role});else V=await H.generateEmailVerificationToken(Y),$=await H.adapter.createUser({email:Y,name:Z,password:W,verificationToken:V,locale:z});return await H.onSignUp($,V),$}async signOut(J=new $0){let K=J.cookies.get("access_token"),Y=await k8.user(),X=R0.use().provider;return await X.adapter.deleteSession({token:K}),J.ctx().setCookie("access_token","",{expires:new Date(0)}),await X.onSignOut(Y),{}}async forgotPassword(J=new n4){let K=await J.input(),{email:Y}=K.toJSON(),X=R0.use().provider,Z=await X.adapter.findUserByEmailAddress(Y,X.verifyEmail);if(!Z)return{};let Q=await X.generateForgotPasswordToken(Z);return await X.adapter.createPasswordResetToken({user:Z,token:Q}),await X.onForgotPassword(Z,Q),{}}async resetPassword(J=new s4){let K=R0.use().provider,Y=await J.input(),{password:X,token:Z}=Y.toJSON(),Q=await K.adapter.findPasswordResetToken({token:Z});if(!Q)throw new _8({token:["Invalid token"]});if(N6.Instant.from(Q.createdAt.toISOString()).add({hours:24}).until(N6.Now.instant()).sign>=0)throw new _8({token:["Token expired"]});await K.adapter.deletePasswordResetToken({token:Z});let w=await K.adapter.findUserByEmailAddress(Q.user.email,K.verifyEmail);if(!w)throw new _8({email:["User not found"]});let W=await K.hashPassword(X);return await K.adapter.updateUserPassword({id:w.id,password:W}),await K.adapter.deleteAllUserSessions(w.id),await K.onResetPassword(w),{}}async changePassword(J=new $0){let K=R0.use().provider,Y=await k8.user(),X=await J.input(),{oldPassword:Z,newPassword:Q}=X.toJSON(),{password:H}=await K.adapter.findUserByEmailAddress(Y.email,K.verifyEmail);if(!await K.verifyPassword(Z,H))throw new _8({oldPassword:["Incorrect password"]});let W=await K.hashPassword(Q);return await K.adapter.updateUserPassword({id:Y.id,password:W}),await K.adapter.deleteAllUserSessions(Y.id),{}}async oauthRedirect(J=new $0){let{provider:K}=J.params,Y=R0.use().provider.oauthProviders[K];if(!Y)throw new Error(`Invalid provider: ${K}`);return{destination:await Y.getRedirectUrl(J)}}async oauthCallback(J=new $0){let{provider:K}=J.params,Y=R0.use(),X=Y.provider,Z=X.oauthProviders[K],{email:Q,name:H,username:w,providerId:W}=await Z.onCallback(J);if(!w&&!Q)throw new Error("Email or username is required");let z=Q??`${w}:${K}`,U=await X.adapter.findUserByEmailAddress(z,!1),$=C0.use().detectLocale(J);if(!U)U=await X.adapter.createUser({email:z,name:H,locale:$,emailVerifiedAt:new Date}),await X.adapter.createSocialAccount({provider:K,userId:U.id,email:z,username:w,providerId:W,expiresAt:new Date,accessToken:"",refreshToken:""});let V=await Y.createOrUpdateSession({email:U.email,id:U.id});return J.ctx().setCookie("access_token",V.token,{expires:V.expiresAt}),await X.onSignIn(U),{destination:X.redirectPath}}async createMagicLinkToken(J=new $0){let K=await J.input(),{email:Y}=K.toJSON(),X=R0.use(),Z=X.provider,{user:Q,pin:H,token:w}=await X.createMagicLinkToken(Y);return await Z.onMagicLinkCreated(Q,{email:Y,pin:H,token:w}),{email:Y}}}class a4 extends e9{routes={"/:provider":this.redirect([l0,"oauthRedirect"]),"/:provider/callback":this.redirect([l0,"oauthCallback"])}}class J7 extends e9{routes={"/sign-in/magic-link":this.view("auth/MagicLinkSignIn",[l0,"signInWithMagicLink"]),"/oauth":a4}}class K7 extends A8{middlewares=["cache:private"];routes={"/sign-in":this.post(l0,"signIn"),"/sign-up":this.post(l0,"signUp"),"/sign-out":this.post(l0,"signOut"),"/forgot-password":this.post(l0,"forgotPassword"),"/reset-password":this.post(l0,"resetPassword"),"/change-password":this.post(l0,"changePassword"),"/verify-email":this.post(l0,"verifyEmail"),"/me":this.get(l0,"me").middleware(["auth"]),"/magic-link":this.post(l0,"createMagicLinkToken"),"/sign-in-with-pin":this.post(l0,"signInWithPin")}}class rK extends p4{basePath="/auth";verifyEmail=!0;redirectPath="/dashboard";sessionExpiresInHours=24;sessionAbsoluteExpiresInHours=672;adapter=new t9;oauthProviders={};boot(){}async verifyPassword(J,K){return await Bun.password.verify(J,K)}async hashPassword(J){return await Bun.password.hash(J)}async generateForgotPasswordToken(J){let K=new Bun.CryptoHasher("sha256");return K.update(`${J.email}${Date.now()}`),K.digest("hex")}generateEmailVerificationToken(J){if(!this.verifyEmail)return"";let K=new Bun.CryptoHasher("sha256");return K.update(`${J}${Date.now()}`),K.digest("hex")}generateMagicLinkToken(J){let K=new Bun.CryptoHasher("sha256");return K.update(`${J}${Date.now()}`),K.digest("hex")}extendSession(J){return{}}onSignUp(J,K){}onSignIn(J){}onSignOut(J){}onForgotPassword(J,K){}onResetPassword(J){}onMagicLinkCreated(J,K){return}}class Y7 extends A8{middlewares=["cache:private,0,no-store"];routes={"/translations/:locale/:scope*":this.get(async()=>{let J=new $0,K=`/${J.params.scope??""}`,X=J.params.locale??C0.use().detectLocale(J),Z=C0.use().getPageTranslations(X,K);return J.ctx().setCookie("i18n-locale",X,{expires:new Date(Date.now()+31536000000)}),{[X]:Z}})}}class X7 extends A8{routes={"/resize":this.file(async()=>{let J=new $0,K=new URL(J.rawRequest.url),Y=K.searchParams.get("url"),X=Number(K.searchParams.get("w")),Z=Number(K.searchParams.get("h")),Q=K.searchParams.get("fit")??"cover",H=Number(K.searchParams.get("q"));if(!Y)return new Response(JSON.stringify({error:"url query parameter is required"}),{headers:{"Content-Type":"application/json"},status:404});let W=`${Y.startsWith("http")?"":`http://localhost:${process.env.PORT||5173}`}${Y}`,z=await fetch(W);if(!z.ok)return new Response(JSON.stringify({error:"Image not found",info:W}),{headers:{"Content-Type":"application/json"},status:404});let U=Buffer.from(await z.arrayBuffer()),$=await t4.use().service.driver.resize(U,{height:Z,width:X,fit:Q,quality:H});return z.headers.delete("Content-Type"),z.headers.delete("Content-Length"),new Response($,{headers:{"Content-Type":"image/webp","Content-Length":`${$.byteLength}`,...z.headers.toJSON()}})})}}class t4 extends d0{service;static _name="ImageOptimizationServiceContainer";constructor(J){super();this.service=J}}import{mkdir as Z7,exists as Q7,readdir as nK}from"fs/promises";class a6{static channel(J,K){let Y=W6.use().service.channels[J];if(!Y)return console.error(`Channel ${J} not found`),{publish:()=>{}};let X=new Y;return{publish:(Z,Q=!1)=>{let H=g8(J,K);W6.use().publish(H,JSON.stringify({topic:H,data:X.publish(Z)}),Q)}}}}class t0 extends d0{service;static _name="LoggingServiceContainer";writer;isReady=!1;logsDirPath=`${process.env.ROOT_DIR}/storage/logs`;flushTimeout;fileSize=0;writerSize=0;isCreatingFile=!1;currentLogFilePath;constructor(J){super();this.service=J;this.boot().then(()=>{this.isReady=!0})}async boot(){if(!process.env.ROOT_DIR)return;if(!await Q7(`${process.env.ROOT_DIR}/storage`))await Z7(`${process.env.ROOT_DIR}/storage`);if(!await Q7(this.logsDirPath))await Z7(this.logsDirPath);this.newLogFile()}async newLogFile(){if(!await Q7(this.logsDirPath))await Z7(this.logsDirPath);if(this.isCreatingFile=!0,this.currentLogFilePath){this.writer.flush(),this.writer.end(),this.writer=null;let Y=new File([await Bun.file(this.currentLogFilePath).arrayBuffer()],this.currentLogFilePath.split("/").pop(),{type:"text/plain"});this.service.onLogFileClosed(Y),this.fileSize=0,this.writerSize=0}let K=(await nK(this.logsDirPath)).sort().reverse()[0];if(K){let Y=Bun.file(`${this.logsDirPath}/${K}`);if(Y.size<this.service.maxFileSize)this.currentLogFilePath=`${this.logsDirPath}/${K}`,this.writer=Y.writer(),this.writer.write(await Y.text()),this.writer.write(`
|
|
12
|
+
`),this.writer.flush(),this.fileSize=Y.size}if(!this.writer){let Y=`${new Date(Date.now()).toISOString()}.log`.replaceAll(":","-");this.currentLogFilePath=`${this.logsDirPath}/${Y}`;let X=Bun.file(`${this.logsDirPath}/${Y}`);this.writer=X.writer(),this.fileSize=0,this.writerSize=0}this.isCreatingFile=!1}async log(J,K,Y={}){if(!this.isReady)await new Promise((w)=>{let W=setInterval(()=>{if(this.isReady)w({}),clearInterval(W)},100)});let X=F0.getStore(),Z={};if(X)Z={url:X.req.rawRequest.url,method:X.req.rawRequest.method,headers:X.req.rawRequest.headers,body:X.req.rawRequest.body};let Q={timestamp:new Date(Date.now()).toISOString(),env:"production",level:J,message:K,metadata:{...Z,...Y}},H="";try{H=JSON.stringify(Q)}catch(w){throw new Error("Metadata must be a valid JSON object")}this.writerSize+=H.length,this.fileSize+=H.length,this.writer.write(H),this.writer.write(`
|
|
13
|
+
`),a6.channel("/logs/live",{}).publish(JSON.stringify(Q)),this.service.onLogCreated(Q),this.tryFlush()}async tryFlush(){if(this.fileSize>this.service.maxFileSize){if(!this.isCreatingFile)await this.newLogFile()}if(this.writerSize>this.service.maxFileSize/2)await this.writer.flush(),this.writerSize=0,await this.newLogFile();else clearTimeout(this.flushTimeout),this.flushTimeout=setTimeout(async()=>{await this.writer.flush(),this.writerSize=0},100)}}class H7 extends A8{middlewares=["cache:private,0"];routes={"/live":this.get(async()=>{let J=Bun.file(t0.use().currentLogFilePath);return new Response(await J.text(),{headers:{"Content-Type":"text/plain"}})})}}function sK(J){let K=new Map;for(let Y of J)if(typeof Y==="string"){let[X,Z=""]=Y.split(":");if(X.startsWith("-")){if(K.has(X.replace("-","")))K.delete(X.replace("-",""))}else K.set(X,Z.split(",").filter(Boolean))}else K.set(Y,[]);return K}class L6 extends d0{service;static _name="MiddlewareServiceContainer";constructor(J){super();this.service=J}runMiddleware(J){let K=new $0;return Array.from(sK(J).entries()).map(([Y,X])=>{if(typeof Y==="string"){let Z=this.service.aliases[Y];if(Z){let Q=new Z(K);return()=>Q.run.call(Q,...X)}}else{if(e4(Y)){let Z=new Y(K);return Z.run.bind(Z)}return Y}}).filter(Boolean).reduce((Y,X)=>{return async()=>{return{...await Y(),...await X()}}},()=>Promise.resolve({}))()}}function aK(J){return"run"in J}function tK(J){return Object.hasOwn(J,"get")||Object.hasOwn(J,"post")||Object.hasOwn(J,"put")||Object.hasOwn(J,"delete")}function eK(J){return Object.hasOwn(J,"first")&&Object.hasOwn(J,"second")}function JY(J){if("__brand"in J)return J.__brand==="ApiRouter";return!1}function W7(J,K="",Y=[]){let X={};function Z(Q,H,w,W){let z=Q==="/"?"":Q,U=K==="/"?"":K,$=(`${U}${z}`===""?"/":`${U}${z}`).replaceAll("//","/");if(!X[$])X[$]={};X[$][H.toUpperCase()]={exec:w,middleware:[...Y,...W]},X[$].OPTIONS={exec:()=>{let B=new $0().ctx().headers;return new Response(null,{headers:B,status:204})},middleware:[]}}for(let[Q,H]of Object.entries(J)){if(aK(H)){let w=H,W=w.method,z=w.middlewares,U=w.run.bind(w);Z(Q,W,U,z)}if(tK(H))for(let[w,W]of Object.entries(H)){let z=W.middlewares,U=W.run.bind(W);Z(Q,w,U,z)}if(JY(H)){let w=new H,W=W7(w.routes,`${K}${Q}`,w.middlewares);for(let[z,U]of Object.entries(W))X[z.replaceAll("//","/")]=U}if(eK(H)){let{first:w,second:W}=H;for(let[z,U]of Object.entries(w)){let $=U.middlewares,V=U.run.bind(U),[B,...M]=Q.split("/").reverse();if(!B.startsWith(":"))throw new Error("Resource route must end with a dynamic segment");Z(M.reverse().join("/"),z,V,$)}for(let[z,U]of Object.entries(W)){let $=U.middlewares,V=U.run.bind(U);Z(Q,z,V,$)}}}return Object.fromEntries(Object.entries(X).sort(([Q],[H])=>{let w=Q.split("/").length+Q.split(":").length,W=H.split("/").length+H.split(":").length;return w-W}))}var _5=i0(M5(),1),R5=i0(O5(),1),A7={};var BY=5;var N5=12,qY=13;var AY=16,GY=17;var MY=22;var L5=28;var j5=31;var OY=33,e6=34,NY=35,B7=36,q7=37,D5=38,LY=39,jY=40,F6=41,FY=42,A=0,O=1,H0=2,I5=3,F=4,EY=[[F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,I5,F,F,F,F,F,F,F,F,F,F,F],[A,F,F,O,O,F,F,F,F,O,O,A,A,A,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[A,F,F,O,O,F,F,F,F,O,O,O,O,O,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[F,F,F,O,O,O,F,F,F,O,O,O,O,O,O,O,O,O,O,O,F,H0,F,O,O,O,O,O,O,O,O,O,O],[O,F,F,O,O,O,F,F,F,O,O,O,O,O,O,O,O,O,O,O,F,H0,F,O,O,O,O,O,O,O,O,O,O],[A,F,F,O,O,O,F,F,F,A,A,A,A,A,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[A,F,F,O,O,O,F,F,F,A,A,A,A,A,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[A,F,F,O,O,O,F,F,F,A,A,O,A,O,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[A,F,F,O,O,O,F,F,F,A,A,O,O,O,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[O,F,F,O,O,O,F,F,F,A,A,O,O,O,O,O,O,O,A,A,F,H0,F,O,O,O,O,O,A,O,O,O,A],[O,F,F,O,O,O,F,F,F,A,A,O,O,O,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[O,F,F,O,O,O,F,F,F,O,O,O,O,O,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[O,F,F,O,O,O,F,F,F,O,O,O,O,O,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[O,F,F,O,O,O,F,F,F,O,O,O,O,O,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[A,F,F,O,O,O,F,F,F,A,O,A,A,A,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[A,F,F,O,O,O,F,F,F,A,A,A,A,A,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[A,F,F,O,A,O,F,F,F,A,A,O,A,A,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[A,F,F,O,A,O,F,F,F,A,A,A,A,A,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[O,F,F,O,O,O,F,F,F,O,O,O,O,O,O,O,O,O,O,O,F,H0,F,O,O,O,O,O,O,O,O,O,A],[A,F,F,O,O,O,F,F,F,A,A,A,A,A,A,O,O,O,A,F,F,H0,F,A,A,A,A,A,A,A,A,O,A],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,F,A,A,A,A,A,A,A,A,A,A,A,A],[O,F,F,O,O,O,F,F,F,O,O,O,O,O,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[O,F,F,O,O,O,F,F,F,O,O,O,O,O,O,O,O,O,O,O,F,H0,F,O,O,O,O,O,O,O,O,O,O],[A,F,F,O,O,O,F,F,F,A,O,A,A,A,A,O,O,O,A,A,F,H0,F,A,A,A,O,O,A,A,A,O,A],[A,F,F,O,O,O,F,F,F,A,O,A,A,A,A,O,O,O,A,A,F,H0,F,A,A,A,A,O,A,A,A,O,A],[A,F,F,O,O,O,F,F,F,A,O,A,A,A,A,O,O,O,A,A,F,H0,F,O,O,O,O,A,A,A,A,O,A],[A,F,F,O,O,O,F,F,F,A,O,A,A,A,A,O,O,O,A,A,F,H0,F,A,A,A,O,O,A,A,A,O,A],[A,F,F,O,O,O,F,F,F,A,O,A,A,A,A,O,O,O,A,A,F,H0,F,A,A,A,A,O,A,A,A,O,A],[A,F,F,O,O,O,F,F,F,A,A,A,A,A,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,O,A,A,O,A],[A,F,F,O,O,O,F,F,F,A,O,A,A,A,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,O,O,A],[A,F,F,O,O,O,F,F,F,A,O,A,A,A,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[O,F,F,O,O,O,F,F,F,O,O,O,O,O,A,O,O,O,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A],[A,F,F,O,O,A,F,F,F,A,A,A,A,A,A,A,A,A,A,A,F,H0,F,A,A,A,A,A,A,A,A,O,A]],_Y=R5.default.toByteArray("AAgOAAAAAAAQ4QAAAQ0P8vDtnQuMXUUZx+eyu7d7797d9m5bHoWltKVUlsjLWE0VJNigQoMVqkStEoNQQUl5GIo1KKmogEgqkKbBRki72lYabZMGKoGAjQRtJJDaCCIRiiigREBQS3z+xzOTnZ3O+3HOhd5NfpkzZx7fN9988zivu2M9hGwB28F94DnwEngd/Asc1EtIs9c/bIPDwCxwLDgezHcodyo4w5C+CCwBS8FnwSXgCnA1uFbI93XwbXAbWAfWgx+CzWAb+An4KfgFeAzsYWWfYuFz4CXwGvgb+Dfo6yNkEEwGh4CZYB44FpwI3g1OY+kfBItZOo2fB84Hy8DF4HJwNbiWpV8PVoO1LH4n2NRXyN+KcAd4kNVP9XsY4aPgcfAbsBfs6SniL4K/sPjfEf6HlanXCRkCw2BGvUh/keWfXS/CY+pFXs7x9XHmM94LTmWIeU2cgbxnS/k/B3kf86jDhU8L9V2E40vAFWAlWFUfb++NOL4F3C7JX4/4GiE+hvgWsF0oS7mXldspnN+F493gyXrh9xTav0cg3EvzgVfBG6wsmVSEkxBOBgdPGpd7JI6PnqRvJ68/xlbHof53gPeA94OzwLngk+ACsAwsByvASrAK3MB0Ws3CtQjvBJvAVrADPMDSHkb4CNijaccTwvnf4fiPEs8Lxy+D18A/QU8/xjgYBjPAbDAKTgYLwOngTHAO+EQ/8wuEF4EvsPiVCFf2+9tsFStzA8LVHuXXBsi6QyqzUYiPMR/7Mc7dAx7oL8bzw/3u/Bw8Bp4Az4AXwCtgHzsmDXP5fiF9iiVvly5d0sHngar16NKlS5cuXbp06fLmYlqHXrcd3ph4P0THUY3iXh49novju4S0tzfs5d+JPKewfAsRntZb3K9ZhOMlrO6lCC8An28U9+OuovcPcPxlVu5rCL/VmHh/iHIrzn3fIPu7SN8Axmg+8AOwEWwCm7tp3bRuWjetm5Y8bSu4B9zbKO6ZVsnORrVU3f4uXTqZ2H3sLoyx3eDXjfDndE9qyj6L838CfwVvgFpzYnof4oNgOhgBc8Fos9DrZIQLmtXPP1MmF6wGj4H+KXoWguvADkXaPil+YpuQy8Am8Ey7ODdtmJDF4HowBp4De6HDTNjhfHAHeBr0DBBy0kDxfPbcgSIusgrcWhtnJ8vL+TPix7UIOQtcBq4C28Cr4KRBnANbwSuDE+s50JgyNNFuXbp06XIgsXjIvPafjvXozKY+fVFz/z0LT1uCtKVSWbrOLWPnztG8e0Xfy7ol8XtZJi7WtG+5od2UFXQ/A12vUeS7jp27yVKHjdsU9lXB869TyNvAzt0lpP2oWbwLdjiO78bx/Sz+EMJHwK9Y/LcIfw+eZ3F67/Hl5vh9xX80J+rwX8SvRDhpgL17iPAQMHNArfPrqHPewLheI+AERV6efwV418B4nOZ/H+IfYHV8GOF5LJ3eAz0fx8sM9S0fUNud39O9CulfGZhY5huI3wzWgNvBelbHZoTbNPVpfYjKQpkHwUNgl0LWblbnk0LbbDxr0OMFpL3iqWdu9nWYPlVAWkXY39LnGdCkDbeqv1YNbfcMQ3t9oe8lzm6NH9N1ZB6Ln4BwfkJZJk7RyFnYKt6b/JDQXx9p5X+eFdqOjzM9P9MB/lUlFzr20aXIdzlY4dmn9F3YqtvoO76/2hp/D/xA5Zue88nNyL8GbFbs075X0tyUig3Qd2MCnf//HjnzpbsR3g9+1kHzzVjdnE71/qVBX9rGPUh/ysNWe1neFzvIDi5zAufV1sT0N0poR22wkFUfTOPfA4N2mbZ5fSrqOHSw+IbkSBbOGSzSRgf91/GTUWYBOB2cIZQ/G8cfBZ8CFwrnL8XxF8FKcA24jqXdiPA7Qr61OF7H4mMItwzuv2/YLth1ISt3Hzu3k4W7EH5JqPdRHD/O4k+z8A8IX5Lq3y7Z4nXE9xn6kX6vQ4bKfy+ok+hH+xf3hq9dnTTHhjKd2GmDuWA242iHMq4cC7A8kJ7i8o1+skSa7Jieo38HCWnoNjKFhdSFBxzpZ7QE6lI8N4S14aASZcryaV/WWHw66f6NHuCoxuQxmvM56GX9QMd8Q4D65ywGP+ZzRJuM+zQvx/MOS2VFeqQ4IXnH26zM9Xe6/E6D+4foAzzuajPZp8Qyw5ayZVDWuH0z0BtYRkeIDqH9KO9VbH1btd/lhNqCzvl8zeLnG0S/hnU6baHfpiuO6yy0rd+DHURo/zYF5H26j03rQsip2ndzz82u1z9N4VjWKWeb68Tedpt95HRVXp7H1R6p+/Wt4FPy/PpWwscOLRJ+PVWF/+W0iVyGzs18TIvXkOJ1Wxm66vSXz+vylenrZcj1ub439W+K8RNCGTJi2p/TJ1K23VaXr35tRpnzmjxequgfcfyk6B/TGBVlyedsNgpdd/h+W1U3P99QyFPNo1X3TwpM/WLTIWYfoBqXrv6iskHZ/RFr79R6hIyHBrH3f1nrUVnjP8SnZZ+rYtzr9Exld5MNbPNErusAPg+77u/eDOPftU9yj39TH7rezxd1LvsZQJlzkWlOirG/79zjMj/mtHUKu7vKy+3/LnXr9okyKedjX5/0He9iP/j63LwOQdarEVlfy8OO/Lqw023j6xcqmwxLiOd6heM2i9cV9LJy8jMJ23yQ+rpbfu7EQ/pXE8KYvUSqvVnb4XzZa6LrHMXHR+zcLvqWbm/Bn0/HzIs6fWPHoat8XfnDKmZGxRxeMbn2UqZ5Q94nmcZRbqqUXbZ8+lcjE+cPX11t814orvvAXNcG8vqj2vvk1MGn3anlj0bIT72v47bvE+Lc98T9b6r7AKn6j+8Duf7D0nnZx/j7Zjn0j9nbpSTndaLr9WNLivP+iN23xF7L+fqv6ZouFyb78jxVXvv5jJ9YUs9/sddO8h7KNg5jrhfaJGztT6G7KF+1d6yCmD5Kdb2fan60rSc552fZr3zeQ9DpnPp+Si5cx5Ktv2QfSzF/mMbWdOm46rFI4XstnU9xeqX4NKb7TKEdcr6pZOK3ID1k/LvFHkVczEuZLEDr499YqvqBym1aEHWgcvoYOtv0M91qQl5TfpO/in6rWx8OVpT1Wedkv3f5xom3T/xeR/6Gx6V86PWAOB4bBpqWdN+yTcVxjIyGRz/FrDGu6w/3d7kPm8StX8RyPu+uuvpNju/vTLJV37GpvoM0oZPnW87VLnL/5pDno1NoW1R6yedU6TyUv3u19a3KFnIbTLYz+ZCLP4T0tU1uivFgso0pnsJ/UtXvarNY28Xq5cvkBDrQP/E5ZaiuQwwfmTlsOiQRU1fMuqrDd/3ISSuwjOwXOfTyGUMpZIXq4GpLn3pUcdfzch2x7XO1u2uZHOPb1G6b3Xg9PH1IIWeEpJlPQtqos2EKW8b0u8rnuP1UeVLoXJb9be0uG9nnbchjU+XTszT5VeNBThPHnc5OKj1U9aj0GTHIVaGy1YhEWT4ixns00DT+XEzWn/7VAsIc63Cov3OdyhwjrnaqQqZvWKXdypRdlq+k8msZ031U+Rm4fA+3TtyeR9hwfW9G9yxDN0fZMN33F+9TE6md4hwoxumfaUzI9fN3PFT3xVV2msrQ3UsnChm6Nulk8TndpS28D3zX9tTIPsF/z7Am5OkTjm1tI1JZW74+4VgsZ0N3L1yXV3WeP5uR7TGHHdvC3JQlxybfpd22tDlk/2eofRK8TzrN/qnar/K/OUTth6I/+jAnEptNbPvFHP2gs40N3+dfMWtwqvVct7/wfd8gtQ7imifial9ZJ9/3IHLYU6eDj3+4PhsNhX+vwvcWLnu6kGfEMe8DuciPfUfGZB8X/7HJy/Gefe5n+VRGFd/wyP2ta7/LO4yh/sbLV/k9lev6kfO9Dt/5U67b1/6u/epqB1U9Me23jfHY9sscAg4tkbLl+e4/U36rJ9ddxfd6sg5vq5ice42Wpk/pb9FOJ36/W9tpv4kbC79nUbZceX8Zu6/qJ+P3WvhvA8v3reh7Jbn2d6rrNC7XNZTLma4Ba0JI9efX2uLzF5scG/w9UNU1ZxW+ymUfzELeTllXlQ1rUuhzjS5fp9c964iFBOqeSz63bU065nZKdU+mDEz3qHIjjifquw0pnb/raRtvrnsYcb46ihT3taoYz6brdNW9l6rWRnE/navdPn1XlR1km7hcz1WlH/elKuSOSvLLuE8U6m8uzwRdfcGl73VyTHuyMvzJ1Sa2cWDTP/Z63Kc94n2B1PYr24dz1JlyHLlcP+S4B6vD1c9EW4q2LWstCvUjeVy63k/LMYdUNd5D1xQfvVTzX1VjkMsUv88N8VH5fReVn/Fjn++/h6X6Q8a6b1/q3g/i/ewi0/Scs8zxXeV6mWIOUPlPzBgdFerW+bZrm2P18dnjuK6HunEp+rHvPMXbr+sHVb/lnL+pTP57jPw9Cvk3PW178JD9qChfzuvTf7Htl38L1QUf/VKu9SFjwWbTWPvFEvu7Uq76y7+31g6QlYPc669pbsm9Xur2LWI9Pu8ypfDXqm3A2z8s1FWGn4ntL9NfQu2oSlftX9uetvTtv7J8Ql4zxfXGZ3zk8PeQ9w59x2uMfqI8/q5eKh/l9cb2rwsu9rSNl06ZP2Pmxtz+rNMx93yno0n2/82rVH7rQ+y9P15H6FyRun9ViH81ATmffI7nJ5r8uXXW6enbP6b/B8/l5OifVHYLnb9S39s2zcc+Ph+rh8+eQgVPS72elzGWY/tUtbbabBpDiI7yN1q6/4th2y+ErAc5+9BVvu/7KamJbWNZeuqI/R4tRf+YyD1HmOZM1bMV3/14Sn10c0Xu+Sj1nOXb5jL73ncdy02uvlXZNde65dOHYl7Vs4KYuS6FzWLn2zJlpZqPXPVPOa5yzKOyn1VhT9lmMfdbfH7D11Wf2PXN5h9y+dD287+qxgSnaYmnIrRtIb8pJe6/Uv9OVer6Whn0zfGO/BEloZI9ojmfAlUflClDd178bTmVHVTpZXOkAlk/lb42UujmI89HH5V+cl7XtowY6vTxLVWok6UrGzoGTHN+bB+6ri05687VNpvfuvRfaP2uMlNQth1D5JjGelm/8yn+9p3p/7qk9gnfeddXZmq/Sm333PJT659Kv1zjNbZ9uv2Oi//67CV8/N1nj1DmviyXDNVeJkaeaX8UsyesYg8cu2+NvdaPfb+lLDu5tvt/"),RY=new _5.default(_Y),F5=function(J){switch(J){case OY:return N5;case LY:case jY:case FY:return N5;case NY:return BY;default:return J}},E5=function(J){switch(J){case q7:case D5:return e6;case F6:return MY;default:return J}};class J9{constructor(J,K=!1){this.position=J,this.required=K}}class T5{nextCodePoint(){let J=this.string.charCodeAt(this.pos++),K=this.string.charCodeAt(this.pos);if(55296<=J&&J<=56319&&56320<=K&&K<=57343)return this.pos++,(J-55296)*1024+(K-56320)+65536;return J}nextCharClass(){return F5(RY.get(this.nextCodePoint()))}getSimpleBreak(){switch(this.nextClass){case F6:return!1;case e6:case q7:case D5:return this.curClass=e6,!1;case B7:return this.curClass=B7,!1}return null}getPairTableBreak(J){let K=!1;switch(EY[this.curClass][this.nextClass]){case A:K=!0;break;case O:K=J===F6;break;case H0:if(K=J===F6,!K)return K=!1,K;break;case I5:if(J!==F6)return K;break;case F:break}if(this.LB8a)K=!1;if(this.LB21a&&(this.curClass===AY||this.curClass===GY))K=!1,this.LB21a=!1;else this.LB21a=this.curClass===qY;if(this.curClass===L5){if(this.LB30a++,this.LB30a==2&&this.nextClass===L5)K=!0,this.LB30a=0}else this.LB30a=0;return this.curClass=this.nextClass,K}nextBreak(){if(this.curClass==null){let J=this.nextCharClass();this.curClass=E5(J),this.nextClass=J,this.LB8a=J===j5,this.LB30a=0}while(this.pos<this.string.length){this.lastPos=this.pos;let J=this.nextClass;if(this.nextClass=this.nextCharClass(),this.curClass===e6||this.curClass===B7&&this.nextClass!==q7)return this.curClass=E5(F5(this.nextClass)),new J9(this.lastPos,!0);let K=this.getSimpleBreak();if(K===null)K=this.getPairTableBreak(J);if(this.LB8a=this.nextClass===j5,K)return new J9(this.lastPos)}if(this.lastPos<this.string.length)return this.lastPos=this.string.length,new J9(this.string.length);return null}constructor(J){this.string=J,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null,this.LB8a=!1,this.LB21a=!1,this.LB30a=0}}A7=T5;var V8=i0(H9(),1),_K=i0(HJ(),1),RK=i0(wJ(),1);var VJ=i0(DZ(),1),BJ=i0(UJ(),1),IZ=/^#([a-f0-9]{3,4}|[a-f0-9]{4}(?:[a-f0-9]{2}){1,2})\b$/,TZ=new RegExp(IZ,"i"),g7="-?\\d*(?:\\.\\d+)",V6=`(${g7}?)`,O8=`(${g7}?%)`,B6=`(${g7}?%?)`,CZ=`^
|
|
14
|
+
hsla?\\(
|
|
15
|
+
\\s*(-?\\d*(?:\\.\\d+)?(?:deg|rad|turn)?)\\s*,
|
|
16
|
+
\\s*${O8}\\s*,
|
|
17
|
+
\\s*${O8}\\s*
|
|
18
|
+
(?:,\\s*${B6}\\s*)?
|
|
19
|
+
\\)
|
|
20
|
+
$
|
|
21
|
+
`.replace(/\n|\s/g,""),PZ=new RegExp(CZ),SZ=`^
|
|
22
|
+
hsla?\\(
|
|
23
|
+
\\s*(-?\\d*(?:\\.\\d+)?(?:deg|rad|turn)?)\\s*
|
|
24
|
+
\\s+${O8}
|
|
25
|
+
\\s+${O8}
|
|
26
|
+
\\s*(?:\\s*\\/\\s*${B6}\\s*)?
|
|
27
|
+
\\)
|
|
28
|
+
$
|
|
29
|
+
`.replace(/\n|\s/g,""),vZ=new RegExp(SZ),yZ=`^
|
|
30
|
+
rgba?\\(
|
|
31
|
+
\\s*${V6}\\s*,
|
|
32
|
+
\\s*${V6}\\s*,
|
|
33
|
+
\\s*${V6}\\s*
|
|
34
|
+
(?:,\\s*${B6}\\s*)?
|
|
35
|
+
\\)
|
|
36
|
+
$
|
|
37
|
+
`.replace(/\n|\s/g,""),kZ=new RegExp(yZ),gZ=`^
|
|
38
|
+
rgba?\\(
|
|
39
|
+
\\s*${O8}\\s*,
|
|
40
|
+
\\s*${O8}\\s*,
|
|
41
|
+
\\s*${O8}\\s*
|
|
42
|
+
(?:,\\s*${B6}\\s*)?
|
|
43
|
+
\\)
|
|
44
|
+
$
|
|
45
|
+
`.replace(/\n|\s/g,""),xZ=new RegExp(gZ),hZ=`^
|
|
46
|
+
rgba?\\(
|
|
47
|
+
\\s*${V6}
|
|
48
|
+
\\s+${V6}
|
|
49
|
+
\\s+${V6}
|
|
50
|
+
\\s*(?:\\s*\\/\\s*${B6}\\s*)?
|
|
51
|
+
\\)
|
|
52
|
+
$
|
|
53
|
+
`.replace(/\n|\s/g,""),bZ=new RegExp(hZ),mZ=`^
|
|
54
|
+
rgba?\\(
|
|
55
|
+
\\s*${O8}
|
|
56
|
+
\\s+${O8}
|
|
57
|
+
\\s+${O8}
|
|
58
|
+
\\s*(?:\\s*\\/\\s*${B6}\\s*)?
|
|
59
|
+
\\)
|
|
60
|
+
$
|
|
61
|
+
`.replace(/\n|\s/g,""),fZ=new RegExp(mZ),dZ=/^transparent$/,lZ=new RegExp(dZ,"i"),x7=(J,K,Y)=>Math.min(Math.max(K,J),Y),cZ=(J)=>{let K=J;if(typeof K!=="number")K=K.endsWith("%")?parseFloat(K)*255/100:parseFloat(K);return x7(Math.round(K),0,255)},$J=(J)=>x7(parseFloat(J),0,100);function qJ(J){let K=J;if(typeof K!=="number")K=K.endsWith("%")?parseFloat(K)/100:parseFloat(K);return x7(K,0,1)}function uZ(J){let[K,Y,X,Z]=BJ.default(J,{format:"array"});return w9([null,K,Y,X,Z])}function pZ([,J,K,Y,X=1]){let Z=J;if(Z.endsWith("turn"))Z=parseFloat(Z)*360/1;else if(Z.endsWith("rad"))Z=Math.round(parseFloat(Z)*180/Math.PI);else Z=parseFloat(Z);return{type:"hsl",values:[Z,$J(K),$J(Y)],alpha:qJ(X===null?1:X)}}function w9([,J,K,Y,X=1]){return{type:"rgb",values:[J,K,Y].map(cZ),alpha:qJ(X===null?1:X)}}var iZ=(J)=>{if(typeof J!=="string")return null;let K=TZ.exec(J);if(K)return uZ(K[0]);let Y=vZ.exec(J)||PZ.exec(J);if(Y)return pZ(Y);let X=bZ.exec(J)||fZ.exec(J)||kZ.exec(J)||xZ.exec(J);if(X)return w9(X);if(lZ.exec(J))return w9([null,0,0,0,0]);let Z=VJ.default[J.toLowerCase()];if(Z)return w9([null,Z[0],Z[1],Z[2],1]);return null},z9=iZ;var DK=i0(E7(),1),IK=i0(H9(),1),G4=i0(GJ(),1);function b7(J,K=","){let Y=[],X=0,Z=0;K=new RegExp(K);for(let Q=0;Q<J.length;Q++)J[Q]==="("?Z++:J[Q]===")"&&Z--,Z===0&&K.test(J[Q])&&(Y.push(J.slice(X,Q).trim()),X=Q+1);return Y.push(J.slice(X).trim()),Y}function h7(J){let K=[];for(let Y=0,X=J.length;Y<X;){let[Z,Q]=b7(J[Y],/\s+/);nZ(J[Y+1])?(K.push({color:Z,offset:s8(Q),hint:s8(J[Y+1])}),Y+=2):(K.push({color:Z,offset:s8(Q)}),Y++)}return K}var NJ=/^(-?\d+\.?\d*)(%|vw|vh|px|em|rem|deg|rad|grad|turn)$/;function nZ(J){return NJ.test(J)}function s8(J){if(!J)return;let[,K,Y]=J.trim().match(NJ)||[];return{value:K,unit:Y}}function LJ(J){if(!/^(repeating-)?linear-gradient/.test(J))throw new SyntaxError(`could not find syntax for this item: ${J}`);let[,K,Y]=J.match(/(repeating-)?linear-gradient\((.+)\)/),X={orientation:{type:"directional",value:"bottom"},repeating:!!K,stops:[]},Z=b7(Y),Q=sZ(Z[0]);return Q&&(X.orientation=Q,Z.shift()),{...X,stops:h7(Z)}}function sZ(J){return J.startsWith("to ")?{type:"directional",value:J.replace("to ","")}:["turn","deg","grad","rad"].some((K)=>J.endsWith(K))?{type:"angular",value:s8(J)}:null}var aZ=new Set(["closest-corner","closest-side","farthest-corner","farthest-side"]),tZ=new Set(["center","left","top","right","bottom"]);function MJ(J){return aZ.has(J)}function OJ(J){return tZ.has(J)}function eZ(J){let K=Array(2).fill("");for(let Y=0;Y<2;Y++)J[Y]?K[Y]=J[Y]:K[Y]="center";return K}function jJ(J){if(!/(repeating-)?radial-gradient/.test(J))throw new SyntaxError(`could not find syntax for this item: ${J}`);let[,K,Y]=J.match(/(repeating-)?radial-gradient\((.+)\)/),X={shape:"ellipse",repeating:!!K,size:[{type:"keyword",value:"farthest-corner"}],position:{x:{type:"keyword",value:"center"},y:{type:"keyword",value:"center"}},stops:[]},Z=b7(Y);if(JQ(Z[0]))return{...X,stops:h7(Z)};let Q=Z[0].split("at").map((z)=>z.trim()),H=((Q[0]||"").match(/(circle|ellipse)/)||[])[1],w=(Q[0]||"").match(/(-?\d+\.?\d*(vw|vh|px|em|rem|%|rad|grad|turn|deg)?|closest-corner|closest-side|farthest-corner|farthest-side)/g)||[],W=eZ((Q[1]||"").split(" "));return H?X.shape=H:w.length===1&&!MJ(w[0])?X.shape="circle":X.shape="ellipse",w.length===0&&w.push("farthest-corner"),X.size=w.map((z)=>MJ(z)?{type:"keyword",value:z}:{type:"length",value:s8(z)}),X.position.x=OJ(W[0])?{type:"keyword",value:W[0]}:{type:"length",value:s8(W[0])},X.position.y=OJ(W[1])?{type:"keyword",value:W[1]}:{type:"length",value:s8(W[1])},(H||w.length>0||Q[1])&&Z.shift(),{...X,stops:h7(Z)}}function JQ(J){return/(circle|ellipse|at)/.test(J)?!1:/^(rgba?|hwb|hsl|lab|lch|oklab|color|#|[a-zA-Z]+)/.test(J)}var M4=i0(H9(),1);var e0=Uint8Array,t8=Uint16Array,nJ=Uint32Array,sJ=new e0([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),aJ=new e0([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),KQ=new e0([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),tJ=function(J,K){var Y=new t8(31);for(var X=0;X<31;++X)Y[X]=K+=1<<J[X-1];var Z=new nJ(Y[30]);for(var X=1;X<30;++X)for(var Q=Y[X];Q<Y[X+1];++Q)Z[Q]=Q-Y[X]<<5|X;return[Y,Z]},eJ=tJ(sJ,2),J1=eJ[0],YQ=eJ[1];J1[28]=258,YQ[258]=28;var XQ=tJ(aJ,0),ZQ=XQ[0],r7=new t8(32768);for(Z0=0;Z0<32768;++Z0)N8=(Z0&43690)>>>1|(Z0&21845)<<1,N8=(N8&52428)>>>2|(N8&13107)<<2,N8=(N8&61680)>>>4|(N8&3855)<<4,r7[Z0]=((N8&65280)>>>8|(N8&255)<<8)>>>1;var N8,Z0,D6=function(J,K,Y){var X=J.length,Z=0,Q=new t8(K);for(;Z<X;++Z)if(J[Z])++Q[J[Z]-1];var H=new t8(K);for(Z=0;Z<K;++Z)H[Z]=H[Z-1]+Q[Z-1]<<1;var w;if(Y){w=new t8(1<<K);var W=15-K;for(Z=0;Z<X;++Z)if(J[Z]){var z=Z<<4|J[Z],U=K-J[Z],$=H[J[Z]-1]++<<U;for(var V=$|(1<<U)-1;$<=V;++$)w[r7[$]>>>W]=z}}else{w=new t8(X);for(Z=0;Z<X;++Z)if(J[Z])w[Z]=r7[H[J[Z]-1]++]>>>15-J[Z]}return w},C6=new e0(288);for(Z0=0;Z0<144;++Z0)C6[Z0]=8;var Z0;for(Z0=144;Z0<256;++Z0)C6[Z0]=9;var Z0;for(Z0=256;Z0<280;++Z0)C6[Z0]=7;var Z0;for(Z0=280;Z0<288;++Z0)C6[Z0]=8;var Z0,K1=new e0(32);for(Z0=0;Z0<32;++Z0)K1[Z0]=5;var Z0,QQ=D6(C6,9,1),HQ=D6(K1,5,1),m7=function(J){var K=J[0];for(var Y=1;Y<J.length;++Y)if(J[Y]>K)K=J[Y];return K},H8=function(J,K,Y){var X=K/8|0;return(J[X]|J[X+1]<<8)>>(K&7)&Y},f7=function(J,K){var Y=K/8|0;return(J[Y]|J[Y+1]<<8|J[Y+2]<<16)>>(K&7)},WQ=function(J){return(J+7)/8|0},wQ=function(J,K,Y){if(K==null||K<0)K=0;if(Y==null||Y>J.length)Y=J.length;var X=new(J.BYTES_PER_ELEMENT==2?t8:J.BYTES_PER_ELEMENT==4?nJ:e0)(Y-K);return X.set(J.subarray(K,Y)),X},zQ=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],m8=function(J,K,Y){var X=new Error(K||zQ[J]);if(X.code=J,Error.captureStackTrace)Error.captureStackTrace(X,m8);if(!Y)throw X;return X},UQ=function(J,K,Y){var X=J.length;if(!X||Y&&Y.f&&!Y.l)return K||new e0(0);var Z=!K||Y,Q=!Y||Y.i;if(!Y)Y={};if(!K)K=new e0(X*3);var H=function(g){var e=K.length;if(g>e){var Y0=new e0(Math.max(e*2,g));Y0.set(K),K=Y0}},w=Y.f||0,W=Y.p||0,z=Y.b||0,U=Y.l,$=Y.d,V=Y.m,B=Y.n,M=X*8;do{if(!U){w=H8(J,W,1);var q=H8(J,W+1,3);if(W+=3,!q){var G=WQ(W)+4,N=J[G-4]|J[G-3]<<8,L=G+N;if(L>X){if(Q)m8(0);break}if(Z)H(z+N);K.set(J.subarray(G,L),z),Y.b=z+=N,Y.p=W=L*8,Y.f=w;continue}else if(q==1)U=QQ,$=HQ,V=9,B=5;else if(q==2){var _=H8(J,W,31)+257,D=H8(J,W+10,15)+4,E=_+H8(J,W+5,31)+1;W+=14;var j=new e0(E),T=new e0(19);for(var R=0;R<D;++R)T[KQ[R]]=H8(J,W+R*3,7);W+=D*3;var S=m7(T),x=(1<<S)-1,c=D6(T,S,1);for(var R=0;R<E;){var o=c[H8(J,W,x)];W+=o&15;var G=o>>>4;if(G<16)j[R++]=G;else{var u=0,C=0;if(G==16)C=3+H8(J,W,3),W+=2,u=j[R-1];else if(G==17)C=3+H8(J,W,7),W+=3;else if(G==18)C=11+H8(J,W,127),W+=7;while(C--)j[R++]=u}}var P=j.subarray(0,_),I=j.subarray(_);V=m7(P),B=m7(I),U=D6(P,V,1),$=D6(I,B,1)}else m8(1);if(W>M){if(Q)m8(0);break}}if(Z)H(z+131072);var f=(1<<V)-1,l=(1<<B)-1,t=W;for(;;t=W){var u=U[f7(J,W)&f],s=u>>>4;if(W+=u&15,W>M){if(Q)m8(0);break}if(!u)m8(2);if(s<256)K[z++]=s;else if(s==256){t=W,U=null;break}else{var m=s-254;if(s>264){var R=s-257,d=sJ[R];m=H8(J,W,(1<<d)-1)+J1[R],W+=d}var y=$[f7(J,W)&l],k=y>>>4;if(!y)m8(3);W+=y&15;var I=ZQ[k];if(k>3){var d=aJ[k];I+=f7(J,W)&(1<<d)-1,W+=d}if(W>M){if(Q)m8(0);break}if(Z)H(z+131072);var r=z+m;for(;z<r;z+=4)K[z]=K[z-I],K[z+1]=K[z+1-I],K[z+2]=K[z+2-I],K[z+3]=K[z+3-I];z=r}}if(Y.l=U,Y.p=t,Y.b=z,Y.f=w,U)w=1,Y.m=V,Y.d=$,Y.n=B}while(!w);return z==K.length?K:wQ(K,0,z)},$Q=new e0(0);function VQ(J,K){return UQ(J,K)}var BQ=typeof TextDecoder!="undefined"&&new TextDecoder,qQ=0;try{BQ.decode($Q,{stream:!0}),qQ=1}catch(J){}function x0(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}x0.prototype.moveTo=function(J,K){this.commands.push({type:"M",x:J,y:K})};x0.prototype.lineTo=function(J,K){this.commands.push({type:"L",x:J,y:K})};x0.prototype.curveTo=x0.prototype.bezierCurveTo=function(J,K,Y,X,Z,Q){this.commands.push({type:"C",x1:J,y1:K,x2:Y,y2:X,x:Z,y:Q})};x0.prototype.quadTo=x0.prototype.quadraticCurveTo=function(J,K,Y,X){this.commands.push({type:"Q",x1:J,y1:K,x:Y,y:X})};x0.prototype.close=x0.prototype.closePath=function(){this.commands.push({type:"Z"})};x0.prototype.extend=function(J){if(J.commands)J=J.commands;Array.prototype.push.apply(this.commands,J)};x0.prototype.toPathData=function(J){J=J!==void 0?J:2;function K(H){if(Math.round(H)===H)return""+Math.round(H);else return H.toFixed(J)}function Y(){var H=arguments,w="";for(var W=0;W<arguments.length;W+=1){var z=H[W];if(z>=0&&W>0)w+=" ";w+=K(z)}return w}var X="";for(var Z=0;Z<this.commands.length;Z+=1){var Q=this.commands[Z];if(Q.type==="M")X+="M"+Y(Q.x,Q.y);else if(Q.type==="L")X+="L"+Y(Q.x,Q.y);else if(Q.type==="C")X+="C"+Y(Q.x1,Q.y1,Q.x2,Q.y2,Q.x,Q.y);else if(Q.type==="Q")X+="Q"+Y(Q.x1,Q.y1,Q.x,Q.y);else if(Q.type==="Z")X+="Z"}return X};var AQ=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],GQ=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],MQ=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"];function Y1(J){this.font=J}Y1.prototype.charToGlyphIndex=function(J){var K=J.codePointAt(0),Y=this.font.glyphs;if(Y)for(var X=0;X<Y.length;X+=1){var Z=Y.get(X);for(var Q=0;Q<Z.unicodes.length;Q+=1)if(Z.unicodes[Q]===K)return X}return null};function X1(J){this.cmap=J}X1.prototype.charToGlyphIndex=function(J){return this.cmap.glyphIndexMap[J.codePointAt(0)]||0};function B9(J,K){this.encoding=J,this.charset=K}B9.prototype.charToGlyphIndex=function(J){var K=J.codePointAt(0),Y=this.encoding[K];return this.charset.indexOf(Y)};function OQ(J){var K,Y=J.tables.cmap.glyphIndexMap,X=Object.keys(Y);for(var Z=0;Z<X.length;Z+=1){var Q=X[Z],H=Y[Q];K=J.glyphs.get(H),K.addUnicode(parseInt(Q))}}function NQ(J){J._IndexToUnicodeMap={};var K=J.tables.cmap.glyphIndexMap,Y=Object.keys(K);for(var X=0;X<Y.length;X+=1){var Z=Y[X],Q=K[Z];if(J._IndexToUnicodeMap[Q]===void 0)J._IndexToUnicodeMap[Q]={unicodes:[parseInt(Z)]};else J._IndexToUnicodeMap[Q].unicodes.push(parseInt(Z))}}function LQ(J,K){if(K.lowMemory)NQ(J);else OQ(J)}function Z1(J){throw new Error(J)}function FJ(J,K){if(!J)Z1(K)}var w0={fail:Z1,argument:FJ,assert:FJ};function jQ(J,K){var Y=K||new x0;return{configurable:!0,get:function(){if(typeof Y==="function")Y=Y();return Y},set:function(X){Y=X}}}function T8(J){this.bindConstructorValues(J)}T8.prototype.bindConstructorValues=function(J){if(this.index=J.index||0,this.name=J.name||null,this.unicode=J.unicode||void 0,this.unicodes=J.unicodes||J.unicode!==void 0?[J.unicode]:[],"xMin"in J)this.xMin=J.xMin;if("yMin"in J)this.yMin=J.yMin;if("xMax"in J)this.xMax=J.xMax;if("yMax"in J)this.yMax=J.yMax;if("advanceWidth"in J)this.advanceWidth=J.advanceWidth;Object.defineProperty(this,"path",jQ(this,J.path))};T8.prototype.addUnicode=function(J){if(this.unicodes.length===0)this.unicode=J;this.unicodes.push(J)};T8.prototype.getPath=function(J,K,Y,X,Z){J=J!==void 0?J:0,K=K!==void 0?K:0,Y=Y!==void 0?Y:72;var Q,H;if(!X)X={};var{xScale:w,yScale:W}=X;if(X.hinting&&Z&&Z.hinting)H=this.path&&Z.hinting.exec(this,Y);if(H)Q=Z.hinting.getCommands(H),J=Math.round(J),K=Math.round(K),w=W=1;else{Q=this.path.commands;var z=1/(this.path.unitsPerEm||1000)*Y;if(w===void 0)w=z;if(W===void 0)W=z}var U=new x0;for(var $=0;$<Q.length;$+=1){var V=Q[$];if(V.type==="M")U.moveTo(J+V.x*w,K+-V.y*W);else if(V.type==="L")U.lineTo(J+V.x*w,K+-V.y*W);else if(V.type==="Q")U.quadraticCurveTo(J+V.x1*w,K+-V.y1*W,J+V.x*w,K+-V.y*W);else if(V.type==="C")U.curveTo(J+V.x1*w,K+-V.y1*W,J+V.x2*w,K+-V.y2*W,J+V.x*w,K+-V.y*W);else if(V.type==="Z")U.closePath()}return U};T8.prototype.getContours=function(){if(this.points===void 0)return[];var J=[],K=[];for(var Y=0;Y<this.points.length;Y+=1){var X=this.points[Y];if(K.push(X),X.lastPointOfContour)J.push(K),K=[]}return w0.argument(K.length===0,"There are still points left in the current contour."),J};T8.prototype.getMetrics=function(){var J=this.path.commands,K=[],Y=[];for(var X=0;X<J.length;X+=1){var Z=J[X];if(Z.type!=="Z")K.push(Z.x),Y.push(Z.y);if(Z.type==="Q"||Z.type==="C")K.push(Z.x1),Y.push(Z.y1);if(Z.type==="C")K.push(Z.x2),Y.push(Z.y2)}var Q={xMin:Math.min.apply(null,K),yMin:Math.min.apply(null,Y),xMax:Math.max.apply(null,K),yMax:Math.max.apply(null,Y),leftSideBearing:this.leftSideBearing};if(!isFinite(Q.xMin))Q.xMin=0;if(!isFinite(Q.xMax))Q.xMax=this.advanceWidth;if(!isFinite(Q.yMin))Q.yMin=0;if(!isFinite(Q.yMax))Q.yMax=0;return Q.rightSideBearing=this.advanceWidth-Q.leftSideBearing-(Q.xMax-Q.xMin),Q};function U9(J,K,Y){Object.defineProperty(J,K,{get:function(){return J.path,J[Y]},set:function(X){J[Y]=X},enumerable:!0,configurable:!0})}function a7(J,K){if(this.font=J,this.glyphs={},Array.isArray(K))for(var Y=0;Y<K.length;Y++){var X=K[Y];X.path.unitsPerEm=J.unitsPerEm,this.glyphs[Y]=X}this.length=K&&K.length||0}a7.prototype.get=function(J){if(this.glyphs[J]===void 0){if(this.font._push(J),typeof this.glyphs[J]==="function")this.glyphs[J]=this.glyphs[J]();var K=this.glyphs[J],Y=this.font._IndexToUnicodeMap[J];if(Y)for(var X=0;X<Y.unicodes.length;X++)K.addUnicode(Y.unicodes[X]);this.glyphs[J].advanceWidth=this.font._hmtxTableData[J].advanceWidth,this.glyphs[J].leftSideBearing=this.font._hmtxTableData[J].leftSideBearing}else if(typeof this.glyphs[J]==="function")this.glyphs[J]=this.glyphs[J]();return this.glyphs[J]};a7.prototype.push=function(J,K){this.glyphs[J]=K,this.length++};function FQ(J,K){return new T8({index:K,font:J})}function EQ(J,K,Y,X,Z,Q){return function(){var H=new T8({index:K,font:J});return H.path=function(){Y(H,X,Z);var w=Q(J.glyphs,H);return w.unitsPerEm=J.unitsPerEm,w},U9(H,"xMin","_xMin"),U9(H,"xMax","_xMax"),U9(H,"yMin","_yMin"),U9(H,"yMax","_yMax"),H}}function _Q(J,K,Y,X){return function(){var Z=new T8({index:K,font:J});return Z.path=function(){var Q=Y(J,Z,X);return Q.unitsPerEm=J.unitsPerEm,Q},Z}}var j8={GlyphSet:a7,glyphLoader:FQ,ttfGlyphLoader:EQ,cffGlyphLoader:_Q};function d7(J,K){var Y=0,X=J.length-1;while(Y<=X){var Z=Y+X>>>1,Q=J[Z].tag;if(Q===K)return Z;else if(Q<K)Y=Z+1;else X=Z-1}return-Y-1}function EJ(J,K){var Y=0,X=J.length-1;while(Y<=X){var Z=Y+X>>>1,Q=J[Z];if(Q===K)return Z;else if(Q<K)Y=Z+1;else X=Z-1}return-Y-1}function _J(J,K){var Y,X=0,Z=J.length-1;while(X<=Z){var Q=X+Z>>>1;Y=J[Q];var H=Y.start;if(H===K)return Y;else if(H<K)X=Q+1;else Z=Q-1}if(X>0){if(Y=J[X-1],K>Y.end)return 0;return Y}}function P6(J,K){this.font=J,this.tableName=K}P6.prototype={searchTag:d7,binSearch:EJ,getTable:function(J){var K=this.font.tables[this.tableName];if(!K&&J)K=this.font.tables[this.tableName]=this.createDefaultTable();return K},getDefaultScriptName:function(){var J=this.getTable();if(!J)return;var K=!1;for(var Y=0;Y<J.scripts.length;Y++){var X=J.scripts[Y].tag;if(X==="DFLT")return X;if(X==="latn")K=!0}if(K)return"latn"},getScriptTable:function(J,K){var Y=this.getTable(K);if(Y){J=J||"DFLT";var X=Y.scripts,Z=d7(Y.scripts,J);if(Z>=0)return X[Z].script;else if(K){var Q={tag:J,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return X.splice(-1-Z,0,Q),Q.script}}},getLangSysTable:function(J,K,Y){var X=this.getScriptTable(J,Y);if(X){if(!K||K==="dflt"||K==="DFLT")return X.defaultLangSys;var Z=d7(X.langSysRecords,K);if(Z>=0)return X.langSysRecords[Z].langSys;else if(Y){var Q={tag:K,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return X.langSysRecords.splice(-1-Z,0,Q),Q.langSys}}},getFeatureTable:function(J,K,Y,X){var Z=this.getLangSysTable(J,K,X);if(Z){var Q,H=Z.featureIndexes,w=this.font.tables[this.tableName].features;for(var W=0;W<H.length;W++)if(Q=w[H[W]],Q.tag===Y)return Q.feature;if(X){var z=w.length;return w0.assert(z===0||Y>=w[z-1].tag,"Features must be added in alphabetical order."),Q={tag:Y,feature:{params:0,lookupListIndexes:[]}},w.push(Q),H.push(z),Q.feature}}},getLookupTables:function(J,K,Y,X,Z){var Q=this.getFeatureTable(J,K,Y,Z),H=[];if(Q){var w,W=Q.lookupListIndexes,z=this.font.tables[this.tableName].lookups;for(var U=0;U<W.length;U++)if(w=z[W[U]],w.lookupType===X)H.push(w);if(H.length===0&&Z){w={lookupType:X,lookupFlag:0,subtables:[],markFilteringSet:void 0};var $=z.length;return z.push(w),W.push($),[w]}}return H},getGlyphClass:function(J,K){switch(J.format){case 1:if(J.startGlyph<=K&&K<J.startGlyph+J.classes.length)return J.classes[K-J.startGlyph];return 0;case 2:var Y=_J(J.ranges,K);return Y?Y.classId:0}},getCoverageIndex:function(J,K){switch(J.format){case 1:var Y=EJ(J.glyphs,K);return Y>=0?Y:-1;case 2:var X=_J(J.ranges,K);return X?X.index+K-X.start:-1}},expandCoverage:function(J){if(J.format===1)return J.glyphs;else{var K=[],Y=J.ranges;for(var X=0;X<Y.length;X++){var Z=Y[X],Q=Z.start,H=Z.end;for(var w=Q;w<=H;w++)K.push(w)}return K}}};function S6(J){P6.call(this,J,"gpos")}S6.prototype=P6.prototype;S6.prototype.init=function(){var J=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(J)};S6.prototype.getKerningValue=function(J,K,Y){for(var X=0;X<J.length;X++){var Z=J[X].subtables;for(var Q=0;Q<Z.length;Q++){var H=Z[Q],w=this.getCoverageIndex(H.coverage,K);if(w<0)continue;switch(H.posFormat){case 1:var W=H.pairSets[w];for(var z=0;z<W.length;z++){var U=W[z];if(U.secondGlyph===Y)return U.value1&&U.value1.xAdvance||0}break;case 2:var $=this.getGlyphClass(H.classDef1,K),V=this.getGlyphClass(H.classDef2,Y),B=H.classRecords[$][V];return B.value1&&B.value1.xAdvance||0}}}return 0};S6.prototype.getKerningTables=function(J,K){if(this.font.tables.gpos)return this.getLookupTables(J,K,"kern",2)};function r0(J){P6.call(this,J,"gsub")}function RQ(J,K){var Y=J.length;if(Y!==K.length)return!1;for(var X=0;X<Y;X++)if(J[X]!==K[X])return!1;return!0}function t7(J,K,Y){var X=J.subtables;for(var Z=0;Z<X.length;Z++){var Q=X[Z];if(Q.substFormat===K)return Q}if(Y)return X.push(Y),Y;return}r0.prototype=P6.prototype;r0.prototype.createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}};r0.prototype.getSingle=function(J,K,Y){var X=[],Z=this.getLookupTables(K,Y,J,1);for(var Q=0;Q<Z.length;Q++){var H=Z[Q].subtables;for(var w=0;w<H.length;w++){var W=H[w],z=this.expandCoverage(W.coverage),U=void 0;if(W.substFormat===1){var $=W.deltaGlyphId;for(U=0;U<z.length;U++){var V=z[U];X.push({sub:V,by:V+$})}}else{var B=W.substitute;for(U=0;U<z.length;U++)X.push({sub:z[U],by:B[U]})}}}return X};r0.prototype.getMultiple=function(J,K,Y){var X=[],Z=this.getLookupTables(K,Y,J,2);for(var Q=0;Q<Z.length;Q++){var H=Z[Q].subtables;for(var w=0;w<H.length;w++){var W=H[w],z=this.expandCoverage(W.coverage),U=void 0;for(U=0;U<z.length;U++){var $=z[U],V=W.sequences[U];X.push({sub:$,by:V})}}}return X};r0.prototype.getAlternates=function(J,K,Y){var X=[],Z=this.getLookupTables(K,Y,J,3);for(var Q=0;Q<Z.length;Q++){var H=Z[Q].subtables;for(var w=0;w<H.length;w++){var W=H[w],z=this.expandCoverage(W.coverage),U=W.alternateSets;for(var $=0;$<z.length;$++)X.push({sub:z[$],by:U[$]})}}return X};r0.prototype.getLigatures=function(J,K,Y){var X=[],Z=this.getLookupTables(K,Y,J,4);for(var Q=0;Q<Z.length;Q++){var H=Z[Q].subtables;for(var w=0;w<H.length;w++){var W=H[w],z=this.expandCoverage(W.coverage),U=W.ligatureSets;for(var $=0;$<z.length;$++){var V=z[$],B=U[$];for(var M=0;M<B.length;M++){var q=B[M];X.push({sub:[V].concat(q.components),by:q.ligGlyph})}}}}return X};r0.prototype.addSingle=function(J,K,Y,X){var Z=this.getLookupTables(Y,X,J,1,!0)[0],Q=t7(Z,2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});w0.assert(Q.coverage.format===1,"Single: unable to modify coverage table format "+Q.coverage.format);var H=K.sub,w=this.binSearch(Q.coverage.glyphs,H);if(w<0)w=-1-w,Q.coverage.glyphs.splice(w,0,H),Q.substitute.splice(w,0,0);Q.substitute[w]=K.by};r0.prototype.addMultiple=function(J,K,Y,X){w0.assert(K.by instanceof Array&&K.by.length>1,'Multiple: "by" must be an array of two or more ids');var Z=this.getLookupTables(Y,X,J,2,!0)[0],Q=t7(Z,1,{substFormat:1,coverage:{format:1,glyphs:[]},sequences:[]});w0.assert(Q.coverage.format===1,"Multiple: unable to modify coverage table format "+Q.coverage.format);var H=K.sub,w=this.binSearch(Q.coverage.glyphs,H);if(w<0)w=-1-w,Q.coverage.glyphs.splice(w,0,H),Q.sequences.splice(w,0,0);Q.sequences[w]=K.by};r0.prototype.addAlternate=function(J,K,Y,X){var Z=this.getLookupTables(Y,X,J,3,!0)[0],Q=t7(Z,1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});w0.assert(Q.coverage.format===1,"Alternate: unable to modify coverage table format "+Q.coverage.format);var H=K.sub,w=this.binSearch(Q.coverage.glyphs,H);if(w<0)w=-1-w,Q.coverage.glyphs.splice(w,0,H),Q.alternateSets.splice(w,0,0);Q.alternateSets[w]=K.by};r0.prototype.addLigature=function(J,K,Y,X){var Z=this.getLookupTables(Y,X,J,4,!0)[0],Q=Z.subtables[0];if(!Q)Q={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},Z.subtables[0]=Q;w0.assert(Q.coverage.format===1,"Ligature: unable to modify coverage table format "+Q.coverage.format);var H=K.sub[0],w=K.sub.slice(1),W={ligGlyph:K.by,components:w},z=this.binSearch(Q.coverage.glyphs,H);if(z>=0){var U=Q.ligatureSets[z];for(var $=0;$<U.length;$++)if(RQ(U[$].components,w))return;U.push(W)}else z=-1-z,Q.coverage.glyphs.splice(z,0,H),Q.ligatureSets.splice(z,0,[W])};r0.prototype.getFeature=function(J,K,Y){if(/ss\d\d/.test(J))return this.getSingle(J,K,Y);switch(J){case"aalt":case"salt":return this.getSingle(J,K,Y).concat(this.getAlternates(J,K,Y));case"dlig":case"liga":case"rlig":return this.getLigatures(J,K,Y);case"ccmp":return this.getMultiple(J,K,Y).concat(this.getLigatures(J,K,Y));case"stch":return this.getMultiple(J,K,Y)}return};r0.prototype.add=function(J,K,Y,X){if(/ss\d\d/.test(J))return this.addSingle(J,K,Y,X);switch(J){case"aalt":case"salt":if(typeof K.by==="number")return this.addSingle(J,K,Y,X);return this.addAlternate(J,K,Y,X);case"dlig":case"liga":case"rlig":return this.addLigature(J,K,Y,X);case"ccmp":if(K.by instanceof Array)return this.addMultiple(J,K,Y,X);return this.addLigature(J,K,Y,X)}return};function R6(J,K){if(!J)throw K}function RJ(J,K){return J.getUint8(K)}function q9(J,K){return J.getUint16(K,!1)}function DQ(J,K){return J.getInt16(K,!1)}function e7(J,K){return J.getUint32(K,!1)}function Q1(J,K){var Y=J.getInt16(K,!1),X=J.getUint16(K+2,!1);return Y+X/65535}function IQ(J,K){var Y="";for(var X=K;X<K+4;X+=1)Y+=String.fromCharCode(J.getInt8(X));return Y}function TQ(J,K,Y){var X=0;for(var Z=0;Z<Y;Z+=1)X<<=8,X+=J.getUint8(K+Z);return X}function CQ(J,K,Y){var X=[];for(var Z=K;Z<Y;Z+=1)X.push(J.getUint8(Z));return X}function PQ(J){var K="";for(var Y=0;Y<J.length;Y+=1)K+=String.fromCharCode(J[Y]);return K}var SQ={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function v(J,K){this.data=J,this.offset=K,this.relativeOffset=0}v.prototype.parseByte=function(){var J=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,J};v.prototype.parseChar=function(){var J=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,J};v.prototype.parseCard8=v.prototype.parseByte;v.prototype.parseUShort=function(){var J=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,J};v.prototype.parseCard16=v.prototype.parseUShort;v.prototype.parseSID=v.prototype.parseUShort;v.prototype.parseOffset16=v.prototype.parseUShort;v.prototype.parseShort=function(){var J=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,J};v.prototype.parseF2Dot14=function(){var J=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,J};v.prototype.parseULong=function(){var J=e7(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,J};v.prototype.parseOffset32=v.prototype.parseULong;v.prototype.parseFixed=function(){var J=Q1(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,J};v.prototype.parseString=function(J){var K=this.data,Y=this.offset+this.relativeOffset,X="";this.relativeOffset+=J;for(var Z=0;Z<J;Z++)X+=String.fromCharCode(K.getUint8(Y+Z));return X};v.prototype.parseTag=function(){return this.parseString(4)};v.prototype.parseLongDateTime=function(){var J=e7(this.data,this.offset+this.relativeOffset+4);return J-=2082844800,this.relativeOffset+=8,J};v.prototype.parseVersion=function(J){var K=q9(this.data,this.offset+this.relativeOffset),Y=q9(this.data,this.offset+this.relativeOffset+2);if(this.relativeOffset+=4,J===void 0)J=4096;return K+Y/J/10};v.prototype.skip=function(J,K){if(K===void 0)K=1;this.relativeOffset+=SQ[J]*K};v.prototype.parseULongList=function(J){if(J===void 0)J=this.parseULong();var K=new Array(J),Y=this.data,X=this.offset+this.relativeOffset;for(var Z=0;Z<J;Z++)K[Z]=Y.getUint32(X),X+=4;return this.relativeOffset+=J*4,K};v.prototype.parseOffset16List=v.prototype.parseUShortList=function(J){if(J===void 0)J=this.parseUShort();var K=new Array(J),Y=this.data,X=this.offset+this.relativeOffset;for(var Z=0;Z<J;Z++)K[Z]=Y.getUint16(X),X+=2;return this.relativeOffset+=J*2,K};v.prototype.parseShortList=function(J){var K=new Array(J),Y=this.data,X=this.offset+this.relativeOffset;for(var Z=0;Z<J;Z++)K[Z]=Y.getInt16(X),X+=2;return this.relativeOffset+=J*2,K};v.prototype.parseByteList=function(J){var K=new Array(J),Y=this.data,X=this.offset+this.relativeOffset;for(var Z=0;Z<J;Z++)K[Z]=Y.getUint8(X++);return this.relativeOffset+=J,K};v.prototype.parseList=function(J,K){if(!K)K=J,J=this.parseUShort();var Y=new Array(J);for(var X=0;X<J;X++)Y[X]=K.call(this);return Y};v.prototype.parseList32=function(J,K){if(!K)K=J,J=this.parseULong();var Y=new Array(J);for(var X=0;X<J;X++)Y[X]=K.call(this);return Y};v.prototype.parseRecordList=function(J,K){if(!K)K=J,J=this.parseUShort();var Y=new Array(J),X=Object.keys(K);for(var Z=0;Z<J;Z++){var Q={};for(var H=0;H<X.length;H++){var w=X[H],W=K[w];Q[w]=W.call(this)}Y[Z]=Q}return Y};v.prototype.parseRecordList32=function(J,K){if(!K)K=J,J=this.parseULong();var Y=new Array(J),X=Object.keys(K);for(var Z=0;Z<J;Z++){var Q={};for(var H=0;H<X.length;H++){var w=X[H],W=K[w];Q[w]=W.call(this)}Y[Z]=Q}return Y};v.prototype.parseStruct=function(J){if(typeof J==="function")return J.call(this);else{var K=Object.keys(J),Y={};for(var X=0;X<K.length;X++){var Z=K[X],Q=J[Z];Y[Z]=Q.call(this)}return Y}};v.prototype.parseValueRecord=function(J){if(J===void 0)J=this.parseUShort();if(J===0)return;var K={};if(J&1)K.xPlacement=this.parseShort();if(J&2)K.yPlacement=this.parseShort();if(J&4)K.xAdvance=this.parseShort();if(J&8)K.yAdvance=this.parseShort();if(J&16)K.xPlaDevice=void 0,this.parseShort();if(J&32)K.yPlaDevice=void 0,this.parseShort();if(J&64)K.xAdvDevice=void 0,this.parseShort();if(J&128)K.yAdvDevice=void 0,this.parseShort();return K};v.prototype.parseValueRecordList=function(){var J=this.parseUShort(),K=this.parseUShort(),Y=new Array(K);for(var X=0;X<K;X++)Y[X]=this.parseValueRecord(J);return Y};v.prototype.parsePointer=function(J){var K=this.parseOffset16();if(K>0)return new v(this.data,this.offset+K).parseStruct(J);return};v.prototype.parsePointer32=function(J){var K=this.parseOffset32();if(K>0)return new v(this.data,this.offset+K).parseStruct(J);return};v.prototype.parseListOfLists=function(J){var K=this.parseOffset16List(),Y=K.length,X=this.relativeOffset,Z=new Array(Y);for(var Q=0;Q<Y;Q++){var H=K[Q];if(H===0){Z[Q]=void 0;continue}if(this.relativeOffset=H,J){var w=this.parseOffset16List(),W=new Array(w.length);for(var z=0;z<w.length;z++)this.relativeOffset=H+w[z],W[z]=J.call(this);Z[Q]=W}else Z[Q]=this.parseUShortList()}return this.relativeOffset=X,Z};v.prototype.parseCoverage=function(){var J=this.offset+this.relativeOffset,K=this.parseUShort(),Y=this.parseUShort();if(K===1)return{format:1,glyphs:this.parseUShortList(Y)};else if(K===2){var X=new Array(Y);for(var Z=0;Z<Y;Z++)X[Z]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:X}}throw new Error("0x"+J.toString(16)+": Coverage format must be 1 or 2.")};v.prototype.parseClassDef=function(){var J=this.offset+this.relativeOffset,K=this.parseUShort();if(K===1)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};else if(K===2)return{format:2,ranges:this.parseRecordList({start:v.uShort,end:v.uShort,classId:v.uShort})};throw new Error("0x"+J.toString(16)+": ClassDef format must be 1 or 2.")};v.list=function(J,K){return function(){return this.parseList(J,K)}};v.list32=function(J,K){return function(){return this.parseList32(J,K)}};v.recordList=function(J,K){return function(){return this.parseRecordList(J,K)}};v.recordList32=function(J,K){return function(){return this.parseRecordList32(J,K)}};v.pointer=function(J){return function(){return this.parsePointer(J)}};v.pointer32=function(J){return function(){return this.parsePointer32(J)}};v.tag=v.prototype.parseTag;v.byte=v.prototype.parseByte;v.uShort=v.offset16=v.prototype.parseUShort;v.uShortList=v.prototype.parseUShortList;v.uLong=v.offset32=v.prototype.parseULong;v.uLongList=v.prototype.parseULongList;v.struct=v.prototype.parseStruct;v.coverage=v.prototype.parseCoverage;v.classDef=v.prototype.parseClassDef;var DJ={reserved:v.uShort,reqFeatureIndex:v.uShort,featureIndexes:v.uShortList};v.prototype.parseScriptList=function(){return this.parsePointer(v.recordList({tag:v.tag,script:v.pointer({defaultLangSys:v.pointer(DJ),langSysRecords:v.recordList({tag:v.tag,langSys:v.pointer(DJ)})})}))||[]};v.prototype.parseFeatureList=function(){return this.parsePointer(v.recordList({tag:v.tag,feature:v.pointer({featureParams:v.offset16,lookupListIndexes:v.uShortList})}))||[]};v.prototype.parseLookupList=function(J){return this.parsePointer(v.list(v.pointer(function(){var K=this.parseUShort();w0.argument(1<=K&&K<=9,"GPOS/GSUB lookup type "+K+" unknown.");var Y=this.parseUShort(),X=Y&16;return{lookupType:K,lookupFlag:Y,subtables:this.parseList(v.pointer(J[K])),markFilteringSet:X?this.parseUShort():void 0}})))||[]};v.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){var J=this.parseUShort(),K=this.parseUShort();w0.argument(J===1&&K<1,"GPOS/GSUB feature variations table unknown.");var Y=this.parseRecordList32({conditionSetOffset:v.offset32,featureTableSubstitutionOffset:v.offset32});return Y})||[]};var i={getByte:RJ,getCard8:RJ,getUShort:q9,getCard16:q9,getShort:DQ,getULong:e7,getFixed:Q1,getTag:IQ,getOffset:TQ,getBytes:CQ,bytesToString:PQ,Parser:v};function IJ(J,K,Y,X,Z){var Q;if((K&X)>0){if(Q=J.parseByte(),(K&Z)===0)Q=-Q;Q=Y+Q}else if((K&Z)>0)Q=Y;else Q=Y+J.parseShort();return Q}function H1(J,K,Y){var X=new i.Parser(K,Y);J.numberOfContours=X.parseShort(),J._xMin=X.parseShort(),J._yMin=X.parseShort(),J._xMax=X.parseShort(),J._yMax=X.parseShort();var Z,Q;if(J.numberOfContours>0){var H=J.endPointIndices=[];for(var w=0;w<J.numberOfContours;w+=1)H.push(X.parseUShort());J.instructionLength=X.parseUShort(),J.instructions=[];for(var W=0;W<J.instructionLength;W+=1)J.instructions.push(X.parseByte());var z=H[H.length-1]+1;Z=[];for(var U=0;U<z;U+=1)if(Q=X.parseByte(),Z.push(Q),(Q&8)>0){var $=X.parseByte();for(var V=0;V<$;V+=1)Z.push(Q),U+=1}if(w0.argument(Z.length===z,"Bad flags."),H.length>0){var B=[],M;if(z>0){for(var q=0;q<z;q+=1)Q=Z[q],M={},M.onCurve=!!(Q&1),M.lastPointOfContour=H.indexOf(q)>=0,B.push(M);var G=0;for(var N=0;N<z;N+=1)Q=Z[N],M=B[N],M.x=IJ(X,Q,G,2,16),G=M.x;var L=0;for(var _=0;_<z;_+=1)Q=Z[_],M=B[_],M.y=IJ(X,Q,L,4,32),L=M.y}J.points=B}else J.points=[]}else if(J.numberOfContours===0)J.points=[];else{J.isComposite=!0,J.points=[],J.components=[];var D=!0;while(D){Z=X.parseUShort();var E={glyphIndex:X.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};if((Z&1)>0)if((Z&2)>0)E.dx=X.parseShort(),E.dy=X.parseShort();else E.matchedPoints=[X.parseUShort(),X.parseUShort()];else if((Z&2)>0)E.dx=X.parseChar(),E.dy=X.parseChar();else E.matchedPoints=[X.parseByte(),X.parseByte()];if((Z&8)>0)E.xScale=E.yScale=X.parseF2Dot14();else if((Z&64)>0)E.xScale=X.parseF2Dot14(),E.yScale=X.parseF2Dot14();else if((Z&128)>0)E.xScale=X.parseF2Dot14(),E.scale01=X.parseF2Dot14(),E.scale10=X.parseF2Dot14(),E.yScale=X.parseF2Dot14();J.components.push(E),D=!!(Z&32)}if(Z&256){J.instructionLength=X.parseUShort(),J.instructions=[];for(var j=0;j<J.instructionLength;j+=1)J.instructions.push(X.parseByte())}}}function l7(J,K){var Y=[];for(var X=0;X<J.length;X+=1){var Z=J[X],Q={x:K.xScale*Z.x+K.scale01*Z.y+K.dx,y:K.scale10*Z.x+K.yScale*Z.y+K.dy,onCurve:Z.onCurve,lastPointOfContour:Z.lastPointOfContour};Y.push(Q)}return Y}function vQ(J){var K=[],Y=[];for(var X=0;X<J.length;X+=1){var Z=J[X];if(Y.push(Z),Z.lastPointOfContour)K.push(Y),Y=[]}return w0.argument(Y.length===0,"There are still points left in the current contour."),K}function W1(J){var K=new x0;if(!J)return K;var Y=vQ(J);for(var X=0;X<Y.length;++X){var Z=Y[X],Q=null,H=Z[Z.length-1],w=Z[0];if(H.onCurve)K.moveTo(H.x,H.y);else if(w.onCurve)K.moveTo(w.x,w.y);else{var W={x:(H.x+w.x)*0.5,y:(H.y+w.y)*0.5};K.moveTo(W.x,W.y)}for(var z=0;z<Z.length;++z)if(Q=H,H=w,w=Z[(z+1)%Z.length],H.onCurve)K.lineTo(H.x,H.y);else{var U=Q,$=w;if(!Q.onCurve)U={x:(H.x+Q.x)*0.5,y:(H.y+Q.y)*0.5};if(!w.onCurve)$={x:(H.x+w.x)*0.5,y:(H.y+w.y)*0.5};K.quadraticCurveTo(H.x,H.y,$.x,$.y)}K.closePath()}return K}function w1(J,K){if(K.isComposite)for(var Y=0;Y<K.components.length;Y+=1){var X=K.components[Y],Z=J.get(X.glyphIndex);if(Z.getPath(),Z.points){var Q=void 0;if(X.matchedPoints===void 0)Q=l7(Z.points,X);else{if(X.matchedPoints[0]>K.points.length-1||X.matchedPoints[1]>Z.points.length-1)throw Error("Matched points out of range in "+K.name);var H=K.points[X.matchedPoints[0]],w=Z.points[X.matchedPoints[1]],W={xScale:X.xScale,scale01:X.scale01,scale10:X.scale10,yScale:X.yScale,dx:0,dy:0};w=l7([w],W)[0],W.dx=H.x-w.x,W.dy=H.y-w.y,Q=l7(Z.points,W)}K.points=K.points.concat(Q)}}return W1(K.points)}function yQ(J,K,Y,X){var Z=new j8.GlyphSet(X);for(var Q=0;Q<Y.length-1;Q+=1){var H=Y[Q],w=Y[Q+1];if(H!==w)Z.push(Q,j8.ttfGlyphLoader(X,Q,H1,J,K+H,w1));else Z.push(Q,j8.glyphLoader(X,Q))}return Z}function kQ(J,K,Y,X){var Z=new j8.GlyphSet(X);return X._push=function(Q){var H=Y[Q],w=Y[Q+1];if(H!==w)Z.push(Q,j8.ttfGlyphLoader(X,Q,H1,J,K+H,w1));else Z.push(Q,j8.glyphLoader(X,Q))},Z}function gQ(J,K,Y,X,Z){if(Z.lowMemory)return kQ(J,K,Y,X);else return yQ(J,K,Y,X)}var z1={getPath:W1,parse:gQ},U1,e8,$1,n7;function V1(J){this.font=J,this.getCommands=function(K){return z1.getPath(K).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function xQ(J){return J}function B1(J){return Math.sign(J)*Math.round(Math.abs(J))}function hQ(J){return Math.sign(J)*Math.round(Math.abs(J*2))/2}function bQ(J){return Math.sign(J)*(Math.round(Math.abs(J)+0.5)-0.5)}function mQ(J){return Math.sign(J)*Math.ceil(Math.abs(J))}function fQ(J){return Math.sign(J)*Math.floor(Math.abs(J))}var q1=function(J){var K=this.srPeriod,Y=this.srPhase,X=this.srThreshold,Z=1;if(J<0)J=-J,Z=-1;if(J+=X-Y,J=Math.trunc(J/K)*K,J+=Y,J<0)return Y*Z;return J*Z},L8={x:1,y:0,axis:"x",distance:function(J,K,Y,X){return(Y?J.xo:J.x)-(X?K.xo:K.x)},interpolate:function(J,K,Y,X){var Z,Q,H,w,W,z,U;if(!X||X===this){if(Z=J.xo-K.xo,Q=J.xo-Y.xo,W=K.x-K.xo,z=Y.x-Y.xo,H=Math.abs(Z),w=Math.abs(Q),U=H+w,U===0){J.x=J.xo+(W+z)/2;return}J.x=J.xo+(W*w+z*H)/U;return}if(Z=X.distance(J,K,!0,!0),Q=X.distance(J,Y,!0,!0),W=X.distance(K,K,!1,!0),z=X.distance(Y,Y,!1,!0),H=Math.abs(Z),w=Math.abs(Q),U=H+w,U===0){L8.setRelative(J,J,(W+z)/2,X,!0);return}L8.setRelative(J,J,(W*w+z*H)/U,X,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(J,K,Y,X,Z){if(!X||X===this){J.x=(Z?K.xo:K.x)+Y;return}var Q=Z?K.xo:K.x,H=Z?K.yo:K.y,w=Q+Y*X.x,W=H+Y*X.y;J.x=w+(J.y-W)/X.normalSlope},slope:0,touch:function(J){J.xTouched=!0},touched:function(J){return J.xTouched},untouch:function(J){J.xTouched=!1}},D8={x:0,y:1,axis:"y",distance:function(J,K,Y,X){return(Y?J.yo:J.y)-(X?K.yo:K.y)},interpolate:function(J,K,Y,X){var Z,Q,H,w,W,z,U;if(!X||X===this){if(Z=J.yo-K.yo,Q=J.yo-Y.yo,W=K.y-K.yo,z=Y.y-Y.yo,H=Math.abs(Z),w=Math.abs(Q),U=H+w,U===0){J.y=J.yo+(W+z)/2;return}J.y=J.yo+(W*w+z*H)/U;return}if(Z=X.distance(J,K,!0,!0),Q=X.distance(J,Y,!0,!0),W=X.distance(K,K,!1,!0),z=X.distance(Y,Y,!1,!0),H=Math.abs(Z),w=Math.abs(Q),U=H+w,U===0){D8.setRelative(J,J,(W+z)/2,X,!0);return}D8.setRelative(J,J,(W*w+z*H)/U,X,!0)},normalSlope:0,setRelative:function(J,K,Y,X,Z){if(!X||X===this){J.y=(Z?K.yo:K.y)+Y;return}var Q=Z?K.xo:K.x,H=Z?K.yo:K.y,w=Q+Y*X.x,W=H+Y*X.y;J.y=W+X.normalSlope*(J.x-w)},slope:Number.POSITIVE_INFINITY,touch:function(J){J.yTouched=!0},touched:function(J){return J.yTouched},untouch:function(J){J.yTouched=!1}};Object.freeze(L8);Object.freeze(D8);function v6(J,K){this.x=J,this.y=K,this.axis=void 0,this.slope=K/J,this.normalSlope=-J/K,Object.freeze(this)}v6.prototype.distance=function(J,K,Y,X){return this.x*L8.distance(J,K,Y,X)+this.y*D8.distance(J,K,Y,X)};v6.prototype.interpolate=function(J,K,Y,X){var Z,Q,H,w,W,z,U;if(H=X.distance(J,K,!0,!0),w=X.distance(J,Y,!0,!0),Z=X.distance(K,K,!1,!0),Q=X.distance(Y,Y,!1,!0),W=Math.abs(H),z=Math.abs(w),U=W+z,U===0){this.setRelative(J,J,(Z+Q)/2,X,!0);return}this.setRelative(J,J,(Z*z+Q*W)/U,X,!0)};v6.prototype.setRelative=function(J,K,Y,X,Z){X=X||this;var Q=Z?K.xo:K.x,H=Z?K.yo:K.y,w=Q+Y*X.x,W=H+Y*X.y,z=X.normalSlope,U=this.slope,$=J.x,V=J.y;J.x=(U*$-z*w+W-V)/(U-z),J.y=U*(J.x-$)+V};v6.prototype.touch=function(J){J.xTouched=!0,J.yTouched=!0};function y6(J,K){var Y=Math.sqrt(J*J+K*K);if(J/=Y,K/=Y,J===1&&K===0)return L8;else if(J===0&&K===1)return D8;else return new v6(J,K)}function I8(J,K,Y,X){this.x=this.xo=Math.round(J*64)/64,this.y=this.yo=Math.round(K*64)/64,this.lastPointOfContour=Y,this.onCurve=X,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}I8.prototype.nextTouched=function(J){var K=this.nextPointOnContour;while(!J.touched(K)&&K!==this)K=K.nextPointOnContour;return K};I8.prototype.prevTouched=function(J){var K=this.prevPointOnContour;while(!J.touched(K)&&K!==this)K=K.prevPointOnContour;return K};var T6=Object.freeze(new I8(0,0)),dQ={cvCutIn:1.0625,deltaBase:9,deltaShift:0.125,loop:1,minDis:1,autoFlip:!0};function d8(J,K){switch(this.env=J,this.stack=[],this.prog=K,J){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=L8,this.round=B1}}V1.prototype.exec=function(J,K){if(typeof K!=="number")throw new Error("Point size is not a number!");if(this._errorState>2)return;var Y=this.font,X=this._prepState;if(!X||X.ppem!==K){var Z=this._fpgmState;if(!Z){if(d8.prototype=dQ,Z=this._fpgmState=new d8("fpgm",Y.tables.fpgm),Z.funcs=[],Z.font=Y,hB.DEBUG)console.log("---EXEC FPGM---"),Z.step=-1;try{e8(Z)}catch(z){console.log("Hinting error in FPGM:"+z),this._errorState=3;return}}d8.prototype=Z,X=this._prepState=new d8("prep",Y.tables.prep),X.ppem=K;var Q=Y.tables.cvt;if(Q){var H=X.cvt=new Array(Q.length),w=K/Y.unitsPerEm;for(var W=0;W<Q.length;W++)H[W]=Q[W]*w}else X.cvt=[];if(hB.DEBUG)console.log("---EXEC PREP---"),X.step=-1;try{e8(X)}catch(z){if(this._errorState<2)console.log("Hinting error in PREP:"+z);this._errorState=2}}if(this._errorState>1)return;try{return $1(J,X)}catch(z){if(this._errorState<1)console.log("Hinting error:"+z),console.log("Note: further hinting errors are silenced");this._errorState=1;return}};$1=function(J,K){var Y=K.ppem/K.font.unitsPerEm,X=Y,Z=J.components,Q,H,w;if(d8.prototype=K,!Z){if(w=new d8("glyf",J.instructions),hB.DEBUG)console.log("---EXEC GLYPH---"),w.step=-1;n7(J,w,Y,X),H=w.gZone}else{var W=K.font;H=[],Q=[];for(var z=0;z<Z.length;z++){var U=Z[z],$=W.glyphs.get(U.glyphIndex);if(w=new d8("glyf",$.instructions),hB.DEBUG)console.log("---EXEC COMP "+z+"---"),w.step=-1;n7($,w,Y,X);var V=Math.round(U.dx*Y),B=Math.round(U.dy*X),M=w.gZone,q=w.contours;for(var G=0;G<M.length;G++){var N=M[G];N.xTouched=N.yTouched=!1,N.xo=N.x=N.x+V,N.yo=N.y=N.y+B}var L=H.length;H.push.apply(H,M);for(var _=0;_<q.length;_++)Q.push(q[_]+L)}if(J.instructions&&!w.inhibitGridFit){if(w=new d8("glyf",J.instructions),w.gZone=w.z0=w.z1=w.z2=H,w.contours=Q,H.push(new I8(0,0),new I8(Math.round(J.advanceWidth*Y),0)),hB.DEBUG)console.log("---EXEC COMPOSITE---"),w.step=-1;e8(w),H.length-=2}}return H};n7=function(J,K,Y,X){var Z=J.points||[],Q=Z.length,H=K.gZone=K.z0=K.z1=K.z2=[],w=K.contours=[],W;for(var z=0;z<Q;z++)W=Z[z],H[z]=new I8(W.x*Y,W.y*X,W.lastPointOfContour,W.onCurve);var U,$;for(var V=0;V<Q;V++){if(W=H[V],!U)U=W,w.push(V);if(W.lastPointOfContour)W.nextPointOnContour=U,U.prevPointOnContour=W,U=void 0;else $=H[V+1],W.nextPointOnContour=$,$.prevPointOnContour=W}if(K.inhibitGridFit)return;if(hB.DEBUG){console.log("PROCESSING GLYPH",K.stack);for(var B=0;B<Q;B++)console.log(B,H[B].x,H[B].y)}if(H.push(new I8(0,0),new I8(Math.round(J.advanceWidth*Y),0)),e8(K),H.length-=2,hB.DEBUG){console.log("FINISHED GLYPH",K.stack);for(var M=0;M<Q;M++)console.log(M,H[M].x,H[M].y)}};e8=function(J){var K=J.prog;if(!K)return;var Y=K.length,X;for(J.ip=0;J.ip<Y;J.ip++){if(hB.DEBUG)J.step++;if(X=U1[K[J.ip]],!X)throw new Error("unknown instruction: 0x"+Number(K[J.ip]).toString(16));X(J)}};function A9(J){var K=J.tZone=new Array(J.gZone.length);for(var Y=0;Y<K.length;Y++)K[Y]=new I8(0,0)}function A1(J,K){var{prog:Y,ip:X}=J,Z=1,Q;do if(Q=Y[++X],Q===88)Z++;else if(Q===89)Z--;else if(Q===64)X+=Y[X+1]+1;else if(Q===65)X+=2*Y[X+1]+1;else if(Q>=176&&Q<=183)X+=Q-176+1;else if(Q>=184&&Q<=191)X+=(Q-184+1)*2;else if(K&&Z===1&&Q===27)break;while(Z>0);J.ip=X}function TJ(J,K){if(hB.DEBUG)console.log(K.step,"SVTCA["+J.axis+"]");K.fv=K.pv=K.dpv=J}function CJ(J,K){if(hB.DEBUG)console.log(K.step,"SPVTCA["+J.axis+"]");K.pv=K.dpv=J}function PJ(J,K){if(hB.DEBUG)console.log(K.step,"SFVTCA["+J.axis+"]");K.fv=J}function SJ(J,K){var Y=K.stack,X=Y.pop(),Z=Y.pop(),Q=K.z2[X],H=K.z1[Z];if(hB.DEBUG)console.log("SPVTL["+J+"]",X,Z);var w,W;if(!J)w=H.x-Q.x,W=H.y-Q.y;else w=Q.y-H.y,W=H.x-Q.x;K.pv=K.dpv=y6(w,W)}function vJ(J,K){var Y=K.stack,X=Y.pop(),Z=Y.pop(),Q=K.z2[X],H=K.z1[Z];if(hB.DEBUG)console.log("SFVTL["+J+"]",X,Z);var w,W;if(!J)w=H.x-Q.x,W=H.y-Q.y;else w=Q.y-H.y,W=H.x-Q.x;K.fv=y6(w,W)}function lQ(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"SPVFS[]",Y,X);J.pv=J.dpv=y6(X,Y)}function cQ(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"SPVFS[]",Y,X);J.fv=y6(X,Y)}function uQ(J){var{stack:K,pv:Y}=J;if(hB.DEBUG)console.log(J.step,"GPV[]");K.push(Y.x*16384),K.push(Y.y*16384)}function pQ(J){var{stack:K,fv:Y}=J;if(hB.DEBUG)console.log(J.step,"GFV[]");K.push(Y.x*16384),K.push(Y.y*16384)}function iQ(J){if(J.fv=J.pv,hB.DEBUG)console.log(J.step,"SFVTPV[]")}function oQ(J){var K=J.stack,Y=K.pop(),X=K.pop(),Z=K.pop(),Q=K.pop(),H=K.pop(),w=J.z0,W=J.z1,z=w[Y],U=w[X],$=W[Z],V=W[Q],B=J.z2[H];if(hB.DEBUG)console.log("ISECT[], ",Y,X,Z,Q,H);var{x:M,y:q}=z,G=U.x,N=U.y,L=$.x,_=$.y,D=V.x,E=V.y,j=(M-G)*(_-E)-(q-N)*(L-D),T=M*N-q*G,R=L*E-_*D;B.x=(T*(L-D)-R*(M-G))/j,B.y=(T*(_-E)-R*(q-N))/j}function rQ(J){if(J.rp0=J.stack.pop(),hB.DEBUG)console.log(J.step,"SRP0[]",J.rp0)}function nQ(J){if(J.rp1=J.stack.pop(),hB.DEBUG)console.log(J.step,"SRP1[]",J.rp1)}function sQ(J){if(J.rp2=J.stack.pop(),hB.DEBUG)console.log(J.step,"SRP2[]",J.rp2)}function aQ(J){var K=J.stack.pop();if(hB.DEBUG)console.log(J.step,"SZP0[]",K);switch(J.zp0=K,K){case 0:if(!J.tZone)A9(J);J.z0=J.tZone;break;case 1:J.z0=J.gZone;break;default:throw new Error("Invalid zone pointer")}}function tQ(J){var K=J.stack.pop();if(hB.DEBUG)console.log(J.step,"SZP1[]",K);switch(J.zp1=K,K){case 0:if(!J.tZone)A9(J);J.z1=J.tZone;break;case 1:J.z1=J.gZone;break;default:throw new Error("Invalid zone pointer")}}function eQ(J){var K=J.stack.pop();if(hB.DEBUG)console.log(J.step,"SZP2[]",K);switch(J.zp2=K,K){case 0:if(!J.tZone)A9(J);J.z2=J.tZone;break;case 1:J.z2=J.gZone;break;default:throw new Error("Invalid zone pointer")}}function JH(J){var K=J.stack.pop();if(hB.DEBUG)console.log(J.step,"SZPS[]",K);switch(J.zp0=J.zp1=J.zp2=K,K){case 0:if(!J.tZone)A9(J);J.z0=J.z1=J.z2=J.tZone;break;case 1:J.z0=J.z1=J.z2=J.gZone;break;default:throw new Error("Invalid zone pointer")}}function KH(J){if(J.loop=J.stack.pop(),hB.DEBUG)console.log(J.step,"SLOOP[]",J.loop)}function YH(J){if(hB.DEBUG)console.log(J.step,"RTG[]");J.round=B1}function XH(J){if(hB.DEBUG)console.log(J.step,"RTHG[]");J.round=bQ}function ZH(J){var K=J.stack.pop();if(hB.DEBUG)console.log(J.step,"SMD[]",K);J.minDis=K/64}function QH(J){if(hB.DEBUG)console.log(J.step,"ELSE[]");A1(J,!1)}function HH(J){var K=J.stack.pop();if(hB.DEBUG)console.log(J.step,"JMPR[]",K);J.ip+=K-1}function WH(J){var K=J.stack.pop();if(hB.DEBUG)console.log(J.step,"SCVTCI[]",K);J.cvCutIn=K/64}function wH(J){var K=J.stack;if(hB.DEBUG)console.log(J.step,"DUP[]");K.push(K[K.length-1])}function c7(J){if(hB.DEBUG)console.log(J.step,"POP[]");J.stack.pop()}function zH(J){if(hB.DEBUG)console.log(J.step,"CLEAR[]");J.stack.length=0}function UH(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"SWAP[]");K.push(Y),K.push(X)}function $H(J){var K=J.stack;if(hB.DEBUG)console.log(J.step,"DEPTH[]");K.push(K.length)}function VH(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"LOOPCALL[]",Y,X);var{ip:Z,prog:Q}=J;J.prog=J.funcs[Y];for(var H=0;H<X;H++)if(e8(J),hB.DEBUG)console.log(++J.step,H+1<X?"next loopcall":"done loopcall",H);J.ip=Z,J.prog=Q}function BH(J){var K=J.stack.pop();if(hB.DEBUG)console.log(J.step,"CALL[]",K);var{ip:Y,prog:X}=J;if(J.prog=J.funcs[K],e8(J),J.ip=Y,J.prog=X,hB.DEBUG)console.log(++J.step,"returning from",K)}function qH(J){var K=J.stack,Y=K.pop();if(hB.DEBUG)console.log(J.step,"CINDEX[]",Y);K.push(K[K.length-Y])}function AH(J){var K=J.stack,Y=K.pop();if(hB.DEBUG)console.log(J.step,"MINDEX[]",Y);K.push(K.splice(K.length-Y,1)[0])}function GH(J){if(J.env!=="fpgm")throw new Error("FDEF not allowed here");var{stack:K,prog:Y,ip:X}=J,Z=K.pop(),Q=X;if(hB.DEBUG)console.log(J.step,"FDEF[]",Z);while(Y[++X]!==45);J.ip=X,J.funcs[Z]=Y.slice(Q+1,X)}function yJ(J,K){var Y=K.stack.pop(),X=K.z0[Y],Z=K.fv,Q=K.pv;if(hB.DEBUG)console.log(K.step,"MDAP["+J+"]",Y);var H=Q.distance(X,T6);if(J)H=K.round(H);Z.setRelative(X,T6,H,Q),Z.touch(X),K.rp0=K.rp1=Y}function kJ(J,K){var Y=K.z2,X=Y.length-2,Z,Q,H;if(hB.DEBUG)console.log(K.step,"IUP["+J.axis+"]");for(var w=0;w<X;w++){if(Z=Y[w],J.touched(Z))continue;if(Q=Z.prevTouched(J),Q===Z)continue;if(H=Z.nextTouched(J),Q===H)J.setRelative(Z,Z,J.distance(Q,Q,!1,!0),J,!0);J.interpolate(Z,Q,H,J)}}function gJ(J,K){var Y=K.stack,X=J?K.rp1:K.rp2,Z=(J?K.z0:K.z1)[X],Q=K.fv,H=K.pv,w=K.loop,W=K.z2;while(w--){var z=Y.pop(),U=W[z],$=H.distance(Z,Z,!1,!0);if(Q.setRelative(U,U,$,H),Q.touch(U),hB.DEBUG)console.log(K.step,(K.loop>1?"loop "+(K.loop-w)+": ":"")+"SHP["+(J?"rp1":"rp2")+"]",z)}K.loop=1}function xJ(J,K){var Y=K.stack,X=J?K.rp1:K.rp2,Z=(J?K.z0:K.z1)[X],Q=K.fv,H=K.pv,w=Y.pop(),W=K.z2[K.contours[w]],z=W;if(hB.DEBUG)console.log(K.step,"SHC["+J+"]",w);var U=H.distance(Z,Z,!1,!0);do{if(z!==Z)Q.setRelative(z,z,U,H);z=z.nextPointOnContour}while(z!==W)}function hJ(J,K){var Y=K.stack,X=J?K.rp1:K.rp2,Z=(J?K.z0:K.z1)[X],Q=K.fv,H=K.pv,w=Y.pop();if(hB.DEBUG)console.log(K.step,"SHZ["+J+"]",w);var W;switch(w){case 0:W=K.tZone;break;case 1:W=K.gZone;break;default:throw new Error("Invalid zone")}var z,U=H.distance(Z,Z,!1,!0),$=W.length-2;for(var V=0;V<$;V++)z=W[V],Q.setRelative(z,z,U,H)}function MH(J){var{stack:K,loop:Y,fv:X}=J,Z=K.pop()/64,Q=J.z2;while(Y--){var H=K.pop(),w=Q[H];if(hB.DEBUG)console.log(J.step,(J.loop>1?"loop "+(J.loop-Y)+": ":"")+"SHPIX[]",H,Z);X.setRelative(w,w,Z),X.touch(w)}J.loop=1}function OH(J){var{stack:K,rp1:Y,rp2:X,loop:Z}=J,Q=J.z0[Y],H=J.z1[X],w=J.fv,W=J.dpv,z=J.z2;while(Z--){var U=K.pop(),$=z[U];if(hB.DEBUG)console.log(J.step,(J.loop>1?"loop "+(J.loop-Z)+": ":"")+"IP[]",U,Y,"<->",X);w.interpolate($,Q,H,W),w.touch($)}J.loop=1}function bJ(J,K){var Y=K.stack,X=Y.pop()/64,Z=Y.pop(),Q=K.z1[Z],H=K.z0[K.rp0],w=K.fv,W=K.pv;if(w.setRelative(Q,H,X,W),w.touch(Q),hB.DEBUG)console.log(K.step,"MSIRP["+J+"]",X,Z);if(K.rp1=K.rp0,K.rp2=Z,J)K.rp0=Z}function NH(J){var{stack:K,rp0:Y}=J,X=J.z0[Y],Z=J.loop,Q=J.fv,H=J.pv,w=J.z1;while(Z--){var W=K.pop(),z=w[W];if(hB.DEBUG)console.log(J.step,(J.loop>1?"loop "+(J.loop-Z)+": ":"")+"ALIGNRP[]",W);Q.setRelative(z,X,0,H),Q.touch(z)}J.loop=1}function LH(J){if(hB.DEBUG)console.log(J.step,"RTDG[]");J.round=hQ}function mJ(J,K){var Y=K.stack,X=Y.pop(),Z=Y.pop(),Q=K.z0[Z],H=K.fv,w=K.pv,W=K.cvt[X];if(hB.DEBUG)console.log(K.step,"MIAP["+J+"]",X,"(",W,")",Z);var z=w.distance(Q,T6);if(J){if(Math.abs(z-W)<K.cvCutIn)z=W;z=K.round(z)}if(H.setRelative(Q,T6,z,w),K.zp0===0)Q.xo=Q.x,Q.yo=Q.y;H.touch(Q),K.rp0=K.rp1=Z}function jH(J){var{prog:K,ip:Y,stack:X}=J,Z=K[++Y];if(hB.DEBUG)console.log(J.step,"NPUSHB[]",Z);for(var Q=0;Q<Z;Q++)X.push(K[++Y]);J.ip=Y}function FH(J){var{ip:K,prog:Y,stack:X}=J,Z=Y[++K];if(hB.DEBUG)console.log(J.step,"NPUSHW[]",Z);for(var Q=0;Q<Z;Q++){var H=Y[++K]<<8|Y[++K];if(H&32768)H=-((H^65535)+1);X.push(H)}J.ip=K}function EH(J){var{stack:K,store:Y}=J;if(!Y)Y=J.store=[];var X=K.pop(),Z=K.pop();if(hB.DEBUG)console.log(J.step,"WS",X,Z);Y[Z]=X}function _H(J){var{stack:K,store:Y}=J,X=K.pop();if(hB.DEBUG)console.log(J.step,"RS",X);var Z=Y&&Y[X]||0;K.push(Z)}function RH(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"WCVTP",Y,X);J.cvt[X]=Y/64}function DH(J){var K=J.stack,Y=K.pop();if(hB.DEBUG)console.log(J.step,"RCVT",Y);K.push(J.cvt[Y]*64)}function fJ(J,K){var Y=K.stack,X=Y.pop(),Z=K.z2[X];if(hB.DEBUG)console.log(K.step,"GC["+J+"]",X);Y.push(K.dpv.distance(Z,T6,J,!1)*64)}function dJ(J,K){var Y=K.stack,X=Y.pop(),Z=Y.pop(),Q=K.z1[X],H=K.z0[Z],w=K.dpv.distance(H,Q,J,J);if(hB.DEBUG)console.log(K.step,"MD["+J+"]",X,Z,"->",w);K.stack.push(Math.round(w*64))}function IH(J){if(hB.DEBUG)console.log(J.step,"MPPEM[]");J.stack.push(J.ppem)}function TH(J){if(hB.DEBUG)console.log(J.step,"FLIPON[]");J.autoFlip=!0}function CH(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"LT[]",Y,X);K.push(X<Y?1:0)}function PH(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"LTEQ[]",Y,X);K.push(X<=Y?1:0)}function SH(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"GT[]",Y,X);K.push(X>Y?1:0)}function vH(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"GTEQ[]",Y,X);K.push(X>=Y?1:0)}function yH(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"EQ[]",Y,X);K.push(Y===X?1:0)}function kH(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"NEQ[]",Y,X);K.push(Y!==X?1:0)}function gH(J){var K=J.stack,Y=K.pop();if(hB.DEBUG)console.log(J.step,"ODD[]",Y);K.push(Math.trunc(Y)%2?1:0)}function xH(J){var K=J.stack,Y=K.pop();if(hB.DEBUG)console.log(J.step,"EVEN[]",Y);K.push(Math.trunc(Y)%2?0:1)}function hH(J){var K=J.stack.pop();if(hB.DEBUG)console.log(J.step,"IF[]",K);if(!K){if(A1(J,!0),hB.DEBUG)console.log(J.step,"EIF[]")}}function bH(J){if(hB.DEBUG)console.log(J.step,"EIF[]")}function mH(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"AND[]",Y,X);K.push(Y&&X?1:0)}function fH(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"OR[]",Y,X);K.push(Y||X?1:0)}function dH(J){var K=J.stack,Y=K.pop();if(hB.DEBUG)console.log(J.step,"NOT[]",Y);K.push(Y?0:1)}function u7(J,K){var Y=K.stack,X=Y.pop(),Z=K.fv,Q=K.pv,H=K.ppem,w=K.deltaBase+(J-1)*16,W=K.deltaShift,z=K.z0;if(hB.DEBUG)console.log(K.step,"DELTAP["+J+"]",X,Y);for(var U=0;U<X;U++){var $=Y.pop(),V=Y.pop(),B=w+((V&240)>>4);if(B!==H)continue;var M=(V&15)-8;if(M>=0)M++;if(hB.DEBUG)console.log(K.step,"DELTAPFIX",$,"by",M*W);var q=z[$];Z.setRelative(q,q,M*W,Q)}}function lH(J){var K=J.stack,Y=K.pop();if(hB.DEBUG)console.log(J.step,"SDB[]",Y);J.deltaBase=Y}function cH(J){var K=J.stack,Y=K.pop();if(hB.DEBUG)console.log(J.step,"SDS[]",Y);J.deltaShift=Math.pow(0.5,Y)}function uH(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"ADD[]",Y,X);K.push(X+Y)}function pH(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"SUB[]",Y,X);K.push(X-Y)}function iH(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"DIV[]",Y,X);K.push(X*64/Y)}function oH(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"MUL[]",Y,X);K.push(X*Y/64)}function rH(J){var K=J.stack,Y=K.pop();if(hB.DEBUG)console.log(J.step,"ABS[]",Y);K.push(Math.abs(Y))}function nH(J){var K=J.stack,Y=K.pop();if(hB.DEBUG)console.log(J.step,"NEG[]",Y);K.push(-Y)}function sH(J){var K=J.stack,Y=K.pop();if(hB.DEBUG)console.log(J.step,"FLOOR[]",Y);K.push(Math.floor(Y/64)*64)}function aH(J){var K=J.stack,Y=K.pop();if(hB.DEBUG)console.log(J.step,"CEILING[]",Y);K.push(Math.ceil(Y/64)*64)}function $9(J,K){var Y=K.stack,X=Y.pop();if(hB.DEBUG)console.log(K.step,"ROUND[]");Y.push(K.round(X/64)*64)}function tH(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"WCVTF[]",Y,X);J.cvt[X]=Y*J.ppem/J.font.unitsPerEm}function p7(J,K){var Y=K.stack,X=Y.pop(),Z=K.ppem,Q=K.deltaBase+(J-1)*16,H=K.deltaShift;if(hB.DEBUG)console.log(K.step,"DELTAC["+J+"]",X,Y);for(var w=0;w<X;w++){var W=Y.pop(),z=Y.pop(),U=Q+((z&240)>>4);if(U!==Z)continue;var $=(z&15)-8;if($>=0)$++;var V=$*H;if(hB.DEBUG)console.log(K.step,"DELTACFIX",W,"by",V);K.cvt[W]+=V}}function eH(J){var K=J.stack.pop();if(hB.DEBUG)console.log(J.step,"SROUND[]",K);J.round=q1;var Y;switch(K&192){case 0:Y=0.5;break;case 64:Y=1;break;case 128:Y=2;break;default:throw new Error("invalid SROUND value")}switch(J.srPeriod=Y,K&48){case 0:J.srPhase=0;break;case 16:J.srPhase=0.25*Y;break;case 32:J.srPhase=0.5*Y;break;case 48:J.srPhase=0.75*Y;break;default:throw new Error("invalid SROUND value")}if(K&=15,K===0)J.srThreshold=0;else J.srThreshold=(K/8-0.5)*Y}function JW(J){var K=J.stack.pop();if(hB.DEBUG)console.log(J.step,"S45ROUND[]",K);J.round=q1;var Y;switch(K&192){case 0:Y=Math.sqrt(2)/2;break;case 64:Y=Math.sqrt(2);break;case 128:Y=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(J.srPeriod=Y,K&48){case 0:J.srPhase=0;break;case 16:J.srPhase=0.25*Y;break;case 32:J.srPhase=0.5*Y;break;case 48:J.srPhase=0.75*Y;break;default:throw new Error("invalid S45ROUND value")}if(K&=15,K===0)J.srThreshold=0;else J.srThreshold=(K/8-0.5)*Y}function KW(J){if(hB.DEBUG)console.log(J.step,"ROFF[]");J.round=xQ}function YW(J){if(hB.DEBUG)console.log(J.step,"RUTG[]");J.round=mQ}function XW(J){if(hB.DEBUG)console.log(J.step,"RDTG[]");J.round=fQ}function ZW(J){var K=J.stack.pop();if(hB.DEBUG)console.log(J.step,"SCANCTRL[]",K)}function lJ(J,K){var Y=K.stack,X=Y.pop(),Z=Y.pop(),Q=K.z2[X],H=K.z1[Z];if(hB.DEBUG)console.log(K.step,"SDPVTL["+J+"]",X,Z);var w,W;if(!J)w=H.x-Q.x,W=H.y-Q.y;else w=Q.y-H.y,W=H.x-Q.x;K.dpv=y6(w,W)}function QW(J){var K=J.stack,Y=K.pop(),X=0;if(hB.DEBUG)console.log(J.step,"GETINFO[]",Y);if(Y&1)X=35;if(Y&32)X|=4096;K.push(X)}function HW(J){var K=J.stack,Y=K.pop(),X=K.pop(),Z=K.pop();if(hB.DEBUG)console.log(J.step,"ROLL[]");K.push(X),K.push(Y),K.push(Z)}function WW(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"MAX[]",Y,X);K.push(Math.max(X,Y))}function wW(J){var K=J.stack,Y=K.pop(),X=K.pop();if(hB.DEBUG)console.log(J.step,"MIN[]",Y,X);K.push(Math.min(X,Y))}function zW(J){var K=J.stack.pop();if(hB.DEBUG)console.log(J.step,"SCANTYPE[]",K)}function UW(J){var K=J.stack.pop(),Y=J.stack.pop();if(hB.DEBUG)console.log(J.step,"INSTCTRL[]",K,Y);switch(K){case 1:J.inhibitGridFit=!!Y;return;case 2:J.ignoreCvt=!!Y;return;default:throw new Error("invalid INSTCTRL[] selector")}}function h8(J,K){var{stack:Y,prog:X,ip:Z}=K;if(hB.DEBUG)console.log(K.step,"PUSHB["+J+"]");for(var Q=0;Q<J;Q++)Y.push(X[++Z]);K.ip=Z}function b8(J,K){var{ip:Y,prog:X,stack:Z}=K;if(hB.DEBUG)console.log(K.ip,"PUSHW["+J+"]");for(var Q=0;Q<J;Q++){var H=X[++Y]<<8|X[++Y];if(H&32768)H=-((H^65535)+1);Z.push(H)}K.ip=Y}function p(J,K,Y,X,Z,Q){var H=Q.stack,w=J&&H.pop(),W=H.pop(),z=Q.rp0,U=Q.z0[z],$=Q.z1[W],V=Q.minDis,B=Q.fv,M=Q.dpv,q,G,N,L;if(G=q=M.distance($,U,!0,!0),N=G>=0?1:-1,G=Math.abs(G),J){if(L=Q.cvt[w],X&&Math.abs(G-L)<Q.cvCutIn)G=L}if(Y&&G<V)G=V;if(X)G=Q.round(G);if(B.setRelative($,U,N*G,M),B.touch($),hB.DEBUG)console.log(Q.step,(J?"MIRP[":"MDRP[")+(K?"M":"m")+(Y?">":"_")+(X?"R":"_")+(Z===0?"Gr":Z===1?"Bl":Z===2?"Wh":"")+"]",J?w+"("+Q.cvt[w]+","+L+")":"",W,"(d =",q,"->",N*G,")");if(Q.rp1=Q.rp0,Q.rp2=W,K)Q.rp0=W}U1=[TJ.bind(void 0,D8),TJ.bind(void 0,L8),CJ.bind(void 0,D8),CJ.bind(void 0,L8),PJ.bind(void 0,D8),PJ.bind(void 0,L8),SJ.bind(void 0,0),SJ.bind(void 0,1),vJ.bind(void 0,0),vJ.bind(void 0,1),lQ,cQ,uQ,pQ,iQ,oQ,rQ,nQ,sQ,aQ,tQ,eQ,JH,KH,YH,XH,ZH,QH,HH,WH,void 0,void 0,wH,c7,zH,UH,$H,qH,AH,void 0,void 0,void 0,VH,BH,GH,void 0,yJ.bind(void 0,0),yJ.bind(void 0,1),kJ.bind(void 0,D8),kJ.bind(void 0,L8),gJ.bind(void 0,0),gJ.bind(void 0,1),xJ.bind(void 0,0),xJ.bind(void 0,1),hJ.bind(void 0,0),hJ.bind(void 0,1),MH,OH,bJ.bind(void 0,0),bJ.bind(void 0,1),NH,LH,mJ.bind(void 0,0),mJ.bind(void 0,1),jH,FH,EH,_H,RH,DH,fJ.bind(void 0,0),fJ.bind(void 0,1),void 0,dJ.bind(void 0,0),dJ.bind(void 0,1),IH,void 0,TH,void 0,void 0,CH,PH,SH,vH,yH,kH,gH,xH,hH,bH,mH,fH,dH,u7.bind(void 0,1),lH,cH,uH,pH,iH,oH,rH,nH,sH,aH,$9.bind(void 0,0),$9.bind(void 0,1),$9.bind(void 0,2),$9.bind(void 0,3),void 0,void 0,void 0,void 0,tH,u7.bind(void 0,2),u7.bind(void 0,3),p7.bind(void 0,1),p7.bind(void 0,2),p7.bind(void 0,3),eH,JW,void 0,void 0,KW,void 0,YW,XW,c7,c7,void 0,void 0,void 0,void 0,void 0,ZW,lJ.bind(void 0,0),lJ.bind(void 0,1),QW,void 0,HW,WW,wW,zW,UW,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,h8.bind(void 0,1),h8.bind(void 0,2),h8.bind(void 0,3),h8.bind(void 0,4),h8.bind(void 0,5),h8.bind(void 0,6),h8.bind(void 0,7),h8.bind(void 0,8),b8.bind(void 0,1),b8.bind(void 0,2),b8.bind(void 0,3),b8.bind(void 0,4),b8.bind(void 0,5),b8.bind(void 0,6),b8.bind(void 0,7),b8.bind(void 0,8),p.bind(void 0,0,0,0,0,0),p.bind(void 0,0,0,0,0,1),p.bind(void 0,0,0,0,0,2),p.bind(void 0,0,0,0,0,3),p.bind(void 0,0,0,0,1,0),p.bind(void 0,0,0,0,1,1),p.bind(void 0,0,0,0,1,2),p.bind(void 0,0,0,0,1,3),p.bind(void 0,0,0,1,0,0),p.bind(void 0,0,0,1,0,1),p.bind(void 0,0,0,1,0,2),p.bind(void 0,0,0,1,0,3),p.bind(void 0,0,0,1,1,0),p.bind(void 0,0,0,1,1,1),p.bind(void 0,0,0,1,1,2),p.bind(void 0,0,0,1,1,3),p.bind(void 0,0,1,0,0,0),p.bind(void 0,0,1,0,0,1),p.bind(void 0,0,1,0,0,2),p.bind(void 0,0,1,0,0,3),p.bind(void 0,0,1,0,1,0),p.bind(void 0,0,1,0,1,1),p.bind(void 0,0,1,0,1,2),p.bind(void 0,0,1,0,1,3),p.bind(void 0,0,1,1,0,0),p.bind(void 0,0,1,1,0,1),p.bind(void 0,0,1,1,0,2),p.bind(void 0,0,1,1,0,3),p.bind(void 0,0,1,1,1,0),p.bind(void 0,0,1,1,1,1),p.bind(void 0,0,1,1,1,2),p.bind(void 0,0,1,1,1,3),p.bind(void 0,1,0,0,0,0),p.bind(void 0,1,0,0,0,1),p.bind(void 0,1,0,0,0,2),p.bind(void 0,1,0,0,0,3),p.bind(void 0,1,0,0,1,0),p.bind(void 0,1,0,0,1,1),p.bind(void 0,1,0,0,1,2),p.bind(void 0,1,0,0,1,3),p.bind(void 0,1,0,1,0,0),p.bind(void 0,1,0,1,0,1),p.bind(void 0,1,0,1,0,2),p.bind(void 0,1,0,1,0,3),p.bind(void 0,1,0,1,1,0),p.bind(void 0,1,0,1,1,1),p.bind(void 0,1,0,1,1,2),p.bind(void 0,1,0,1,1,3),p.bind(void 0,1,1,0,0,0),p.bind(void 0,1,1,0,0,1),p.bind(void 0,1,1,0,0,2),p.bind(void 0,1,1,0,0,3),p.bind(void 0,1,1,0,1,0),p.bind(void 0,1,1,0,1,1),p.bind(void 0,1,1,0,1,2),p.bind(void 0,1,1,0,1,3),p.bind(void 0,1,1,1,0,0),p.bind(void 0,1,1,1,0,1),p.bind(void 0,1,1,1,0,2),p.bind(void 0,1,1,1,0,3),p.bind(void 0,1,1,1,1,0),p.bind(void 0,1,1,1,1,1),p.bind(void 0,1,1,1,1,2),p.bind(void 0,1,1,1,1,3)];function A6(J){this.char=J,this.state={},this.activeState=null}function J4(J,K,Y){this.contextName=Y,this.startIndex=J,this.endOffset=K}function $W(J,K,Y){this.contextName=J,this.openRange=null,this.ranges=[],this.checkStart=K,this.checkEnd=Y}function W8(J,K){this.context=J,this.index=K,this.length=J.length,this.current=J[K],this.backtrack=J.slice(0,K),this.lookahead=J.slice(K+1)}function G9(J){this.eventId=J,this.subscribers=[]}function VW(J){var K=this,Y=["start","end","next","newToken","contextStart","contextEnd","insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD","updateContextsRanges"];if(Y.forEach(function(Z){Object.defineProperty(K.events,Z,{value:new G9(Z)})}),J)Y.forEach(function(Z){var Q=J[Z];if(typeof Q==="function")K.events[Z].subscribe(Q)});var X=["insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD"];X.forEach(function(Z){K.events[Z].subscribe(K.updateContextsRanges)})}function L0(J){this.tokens=[],this.registeredContexts={},this.contextCheckers=[],this.events={},this.registeredModifiers=[],VW.call(this,J)}A6.prototype.setState=function(J,K){return this.state[J]=K,this.activeState={key:J,value:this.state[J]},this.activeState};A6.prototype.getState=function(J){return this.state[J]||null};L0.prototype.inboundIndex=function(J){return J>=0&&J<this.tokens.length};L0.prototype.composeRUD=function(J){var K=this,Y=!0,X=J.map(function(Q){return K[Q[0]].apply(K,Q.slice(1).concat(Y))}),Z=function(Q){return typeof Q==="object"&&Q.hasOwnProperty("FAIL")};if(X.every(Z))return{FAIL:"composeRUD: one or more operations hasn't completed successfully",report:X.filter(Z)};this.dispatch("composeRUD",[X.filter(function(Q){return!Z(Q)})])};L0.prototype.replaceRange=function(J,K,Y,X){K=K!==null?K:this.tokens.length;var Z=Y.every(function(H){return H instanceof A6});if(!isNaN(J)&&this.inboundIndex(J)&&Z){var Q=this.tokens.splice.apply(this.tokens,[J,K].concat(Y));if(!X)this.dispatch("replaceToken",[J,K,Y]);return[Q,Y]}else return{FAIL:"replaceRange: invalid tokens or startIndex."}};L0.prototype.replaceToken=function(J,K,Y){if(!isNaN(J)&&this.inboundIndex(J)&&K instanceof A6){var X=this.tokens.splice(J,1,K);if(!Y)this.dispatch("replaceToken",[J,K]);return[X[0],K]}else return{FAIL:"replaceToken: invalid token or index."}};L0.prototype.removeRange=function(J,K,Y){K=!isNaN(K)?K:this.tokens.length;var X=this.tokens.splice(J,K);if(!Y)this.dispatch("removeRange",[X,J,K]);return X};L0.prototype.removeToken=function(J,K){if(!isNaN(J)&&this.inboundIndex(J)){var Y=this.tokens.splice(J,1);if(!K)this.dispatch("removeToken",[Y,J]);return Y}else return{FAIL:"removeToken: invalid token index."}};L0.prototype.insertToken=function(J,K,Y){var X=J.every(function(Z){return Z instanceof A6});if(X){if(this.tokens.splice.apply(this.tokens,[K,0].concat(J)),!Y)this.dispatch("insertToken",[J,K]);return J}else return{FAIL:"insertToken: invalid token(s)."}};L0.prototype.registerModifier=function(J,K,Y){this.events.newToken.subscribe(function(X,Z){var Q=[X,Z],H=K===null||K.apply(this,Q)===!0,w=[X,Z];if(H){var W=Y.apply(this,w);X.setState(J,W)}}),this.registeredModifiers.push(J)};G9.prototype.subscribe=function(J){if(typeof J==="function")return this.subscribers.push(J)-1;else return{FAIL:"invalid '"+this.eventId+"' event handler"}};G9.prototype.unsubscribe=function(J){this.subscribers.splice(J,1)};W8.prototype.setCurrentIndex=function(J){this.index=J,this.current=this.context[J],this.backtrack=this.context.slice(0,J),this.lookahead=this.context.slice(J+1)};W8.prototype.get=function(J){switch(!0){case J===0:return this.current;case(J<0&&Math.abs(J)<=this.backtrack.length):return this.backtrack.slice(J)[0];case(J>0&&J<=this.lookahead.length):return this.lookahead[J-1];default:return null}};L0.prototype.rangeToText=function(J){if(J instanceof J4)return this.getRangeTokens(J).map(function(K){return K.char}).join("")};L0.prototype.getText=function(){return this.tokens.map(function(J){return J.char}).join("")};L0.prototype.getContext=function(J){var K=this.registeredContexts[J];return K?K:null};L0.prototype.on=function(J,K){var Y=this.events[J];if(Y)return Y.subscribe(K);else return null};L0.prototype.dispatch=function(J,K){var Y=this,X=this.events[J];if(X instanceof G9)X.subscribers.forEach(function(Z){Z.apply(Y,K||[])})};L0.prototype.registerContextChecker=function(J,K,Y){if(this.getContext(J))return{FAIL:"context name '"+J+"' is already registered."};if(typeof K!=="function")return{FAIL:"missing context start check."};if(typeof Y!=="function")return{FAIL:"missing context end check."};var X=new $W(J,K,Y);return this.registeredContexts[J]=X,this.contextCheckers.push(X),X};L0.prototype.getRangeTokens=function(J){var K=J.startIndex+J.endOffset;return[].concat(this.tokens.slice(J.startIndex,K))};L0.prototype.getContextRanges=function(J){var K=this.getContext(J);if(K)return K.ranges;else return{FAIL:"context checker '"+J+"' is not registered."}};L0.prototype.resetContextsRanges=function(){var J=this.registeredContexts;for(var K in J)if(J.hasOwnProperty(K)){var Y=J[K];Y.ranges=[]}};L0.prototype.updateContextsRanges=function(){this.resetContextsRanges();var J=this.tokens.map(function(X){return X.char});for(var K=0;K<J.length;K++){var Y=new W8(J,K);this.runContextCheck(Y)}this.dispatch("updateContextsRanges",[this.registeredContexts])};L0.prototype.setEndOffset=function(J,K){var Y=this.getContext(K).openRange.startIndex,X=new J4(Y,J,K),Z=this.getContext(K).ranges;return X.rangeId=K+"."+Z.length,Z.push(X),this.getContext(K).openRange=null,X};L0.prototype.runContextCheck=function(J){var K=this,Y=J.index;this.contextCheckers.forEach(function(X){var Z=X.contextName,Q=K.getContext(Z).openRange;if(!Q&&X.checkStart(J))Q=new J4(Y,null,Z),K.getContext(Z).openRange=Q,K.dispatch("contextStart",[Z,Y]);if(!!Q&&X.checkEnd(J)){var H=Y-Q.startIndex+1,w=K.setEndOffset(H,Z);K.dispatch("contextEnd",[Z,w])}})};L0.prototype.tokenize=function(J){this.tokens=[],this.resetContextsRanges();var K=Array.from(J);this.dispatch("start");for(var Y=0;Y<K.length;Y++){var X=K[Y],Z=new W8(K,Y);this.dispatch("next",[Z]),this.runContextCheck(Z);var Q=new A6(X);this.tokens.push(Q),this.dispatch("newToken",[Q,Z])}return this.dispatch("end",[this.tokens]),this.tokens};function l8(J){return/[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(J)}function G1(J){return/[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(J)}function c8(J){return/[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(J)}function V9(J){return/[A-z]/.test(J)}function BW(J){return/\s/.test(J)}function n0(J){this.font=J,this.features={}}function a8(J){this.id=J.id,this.tag=J.tag,this.substitution=J.substitution}function k6(J,K){if(!J)return-1;switch(K.format){case 1:return K.glyphs.indexOf(J);case 2:var Y=K.ranges;for(var X=0;X<Y.length;X++){var Z=Y[X];if(J>=Z.start&&J<=Z.end){var Q=J-Z.start;return Z.index+Q}}break;default:return-1}return-1}function qW(J,K){var Y=k6(J,K.coverage);if(Y===-1)return null;return J+K.deltaGlyphId}function AW(J,K){var Y=k6(J,K.coverage);if(Y===-1)return null;return K.substitute[Y]}function i7(J,K){var Y=[];for(var X=0;X<J.length;X++){var Z=J[X],Q=K.current;Q=Array.isArray(Q)?Q[0]:Q;var H=k6(Q,Z);if(H!==-1)Y.push(H)}if(Y.length!==J.length)return-1;return Y}function GW(J,K){var Y=K.inputCoverage.length+K.lookaheadCoverage.length+K.backtrackCoverage.length;if(J.context.length<Y)return[];var X=i7(K.inputCoverage,J);if(X===-1)return[];var Z=K.inputCoverage.length-1;if(J.lookahead.length<K.lookaheadCoverage.length)return[];var Q=J.lookahead.slice(Z);while(Q.length&&c8(Q[0].char))Q.shift();var H=new W8(Q,0),w=i7(K.lookaheadCoverage,H),W=[].concat(J.backtrack);W.reverse();while(W.length&&c8(W[0].char))W.shift();if(W.length<K.backtrackCoverage.length)return[];var z=new W8(W,0),U=i7(K.backtrackCoverage,z),$=X.length===K.inputCoverage.length&&w.length===K.lookaheadCoverage.length&&U.length===K.backtrackCoverage.length,V=[];if($)for(var B=0;B<K.lookupRecords.length;B++){var M=K.lookupRecords[B],q=M.lookupListIndex,G=this.getLookupByIndex(q);for(var N=0;N<G.subtables.length;N++){var L=G.subtables[N],_=this.getLookupMethod(G,L),D=this.getSubstitutionType(G,L);if(D==="12")for(var E=0;E<X.length;E++){var j=J.get(E),T=_(j);if(T)V.push(T)}}}return V}function MW(J,K){var Y=J.current,X=k6(Y,K.coverage);if(X===-1)return null;var Z,Q=K.ligatureSets[X];for(var H=0;H<Q.length;H++){Z=Q[H];for(var w=0;w<Z.components.length;w++){var W=J.lookahead[w],z=Z.components[w];if(W!==z)break;if(w===Z.components.length-1)return Z}}return null}function OW(J,K){var Y=k6(J,K.coverage);if(Y===-1)return null;return K.sequences[Y]}n0.prototype.getDefaultScriptFeaturesIndexes=function(){var J=this.font.tables.gsub.scripts;for(var K=0;K<J.length;K++){var Y=J[K];if(Y.tag==="DFLT")return Y.script.defaultLangSys.featureIndexes}return[]};n0.prototype.getScriptFeaturesIndexes=function(J){var K=this.font.tables;if(!K.gsub)return[];if(!J)return this.getDefaultScriptFeaturesIndexes();var Y=this.font.tables.gsub.scripts;for(var X=0;X<Y.length;X++){var Z=Y[X];if(Z.tag===J&&Z.script.defaultLangSys)return Z.script.defaultLangSys.featureIndexes;else{var Q=Z.langSysRecords;if(Q)for(var H=0;H<Q.length;H++){var w=Q[H];if(w.tag===J){var W=w.langSys;return W.featureIndexes}}}}return this.getDefaultScriptFeaturesIndexes()};n0.prototype.mapTagsToFeatures=function(J,K){var Y={};for(var X=0;X<J.length;X++){var Z=J[X].tag,Q=J[X].feature;Y[Z]=Q}this.features[K].tags=Y};n0.prototype.getScriptFeatures=function(J){var K=this.features[J];if(this.features.hasOwnProperty(J))return K;var Y=this.getScriptFeaturesIndexes(J);if(!Y)return null;var X=this.font.tables.gsub;return K=Y.map(function(Z){return X.features[Z]}),this.features[J]=K,this.mapTagsToFeatures(K,J),K};n0.prototype.getSubstitutionType=function(J,K){var Y=J.lookupType.toString(),X=K.substFormat.toString();return Y+X};n0.prototype.getLookupMethod=function(J,K){var Y=this,X=this.getSubstitutionType(J,K);switch(X){case"11":return function(Z){return qW.apply(Y,[Z,K])};case"12":return function(Z){return AW.apply(Y,[Z,K])};case"63":return function(Z){return GW.apply(Y,[Z,K])};case"41":return function(Z){return MW.apply(Y,[Z,K])};case"21":return function(Z){return OW.apply(Y,[Z,K])};default:throw new Error("lookupType: "+J.lookupType+" - substFormat: "+K.substFormat+" is not yet supported")}};n0.prototype.lookupFeature=function(J){var K=J.contextParams,Y=K.index,X=this.getFeature({tag:J.tag,script:J.script});if(!X)return new Error("font '"+this.font.names.fullName.en+"' doesn't support feature '"+J.tag+"' for script '"+J.script+"'.");var Z=this.getFeatureLookups(X),Q=[].concat(K.context);for(var H=0;H<Z.length;H++){var w=Z[H],W=this.getLookupSubtables(w);for(var z=0;z<W.length;z++){var U=W[z],$=this.getSubstitutionType(w,U),V=this.getLookupMethod(w,U),B=void 0;switch($){case"11":if(B=V(K.current),B)Q.splice(Y,1,new a8({id:11,tag:J.tag,substitution:B}));break;case"12":if(B=V(K.current),B)Q.splice(Y,1,new a8({id:12,tag:J.tag,substitution:B}));break;case"63":if(B=V(K),Array.isArray(B)&&B.length)Q.splice(Y,1,new a8({id:63,tag:J.tag,substitution:B}));break;case"41":if(B=V(K),B)Q.splice(Y,1,new a8({id:41,tag:J.tag,substitution:B}));break;case"21":if(B=V(K.current),B)Q.splice(Y,1,new a8({id:21,tag:J.tag,substitution:B}));break}if(K=new W8(Q,Y),Array.isArray(B)&&!B.length)continue;B=null}}return Q.length?Q:null};n0.prototype.supports=function(J){if(!J.script)return!1;this.getScriptFeatures(J.script);var K=this.features.hasOwnProperty(J.script);if(!J.tag)return K;var Y=this.features[J.script].some(function(X){return X.tag===J.tag});return K&&Y};n0.prototype.getLookupSubtables=function(J){return J.subtables||null};n0.prototype.getLookupByIndex=function(J){var K=this.font.tables.gsub.lookups;return K[J]||null};n0.prototype.getFeatureLookups=function(J){return J.lookupListIndexes.map(this.getLookupByIndex.bind(this))};n0.prototype.getFeature=function J(K){if(!this.font)return{FAIL:"No font was found"};if(!this.features.hasOwnProperty(K.script))this.getScriptFeatures(K.script);var Y=this.features[K.script];if(!Y)return{FAIL:"No feature for script "+K.script};if(!Y.tags[K.tag])return null;return this.features[K.script].tags[K.tag]};function NW(J){var K=J.current,Y=J.get(-1);return Y===null&&l8(K)||!l8(Y)&&l8(K)}function LW(J){var K=J.get(1);return K===null||!l8(K)}var jW={startCheck:NW,endCheck:LW};function FW(J){var K=J.current,Y=J.get(-1);return(l8(K)||c8(K))&&!l8(Y)}function EW(J){var K=J.get(1);switch(!0){case K===null:return!0;case(!l8(K)&&!c8(K)):var Y=BW(K);if(!Y)return!0;if(Y){var X=!1;if(X=J.lookahead.some(function(Z){return l8(Z)||c8(Z)}),!X)return!0}break;default:return!1}}var _W={startCheck:FW,endCheck:EW};function RW(J,K,Y){K[Y].setState(J.tag,J.substitution)}function DW(J,K,Y){K[Y].setState(J.tag,J.substitution)}function IW(J,K,Y){J.substitution.forEach(function(X,Z){var Q=K[Y+Z];Q.setState(J.tag,X)})}function TW(J,K,Y){var X=K[Y];X.setState(J.tag,J.substitution.ligGlyph);var Z=J.substitution.components.length;for(var Q=0;Q<Z;Q++)X=K[Y+Q+1],X.setState("deleted",!0)}var cJ={11:RW,12:DW,63:IW,41:TW};function K4(J,K,Y){if(J instanceof a8&&cJ[J.id])cJ[J.id](J,K,Y)}function CW(J){var K=[].concat(J.backtrack);for(var Y=K.length-1;Y>=0;Y--){var X=K[Y],Z=G1(X),Q=c8(X);if(!Z&&!Q)return!0;if(Z)return!1}return!1}function PW(J){if(G1(J.current))return!1;for(var K=0;K<J.lookahead.length;K++){var Y=J.lookahead[K],X=c8(Y);if(!X)return!0}return!1}function SW(J){var K=this,Y="arab",X=this.featuresTags[Y],Z=this.tokenizer.getRangeTokens(J);if(Z.length===1)return;var Q=new W8(Z.map(function(w){return w.getState("glyphIndex")}),0),H=new W8(Z.map(function(w){return w.char}),0);Z.forEach(function(w,W){if(c8(w.char))return;Q.setCurrentIndex(W),H.setCurrentIndex(W);var z=0;if(CW(H))z|=1;if(PW(H))z|=2;var U;switch(z){case 1:U="fina";break;case 2:U="init";break;case 3:U="medi";break}if(X.indexOf(U)===-1)return;var $=K.query.lookupFeature({tag:U,script:Y,contextParams:Q});if($ instanceof Error)return console.info($.message);$.forEach(function(V,B){if(V instanceof a8)K4(V,Z,B),Q.context[B]=V.substitution})})}function uJ(J,K){var Y=J.map(function(X){return X.activeState.value});return new W8(Y,K||0)}function vW(J){var K=this,Y="arab",X=this.tokenizer.getRangeTokens(J),Z=uJ(X);Z.context.forEach(function(Q,H){Z.setCurrentIndex(H);var w=K.query.lookupFeature({tag:"rlig",script:Y,contextParams:Z});if(w.length)w.forEach(function(W){return K4(W,X,H)}),Z=uJ(X)})}function yW(J){var K=J.current,Y=J.get(-1);return Y===null&&V9(K)||!V9(Y)&&V9(K)}function kW(J){var K=J.get(1);return K===null||!V9(K)}var gW={startCheck:yW,endCheck:kW};function pJ(J,K){var Y=J.map(function(X){return X.activeState.value});return new W8(Y,K||0)}function xW(J){var K=this,Y="latn",X=this.tokenizer.getRangeTokens(J),Z=pJ(X);Z.context.forEach(function(Q,H){Z.setCurrentIndex(H);var w=K.query.lookupFeature({tag:"liga",script:Y,contextParams:Z});if(w.length)w.forEach(function(W){return K4(W,X,H)}),Z=pJ(X)})}function U8(J){this.baseDir=J||"ltr",this.tokenizer=new L0,this.featuresTags={}}U8.prototype.setText=function(J){this.text=J};U8.prototype.contextChecks={latinWordCheck:gW,arabicWordCheck:jW,arabicSentenceCheck:_W};function o7(J){var K=this.contextChecks[J+"Check"];return this.tokenizer.registerContextChecker(J,K.startCheck,K.endCheck)}function hW(){return o7.call(this,"latinWord"),o7.call(this,"arabicWord"),o7.call(this,"arabicSentence"),this.tokenizer.tokenize(this.text)}function bW(){var J=this,K=this.tokenizer.getContextRanges("arabicSentence");K.forEach(function(Y){var X=J.tokenizer.getRangeTokens(Y);J.tokenizer.replaceRange(Y.startIndex,Y.endOffset,X.reverse())})}U8.prototype.registerFeatures=function(J,K){var Y=this,X=K.filter(function(Z){return Y.query.supports({script:J,tag:Z})});if(!this.featuresTags.hasOwnProperty(J))this.featuresTags[J]=X;else this.featuresTags[J]=this.featuresTags[J].concat(X)};U8.prototype.applyFeatures=function(J,K){if(!J)throw new Error("No valid font was provided to apply features");if(!this.query)this.query=new n0(J);for(var Y=0;Y<K.length;Y++){var X=K[Y];if(!this.query.supports({script:X.script}))continue;this.registerFeatures(X.script,X.tags)}};U8.prototype.registerModifier=function(J,K,Y){this.tokenizer.registerModifier(J,K,Y)};function Y4(){if(this.tokenizer.registeredModifiers.indexOf("glyphIndex")===-1)throw new Error("glyphIndex modifier is required to apply arabic presentation features.")}function mW(){var J=this,K="arab";if(!this.featuresTags.hasOwnProperty(K))return;Y4.call(this);var Y=this.tokenizer.getContextRanges("arabicWord");Y.forEach(function(X){SW.call(J,X)})}function fW(){var J=this,K="arab";if(!this.featuresTags.hasOwnProperty(K))return;var Y=this.featuresTags[K];if(Y.indexOf("rlig")===-1)return;Y4.call(this);var X=this.tokenizer.getContextRanges("arabicWord");X.forEach(function(Z){vW.call(J,Z)})}function dW(){var J=this,K="latn";if(!this.featuresTags.hasOwnProperty(K))return;var Y=this.featuresTags[K];if(Y.indexOf("liga")===-1)return;Y4.call(this);var X=this.tokenizer.getContextRanges("latinWord");X.forEach(function(Z){xW.call(J,Z)})}U8.prototype.checkContextReady=function(J){return!!this.tokenizer.getContext(J)};U8.prototype.applyFeaturesToContexts=function(){if(this.checkContextReady("arabicWord"))mW.call(this),fW.call(this);if(this.checkContextReady("latinWord"))dW.call(this);if(this.checkContextReady("arabicSentence"))bW.call(this)};U8.prototype.processText=function(J){if(!this.text||this.text!==J)this.setText(J),hW.call(this),this.applyFeaturesToContexts()};U8.prototype.getBidiText=function(J){return this.processText(J),this.tokenizer.getText()};U8.prototype.getTextGlyphs=function(J){this.processText(J);var K=[];for(var Y=0;Y<this.tokenizer.tokens.length;Y++){var X=this.tokenizer.tokens[Y];if(X.state.deleted)continue;var Z=X.activeState.value;K.push(Array.isArray(Z)?Z[0]:Z)}return K};function h0(J){if(J=J||{},J.tables=J.tables||{},!J.empty)R6(J.familyName,"When creating a new Font object, familyName is required."),R6(J.styleName,"When creating a new Font object, styleName is required."),R6(J.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),R6(J.ascender,"When creating a new Font object, ascender is required."),R6(J.descender<=0,"When creating a new Font object, negative descender value is required."),this.unitsPerEm=J.unitsPerEm||1000,this.ascender=J.ascender,this.descender=J.descender,this.createdTimestamp=J.createdTimestamp,this.tables=Object.assign(J.tables,{os2:Object.assign({usWeightClass:J.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:J.widthClass||this.usWidthClasses.MEDIUM,fsSelection:J.fsSelection||this.fsSelectionValues.REGULAR},J.tables.os2)});this.supported=!0,this.glyphs=new j8.GlyphSet(this,J.glyphs||[]),this.encoding=new Y1(this),this.position=new S6(this),this.substitution=new r0(this),this.tables=this.tables||{},this._push=null,this._hmtxTableData={},Object.defineProperty(this,"hinting",{get:function(){if(this._hinting)return this._hinting;if(this.outlinesFormat==="truetype")return this._hinting=new V1(this)}})}h0.prototype.hasChar=function(J){return this.encoding.charToGlyphIndex(J)!==null};h0.prototype.charToGlyphIndex=function(J){return this.encoding.charToGlyphIndex(J)};h0.prototype.charToGlyph=function(J){var K=this.charToGlyphIndex(J),Y=this.glyphs.get(K);if(!Y)Y=this.glyphs.get(0);return Y};h0.prototype.updateFeatures=function(J){return this.defaultRenderOptions.features.map(function(K){if(K.script==="latn")return{script:"latn",tags:K.tags.filter(function(Y){return J[Y]})};else return K})};h0.prototype.stringToGlyphs=function(J,K){var Y=this,X=new U8,Z=function($){return Y.charToGlyphIndex($.char)};X.registerModifier("glyphIndex",null,Z);var Q=K?this.updateFeatures(K.features):this.defaultRenderOptions.features;X.applyFeatures(this,Q);var H=X.getTextGlyphs(J),w=H.length,W=new Array(w),z=this.glyphs.get(0);for(var U=0;U<w;U+=1)W[U]=this.glyphs.get(H[U])||z;return W};h0.prototype.getKerningValue=function(J,K){J=J.index||J,K=K.index||K;var Y=this.position.defaultKerningTables;if(Y)return this.position.getKerningValue(Y,J,K);return this.kerningPairs[J+","+K]||0};h0.prototype.defaultRenderOptions={kerning:!0,features:[{script:"arab",tags:["init","medi","fina","rlig"]},{script:"latn",tags:["liga","rlig"]}]};h0.prototype.forEachGlyph=function(J,K,Y,X,Z,Q){K=K!==void 0?K:0,Y=Y!==void 0?Y:0,X=X!==void 0?X:72,Z=Object.assign({},this.defaultRenderOptions,Z);var H=1/this.unitsPerEm*X,w=this.stringToGlyphs(J,Z),W;if(Z.kerning){var z=Z.script||this.position.getDefaultScriptName();W=this.position.getKerningTables(z,Z.language)}for(var U=0;U<w.length;U+=1){var $=w[U];if(Q.call(this,$,K,Y,X,Z),$.advanceWidth)K+=$.advanceWidth*H;if(Z.kerning&&U<w.length-1){var V=W?this.position.getKerningValue(W,$.index,w[U+1].index):this.getKerningValue($,w[U+1]);K+=V*H}if(Z.letterSpacing)K+=Z.letterSpacing*X;else if(Z.tracking)K+=Z.tracking/1000*X}return K};h0.prototype.getPath=function(J,K,Y,X,Z){var Q=new x0;return this.forEachGlyph(J,K,Y,X,Z,function(H,w,W,z){var U=H.getPath(w,W,z,Z,this);Q.extend(U)}),Q};h0.prototype.getPaths=function(J,K,Y,X,Z){var Q=[];return this.forEachGlyph(J,K,Y,X,Z,function(H,w,W,z){var U=H.getPath(w,W,z,Z,this);Q.push(U)}),Q};h0.prototype.getAdvanceWidth=function(J,K,Y){return this.forEachGlyph(J,0,0,K,Y,function(){})};h0.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512};h0.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9};h0.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};function lW(J,K){K.parseUShort(),J.length=K.parseULong(),J.language=K.parseULong();var Y;J.groupCount=Y=K.parseULong(),J.glyphIndexMap={};for(var X=0;X<Y;X+=1){var Z=K.parseULong(),Q=K.parseULong(),H=K.parseULong();for(var w=Z;w<=Q;w+=1)J.glyphIndexMap[w]=H,H++}}function cW(J,K,Y,X,Z){J.length=K.parseUShort(),J.language=K.parseUShort();var Q;J.segCount=Q=K.parseUShort()>>1,K.skip("uShort",3),J.glyphIndexMap={};var H=new i.Parser(Y,X+Z+14),w=new i.Parser(Y,X+Z+16+Q*2),W=new i.Parser(Y,X+Z+16+Q*4),z=new i.Parser(Y,X+Z+16+Q*6),U=X+Z+16+Q*8;for(var $=0;$<Q-1;$+=1){var V=void 0,B=H.parseUShort(),M=w.parseUShort(),q=W.parseShort(),G=z.parseUShort();for(var N=M;N<=B;N+=1){if(G!==0){if(U=z.offset+z.relativeOffset-2,U+=G,U+=(N-M)*2,V=i.getUShort(Y,U),V!==0)V=V+q&65535}else V=N+q&65535;J.glyphIndexMap[N]=V}}}function uW(J,K){var Y={};Y.version=i.getUShort(J,K),w0.argument(Y.version===0,"cmap table version should be 0."),Y.numTables=i.getUShort(J,K+2);var X=-1;for(var Z=Y.numTables-1;Z>=0;Z-=1){var Q=i.getUShort(J,K+4+Z*8),H=i.getUShort(J,K+4+Z*8+2);if(Q===3&&(H===0||H===1||H===10)||Q===0&&(H===0||H===1||H===2||H===3||H===4)){X=i.getULong(J,K+4+Z*8+4);break}}if(X===-1)throw new Error("No valid cmap sub-tables found.");var w=new i.Parser(J,K+X);if(Y.format=w.parseUShort(),Y.format===12)lW(Y,w);else if(Y.format===4)cW(Y,w,J,K,X);else throw new Error("Only format 4 and 12 cmap tables are supported (found format "+Y.format+").");return Y}var pW={parse:uW};function s7(J){var K;if(J.length<1240)K=107;else if(J.length<33900)K=1131;else K=32768;return K}function f8(J,K,Y){var X=[],Z=[],Q=i.getCard16(J,K),H,w;if(Q!==0){var W=i.getByte(J,K+2);H=K+(Q+1)*W+2;var z=K+3;for(var U=0;U<Q+1;U+=1)X.push(i.getOffset(J,z,W)),z+=W;w=H+X[Q]}else w=K+2;for(var $=0;$<X.length-1;$+=1){var V=i.getBytes(J,H+X[$],H+X[$+1]);if(Y)V=Y(V);Z.push(V)}return{objects:Z,startOffset:K,endOffset:w}}function iW(J,K){var Y=[],X=i.getCard16(J,K),Z,Q;if(X!==0){var H=i.getByte(J,K+2);Z=K+(X+1)*H+2;var w=K+3;for(var W=0;W<X+1;W+=1)Y.push(i.getOffset(J,w,H)),w+=H;Q=Z+Y[X]}else Q=K+2;return{offsets:Y,startOffset:K,endOffset:Q}}function oW(J,K,Y,X,Z){var Q=i.getCard16(Y,X),H=0;if(Q!==0){var w=i.getByte(Y,X+2);H=X+(Q+1)*w+2}var W=i.getBytes(Y,H+K[J],H+K[J+1]);if(Z)W=Z(W);return W}function rW(J){var K="",Y=15,X=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];while(!0){var Z=J.parseByte(),Q=Z>>4,H=Z&15;if(Q===Y)break;if(K+=X[Q],H===Y)break;K+=X[H]}return parseFloat(K)}function nW(J,K){var Y,X,Z,Q;if(K===28)return Y=J.parseByte(),X=J.parseByte(),Y<<8|X;if(K===29)return Y=J.parseByte(),X=J.parseByte(),Z=J.parseByte(),Q=J.parseByte(),Y<<24|X<<16|Z<<8|Q;if(K===30)return rW(J);if(K>=32&&K<=246)return K-139;if(K>=247&&K<=250)return Y=J.parseByte(),(K-247)*256+Y+108;if(K>=251&&K<=254)return Y=J.parseByte(),-(K-251)*256-Y-108;throw new Error("Invalid b0 "+K)}function sW(J){var K={};for(var Y=0;Y<J.length;Y+=1){var X=J[Y][0],Z=J[Y][1],Q=void 0;if(Z.length===1)Q=Z[0];else Q=Z;if(K.hasOwnProperty(X)&&!isNaN(K[X]))throw new Error("Object "+K+" already has key "+X);K[X]=Q}return K}function M1(J,K,Y){K=K!==void 0?K:0;var X=new i.Parser(J,K),Z=[],Q=[];Y=Y!==void 0?Y:J.length;while(X.relativeOffset<Y){var H=X.parseByte();if(H<=21){if(H===12)H=1200+X.parseByte();Z.push([H,Q]),Q=[]}else Q.push(nW(X,H))}return sW(Z)}function I6(J,K){if(K<=390)K=AQ[K];else K=J[K-391];return K}function O1(J,K,Y){var X={},Z;for(var Q=0;Q<K.length;Q+=1){var H=K[Q];if(Array.isArray(H.type)){var w=[];w.length=H.type.length;for(var W=0;W<H.type.length;W++){if(Z=J[H.op]!==void 0?J[H.op][W]:void 0,Z===void 0)Z=H.value!==void 0&&H.value[W]!==void 0?H.value[W]:null;if(H.type[W]==="SID")Z=I6(Y,Z);w[W]=Z}X[H.name]=w}else{if(Z=J[H.op],Z===void 0)Z=H.value!==void 0?H.value:null;if(H.type==="SID")Z=I6(Y,Z);X[H.name]=Z}}return X}function aW(J,K){var Y={};return Y.formatMajor=i.getCard8(J,K),Y.formatMinor=i.getCard8(J,K+1),Y.size=i.getCard8(J,K+2),Y.offsetSize=i.getCard8(J,K+3),Y.startOffset=K,Y.endOffset=K+4,Y}var tW=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[0.001,0,0,0.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],eW=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}];function Jw(J,K){var Y=M1(J,0,J.byteLength);return O1(Y,tW,K)}function N1(J,K,Y,X){var Z=M1(J,K,Y);return O1(Z,eW,X)}function iJ(J,K,Y,X){var Z=[];for(var Q=0;Q<Y.length;Q+=1){var H=new DataView(new Uint8Array(Y[Q]).buffer),w=Jw(H,X);w._subrs=[],w._subrsBias=0,w._defaultWidthX=0,w._nominalWidthX=0;var W=w.private[0],z=w.private[1];if(W!==0&&z!==0){var U=N1(J,z+K,W,X);if(w._defaultWidthX=U.defaultWidthX,w._nominalWidthX=U.nominalWidthX,U.subrs!==0){var $=z+U.subrs,V=f8(J,$+K);w._subrs=V.objects,w._subrsBias=s7(w._subrs)}w._privateDict=U}Z.push(w)}return Z}function Kw(J,K,Y,X){var Z,Q,H=new i.Parser(J,K);Y-=1;var w=[".notdef"],W=H.parseCard8();if(W===0)for(var z=0;z<Y;z+=1)Z=H.parseSID(),w.push(I6(X,Z));else if(W===1)while(w.length<=Y){Z=H.parseSID(),Q=H.parseCard8();for(var U=0;U<=Q;U+=1)w.push(I6(X,Z)),Z+=1}else if(W===2)while(w.length<=Y){Z=H.parseSID(),Q=H.parseCard16();for(var $=0;$<=Q;$+=1)w.push(I6(X,Z)),Z+=1}else throw new Error("Unknown charset format "+W);return w}function Yw(J,K,Y){var X,Z={},Q=new i.Parser(J,K),H=Q.parseCard8();if(H===0){var w=Q.parseCard8();for(var W=0;W<w;W+=1)X=Q.parseCard8(),Z[X]=W}else if(H===1){var z=Q.parseCard8();X=1;for(var U=0;U<z;U+=1){var $=Q.parseCard8(),V=Q.parseCard8();for(var B=$;B<=$+V;B+=1)Z[B]=X,X+=1}}else throw new Error("Unknown encoding format "+H);return new B9(Z,Y)}function oJ(J,K,Y){var X,Z,Q,H,w=new x0,W=[],z=0,U=!1,$=!1,V=0,B=0,M,q,G,N;if(J.isCIDFont){var L=J.tables.cff.topDict._fdSelect[K.index],_=J.tables.cff.topDict._fdArray[L];M=_._subrs,q=_._subrsBias,G=_._defaultWidthX,N=_._nominalWidthX}else M=J.tables.cff.topDict._subrs,q=J.tables.cff.topDict._subrsBias,G=J.tables.cff.topDict._defaultWidthX,N=J.tables.cff.topDict._nominalWidthX;var D=G;function E(R,S){if($)w.closePath();w.moveTo(R,S),$=!0}function j(){var R=W.length%2!==0;if(R&&!U)D=W.shift()+N;z+=W.length>>1,W.length=0,U=!0}function T(R){var S,x,c,o,u,C,P,I,f,l,t,s,m=0;while(m<R.length){var d=R[m];switch(m+=1,d){case 1:j();break;case 3:j();break;case 4:if(W.length>1&&!U)D=W.shift()+N,U=!0;B+=W.pop(),E(V,B);break;case 5:while(W.length>0)V+=W.shift(),B+=W.shift(),w.lineTo(V,B);break;case 6:while(W.length>0){if(V+=W.shift(),w.lineTo(V,B),W.length===0)break;B+=W.shift(),w.lineTo(V,B)}break;case 7:while(W.length>0){if(B+=W.shift(),w.lineTo(V,B),W.length===0)break;V+=W.shift(),w.lineTo(V,B)}break;case 8:while(W.length>0)X=V+W.shift(),Z=B+W.shift(),Q=X+W.shift(),H=Z+W.shift(),V=Q+W.shift(),B=H+W.shift(),w.curveTo(X,Z,Q,H,V,B);break;case 10:if(u=W.pop()+q,C=M[u],C)T(C);break;case 11:return;case 12:switch(d=R[m],m+=1,d){case 35:X=V+W.shift(),Z=B+W.shift(),Q=X+W.shift(),H=Z+W.shift(),P=Q+W.shift(),I=H+W.shift(),f=P+W.shift(),l=I+W.shift(),t=f+W.shift(),s=l+W.shift(),V=t+W.shift(),B=s+W.shift(),W.shift(),w.curveTo(X,Z,Q,H,P,I),w.curveTo(f,l,t,s,V,B);break;case 34:X=V+W.shift(),Z=B,Q=X+W.shift(),H=Z+W.shift(),P=Q+W.shift(),I=H,f=P+W.shift(),l=H,t=f+W.shift(),s=B,V=t+W.shift(),w.curveTo(X,Z,Q,H,P,I),w.curveTo(f,l,t,s,V,B);break;case 36:X=V+W.shift(),Z=B+W.shift(),Q=X+W.shift(),H=Z+W.shift(),P=Q+W.shift(),I=H,f=P+W.shift(),l=H,t=f+W.shift(),s=l+W.shift(),V=t+W.shift(),w.curveTo(X,Z,Q,H,P,I),w.curveTo(f,l,t,s,V,B);break;case 37:if(X=V+W.shift(),Z=B+W.shift(),Q=X+W.shift(),H=Z+W.shift(),P=Q+W.shift(),I=H+W.shift(),f=P+W.shift(),l=I+W.shift(),t=f+W.shift(),s=l+W.shift(),Math.abs(t-V)>Math.abs(s-B))V=t+W.shift();else B=s+W.shift();w.curveTo(X,Z,Q,H,P,I),w.curveTo(f,l,t,s,V,B);break;default:console.log("Glyph "+K.index+": unknown operator 1200"+d),W.length=0}break;case 14:if(W.length>0&&!U)D=W.shift()+N,U=!0;if($)w.closePath(),$=!1;break;case 18:j();break;case 19:case 20:j(),m+=z+7>>3;break;case 21:if(W.length>2&&!U)D=W.shift()+N,U=!0;B+=W.pop(),V+=W.pop(),E(V,B);break;case 22:if(W.length>1&&!U)D=W.shift()+N,U=!0;V+=W.pop(),E(V,B);break;case 23:j();break;case 24:while(W.length>2)X=V+W.shift(),Z=B+W.shift(),Q=X+W.shift(),H=Z+W.shift(),V=Q+W.shift(),B=H+W.shift(),w.curveTo(X,Z,Q,H,V,B);V+=W.shift(),B+=W.shift(),w.lineTo(V,B);break;case 25:while(W.length>6)V+=W.shift(),B+=W.shift(),w.lineTo(V,B);X=V+W.shift(),Z=B+W.shift(),Q=X+W.shift(),H=Z+W.shift(),V=Q+W.shift(),B=H+W.shift(),w.curveTo(X,Z,Q,H,V,B);break;case 26:if(W.length%2)V+=W.shift();while(W.length>0)X=V,Z=B+W.shift(),Q=X+W.shift(),H=Z+W.shift(),V=Q,B=H+W.shift(),w.curveTo(X,Z,Q,H,V,B);break;case 27:if(W.length%2)B+=W.shift();while(W.length>0)X=V+W.shift(),Z=B,Q=X+W.shift(),H=Z+W.shift(),V=Q+W.shift(),B=H,w.curveTo(X,Z,Q,H,V,B);break;case 28:S=R[m],x=R[m+1],W.push((S<<24|x<<16)>>16),m+=2;break;case 29:if(u=W.pop()+J.gsubrsBias,C=J.gsubrs[u],C)T(C);break;case 30:while(W.length>0){if(X=V,Z=B+W.shift(),Q=X+W.shift(),H=Z+W.shift(),V=Q+W.shift(),B=H+(W.length===1?W.shift():0),w.curveTo(X,Z,Q,H,V,B),W.length===0)break;X=V+W.shift(),Z=B,Q=X+W.shift(),H=Z+W.shift(),B=H+W.shift(),V=Q+(W.length===1?W.shift():0),w.curveTo(X,Z,Q,H,V,B)}break;case 31:while(W.length>0){if(X=V+W.shift(),Z=B,Q=X+W.shift(),H=Z+W.shift(),B=H+W.shift(),V=Q+(W.length===1?W.shift():0),w.curveTo(X,Z,Q,H,V,B),W.length===0)break;X=V,Z=B+W.shift(),Q=X+W.shift(),H=Z+W.shift(),V=Q+W.shift(),B=H+(W.length===1?W.shift():0),w.curveTo(X,Z,Q,H,V,B)}break;default:if(d<32)console.log("Glyph "+K.index+": unknown operator "+d);else if(d<247)W.push(d-139);else if(d<251)S=R[m],m+=1,W.push((d-247)*256+S+108);else if(d<255)S=R[m],m+=1,W.push(-(d-251)*256-S-108);else S=R[m],x=R[m+1],c=R[m+2],o=R[m+3],m+=4,W.push((S<<24|x<<16|c<<8|o)/65536)}}}return T(Y),K.advanceWidth=D,w}function Xw(J,K,Y,X){var Z=[],Q,H=new i.Parser(J,K),w=H.parseCard8();if(w===0)for(var W=0;W<Y;W++){if(Q=H.parseCard8(),Q>=X)throw new Error("CFF table CID Font FDSelect has bad FD index value "+Q+" (FD count "+X+")");Z.push(Q)}else if(w===3){var z=H.parseCard16(),U=H.parseCard16();if(U!==0)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+U);var $;for(var V=0;V<z;V++){if(Q=H.parseCard8(),$=H.parseCard16(),Q>=X)throw new Error("CFF table CID Font FDSelect has bad FD index value "+Q+" (FD count "+X+")");if($>Y)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+$);for(;U<$;U++)Z.push(Q);U=$}if($!==Y)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+$)}else throw new Error("CFF Table CID Font FDSelect table has unsupported format "+w);return Z}function Zw(J,K,Y,X){Y.tables.cff={};var Z=aW(J,K),Q=f8(J,Z.endOffset,i.bytesToString),H=f8(J,Q.endOffset),w=f8(J,H.endOffset,i.bytesToString),W=f8(J,w.endOffset);Y.gsubrs=W.objects,Y.gsubrsBias=s7(Y.gsubrs);var z=iJ(J,K,H.objects,w.objects);if(z.length!==1)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+z.length);var U=z[0];if(Y.tables.cff.topDict=U,U._privateDict)Y.defaultWidthX=U._privateDict.defaultWidthX,Y.nominalWidthX=U._privateDict.nominalWidthX;if(U.ros[0]!==void 0&&U.ros[1]!==void 0)Y.isCIDFont=!0;if(Y.isCIDFont){var{fdArray:$,fdSelect:V}=U;if($===0||V===0)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");$+=K;var B=f8(J,$),M=iJ(J,K,B.objects,w.objects);U._fdArray=M,V+=K,U._fdSelect=Xw(J,V,Y.numGlyphs,M.length)}var q=K+U.private[1],G=N1(J,q,U.private[0],w.objects);if(Y.defaultWidthX=G.defaultWidthX,Y.nominalWidthX=G.nominalWidthX,G.subrs!==0){var N=q+G.subrs,L=f8(J,N);Y.subrs=L.objects,Y.subrsBias=s7(Y.subrs)}else Y.subrs=[],Y.subrsBias=0;var _;if(X.lowMemory)_=iW(J,K+U.charStrings),Y.nGlyphs=_.offsets.length;else _=f8(J,K+U.charStrings),Y.nGlyphs=_.objects.length;var D=Kw(J,K+U.charset,Y.nGlyphs,w.objects);if(U.encoding===0)Y.cffEncoding=new B9(GQ,D);else if(U.encoding===1)Y.cffEncoding=new B9(MQ,D);else Y.cffEncoding=Yw(J,K+U.encoding,D);if(Y.encoding=Y.encoding||Y.cffEncoding,Y.glyphs=new j8.GlyphSet(Y),X.lowMemory)Y._push=function(T){var R=oW(T,_.offsets,J,K+U.charStrings);Y.glyphs.push(T,j8.cffGlyphLoader(Y,T,oJ,R))};else for(var E=0;E<Y.nGlyphs;E+=1){var j=_.objects[E];Y.glyphs.push(E,j8.cffGlyphLoader(Y,E,oJ,j))}}var Qw={parse:Zw};function Hw(J,K,Y){var X={},Z=new i.Parser(J,K);return X.tag=Z.parseTag(),X.minValue=Z.parseFixed(),X.defaultValue=Z.parseFixed(),X.maxValue=Z.parseFixed(),Z.skip("uShort",1),X.name=Y[Z.parseUShort()]||{},X}function Ww(J,K,Y,X){var Z={},Q=new i.Parser(J,K);Z.name=X[Q.parseUShort()]||{},Q.skip("uShort",1),Z.coordinates={};for(var H=0;H<Y.length;++H)Z.coordinates[Y[H].tag]=Q.parseFixed();return Z}function ww(J,K,Y){var X=new i.Parser(J,K),Z=X.parseULong();w0.argument(Z===65536,"Unsupported fvar table version.");var Q=X.parseOffset16();X.skip("uShort",1);var H=X.parseUShort(),w=X.parseUShort(),W=X.parseUShort(),z=X.parseUShort(),U=[];for(var $=0;$<H;$++)U.push(Hw(J,K+Q+$*w,Y));var V=[],B=K+Q+H*w;for(var M=0;M<W;M++)V.push(Ww(J,B+M*z,U,Y));return{axes:U,instances:V}}var zw={parse:ww},Uw=function(){return{coverage:this.parsePointer(v.coverage),attachPoints:this.parseList(v.pointer(v.uShortList))}},$w=function(){var J=this.parseUShort();if(w0.argument(J===1||J===2||J===3,"Unsupported CaretValue table version."),J===1)return{coordinate:this.parseShort()};else if(J===2)return{pointindex:this.parseShort()};else if(J===3)return{coordinate:this.parseShort()}},Vw=function(){return this.parseList(v.pointer($w))},Bw=function(){return{coverage:this.parsePointer(v.coverage),ligGlyphs:this.parseList(v.pointer(Vw))}},qw=function(){return this.parseUShort(),this.parseList(v.pointer(v.coverage))};function Aw(J,K){K=K||0;var Y=new v(J,K),X=Y.parseVersion(1);w0.argument(X===1||X===1.2||X===1.3,"Unsupported GDEF table version.");var Z={version:X,classDef:Y.parsePointer(v.classDef),attachList:Y.parsePointer(Uw),ligCaretList:Y.parsePointer(Bw),markAttachClassDef:Y.parsePointer(v.classDef)};if(X>=1.2)Z.markGlyphSets=Y.parsePointer(qw);return Z}var Gw={parse:Aw},w8=new Array(10);w8[1]=function J(){var K=this.offset+this.relativeOffset,Y=this.parseUShort();if(Y===1)return{posFormat:1,coverage:this.parsePointer(v.coverage),value:this.parseValueRecord()};else if(Y===2)return{posFormat:2,coverage:this.parsePointer(v.coverage),values:this.parseValueRecordList()};w0.assert(!1,"0x"+K.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")};w8[2]=function J(){var K=this.offset+this.relativeOffset,Y=this.parseUShort();w0.assert(Y===1||Y===2,"0x"+K.toString(16)+": GPOS lookup type 2 format must be 1 or 2.");var X=this.parsePointer(v.coverage),Z=this.parseUShort(),Q=this.parseUShort();if(Y===1)return{posFormat:Y,coverage:X,valueFormat1:Z,valueFormat2:Q,pairSets:this.parseList(v.pointer(v.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(Z),value2:this.parseValueRecord(Q)}})))};else if(Y===2){var H=this.parsePointer(v.classDef),w=this.parsePointer(v.classDef),W=this.parseUShort(),z=this.parseUShort();return{posFormat:Y,coverage:X,valueFormat1:Z,valueFormat2:Q,classDef1:H,classDef2:w,class1Count:W,class2Count:z,classRecords:this.parseList(W,v.list(z,function(){return{value1:this.parseValueRecord(Z),value2:this.parseValueRecord(Q)}}))}}};w8[3]=function J(){return{error:"GPOS Lookup 3 not supported"}};w8[4]=function J(){return{error:"GPOS Lookup 4 not supported"}};w8[5]=function J(){return{error:"GPOS Lookup 5 not supported"}};w8[6]=function J(){return{error:"GPOS Lookup 6 not supported"}};w8[7]=function J(){return{error:"GPOS Lookup 7 not supported"}};w8[8]=function J(){return{error:"GPOS Lookup 8 not supported"}};w8[9]=function J(){return{error:"GPOS Lookup 9 not supported"}};function Mw(J,K){K=K||0;var Y=new v(J,K),X=Y.parseVersion(1);if(w0.argument(X===1||X===1.1,"Unsupported GPOS table version "+X),X===1)return{version:X,scripts:Y.parseScriptList(),features:Y.parseFeatureList(),lookups:Y.parseLookupList(w8)};else return{version:X,scripts:Y.parseScriptList(),features:Y.parseFeatureList(),lookups:Y.parseLookupList(w8),variations:Y.parseFeatureVariationsList()}}var Ow={parse:Mw},z8=new Array(9);z8[1]=function J(){var K=this.offset+this.relativeOffset,Y=this.parseUShort();if(Y===1)return{substFormat:1,coverage:this.parsePointer(v.coverage),deltaGlyphId:this.parseUShort()};else if(Y===2)return{substFormat:2,coverage:this.parsePointer(v.coverage),substitute:this.parseOffset16List()};w0.assert(!1,"0x"+K.toString(16)+": lookup type 1 format must be 1 or 2.")};z8[2]=function J(){var K=this.parseUShort();return w0.argument(K===1,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:K,coverage:this.parsePointer(v.coverage),sequences:this.parseListOfLists()}};z8[3]=function J(){var K=this.parseUShort();return w0.argument(K===1,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:K,coverage:this.parsePointer(v.coverage),alternateSets:this.parseListOfLists()}};z8[4]=function J(){var K=this.parseUShort();return w0.argument(K===1,"GSUB ligature table identifier-format must be 1"),{substFormat:K,coverage:this.parsePointer(v.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}};var q6={sequenceIndex:v.uShort,lookupListIndex:v.uShort};z8[5]=function J(){var K=this.offset+this.relativeOffset,Y=this.parseUShort();if(Y===1)return{substFormat:Y,coverage:this.parsePointer(v.coverage),ruleSets:this.parseListOfLists(function(){var Q=this.parseUShort(),H=this.parseUShort();return{input:this.parseUShortList(Q-1),lookupRecords:this.parseRecordList(H,q6)}})};else if(Y===2)return{substFormat:Y,coverage:this.parsePointer(v.coverage),classDef:this.parsePointer(v.classDef),classSets:this.parseListOfLists(function(){var Q=this.parseUShort(),H=this.parseUShort();return{classes:this.parseUShortList(Q-1),lookupRecords:this.parseRecordList(H,q6)}})};else if(Y===3){var X=this.parseUShort(),Z=this.parseUShort();return{substFormat:Y,coverages:this.parseList(X,v.pointer(v.coverage)),lookupRecords:this.parseRecordList(Z,q6)}}w0.assert(!1,"0x"+K.toString(16)+": lookup type 5 format must be 1, 2 or 3.")};z8[6]=function J(){var K=this.offset+this.relativeOffset,Y=this.parseUShort();if(Y===1)return{substFormat:1,coverage:this.parsePointer(v.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(q6)}})};else if(Y===2)return{substFormat:2,coverage:this.parsePointer(v.coverage),backtrackClassDef:this.parsePointer(v.classDef),inputClassDef:this.parsePointer(v.classDef),lookaheadClassDef:this.parsePointer(v.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(q6)}})};else if(Y===3)return{substFormat:3,backtrackCoverage:this.parseList(v.pointer(v.coverage)),inputCoverage:this.parseList(v.pointer(v.coverage)),lookaheadCoverage:this.parseList(v.pointer(v.coverage)),lookupRecords:this.parseRecordList(q6)};w0.assert(!1,"0x"+K.toString(16)+": lookup type 6 format must be 1, 2 or 3.")};z8[7]=function J(){var K=this.parseUShort();w0.argument(K===1,"GSUB Extension Substitution subtable identifier-format must be 1");var Y=this.parseUShort(),X=new v(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:Y,extension:z8[Y].call(X)}};z8[8]=function J(){var K=this.parseUShort();return w0.argument(K===1,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:K,coverage:this.parsePointer(v.coverage),backtrackCoverage:this.parseList(v.pointer(v.coverage)),lookaheadCoverage:this.parseList(v.pointer(v.coverage)),substitutes:this.parseUShortList()}};function Nw(J,K){K=K||0;var Y=new v(J,K),X=Y.parseVersion(1);if(w0.argument(X===1||X===1.1,"Unsupported GSUB table version."),X===1)return{version:X,scripts:Y.parseScriptList(),features:Y.parseFeatureList(),lookups:Y.parseLookupList(z8)};else return{version:X,scripts:Y.parseScriptList(),features:Y.parseFeatureList(),lookups:Y.parseLookupList(z8),variations:Y.parseFeatureVariationsList()}}var Lw={parse:Nw};function jw(J,K){var Y={},X=new i.Parser(J,K);return Y.version=X.parseVersion(),Y.fontRevision=Math.round(X.parseFixed()*1000)/1000,Y.checkSumAdjustment=X.parseULong(),Y.magicNumber=X.parseULong(),w0.argument(Y.magicNumber===1594834165,"Font header has wrong magic number."),Y.flags=X.parseUShort(),Y.unitsPerEm=X.parseUShort(),Y.created=X.parseLongDateTime(),Y.modified=X.parseLongDateTime(),Y.xMin=X.parseShort(),Y.yMin=X.parseShort(),Y.xMax=X.parseShort(),Y.yMax=X.parseShort(),Y.macStyle=X.parseUShort(),Y.lowestRecPPEM=X.parseUShort(),Y.fontDirectionHint=X.parseShort(),Y.indexToLocFormat=X.parseShort(),Y.glyphDataFormat=X.parseShort(),Y}var Fw={parse:jw};function Ew(J,K){var Y={},X=new i.Parser(J,K);return Y.version=X.parseVersion(),Y.ascender=X.parseShort(),Y.descender=X.parseShort(),Y.lineGap=X.parseShort(),Y.advanceWidthMax=X.parseUShort(),Y.minLeftSideBearing=X.parseShort(),Y.minRightSideBearing=X.parseShort(),Y.xMaxExtent=X.parseShort(),Y.caretSlopeRise=X.parseShort(),Y.caretSlopeRun=X.parseShort(),Y.caretOffset=X.parseShort(),X.relativeOffset+=8,Y.metricDataFormat=X.parseShort(),Y.numberOfHMetrics=X.parseUShort(),Y}var _w={parse:Ew};function Rw(J,K,Y,X,Z){var Q,H,w=new i.Parser(J,K);for(var W=0;W<X;W+=1){if(W<Y)Q=w.parseUShort(),H=w.parseShort();var z=Z.get(W);z.advanceWidth=Q,z.leftSideBearing=H}}function Dw(J,K,Y,X,Z){J._hmtxTableData={};var Q,H,w=new i.Parser(K,Y);for(var W=0;W<Z;W+=1){if(W<X)Q=w.parseUShort(),H=w.parseShort();J._hmtxTableData[W]={advanceWidth:Q,leftSideBearing:H}}}function Iw(J,K,Y,X,Z,Q,H){if(H.lowMemory)Dw(J,K,Y,X,Z);else Rw(K,Y,X,Z,Q)}var Tw={parse:Iw};function Cw(J){var K={};J.skip("uShort");var Y=J.parseUShort();w0.argument(Y===0,"Unsupported kern sub-table version."),J.skip("uShort",2);var X=J.parseUShort();J.skip("uShort",3);for(var Z=0;Z<X;Z+=1){var Q=J.parseUShort(),H=J.parseUShort(),w=J.parseShort();K[Q+","+H]=w}return K}function Pw(J){var K={};J.skip("uShort");var Y=J.parseULong();if(Y>1)console.warn("Only the first kern subtable is supported.");J.skip("uLong");var X=J.parseUShort(),Z=X&255;if(J.skip("uShort"),Z===0){var Q=J.parseUShort();J.skip("uShort",3);for(var H=0;H<Q;H+=1){var w=J.parseUShort(),W=J.parseUShort(),z=J.parseShort();K[w+","+W]=z}}return K}function Sw(J,K){var Y=new i.Parser(J,K),X=Y.parseUShort();if(X===0)return Cw(Y);else if(X===1)return Pw(Y);else throw new Error("Unsupported kern table version ("+X+").")}var vw={parse:Sw};function yw(J,K){var Y=new i.Parser(J,K),X=Y.parseULong();w0.argument(X===1,"Unsupported ltag table version."),Y.skip("uLong",1);var Z=Y.parseULong(),Q=[];for(var H=0;H<Z;H++){var w="",W=K+Y.parseUShort(),z=Y.parseUShort();for(var U=W;U<W+z;++U)w+=String.fromCharCode(J.getInt8(U));Q.push(w)}return Q}var kw={parse:yw};function gw(J,K,Y,X){var Z=new i.Parser(J,K),Q=X?Z.parseUShort:Z.parseULong,H=[];for(var w=0;w<Y+1;w+=1){var W=Q.call(Z);if(X)W*=2;H.push(W)}return H}var xw={parse:gw};function hw(J,K){var Y={},X=new i.Parser(J,K);if(Y.version=X.parseVersion(),Y.numGlyphs=X.parseUShort(),Y.version===1)Y.maxPoints=X.parseUShort(),Y.maxContours=X.parseUShort(),Y.maxCompositePoints=X.parseUShort(),Y.maxCompositeContours=X.parseUShort(),Y.maxZones=X.parseUShort(),Y.maxTwilightPoints=X.parseUShort(),Y.maxStorage=X.parseUShort(),Y.maxFunctionDefs=X.parseUShort(),Y.maxInstructionDefs=X.parseUShort(),Y.maxStackElements=X.parseUShort(),Y.maxSizeOfInstructions=X.parseUShort(),Y.maxComponentElements=X.parseUShort(),Y.maxComponentDepth=X.parseUShort();return Y}var bw={parse:hw};function mw(J,K){var Y={},X=new i.Parser(J,K);Y.version=X.parseUShort(),Y.xAvgCharWidth=X.parseShort(),Y.usWeightClass=X.parseUShort(),Y.usWidthClass=X.parseUShort(),Y.fsType=X.parseUShort(),Y.ySubscriptXSize=X.parseShort(),Y.ySubscriptYSize=X.parseShort(),Y.ySubscriptXOffset=X.parseShort(),Y.ySubscriptYOffset=X.parseShort(),Y.ySuperscriptXSize=X.parseShort(),Y.ySuperscriptYSize=X.parseShort(),Y.ySuperscriptXOffset=X.parseShort(),Y.ySuperscriptYOffset=X.parseShort(),Y.yStrikeoutSize=X.parseShort(),Y.yStrikeoutPosition=X.parseShort(),Y.sFamilyClass=X.parseShort(),Y.panose=[];for(var Z=0;Z<10;Z++)Y.panose[Z]=X.parseByte();if(Y.ulUnicodeRange1=X.parseULong(),Y.ulUnicodeRange2=X.parseULong(),Y.ulUnicodeRange3=X.parseULong(),Y.ulUnicodeRange4=X.parseULong(),Y.achVendID=String.fromCharCode(X.parseByte(),X.parseByte(),X.parseByte(),X.parseByte()),Y.fsSelection=X.parseUShort(),Y.usFirstCharIndex=X.parseUShort(),Y.usLastCharIndex=X.parseUShort(),Y.sTypoAscender=X.parseShort(),Y.sTypoDescender=X.parseShort(),Y.sTypoLineGap=X.parseShort(),Y.usWinAscent=X.parseUShort(),Y.usWinDescent=X.parseUShort(),Y.version>=1)Y.ulCodePageRange1=X.parseULong(),Y.ulCodePageRange2=X.parseULong();if(Y.version>=2)Y.sxHeight=X.parseShort(),Y.sCapHeight=X.parseShort(),Y.usDefaultChar=X.parseUShort(),Y.usBreakChar=X.parseUShort(),Y.usMaxContent=X.parseUShort();return Y}var fw={parse:mw};function dw(J,K){var Y={},X=new i.Parser(J,K);switch(Y.version=X.parseVersion(),Y.italicAngle=X.parseFixed(),Y.underlinePosition=X.parseShort(),Y.underlineThickness=X.parseShort(),Y.isFixedPitch=X.parseULong(),Y.minMemType42=X.parseULong(),Y.maxMemType42=X.parseULong(),Y.minMemType1=X.parseULong(),Y.maxMemType1=X.parseULong(),Y.names=[],Y.version){case 1:break;case 2:Y.numberOfGlyphs=X.parseUShort(),Y.glyphNameIndex=new Array(Y.numberOfGlyphs);for(var Z=0;Z<Y.numberOfGlyphs;Z++)Y.glyphNameIndex[Z]=X.parseUShort();break;case 2.5:Y.numberOfGlyphs=X.parseUShort(),Y.offset=new Array(Y.numberOfGlyphs);for(var Q=0;Q<Y.numberOfGlyphs;Q++)Y.offset[Q]=X.parseChar();break}return Y}var lw={parse:dw},M9={};M9.UTF8=function(J,K,Y){var X=[],Z=Y;for(var Q=0;Q<Z;Q++,K+=1)X[Q]=J.getUint8(K);return String.fromCharCode.apply(null,X)};M9.UTF16=function(J,K,Y){var X=[],Z=Y/2;for(var Q=0;Q<Z;Q++,K+=2)X[Q]=J.getUint16(K);return String.fromCharCode.apply(null,X)};var cw={"x-mac-croatian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u03A9\u017E\xF8"+"\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uF8FF\xA9\u2044\u20AC\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7","x-mac-cyrillic":"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A"+"\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E","x-mac-gaelic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u1E02\xB1\u2264\u2265\u1E03\u010A\u010B\u1E0A\u1E0B\u1E1E\u1E1F\u0120\u0121\u1E40\xE6\xF8"+"\u1E41\u1E56\u1E57\u027C\u0192\u017F\u1E60\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\u1E61\u1E9B\xFF\u0178\u1E6A\u20AC\u2039\u203A\u0176\u0177\u1E6B\xB7\u1EF2\u1EF3\u204A\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u2663\xD2\xDA\xDB\xD9\u0131\xDD\xFD\u0174\u0175\u1E84\u1E85\u1E80\u1E81\u1E82\u1E83","x-mac-greek":"\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\u20AC\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\xB7\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9"+"\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\xAD","x-mac-icelandic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8"+"\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-inuit":"\u1403\u1404\u1405\u1406\u140A\u140B\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144E\u144F\u1450\u1451\u1455\u1456\u1466\u146D\u146E\u146F\u1470\u1472\u1473\u1483\u148B\u148C\u148D\u148E\u1490\u1491\xB0\u14A1\u14A5\u14A6\u2022\xB6\u14A7\xAE\xA9\u2122\u14A8\u14AA\u14AB\u14BB\u14C2\u14C3\u14C4\u14C5\u14C7\u14C8\u14D0\u14EF\u14F0\u14F1\u14F2\u14F4\u14F5\u1505\u14D5\u14D6\u14D7"+"\u14D8\u14DA\u14DB\u14EA\u1528\u1529\u152A\u152B\u152D\u2026\xA0\u152E\u153E\u1555\u1556\u1557\u2013\u2014\u201C\u201D\u2018\u2019\u1558\u1559\u155A\u155D\u1546\u1547\u1548\u1549\u154B\u154C\u1550\u157F\u1580\u1581\u1582\u1583\u1584\u1585\u158F\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15A0\u15A1\u15A2\u15A3\u15A4\u15A5\u15A6\u157C\u0141\u0142","x-mac-ce":"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145"+"\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7",macintosh:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8"+"\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-romanian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u0218\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\u0103\u0219"+"\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\u021A\u021B\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-turkish":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8"+"\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\uF8A0\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"};M9.MACSTRING=function(J,K,Y,X){var Z=cw[X];if(Z===void 0)return;var Q="";for(var H=0;H<Y;H++){var w=J.getUint8(K+H);if(w<=127)Q+=String.fromCharCode(w);else Q+=Z[w&127]}return Q};function uw(J,K){var Y=new i.Parser(J,K),X=Y.parseULong();w0.argument(X===1,"Unsupported META table version."),Y.parseULong(),Y.parseULong();var Z=Y.parseULong(),Q={};for(var H=0;H<Z;H++){var w=Y.parseTag(),W=Y.parseULong(),z=Y.parseULong(),U=M9.UTF8(J,K+W,z);Q[w]=U}return Q}var pw={parse:uw};function rJ(J,K){var Y=[],X=12;for(var Z=0;Z<K;Z+=1){var Q=i.getTag(J,X),H=i.getULong(J,X+4),w=i.getULong(J,X+8),W=i.getULong(J,X+12);Y.push({tag:Q,checksum:H,offset:w,length:W,compression:!1}),X+=16}return Y}function iw(J,K){var Y=[],X=44;for(var Z=0;Z<K;Z+=1){var Q=i.getTag(J,X),H=i.getULong(J,X+4),w=i.getULong(J,X+8),W=i.getULong(J,X+12),z=void 0;if(w<W)z="WOFF";else z=!1;Y.push({tag:Q,offset:H,compression:z,compressedLength:w,length:W}),X+=20}return Y}function D0(J,K){if(K.compression==="WOFF"){var Y=new Uint8Array(J.buffer,K.offset+2,K.compressedLength-2),X=new Uint8Array(K.length);if(VQ(Y,X),X.byteLength!==K.length)throw new Error("Decompression error: "+K.tag+" decompressed length doesn't match recorded length");var Z=new DataView(X.buffer,0);return{data:Z,offset:0}}else return{data:J,offset:K.offset}}function ow(J,K){K=K===void 0||K===null?{}:K;var Y,X=new h0({empty:!0}),Z=new DataView(J,0),Q,H=[],w=i.getTag(Z,0);if(w===String.fromCharCode(0,1,0,0)||w==="true"||w==="typ1")X.outlinesFormat="truetype",Q=i.getUShort(Z,4),H=rJ(Z,Q);else if(w==="OTTO")X.outlinesFormat="cff",Q=i.getUShort(Z,4),H=rJ(Z,Q);else if(w==="wOFF"){var W=i.getTag(Z,4);if(W===String.fromCharCode(0,1,0,0))X.outlinesFormat="truetype";else if(W==="OTTO")X.outlinesFormat="cff";else throw new Error("Unsupported OpenType flavor "+w);Q=i.getUShort(Z,12),H=iw(Z,Q)}else throw new Error("Unsupported OpenType signature "+w);var z,U,$,V,B,M,q,G,N,L,_;for(var D=0;D<Q;D+=1){var E=H[D],j=void 0;switch(E.tag){case"cmap":j=D0(Z,E),X.tables.cmap=pW.parse(j.data,j.offset),X.encoding=new X1(X.tables.cmap);break;case"cvt ":j=D0(Z,E),_=new i.Parser(j.data,j.offset),X.tables.cvt=_.parseShortList(E.length/2);break;case"fvar":U=E;break;case"fpgm":j=D0(Z,E),_=new i.Parser(j.data,j.offset),X.tables.fpgm=_.parseByteList(E.length);break;case"head":j=D0(Z,E),X.tables.head=Fw.parse(j.data,j.offset),X.unitsPerEm=X.tables.head.unitsPerEm,Y=X.tables.head.indexToLocFormat;break;case"hhea":j=D0(Z,E),X.tables.hhea=_w.parse(j.data,j.offset),X.ascender=X.tables.hhea.ascender,X.descender=X.tables.hhea.descender,X.numberOfHMetrics=X.tables.hhea.numberOfHMetrics;break;case"hmtx":q=E;break;case"ltag":j=D0(Z,E),ltagTable=kw.parse(j.data,j.offset);break;case"maxp":j=D0(Z,E),X.tables.maxp=bw.parse(j.data,j.offset),X.numGlyphs=X.tables.maxp.numGlyphs;break;case"OS/2":j=D0(Z,E),X.tables.os2=fw.parse(j.data,j.offset);break;case"post":j=D0(Z,E),X.tables.post=lw.parse(j.data,j.offset);break;case"prep":j=D0(Z,E),_=new i.Parser(j.data,j.offset),X.tables.prep=_.parseByteList(E.length);break;case"glyf":$=E;break;case"loca":N=E;break;case"CFF ":z=E;break;case"kern":G=E;break;case"GDEF":V=E;break;case"GPOS":B=E;break;case"GSUB":M=E;break;case"meta":L=E;break}}if($&&N){var T=Y===0,R=D0(Z,N),S=xw.parse(R.data,R.offset,X.numGlyphs,T),x=D0(Z,$);X.glyphs=z1.parse(x.data,x.offset,S,X,K)}else if(z){var c=D0(Z,z);Qw.parse(c.data,c.offset,X,K)}else throw new Error("Font doesn't contain TrueType or CFF outlines.");var o=D0(Z,q);if(Tw.parse(X,o.data,o.offset,X.numberOfHMetrics,X.numGlyphs,X.glyphs,K),LQ(X,K),G){var u=D0(Z,G);X.kerningPairs=vw.parse(u.data,u.offset)}else X.kerningPairs={};if(V){var C=D0(Z,V);X.tables.gdef=Gw.parse(C.data,C.offset)}if(B){var P=D0(Z,B);X.tables.gpos=Ow.parse(P.data,P.offset),X.position.init()}if(M){var I=D0(Z,M);X.tables.gsub=Lw.parse(I.data,I.offset)}if(U){var f=D0(Z,U);X.tables.fvar=zw.parse(f.data,f.offset,X.names)}if(L){var l=D0(Z,L);X.tables.meta=pw.parse(l.data,l.offset),X.metas=X.tables.meta}return X}function rw(){}function nw(){}var sw=Object.freeze({__proto__:null,Font:h0,Glyph:T8,Path:x0,_parse:i,parse:ow,load:rw,loadSync:nw}),O9=sw;var{create:tw,defineProperty:h9,getOwnPropertyDescriptor:ew,getOwnPropertyNames:Jz,getPrototypeOf:Kz}=Object,Yz=Object.prototype.hasOwnProperty,j4=(J,K)=>()=>(J&&(K=J(J=0)),K),a=(J,K)=>()=>(K||J((K={exports:{}}).exports,K),K.exports),F4=(J,K)=>{for(var Y in K)h9(J,Y,{get:K[Y],enumerable:!0})},p1=(J,K,Y,X)=>{if(K&&typeof K=="object"||typeof K=="function")for(let Z of Jz(K))!Yz.call(J,Z)&&Z!==Y&&h9(J,Z,{get:()=>K[Z],enumerable:!(X=ew(K,Z))||X.enumerable});return J},Xz=(J,K,Y)=>(Y=J!=null?tw(Kz(J)):{},p1(K||!J||!J.__esModule?h9(Y,"default",{value:J,enumerable:!0}):Y,J)),g9=(J)=>p1(h9({},"__esModule",{value:!0}),J),i1={};F4(i1,{getYogaModule:()=>Zz});async function Zz(){let{default:J}=await import("../chunk-ac8m7p53.js");return J()}var Qz=j4(()=>{}),o1=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0}),Object.defineProperty(J,"default",{enumerable:!0,get:()=>K});function K(Y){if(Y=`${Y}`,Y==="0")return"0";if(/^[+-]?(\d+|\d*\.\d+)(e[+-]?\d+)?(%|\w+)?$/.test(Y))return Y.replace(/^[+-]?/,(X)=>X==="-"?"":"-");if(Y.includes("var(")||Y.includes("calc("))return`calc(${Y} * -1)`}}),Hz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0}),Object.defineProperty(J,"default",{enumerable:!0,get:()=>K});var K=["preflight","container","accessibility","pointerEvents","visibility","position","inset","isolation","zIndex","order","gridColumn","gridColumnStart","gridColumnEnd","gridRow","gridRowStart","gridRowEnd","float","clear","margin","boxSizing","display","aspectRatio","height","maxHeight","minHeight","width","minWidth","maxWidth","flex","flexShrink","flexGrow","flexBasis","tableLayout","borderCollapse","borderSpacing","transformOrigin","translate","rotate","skew","scale","transform","animation","cursor","touchAction","userSelect","resize","scrollSnapType","scrollSnapAlign","scrollSnapStop","scrollMargin","scrollPadding","listStylePosition","listStyleType","appearance","columns","breakBefore","breakInside","breakAfter","gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateColumns","gridTemplateRows","flexDirection","flexWrap","placeContent","placeItems","alignContent","alignItems","justifyContent","justifyItems","gap","space","divideWidth","divideStyle","divideColor","divideOpacity","placeSelf","alignSelf","justifySelf","overflow","overscrollBehavior","scrollBehavior","textOverflow","whitespace","wordBreak","borderRadius","borderWidth","borderStyle","borderColor","borderOpacity","backgroundColor","backgroundOpacity","backgroundImage","gradientColorStops","boxDecorationBreak","backgroundSize","backgroundAttachment","backgroundClip","backgroundPosition","backgroundRepeat","backgroundOrigin","fill","stroke","strokeWidth","objectFit","objectPosition","padding","textAlign","textIndent","verticalAlign","fontFamily","fontSize","fontWeight","textTransform","fontStyle","fontVariantNumeric","lineHeight","letterSpacing","textColor","textOpacity","textDecoration","textDecorationColor","textDecorationStyle","textDecorationThickness","textUnderlineOffset","fontSmoothing","placeholderColor","placeholderOpacity","caretColor","accentColor","opacity","backgroundBlendMode","mixBlendMode","boxShadow","boxShadowColor","outlineStyle","outlineWidth","outlineOffset","outlineColor","ringWidth","ringColor","ringOpacity","ringOffsetWidth","ringOffsetColor","blur","brightness","contrast","dropShadow","grayscale","hueRotate","invert","saturate","sepia","filter","backdropBlur","backdropBrightness","backdropContrast","backdropGrayscale","backdropHueRotate","backdropInvert","backdropOpacity","backdropSaturate","backdropSepia","backdropFilter","transitionProperty","transitionDelay","transitionDuration","transitionTimingFunction","willChange","content"]}),Wz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0}),Object.defineProperty(J,"default",{enumerable:!0,get:()=>K});function K(Y,X){return Y===void 0?X:Array.isArray(Y)?Y:[...new Set(X.filter((Z)=>Y!==!1&&Y[Z]!==!1).concat(Object.keys(Y).filter((Z)=>Y[Z]!==!1)))]}}),r1=a((J,K)=>{K.exports={content:[],presets:[],darkMode:"media",theme:{screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},colors:({colors:Y})=>({inherit:Y.inherit,current:Y.current,transparent:Y.transparent,black:Y.black,white:Y.white,slate:Y.slate,gray:Y.gray,zinc:Y.zinc,neutral:Y.neutral,stone:Y.stone,red:Y.red,orange:Y.orange,amber:Y.amber,yellow:Y.yellow,lime:Y.lime,green:Y.green,emerald:Y.emerald,teal:Y.teal,cyan:Y.cyan,sky:Y.sky,blue:Y.blue,indigo:Y.indigo,violet:Y.violet,purple:Y.purple,fuchsia:Y.fuchsia,pink:Y.pink,rose:Y.rose}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",0.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9"},backdropBlur:({theme:Y})=>Y("blur"),backdropBrightness:({theme:Y})=>Y("brightness"),backdropContrast:({theme:Y})=>Y("contrast"),backdropGrayscale:({theme:Y})=>Y("grayscale"),backdropHueRotate:({theme:Y})=>Y("hueRotate"),backdropInvert:({theme:Y})=>Y("invert"),backdropOpacity:({theme:Y})=>Y("opacity"),backdropSaturate:({theme:Y})=>Y("saturate"),backdropSepia:({theme:Y})=>Y("sepia"),backgroundColor:({theme:Y})=>Y("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:Y})=>Y("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"},borderColor:({theme:Y})=>({...Y("colors"),DEFAULT:Y("colors.gray.200","currentColor")}),borderOpacity:({theme:Y})=>Y("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:Y})=>({...Y("spacing")}),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px"},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:Y})=>Y("colors"),caretColor:({theme:Y})=>Y("colors"),accentColor:({theme:Y})=>({...Y("colors"),auto:"auto"}),contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2"},container:{},content:{none:"none"},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:Y})=>Y("borderColor"),divideOpacity:({theme:Y})=>Y("borderOpacity"),divideWidth:({theme:Y})=>Y("borderWidth"),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:Y})=>Y("colors"),grayscale:{0:"0",DEFAULT:"100%"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{0:"0",DEFAULT:"100%"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:Y})=>({auto:"auto",...Y("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%"}),flexGrow:{0:"0",DEFAULT:"1"},flexShrink:{0:"0",DEFAULT:"1"},fontFamily:{sans:["ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"',"sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:Y})=>Y("spacing"),gradientColorStops:({theme:Y})=>Y("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-full":"1 / -1"},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7"},gridTemplateColumns:{none:"none",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},gridTemplateRows:{none:"none",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))"},height:({theme:Y})=>({auto:"auto",...Y("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"}),inset:({theme:Y})=>({auto:"auto",...Y("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},margin:({theme:Y})=>({auto:"auto",...Y("spacing")}),maxHeight:({theme:Y})=>({...Y("spacing"),full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:Y,breakpoints:X})=>({none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...X(Y("screens"))}),minHeight:{0:"0px",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",20:"0.2",25:"0.25",30:"0.3",40:"0.4",50:"0.5",60:"0.6",70:"0.7",75:"0.75",80:"0.8",90:"0.9",95:"0.95",100:"1"},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},padding:({theme:Y})=>Y("spacing"),placeholderColor:({theme:Y})=>Y("colors"),placeholderOpacity:({theme:Y})=>Y("opacity"),outlineColor:({theme:Y})=>Y("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringColor:({theme:Y})=>({DEFAULT:Y("colors.blue.500","#3b82f6"),...Y("colors")}),ringOffsetColor:({theme:Y})=>Y("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringOpacity:({theme:Y})=>({DEFAULT:"0.5",...Y("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2"},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"},scrollMargin:({theme:Y})=>({...Y("spacing")}),scrollPadding:({theme:Y})=>Y("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg"},space:({theme:Y})=>({...Y("spacing")}),stroke:({theme:Y})=>Y("colors"),strokeWidth:{0:"0",1:"1",2:"2"},textColor:({theme:Y})=>Y("colors"),textDecorationColor:({theme:Y})=>Y("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textIndent:({theme:Y})=>({...Y("spacing")}),textOpacity:({theme:Y})=>Y("opacity"),transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1000:"1000ms"},transitionDuration:{DEFAULT:"150ms",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1000:"1000ms"},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:Y})=>({...Y("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),width:({theme:Y})=>({auto:"auto",...Y("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",min:"min-content",max:"max-content",fit:"fit-content"}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50"}},variantOrder:["first","last","odd","even","visited","checked","empty","read-only","group-hover","group-focus","focus-within","hover","focus","focus-visible","active","disabled"],plugins:[]}}),b9={};F4(b9,{default:()=>n1});var n1,E4=j4(()=>{n1={info(J,K){console.info(...Array.isArray(J)?[J]:[K,J])},warn(J,K){console.warn(...Array.isArray(J)?[J]:[K,J])},risk(J,K){console.error(...Array.isArray(J)?[J]:[K,J])}}}),wz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0}),Object.defineProperty(J,"default",{enumerable:!0,get:()=>Z});var K=Y((E4(),g9(b9)));function Y(Q){return Q&&Q.__esModule?Q:{default:Q}}function X({version:Q,from:H,to:w}){K.default.warn(`${H}-color-renamed`,[`As of Tailwind CSS ${Q}, \`${H}\` has been renamed to \`${w}\`.`,"Update your configuration file to silence this warning."])}var Z={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},get lightBlue(){return X({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return X({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return X({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return X({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return X({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}}),zz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0}),Object.defineProperty(J,"defaults",{enumerable:!0,get:()=>K});function K(Y,...X){for(let H of X){for(let w in H){var Z;!(Y==null||(Z=Y.hasOwnProperty)===null||Z===void 0)&&Z.call(Y,w)||(Y[w]=H[w])}for(let w of Object.getOwnPropertySymbols(H)){var Q;!(Y==null||(Q=Y.hasOwnProperty)===null||Q===void 0)&&Q.call(Y,w)||(Y[w]=H[w])}}return Y}}),Uz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0}),Object.defineProperty(J,"toPath",{enumerable:!0,get:()=>K});function K(Y){if(Array.isArray(Y))return Y;let X=Y.split("[").length-1,Z=Y.split("]").length-1;if(X!==Z)throw new Error(`Path is invalid. Has unbalanced brackets: ${Y}`);return Y.split(/\.(?![^\[]*\])|[\[\]]/g).filter(Boolean)}}),$z=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0}),Object.defineProperty(J,"normalizeConfig",{enumerable:!0,get:()=>Z});var K=X((E4(),g9(b9)));function Y(Q){if(typeof WeakMap!="function")return null;var H=new WeakMap,w=new WeakMap;return(Y=function(W){return W?w:H})(Q)}function X(Q,H){if(!H&&Q&&Q.__esModule)return Q;if(Q===null||typeof Q!="object"&&typeof Q!="function")return{default:Q};var w=Y(H);if(w&&w.has(Q))return w.get(Q);var W={},z=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var U in Q)if(U!=="default"&&Object.prototype.hasOwnProperty.call(Q,U)){var $=z?Object.getOwnPropertyDescriptor(Q,U):null;$&&($.get||$.set)?Object.defineProperty(W,U,$):W[U]=Q[U]}return W.default=Q,w&&w.set(Q,W),W}function Z(Q){if((()=>{if(Q.purge||!Q.content||!Array.isArray(Q.content)&&!(typeof Q.content=="object"&&Q.content!==null))return!1;if(Array.isArray(Q.content))return Q.content.every((w)=>typeof w=="string"?!0:!(typeof(w==null?void 0:w.raw)!="string"||w!=null&&w.extension&&typeof(w==null?void 0:w.extension)!="string"));if(typeof Q.content=="object"&&Q.content!==null){if(Object.keys(Q.content).some((w)=>!["files","extract","transform"].includes(w)))return!1;if(Array.isArray(Q.content.files)){if(!Q.content.files.every((w)=>typeof w=="string"?!0:!(typeof(w==null?void 0:w.raw)!="string"||w!=null&&w.extension&&typeof(w==null?void 0:w.extension)!="string")))return!1;if(typeof Q.content.extract=="object"){for(let w of Object.values(Q.content.extract))if(typeof w!="function")return!1}else if(!(Q.content.extract===void 0||typeof Q.content.extract=="function"))return!1;if(typeof Q.content.transform=="object"){for(let w of Object.values(Q.content.transform))if(typeof w!="function")return!1}else if(!(Q.content.transform===void 0||typeof Q.content.transform=="function"))return!1}return!0}return!1})()||K.default.warn("purge-deprecation",["The `purge`/`content` options have changed in Tailwind CSS v3.0.","Update your configuration file to eliminate this warning.","https://tailwindcss.com/docs/upgrade-guide#configure-content-sources"]),Q.safelist=(()=>{var w;let{content:W,purge:z,safelist:U}=Q;return Array.isArray(U)?U:Array.isArray(W==null?void 0:W.safelist)?W.safelist:Array.isArray(z==null?void 0:z.safelist)?z.safelist:Array.isArray(z==null||(w=z.options)===null||w===void 0?void 0:w.safelist)?z.options.safelist:[]})(),typeof Q.prefix=="function")K.default.warn("prefix-function",["As of Tailwind CSS v3.0, `prefix` cannot be a function.","Update `prefix` in your configuration to be a string to eliminate this warning.","https://tailwindcss.com/docs/upgrade-guide#prefix-cannot-be-a-function"]),Q.prefix="";else{var H;Q.prefix=(H=Q.prefix)!==null&&H!==void 0?H:""}Q.content={files:(()=>{let{content:w,purge:W}=Q;return Array.isArray(W)?W:Array.isArray(W==null?void 0:W.content)?W.content:Array.isArray(w)?w:Array.isArray(w==null?void 0:w.content)?w.content:Array.isArray(w==null?void 0:w.files)?w.files:[]})(),extract:(()=>{let w=(()=>{var U,$,V,B,M,q,G,N,L,_;return!((U=Q.purge)===null||U===void 0)&&U.extract?Q.purge.extract:!(($=Q.content)===null||$===void 0)&&$.extract?Q.content.extract:!((V=Q.purge)===null||V===void 0||(B=V.extract)===null||B===void 0)&&B.DEFAULT?Q.purge.extract.DEFAULT:!((M=Q.content)===null||M===void 0||(q=M.extract)===null||q===void 0)&&q.DEFAULT?Q.content.extract.DEFAULT:!((G=Q.purge)===null||G===void 0||(N=G.options)===null||N===void 0)&&N.extractors?Q.purge.options.extractors:!((L=Q.content)===null||L===void 0||(_=L.options)===null||_===void 0)&&_.extractors?Q.content.options.extractors:{}})(),W={},z=(()=>{var U,$,V,B;if(!((U=Q.purge)===null||U===void 0||($=U.options)===null||$===void 0)&&$.defaultExtractor)return Q.purge.options.defaultExtractor;if(!((V=Q.content)===null||V===void 0||(B=V.options)===null||B===void 0)&&B.defaultExtractor)return Q.content.options.defaultExtractor})();if(z!==void 0&&(W.DEFAULT=z),typeof w=="function")W.DEFAULT=w;else if(Array.isArray(w))for(let{extensions:U,extractor:$}of w??[])for(let V of U)W[V]=$;else typeof w=="object"&&w!==null&&Object.assign(W,w);return W})(),transform:(()=>{let w=(()=>{var z,U,$,V,B,M;return!((z=Q.purge)===null||z===void 0)&&z.transform?Q.purge.transform:!((U=Q.content)===null||U===void 0)&&U.transform?Q.content.transform:!(($=Q.purge)===null||$===void 0||(V=$.transform)===null||V===void 0)&&V.DEFAULT?Q.purge.transform.DEFAULT:!((B=Q.content)===null||B===void 0||(M=B.transform)===null||M===void 0)&&M.DEFAULT?Q.content.transform.DEFAULT:{}})(),W={};return typeof w=="function"&&(W.DEFAULT=w),typeof w=="object"&&w!==null&&Object.assign(W,w),W})()};for(let w of Q.content.files)if(typeof w=="string"&&/{([^,]*?)}/g.test(w)){K.default.warn("invalid-glob-braces",[`The glob pattern ${K.dim(w)} in your Tailwind CSS configuration is invalid.`,`Update it to ${K.dim(w.replace(/{([^,]*?)}/g,"$1"))} to silence this warning.`]);break}return Q}}),Vz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0}),Object.defineProperty(J,"default",{enumerable:!0,get:()=>K});function K(Y){if(Object.prototype.toString.call(Y)!=="[object Object]")return!1;let X=Object.getPrototypeOf(Y);return X===null||X===Object.prototype}}),Bz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0}),Object.defineProperty(J,"cloneDeep",{enumerable:!0,get:()=>K});function K(Y){return Array.isArray(Y)?Y.map((X)=>K(X)):typeof Y=="object"&&Y!==null?Object.fromEntries(Object.entries(Y).map(([X,Z])=>[X,K(Z)])):Y}}),s1=a((J,K)=>{J.__esModule=!0,J.default=Z;function Y(Q){for(var H=Q.toLowerCase(),w="",W=!1,z=0;z<6&&H[z]!==void 0;z++){var U=H.charCodeAt(z),$=U>=97&&U<=102||U>=48&&U<=57;if(W=U===32,!$)break;w+=H[z]}if(w.length!==0){var V=parseInt(w,16),B=V>=55296&&V<=57343;return B||V===0||V>1114111?["\uFFFD",w.length+(W?1:0)]:[String.fromCodePoint(V),w.length+(W?1:0)]}}var X=/\\/;function Z(Q){var H=X.test(Q);if(!H)return Q;for(var w="",W=0;W<Q.length;W++){if(Q[W]==="\\"){var z=Y(Q.slice(W+1,W+7));if(z!==void 0){w+=z[0],W+=z[1];continue}if(Q[W+1]==="\\"){w+="\\",W++;continue}Q.length===W+1&&(w+=Q[W]);continue}w+=Q[W]}return w}K.exports=J.default}),qz=a((J,K)=>{J.__esModule=!0,J.default=Y;function Y(X){for(var Z=arguments.length,Q=new Array(Z>1?Z-1:0),H=1;H<Z;H++)Q[H-1]=arguments[H];for(;Q.length>0;){var w=Q.shift();if(!X[w])return;X=X[w]}return X}K.exports=J.default}),Az=a((J,K)=>{J.__esModule=!0,J.default=Y;function Y(X){for(var Z=arguments.length,Q=new Array(Z>1?Z-1:0),H=1;H<Z;H++)Q[H-1]=arguments[H];for(;Q.length>0;){var w=Q.shift();X[w]||(X[w]={}),X=X[w]}}K.exports=J.default}),Gz=a((J,K)=>{J.__esModule=!0,J.default=Y;function Y(X){for(var Z="",Q=X.indexOf("/*"),H=0;Q>=0;){Z=Z+X.slice(H,Q);var w=X.indexOf("*/",Q+2);if(w<0)return Z;H=w+2,Q=X.indexOf("/*",H)}return Z=Z+X.slice(H),Z}K.exports=J.default}),m9=a((J)=>{J.__esModule=!0,J.stripComments=J.ensureObject=J.getProp=J.unesc=void 0;var K=Q(s1());J.unesc=K.default;var Y=Q(qz());J.getProp=Y.default;var X=Q(Az());J.ensureObject=X.default;var Z=Q(Gz());J.stripComments=Z.default;function Q(H){return H&&H.__esModule?H:{default:H}}}),p8=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=m9();function X(w,W){for(var z=0;z<W.length;z++){var U=W[z];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(w,U.key,U)}}function Z(w,W,z){return W&&X(w.prototype,W),z&&X(w,z),w}var Q=function w(W,z){if(typeof W!="object"||W===null)return W;var U=new W.constructor;for(var $ in W)if(W.hasOwnProperty($)){var V=W[$],B=typeof V;$==="parent"&&B==="object"?z&&(U[$]=z):V instanceof Array?U[$]=V.map(function(M){return w(M,U)}):U[$]=w(V,U)}return U},H=function(){function w(z){z===void 0&&(z={}),Object.assign(this,z),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}var W=w.prototype;return W.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},W.replaceWith=function(){if(this.parent){for(var z in arguments)this.parent.insertBefore(this,arguments[z]);this.remove()}return this},W.next=function(){return this.parent.at(this.parent.index(this)+1)},W.prev=function(){return this.parent.at(this.parent.index(this)-1)},W.clone=function(z){z===void 0&&(z={});var U=Q(this);for(var $ in z)U[$]=z[$];return U},W.appendToPropertyAndEscape=function(z,U,$){this.raws||(this.raws={});var V=this[z],B=this.raws[z];this[z]=V+U,B||$!==U?this.raws[z]=(B||V)+$:delete this.raws[z]},W.setPropertyAndEscape=function(z,U,$){this.raws||(this.raws={}),this[z]=U,this.raws[z]=$},W.setPropertyWithoutEscape=function(z,U){this[z]=U,this.raws&&delete this.raws[z]},W.isAtPosition=function(z,U){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>z||this.source.end.line<z||this.source.start.line===z&&this.source.start.column>U||this.source.end.line===z&&this.source.end.column<U)},W.stringifyProperty=function(z){return this.raws&&this.raws[z]||this[z]},W.valueToString=function(){return String(this.stringifyProperty("value"))},W.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},Z(w,[{key:"rawSpaceBefore",get:function(){var z=this.raws&&this.raws.spaces&&this.raws.spaces.before;return z===void 0&&(z=this.spaces&&this.spaces.before),z||""},set:function(z){Y.ensureObject(this,"raws","spaces"),this.raws.spaces.before=z}},{key:"rawSpaceAfter",get:function(){var z=this.raws&&this.raws.spaces&&this.raws.spaces.after;return z===void 0&&(z=this.spaces.after),z||""},set:function(z){Y.ensureObject(this,"raws","spaces"),this.raws.spaces.after=z}}]),w}();J.default=H,K.exports=J.default}),b0=a((J)=>{J.__esModule=!0,J.UNIVERSAL=J.ATTRIBUTE=J.CLASS=J.COMBINATOR=J.COMMENT=J.ID=J.NESTING=J.PSEUDO=J.ROOT=J.SELECTOR=J.STRING=J.TAG=void 0;var K="tag";J.TAG=K;var Y="string";J.STRING=Y;var X="selector";J.SELECTOR=X;var Z="root";J.ROOT=Z;var Q="pseudo";J.PSEUDO=Q;var H="nesting";J.NESTING=H;var w="id";J.ID=w;var W="comment";J.COMMENT=W;var z="combinator";J.COMBINATOR=z;var U="class";J.CLASS=U;var $="attribute";J.ATTRIBUTE=$;var V="universal";J.UNIVERSAL=V}),_4=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=H(p8()),X=Q(b0());function Z(){if(typeof WeakMap!="function")return null;var q=new WeakMap;return Z=function(){return q},q}function Q(q){if(q&&q.__esModule)return q;if(q===null||typeof q!="object"&&typeof q!="function")return{default:q};var G=Z();if(G&&G.has(q))return G.get(q);var N={},L=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in q)if(Object.prototype.hasOwnProperty.call(q,_)){var D=L?Object.getOwnPropertyDescriptor(q,_):null;D&&(D.get||D.set)?Object.defineProperty(N,_,D):N[_]=q[_]}return N.default=q,G&&G.set(q,N),N}function H(q){return q&&q.__esModule?q:{default:q}}function w(q,G){var N;if(typeof Symbol>"u"||q[Symbol.iterator]==null){if(Array.isArray(q)||(N=W(q))||G&&q&&typeof q.length=="number"){N&&(q=N);var L=0;return function(){return L>=q.length?{done:!0}:{done:!1,value:q[L++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
62
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return N=q[Symbol.iterator](),N.next.bind(N)}function W(q,G){if(q){if(typeof q=="string")return z(q,G);var N=Object.prototype.toString.call(q).slice(8,-1);if(N==="Object"&&q.constructor&&(N=q.constructor.name),N==="Map"||N==="Set")return Array.from(q);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return z(q,G)}}function z(q,G){(G==null||G>q.length)&&(G=q.length);for(var N=0,L=new Array(G);N<G;N++)L[N]=q[N];return L}function U(q,G){for(var N=0;N<G.length;N++){var L=G[N];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(q,L.key,L)}}function $(q,G,N){return G&&U(q.prototype,G),N&&U(q,N),q}function V(q,G){q.prototype=Object.create(G.prototype),q.prototype.constructor=q,B(q,G)}function B(q,G){return B=Object.setPrototypeOf||function(N,L){return N.__proto__=L,N},B(q,G)}var M=function(q){V(G,q);function G(L){var _;return _=q.call(this,L)||this,_.nodes||(_.nodes=[]),_}var N=G.prototype;return N.append=function(L){return L.parent=this,this.nodes.push(L),this},N.prepend=function(L){return L.parent=this,this.nodes.unshift(L),this},N.at=function(L){return this.nodes[L]},N.index=function(L){return typeof L=="number"?L:this.nodes.indexOf(L)},N.removeChild=function(L){L=this.index(L),this.at(L).parent=void 0,this.nodes.splice(L,1);var _;for(var D in this.indexes)_=this.indexes[D],_>=L&&(this.indexes[D]=_-1);return this},N.removeAll=function(){for(var L=w(this.nodes),_;!(_=L()).done;){var D=_.value;D.parent=void 0}return this.nodes=[],this},N.empty=function(){return this.removeAll()},N.insertAfter=function(L,_){_.parent=this;var D=this.index(L);this.nodes.splice(D+1,0,_),_.parent=this;var E;for(var j in this.indexes)E=this.indexes[j],D<=E&&(this.indexes[j]=E+1);return this},N.insertBefore=function(L,_){_.parent=this;var D=this.index(L);this.nodes.splice(D,0,_),_.parent=this;var E;for(var j in this.indexes)E=this.indexes[j],E<=D&&(this.indexes[j]=E+1);return this},N._findChildAtPosition=function(L,_){var D=void 0;return this.each(function(E){if(E.atPosition){var j=E.atPosition(L,_);if(j)return D=j,!1}else if(E.isAtPosition(L,_))return D=E,!1}),D},N.atPosition=function(L,_){if(this.isAtPosition(L,_))return this._findChildAtPosition(L,_)||this},N._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},N.each=function(L){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var _=this.lastEach;if(this.indexes[_]=0,!!this.length){for(var D,E;this.indexes[_]<this.length&&(D=this.indexes[_],E=L(this.at(D),D),E!==!1);)this.indexes[_]+=1;if(delete this.indexes[_],E===!1)return!1}},N.walk=function(L){return this.each(function(_,D){var E=L(_,D);if(E!==!1&&_.length&&(E=_.walk(L)),E===!1)return!1})},N.walkAttributes=function(L){var _=this;return this.walk(function(D){if(D.type===X.ATTRIBUTE)return L.call(_,D)})},N.walkClasses=function(L){var _=this;return this.walk(function(D){if(D.type===X.CLASS)return L.call(_,D)})},N.walkCombinators=function(L){var _=this;return this.walk(function(D){if(D.type===X.COMBINATOR)return L.call(_,D)})},N.walkComments=function(L){var _=this;return this.walk(function(D){if(D.type===X.COMMENT)return L.call(_,D)})},N.walkIds=function(L){var _=this;return this.walk(function(D){if(D.type===X.ID)return L.call(_,D)})},N.walkNesting=function(L){var _=this;return this.walk(function(D){if(D.type===X.NESTING)return L.call(_,D)})},N.walkPseudos=function(L){var _=this;return this.walk(function(D){if(D.type===X.PSEUDO)return L.call(_,D)})},N.walkTags=function(L){var _=this;return this.walk(function(D){if(D.type===X.TAG)return L.call(_,D)})},N.walkUniversals=function(L){var _=this;return this.walk(function(D){if(D.type===X.UNIVERSAL)return L.call(_,D)})},N.split=function(L){var _=this,D=[];return this.reduce(function(E,j,T){var R=L.call(_,j);return D.push(j),R?(E.push(D),D=[]):T===_.length-1&&E.push(D),E},[])},N.map=function(L){return this.nodes.map(L)},N.reduce=function(L,_){return this.nodes.reduce(L,_)},N.every=function(L){return this.nodes.every(L)},N.some=function(L){return this.nodes.some(L)},N.filter=function(L){return this.nodes.filter(L)},N.sort=function(L){return this.nodes.sort(L)},N.toString=function(){return this.map(String).join("")},$(G,[{key:"first",get:function(){return this.at(0)}},{key:"last",get:function(){return this.at(this.length-1)}},{key:"length",get:function(){return this.nodes.length}}]),G}(Y.default);J.default=M,K.exports=J.default}),a1=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=Z(_4()),X=b0();function Z(U){return U&&U.__esModule?U:{default:U}}function Q(U,$){for(var V=0;V<$.length;V++){var B=$[V];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(U,B.key,B)}}function H(U,$,V){return $&&Q(U.prototype,$),V&&Q(U,V),U}function w(U,$){U.prototype=Object.create($.prototype),U.prototype.constructor=U,W(U,$)}function W(U,$){return W=Object.setPrototypeOf||function(V,B){return V.__proto__=B,V},W(U,$)}var z=function(U){w($,U);function $(B){var M;return M=U.call(this,B)||this,M.type=X.ROOT,M}var V=$.prototype;return V.toString=function(){var B=this.reduce(function(M,q){return M.push(String(q)),M},[]).join(",");return this.trailingComma?B+",":B},V.error=function(B,M){return this._error?this._error(B,M):new Error(B)},H($,[{key:"errorGenerator",set:function(B){this._error=B}}]),$}(Y.default);J.default=z,K.exports=J.default}),t1=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=Z(_4()),X=b0();function Z(W){return W&&W.__esModule?W:{default:W}}function Q(W,z){W.prototype=Object.create(z.prototype),W.prototype.constructor=W,H(W,z)}function H(W,z){return H=Object.setPrototypeOf||function(U,$){return U.__proto__=$,U},H(W,z)}var w=function(W){Q(z,W);function z(U){var $;return $=W.call(this,U)||this,$.type=X.SELECTOR,$}return z}(Y.default);J.default=w,K.exports=J.default}),R4=a((J,K)=>{var Y={},X=Y.hasOwnProperty,Z=function(z,U){if(!z)return U;var $={};for(var V in U)$[V]=X.call(z,V)?z[V]:U[V];return $},Q=/[ -,\.\/:-@\[-\^`\{-~]/,H=/[ -,\.\/:-@\[\]\^`\{-~]/,w=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,W=function z(U,$){$=Z($,z.options),$.quotes!="single"&&$.quotes!="double"&&($.quotes="single");for(var V=$.quotes=="double"?'"':"'",B=$.isIdentifier,M=U.charAt(0),q="",G=0,N=U.length;G<N;){var L=U.charAt(G++),_=L.charCodeAt(),D=void 0;if(_<32||_>126){if(_>=55296&&_<=56319&&G<N){var E=U.charCodeAt(G++);(E&64512)==56320?_=((_&1023)<<10)+(E&1023)+65536:G--}D="\\"+_.toString(16).toUpperCase()+" "}else $.escapeEverything?Q.test(L)?D="\\"+L:D="\\"+_.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(L)?D="\\"+_.toString(16).toUpperCase()+" ":L=="\\"||!B&&(L=='"'&&V==L||L=="'"&&V==L)||B&&H.test(L)?D="\\"+L:D=L;q+=D}return B&&(/^-[-\d]/.test(q)?q="\\-"+q.slice(1):/\d/.test(M)&&(q="\\3"+M+" "+q.slice(1))),q=q.replace(w,function(j,T,R){return T&&T.length%2?j:(T||"")+R}),!B&&$.wrap?V+q+V:q};W.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1},W.version="3.0.0",K.exports=W}),e1=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=H(R4()),X=m9(),Z=H(p8()),Q=b0();function H(V){return V&&V.__esModule?V:{default:V}}function w(V,B){for(var M=0;M<B.length;M++){var q=B[M];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(V,q.key,q)}}function W(V,B,M){return B&&w(V.prototype,B),M&&w(V,M),V}function z(V,B){V.prototype=Object.create(B.prototype),V.prototype.constructor=V,U(V,B)}function U(V,B){return U=Object.setPrototypeOf||function(M,q){return M.__proto__=q,M},U(V,B)}var $=function(V){z(B,V);function B(q){var G;return G=V.call(this,q)||this,G.type=Q.CLASS,G._constructed=!0,G}var M=B.prototype;return M.valueToString=function(){return"."+V.prototype.valueToString.call(this)},W(B,[{key:"value",get:function(){return this._value},set:function(q){if(this._constructed){var G=Y.default(q,{isIdentifier:!0});G!==q?(X.ensureObject(this,"raws"),this.raws.value=G):this.raws&&delete this.raws.value}this._value=q}}]),B}(Z.default);J.default=$,K.exports=J.default}),JK=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=Z(p8()),X=b0();function Z(W){return W&&W.__esModule?W:{default:W}}function Q(W,z){W.prototype=Object.create(z.prototype),W.prototype.constructor=W,H(W,z)}function H(W,z){return H=Object.setPrototypeOf||function(U,$){return U.__proto__=$,U},H(W,z)}var w=function(W){Q(z,W);function z(U){var $;return $=W.call(this,U)||this,$.type=X.COMMENT,$}return z}(Y.default);J.default=w,K.exports=J.default}),KK=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=Z(p8()),X=b0();function Z(W){return W&&W.__esModule?W:{default:W}}function Q(W,z){W.prototype=Object.create(z.prototype),W.prototype.constructor=W,H(W,z)}function H(W,z){return H=Object.setPrototypeOf||function(U,$){return U.__proto__=$,U},H(W,z)}var w=function(W){Q(z,W);function z($){var V;return V=W.call(this,$)||this,V.type=X.ID,V}var U=z.prototype;return U.valueToString=function(){return"#"+W.prototype.valueToString.call(this)},z}(Y.default);J.default=w,K.exports=J.default}),D4=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=Q(R4()),X=m9(),Z=Q(p8());function Q($){return $&&$.__esModule?$:{default:$}}function H($,V){for(var B=0;B<V.length;B++){var M=V[B];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty($,M.key,M)}}function w($,V,B){return V&&H($.prototype,V),B&&H($,B),$}function W($,V){$.prototype=Object.create(V.prototype),$.prototype.constructor=$,z($,V)}function z($,V){return z=Object.setPrototypeOf||function(B,M){return B.__proto__=M,B},z($,V)}var U=function($){W(V,$);function V(){return $.apply(this,arguments)||this}var B=V.prototype;return B.qualifiedName=function(M){return this.namespace?this.namespaceString+"|"+M:M},B.valueToString=function(){return this.qualifiedName($.prototype.valueToString.call(this))},w(V,[{key:"namespace",get:function(){return this._namespace},set:function(M){if(M===!0||M==="*"||M==="&"){this._namespace=M,this.raws&&delete this.raws.namespace;return}var q=Y.default(M,{isIdentifier:!0});this._namespace=M,q!==M?(X.ensureObject(this,"raws"),this.raws.namespace=q):this.raws&&delete this.raws.namespace}},{key:"ns",get:function(){return this._namespace},set:function(M){this.namespace=M}},{key:"namespaceString",get:function(){if(this.namespace){var M=this.stringifyProperty("namespace");return M===!0?"":M}else return""}}]),V}(Z.default);J.default=U,K.exports=J.default}),YK=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=Z(D4()),X=b0();function Z(W){return W&&W.__esModule?W:{default:W}}function Q(W,z){W.prototype=Object.create(z.prototype),W.prototype.constructor=W,H(W,z)}function H(W,z){return H=Object.setPrototypeOf||function(U,$){return U.__proto__=$,U},H(W,z)}var w=function(W){Q(z,W);function z(U){var $;return $=W.call(this,U)||this,$.type=X.TAG,$}return z}(Y.default);J.default=w,K.exports=J.default}),XK=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=Z(p8()),X=b0();function Z(W){return W&&W.__esModule?W:{default:W}}function Q(W,z){W.prototype=Object.create(z.prototype),W.prototype.constructor=W,H(W,z)}function H(W,z){return H=Object.setPrototypeOf||function(U,$){return U.__proto__=$,U},H(W,z)}var w=function(W){Q(z,W);function z(U){var $;return $=W.call(this,U)||this,$.type=X.STRING,$}return z}(Y.default);J.default=w,K.exports=J.default}),ZK=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=Z(_4()),X=b0();function Z(W){return W&&W.__esModule?W:{default:W}}function Q(W,z){W.prototype=Object.create(z.prototype),W.prototype.constructor=W,H(W,z)}function H(W,z){return H=Object.setPrototypeOf||function(U,$){return U.__proto__=$,U},H(W,z)}var w=function(W){Q(z,W);function z($){var V;return V=W.call(this,$)||this,V.type=X.PSEUDO,V}var U=z.prototype;return U.toString=function(){var $=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),$,this.rawSpaceAfter].join("")},z}(Y.default);J.default=w,K.exports=J.default}),Mz=a((J,K)=>{K.exports=function(Y,X){return function(...Z){return console.warn(X),Y(...Z)}}}),QK=a((J)=>{J.__esModule=!0,J.unescapeValue=G,J.default=void 0;var K=H(R4()),Y=H(s1()),X=H(D4()),Z=b0(),Q;function H(E){return E&&E.__esModule?E:{default:E}}function w(E,j){for(var T=0;T<j.length;T++){var R=j[T];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(E,R.key,R)}}function W(E,j,T){return j&&w(E.prototype,j),T&&w(E,T),E}function z(E,j){E.prototype=Object.create(j.prototype),E.prototype.constructor=E,U(E,j)}function U(E,j){return U=Object.setPrototypeOf||function(T,R){return T.__proto__=R,T},U(E,j)}var $=Mz(),V=/^('|")([^]*)\1$/,B=$(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),M=$(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),q=$(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function G(E){var j=!1,T=null,R=E,S=R.match(V);return S&&(T=S[1],R=S[2]),R=Y.default(R),R!==E&&(j=!0),{deprecatedUsage:j,unescaped:R,quoteMark:T}}function N(E){if(E.quoteMark!==void 0||E.value===void 0)return E;q();var j=G(E.value),T=j.quoteMark,R=j.unescaped;return E.raws||(E.raws={}),E.raws.value===void 0&&(E.raws.value=E.value),E.value=R,E.quoteMark=T,E}var L=function(E){z(j,E);function j(R){var S;return R===void 0&&(R={}),S=E.call(this,N(R))||this,S.type=Z.ATTRIBUTE,S.raws=S.raws||{},Object.defineProperty(S.raws,"unquoted",{get:$(function(){return S.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:$(function(){return S.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),S._constructed=!0,S}var T=j.prototype;return T.getQuotedValue=function(R){R===void 0&&(R={});var S=this._determineQuoteMark(R),x=_[S],c=K.default(this._value,x);return c},T._determineQuoteMark=function(R){return R.smart?this.smartQuoteMark(R):this.preferredQuoteMark(R)},T.setValue=function(R,S){S===void 0&&(S={}),this._value=R,this._quoteMark=this._determineQuoteMark(S),this._syncRawValue()},T.smartQuoteMark=function(R){var S=this.value,x=S.replace(/[^']/g,"").length,c=S.replace(/[^"]/g,"").length;if(x+c===0){var o=K.default(S,{isIdentifier:!0});if(o===S)return j.NO_QUOTE;var u=this.preferredQuoteMark(R);if(u===j.NO_QUOTE){var C=this.quoteMark||R.quoteMark||j.DOUBLE_QUOTE,P=_[C],I=K.default(S,P);if(I.length<o.length)return C}return u}else return c===x?this.preferredQuoteMark(R):c<x?j.DOUBLE_QUOTE:j.SINGLE_QUOTE},T.preferredQuoteMark=function(R){var S=R.preferCurrentQuoteMark?this.quoteMark:R.quoteMark;return S===void 0&&(S=R.preferCurrentQuoteMark?R.quoteMark:this.quoteMark),S===void 0&&(S=j.DOUBLE_QUOTE),S},T._syncRawValue=function(){var R=K.default(this._value,_[this.quoteMark]);R===this._value?this.raws&&delete this.raws.value:this.raws.value=R},T._handleEscapes=function(R,S){if(this._constructed){var x=K.default(S,{isIdentifier:!0});x!==S?this.raws[R]=x:delete this.raws[R]}},T._spacesFor=function(R){var S={before:"",after:""},x=this.spaces[R]||{},c=this.raws.spaces&&this.raws.spaces[R]||{};return Object.assign(S,x,c)},T._stringFor=function(R,S,x){S===void 0&&(S=R),x===void 0&&(x=D);var c=this._spacesFor(S);return x(this.stringifyProperty(R),c)},T.offsetOf=function(R){var S=1,x=this._spacesFor("attribute");if(S+=x.before.length,R==="namespace"||R==="ns")return this.namespace?S:-1;if(R==="attributeNS"||(S+=this.namespaceString.length,this.namespace&&(S+=1),R==="attribute"))return S;S+=this.stringifyProperty("attribute").length,S+=x.after.length;var c=this._spacesFor("operator");S+=c.before.length;var o=this.stringifyProperty("operator");if(R==="operator")return o?S:-1;S+=o.length,S+=c.after.length;var u=this._spacesFor("value");S+=u.before.length;var C=this.stringifyProperty("value");if(R==="value")return C?S:-1;S+=C.length,S+=u.after.length;var P=this._spacesFor("insensitive");return S+=P.before.length,R==="insensitive"&&this.insensitive?S:-1},T.toString=function(){var R=this,S=[this.rawSpaceBefore,"["];return S.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||this.value==="")&&(S.push(this._stringFor("operator")),S.push(this._stringFor("value")),S.push(this._stringFor("insensitiveFlag","insensitive",function(x,c){return x.length>0&&!R.quoted&&c.before.length===0&&!(R.spaces.value&&R.spaces.value.after)&&(c.before=" "),D(x,c)}))),S.push("]"),S.push(this.rawSpaceAfter),S.join("")},W(j,[{key:"quoted",get:function(){var R=this.quoteMark;return R==="'"||R==='"'},set:function(R){M()}},{key:"quoteMark",get:function(){return this._quoteMark},set:function(R){if(!this._constructed){this._quoteMark=R;return}this._quoteMark!==R&&(this._quoteMark=R,this._syncRawValue())}},{key:"qualifiedAttribute",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function(){return this.insensitive?"i":""}},{key:"value",get:function(){return this._value},set:function(R){if(this._constructed){var S=G(R),x=S.deprecatedUsage,c=S.unescaped,o=S.quoteMark;if(x&&B(),c===this._value&&o===this._quoteMark)return;this._value=c,this._quoteMark=o,this._syncRawValue()}else this._value=R}},{key:"attribute",get:function(){return this._attribute},set:function(R){this._handleEscapes("attribute",R),this._attribute=R}}]),j}(X.default);J.default=L,L.NO_QUOTE=null,L.SINGLE_QUOTE="'",L.DOUBLE_QUOTE='"';var _=(Q={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}},Q[null]={isIdentifier:!0},Q);function D(E,j){return""+j.before+E+j.after}}),HK=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=Z(D4()),X=b0();function Z(W){return W&&W.__esModule?W:{default:W}}function Q(W,z){W.prototype=Object.create(z.prototype),W.prototype.constructor=W,H(W,z)}function H(W,z){return H=Object.setPrototypeOf||function(U,$){return U.__proto__=$,U},H(W,z)}var w=function(W){Q(z,W);function z(U){var $;return $=W.call(this,U)||this,$.type=X.UNIVERSAL,$.value="*",$}return z}(Y.default);J.default=w,K.exports=J.default}),WK=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=Z(p8()),X=b0();function Z(W){return W&&W.__esModule?W:{default:W}}function Q(W,z){W.prototype=Object.create(z.prototype),W.prototype.constructor=W,H(W,z)}function H(W,z){return H=Object.setPrototypeOf||function(U,$){return U.__proto__=$,U},H(W,z)}var w=function(W){Q(z,W);function z(U){var $;return $=W.call(this,U)||this,$.type=X.COMBINATOR,$}return z}(Y.default);J.default=w,K.exports=J.default}),wK=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=Z(p8()),X=b0();function Z(W){return W&&W.__esModule?W:{default:W}}function Q(W,z){W.prototype=Object.create(z.prototype),W.prototype.constructor=W,H(W,z)}function H(W,z){return H=Object.setPrototypeOf||function(U,$){return U.__proto__=$,U},H(W,z)}var w=function(W){Q(z,W);function z(U){var $;return $=W.call(this,U)||this,$.type=X.NESTING,$.value="&",$}return z}(Y.default);J.default=w,K.exports=J.default}),Oz=a((J,K)=>{J.__esModule=!0,J.default=Y;function Y(X){return X.sort(function(Z,Q){return Z-Q})}K.exports=J.default}),zK=a((J)=>{J.__esModule=!0,J.combinator=J.word=J.comment=J.str=J.tab=J.newline=J.feed=J.cr=J.backslash=J.bang=J.slash=J.doubleQuote=J.singleQuote=J.space=J.greaterThan=J.pipe=J.equals=J.plus=J.caret=J.tilde=J.dollar=J.closeSquare=J.openSquare=J.closeParenthesis=J.openParenthesis=J.semicolon=J.colon=J.comma=J.at=J.asterisk=J.ampersand=void 0;var K=38;J.ampersand=K;var Y=42;J.asterisk=Y;var X=64;J.at=X;var Z=44;J.comma=Z;var Q=58;J.colon=Q;var H=59;J.semicolon=H;var w=40;J.openParenthesis=w;var W=41;J.closeParenthesis=W;var z=91;J.openSquare=z;var U=93;J.closeSquare=U;var $=36;J.dollar=$;var V=126;J.tilde=V;var B=94;J.caret=B;var M=43;J.plus=M;var q=61;J.equals=q;var G=124;J.pipe=G;var N=62;J.greaterThan=N;var L=32;J.space=L;var _=39;J.singleQuote=_;var D=34;J.doubleQuote=D;var E=47;J.slash=E;var j=33;J.bang=j;var T=92;J.backslash=T;var R=13;J.cr=R;var S=12;J.feed=S;var x=10;J.newline=x;var c=9;J.tab=c;var o=_;J.str=o;var u=-1;J.comment=u;var C=-2;J.word=C;var P=-3;J.combinator=P}),Nz=a((J)=>{J.__esModule=!0,J.default=M,J.FIELDS=void 0;var K=Q(zK()),Y,X;function Z(){if(typeof WeakMap!="function")return null;var q=new WeakMap;return Z=function(){return q},q}function Q(q){if(q&&q.__esModule)return q;if(q===null||typeof q!="object"&&typeof q!="function")return{default:q};var G=Z();if(G&&G.has(q))return G.get(q);var N={},L=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in q)if(Object.prototype.hasOwnProperty.call(q,_)){var D=L?Object.getOwnPropertyDescriptor(q,_):null;D&&(D.get||D.set)?Object.defineProperty(N,_,D):N[_]=q[_]}return N.default=q,G&&G.set(q,N),N}var H=(Y={},Y[K.tab]=!0,Y[K.newline]=!0,Y[K.cr]=!0,Y[K.feed]=!0,Y),w=(X={},X[K.space]=!0,X[K.tab]=!0,X[K.newline]=!0,X[K.cr]=!0,X[K.feed]=!0,X[K.ampersand]=!0,X[K.asterisk]=!0,X[K.bang]=!0,X[K.comma]=!0,X[K.colon]=!0,X[K.semicolon]=!0,X[K.openParenthesis]=!0,X[K.closeParenthesis]=!0,X[K.openSquare]=!0,X[K.closeSquare]=!0,X[K.singleQuote]=!0,X[K.doubleQuote]=!0,X[K.plus]=!0,X[K.pipe]=!0,X[K.tilde]=!0,X[K.greaterThan]=!0,X[K.equals]=!0,X[K.dollar]=!0,X[K.caret]=!0,X[K.slash]=!0,X),W={},z="0123456789abcdefABCDEF";for(U=0;U<z.length;U++)W[z.charCodeAt(U)]=!0;var U;function $(q,G){var N=G,L;do{if(L=q.charCodeAt(N),w[L])return N-1;L===K.backslash?N=V(q,N)+1:N++}while(N<q.length);return N-1}function V(q,G){var N=G,L=q.charCodeAt(N+1);if(!H[L])if(W[L]){var _=0;do N++,_++,L=q.charCodeAt(N+1);while(W[L]&&_<6);_<6&&L===K.space&&N++}else N++;return N}var B={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6};J.FIELDS=B;function M(q){var G=[],N=q.css.valueOf(),L=N,_=L.length,D=-1,E=1,j=0,T=0,R,S,x,c,o,u,C,P,I,f,l,t,s;function m(d,y){if(q.safe)N+=y,I=N.length-1;else throw q.error("Unclosed "+d,E,j-D,j)}for(;j<_;){switch(R=N.charCodeAt(j),R===K.newline&&(D=j,E+=1),R){case K.space:case K.tab:case K.newline:case K.cr:case K.feed:I=j;do I+=1,R=N.charCodeAt(I),R===K.newline&&(D=I,E+=1);while(R===K.space||R===K.newline||R===K.tab||R===K.cr||R===K.feed);s=K.space,c=E,x=I-D-1,T=I;break;case K.plus:case K.greaterThan:case K.tilde:case K.pipe:I=j;do I+=1,R=N.charCodeAt(I);while(R===K.plus||R===K.greaterThan||R===K.tilde||R===K.pipe);s=K.combinator,c=E,x=j-D,T=I;break;case K.asterisk:case K.ampersand:case K.bang:case K.comma:case K.equals:case K.dollar:case K.caret:case K.openSquare:case K.closeSquare:case K.colon:case K.semicolon:case K.openParenthesis:case K.closeParenthesis:I=j,s=R,c=E,x=j-D,T=I+1;break;case K.singleQuote:case K.doubleQuote:t=R===K.singleQuote?"'":'"',I=j;do for(o=!1,I=N.indexOf(t,I+1),I===-1&&m("quote",t),u=I;N.charCodeAt(u-1)===K.backslash;)u-=1,o=!o;while(o);s=K.str,c=E,x=j-D,T=I+1;break;default:R===K.slash&&N.charCodeAt(j+1)===K.asterisk?(I=N.indexOf("*/",j+2)+1,I===0&&m("comment","*/"),S=N.slice(j,I+1),P=S.split(`
|
|
63
|
+
`),C=P.length-1,C>0?(f=E+C,l=I-P[C].length):(f=E,l=D),s=K.comment,E=f,c=f,x=I-l):R===K.slash?(I=j,s=R,c=E,x=j-D,T=I+1):(I=$(N,j),s=K.word,c=E,x=I-D),T=I+1;break}G.push([s,E,j-D,c,x,j,T]),l&&(D=l,l=null),j=T}return G}}),Lz=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=T(a1()),X=T(t1()),Z=T(e1()),Q=T(JK()),H=T(KK()),w=T(YK()),W=T(XK()),z=T(ZK()),U=j(QK()),$=T(HK()),V=T(WK()),B=T(wK()),M=T(Oz()),q=j(Nz()),G=j(zK()),N=j(b0()),L=m9(),_,D;function E(){if(typeof WeakMap!="function")return null;var m=new WeakMap;return E=function(){return m},m}function j(m){if(m&&m.__esModule)return m;if(m===null||typeof m!="object"&&typeof m!="function")return{default:m};var d=E();if(d&&d.has(m))return d.get(m);var y={},k=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in m)if(Object.prototype.hasOwnProperty.call(m,r)){var g=k?Object.getOwnPropertyDescriptor(m,r):null;g&&(g.get||g.set)?Object.defineProperty(y,r,g):y[r]=m[r]}return y.default=m,d&&d.set(m,y),y}function T(m){return m&&m.__esModule?m:{default:m}}function R(m,d){for(var y=0;y<d.length;y++){var k=d[y];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(m,k.key,k)}}function S(m,d,y){return d&&R(m.prototype,d),y&&R(m,y),m}var x=(_={},_[G.space]=!0,_[G.cr]=!0,_[G.feed]=!0,_[G.newline]=!0,_[G.tab]=!0,_),c=Object.assign({},x,(D={},D[G.comment]=!0,D));function o(m){return{line:m[q.FIELDS.START_LINE],column:m[q.FIELDS.START_COL]}}function u(m){return{line:m[q.FIELDS.END_LINE],column:m[q.FIELDS.END_COL]}}function C(m,d,y,k){return{start:{line:m,column:d},end:{line:y,column:k}}}function P(m){return C(m[q.FIELDS.START_LINE],m[q.FIELDS.START_COL],m[q.FIELDS.END_LINE],m[q.FIELDS.END_COL])}function I(m,d){if(m)return C(m[q.FIELDS.START_LINE],m[q.FIELDS.START_COL],d[q.FIELDS.END_LINE],d[q.FIELDS.END_COL])}function f(m,d){var y=m[d];if(typeof y=="string")return y.indexOf("\\")!==-1&&(L.ensureObject(m,"raws"),m[d]=L.unesc(y),m.raws[d]===void 0&&(m.raws[d]=y)),m}function l(m,d){for(var y=-1,k=[];(y=m.indexOf(d,y+1))!==-1;)k.push(y);return k}function t(){var m=Array.prototype.concat.apply([],arguments);return m.filter(function(d,y){return y===m.indexOf(d)})}var s=function(){function m(y,k){k===void 0&&(k={}),this.rule=y,this.options=Object.assign({lossy:!1,safe:!1},k),this.position=0,this.css=typeof this.rule=="string"?this.rule:this.rule.selector,this.tokens=q.default({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var r=I(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new Y.default({source:r}),this.root.errorGenerator=this._errorGenerator();var g=new X.default({source:{start:{line:1,column:1}}});this.root.append(g),this.current=g,this.loop()}var d=m.prototype;return d._errorGenerator=function(){var y=this;return function(k,r){return typeof y.rule=="string"?new Error(k):y.rule.error(k,r)}},d.attribute=function(){var y=[],k=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[q.FIELDS.TYPE]!==G.closeSquare;)y.push(this.currToken),this.position++;if(this.currToken[q.FIELDS.TYPE]!==G.closeSquare)return this.expected("closing square bracket",this.currToken[q.FIELDS.START_POS]);var r=y.length,g={source:C(k[1],k[2],this.currToken[3],this.currToken[4]),sourceIndex:k[q.FIELDS.START_POS]};if(r===1&&!~[G.word].indexOf(y[0][q.FIELDS.TYPE]))return this.expected("attribute",y[0][q.FIELDS.START_POS]);for(var e=0,Y0="",X0="",J0=null,V0=!1;e<r;){var E0=y[e],K0=this.content(E0),q0=y[e+1];switch(E0[q.FIELDS.TYPE]){case G.space:if(V0=!0,this.options.lossy)break;if(J0){L.ensureObject(g,"spaces",J0);var S0=g.spaces[J0].after||"";g.spaces[J0].after=S0+K0;var c0=L.getProp(g,"raws","spaces",J0,"after")||null;c0&&(g.raws.spaces[J0].after=c0+K0)}else Y0=Y0+K0,X0=X0+K0;break;case G.asterisk:if(q0[q.FIELDS.TYPE]===G.equals)g.operator=K0,J0="operator";else if((!g.namespace||J0==="namespace"&&!V0)&&q0){Y0&&(L.ensureObject(g,"spaces","attribute"),g.spaces.attribute.before=Y0,Y0=""),X0&&(L.ensureObject(g,"raws","spaces","attribute"),g.raws.spaces.attribute.before=Y0,X0=""),g.namespace=(g.namespace||"")+K0;var y0=L.getProp(g,"raws","namespace")||null;y0&&(g.raws.namespace+=K0),J0="namespace"}V0=!1;break;case G.dollar:if(J0==="value"){var I0=L.getProp(g,"raws","value");g.value+="$",I0&&(g.raws.value=I0+"$");break}case G.caret:q0[q.FIELDS.TYPE]===G.equals&&(g.operator=K0,J0="operator"),V0=!1;break;case G.combinator:if(K0==="~"&&q0[q.FIELDS.TYPE]===G.equals&&(g.operator=K0,J0="operator"),K0!=="|"){V0=!1;break}q0[q.FIELDS.TYPE]===G.equals?(g.operator=K0,J0="operator"):!g.namespace&&!g.attribute&&(g.namespace=!0),V0=!1;break;case G.word:if(q0&&this.content(q0)==="|"&&y[e+2]&&y[e+2][q.FIELDS.TYPE]!==G.equals&&!g.operator&&!g.namespace)g.namespace=K0,J0="namespace";else if(!g.attribute||J0==="attribute"&&!V0){Y0&&(L.ensureObject(g,"spaces","attribute"),g.spaces.attribute.before=Y0,Y0=""),X0&&(L.ensureObject(g,"raws","spaces","attribute"),g.raws.spaces.attribute.before=X0,X0=""),g.attribute=(g.attribute||"")+K0;var m0=L.getProp(g,"raws","attribute")||null;m0&&(g.raws.attribute+=K0),J0="attribute"}else if(!g.value&&g.value!==""||J0==="value"&&!V0){var u0=L.unesc(K0),p0=L.getProp(g,"raws","value")||"",Y8=g.value||"";g.value=Y8+u0,g.quoteMark=null,(u0!==K0||p0)&&(L.ensureObject(g,"raws"),g.raws.value=(p0||Y8)+K0),J0="value"}else{var X8=K0==="i"||K0==="I";(g.value||g.value==="")&&(g.quoteMark||V0)?(g.insensitive=X8,(!X8||K0==="I")&&(L.ensureObject(g,"raws"),g.raws.insensitiveFlag=K0),J0="insensitive",Y0&&(L.ensureObject(g,"spaces","insensitive"),g.spaces.insensitive.before=Y0,Y0=""),X0&&(L.ensureObject(g,"raws","spaces","insensitive"),g.raws.spaces.insensitive.before=X0,X0="")):(g.value||g.value==="")&&(J0="value",g.value+=K0,g.raws.value&&(g.raws.value+=K0))}V0=!1;break;case G.str:if(!g.attribute||!g.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:E0[q.FIELDS.START_POS]});var s0=U.unescapeValue(K0),X6=s0.unescaped,P8=s0.quoteMark;g.value=X6,g.quoteMark=P8,J0="value",L.ensureObject(g,"raws"),g.raws.value=K0,V0=!1;break;case G.equals:if(!g.attribute)return this.expected("attribute",E0[q.FIELDS.START_POS],K0);if(g.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:E0[q.FIELDS.START_POS]});g.operator=g.operator?g.operator+K0:K0,J0="operator",V0=!1;break;case G.comment:if(J0)if(V0||q0&&q0[q.FIELDS.TYPE]===G.space||J0==="insensitive"){var i8=L.getProp(g,"spaces",J0,"after")||"",Z6=L.getProp(g,"raws","spaces",J0,"after")||i8;L.ensureObject(g,"raws","spaces",J0),g.raws.spaces[J0].after=Z6+K0}else{var o6=g[J0]||"",Q6=L.getProp(g,"raws",J0)||o6;L.ensureObject(g,"raws"),g.raws[J0]=Q6+K0}else X0=X0+K0;break;default:return this.error('Unexpected "'+K0+'" found.',{index:E0[q.FIELDS.START_POS]})}e++}f(g,"attribute"),f(g,"namespace"),this.newNode(new U.default(g)),this.position++},d.parseWhitespaceEquivalentTokens=function(y){y<0&&(y=this.tokens.length);var k=this.position,r=[],g="",e=void 0;do if(x[this.currToken[q.FIELDS.TYPE]])this.options.lossy||(g+=this.content());else if(this.currToken[q.FIELDS.TYPE]===G.comment){var Y0={};g&&(Y0.before=g,g=""),e=new Q.default({value:this.content(),source:P(this.currToken),sourceIndex:this.currToken[q.FIELDS.START_POS],spaces:Y0}),r.push(e)}while(++this.position<y);if(g){if(e)e.spaces.after=g;else if(!this.options.lossy){var X0=this.tokens[k],J0=this.tokens[this.position-1];r.push(new W.default({value:"",source:C(X0[q.FIELDS.START_LINE],X0[q.FIELDS.START_COL],J0[q.FIELDS.END_LINE],J0[q.FIELDS.END_COL]),sourceIndex:X0[q.FIELDS.START_POS],spaces:{before:g,after:""}}))}}return r},d.convertWhitespaceNodesToSpace=function(y,k){var r=this;k===void 0&&(k=!1);var g="",e="";y.forEach(function(X0){var J0=r.lossySpace(X0.spaces.before,k),V0=r.lossySpace(X0.rawSpaceBefore,k);g+=J0+r.lossySpace(X0.spaces.after,k&&J0.length===0),e+=J0+X0.value+r.lossySpace(X0.rawSpaceAfter,k&&V0.length===0)}),e===g&&(e=void 0);var Y0={space:g,rawSpace:e};return Y0},d.isNamedCombinator=function(y){return y===void 0&&(y=this.position),this.tokens[y+0]&&this.tokens[y+0][q.FIELDS.TYPE]===G.slash&&this.tokens[y+1]&&this.tokens[y+1][q.FIELDS.TYPE]===G.word&&this.tokens[y+2]&&this.tokens[y+2][q.FIELDS.TYPE]===G.slash},d.namedCombinator=function(){if(this.isNamedCombinator()){var y=this.content(this.tokens[this.position+1]),k=L.unesc(y).toLowerCase(),r={};k!==y&&(r.value="/"+y+"/");var g=new V.default({value:"/"+k+"/",source:C(this.currToken[q.FIELDS.START_LINE],this.currToken[q.FIELDS.START_COL],this.tokens[this.position+2][q.FIELDS.END_LINE],this.tokens[this.position+2][q.FIELDS.END_COL]),sourceIndex:this.currToken[q.FIELDS.START_POS],raws:r});return this.position=this.position+3,g}else this.unexpected()},d.combinator=function(){var y=this;if(this.content()==="|")return this.namespace();var k=this.locateNextMeaningfulToken(this.position);if(k<0||this.tokens[k][q.FIELDS.TYPE]===G.comma){var r=this.parseWhitespaceEquivalentTokens(k);if(r.length>0){var g=this.current.last;if(g){var e=this.convertWhitespaceNodesToSpace(r),Y0=e.space,X0=e.rawSpace;X0!==void 0&&(g.rawSpaceAfter+=X0),g.spaces.after+=Y0}else r.forEach(function(p0){return y.newNode(p0)})}return}var J0=this.currToken,V0=void 0;k>this.position&&(V0=this.parseWhitespaceEquivalentTokens(k));var E0;if(this.isNamedCombinator()?E0=this.namedCombinator():this.currToken[q.FIELDS.TYPE]===G.combinator?(E0=new V.default({value:this.content(),source:P(this.currToken),sourceIndex:this.currToken[q.FIELDS.START_POS]}),this.position++):x[this.currToken[q.FIELDS.TYPE]]||V0||this.unexpected(),E0){if(V0){var K0=this.convertWhitespaceNodesToSpace(V0),q0=K0.space,S0=K0.rawSpace;E0.spaces.before=q0,E0.rawSpaceBefore=S0}}else{var c0=this.convertWhitespaceNodesToSpace(V0,!0),y0=c0.space,I0=c0.rawSpace;I0||(I0=y0);var m0={},u0={spaces:{}};y0.endsWith(" ")&&I0.endsWith(" ")?(m0.before=y0.slice(0,y0.length-1),u0.spaces.before=I0.slice(0,I0.length-1)):y0.startsWith(" ")&&I0.startsWith(" ")?(m0.after=y0.slice(1),u0.spaces.after=I0.slice(1)):u0.value=I0,E0=new V.default({value:" ",source:I(J0,this.tokens[this.position-1]),sourceIndex:J0[q.FIELDS.START_POS],spaces:m0,raws:u0})}return this.currToken&&this.currToken[q.FIELDS.TYPE]===G.space&&(E0.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(E0)},d.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var y=new X.default({source:{start:o(this.tokens[this.position+1])}});this.current.parent.append(y),this.current=y,this.position++},d.comment=function(){var y=this.currToken;this.newNode(new Q.default({value:this.content(),source:P(y),sourceIndex:y[q.FIELDS.START_POS]})),this.position++},d.error=function(y,k){throw this.root.error(y,k)},d.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[q.FIELDS.START_POS]})},d.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[q.FIELDS.START_POS])},d.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[q.FIELDS.START_POS])},d.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[q.FIELDS.START_POS])},d.namespace=function(){var y=this.prevToken&&this.content(this.prevToken)||!0;if(this.nextToken[q.FIELDS.TYPE]===G.word)return this.position++,this.word(y);if(this.nextToken[q.FIELDS.TYPE]===G.asterisk)return this.position++,this.universal(y)},d.nesting=function(){if(this.nextToken){var y=this.content(this.nextToken);if(y==="|"){this.position++;return}}var k=this.currToken;this.newNode(new B.default({value:this.content(),source:P(k),sourceIndex:k[q.FIELDS.START_POS]})),this.position++},d.parentheses=function(){var y=this.current.last,k=1;if(this.position++,y&&y.type===N.PSEUDO){var r=new X.default({source:{start:o(this.tokens[this.position-1])}}),g=this.current;for(y.append(r),this.current=r;this.position<this.tokens.length&&k;)this.currToken[q.FIELDS.TYPE]===G.openParenthesis&&k++,this.currToken[q.FIELDS.TYPE]===G.closeParenthesis&&k--,k?this.parse():(this.current.source.end=u(this.currToken),this.current.parent.source.end=u(this.currToken),this.position++);this.current=g}else{for(var e=this.currToken,Y0="(",X0;this.position<this.tokens.length&&k;)this.currToken[q.FIELDS.TYPE]===G.openParenthesis&&k++,this.currToken[q.FIELDS.TYPE]===G.closeParenthesis&&k--,X0=this.currToken,Y0+=this.parseParenthesisToken(this.currToken),this.position++;y?y.appendToPropertyAndEscape("value",Y0,Y0):this.newNode(new W.default({value:Y0,source:C(e[q.FIELDS.START_LINE],e[q.FIELDS.START_COL],X0[q.FIELDS.END_LINE],X0[q.FIELDS.END_COL]),sourceIndex:e[q.FIELDS.START_POS]}))}if(k)return this.expected("closing parenthesis",this.currToken[q.FIELDS.START_POS])},d.pseudo=function(){for(var y=this,k="",r=this.currToken;this.currToken&&this.currToken[q.FIELDS.TYPE]===G.colon;)k+=this.content(),this.position++;if(!this.currToken)return this.expected(["pseudo-class","pseudo-element"],this.position-1);if(this.currToken[q.FIELDS.TYPE]===G.word)this.splitWord(!1,function(g,e){k+=g,y.newNode(new z.default({value:k,source:I(r,y.currToken),sourceIndex:r[q.FIELDS.START_POS]})),e>1&&y.nextToken&&y.nextToken[q.FIELDS.TYPE]===G.openParenthesis&&y.error("Misplaced parenthesis.",{index:y.nextToken[q.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[q.FIELDS.START_POS])},d.space=function(){var y=this.content();this.position===0||this.prevToken[q.FIELDS.TYPE]===G.comma||this.prevToken[q.FIELDS.TYPE]===G.openParenthesis||this.current.nodes.every(function(k){return k.type==="comment"})?(this.spaces=this.optionalSpace(y),this.position++):this.position===this.tokens.length-1||this.nextToken[q.FIELDS.TYPE]===G.comma||this.nextToken[q.FIELDS.TYPE]===G.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(y),this.position++):this.combinator()},d.string=function(){var y=this.currToken;this.newNode(new W.default({value:this.content(),source:P(y),sourceIndex:y[q.FIELDS.START_POS]})),this.position++},d.universal=function(y){var k=this.nextToken;if(k&&this.content(k)==="|")return this.position++,this.namespace();var r=this.currToken;this.newNode(new $.default({value:this.content(),source:P(r),sourceIndex:r[q.FIELDS.START_POS]}),y),this.position++},d.splitWord=function(y,k){for(var r=this,g=this.nextToken,e=this.content();g&&~[G.dollar,G.caret,G.equals,G.word].indexOf(g[q.FIELDS.TYPE]);){this.position++;var Y0=this.content();if(e+=Y0,Y0.lastIndexOf("\\")===Y0.length-1){var X0=this.nextToken;X0&&X0[q.FIELDS.TYPE]===G.space&&(e+=this.requiredSpace(this.content(X0)),this.position++)}g=this.nextToken}var J0=l(e,".").filter(function(q0){var S0=e[q0-1]==="\\",c0=/^\d+\.\d+%$/.test(e);return!S0&&!c0}),V0=l(e,"#").filter(function(q0){return e[q0-1]!=="\\"}),E0=l(e,"#{");E0.length&&(V0=V0.filter(function(q0){return!~E0.indexOf(q0)}));var K0=M.default(t([0].concat(J0,V0)));K0.forEach(function(q0,S0){var c0=K0[S0+1]||e.length,y0=e.slice(q0,c0);if(S0===0&&k)return k.call(r,y0,K0.length);var I0,m0=r.currToken,u0=m0[q.FIELDS.START_POS]+K0[S0],p0=C(m0[1],m0[2]+q0,m0[3],m0[2]+(c0-1));if(~J0.indexOf(q0)){var Y8={value:y0.slice(1),source:p0,sourceIndex:u0};I0=new Z.default(f(Y8,"value"))}else if(~V0.indexOf(q0)){var X8={value:y0.slice(1),source:p0,sourceIndex:u0};I0=new H.default(f(X8,"value"))}else{var s0={value:y0,source:p0,sourceIndex:u0};f(s0,"value"),I0=new w.default(s0)}r.newNode(I0,y),y=null}),this.position++},d.word=function(y){var k=this.nextToken;return k&&this.content(k)==="|"?(this.position++,this.namespace()):this.splitWord(y)},d.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},d.parse=function(y){switch(this.currToken[q.FIELDS.TYPE]){case G.space:this.space();break;case G.comment:this.comment();break;case G.openParenthesis:this.parentheses();break;case G.closeParenthesis:y&&this.missingParenthesis();break;case G.openSquare:this.attribute();break;case G.dollar:case G.caret:case G.equals:case G.word:this.word();break;case G.colon:this.pseudo();break;case G.comma:this.comma();break;case G.asterisk:this.universal();break;case G.ampersand:this.nesting();break;case G.slash:case G.combinator:this.combinator();break;case G.str:this.string();break;case G.closeSquare:this.missingSquareBracket();case G.semicolon:this.missingBackslash();default:this.unexpected()}},d.expected=function(y,k,r){if(Array.isArray(y)){var g=y.pop();y=y.join(", ")+" or "+g}var e=/^[aeiou]/.test(y[0])?"an":"a";return r?this.error("Expected "+e+" "+y+', found "'+r+'" instead.',{index:k}):this.error("Expected "+e+" "+y+".",{index:k})},d.requiredSpace=function(y){return this.options.lossy?" ":y},d.optionalSpace=function(y){return this.options.lossy?"":y},d.lossySpace=function(y,k){return this.options.lossy?k?" ":"":y},d.parseParenthesisToken=function(y){var k=this.content(y);return y[q.FIELDS.TYPE]===G.space?this.requiredSpace(k):k},d.newNode=function(y,k){return k&&(/^ +$/.test(k)&&(this.options.lossy||(this.spaces=(this.spaces||"")+k),k=!0),y.namespace=k,f(y,"namespace")),this.spaces&&(y.spaces.before=this.spaces,this.spaces=""),this.current.append(y)},d.content=function(y){return y===void 0&&(y=this.currToken),this.css.slice(y[q.FIELDS.START_POS],y[q.FIELDS.END_POS])},d.locateNextMeaningfulToken=function(y){y===void 0&&(y=this.position+1);for(var k=y;k<this.tokens.length;)if(c[this.tokens[k][q.FIELDS.TYPE]]){k++;continue}else return k;return-1},S(m,[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}]),m}();J.default=s,K.exports=J.default}),jz=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=X(Lz());function X(Q){return Q&&Q.__esModule?Q:{default:Q}}var Z=function(){function Q(w,W){this.func=w||function(){},this.funcRes=null,this.options=W}var H=Q.prototype;return H._shouldUpdateSelector=function(w,W){W===void 0&&(W={});var z=Object.assign({},this.options,W);return z.updateSelector===!1?!1:typeof w!="string"},H._isLossy=function(w){w===void 0&&(w={});var W=Object.assign({},this.options,w);return W.lossless===!1},H._root=function(w,W){W===void 0&&(W={});var z=new Y.default(w,this._parseOptions(W));return z.root},H._parseOptions=function(w){return{lossy:this._isLossy(w)}},H._run=function(w,W){var z=this;return W===void 0&&(W={}),new Promise(function(U,$){try{var V=z._root(w,W);Promise.resolve(z.func(V)).then(function(B){var M=void 0;return z._shouldUpdateSelector(w,W)&&(M=V.toString(),w.selector=M),{transform:B,root:V,string:M}}).then(U,$)}catch(B){$(B);return}})},H._runSync=function(w,W){W===void 0&&(W={});var z=this._root(w,W),U=this.func(z);if(U&&typeof U.then=="function")throw new Error("Selector processor returned a promise to a synchronous call.");var $=void 0;return W.updateSelector&&typeof w!="string"&&($=z.toString(),w.selector=$),{transform:U,root:z,string:$}},H.ast=function(w,W){return this._run(w,W).then(function(z){return z.root})},H.astSync=function(w,W){return this._runSync(w,W).root},H.transform=function(w,W){return this._run(w,W).then(function(z){return z.transform})},H.transformSync=function(w,W){return this._runSync(w,W).transform},H.process=function(w,W){return this._run(w,W).then(function(z){return z.string||z.root.toString()})},H.processSync=function(w,W){var z=this._runSync(w,W);return z.string||z.root.toString()},Q}();J.default=Z,K.exports=J.default}),Fz=a((J)=>{J.__esModule=!0,J.universal=J.tag=J.string=J.selector=J.root=J.pseudo=J.nesting=J.id=J.comment=J.combinator=J.className=J.attribute=void 0;var K=B(QK()),Y=B(e1()),X=B(WK()),Z=B(JK()),Q=B(KK()),H=B(wK()),w=B(ZK()),W=B(a1()),z=B(t1()),U=B(XK()),$=B(YK()),V=B(HK());function B(x){return x&&x.__esModule?x:{default:x}}var M=function(x){return new K.default(x)};J.attribute=M;var q=function(x){return new Y.default(x)};J.className=q;var G=function(x){return new X.default(x)};J.combinator=G;var N=function(x){return new Z.default(x)};J.comment=N;var L=function(x){return new Q.default(x)};J.id=L;var _=function(x){return new H.default(x)};J.nesting=_;var D=function(x){return new w.default(x)};J.pseudo=D;var E=function(x){return new W.default(x)};J.root=E;var j=function(x){return new z.default(x)};J.selector=j;var T=function(x){return new U.default(x)};J.string=T;var R=function(x){return new $.default(x)};J.tag=R;var S=function(x){return new V.default(x)};J.universal=S}),Ez=a((J)=>{J.__esModule=!0,J.isNode=Z,J.isPseudoElement=L,J.isPseudoClass=_,J.isContainer=D,J.isNamespace=E,J.isUniversal=J.isTag=J.isString=J.isSelector=J.isRoot=J.isPseudo=J.isNesting=J.isIdentifier=J.isComment=J.isCombinator=J.isClassName=J.isAttribute=void 0;var K=b0(),Y,X=(Y={},Y[K.ATTRIBUTE]=!0,Y[K.CLASS]=!0,Y[K.COMBINATOR]=!0,Y[K.COMMENT]=!0,Y[K.ID]=!0,Y[K.NESTING]=!0,Y[K.PSEUDO]=!0,Y[K.ROOT]=!0,Y[K.SELECTOR]=!0,Y[K.STRING]=!0,Y[K.TAG]=!0,Y[K.UNIVERSAL]=!0,Y);function Z(j){return typeof j=="object"&&X[j.type]}function Q(j,T){return Z(T)&&T.type===j}var H=Q.bind(null,K.ATTRIBUTE);J.isAttribute=H;var w=Q.bind(null,K.CLASS);J.isClassName=w;var W=Q.bind(null,K.COMBINATOR);J.isCombinator=W;var z=Q.bind(null,K.COMMENT);J.isComment=z;var U=Q.bind(null,K.ID);J.isIdentifier=U;var $=Q.bind(null,K.NESTING);J.isNesting=$;var V=Q.bind(null,K.PSEUDO);J.isPseudo=V;var B=Q.bind(null,K.ROOT);J.isRoot=B;var M=Q.bind(null,K.SELECTOR);J.isSelector=M;var q=Q.bind(null,K.STRING);J.isString=q;var G=Q.bind(null,K.TAG);J.isTag=G;var N=Q.bind(null,K.UNIVERSAL);J.isUniversal=N;function L(j){return V(j)&&j.value&&(j.value.startsWith("::")||j.value.toLowerCase()===":before"||j.value.toLowerCase()===":after"||j.value.toLowerCase()===":first-letter"||j.value.toLowerCase()===":first-line")}function _(j){return V(j)&&!L(j)}function D(j){return!!(Z(j)&&j.walk)}function E(j){return H(j)||G(j)}}),_z=a((J)=>{J.__esModule=!0;var K=b0();Object.keys(K).forEach(function(Z){Z==="default"||Z==="__esModule"||Z in J&&J[Z]===K[Z]||(J[Z]=K[Z])});var Y=Fz();Object.keys(Y).forEach(function(Z){Z==="default"||Z==="__esModule"||Z in J&&J[Z]===Y[Z]||(J[Z]=Y[Z])});var X=Ez();Object.keys(X).forEach(function(Z){Z==="default"||Z==="__esModule"||Z in J&&J[Z]===X[Z]||(J[Z]=X[Z])})}),Rz=a((J,K)=>{J.__esModule=!0,J.default=void 0;var Y=H(jz()),X=Q(_z());function Z(){if(typeof WeakMap!="function")return null;var z=new WeakMap;return Z=function(){return z},z}function Q(z){if(z&&z.__esModule)return z;if(z===null||typeof z!="object"&&typeof z!="function")return{default:z};var U=Z();if(U&&U.has(z))return U.get(z);var $={},V=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var B in z)if(Object.prototype.hasOwnProperty.call(z,B)){var M=V?Object.getOwnPropertyDescriptor(z,B):null;M&&(M.get||M.set)?Object.defineProperty($,B,M):$[B]=z[B]}return $.default=z,U&&U.set(z,$),$}function H(z){return z&&z.__esModule?z:{default:z}}var w=function(z){return new Y.default(z)};Object.assign(w,X),delete w.__esModule;var W=w;J.default=W,K.exports=J.default}),Dz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0}),Object.defineProperty(J,"default",{enumerable:!0,get:()=>K});function K(Y){return Y.replace(/\\,/g,"\\2c ")}}),Iz=a((J,K)=>{K.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}),UK=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0});function K(M,q){for(var G in q)Object.defineProperty(M,G,{enumerable:!0,get:q[G]})}K(J,{parseColor:()=>V,formatColor:()=>B});var Y=X(Iz());function X(M){return M&&M.__esModule?M:{default:M}}var Z=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,Q=/^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,H=/(?:\d+|\d*\.\d+)%?/,w=/(?:\s*,\s*|\s+)/,W=/\s*[,/]\s*/,z=/var\(--(?:[^ )]*?)\)/,U=new RegExp(`^(rgb)a?\\(\\s*(${H.source}|${z.source})(?:${w.source}(${H.source}|${z.source}))?(?:${w.source}(${H.source}|${z.source}))?(?:${W.source}(${H.source}|${z.source}))?\\s*\\)$`),$=new RegExp(`^(hsl)a?\\(\\s*((?:${H.source})(?:deg|rad|grad|turn)?|${z.source})(?:${w.source}(${H.source}|${z.source}))?(?:${w.source}(${H.source}|${z.source}))?(?:${W.source}(${H.source}|${z.source}))?\\s*\\)$`);function V(M,{loose:q=!1}={}){var G,N;if(typeof M!="string")return null;if(M=M.trim(),M==="transparent")return{mode:"rgb",color:["0","0","0"],alpha:"0"};if(M in Y.default)return{mode:"rgb",color:Y.default[M].map((j)=>j.toString())};let L=M.replace(Q,(j,T,R,S,x)=>["#",T,T,R,R,S,S,x?x+x:""].join("")).match(Z);if(L!==null)return{mode:"rgb",color:[parseInt(L[1],16),parseInt(L[2],16),parseInt(L[3],16)].map((j)=>j.toString()),alpha:L[4]?(parseInt(L[4],16)/255).toString():void 0};var _;let D=(_=M.match(U))!==null&&_!==void 0?_:M.match($);if(D===null)return null;let E=[D[2],D[3],D[4]].filter(Boolean).map((j)=>j.toString());return!q&&E.length!==3||E.length<3&&!E.some((j)=>/^var\(.*?\)$/.test(j))?null:{mode:D[1],color:E,alpha:(G=D[5])===null||G===void 0||(N=G.toString)===null||N===void 0?void 0:N.call(G)}}function B({mode:M,color:q,alpha:G}){let N=G!==void 0;return`${M}(${q.join(" ")}${N?` / ${G}`:""})`}}),$K=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0});function K(Q,H){for(var w in H)Object.defineProperty(Q,w,{enumerable:!0,get:H[w]})}K(J,{withAlphaValue:()=>X,default:()=>Z});var Y=UK();function X(Q,H,w){if(typeof Q=="function")return Q({opacityValue:H});let W=Y.parseColor(Q,{loose:!0});return W===null?w:Y.formatColor({...W,alpha:H})}function Z({color:Q,property:H,variable:w}){let W=[].concat(H);if(typeof Q=="function")return{[w]:"1",...Object.fromEntries(W.map((U)=>[U,Q({opacityVariable:w,opacityValue:`var(${w})`})]))};let z=Y.parseColor(Q);return z===null?Object.fromEntries(W.map((U)=>[U,Q])):z.alpha!==void 0?Object.fromEntries(W.map((U)=>[U,Q])):{[w]:"1",...Object.fromEntries(W.map((U)=>[U,Y.formatColor({...z,alpha:`var(${w})`})]))}}}),Tz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0});function K(V,B){for(var M in B)Object.defineProperty(V,M,{enumerable:!0,get:B[M]})}K(J,{pattern:()=>Q,withoutCapturing:()=>H,any:()=>w,optional:()=>W,zeroOrMore:()=>z,nestedBrackets:()=>U,escape:()=>$});var Y=/[\\^$.*+?()[\]{}|]/g,X=RegExp(Y.source);function Z(V){return V=Array.isArray(V)?V:[V],V=V.map((B)=>B instanceof RegExp?B.source:B),V.join("")}function Q(V){return new RegExp(Z(V),"g")}function H(V){return new RegExp(`(?:${Z(V)})`,"g")}function w(V){return`(?:${V.map(Z).join("|")})`}function W(V){return`(?:${Z(V)})?`}function z(V){return`(?:${Z(V)})*`}function U(V,B,M=1){return H([$(V),/[^\s]*/,M===1?`[^${$(V)}${$(B)}s]*`:w([`[^${$(V)}${$(B)}s]*`,U(V,B,M-1)]),/[^\s]*/,$(B)])}function $(V){return V&&X.test(V)?V.replace(Y,"\\$&"):V||""}}),Cz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0}),Object.defineProperty(J,"splitAtTopLevelOnly",{enumerable:!0,get:()=>Z});var K=X(Tz());function Y(Q){if(typeof WeakMap!="function")return null;var H=new WeakMap,w=new WeakMap;return(Y=function(W){return W?w:H})(Q)}function X(Q,H){if(!H&&Q&&Q.__esModule)return Q;if(Q===null||typeof Q!="object"&&typeof Q!="function")return{default:Q};var w=Y(H);if(w&&w.has(Q))return w.get(Q);var W={},z=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var U in Q)if(U!=="default"&&Object.prototype.hasOwnProperty.call(Q,U)){var $=z?Object.getOwnPropertyDescriptor(Q,U):null;$&&($.get||$.set)?Object.defineProperty(W,U,$):W[U]=Q[U]}return W.default=Q,w&&w.set(Q,W),W}function*Z(Q,H){let w=new RegExp(`[(){}\\[\\]${K.escape(H)}]`,"g"),W=0,z=0,U=!1,$=0,V=0,B=H.length;for(let M of Q.matchAll(w)){let q=M[0]===H[$],G=$===B-1,N=q&&G;M[0]==="("&&W++,M[0]===")"&&W--,M[0]==="["&&W++,M[0]==="]"&&W--,M[0]==="{"&&W++,M[0]==="}"&&W--,q&&W===0&&(V===0&&(V=M.index),$++),N&&W===0&&(U=!0,yield Q.substring(z,V),z=V+B),$===B&&($=0,V=0)}U?yield Q.substring(z):yield Q}}),Pz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0});function K(W,z){for(var U in z)Object.defineProperty(W,U,{enumerable:!0,get:z[U]})}K(J,{parseBoxShadowValue:()=>H,formatBoxShadowValue:()=>w});var Y=Cz(),X=new Set(["inset","inherit","initial","revert","unset"]),Z=/\ +(?![^(]*\))/g,Q=/^-?(\d+|\.\d+)(.*?)$/g;function H(W){return Array.from(Y.splitAtTopLevelOnly(W,",")).map((z)=>{let U=z.trim(),$={raw:U},V=U.split(Z),B=new Set;for(let M of V)Q.lastIndex=0,!B.has("KEYWORD")&&X.has(M)?($.keyword=M,B.add("KEYWORD")):Q.test(M)?B.has("X")?B.has("Y")?B.has("BLUR")?B.has("SPREAD")||($.spread=M,B.add("SPREAD")):($.blur=M,B.add("BLUR")):($.y=M,B.add("Y")):($.x=M,B.add("X")):$.color?($.unknown||($.unknown=[]),$.unknown.push(M)):$.color=M;return $.valid=$.x!==void 0&&$.y!==void 0,$})}function w(W){return W.map((z)=>z.valid?[z.keyword,z.x,z.y,z.blur,z.spread,z.color].filter(Boolean).join(" "):z.raw).join(", ")}}),Sz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0});function K(C,P){for(var I in P)Object.defineProperty(C,I,{enumerable:!0,get:P[I]})}K(J,{normalize:()=>w,url:()=>W,number:()=>z,percentage:()=>U,length:()=>B,lineWidth:()=>q,shadow:()=>G,color:()=>N,image:()=>L,gradient:()=>D,position:()=>j,familyName:()=>T,genericName:()=>S,absoluteSize:()=>c,relativeSize:()=>u});var Y=UK(),X=Pz(),Z=["min","max","clamp","calc"],Q=/,(?![^(]*\))/g,H=/_(?![^(]*\))/g;function w(C,P=!0){return C.includes("url(")?C.split(/(url\(.*?\))/g).filter(Boolean).map((I)=>/^url\(.*?\)$/.test(I)?I:w(I,!1)).join(""):(C=C.replace(/([^\\])_+/g,(I,f)=>f+" ".repeat(I.length-1)).replace(/^_/g," ").replace(/\\_/g,"_"),P&&(C=C.trim()),C=C.replace(/(calc|min|max|clamp)\(.+\)/g,(I)=>I.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 ")),C)}function W(C){return C.startsWith("url(")}function z(C){return!isNaN(Number(C))||Z.some((P)=>new RegExp(`^${P}\\(.+?`).test(C))}function U(C){return C.split(H).every((P)=>/%$/g.test(P)||Z.some((I)=>new RegExp(`^${I}\\(.+?%`).test(P)))}var $=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","vw","vh","vmin","vmax"],V=`(?:${$.join("|")})`;function B(C){return C.split(H).every((P)=>P==="0"||new RegExp(`${V}$`).test(P)||Z.some((I)=>new RegExp(`^${I}\\(.+?${V}`).test(P)))}var M=new Set(["thin","medium","thick"]);function q(C){return M.has(C)}function G(C){let P=X.parseBoxShadowValue(w(C));for(let I of P)if(!I.valid)return!1;return!0}function N(C){let P=0;return C.split(H).every((I)=>(I=w(I),I.startsWith("var(")?!0:Y.parseColor(I,{loose:!0})!==null?(P++,!0):!1))?P>0:!1}function L(C){let P=0;return C.split(Q).every((I)=>(I=w(I),I.startsWith("var(")?!0:W(I)||D(I)||["element(","image(","cross-fade(","image-set("].some((f)=>I.startsWith(f))?(P++,!0):!1))?P>0:!1}var _=new Set(["linear-gradient","radial-gradient","repeating-linear-gradient","repeating-radial-gradient","conic-gradient"]);function D(C){C=w(C);for(let P of _)if(C.startsWith(`${P}(`))return!0;return!1}var E=new Set(["center","top","right","bottom","left"]);function j(C){let P=0;return C.split(H).every((I)=>(I=w(I),I.startsWith("var(")?!0:E.has(I)||B(I)||U(I)?(P++,!0):!1))?P>0:!1}function T(C){let P=0;return C.split(Q).every((I)=>(I=w(I),I.startsWith("var(")?!0:I.includes(" ")&&!/(['"])([^"']+)\1/g.test(I)||/^\d/g.test(I)?!1:(P++,!0)))?P>0:!1}var R=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong"]);function S(C){return R.has(C)}var x=new Set(["xx-small","x-small","small","medium","large","x-large","x-large","xxx-large"]);function c(C){return x.has(C)}var o=new Set(["larger","smaller"]);function u(C){return o.has(C)}}),vz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0});function K(j,T){for(var R in T)Object.defineProperty(j,R,{enumerable:!0,get:T[R]})}K(J,{updateAllClasses:()=>W,asValue:()=>$,parseColorFormat:()=>M,asColor:()=>q,asLookupValue:()=>G,coerceValue:()=>E});var Y=w(Rz()),X=w(Dz()),Z=$K(),Q=Sz(),H=w(o1());function w(j){return j&&j.__esModule?j:{default:j}}function W(j,T){return Y.default((R)=>{R.walkClasses((S)=>{let x=T(S.value);S.value=x,S.raws&&S.raws.value&&(S.raws.value=X.default(S.raws.value))})}).processSync(j)}function z(j,T){if(!V(j))return;let R=j.slice(1,-1);if(T(R))return Q.normalize(R)}function U(j,T={},R){let S=T[j];if(S!==void 0)return H.default(S);if(V(j)){let x=z(j,R);return x===void 0?void 0:H.default(x)}}function $(j,T={},{validate:R=()=>!0}={}){var S;let x=(S=T.values)===null||S===void 0?void 0:S[j];return x!==void 0?x:T.supportsNegativeValues&&j.startsWith("-")?U(j.slice(1),T.values,R):z(j,R)}function V(j){return j.startsWith("[")&&j.endsWith("]")}function B(j){let T=j.lastIndexOf("/");return T===-1||T===j.length-1?[j]:[j.slice(0,T),j.slice(T+1)]}function M(j){if(typeof j=="string"&&j.includes("<alpha-value>")){let T=j;return({opacityValue:R=1})=>T.replace("<alpha-value>",R)}return j}function q(j,T={},{tailwindConfig:R={}}={}){var S;if(((S=T.values)===null||S===void 0?void 0:S[j])!==void 0){var x;return M((x=T.values)===null||x===void 0?void 0:x[j])}let[c,o]=B(j);if(o!==void 0){var u,C,P,I;let f=(I=(u=T.values)===null||u===void 0?void 0:u[c])!==null&&I!==void 0?I:V(c)?c.slice(1,-1):void 0;return f===void 0?void 0:(f=M(f),V(o)?Z.withAlphaValue(f,o.slice(1,-1)):((C=R.theme)===null||C===void 0||(P=C.opacity)===null||P===void 0?void 0:P[o])===void 0?void 0:Z.withAlphaValue(f,R.theme.opacity[o]))}return $(j,T,{validate:Q.color})}function G(j,T={}){var R;return(R=T.values)===null||R===void 0?void 0:R[j]}function N(j){return(T,R)=>$(T,R,{validate:j})}var L={any:$,color:q,url:N(Q.url),image:N(Q.image),length:N(Q.length),percentage:N(Q.percentage),position:N(Q.position),lookup:G,"generic-name":N(Q.genericName),"family-name":N(Q.familyName),number:N(Q.number),"line-width":N(Q.lineWidth),"absolute-size":N(Q.absoluteSize),"relative-size":N(Q.relativeSize),shadow:N(Q.shadow)},_=Object.keys(L);function D(j,T){let R=j.indexOf(T);return R===-1?[void 0,j]:[j.slice(0,R),j.slice(R+1)]}function E(j,T,R,S){if(V(T)){let x=T.slice(1,-1),[c,o]=D(x,":");if(!/^[\w-_]+$/g.test(c))o=x;else if(c!==void 0&&!_.includes(c))return[];if(o.length>0&&_.includes(c))return[$(`[${o}]`,R),c]}for(let x of[].concat(j)){let c=L[x](T,R,{tailwindConfig:S});if(c!==void 0)return[c,x]}return[]}}),yz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0}),Object.defineProperty(J,"default",{enumerable:!0,get:()=>K});function K(Y){return typeof Y=="function"?Y({}):Y}}),kz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0}),Object.defineProperty(J,"default",{enumerable:!0,get:()=>u});var K=M(o1()),Y=M(Hz()),X=M(Wz()),Z=M(r1()),Q=M(wz()),H=zz(),w=Uz(),W=$z(),z=M(Vz()),U=Bz(),$=vz(),V=$K(),B=M(yz());function M(C){return C&&C.__esModule?C:{default:C}}function q(C){return typeof C=="function"}function G(C){return typeof C=="object"&&C!==null}function N(C,...P){let I=P.pop();for(let f of P)for(let l in f){let t=I(C[l],f[l]);t===void 0?G(C[l])&&G(f[l])?C[l]=N(C[l],f[l],I):C[l]=f[l]:C[l]=t}return C}var L={colors:Q.default,negative(C){return Object.keys(C).filter((P)=>C[P]!=="0").reduce((P,I)=>{let f=K.default(C[I]);return f!==void 0&&(P[`-${I}`]=f),P},{})},breakpoints(C){return Object.keys(C).filter((P)=>typeof C[P]=="string").reduce((P,I)=>({...P,[`screen-${I}`]:C[I]}),{})}};function _(C,...P){return q(C)?C(...P):C}function D(C){return C.reduce((P,{extend:I})=>N(P,I,(f,l)=>f===void 0?[l]:Array.isArray(f)?[l,...f]:[l,f]),{})}function E(C){return{...C.reduce((P,I)=>H.defaults(P,I),{}),extend:D(C)}}function j(C,P){if(Array.isArray(C)&&G(C[0]))return C.concat(P);if(Array.isArray(P)&&G(P[0])&&G(C))return[C,...P];if(Array.isArray(P))return P}function T({extend:C,...P}){return N(P,C,(I,f)=>!q(I)&&!f.some(q)?N({},I,...f,j):(l,t)=>N({},...[I,...f].map((s)=>_(s,l,t)),j))}function*R(C){let P=w.toPath(C);if(P.length===0||(yield P,Array.isArray(C)))return;let I=/^(.*?)\s*\/\s*([^/]+)$/,f=C.match(I);if(f!==null){let[,l,t]=f,s=w.toPath(l);s.alpha=t,yield s}}function S(C){let P=(I,f)=>{for(let l of R(I)){let t=0,s=C;for(;s!=null&&t<l.length;)s=s[l[t++]],s=q(s)&&(l.alpha===void 0||t<=l.length-1)?s(P,L):s;if(s!==void 0){if(l.alpha!==void 0){let m=$.parseColorFormat(s);return V.withAlphaValue(m,l.alpha,B.default(m))}return z.default(s)?U.cloneDeep(s):s}}return f};return Object.assign(P,{theme:P,...L}),Object.keys(C).reduce((I,f)=>(I[f]=q(C[f])?C[f](P,L):C[f],I),{})}function x(C){let P=[];return C.forEach((I)=>{P=[...P,I];var f;let l=(f=I==null?void 0:I.plugins)!==null&&f!==void 0?f:[];l.length!==0&&l.forEach((t)=>{t.__isOptionsFunction&&(t=t());var s;P=[...P,...x([(s=t==null?void 0:t.config)!==null&&s!==void 0?s:{}])]})}),P}function c(C){return[...C].reduceRight((P,I)=>q(I)?I({corePlugins:P}):X.default(I,P),Y.default)}function o(C){return[...C].reduceRight((P,I)=>[...P,...I],[])}function u(C){let P=[...x(C),{prefix:"",important:!1,separator:":",variantOrder:Z.default.variantOrder}];var I,f;return W.normalizeConfig(H.defaults({theme:S(T(E(P.map((l)=>(I=l==null?void 0:l.theme)!==null&&I!==void 0?I:{})))),corePlugins:c(P.map((l)=>l.corePlugins)),plugins:o(C.map((l)=>(f=l==null?void 0:l.plugins)!==null&&f!==void 0?f:[]))},...P))}}),VK={};F4(VK,{default:()=>BK});var BK,gz=j4(()=>{BK={yellow:(J)=>J}}),xz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0});function K($,V){for(var B in V)Object.defineProperty($,B,{enumerable:!0,get:V[B]})}K(J,{flagEnabled:()=>w,issueFlagNotices:()=>z,default:()=>U});var Y=Z((gz(),g9(VK))),X=Z((E4(),g9(b9)));function Z($){return $&&$.__esModule?$:{default:$}}var Q={optimizeUniversalDefaults:!1},H={future:["hoverOnlyWhenSupported","respectDefaultRingColorOpacity"],experimental:["optimizeUniversalDefaults","matchVariant"]};function w($,V){if(H.future.includes(V)){var B,M,q;return $.future==="all"||((q=(M=$==null||(B=$.future)===null||B===void 0?void 0:B[V])!==null&&M!==void 0?M:Q[V])!==null&&q!==void 0?q:!1)}if(H.experimental.includes(V)){var G,N,L;return $.experimental==="all"||((L=(N=$==null||(G=$.experimental)===null||G===void 0?void 0:G[V])!==null&&N!==void 0?N:Q[V])!==null&&L!==void 0?L:!1)}return!1}function W($){if($.experimental==="all")return H.experimental;var V;return Object.keys((V=$==null?void 0:$.experimental)!==null&&V!==void 0?V:{}).filter((B)=>H.experimental.includes(B)&&$.experimental[B])}function z($){if(process.env.JEST_WORKER_ID===void 0&&W($).length>0){let V=W($).map((B)=>Y.default.yellow(B)).join(", ");X.default.warn("experimental-flags-enabled",[`You have enabled experimental features: ${V}`,"Experimental features in Tailwind CSS are not covered by semver, may introduce breaking changes, and can change at any time."])}}var U=H}),hz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0}),Object.defineProperty(J,"default",{enumerable:!0,get:()=>Z});var K=X(r1()),Y=xz();function X(Q){return Q&&Q.__esModule?Q:{default:Q}}function Z(Q){var H;let w=((H=Q==null?void 0:Q.presets)!==null&&H!==void 0?H:[K.default]).slice().reverse().flatMap((U)=>Z(typeof U=="function"?U():U)),W={respectDefaultRingColorOpacity:{theme:{ringColor:{DEFAULT:"#3b82f67f"}}}},z=Object.keys(W).filter((U)=>Y.flagEnabled(Q,U)).map((U)=>W[U]);return[Q,...z,...w]}}),bz=a((J)=>{Object.defineProperty(J,"__esModule",{value:!0}),Object.defineProperty(J,"default",{enumerable:!0,get:()=>Z});var K=X(kz()),Y=X(hz());function X(Q){return Q&&Q.__esModule?Q:{default:Q}}function Z(...Q){let[,...H]=Y.default(Q[0]);return K.default([...Q,...H])}}),mz=a((J,K)=>{var Y=bz();K.exports=(Y.__esModule?Y:{default:Y}).default}),N9;var g6=null;async function f9(){return N9||(g6?(await g6,N9):(g6=Promise.resolve().then(()=>(Qz(),i1)).then((J)=>J.getYogaModule()).then((J)=>N9=J),await g6,g6=null,N9))}var l6=(J,K)=>()=>(K||J((K={exports:{}}).exports,K),K.exports),fz=l6((J,K)=>{K.exports=["em","ex","ch","rem","vh","vw","vmin","vmax","px","mm","cm","in","pt","pc","mozmm"]}),dz=l6((J,K)=>{K.exports=["deg","grad","rad","turn"]}),lz=l6((J,K)=>{K.exports=["dpi","dpcm","dppx"]}),cz=l6((J,K)=>{K.exports=["Hz","kHz"]}),uz=l6((J,K)=>{K.exports=["s","ms"]}),pz=fz(),qK=dz(),AK=lz(),GK=cz(),MK=uz();function I4(J){if(/\.\D?$/.test(J))throw new Error("The dot should be followed by a number");if(/^[+-]{2}/.test(J))throw new Error("Only one leading +/- is allowed");if(iz(J)>1)throw new Error("Only one dot is allowed");if(/%$/.test(J)){this.type="percentage",this.value=X4(J),this.unit="%";return}var K=rz(J);if(!K){this.type="number",this.value=X4(J);return}this.type=sz(K),this.value=X4(J.substr(0,J.length-K.length)),this.unit=K}I4.prototype.valueOf=function(){return this.value};I4.prototype.toString=function(){return this.value+(this.unit||"")};function c6(J){return new I4(J)}function iz(J){var K=J.match(/\./g);return K?K.length:0}function X4(J){var K=parseFloat(J);if(isNaN(K))throw new Error("Invalid number: "+J);return K}var oz=[].concat(qK,GK,pz,AK,MK);function rz(J){var K=J.match(/\D+$/),Y=K&&K[0];if(Y&&oz.indexOf(Y)===-1)throw new Error("Invalid unit: "+Y);return Y}var nz=Object.assign(L9(qK,"angle"),L9(GK,"frequency"),L9(AK,"resolution"),L9(MK,"time"));function L9(J,K){return Object.fromEntries(J.map((Y)=>[Y,K]))}function sz(J){return nz[J]||"length"}function P9(J){let K=typeof J;return!(K==="number"||K==="bigint"||K==="string"||K==="boolean")}function az(J){return/^class\s/.test(J.toString())}function tz(J){return"dangerouslySetInnerHTML"in J}function ez(J){let K=typeof J>"u"?[]:[].concat(J).flat(1/0),Y=[];for(let X=0;X<K.length;X++){let Z=K[X];typeof Z>"u"||typeof Z=="boolean"||Z===null||(typeof Z=="number"&&(Z=String(Z)),typeof Z=="string"&&Y.length&&typeof Y[Y.length-1]=="string"?Y[Y.length-1]+=Z:Y.push(Z))}return Y}function z0(J,K,Y,X,Z=!1){if(typeof J=="number")return J;try{if(J=J.trim(),/[ /\(,]/.test(J))return;if(J===String(+J))return+J;let Q=new c6(J);if(Q.type==="length")switch(Q.unit){case"em":return Q.value*K;case"rem":return Q.value*16;case"vw":return~~(Q.value*X._viewportWidth/100);case"vh":return~~(Q.value*X._viewportHeight/100);default:return Q.value}else{if(Q.type==="angle")return OK(J);if(Q.type==="percentage"&&Z)return Q.value/100*Y}}catch{}}function OK(J){let K=new c6(J);switch(K.unit){case"deg":return K.value;case"rad":return K.value*180/Math.PI;case"turn":return K.value*360;case"grad":return 0.9*K.value}}function S9(J,K){return[J[0]*K[0]+J[2]*K[1],J[1]*K[0]+J[3]*K[1],J[0]*K[2]+J[2]*K[3],J[1]*K[2]+J[3]*K[3],J[0]*K[4]+J[2]*K[5]+J[4],J[1]*K[4]+J[3]*K[5]+J[5]]}function $8(J,K,Y,X){let Z=K[J];if(typeof Z>"u"){if(X&&typeof J<"u")throw new Error(`Invalid value for CSS property "${X}". Allowed values: ${Object.keys(K).map((Q)=>`"${Q}"`).join(" | ")}. Received: "${J}".`);Z=Y}return Z}var Z4,Q4,JU=[32,160,4961,65792,65793,4153,4241,10].map((J)=>String.fromCodePoint(J));function B8(J,K,Y){if(!Z4||!Q4){if(!(typeof Intl<"u"&&("Segmenter"in Intl)))throw new Error("Intl.Segmenter does not exist, please use import a polyfill.");Z4=new Intl.Segmenter(Y,{granularity:"word"}),Q4=new Intl.Segmenter(Y,{granularity:"grapheme"})}if(K==="grapheme")return[...Q4.segment(J)].map((X)=>X.segment);{let X=[...Z4.segment(J)].map((H)=>H.segment),Z=[],Q=0;for(;Q<X.length;){let H=X[Q];if(H=="\xA0"){let w=Q===0?"":Z.pop(),W=Q===X.length-1?"":X[Q+1];Z.push(w+"\xA0"+W),Q+=2}else Z.push(H),Q++}return Z}}function n(J,K,Y){let X="";for(let[Z,Q]of Object.entries(K))typeof Q<"u"&&(X+=` ${Z}="${Q}"`);return Y?`<${J}${X}>${Y}</${J}>`:`<${J}${X}/>`}function KU(J=20){let K=new Map;function Y(Q,H){if(K.size>=J){let w=K.keys().next().value;K.delete(w)}K.set(Q,H)}function X(Q){if(!K.has(Q))return;let H=K.get(Q);return K.delete(Q),K.set(Q,H),H}function Z(){K.clear()}return{set:Y,get:X,clear:Z}}function T4(J){return J?J.split(/[, ]/).filter(Boolean).map(Number):null}function YU(J){return Object.prototype.toString.call(J)}function NK(J){return typeof J=="string"}function XU(J){return typeof J=="number"}function ZU(J){return YU(J)==="[object Undefined]"}function QU(J,K){if(K==="break-all")return{words:B8(J,"grapheme"),requiredBreaks:[]};if(K==="keep-all")return{words:B8(J,"word"),requiredBreaks:[]};let Y=new A7(J),X=0,Z=Y.nextBreak(),Q=[],H=[!1];for(;Z;){let w=J.slice(X,Z.position);Q.push(w),Z.required?H.push(!0):H.push(!1),X=Z.position,Z=Y.nextBreak()}return{words:Q,requiredBreaks:H}}var HU=(J)=>J.replaceAll(/([A-Z])/g,(K,Y)=>`-${Y.toLowerCase()}`);function LK(J,K=","){let Y=[],X=0,Z=0;K=new RegExp(K);for(let Q=0;Q<J.length;Q++)J[Q]==="("?Z++:J[Q]===")"&&Z--,Z===0&&K.test(J[Q])&&(Y.push(J.slice(X,Q).trim()),X=Q+1);return Y.push(J.slice(X).trim()),Y}var WU="image/avif",wU="image/webp",d9="image/apng",l9="image/png",c9="image/jpeg",u9="image/gif",C4="image/svg+xml";function jK(J){let K=new DataView(J),Y=4,X=K.byteLength;for(;Y<X;){let Z=K.getUint16(Y,!1);if(Z>X)throw new TypeError("Invalid JPEG");let Q=K.getUint8(Z+1+Y);if(Q===192||Q===193||Q===194)return[K.getUint16(Z+7+Y,!1),K.getUint16(Z+5+Y,!1)];Y+=Z+2}throw new TypeError("Invalid JPEG")}function FK(J){let K=new Uint8Array(J.slice(6,10));return[K[0]|K[1]<<8,K[2]|K[3]<<8]}function EK(J){let K=new DataView(J);return[K.getUint16(18,!1),K.getUint16(22,!1)]}var u8=KU(100),v9=new Map,zU=[l9,d9,c9,u9,C4];function UU(J){let K="",Y=new Uint8Array(J);for(let X=0;X<Y.byteLength;X++)K+=String.fromCharCode(Y[X]);return btoa(K)}function $U(J){let K=atob(J),Y=K.length,X=new Uint8Array(Y);for(let Z=0;Z<Y;Z++)X[Z]=K.charCodeAt(Z);return X.buffer}function L1(J,K){let Y=K.match(/<svg[^>]*>/)[0],X=Y.match(/viewBox=['"](.+)['"]/),Z=X?T4(X[1]):null,Q=Y.match(/width=['"](\d*\.\d+|\d+)['"]/),H=Y.match(/height=['"](\d*\.\d+|\d+)['"]/);if(!Z&&(!Q||!H))throw new Error(`Failed to parse SVG from ${J}: missing "viewBox"`);let w=Z?[Z[2],Z[3]]:[+Q[1],+H[1]],W=w[0]/w[1];return Q&&H?[+Q[1],+H[1]]:Q?[+Q[1],+Q[1]/W]:H?[+H[1]*W,+H[1]]:[w[0],w[1]]}function j1(J){let K,Y=VU(new Uint8Array(J));switch(Y){case l9:case d9:K=EK(J);break;case u9:K=FK(J);break;case c9:K=jK(J);break}if(!zU.includes(Y))throw new Error(`Unsupported image type: ${Y||"unknown"}`);return[`data:${Y};base64,${UU(J)}`,K]}async function P4(J){if(!J)throw new Error("Image source is not provided.");if(typeof J=="object"){let[Z,Q]=j1(J);return[Z,...Q]}if((J.startsWith('"')&&J.endsWith('"')||J.startsWith("'")&&J.endsWith("'"))&&(J=J.slice(1,-1)),typeof window>"u"&&!J.startsWith("http")&&!J.startsWith("data:"))throw new Error(`Image source must be an absolute URL: ${J}`);if(J.startsWith("data:")){let Z;try{Z=/data:(?<imageType>[a-z/+]+)(;[^;=]+=[^;=]+)*?(;(?<encodingType>[^;,]+))?,(?<dataString>.*)/g.exec(J).groups}catch{return console.warn("Image data URI resolved without size:"+J),[J]}let{imageType:Q,encodingType:H,dataString:w}=Z;if(Q===C4){let W=H==="base64"?atob(w):decodeURIComponent(w.replace(/ /g,"%20")),z=H==="base64"?J:`data:image/svg+xml;base64,${btoa(W)}`,U=L1(J,W);return u8.set(J,[z,...U]),[z,...U]}else if(H==="base64"){let W,z=$U(w);switch(Q){case l9:case d9:W=EK(z);break;case u9:W=FK(z);break;case c9:W=jK(z);break}return u8.set(J,[J,...W]),[J,...W]}else return console.warn("Image data URI resolved without size:"+J),u8.set(J,[J]),[J]}if(!globalThis.fetch)throw new Error("`fetch` is required to be polyfilled to load images.");if(v9.has(J))return v9.get(J);let K=u8.get(J);if(K)return K;let Y=J,X=fetch(Y).then((Z)=>{let Q=Z.headers.get("content-type");return Q==="image/svg+xml"||Q==="application/svg+xml"?Z.text():Z.arrayBuffer()}).then((Z)=>{if(typeof Z=="string")try{let w=`data:image/svg+xml;base64,${btoa(Z)}`,W=L1(Y,Z);return[w,...W]}catch(w){throw new Error(`Failed to parse SVG image: ${w.message}`)}let[Q,H]=j1(Z);return[Q,...H]}).then((Z)=>(u8.set(Y,Z),Z)).catch((Z)=>(console.error(`Can't load image ${Y}: `+Z.message),u8.set(Y,[]),[]));return v9.set(Y,X),X}function VU(J){return[255,216,255].every((K,Y)=>J[Y]===K)?c9:[137,80,78,71,13,10,26,10].every((K,Y)=>J[Y]===K)?BU(J)?d9:l9:[71,73,70,56].every((K,Y)=>J[Y]===K)?u9:[82,73,70,70,0,0,0,0,87,69,66,80].every((K,Y)=>!K||J[Y]===K)?wU:[60,63,120,109,108].every((K,Y)=>J[Y]===K)?C4:[0,0,0,0,102,116,121,112,97,118,105,102].every((K,Y)=>!K||J[Y]===K)?WU:null}function BU(J){let K=new DataView(J.buffer),Y,X,Z=8,Q=!1;for(;!Q&&Y!=="IEND"&&Z<J.length;){X=K.getUint32(Z);let H=J.subarray(Z+4,Z+8);Y=String.fromCharCode(...H),Q=Y==="acTL",Z+=12+X}return Q}var q4={accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",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",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",href:"href",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",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",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",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",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space",xmlnsXlink:"xmlns:xlink"},qU=/[\r\n%#()<>?[\\\]^`{|}"']/g;function A4(J,K){if(!J)return"";if(Array.isArray(J))return J.map((z)=>A4(z,K)).join("");if(typeof J!="object")return String(J);let Y=J.type;if(Y==="text")throw new Error("<text> nodes are not currently supported, please convert them to <path>");let{children:X,style:Z,...Q}=J.props||{},H=(Z==null?void 0:Z.color)||K,w=`${Object.entries(Q).map(([z,U])=>(typeof U=="string"&&U.toLowerCase()==="currentcolor"&&(U=H),z==="href"&&Y==="image"?` ${q4[z]||z}="${u8.get(U)[0]}"`:` ${q4[z]||z}="${U}"`)).join("")}`,W=Z?` style="${Object.entries(Z).map(([z,U])=>`${HU(z)}:${U}`).join(";")}"`:"";return`<${Y}${w}${W}>${A4(X,H)}</${Y}>`}async function AU(J){let K=new Set,Y=(X)=>{if(X&&P9(X)){if(Array.isArray(X)){X.forEach((Z)=>Y(Z));return}else typeof X=="object"&&(X.type==="image"?K.has(X.props.href)||K.add(X.props.href):X.type==="img"&&(K.has(X.props.src)||K.add(X.props.src)));Array.isArray(X.props.children)?X.props.children.map((Z)=>Y(Z)):Y(X.props.children)}};return Y(J),Promise.all(Array.from(K).map((X)=>P4(X)))}async function GU(J,K){let{viewBox:Y,viewbox:X,width:Z,height:Q,className:H,style:w,children:W,...z}=J.props||{};Y||=X,z.xmlns="http://www.w3.org/2000/svg";let U=(w==null?void 0:w.color)||K,$=T4(Y),V=$?$[3]/$[2]:null;return Z=Z||V&&Q?Q/V:null,Q=Q||V&&Z?Z*V:null,z.width=Z,z.height=Q,Y&&(z.viewBox=Y),`data:image/svg+xml;utf8,${`<svg ${Object.entries(z).map(([B,M])=>(typeof M=="string"&&M.toLowerCase()==="currentcolor"&&(M=U),` ${q4[B]||B}="${M}"`)).join("")}>${A4(W,U)}</svg>`.replace(qU,encodeURIComponent)}`}var J8="flex",MU={p:{display:J8,marginTop:"1em",marginBottom:"1em"},div:{display:J8},blockquote:{display:J8,marginTop:"1em",marginBottom:"1em",marginLeft:40,marginRight:40},center:{display:J8,textAlign:"center"},hr:{display:J8,marginTop:"0.5em",marginBottom:"0.5em",marginLeft:"auto",marginRight:"auto",borderWidth:1,borderStyle:"solid"},h1:{display:J8,fontSize:"2em",marginTop:"0.67em",marginBottom:"0.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h2:{display:J8,fontSize:"1.5em",marginTop:"0.83em",marginBottom:"0.83em",marginLeft:0,marginRight:0,fontWeight:"bold"},h3:{display:J8,fontSize:"1.17em",marginTop:"1em",marginBottom:"1em",marginLeft:0,marginRight:0,fontWeight:"bold"},h4:{display:J8,marginTop:"1.33em",marginBottom:"1.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},h5:{display:J8,fontSize:"0.83em",marginTop:"1.67em",marginBottom:"1.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h6:{display:J8,fontSize:"0.67em",marginTop:"2.33em",marginBottom:"2.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},u:{textDecoration:"underline"},strong:{fontWeight:"bold"},b:{fontWeight:"bold"},i:{fontStyle:"italic"},em:{fontStyle:"italic"},code:{fontFamily:"monospace"},kbd:{fontFamily:"monospace"},pre:{display:J8,fontFamily:"monospace",whiteSpace:"pre",marginTop:"1em",marginBottom:"1em"},mark:{backgroundColor:"yellow",color:"black"},big:{fontSize:"larger"},small:{fontSize:"smaller"},s:{textDecoration:"line-through"}},OU=new Set(["color","font","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","textAlign","textTransform","textShadowOffset","textShadowColor","textShadowRadius","WebkitTextStrokeWidth","WebkitTextStrokeColor","textDecorationLine","textDecorationStyle","textDecorationColor","whiteSpace","transform","wordBreak","tabSize","opacity","filter","_viewportWidth","_viewportHeight","_inheritedClipPathId","_inheritedMaskId","_inheritedBackgroundClipTextPath"]);function NU(J){let K={};for(let Y in J)OU.has(Y)&&(K[Y]=J[Y]);return K}function LU(J,K){try{let Y=new c6(J);switch(Y.unit){case"px":return{absolute:Y.value};case"em":return{absolute:Y.value*K};case"rem":return{absolute:Y.value*16};case"%":return{relative:Y.value};default:return{}}}catch{return{}}}function H4(J,K,Y){switch(J){case"top":return{yRelative:0};case"left":return{xRelative:0};case"right":return{xRelative:100};case"bottom":return{yRelative:100};case"center":return{};default:{let X=LU(J,K);return X.absolute?{[Y?"xAbsolute":"yAbsolute"]:X.absolute}:X.relative?{[Y?"xRelative":"yRelative"]:X.relative}:{}}}}function jU(J,K){if(typeof J=="number")return{xAbsolute:J};let Y;try{Y=DK.default(J).nodes.filter((X)=>X.type==="word").map((X)=>X.value)}catch{return{}}return Y.length===1?H4(Y[0],K,!0):Y.length===2?((Y[0]==="top"||Y[0]==="bottom"||Y[1]==="left"||Y[1]==="right")&&Y.reverse(),{...H4(Y[0],K,!0),...H4(Y[1],K,!1)}):{}}function x6(J,K){let Y=IK.getPropertyName(`mask-${K}`);return J[Y]||J[`WebkitM${Y.substring(1)}`]}function FU(J){let K=J.maskImage||J.WebkitMaskImage,Y={position:x6(J,"position")||"0% 0%",size:x6(J,"size")||"100% 100%",repeat:x6(J,"repeat")||"repeat",origin:x6(J,"origin")||"border-box",clip:x6(J,"origin")||"border-box"};return LK(K).filter((X)=>X&&X!=="none").reverse().map((X)=>({image:X,...Y}))}var EU=new Set(["flex","flexGrow","flexShrink","flexBasis","fontWeight","lineHeight","opacity","scale","scaleX","scaleY"]),_U=new Set(["lineHeight"]);function RU(J,K,Y,X){return J==="textDecoration"&&!Y.includes(K.textDecorationColor)&&(K.textDecorationColor=X),K}function J6(J,K){let Y=Number(K);return isNaN(Y)?K:EU.has(J)?_U.has(J)?Y:String(K):Y+"px"}function DU(J,K,Y){if(J==="lineHeight")return{lineHeight:J6(J,K)};if(J==="fontFamily")return{fontFamily:K.split(",").map((X)=>X.trim().replace(/(^['"])|(['"]$)/g,"").toLocaleLowerCase())};if(J==="borderRadius"){if(typeof K!="string"||!K.includes("/"))return;let[X,Z]=K.split("/"),Q=V8.getStylesForProperty(J,X,!0),H=V8.getStylesForProperty(J,Z,!0);for(let w in Q)H[w]=J6(J,Q[w])+" "+J6(J,H[w]);return H}if(/^border(Top|Right|Bottom|Left)?$/.test(J)){let X=V8.getStylesForProperty("border",K,!0);X.borderWidth===1&&!String(K).includes("1px")&&(X.borderWidth=3),X.borderColor==="black"&&!String(K).includes("black")&&(X.borderColor=Y);let Z={Width:J6(J+"Width",X.borderWidth),Style:$8(X.borderStyle,{solid:"solid",dashed:"dashed"},"solid",J+"Style"),Color:X.borderColor},Q={};for(let H of J==="border"?["Top","Right","Bottom","Left"]:[J.slice(6)])for(let w in Z)Q["border"+H+w]=Z[w];return Q}if(J==="boxShadow"){if(!K)throw new Error('Invalid `boxShadow` value: "'+K+'".');return{[J]:typeof K=="string"?RK.parse(K):K}}if(J==="transform"){if(typeof K!="string")throw new Error("Invalid `transform` value.");let X={},Z=K.replace(/(-?[\d.]+%)/g,(H,w)=>{let W=~~(Math.random()*1e9);return X[W]=w,W+"px"}),Q=V8.getStylesForProperty("transform",Z,!0);for(let H of Q.transform)for(let w in H)X[H[w]]&&(H[w]=X[H[w]]);return Q}if(J==="background")return K=K.toString().trim(),/^(linear-gradient|radial-gradient|url|repeating-linear-gradient)\(/.test(K)?V8.getStylesForProperty("backgroundImage",K,!0):V8.getStylesForProperty("background",K,!0);if(J==="textShadow"){K=K.toString().trim();let X={},Z=LK(K);for(let Q of Z){let H=V8.getStylesForProperty("textShadow",Q,!0);for(let w in H)X[w]?X[w].push(H[w]):X[w]=[H[w]]}return X}if(J==="WebkitTextStroke"){K=K.toString().trim();let X=K.split(" ");if(X.length!==2)throw new Error("Invalid `WebkitTextStroke` value.");return{WebkitTextStrokeWidth:J6(J,X[0]),WebkitTextStrokeColor:J6(J,X[1])}}}function F1(J){return J==="transform"?" Only absolute lengths such as `10px` are supported.":""}var E1=/rgb\((\d+)\s+(\d+)\s+(\d+)\s*\/\s*([\.\d]+)\)/;function TK(J){if(typeof J=="string"&&E1.test(J.trim()))return J.trim().replace(E1,(K,Y,X,Z,Q)=>`rgba(${Y}, ${X}, ${Z}, ${Q})`);if(typeof J=="object"&&J!==null){for(let K in J)J[K]=TK(J[K]);return J}return J}function _1(J,K){let Y={};if(J){let Z=TU(J.color,K.color);Y.color=Z;for(let Q in J){if(Q.startsWith("_")){Y[Q]=J[Q];continue}if(Q==="color")continue;let H=V8.getPropertyName(Q),w=PU(J[Q],Z);try{let W=DU(H,w,Z)||RU(H,V8.getStylesForProperty(H,J6(H,w),!0),w,Z);Object.assign(Y,W)}catch(W){throw new Error(W.message+(W.message.includes(w)?`
|
|
64
|
+
`+F1(H):`
|
|
65
|
+
in CSS rule \`${H}: ${w}\`.${F1(H)}`))}}}if(Y.backgroundImage){let{backgrounds:Z}=_K.parseElementStyle(Y);Y.backgroundImage=Z}(Y.maskImage||Y.WebkitMaskImage)&&(Y.maskImage=FU(Y));let X=IU(Y.fontSize,K.fontSize);typeof Y.fontSize<"u"&&(Y.fontSize=X),Y.transformOrigin&&(Y.transformOrigin=jU(Y.transformOrigin,X));for(let Z in Y){let Q=Y[Z];if(Z==="lineHeight")typeof Q=="string"&&Q!=="normal"&&(Q=Y[Z]=z0(Q,X,X,K,!0)/X);else{if(typeof Q=="string"){let H=z0(Q,X,X,K);typeof H<"u"&&(Y[Z]=H),Q=Y[Z]}if(typeof Q=="string"||typeof Q=="object"){let H=TK(Q);H&&(Y[Z]=H),Q=Y[Z]}}if(Z==="opacity"&&typeof Q=="number"&&(Y.opacity=Q*K.opacity),Z==="transform"){let H=Q;for(let w of H){let W=Object.keys(w)[0],z=w[W],U=typeof z=="string"?z0(z,X,X,K)??z:z;w[W]=U}}if(Z==="textShadowRadius"){let H=Q;Y.textShadowRadius=H.map((w)=>z0(w,X,0,K,!1))}if(Z==="textShadowOffset"){let H=Q;Y.textShadowOffset=H.map(({height:w,width:W})=>({height:z0(w,X,0,K,!1),width:z0(W,X,0,K,!1)}))}}return Y}function IU(J,K){if(typeof J=="number")return J;try{let Y=new c6(J);switch(Y.unit){case"em":return Y.value*K;case"rem":return Y.value*16}}catch{return K}}function R1(J){if(J.startsWith("hsl")){let K=z9(J),[Y,X,Z]=K.values;return`hsl(${[Y,`${X}%`,`${Z}%`].concat(K.alpha===1?[]:[K.alpha]).join(",")})`}return J}function TU(J,K){return J&&J.toLowerCase()!=="currentcolor"?R1(J):R1(K)}function CU(J,K){return J.replace(/currentcolor/gi,K)}function PU(J,K){return NK(J)&&(J=CU(J,K)),J}async function SU(J,K,Y,X,Z){let Q=await f9(),H={...Y,..._1(MU[K],Y),..._1(X,Y)};if(K==="img"){let[w,W,z]=await P4(Z.src);if(W===void 0&&z===void 0){if(Z.width===void 0||Z.height===void 0)throw new Error("Image size cannot be determined. Please provide the width and height of the image.");W=parseInt(Z.width),z=parseInt(Z.height)}let U=z/W,$=(H.borderLeftWidth||0)+(H.borderRightWidth||0)+(H.paddingLeft||0)+(H.paddingRight||0),V=(H.borderTopWidth||0)+(H.borderBottomWidth||0)+(H.paddingTop||0)+(H.paddingBottom||0),B=H.width||Z.width,M=H.height||Z.height,q=typeof B=="number"&&typeof M=="number";q&&(B-=$,M-=V),B===void 0&&M===void 0?(B="100%",J.setAspectRatio(1/U)):B===void 0?typeof M=="number"?B=M/U:J.setAspectRatio(1/U):M===void 0&&(typeof B=="number"?M=B*U:J.setAspectRatio(1/U)),H.width=q?B+$:B,H.height=q?M+V:M,H.__src=w}if(K==="svg"){let w=Z.viewBox||Z.viewbox,W=T4(w),z=W?W[3]/W[2]:null,{width:U,height:$}=Z;typeof U>"u"&&$?z==null?U=0:typeof $=="string"&&$.endsWith("%")?U=parseInt($)/z+"%":($=z0($,Y.fontSize,1,Y),U=$/z):typeof $>"u"&&U?z==null?U=0:typeof U=="string"&&U.endsWith("%")?$=parseInt(U)*z+"%":(U=z0(U,Y.fontSize,1,Y),$=U*z):(typeof U<"u"&&(U=z0(U,Y.fontSize,1,Y)||U),typeof $<"u"&&($=z0($,Y.fontSize,1,Y)||$),U||=W==null?void 0:W[2],$||=W==null?void 0:W[3]),!H.width&&U&&(H.width=U),!H.height&&$&&(H.height=$)}return J.setDisplay($8(H.display,{flex:Q.DISPLAY_FLEX,block:Q.DISPLAY_FLEX,none:Q.DISPLAY_NONE,"-webkit-box":Q.DISPLAY_FLEX},Q.DISPLAY_FLEX,"display")),J.setAlignContent($8(H.alignContent,{stretch:Q.ALIGN_STRETCH,center:Q.ALIGN_CENTER,"flex-start":Q.ALIGN_FLEX_START,"flex-end":Q.ALIGN_FLEX_END,"space-between":Q.ALIGN_SPACE_BETWEEN,"space-around":Q.ALIGN_SPACE_AROUND,baseline:Q.ALIGN_BASELINE,normal:Q.ALIGN_AUTO},Q.ALIGN_AUTO,"alignContent")),J.setAlignItems($8(H.alignItems,{stretch:Q.ALIGN_STRETCH,center:Q.ALIGN_CENTER,"flex-start":Q.ALIGN_FLEX_START,"flex-end":Q.ALIGN_FLEX_END,baseline:Q.ALIGN_BASELINE,normal:Q.ALIGN_AUTO},Q.ALIGN_STRETCH,"alignItems")),J.setAlignSelf($8(H.alignSelf,{stretch:Q.ALIGN_STRETCH,center:Q.ALIGN_CENTER,"flex-start":Q.ALIGN_FLEX_START,"flex-end":Q.ALIGN_FLEX_END,baseline:Q.ALIGN_BASELINE,normal:Q.ALIGN_AUTO},Q.ALIGN_AUTO,"alignSelf")),J.setJustifyContent($8(H.justifyContent,{center:Q.JUSTIFY_CENTER,"flex-start":Q.JUSTIFY_FLEX_START,"flex-end":Q.JUSTIFY_FLEX_END,"space-between":Q.JUSTIFY_SPACE_BETWEEN,"space-around":Q.JUSTIFY_SPACE_AROUND},Q.JUSTIFY_FLEX_START,"justifyContent")),J.setFlexDirection($8(H.flexDirection,{row:Q.FLEX_DIRECTION_ROW,column:Q.FLEX_DIRECTION_COLUMN,"row-reverse":Q.FLEX_DIRECTION_ROW_REVERSE,"column-reverse":Q.FLEX_DIRECTION_COLUMN_REVERSE},Q.FLEX_DIRECTION_ROW,"flexDirection")),J.setFlexWrap($8(H.flexWrap,{wrap:Q.WRAP_WRAP,nowrap:Q.WRAP_NO_WRAP,"wrap-reverse":Q.WRAP_WRAP_REVERSE},Q.WRAP_NO_WRAP,"flexWrap")),typeof H.gap<"u"&&J.setGap(Q.GUTTER_ALL,H.gap),typeof H.rowGap<"u"&&J.setGap(Q.GUTTER_ROW,H.rowGap),typeof H.columnGap<"u"&&J.setGap(Q.GUTTER_COLUMN,H.columnGap),typeof H.flexBasis<"u"&&J.setFlexBasis(H.flexBasis),J.setFlexGrow(typeof H.flexGrow>"u"?0:H.flexGrow),J.setFlexShrink(typeof H.flexShrink>"u"?0:H.flexShrink),typeof H.maxHeight<"u"&&J.setMaxHeight(H.maxHeight),typeof H.maxWidth<"u"&&J.setMaxWidth(H.maxWidth),typeof H.minHeight<"u"&&J.setMinHeight(H.minHeight),typeof H.minWidth<"u"&&J.setMinWidth(H.minWidth),J.setOverflow($8(H.overflow,{visible:Q.OVERFLOW_VISIBLE,hidden:Q.OVERFLOW_HIDDEN},Q.OVERFLOW_VISIBLE,"overflow")),J.setMargin(Q.EDGE_TOP,H.marginTop||0),J.setMargin(Q.EDGE_BOTTOM,H.marginBottom||0),J.setMargin(Q.EDGE_LEFT,H.marginLeft||0),J.setMargin(Q.EDGE_RIGHT,H.marginRight||0),J.setBorder(Q.EDGE_TOP,H.borderTopWidth||0),J.setBorder(Q.EDGE_BOTTOM,H.borderBottomWidth||0),J.setBorder(Q.EDGE_LEFT,H.borderLeftWidth||0),J.setBorder(Q.EDGE_RIGHT,H.borderRightWidth||0),J.setPadding(Q.EDGE_TOP,H.paddingTop||0),J.setPadding(Q.EDGE_BOTTOM,H.paddingBottom||0),J.setPadding(Q.EDGE_LEFT,H.paddingLeft||0),J.setPadding(Q.EDGE_RIGHT,H.paddingRight||0),J.setPositionType($8(H.position,{absolute:Q.POSITION_TYPE_ABSOLUTE,relative:Q.POSITION_TYPE_RELATIVE},Q.POSITION_TYPE_RELATIVE,"position")),typeof H.top<"u"&&J.setPosition(Q.EDGE_TOP,H.top),typeof H.bottom<"u"&&J.setPosition(Q.EDGE_BOTTOM,H.bottom),typeof H.left<"u"&&J.setPosition(Q.EDGE_LEFT,H.left),typeof H.right<"u"&&J.setPosition(Q.EDGE_RIGHT,H.right),typeof H.height<"u"?J.setHeight(H.height):J.setHeightAuto(),typeof H.width<"u"?J.setWidth(H.width):J.setWidthAuto(),[H,NU(H)]}var D1=[1,0,0,1,0,0];function vU(J,K,Y){let X=[...D1];for(let Z of J){let Q=Object.keys(Z)[0],H=Z[Q];if(typeof H=="string")if(Q==="translateX")H=parseFloat(H)/100*K,Z[Q]=H;else if(Q==="translateY")H=parseFloat(H)/100*Y,Z[Q]=H;else throw new Error(`Invalid transform: "${Q}: ${H}".`);let w=H,W=[...D1];switch(Q){case"translateX":W[4]=w;break;case"translateY":W[5]=w;break;case"scale":W[0]=w,W[3]=w;break;case"scaleX":W[0]=w;break;case"scaleY":W[3]=w;break;case"rotate":{let z=w*Math.PI/180,U=Math.cos(z),$=Math.sin(z);W[0]=U,W[1]=$,W[2]=-$,W[3]=U;break}case"skewX":W[2]=Math.tan(w*Math.PI/180);break;case"skewY":W[1]=Math.tan(w*Math.PI/180);break}X=S9(W,X)}J.splice(0,J.length),J.push(...X),J.__resolved=!0}function CK({left:J,top:K,width:Y,height:X},Z,Q,H){let w;Z.__resolved||vU(Z,Y,X);let W=Z;if(Q)w=W;else{let z=(H==null?void 0:H.xAbsolute)??((H==null?void 0:H.xRelative)??50)*Y/100,U=(H==null?void 0:H.yAbsolute)??((H==null?void 0:H.yRelative)??50)*X/100,$=J+z,V=K+U;w=S9([1,0,0,1,$,V],S9(W,[1,0,0,1,-$,-V])),W.__parent&&(w=S9(W.__parent,w)),W.splice(0,6,...w)}return`matrix(${w.map((z)=>z.toFixed(2)).join(",")})`}function yU({left:J,top:K,width:Y,height:X,isInheritingTransform:Z},Q){let H="",w=1;return Q.transform&&(H=CK({left:J,top:K,width:Y,height:X},Q.transform,Z,Q.transformOrigin)),Q.opacity!==void 0&&(w=+Q.opacity),{matrix:H,opacity:w}}function kU({id:J,content:K,filter:Y,left:X,top:Z,width:Q,height:H,matrix:w,opacity:W,image:z,clipPathId:U,debug:$,shape:V,decorationShape:B},M){let q="";if($&&(q=n("rect",{x:X,y:Z-H,width:Q,height:H,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:w||void 0,"clip-path":U?`url(#${U})`:void 0})),z){let N={href:z,x:X,y:Z,width:Q,height:H,transform:w||void 0,"clip-path":U?`url(#${U})`:void 0,style:M.filter?`filter:${M.filter}`:void 0};return[(Y?`${Y}<g filter="url(#satori_s-${J})">`:"")+n("image",{...N,opacity:W!==1?W:void 0})+(B||"")+(Y?"</g>":"")+q,""]}let G={x:X,y:Z,width:Q,height:H,"font-weight":M.fontWeight,"font-style":M.fontStyle,"font-size":M.fontSize,"font-family":M.fontFamily,"letter-spacing":M.letterSpacing||void 0,transform:w||void 0,"clip-path":U?`url(#${U})`:void 0,style:M.filter?`filter:${M.filter}`:void 0,"stroke-width":M.WebkitTextStrokeWidth?`${M.WebkitTextStrokeWidth}px`:void 0,stroke:M.WebkitTextStrokeWidth?M.WebkitTextStrokeColor:void 0,"stroke-linejoin":M.WebkitTextStrokeWidth?"round":void 0,"paint-order":M.WebkitTextStrokeWidth?"stroke":void 0};return[(Y?`${Y}<g filter="url(#satori_s-${J})">`:"")+n("text",{...G,fill:M.color,opacity:W!==1?W:void 0},G4.default(K))+(B||"")+(Y?"</g>":"")+q,V?n("text",G,G4.default(K)):""]}function gU(J,K,Y){return J.replace(/([MA])([0-9.-]+),([0-9.-]+)/g,function(X,Z,Q,H){return Z+(parseFloat(Q)+K)+","+(parseFloat(H)+Y)})}var j9=1.1;function xU({id:J,width:K,height:Y},X){if(!X.shadowColor||!X.shadowOffset||typeof X.shadowRadius>"u")return"";let Z=X.shadowColor.length,Q="",H="",w=0,W=K,z=0,U=Y;for(let $=0;$<Z;$++){let V=X.shadowRadius[$]*X.shadowRadius[$]/4;w=Math.min(X.shadowOffset[$].width-V,w),W=Math.max(X.shadowOffset[$].width+V+K,W),z=Math.min(X.shadowOffset[$].height-V,z),U=Math.max(X.shadowOffset[$].height+V+Y,U),Q+=n("feDropShadow",{dx:X.shadowOffset[$].width,dy:X.shadowOffset[$].height,stdDeviation:X.shadowRadius[$]/2,"flood-color":X.shadowColor[$],"flood-opacity":1,...Z>1?{in:"SourceGraphic",result:`satori_s-${J}-result-${$}`}:{}}),Z>1&&(H=n("feMergeNode",{in:`satori_s-${J}-result-${$}`})+H)}return n("filter",{id:`satori_s-${J}`,x:(w/K*100*j9).toFixed(2)+"%",y:(z/Y*100*j9).toFixed(2)+"%",width:((W-w)/K*100*j9).toFixed(2)+"%",height:((U-z)/Y*100*j9).toFixed(2)+"%"},Q+(H?n("feMerge",{},H):""))}function hU({width:J,height:K,shape:Y,opacity:X,id:Z},Q){if(!Q.boxShadow)return null;let H="",w="";for(let W=Q.boxShadow.length-1;W>=0;W--){let z="",U=Q.boxShadow[W];U.spreadRadius&&U.inset&&(U.spreadRadius=-U.spreadRadius);let $=U.blurRadius*U.blurRadius/4+(U.spreadRadius||0),V=Math.min(-$-(U.inset?U.offsetX:0),0),B=Math.max($+J-(U.inset?U.offsetX:0),J),M=Math.min(-$-(U.inset?U.offsetY:0),0),q=Math.max($+K-(U.inset?U.offsetY:0),K),G=`satori_s-${Z}-${W}`,N=`satori_ms-${Z}-${W}`,L=U.spreadRadius?Y.replace('stroke-width="0"',`stroke-width="${U.spreadRadius*2}"`):Y;z+=n("mask",{id:N,maskUnits:"userSpaceOnUse"},n("rect",{x:0,y:0,width:Q._viewportWidth||"100%",height:Q._viewportHeight||"100%",fill:U.inset?"#000":"#fff"})+L.replace('fill="#fff"',U.inset?'fill="#fff"':'fill="#000"').replace('stroke="#fff"',""));let _=L.replace(/d="([^"]+)"/,(D,E)=>'d="'+gU(E,U.offsetX,U.offsetY)+'"').replace(/x="([^"]+)"/,(D,E)=>'x="'+(parseFloat(E)+U.offsetX)+'"').replace(/y="([^"]+)"/,(D,E)=>'y="'+(parseFloat(E)+U.offsetY)+'"');U.spreadRadius&&U.spreadRadius<0&&(z+=n("mask",{id:N+"-neg",maskUnits:"userSpaceOnUse"},_.replace('stroke="#fff"','stroke="#000"').replace(/stroke-width="[^"]+"/,`stroke-width="${-U.spreadRadius*2}"`))),U.spreadRadius&&U.spreadRadius<0&&(_=n("g",{mask:`url(#${N}-neg)`},_)),z+=n("defs",{},n("filter",{id:G,x:`${V/J*100}%`,y:`${M/K*100}%`,width:`${(B-V)/J*100}%`,height:`${(q-M)/K*100}%`},n("feGaussianBlur",{stdDeviation:U.blurRadius/2,result:"b"})+n("feFlood",{"flood-color":U.color,in:"SourceGraphic",result:"f"})+n("feComposite",{in:"f",in2:"b",operator:U.inset?"out":"in"})))+n("g",{mask:`url(#${N})`,filter:`url(#${G})`,opacity:X},_),U.inset?w+=z:H+=z}return[H,w]}function bU({width:J,left:K,top:Y,ascender:X,clipPathId:Z,matrix:Q},H){let{textDecorationColor:w,textDecorationStyle:W,textDecorationLine:z,fontSize:U,color:$}=H;if(!z||z==="none")return"";let V=Math.max(1,U*0.1),B=z==="line-through"?Y+X*0.7:z==="underline"?Y+X*1.1:Y,M=W==="dashed"?`${V*1.2} ${V*2}`:W==="dotted"?`0 ${V*2}`:void 0;return(Z?`<g clip-path="url(#${Z})">`:"")+n("line",{x1:K,y1:B,x2:K+J,y2:B,stroke:w||$,"stroke-width":V,"stroke-dasharray":M,"stroke-linecap":W==="dotted"?"round":"square",transform:Q})+(Z?"</g>":"")}function S4(J){return J=J.replace("U+","0x"),String.fromCodePoint(Number(J))}var d6=S4("U+0020"),PK=S4("U+0009"),y9=S4("U+2026");function mU(J,K,Y){let{fontSize:X,letterSpacing:Z}=Y,Q=new Map;function H(z){if(Q.has(z))return Q.get(z);let U=J.measure(z,{fontSize:X,letterSpacing:Z});return Q.set(z,U),U}function w(z){let U=0;for(let $ of z)K($)?U+=X:U+=H($);return U}function W(z){return w(B8(z,"grapheme"))}return{measureGrapheme:H,measureGraphemeArray:w,measureText:W}}function fU(J,K,Y){let{textTransform:X,whiteSpace:Z,wordBreak:Q}=K;J=dU(J,X,Y);let{content:H,shouldCollapseTabsAndSpaces:w,allowSoftWrap:W}=uU(J,Z),{words:z,requiredBreaks:U,allowBreakWord:$}=cU(H,Q),[V,B]=lU(K,W);return{words:z,requiredBreaks:U,allowSoftWrap:W,allowBreakWord:$,processedContent:H,shouldCollapseTabsAndSpaces:w,lineLimit:V,blockEllipsis:B}}function dU(J,K,Y){return K==="uppercase"?J=J.toLocaleUpperCase(Y):K==="lowercase"?J=J.toLocaleLowerCase(Y):K==="capitalize"&&(J=B8(J,"word",Y).map((X)=>B8(X,"grapheme",Y).map((Z,Q)=>Q===0?Z.toLocaleUpperCase(Y):Z).join("")).join("")),J}function lU(J,K){let{textOverflow:Y,lineClamp:X,WebkitLineClamp:Z,WebkitBoxOrient:Q,overflow:H,display:w}=J;if(w==="block"&&X){let[W,z=y9]=pU(X);if(W)return[W,z]}return Y==="ellipsis"&&w==="-webkit-box"&&Q==="vertical"&&XU(Z)&&Z>0?[Z,y9]:Y==="ellipsis"&&H==="hidden"&&!K?[1,y9]:[1/0]}function cU(J,K){let Y=["break-all","break-word"].includes(K),{words:X,requiredBreaks:Z}=QU(J,K);return{words:X,requiredBreaks:Z,allowBreakWord:Y}}function uU(J,K){let Y=["pre","pre-wrap","pre-line"].includes(K),X=["normal","nowrap","pre-line"].includes(K),Z=!["pre","nowrap"].includes(K);return Y||(J=J.replace(/\n/g,d6)),X&&(J=J.replace(/([ ]|\t)+/g,d6).replace(/^[ ]|[ ]$/g,"")),{content:J,shouldCollapseTabsAndSpaces:X,allowSoftWrap:Z}}function pU(J){if(typeof J=="number")return[J];let K=/^(\d+)\s*"(.*)"$/,Y=/^(\d+)\s*'(.*)'$/,X=K.exec(J),Z=Y.exec(J);if(X){let Q=+X[1],H=X[2];return[Q,H]}else if(Z){let Q=+Z[1],H=Z[2];return[Q,H]}return[]}var iU=new Set([PK]);function oU(J){return iU.has(J)}async function*rU(J,K){let Y=await f9(),{parentStyle:X,inheritedStyle:Z,parent:Q,font:H,id:w,isInheritingTransform:W,debug:z,embedFont:U,graphemeImages:$,locale:V,canLoadAdditionalAssets:B}=K,{textAlign:M,lineHeight:q,textWrap:G,fontSize:N,filter:L,tabSize:_=8,letterSpacing:D,_inheritedBackgroundClipTextPath:E,flexShrink:j}=X,{words:T,requiredBreaks:R,allowSoftWrap:S,allowBreakWord:x,processedContent:c,shouldCollapseTabsAndSpaces:o,lineLimit:u,blockEllipsis:C}=fU(J,X,V),P=nU(Y,M);Q.insertChild(P,Q.getChildCount()),ZU(j)&&Q.setFlexShrink(1);let I=H.getEngine(N,q,X,V),f=B?B8(c,"grapheme").filter((Q0)=>!oU(Q0)&&!I.has(Q0)):[];yield f.map((Q0)=>({word:Q0,locale:V})),f.length&&(I=H.getEngine(N,q,X,V));function l(Q0){return!!($&&$[Q0])}let{measureGrapheme:t,measureGraphemeArray:s,measureText:m}=mU(I,l,{fontSize:N,letterSpacing:D}),d=NK(_)?z0(_,N,1,X):t(d6)*_,y=(Q0,M0)=>{if(Q0.length===0)return{originWidth:0,endingSpacesWidth:0,text:Q0};let{index:N0,tabCount:U0}=sU(Q0),_0=0;if(U0>0){let T0=Q0.slice(0,N0),j0=Q0.slice(N0+U0),A0=m(T0),q8=A0+M0;_0=(d===0?A0:(Math.floor(q8/d)+U0)*d)+m(j0)}else _0=m(Q0);let B0=Q0.trimEnd()===Q0?_0:m(Q0.trimEnd());return{originWidth:_0,endingSpacesWidth:_0-B0,text:Q0}},k=[],r=[],g=[],e=[],Y0=[];function X0(Q0){let M0=0,N0=0,U0=-1,_0=0,B0=0,T0=0,j0=0;k=[],g=[0],e=[],Y0=[];let A0=0,q8=0;for(;A0<T.length&&M0<u;){let W0=T[A0],o8=R[A0],a0=0,{originWidth:v8,endingSpacesWidth:r6,text:y8}=y(W0,B0);W0=y8,a0=v8;let O0=r6;o8&&T0===0&&(T0=I.height(W0));let k0=",.!?:-@)>]}%#".indexOf(W0[0])<0,Z8=!B0,n6=A0&&k0&&B0+a0>Q0+O0&&S;if(x&&a0>Q0&&(!B0||n6||o8)){let f0=B8(W0,"grapheme");T.splice(A0,1,...f0),B0>0&&(k.push(B0-q8),r.push(j0),M0++,_0+=T0,B0=0,T0=0,j0=0,g.push(1),U0=-1),q8=O0;continue}if(o8||n6)o&&W0===d6&&(a0=0),k.push(B0-q8),r.push(j0),M0++,_0+=T0,B0=a0,T0=a0?I.height(W0):0,j0=a0?I.baseline(W0):0,g.push(1),U0=-1,o8||(N0=Math.max(N0,Q0));else{B0+=a0;let f0=I.height(W0);f0>T0&&(T0=f0,j0=I.baseline(W0)),Z8&&g[g.length-1]++}Z8&&U0++,N0=Math.max(N0,B0);let G6=B0-a0;if(a0===0)Y0.push({y:_0,x:G6,width:0,line:M0,lineIndex:U0,isImage:!1});else{let f0=B8(W0,"word");for(let Q8=0;Q8<f0.length;Q8++){let r8=f0[Q8],E8=0,M6=!1;l(r8)?(E8=N,M6=!0):E8=t(r8),e.push(r8),Y0.push({y:_0,x:G6,width:E8,line:M0,lineIndex:U0,isImage:M6}),G6+=E8}}A0++,q8=O0}return B0&&(M0<u&&(_0+=T0),M0++,k.push(B0),r.push(j0)),{width:N0,height:_0}}let J0={width:0,height:0};P.setMeasureFunc((Q0)=>{let{width:M0,height:N0}=X0(Q0);if(G==="balance"){let _0=M0/2,B0=M0,T0=M0;for(;_0+1<B0;){T0=(_0+B0)/2;let{height:A0}=X0(T0);A0>N0?_0=T0:B0=T0}X0(B0);let j0=Math.ceil(B0);return J0={width:j0,height:N0},{width:j0,height:N0}}let U0=Math.ceil(M0);return J0={width:U0,height:N0},{width:U0,height:N0}});let[V0,E0]=yield,K0="",q0="",S0=Z._inheritedClipPathId,c0=Z._inheritedMaskId,{left:y0,top:I0,width:m0,height:u0}=P.getComputedLayout(),p0=Q.getComputedWidth()-Q.getComputedPadding(Y.EDGE_LEFT)-Q.getComputedPadding(Y.EDGE_RIGHT)-Q.getComputedBorder(Y.EDGE_LEFT)-Q.getComputedBorder(Y.EDGE_RIGHT),Y8=V0+y0,X8=E0+I0,{matrix:s0,opacity:X6}=yU({left:y0,top:I0,width:m0,height:u0,isInheritingTransform:W},X),P8="";if(X.textShadowOffset){let{textShadowColor:Q0,textShadowOffset:M0,textShadowRadius:N0}=X;P8=xU({width:J0.width,height:J0.height,id:w},{shadowColor:Q0,shadowOffset:M0,shadowRadius:N0}),P8=n("defs",{},P8)}let i8="",Z6="",o6="",Q6=-1,H6={},S8=null,b4=0;for(let Q0=0;Q0<e.length;Q0++){let M0=Y0[Q0],N0=Y0[Q0+1];if(!M0)continue;let U0=e[Q0],_0=null,B0=!1,T0=$?$[U0]:null,j0=M0.y,A0=M0.x,q8=M0.width,W0=M0.line;if(W0===Q6)continue;let o8=!1;if(k.length>1){let O0=m0-k[W0];if(M==="right"||M==="end")A0+=O0;else if(M==="center")A0+=O0/2;else if(M==="justify"&&W0<k.length-1){let k0=g[W0],Z8=k0>1?O0/(k0-1):0;A0+=Z8*M0.lineIndex,o8=!0}}let a0=r[W0],v8=I.baseline(U0),r6=I.height(U0),y8=a0-v8;if(H6[W0]||(H6[W0]=[A0,X8+j0+y8,v8,o8?m0:k[W0]]),u!==1/0){let O0=function(f0,Q8){let r8=B8(Q8,"grapheme",V),E8="",M6=0;for(let m4 of r8){let f4=f0+s([E8+m4]);if(E8&&f4+Z8>p0)break;E8+=m4,M6=f4}return{subset:E8,resolvedWidth:M6}},k0=C,Z8=t(C);Z8>p0&&(k0=y9,Z8=t(k0));let n6=t(d6),G6=W0<k.length-1;if(W0+1===u&&(G6||k[W0]>p0)){if(A0+q8+Z8+n6>p0){let{subset:f0,resolvedWidth:Q8}=O0(A0,U0);U0=f0+k0,Q6=W0,H6[W0][2]=Q8,B0=!0}else if(N0&&N0.line!==W0)if(M==="center"){let{subset:f0,resolvedWidth:Q8}=O0(A0,U0);U0=f0+k0,Q6=W0,H6[W0][2]=Q8,B0=!0}else{let f0=e[Q0+1],{subset:Q8,resolvedWidth:r8}=O0(q8+A0,f0);U0=U0+Q8+k0,Q6=W0,H6[W0][2]=r8,B0=!0}}}if(T0)j0+=0;else if(U){if(!U0.includes(PK)&&!JU.includes(U0)&&e[Q0+1]&&N0&&!N0.isImage&&j0===N0.y&&!B0){S8===null&&(b4=A0),S8=S8===null?U0:S8+U0;continue}let O0=S8===null?U0:S8+U0,k0=S8===null?A0:b4,Z8=M0.width+A0-k0;_0=I.getSVG(O0.replace(/(\t)+/g,""),{fontSize:N,left:Y8+k0,top:X8+j0+v8+y8,letterSpacing:D}),S8=null,z&&(o6+=n("rect",{x:Y8+k0,y:X8+j0+y8,width:Z8,height:r6,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:s0||void 0,"clip-path":S0?`url(#${S0})`:void 0})+n("line",{x1:Y8+A0,x2:Y8+A0+M0.width,y1:X8+j0+y8+v8,y2:X8+j0+y8+v8,stroke:"#14c000","stroke-width":1,transform:s0||void 0,"clip-path":S0?`url(#${S0})`:void 0}))}else j0+=v8+y8;if(X.textDecorationLine){let O0=H6[W0];O0&&!O0[4]&&(i8+=bU({left:Y8+O0[0],top:O0[1],width:O0[3],ascender:O0[2],clipPathId:S0,matrix:s0},X),O0[4]=1)}if(_0!==null)Z6+=_0+" ";else{let[O0,k0]=kU({content:U0,filter:P8,id:w,left:Y8+A0,top:X8+j0,width:q8,height:r6,matrix:s0,opacity:X6,image:T0,clipPathId:S0,debug:z,shape:!!E,decorationShape:i8},X);K0+=O0,q0+=k0,i8=""}if(B0)break}if(Z6){let Q0=X.color!=="transparent"&&X6!==0?n("path",{fill:X.color,d:Z6,transform:s0||void 0,opacity:X6!==1?X6:void 0,"clip-path":S0?`url(#${S0})`:void 0,mask:c0?`url(#${c0})`:void 0,style:L?`filter:${L}`:void 0,"stroke-width":Z.WebkitTextStrokeWidth?`${Z.WebkitTextStrokeWidth}px`:void 0,stroke:Z.WebkitTextStrokeWidth?Z.WebkitTextStrokeColor:void 0,"stroke-linejoin":Z.WebkitTextStrokeWidth?"round":void 0,"paint-order":Z.WebkitTextStrokeWidth?"stroke":void 0}):"";E&&(q0=n("path",{d:Z6,transform:s0||void 0})),K0+=(P8?P8+n("g",{filter:`url(#satori_s-${w})`},Q0+i8):Q0+i8)+o6}return q0&&(X._inheritedBackgroundClipTextPath.value+=q0),K0}function nU(J,K){let Y=J.Node.create();return Y.setAlignItems(J.ALIGN_BASELINE),Y.setJustifyContent($8(K,{left:J.JUSTIFY_FLEX_START,right:J.JUSTIFY_FLEX_END,center:J.JUSTIFY_CENTER,justify:J.JUSTIFY_SPACE_BETWEEN,start:J.JUSTIFY_FLEX_START,end:J.JUSTIFY_FLEX_END},J.JUSTIFY_FLEX_START,"textAlign")),Y}function sU(J){let K=/(\t)+/.exec(J);return K?{index:K.index,tabCount:K[0].length}:{index:null,tabCount:0}}function SK(J,K,Y,X,Z){let Q=[];for(let z of K){let{color:U}=z;if(!Q.length&&(Q.push({offset:0,color:U}),!z.offset||z.offset.value==="0"))continue;let $=typeof z.offset>"u"?void 0:z.offset.unit==="%"?+z.offset.value/100:Number(z0(`${z.offset.value}${z.offset.unit}`,Y.fontSize,J,Y,!0))/J;Q.push({offset:$,color:U})}Q.length||Q.push({offset:0,color:"transparent"});let H=Q[Q.length-1];H.offset!==1&&(typeof H.offset>"u"?H.offset=1:X?Q[Q.length-1]={offset:1,color:H.color}:Q.push({offset:1,color:H.color}));let w=0,W=1;for(let z=0;z<Q.length;z++)if(typeof Q[z].offset>"u"){for(W<z&&(W=z);typeof Q[W].offset>"u";)W++;Q[z].offset=(Q[W].offset-Q[w].offset)/(W-w)*(z-w)+Q[w].offset}else w=z;return Z==="mask"?Q.map((z)=>{let U=z9(z.color);return U?U.alpha===0?{...z,color:"rgba(0, 0, 0, 1)"}:{...z,color:`rgba(255, 255, 255, ${U.alpha})`}:z}):Q}function aU({id:J,width:K,height:Y,repeatX:X,repeatY:Z},Q,H,w,W,z){let U=LJ(Q),[$,V]=H,B=Q.startsWith("repeating"),M,q,G;if(U.orientation.type==="directional")M=eU(U.orientation.value),q=Math.sqrt(Math.pow((M.x2-M.x1)*$,2)+Math.pow((M.y2-M.y1)*V,2));else if(U.orientation.type==="angular"){let{length:E,...j}=J$(OK(`${U.orientation.value.value}${U.orientation.value.unit}`)/180*Math.PI,$,V);q=E,M=j}G=B?K$(U.stops,q,M,W):M;let N=SK(B?tU(U.stops,q):q,U.stops,W,B,z),L=`satori_bi${J}`,_=`satori_pattern_${J}`,D=n("pattern",{id:_,x:w[0]/K,y:w[1]/Y,width:X?$/K:"1",height:Z?V/Y:"1",patternUnits:"objectBoundingBox"},n("linearGradient",{id:L,...G,spreadMethod:B?"repeat":"pad"},N.map((E)=>n("stop",{offset:(E.offset??0)*100+"%","stop-color":E.color})).join(""))+n("rect",{x:0,y:0,width:$,height:V,fill:`url(#${L})`}));return[_,D]}function tU(J,K){let Y=J[J.length-1],{offset:X}=Y;return X?X.unit==="%"?Number(X.value)/100*K:Number(X.value):K}function eU(J){let K=0,Y=0,X=0,Z=0;return J.includes("top")?Y=1:J.includes("bottom")&&(Z=1),J.includes("left")?K=1:J.includes("right")&&(X=1),!K&&!X&&!Y&&!Z&&(Y=1),{x1:K,y1:Y,x2:X,y2:Z}}function J$(J,K,Y){let X=Math.pow(Y/K,2);J=(J%(Math.PI*2)+Math.PI*2)%(Math.PI*2);let Z,Q,H,w,W,z,U,$,V=(B)=>{if(B===0){Z=0,Q=Y,H=0,w=0,W=Y;return}else if(B===Math.PI/2){Z=0,Q=0,H=K,w=0,W=K;return}if(B>0&&B<Math.PI/2){Z=(X*K/2/Math.tan(B)-Y/2)/(Math.tan(B)+X/Math.tan(B)),Q=Math.tan(B)*Z+Y,H=Math.abs(K/2-Z)+K/2,w=Y/2-Math.abs(Q-Y/2),W=Math.sqrt(Math.pow(H-Z,2)+Math.pow(w-Q,2)),U=(K/2/Math.tan(B)-Y/2)/(Math.tan(B)+1/Math.tan(B)),$=Math.tan(B)*U+Y,W=2*Math.sqrt(Math.pow(K/2-U,2)+Math.pow(Y/2-$,2));return}else if(B>Math.PI/2&&B<Math.PI){Z=(Y/2+X*K/2/Math.tan(B))/(Math.tan(B)+X/Math.tan(B)),Q=Math.tan(B)*Z,H=Math.abs(K/2-Z)+K/2,w=Y/2+Math.abs(Q-Y/2),U=(K/2/Math.tan(B)+Y/2)/(Math.tan(B)+1/Math.tan(B)),$=Math.tan(B)*U,W=2*Math.sqrt(Math.pow(K/2-U,2)+Math.pow(Y/2-$,2));return}else B>=Math.PI&&(V(B-Math.PI),z=Z,Z=H,H=z,z=Q,Q=w,w=z)};return V(J),{x1:Z/K,y1:Q/Y,x2:H/K,y2:w/Y,length:W}}function K$(J,K,Y,X){let{x1:Z,x2:Q,y1:H,y2:w}=Y,W=J[0].offset?J[0].offset.unit==="%"?Number(J[0].offset.value)/100:z0(`${J[0].offset.value}${J[0].offset.unit}`,X.fontSize,K,X,!0)/K:0,z=J.at(-1).offset?J.at(-1).offset.unit==="%"?Number(J.at(-1).offset.value)/100:z0(`${J.at(-1).offset.value}${J.at(-1).offset.unit}`,X.fontSize,K,X,!0)/K:1,U=(Q-Z)*W+Z,$=(w-H)*W+H,V=(Q-Z)*z+Z,B=(w-H)*z+H;return{x1:U,y1:$,x2:V,y2:B}}function Y$({id:J,width:K,height:Y,repeatX:X,repeatY:Z},Q,H,w,W,z){var U;let{shape:$,stops:V,position:B,size:M}=jJ(Q),[q,G]=H,N=q/2,L=G/2,_=X$(B.x,B.y,q,G,W.fontSize,W);N=_.x,L=_.y;let D=SK(K,V,W,!1,z),E=`satori_radial_${J}`,j=`satori_pattern_${J}`,T=`satori_mask_${J}`,R=Z$($,M,W.fontSize,{x:N,y:L},[q,G],W),S=n("pattern",{id:j,x:w[0]/K,y:w[1]/Y,width:X?q/K:"1",height:Z?G/Y:"1",patternUnits:"objectBoundingBox"},n("radialGradient",{id:E},D.map((x)=>n("stop",{offset:x.offset||0,"stop-color":x.color})).join(""))+n("mask",{id:T},n("rect",{x:0,y:0,width:q,height:G,fill:"#fff"}))+n("rect",{x:0,y:0,width:q,height:G,fill:((U=D.at(-1))==null?void 0:U.color)||"transparent"})+n($,{cx:N,cy:L,width:q,height:G,...R,fill:`url(#${E})`,mask:`url(#${T})`}));return[j,S]}function X$(J,K,Y,X,Z,Q){let H={x:Y/2,y:X/2};return J.type==="keyword"?Object.assign(H,I1(J.value,Y,X,"x")):H.x=z0(`${J.value.value}${J.value.unit}`,Z,Y,Q,!0)||Y/2,K.type==="keyword"?Object.assign(H,I1(K.value,Y,X,"y")):H.y=z0(`${K.value.value}${K.value.unit}`,Z,X,Q,!0)||X/2,H}function I1(J,K,Y,X){switch(J){case"center":return{[X]:X==="x"?K/2:Y/2};case"left":return{x:0};case"top":return{y:0};case"right":return{x:K};case"bottom":return{y:Y}}}function Z$(J,K,Y,X,Z,Q){let[H,w]=Z,{x:W,y:z}=X,U={},$=0,V=0;if(Q$(K)){if(K.some((B)=>B.value.value.startsWith("-")))throw new Error("disallow setting negative values to the size of the shape. Check https://w3c.github.io/csswg-drafts/css-images/#valdef-rg-size-length-0");return J==="circle"?{r:Number(z0(`${K[0].value.value}${K[0].value.unit}`,Y,H,Q,!0))}:{rx:Number(z0(`${K[0].value.value}${K[0].value.unit}`,Y,H,Q,!0)),ry:Number(z0(`${K[1].value.value}${K[1].value.unit}`,Y,w,Q,!0))}}switch(K[0].value){case"farthest-corner":$=Math.max(Math.abs(H-W),Math.abs(W)),V=Math.max(Math.abs(w-z),Math.abs(z));break;case"closest-corner":$=Math.min(Math.abs(H-W),Math.abs(W)),V=Math.min(Math.abs(w-z),Math.abs(z));break;case"farthest-side":return J==="circle"?U.r=Math.max(Math.abs(H-W),Math.abs(W),Math.abs(w-z),Math.abs(z)):(U.rx=Math.max(Math.abs(H-W),Math.abs(W)),U.ry=Math.max(Math.abs(w-z),Math.abs(z))),U;case"closest-side":return J==="circle"?U.r=Math.min(Math.abs(H-W),Math.abs(W),Math.abs(w-z),Math.abs(z)):(U.rx=Math.min(Math.abs(H-W),Math.abs(W)),U.ry=Math.min(Math.abs(w-z),Math.abs(z))),U}if(J==="circle")U.r=Math.sqrt($*$+V*V);else{let B=V!==0?$/V:1;$===0?(U.rx=0,U.ry=0):(U.ry=Math.sqrt($*$+V*V*B*B)/B,U.rx=U.ry*B)}return U}function Q$(J){return!J.some((K)=>K.type==="keyword")}function H$(J,K){return typeof J=="string"&&J.endsWith("%")?K*parseFloat(J)/100:+J}function W4(J,{x:K,y:Y,defaultX:X,defaultY:Z}){return(J?J.split(" ").map((Q)=>{try{let H=new c6(Q);return H.type==="length"||H.type==="number"?H.value:H.value+H.unit}catch{return null}}).filter((Q)=>Q!==null):[X,Z]).map((Q,H)=>H$(Q,[K,Y][H]))}async function vK({id:J,width:K,height:Y,left:X,top:Z},{image:Q,size:H,position:w,repeat:W},z,U){W=W||"repeat",U=U||"background";let $=W==="repeat-x"||W==="repeat",V=W==="repeat-y"||W==="repeat",B=W4(H,{x:K,y:Y,defaultX:K,defaultY:Y}),M=W4(w,{x:K,y:Y,defaultX:0,defaultY:0});if(Q.startsWith("linear-gradient(")||Q.startsWith("repeating-linear-gradient("))return aU({id:J,width:K,height:Y,repeatX:$,repeatY:V},Q,B,M,z,U);if(Q.startsWith("radial-gradient("))return Y$({id:J,width:K,height:Y,repeatX:$,repeatY:V},Q,B,M,z,U);if(Q.startsWith("url(")){let q=W4(H,{x:K,y:Y,defaultX:0,defaultY:0}),[G,N,L]=await P4(Q.slice(4,-1)),_=U==="mask"?N||q[0]:q[0]||N,D=U==="mask"?L||q[1]:q[1]||L;return[`satori_bi${J}`,n("pattern",{id:`satori_bi${J}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:M[0]+X,y:M[1]+Z,width:$?_:"100%",height:V?D:"100%"},n("image",{x:0,y:0,width:_,height:D,preserveAspectRatio:"none",href:G}))]}throw new Error(`Invalid background image: "${Q}"`)}function W$([J,K]){return Math.round(J*1000)===0&&Math.round(K*1000)===0?0:Math.round(J*K/Math.sqrt(J*J+K*K)*1000)/1000}function F9(J,K,Y){return Y<J+K&&(Y/2<J&&Y/2<K?J=K=Y/2:Y/2<J?J=Y-K:Y/2<K&&(K=Y-J)),[J,K]}function E9(J){J[0]=J[1]=Math.min(J[0],J[1])}function _9(J,K,Y,X,Z){if(typeof J=="string"){let Q=J.split(" ").map((w)=>w.trim()),H=!Q[1]&&!Q[0].endsWith("%");return Q[1]=Q[1]||Q[0],[H,[Math.min(z0(Q[0],X,K,Z,!0),K),Math.min(z0(Q[1],X,Y,Z,!0),Y)]]}return typeof J=="number"?[!0,[Math.min(J,K),Math.min(J,Y)]]:[!0,void 0]}var R9=(J)=>J&&J[0]!==0&&J[1]!==0;function w$({id:J,borderRadiusPath:K,borderType:Y,left:X,top:Z,width:Q,height:H},w){let W=`satori_brc-${J}`;return[n("clipPath",{id:W},n(Y,{x:X,y:Z,width:Q,height:H,d:K||void 0})),W]}function x9({left:J,top:K,width:Y,height:X},Z,Q){let{borderTopLeftRadius:H,borderTopRightRadius:w,borderBottomLeftRadius:W,borderBottomRightRadius:z,fontSize:U}=Z,$,V,B,M;if([$,H]=_9(H,Y,X,U,Z),[V,w]=_9(w,Y,X,U,Z),[B,W]=_9(W,Y,X,U,Z),[M,z]=_9(z,Y,X,U,Z),!Q&&!R9(H)&&!R9(w)&&!R9(W)&&!R9(z))return"";H||=[0,0],w||=[0,0],W||=[0,0],z||=[0,0],[H[0],w[0]]=F9(H[0],w[0],Y),[W[0],z[0]]=F9(W[0],z[0],Y),[H[1],W[1]]=F9(H[1],W[1],X),[w[1],z[1]]=F9(w[1],z[1],X),$&&E9(H),V&&E9(w),B&&E9(W),M&&E9(z);let q=[];q[0]=[w,w],q[1]=[z,[-z[0],z[1]]],q[2]=[W,[-W[0],-W[1]]],q[3]=[H,[H[0],-H[1]]];let G=`h${Y-H[0]-w[0]} a${q[0][0]} 0 0 1 ${q[0][1]}`,N=`v${X-w[1]-z[1]} a${q[1][0]} 0 0 1 ${q[1][1]}`,L=`h${z[0]+W[0]-Y} a${q[2][0]} 0 0 1 ${q[2][1]}`,_=`v${W[1]+H[1]-X} a${q[3][0]} 0 0 1 ${q[3][1]}`;if(Q){let D=function(o){let u=W$([H,w,z,W][o]);return o===0?[[J+H[0]-u,K+H[1]-u],[J+H[0],K]]:o===1?[[J+Y-w[0]+u,K+w[1]-u],[J+Y,K+w[1]]]:o===2?[[J+Y-z[0]+u,K+X-z[1]+u],[J+Y-z[0],K+X]]:[[J+W[0]-u,K+X-W[1]+u],[J,K+X-W[1]]]},E=Q.indexOf(!1);if(!Q.includes(!0))throw new Error("Invalid `partialSides`.");if(E===-1)E=0;else for(;!Q[E];)E=(E+1)%4;let j="",T=D(E),R=`M${T[0]} A${q[(E+3)%4][0]} 0 0 1 ${T[1]}`,S=0;for(;S<4&&Q[(E+S)%4];S++)j+=R+" ",R=[G,N,L,_][(E+S)%4];let x=(E+S)%4;j+=R.split(" ")[0];let c=D(x);return j+=` A${q[(x+3)%4][0]} 0 0 1 ${c[0]}`,j}return`M${J+H[0]},${K} ${G} ${N} ${L} ${_}`}function T1(J,K,Y){return Y[J+"Width"]===Y[K+"Width"]&&Y[J+"Style"]===Y[K+"Style"]&&Y[J+"Color"]===Y[K+"Color"]}function z$({id:J,currentClipPathId:K,borderPath:Y,borderType:X,left:Z,top:Q,width:H,height:w},W){if(!(W.borderTopWidth||W.borderRightWidth||W.borderBottomWidth||W.borderLeftWidth))return null;let z=`satori_bc-${J}`;return[n("clipPath",{id:z,"clip-path":K?`url(#${K})`:void 0},n(X,{x:Z,y:Q,width:H,height:w,d:Y||void 0})),z]}function yK({left:J,top:K,width:Y,height:X,props:Z,asContentMask:Q,maskBorderOnly:H},w){let W=["borderTop","borderRight","borderBottom","borderLeft"];if(!Q&&!W.some((B)=>w[B+"Width"]))return"";let z="",U=0;for(;U>0&&T1(W[U],W[(U+3)%4],w);)U=(U+3)%4;let $=[!1,!1,!1,!1],V=[];for(let B=0;B<4;B++){let M=(U+B)%4,q=(U+B+1)%4,G=W[M],N=W[q];if($[M]=!0,V=[w[G+"Width"],w[G+"Style"],w[G+"Color"],G],!T1(G,N,w)){let L=(V[0]||0)+(Q&&!H&&w[G.replace("border","padding")]||0);L&&(z+=n("path",{width:Y,height:X,...Z,fill:"none",stroke:Q?"#000":V[2],"stroke-width":L*2,"stroke-dasharray":!Q&&V[1]==="dashed"?L*2+" "+L:void 0,d:x9({left:J,top:K,width:Y,height:X},w,$)})),$=[!1,!1,!1,!1]}}if($.some(Boolean)){let B=(V[0]||0)+(Q&&!H&&w[V[3].replace("border","padding")]||0);B&&(z+=n("path",{width:Y,height:X,...Z,fill:"none",stroke:Q?"#000":V[2],"stroke-width":B*2,"stroke-dasharray":!Q&&V[1]==="dashed"?B*2+" "+B:void 0,d:x9({left:J,top:K,width:Y,height:X},w,$)}))}return z}function U$({id:J,left:K,top:Y,width:X,height:Z,matrix:Q,borderOnly:H},w){let W=(w.borderLeftWidth||0)+(H?0:w.paddingLeft||0),z=(w.borderTopWidth||0)+(H?0:w.paddingTop||0),U=(w.borderRightWidth||0)+(H?0:w.paddingRight||0),$=(w.borderBottomWidth||0)+(H?0:w.paddingBottom||0),V={x:K+W,y:Y+z,width:X-W-U,height:Z-z-$};return n("mask",{id:J},n("rect",{...V,fill:"#fff",transform:w.overflow==="hidden"&&w.transform&&Q?Q:void 0,mask:w._inheritedMaskId?`url(#${w._inheritedMaskId})`:void 0})+yK({left:K,top:Y,width:X,height:Z,props:{transform:Q||void 0},asContentMask:!0,maskBorderOnly:H},w))}var h6={circle:/circle\((.+)\)/,ellipse:/ellipse\((.+)\)/,path:/path\((.+)\)/,polygon:/polygon\((.+)\)/,inset:/inset\((.+)\)/};function $$({width:J,height:K},Y,X){function Z(z){let U=z.match(h6.circle);if(!U)return null;let[,$]=U,[V,B=""]=$.split("at").map((G)=>G.trim()),{x:M,y:q}=P1(B,J,K);return{type:"circle",r:z0(V,X.fontSize,Math.sqrt(Math.pow(J,2)+Math.pow(K,2))/Math.sqrt(2),X,!0),cx:z0(M,X.fontSize,J,X,!0),cy:z0(q,X.fontSize,K,X,!0)}}function Q(z){let U=z.match(h6.ellipse);if(!U)return null;let[,$]=U,[V,B=""]=$.split("at").map((L)=>L.trim()),[M,q]=V.split(" "),{x:G,y:N}=P1(B,J,K);return{type:"ellipse",rx:z0(M||"50%",X.fontSize,J,X,!0),ry:z0(q||"50%",X.fontSize,K,X,!0),cx:z0(G,X.fontSize,J,X,!0),cy:z0(N,X.fontSize,K,X,!0)}}function H(z){let U=z.match(h6.path);if(!U)return null;let[$,V]=C1(U[1]);return{type:"path",d:V,"fill-rule":$}}function w(z){let U=z.match(h6.polygon);if(!U)return null;let[$,V]=C1(U[1]);return{type:"polygon","fill-rule":$,points:V.split(",").map((B)=>B.split(" ").map((M,q)=>z0(M,X.fontSize,q===0?J:K,X,!0)).join(" ")).join(",")}}function W(z){let U=z.match(h6.inset);if(!U)return null;let[$,V]=(U[1].includes("round")?U[1]:`${U[1].trim()} round 0`).split("round"),B=M4.getStylesForProperty("borderRadius",V,!0),M=Object.values(B).map((D)=>String(D)).map((D,E)=>z0(D,X.fontSize,E===0||E===2?K:J,X,!0)||0),q=Object.values(M4.getStylesForProperty("margin",$,!0)).map((D)=>String(D)).map((D,E)=>z0(D,X.fontSize,E===0||E===2?K:J,X,!0)||0),G=q[3],N=q[0],L=J-(q[1]+q[3]),_=K-(q[0]+q[2]);return M.some((D)=>D>0)?{type:"path",d:x9({left:G,top:N,width:L,height:_},{...Y,...B})}:{type:"rect",x:G,y:N,width:L,height:_}}return{parseCircle:Z,parseEllipse:Q,parsePath:H,parsePolygon:w,parseInset:W}}function C1(J){let[,K="nonzero",Y]=J.replace(/('|")/g,"").match(/^(nonzero|evenodd)?,?(.+)/)||[];return[K,Y]}function P1(J,K,Y){let X=J.split(" "),Z={x:X[0]||"50%",y:X[1]||"50%"};return X.forEach((Q)=>{Q==="top"?Z.y=0:Q==="bottom"?Z.y=Y:Q==="left"?Z.x=0:Q==="right"?Z.x=K:Q==="center"&&(Z.x=K/2,Z.y=Y/2)}),Z}function v4(J){return`satori_cp-${J}`}function V$(J){return`url(#${v4(J)})`}function B$(J,K,Y){if(K.clipPath==="none")return"";let X=$$(J,K,Y),Z=K.clipPath,Q={type:""};for(let H of Object.keys(X))if(Q=X[H](Z),Q)break;if(Q){let{type:H,...w}=Q;return n("clipPath",{id:v4(J.id),"clip-path":J.currentClipPath,transform:`translate(${J.left}, ${J.top})`},n(H,w))}return""}function q$({left:J,top:K,width:Y,height:X,path:Z,matrix:Q,id:H,currentClipPath:w,src:W},z,U){let $="",V=z.clipPath&&z.clipPath!=="none"?B$({left:J,top:K,width:Y,height:X,path:Z,id:H,matrix:Q,currentClipPath:w,src:W},z,U):"";if(z.overflow!=="hidden"&&!W)$="";else{let M=V?`satori_ocp-${H}`:v4(H);$=n("clipPath",{id:M,"clip-path":w},n(Z?"path":"rect",{x:J,y:K,width:Y,height:X,d:Z||void 0,transform:z.overflow==="hidden"&&z.transform&&Q?Q:void 0}))}let B=U$({id:`satori_om-${H}`,left:J,top:K,width:Y,height:X,matrix:Q,borderOnly:!W},z);return V+$+B}var A$=(J)=>`satori_mi-${J}`;async function G$(J,K,Y){if(!K.maskImage)return["",""];let{left:X,top:Z,width:Q,height:H,id:w}=J,W=K.maskImage,z=W.length;if(!z)return["",""];let U=A$(w),$="";for(let V=0;V<z;V++){let B=W[V],[M,q]=await vK({id:`${U}-${V}`,left:X,top:Z,width:Q,height:H},B,Y,"mask");$+=q+n("rect",{x:X,y:Z,width:Q,height:H,fill:`url(#${M})`})}return $=n("mask",{id:U},$),[U,$]}async function w4({id:J,left:K,top:Y,width:X,height:Z,isInheritingTransform:Q,src:H,debug:w},W,z){if(W.display==="none")return"";let U=!!H,$="rect",V="",B="",M=[],q=1,G="";W.backgroundColor&&M.push(W.backgroundColor),W.opacity!==void 0&&(q=+W.opacity),W.transform&&(V=CK({left:K,top:Y,width:X,height:Z},W.transform,Q,W.transformOrigin));let N="";if(W.backgroundImage){let P=[];for(let I=0;I<W.backgroundImage.length;I++){let f=W.backgroundImage[I],l=await vK({id:J+"_"+I,width:X,height:Z,left:K,top:Y},f,z);l&&P.unshift(l)}for(let I of P)M.push(`url(#${I[0]})`),B+=I[1],I[2]&&(N+=I[2])}let[L,_]=await G$({id:J,left:K,top:Y,width:X,height:Z},W,z);B+=_;let D=L?`url(#${L})`:W._inheritedMaskId?`url(#${W._inheritedMaskId})`:void 0,E=x9({left:K,top:Y,width:X,height:Z},W);E&&($="path");let j=W._inheritedClipPathId;w&&(G=n("rect",{x:K,y:Y,width:X,height:Z,fill:"transparent",stroke:"#ff5757","stroke-width":1,transform:V||void 0,"clip-path":j?`url(#${j})`:void 0}));let{backgroundClip:T,filter:R}=W,S=T==="text"?`url(#satori_bct-${J})`:j?`url(#${j})`:W.clipPath?V$(J):void 0,x=q$({left:K,top:Y,width:X,height:Z,path:E,id:J,matrix:V,currentClipPath:S,src:H},W,z),c=M.map((P)=>n($,{x:K,y:Y,width:X,height:Z,fill:P,d:E||void 0,transform:V||void 0,"clip-path":W.transform?void 0:S,style:R?`filter:${R}`:void 0,mask:W.transform?void 0:D})).join(""),o=z$({id:J,left:K,top:Y,width:X,height:Z,currentClipPathId:j,borderPath:E,borderType:$},W),u;if(U){let P=(W.borderLeftWidth||0)+(W.paddingLeft||0),I=(W.borderTopWidth||0)+(W.paddingTop||0),f=(W.borderRightWidth||0)+(W.paddingRight||0),l=(W.borderBottomWidth||0)+(W.paddingBottom||0),t=W.objectFit==="contain"?"xMidYMid":W.objectFit==="cover"?"xMidYMid slice":"none";W.transform&&(u=w$({id:J,borderRadiusPath:E,borderType:$,left:K,top:Y,width:X,height:Z},W)),c+=n("image",{x:K+P,y:Y+I,width:X-P-f,height:Z-I-l,href:H,preserveAspectRatio:t,transform:V||void 0,style:R?`filter:${R}`:void 0,"clip-path":W.transform?u?`url(#${u[1]})`:void 0:`url(#satori_cp-${J})`,mask:W.transform?void 0:L?`url(#${L})`:`url(#satori_om-${J})`})}if(o){B+=o[0];let P=o[1];c+=yK({left:K,top:Y,width:X,height:Z,props:{transform:V||void 0,"clip-path":`url(#${P})`}},W)}let C=hU({width:X,height:Z,id:J,opacity:q,shape:n($,{x:K,y:Y,width:X,height:Z,fill:"#fff",stroke:"#fff","stroke-width":0,d:E||void 0,transform:V||void 0,"clip-path":S,mask:D})},W);return(B?n("defs",{},B):"")+(C?C[0]:"")+(u?u[0]:"")+x+(q!==1?`<g opacity="${q}">`:"")+(W.transform&&(S||D)?`<g${S?` clip-path="${S}"`:""}${D?` mask="${D}"`:""}>`:"")+(N||c)+(W.transform&&(S||D)?"</g>":"")+(q!==1?"</g>":"")+(C?C[1]:"")+G}var M$=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,O$=new RegExp(M$(),""),O4={emoji:O$,symbol:/\p{Symbol}/u,math:/\p{Math}/u},N4={"ja-JP":/\p{scx=Hira}|\p{scx=Kana}|\p{scx=Han}|[\u3000]|[\uFF00-\uFFEF]/u,"ko-KR":/\p{scx=Hangul}/u,"zh-CN":/\p{scx=Han}/u,"zh-TW":/\p{scx=Han}/u,"zh-HK":/\p{scx=Han}/u,"th-TH":/\p{scx=Thai}/u,"bn-IN":/\p{scx=Bengali}/u,"ar-AR":/\p{scx=Arabic}/u,"ta-IN":/\p{scx=Tamil}/u,"ml-IN":/\p{scx=Malayalam}/u,"he-IL":/\p{scx=Hebrew}/u,"te-IN":/\p{scx=Telugu}/u,devanagari:/\p{scx=Devanagari}/u,kannada:/\p{scx=Kannada}/u},y4=Object.keys({...N4,...O4});function N$(J){return y4.includes(J)}function L$(J,K){for(let X of Object.keys(O4))if(O4[X].test(J))return[X];let Y=Object.keys(N4).filter((X)=>N4[X].test(J));if(Y.length===0)return["unknown"];if(K){let X=Y.findIndex((Z)=>Z===K);X!==-1&&(Y.splice(X,1),Y.unshift(K))}return Y}function j$(J){if(J)return y4.find((K)=>K.toLowerCase().startsWith(J.toLowerCase()))}async function*L4(J,K){var Y;let X=await f9(),{id:Z,inheritedStyle:Q,parent:H,font:w,debug:W,locale:z,embedFont:U=!0,graphemeImages:$,canLoadAdditionalAssets:V,getTwStyles:B}=K;if(J===null||typeof J>"u")return yield,yield,"";if(!P9(J)||typeof J.type=="function"){let k;if(!P9(J))k=rU(String(J),K),yield(await k.next()).value;else{if(az(J.type))throw new Error("Class component is not supported.");k=L4(J.type(J.props),K),yield(await k.next()).value}await k.next();let r=yield;return(await k.next(r)).value}let{type:M,props:q}=J;if(q&&tz(q))throw new Error("dangerouslySetInnerHTML property is not supported. See documentation for more information https://github.com/vercel/satori#jsx.");let{style:G,children:N,tw:L,lang:_=z}=q||{},D=j$(_);if(L){let k=B(L,G);G=Object.assign(k,G)}let E=X.Node.create();H.insertChild(E,H.getChildCount());let[j,T]=await SU(E,M,Q,G,q),R=j.transform===Q.transform;if(R||(j.transform.__parent=Q.transform),(j.overflow==="hidden"||j.clipPath&&j.clipPath!=="none")&&(T._inheritedClipPathId=`satori_cp-${Z}`,T._inheritedMaskId=`satori_om-${Z}`),j.maskImage&&(T._inheritedMaskId=`satori_mi-${Z}`),j.backgroundClip==="text"){let k={value:""};T._inheritedBackgroundClipTextPath=k,j._inheritedBackgroundClipTextPath=k}let S=ez(N),x=[],c=0,o=[];for(let k of S){let r=L4(k,{id:Z+"-"+c++,parentStyle:j,inheritedStyle:T,isInheritingTransform:!0,parent:E,font:w,embedFont:U,debug:W,graphemeImages:$,canLoadAdditionalAssets:V,locale:D,getTwStyles:B,onNodeDetected:K.onNodeDetected});V?o.push(...(await r.next()).value||[]):await r.next(),x.push(r)}yield o;for(let k of x)await k.next();let[u,C]=yield,{left:P,top:I,width:f,height:l}=E.getComputedLayout();P+=u,I+=C;let t="",s="",m="",{children:d,...y}=q;if((Y=K.onNodeDetected)==null||Y.call(K,{left:P,top:I,width:f,height:l,type:M,props:y,key:J.key,textContent:P9(d)?void 0:d}),M==="img"){let k=j.__src;s=await w4({id:Z,left:P,top:I,width:f,height:l,src:k,isInheritingTransform:R,debug:W},j,T)}else if(M==="svg"){let k=j.color,r=await GU(J,k);s=await w4({id:Z,left:P,top:I,width:f,height:l,src:r,isInheritingTransform:R,debug:W},j,T)}else{let k=G==null?void 0:G.display;if(M==="div"&&N&&typeof N!="string"&&k!=="flex"&&k!=="none")throw new Error('Expected <div> to have explicit "display: flex" or "display: none" if it has more than one child node.');s=await w4({id:Z,left:P,top:I,width:f,height:l,isInheritingTransform:R,debug:W},j,T)}for(let k of x)t+=(await k.next([P,I])).value;return j._inheritedBackgroundClipTextPath&&(m+=n("clipPath",{id:`satori_bct-${Z}`,"clip-path":j._inheritedClipPathId?`url(#${j._inheritedClipPathId})`:void 0},j._inheritedBackgroundClipTextPath.value)),m+s+t}var kK="unknown";function F$(J,K,[Y,X],[Z,Q]){if(Y!==Z)return Y?!Z||Y===J?-1:Z===J?1:J===400&&Y===500||J===500&&Y===400?-1:J===400&&Z===500||J===500&&Z===400?1:J<400?Y<J&&Z<J?Z-Y:Y<J?-1:Z<J?1:Y-Z:J<Y&&J<Z?Y-Z:J<Y?-1:J<Z?1:Z-Y:1;if(X!==Q){if(X===K)return-1;if(Q===K)return 1}return-1}var E$=class{constructor(J){this.fonts=new Map,this.addFonts(J)}get({name:J,weight:K,style:Y}){if(!this.fonts.has(J))return null;K==="normal"&&(K=400),K==="bold"&&(K=700),typeof K=="string"&&(K=Number.parseInt(K,10));let X=[...this.fonts.get(J)],Z=X[0];for(let Q=1;Q<X.length;Q++){let[,H,w]=Z,[,W,z]=X[Q];F$(K,Y,[H,w],[W,z])>0&&(Z=X[Q])}return Z[0]}addFonts(J){for(let K of J){let{name:Y,data:X,lang:Z}=K;if(Z&&!N$(Z))throw new Error(`Invalid value for props \`lang\`: "${Z}". The value must be one of the following: ${y4.join(", ")}.`);let Q=Z??kK,H=O9.parse("buffer"in X?X.buffer.slice(X.byteOffset,X.byteOffset+X.byteLength):X,{lowMemory:!0}),w=H.charToGlyphIndex;H.charToGlyphIndex=(z)=>{let U=w.call(H,z);return U===0&&H._trackBrokenChars&&H._trackBrokenChars.push(z),U},this.defaultFont||(this.defaultFont=H);let W=`${Y.toLowerCase()}_${Q}`;this.fonts.has(W)||this.fonts.set(W,[]),this.fonts.get(W).push([H,K.weight,K.style])}}getEngine(J=16,K="normal",{fontFamily:Y="sans-serif",fontWeight:X=400,fontStyle:Z="normal"},Q){if(!this.fonts.size)throw new Error("No fonts are loaded. At least one font is required to calculate the layout.");Y=(Array.isArray(Y)?Y:[Y]).map((N)=>N.toLowerCase());let H=[];Y.forEach((N)=>{let L=this.get({name:N,weight:X,style:Z});if(L){H.push(L);return}let _=this.get({name:N+"_unknown",weight:X,style:Z});if(_){H.push(_);return}});let w=Array.from(this.fonts.keys()),W=[],z=[],U=[];for(let N of w)if(!Y.includes(N))if(Q){let L=_$(N);L?L===Q?W.push(this.get({name:N,weight:X,style:Z})):z.push(this.get({name:N,weight:X,style:Z})):U.push(this.get({name:N,weight:X,style:Z}))}else U.push(this.get({name:N,weight:X,style:Z}));let $=new Map,V=(N,L=!0)=>{let _=[...H,...U,...W,...L?z:[]];if(typeof N>"u")return L?_[_.length-1]:void 0;let D=N.charCodeAt(0);if($.has(D))return $.get(D);let E=_.find((j,T)=>!!j.charToGlyphIndex(N)||L&&T===_.length-1);return E&&$.set(D,E),E},B=(N,L=!1)=>{var _,D;return((L?(D=(_=N.tables)==null?void 0:_.os2)==null?void 0:D.sTypoAscender:0)||N.ascender)/N.unitsPerEm*J},M=(N,L=!1)=>{var _,D;return((L?(D=(_=N.tables)==null?void 0:_.os2)==null?void 0:D.sTypoDescender:0)||N.descender)/N.unitsPerEm*J},q=(N,L=!1)=>{var _,D;if(typeof K=="string"&&K==="normal"){let E=(L?(D=(_=N.tables)==null?void 0:_.os2)==null?void 0:D.sTypoLineGap:0)||0;return B(N,L)-M(N,L)+E/N.unitsPerEm*J}else if(typeof K=="number")return J*K},G=(N)=>V(N,!1);return{has:(N)=>{if(N===`
|
|
66
|
+
`)return!0;let L=G(N);return L?(L._trackBrokenChars=[],L.stringToGlyphs(N),L._trackBrokenChars.length?(L._trackBrokenChars=void 0,!1):!0):!1},baseline:(N,L=typeof N>"u"?H[0]:V(N))=>{let _=B(L),D=M(L),E=_-D;return _+(q(L)-E)/2},height:(N,L=typeof N>"u"?H[0]:V(N))=>q(L),measure:(N,L)=>this.measure(V,N,L),getSVG:(N,L)=>this.getSVG(V,N,L)}}patchFontFallbackResolver(J,K){let Y=[];J._trackBrokenChars=Y;let X=J.stringToGlyphs;return J.stringToGlyphs=(Z,...Q)=>{let H=X.call(J,Z,...Q);for(let w=0;w<H.length;w++)if(H[w].unicode===void 0){let W=Y.shift(),z=K(W);if(z!==J){let U=z.charToGlyph(W),$=J.unitsPerEm/z.unitsPerEm,V=new O9.Path;V.unitsPerEm=J.unitsPerEm,V.commands=U.path.commands.map((M)=>{let q={...M};for(let G in q)typeof q[G]=="number"&&(q[G]*=$);return q});let B=new O9.Glyph({...U,advanceWidth:U.advanceWidth*$,xMin:U.xMin*$,xMax:U.xMax*$,yMin:U.yMin*$,yMax:U.yMax*$,path:V});H[w]=B}}return H},()=>{J.stringToGlyphs=X,J._trackBrokenChars=void 0}}measure(J,K,{fontSize:Y,letterSpacing:X=0}){let Z=J(K),Q=this.patchFontFallbackResolver(Z,J);try{return Z.getAdvanceWidth(K,Y,{letterSpacing:X/Y})}finally{Q()}}getSVG(J,K,{fontSize:Y,top:X,left:Z,letterSpacing:Q=0}){let H=J(K),w=this.patchFontFallbackResolver(H,J);try{return Y===0?"":H.getPath(K.replace(/\n/g,""),Z,X,Y,{letterSpacing:Q/Y}).toPathData(1)}finally{w()}}};function _$(J){let K=J.split("_"),Y=K[K.length-1];return Y===kK?void 0:Y}function R$({width:J,height:K,content:Y}){return n("svg",{width:J,height:K,viewBox:`0 0 ${J} ${K}`,xmlns:"http://www.w3.org/2000/svg"},Y)}var D$=Xz(mz()),I$=["ios","android","windows","macos","web"];function T$(J){return I$.includes(J)}var C$=["portrait","landscape"];function P$(J){return C$.includes(J)}var S1;(function(J){J.fontSize="fontSize",J.lineHeight="lineHeight"})(S1||(S1={}));var G0;(function(J){J.rem="rem",J.em="em",J.px="px",J.percent="%",J.vw="vw",J.vh="vh",J.none="<no-css-unit>"})(G0||(G0={}));function v1(J){return typeof J=="string"}function y1(J){return typeof J=="object"}var z4;function h(J){return{kind:"complete",style:J}}function K8(J,K={}){let{fractions:Y}=K;if(Y&&J.includes("/")){let[Q="",H=""]=J.split("/",2),w=K8(Q),W=K8(H);return!w||!W?null:[w[0]/W[0],W[1]]}let X=parseFloat(J);if(Number.isNaN(X))return null;let Z=J.match(/(([a-z]{2,}|%))$/);if(!Z)return[X,G0.none];switch(Z==null?void 0:Z[1]){case"rem":return[X,G0.rem];case"px":return[X,G0.px];case"em":return[X,G0.em];case"%":return[X,G0.percent];case"vw":return[X,G0.vw];case"vh":return[X,G0.vh];default:return null}}function u6(J,K,Y={}){let X=K6(K,Y);return X===null?null:h({[J]:X})}function U4(J,K,Y){let X=K6(K);return X!==null&&(Y[J]=X),Y}function S$(J,K){let Y=K6(K);return Y===null?null:{[J]:Y}}function K6(J,K={}){if(J===void 0)return null;let Y=K8(String(J),K);return Y?p6(...Y,K):null}function p6(J,K,Y={}){let{isNegative:X,device:Z}=Y;switch(K){case G0.rem:return J*16*(X?-1:1);case G0.px:return J*(X?-1:1);case G0.percent:return`${X?"-":""}${J}%`;case G0.none:return J*(X?-1:1);case G0.vw:return Z!=null&&Z.windowDimensions?Z.windowDimensions.width*(J/100):(C8("`vw` CSS unit requires configuration with `useDeviceContext()`"),null);case G0.vh:return Z!=null&&Z.windowDimensions?Z.windowDimensions.height*(J/100):(C8("`vh` CSS unit requires configuration with `useDeviceContext()`"),null);default:return null}}function k1(J){let K=K8(J);if(!K)return null;let[Y,X]=K;switch(X){case G0.rem:return Y*16;case G0.px:return Y;default:return null}}var v$={t:"Top",tr:"TopRight",tl:"TopLeft",b:"Bottom",br:"BottomRight",bl:"BottomLeft",l:"Left",r:"Right",x:"Horizontal",y:"Vertical"};function gK(J){return v$[J??""]||"All"}function xK(J){let K="All";return[J.replace(/^-(t|b|r|l|tr|tl|br|bl)(-|$)/,(Y,X)=>(K=gK(X),"")),K]}function p9(J,K={}){if(J.includes("/")){let Y=g1(J,{...K,fractions:!0});if(Y)return Y}return J[0]==="["&&(J=J.slice(1,-1)),g1(J,K)}function Y6(J,K,Y={}){let X=p9(K,Y);return X===null?null:h({[J]:X})}function g1(J,K={}){if(J==="px")return 1;let Y=K8(J,K);if(!Y)return null;let[X,Z]=Y;return K.fractions&&(Z=G0.percent,X*=100),Z===G0.none&&(X=X/4,Z=G0.rem),p6(X,Z,K)}function y$(...J){console.warn(...J)}function k$(...J){}var C8=typeof process>"u"||((z4=process==null?void 0:process.env)===null||z4===void 0?void 0:z4.JEST_WORKER_ID)===void 0?y$:k$,g$=[["aspect-square",h({aspectRatio:1})],["aspect-video",h({aspectRatio:1.7777777777777777})],["items-center",h({alignItems:"center"})],["items-start",h({alignItems:"flex-start"})],["items-end",h({alignItems:"flex-end"})],["items-baseline",h({alignItems:"baseline"})],["items-stretch",h({alignItems:"stretch"})],["justify-start",h({justifyContent:"flex-start"})],["justify-end",h({justifyContent:"flex-end"})],["justify-center",h({justifyContent:"center"})],["justify-between",h({justifyContent:"space-between"})],["justify-around",h({justifyContent:"space-around"})],["justify-evenly",h({justifyContent:"space-evenly"})],["content-start",h({alignContent:"flex-start"})],["content-end",h({alignContent:"flex-end"})],["content-between",h({alignContent:"space-between"})],["content-around",h({alignContent:"space-around"})],["content-stretch",h({alignContent:"stretch"})],["content-center",h({alignContent:"center"})],["self-auto",h({alignSelf:"auto"})],["self-start",h({alignSelf:"flex-start"})],["self-end",h({alignSelf:"flex-end"})],["self-center",h({alignSelf:"center"})],["self-stretch",h({alignSelf:"stretch"})],["self-baseline",h({alignSelf:"baseline"})],["direction-inherit",h({direction:"inherit"})],["direction-ltr",h({direction:"ltr"})],["direction-rtl",h({direction:"rtl"})],["hidden",h({display:"none"})],["flex",h({display:"flex"})],["flex-row",h({flexDirection:"row"})],["flex-row-reverse",h({flexDirection:"row-reverse"})],["flex-col",h({flexDirection:"column"})],["flex-col-reverse",h({flexDirection:"column-reverse"})],["flex-wrap",h({flexWrap:"wrap"})],["flex-wrap-reverse",h({flexWrap:"wrap-reverse"})],["flex-nowrap",h({flexWrap:"nowrap"})],["flex-auto",h({flexGrow:1,flexShrink:1,flexBasis:"auto"})],["flex-initial",h({flexGrow:0,flexShrink:1,flexBasis:"auto"})],["flex-none",h({flexGrow:0,flexShrink:0,flexBasis:"auto"})],["overflow-hidden",h({overflow:"hidden"})],["overflow-visible",h({overflow:"visible"})],["overflow-scroll",h({overflow:"scroll"})],["absolute",h({position:"absolute"})],["relative",h({position:"relative"})],["italic",h({fontStyle:"italic"})],["not-italic",h({fontStyle:"normal"})],["oldstyle-nums",b6("oldstyle-nums")],["small-caps",b6("small-caps")],["lining-nums",b6("lining-nums")],["tabular-nums",b6("tabular-nums")],["proportional-nums",b6("proportional-nums")],["font-thin",h({fontWeight:"100"})],["font-100",h({fontWeight:"100"})],["font-extralight",h({fontWeight:"200"})],["font-200",h({fontWeight:"200"})],["font-light",h({fontWeight:"300"})],["font-300",h({fontWeight:"300"})],["font-normal",h({fontWeight:"normal"})],["font-400",h({fontWeight:"400"})],["font-medium",h({fontWeight:"500"})],["font-500",h({fontWeight:"500"})],["font-semibold",h({fontWeight:"600"})],["font-600",h({fontWeight:"600"})],["font-bold",h({fontWeight:"bold"})],["font-700",h({fontWeight:"700"})],["font-extrabold",h({fontWeight:"800"})],["font-800",h({fontWeight:"800"})],["font-black",h({fontWeight:"900"})],["font-900",h({fontWeight:"900"})],["include-font-padding",h({includeFontPadding:!0})],["remove-font-padding",h({includeFontPadding:!1})],["max-w-none",h({maxWidth:"99999%"})],["text-left",h({textAlign:"left"})],["text-center",h({textAlign:"center"})],["text-right",h({textAlign:"right"})],["text-justify",h({textAlign:"justify"})],["text-auto",h({textAlign:"auto"})],["underline",h({textDecorationLine:"underline"})],["line-through",h({textDecorationLine:"line-through"})],["no-underline",h({textDecorationLine:"none"})],["uppercase",h({textTransform:"uppercase"})],["lowercase",h({textTransform:"lowercase"})],["capitalize",h({textTransform:"capitalize"})],["normal-case",h({textTransform:"none"})],["w-auto",h({width:"auto"})],["h-auto",h({height:"auto"})],["shadow-sm",h({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowRadius:1,shadowOpacity:0.025,elevation:1})],["shadow",h({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowRadius:1,shadowOpacity:0.075,elevation:2})],["shadow-md",h({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowRadius:3,shadowOpacity:0.125,elevation:3})],["shadow-lg",h({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowOpacity:0.15,shadowRadius:8,elevation:8})],["shadow-xl",h({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowOpacity:0.19,shadowRadius:20,elevation:12})],["shadow-2xl",h({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowOpacity:0.25,shadowRadius:30,elevation:16})],["shadow-none",h({shadowOffset:{width:0,height:0},shadowColor:"#000",shadowRadius:0,shadowOpacity:0,elevation:0})]],x1=g$;function b6(J){return{kind:"dependent",complete(K){(!K.fontVariant||!Array.isArray(K.fontVariant))&&(K.fontVariant=[]),K.fontVariant.push(J)}}}var x$=class{constructor(J){this.ir=new Map(x1),this.styles=new Map,this.prefixes=new Map,this.ir=new Map([...x1,...J??[]])}getStyle(J){return this.styles.get(J)}setStyle(J,K){this.styles.set(J,K)}getIr(J){return this.ir.get(J)}setIr(J,K){this.ir.set(J,K)}getPrefixMatch(J){return this.prefixes.get(J)}setPrefixMatch(J,K){this.prefixes.set(J,K)}};function h$(J,K,Y={}){let X=K==null?void 0:K[J];if(!X)return Y6("fontSize",J,Y);if(typeof X=="string")return u6("fontSize",X);let Z={},[Q,H]=X,w=S$("fontSize",Q);if(w&&(Z=w),typeof H=="string")return h(U4("lineHeight",h1(H,Z),Z));let{lineHeight:W,letterSpacing:z}=H;return W&&U4("lineHeight",h1(W,Z),Z),z&&U4("letterSpacing",z,Z),h(Z)}function h1(J,K){let Y=K8(J);if(Y){let[X,Z]=Y;if((Z===G0.none||Z===G0.em)&&typeof K.fontSize=="number")return K.fontSize*X}return J}function b$(J,K){var Y;let X=(Y=K==null?void 0:K[J])!==null&&Y!==void 0?Y:J.startsWith("[")?J.slice(1,-1):J,Z=K8(X);if(!Z)return null;let[Q,H]=Z;if(H===G0.none)return{kind:"dependent",complete(W){if(typeof W.fontSize!="number")return"relative line-height utilities require that font-size be set";W.lineHeight=W.fontSize*Q}};let w=p6(Q,H);return w!==null?h({lineHeight:w}):null}function m$(J,K,Y,X,Z){let Q="";if(X[0]==="[")Q=X.slice(1,-1);else{let z=Z==null?void 0:Z[X];if(z)Q=z;else{let U=p9(X);return U&&typeof U=="number"?b1(U,G0.px,K,J):null}}if(Q==="auto")return hK(K,J,"auto");let H=K8(Q);if(!H)return null;let[w,W]=H;return Y&&(w=-w),b1(w,W,K,J)}function b1(J,K,Y,X){let Z=p6(J,K);return Z===null?null:hK(Y,X,Z)}function hK(J,K,Y){switch(J){case"All":return{kind:"complete",style:{[`${K}Top`]:Y,[`${K}Right`]:Y,[`${K}Bottom`]:Y,[`${K}Left`]:Y}};case"Bottom":case"Top":case"Left":case"Right":return{kind:"complete",style:{[`${K}${J}`]:Y}};case"Vertical":return{kind:"complete",style:{[`${K}Top`]:Y,[`${K}Bottom`]:Y}};case"Horizontal":return{kind:"complete",style:{[`${K}Left`]:Y,[`${K}Right`]:Y}};default:return null}}function f$(J){if(!J)return{};let K=Object.entries(J).reduce((Z,[Q,H])=>{let w=[0,1/0,0],W=typeof H=="string"?{min:H}:H,z=W.min?k1(W.min):0;z===null?C8(`invalid screen config value: ${Q}->min: ${W.min}`):w[0]=z;let U=W.max?k1(W.max):1/0;return U===null?C8(`invalid screen config value: ${Q}->max: ${W.max}`):w[1]=U,Z[Q]=w,Z},{}),Y=Object.values(K);Y.sort((Z,Q)=>{let[H,w]=Z,[W,z]=Q;return w===1/0||z===1/0?H-W:w-z});let X=0;return Y.forEach((Z)=>Z[2]=X++),K}function d$(J,K){let Y=K==null?void 0:K[J];if(!Y)return null;if(typeof Y=="string")return h({fontFamily:Y});let X=Y[0];return X?h({fontFamily:X}):null}function f6(J,K,Y){if(!Y)return null;let X;K.includes("/")&&([K="",X]=K.split("/",2));let Z="";if(K.startsWith("[#")||K.startsWith("[rgb")?Z=K.slice(1,-1):Z=bK(K,Y),!Z)return null;if(X){let Q=Number(X);if(!Number.isNaN(Q))return Z=m1(Z,Q/100),h({[k9[J].color]:Z})}return{kind:"dependent",complete(Q){let H=k9[J].opacity,w=Q[H];typeof w=="number"&&(Z=m1(Z,w)),Q[k9[J].color]=Z}}}function D9(J,K){let Y=parseInt(K,10);if(Number.isNaN(Y))return null;let X=Y/100;return{kind:"complete",style:{[k9[J].opacity]:X}}}function m1(J,K){return J.startsWith("#")?J=c$(J):J.startsWith("rgb(")&&(J=J.replace(/^rgb\(/,"rgba(").replace(/\)$/,", 1)")),J.replace(/, ?\d*\.?(\d+)\)$/,`, ${K})`)}function l$(J){for(let K in J)K.startsWith("__opacity_")&&delete J[K]}var k9={bg:{opacity:"__opacity_bg",color:"backgroundColor"},text:{opacity:"__opacity_text",color:"color"},border:{opacity:"__opacity_border",color:"borderColor"},borderTop:{opacity:"__opacity_border",color:"borderTopColor"},borderBottom:{opacity:"__opacity_border",color:"borderBottomColor"},borderLeft:{opacity:"__opacity_border",color:"borderLeftColor"},borderRight:{opacity:"__opacity_border",color:"borderRightColor"},shadow:{opacity:"__opacity_shadow",color:"shadowColor"},tint:{opacity:"__opacity_tint",color:"tintColor"}};function c$(J){let K=J;J=J.replace(u$,(H,w,W,z)=>w+w+W+W+z+z);let Y=p$.exec(J);if(!Y)return C8(`invalid config hex color value: ${K}`),"rgba(0, 0, 0, 1)";let X=parseInt(Y[1],16),Z=parseInt(Y[2],16),Q=parseInt(Y[3],16);return`rgba(${X}, ${Z}, ${Q}, 1)`}function bK(J,K){let Y=K[J];if(v1(Y))return Y;if(y1(Y)&&v1(Y.DEFAULT))return Y.DEFAULT;let[X="",...Z]=J.split("-");for(;X!==J;){let Q=K[X];if(y1(Q))return bK(Z.join("-"),Q);if(Z.length===0)return"";X=`${X}-${Z.shift()}`}return""}var u$=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,p$=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;function i$(J,K){let[Y,X]=xK(J);if(Y.match(/^(-?(\d)+)?$/))return o$(Y,X,K==null?void 0:K.borderWidth);if(Y=Y.replace(/^-/,""),["dashed","solid","dotted"].includes(Y))return h({borderStyle:Y});let Z="border";switch(X){case"Bottom":Z="borderBottom";break;case"Top":Z="borderTop";break;case"Left":Z="borderLeft";break;case"Right":Z="borderRight";break}let Q=f6(Z,Y,K==null?void 0:K.borderColor);if(Q)return Q;let H=`border${X==="All"?"":X}Width`;Y=Y.replace(/^-/,"");let w=Y.slice(1,-1),W=Y6(H,w);return typeof(W==null?void 0:W.style[H])!="number"?null:W}function o$(J,K,Y){if(!Y)return null;J=J.replace(/^-/,"");let X=Y[J===""?"DEFAULT":J];if(X===void 0)return null;let Z=`border${K==="All"?"":K}Width`;return u6(Z,X)}function r$(J,K){if(!K)return null;let[Y,X]=xK(J);Y=Y.replace(/^-/,""),Y===""&&(Y="DEFAULT");let Z=`border${X==="All"?"":X}Radius`,Q=K[Y];if(Q)return f1(u6(Z,Q));let H=Y6(Z,Y);return typeof(H==null?void 0:H.style[Z])!="number"?null:f1(H)}function f1(J){if((J==null?void 0:J.kind)!=="complete")return J;let K=J.style.borderTopRadius;K!==void 0&&(J.style.borderTopLeftRadius=K,J.style.borderTopRightRadius=K,delete J.style.borderTopRadius);let Y=J.style.borderBottomRadius;Y!==void 0&&(J.style.borderBottomLeftRadius=Y,J.style.borderBottomRightRadius=Y,delete J.style.borderBottomRadius);let X=J.style.borderLeftRadius;X!==void 0&&(J.style.borderBottomLeftRadius=X,J.style.borderTopLeftRadius=X,delete J.style.borderLeftRadius);let Z=J.style.borderRightRadius;return Z!==void 0&&(J.style.borderBottomRightRadius=Z,J.style.borderTopRightRadius=Z,delete J.style.borderRightRadius),J}function m6(J,K,Y,X){let Z=null;J==="inset"&&(K=K.replace(/^(x|y)-/,(w,W)=>(Z=W==="x"?"x":"y","")));let Q=X==null?void 0:X[K];if(Q){let w=K6(Q,{isNegative:Y});if(w!==null)return d1(J,Z,w)}let H=p9(K,{isNegative:Y});return H!==null?d1(J,Z,H):null}function d1(J,K,Y){if(J!=="inset")return h({[J]:Y});switch(K){case null:return h({top:Y,left:Y,right:Y,bottom:Y});case"y":return h({top:Y,bottom:Y});case"x":return h({left:Y,right:Y})}}function I9(J,K,Y){var X;K=K.replace(/^-/,"");let Z=K===""?"DEFAULT":K,Q=Number((X=Y==null?void 0:Y[Z])!==null&&X!==void 0?X:K);return Number.isNaN(Q)?null:h({[`flex${J}`]:Q})}function n$(J,K){var Y,X;if(J=(K==null?void 0:K[J])||J,["min-content","revert","unset"].includes(J))return null;if(J.match(/^\d+(\.\d+)?$/))return h({flexGrow:Number(J),flexBasis:"0%"});let Z=J.match(/^(\d+)\s+(\d+)$/);if(Z)return h({flexGrow:Number(Z[1]),flexShrink:Number(Z[2])});if(Z=J.match(/^(\d+)\s+([^ ]+)$/),Z){let Q=K6((Y=Z[2])!==null&&Y!==void 0?Y:"");return Q?h({flexGrow:Number(Z[1]),flexBasis:Q}):null}if(Z=J.match(/^(\d+)\s+(\d+)\s+(.+)$/),Z){let Q=K6((X=Z[3])!==null&&X!==void 0?X:"");return Q?h({flexGrow:Number(Z[1]),flexShrink:Number(Z[2]),flexBasis:Q}):null}return null}function l1(J,K,Y={},X){let Z=X==null?void 0:X[K];return Z!==void 0?u6(J,Z,Y):Y6(J,K,Y)}function T9(J,K,Y={},X){let Z=K6(X==null?void 0:X[K],Y);return Z?h({[J]:Z}):(K==="screen"&&(K=J.includes("Width")?"100vw":"100vh"),Y6(J,K,Y))}function s$(J,K,Y){let X=Y==null?void 0:Y[J];if(X){let Z=K8(X,{isNegative:K});if(!Z)return null;let[Q,H]=Z;if(H===G0.em)return a$(Q);if(H===G0.percent)return C8("percentage-based letter-spacing configuration currently unsupported, switch to `em`s, or open an issue if you'd like to see support added."),null;let w=p6(Q,H,{isNegative:K});return w!==null?h({letterSpacing:w}):null}return Y6("letterSpacing",J,{isNegative:K})}function a$(J){return{kind:"dependent",complete(K){let Y=K.fontSize;if(typeof Y!="number"||Number.isNaN(Y))return"tracking-X relative letter spacing classes require font-size to be set";K.letterSpacing=Math.round((J*Y+Number.EPSILON)*100)/100}}}function t$(J,K){let Y=K==null?void 0:K[J];if(Y){let Z=K8(String(Y));if(Z)return h({opacity:Z[0]})}let X=K8(J);return X?h({opacity:X[0]/100}):null}function e$(J){let K=parseInt(J,10);return Number.isNaN(K)?null:{kind:"complete",style:{shadowOpacity:K/100}}}function JV(J){if(J.includes("/")){let[Y="",X=""]=J.split("/",2),Z=$4(Y),Q=$4(X);return Z===null||Q===null?null:{kind:"complete",style:{shadowOffset:{width:Z,height:Q}}}}let K=$4(J);return K===null?null:{kind:"complete",style:{shadowOffset:{width:K,height:K}}}}function $4(J){let K=p9(J);return typeof K=="number"?K:null}var c1=class{constructor(J,K={},Y,X,Z){var Q,H,w,W,z,U;this.config=K,this.cache=Y,this.position=0,this.isNull=!1,this.isNegative=!1,this.context={},this.context.device=X;let $=J.trim().split(":"),V=[];$.length===1?this.string=J:(this.string=(Q=$.pop())!==null&&Q!==void 0?Q:"",V=$),this.char=this.string[0];let B=f$((H=this.config.theme)===null||H===void 0?void 0:H.screens);for(let M of V)if(B[M]){let q=(w=B[M])===null||w===void 0?void 0:w[2];q!==void 0&&(this.order=((W=this.order)!==null&&W!==void 0?W:0)+q);let G=(z=X.windowDimensions)===null||z===void 0?void 0:z.width;if(G){let[N,L]=(U=B[M])!==null&&U!==void 0?U:[0,0];(G<=N||G>L)&&(this.isNull=!0)}else this.isNull=!0}else T$(M)?this.isNull=M!==Z:P$(M)?X.windowDimensions?(X.windowDimensions.width>X.windowDimensions.height?"landscape":"portrait")!==M?this.isNull=!0:this.incrementOrder():this.isNull=!0:M==="retina"?X.pixelDensity===2?this.incrementOrder():this.isNull=!0:M==="dark"?X.colorScheme!=="dark"?this.isNull=!0:this.incrementOrder():this.handlePossibleArbitraryBreakpointPrefix(M)||(this.isNull=!0)}parse(){if(this.isNull)return{kind:"null"};let J=this.cache.getIr(this.rest);if(J)return J;this.parseIsNegative();let K=this.parseUtility();return K?this.order!==void 0?{kind:"ordered",order:this.order,styleIr:K}:K:{kind:"null"}}parseUtility(){var J,K,Y,X,Z;let Q=this.config.theme,H=null;switch(this.char){case"m":case"p":{let w=this.peekSlice(1,3).match(/^(t|b|r|l|x|y)?-/);if(w){let W=this.char==="m"?"margin":"padding";this.advance(((K=(J=w[0])===null||J===void 0?void 0:J.length)!==null&&K!==void 0?K:0)+1);let z=gK(w[1]),U=m$(W,z,this.isNegative,this.rest,(Y=this.config.theme)===null||Y===void 0?void 0:Y[W]);if(U)return U}}}if(this.consumePeeked("h-")&&(H=l1("height",this.rest,this.context,Q==null?void 0:Q.height),H)||this.consumePeeked("w-")&&(H=l1("width",this.rest,this.context,Q==null?void 0:Q.width),H)||this.consumePeeked("min-w-")&&(H=T9("minWidth",this.rest,this.context,Q==null?void 0:Q.minWidth),H)||this.consumePeeked("min-h-")&&(H=T9("minHeight",this.rest,this.context,Q==null?void 0:Q.minHeight),H)||this.consumePeeked("max-w-")&&(H=T9("maxWidth",this.rest,this.context,Q==null?void 0:Q.maxWidth),H)||this.consumePeeked("max-h-")&&(H=T9("maxHeight",this.rest,this.context,Q==null?void 0:Q.maxHeight),H)||this.consumePeeked("leading-")&&(H=b$(this.rest,Q==null?void 0:Q.lineHeight),H)||this.consumePeeked("text-")&&(H=h$(this.rest,Q==null?void 0:Q.fontSize,this.context),H||(H=f6("text",this.rest,Q==null?void 0:Q.textColor),H)||this.consumePeeked("opacity-")&&(H=D9("text",this.rest),H))||this.consumePeeked("font-")&&(H=d$(this.rest,Q==null?void 0:Q.fontFamily),H)||this.consumePeeked("aspect-")&&(this.consumePeeked("ratio-")&&C8("`aspect-ratio-{ratio}` is deprecated, use `aspect-{ratio}` instead"),H=u6("aspectRatio",this.rest,{fractions:!0}),H)||this.consumePeeked("tint-")&&(H=f6("tint",this.rest,Q==null?void 0:Q.colors),H)||this.consumePeeked("bg-")&&(H=f6("bg",this.rest,Q==null?void 0:Q.backgroundColor),H||this.consumePeeked("opacity-")&&(H=D9("bg",this.rest),H))||this.consumePeeked("border")&&(H=i$(this.rest,Q),H||this.consumePeeked("-opacity-")&&(H=D9("border",this.rest),H))||this.consumePeeked("rounded")&&(H=r$(this.rest,Q==null?void 0:Q.borderRadius),H)||this.consumePeeked("bottom-")&&(H=m6("bottom",this.rest,this.isNegative,Q==null?void 0:Q.inset),H)||this.consumePeeked("top-")&&(H=m6("top",this.rest,this.isNegative,Q==null?void 0:Q.inset),H)||this.consumePeeked("left-")&&(H=m6("left",this.rest,this.isNegative,Q==null?void 0:Q.inset),H)||this.consumePeeked("right-")&&(H=m6("right",this.rest,this.isNegative,Q==null?void 0:Q.inset),H)||this.consumePeeked("inset-")&&(H=m6("inset",this.rest,this.isNegative,Q==null?void 0:Q.inset),H)||this.consumePeeked("flex-")&&(this.consumePeeked("grow")?H=I9("Grow",this.rest,Q==null?void 0:Q.flexGrow):this.consumePeeked("shrink")?H=I9("Shrink",this.rest,Q==null?void 0:Q.flexShrink):H=n$(this.rest,Q==null?void 0:Q.flex),H)||this.consumePeeked("grow")&&(H=I9("Grow",this.rest,Q==null?void 0:Q.flexGrow),H)||this.consumePeeked("shrink")&&(H=I9("Shrink",this.rest,Q==null?void 0:Q.flexShrink),H)||this.consumePeeked("shadow-color-opacity-")&&(H=D9("shadow",this.rest),H)||this.consumePeeked("shadow-opacity-")&&(H=e$(this.rest),H)||this.consumePeeked("shadow-offset-")&&(H=JV(this.rest),H)||this.consumePeeked("shadow-radius-")&&(H=Y6("shadowRadius",this.rest),H)||this.consumePeeked("shadow-")&&(H=f6("shadow",this.rest,Q==null?void 0:Q.colors),H))return H;if(this.consumePeeked("elevation-")){let w=parseInt(this.rest,10);if(!Number.isNaN(w))return h({elevation:w})}if(this.consumePeeked("opacity-")&&(H=t$(this.rest,Q==null?void 0:Q.opacity),H)||this.consumePeeked("tracking-")&&(H=s$(this.rest,this.isNegative,Q==null?void 0:Q.letterSpacing),H))return H;if(this.consumePeeked("z-")){let w=Number((Z=(X=Q==null?void 0:Q.zIndex)===null||X===void 0?void 0:X[this.rest])!==null&&Z!==void 0?Z:this.rest);if(!Number.isNaN(w))return h({zIndex:w})}return C8(`\`${this.rest}\` unknown or invalid utility`),null}handlePossibleArbitraryBreakpointPrefix(J){var K;if(J[0]!=="m")return!1;let Y=J.match(/^(min|max)-(w|h)-\[([^\]]+)\]$/);if(!Y)return!1;if(!(!((K=this.context.device)===null||K===void 0)&&K.windowDimensions))return this.isNull=!0,!0;let X=this.context.device.windowDimensions,[,Z="",Q="",H=""]=Y,w=Q==="w"?X.width:X.height,W=K8(H,this.context);if(W===null)return this.isNull=!0,!0;let[z,U]=W;return U!=="px"&&(this.isNull=!0),(Z==="min"?w>=z:w<=z)?this.incrementOrder():this.isNull=!0,!0}advance(J=1){this.position+=J,this.char=this.string[this.position]}get rest(){return this.peekSlice(0,this.string.length)}peekSlice(J,K){return this.string.slice(this.position+J,this.position+K)}consumePeeked(J){return this.peekSlice(0,J.length)===J?(this.advance(J.length),!0):!1}parseIsNegative(){this.char==="-"&&(this.advance(),this.isNegative=!0,this.context.isNegative=!0)}incrementOrder(){var J;this.order=((J=this.order)!==null&&J!==void 0?J:0)+1}};function KV(J){let K=[],Y=null;return J.forEach((X)=>{if(typeof X=="string")K=[...K,...V4(X)];else if(Array.isArray(X))K=[...K,...X.flatMap(V4)];else if(typeof X=="object"&&X!==null)for(let[Z,Q]of Object.entries(X))typeof Q=="boolean"?K=[...K,...Q?V4(Z):[]]:Y?Y[Z]=Q:Y={[Z]:Q}}),[K.filter(Boolean).filter(YV),Y]}function V4(J){return J.trim().split(/\s+/)}function YV(J,K,Y){return Y.indexOf(J)===K}function XV(J){var K;return(K=J==null?void 0:J.reduce((Y,X)=>({...Y,...ZV(X.handler)}),{}))!==null&&K!==void 0?K:{}}function ZV(J){let K={};return J({addUtilities:(Y)=>{K=Y},...QV}),K}function F8(J){throw new Error(`tailwindcss plugin function argument object prop "${J}" not implemented`)}var QV={addComponents:F8,addBase:F8,addVariant:F8,e:F8,prefix:F8,theme:F8,variants:F8,config:F8,corePlugins:F8,matchUtilities:F8,postcss:null};function HV(J,K){let Y=D$.default(WV(J)),X={},Z=XV(Y.plugins),Q={},H=Object.entries(Z).map(([M,q])=>typeof q=="string"?(Q[M]=q,[M,{kind:"null"}]):[M,h(q)]).filter(([,M])=>M.kind!=="null");function w(){return[X.windowDimensions?`w${X.windowDimensions.width}`:!1,X.windowDimensions?`h${X.windowDimensions.height}`:!1,X.fontScale?`fs${X.fontScale}`:!1,X.colorScheme==="dark"?"dark":!1,X.pixelDensity===2?"retina":!1].filter(Boolean).join("--")||"default"}let W=w(),z={};function U(){let M=z[W];if(M)return M;let q=new x$(H);return z[W]=q,q}function $(...M){let q=U(),G={},N=[],L=[],[_,D]=KV(M),E=_.join(" "),j=q.getStyle(E);if(j)return{...j,...D||{}};for(let T of _){let R=q.getIr(T);if(!R&&T in Q){let S=$(Q[T]);q.setIr(T,h(S)),G={...G,...S};continue}switch(R=new c1(T,Y,q,X,K).parse(),R.kind){case"complete":G={...G,...R.style},q.setIr(T,R);break;case"dependent":N.push(R);break;case"ordered":L.push(R);break;case"null":q.setIr(T,R);break}}if(L.length>0){L.sort((T,R)=>T.order-R.order);for(let T of L)switch(T.styleIr.kind){case"complete":G={...G,...T.styleIr.style};break;case"dependent":N.push(T.styleIr);break}}if(N.length>0){for(let T of N){let R=T.complete(G);R&&C8(R)}l$(G)}return E!==""&&q.setStyle(E,G),D&&(G={...G,...D}),G}function V(M){let q=$(M.split(/\s+/g).map((G)=>G.replace(/^(bg|text|border)-/,"")).map((G)=>`bg-${G}`).join(" "));return typeof q.backgroundColor=="string"?q.backgroundColor:void 0}let B=(M,...q)=>{let G="";return M.forEach((N,L)=>{var _;G+=N+((_=q[L])!==null&&_!==void 0?_:"")}),$(G)};return B.style=$,B.color=V,B.prefixMatch=(...M)=>{let q=M.sort().join(":"),G=U(),N=G.getPrefixMatch(q);if(N!==void 0)return N;let L=new c1(`${q}:flex`,Y,G,X,K).parse().kind!=="null";return G.setPrefixMatch(q,L),L},B.setWindowDimensions=(M)=>{X.windowDimensions=M,W=w()},B.setFontScale=(M)=>{X.fontScale=M,W=w()},B.setPixelDensity=(M)=>{X.pixelDensity=M,W=w()},B.setColorScheme=(M)=>{X.colorScheme=M,W=w()},B}function WV(J){return{...J,content:["_no_warnings_please"]}}var wV={handler:({addUtilities:J})=>{J({"shadow-sm":{boxShadow:"0 1px 2px 0 rgb(0 0 0 / 0.05)"},shadow:{boxShadow:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"},"shadow-md":{boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"},"shadow-lg":{boxShadow:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"},"shadow-xl":{boxShadow:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"},"shadow-2xl":{boxShadow:"0 25px 50px -12px rgb(0 0 0 / 0.25)"},"shadow-inner":{boxShadow:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},"shadow-none":{boxShadow:"0 0 #0000"}})}};function zV(J){return HV({...J,plugins:[...(J==null?void 0:J.plugins)??[],wV]},"web")}var C9;function UV({width:J,height:K,config:Y}){return C9||(C9=zV(Y)),C9.setWindowDimensions({width:+J,height:+K}),C9}var B4=new WeakMap;async function mK(J,K){let Y=await f9();if(!Y||!Y.Node)throw new Error("Satori is not initialized: expect `yoga` to be loaded, got "+Y);K.fonts=K.fonts||[];let X;B4.has(K.fonts)?X=B4.get(K.fonts):B4.set(K.fonts,X=new E$(K.fonts));let Z="width"in K?K.width:void 0,Q="height"in K?K.height:void 0,H=Y.Node.create();Z&&H.setWidth(Z),Q&&H.setHeight(Q),H.setFlexDirection(Y.FLEX_DIRECTION_ROW),H.setFlexWrap(Y.WRAP_WRAP),H.setAlignContent(Y.ALIGN_AUTO),H.setAlignItems(Y.ALIGN_FLEX_START),H.setJustifyContent(Y.JUSTIFY_FLEX_START),H.setOverflow(Y.OVERFLOW_HIDDEN);let w={...K.graphemeImages},W=new Set;u8.clear(),v9.clear(),await AU(J);let z=L4(J,{id:"id",parentStyle:{},inheritedStyle:{fontSize:16,fontWeight:"normal",fontFamily:"serif",fontStyle:"normal",lineHeight:"normal",color:"black",opacity:1,whiteSpace:"normal",_viewportWidth:Z,_viewportHeight:Q},parent:H,font:X,embedFont:K.embedFont,debug:K.debug,graphemeImages:w,canLoadAdditionalAssets:!!K.loadAdditionalAsset,onNodeDetected:K.onNodeDetected,getTwStyles:(M,q)=>{let G={...UV({width:Z,height:Q,config:K.tailwindConfig})([M])};return typeof G.lineHeight=="number"&&(G.lineHeight=G.lineHeight/(+G.fontSize||q.fontSize||16)),G.shadowColor&&G.boxShadow&&(G.boxShadow=G.boxShadow.replace(/rgba?\([^)]+\)/,G.shadowColor)),G}}),U=(await z.next()).value;if(K.loadAdditionalAsset&&U.length){let M=$V(U),q=[],G={};await Promise.all(Object.entries(M).flatMap(([N,L])=>L.map((_)=>{let D=`${N}_${_}`;return W.has(D)?null:(W.add(D),K.loadAdditionalAsset(N,_).then((E)=>{typeof E=="string"?G[_]=E:E&&(Array.isArray(E)?q.push(...E):q.push(E))}))}))),X.addFonts(q),Object.assign(w,G)}await z.next(),H.calculateLayout(Z,Q,Y.DIRECTION_LTR);let $=(await z.next([0,0])).value,V=H.getComputedWidth(),B=H.getComputedHeight();return H.freeRecursive(),R$({width:V,height:B,content:$})}function $V(J){let K={},Y={};for(let{word:X,locale:Z}of J){let Q=L$(X,Z).join("|");Y[Q]=Y[Q]||"",Y[Q]+=X}return Object.keys(Y).forEach((X)=>{K[X]=K[X]||[],X==="emoji"?K[X].push(...u1(B8(Y[X],"grapheme"))):(K[X][0]=K[X][0]||"",K[X][0]+=u1(B8(Y[X],"grapheme",X==="unknown"?void 0:X)).join(""))}),K}function u1(J){return Array.from(new Set(J))}function k4(J){return J.replace(/\([^)]*\)/g,"").replace(/\/\//g,"/")}function i9(J){let K={};for(let[Y,X]of Object.entries(J))if("run"in X){let Z=X;if("children"in Z){let Q=new Z.children,H=i9(Q.routes);for(let[w,{exec:W,middleware:z}]of Object.entries(H)){let U=Y==="/"?w:`${Y}${w}`,$=w==="/"&&Y!=="/"?Y:U,V=(B)=>Z.run.call(Z,B,Y);K[k4($)]={exec:[V,...W],middleware:[...Z.middlewares,...z],viewPath:Z.viewPath}}}else{let Q=(H)=>Z.run.call(Z,H,Y);K[k4(Y)]={exec:[Q],middleware:Z.middlewares,viewPath:Z.viewPath}}}else{let Z=new X,Q=i9(Z.routes);for(let[H,{exec:w,middleware:W,viewPath:z}]of Object.entries(Q)){let U=Y==="/"?H:`${Y}${H}`,$=H==="/"&&Y!=="/"?Y:U;K[k4($)]={exec:w,middleware:[...Z.middlewares,...W],viewPath:z}}}return Object.fromEntries(Object.entries(K).sort(([Y],[X])=>{let Z=Y.split("/").length+Y.split(":").length,Q=X.split("/").length+X.split(":").length;return Z-Q}))}import{renderToReadableStream as fK}from"react-dom/server.browser";import{createElement as x4,Fragment as BV}from"react";function VV(J){return J.replace(/\([^)]*\)/g,"").replace(/\/\//g,"/")}function o9(J){let K={};for(let[Y,X]of Object.entries(J))if("run"in X){let Z=X.viewPath;if("children"in X){K[Y]=[Z];let Q=new X.children,H=o9(Q.routes);for(let[w,W]of Object.entries(H)){let z=Y==="/"?w:`${Y}${w}`,U=w==="/"&&Y!=="/"?Y:z;K[U]=[Z,...W]}if(K[Y].length===1)delete K[Y]}else K[Y]=[Z]}else{let Z=new X,Q=o9(Z.routes);for(let[H,w]of Object.entries(Q)){let W=Y==="/"?H:`${Y}${H}`,z=H==="/"&&Y!=="/"?Y:W;K[z]=w}}return Object.fromEntries(Object.entries(K).map(([Y,X])=>[VV(Y),X]))}function r9(J){let K=[];for(let[Y,X]of Object.entries(J))if("run"in X){let Z=X.viewPath;if(Z==="__")continue;if(Z==="REDIRECT")continue;if("children"in X){let Q=new X.children,H=r9(Q.routes);K.push([Z,H])}else K.push([Z,[]])}else{let Z=new X,Q=r9(Z.routes);K.push(...Q)}return K}function g4(J){let K=[];for(let[Y,X]of J)K.push(Y,...g4(X).flat());return Array.from(new Set(K))}class n9{static debug(J,K){t0.use().log("debug",J,K)}static info(J,K){t0.use().log("info",J,K)}static notice(J,K){t0.use().log("notice",J,K)}static warning(J,K){t0.use().log("warning",J,K)}static error(J,K){t0.use().log("error",J,K)}static critical(J,K){t0.use().log("critical",J,K)}static alert(J,K){t0.use().log("alert",J,K)}static emergency(J,K){t0.use().log("emergency",J,K)}}async function qV(J,K,Y){let X=`${Y==="italic"?"italic,":""}wght@${Y==="italic"?"1,":""}${K}`,H=(await(await fetch(`https://fonts.googleapis.com/css2?family=${J}:${X}&display=swap`,{headers:{"User-Agent":"Mozilla/5.0 Firefox/1.0"}})).text()).match(/url\(([^)]+)\)/)?.[1];return await fetch(H).then((w)=>w.arrayBuffer())}class h4 extends d0{service;static _name="ViewRouterServiceContainer";flatViewRoutes={};routeManifest={};componentTree=[];flatComponentTree=[];root=null;constructor(J){super();this.service=J;let K={"/":J.rootRouter,"/auth":J7};this.flatViewRoutes=i9(K),this.routeManifest=o9(K),this.componentTree=r9(K),this.flatComponentTree=g4(this.componentTree),this.root=J.root}boot(){}async onRequestEnd(J){if(!J.cookies.has("session_id"))J.ctx().setCookie("session_id",Bun.randomUUIDv7(),{httpOnly:!0,secure:!0,sameSite:"Strict",expires:new Date(Date.now()+31536000000)});return await this.service.onRequestEnd(J)}async render(J){let{csrfTokenHMAC:K,currentPathName:Y,headers:X,i18n:Z,params:Q,pathname:H,prefetchedData:w,url:W,user:z,viewData:U,breadcrumbs:$,urlLocaleSegment:V,meta:B,isOgRequest:M}=J,q=H.replace(`/${V}`,""),G={kind:"view",data:{meta:B,pageData:{[q]:U},__csrf:K.toString("base64"),prefetchedData:w,i18n:Z,auth:{user:z},routeManifest:this.routeManifest,breadcrumbs:$,router:{urlLocaleSegment:V,pathname:Y,params:Q,currentPath:H,searchParams:W.search,is404:!Y?!0:!1},componentTree:[["404",[]],...this.componentTree]},head:{}},N=this.root,L=this.routeManifest[Y];return async(_)=>{let{bootstrapModules:D,loaders:E,getStyles:j,viewImportMap:T,cssManifest:R,ogMap:S}=_;if(M){let c=null,o=null;for(let C of L)if(typeof S[C]==="function")o=C,c=S[C];if(!c)return new Response("Not found",{status:404});let u=Object.values(G.data.pageData)[0];try{await fK(x4(c,u[o]),{onError:()=>{}})}catch(C){let{fonts:P,...I}=C.satoriOptions,f=await Promise.all(P.map((l)=>{return qV(l.name,l.weight,l.style).then((t)=>({...l,data:t}))}));return new Response(await mK(C.jsx,{...I,fonts:f}),{headers:{"Content-Type":"image/svg+xml"}})}return new Response("data")}G.data.cssManifest=R;let x=await fK(x4(BV,{children:[...await j(L),x4(N,{data:G.data,viewImportMap:T,key:"root"})]}),{bootstrapScriptContent:`window.__GEMI_DATA__ = ${JSON.stringify(G.data)}; window.loaders=${E}`,bootstrapModules:D});return new Response(x,{status:!Y?404:200,headers:X})}}async handleViewRequest(J){let K=new URL(J.url),Y=K.pathname.endsWith(".json"),X=K.pathname.endsWith(".og"),Z=K.pathname.replace(".json","").replace(".og",""),[,Q,...H]=Z.split("/"),w=`/${H.join("/")}`,W=null,z=null;if(!C0.use().service.supportedLocales.includes(Q))w=Z;else W=Q,z=Q;if(C0.use().isEnabled&&!X){if(z===null){let q=C0.use().detectLocale(new $0(J,{},"view",w)),G=K.pathname==="/"?"":K.pathname;return new Response("",{status:302,headers:{"Cache-Control":"private, no-cache, no-store, max-age=0, must-revalidate",Location:`/${q}${G}`}})}}w=w.replace("//","/");let U=[],$=[],V=null,B={};try{for(let[q,G]of Object.entries(this.flatViewRoutes)){let N=new dK({pathname:q});if(N.test({pathname:w})){V=q,B=N.exec({pathname:w})?.pathname.groups,U=G.exec,$=G.middleware;break}}}catch(q){throw q}let M=new $0(J,B,"view",V);return await F0.run(M,async()=>{let q=null,G=F0.getStore();if(z){let L=z.replaceAll("/","");w6.setLocale(L)}else w6.setLocale();let N=G.req;try{await L6.use().runMiddleware($);let L=C0.use(),_=L.isEnabled,D={};if(_){let P=null;if(z)P=z.replaceAll("/",""),G.setLocale(P);else P=L.detectLocale(new $0(J,N.params)),G.setLocale(P);let I=L.getPageTranslations(P,N.routePath);D={supportedLocales:L.service.supportedLocales,currentLocale:P,dictionary:{[P]:I}}}let E=await Promise.all([...U.map((P)=>P(N)),...Array.from(G.prefetchPromiseQueue).map((P)=>P())]),j=G.cookies,T=G.headers,R=G.prefetchedResources;q={data:E,cookies:j,headers:T,user:G.user,prefetchedData:Object.fromEntries(R.entries()),currentPathName:N.routePath,params:N.params,urlLocaleSegment:W,meta:G.renderMeta()};let{params:S,currentPathName:x,user:c}=q,o={},u={};for(let P of E){let[I,f]=Object.entries(P)?.[0]??[];if(!I||!f)continue;u[`${I}:${x}`]=f.breadcrumb,o[I]=f}if(Y)return T.set("Content-Type","application/json"),j.forEach((P)=>T.append("Set-Cookie",P.toString())),await this.service.onRequestEnd(N),new Response(JSON.stringify({meta:q.meta,data:{[w]:o},breadcrumbs:u,prefetchedData:q.prefetchedData,i18n:D,is404:!x}),{headers:T});T.set("Content-Type","text/html");for(let P of j)T.append("Set-Cookie",P.toString());let C=Bun.CSRF.generate(process.env.SECRET);T.append("Set-Cookie",`csrf_token=${C}; HttpOnly; Secure; SameSite=Strict; Expires=${new Date(Date.now()+86400000).toUTCString()}`);try{await this.onRequestEnd(N)}catch(P){n9.error(P?.message??'Error in "onRequestEnd" event handler',{err:JSON.stringify(P)})}return await this.render({csrfTokenHMAC:Buffer.from(""),currentPathName:x,headers:T,i18n:D,params:S,pathname:K.pathname,prefetchedData:q.prefetchedData,url:K,user:c,viewData:o,breadcrumbs:u,urlLocaleSegment:W,meta:q.meta,isOgRequest:X})}catch(L){if(L.kind===i6)if(Y){let{status:_=400,data:D,directive:E,headers:j}=L.payload.api;return new Response(JSON.stringify({data:D,directive:E}),{headers:j,status:_})}else{let{status:_=400,error:D}=L.payload.view;return new Response(D?.message,{...L.payload.view,status:_})}else throw this.service.onRequestFail(N,L),L}})}}class lK extends A8{routes={"/api-routes":this.get(()=>{let J=s9.use().flatRoutes,K=[];for(let[Y,X]of Object.entries(J))for(let[Z,Q]of Object.entries(X)){let{exec:H,middleware:w}=Q;K.push({path:Y,method:Z,middleware:w})}return K}),"/view-routes":this.get(()=>{let J=h4.use().flatViewRoutes,K=[];for(let[Y,{middleware:X,viewPath:Z}]of Object.entries(J))K.push({path:Y,method:"GET",viewPath:Z,middleware:X});return K})}}class s9 extends d0{service;static _name="ApiRouterServiceContainer";flatRoutes={};constructor(J){super();this.service=J;this.flatRoutes=W7({"/":this.service.rootRouter.bind(this.service),"/auth":K7,"/__gemi__/services/i18n":Y7,"/__gemi__/services/logs":H7,"/__gemi__/services/image":X7,"/__gemi__/debug":lK})}getRouteHandlerAndParams(J){let Y=new URL(J.url).pathname.replace("/api",""),X={},Z;for(let[Q]of Object.entries(this.flatRoutes))try{let H=new URLPattern({pathname:Q});if(H.test({pathname:Y})){Z=Q,X=H.exec({pathname:Y})?.pathname.groups;break}}catch(H){console.error(H)}return{params:X,path:Z}}async runRouteMiddleware(J,K){let X=this.flatRoutes[J][K.rawRequest.method].middleware;try{await L6.use().runMiddleware(X)}catch(Z){if(Z.kind===i6){if(K.rawRequest.url.includes("/api")){let{status:Q=400,data:H,headers:w}=Z.payload.api;return new Response(JSON.stringify(H),{status:Q,headers:{"Content-Type":"application/json",...w}})}}else throw this.service.onRequestFail(K,Z),console.error(Z),Z}}async getRouteData(J){let K=this.flatRoutes[J],Y=F0.getStore(),X=K[Y.req.rawRequest.method].exec??(()=>Promise.resolve({})),Z={};try{Z=await X()}catch(Q){if(Q.kind===i6){let{status:H=400,data:w,headers:W}=Q.payload.api;return new Response(JSON.stringify(w),{status:H,headers:{"Content-Type":"application/json",...W}})}throw this.service.onRequestFail(Y.req,Q),console.error(Q),Q}return Z}async handleApiRequest(J){let{params:K,path:Y}=this.getRouteHandlerAndParams(J),X=this.flatRoutes[Y];if(!X||!X[J.method])return new Response(JSON.stringify({error:{message:"Not found"}}),{status:404});let Z=new $0(J,K,"api",Y);if(!J.url.includes("/__gemi__"))this.service.onRequestStart(Z);return await F0.run(Z,async()=>{let Q=F0.getStore(),H=C0.use();if(H.isEnabled){let U=H.detectLocale(Z);Q.setLocale(U)}Q.setRequest(Z);let w=await this.runRouteMiddleware(Y,Z);if(w instanceof Response)return w;let W=await this.getRouteData(Y);if(W instanceof Response)return W;let z=Q.headers;if(z.append("Content-Type","application/json"),Q.cookies.forEach((U)=>z.append("Set-Cookie",U.toString())),Q.destroy(),!J.url.includes("/__gemi__"))this.service.onRequestEnd(Z);return new Response(JSON.stringify(W),{headers:z})})}}class a9{static prepare(J,...K){let Y={params:{},search:{}},[X={}]=K,{search:Z,params:Q}={...Y,...X},H=F0.getStore();if(H.req.kind==="api")throw new Error("Query.prefetch() cannot be called from an API request");let w=H.req.rawRequest,W=new URL(w.url),z=new URLSearchParams(c4(Z));z.delete("json"),z.sort();let U=[`${g8(J,Q)}`,z.toString()].filter((G)=>G.length>0).join("?"),$=`${W.origin}/${U}`,V=new Request($,{headers:w.headers}),B=new $0(V,Q),M=(G)=>{H.prefetchedResources.set(g8(J,Q),{[z.toString()]:G})},q=()=>{return F0.run(B,async()=>{let G=await s9.use().getRouteData(J);return M(G),G})};return{instant:q,prefetch:()=>{H.prefetchPromiseQueue.add(q)}}}static instant(J,...K){return a9.prepare(J,...K).instant()}static prefetch(J,...K){return a9.prepare(J,...K).prefetch()}}class cK{static absolute(J,...K){return`${process.env.HOST_NAME}${g8(String(J),K[0]??{})}`}static relative(J,...K){return g8(String(J),K[0]??{})}}class uK{name="Meta";static description(J){F0.getStore().metadata.description(J)}static title(J){F0.getStore().metadata.title(J)}static openGraph(J){F0.getStore().metadata.openGraph(J)}}export{cK as Url,AV as Redirect,a9 as Query,uK as Meta,n9 as Log,w6 as I18n,l4 as FileStorage,a6 as Broadcast,k8 as Auth};export{W6 as y,O6 as z,t0 as A,rK as B,t4 as C,L6 as D,h4 as E,s9 as F};
|
|
5
67
|
|
|
6
|
-
//# debugId=
|
|
68
|
+
//# debugId=3E21A40A6A6C814664756E2164756E21
|