=e}function Rs(e){if(!Aa.isValidElement(e))return null;let t=e,r=t.props;return(Pa(19)?r?.ref:t.ref)??null}function ro(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var Zy=Object.freeze([]),Er=Object.freeze({});function Ra(e,t){let r={};for(let o in e){let s=e[o];if(t?.hasOwnProperty(o)){let n=t[o](s);n!=null&&Object.assign(r,n);continue}s===!0?r[`data-${o.toLowerCase()}`]="":s&&(r[`data-${o.toLowerCase()}`]=s.toString())}return r}function Ea(e,t){return typeof e=="function"?e(t):e}function Ia(e,t){return typeof e=="function"?e(t):e}var Es={};function ur(e,t,r,o,s){if(!r&&!o&&!s&&!e)return To(t);let n=To(e);return t&&(n=oo(n,t)),r&&(n=oo(n,r)),o&&(n=oo(n,o)),s&&(n=oo(n,s)),n}function La(e){if(e.length===0)return Es;if(e.length===1)return To(e[0]);let t=To(e[0]);for(let r=1;r=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function Is(e){return typeof e=="function"}function Va(e,t){return Is(e)?e(t):e??Es}function Vf(e,t){return t?e?(...r)=>{let o=r[0];if(Da(o)){let n=o;za(n);let a=t(...r);return n.baseUIHandlerPrevented||e?.(...r),a}let s=t(...r);return e?.(...r),s}:Na(t):e}function Na(e){return e&&((...t)=>{let r=t[0];return Da(r)&&za(r),e(...t)})}function za(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ls(e,t){return t?e?t+" "+e:t:e}function Da(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var Bs=u(Rr(),1);function Ma(e,t,r={}){let o=t.render,s=Nf(t,r);if(r.enabled===!1)return null;let n=r.state??Er;return Mf(e,o,s,n)}function Nf(e,t={}){let{className:r,style:o,render:s}=e,{state:n=Er,ref:a,props:l,stateAttributesMapping:h,enabled:f=!0}=t,c=f?Ea(r,n):void 0,d=f?Ia(o,n):void 0,m=f?Ra(n,h):Er,g=f&&l?zf(l):void 0,y=f?ro(m,g)??{}:Er;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=Fa([y.ref,Rs(s),...a]):y.ref=As(y.ref,Rs(s),a):As(null,null)),f?(c!==void 0&&(y.className=Ls(y.className,c)),d!==void 0&&(y.style=ro(y.style,d)),y):Er}function zf(e){return Array.isArray(e)?La(e):ur(void 0,e)}var Df=Symbol.for("react.lazy");function Mf(e,t,r,o){if(t){if(typeof t=="function")return t(r,o);let s=ur(r,t.props);s.ref=r.ref;let n=t;return n?.$$typeof===Df&&(n=fr.Children.toArray(t)[0]),fr.cloneElement(n,s)}if(e&&typeof e=="string")return jf(e,r);throw new Error(_a(8))}function jf(e,t){return e==="button"?(0,Bs.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,Bs.createElement)("img",{alt:"",...t,key:t.key}):fr.createElement(e,t)}function Po(e){return Ma(e.defaultTagName??"div",e,e)}var Ua=u(ve(),1),Vs="data-wp-hash";function Ns(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Uf(document)),e.__wpStyleRuntime}function Gf(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${Vs}]`))if(r.getAttribute(Vs)===t)return!0;return!1}function Wa(e,t,r){if(!e.head)return;let o=Ns(),s=o.injectedStyles.get(e);if(s||(s=new Set,o.injectedStyles.set(e,s)),s.has(t))return;if(Gf(e,t)){s.add(t);return}let n=e.createElement("style");n.setAttribute(Vs,t),n.appendChild(e.createTextNode(r)),e.head.appendChild(n),s.add(t)}function Uf(e){let t=Ns();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Wa(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function Ha(e,t){let r=Ns();r.styles.set(e,t);for(let o of r.documents.keys())Wa(o,e,t)}typeof process>"u",Ha("0c8601dd83",'@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}');var ja={text:"_83ed8a8da5dd50ea__text","heading-2xl":"_14437cfb77831647__heading-2xl","heading-xl":"_3c78b7fa9b4072dd__heading-xl","heading-lg":"aa58f227716bcde2__heading-lg","heading-md":"fc4da56d8dfe52c4__heading-md","heading-sm":"a9b78c7c82e8dff7__heading-sm","body-xl":"_305ff559e52180d5__body-xl","body-lg":"ca1aa3fc2029e958__body-lg","body-md":"_131101940be12424__body-md","body-sm":"_0e8d87a42c1f75fa__body-sm"};typeof process>"u",Ha("1fb29d3a3c","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid #0000)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-fg-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid #0000);transition:var(--_gcd-a-transition,none)}");var Ga={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},Ao=(0,Ua.forwardRef)(function({variant:t="body-md",render:r,className:o,...s},n){return Po({render:r,defaultTagName:"span",ref:n,props:ur(s,{className:Ze(ja.text,Ga.heading,Ga.p,ja[t],o)})})});var Ro=u(ve(),1),so=(0,Ro.forwardRef)(({icon:e,size:t=24,...r},o)=>(0,Ro.cloneElement)(e,{width:t,height:t,...r,ref:o}));var Eo=u(Ir(),1),zs=u(D(),1),cr=(0,zs.jsx)(Eo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zs.jsx)(Eo.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var Io=u(Ir(),1),Ds=u(D(),1),dr=(0,Ds.jsx)(Io.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ds.jsx)(Io.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var Lo=u(Ir(),1),Ms=u(D(),1),js=(0,Ms.jsx)(Lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ms.jsx)(Lo.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var Bo=u(Ir(),1),Gs=u(D(),1),Vo=(0,Gs.jsx)(Bo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Gs.jsx)(Bo.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})});var No=u(Ir(),1),Us=u(D(),1),zo=(0,Us.jsx)(No.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Us.jsx)(No.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})});var Xa=u(ve(),1),Hs="data-wp-hash";function qs(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Hf(document)),e.__wpStyleRuntime}function Wf(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${Hs}]`))if(r.getAttribute(Hs)===t)return!0;return!1}function Ka(e,t,r){if(!e.head)return;let o=qs(),s=o.injectedStyles.get(e);if(s||(s=new Set,o.injectedStyles.set(e,s)),s.has(t))return;if(Wf(e,t)){s.add(t);return}let n=e.createElement("style");n.setAttribute(Hs,t),n.appendChild(e.createTextNode(r)),e.head.appendChild(n),s.add(t)}function Hf(e){let t=qs();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Ka(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function qf(e,t){let r=qs();r.styles.set(e,t);for(let o of r.documents.keys())Ka(o,e,t)}typeof process>"u",qf("b51ff41489","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}");var Yf={stack:"_19ce0419607e1896__stack"},Zf={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},Lr=(0,Xa.forwardRef)(function({direction:t,gap:r,align:o,justify:s,wrap:n,render:a,...l},h){let f={gap:r&&Zf[r],alignItems:o,justifyContent:s,flexDirection:t,flexWrap:n};return Po({render:a,ref:h,props:ur(l,{style:f,className:Yf.stack})})});var Ja=u(ve(),1),Qa=u(D(),1),$a=(0,Ja.forwardRef)(({children:e,className:t,ariaLabel:r,as:o="div",...s},n)=>(0,Qa.jsx)(o,{ref:n,className:Ze("admin-ui-navigable-region",t),"aria-label":r,role:"region",tabIndex:"-1",...s,children:e}));$a.displayName="NavigableRegion";var ei=$a;var ri=u(X(),1),{Fill:oi,Slot:si}=(0,ri.createSlotFill)("SidebarToggle");var Ft=u(D(),1),Ys="data-wp-hash";function Zs(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Kf(document)),e.__wpStyleRuntime}function Xf(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${Ys}]`))if(r.getAttribute(Ys)===t)return!0;return!1}function ni(e,t,r){if(!e.head)return;let o=Zs(),s=o.injectedStyles.get(e);if(s||(s=new Set,o.injectedStyles.set(e,s)),s.has(t))return;if(Xf(e,t)){s.add(t);return}let n=e.createElement("style");n.setAttribute(Ys,t),n.appendChild(e.createTextNode(r)),e.head.appendChild(n),s.add(t)}function Kf(e){let t=Zs();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)ni(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function Jf(e,t){let r=Zs();r.styles.set(e,t);for(let o of r.documents.keys())ni(o,e,t)}typeof process>"u",Jf("aa9c241ccc","._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-bg-surface-neutral,#fcfcfc);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-bg-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:calc(var(--wpds-dimension-base, 4px)*8)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:calc(var(--wpds-dimension-base, 4px)*6);width:calc(var(--wpds-dimension-base, 4px)*6);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-fg-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");var mr={page:"_956b6df0898efed0__page",header:"_0625b55e82a0d93d__header","header-content":"a43c44d5ae28b2e8__header-content","header-actions":"b7cb5b9daf3a3b25__header-actions","header-title":"_8113be94e7caf73c__header-title","header-visual":"_9a776c7f70996f61__header-visual","sidebar-toggle-slot":"d5e0920cd15d35bc__sidebar-toggle-slot","header-subtitle":"_60fea2f6bf5319cd__header-subtitle",content:"be5e57d029ec4036__content","has-padding":"_128806d0b26e3a50__has-padding"};function ai({headingLevel:e=1,breadcrumbs:t,badges:r,visual:o,title:s,subTitle:n,actions:a,showSidebarToggle:l=!0}){let h=`h${e}`;return(0,Ft.jsxs)(Lr,{direction:"column",className:mr.header,children:[(0,Ft.jsxs)(Lr,{className:mr["header-content"],direction:"row",gap:"sm",justify:"space-between",children:[(0,Ft.jsxs)(Lr,{direction:"row",gap:"sm",align:"center",justify:"start",children:[l&&(0,Ft.jsx)(si,{bubblesVirtually:!0,className:mr["sidebar-toggle-slot"]}),o&&(0,Ft.jsx)("div",{className:mr["header-visual"],"aria-hidden":"true",children:o}),s&&(0,Ft.jsx)(Ao,{className:mr["header-title"],render:(0,Ft.jsx)(h,{}),variant:"heading-lg",children:s}),t,r]}),a&&(0,Ft.jsx)(Lr,{align:"center",className:mr["header-actions"],direction:"row",gap:"sm",children:a})]}),n&&(0,Ft.jsx)(Ao,{render:(0,Ft.jsx)("p",{}),variant:"body-md",className:mr["header-subtitle"],children:n})]})}var no=u(D(),1),Ks="data-wp-hash";function Js(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&$f(document)),e.__wpStyleRuntime}function Qf(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${Ks}]`))if(r.getAttribute(Ks)===t)return!0;return!1}function ii(e,t,r){if(!e.head)return;let o=Js(),s=o.injectedStyles.get(e);if(s||(s=new Set,o.injectedStyles.set(e,s)),s.has(t))return;if(Qf(e,t)){s.add(t);return}let n=e.createElement("style");n.setAttribute(Ks,t),n.appendChild(e.createTextNode(r)),e.head.appendChild(n),s.add(t)}function $f(e){let t=Js();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)ii(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function ec(e,t){let r=Js();r.styles.set(e,t);for(let o of r.documents.keys())ii(o,e,t)}typeof process>"u",ec("aa9c241ccc","._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-bg-surface-neutral,#fcfcfc);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-bg-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:calc(var(--wpds-dimension-base, 4px)*8)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:calc(var(--wpds-dimension-base, 4px)*6);width:calc(var(--wpds-dimension-base, 4px)*6);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-fg-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");var Xs={page:"_956b6df0898efed0__page",header:"_0625b55e82a0d93d__header","header-content":"a43c44d5ae28b2e8__header-content","header-actions":"b7cb5b9daf3a3b25__header-actions","header-title":"_8113be94e7caf73c__header-title","header-visual":"_9a776c7f70996f61__header-visual","sidebar-toggle-slot":"d5e0920cd15d35bc__sidebar-toggle-slot","header-subtitle":"_60fea2f6bf5319cd__header-subtitle",content:"be5e57d029ec4036__content","has-padding":"_128806d0b26e3a50__has-padding"};function li({headingLevel:e,breadcrumbs:t,badges:r,visual:o,title:s,subTitle:n,children:a,className:l,actions:h,ariaLabel:f,hasPadding:c=!1,showSidebarToggle:d=!0}){let m=Ze(Xs.page,l);return(0,no.jsxs)(ei,{className:m,ariaLabel:f??(typeof s=="string"?s:""),children:[(s||t||r||h||o)&&(0,no.jsx)(ai,{headingLevel:e,breadcrumbs:t,badges:r,visual:o,title:s,subTitle:n,actions:h,showSidebarToggle:d}),c?(0,no.jsx)("div",{className:Ze(Xs.content,Xs["has-padding"]),children:a}):a]})}li.SidebarToggleFill=oi;var Qs=li;var Jr=u(ie()),gf=u(X()),yf=u(fi()),Fs=u(wt()),vf=u(pt()),bf=u(ve());var pf=u(X(),1),mf=u(Br(),1),_y=u(pt(),1),Fy=u(it(),1),ia=u(ve(),1),ky=u(pr(),1);function Vr(e,t,r){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let o=t.pop(),s=e;for(let n of t){let a=s[n];s=s[n]=Array.isArray(a)?[...a]:{...a}}return s[o]=r,e}var xt=(e,t,r)=>{let o=Array.isArray(t)?t:t.split("."),s=e;return o.forEach(n=>{s=s?.[n]}),s??r};var tc=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","background.gradient","border.color","border.radius","border.radiusSizes","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.minWidth","dimensions.width","dimensions.dimensionSizes","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.textTransform","typography.writingMode"];function $s(e,t,r){let o=r?".blocks."+r:"",s=t?"."+t:"",n=`settings${o}${s}`,a=`settings${s}`;if(t)return xt(e,n)??xt(e,a);let l={};return tc.forEach(h=>{let f=xt(e,`settings${o}.${h}`)??xt(e,`settings.${h}`);f!==void 0&&(l=Vr(l,h.split("."),f))}),l}function en(e,t,r,o){let s=o?".blocks."+o:"",n=t?"."+t:"",a=`settings${s}${n}`;return Vr(e,a.split("."),r)}var uc=u(gi(),1);var rc="1600px",oc="320px",sc=1,nc=.25,ac=.75,ic="14px";function yi({minimumFontSize:e,maximumFontSize:t,fontSize:r,minimumViewportWidth:o=oc,maximumViewportWidth:s=rc,scaleFactor:n=sc,minimumFontSizeLimit:a}){if(a=It(a)?a:ic,r){let b=It(r);if(!b?.unit||!b?.value)return null;let P=It(a,{coerceTo:b.unit});if(P?.value&&!e&&!t&&b?.value<=P?.value)return null;if(t||(t=`${b.value}${b.unit}`),!e){let q=b.unit==="px"?b.value:b.value*16,I=Math.min(Math.max(1-.075*Math.log2(q),nc),ac),N=ao(b.value*I,3);P?.value&&N0}function lc(e){let t=e?.typography??{},r=e?.layout,o=It(r?.wideSize)?r?.wideSize:null;return tn(t)&&o?{fluid:{maxViewportWidth:o,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function vi(e,t){let{size:r}=e;if(!r||r==="0"||e?.fluid===!1||!tn(t?.typography)&&!tn(e))return r;let o=lc(t)?.fluid??{},s=yi({minimumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.min,maximumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.max,fontSize:r,minimumFontSizeLimit:typeof o=="object"?o?.minFontSize:void 0,maximumViewportWidth:typeof o=="object"?o?.maxViewportWidth:void 0,minimumViewportWidth:typeof o=="object"?o?.minViewportWidth:void 0});return s||r}var fc=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>vi(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}];function bi(e,t,r=[],o="slug",s){let n=[t?xt(e,["blocks",t,...r]):void 0,xt(e,r)].filter(Boolean);for(let a of n)if(a){let l=["custom","theme","default"];for(let h of l){let f=a[h];if(f){let c=f.find(d=>d[o]===s);if(c)return o==="slug"||bi(e,t,r,"slug",c.slug)[o]===c[o]?c:void 0}}}}function cc(e,t,r,[o,s]=[]){let n=fc.find(l=>l.cssVarInfix===o);if(!n||!e.settings)return r;let a=bi(e.settings,t,n.path,"slug",s);if(a){let{valueKey:l}=n,h=a[l];return Do(e,t,h)}return r}function dc(e,t,r,o=[]){let s=(t?xt(e?.settings??{},["blocks",t,"custom",...o]):void 0)??xt(e?.settings??{},["custom",...o]);return s?Do(e,t,s):r}function Do(e,t,r){if(!r||typeof r!="string")if(typeof r=="object"&&r!==null&&"ref"in r&&typeof r.ref=="string"){let f=xt(e,r.ref);if(!f||typeof f=="object"&&"ref"in f)return f;r=f}else return r;let o="var:",s="var(--wp--",n=")",a;if(r.startsWith(o))a=r.slice(o.length).split("|");else if(r.startsWith(s)&&r.endsWith(n))a=r.slice(s.length,-n.length).split("--");else return r;let[l,...h]=a;return l==="preset"?cc(e,t,r,h):l==="custom"?dc(e,t,r,h):r}function Mo(e,t,r,o=!0){let s=t?"."+t:"",n=r?`styles.blocks.${r}${s}`:`styles${s}`;if(!e)return;let a=xt(e,n);return o?Do(e,r,a):a}function rn(e,t,r,o){let s=t?"."+t:"",n=o?`styles.blocks.${o}${s}`:`styles${s}`;return Vr(e,n.split("."),r)}var on=u(xi(),1);function io(e,t){return typeof e!="object"||typeof t!="object"?e===t:(0,on.default)(e?.styles,t?.styles)&&(0,on.default)(e?.settings,t?.settings)}var Ti=u(Fi(),1);function ki(e){return Object.prototype.toString.call(e)==="[object Object]"}function Oi(e){var t,r;return ki(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(ki(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function hr(e,t){return(0,Ti.default)(e,t,{isMergeableObject:Oi,customMerge:r=>{if(r==="backgroundImage")return(o,s)=>s??o}})}var kc={grad:.9,turn:360,rad:360/(2*Math.PI)},Ut=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Xe=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},kt=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Vi=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Pi=function(e){return{r:kt(e.r,0,255),g:kt(e.g,0,255),b:kt(e.b,0,255),a:kt(e.a)}},sn=function(e){return{r:Xe(e.r),g:Xe(e.g),b:Xe(e.b),a:Xe(e.a,3)}},Oc=/^#([0-9a-f]{3,8})$/i,jo=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Ni=function(e){var t=e.r,r=e.g,o=e.b,s=e.a,n=Math.max(t,r,o),a=n-Math.min(t,r,o),l=a?n===t?(r-o)/a:n===r?2+(o-t)/a:4+(t-r)/a:0;return{h:60*(l<0?l+6:l),s:n?a/n*100:0,v:n/255*100,a:s}},zi=function(e){var t=e.h,r=e.s,o=e.v,s=e.a;t=t/360*6,r/=100,o/=100;var n=Math.floor(t),a=o*(1-r),l=o*(1-(t-n)*r),h=o*(1-(1-t+n)*r),f=n%6;return{r:255*[o,l,a,a,h,o][f],g:255*[h,o,o,l,a,a][f],b:255*[a,a,h,o,o,l][f],a:s}},Ai=function(e){return{h:Vi(e.h),s:kt(e.s,0,100),l:kt(e.l,0,100),a:kt(e.a)}},Ri=function(e){return{h:Xe(e.h),s:Xe(e.s),l:Xe(e.l),a:Xe(e.a,3)}},Ei=function(e){return zi((r=(t=e).s,{h:t.h,s:(r*=((o=t.l)<50?o:100-o)/100)>0?2*r/(o+r)*100:0,v:o+r,a:t.a}));var t,r,o},uo=function(e){return{h:(t=Ni(e)).h,s:(s=(200-(r=t.s))*(o=t.v)/100)>0&&s<200?r*o/100/(s<=100?s:200-s)*100:0,l:s/2,a:t.a};var t,r,o,s},Tc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Pc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ac=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Rc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ln={string:[[function(e){var t=Oc.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Xe(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Xe(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Ac.exec(e)||Rc.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Pi({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Tc.exec(e)||Pc.exec(e);if(!t)return null;var r,o,s=Ai({h:(r=t[1],o=t[2],o===void 0&&(o="deg"),Number(r)*(kc[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Ei(s)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,o=e.b,s=e.a,n=s===void 0?1:s;return Ut(t)&&Ut(r)&&Ut(o)?Pi({r:Number(t),g:Number(r),b:Number(o),a:Number(n)}):null},"rgb"],[function(e){var t=e.h,r=e.s,o=e.l,s=e.a,n=s===void 0?1:s;if(!Ut(t)||!Ut(r)||!Ut(o))return null;var a=Ai({h:Number(t),s:Number(r),l:Number(o),a:Number(n)});return Ei(a)},"hsl"],[function(e){var t=e.h,r=e.s,o=e.v,s=e.a,n=s===void 0?1:s;if(!Ut(t)||!Ut(r)||!Ut(o))return null;var a=(function(l){return{h:Vi(l.h),s:kt(l.s,0,100),v:kt(l.v,0,100),a:kt(l.a)}})({h:Number(t),s:Number(r),v:Number(o),a:Number(n)});return zi(a)},"hsv"]]},Ii=function(e,t){for(var r=0;r=.5},e.prototype.toHex=function(){return t=sn(this.rgba),r=t.r,o=t.g,s=t.b,a=(n=t.a)<1?jo(Xe(255*n)):"","#"+jo(r)+jo(o)+jo(s)+a;var t,r,o,s,n,a},e.prototype.toRgb=function(){return sn(this.rgba)},e.prototype.toRgbString=function(){return t=sn(this.rgba),r=t.r,o=t.g,s=t.b,(n=t.a)<1?"rgba("+r+", "+o+", "+s+", "+n+")":"rgb("+r+", "+o+", "+s+")";var t,r,o,s,n},e.prototype.toHsl=function(){return Ri(uo(this.rgba))},e.prototype.toHslString=function(){return t=Ri(uo(this.rgba)),r=t.h,o=t.s,s=t.l,(n=t.a)<1?"hsla("+r+", "+o+"%, "+s+"%, "+n+")":"hsl("+r+", "+o+"%, "+s+"%)";var t,r,o,s,n},e.prototype.toHsv=function(){return t=Ni(this.rgba),{h:Xe(t.h),s:Xe(t.s),v:Xe(t.v),a:Xe(t.a,3)};var t},e.prototype.invert=function(){return Lt({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Lt(nn(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Lt(nn(this.rgba,-t))},e.prototype.grayscale=function(){return Lt(nn(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Lt(Li(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Lt(Li(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Lt({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):Xe(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=uo(this.rgba);return typeof t=="number"?Lt({h:t,s:r.s,l:r.l,a:r.a}):Xe(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Lt(t).toHex()},e})(),Lt=function(e){return e instanceof un?e:new un(e)},Bi=[],Di=function(e){e.forEach(function(t){Bi.indexOf(t)<0&&(t(un,ln),Bi.push(t))})};var fn=u(ve(),1);var Mi=u(ve(),1),Je=(0,Mi.createContext)({user:{styles:{},settings:{}},base:{styles:{},settings:{}},merged:{styles:{},settings:{}},onChange:()=>{},fontLibraryEnabled:!1});var ji=u(D(),1);function fo({children:e,value:t,baseValue:r,onChange:o,fontLibraryEnabled:s}){let n=(0,fn.useMemo)(()=>hr(r,t),[r,t]),a=(0,fn.useMemo)(()=>({user:t,base:r,merged:n,onChange:o,fontLibraryEnabled:s}),[t,r,n,o,s]);return(0,ji.jsx)(Je.Provider,{value:a,children:e})}var Wt=u(X(),1),al=u(ie(),1);var qc=u(pt(),1),Yc=u(wt(),1);var Gi=u(D(),1);function cn({className:e,...t}){return(0,Gi.jsx)(so,{className:Ze(e,"global-styles-ui-icon-with-current-color"),...t})}var Jt=u(X(),1);var gr=u(D(),1);function Ic({icon:e,children:t,...r}){return(0,gr.jsxs)(Jt.__experimentalItem,{...r,children:[e&&(0,gr.jsxs)(Jt.__experimentalHStack,{justify:"flex-start",children:[(0,gr.jsx)(cn,{icon:e,size:24}),(0,gr.jsx)(Jt.FlexItem,{children:t})]}),!e&&t]})}function Bt(e){return(0,gr.jsx)(Jt.Navigator.Button,{as:Ic,...e})}var Vc=u(X(),1);var Nc=u(ie(),1),Xi=u(it(),1);var dn=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},pn=function(e){return .2126*dn(e.r)+.7152*dn(e.g)+.0722*dn(e.b)};function Ui(e){e.prototype.luminance=function(){return t=pn(this.rgba),(r=2)===void 0&&(r=0),o===void 0&&(o=Math.pow(10,r)),Math.round(o*t)/o+0;var t,r,o},e.prototype.contrast=function(t){t===void 0&&(t="#FFF");var r,o,s,n,a,l,h,f=t instanceof e?t:new e(t);return n=this.rgba,a=f.toRgb(),l=pn(n),h=pn(a),r=l>h?(l+.05)/(h+.05):(h+.05)/(l+.05),(o=2)===void 0&&(o=0),s===void 0&&(s=Math.pow(10,o)),Math.floor(s*r)/s+0},e.prototype.isReadable=function(t,r){return t===void 0&&(t="#FFF"),r===void 0&&(r={}),this.contrast(t)>=(l=(a=(o=r).size)===void 0?"normal":a,(n=(s=o.level)===void 0?"AA":s)==="AAA"&&l==="normal"?7:n==="AA"&&l==="large"?3:4.5);var o,s,n,a,l}}var Rt=u(ve(),1),qi=u(pt(),1),Yi=u(wt(),1),hn=u(ie(),1);var De=u(ie(),1),Y1={link:[{value:":link",label:(0,De.__)("Link")},{value:":any-link",label:(0,De.__)("Any Link")},{value:":visited",label:(0,De.__)("Visited")},{value:":hover",label:(0,De.__)("Hover")},{value:":focus",label:(0,De.__)("Focus")},{value:":focus-visible",label:(0,De.__)("Focus-visible")},{value:":active",label:(0,De.__)("Active")}],button:[{value:":link",label:(0,De.__)("Link")},{value:":any-link",label:(0,De.__)("Any Link")},{value:":visited",label:(0,De.__)("Visited")},{value:":hover",label:(0,De.__)("Hover")},{value:":focus",label:(0,De.__)("Focus")},{value:":focus-visible",label:(0,De.__)("Focus-visible")},{value:":active",label:(0,De.__)("Active")}]},Z1={"core/button":[{value:":hover",label:(0,De.__)("Hover")},{value:":focus",label:(0,De.__)("Focus")},{value:":focus-visible",label:(0,De.__)("Focus-visible")},{value:":active",label:(0,De.__)("Active")}]},X1=[{value:"tablet",label:(0,De.__)("Tablet")},{value:"mobile",label:(0,De.__)("Mobile")}];function mn(e,t){if(!t?.length||typeof e!="object"||!e||!Object.keys(e).length)return e;for(let r in e)t.includes(r)?delete e[r]:typeof e[r]=="object"&&mn(e[r],t);return e}var Go=(e,t)=>{if(!e||!t?.length)return{};let r={};return Object.keys(e).forEach(o=>{if(t.includes(o))r[o]=e[o];else if(typeof e[o]=="object"){let s=Go(e[o],t);Object.keys(s).length&&(r[o]=s)}}),r};function co(e,t){let r=Go(structuredClone(e),t);return io(r,e)}function Wi(e,t){if(!Array.isArray(e)||!t)return null;let o=t.replace("var(","").replace(")","")?.split("--").slice(-1)[0];return e.find(s=>s.slug===o)}function Hi(e){let t=e?.settings?.typography?.fontFamilies?.theme,r=e?.settings?.typography?.fontFamilies?.custom,o=[];t&&r?o=[...t,...r]:t?o=t:r&&(o=r);let s=e?.styles?.typography?.fontFamily,n=Wi(o,s),a=e?.styles?.elements?.heading?.typography?.fontFamily,l;return a?l=Wi(o,e?.styles?.elements?.heading?.typography?.fontFamily):l=n,[n,l]}Di([Ui]);function Fe(e,t,r="merged",o=!0,s){let{user:n,base:a,merged:l,onChange:h}=(0,Rt.useContext)(Je),f=s?.split(".").filter(Boolean)??[],c=f.find(O=>O.startsWith(":")),d=f.filter(O=>!O.startsWith(":")).join("."),m=[e,d].filter(Boolean).join("."),g=l;r==="base"?g=a:r==="user"&&(g=n);let y=(0,Rt.useMemo)(()=>{let O=Mo(g,m,t,o);return c?O?.[c]??{}:O},[g,m,t,o,c]),T=(0,Rt.useCallback)(O=>{let _=O;c&&(_={...Mo(n,m,t,!1),[c]:O});let S=rn(n,m,_,t);h(S)},[n,h,m,t,c]);return[y,T]}function Te(e,t,r="merged"){let{user:o,base:s,merged:n,onChange:a}=(0,Rt.useContext)(Je),l=n;r==="base"?l=s:r==="user"&&(l=o);let h=(0,Rt.useMemo)(()=>$s(l,e,t),[l,e,t]),f=(0,Rt.useCallback)(c=>{let d=en(o,e,c,t);a(d)},[o,a,e,t]);return[h,f]}var Lc=[];function Bc({title:e,settings:t,styles:r}){return e===(0,hn.__)("Default")||Object.keys(t||{}).length>0||Object.keys(r||{}).length>0}function Uo(e=[]){let{variationsFromTheme:t}=(0,qi.useSelect)(o=>({variationsFromTheme:o(Yi.store).__experimentalGetCurrentThemeGlobalStylesVariations?.()||Lc}),[]),{user:r}=(0,Rt.useContext)(Je);return(0,Rt.useMemo)(()=>{let o=structuredClone(r),s=mn(o,e);s.title=(0,hn.__)("Default");let n=t.filter(l=>co(l,e)).map(l=>hr(s,l)),a=[s,...n];return a?.length?a.filter(Bc):[]},[e,r,t])}var Zi=u(Ws(),1),{lock:o0,unlock:ye}=(0,Zi.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/global-styles-ui");var gn=u(D(),1),{useHasDimensionsPanel:l0,useHasTypographyPanel:u0,useHasColorPanel:f0,useSettingsForBlockElement:c0,useHasBackgroundPanel:d0}=ye(Xi.privateApis);var Vt=u(X(),1);function zr(){let[e="black"]=Fe("color.text"),[t="white"]=Fe("color.background"),[r=e]=Fe("elements.h1.color.text"),[o=r]=Fe("elements.link.color.text"),[s=o]=Fe("elements.button.color.background"),[n]=Te("color.palette.core")||[],[a]=Te("color.palette.theme")||[],[l]=Te("color.palette.custom")||[],h=(a??[]).concat(l??[]).concat(n??[]),f=h.filter(({color:m})=>m===e),c=h.filter(({color:m})=>m===s),d=f.concat(c).concat(h).filter(({color:m})=>m!==t).slice(0,2);return{paletteColors:h,highlightedColors:d}}var Qi=u(ve(),1),$i=u(X(),1),vn=u(ie(),1);function zc(e,t){return t.length===0?null:(t.sort((r,o)=>Math.abs(e-r)-Math.abs(e-o)),t[0])}function Dc(e){let t=[];return e.forEach(r=>{let o=String(r.fontWeight).split(" ");if(o.length===2){let s=parseInt(o[0]),n=parseInt(o[1]);for(let a=s;a<=n;a+=100)t.push(a)}else o.length===1&&t.push(parseInt(o[0]))}),t}function Ki(e){let t=/^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/,r=e.trim(),o=s=>(s=s.trim(),s.match(t)?(s=s.replace(/^["']|["']$/g,""),`"${s}"`):s);return r.includes(",")?r.split(",").map(o).filter(s=>s!=="").join(", "):o(r)}function yn(e){if(!e)return"";let t=e.trim();return t.includes(",")&&(t=(t.split(",").find(r=>r.trim()!=="")??"").trim()),t=t.replace(/^["']|["']$/g,""),window.navigator.userAgent.toLowerCase().includes("firefox")&&(t=`"${t}"`),t}function Dr(e){let t={fontFamily:Ki(e.fontFamily)};if(!("fontFace"in e)||!Array.isArray(e.fontFace))return t.fontWeight="400",t.fontStyle="normal",t;if(e.fontFace){let r=e.fontFace.filter(o=>o?.fontStyle&&o.fontStyle.toLowerCase()==="normal");if(r.length>0){t.fontStyle="normal";let o=Dc(r),s=zc(400,o);t.fontWeight=String(s)||"400"}else t.fontStyle=e.fontFace.length&&e.fontFace[0].fontStyle||"normal",t.fontWeight=e.fontFace.length&&String(e.fontFace[0].fontWeight)||"400"}return t}function Ji(e){return{fontFamily:Ki(e.fontFamily),fontStyle:e.fontStyle||"normal",fontWeight:e.fontWeight||"400"}}var po=u(D(),1);function Wo({fontSize:e,variation:t}){let{base:r}=(0,Qi.useContext)(Je),o=r;t&&(o={...r,...t});let[s]=Fe("color.text"),[n,a]=Hi(o),l=n?Dr(n):{},h=a?Dr(a):{};return s&&(l.color=s,h.color=s),e&&(l.fontSize=e,h.fontSize=e),(0,po.jsxs)($i.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center",lineHeight:1},children:[(0,po.jsx)("span",{style:h,children:(0,vn._x)("A","Uppercase letter A")}),(0,po.jsx)("span",{style:l,children:(0,vn._x)("a","Lowercase letter A")})]})}var el=u(X(),1);var tl=u(D(),1);function rl({normalizedColorSwatchSize:e,ratio:t}){let{highlightedColors:r}=zr(),o=e*t;return r.map(({slug:s,color:n},a)=>(0,tl.jsx)(el.__unstableMotion.div,{style:{height:o,width:o,background:n,borderRadius:o/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:a===1?.2:.1}},`${s}-${a}`))}var nl=u(X(),1),Mr=u(pr(),1),yr=u(ve(),1);var Qt=u(D(),1),ol=248,sl=152,Mc={leading:!0,trailing:!0};function jc({children:e,label:t,isFocused:r,withHoverView:o}){let[s="white"]=Fe("color.background"),[n]=Fe("color.gradient"),a=(0,Mr.useReducedMotion)(),[l,h]=(0,yr.useState)(!1),[f,{width:c}]=(0,Mr.useResizeObserver)(),[d,m]=(0,yr.useState)(c),[g,y]=(0,yr.useState)(),T=(0,Mr.useThrottle)(m,250,Mc);(0,yr.useLayoutEffect)(()=>{c&&T(c)},[c,T]),(0,yr.useLayoutEffect)(()=>{let b=d?d/ol:1,P=b-(g||0);(Math.abs(P)>.1||!g)&&y(b)},[d,g]);let O=c?c/ol:1,_=g||O;return(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)("div",{style:{position:"relative"},children:f}),!!c&&(0,Qt.jsx)("div",{className:Ze("global-styles-ui-preview__wrapper",{"is-hoverable":o}),style:{height:sl*_},onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),tabIndex:-1,children:(0,Qt.jsx)(nl.__unstableMotion.div,{style:{height:sl*_,width:"100%",background:n??s},initial:"start",animate:(l||r)&&!a&&t?"hover":"start",children:[].concat(e).map((b,P)=>b({ratio:_,key:P}))})})]})}var jr=jc;var mt=u(D(),1),Gc={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},Uc={hover:{opacity:1},start:{opacity:.5}},Wc={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};function Hc({label:e,isFocused:t,withHoverView:r,variation:o}){let[s]=Fe("typography.fontWeight"),[n="serif"]=Fe("typography.fontFamily"),[a=n]=Fe("elements.h1.typography.fontFamily"),[l=s]=Fe("elements.h1.typography.fontWeight"),[h="black"]=Fe("color.text"),[f=h]=Fe("elements.h1.color.text"),{paletteColors:c}=zr();return(0,mt.jsxs)(jr,{label:e,isFocused:t,withHoverView:r,children:[({ratio:d,key:m})=>(0,mt.jsx)(Vt.__unstableMotion.div,{variants:Gc,style:{height:"100%",overflow:"hidden"},children:(0,mt.jsxs)(Vt.__experimentalHStack,{spacing:10*d,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,mt.jsx)(Wo,{fontSize:65*d,variation:o}),(0,mt.jsx)(Vt.__experimentalVStack,{spacing:4*d,children:(0,mt.jsx)(rl,{normalizedColorSwatchSize:32,ratio:d})})]})},m),({key:d})=>(0,mt.jsx)(Vt.__unstableMotion.div,{variants:r?Uc:void 0,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,mt.jsx)(Vt.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:c.slice(0,4).map(({color:m},g)=>(0,mt.jsx)("div",{style:{height:"100%",background:m,flexGrow:1}},g))})},d),({ratio:d,key:m})=>(0,mt.jsx)(Vt.__unstableMotion.div,{variants:Wc,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,mt.jsx)(Vt.__experimentalVStack,{spacing:3*d,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*d,boxSizing:"border-box"},children:e&&(0,mt.jsx)("div",{style:{fontSize:40*d,fontFamily:a,color:f,fontWeight:l,lineHeight:"1em",textAlign:"center"},children:e})})},m)]})}var bn=Hc;var il=u(D(),1);var xn=u(Br(),1),Gr=u(ie(),1),br=u(X(),1),Sn=u(pt(),1),$t=u(ve(),1),Ho=u(it(),1),pl=u(pr(),1);import{speak as Jc}from"@wordpress/a11y";var ll=u(Br(),1),ul=u(pt(),1),Zc=u(X(),1);var Xc=u(D(),1);function Kc(e,t){return e?.filter(r=>r.source==="block"||t.includes(r.name))||[]}function wn(e){let t=(0,ul.useSelect)(s=>{let{getBlockStyles:n}=s(ll.store);return n(e)},[e]),[r]=Fe("variations",e),o=Object.keys(r??{});return Kc(t,o)}var vr=u(X(),1),fl=u(ie(),1);var cl=u(it(),1);var dl=u(D(),1),{StateControl:U0}=ye(cl.privateApis);var Nt=u(D(),1),{useHasDimensionsPanel:Qc,useHasTypographyPanel:$c,useHasBorderPanel:ed,useSettingsForBlockElement:td,useHasColorPanel:rd}=ye(Ho.privateApis);function od(){let e=(0,Sn.useSelect)(s=>s(xn.store).getBlockTypes(),[]),t=(s,n)=>{let{core:a,noncore:l}=s;return(n.name.startsWith("core/")?a:l).push(n),s},{core:r,noncore:o}=e.reduce(t,{core:[],noncore:[]});return[...r,...o]}function sd(e){let[t]=Te("",e),r=td(t,e),o=$c(r),s=rd(r),n=ed(r),a=Qc(r),l=n||a,h=!!wn(e)?.length;return o||s||l||h}function nd({block:e}){return sd(e.name)?(0,Nt.jsx)(Bt,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,Nt.jsxs)(br.__experimentalHStack,{justify:"flex-start",children:[(0,Nt.jsx)(Ho.BlockIcon,{icon:e.icon}),(0,Nt.jsx)(br.FlexItem,{children:e.title})]})}):null}function ad({filterValue:e}){let t=od(),r=(0,pl.useDebounce)(Jc,500),{isMatchingSearchTerm:o}=(0,Sn.useSelect)(xn.store),s=e?t.filter(a=>o(a,e)):t,n=(0,$t.useRef)(null);return(0,$t.useEffect)(()=>{if(!e)return;let a=n.current?.childElementCount||0,l=(0,Gr.sprintf)((0,Gr._n)("%d result found.","%d results found.",a),a);r(l,"polite")},[e,r]),(0,Nt.jsx)("div",{ref:n,className:"global-styles-ui-block-types-item-list",role:"list",children:s.length===0?(0,Nt.jsx)(br.__experimentalText,{align:"center",as:"p",children:(0,Gr.__)("No blocks found.")}):s.map(a=>(0,Nt.jsx)(nd,{block:a},"menu-itemblock-"+a.name))})}var J0=(0,$t.memo)(ad);var cd=u(Br(),1),yl=u(it(),1),Cn=u(ve(),1),dd=u(pt(),1),pd=u(wt(),1),_n=u(X(),1),vl=u(ie(),1);var id=u(it(),1),ml=u(Br(),1),ld=u(X(),1),ud=u(ve(),1);var fd=u(D(),1);var hl=u(X(),1),gl=u(D(),1);function St({children:e,level:t=2}){return(0,gl.jsx)(hl.__experimentalHeading,{className:"global-styles-ui-subtitle",level:t,children:e})}var Fn=u(D(),1);var{useHasDimensionsPanel:hb,useHasTypographyPanel:gb,useHasBorderPanel:yb,useSettingsForBlockElement:vb,useHasColorPanel:bb,useHasFiltersPanel:wb,useHasImageSettingsPanel:xb,useHasBackgroundPanel:Sb,BackgroundPanel:Cb,BorderPanel:_b,ColorPanel:Fb,TypographyPanel:kb,DimensionsPanel:Ob,FiltersPanel:Tb,ImageSettingsPanel:Pb,AdvancedPanel:Ab}=ye(yl.privateApis);var kg=u(ie(),1),Og=u(X(),1),Tg=u(ve(),1);var md=u(X(),1);var hd=u(D(),1);var gd=u(ie(),1),qo=u(X(),1);var bl=u(D(),1);var Xo=u(X(),1);var wl=u(X(),1);var Yo=u(D(),1),yd=({variation:e,isFocused:t,withHoverView:r})=>(0,Yo.jsx)(jr,{label:e.title,isFocused:t,withHoverView:r,children:({ratio:o,key:s})=>(0,Yo.jsx)(wl.__experimentalHStack,{spacing:10*o,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,Yo.jsx)(Wo,{variation:e,fontSize:85*o})},s)}),xl=yd;var Cl=u(X(),1),wr=u(ve(),1),_l=u(kn(),1),Zo=u(ie(),1);var mo=u(D(),1);function Ur({variation:e,children:t,isPill:r=!1,properties:o,showTooltip:s=!1}){let[n,a]=(0,wr.useState)(!1),{base:l,user:h,onChange:f}=(0,wr.useContext)(Je),c=(0,wr.useMemo)(()=>{let O=hr(l,e);return o&&(O=Go(O,o)),{user:e,base:l,merged:O,onChange:()=>{}}},[e,l,o]),d=()=>f(e),m=O=>{O.keyCode===_l.ENTER&&(O.preventDefault(),d())},g=(0,wr.useMemo)(()=>io(h,e),[h,e]),y=e?.title;e?.description&&(y=(0,Zo.sprintf)((0,Zo._x)("%1$s (%2$s)","variation label"),e?.title,e?.description));let T=(0,mo.jsx)("div",{className:Ze("global-styles-ui-variations_item",{"is-active":g}),role:"button",onClick:d,onKeyDown:m,tabIndex:0,"aria-label":y,"aria-current":g,onFocus:()=>a(!0),onBlur:()=>a(!1),children:(0,mo.jsx)("div",{className:Ze("global-styles-ui-variations_item-preview",{"is-pill":r}),children:t(n)})});return(0,mo.jsx)(Je.Provider,{value:c,children:s?(0,mo.jsx)(Cl.Tooltip,{text:e?.title,children:T}):T})}var xr=u(D(),1),Fl=["typography"];function Ko({title:e,gap:t=2}){let r=Uo(Fl);return r?.length<=1?null:(0,xr.jsxs)(Xo.__experimentalVStack,{spacing:3,children:[e&&(0,xr.jsx)(St,{level:3,children:e}),(0,xr.jsx)(Xo.__experimentalGrid,{columns:3,gap:t,className:"global-styles-ui-style-variations-container",children:r.map((o,s)=>(0,xr.jsx)(Ur,{variation:o,properties:Fl,showTooltip:!0,children:()=>(0,xr.jsx)(xl,{variation:o})},s))})]})}var _g=u(ie(),1),xo=u(X(),1);var Fg=u(ve(),1);var Ht=u(ve(),1),or=u(pt(),1),rr=u(wt(),1),An=u(ie(),1);var On=u(Ol(),1),Tl=u(wt(),1),Pl="/wp/v2/font-families";function Al(e){let{receiveEntityRecords:t}=e.dispatch(Tl.store);t("postType","wp_font_family",[],void 0,!0)}async function Rl(e,t){let o=await(0,On.default)({path:Pl,method:"POST",body:e});return Al(t),{id:o.id,...o.font_family_settings,fontFace:[]}}async function El(e,t,r){let o={path:`${Pl}/${e}/font-faces`,method:"POST",body:t},s=await(0,On.default)(o);return Al(r),{id:s.id,...s.font_face_settings}}var Bl=u(X(),1);var Ot=u(ie(),1),Tn=["otf","ttf","woff","woff2"],Il={100:(0,Ot._x)("Thin","font weight"),200:(0,Ot._x)("Extra-light","font weight"),300:(0,Ot._x)("Light","font weight"),400:(0,Ot._x)("Normal","font weight"),500:(0,Ot._x)("Medium","font weight"),600:(0,Ot._x)("Semi-bold","font weight"),700:(0,Ot._x)("Bold","font weight"),800:(0,Ot._x)("Extra-bold","font weight"),900:(0,Ot._x)("Black","font weight")},Ll={normal:(0,Ot._x)("Normal","font style"),italic:(0,Ot._x)("Italic","font style")};var{File:Vl}=window,{kebabCase:vd}=ye(Bl.privateApis);function er(e,t={}){return!e.name&&(e.fontFamily||e.slug)&&(e.name=e.fontFamily||e.slug),{...e,...t}}function bd(e){return typeof e!="string"?!1:e!==decodeURIComponent(e)}function Jo(e){let t=Il[e.fontWeight??""]||e.fontWeight,r=e.fontStyle==="normal"?"":Ll[e.fontStyle??""]||e.fontStyle;return`${t} ${r}`}function wd(e=[],t=[]){let r=new Map;for(let o of e)r.set(`${o.fontWeight}${o.fontStyle}`,o);for(let o of t)r.set(`${o.fontWeight}${o.fontStyle}`,o);return Array.from(r.values())}function Nl(e=[],t=[]){let r=new Map;for(let o of e)r.set(o.slug,{...o});for(let o of t)if(r.has(o.slug)){let{fontFace:s,...n}=o,a=r.get(o.slug),l=wd(a.fontFace,s);r.set(o.slug,{...n,fontFace:l})}else r.set(o.slug,{...o});return Array.from(r.values())}async function tr(e,t,r="all"){let o;if(typeof t=="string")o=`url(${t})`;else if(t instanceof Vl)o=await t.arrayBuffer();else return;let n=await new window.FontFace(yn(e.fontFamily),o,{style:e.fontStyle,weight:String(e.fontWeight)}).load();if((r==="document"||r==="all")&&document.fonts.add(n),r==="iframe"||r==="all"){let a=document.querySelector('iframe[name="editor-canvas"]');a?.contentDocument&&a.contentDocument.fonts.add(n)}}function ho(e,t="all"){let r=o=>{o.forEach(s=>{s.family===yn(e?.fontFamily)&&s.weight===e?.fontWeight&&s.style===e?.fontStyle&&o.delete(s)})};if((t==="document"||t==="all")&&r(document.fonts),t==="iframe"||t==="all"){let o=document.querySelector('iframe[name="editor-canvas"]');o?.contentDocument&&r(o.contentDocument.fonts)}}function Wr(e){if(!e)return;let t;if(Array.isArray(e)?t=e[0]:t=e,!t.startsWith("file:."))return bd(t)||(t=encodeURI(t)),t}function zl(e){let t=new FormData,{fontFace:r,category:o,...s}=e,n={...s,slug:vd(e.slug)};return t.append("font_family_settings",JSON.stringify(n)),t}function Dl(e){return(e?.fontFace??[]).map((r,o)=>{let s={...r},n=new FormData;if(s.file){let a=Array.isArray(s.file)?s.file:[s.file],l=[];a.forEach((h,f)=>{let c=`file-${o}-${f}`;n.append(c,h,h.name),l.push(c)}),s.src=l.length===1?l[0]:l,delete s.file,n.append("font_face_settings",JSON.stringify(s))}else n.append("font_face_settings",JSON.stringify(s));return n})}async function Ml(e,t,r){let o=[];for(let n of t)try{let a=await El(e,n,r);o.push({status:"fulfilled",value:a})}catch(a){o.push({status:"rejected",reason:a})}let s={errors:[],successes:[]};return o.forEach((n,a)=>{if(n.status==="fulfilled"&&n.value){let l=n.value;s.successes.push(l)}else n.reason&&s.errors.push({data:t[a],message:n.reason.message})}),s}async function jl(e){e=Array.isArray(e)?e:[e];let t=await Promise.all(e.map(async r=>fetch(new Request(r)).then(o=>{if(!o.ok)throw new Error(`Error downloading font face asset from ${r}. Server responded with status: ${o.status}`);return o.blob()}).then(o=>{let s=r.split("/").pop();return new Vl([o],s,{type:o.type})})));return t.length===1?t[0]:t}function Pn(e,t){return t.findIndex(r=>r.fontWeight===e.fontWeight&&r.fontStyle===e.fontStyle)!==-1}function Gl(e,t,r){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let o=t.pop(),s=e;for(let n of t){let a=s[n];s=s[n]=Array.isArray(a)?[...a]:{...a}}return s[o]=r,e}function Qo(e,t,r=[]){let o=h=>h.slug===e.slug,s=h=>h.find(o),n=h=>h?r.filter(f=>!o(f)):[...r,e],a=h=>{let f=d=>d.fontWeight===t.fontWeight&&d.fontStyle===t.fontStyle;if(!h)return[...r,{...e,fontFace:[t]}];let c=h.fontFace||[];return c.find(f)?c=c.filter(d=>!f(d)):c=[...c,t],c.length===0?r.filter(d=>!o(d)):r.map(d=>o(d)?{...d,fontFace:c}:d)},l=s(r);return t?a(l):n(l)}var Ul=u(D(),1),lt=(0,Ht.createContext)({});lt.displayName="FontLibraryContext";function xd({children:e}){let t=(0,or.useRegistry)(),{saveEntityRecord:r,deleteEntityRecord:o}=(0,or.useDispatch)(rr.store),{globalStylesId:s}=(0,or.useSelect)(x=>{let{__experimentalGetCurrentGlobalStylesId:E}=x(rr.store);return{globalStylesId:E()}},[]),n=(0,rr.useEntityRecord)("root","globalStyles",s),[a,l]=(0,Ht.useState)(!1),{records:h=[],isResolving:f}=(0,rr.useEntityRecords)("postType","wp_font_family",{_embed:!0}),c=(h||[]).map(x=>({id:x.id,...x.font_family_settings||{},fontFace:x?._embedded?.font_faces?.map(E=>E.font_face_settings)||[]}))||[],[d,m]=Te("typography.fontFamilies"),g=async x=>{if(!n.record)return;let E=n.record,te=Gl(E??{},["settings","typography","fontFamilies"],x);await r("root","globalStyles",te)},[y,T]=(0,Ht.useState)(""),[O,_]=(0,Ht.useState)(void 0),S=d?.theme?d.theme.map(x=>er(x,{source:"theme"})).sort((x,E)=>x.name.localeCompare(E.name)):[],b=d?.custom?d.custom.map(x=>er(x,{source:"custom"})).sort((x,E)=>x.name.localeCompare(E.name)):[],P=c?c.map(x=>er(x,{source:"custom"})).sort((x,E)=>x.name.localeCompare(E.name)):[];(0,Ht.useEffect)(()=>{y||_(void 0)},[y]);let q=x=>{if(!x){_(void 0);return}let te=(x.source==="theme"?S:P).find(ce=>ce.slug===x.slug);_({...te||x,source:x.source})},[I]=(0,Ht.useState)(new Set),N=x=>x.reduce((te,ce)=>{let ae=ce?.fontFace&&ce.fontFace?.length>0?ce?.fontFace.map(Ce=>`${Ce.fontStyle??""}${Ce.fontWeight??""}`):["normal400"];return te[ce.slug]=ae,te},{}),W=x=>N(x==="theme"?S:b),$=(x,E,te,ce)=>!E&&!te?!!W(ce)[x]:!!W(ce)[x]?.includes((E??"")+(te??"")),be=(x,E)=>W(E)[x]||[];async function H(x){l(!0);try{let E=[],te=[];for(let ae of x){let Ce=!1,qe=await(0,or.resolveSelect)(rr.store).getEntityRecords("postType","wp_font_family",{slug:ae.slug,per_page:1,_embed:!0}),ke=qe&&qe.length>0?qe[0]:null,J=ke?{id:ke.id,...ke.font_family_settings,fontFace:(ke?._embedded?.font_faces??[]).map(Me=>Me.font_face_settings)||[]}:null;J||(Ce=!0,J=await Rl(zl(ae),t));let Se=J.fontFace&&ae.fontFace?J.fontFace.filter(Me=>Me&&ae.fontFace&&Pn(Me,ae.fontFace)):[];J.fontFace&&ae.fontFace&&(ae.fontFace=ae.fontFace.filter(Me=>!Pn(Me,J.fontFace)));let Ae=[],Ct=[];if(ae?.fontFace?.length??!1){let Me=await Ml(J.id,Dl(ae),t);Ae=Me?.successes,Ct=Me?.errors}(Ae?.length>0||Se?.length>0)&&(J.fontFace=[...Ae],E.push(J)),J&&!ae?.fontFace?.length&&E.push(J),Ce&&(ae?.fontFace?.length??0)>0&&Ae?.length===0&&await o("postType","wp_font_family",J.id,{force:!0}),te=te.concat(Ct)}let ce=te.reduce((ae,Ce)=>ae.includes(Ce.message)?ae:[...ae,Ce.message],[]);if(E.length>0){let ae=le(E);await g(ae)}if(ce.length>0){let ae=new Error((0,An.__)("There was an error installing fonts."));throw ae.installationErrors=ce,ae}}finally{l(!1)}}async function v(x){if(!x?.id)throw new Error((0,An.__)("Font family to uninstall is not defined."));try{await o("postType","wp_font_family",x.id,{force:!0});let E=L(x);return await g(E),{deleted:!0}}catch(E){throw console.error("There was an error uninstalling the font family:",E),E}}let L=x=>{let te=(d?.[x.source??""]??[]).filter(ae=>ae.slug!==x.slug),ce={...d,[x.source??""]:te};return m(ce),x.fontFace&&x.fontFace.forEach(ae=>{ho(ae,"all")}),ce},le=x=>{let E=oe(x),te={...d,custom:Nl(d?.custom,E)};return m(te),K(E),te},oe=x=>x.map(({id:E,fontFace:te,...ce})=>({...ce,...te&&te.length>0?{fontFace:te.map(({id:ae,...Ce})=>Ce)}:{}})),K=x=>{x.forEach(E=>{E.fontFace&&E.fontFace.forEach(te=>{let ce=Wr(te?.src??"");ce&&tr(te,ce,"all")})})},ge=(x,E)=>{let te=d?.[x.source??""]??[],ce=Qo(x,E,te);m({...d,[x.source??""]:ce});let ae=$(x.slug,E?.fontStyle??"",E?.fontWeight??"",x.source??"custom");if(E&&ae)ho(E,"all");else{let Ce=Wr(E?.src??"");E&&Ce&&tr(E,Ce,"all")}},R=async x=>{if(!x.src)return;let E=Wr(x.src);!E||I.has(E)||(tr(x,E,"document"),I.add(E))};return(0,Ul.jsx)(lt.Provider,{value:{libraryFontSelected:O,handleSetLibraryFontSelected:q,fontFamilies:d??{},baseCustomFonts:P,isFontActivated:$,getFontFacesActivated:be,loadFontFaceAsset:R,installFonts:H,uninstallFontFamily:v,toggleActivateFont:ge,getAvailableFontsOutline:N,modalTabOpen:y,setModalTabOpen:T,saveFontFamilies:g,isResolvingLibrary:f,isInstalling:a},children:e})}var $o=xd;var ms=u(ie(),1),Bn=u(X(),1),Fu=u(wt(),1),Sg=u(pt(),1);var he=u(X(),1),yo=u(wt(),1),Rn=u(pt(),1),Cr=u(ve(),1),Ee=u(ie(),1);var qr=u(ie(),1),Tt=u(X(),1);var Wl=u(X(),1),zt=u(ve(),1);var es=u(D(),1);function Sd(e){if(e.preview)return e.preview;if(e.src)return Array.isArray(e.src)?e.src[0]:e.src}function Cd(e){return"fontStyle"in e&&e.fontStyle||"fontWeight"in e&&e.fontWeight?e:"fontFace"in e&&e.fontFace&&e.fontFace.length?e.fontFace.find(t=>t.fontStyle==="normal"&&t.fontWeight==="400")||e.fontFace[0]:{fontStyle:"normal",fontWeight:"400",fontFamily:e.fontFamily}}function _d({font:e,text:t}){let r=(0,zt.useRef)(null),o=Cd(e),s=Dr(e);t=t||("name"in e?e.name:"");let n=e.preview,[a,l]=(0,zt.useState)(!1),[h,f]=(0,zt.useState)(!1),{loadFontFaceAsset:c}=(0,zt.useContext)(lt),d=n??Sd(o),m=d&&d.match(/\.(png|jpg|jpeg|gif|svg)$/i),g=Ji(o),y={fontSize:"18px",lineHeight:1,opacity:h?"1":"0",...s,...g};return(0,zt.useEffect)(()=>{let T=new window.IntersectionObserver(([O])=>{l(O.isIntersecting)},{});return r.current&&T.observe(r.current),()=>T.disconnect()},[r]),(0,zt.useEffect)(()=>{(async()=>a&&(!m&&o.src&&await c(o),f(!0)))()},[o,a,c,m]),(0,es.jsx)("div",{ref:r,children:m?(0,es.jsx)("img",{src:d,loading:"lazy",alt:t,className:"font-library__font-variant_demo-image"}):(0,es.jsx)(Wl.__experimentalText,{style:y,className:"font-library__font-variant_demo-text",children:t})})}var Hr=_d;var Dt=u(D(),1);function Fd({font:e,onClick:t,variantsText:r,navigatorPath:o}){let s=e.fontFace?.length||1,n={cursor:t?"pointer":"default"},a=(0,Tt.useNavigator)();return(0,Dt.jsx)(Tt.Button,{__next40pxDefaultSize:!0,onClick:()=>{t(),o&&a.goTo(o)},style:n,className:"font-library__font-card",children:(0,Dt.jsxs)(Tt.Flex,{justify:"space-between",wrap:!1,children:[(0,Dt.jsx)(Hr,{font:e}),(0,Dt.jsxs)(Tt.Flex,{justify:"flex-end",children:[(0,Dt.jsx)(Tt.FlexItem,{children:(0,Dt.jsx)(Tt.__experimentalText,{className:"font-library__font-card__count",children:r||(0,qr.sprintf)((0,qr._n)("%d variant","%d variants",s),s)})}),(0,Dt.jsx)(Tt.FlexItem,{children:(0,Dt.jsx)(so,{icon:(0,qr.isRTL)()?cr:dr})})]})]})})}var go=Fd;var ts=u(ve(),1),rs=u(X(),1);var Sr=u(D(),1);function kd({face:e,font:t}){let{isFontActivated:r,toggleActivateFont:o}=(0,ts.useContext)(lt),s=(t?.fontFace?.length??0)>0?r(t.slug,e.fontStyle,e.fontWeight,t.source):r(t.slug,void 0,void 0,t.source),n=()=>{if((t?.fontFace?.length??0)>0){o(t,e);return}o(t)},a=t.name+" "+Jo(e),l=(0,ts.useId)();return(0,Sr.jsx)("div",{className:"font-library__font-card",children:(0,Sr.jsxs)(rs.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,Sr.jsx)(rs.CheckboxControl,{checked:s,onChange:n,id:l}),(0,Sr.jsx)("label",{htmlFor:l,children:(0,Sr.jsx)(Hr,{font:e,text:a,onClick:n})})]})})}var Hl=kd;function ql(e){switch(e){case"normal":return 400;case"bold":return 700;case"bolder":return 500;case"lighter":return 300;default:return parseInt(e,10)}}function os(e){return e.sort((t,r)=>t.fontStyle==="normal"&&r.fontStyle!=="normal"?-1:r.fontStyle==="normal"&&t.fontStyle!=="normal"?1:t.fontStyle===r.fontStyle?ql(t.fontWeight?.toString()??"normal")-ql(r.fontWeight?.toString()??"normal"):!t.fontStyle||!r.fontStyle?t.fontStyle?-1:1:t.fontStyle.localeCompare(r.fontStyle))}var fe=u(D(),1);function Od(){let{baseCustomFonts:e,libraryFontSelected:t,handleSetLibraryFontSelected:r,uninstallFontFamily:o,isResolvingLibrary:s,isInstalling:n,saveFontFamilies:a,getFontFacesActivated:l}=(0,Cr.useContext)(lt),[h,f]=Te("typography.fontFamilies"),[c,d]=(0,Cr.useState)(!1),[m,g]=(0,Cr.useState)(null),[y]=Te("typography.fontFamilies",void 0,"base"),T=(0,Rn.useSelect)(R=>{let{__experimentalGetCurrentGlobalStylesId:x}=R(yo.store);return x()},[]),_=!!(0,yo.useEntityRecord)("root","globalStyles",T)?.edits?.settings?.typography?.fontFamilies,S=h?.theme?h.theme.map(R=>er(R,{source:"theme"})).sort((R,x)=>R.name.localeCompare(x.name)):[],b=new Set(S.map(R=>R.slug)),P=y?.theme?S.concat(y.theme.filter(R=>!b.has(R.slug)).map(R=>er(R,{source:"theme"})).sort((R,x)=>R.name.localeCompare(x.name))):[],q=t?.source==="custom"&&t?.id,I=(0,Rn.useSelect)(R=>{let{canUser:x}=R(yo.store);return q&&x("delete",{kind:"postType",name:"wp_font_family",id:q})},[q]),N=!!t&&t?.source!=="theme"&&I,W=()=>{d(!0)},$=async()=>{g(null);try{await a(h),g({type:"success",message:(0,Ee.__)("Font family updated successfully.")})}catch(R){g({type:"error",message:(0,Ee.sprintf)((0,Ee.__)("There was an error updating the font family. %s"),R.message)})}},be=R=>R?!R.fontFace||!R.fontFace.length?[{fontFamily:R.fontFamily,fontStyle:"normal",fontWeight:"400"}]:os(R.fontFace):[],H=R=>{let x=R?.fontFace&&(R?.fontFace?.length??0)>0?R.fontFace.length:1,E=l(R.slug,R.source).length;return(0,Ee.sprintf)((0,Ee.__)("%1$d/%2$d variants active"),E,x)};(0,Cr.useEffect)(()=>{r(t)},[]);let v=t?l(t.slug,t.source).length:0,L=t?.fontFace?.length??(t?.fontFamily?1:0),le=v>0&&v!==L,oe=v===L,K=()=>{if(!t||!t?.source)return;let R=h?.[t.source]?.filter(E=>E.slug!==t.slug)??[],x=oe?R:[...R,t];f({...h,[t.source]:x}),t.fontFace&&t.fontFace.forEach(E=>{if(oe)ho(E,"all");else{let te=Wr(E?.src??"");te&&tr(E,te,"all")}})},ge=P.length>0||e.length>0;return(0,fe.jsxs)("div",{className:"font-library__tabpanel-layout",children:[s&&(0,fe.jsx)("div",{className:"font-library__loading",children:(0,fe.jsx)(he.ProgressBar,{})}),!s&&(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsxs)(he.Navigator,{initialPath:t?"/fontFamily":"/",children:[(0,fe.jsx)(he.Navigator.Screen,{path:"/",children:(0,fe.jsxs)(he.__experimentalVStack,{spacing:"8",children:[m&&(0,fe.jsx)(he.Notice,{status:m.type,onRemove:()=>g(null),children:m.message}),!ge&&(0,fe.jsx)(he.__experimentalText,{as:"p",children:(0,Ee.__)("No fonts installed.")}),P.length>0&&(0,fe.jsxs)(he.__experimentalVStack,{children:[(0,fe.jsx)("h2",{className:"font-library__fonts-title",children:(0,Ee._x)("Theme","font source")}),(0,fe.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:P.map(R=>(0,fe.jsx)("li",{className:"font-library__fonts-list-item",children:(0,fe.jsx)(go,{font:R,navigatorPath:"/fontFamily",variantsText:H(R),onClick:()=>{g(null),r(R)}})},R.slug))})]}),e.length>0&&(0,fe.jsxs)(he.__experimentalVStack,{children:[(0,fe.jsx)("h2",{className:"font-library__fonts-title",children:(0,Ee._x)("Custom","font source")}),(0,fe.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:e.map(R=>(0,fe.jsx)("li",{className:"font-library__fonts-list-item",children:(0,fe.jsx)(go,{font:R,navigatorPath:"/fontFamily",variantsText:H(R),onClick:()=>{g(null),r(R)}})},R.slug))})]})]})}),(0,fe.jsxs)(he.Navigator.Screen,{path:"/fontFamily",children:[t&&(0,fe.jsx)(Td,{font:t,isOpen:c,setIsOpen:d,setNotice:g,uninstallFontFamily:o,handleSetLibraryFontSelected:r}),(0,fe.jsxs)(he.Flex,{justify:"flex-start",children:[(0,fe.jsx)(he.Navigator.BackButton,{icon:(0,Ee.isRTL)()?dr:cr,size:"small",onClick:()=>{r(void 0),g(null)},label:(0,Ee.__)("Back")}),(0,fe.jsx)(he.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:t?.name})]}),m&&(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(he.__experimentalSpacer,{margin:1}),(0,fe.jsx)(he.Notice,{status:m.type,onRemove:()=>g(null),children:m.message}),(0,fe.jsx)(he.__experimentalSpacer,{margin:1})]}),(0,fe.jsx)(he.__experimentalSpacer,{margin:4}),(0,fe.jsx)(he.__experimentalText,{children:(0,Ee.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")}),(0,fe.jsx)(he.__experimentalSpacer,{margin:4}),(0,fe.jsxs)(he.__experimentalVStack,{spacing:0,children:[(0,fe.jsx)(he.CheckboxControl,{className:"font-library__select-all",label:(0,Ee.__)("Select all"),checked:oe,onChange:K,indeterminate:le}),(0,fe.jsx)(he.__experimentalSpacer,{margin:8}),(0,fe.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:t&&be(t).map((R,x)=>(0,fe.jsx)("li",{className:"font-library__fonts-list-item",children:(0,fe.jsx)(Hl,{font:t,face:R},`face${x}`)},`face${x}`))})]})]})]}),(0,fe.jsxs)(he.__experimentalHStack,{justify:"flex-end",className:"font-library__footer",children:[n&&(0,fe.jsx)(he.ProgressBar,{}),N&&(0,fe.jsx)(he.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"tertiary",onClick:W,children:(0,Ee.__)("Delete")}),(0,fe.jsx)(he.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:$,disabled:!_,accessibleWhenDisabled:!0,children:(0,Ee.__)("Update")})]})]})]})}function Td({font:e,isOpen:t,setIsOpen:r,setNotice:o,uninstallFontFamily:s,handleSetLibraryFontSelected:n}){let a=(0,he.useNavigator)(),l=async()=>{o(null),r(!1);try{await s(e),a.goBack(),n(void 0),o({type:"success",message:(0,Ee.__)("Font family uninstalled successfully.")})}catch(f){o({type:"error",message:(0,Ee.__)("There was an error uninstalling the font family.")+f.message})}},h=()=>{r(!1)};return(0,fe.jsx)(he.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,Ee.__)("Cancel"),confirmButtonText:(0,Ee.__)("Delete"),onCancel:h,onConfirm:l,size:"medium",children:e&&(0,Ee.sprintf)((0,Ee.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name)})}var ss=Od;var Ke=u(ve(),1),ne=u(X(),1),eu=u(pr(),1),Re=u(ie(),1);var tu=u(wt(),1);function Yl(e,t){let{category:r,search:o}=t,s=e||[];return r&&r!=="all"&&(s=s.filter(n=>n.categories&&n.categories.indexOf(r)!==-1)),o&&(s=s.filter(n=>n.font_family_settings&&n.font_family_settings.name.toLowerCase().includes(o.toLowerCase()))),s}function Zl(e){return e.reduce((t,r)=>({...t,[r.slug]:(r?.fontFace||[]).reduce((o,s)=>({...o,[`${s.fontStyle}-${s.fontWeight}`]:!0}),{})}),{})}function Xl(e,t,r){return t?!!r[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!r[e]}var vo=u(ie(),1),ut=u(X(),1),Pt=u(D(),1);function Pd(){let e=()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))};return(0,Pt.jsx)("div",{className:"font-library__google-fonts-confirm",children:(0,Pt.jsx)(ut.Card,{children:(0,Pt.jsxs)(ut.CardBody,{children:[(0,Pt.jsx)(ut.__experimentalHeading,{level:2,children:(0,vo.__)("Connect to Google Fonts")}),(0,Pt.jsx)(ut.__experimentalSpacer,{margin:6}),(0,Pt.jsx)(ut.__experimentalText,{as:"p",children:(0,vo.__)("To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts.")}),(0,Pt.jsx)(ut.__experimentalSpacer,{margin:3}),(0,Pt.jsx)(ut.__experimentalText,{as:"p",children:(0,vo.__)("You can alternatively upload files directly on the Upload tab.")}),(0,Pt.jsx)(ut.__experimentalSpacer,{margin:6}),(0,Pt.jsx)(ut.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,vo.__)("Allow access to Google Fonts")})]})})})}var Kl=Pd;var Jl=u(ve(),1),ns=u(X(),1);var _r=u(D(),1);function Ad({face:e,font:t,handleToggleVariant:r,selected:o}){let s=()=>{if(t?.fontFace){r(t,e);return}r(t)},n=t.name+" "+Jo(e),a=(0,Jl.useId)();return(0,_r.jsx)("div",{className:"font-library__font-card",children:(0,_r.jsxs)(ns.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,_r.jsx)(ns.CheckboxControl,{checked:o,onChange:s,id:a}),(0,_r.jsx)("label",{htmlFor:a,children:(0,_r.jsx)(Hr,{font:e,text:n,onClick:s})})]})})}var Ql=Ad;var ee=u(D(),1),Rd={slug:"all",name:(0,Re._x)("All","font categories")},$l="wp-font-library-google-fonts-permission",Ed=500;function Id({slug:e}){let t=e==="google-fonts",r=()=>window.localStorage.getItem($l)==="true",[o,s]=(0,Ke.useState)(null),[n,a]=(0,Ke.useState)(null),[l,h]=(0,Ke.useState)([]),[f,c]=(0,Ke.useState)(1),[d,m]=(0,Ke.useState)({}),[g,y]=(0,Ke.useState)(t&&!r()),{installFonts:T,isInstalling:O}=(0,Ke.useContext)(lt),{record:_,isResolving:S}=(0,tu.useEntityRecord)("root","fontCollection",e);(0,Ke.useEffect)(()=>{let J=()=>{y(t&&!r())};return J(),window.addEventListener("storage",J),()=>window.removeEventListener("storage",J)},[e,t]);let b=()=>{window.localStorage.setItem($l,"false"),window.dispatchEvent(new Event("storage"))};(0,Ke.useEffect)(()=>{s(null)},[e]),(0,Ke.useEffect)(()=>{h([])},[o]);let P=(0,Ke.useMemo)(()=>_?.font_families??[],[_]),q=_?.categories??[],I=[Rd,...q],N=(0,Ke.useMemo)(()=>Yl(P,d),[P,d]),W=Math.max(window.innerHeight,Ed),$=Math.floor((W-417)/61),be=Math.ceil(N.length/$),H=(f-1)*$,v=f*$,L=N.slice(H,v),le=J=>{m({...d,category:J}),c(1)},K=(0,eu.debounce)(J=>{m({...d,search:J}),c(1)},300),ge=(J,Se)=>{let Ae=Qo(J,Se,l);h(Ae)},R=Zl(l),x=()=>{h([])},E=l.length>0?l[0]?.fontFace?.length??0:0,te=E>0&&E!==o?.fontFace?.length,ce=E===o?.fontFace?.length,ae=()=>{let J=[];!ce&&o&&J.push(o),h(J)},Ce=async()=>{a(null);let J=l[0];try{J?.fontFace&&await Promise.all(J.fontFace.map(async Se=>{Se.src&&(Se.file=await jl(Se.src))}))}catch{a({type:"error",message:(0,Re.__)("Error installing the fonts, could not be downloaded.")});return}try{await T([J]),a({type:"success",message:(0,Re.__)("Fonts were installed successfully.")})}catch(Se){a({type:"error",message:Se.message})}x()},qe=J=>J?!J.fontFace||!J.fontFace.length?[{fontFamily:J.fontFamily,fontStyle:"normal",fontWeight:"400"}]:os(J.fontFace):[];if(g)return(0,ee.jsx)(Kl,{});let ke=e==="google-fonts"&&!g&&!o;return(0,ee.jsxs)("div",{className:"font-library__tabpanel-layout",children:[S&&(0,ee.jsx)("div",{className:"font-library__loading",children:(0,ee.jsx)(ne.ProgressBar,{})}),!S&&_&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)(ne.Navigator,{initialPath:"/",className:"font-library__tabpanel-layout",children:[(0,ee.jsxs)(ne.Navigator.Screen,{path:"/",children:[(0,ee.jsxs)(ne.__experimentalHStack,{justify:"space-between",children:[(0,ee.jsxs)(ne.__experimentalVStack,{children:[(0,ee.jsx)(ne.__experimentalHeading,{level:2,size:13,children:_.name}),(0,ee.jsx)(ne.__experimentalText,{children:_.description})]}),ke&&(0,ee.jsx)(ne.DropdownMenu,{icon:js,label:(0,Re.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,Re.__)("Revoke access to Google Fonts"),onClick:b}]})]}),(0,ee.jsx)(ne.__experimentalSpacer,{margin:4}),(0,ee.jsxs)(ne.__experimentalHStack,{spacing:4,justify:"space-between",children:[(0,ee.jsx)(ne.SearchControl,{value:d.search,placeholder:(0,Re.__)("Font name\u2026"),label:(0,Re.__)("Search"),onChange:K,hideLabelFromVision:!1}),(0,ee.jsx)(ne.SelectControl,{__next40pxDefaultSize:!0,label:(0,Re.__)("Category"),value:d.category,onChange:le,children:I&&I.map(J=>(0,ee.jsx)("option",{value:J.slug,children:J.name},J.slug))})]}),(0,ee.jsx)(ne.__experimentalSpacer,{margin:4}),!!_?.font_families?.length&&!N.length&&(0,ee.jsx)(ne.__experimentalText,{children:(0,Re.__)("No fonts found. Try with a different search term.")}),(0,ee.jsx)("div",{className:"font-library__fonts-grid__main",children:(0,ee.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:L.map(J=>(0,ee.jsx)("li",{className:"font-library__fonts-list-item",children:(0,ee.jsx)(go,{font:J.font_family_settings,navigatorPath:"/fontFamily",onClick:()=>{s(J.font_family_settings)}})},J.font_family_settings.slug))})})]}),(0,ee.jsxs)(ne.Navigator.Screen,{path:"/fontFamily",children:[(0,ee.jsxs)(ne.Flex,{justify:"flex-start",children:[(0,ee.jsx)(ne.Navigator.BackButton,{icon:(0,Re.isRTL)()?dr:cr,size:"small",onClick:()=>{s(null),a(null)},label:(0,Re.__)("Back")}),(0,ee.jsx)(ne.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:o?.name})]}),n&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(ne.__experimentalSpacer,{margin:1}),(0,ee.jsx)(ne.Notice,{status:n.type,onRemove:()=>a(null),children:n.message}),(0,ee.jsx)(ne.__experimentalSpacer,{margin:1})]}),(0,ee.jsx)(ne.__experimentalSpacer,{margin:4}),(0,ee.jsx)(ne.__experimentalText,{children:(0,Re.__)("Select font variants to install.")}),(0,ee.jsx)(ne.__experimentalSpacer,{margin:4}),(0,ee.jsx)(ne.CheckboxControl,{className:"font-library__select-all",label:(0,Re.__)("Select all"),checked:ce,onChange:ae,indeterminate:te}),(0,ee.jsx)(ne.__experimentalVStack,{spacing:0,children:(0,ee.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:o&&qe(o).map((J,Se)=>(0,ee.jsx)("li",{className:"font-library__fonts-list-item",children:(0,ee.jsx)(Ql,{font:o,face:J,handleToggleVariant:ge,selected:Xl(o.slug,o.fontFace?J:null,R)})},`face${Se}`))})}),(0,ee.jsx)(ne.__experimentalSpacer,{margin:16})]})]}),o&&(0,ee.jsx)(ne.Flex,{justify:"flex-end",className:"font-library__footer",children:(0,ee.jsx)(ne.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:Ce,isBusy:O,disabled:l.length===0||O,accessibleWhenDisabled:!0,children:(0,Re.__)("Install")})}),!o&&(0,ee.jsxs)(ne.__experimentalHStack,{expanded:!1,className:"font-library__footer",justify:"end",spacing:6,children:[(0,ee.jsx)(ne.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"font-library__page-selection",children:(0,Ke.createInterpolateElement)((0,Re.sprintf)((0,Re._x)("Page
%1$sof %2$d
","paging"),"",be),{div:(0,ee.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,ee.jsx)(ne.SelectControl,{"aria-label":(0,Re.__)("Current page"),value:f.toString(),options:[...Array(be)].map((J,Se)=>({label:(Se+1).toString(),value:(Se+1).toString()})),onChange:J=>c(parseInt(J)),size:"small",variant:"minimal"})})}),(0,ee.jsxs)(ne.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,ee.jsx)(ne.Button,{onClick:()=>c(f-1),disabled:f===1,accessibleWhenDisabled:!0,label:(0,Re.__)("Previous page"),icon:(0,Re.isRTL)()?Vo:zo,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,ee.jsx)(ne.Button,{onClick:()=>c(f+1),disabled:f===be,accessibleWhenDisabled:!0,label:(0,Re.__)("Next page"),icon:(0,Re.isRTL)()?zo:Vo,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})]})]})}var as=Id;var Yr=u(ie(),1),tt=u(X(),1),wo=u(ve(),1);var is=(e=>typeof dt<"u"?dt:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof dt<"u"?dt:t)[r]}):e)(function(e){if(typeof dt<"u")return dt.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),ru=(function(){var e,t,r;return(function(){function o(s,n,a){function l(c,d){if(!n[c]){if(!s[c]){var m=typeof is=="function"&&is;if(!d&&m)return m(c,!0);if(h)return h(c,!0);var g=new Error("Cannot find module '"+c+"'");throw g.code="MODULE_NOT_FOUND",g}var y=n[c]={exports:{}};s[c][0].call(y.exports,function(T){var O=s[c][1][T];return l(O||T)},y,y.exports,o,s,n,a)}return n[c].exports}for(var h=typeof is=="function"&&is,f=0;f0},c.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var d=this.buf_ptr_,m=this.input_.read(this.buf_,d,a);if(m<0)throw new Error("Unexpected end of input");if(m=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&h]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},c.prototype.readBits=function(d){32-this.bit_pos_>>this.bit_pos_&f[d];return this.bit_pos_+=d,m},s.exports=c},{}],2:[function(o,s,n){var a=0,l=1,h=2,f=3;n.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(o,s,n){var a=o("./streams").BrotliInput,l=o("./streams").BrotliOutput,h=o("./bit_reader"),f=o("./dictionary"),c=o("./huffman").HuffmanCode,d=o("./huffman").BrotliBuildHuffmanTable,m=o("./context"),g=o("./prefix"),y=o("./transform"),T=8,O=16,_=256,S=704,b=26,P=6,q=2,I=8,N=255,W=1080,$=18,be=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),H=16,v=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),L=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),le=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function oe(z){var k;return z.readBits(1)===0?16:(k=z.readBits(3),k>0?17+k:(k=z.readBits(3),k>0?8+k:17))}function K(z){if(z.readBits(1)){var k=z.readBits(3);return k===0?1:z.readBits(k)+(1<1&&de===0)throw new Error("Invalid size byte");k.meta_block_length|=de<4&&re===0)throw new Error("Invalid size nibble");k.meta_block_length|=re<>>B.bit_pos_&N,V=z[k].bits-I,V>0&&(B.bit_pos_+=I,k+=z[k].value,k+=B.val_>>>B.bit_pos_&(1<0;){var _e=0,Qe;if(A.readMoreInput(),A.fillBitWindow(),_e+=A.val_>>>A.bit_pos_&31,A.bit_pos_+=ue[_e].bits,Qe=ue[_e].value&255,Qe>Qe);else{var yt=Qe-14,rt,$e,Ve=0;if(Qe===O&&(Ve=de),se!==Ve&&(re=0,se=Ve),rt=re,re>0&&(re-=2,re<<=yt),re+=A.readBits(yt)+3,$e=re-rt,V+$e>k)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var et=0;et<$e;et++)B[V+et]=se;V+=$e,se!==0&&(we-=$e<<15-se)}}if(we!==0)throw new Error("[ReadHuffmanCodeLengths] space = "+we);for(;V>=1,++ue;for(se=0;se<_e;++se)Y[se]=A.readBits(ue)%z,re[Y[se]]=2;switch(re[Y[0]]=1,_e){case 1:break;case 3:if(Y[0]===Y[1]||Y[0]===Y[2]||Y[1]===Y[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(Y[0]===Y[1])throw new Error("[ReadHuffmanCode] invalid symbols");re[Y[1]]=1;break;case 4:if(Y[0]===Y[1]||Y[0]===Y[2]||Y[0]===Y[3]||Y[1]===Y[2]||Y[1]===Y[3]||Y[2]===Y[3])throw new Error("[ReadHuffmanCode] invalid symbols");A.readBits(1)?(re[Y[2]]=3,re[Y[3]]=3):re[Y[0]]=2;break}}else{var se,Qe=new Uint8Array($),yt=32,rt=0,$e=[new c(2,0),new c(2,4),new c(2,3),new c(3,2),new c(2,0),new c(2,4),new c(2,3),new c(4,1),new c(2,0),new c(2,4),new c(2,3),new c(3,2),new c(2,0),new c(2,4),new c(2,3),new c(4,5)];for(se=de;se<$&&yt>0;++se){var Ve=be[se],et=0,ot;A.fillBitWindow(),et+=A.val_>>>A.bit_pos_&15,A.bit_pos_+=$e[et].bits,ot=$e[et].value,Qe[Ve]=ot,ot!==0&&(yt-=32>>ot,++rt)}if(!(rt===1||yt===0))throw new Error("[ReadHuffmanCode] invalid num_codes or space");E(Qe,z,re,A)}if(V=d(k,B,I,re,z),V===0)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return V}function ce(z,k,B){var A,V;return A=x(z,k,B),V=g.kBlockLengthPrefixCode[A].nbits,g.kBlockLengthPrefixCode[A].offset+B.readBits(V)}function ae(z,k,B){var A;return z>>5]),this.htrees=new Uint32Array(k)}ke.prototype.decode=function(z){var k,B,A=0;for(k=0;k=z)throw new Error("[DecodeContextMap] i >= context_map_size");we[re]=0,++re}else we[re]=ue-V,++re}return k.readBits(1)&&qe(we,z),B}function Se(z,k,B,A,V,de,re){var se=B*2,we=B,ue=x(k,B*W,re),Y;ue===0?Y=V[se+(de[we]&1)]:ue===1?Y=V[se+(de[we]-1&1)]+1:Y=ue-2,Y>=z&&(Y-=z),A[B]=Y,V[se+(de[we]&1)]=Y,++de[we]}function Ae(z,k,B,A,V,de){var re=V+1,se=B&V,we=de.pos_&h.IBUF_MASK,ue;if(k<8||de.bit_pos_+(k<<3)0;)de.readMoreInput(),A[se++]=de.readBits(8),se===re&&(z.write(A,re),se=0);return}if(de.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;de.bit_pos_<32;)A[se]=de.val_>>>de.bit_pos_,de.bit_pos_+=8,++se,--k;if(ue=de.bit_end_pos_-de.bit_pos_>>3,we+ue>h.IBUF_MASK){for(var Y=h.IBUF_MASK+1-we,_e=0;_e=re){z.write(A,re),se-=re;for(var _e=0;_e=re;){if(ue=re-se,de.input_.read(A,se,ue)k.buffer.length){var lr=new Uint8Array(A+je);lr.set(k.buffer),k.buffer=lr}if(V=jt.input_end,ko=jt.is_uncompressed,jt.is_metadata){for(Ct(me);je>0;--je)me.readMoreInput(),me.readBits(8);continue}if(je!==0){if(ko){me.bit_pos_=me.bit_pos_+7&-8,Ae(k,je,A,Y,ue,me),A+=je;continue}for(B=0;B<3;++B)vt[B]=K(me)+1,vt[B]>=2&&(te(vt[B]+2,et,B*W,me),te(b,ot,B*W,me),_t[B]=ce(ot,B*W,me),M[B]=1);for(me.readMoreInput(),i=me.readBits(2),U=H+(me.readBits(4)<0;){var ze,at,ft,Pr,ks,ct,bt,Gt,$r,Ar,eo;for(me.readMoreInput(),_t[1]===0&&(Se(vt[1],et,1,Et,w,M,me),_t[1]=ce(ot,W,me),Ye=Ve[1].htrees[Et[1]]),--_t[1],ze=x(Ve[1].codes,Ye,me),at=ze>>6,at>=2?(at-=2,bt=-1):bt=0,ft=g.kInsertRangeLut[at]+(ze>>3&7),Pr=g.kCopyRangeLut[at]+(ze&7),ks=g.kInsertLengthPrefixCode[ft].offset+me.readBits(g.kInsertLengthPrefixCode[ft].nbits),ct=g.kCopyLengthPrefixCode[Pr].offset+me.readBits(g.kCopyLengthPrefixCode[Pr].nbits),rt=Y[A-1&ue],$e=Y[A-2&ue],Ar=0;Ar4?3:ct-2)&255,Ie=F[ir+$r],bt=x(Ve[2].codes,Ve[2].htrees[Ie],me),bt>=U){var Os,da,to;bt-=U,da=bt&Pe,bt>>=i,Os=(bt>>1)+1,to=(2+(bt&1)<se)if(ct>=f.minDictionaryWordLength&&ct<=f.maxDictionaryWordLength){var to=f.offsetsByLength[ct],pa=Gt-se-1,ma=f.sizeBitsByLength[ct],wf=(1<>ma;if(to+=xf*ct,ha=_e){k.write(Y,we);for(var Oo=0;Oo0&&(Qe[yt&3]=Gt,++yt),ct>je)throw new Error("Invalid backward reference. pos: "+A+" distance: "+Gt+" len: "+ct+" bytes left: "+je);for(Ar=0;Ar>=1;return(d&g-1)+g}function f(d,m,g,y,T){do y-=g,d[m+y]=new a(T.bits,T.value);while(y>0)}function c(d,m,g){for(var y=1<0;--v[S])_=new a(S&255,H[b++]&65535),f(d,m+P,q,$,_),P=h(P,S);for(N=be-1,I=-1,S=g+1,q=2;S<=l;++S,q<<=1)for(;v[S]>0;--v[S])(P&N)!==I&&(m+=$,W=c(v,S,g),$=1<>g),q,$,_),P=h(P,S);return be}},{}],8:[function(o,s,n){"use strict";n.byteLength=g,n.toByteArray=T,n.fromByteArray=S;for(var a=[],l=[],h=typeof Uint8Array<"u"?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,d=f.length;c0)throw new Error("Invalid string. Length must be a multiple of 4");var q=b.indexOf("=");q===-1&&(q=P);var I=q===P?0:4-q%4;return[q,I]}function g(b){var P=m(b),q=P[0],I=P[1];return(q+I)*3/4-I}function y(b,P,q){return(P+q)*3/4-q}function T(b){for(var P,q=m(b),I=q[0],N=q[1],W=new h(y(b,I,N)),$=0,be=N>0?I-4:I,H=0;H>16&255,W[$++]=P>>8&255,W[$++]=P&255;return N===2&&(P=l[b.charCodeAt(H)]<<2|l[b.charCodeAt(H+1)]>>4,W[$++]=P&255),N===1&&(P=l[b.charCodeAt(H)]<<10|l[b.charCodeAt(H+1)]<<4|l[b.charCodeAt(H+2)]>>2,W[$++]=P>>8&255,W[$++]=P&255),W}function O(b){return a[b>>18&63]+a[b>>12&63]+a[b>>6&63]+a[b&63]}function _(b,P,q){for(var I,N=[],W=P;Wbe?be:$+W));return I===1?(P=b[q-1],N.push(a[P>>2]+a[P<<4&63]+"==")):I===2&&(P=(b[q-2]<<8)+b[q-1],N.push(a[P>>10]+a[P>>4&63]+a[P<<2&63]+"=")),N.join("")}},{}],9:[function(o,s,n){function a(l,h){this.offset=l,this.nbits=h}n.kBlockLengthPrefixCode=[new a(1,2),new a(5,2),new a(9,2),new a(13,2),new a(17,3),new a(25,3),new a(33,3),new a(41,3),new a(49,4),new a(65,4),new a(81,4),new a(97,4),new a(113,5),new a(145,5),new a(177,5),new a(209,5),new a(241,6),new a(305,6),new a(369,7),new a(497,8),new a(753,9),new a(1265,10),new a(2289,11),new a(4337,12),new a(8433,13),new a(16625,24)],n.kInsertLengthPrefixCode=[new a(0,0),new a(1,0),new a(2,0),new a(3,0),new a(4,0),new a(5,0),new a(6,1),new a(8,1),new a(10,2),new a(14,2),new a(18,3),new a(26,3),new a(34,4),new a(50,4),new a(66,5),new a(98,5),new a(130,6),new a(194,7),new a(322,8),new a(578,9),new a(1090,10),new a(2114,12),new a(6210,14),new a(22594,24)],n.kCopyLengthPrefixCode=[new a(2,0),new a(3,0),new a(4,0),new a(5,0),new a(6,0),new a(7,0),new a(8,0),new a(9,0),new a(10,1),new a(12,1),new a(14,2),new a(18,2),new a(22,3),new a(30,3),new a(38,4),new a(54,4),new a(70,5),new a(102,5),new a(134,6),new a(198,7),new a(326,8),new a(582,9),new a(1094,10),new a(2118,24)],n.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],n.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(o,s,n){function a(h){this.buffer=h,this.pos=0}a.prototype.read=function(h,f,c){this.pos+c>this.buffer.length&&(c=this.buffer.length-this.pos);for(var d=0;dthis.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(h.subarray(0,f),this.pos),this.pos+=f,f},n.BrotliOutput=l},{}],11:[function(o,s,n){var a=o("./dictionary"),l=0,h=1,f=2,c=3,d=4,m=5,g=6,y=7,T=8,O=9,_=10,S=11,b=12,P=13,q=14,I=15,N=16,W=17,$=18,be=19,H=20;function v(oe,K,ge){this.prefix=new Uint8Array(oe.length),this.transform=K,this.suffix=new Uint8Array(ge.length);for(var R=0;R'),new v("",l,`
+`),new v("",c,""),new v("",l,"]"),new v("",l," for "),new v("",q,""),new v("",f,""),new v("",l," a "),new v("",l," that "),new v(" ",_,""),new v("",l,". "),new v(".",l,""),new v(" ",l,", "),new v("",I,""),new v("",l," with "),new v("",l,"'"),new v("",l," from "),new v("",l," by "),new v("",N,""),new v("",W,""),new v(" the ",l,""),new v("",d,""),new v("",l,". The "),new v("",S,""),new v("",l," on "),new v("",l," as "),new v("",l," is "),new v("",y,""),new v("",h,"ing "),new v("",l,`
+ `),new v("",l,":"),new v(" ",l,". "),new v("",l,"ed "),new v("",H,""),new v("",$,""),new v("",g,""),new v("",l,"("),new v("",_,", "),new v("",T,""),new v("",l," at "),new v("",l,"ly "),new v(" the ",l," of "),new v("",m,""),new v("",O,""),new v(" ",_,", "),new v("",_,'"'),new v(".",l,"("),new v("",S," "),new v("",_,'">'),new v("",l,'="'),new v(" ",l,"."),new v(".com/",l,""),new v(" the ",l," of the "),new v("",_,"'"),new v("",l,". This "),new v("",l,","),new v(".",l," "),new v("",_,"("),new v("",_,"."),new v("",l," not "),new v(" ",l,'="'),new v("",l,"er "),new v(" ",S," "),new v("",l,"al "),new v(" ",S,""),new v("",l,"='"),new v("",S,'"'),new v("",_,". "),new v(" ",l,"("),new v("",l,"ful "),new v(" ",_,". "),new v("",l,"ive "),new v("",l,"less "),new v("",S,"'"),new v("",l,"est "),new v(" ",_,"."),new v("",S,'">'),new v(" ",l,"='"),new v("",_,","),new v("",l,"ize "),new v("",S,"."),new v("\xC2\xA0",l,""),new v(" ",l,","),new v("",_,'="'),new v("",S,'="'),new v("",l,"ous "),new v("",S,", "),new v("",_,"='"),new v(" ",_,","),new v(" ",S,'="'),new v(" ",S,", "),new v("",S,","),new v("",S,"("),new v("",S,". "),new v(" ",S,"."),new v("",S,"='"),new v(" ",S,". "),new v(" ",_,'="'),new v(" ",S,"='"),new v(" ",_,"='")];n.kTransforms=L,n.kNumTransforms=L.length;function le(oe,K){return oe[K]<192?(oe[K]>=97&&oe[K]<=122&&(oe[K]^=32),1):oe[K]<224?(oe[K+1]^=32,2):(oe[K+2]^=5,3)}n.transformDictionaryWord=function(oe,K,ge,R,x){var E=L[x].prefix,te=L[x].suffix,ce=L[x].transform,ae=ceR&&(ae=R);for(var J=0;J0;){var Se=le(oe,ke);ke+=Se,R-=Se}for(var Ae=0;Aetypeof dt<"u"?dt:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof dt<"u"?dt:t)[r]}):e)(function(e){if(typeof dt<"u")return dt.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),ou=(function(){var e,t,r;return(function(){function o(s,n,a){function l(c,d){if(!n[c]){if(!s[c]){var m=typeof ls=="function"&&ls;if(!d&&m)return m(c,!0);if(h)return h(c,!0);var g=new Error("Cannot find module '"+c+"'");throw g.code="MODULE_NOT_FOUND",g}var y=n[c]={exports:{}};s[c][0].call(y.exports,function(T){var O=s[c][1][T];return l(O||T)},y,y.exports,o,s,n,a)}return n[c].exports}for(var h=typeof ls=="function"&&ls,f=0;f=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;f[254]=f[254]=1,n.string2buf=function(m){var g,y,T,O,_,S=m.length,b=0;for(O=0;O>>6,g[_++]=128|y&63):y<65536?(g[_++]=224|y>>>12,g[_++]=128|y>>>6&63,g[_++]=128|y&63):(g[_++]=240|y>>>18,g[_++]=128|y>>>12&63,g[_++]=128|y>>>6&63,g[_++]=128|y&63);return g};function d(m,g){if(g<65534&&(m.subarray&&h||!m.subarray&&l))return String.fromCharCode.apply(null,a.shrinkBuf(m,g));for(var y="",T=0;T4){b[T++]=65533,y+=_-1;continue}for(O&=_===2?31:_===3?15:7;_>1&&y1){b[T++]=65533;continue}O<65536?b[T++]=O:(O-=65536,b[T++]=55296|O>>10&1023,b[T++]=56320|O&1023)}return d(b,T)},n.utf8border=function(m,g){var y;for(g=g||m.length,g>m.length&&(g=m.length),y=g-1;y>=0&&(m[y]&192)===128;)y--;return y<0||y===0?g:y+f[m[y]]>g?y:g}},{"./common":1}],3:[function(o,s,n){"use strict";function a(l,h,f,c){for(var d=l&65535|0,m=l>>>16&65535|0,g=0;f!==0;){g=f>2e3?2e3:f,f-=g;do d=d+h[c++]|0,m=m+d|0;while(--g);d%=65521,m%=65521}return d|m<<16|0}s.exports=a},{}],4:[function(o,s,n){"use strict";s.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(o,s,n){"use strict";function a(){for(var f,c=[],d=0;d<256;d++){f=d;for(var m=0;m<8;m++)f=f&1?3988292384^f>>>1:f>>>1;c[d]=f}return c}var l=a();function h(f,c,d,m){var g=l,y=m+d;f^=-1;for(var T=m;T>>8^g[(f^c[T])&255];return f^-1}s.exports=h},{}],6:[function(o,s,n){"use strict";function a(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}s.exports=a},{}],7:[function(o,s,n){"use strict";var a=30,l=12;s.exports=function(f,c){var d,m,g,y,T,O,_,S,b,P,q,I,N,W,$,be,H,v,L,le,oe,K,ge,R,x;d=f.state,m=f.next_in,R=f.input,g=m+(f.avail_in-5),y=f.next_out,x=f.output,T=y-(c-f.avail_out),O=y+(f.avail_out-257),_=d.dmax,S=d.wsize,b=d.whave,P=d.wnext,q=d.window,I=d.hold,N=d.bits,W=d.lencode,$=d.distcode,be=(1<>>24,I>>>=L,N-=L,L=v>>>16&255,L===0)x[y++]=v&65535;else if(L&16){le=v&65535,L&=15,L&&(N>>=L,N-=L),N<15&&(I+=R[m++]<>>24,I>>>=L,N-=L,L=v>>>16&255,L&16){if(oe=v&65535,L&=15,N_){f.msg="invalid distance too far back",d.mode=a;break e}if(I>>>=L,N-=L,L=y-T,oe>L){if(L=oe-L,L>b&&d.sane){f.msg="invalid distance too far back",d.mode=a;break e}if(K=0,ge=q,P===0){if(K+=S-L,L2;)x[y++]=ge[K++],x[y++]=ge[K++],x[y++]=ge[K++],le-=3;le&&(x[y++]=ge[K++],le>1&&(x[y++]=ge[K++]))}else{K=y-oe;do x[y++]=x[K++],x[y++]=x[K++],x[y++]=x[K++],le-=3;while(le>2);le&&(x[y++]=x[K++],le>1&&(x[y++]=x[K++]))}}else if((L&64)===0){v=$[(v&65535)+(I&(1<>3,m-=le,N-=le<<3,I&=(1<>>24&255)+(w>>>8&65280)+((w&65280)<<8)+((w&255)<<24)}function Qe(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function yt(w){var M;return!w||!w.state?P:(M=w.state,w.total_in=w.total_out=M.total=0,w.msg="",M.wrap&&(w.adler=M.wrap&1),M.mode=$,M.last=0,M.havedict=0,M.dmax=32768,M.head=null,M.hold=0,M.bits=0,M.lencode=M.lendyn=new a.Buf32(se),M.distcode=M.distdyn=new a.Buf32(we),M.sane=1,M.back=-1,_)}function rt(w){var M;return!w||!w.state?P:(M=w.state,M.wsize=0,M.whave=0,M.wnext=0,yt(w))}function $e(w,M){var i,U;return!w||!w.state||(U=w.state,M<0?(i=0,M=-M):(i=(M>>4)+1,M<48&&(M&=15)),M&&(M<8||M>15))?P:(U.window!==null&&U.wbits!==M&&(U.window=null),U.wrap=i,U.wbits=M,rt(w))}function Ve(w,M){var i,U;return w?(U=new Qe,w.state=U,U.window=null,i=$e(w,M),i!==_&&(w.state=null),i):P}function et(w){return Ve(w,Y)}var ot=!0,me,Qr;function Tr(w){if(ot){var M;for(me=new a.Buf32(512),Qr=new a.Buf32(32),M=0;M<144;)w.lens[M++]=8;for(;M<256;)w.lens[M++]=9;for(;M<280;)w.lens[M++]=7;for(;M<288;)w.lens[M++]=8;for(c(m,w.lens,0,288,me,0,w.work,{bits:9}),M=0;M<32;)w.lens[M++]=5;c(g,w.lens,0,32,Qr,0,w.work,{bits:5}),ot=!1}w.lencode=me,w.lenbits=9,w.distcode=Qr,w.distbits=5}function je(w,M,i,U){var Pe,j=w.state;return j.window===null&&(j.wsize=1<=j.wsize?(a.arraySet(j.window,M,i-j.wsize,j.wsize,0),j.wnext=0,j.whave=j.wsize):(Pe=j.wsize-j.wnext,Pe>U&&(Pe=U),a.arraySet(j.window,M,i-U,Pe,j.wnext),U-=Pe,U?(a.arraySet(j.window,M,i-U,U,0),j.wnext=U,j.whave=j.wsize):(j.wnext+=Pe,j.wnext===j.wsize&&(j.wnext=0),j.whave>>8&255,i.check=h(i.check,ze,2,0),F=0,C=0,i.mode=be;break}if(i.flags=0,i.head&&(i.head.done=!1),!(i.wrap&1)||(((F&255)<<8)+(F>>8))%31){w.msg="incorrect header check",i.mode=V;break}if((F&15)!==W){w.msg="unknown compression method",i.mode=V;break}if(F>>>=4,C-=4,Le=(F&15)+8,i.wbits===0)i.wbits=Le;else if(Le>i.wbits){w.msg="invalid window size",i.mode=V;break}i.dmax=1<>8&1),i.flags&512&&(ze[0]=F&255,ze[1]=F>>>8&255,i.check=h(i.check,ze,2,0)),F=0,C=0,i.mode=H;case H:for(;C<32;){if(G===0)break e;G--,F+=U[j++]<>>8&255,ze[2]=F>>>16&255,ze[3]=F>>>24&255,i.check=h(i.check,ze,4,0)),F=0,C=0,i.mode=v;case v:for(;C<16;){if(G===0)break e;G--,F+=U[j++]<>8),i.flags&512&&(ze[0]=F&255,ze[1]=F>>>8&255,i.check=h(i.check,ze,2,0)),F=0,C=0,i.mode=L;case L:if(i.flags&1024){for(;C<16;){if(G===0)break e;G--,F+=U[j++]<>>8&255,i.check=h(i.check,ze,2,0)),F=0,C=0}else i.head&&(i.head.extra=null);i.mode=le;case le:if(i.flags&1024&&(Q=i.length,Q>G&&(Q=G),Q&&(i.head&&(Le=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),a.arraySet(i.head.extra,U,j,Q,Le)),i.flags&512&&(i.check=h(i.check,U,Q,j)),G-=Q,j+=Q,i.length-=Q),i.length))break e;i.length=0,i.mode=oe;case oe:if(i.flags&2048){if(G===0)break e;Q=0;do Le=U[j+Q++],i.head&&Le&&i.length<65536&&(i.head.name+=String.fromCharCode(Le));while(Le&&Q>9&1,i.head.done=!0),w.adler=i.check=0,i.mode=E;break;case R:for(;C<32;){if(G===0)break e;G--,F+=U[j++]<>>=C&7,C-=C&7,i.mode=k;break}for(;C<3;){if(G===0)break e;G--,F+=U[j++]<>>=1,C-=1,F&3){case 0:i.mode=ce;break;case 1:if(Tr(i),i.mode=Se,M===O){F>>>=2,C-=2;break e}break;case 2:i.mode=qe;break;case 3:w.msg="invalid block type",i.mode=V}F>>>=2,C-=2;break;case ce:for(F>>>=C&7,C-=C&7;C<32;){if(G===0)break e;G--,F+=U[j++]<>>16^65535)){w.msg="invalid stored block lengths",i.mode=V;break}if(i.length=F&65535,F=0,C=0,i.mode=ae,M===O)break e;case ae:i.mode=Ce;case Ce:if(Q=i.length,Q){if(Q>G&&(Q=G),Q>Ne&&(Q=Ne),Q===0)break e;a.arraySet(Pe,U,j,Q,st),G-=Q,j+=Q,Ne-=Q,st+=Q,i.length-=Q;break}i.mode=E;break;case qe:for(;C<14;){if(G===0)break e;G--,F+=U[j++]<>>=5,C-=5,i.ndist=(F&31)+1,F>>>=5,C-=5,i.ncode=(F&15)+4,F>>>=4,C-=4,i.nlen>286||i.ndist>30){w.msg="too many length or distance symbols",i.mode=V;break}i.have=0,i.mode=ke;case ke:for(;i.have>>=3,C-=3}for(;i.have<19;)i.lens[Pr[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,at={bits:i.lenbits},nt=c(d,i.lens,0,19,i.lencode,0,i.work,at),i.lenbits=at.bits,nt){w.msg="invalid code lengths set",i.mode=V;break}i.have=0,i.mode=J;case J:for(;i.have>>24,Ge=Ie>>>16&255,Ue=Ie&65535,!(xe<=C);){if(G===0)break e;G--,F+=U[j++]<>>=xe,C-=xe,i.lens[i.have++]=Ue;else{if(Ue===16){for(ft=xe+2;C>>=xe,C-=xe,i.have===0){w.msg="invalid bit length repeat",i.mode=V;break}Le=i.lens[i.have-1],Q=3+(F&3),F>>>=2,C-=2}else if(Ue===17){for(ft=xe+3;C>>=xe,C-=xe,Le=0,Q=3+(F&7),F>>>=3,C-=3}else{for(ft=xe+7;C>>=xe,C-=xe,Le=0,Q=11+(F&127),F>>>=7,C-=7}if(i.have+Q>i.nlen+i.ndist){w.msg="invalid bit length repeat",i.mode=V;break}for(;Q--;)i.lens[i.have++]=Le}}if(i.mode===V)break;if(i.lens[256]===0){w.msg="invalid code -- missing end-of-block",i.mode=V;break}if(i.lenbits=9,at={bits:i.lenbits},nt=c(m,i.lens,0,i.nlen,i.lencode,0,i.work,at),i.lenbits=at.bits,nt){w.msg="invalid literal/lengths set",i.mode=V;break}if(i.distbits=6,i.distcode=i.distdyn,at={bits:i.distbits},nt=c(g,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,at),i.distbits=at.bits,nt){w.msg="invalid distances set",i.mode=V;break}if(i.mode=Se,M===O)break e;case Se:i.mode=Ae;case Ae:if(G>=6&&Ne>=258){w.next_out=st,w.avail_out=Ne,w.next_in=j,w.avail_in=G,i.hold=F,i.bits=C,f(w,Oe),st=w.next_out,Pe=w.output,Ne=w.avail_out,j=w.next_in,U=w.input,G=w.avail_in,F=i.hold,C=i.bits,i.mode===E&&(i.back=-1);break}for(i.back=0;Ie=i.lencode[F&(1<>>24,Ge=Ie>>>16&255,Ue=Ie&65535,!(xe<=C);){if(G===0)break e;G--,F+=U[j++]<>Ye)],xe=Ie>>>24,Ge=Ie>>>16&255,Ue=Ie&65535,!(Ye+xe<=C);){if(G===0)break e;G--,F+=U[j++]<>>=Ye,C-=Ye,i.back+=Ye}if(F>>>=xe,C-=xe,i.back+=xe,i.length=Ue,Ge===0){i.mode=z;break}if(Ge&32){i.back=-1,i.mode=E;break}if(Ge&64){w.msg="invalid literal/length code",i.mode=V;break}i.extra=Ge&15,i.mode=Ct;case Ct:if(i.extra){for(ft=i.extra;C>>=i.extra,C-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=Me;case Me:for(;Ie=i.distcode[F&(1<>>24,Ge=Ie>>>16&255,Ue=Ie&65535,!(xe<=C);){if(G===0)break e;G--,F+=U[j++]<>Ye)],xe=Ie>>>24,Ge=Ie>>>16&255,Ue=Ie&65535,!(Ye+xe<=C);){if(G===0)break e;G--,F+=U[j++]<>>=Ye,C-=Ye,i.back+=Ye}if(F>>>=xe,C-=xe,i.back+=xe,Ge&64){w.msg="invalid distance code",i.mode=V;break}i.offset=Ue,i.extra=Ge&15,i.mode=sr;case sr:if(i.extra){for(ft=i.extra;C>>=i.extra,C-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){w.msg="invalid distance too far back",i.mode=V;break}i.mode=Kt;case Kt:if(Ne===0)break e;if(Q=Oe-Ne,i.offset>Q){if(Q=i.offset-Q,Q>i.whave&&i.sane){w.msg="invalid distance too far back",i.mode=V;break}Q>i.wnext?(Q-=i.wnext,ar=i.wsize-Q):ar=i.wnext-Q,Q>i.length&&(Q=i.length),ir=i.window}else ir=Pe,ar=st-i.offset,Q=i.length;Q>Ne&&(Q=Ne),Ne-=Q,i.length-=Q;do Pe[st++]=ir[ar++];while(--Q);i.length===0&&(i.mode=Ae);break;case z:if(Ne===0)break e;Pe[st++]=i.length,Ne--,i.mode=Ae;break;case k:if(i.wrap){for(;C<32;){if(G===0)break e;G--,F|=U[j++]<=1&&Ae[le]===0;le--);if(oe>le&&(oe=le),le===0)return I[N++]=1<<24|64<<16|0,I[N++]=1<<24|64<<16|0,$.bits=1,0;for(L=1;L0&&(S===c||le!==1))return-1;for(Ct[1]=0,H=1;Hh||S===m&&x>f)return 1;for(;;){Kt=H-ge,W[v]Se?(z=Me[sr+W[v]],k=ke[J+W[v]]):(z=96,k=0),te=1<>ge)+ce]=Kt<<24|z<<16|k|0;while(ce!==0);for(te=1<>=1;if(te!==0?(E&=te-1,E+=te):E=0,v++,--Ae[H]===0){if(H===le)break;H=b[P+W[v]]}if(H>oe&&(E&Ce)!==ae){for(ge===0&&(ge=oe),qe+=L,K=H-ge,R=1<h||S===m&&x>f)return 1;ae=E&Ce,I[ae]=oe<<24|K<<16|qe-N|0}}return E!==0&&(I[qe+E]=H-ge<<24|64<<16|0),$.bits=oe,0}},{"../utils/common":1}],10:[function(o,s,n){"use strict";s.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(o,s,n){"use strict";function a(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}s.exports=a},{}],"/lib/inflate.js":[function(o,s,n){"use strict";var a=o("./zlib/inflate"),l=o("./utils/common"),h=o("./utils/strings"),f=o("./zlib/constants"),c=o("./zlib/messages"),d=o("./zlib/zstream"),m=o("./zlib/gzheader"),g=Object.prototype.toString;function y(_){if(!(this instanceof y))return new y(_);this.options=l.assign({chunkSize:16384,windowBits:0,to:""},_||{});var S=this.options;S.raw&&S.windowBits>=0&&S.windowBits<16&&(S.windowBits=-S.windowBits,S.windowBits===0&&(S.windowBits=-15)),S.windowBits>=0&&S.windowBits<16&&!(_&&_.windowBits)&&(S.windowBits+=32),S.windowBits>15&&S.windowBits<48&&(S.windowBits&15)===0&&(S.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var b=a.inflateInit2(this.strm,S.windowBits);if(b!==f.Z_OK)throw new Error(c[b]);if(this.header=new m,a.inflateGetHeader(this.strm,this.header),S.dictionary&&(typeof S.dictionary=="string"?S.dictionary=h.string2buf(S.dictionary):g.call(S.dictionary)==="[object ArrayBuffer]"&&(S.dictionary=new Uint8Array(S.dictionary)),S.raw&&(b=a.inflateSetDictionary(this.strm,S.dictionary),b!==f.Z_OK)))throw new Error(c[b])}y.prototype.push=function(_,S){var b=this.strm,P=this.options.chunkSize,q=this.options.dictionary,I,N,W,$,be,H=!1;if(this.ended)return!1;N=S===~~S?S:S===!0?f.Z_FINISH:f.Z_NO_FLUSH,typeof _=="string"?b.input=h.binstring2buf(_):g.call(_)==="[object ArrayBuffer]"?b.input=new Uint8Array(_):b.input=_,b.next_in=0,b.avail_in=b.input.length;do{if(b.avail_out===0&&(b.output=new l.Buf8(P),b.next_out=0,b.avail_out=P),I=a.inflate(b,f.Z_NO_FLUSH),I===f.Z_NEED_DICT&&q&&(I=a.inflateSetDictionary(this.strm,q)),I===f.Z_BUF_ERROR&&H===!0&&(I=f.Z_OK,H=!1),I!==f.Z_STREAM_END&&I!==f.Z_OK)return this.onEnd(I),this.ended=!0,!1;b.next_out&&(b.avail_out===0||I===f.Z_STREAM_END||b.avail_in===0&&(N===f.Z_FINISH||N===f.Z_SYNC_FLUSH))&&(this.options.to==="string"?(W=h.utf8border(b.output,b.next_out),$=b.next_out-W,be=h.buf2string(b.output,W),b.next_out=$,b.avail_out=P-$,$&&l.arraySet(b.output,b.output,W,$,0),this.onData(be)):this.onData(l.shrinkBuf(b.output,b.next_out))),b.avail_in===0&&b.avail_out===0&&(H=!0)}while((b.avail_in>0||b.avail_out===0)&&I!==f.Z_STREAM_END);return I===f.Z_STREAM_END&&(N=f.Z_FINISH),N===f.Z_FINISH?(I=a.inflateEnd(this.strm),this.onEnd(I),this.ended=!0,I===f.Z_OK):(N===f.Z_SYNC_FLUSH&&(this.onEnd(f.Z_OK),b.avail_out=0),!0)},y.prototype.onData=function(_){this.chunks.push(_)},y.prototype.onEnd=function(_){_===f.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=_,this.msg=this.strm.msg};function T(_,S){var b=new y(S);if(b.push(_,!0),b.err)throw b.msg||c[b.err];return b.result}function O(_,S){return S=S||{},S.raw=!0,T(_,S)}n.Inflate=y,n.inflate=T,n.inflateRaw=O,n.ungzip=T},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")})();var rx=globalThis.fetch,us=class{constructor(e,t={},r){this.type=e,this.detail=t,this.msg=r,Object.defineProperty(this,"__mayPropagate",{enumerable:!1,writable:!0}),this.__mayPropagate=!0}preventDefault(){}stopPropagation(){this.__mayPropagate=!1}valueOf(){return this}toString(){return this.msg?`[${this.type} event]: ${this.msg}`:`[${this.type} event]`}},Ld=class{constructor(){this.listeners={}}addEventListener(e,t,r){let o=this.listeners[e]||[];r?o.unshift(t):o.push(t),this.listeners[e]=o}removeEventListener(e,t){let r=this.listeners[e]||[],o=r.findIndex(s=>s===t);o>-1&&(r.splice(o,1),this.listeners[e]=r)}dispatch(e){let t=this.listeners[e.type];if(t)for(let r=0,o=t.length;rString.fromCharCode(t)).join("")}var Nd=class{constructor(e,t,r){this.name=(r||e.tag||"").trim(),this.length=e.length,this.start=e.offset,this.offset=0,this.data=t,["getInt8","getUint8","getInt16","getUint16","getInt32","getUint32","getBigInt64","getBigUint64"].forEach(o=>{let s=o.replace(/get(Big)?/,"").toLowerCase(),n=parseInt(o.replace(/[^\d]/g,""))/8;Object.defineProperty(this,s,{get:()=>this.getValue(o,n)})})}get currentPosition(){return this.start+this.offset}set currentPosition(e){this.start=e,this.offset=0}skip(e=0,t=8){this.offset+=e*t/8}getValue(e,t){let r=this.start+this.offset;this.offset+=t;try{return this.data[e](r)}catch(o){throw console.error("parser",e,t,this),console.error("parser",this.start,this.offset),o}}flags(e){if(e===8||e===16||e===32||e===64)return this[`uint${e}`].toString(2).padStart(e,0).split("").map(t=>t==="1");console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){let e=this.uint32;return Vd([e>>24&255,e>>16&255,e>>8&255,e&255])}get fixed(){let e=this.int16,t=Math.round(1e3*this.uint16/65356);return e+t/1e3}get legacyFixed(){let e=this.uint16,t=this.uint16.toString(16).padStart(4,0);return parseFloat(`${e}.${t}`)}get uint24(){return(this.uint8<<16)+(this.uint8<<8)+this.uint8}get uint128(){let e=0;for(let t=0;t<5;t++){let r=this.uint8;if(e=e*128+(r&127),r<128)break}return e}get longdatetime(){return new Date(Bd+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){let e=p.uint16,t=[0,1,-2,-1][e>>14],r=e&16383;return t+r/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(e=0,t=0,r=8,o=!1){if(e=e||this.length,e===0)return[];t&&(this.currentPosition=t);let s=`${o?"":"u"}int${r}`,n=[];for(;e--;)n.push(this[s]);return n}},Be=class{constructor(e){Object.defineProperty(this,"parser",{enumerable:!1,get:()=>e});let r=e.currentPosition;Object.defineProperty(this,"start",{enumerable:!1,get:()=>r})}load(e){Object.keys(e).forEach(t=>{let r=Object.getOwnPropertyDescriptor(e,t);r.get?this[t]=r.get.bind(this):r.value!==void 0&&(this[t]=r.value)}),this.parser.length&&this.parser.verifyLength()}},pe=class extends Be{constructor(e,t,r){let{parser:o,start:s}=super(new Nd(e,t,r));Object.defineProperty(this,"p",{enumerable:!1,get:()=>o}),Object.defineProperty(this,"tableStart",{enumerable:!1,get:()=>s})}};function Z(e,t,r){let o;Object.defineProperty(e,t,{get:()=>o||(o=r(),o),enumerable:!0})}var zd=class extends pe{constructor(e,t,r){let{p:o}=super({offset:0,length:12},t,"sfnt");this.version=o.uint32,this.numTables=o.uint16,this.searchRange=o.uint16,this.entrySelector=o.uint16,this.rangeShift=o.uint16,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(s=>new Dd(o)),this.tables={},this.directory.forEach(s=>{let n=()=>r(this.tables,{tag:s.tag,offset:s.offset,length:s.length},t);Z(this.tables,s.tag.trim(),n)})}},Dd=class{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}},su=ou.inflate||void 0,nu=void 0,Md=class extends pe{constructor(e,t,r){let{p:o}=super({offset:0,length:44},t,"woff");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(s=>new jd(o)),Gd(this,t,r)}},jd=class{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}};function Gd(e,t,r){e.tables={},e.directory.forEach(o=>{Z(e.tables,o.tag.trim(),()=>{let s=0,n=t;if(o.compLength!==o.origLength){let a=t.buffer.slice(o.offset,o.offset+o.compLength),l;if(su)l=su(new Uint8Array(a));else if(nu)l=nu(new Uint8Array(a));else{let h="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(h),new Error(h)}n=new DataView(l.buffer)}else s=o.offset;return r(e.tables,{tag:o.tag,offset:s,length:o.origLength},n)})})}var au=ru,iu=void 0,Ud=class extends pe{constructor(e,t,r){let{p:o}=super({offset:0,length:48},t,"woff2");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.totalCompressedSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(l=>new Wd(o));let s=o.currentPosition;this.directory[0].offset=0,this.directory.forEach((l,h)=>{let f=this.directory[h+1];f&&(f.offset=l.offset+(l.transformLength!==void 0?l.transformLength:l.origLength))});let n,a=t.buffer.slice(s);if(au)n=au(new Uint8Array(a));else if(iu)n=new Uint8Array(iu(a));else{let l="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(l),new Error(l)}Hd(this,n,r)}},Wd=class{constructor(e){this.flags=e.uint8;let t=this.tagNumber=this.flags&63;t===63?this.tag=e.tag:this.tag=qd(t);let o=(this.transformVersion=(this.flags&192)>>6)!==0;(this.tag==="glyf"||this.tag==="loca")&&(o=this.transformVersion!==3),this.origLength=e.uint128,o&&(this.transformLength=e.uint128)}};function Hd(e,t,r){e.tables={},e.directory.forEach(o=>{Z(e.tables,o.tag.trim(),()=>{let s=o.offset,n=s+(o.transformLength?o.transformLength:o.origLength),a=new DataView(t.slice(s,n).buffer);try{return r(e.tables,{tag:o.tag,offset:0,length:o.origLength},a)}catch(l){console.error(l)}})})}function qd(e){return["cmap","head","hhea","hmtx","maxp","name","OS/2","post","cvt ","fpgm","glyf","loca","prep","CFF ","VORG","EBDT","EBLC","gasp","hdmx","kern","LTSH","PCLT","VDMX","vhea","vmtx","BASE","GDEF","GPOS","GSUB","EBSC","JSTF","MATH","CBDT","CBLC","COLR","CPAL","SVG ","sbix","acnt","avar","bdat","bloc","bsln","cvar","fdsc","feat","fmtx","fvar","gvar","hsty","just","lcar","mort","morx","opbd","prop","trak","Zapf","Silf","Glat","Gloc","Feat","Sill"][e&63]}var mu={},hu=!1;Promise.all([Promise.resolve().then(function(){return wp}),Promise.resolve().then(function(){return Sp}),Promise.resolve().then(function(){return _p}),Promise.resolve().then(function(){return Op}),Promise.resolve().then(function(){return Pp}),Promise.resolve().then(function(){return Lp}),Promise.resolve().then(function(){return Vp}),Promise.resolve().then(function(){return zp}),Promise.resolve().then(function(){return Zp}),Promise.resolve().then(function(){return nm}),Promise.resolve().then(function(){return qm}),Promise.resolve().then(function(){return Zm}),Promise.resolve().then(function(){return Qm}),Promise.resolve().then(function(){return rh}),Promise.resolve().then(function(){return sh}),Promise.resolve().then(function(){return ah}),Promise.resolve().then(function(){return uh}),Promise.resolve().then(function(){return ch}),Promise.resolve().then(function(){return ph}),Promise.resolve().then(function(){return hh}),Promise.resolve().then(function(){return yh}),Promise.resolve().then(function(){return bh}),Promise.resolve().then(function(){return Sh}),Promise.resolve().then(function(){return Fh}),Promise.resolve().then(function(){return kh}),Promise.resolve().then(function(){return Th}),Promise.resolve().then(function(){return Ah}),Promise.resolve().then(function(){return Eh}),Promise.resolve().then(function(){return Lh}),Promise.resolve().then(function(){return Nh}),Promise.resolve().then(function(){return Uh}),Promise.resolve().then(function(){return Yh}),Promise.resolve().then(function(){return Kh}),Promise.resolve().then(function(){return eg}),Promise.resolve().then(function(){return rg}),Promise.resolve().then(function(){return sg}),Promise.resolve().then(function(){return ig}),Promise.resolve().then(function(){return ug}),Promise.resolve().then(function(){return mg}),Promise.resolve().then(function(){return gg}),Promise.resolve().then(function(){return bg})]).then(e=>{e.forEach(t=>{let r=Object.keys(t)[0];mu[r]=t[r]}),hu=!0});function Yd(e,t,r){let o=t.tag.replace(/[^\w\d]/g,""),s=mu[o];return s?new s(t,r,e):(console.warn(`lib-font has no definition for ${o}. The table was skipped.`),{})}function Zd(){let e=0;function t(r,o){if(!hu)return e>10?o(new Error("loading took too long")):(e++,setTimeout(()=>t(r),250));r(Yd)}return new Promise((r,o)=>t(r))}function Xd(e,t){let r=e.lastIndexOf("."),o=(e.substring(r+1)||"").toLowerCase(),s={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[o];if(s)return s;let n={eot:"The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.",svg:"The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.",fon:"The .fon format is not supported: this is an ancient Windows bitmap font format.",ttc:"Based on the current CSS specification, font collections are not (yet?) supported."}[o];if(n||(n=`${e} is not a known webfont format.`),t)throw new Error(n);console.warn(`Could not load font: ${n}`)}async function Kd(e,t,r={}){if(!globalThis.document)return;let o=Xd(t,r.errorOnStyle);if(!o)return;let s=document.createElement("style");s.className="injected-by-Font-js";let n=[];return r.styleRules&&(n=Object.entries(r.styleRules).map(([a,l])=>`${a}: ${l};`)),s.textContent=`
@font-face {
- font-family: "${t}";
- ${a.join(`
+ font-family: "${e}";
+ ${n.join(`
`)}
- src: url("${e}") format("${o}");
-}`,globalThis.document.head.appendChild(s),s}var md=[0,1,0,0],pd=[79,84,84,79],hd=[119,79,70,70],gd=[119,79,70,50];function ns(t,e){if(t.length===e.length){for(let r=0;r(globalThis.document&&!this.options.skipStyleSheet&&await dd(this.name,t,this.options),this.loadFont(t)))()}async loadFont(t,e){fetch(t).then(r=>vd(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,e||t)).catch(r=>{let o=new ss("error",r,`Failed to load font at ${e||t}`);this.dispatch(o),this.onerror&&this.onerror(o)})}async fromDataBuffer(t,e){this.fontData=new DataView(t);let r=yd(this.fontData);if(!r)throw new Error(`${e} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(r);let o=new ss("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(t){return fd().then(e=>(t==="SFNT"&&(this.opentype=new td(this,this.fontData,e)),t==="WOFF"&&(this.opentype=new rd(this,this.fontData,e)),t==="WOFF2"&&(this.opentype=new nd(this,this.fontData,e)),this.opentype))}getGlyphId(t){return this.opentype.tables.cmap.getGlyphId(t)}reverse(t){return this.opentype.tables.cmap.reverse(t)}supports(t){return this.getGlyphId(t)!==0}supportsVariation(t){return this.opentype.tables.cmap.supportsVariation(t)!==!1}measureText(t,e=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let r=document.createElement("div");r.textContent=t,r.style.fontFamily=this.name,r.style.fontSize=`${e}px`,r.style.color="transparent",r.style.background="transparent",r.style.top="0",r.style.left="0",r.style.position="absolute",document.body.appendChild(r);let o=r.getBoundingClientRect();document.body.removeChild(r);let s=this.opentype.tables["OS/2"];return o.fontSize=e,o.ascender=s.sTypoAscender,o.descender=s.sTypoDescender,o}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);let t=new ss("unload",{font:this});this.dispatch(t),this.onunload&&this.onunload(t)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);let t=new ss("load",{font:this});this.dispatch(t),this.onload&&this.onload(t)}}};globalThis.Font=is;var We=class extends Bt{constructor(t,e,r){super(t),this.plaformID=e,this.encodingID=r}},bd=class extends We{constructor(t,e,r){super(t,e,r),this.format=0,this.length=t.uint16,this.language=t.uint16,this.glyphIdArray=[...new Array(256)].map(o=>t.uint8)}supports(t){return t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=t&&t<=255}reverse(t){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}},wd=class extends We{constructor(t,e,r){super(t,e,r),this.format=2,this.length=t.uint16,this.language=t.uint16,this.subHeaderKeys=[...new Array(256)].map(n=>t.uint16);let o=Math.max(...this.subHeaderKeys),s=t.currentPosition;Z(this,"subHeaders",()=>(t.currentPosition=s,[...new Array(o)].map(n=>new Sd(t))));let a=s+o*8;Z(this,"glyphIndexArray",()=>(t.currentPosition=a,[...new Array(o)].map(n=>t.uint16)))}supports(t){t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));let e=t&&255,r=t&&65280,o=this.subHeaders[r],s=this.subHeaders[o],a=s.firstCode,n=a+s.entryCount;return a<=e&&e<=n}reverse(t){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(t=!1){return t?this.subHeaders.map(e=>({firstCode:e.firstCode,lastCode:e.lastCode})):this.subHeaders.map(e=>({start:e.firstCode,end:e.lastCode}))}},Sd=class{constructor(t){this.firstCode=t.uint16,this.entryCount=t.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=t.int16,this.idRangeOffset=t.uint16}},xd=class extends We{constructor(t,e,r){super(t,e,r),this.format=4,this.length=t.uint16,this.language=t.uint16,this.segCountX2=t.uint16,this.segCount=this.segCountX2/2,this.searchRange=t.uint16,this.entrySelector=t.uint16,this.rangeShift=t.uint16;let o=t.currentPosition;Z(this,"endCode",()=>t.readBytes(this.segCount,o,16));let s=o+2+this.segCountX2;Z(this,"startCode",()=>t.readBytes(this.segCount,s,16));let a=s+this.segCountX2;Z(this,"idDelta",()=>t.readBytes(this.segCount,a,16,!0));let n=a+this.segCountX2;Z(this,"idRangeOffset",()=>t.readBytes(this.segCount,n,16));let l=n+this.segCountX2,m=this.length-(l-this.tableStart);Z(this,"glyphIdArray",()=>t.readBytes(m,l,16)),Z(this,"segments",()=>this.buildSegments(n,l,t))}buildSegments(t,e,r){let o=(s,a)=>{let n=this.startCode[a],l=this.endCode[a],m=this.idDelta[a],f=this.idRangeOffset[a],c=t+2*a,d=[];if(f===0)for(let g=n+m,h=l+m;g<=h;g++)d.push(g);else for(let g=0,h=l-n;g<=h;g++)r.currentPosition=c+f+g*2,d.push(r.uint16);return{startCode:n,endCode:l,idDelta:m,idRangeOffset:f,glyphIDs:d}};return[...new Array(this.segCount)].map(o)}reverse(t){let e=this.segments.find(o=>o.glyphIDs.includes(t));if(!e)return{};let r=e.startCode+e.glyphIDs.indexOf(t);return{code:r,unicode:String.fromCodePoint(r)}}getGlyphId(t){if(t.charCodeAt&&(t=t.charCodeAt(0)),55296<=t&&t<=57343||(t&65534)===65534||(t&65535)===65535)return 0;let e=this.segments.find(r=>r.startCode<=t&&t<=r.endCode);return e?e.glyphIDs[t-e.startCode]:0}supports(t){return this.getGlyphId(t)!==0}getSupportedCharCodes(t=!1){return t?this.segments:this.segments.map(e=>({start:e.startCode,end:e.endCode}))}},Cd=class extends We{constructor(t,e,r){super(t,e,r),this.format=6,this.length=t.uint16,this.language=t.uint16,this.firstCode=t.uint16,this.entryCount=t.uint16,this.lastCode=this.firstCode+this.entryCount-1,Z(this,"glyphIdArray",()=>[...new Array(this.entryCount)].map(s=>t.uint16))}supports(t){if(t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),tthis.firstCode+this.entryCount)return{};let e=t-this.firstCode;return{code:e,unicode:String.fromCodePoint(e)}}reverse(t){let e=this.glyphIdArray.indexOf(t);if(e>-1)return this.firstCode+e}getSupportedCharCodes(t=!1){return t?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}},Fd=class extends We{constructor(t,e,r){super(t,e,r),this.format=8,t.uint16,this.length=t.uint32,this.language=t.uint32,this.is32=[...new Array(8192)].map(s=>t.uint8),this.numGroups=t.uint32,Z(this,"groups",()=>[...new Array(this.numGroups)].map(s=>new kd(t)))}supports(t){return t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),this.groups.findIndex(e=>e.startcharCode<=t&&t<=e.endcharCode)!==-1}reverse(t){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(t=!1){return t?this.groups:this.groups.map(e=>({start:e.startcharCode,end:e.endcharCode}))}},kd=class{constructor(t){this.startcharCode=t.uint32,this.endcharCode=t.uint32,this.startGlyphID=t.uint32}},Od=class extends We{constructor(t,e,r){super(t,e,r),this.format=10,t.uint16,this.length=t.uint32,this.language=t.uint32,this.startCharCode=t.uint32,this.numChars=t.uint32,this.endCharCode=this.startCharCode+this.numChars,Z(this,"glyphs",()=>[...new Array(this.numChars)].map(s=>t.uint16))}supports(t){return t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),tthis.startCharCode+this.numChars?!1:t-this.startCharCode}reverse(t){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(t=!1){return t?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}},Td=class extends We{constructor(t,e,r){super(t,e,r),this.format=12,t.uint16,this.length=t.uint32,this.language=t.uint32,this.numGroups=t.uint32,Z(this,"groups",()=>[...new Array(this.numGroups)].map(s=>new _d(t)))}supports(t){return t.charCodeAt&&(t=t.charCodeAt(0)),55296<=t&&t<=57343||(t&65534)===65534||(t&65535)===65535?0:this.groups.findIndex(e=>e.startCharCode<=t&&t<=e.endCharCode)!==-1}reverse(t){for(let e of this.groups){let r=e.startGlyphID;if(r>t)continue;if(r===t)return e.startCharCode;if(r+(e.endCharCode-e.startCharCode)({start:e.startCharCode,end:e.endCharCode}))}},_d=class{constructor(t){this.startCharCode=t.uint32,this.endCharCode=t.uint32,this.startGlyphID=t.uint32}},Pd=class extends We{constructor(t,e,r){super(t,e,r),this.format=13,t.uint16,this.length=t.uint32,this.language=t.uint32,this.numGroups=t.uint32;let o=[...new Array(this.numGroups)].map(s=>new Ad(t));Z(this,"groups",o)}supports(t){return t.charCodeAt&&(t=t.charCodeAt(0)),this.groups.findIndex(e=>e.startCharCode<=t&&t<=e.endCharCode)!==-1}reverse(t){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(t=!1){return t?this.groups:this.groups.map(e=>({start:e.startCharCode,end:e.endCharCode}))}},Ad=class{constructor(t){this.startCharCode=t.uint32,this.endCharCode=t.uint32,this.glyphID=t.uint32}},Rd=class extends We{constructor(t,e,r){super(t,e,r),this.subTableStart=t.currentPosition,this.format=14,this.length=t.uint32,this.numVarSelectorRecords=t.uint32,Z(this,"varSelectors",()=>[...new Array(this.numVarSelectorRecords)].map(o=>new Ed(t)))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(t){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(t){let e=this.varSelector.find(r=>r.varSelector===t);return e||!1}getSupportedVariations(){return this.varSelectors.map(t=>t.varSelector)}},Ed=class{constructor(t){this.varSelector=t.uint24,this.defaultUVSOffset=t.Offset32,this.nonDefaultUVSOffset=t.Offset32}};function Id(t,e,r){let o=t.uint16;return o===0?new bd(t,e,r):o===2?new wd(t,e,r):o===4?new xd(t,e,r):o===6?new Cd(t,e,r):o===8?new Fd(t,e,r):o===10?new Od(t,e,r):o===12?new Td(t,e,r):o===13?new Pd(t,e,r):o===14?new Rd(t,e,r):{}}var Ld=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numTables=r.uint16,this.encodingRecords=[...new Array(this.numTables)].map(o=>new Bd(r,this.tableStart))}getSubTable(t){return this.encodingRecords[t].table}getSupportedEncodings(){return this.encodingRecords.map(t=>({platformID:t.platformID,encodingId:t.encodingID}))}getSupportedCharCodes(t,e){let r=this.encodingRecords.findIndex(s=>s.platformID===t&&s.encodingID===e);return r===-1?!1:this.getSubTable(r).getSupportedCharCodes()}reverse(t){for(let e=0;e{let s=this.getSubTable(o);return s.getGlyphId?(e=s.getGlyphId(t),e!==0):!1}),e}supports(t){return this.encodingRecords.some((e,r)=>{let o=this.getSubTable(r);return o.supports&&o.supports(t)!==!1})}supportsVariation(t){return this.encodingRecords.some((e,r)=>{let o=this.getSubTable(r);return o.supportsVariation&&o.supportsVariation(t)!==!1})}},Bd=class{constructor(t,e){let r=this.platformID=t.uint16,o=this.encodingID=t.uint16,s=this.offset=t.Offset32;Z(this,"table",()=>(t.currentPosition=e+s,Id(t,r,o)))}},Dd=Object.freeze({__proto__:null,cmap:Ld}),Vd=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.load({majorVersion:r.uint16,minorVersion:r.uint16,fontRevision:r.fixed,checkSumAdjustment:r.uint32,magicNumber:r.uint32,flags:r.flags(16),unitsPerEm:r.uint16,created:r.longdatetime,modified:r.longdatetime,xMin:r.int16,yMin:r.int16,xMax:r.int16,yMax:r.int16,macStyle:r.flags(16),lowestRecPPEM:r.uint16,fontDirectionHint:r.uint16,indexToLocFormat:r.uint16,glyphDataFormat:r.uint16})}},Nd=Object.freeze({__proto__:null,head:Vd}),zd=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.ascender=r.fword,this.descender=r.fword,this.lineGap=r.fword,this.advanceWidthMax=r.ufword,this.minLeftSideBearing=r.fword,this.minRightSideBearing=r.fword,this.xMaxExtent=r.fword,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,r.int16,r.int16,r.int16,r.int16,this.metricDataFormat=r.int16,this.numberOfHMetrics=r.uint16,r.verifyLength()}},Md=Object.freeze({__proto__:null,hhea:zd}),Gd=class extends mt{constructor(t,e,r){let{p:o}=super(t,e),s=r.hhea.numberOfHMetrics,a=r.maxp.numGlyphs,n=o.currentPosition;if(Z(this,"hMetrics",()=>(o.currentPosition=n,[...new Array(s)].map(l=>new jd(o.uint16,o.int16)))),s(o.currentPosition=l,[...new Array(a-s)].map(m=>o.int16)))}}},jd=class{constructor(t,e){this.advanceWidth=t,this.lsb=e}},Ud=Object.freeze({__proto__:null,hmtx:Gd}),Hd=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.legacyFixed,this.numGlyphs=r.uint16,this.version===1&&(this.maxPoints=r.uint16,this.maxContours=r.uint16,this.maxCompositePoints=r.uint16,this.maxCompositeContours=r.uint16,this.maxZones=r.uint16,this.maxTwilightPoints=r.uint16,this.maxStorage=r.uint16,this.maxFunctionDefs=r.uint16,this.maxInstructionDefs=r.uint16,this.maxStackElements=r.uint16,this.maxSizeOfInstructions=r.uint16,this.maxComponentElements=r.uint16,this.maxComponentDepth=r.uint16),r.verifyLength()}},Wd=Object.freeze({__proto__:null,maxp:Hd}),Yd=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.format=r.uint16,this.count=r.uint16,this.stringOffset=r.Offset16,this.nameRecords=[...new Array(this.count)].map(o=>new Zd(r,this)),this.format===1&&(this.langTagCount=r.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map(o=>new qd(r.uint16,r.Offset16))),this.stringStart=this.tableStart+this.stringOffset}get(t){let e=this.nameRecords.find(r=>r.nameID===t);if(e)return e.string}},qd=class{constructor(t,e){this.length=t,this.offset=e}},Zd=class{constructor(t,e){this.platformID=t.uint16,this.encodingID=t.uint16,this.languageID=t.uint16,this.nameID=t.uint16,this.length=t.uint16,this.offset=t.Offset16,Z(this,"string",()=>(t.currentPosition=e.stringStart+this.offset,Xd(t,this)))}};function Xd(t,e){let{platformID:r,length:o}=e;if(o===0)return"";if(r===0||r===3){let n=[];for(let l=0,m=o/2;lr.uint8),this.ulUnicodeRange1=r.flags(32),this.ulUnicodeRange2=r.flags(32),this.ulUnicodeRange3=r.flags(32),this.ulUnicodeRange4=r.flags(32),this.achVendID=r.tag,this.fsSelection=r.uint16,this.usFirstCharIndex=r.uint16,this.usLastCharIndex=r.uint16,this.sTypoAscender=r.int16,this.sTypoDescender=r.int16,this.sTypoLineGap=r.int16,this.usWinAscent=r.uint16,this.usWinDescent=r.uint16,this.version===0||(this.ulCodePageRange1=r.flags(32),this.ulCodePageRange2=r.flags(32),this.version===1)||(this.sxHeight=r.int16,this.sCapHeight=r.int16,this.usDefaultChar=r.uint16,this.usBreakChar=r.uint16,this.usMaxContext=r.uint16,this.version<=4)||(this.usLowerOpticalPointSize=r.uint16,this.usUpperOpticalPointSize=r.uint16,this.version===5))return r.verifyLength()}},Qd=Object.freeze({__proto__:null,OS2:Jd}),$d=class extends mt{constructor(t,e){let{p:r}=super(t,e);if(this.version=r.legacyFixed,this.italicAngle=r.fixed,this.underlinePosition=r.fword,this.underlineThickness=r.fword,this.isFixedPitch=r.uint32,this.minMemType42=r.uint32,this.maxMemType42=r.uint32,this.minMemType1=r.uint32,this.maxMemType1=r.uint32,this.version===1||this.version===3)return r.verifyLength();if(this.numGlyphs=r.uint16,this.version===2){this.glyphNameIndex=[...new Array(this.numGlyphs)].map(o=>r.uint16),this.namesOffset=r.currentPosition,this.glyphNameOffsets=[1];for(let o=0;or.int8))}getGlyphName(t){if(this.version!==2)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let e=this.glyphNameIndex[t];if(e<258)return Dl[e];let r=this.glyphNameOffsets[t],s=this.glyphNameOffsets[t+1]-r-1;return s===0?".notdef.":(this.parser.currentPosition=this.namesOffset+r,this.parser.readBytes(s,this.namesOffset+r,8,!0).map(n=>String.fromCharCode(n)).join(""))}},Dl=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","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","grave","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","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"],tm=Object.freeze({__proto__:null,post:$d}),em=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.horizAxisOffset=r.Offset16,this.vertAxisOffset=r.Offset16,Z(this,"horizAxis",()=>new vn({offset:t.offset+this.horizAxisOffset},e)),Z(this,"vertAxis",()=>new vn({offset:t.offset+this.vertAxisOffset},e)),this.majorVersion===1&&this.minorVersion===1&&(this.itemVarStoreOffset=r.Offset32,Z(this,"itemVarStore",()=>new vn({offset:t.offset+this.itemVarStoreOffset},e)))}},vn=class extends mt{constructor(t,e){let{p:r}=super(t,e,"AxisTable");this.baseTagListOffset=r.Offset16,this.baseScriptListOffset=r.Offset16,Z(this,"baseTagList",()=>new rm({offset:t.offset+this.baseTagListOffset},e)),Z(this,"baseScriptList",()=>new om({offset:t.offset+this.baseScriptListOffset},e))}},rm=class extends mt{constructor(t,e){let{p:r}=super(t,e,"BaseTagListTable");this.baseTagCount=r.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map(o=>r.tag)}},om=class extends mt{constructor(t,e){let{p:r}=super(t,e,"BaseScriptListTable");this.baseScriptCount=r.uint16;let o=r.currentPosition;Z(this,"baseScriptRecords",()=>(r.currentPosition=o,[...new Array(this.baseScriptCount)].map(s=>new sm(this.start,r))))}},sm=class{constructor(t,e){this.baseScriptTag=e.tag,this.baseScriptOffset=e.Offset16,Z(this,"baseScriptTable",()=>(e.currentPosition=t+this.baseScriptOffset,new nm(e)))}},nm=class{constructor(t){this.start=t.currentPosition,this.baseValuesOffset=t.Offset16,this.defaultMinMaxOffset=t.Offset16,this.baseLangSysCount=t.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map(e=>new am(this.start,t)),Z(this,"baseValues",()=>(t.currentPosition=this.start+this.baseValuesOffset,new im(t))),Z(this,"defaultMinMax",()=>(t.currentPosition=this.start+this.defaultMinMaxOffset,new Hl(t)))}},am=class{constructor(t,e){this.baseLangSysTag=e.tag,this.minMaxOffset=e.Offset16,Z(this,"minMax",()=>(e.currentPosition=t+this.minMaxOffset,new Hl(e)))}},im=class{constructor(t){this.parser=t,this.start=t.currentPosition,this.defaultBaselineIndex=t.uint16,this.baseCoordCount=t.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map(e=>t.Offset16)}getTable(t){return this.parser.currentPosition=this.start+this.baseCoords[t],new um(this.parser)}},Hl=class{constructor(t){this.minCoord=t.Offset16,this.maxCoord=t.Offset16,this.featMinMaxCount=t.uint16;let e=t.currentPosition;Z(this,"featMinMaxRecords",()=>(t.currentPosition=e,[...new Array(this.featMinMaxCount)].map(r=>new lm(t))))}},lm=class{constructor(t){this.featureTableTag=t.tag,this.minCoord=t.Offset16,this.maxCoord=t.Offset16}},um=class{constructor(t){this.baseCoordFormat=t.uint16,this.coordinate=t.int16,this.baseCoordFormat===2&&(this.referenceGlyph=t.uint16,this.baseCoordPoint=t.uint16),this.baseCoordFormat===3&&(this.deviceTable=t.Offset16)}},fm=Object.freeze({__proto__:null,BASE:em}),Vl=class{constructor(t){this.classFormat=t.uint16,this.classFormat===1&&(this.startGlyphID=t.uint16,this.glyphCount=t.uint16,this.classValueArray=[...new Array(this.glyphCount)].map(e=>t.uint16)),this.classFormat===2&&(this.classRangeCount=t.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map(e=>new cm(t)))}},cm=class{constructor(t){this.startGlyphID=t.uint16,this.endGlyphID=t.uint16,this.class=t.uint16}},ho=class extends Bt{constructor(t){super(t),this.coverageFormat=t.uint16,this.coverageFormat===1&&(this.glyphCount=t.uint16,this.glyphArray=[...new Array(this.glyphCount)].map(e=>t.uint16)),this.coverageFormat===2&&(this.rangeCount=t.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map(e=>new dm(t)))}},dm=class{constructor(t){this.startGlyphID=t.uint16,this.endGlyphID=t.uint16,this.startCoverageIndex=t.uint16}},mm=class{constructor(t,e){this.table=t,this.parser=e,this.start=e.currentPosition,this.format=e.uint16,this.variationRegionListOffset=e.Offset32,this.itemVariationDataCount=e.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map(r=>e.Offset32)}},pm=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.glyphClassDefOffset=r.Offset16,Z(this,"glyphClassDefs",()=>{if(this.glyphClassDefOffset!==0)return r.currentPosition=this.tableStart+this.glyphClassDefOffset,new Vl(r)}),this.attachListOffset=r.Offset16,Z(this,"attachList",()=>{if(this.attachListOffset!==0)return r.currentPosition=this.tableStart+this.attachListOffset,new hm(r)}),this.ligCaretListOffset=r.Offset16,Z(this,"ligCaretList",()=>{if(this.ligCaretListOffset!==0)return r.currentPosition=this.tableStart+this.ligCaretListOffset,new ym(r)}),this.markAttachClassDefOffset=r.Offset16,Z(this,"markAttachClassDef",()=>{if(this.markAttachClassDefOffset!==0)return r.currentPosition=this.tableStart+this.markAttachClassDefOffset,new Vl(r)}),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=r.Offset16,Z(this,"markGlyphSetsDef",()=>{if(this.markGlyphSetsDefOffset!==0)return r.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new wm(r)})),this.minorVersion===3&&(this.itemVarStoreOffset=r.Offset32,Z(this,"itemVarStore",()=>{if(this.itemVarStoreOffset!==0)return r.currentPosition=this.tableStart+this.itemVarStoreOffset,new mm(r)}))}},hm=class extends Bt{constructor(t){super(t),this.coverageOffset=t.Offset16,this.glyphCount=t.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map(e=>t.Offset16)}getPoint(t){return this.parser.currentPosition=this.start+this.attachPointOffsets[t],new gm(this.parser)}},gm=class{constructor(t){this.pointCount=t.uint16,this.pointIndices=[...new Array(this.pointCount)].map(e=>t.uint16)}},ym=class extends Bt{constructor(t){super(t),this.coverageOffset=t.Offset16,Z(this,"coverage",()=>(t.currentPosition=this.start+this.coverageOffset,new ho(t))),this.ligGlyphCount=t.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map(e=>t.Offset16)}getLigGlyph(t){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[t],new vm(this.parser)}},vm=class extends Bt{constructor(t){super(t),this.caretCount=t.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map(e=>t.Offset16)}getCaretValue(t){return this.parser.currentPosition=this.start+this.caretValueOffsets[t],new bm(this.parser)}},bm=class{constructor(t){this.caretValueFormat=t.uint16,this.caretValueFormat===1&&(this.coordinate=t.int16),this.caretValueFormat===2&&(this.caretValuePointIndex=t.uint16),this.caretValueFormat===3&&(this.coordinate=t.int16,this.deviceOffset=t.Offset16)}},wm=class extends Bt{constructor(t){super(t),this.markGlyphSetTableFormat=t.uint16,this.markGlyphSetCount=t.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map(e=>t.Offset32)}getMarkGlyphSet(t){return this.parser.currentPosition=this.start+this.coverageOffsets[t],new ho(this.parser)}},Sm=Object.freeze({__proto__:null,GDEF:pm}),Nl=class extends Bt{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(t){super(t),this.scriptCount=t.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map(e=>new xm(t))}},xm=class{constructor(t){this.scriptTag=t.tag,this.scriptOffset=t.Offset16}},Cm=class extends Bt{constructor(t){super(t),this.defaultLangSys=t.Offset16,this.langSysCount=t.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map(e=>new Fm(t))}},Fm=class{constructor(t){this.langSysTag=t.tag,this.langSysOffset=t.Offset16}},zl=class{constructor(t){this.lookupOrder=t.Offset16,this.requiredFeatureIndex=t.uint16,this.featureIndexCount=t.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map(e=>t.uint16)}},Ml=class extends Bt{static EMPTY={featureCount:0,featureRecords:[]};constructor(t){super(t),this.featureCount=t.uint16,this.featureRecords=[...new Array(this.featureCount)].map(e=>new km(t))}},km=class{constructor(t){this.featureTag=t.tag,this.featureOffset=t.Offset16}},Om=class extends Bt{constructor(t){super(t),this.featureParams=t.Offset16,this.lookupIndexCount=t.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map(e=>t.uint16)}getFeatureParams(){if(this.featureParams>0){let t=this.parser;t.currentPosition=this.start+this.featureParams;let e=this.featureTag;if(e==="size")return new _m(t);if(e.startsWith("cc"))return new Tm(t);if(e.startsWith("ss"))return new Pm(t)}}},Tm=class{constructor(t){this.format=t.uint16,this.featUiLabelNameId=t.uint16,this.featUiTooltipTextNameId=t.uint16,this.sampleTextNameId=t.uint16,this.numNamedParameters=t.uint16,this.firstParamUiLabelNameId=t.uint16,this.charCount=t.uint16,this.character=[...new Array(this.charCount)].map(e=>t.uint24)}},_m=class{constructor(t){this.designSize=t.uint16,this.subfamilyIdentifier=t.uint16,this.subfamilyNameID=t.uint16,this.smallEnd=t.uint16,this.largeEnd=t.uint16}},Pm=class{constructor(t){this.version=t.uint16,this.UINameID=t.uint16}};function Wl(t){t.parser.currentPosition-=2,delete t.coverageOffset,delete t.getCoverageTable}var xr=class extends Bt{constructor(t){super(t),this.substFormat=t.uint16,this.coverageOffset=t.Offset16}getCoverageTable(){let t=this.parser;return t.currentPosition=this.start+this.coverageOffset,new ho(t)}},wn=class{constructor(t){this.glyphSequenceIndex=t.uint16,this.lookupListIndex=t.uint16}},Am=class extends xr{constructor(t){super(t),this.deltaGlyphID=t.int16}},Rm=class extends xr{constructor(t){super(t),this.sequenceCount=t.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map(e=>t.Offset16)}getSequence(t){let e=this.parser;return e.currentPosition=this.start+this.sequenceOffsets[t],new Em(e)}},Em=class{constructor(t){this.glyphCount=t.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(e=>t.uint16)}},Im=class extends xr{constructor(t){super(t),this.alternateSetCount=t.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map(e=>t.Offset16)}getAlternateSet(t){let e=this.parser;return e.currentPosition=this.start+this.alternateSetOffsets[t],new Lm(e)}},Lm=class{constructor(t){this.glyphCount=t.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map(e=>t.uint16)}},Bm=class extends xr{constructor(t){super(t),this.ligatureSetCount=t.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map(e=>t.Offset16)}getLigatureSet(t){let e=this.parser;return e.currentPosition=this.start+this.ligatureSetOffsets[t],new Dm(e)}},Dm=class extends Bt{constructor(t){super(t),this.ligatureCount=t.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map(e=>t.Offset16)}getLigature(t){let e=this.parser;return e.currentPosition=this.start+this.ligatureOffsets[t],new Vm(e)}},Vm=class{constructor(t){this.ligatureGlyph=t.uint16,this.componentCount=t.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map(e=>t.uint16)}},Nm=class extends xr{constructor(t){super(t),this.substFormat===1&&(this.subRuleSetCount=t.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map(e=>t.Offset16)),this.substFormat===2&&(this.classDefOffset=t.Offset16,this.subClassSetCount=t.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map(e=>t.Offset16)),this.substFormat===3&&(Wl(this),this.glyphCount=t.uint16,this.substitutionCount=t.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map(e=>t.Offset16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(e=>new wn(t)))}getSubRuleSet(t){if(this.substFormat!==1)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let e=this.parser;return e.currentPosition=this.start+this.subRuleSetOffsets[t],new zm(e)}getSubClassSet(t){if(this.substFormat!==2)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let e=this.parser;return e.currentPosition=this.start+this.subClassSetOffsets[t],new Mm(e)}getCoverageTable(t){if(this.substFormat!==3&&!t)return super.getCoverageTable();if(!t)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let e=this.parser;return e.currentPosition=this.start+this.coverageOffsets[t],new ho(e)}},zm=class extends Bt{constructor(t){super(t),this.subRuleCount=t.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map(e=>t.Offset16)}getSubRule(t){let e=this.parser;return e.currentPosition=this.start+this.subRuleOffsets[t],new Yl(e)}},Yl=class{constructor(t){this.glyphCount=t.uint16,this.substitutionCount=t.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map(e=>t.uint16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(e=>new wn(t))}},Mm=class extends Bt{constructor(t){super(t),this.subClassRuleCount=t.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map(e=>t.Offset16)}getSubClass(t){let e=this.parser;return e.currentPosition=this.start+this.subClassRuleOffsets[t],new Gm(e)}},Gm=class extends Yl{constructor(t){super(t)}},jm=class extends xr{constructor(t){super(t),this.substFormat===1&&(this.chainSubRuleSetCount=t.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map(e=>t.Offset16)),this.substFormat===2&&(this.backtrackClassDefOffset=t.Offset16,this.inputClassDefOffset=t.Offset16,this.lookaheadClassDefOffset=t.Offset16,this.chainSubClassSetCount=t.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map(e=>t.Offset16)),this.substFormat===3&&(Wl(this),this.backtrackGlyphCount=t.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(e=>t.Offset16),this.inputGlyphCount=t.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map(e=>t.Offset16),this.lookaheadGlyphCount=t.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map(e=>t.Offset16),this.seqLookupCount=t.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map(e=>new ql(t)))}getChainSubRuleSet(t){if(this.substFormat!==1)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let e=this.parser;return e.currentPosition=this.start+this.chainSubRuleSetOffsets[t],new Um(e)}getChainSubClassSet(t){if(this.substFormat!==2)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let e=this.parser;return e.currentPosition=this.start+this.chainSubClassSetOffsets[t],new Wm(e)}getCoverageFromOffset(t){if(this.substFormat!==3)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let e=this.parser;return e.currentPosition=this.start+t,new ho(e)}},Um=class extends Bt{constructor(t){super(t),this.chainSubRuleCount=t.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map(e=>t.Offset16)}getSubRule(t){let e=this.parser;return e.currentPosition=this.start+this.chainSubRuleOffsets[t],new Hm(e)}},Hm=class{constructor(t){this.backtrackGlyphCount=t.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(e=>t.uint16),this.inputGlyphCount=t.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(e=>t.uint16),this.lookaheadGlyphCount=t.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(e=>t.uint16),this.substitutionCount=t.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map(e=>new wn(t))}},Wm=class extends Bt{constructor(t){super(t),this.chainSubClassRuleCount=t.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map(e=>t.Offset16)}getSubClass(t){let e=this.parser;return e.currentPosition=this.start+this.chainSubRuleOffsets[t],new Ym(e)}},Ym=class{constructor(t){this.backtrackGlyphCount=t.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(e=>t.uint16),this.inputGlyphCount=t.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(e=>t.uint16),this.lookaheadGlyphCount=t.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(e=>t.uint16),this.substitutionCount=t.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map(e=>new ql(t))}},ql=class extends Bt{constructor(t){super(t),this.sequenceIndex=t.uint16,this.lookupListIndex=t.uint16}},qm=class extends Bt{constructor(t){super(t),this.substFormat=t.uint16,this.extensionLookupType=t.uint16,this.extensionOffset=t.Offset32}},Zm=class extends xr{constructor(t){super(t),this.backtrackGlyphCount=t.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(e=>t.Offset16),this.lookaheadGlyphCount=t.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map(e=>t.Offset16),this.glyphCount=t.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(e=>t.uint16)}},Xm={buildSubtable:function(t,e){let r=new[void 0,Am,Rm,Im,Bm,Nm,jm,qm,Zm][t](e);return r.type=t,r}},Ye=class extends Bt{constructor(t){super(t)}},Km=class extends Ye{constructor(t){super(t),console.log("lookup type 1")}},Jm=class extends Ye{constructor(t){super(t),console.log("lookup type 2")}},Qm=class extends Ye{constructor(t){super(t),console.log("lookup type 3")}},$m=class extends Ye{constructor(t){super(t),console.log("lookup type 4")}},tp=class extends Ye{constructor(t){super(t),console.log("lookup type 5")}},ep=class extends Ye{constructor(t){super(t),console.log("lookup type 6")}},rp=class extends Ye{constructor(t){super(t),console.log("lookup type 7")}},op=class extends Ye{constructor(t){super(t),console.log("lookup type 8")}},sp=class extends Ye{constructor(t){super(t),console.log("lookup type 9")}},np={buildSubtable:function(t,e){let r=new[void 0,Km,Jm,Qm,$m,tp,ep,rp,op,sp][t](e);return r.type=t,r}},Gl=class extends Bt{static EMPTY={lookupCount:0,lookups:[]};constructor(t){super(t),this.lookupCount=t.uint16,this.lookups=[...new Array(this.lookupCount)].map(e=>t.Offset16)}},ap=class extends Bt{constructor(t,e){super(t),this.ctType=e,this.lookupType=t.uint16,this.lookupFlag=t.uint16,this.subTableCount=t.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map(r=>t.Offset16),this.markFilteringSet=t.uint16}get rightToLeft(){return this.lookupFlag&!0}get ignoreBaseGlyphs(){return this.lookupFlag&!0}get ignoreLigatures(){return this.lookupFlag&!0}get ignoreMarks(){return this.lookupFlag&!0}get useMarkFilteringSet(){return this.lookupFlag&!0}get markAttachmentType(){return this.lookupFlag&!0}getSubTable(t){let e=this.ctType==="GSUB"?Xm:np;return this.parser.currentPosition=this.start+this.subtableOffsets[t],e.buildSubtable(this.lookupType,this.parser)}},Zl=class extends mt{constructor(t,e,r){let{p:o,tableStart:s}=super(t,e,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.scriptListOffset=o.Offset16,this.featureListOffset=o.Offset16,this.lookupListOffset=o.Offset16,this.majorVersion===1&&this.minorVersion===1&&(this.featureVariationsOffset=o.Offset32);let a=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);Z(this,"scriptList",()=>a?Nl.EMPTY:(o.currentPosition=s+this.scriptListOffset,new Nl(o))),Z(this,"featureList",()=>a?Ml.EMPTY:(o.currentPosition=s+this.featureListOffset,new Ml(o))),Z(this,"lookupList",()=>a?Gl.EMPTY:(o.currentPosition=s+this.lookupListOffset,new Gl(o))),this.featureVariationsOffset&&Z(this,"featureVariations",()=>a?FeatureVariations.EMPTY:(o.currentPosition=s+this.featureVariationsOffset,new FeatureVariations(o)))}getSupportedScripts(){return this.scriptList.scriptRecords.map(t=>t.scriptTag)}getScriptTable(t){let e=this.scriptList.scriptRecords.find(o=>o.scriptTag===t);this.parser.currentPosition=this.scriptList.start+e.scriptOffset;let r=new Cm(this.parser);return r.scriptTag=t,r}ensureScriptTable(t){return typeof t=="string"?this.getScriptTable(t):t}getSupportedLangSys(t){t=this.ensureScriptTable(t);let e=t.defaultLangSys!==0,r=t.langSysRecords.map(o=>o.langSysTag);return e&&r.unshift("dflt"),r}getDefaultLangSysTable(t){t=this.ensureScriptTable(t);let e=t.defaultLangSys;if(e!==0){this.parser.currentPosition=t.start+e;let r=new zl(this.parser);return r.langSysTag="",r.defaultForScript=t.scriptTag,r}}getLangSysTable(t,e="dflt"){if(e==="dflt")return this.getDefaultLangSysTable(t);t=this.ensureScriptTable(t);let r=t.langSysRecords.find(s=>s.langSysTag===e);this.parser.currentPosition=t.start+r.langSysOffset;let o=new zl(this.parser);return o.langSysTag=e,o}getFeatures(t){return t.featureIndices.map(e=>this.getFeature(e))}getFeature(t){let e;if(parseInt(t)==t?e=this.featureList.featureRecords[t]:e=this.featureList.featureRecords.find(o=>o.featureTag===t),!e)return;this.parser.currentPosition=this.featureList.start+e.featureOffset;let r=new Om(this.parser);return r.featureTag=e.featureTag,r}getLookups(t){return t.lookupListIndices.map(e=>this.getLookup(e))}getLookup(t,e){let r=this.lookupList.lookups[t];return this.parser.currentPosition=this.lookupList.start+r,new ap(this.parser,e)}},ip=class extends Zl{constructor(t,e){super(t,e,"GSUB")}getLookup(t){return super.getLookup(t,"GSUB")}},lp=Object.freeze({__proto__:null,GSUB:ip}),up=class extends Zl{constructor(t,e){super(t,e,"GPOS")}getLookup(t){return super.getLookup(t,"GPOS")}},fp=Object.freeze({__proto__:null,GPOS:up}),cp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.offsetToSVGDocumentList=r.Offset32,r.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new dp(r)}},dp=class extends Bt{constructor(t){super(t),this.numEntries=t.uint16,this.documentRecords=[...new Array(this.numEntries)].map(e=>new mp(t))}getDocument(t){let e=this.documentRecords[t];if(!e)return"";let r=this.start+e.svgDocOffset;return this.parser.currentPosition=r,this.parser.readBytes(e.svgDocLength)}getDocumentForGlyph(t){let e=this.documentRecords.findIndex(r=>r.startGlyphID<=t&&t<=r.endGlyphID);return e===-1?"":this.getDocument(e)}},mp=class{constructor(t){this.startGlyphID=t.uint16,this.endGlyphID=t.uint16,this.svgDocOffset=t.Offset32,this.svgDocLength=t.uint32}},pp=Object.freeze({__proto__:null,SVG:cp}),hp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.axesArrayOffset=r.Offset16,r.uint16,this.axisCount=r.uint16,this.axisSize=r.uint16,this.instanceCount=r.uint16,this.instanceSize=r.uint16;let o=this.tableStart+this.axesArrayOffset;Z(this,"axes",()=>(r.currentPosition=o,[...new Array(this.axisCount)].map(a=>new gp(r))));let s=o+this.axisCount*this.axisSize;Z(this,"instances",()=>{let a=[];for(let n=0;nt.tag)}getAxis(t){return this.axes.find(e=>e.tag===t)}},gp=class{constructor(t){this.tag=t.tag,this.minValue=t.fixed,this.defaultValue=t.fixed,this.maxValue=t.fixed,this.flags=t.flags(16),this.axisNameID=t.uint16}},yp=class{constructor(t,e,r){let o=t.currentPosition;this.subfamilyNameID=t.uint16,t.uint16,this.coordinates=[...new Array(e)].map(s=>t.fixed),t.currentPosition-o[...new Array(o)].map(s=>r.fword))}},wp=Object.freeze({__proto__:null,cvt:bp}),Sp=class extends mt{constructor(t,e){let{p:r}=super(t,e);Z(this,"instructions",()=>[...new Array(t.length)].map(o=>r.uint8))}},xp=Object.freeze({__proto__:null,fpgm:Sp}),Cp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numRanges=r.uint16,Z(this,"gaspRanges",()=>[...new Array(this.numRanges)].map(s=>new Fp(r)))}},Fp=class{constructor(t){this.rangeMaxPPEM=t.uint16,this.rangeGaspBehavior=t.uint16}},kp=Object.freeze({__proto__:null,gasp:Cp}),Op=class extends mt{constructor(t,e){super(t,e)}getGlyphData(t,e){return this.parser.currentPosition=this.tableStart+t,this.parser.readBytes(e)}},Tp=Object.freeze({__proto__:null,glyf:Op}),_p=class extends mt{constructor(t,e,r){let{p:o}=super(t,e),s=r.maxp.numGlyphs+1;r.head.indexToLocFormat===0?(this.x2=!0,Z(this,"offsets",()=>[...new Array(s)].map(a=>o.Offset16))):Z(this,"offsets",()=>[...new Array(s)].map(a=>o.Offset32))}getGlyphDataOffsetAndLength(t){let e=this.offsets[t]*this.x2?2:1,r=this.offsets[t+1]*this.x2?2:1;return{offset:e,length:r-e}}},Pp=Object.freeze({__proto__:null,loca:_p}),Ap=class extends mt{constructor(t,e){let{p:r}=super(t,e);Z(this,"instructions",()=>[...new Array(t.length)].map(o=>r.uint8))}},Rp=Object.freeze({__proto__:null,prep:Ap}),Ep=class extends mt{constructor(t,e){let{p:r}=super(t,e);Z(this,"data",()=>r.readBytes())}},Ip=Object.freeze({__proto__:null,CFF:Ep}),Lp=class extends mt{constructor(t,e){let{p:r}=super(t,e);Z(this,"data",()=>r.readBytes())}},Bp=Object.freeze({__proto__:null,CFF2:Lp}),Dp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.defaultVertOriginY=r.int16,this.numVertOriginYMetrics=r.uint16,Z(this,"vertORiginYMetrics",()=>[...new Array(this.numVertOriginYMetrics)].map(o=>new Vp(r)))}},Vp=class{constructor(t){this.glyphIndex=t.uint16,this.vertOriginY=t.int16}},Np=Object.freeze({__proto__:null,VORG:Dp}),zp=class{constructor(t){this.indexSubTableArrayOffset=t.Offset32,this.indexTablesSize=t.uint32,this.numberofIndexSubTables=t.uint32,this.colorRef=t.uint32,this.hori=new as(t),this.vert=new as(t),this.startGlyphIndex=t.uint16,this.endGlyphIndex=t.uint16,this.ppemX=t.uint8,this.ppemY=t.uint8,this.bitDepth=t.uint8,this.flags=t.int8}},Mp=class{constructor(t){this.hori=new as(t),this.vert=new as(t),this.ppemX=t.uint8,this.ppemY=t.uint8,this.substitutePpemX=t.uint8,this.substitutePpemY=t.uint8}},as=class{constructor(t){this.ascender=t.int8,this.descender=t.int8,this.widthMax=t.uint8,this.caretSlopeNumerator=t.int8,this.caretSlopeDenominator=t.int8,this.caretOffset=t.int8,this.minOriginSB=t.int8,this.minAdvanceSB=t.int8,this.maxBeforeBL=t.int8,this.minAfterBL=t.int8,this.pad1=t.int8,this.pad2=t.int8}},Xl=class extends mt{constructor(t,e,r){let{p:o}=super(t,e,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.numSizes=o.uint32,Z(this,"bitMapSizes",()=>[...new Array(this.numSizes)].map(s=>new zp(o)))}},Gp=Object.freeze({__proto__:null,EBLC:Xl}),Kl=class extends mt{constructor(t,e,r){let{p:o}=super(t,e,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16}},jp=Object.freeze({__proto__:null,EBDT:Kl}),Up=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,Z(this,"bitmapScales",()=>[...new Array(this.numSizes)].map(o=>new Mp(r)))}},Hp=Object.freeze({__proto__:null,EBSC:Up}),Wp=class extends Xl{constructor(t,e){super(t,e,"CBLC")}},Yp=Object.freeze({__proto__:null,CBLC:Wp}),qp=class extends Kl{constructor(t,e){super(t,e,"CBDT")}},Zp=Object.freeze({__proto__:null,CBDT:qp}),Xp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.flags=r.flags(16),this.numStrikes=r.uint32,Z(this,"strikeOffsets",()=>[...new Array(this.numStrikes)].map(o=>r.Offset32))}},Kp=Object.freeze({__proto__:null,sbix:Xp}),Jp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numBaseGlyphRecords=r.uint16,this.baseGlyphRecordsOffset=r.Offset32,this.layerRecordsOffset=r.Offset32,this.numLayerRecords=r.uint16}getBaseGlyphRecord(t){let e=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=e;let r=new bn(this.parser),o=r.gID,s=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=s;let a=new bn(this.parser),n=a.gID;if(o===t)return r;if(n===t)return a;for(;e!==s;){let l=e+(s-e)/12;this.parser.currentPosition=l;let m=new bn(this.parser),f=m.gID;if(f===t)return m;f>t?s=l:fnew Qp(p))}},bn=class{constructor(t){this.gID=t.uint16,this.firstLayerIndex=t.uint16,this.numLayers=t.uint16}},Qp=class{constructor(t){this.gID=t.uint16,this.paletteIndex=t.uint16}},$p=Object.freeze({__proto__:null,COLR:Jp}),th=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numPaletteEntries=r.uint16;let o=this.numPalettes=r.uint16;this.numColorRecords=r.uint16,this.offsetFirstColorRecord=r.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map(s=>r.uint16),Z(this,"colorRecords",()=>(r.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map(s=>new eh(r)))),this.version===1&&(this.offsetPaletteTypeArray=r.Offset32,this.offsetPaletteLabelArray=r.Offset32,this.offsetPaletteEntryLabelArray=r.Offset32,Z(this,"paletteTypeArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new rh(r,o))),Z(this,"paletteLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new oh(r,o))),Z(this,"paletteEntryLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new sh(r,o))))}},eh=class{constructor(t){this.blue=t.uint8,this.green=t.uint8,this.red=t.uint8,this.alpha=t.uint8}},rh=class{constructor(t,e){this.paletteTypes=[...new Array(e)].map(r=>t.uint32)}},oh=class{constructor(t,e){this.paletteLabels=[...new Array(e)].map(r=>t.uint16)}},sh=class{constructor(t,e){this.paletteEntryLabels=[...new Array(e)].map(r=>t.uint16)}},nh=Object.freeze({__proto__:null,CPAL:th}),ah=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint32,this.numSignatures=r.uint16,this.flags=r.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map(o=>new ih(r))}getData(t){let e=this.signatureRecords[t];return this.parser.currentPosition=this.tableStart+e.offset,new lh(this.parser)}},ih=class{constructor(t){this.format=t.uint32,this.length=t.uint32,this.offset=t.Offset32}},lh=class{constructor(t){t.uint16,t.uint16,this.signatureLength=t.uint32,this.signature=t.readBytes(this.signatureLength)}},uh=Object.freeze({__proto__:null,DSIG:ah}),fh=class extends mt{constructor(t,e,r){let{p:o}=super(t,e),s=r.hmtx.numGlyphs;this.version=o.uint16,this.numRecords=o.int16,this.sizeDeviceRecord=o.int32,this.records=[...new Array(numRecords)].map(a=>new ch(o,s))}},ch=class{constructor(t,e){this.pixelSize=t.uint8,this.maxWidth=t.uint8,this.widths=t.readBytes(e)}},dh=Object.freeze({__proto__:null,hdmx:fh}),mh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.nTables=r.uint16,Z(this,"tables",()=>{let o=this.tableStart+4,s=[];for(let a=0;a[...new Array(this.nPairs)].map(e=>new hh(t)))),this.format===2&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}},hh=class{constructor(t){this.left=t.uint16,this.right=t.uint16,this.value=t.fword}},gh=Object.freeze({__proto__:null,kern:mh}),yh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numGlyphs=r.uint16,this.yPels=r.readBytes(this.numGlyphs)}},vh=Object.freeze({__proto__:null,LTSH:yh}),bh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.mergeClassCount=r.uint16,this.mergeDataOffset=r.Offset16,this.classDefCount=r.uint16,this.offsetToClassDefOffsets=r.Offset16,Z(this,"mergeEntryMatrix",()=>[...new Array(this.mergeClassCount)].map(o=>r.readBytes(this.mergeClassCount))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},wh=Object.freeze({__proto__:null,MERG:bh}),Sh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint32,this.flags=r.uint32,r.uint32,this.dataMapsCount=r.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map(o=>new xh(this.tableStart,r))}},xh=class{constructor(t,e){this.tableStart=t,this.parser=e,this.tag=e.tag,this.dataOffset=e.Offset32,this.dataLength=e.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}},Ch=Object.freeze({__proto__:null,meta:Sh}),Fh=class extends mt{constructor(t,e){super(t,e),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},kh=Object.freeze({__proto__:null,PCLT:Fh}),Oh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numRecs=r.uint16,this.numRatios=r.uint16,this.ratRanges=[...new Array(this.numRatios)].map(o=>new Th(r)),this.offsets=[...new Array(this.numRatios)].map(o=>r.Offset16),this.VDMXGroups=[...new Array(this.numRecs)].map(o=>new _h(r))}},Th=class{constructor(t){this.bCharSet=t.uint8,this.xRatio=t.uint8,this.yStartRatio=t.uint8,this.yEndRatio=t.uint8}},_h=class{constructor(t){this.recs=t.uint16,this.startsz=t.uint8,this.endsz=t.uint8,this.records=[...new Array(this.recs)].map(e=>new Ph(t))}},Ph=class{constructor(t){this.yPelHeight=t.uint16,this.yMax=t.int16,this.yMin=t.int16}},Ah=Object.freeze({__proto__:null,VDMX:Oh}),Rh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.fixed,this.ascent=this.vertTypoAscender=r.int16,this.descent=this.vertTypoDescender=r.int16,this.lineGap=this.vertTypoLineGap=r.int16,this.advanceHeightMax=r.int16,this.minTopSideBearing=r.int16,this.minBottomSideBearing=r.int16,this.yMaxExtent=r.int16,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.metricDataFormat=r.int16,this.numOfLongVerMetrics=r.uint16,r.verifyLength()}},Eh=Object.freeze({__proto__:null,vhea:Rh}),Ih=class extends mt{constructor(t,e,r){super(t,e);let o=r.vhea.numOfLongVerMetrics,s=r.maxp.numGlyphs,a=p.currentPosition;if(lazy(this,"vMetrics",()=>(p.currentPosition=a,[...new Array(o)].map(n=>new Lh(p.uint16,p.int16)))),o(p.currentPosition=n,[...new Array(s-o)].map(l=>p.int16)))}}},Lh=class{constructor(t,e){this.advanceHeight=t,this.topSideBearing=e}},Bh=Object.freeze({__proto__:null,vmtx:Ih});var Jl=u(X(),1);var{kebabCase:Dh}=vt(Jl.privateApis);function Ql(t){let e=t.reduce((r,o)=>(r[o.fontFamily]||(r[o.fontFamily]={name:o.fontFamily,fontFamily:o.fontFamily,slug:Dh(o.fontFamily.toLowerCase()),fontFace:[]}),r[o.fontFamily].fontFace.push(o),r),{});return Object.values(e)}var pe=u(z(),1);function Vh(){let{installFonts:t}=(0,go.useContext)(ne),[e,r]=(0,go.useState)(!1),[o,s]=(0,go.useState)(null),a=h=>{l(h)},n=h=>{l(h.target.files)},l=async h=>{if(!h)return;s(null),r(!0);let v=new Set,_=[...h],A=!1,k=_.map(async b=>{if(!await f(b))return A=!0,null;if(v.has(b.name))return null;let Y=(((b.name??"").split(".")??[]).pop()??"").toLowerCase();return pn.includes(Y)?(v.add(b.name),b):null}),x=(await Promise.all(k)).filter(b=>b!==null);if(x.length>0)m(x);else{let b=A?(0,Ur.__)("Sorry, you are not allowed to upload this file type."):(0,Ur.__)("No fonts found to install.");s({type:"error",message:b}),r(!1)}},m=async h=>{let v=await Promise.all(h.map(async _=>{let A=await d(_);return await er(A,A.file,"all"),A}));g(v)};async function f(h){let v=new is("Uploaded Font");try{let _=await c(h);return await v.fromDataBuffer(_,"font"),!0}catch{return!1}}async function c(h){return new Promise((v,_)=>{let A=new window.FileReader;A.readAsArrayBuffer(h),A.onload=()=>v(A.result),A.onerror=_})}let d=async h=>{let v=await c(h),_=new is("Uploaded Font");_.fromDataBuffer(v,h.name);let k=(await new Promise($=>_.onload=$)).detail.font,{name:x}=k.opentype.tables,b=x.get(16)||x.get(1),T=x.get(2).toLowerCase().includes("italic"),Y=k.opentype.tables["OS/2"].usWeightClass||"normal",V=!!k.opentype.tables.fvar&&k.opentype.tables.fvar.axes.find(({tag:$})=>$==="wght"),H=V?`${V.minValue} ${V.maxValue}`:null;return{file:h,fontFamily:b,fontStyle:T?"italic":"normal",fontWeight:H||Y}},g=async h=>{let v=Ql(h);try{await t(v),s({type:"success",message:(0,Ur.__)("Fonts were installed successfully.")})}catch(_){let A=_;s({type:"error",message:A.message,errors:A?.installationErrors})}r(!1)};return(0,pe.jsxs)("div",{className:"font-library__tabpanel-layout",children:[(0,pe.jsx)($t.DropZone,{onFilesDrop:a}),(0,pe.jsxs)($t.__experimentalVStack,{className:"font-library__local-fonts",justify:"start",children:[o&&(0,pe.jsxs)($t.Notice,{status:o.type,__unstableHTML:!0,onRemove:()=>s(null),children:[o.message,o.errors&&(0,pe.jsx)("ul",{children:o.errors.map((h,v)=>(0,pe.jsx)("li",{children:h},v))})]}),e&&(0,pe.jsx)($t.FlexItem,{children:(0,pe.jsx)("div",{className:"font-library__upload-area",children:(0,pe.jsx)($t.ProgressBar,{})})}),!e&&(0,pe.jsx)($t.FormFileUpload,{accept:pn.map(h=>`.${h}`).join(","),multiple:!0,onChange:n,render:({openFileDialog:h})=>(0,pe.jsx)($t.Button,{__next40pxDefaultSize:!0,className:"font-library__upload-area",onClick:h,children:(0,Ur.__)("Upload font")})}),(0,pe.jsx)($t.__experimentalText,{className:"font-library__upload-area__text",children:(0,Ur.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})}var ls=Vh;var tu=u(z(),1),{Tabs:x2}=vt(Sn.privateApis),C2={id:"installed-fonts",title:(0,us._x)("Library","Font library")},F2={id:"upload-fonts",title:(0,us._x)("Upload","noun")};var eu=u(ut(),1),xn=u(X(),1),zh=u(yt(),1);var ru=u(z(),1);var Cn=u(z(),1);var ou=u(ut(),1),fs=u(X(),1);var su=u(z(),1);var kn=u(z(),1);var _e=u(ut(),1),On=u(X(),1),qh=u(yt(),1);var nu=u(ce(),1);var Wh=u(z(),1),{useSettingsForBlockElement:t6,TypographyPanel:e6}=vt(nu.privateApis);var Yh=u(z(),1);var Tn=u(z(),1),f6={text:{description:(0,_e.__)("Manage the fonts used on the site."),title:(0,_e.__)("Text")},link:{description:(0,_e.__)("Manage the fonts and typography used on the links."),title:(0,_e.__)("Links")},heading:{description:(0,_e.__)("Manage the fonts and typography used on headings."),title:(0,_e.__)("Headings")},caption:{description:(0,_e.__)("Manage the fonts and typography used on captions."),title:(0,_e.__)("Captions")},button:{description:(0,_e.__)("Manage the fonts and typography used on buttons."),title:(0,_e.__)("Buttons")}};var Jh=u(ut(),1),Qh=u(X(),1),iu=u(ce(),1);var Hr=u(X(),1),au=u(ut(),1);var Kh=u(yt(),1);var Zh=u(X(),1),Xh=u(z(),1);var _n=u(z(),1);var Pn=u(z(),1),{useSettingsForBlockElement:O6,ColorPanel:T6}=vt(iu.privateApis);var ng=u(ut(),1),pu=u(X(),1);var eg=u(cr(),1),An=u(X(),1),rg=u(ut(),1);var ds=u(X(),1);var cs=u(X(),1);var lu=u(z(),1);function uu(){let{paletteColors:t}=Lr();return t.slice(0,4).map(({slug:e,color:r},o)=>(0,lu.jsx)("div",{style:{flexGrow:1,height:"100%",background:r}},`${e}-${o}`))}var vo=u(z(),1),$h={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},tg=({label:t,isFocused:e,withHoverView:r})=>(0,vo.jsx)(Vr,{label:t,isFocused:e,withHoverView:r,children:({key:o})=>(0,vo.jsx)(cs.__unstableMotion.div,{variants:$h,style:{height:"100%",overflow:"hidden"},children:(0,vo.jsx)(cs.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,vo.jsx)(uu,{})})},o)}),fu=tg;var Cr=u(z(),1),cu=["color"];function ms({title:t,gap:e=2}){let r=No(cu);return r?.length<=1?null:(0,Cr.jsxs)(ds.__experimentalVStack,{spacing:3,children:[t&&(0,Cr.jsx)(Se,{level:3,children:t}),(0,Cr.jsx)(ds.__experimentalGrid,{gap:e,children:r.map((o,s)=>(0,Cr.jsx)(zr,{variation:o,isPill:!0,properties:cu,showTooltip:!0,children:()=>(0,Cr.jsx)(fu,{})},s))})]})}var du=u(z(),1);var og=u(cr(),1),ps=u(X(),1),sg=u(ut(),1);var mu=u(z(),1);var Rn=u(z(),1),{Tabs:Q6}=vt(pu.privateApis);var ig=u(ut(),1),gu=u(ce(),1),lg=u(X(),1);var hu=u(ce(),1);var ag=u(z(),1);var{BackgroundPanel:rC}=vt(hu.privateApis);var En=u(z(),1),{useHasBackgroundPanel:uC}=vt(gu.privateApis);var Fr=u(X(),1),In=u(ut(),1);var mg=u(yt(),1);var ug=u(X(),1),fg=u(ut(),1),cg=u(z(),1);var Ln=u(z(),1),{Menu:SC}=vt(Fr.privateApis);var Ut=u(X(),1),bo=u(ut(),1);var hs=u(yt(),1);var Bn=u(z(),1),{Menu:DC}=vt(Ut.privateApis),VC=[{label:(0,bo.__)("Rename"),action:"rename"},{label:(0,bo.__)("Delete"),action:"delete"}],NC=[{label:(0,bo.__)("Reset"),action:"reset"}];var pg=u(z(),1);var yg=u(ut(),1),vu=u(ce(),1);var yu=u(ce(),1),hg=u(yt(),1);var gg=u(z(),1),{useSettingsForBlockElement:qC,DimensionsPanel:ZC}=vt(yu.privateApis);var Dn=u(z(),1),{useHasDimensionsPanel:eF,useSettingsForBlockElement:rF}=vt(vu.privateApis);var Fu=u(X(),1),Sg=u(ut(),1);var bg=u(ut(),1),wg=u(X(),1);var bu=u(be(),1),wu=u(fe(),1),ys=u(yt(),1),Su=u(X(),1),xu=u(ut(),1);var gs=u(z(),1);function vg({gap:t=2}){let{user:e}=(0,ys.useContext)(Xt),r=e?.styles,s=(0,wu.useSelect)(n=>{let l=n(bu.store).__experimentalGetCurrentThemeGlobalStylesVariations();return Array.isArray(l)?l:void 0},[])?.filter(n=>!io(n,["color"])&&!io(n,["typography","spacing"])),a=(0,ys.useMemo)(()=>[...[{title:(0,xu.__)("Default"),settings:{},styles:{}},...s??[]].map(l=>{let m=l?.styles?.blocks?{...l.styles.blocks}:{};r?.blocks&&Object.keys(r.blocks).forEach(g=>{if(r.blocks?.[g]?.css){let h=m[g]||{},v={css:`${m[g]?.css||""} ${r.blocks?.[g]?.css?.trim()||""}`};m[g]={...h,...v}}});let f=r?.css||l.styles?.css?{css:`${l.styles?.css||""} ${r?.css||""}`}:{},c=Object.keys(m).length>0?{blocks:m}:{},d={...l.styles,...f,...c};return{...l,settings:l.settings??{},styles:d}})],[s,r?.blocks,r?.css]);return!s||s.length<1?null:(0,gs.jsx)(Su.__experimentalGrid,{columns:2,className:"global-styles-ui-style-variations-container",gap:t,children:a.map((n,l)=>(0,gs.jsx)(zr,{variation:n,children:m=>(0,gs.jsx)(nn,{label:n?.title,withHoverView:!0,isFocused:m,variation:n})},l))})}var Vn=vg;var Cu=u(z(),1);var Nn=u(z(),1);var xg=u(ut(),1),Cg=u(X(),1),ku=u(ce(),1);var zn=u(z(),1),{AdvancedPanel:wF}=vt(ku.privateApis);var Lu=u(ut(),1),Gn=u(X(),1),jn=u(yt(),1);var Fg=u(fe(),1),kg=u(be(),1),Ou=u(yt(),1);var Pu=u(ut(),1),Au=u(X(),1),vs=u(_u(),1),Og=u(be(),1),Tg=u(fe(),1);var Ru=u(dn(),1),Eu=u(z(),1),kF=3600*1e3*24;var Mn=u(X(),1),wo=u(ut(),1);var Iu=u(z(),1);var Un=u(z(),1);var Hn=u(ut(),1),qe=u(X(),1);var Eg=u(yt(),1);var Pg=u(X(),1),Ag=u(ut(),1),Rg=u(z(),1);var Wn=u(z(),1),{Menu:YF}=vt(qe.privateApis);var Nu=u(ut(),1),Ne=u(X(),1);var zu=u(yt(),1);var Ig=u(ce(),1),Lg=u(ut(),1);var Bg=u(z(),1);var Dg=u(X(),1),Bu=u(ut(),1),Vg=u(z(),1);var So=u(X(),1),Ng=u(ut(),1),zg=u(yt(),1),Du=u(z(),1);var Ze=u(X(),1),Vu=u(z(),1);var Yn=u(z(),1),{Menu:f3}=vt(Ne.privateApis);var Zn=u(z(),1);var Xn=u(z(),1);function Wr(t){return function({value:r,baseValue:o,onChange:s,...a}){return(0,Xn.jsx)(ao,{value:r,baseValue:o,onChange:s,children:(0,Xn.jsx)(t,{...a})})}}var Ug=Wr(Vn);var Hg=Wr(ms);var Wg=Wr(Wo);var Yr=u(z(),1);function Kn({value:t,baseValue:e,onChange:r,activeTab:o="installed-fonts"}){let s;switch(o){case"upload-fonts":s=(0,Yr.jsx)(ls,{});break;case"installed-fonts":s=(0,Yr.jsx)($o,{});break;default:s=(0,Yr.jsx)(es,{slug:o})}return(0,Yr.jsx)(ao,{value:t,baseValue:e,onChange:r,children:(0,Yr.jsx)(Zo,{children:s})})}var ju=u(Vs()),{unlock:Jn}=(0,ju.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/font-list-route");if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='4bbd4c3e39']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","4bbd4c3e39"),t.appendChild(document.createTextNode('@media (min-width:782px){.font-library-modal.font-library-modal{width:65vw}}.font-library-modal .components-modal__header{border-bottom:none}.font-library-modal .components-modal__content{margin-bottom:90px;padding:0}.font-library-modal .font-library__subtitle{font-size:11px;font-weight:499;text-transform:uppercase}.font-library-modal__tab-panel{height:calc(100% - 50px)}.font-library__tabpanel-layout{display:flex;flex-direction:column;height:100%}.font-library__tabpanel-layout>div{flex-grow:1}.font-library__tabpanel-layout .font-library__loading{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;left:0;padding-top:124px;position:absolute;top:0;width:100%}.font-library__footer,.font-library__tabpanel-layout .components-navigator-screen{padding:24px;width:100%}.font-library__footer{background-color:#fff;border-top:1px solid #ddd;bottom:0;box-sizing:border-box;flex-grow:0!important;flex-shrink:0;height:90px;position:absolute}.font-library__page-selection{font-size:11px;font-weight:499;text-transform:uppercase}@media (min-width:600px){.font-library__page-selection .font-library__page-selection-trigger{font-size:11px!important;font-weight:499}}.font-library__fonts-title{font-size:11px;font-weight:600;margin-bottom:0;margin-top:0;text-transform:uppercase}.font-library__fonts-list{list-style:none;margin-bottom:0;margin-top:0;padding:0}.font-library__fonts-list-item{margin-bottom:0}.font-library__font-card{border:1px solid #ddd;box-sizing:border-box;height:auto!important;margin-top:-1px;padding:16px;width:100%}.font-library__font-card:hover{background-color:#f0f0f0}.font-library__font-card:focus{position:relative}.font-library__font-card .font-library__font-card__name{font-weight:700}.font-library__font-card .font-library__font-card__count{color:#757575}.font-library__font-card .font-library__font-variant_demo-image{display:block;height:24px;width:auto}.font-library__font-card .font-library__font-variant_demo-text{flex-shrink:0;white-space:nowrap}@media not (prefers-reduced-motion){.font-library__font-card .font-library__font-variant_demo-text{transition:opacity .3s ease-in-out}}.font-library-modal__tablist-container{background:#fff;border-bottom:1px solid #ddd;position:sticky;top:0;z-index:1}.font-library__upload-area{align-items:center;display:flex;height:256px!important;justify-content:center;width:100%}button.font-library__upload-area{background-color:#f0f0f0}.font-library__local-fonts{margin:24px auto;width:80%}.font-library__local-fonts .font-library__upload-area__text{color:#757575}.font-library__google-fonts-confirm{align-items:center;display:flex;justify-content:center;margin-top:64px}.font-library__google-fonts-confirm p{line-height:1.4}.font-library__google-fonts-confirm h2{font-size:1.2rem;font-weight:400}.font-library__google-fonts-confirm .components-card{padding:16px;width:400px}.font-library__google-fonts-confirm .components-button{justify-content:center;width:100%}.font-library__select-all{padding:16px 16px 16px 17px}.font-library__select-all .components-checkbox-control__label{padding-left:16px}.global-styles-ui-pagination .components-button.is-tertiary{height:32px;justify-content:center;width:32px}.global-styles-ui-screen-revisions__revisions-list{flex-grow:1;list-style:none;margin:0 16px 16px}.global-styles-ui-screen-revisions__revisions-list li{margin-bottom:0}.global-styles-ui-screen-revisions__revision-item{cursor:pointer;display:flex;flex-direction:column;position:relative}.global-styles-ui-screen-revisions__revision-item[role=option]:active,.global-styles-ui-screen-revisions__revision-item[role=option]:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.global-styles-ui-screen-revisions__revision-item:hover{background:rgba(var(--wp-admin-theme-color--rgb),.04)}.global-styles-ui-screen-revisions__revision-item:hover .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item:after,.global-styles-ui-screen-revisions__revision-item:before{content:"\\a";display:block;position:absolute}.global-styles-ui-screen-revisions__revision-item:before{background:#ddd;border:4px solid #0000;border-radius:50%;height:8px;left:17px;top:18px;transform:translate(-50%,-50%);width:8px;z-index:1}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]{background:rgba(var(--wp-admin-theme-color--rgb),.04);border-radius:2px;color:var(--wp-admin-theme-color);outline:3px solid #0000;outline-offset:-2px}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]:before{background:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__changes>li,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__meta{color:#1e1e1e}.global-styles-ui-screen-revisions__revision-item:after{border:.5px solid #ddd;height:100%;left:16px;top:0;width:0}.global-styles-ui-screen-revisions__revision-item:first-child:after{top:18px}.global-styles-ui-screen-revisions__revision-item:last-child:after{height:18px}.global-styles-ui-screen-revisions__revision-item-wrapper{display:block;padding:12px 12px 4px 40px}.global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__apply-button.is-primary{align-self:flex-start;margin:4px 12px 12px 40px}.global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__changes,.global-styles-ui-screen-revisions__meta{color:#757575;font-size:12px}.global-styles-ui-screen-revisions__description{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.global-styles-ui-screen-revisions__description .global-styles-ui-screen-revisions__date{font-size:12px;font-weight:600;text-transform:uppercase}.global-styles-ui-screen-revisions__meta{align-items:flex-start;display:flex;justify-content:start;margin-bottom:4px;text-align:left;width:100%}.global-styles-ui-screen-revisions__meta img{border-radius:100%;height:16px;margin-right:8px;width:16px}.global-styles-ui-screen-revisions__loading{margin:24px auto!important}.global-styles-ui-screen-revisions__changes{line-height:1.4;list-style:disc;margin-left:12px;text-align:left}.global-styles-ui-screen-revisions__changes li{margin-bottom:4px}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination{gap:2px;justify-content:space-between}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .edit-site-pagination__total{height:1px;left:-1000px;margin:-1px;overflow:hidden;position:absolute}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-text{font-size:12px;will-change:opacity}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary{color:#1e1e1e}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary:disabled,.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary[aria-disabled=true]{color:#949494}.global-styles-ui-screen-revisions__footer{background:#fff;border-top:1px solid #ddd;bottom:0;box-sizing:border-box;height:56px;min-width:100%;padding:12px;position:sticky;z-index:1}.global-styles-ui-variations_item{box-sizing:border-box;cursor:pointer}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{border-radius:2px;outline:1px solid #0000001a;outline-offset:-1px;overflow:hidden;position:relative}@media not (prefers-reduced-motion){.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{transition:outline .1s linear}}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill{height:32px}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill .block-editor-iframe__scale-container{overflow:hidden}.global-styles-ui-variations_item:not(.is-active):hover .global-styles-ui-variations_item-preview{outline-color:#0000004d}.global-styles-ui-variations_item.is-active .global-styles-ui-variations_item-preview,.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:#1e1e1e;outline-offset:1px;outline-width:var(--wp-admin-border-width-focus)}.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:var(--wp-admin-theme-color)}.global-styles-ui-preview{align-items:center;cursor:pointer;display:flex;justify-content:center;line-height:1}.global-styles-ui-preview__wrapper{display:block;max-width:100%;width:100%}.global-styles-ui-typography-preview{align-items:center;background:#f0f0f0;border-radius:2px;display:flex;justify-content:center;margin-bottom:20px;min-height:100px;overflow:hidden}.global-styles-ui-font-size__item{line-break:anywhere;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.global-styles-ui-font-size__item-value{color:#757575}.global-styles-ui-screen-typography__indicator{align-items:center;border-radius:2px;display:flex!important;font-size:14px;height:24px;justify-content:center;width:24px}.global-styles-ui-block-types-search{margin-bottom:10px;padding:0 16px}.global-styles-ui-screen-typography__font-variants-count{color:#757575}.global-styles-ui-font-families__manage-fonts{justify-content:center}.global-styles-ui-screen .color-block-support-panel{border-top:none;padding-left:0;padding-right:0;padding-top:0;row-gap:12px}.global-styles-ui-header{margin-bottom:0!important}.global-styles-ui-subtitle{font-size:11px!important;font-weight:499!important;margin-bottom:0!important;text-transform:uppercase}.global-styles-ui-section-title{color:#2f2f2f;font-weight:600;line-height:1.2;margin:0;padding:16px 16px 0}.global-styles-ui-icon-with-current-color{fill:currentColor}.global-styles-ui__color-indicator-wrapper{flex-shrink:0;height:24px}.global-styles-ui__shadows-panel__options-container,.global-styles-ui__typography-panel__options-container{height:24px}.global-styles-ui__block-preview-panel{border:1px solid #ddd;border-radius:2px;overflow:hidden;position:relative;width:100%}.global-styles-ui__shadow-preview-panel{background-image:repeating-linear-gradient(45deg,#e0e0e0 25%,#0000 0,#0000 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,#0000 0,#0000 75%,#e0e0e0 0,#e0e0e0);background-position:0 0,8px 8px;background-size:16px 16px;border:1px solid #ddd;border-radius:2px;height:144px;overflow:auto}.global-styles-ui__shadow-preview-panel .global-styles-ui__shadow-preview-block{background-color:#fff;border:1px solid #ddd;border-radius:2px;height:60px;width:60%}.global-styles-ui__shadow-editor__dropdown-content{width:280px}.global-styles-ui__shadow-editor-panel{margin-bottom:4px}.global-styles-ui__shadow-editor__dropdown{position:relative;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle{border-radius:inherit;height:auto;padding-bottom:8px;padding-top:8px;text-align:left;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.global-styles-ui__shadow-editor__remove-button{opacity:0;position:absolute;right:8px;top:8px}.global-styles-ui__shadow-editor__remove-button.global-styles-ui__shadow-editor__remove-button{border:none}.global-styles-ui__shadow-editor__dropdown-toggle:hover+.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__shadow-editor__remove-button:focus,.global-styles-ui__shadow-editor__remove-button:hover{opacity:1}@media (hover:none){.global-styles-ui__shadow-editor__remove-button{opacity:1}}.global-styles-ui-screen-css{display:flex;flex:1 1 auto;flex-direction:column;margin:16px}.global-styles-ui-screen-css .components-v-stack{flex:1 1 auto}.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input,.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field{display:flex;flex:1 1 auto;flex-direction:column}.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field .components-textarea-control__input{direction:ltr;flex:1 1 auto}.global-styles-ui-screen-css-help-link{display:inline-block;margin-top:8px}.global-styles-ui-screen-variations{border-top:1px solid #ddd;margin-top:16px}.global-styles-ui-screen-variations>*{margin:24px 16px}.global-styles-ui-sidebar__navigator-provider{height:100%}.global-styles-ui-sidebar__navigator-screen{display:flex;flex-direction:column;height:100%}.global-styles-ui-sidebar__navigator-screen .single-column{grid-column:span 1}.global-styles-ui-screen-root.global-styles-ui-screen-root,.global-styles-ui-screen-style-variations.global-styles-ui-screen-style-variations{background:unset;color:inherit}.global-styles-ui-sidebar__panel .block-editor-block-icon svg{fill:currentColor}.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile,.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile .global-styles-ui-screen-root__active-style-tile-preview{border-radius:2px}.global-styles-ui-screen-root__active-style-tile-preview{clip-path:border-box}.global-styles-ui-color-palette-panel,.global-styles-ui-gradient-palette-panel{padding:16px}.font-library-page__tablist{border-bottom:1px solid #f0f0f0;padding:0 24px}.font-library-page__tab-panel{flex-grow:1;max-height:calc(100% - 110px);overflow:auto}.admin-ui-page:has(.font-library__footer) .font-library-page__tab-panel{max-height:calc(100% - 198px)}')),document.head.appendChild(t)}var{Tabs:bs}=Jn(Uu.privateApis),{useGlobalStyles:Yg}=Jn(Hu.privateApis);function qg(){let{records:t=[]}=(0,ws.useEntityRecords)("root","fontCollection",{_fields:"slug,name,description"}),[e,r]=(0,Yu.useState)("installed-fonts"),{base:o,user:s,setUser:a,isReady:n}=Yg(),l=(0,Wu.useSelect)(f=>f(ws.store).canUser("create",{kind:"postType",name:"wp_font_family"}),[]);if(!n)return null;let m=[{id:"installed-fonts",title:(0,xo.__)("Library")}];return l&&(m.push({id:"upload-fonts",title:(0,xo.__)("Upload")}),m.push(...(t||[]).map(({slug:f,name:c})=>({id:f,title:t&&t.length===1&&f==="google-fonts"?(0,xo.__)("Install Fonts"):c})))),React.createElement(Ns,{title:(0,xo.__)("Fonts")},React.createElement(bs,{selectedTabId:e,onSelect:f=>r(f)},React.createElement("div",{className:"font-library-page__tablist"},React.createElement(bs.TabList,null,m.map(({id:f,title:c})=>React.createElement(bs.Tab,{key:f,tabId:f},c)))),m.map(({id:f})=>React.createElement(bs.TabPanel,{key:f,tabId:f,focusable:!1,className:"font-library-page__tab-panel"},React.createElement(Kn,{value:s,baseValue:o,onChange:a,activeTab:f})))))}function Zg(){return React.createElement(qg,null)}var Xg=Zg;export{Xg as stage};
+ src: url("${t}") format("${o}");
+}`,globalThis.document.head.appendChild(s),s}var Jd=[0,1,0,0],Qd=[79,84,84,79],$d=[119,79,70,70],ep=[119,79,70,50];function fs(e,t){if(e.length===t.length){for(let r=0;r(globalThis.document&&!this.options.skipStyleSheet&&await Kd(this.name,e,this.options),this.loadFont(e)))()}async loadFont(e,t){fetch(e).then(r=>rp(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,t||e)).catch(r=>{let o=new us("error",r,`Failed to load font at ${t||e}`);this.dispatch(o),this.onerror&&this.onerror(o)})}async fromDataBuffer(e,t){this.fontData=new DataView(e);let r=tp(this.fontData);if(!r)throw new Error(`${t} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(r);let o=new us("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(e){return Zd().then(t=>(e==="SFNT"&&(this.opentype=new zd(this,this.fontData,t)),e==="WOFF"&&(this.opentype=new Md(this,this.fontData,t)),e==="WOFF2"&&(this.opentype=new Ud(this,this.fontData,t)),this.opentype))}getGlyphId(e){return this.opentype.tables.cmap.getGlyphId(e)}reverse(e){return this.opentype.tables.cmap.reverse(e)}supports(e){return this.getGlyphId(e)!==0}supportsVariation(e){return this.opentype.tables.cmap.supportsVariation(e)!==!1}measureText(e,t=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let r=document.createElement("div");r.textContent=e,r.style.fontFamily=this.name,r.style.fontSize=`${t}px`,r.style.color="transparent",r.style.background="transparent",r.style.top="0",r.style.left="0",r.style.position="absolute",document.body.appendChild(r);let o=r.getBoundingClientRect();document.body.removeChild(r);let s=this.opentype.tables["OS/2"];return o.fontSize=t,o.ascender=s.sTypoAscender,o.descender=s.sTypoDescender,o}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);let e=new us("unload",{font:this});this.dispatch(e),this.onunload&&this.onunload(e)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);let e=new us("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}};globalThis.Font=ds;var qt=class extends Be{constructor(e,t,r){super(e),this.plaformID=t,this.encodingID=r}},op=class extends qt{constructor(e,t,r){super(e,t,r),this.format=0,this.length=e.uint16,this.language=e.uint16,this.glyphIdArray=[...new Array(256)].map(o=>e.uint8)}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=e&&e<=255}reverse(e){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}},sp=class extends qt{constructor(e,t,r){super(e,t,r),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map(a=>e.uint16);let o=Math.max(...this.subHeaderKeys),s=e.currentPosition;Z(this,"subHeaders",()=>(e.currentPosition=s,[...new Array(o)].map(a=>new np(e))));let n=s+o*8;Z(this,"glyphIndexArray",()=>(e.currentPosition=n,[...new Array(o)].map(a=>e.uint16)))}supports(e){e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));let t=e&&255,r=e&&65280,o=this.subHeaders[r],s=this.subHeaders[o],n=s.firstCode,a=n+s.entryCount;return n<=t&&t<=a}reverse(e){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(e=!1){return e?this.subHeaders.map(t=>({firstCode:t.firstCode,lastCode:t.lastCode})):this.subHeaders.map(t=>({start:t.firstCode,end:t.lastCode}))}},np=class{constructor(e){this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=e.int16,this.idRangeOffset=e.uint16}},ap=class extends qt{constructor(e,t,r){super(e,t,r),this.format=4,this.length=e.uint16,this.language=e.uint16,this.segCountX2=e.uint16,this.segCount=this.segCountX2/2,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16;let o=e.currentPosition;Z(this,"endCode",()=>e.readBytes(this.segCount,o,16));let s=o+2+this.segCountX2;Z(this,"startCode",()=>e.readBytes(this.segCount,s,16));let n=s+this.segCountX2;Z(this,"idDelta",()=>e.readBytes(this.segCount,n,16,!0));let a=n+this.segCountX2;Z(this,"idRangeOffset",()=>e.readBytes(this.segCount,a,16));let l=a+this.segCountX2,h=this.length-(l-this.tableStart);Z(this,"glyphIdArray",()=>e.readBytes(h,l,16)),Z(this,"segments",()=>this.buildSegments(a,l,e))}buildSegments(e,t,r){let o=(s,n)=>{let a=this.startCode[n],l=this.endCode[n],h=this.idDelta[n],f=this.idRangeOffset[n],c=e+2*n,d=[];if(f===0)for(let m=a+h,g=l+h;m<=g;m++)d.push(m);else for(let m=0,g=l-a;m<=g;m++)r.currentPosition=c+f+m*2,d.push(r.uint16);return{startCode:a,endCode:l,idDelta:h,idRangeOffset:f,glyphIDs:d}};return[...new Array(this.segCount)].map(o)}reverse(e){let t=this.segments.find(o=>o.glyphIDs.includes(e));if(!t)return{};let r=t.startCode+t.glyphIDs.indexOf(e);return{code:r,unicode:String.fromCodePoint(r)}}getGlyphId(e){if(e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||(e&65534)===65534||(e&65535)===65535)return 0;let t=this.segments.find(r=>r.startCode<=e&&e<=r.endCode);return t?t.glyphIDs[e-t.startCode]:0}supports(e){return this.getGlyphId(e)!==0}getSupportedCharCodes(e=!1){return e?this.segments:this.segments.map(t=>({start:t.startCode,end:t.endCode}))}},ip=class extends qt{constructor(e,t,r){super(e,t,r),this.format=6,this.length=e.uint16,this.language=e.uint16,this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.firstCode+this.entryCount-1,Z(this,"glyphIdArray",()=>[...new Array(this.entryCount)].map(s=>e.uint16))}supports(e){if(e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),ethis.firstCode+this.entryCount)return{};let t=e-this.firstCode;return{code:t,unicode:String.fromCodePoint(t)}}reverse(e){let t=this.glyphIdArray.indexOf(e);if(t>-1)return this.firstCode+t}getSupportedCharCodes(e=!1){return e?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}},lp=class extends qt{constructor(e,t,r){super(e,t,r),this.format=8,e.uint16,this.length=e.uint32,this.language=e.uint32,this.is32=[...new Array(8192)].map(s=>e.uint8),this.numGroups=e.uint32,Z(this,"groups",()=>[...new Array(this.numGroups)].map(s=>new up(e)))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),this.groups.findIndex(t=>t.startcharCode<=e&&e<=t.endcharCode)!==-1}reverse(e){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startcharCode,end:t.endcharCode}))}},up=class{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}},fp=class extends qt{constructor(e,t,r){super(e,t,r),this.format=10,e.uint16,this.length=e.uint32,this.language=e.uint32,this.startCharCode=e.uint32,this.numChars=e.uint32,this.endCharCode=this.startCharCode+this.numChars,Z(this,"glyphs",()=>[...new Array(this.numChars)].map(s=>e.uint16))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),ethis.startCharCode+this.numChars?!1:e-this.startCharCode}reverse(e){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(e=!1){return e?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}},cp=class extends qt{constructor(e,t,r){super(e,t,r),this.format=12,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32,Z(this,"groups",()=>[...new Array(this.numGroups)].map(s=>new dp(e)))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||(e&65534)===65534||(e&65535)===65535?0:this.groups.findIndex(t=>t.startCharCode<=e&&e<=t.endCharCode)!==-1}reverse(e){for(let t of this.groups){let r=t.startGlyphID;if(r>e)continue;if(r===e)return t.startCharCode;if(r+(t.endCharCode-t.startCharCode)({start:t.startCharCode,end:t.endCharCode}))}},dp=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}},pp=class extends qt{constructor(e,t,r){super(e,t,r),this.format=13,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;let o=[...new Array(this.numGroups)].map(s=>new mp(e));Z(this,"groups",o)}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),this.groups.findIndex(t=>t.startCharCode<=e&&e<=t.endCharCode)!==-1}reverse(e){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startCharCode,end:t.endCharCode}))}},mp=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}},hp=class extends qt{constructor(e,t,r){super(e,t,r),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,Z(this,"varSelectors",()=>[...new Array(this.numVarSelectorRecords)].map(o=>new gp(e)))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(e){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(e){let t=this.varSelector.find(r=>r.varSelector===e);return t||!1}getSupportedVariations(){return this.varSelectors.map(e=>e.varSelector)}},gp=class{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}};function yp(e,t,r){let o=e.uint16;return o===0?new op(e,t,r):o===2?new sp(e,t,r):o===4?new ap(e,t,r):o===6?new ip(e,t,r):o===8?new lp(e,t,r):o===10?new fp(e,t,r):o===12?new cp(e,t,r):o===13?new pp(e,t,r):o===14?new hp(e,t,r):{}}var vp=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numTables=r.uint16,this.encodingRecords=[...new Array(this.numTables)].map(o=>new bp(r,this.tableStart))}getSubTable(e){return this.encodingRecords[e].table}getSupportedEncodings(){return this.encodingRecords.map(e=>({platformID:e.platformID,encodingId:e.encodingID}))}getSupportedCharCodes(e,t){let r=this.encodingRecords.findIndex(s=>s.platformID===e&&s.encodingID===t);return r===-1?!1:this.getSubTable(r).getSupportedCharCodes()}reverse(e){for(let t=0;t{let s=this.getSubTable(o);return s.getGlyphId?(t=s.getGlyphId(e),t!==0):!1}),t}supports(e){return this.encodingRecords.some((t,r)=>{let o=this.getSubTable(r);return o.supports&&o.supports(e)!==!1})}supportsVariation(e){return this.encodingRecords.some((t,r)=>{let o=this.getSubTable(r);return o.supportsVariation&&o.supportsVariation(e)!==!1})}},bp=class{constructor(e,t){let r=this.platformID=e.uint16,o=this.encodingID=e.uint16,s=this.offset=e.Offset32;Z(this,"table",()=>(e.currentPosition=t+s,yp(e,r,o)))}},wp=Object.freeze({__proto__:null,cmap:vp}),xp=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.load({majorVersion:r.uint16,minorVersion:r.uint16,fontRevision:r.fixed,checkSumAdjustment:r.uint32,magicNumber:r.uint32,flags:r.flags(16),unitsPerEm:r.uint16,created:r.longdatetime,modified:r.longdatetime,xMin:r.int16,yMin:r.int16,xMax:r.int16,yMax:r.int16,macStyle:r.flags(16),lowestRecPPEM:r.uint16,fontDirectionHint:r.uint16,indexToLocFormat:r.uint16,glyphDataFormat:r.uint16})}},Sp=Object.freeze({__proto__:null,head:xp}),Cp=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.ascender=r.fword,this.descender=r.fword,this.lineGap=r.fword,this.advanceWidthMax=r.ufword,this.minLeftSideBearing=r.fword,this.minRightSideBearing=r.fword,this.xMaxExtent=r.fword,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,r.int16,r.int16,r.int16,r.int16,this.metricDataFormat=r.int16,this.numberOfHMetrics=r.uint16,r.verifyLength()}},_p=Object.freeze({__proto__:null,hhea:Cp}),Fp=class extends pe{constructor(e,t,r){let{p:o}=super(e,t),s=r.hhea.numberOfHMetrics,n=r.maxp.numGlyphs,a=o.currentPosition;if(Z(this,"hMetrics",()=>(o.currentPosition=a,[...new Array(s)].map(l=>new kp(o.uint16,o.int16)))),s(o.currentPosition=l,[...new Array(n-s)].map(h=>o.int16)))}}},kp=class{constructor(e,t){this.advanceWidth=e,this.lsb=t}},Op=Object.freeze({__proto__:null,hmtx:Fp}),Tp=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.version=r.legacyFixed,this.numGlyphs=r.uint16,this.version===1&&(this.maxPoints=r.uint16,this.maxContours=r.uint16,this.maxCompositePoints=r.uint16,this.maxCompositeContours=r.uint16,this.maxZones=r.uint16,this.maxTwilightPoints=r.uint16,this.maxStorage=r.uint16,this.maxFunctionDefs=r.uint16,this.maxInstructionDefs=r.uint16,this.maxStackElements=r.uint16,this.maxSizeOfInstructions=r.uint16,this.maxComponentElements=r.uint16,this.maxComponentDepth=r.uint16),r.verifyLength()}},Pp=Object.freeze({__proto__:null,maxp:Tp}),Ap=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.format=r.uint16,this.count=r.uint16,this.stringOffset=r.Offset16,this.nameRecords=[...new Array(this.count)].map(o=>new Ep(r,this)),this.format===1&&(this.langTagCount=r.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map(o=>new Rp(r.uint16,r.Offset16))),this.stringStart=this.tableStart+this.stringOffset}get(e){let t=this.nameRecords.find(r=>r.nameID===e);if(t)return t.string}},Rp=class{constructor(e,t){this.length=e,this.offset=t}},Ep=class{constructor(e,t){this.platformID=e.uint16,this.encodingID=e.uint16,this.languageID=e.uint16,this.nameID=e.uint16,this.length=e.uint16,this.offset=e.Offset16,Z(this,"string",()=>(e.currentPosition=t.stringStart+this.offset,Ip(e,this)))}};function Ip(e,t){let{platformID:r,length:o}=t;if(o===0)return"";if(r===0||r===3){let a=[];for(let l=0,h=o/2;lr.uint8),this.ulUnicodeRange1=r.flags(32),this.ulUnicodeRange2=r.flags(32),this.ulUnicodeRange3=r.flags(32),this.ulUnicodeRange4=r.flags(32),this.achVendID=r.tag,this.fsSelection=r.uint16,this.usFirstCharIndex=r.uint16,this.usLastCharIndex=r.uint16,this.sTypoAscender=r.int16,this.sTypoDescender=r.int16,this.sTypoLineGap=r.int16,this.usWinAscent=r.uint16,this.usWinDescent=r.uint16,this.version===0||(this.ulCodePageRange1=r.flags(32),this.ulCodePageRange2=r.flags(32),this.version===1)||(this.sxHeight=r.int16,this.sCapHeight=r.int16,this.usDefaultChar=r.uint16,this.usBreakChar=r.uint16,this.usMaxContext=r.uint16,this.version<=4)||(this.usLowerOpticalPointSize=r.uint16,this.usUpperOpticalPointSize=r.uint16,this.version===5))return r.verifyLength()}},Vp=Object.freeze({__proto__:null,OS2:Bp}),Np=class extends pe{constructor(e,t){let{p:r}=super(e,t);if(this.version=r.legacyFixed,this.italicAngle=r.fixed,this.underlinePosition=r.fword,this.underlineThickness=r.fword,this.isFixedPitch=r.uint32,this.minMemType42=r.uint32,this.maxMemType42=r.uint32,this.minMemType1=r.uint32,this.maxMemType1=r.uint32,this.version===1||this.version===3)return r.verifyLength();if(this.numGlyphs=r.uint16,this.version===2){this.glyphNameIndex=[...new Array(this.numGlyphs)].map(o=>r.uint16),this.namesOffset=r.currentPosition,this.glyphNameOffsets=[1];for(let o=0;or.int8))}getGlyphName(e){if(this.version!==2)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let t=this.glyphNameIndex[e];if(t<258)return lu[t];let r=this.glyphNameOffsets[e],s=this.glyphNameOffsets[e+1]-r-1;return s===0?".notdef.":(this.parser.currentPosition=this.namesOffset+r,this.parser.readBytes(s,this.namesOffset+r,8,!0).map(a=>String.fromCharCode(a)).join(""))}},lu=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","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","grave","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","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"],zp=Object.freeze({__proto__:null,post:Np}),Dp=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.horizAxisOffset=r.Offset16,this.vertAxisOffset=r.Offset16,Z(this,"horizAxis",()=>new En({offset:e.offset+this.horizAxisOffset},t)),Z(this,"vertAxis",()=>new En({offset:e.offset+this.vertAxisOffset},t)),this.majorVersion===1&&this.minorVersion===1&&(this.itemVarStoreOffset=r.Offset32,Z(this,"itemVarStore",()=>new En({offset:e.offset+this.itemVarStoreOffset},t)))}},En=class extends pe{constructor(e,t){let{p:r}=super(e,t,"AxisTable");this.baseTagListOffset=r.Offset16,this.baseScriptListOffset=r.Offset16,Z(this,"baseTagList",()=>new Mp({offset:e.offset+this.baseTagListOffset},t)),Z(this,"baseScriptList",()=>new jp({offset:e.offset+this.baseScriptListOffset},t))}},Mp=class extends pe{constructor(e,t){let{p:r}=super(e,t,"BaseTagListTable");this.baseTagCount=r.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map(o=>r.tag)}},jp=class extends pe{constructor(e,t){let{p:r}=super(e,t,"BaseScriptListTable");this.baseScriptCount=r.uint16;let o=r.currentPosition;Z(this,"baseScriptRecords",()=>(r.currentPosition=o,[...new Array(this.baseScriptCount)].map(s=>new Gp(this.start,r))))}},Gp=class{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,Z(this,"baseScriptTable",()=>(t.currentPosition=e+this.baseScriptOffset,new Up(t)))}},Up=class{constructor(e){this.start=e.currentPosition,this.baseValuesOffset=e.Offset16,this.defaultMinMaxOffset=e.Offset16,this.baseLangSysCount=e.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map(t=>new Wp(this.start,e)),Z(this,"baseValues",()=>(e.currentPosition=this.start+this.baseValuesOffset,new Hp(e))),Z(this,"defaultMinMax",()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new gu(e)))}},Wp=class{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,Z(this,"minMax",()=>(t.currentPosition=e+this.minMaxOffset,new gu(t)))}},Hp=class{constructor(e){this.parser=e,this.start=e.currentPosition,this.defaultBaselineIndex=e.uint16,this.baseCoordCount=e.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map(t=>e.Offset16)}getTable(e){return this.parser.currentPosition=this.start+this.baseCoords[e],new Yp(this.parser)}},gu=class{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;let t=e.currentPosition;Z(this,"featMinMaxRecords",()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map(r=>new qp(e))))}},qp=class{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}},Yp=class{constructor(e){this.baseCoordFormat=e.uint16,this.coordinate=e.int16,this.baseCoordFormat===2&&(this.referenceGlyph=e.uint16,this.baseCoordPoint=e.uint16),this.baseCoordFormat===3&&(this.deviceTable=e.Offset16)}},Zp=Object.freeze({__proto__:null,BASE:Dp}),uu=class{constructor(e){this.classFormat=e.uint16,this.classFormat===1&&(this.startGlyphID=e.uint16,this.glyphCount=e.uint16,this.classValueArray=[...new Array(this.glyphCount)].map(t=>e.uint16)),this.classFormat===2&&(this.classRangeCount=e.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map(t=>new Xp(e)))}},Xp=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}},bo=class extends Be{constructor(e){super(e),this.coverageFormat=e.uint16,this.coverageFormat===1&&(this.glyphCount=e.uint16,this.glyphArray=[...new Array(this.glyphCount)].map(t=>e.uint16)),this.coverageFormat===2&&(this.rangeCount=e.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map(t=>new Kp(e)))}},Kp=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}},Jp=class{constructor(e,t){this.table=e,this.parser=t,this.start=t.currentPosition,this.format=t.uint16,this.variationRegionListOffset=t.Offset32,this.itemVariationDataCount=t.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map(r=>t.Offset32)}},Qp=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.glyphClassDefOffset=r.Offset16,Z(this,"glyphClassDefs",()=>{if(this.glyphClassDefOffset!==0)return r.currentPosition=this.tableStart+this.glyphClassDefOffset,new uu(r)}),this.attachListOffset=r.Offset16,Z(this,"attachList",()=>{if(this.attachListOffset!==0)return r.currentPosition=this.tableStart+this.attachListOffset,new $p(r)}),this.ligCaretListOffset=r.Offset16,Z(this,"ligCaretList",()=>{if(this.ligCaretListOffset!==0)return r.currentPosition=this.tableStart+this.ligCaretListOffset,new tm(r)}),this.markAttachClassDefOffset=r.Offset16,Z(this,"markAttachClassDef",()=>{if(this.markAttachClassDefOffset!==0)return r.currentPosition=this.tableStart+this.markAttachClassDefOffset,new uu(r)}),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=r.Offset16,Z(this,"markGlyphSetsDef",()=>{if(this.markGlyphSetsDefOffset!==0)return r.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new sm(r)})),this.minorVersion===3&&(this.itemVarStoreOffset=r.Offset32,Z(this,"itemVarStore",()=>{if(this.itemVarStoreOffset!==0)return r.currentPosition=this.tableStart+this.itemVarStoreOffset,new Jp(r)}))}},$p=class extends Be{constructor(e){super(e),this.coverageOffset=e.Offset16,this.glyphCount=e.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map(t=>e.Offset16)}getPoint(e){return this.parser.currentPosition=this.start+this.attachPointOffsets[e],new em(this.parser)}},em=class{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map(t=>e.uint16)}},tm=class extends Be{constructor(e){super(e),this.coverageOffset=e.Offset16,Z(this,"coverage",()=>(e.currentPosition=this.start+this.coverageOffset,new bo(e))),this.ligGlyphCount=e.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map(t=>e.Offset16)}getLigGlyph(e){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[e],new rm(this.parser)}},rm=class extends Be{constructor(e){super(e),this.caretCount=e.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map(t=>e.Offset16)}getCaretValue(e){return this.parser.currentPosition=this.start+this.caretValueOffsets[e],new om(this.parser)}},om=class{constructor(e){this.caretValueFormat=e.uint16,this.caretValueFormat===1&&(this.coordinate=e.int16),this.caretValueFormat===2&&(this.caretValuePointIndex=e.uint16),this.caretValueFormat===3&&(this.coordinate=e.int16,this.deviceOffset=e.Offset16)}},sm=class extends Be{constructor(e){super(e),this.markGlyphSetTableFormat=e.uint16,this.markGlyphSetCount=e.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map(t=>e.Offset32)}getMarkGlyphSet(e){return this.parser.currentPosition=this.start+this.coverageOffsets[e],new bo(this.parser)}},nm=Object.freeze({__proto__:null,GDEF:Qp}),fu=class extends Be{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map(t=>new am(e))}},am=class{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}},im=class extends Be{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map(t=>new lm(e))}},lm=class{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}},cu=class{constructor(e){this.lookupOrder=e.Offset16,this.requiredFeatureIndex=e.uint16,this.featureIndexCount=e.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map(t=>e.uint16)}},du=class extends Be{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map(t=>new um(e))}},um=class{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}},fm=class extends Be{constructor(e){super(e),this.featureParams=e.Offset16,this.lookupIndexCount=e.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map(t=>e.uint16)}getFeatureParams(){if(this.featureParams>0){let e=this.parser;e.currentPosition=this.start+this.featureParams;let t=this.featureTag;if(t==="size")return new dm(e);if(t.startsWith("cc"))return new cm(e);if(t.startsWith("ss"))return new pm(e)}}},cm=class{constructor(e){this.format=e.uint16,this.featUiLabelNameId=e.uint16,this.featUiTooltipTextNameId=e.uint16,this.sampleTextNameId=e.uint16,this.numNamedParameters=e.uint16,this.firstParamUiLabelNameId=e.uint16,this.charCount=e.uint16,this.character=[...new Array(this.charCount)].map(t=>e.uint24)}},dm=class{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}},pm=class{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}};function yu(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}var Fr=class extends Be{constructor(e){super(e),this.substFormat=e.uint16,this.coverageOffset=e.Offset16}getCoverageTable(){let e=this.parser;return e.currentPosition=this.start+this.coverageOffset,new bo(e)}},Ln=class{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},mm=class extends Fr{constructor(e){super(e),this.deltaGlyphID=e.int16}},hm=class extends Fr{constructor(e){super(e),this.sequenceCount=e.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map(t=>e.Offset16)}getSequence(e){let t=this.parser;return t.currentPosition=this.start+this.sequenceOffsets[e],new gm(t)}},gm=class{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},ym=class extends Fr{constructor(e){super(e),this.alternateSetCount=e.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map(t=>e.Offset16)}getAlternateSet(e){let t=this.parser;return t.currentPosition=this.start+this.alternateSetOffsets[e],new vm(t)}},vm=class{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},bm=class extends Fr{constructor(e){super(e),this.ligatureSetCount=e.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map(t=>e.Offset16)}getLigatureSet(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureSetOffsets[e],new wm(t)}},wm=class extends Be{constructor(e){super(e),this.ligatureCount=e.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map(t=>e.Offset16)}getLigature(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureOffsets[e],new xm(t)}},xm=class{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map(t=>e.uint16)}},Sm=class extends Fr{constructor(e){super(e),this.substFormat===1&&(this.subRuleSetCount=e.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map(t=>e.Offset16)),this.substFormat===2&&(this.classDefOffset=e.Offset16,this.subClassSetCount=e.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map(t=>e.Offset16)),this.substFormat===3&&(yu(this),this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map(t=>e.Offset16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new Ln(e)))}getSubRuleSet(e){if(this.substFormat!==1)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.subRuleSetOffsets[e],new Cm(t)}getSubClassSet(e){if(this.substFormat!==2)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.subClassSetOffsets[e],new _m(t)}getCoverageTable(e){if(this.substFormat!==3&&!e)return super.getCoverageTable();if(!e)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let t=this.parser;return t.currentPosition=this.start+this.coverageOffsets[e],new bo(t)}},Cm=class extends Be{constructor(e){super(e),this.subRuleCount=e.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map(t=>e.Offset16)}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.subRuleOffsets[e],new vu(t)}},vu=class{constructor(e){this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map(t=>e.uint16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new Ln(e))}},_m=class extends Be{constructor(e){super(e),this.subClassRuleCount=e.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map(t=>e.Offset16)}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.subClassRuleOffsets[e],new Fm(t)}},Fm=class extends vu{constructor(e){super(e)}},km=class extends Fr{constructor(e){super(e),this.substFormat===1&&(this.chainSubRuleSetCount=e.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map(t=>e.Offset16)),this.substFormat===2&&(this.backtrackClassDefOffset=e.Offset16,this.inputClassDefOffset=e.Offset16,this.lookaheadClassDefOffset=e.Offset16,this.chainSubClassSetCount=e.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map(t=>e.Offset16)),this.substFormat===3&&(yu(this),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(t=>e.Offset16),this.inputGlyphCount=e.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map(t=>e.Offset16),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map(t=>e.Offset16),this.seqLookupCount=e.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map(t=>new bu(e)))}getChainSubRuleSet(e){if(this.substFormat!==1)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleSetOffsets[e],new Om(t)}getChainSubClassSet(e){if(this.substFormat!==2)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubClassSetOffsets[e],new Pm(t)}getCoverageFromOffset(e){if(this.substFormat!==3)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let t=this.parser;return t.currentPosition=this.start+e,new bo(t)}},Om=class extends Be{constructor(e){super(e),this.chainSubRuleCount=e.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map(t=>e.Offset16)}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new Tm(t)}},Tm=class{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(t=>e.uint16),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(t=>e.uint16),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(t=>e.uint16),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map(t=>new Ln(e))}},Pm=class extends Be{constructor(e){super(e),this.chainSubClassRuleCount=e.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map(t=>e.Offset16)}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new Am(t)}},Am=class{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(t=>e.uint16),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(t=>e.uint16),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(t=>e.uint16),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new bu(e))}},bu=class extends Be{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},Rm=class extends Be{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}},Em=class extends Fr{constructor(e){super(e),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(t=>e.Offset16),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map(t=>e.Offset16),this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},Im={buildSubtable:function(e,t){let r=new[void 0,mm,hm,ym,bm,Sm,km,Rm,Em][e](t);return r.type=e,r}},Yt=class extends Be{constructor(e){super(e)}},Lm=class extends Yt{constructor(e){super(e),console.log("lookup type 1")}},Bm=class extends Yt{constructor(e){super(e),console.log("lookup type 2")}},Vm=class extends Yt{constructor(e){super(e),console.log("lookup type 3")}},Nm=class extends Yt{constructor(e){super(e),console.log("lookup type 4")}},zm=class extends Yt{constructor(e){super(e),console.log("lookup type 5")}},Dm=class extends Yt{constructor(e){super(e),console.log("lookup type 6")}},Mm=class extends Yt{constructor(e){super(e),console.log("lookup type 7")}},jm=class extends Yt{constructor(e){super(e),console.log("lookup type 8")}},Gm=class extends Yt{constructor(e){super(e),console.log("lookup type 9")}},Um={buildSubtable:function(e,t){let r=new[void 0,Lm,Bm,Vm,Nm,zm,Dm,Mm,jm,Gm][e](t);return r.type=e,r}},pu=class extends Be{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map(t=>e.Offset16)}},Wm=class extends Be{constructor(e,t){super(e),this.ctType=t,this.lookupType=e.uint16,this.lookupFlag=e.uint16,this.subTableCount=e.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map(r=>e.Offset16),this.markFilteringSet=e.uint16}get rightToLeft(){return this.lookupFlag&!0}get ignoreBaseGlyphs(){return this.lookupFlag&!0}get ignoreLigatures(){return this.lookupFlag&!0}get ignoreMarks(){return this.lookupFlag&!0}get useMarkFilteringSet(){return this.lookupFlag&!0}get markAttachmentType(){return this.lookupFlag&!0}getSubTable(e){let t=this.ctType==="GSUB"?Im:Um;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}},wu=class extends pe{constructor(e,t,r){let{p:o,tableStart:s}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.scriptListOffset=o.Offset16,this.featureListOffset=o.Offset16,this.lookupListOffset=o.Offset16,this.majorVersion===1&&this.minorVersion===1&&(this.featureVariationsOffset=o.Offset32);let n=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);Z(this,"scriptList",()=>n?fu.EMPTY:(o.currentPosition=s+this.scriptListOffset,new fu(o))),Z(this,"featureList",()=>n?du.EMPTY:(o.currentPosition=s+this.featureListOffset,new du(o))),Z(this,"lookupList",()=>n?pu.EMPTY:(o.currentPosition=s+this.lookupListOffset,new pu(o))),this.featureVariationsOffset&&Z(this,"featureVariations",()=>n?FeatureVariations.EMPTY:(o.currentPosition=s+this.featureVariationsOffset,new FeatureVariations(o)))}getSupportedScripts(){return this.scriptList.scriptRecords.map(e=>e.scriptTag)}getScriptTable(e){let t=this.scriptList.scriptRecords.find(o=>o.scriptTag===e);this.parser.currentPosition=this.scriptList.start+t.scriptOffset;let r=new im(this.parser);return r.scriptTag=e,r}ensureScriptTable(e){return typeof e=="string"?this.getScriptTable(e):e}getSupportedLangSys(e){e=this.ensureScriptTable(e);let t=e.defaultLangSys!==0,r=e.langSysRecords.map(o=>o.langSysTag);return t&&r.unshift("dflt"),r}getDefaultLangSysTable(e){e=this.ensureScriptTable(e);let t=e.defaultLangSys;if(t!==0){this.parser.currentPosition=e.start+t;let r=new cu(this.parser);return r.langSysTag="",r.defaultForScript=e.scriptTag,r}}getLangSysTable(e,t="dflt"){if(t==="dflt")return this.getDefaultLangSysTable(e);e=this.ensureScriptTable(e);let r=e.langSysRecords.find(s=>s.langSysTag===t);this.parser.currentPosition=e.start+r.langSysOffset;let o=new cu(this.parser);return o.langSysTag=t,o}getFeatures(e){return e.featureIndices.map(t=>this.getFeature(t))}getFeature(e){let t;if(parseInt(e)==e?t=this.featureList.featureRecords[e]:t=this.featureList.featureRecords.find(o=>o.featureTag===e),!t)return;this.parser.currentPosition=this.featureList.start+t.featureOffset;let r=new fm(this.parser);return r.featureTag=t.featureTag,r}getLookups(e){return e.lookupListIndices.map(t=>this.getLookup(t))}getLookup(e,t){let r=this.lookupList.lookups[e];return this.parser.currentPosition=this.lookupList.start+r,new Wm(this.parser,t)}},Hm=class extends wu{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}},qm=Object.freeze({__proto__:null,GSUB:Hm}),Ym=class extends wu{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}},Zm=Object.freeze({__proto__:null,GPOS:Ym}),Xm=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.offsetToSVGDocumentList=r.Offset32,r.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new Km(r)}},Km=class extends Be{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map(t=>new Jm(e))}getDocument(e){let t=this.documentRecords[e];if(!t)return"";let r=this.start+t.svgDocOffset;return this.parser.currentPosition=r,this.parser.readBytes(t.svgDocLength)}getDocumentForGlyph(e){let t=this.documentRecords.findIndex(r=>r.startGlyphID<=e&&e<=r.endGlyphID);return t===-1?"":this.getDocument(t)}},Jm=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}},Qm=Object.freeze({__proto__:null,SVG:Xm}),$m=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.axesArrayOffset=r.Offset16,r.uint16,this.axisCount=r.uint16,this.axisSize=r.uint16,this.instanceCount=r.uint16,this.instanceSize=r.uint16;let o=this.tableStart+this.axesArrayOffset;Z(this,"axes",()=>(r.currentPosition=o,[...new Array(this.axisCount)].map(n=>new eh(r))));let s=o+this.axisCount*this.axisSize;Z(this,"instances",()=>{let n=[];for(let a=0;ae.tag)}getAxis(e){return this.axes.find(t=>t.tag===e)}},eh=class{constructor(e){this.tag=e.tag,this.minValue=e.fixed,this.defaultValue=e.fixed,this.maxValue=e.fixed,this.flags=e.flags(16),this.axisNameID=e.uint16}},th=class{constructor(e,t,r){let o=e.currentPosition;this.subfamilyNameID=e.uint16,e.uint16,this.coordinates=[...new Array(t)].map(s=>e.fixed),e.currentPosition-o[...new Array(o)].map(s=>r.fword))}},sh=Object.freeze({__proto__:null,cvt:oh}),nh=class extends pe{constructor(e,t){let{p:r}=super(e,t);Z(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},ah=Object.freeze({__proto__:null,fpgm:nh}),ih=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRanges=r.uint16,Z(this,"gaspRanges",()=>[...new Array(this.numRanges)].map(s=>new lh(r)))}},lh=class{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}},uh=Object.freeze({__proto__:null,gasp:ih}),fh=class extends pe{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}},ch=Object.freeze({__proto__:null,glyf:fh}),dh=class extends pe{constructor(e,t,r){let{p:o}=super(e,t),s=r.maxp.numGlyphs+1;r.head.indexToLocFormat===0?(this.x2=!0,Z(this,"offsets",()=>[...new Array(s)].map(n=>o.Offset16))):Z(this,"offsets",()=>[...new Array(s)].map(n=>o.Offset32))}getGlyphDataOffsetAndLength(e){let t=this.offsets[e]*this.x2?2:1,r=this.offsets[e+1]*this.x2?2:1;return{offset:t,length:r-t}}},ph=Object.freeze({__proto__:null,loca:dh}),mh=class extends pe{constructor(e,t){let{p:r}=super(e,t);Z(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},hh=Object.freeze({__proto__:null,prep:mh}),gh=class extends pe{constructor(e,t){let{p:r}=super(e,t);Z(this,"data",()=>r.readBytes())}},yh=Object.freeze({__proto__:null,CFF:gh}),vh=class extends pe{constructor(e,t){let{p:r}=super(e,t);Z(this,"data",()=>r.readBytes())}},bh=Object.freeze({__proto__:null,CFF2:vh}),wh=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.defaultVertOriginY=r.int16,this.numVertOriginYMetrics=r.uint16,Z(this,"vertORiginYMetrics",()=>[...new Array(this.numVertOriginYMetrics)].map(o=>new xh(r)))}},xh=class{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}},Sh=Object.freeze({__proto__:null,VORG:wh}),Ch=class{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new cs(e),this.vert=new cs(e),this.startGlyphIndex=e.uint16,this.endGlyphIndex=e.uint16,this.ppemX=e.uint8,this.ppemY=e.uint8,this.bitDepth=e.uint8,this.flags=e.int8}},_h=class{constructor(e){this.hori=new cs(e),this.vert=new cs(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}},cs=class{constructor(e){this.ascender=e.int8,this.descender=e.int8,this.widthMax=e.uint8,this.caretSlopeNumerator=e.int8,this.caretSlopeDenominator=e.int8,this.caretOffset=e.int8,this.minOriginSB=e.int8,this.minAdvanceSB=e.int8,this.maxBeforeBL=e.int8,this.minAfterBL=e.int8,this.pad1=e.int8,this.pad2=e.int8}},xu=class extends pe{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.numSizes=o.uint32,Z(this,"bitMapSizes",()=>[...new Array(this.numSizes)].map(s=>new Ch(o)))}},Fh=Object.freeze({__proto__:null,EBLC:xu}),Su=class extends pe{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16}},kh=Object.freeze({__proto__:null,EBDT:Su}),Oh=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,Z(this,"bitmapScales",()=>[...new Array(this.numSizes)].map(o=>new _h(r)))}},Th=Object.freeze({__proto__:null,EBSC:Oh}),Ph=class extends xu{constructor(e,t){super(e,t,"CBLC")}},Ah=Object.freeze({__proto__:null,CBLC:Ph}),Rh=class extends Su{constructor(e,t){super(e,t,"CBDT")}},Eh=Object.freeze({__proto__:null,CBDT:Rh}),Ih=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.flags=r.flags(16),this.numStrikes=r.uint32,Z(this,"strikeOffsets",()=>[...new Array(this.numStrikes)].map(o=>r.Offset32))}},Lh=Object.freeze({__proto__:null,sbix:Ih}),Bh=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numBaseGlyphRecords=r.uint16,this.baseGlyphRecordsOffset=r.Offset32,this.layerRecordsOffset=r.Offset32,this.numLayerRecords=r.uint16}getBaseGlyphRecord(e){let t=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=t;let r=new In(this.parser),o=r.gID,s=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=s;let n=new In(this.parser),a=n.gID;if(o===e)return r;if(a===e)return n;for(;t!==s;){let l=t+(s-t)/12;this.parser.currentPosition=l;let h=new In(this.parser),f=h.gID;if(f===e)return h;f>e?s=l:fnew Vh(p))}},In=class{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}},Vh=class{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}},Nh=Object.freeze({__proto__:null,COLR:Bh}),zh=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numPaletteEntries=r.uint16;let o=this.numPalettes=r.uint16;this.numColorRecords=r.uint16,this.offsetFirstColorRecord=r.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map(s=>r.uint16),Z(this,"colorRecords",()=>(r.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map(s=>new Dh(r)))),this.version===1&&(this.offsetPaletteTypeArray=r.Offset32,this.offsetPaletteLabelArray=r.Offset32,this.offsetPaletteEntryLabelArray=r.Offset32,Z(this,"paletteTypeArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new Mh(r,o))),Z(this,"paletteLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new jh(r,o))),Z(this,"paletteEntryLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new Gh(r,o))))}},Dh=class{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}},Mh=class{constructor(e,t){this.paletteTypes=[...new Array(t)].map(r=>e.uint32)}},jh=class{constructor(e,t){this.paletteLabels=[...new Array(t)].map(r=>e.uint16)}},Gh=class{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map(r=>e.uint16)}},Uh=Object.freeze({__proto__:null,CPAL:zh}),Wh=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint32,this.numSignatures=r.uint16,this.flags=r.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map(o=>new Hh(r))}getData(e){let t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new qh(this.parser)}},Hh=class{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}},qh=class{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}},Yh=Object.freeze({__proto__:null,DSIG:Wh}),Zh=class extends pe{constructor(e,t,r){let{p:o}=super(e,t),s=r.hmtx.numGlyphs;this.version=o.uint16,this.numRecords=o.int16,this.sizeDeviceRecord=o.int32,this.records=[...new Array(numRecords)].map(n=>new Xh(o,s))}},Xh=class{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}},Kh=Object.freeze({__proto__:null,hdmx:Zh}),Jh=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.nTables=r.uint16,Z(this,"tables",()=>{let o=this.tableStart+4,s=[];for(let n=0;n[...new Array(this.nPairs)].map(t=>new $h(e)))),this.format===2&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}},$h=class{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}},eg=Object.freeze({__proto__:null,kern:Jh}),tg=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numGlyphs=r.uint16,this.yPels=r.readBytes(this.numGlyphs)}},rg=Object.freeze({__proto__:null,LTSH:tg}),og=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.mergeClassCount=r.uint16,this.mergeDataOffset=r.Offset16,this.classDefCount=r.uint16,this.offsetToClassDefOffsets=r.Offset16,Z(this,"mergeEntryMatrix",()=>[...new Array(this.mergeClassCount)].map(o=>r.readBytes(this.mergeClassCount))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},sg=Object.freeze({__proto__:null,MERG:og}),ng=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint32,this.flags=r.uint32,r.uint32,this.dataMapsCount=r.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map(o=>new ag(this.tableStart,r))}},ag=class{constructor(e,t){this.tableStart=e,this.parser=t,this.tag=t.tag,this.dataOffset=t.Offset32,this.dataLength=t.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}},ig=Object.freeze({__proto__:null,meta:ng}),lg=class extends pe{constructor(e,t){super(e,t),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},ug=Object.freeze({__proto__:null,PCLT:lg}),fg=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRecs=r.uint16,this.numRatios=r.uint16,this.ratRanges=[...new Array(this.numRatios)].map(o=>new cg(r)),this.offsets=[...new Array(this.numRatios)].map(o=>r.Offset16),this.VDMXGroups=[...new Array(this.numRecs)].map(o=>new dg(r))}},cg=class{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}},dg=class{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map(t=>new pg(e))}},pg=class{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}},mg=Object.freeze({__proto__:null,VDMX:fg}),hg=class extends pe{constructor(e,t){let{p:r}=super(e,t);this.version=r.fixed,this.ascent=this.vertTypoAscender=r.int16,this.descent=this.vertTypoDescender=r.int16,this.lineGap=this.vertTypoLineGap=r.int16,this.advanceHeightMax=r.int16,this.minTopSideBearing=r.int16,this.minBottomSideBearing=r.int16,this.yMaxExtent=r.int16,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.metricDataFormat=r.int16,this.numOfLongVerMetrics=r.uint16,r.verifyLength()}},gg=Object.freeze({__proto__:null,vhea:hg}),yg=class extends pe{constructor(e,t,r){super(e,t);let o=r.vhea.numOfLongVerMetrics,s=r.maxp.numGlyphs,n=p.currentPosition;if(lazy(this,"vMetrics",()=>(p.currentPosition=n,[...new Array(o)].map(a=>new vg(p.uint16,p.int16)))),o(p.currentPosition=a,[...new Array(s-o)].map(l=>p.int16)))}}},vg=class{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}},bg=Object.freeze({__proto__:null,vmtx:yg});var Cu=u(X(),1);var{kebabCase:wg}=ye(Cu.privateApis);function _u(e){let t=e.reduce((r,o)=>(r[o.fontFamily]||(r[o.fontFamily]={name:o.fontFamily,fontFamily:o.fontFamily,slug:wg(o.fontFamily.toLowerCase()),fontFace:[]}),r[o.fontFamily].fontFace.push(o),r),{});return Object.values(t)}var gt=u(D(),1);function xg(){let{installFonts:e}=(0,wo.useContext)(lt),[t,r]=(0,wo.useState)(!1),[o,s]=(0,wo.useState)(null),n=g=>{l(g)},a=g=>{l(g.target.files)},l=async g=>{if(!g)return;s(null),r(!0);let y=new Set,T=[...g],O=!1,_=T.map(async b=>{if(!await f(b))return O=!0,null;if(y.has(b.name))return null;let q=(((b.name??"").split(".")??[]).pop()??"").toLowerCase();return Tn.includes(q)?(y.add(b.name),b):null}),S=(await Promise.all(_)).filter(b=>b!==null);if(S.length>0)h(S);else{let b=O?(0,Yr.__)("Sorry, you are not allowed to upload this file type."):(0,Yr.__)("No fonts found to install.");s({type:"error",message:b}),r(!1)}},h=async g=>{let y=await Promise.all(g.map(async T=>{let O=await d(T);return await tr(O,O.file,"all"),O}));m(y)};async function f(g){let y=new ds("Uploaded Font");try{let T=await c(g);return await y.fromDataBuffer(T,"font"),!0}catch{return!1}}async function c(g){return new Promise((y,T)=>{let O=new window.FileReader;O.readAsArrayBuffer(g),O.onload=()=>y(O.result),O.onerror=T})}let d=async g=>{let y=await c(g),T=new ds("Uploaded Font");T.fromDataBuffer(y,g.name);let _=(await new Promise($=>T.onload=$)).detail.font,{name:S}=_.opentype.tables,b=S.get(16)||S.get(1),P=S.get(2).toLowerCase().includes("italic"),q=_.opentype.tables["OS/2"].usWeightClass||"normal",N=!!_.opentype.tables.fvar&&_.opentype.tables.fvar.axes.find(({tag:$})=>$==="wght"),W=N?`${N.minValue} ${N.maxValue}`:null;return{file:g,fontFamily:b,fontStyle:P?"italic":"normal",fontWeight:W||q}},m=async g=>{let y=_u(g);try{await e(y),s({type:"success",message:(0,Yr.__)("Fonts were installed successfully.")})}catch(T){let O=T;s({type:"error",message:O.message,errors:O?.installationErrors})}r(!1)};return(0,gt.jsxs)("div",{className:"font-library__tabpanel-layout",children:[(0,gt.jsx)(tt.DropZone,{onFilesDrop:n}),(0,gt.jsxs)(tt.__experimentalVStack,{className:"font-library__local-fonts",justify:"start",children:[o&&(0,gt.jsxs)(tt.Notice,{status:o.type,__unstableHTML:!0,onRemove:()=>s(null),children:[o.message,o.errors&&(0,gt.jsx)("ul",{children:o.errors.map((g,y)=>(0,gt.jsx)("li",{children:g},y))})]}),t&&(0,gt.jsx)(tt.FlexItem,{children:(0,gt.jsx)("div",{className:"font-library__upload-area",children:(0,gt.jsx)(tt.ProgressBar,{})})}),!t&&(0,gt.jsx)(tt.FormFileUpload,{accept:Tn.map(g=>`.${g}`).join(","),multiple:!0,onChange:a,render:({openFileDialog:g})=>(0,gt.jsx)(tt.Button,{__next40pxDefaultSize:!0,className:"font-library__upload-area",onClick:g,children:(0,Yr.__)("Upload font")})}),(0,gt.jsx)(tt.__experimentalText,{className:"font-library__upload-area__text",children:(0,Yr.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})}var ps=xg;var ku=u(D(),1),{Tabs:b6}=ye(Bn.privateApis),w6={id:"installed-fonts",title:(0,ms._x)("Library","Font library")},x6={id:"upload-fonts",title:(0,ms._x)("Upload","noun")};var Ou=u(ie(),1),Vn=u(X(),1),Cg=u(ve(),1);var Tu=u(D(),1);var Nn=u(D(),1);var Pu=u(ie(),1),hs=u(X(),1);var Au=u(D(),1);var Dn=u(D(),1);var At=u(ie(),1),Mn=u(X(),1),Rg=u(ve(),1);var Ru=u(it(),1);var Pg=u(D(),1),{useSettingsForBlockElement:J6,TypographyPanel:Q6}=ye(Ru.privateApis);var Ag=u(D(),1);var jn=u(D(),1),iC={text:{description:(0,At.__)("Manage the fonts used on the site."),title:(0,At.__)("Text")},link:{description:(0,At.__)("Manage the fonts and typography used on the links."),title:(0,At.__)("Links")},heading:{description:(0,At.__)("Manage the fonts and typography used on headings."),title:(0,At.__)("Headings")},caption:{description:(0,At.__)("Manage the fonts and typography used on captions."),title:(0,At.__)("Captions")},button:{description:(0,At.__)("Manage the fonts and typography used on buttons."),title:(0,At.__)("Buttons")}};var Bg=u(ie(),1),Vg=u(X(),1),Iu=u(it(),1);var Zr=u(X(),1),Eu=u(ie(),1);var Lg=u(ve(),1);var Eg=u(X(),1),Ig=u(D(),1);var Gn=u(D(),1);var Un=u(D(),1),{useSettingsForBlockElement:CC,ColorPanel:_C}=ye(Iu.privateApis);var Ug=u(ie(),1),Mu=u(X(),1);var Dg=u(pr(),1),Wn=u(X(),1),Mg=u(ie(),1);var ys=u(X(),1);var gs=u(X(),1);var Lu=u(D(),1);function Bu(){let{paletteColors:e}=zr();return e.slice(0,4).map(({slug:t,color:r},o)=>(0,Lu.jsx)("div",{style:{flexGrow:1,height:"100%",background:r}},`${t}-${o}`))}var So=u(D(),1),Ng={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},zg=({label:e,isFocused:t,withHoverView:r})=>(0,So.jsx)(jr,{label:e,isFocused:t,withHoverView:r,children:({key:o})=>(0,So.jsx)(gs.__unstableMotion.div,{variants:Ng,style:{height:"100%",overflow:"hidden"},children:(0,So.jsx)(gs.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,So.jsx)(Bu,{})})},o)}),Vu=zg;var kr=u(D(),1),Nu=["color"];function vs({title:e,gap:t=2}){let r=Uo(Nu);return r?.length<=1?null:(0,kr.jsxs)(ys.__experimentalVStack,{spacing:3,children:[e&&(0,kr.jsx)(St,{level:3,children:e}),(0,kr.jsx)(ys.__experimentalGrid,{gap:t,children:r.map((o,s)=>(0,kr.jsx)(Ur,{variation:o,isPill:!0,properties:Nu,showTooltip:!0,children:()=>(0,kr.jsx)(Vu,{})},s))})]})}var zu=u(D(),1);var jg=u(pr(),1),bs=u(X(),1),Gg=u(ie(),1);var Du=u(D(),1);var Hn=u(D(),1),{Tabs:XC}=ye(Mu.privateApis);var Hg=u(ie(),1),Gu=u(it(),1),qg=u(X(),1);var ju=u(it(),1);var Wg=u(D(),1);var{BackgroundPanel:$C}=ye(ju.privateApis);var qn=u(D(),1),{useHasBackgroundPanel:a3}=ye(Gu.privateApis);var Or=u(X(),1),Yn=u(ie(),1);var Jg=u(ve(),1);var Yg=u(X(),1),Zg=u(ie(),1),Xg=u(D(),1);var Zn=u(D(),1),{Menu:v3}=ye(Or.privateApis);var We=u(X(),1),Co=u(ie(),1);var ws=u(ve(),1);var Xn=u(D(),1),{Menu:I3}=ye(We.privateApis),L3=[{label:(0,Co.__)("Rename"),action:"rename"},{label:(0,Co.__)("Delete"),action:"delete"}],B3=[{label:(0,Co.__)("Reset"),action:"reset"}];var Qg=u(D(),1);var ty=u(ie(),1),Wu=u(it(),1);var Uu=u(it(),1),$g=u(ve(),1);var ey=u(D(),1),{useSettingsForBlockElement:W3,DimensionsPanel:H3}=ye(Uu.privateApis);var Kn=u(D(),1),{useHasDimensionsPanel:Q3,useSettingsForBlockElement:$3}=ye(Wu.privateApis);var Ku=u(X(),1),ny=u(ie(),1);var oy=u(ie(),1),sy=u(X(),1);var Hu=u(wt(),1),qu=u(pt(),1),Ss=u(ve(),1),Yu=u(X(),1),Zu=u(ie(),1);var xs=u(D(),1);function ry({gap:e=2}){let{user:t}=(0,Ss.useContext)(Je),r=t?.styles,s=(0,qu.useSelect)(a=>{let l=a(Hu.store).__experimentalGetCurrentThemeGlobalStylesVariations();return Array.isArray(l)?l:void 0},[])?.filter(a=>!co(a,["color"])&&!co(a,["typography","spacing"])),n=(0,Ss.useMemo)(()=>[...[{title:(0,Zu.__)("Default"),settings:{},styles:{}},...s??[]].map(l=>{let h=l?.styles?.blocks?{...l.styles.blocks}:{};r?.blocks&&Object.keys(r.blocks).forEach(m=>{if(r.blocks?.[m]?.css){let g=h[m]||{},y={css:`${h[m]?.css||""} ${r.blocks?.[m]?.css?.trim()||""}`};h[m]={...g,...y}}});let f=r?.css||l.styles?.css?{css:`${l.styles?.css||""} ${r?.css||""}`}:{},c=Object.keys(h).length>0?{blocks:h}:{},d={...l.styles,...f,...c};return{...l,settings:l.settings??{},styles:d}})],[s,r?.blocks,r?.css]);return!s||s.length<1?null:(0,xs.jsx)(Yu.__experimentalGrid,{columns:2,className:"global-styles-ui-style-variations-container",gap:e,children:n.map((a,l)=>(0,xs.jsx)(Ur,{variation:a,children:h=>(0,xs.jsx)(bn,{label:a?.title,withHoverView:!0,isFocused:h,variation:a})},l))})}var Jn=ry;var Xu=u(D(),1);var Qn=u(D(),1);var ay=u(ie(),1),iy=u(X(),1),Ju=u(it(),1);var $n=u(D(),1),{AdvancedPanel:y_}=ye(Ju.privateApis);var af=u(ie(),1),ta=u(X(),1),ra=u(ve(),1);var ly=u(pt(),1),uy=u(wt(),1),Qu=u(ve(),1);var tf=u(ie(),1),rf=u(X(),1),Cs=u(ef(),1),fy=u(wt(),1),cy=u(pt(),1);var of=u(kn(),1),sf=u(D(),1),S_=3600*1e3*24;var ea=u(X(),1),_o=u(ie(),1);var nf=u(D(),1);var oa=u(D(),1);var sa=u(ie(),1),Zt=u(X(),1);var gy=u(ve(),1);var py=u(X(),1),my=u(ie(),1),hy=u(D(),1);var na=u(D(),1),{Menu:U_}=ye(Zt.privateApis);var cf=u(ie(),1),Mt=u(X(),1);var df=u(ve(),1);var yy=u(it(),1),vy=u(ie(),1);var by=u(D(),1);var wy=u(X(),1),lf=u(ie(),1),xy=u(D(),1);var Fo=u(X(),1),Sy=u(ie(),1),Cy=u(ve(),1),uf=u(D(),1);var Xt=u(X(),1),ff=u(D(),1);var aa=u(D(),1),{Menu:i4}=ye(Mt.privateApis);var la=u(D(),1);var ua=u(D(),1);function Xr(e){return function({value:r,baseValue:o,onChange:s,...n}){return(0,ua.jsx)(fo,{value:r,baseValue:o,onChange:s,children:(0,ua.jsx)(e,{...n})})}}var Oy=Xr(Jn);var Ty=Xr(vs);var Py=Xr(Ko);var Kr=u(D(),1);function fa({value:e,baseValue:t,onChange:r,activeTab:o="installed-fonts"}){let s;switch(o){case"upload-fonts":s=(0,Kr.jsx)(ps,{});break;case"installed-fonts":s=(0,Kr.jsx)(ss,{});break;default:s=(0,Kr.jsx)(as,{slug:o})}return(0,Kr.jsx)(fo,{value:e,baseValue:t,onChange:r,children:(0,Kr.jsx)($o,{children:s})})}var hf=u(Ws()),{unlock:ca}=(0,hf.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/font-list-route");if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='7667192f29']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","7667192f29"),e.appendChild(document.createTextNode('@media (min-width:782px){.font-library-modal.font-library-modal{width:65vw}}.font-library-modal .components-modal__header{border-bottom:none}.font-library-modal .components-modal__content{margin-bottom:90px;padding:0}.font-library-modal .font-library__subtitle{font-size:11px;font-weight:499;text-transform:uppercase}.font-library-modal__tab-panel{height:calc(100% - 50px)}.font-library__tabpanel-layout{display:flex;flex-direction:column;height:100%}.font-library__tabpanel-layout>div{flex-grow:1}.font-library__tabpanel-layout .font-library__loading{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;left:0;padding-top:124px;position:absolute;top:0;width:100%}.font-library__footer,.font-library__tabpanel-layout .components-navigator-screen{padding:24px;width:100%}.font-library__footer{background-color:#fff;border-top:1px solid #ddd;bottom:0;box-sizing:border-box;flex-grow:0!important;flex-shrink:0;height:90px;position:absolute}.font-library__page-selection{font-size:11px;font-weight:499;text-transform:uppercase}@media (min-width:600px){.font-library__page-selection .font-library__page-selection-trigger{font-size:11px!important;font-weight:499}}.font-library__fonts-title{font-size:11px;font-weight:600;margin-bottom:0;margin-top:0;text-transform:uppercase}.font-library__fonts-list{list-style:none;margin-bottom:0;margin-top:0;padding:0}.font-library__fonts-list-item{margin-bottom:0}.font-library__font-card{border:1px solid #ddd;box-sizing:border-box;height:auto!important;margin-top:-1px;padding:16px;width:100%}.font-library__font-card:hover{background-color:#f0f0f0}.font-library__font-card:focus{position:relative}.font-library__font-card .font-library__font-card__name{font-weight:700}.font-library__font-card .font-library__font-card__count{color:#757575}.font-library__font-card .font-library__font-variant_demo-image{display:block;height:24px;width:auto}.font-library__font-card .font-library__font-variant_demo-text{flex-shrink:0;white-space:nowrap}@media not (prefers-reduced-motion){.font-library__font-card .font-library__font-variant_demo-text{transition:opacity .3s ease-in-out}}.font-library-modal__tablist-container{background:#fff;border-bottom:1px solid #ddd;position:sticky;top:0;z-index:1}.font-library__upload-area{align-items:center;display:flex;height:256px!important;justify-content:center;width:100%}button.font-library__upload-area{background-color:#f0f0f0}.font-library__local-fonts{margin:24px auto;width:80%}.font-library__local-fonts .font-library__upload-area__text{color:#757575}.font-library__google-fonts-confirm{align-items:center;display:flex;justify-content:center;margin-top:64px}.font-library__google-fonts-confirm p{line-height:1.4}.font-library__google-fonts-confirm h2{font-size:1.2rem;font-weight:400}.font-library__google-fonts-confirm .components-card{padding:16px;width:400px}.font-library__google-fonts-confirm .components-button{justify-content:center;width:100%}.font-library__select-all{padding:16px 16px 16px 17px}.font-library__select-all .components-checkbox-control__label{padding-left:16px}.global-styles-ui-pagination .components-button.is-tertiary{height:32px;justify-content:center;width:32px}.global-styles-ui-screen-revisions__revisions-list{flex-grow:1;list-style:none;margin:0 16px 16px}.global-styles-ui-screen-revisions__revisions-list li{margin-bottom:0}.global-styles-ui-screen-revisions__revision-item{cursor:var(--wpds-cursor-control,pointer);display:flex;flex-direction:column;position:relative}.global-styles-ui-screen-revisions__revision-item[role=option]:active,.global-styles-ui-screen-revisions__revision-item[role=option]:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.global-styles-ui-screen-revisions__revision-item:hover{background:rgba(var(--wp-admin-theme-color--rgb),.04)}.global-styles-ui-screen-revisions__revision-item:hover .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item:after,.global-styles-ui-screen-revisions__revision-item:before{content:"\\a";display:block;position:absolute}.global-styles-ui-screen-revisions__revision-item:before{background:#ddd;border:4px solid #0000;border-radius:50%;height:8px;left:17px;top:18px;transform:translate(-50%,-50%);width:8px;z-index:1}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]{background:rgba(var(--wp-admin-theme-color--rgb),.04);border-radius:2px;color:var(--wp-admin-theme-color);outline:3px solid #0000;outline-offset:-2px}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]:before{background:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__changes>li,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__meta{color:#1e1e1e}.global-styles-ui-screen-revisions__revision-item:after{border:.5px solid #ddd;height:100%;left:16px;top:0;width:0}.global-styles-ui-screen-revisions__revision-item:first-child:after{top:18px}.global-styles-ui-screen-revisions__revision-item:last-child:after{height:18px}.global-styles-ui-screen-revisions__revision-item-wrapper{display:block;padding:12px 12px 4px 40px}.global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__apply-button.is-primary{align-self:flex-start;margin:4px 12px 12px 40px}.global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__changes,.global-styles-ui-screen-revisions__meta{color:#757575;font-size:12px}.global-styles-ui-screen-revisions__description{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.global-styles-ui-screen-revisions__description .global-styles-ui-screen-revisions__date{font-size:12px;font-weight:600;text-transform:uppercase}.global-styles-ui-screen-revisions__meta{align-items:flex-start;display:flex;justify-content:start;margin-bottom:4px;text-align:left;width:100%}.global-styles-ui-screen-revisions__meta img{border-radius:100%;height:16px;margin-right:8px;width:16px}.global-styles-ui-screen-revisions__loading{margin:24px auto!important}.global-styles-ui-screen-revisions__changes{line-height:1.4;list-style:disc;margin-left:12px;text-align:left}.global-styles-ui-screen-revisions__changes li{margin-bottom:4px}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination{gap:2px;justify-content:space-between}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .edit-site-pagination__total{height:1px;left:-1000px;margin:-1px;overflow:hidden;position:absolute}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-text{font-size:12px;will-change:opacity}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary{color:#1e1e1e}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary:disabled,.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary[aria-disabled=true]{color:#949494}.global-styles-ui-screen-revisions__footer{background:#fff;border-top:1px solid #ddd;bottom:0;box-sizing:border-box;height:56px;min-width:100%;padding:12px;position:sticky;z-index:1}.global-styles-ui-variations_item{box-sizing:border-box;cursor:var(--wpds-cursor-control,pointer)}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{border-radius:2px;outline:1px solid #0000001a;outline-offset:-1px;overflow:hidden;position:relative}@media not (prefers-reduced-motion){.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{transition:outline .1s linear}}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill{height:32px}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill .block-editor-iframe__scale-container{overflow:hidden}.global-styles-ui-variations_item:not(.is-active):hover .global-styles-ui-variations_item-preview{outline-color:#0000004d}.global-styles-ui-variations_item.is-active .global-styles-ui-variations_item-preview,.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:#1e1e1e;outline-offset:1px;outline-width:var(--wp-admin-border-width-focus)}.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:var(--wp-admin-theme-color)}.global-styles-ui-preview__wrapper{display:block;max-width:100%;width:100%}.global-styles-ui-preview__wrapper.is-hoverable{cursor:var(--wpds-cursor-control,pointer)}.global-styles-ui-typography-preview{align-items:center;background:#f0f0f0;border-radius:2px;display:flex;justify-content:center;margin-bottom:20px;min-height:100px;overflow:hidden}.global-styles-ui-font-size__item{line-break:anywhere;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.global-styles-ui-font-size__item-value{color:#757575}.global-styles-ui-screen-typography__indicator{align-items:center;border-radius:2px;display:flex!important;font-size:14px;height:24px;justify-content:center;width:24px}.global-styles-ui-block-types-search{margin-bottom:10px;padding:0 16px}.global-styles-ui-screen-typography__font-variants-count{color:#757575}.global-styles-ui-font-families__manage-fonts{justify-content:center}.global-styles-ui-screen .color-block-support-panel{border-top:none;padding-left:0;padding-right:0;padding-top:0;row-gap:12px}.global-styles-ui-header{line-height:1.9!important;margin-bottom:0!important}.global-styles-ui-subtitle{font-size:11px!important;font-weight:499!important;margin-bottom:0!important;text-transform:uppercase}.global-styles-ui-section-title{color:#2f2f2f;font-weight:600;line-height:1.2;margin:0;padding:16px 16px 0}.global-styles-ui-icon-with-current-color{fill:currentColor}.global-styles-ui__color-indicator-wrapper{flex-shrink:0;height:24px}.global-styles-ui__shadows-panel__options-container,.global-styles-ui__typography-panel__options-container{height:24px}.global-styles-ui__block-preview-panel{border:1px solid #ddd;border-radius:2px;overflow:hidden;position:relative;width:100%}.global-styles-ui__shadow-preview-panel{background-image:repeating-linear-gradient(45deg,#e0e0e0 25%,#0000 0,#0000 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,#0000 0,#0000 75%,#e0e0e0 0,#e0e0e0);background-position:0 0,8px 8px;background-size:16px 16px;border:1px solid #ddd;border-radius:2px;height:144px;overflow:auto}.global-styles-ui__shadow-preview-panel .global-styles-ui__shadow-preview-block{background-color:#fff;border:1px solid #ddd;border-radius:2px;height:60px;width:60%}.global-styles-ui__shadow-editor__dropdown-content{width:280px}.global-styles-ui__shadow-editor-panel{margin-bottom:4px}.global-styles-ui__shadow-editor__dropdown{position:relative;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle{border-radius:inherit;height:auto;padding-bottom:8px;padding-top:8px;text-align:left;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.global-styles-ui__shadow-editor__remove-button{opacity:0;position:absolute;right:8px;top:8px}.global-styles-ui__shadow-editor__remove-button.global-styles-ui__shadow-editor__remove-button{border:none}.global-styles-ui__shadow-editor__dropdown-toggle:hover+.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__shadow-editor__remove-button:focus,.global-styles-ui__shadow-editor__remove-button:hover{opacity:1}@media (hover:none){.global-styles-ui__shadow-editor__remove-button{opacity:1}}.global-styles-ui-screen-css{display:flex;flex:1 1 auto;flex-direction:column;margin:16px}.global-styles-ui-screen-css .components-v-stack{flex:1 1 auto}.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input,.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field{display:flex;flex:1 1 auto;flex-direction:column}.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field .components-textarea-control__input{direction:ltr;flex:1 1 auto}.global-styles-ui-screen-css-help-link{display:inline-block;margin-top:8px}.global-styles-ui-screen-variations{border-top:1px solid #ddd;margin-top:16px}.global-styles-ui-screen-variations>*{margin:24px 16px}.global-styles-ui-sidebar__navigator-provider{height:100%}.global-styles-ui-sidebar__navigator-screen{display:flex;flex-direction:column;height:100%}.global-styles-ui-sidebar__navigator-screen .single-column{grid-column:span 1}.global-styles-ui-screen-root.global-styles-ui-screen-root,.global-styles-ui-screen-style-variations.global-styles-ui-screen-style-variations{background:unset;color:inherit}.global-styles-ui-sidebar__panel .block-editor-block-icon svg{fill:currentColor}.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile,.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile .global-styles-ui-screen-root__active-style-tile-preview{border-radius:2px}.global-styles-ui-screen-root__active-style-tile-preview{clip-path:border-box}.global-styles-ui-color-palette-panel,.global-styles-ui-gradient-palette-panel{padding:16px}.font-library-page__tablist{border-bottom:1px solid #f0f0f0;padding:0 24px}.font-library-page__tab-panel{flex-grow:1;max-height:calc(100% - 110px);overflow:auto}.font-library-page:has(.font-library__footer) .font-library-page__tab-panel{max-height:calc(100% - 198px)}')),document.head.appendChild(e)}var{Tabs:_s}=ca(gf.privateApis),{useGlobalStyles:Ay}=ca(yf.privateApis);function Ry(){let{records:e=[]}=(0,Fs.useEntityRecords)("root","fontCollection",{_fields:"slug,name,description"}),[t,r]=(0,bf.useState)("installed-fonts"),{base:o,user:s,setUser:n,isReady:a}=Ay(),l=(0,vf.useSelect)(f=>f(Fs.store).canUser("create",{kind:"postType",name:"wp_font_family"}),[]);if(!a)return null;let h=[{id:"installed-fonts",title:(0,Jr._x)("Library","Font library")}];return l&&(h.push({id:"upload-fonts",title:(0,Jr._x)("Upload","noun")}),h.push(...(e||[]).map(({slug:f,name:c})=>({id:f,title:e&&e.length===1&&f==="google-fonts"?(0,Jr.__)("Install Fonts"):c})))),React.createElement(Qs,{title:(0,Jr.__)("Fonts"),className:"font-library-page"},React.createElement(_s,{selectedTabId:t,onSelect:f=>r(f)},React.createElement("div",{className:"font-library-page__tablist"},React.createElement(_s.TabList,null,h.map(({id:f,title:c})=>React.createElement(_s.Tab,{key:f,tabId:f},c)))),h.map(({id:f})=>React.createElement(_s.TabPanel,{key:f,tabId:f,focusable:!1,className:"font-library-page__tab-panel"},React.createElement(fa,{value:s,baseValue:o,onChange:n,activeTab:f})))))}function Ey(){return React.createElement(Ry,null)}var Iy=Ey;export{Iy as stage};
/*! Bundled license information:
is-plain-object/dist/is-plain-object.mjs:
diff --git a/src/wp-includes/build/routes/registry.php b/src/wp-includes/build/routes/registry.php
index e43f726820548..041b1369be3d1 100644
--- a/src/wp-includes/build/routes/registry.php
+++ b/src/wp-includes/build/routes/registry.php
@@ -14,6 +14,27 @@
'has_route' => true,
'has_content' => true,
),
+ array(
+ 'name' => 'content-types',
+ 'path' => '/',
+ 'page' => 'content-types',
+ 'has_route' => true,
+ 'has_content' => false,
+ ),
+ array(
+ 'name' => 'dashboard',
+ 'path' => '/',
+ 'page' => 'dashboard',
+ 'has_route' => false,
+ 'has_content' => true,
+ ),
+ array(
+ 'name' => 'experiments-home',
+ 'path' => '/',
+ 'page' => 'experiments',
+ 'has_route' => true,
+ 'has_content' => true,
+ ),
array(
'name' => 'font-list',
'path' => '/font-list',
@@ -27,5 +48,47 @@
'page' => 'font-library',
'has_route' => true,
'has_content' => false,
+ ),
+ array(
+ 'name' => 'guidelines',
+ 'path' => '/',
+ 'page' => 'guidelines',
+ 'has_route' => true,
+ 'has_content' => true,
+ ),
+ array(
+ 'name' => 'media-editor',
+ 'path' => '/media-editor/$id',
+ 'page' => 'media-editor',
+ 'has_route' => true,
+ 'has_content' => true,
+ ),
+ array(
+ 'name' => 'post-type-edit',
+ 'path' => '/post-types/$id',
+ 'page' => 'content-types',
+ 'has_route' => true,
+ 'has_content' => true,
+ ),
+ array(
+ 'name' => 'post-types-list',
+ 'path' => '/post-types',
+ 'page' => 'content-types',
+ 'has_route' => true,
+ 'has_content' => true,
+ ),
+ array(
+ 'name' => 'taxonomies-list',
+ 'path' => '/taxonomies',
+ 'page' => 'content-types',
+ 'has_route' => true,
+ 'has_content' => true,
+ ),
+ array(
+ 'name' => 'taxonomy-edit',
+ 'path' => '/taxonomies/$id',
+ 'page' => 'content-types',
+ 'has_route' => true,
+ 'has_content' => true,
)
);
diff --git a/src/wp-includes/images/icon-library/tab.svg b/src/wp-includes/images/icon-library/tab.svg
index a6444a9739efd..2e8102d5d7f9b 100644
--- a/src/wp-includes/images/icon-library/tab.svg
+++ b/src/wp-includes/images/icon-library/tab.svg
@@ -1 +1 @@
-
+
diff --git a/src/wp-includes/theme.json b/src/wp-includes/theme.json
index fb26d36518841..df48a061af01e 100644
--- a/src/wp-includes/theme.json
+++ b/src/wp-includes/theme.json
@@ -10,6 +10,7 @@
"style": false,
"width": false
},
+ "background": { "gradient": true },
"color": {
"background": true,
"button": true,
@@ -316,6 +317,30 @@
"core/button": {
"border": {
"radius": true
+ },
+ "dimensions": {
+ "dimensionSizes": [
+ {
+ "name": "25%",
+ "slug": "25",
+ "size": "25%"
+ },
+ {
+ "name": "50%",
+ "slug": "50",
+ "size": "50%"
+ },
+ {
+ "name": "75%",
+ "slug": "75",
+ "size": "75%"
+ },
+ {
+ "name": "100%",
+ "slug": "100",
+ "size": "100%"
+ }
+ ]
}
},
"core/image": {