Files
xmartica/wp-content/plugins/yabe-webfont/assets/dist/assets/google-font-editor-page-B0uFdvqx.js
T
2026-10-08 10:39:09 -06:00

2 lines
52 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{P as t,S as n,U as r,V as i,W as a,c as o,i as s,j as c,l,r as u,t as d}from"./button-BhAQo6Sy.js";import{D as f,I as p,X as m,Z as h,d as g,n as _,nt as v,t as y,tt as b,u as x,x as S,y as C}from"./api-Bb85n68L.js";import{n as w,t as T}from"./checkbox-BvMiUPpO.js";import{At as E,B as D,C as O,D as k,Et as A,F as j,G as M,I as N,Mt as ee,N as te,P as ne,S as P,U as re,_ as F,a as ie,b as I,c as ae,d as oe,f as se,g as ce,i as le,it as L,jt as ue,kt as de,l as fe,m as pe,n as R,o as me,p as z,r as he,t as ge,u as _e,v as ve,w as B,x as ye,y as be}from"./usePositioner-BR1Prb1t.js";import{t as xe}from"./spinner-B0ROFxgI.js";import{t as Se}from"./refresh-cw-0zQVax2T.js";import{a as Ce,i as we,n as V,r as Te,t as Ee}from"./use-unsaved-changes-CBW9Uy54.js";import{c as De,i as Oe,n as ke,o as Ae,s as je,t as Me,u as Ne}from"./useAnchoredPopupScrollLock-ufKQIYDq.js";import{r as Pe,t as H}from"./switch-DMNAfdJq.js";import{t as Fe}from"./input-DbQb1wvc.js";import{o as Ie,t as Le}from"./inertValue-DD-hQv2D.js";import{n as Re}from"./app-Di4tDCA1.js";import{a as U,i as ze,n as Be,o as Ve,r as He,t as Ue}from"./frame-Bg0IxU65.js";import{t as We}from"./separator-IZXL6QXg.js";import{i as Ge,n as Ke,r as qe,t as Je}from"./font-editor-layout-DqX_DfJ-.js";import{t as Ye}from"./google-fonts-icon-BCkwWN32.js";var Xe=r(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]);function W(e){return Array.isArray?Array.isArray(e):it(e)===`[object Array]`}function Ze(e){if(typeof e==`string`)return e;let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function Qe(e){return e==null?``:Ze(e)}function G(e){return typeof e==`string`}function $e(e){return typeof e==`number`}function et(e){return e===!0||e===!1||nt(e)&&it(e)==`[object Boolean]`}function tt(e){return typeof e==`object`}function nt(e){return tt(e)&&e!==null}function K(e){return e!=null}function rt(e){return!e.trim().length}function it(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var at=`Incorrect 'index' type`,ot=e=>`Invalid value for key ${e}`,st=e=>`Pattern length exceeds max of ${e}.`,ct=e=>`Missing ${e} property in key`,lt=e=>`Property 'weight' in key '${e}' must be a positive integer`,ut=Object.prototype.hasOwnProperty,dt=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=ft(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function ft(e){let t=null,n=null,r=null,i=1,a=null;if(G(e)||W(e))r=e,t=pt(e),n=mt(e);else{if(!ut.call(e,`name`))throw Error(ct(`name`));let o=e.name;if(r=o,ut.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(lt(o));t=pt(o),n=mt(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function pt(e){return W(e)?e:e.split(`.`)}function mt(e){return W(e)?e.join(`.`):e}function ht(e,t){let n=[],r=!1,i=(e,t,a)=>{if(K(e))if(!t[a])n.push(e);else{let o=e[t[a]];if(!K(o))return;if(a===t.length-1&&(G(o)||$e(o)||et(o)))n.push(Qe(o));else if(W(o)){r=!0;for(let e=0,n=o.length;e<n;e+=1)i(o[e],t,a+1)}else t.length&&i(o,t,a+1)}};return i(e,G(t)?t.split(`.`):t,0),r?n:n[0]}var gt={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},_t={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},vt={location:0,threshold:.6,distance:100},yt={useExtendedSearch:!1,getFn:ht,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},q={..._t,...gt,...vt,...yt},bt=/[^ ]+/g;function xt(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(bt).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var St=class{constructor({getFn:e=q.getFn,fieldNormWeight:t=q.fieldNormWeight}={}){this.norm=xt(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,G(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();G(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!K(e)||rt(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach((t,r)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(K(i)){if(W(i)){let e=[],t=[{nestedArrIndex:-1,value:i}];for(;t.length;){let{nestedArrIndex:n,value:r}=t.pop();if(K(r))if(G(r)&&!rt(r)){let t={v:r,i:n,n:this.norm.get(r)};e.push(t)}else W(r)&&r.forEach((e,n)=>{t.push({nestedArrIndex:n,value:e})})}n.$[r]=e}else if(G(i)&&!rt(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}};function Ct(e,t,{getFn:n=q.getFn,fieldNormWeight:r=q.fieldNormWeight}={}){let i=new St({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(ft)),i.setSources(t),i.create(),i}function wt(e,{getFn:t=q.getFn,fieldNormWeight:n=q.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new St({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function Tt(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=q.distance,ignoreLocation:a=q.ignoreLocation}={}){let o=t/e.length;if(a)return o;let s=Math.abs(r-n);return i?o+s/i:s?1:o}function Et(e=[],t=q.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}var J=32;function Dt(e,t,n,{location:r=q.location,distance:i=q.distance,threshold:a=q.threshold,findAllMatches:o=q.findAllMatches,minMatchCharLength:s=q.minMatchCharLength,includeMatches:c=q.includeMatches,ignoreLocation:l=q.ignoreLocation}={}){if(t.length>J)throw Error(st(J));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=s>1||c,g=h?Array(d):[],_;for(;(_=e.indexOf(t,m))>-1;){let e=Tt(t,{currentLocation:_,expectedLocation:f,distance:i,ignoreLocation:l});if(p=Math.min(e,p),m=_+u,h){let e=0;for(;e<u;)g[_+e]=1,e+=1}}m=-1;let v=[],y=1,b=u+d,x=1<<u-1;for(let r=0;r<u;r+=1){let a=0,s=b;for(;a<s;)Tt(t,{errors:r,currentLocation:f+s,expectedLocation:f,distance:i,ignoreLocation:l})<=p?a=s:b=s,s=Math.floor((b-a)/2+a);b=s;let c=Math.max(1,f-s+1),_=o?d:Math.min(f+s,d)+u,S=Array(_+2);S[_+1]=(1<<r)-1;for(let a=_;a>=c;--a){let o=a-1,s=n[e.charAt(o)];if(h&&(g[o]=+!!s),S[a]=(S[a+1]<<1|1)&s,r&&(S[a]|=(v[a+1]|v[a])<<1|1|v[a+1]),S[a]&x&&(y=Tt(t,{errors:r,currentLocation:o,expectedLocation:f,distance:i,ignoreLocation:l}),y<=p)){if(p=y,m=o,m<=f)break;c=Math.max(1,2*f-m)}}if(Tt(t,{errors:r+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:l})>p)break;v=S}let S={isMatch:m>=0,score:Math.max(.001,y)};if(h){let e=Et(g,s);e.length?c&&(S.indices=e):S.isMatch=!1}return S}function Ot(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var kt=String.prototype.normalize?(e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``)):(e=>e),At=class{constructor(e,{location:t=q.location,threshold:n=q.threshold,distance:r=q.distance,includeMatches:i=q.includeMatches,findAllMatches:a=q.findAllMatches,minMatchCharLength:o=q.minMatchCharLength,isCaseSensitive:s=q.isCaseSensitive,ignoreDiacritics:c=q.ignoreDiacritics,ignoreLocation:l=q.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?kt(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:Ot(e),startIndex:t})},d=this.pattern.length;if(d>J){let e=0,t=d%J,n=d-t;for(;e<n;)u(this.pattern.substr(e,J),e),e+=J;if(t){let e=d-J;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?kt(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=Dt(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&(u=[...u,...g])});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=u),p}},Y=class{constructor(e){this.pattern=e}static isMultiMatch(e){return jt(e,this.multiRegex)}static isSingleMatch(e){return jt(e,this.singleRegex)}search(){}};function jt(e,t){let n=e.match(t);return n?n[1]:null}var Mt=class extends Y{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},Nt=class extends Y{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},Pt=class extends Y{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},Ft=class extends Y{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},It=class extends Y{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},Lt=class extends Y{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},Rt=class extends Y{constructor(e,{location:t=q.location,threshold:n=q.threshold,distance:r=q.distance,includeMatches:i=q.includeMatches,findAllMatches:a=q.findAllMatches,minMatchCharLength:o=q.minMatchCharLength,isCaseSensitive:s=q.isCaseSensitive,ignoreDiacritics:c=q.ignoreDiacritics,ignoreLocation:l=q.ignoreLocation}={}){super(e),this._bitapSearch=new At(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},zt=class extends Y{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:+!a,indices:r}}},Bt=[Mt,zt,Pt,Ft,Lt,It,Nt,Rt],Vt=Bt.length,Ht=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Ut=`|`;function Wt(e,t={}){return e.split(Ut).map(e=>{let n=e.trim().split(Ht).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<Vt;){let e=Bt[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<Vt;){let e=Bt[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var Gt=new Set([Rt.type,zt.type]),Kt=class{constructor(e,{isCaseSensitive:t=q.isCaseSensitive,ignoreDiacritics:n=q.ignoreDiacritics,includeMatches:r=q.includeMatches,minMatchCharLength:i=q.minMatchCharLength,ignoreLocation:a=q.ignoreLocation,findAllMatches:o=q.findAllMatches,location:s=q.location,threshold:c=q.threshold,distance:l=q.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?kt(e):e,this.pattern=e,this.query=Wt(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?kt(e):e;let a=0,o=[],s=0;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:c,indices:l,score:u}=r.search(e);if(c){if(a+=1,s+=u,n){let e=r.constructor.type;Gt.has(e)?o=[...o,...l]:o.push(l)}}else{s=0,a=0,o.length=0;break}}if(a){let e={isMatch:!0,score:s/a};return n&&(e.indices=o),e}}return{isMatch:!1,score:1}}},qt=[];function Jt(...e){qt.push(...e)}function Yt(e,t){for(let n=0,r=qt.length;n<r;n+=1){let r=qt[n];if(r.condition(e,t))return new r(e,t)}return new At(e,t)}var Xt={AND:`$and`,OR:`$or`},Zt={PATH:`$path`,PATTERN:`$val`},Qt=e=>!!(e[Xt.AND]||e[Xt.OR]),$t=e=>!!e[Zt.PATH],en=e=>!W(e)&&tt(e)&&!Qt(e),tn=e=>({[Xt.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function nn(e,t,{auto:n=!0}={}){let r=e=>{let i=Object.keys(e),a=$t(e);if(!a&&i.length>1&&!Qt(e))return r(tn(e));if(en(e)){let r=a?e[Zt.PATH]:i[0],o=a?e[Zt.PATTERN]:e[r];if(!G(o))throw Error(ot(r));let s={keyId:mt(r),pattern:o};return n&&(s.searcher=Yt(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];W(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return Qt(e)||(e=tn(e)),r(e)}function rn(e,{ignoreFieldNorm:t=q.ignoreFieldNorm}){e.forEach(e=>{let n=1;e.matches.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),e.score=n})}function an(e,t){let n=e.matches;t.matches=[],K(n)&&n.forEach(e=>{if(!K(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function on(e,t){t.score=e.score}function sn(e,t,{includeMatches:n=q.includeMatches,includeScore:r=q.includeScore}={}){let i=[];return n&&i.push(an),r&&i.push(on),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var X=class{constructor(e,t={},n){this.options={...q,...t},this.options.useExtendedSearch,this._keyStore=new dt(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof St))throw Error(at);this._myIndex=t||Ct(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){K(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let t=[];for(let n=0,r=this._docs.length;n<r;n+=1){let i=this._docs[n];e(i,n)&&(this.removeAt(n),--n,--r,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){let{includeMatches:n,includeScore:r,shouldSort:i,sortFn:a,ignoreFieldNorm:o}=this.options,s=G(e)?G(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return rn(s,{ignoreFieldNorm:o}),i&&s.sort(a),$e(t)&&t>-1&&(s=s.slice(0,t)),sn(s,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){let t=Yt(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach(({v:e,i:n,n:i})=>{if(!K(e))return;let{isMatch:a,score:o,indices:s}=t.searchIn(e);a&&r.push({item:e,idx:n,matches:[{score:o,value:e,norm:i,indices:s}]})}),r}_searchLogical(e){let t=nn(e,this.options),n=(e,t,r)=>{if(!e.children){let{keyId:n,searcher:i}=e,a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return a&&a.length?[{idx:r,item:t,matches:a}]:[]}let i=[];for(let a=0,o=e.children.length;a<o;a+=1){let o=e.children[a],s=n(o,t,r);if(s.length)i.push(...s);else if(e.operator===Xt.AND)return[]}return i},r=this._myIndex.records,i={},a=[];return r.forEach(({$:e,i:r})=>{if(K(e)){let o=n(t,e,r);o.length&&(i[r]||(i[r]={idx:r,item:e,matches:[]},a.push(i[r])),o.forEach(({matches:e})=>{i[r].matches.push(...e)}))}}),a}_searchObjectList(e){let t=Yt(e,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach(({$:e,i:r})=>{if(!K(e))return;let a=[];n.forEach((n,r)=>{a.push(...this._findMatches({key:n,value:e[r],searcher:t}))}),a.length&&i.push({idx:r,item:e,matches:a})}),i}_findMatches({key:e,value:t,searcher:n}){if(!K(t))return[];let r=[];if(W(t))t.forEach(({v:t,i,n:a})=>{if(!K(t))return;let{isMatch:o,score:s,indices:c}=n.searchIn(t);o&&r.push({score:s,key:e,value:t,idx:i,norm:a,indices:c})});else{let{v:i,n:a}=t,{isMatch:o,score:s,indices:c}=n.searchIn(i);o&&r.push({score:s,key:e,value:i,norm:a,indices:c})}return r}};X.version=`7.1.0`,X.createIndex=Ct,X.parseIndex=wt,X.config=q,X.parseQuery=nn,Jt(Kt);var Z=e(a(),1),cn=Z.createContext(void 0);function Q(e){let t=Z.useContext(cn);if(t===void 0&&!e)throw Error(i(47));return t}var ln=e(v(),1),un={...oe,disabled:e=>e.disabled,instantType:e=>e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,modal:e=>e.modal,focusManagerModal:e=>e.focusManagerModal,stickIfOpen:e=>e.stickIfOpen,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},dn=class extends k{constructor(e,t,n){let r=new se;super(fn(e,r,t,n),pn(r),un)}setOpen=(e,t)=>{let n=t.reason===p,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=ce(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n={open:e,openChangeReason:t.reason};ve(n,e,t.trigger,a()),this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),ln.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function fn(e,t,n,r=!1){let i={...fe(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i.floatingRootContext=_e(t,n,r),i}function pn(e){return{popupRef:Z.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:Z.createRef(),beforeContentFocusGuardRef:Z.createRef(),stickIfOpenTimeout:new A,triggerElements:e}}var $=u();function mn({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=gn(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),p=u.useState(`mounted`),m=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),O(u,d),be(u);let{forceUnmount:h}=I(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});u.useSyncedValues({modal:o}),Z.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),Z.useImperativeHandle(e.actionsRef,()=>({unmount:h,close:()=>u.setOpen(!1,S(f))}),[h,u]);let g=d||p;return(0,$.jsxs)(cn.Provider,{value:u,children:[s&&(0,$.jsx)(pe,{handle:s,store:u}),g&&(0,$.jsx)(_n,{store:u,modal:o}),typeof t==`function`?t({payload:m}):t]})}function hn(e){return Q(!0)?(0,$.jsx)(mn,{props:e}):(0,$.jsx)(j,{children:(0,$.jsx)(mn,{props:e})})}function gn(e,t){let n=P((e,n)=>new dn(t,e,n));return Z.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function _n({store:e,modal:t}){let n=e.useState(`floatingRootContext`),r=te(n,{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),i=r.reference,a=r.floating;return ye(e,{activeTriggerProps:i,inactiveTriggerProps:i,popupProps:a}),null}var vn=Z.forwardRef(function(e,n){let{render:r,className:a,style:o,disabled:c=!1,nativeButton:l=!0,handle:u,payload:d,openOnHover:f=!1,delay:p=300,closeDelay:m=0,id:h,...g}=e,_=Q(!0),v=ae(u)??_;if(!v)throw Error(i(74));let y=C(h),b=v.useState(`isTriggerActive`,y),x=v.useState(`floatingRootContext`),S=v.useState(`isOpenedByTrigger`,y),w=v.useState(`triggerPopupId`,y),T=Z.useRef(null),{registerTrigger:D,isMountedByThisTrigger:O}=B(y,T,v,{payload:d,disabled:c,openOnHover:f,closeDelay:m}),k=v.useState(`openChangeReason`),A=v.useState(`stickIfOpen`),j=v.useState(`openMethod`),M=v.useState(`focusManagerModal`),N=ie(x,{enabled:!c&&f&&(j!==`touch`||k!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:le(),restMs:p,delay:{close:m},triggerElementRef:T,isActiveTrigger:b,isClosing:()=>v.select(`transitionStatus`)===`ending`}),ee=je(x,{stickIfOpen:A}),te=Oe(()=>v.select(`open`),e=>{v.set(`openMethod`,e)}),ne=v.useState(`triggerProps`,O),{getButtonProps:P,buttonRef:F}=s({disabled:c,native:l}),I={open(e){return e&&k===`trigger-press`?E.open(e):ue.open(e)}},{preFocusGuardRef:oe,handlePreFocusGuardFocus:se,handleFocusTargetFocus:ce}=Re(v,T),de=t(`button`,e,{state:{disabled:c,open:S},ref:[F,n,D,T],props:[ee.reference,N,ne,te,{[re]:``,id:y,"aria-haspopup":`dialog`,"aria-expanded":S,"aria-controls":w},g,P],stateAttributesMapping:I}),fe=(0,$.jsx)(Z.Fragment,{children:de},y);return O&&!M?(0,$.jsxs)(Z.Fragment,{children:[(0,$.jsx)(L,{ref:oe,onFocus:se}),fe,(0,$.jsx)(L,{ref:v.context.triggerFocusTargetRef,onFocus:ce})]}):fe}),yn=Z.createContext(void 0);function bn(){let e=Z.useContext(yn);if(e===void 0)throw Error(i(45));return e}var xn=Z.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return Q().useState(`mounted`)||n?(0,$.jsx)(yn.Provider,{value:n,children:(0,$.jsx)(D,{ref:t,...r})}):null}),Sn=Z.createContext(void 0);function Cn(){let e=Z.useContext(Sn);if(!e)throw Error(i(46));return e}var wn=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:s,side:c,align:l,sideOffset:u,alignOffset:d,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p,arrowPadding:m,sticky:h,disableAnchorTracking:_=!1,collisionAvoidance:v=M,...y}=e,b=Q(),x=bn(),S=N(),C=b.useState(`floatingRootContext`),w=b.useState(`mounted`),T=b.useState(`open`),E=b.useState(`openChangeReason`),D=b.useState(`activeTriggerElement`),O=b.useState(`modal`),k=b.useState(`openMethod`),A=b.useState(`positionerElement`),j=b.useState(`instantType`),ee=b.useState(`transitionStatus`),te=b.useState(`adaptiveOrigin`),P=Z.useRef(null),re=g(A),F=R({anchor:a,floatingRootContext:C,positionMethod:s,mounted:w,side:c,sideOffset:u,align:l,alignOffset:d,arrowPadding:m,collisionBoundary:f,collisionPadding:p,sticky:h,disableAnchorTracking:_,keepMounted:x,nodeId:S,collisionAvoidance:v,adaptiveOrigin:te}),ie=C.useState(`domReferenceElement`);o(()=>{let e=ie,t=P.current;if(e&&(P.current=e),t&&e&&e!==t){b.set(`instantType`,void 0);let e=new AbortController;return re(()=>{b.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[ie,re,b]);let I=O===!0&&E!==`trigger-hover`;Me(T&&I,k===`touch`,A,D);let ae=b.useStateSetter(`positionerElement`),oe={open:T,side:F.side,align:F.align,anchorHidden:F.anchorHidden,instant:j},se=ge(e,oe,{styles:F.positionerStyles,transitionStatus:ee,props:y,refs:[t,ae],hidden:!w,inert:!T});return(0,$.jsxs)(Sn.Provider,{value:F,children:[w&&I&&(0,$.jsx)(Ae,{inert:Le(!T),cutout:D}),(0,$.jsx)(ne,{id:S,children:se})]})}),Tn=Z.createContext(void 0);function En(){let[e,t]=Z.useState(0),n=l(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:Z.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var Dn=Z.forwardRef(function(e,r){let{render:i,className:a,style:o,initialFocus:s,finalFocus:c,...l}=e,u=Q(),d=Cn(),f=ke(!0)!=null,{context:p,hasClosePart:m}=En(),h=u.useState(`open`),g=u.useState(`openMethod`),_=u.useState(`instantType`),v=u.useState(`transitionStatus`),y=u.useState(`popupProps`),b=u.useState(`titleElementId`),S=u.useState(`descriptionElementId`),C=u.useState(`modal`),w=u.useState(`mounted`),T=u.useState(`openChangeReason`),E=u.useState(`activeTriggerElement`),D=u.useState(`floatingRootContext`),O=D.useState(`floatingId`),k=u.useState(`disabled`),A=u.useState(`openOnHover`),j=u.useState(`closeDelay`);x({open:h,ref:u.context.popupRef,onComplete(){h&&u.context.onOpenChangeComplete?.(!0)}}),me(D,{enabled:A&&!k,closeDelay:j});let M=s===void 0?F(u.context.popupRef):s,N=C!==!1&&m;u.useSyncedValue(`focusManagerModal`,N);let ee=u.useStateSetter(`popupElement`),te={open:h,side:d.side,align:d.align,instant:_,transitionStatus:v},ne=t(`div`,e,{state:te,ref:[r,u.context.popupRef,ee],props:[y,{id:O,role:`dialog`,...z,"aria-labelledby":b,"aria-describedby":S,onKeyDown(e){f&&Ie.has(e.key)&&e.stopPropagation()}},he(v),l],stateAttributesMapping:de});return(0,$.jsx)(De,{context:D,openInteractionType:g,modal:N,disabled:!w||T===`trigger-hover`,initialFocus:M,returnFocus:c,restoreFocus:`popup`,previousFocusableElement:n(E)?E:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:(0,$.jsx)(Tn.Provider,{value:p,children:ne})})});function On({...e}){return(0,$.jsx)(hn,{"data-slot":`popover`,...e})}function kn({...e}){return(0,$.jsx)(vn,{"data-slot":`popover-trigger`,...e})}function An({className:e,align:t=`center`,alignOffset:n=0,side:r=`bottom`,sideOffset:i=4,...a}){return(0,$.jsx)(xn,{children:(0,$.jsx)(wn,{align:t,alignOffset:n,side:r,sideOffset:i,className:`isolate z-50`,children:(0,$.jsx)(Dn,{"data-slot":`popover-content`,className:c(`z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...a})})})}var jn=50,Mn={title:``,status:!0,preload:!1,selector:``,display:`swap`,variable:!1,formats:[`woff2`],fontData:null,subsets:[],fontFiles:[],fontFaces:[]};function Nn(e){return{...e,subsets:(e.subsets||[]).filter(e=>e!==`menu`),variants:e.variants||[],designers:e.designers||[]}}function Pn(e){if(!e)return`—`;let t=new Date(/^\d{4}-\d{2}-\d{2}$/.test(e)?`${e}T00:00:00`:e);return Number.isNaN(t.getTime())?e:new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`short`,day:`numeric`}).format(t)}function Fn(e){return e.filter((e,t,n)=>n.findIndex(t=>t.weight===e.weight&&t.style===e.style&&t.format===e.format&&JSON.stringify([...t.subsets].sort())===JSON.stringify([...e.subsets].sort()))===t)}function In(e,t,n){if(n){let n=e.axes?.find(e=>e.tag===`wdth`);return[`normal`,`italic`].filter(e=>t.some(t=>t.weight===0&&t.style===e)).map(e=>({id:Ge(10),key:e===`normal`?`0`:`0i`,weight:0,width:n?`${n.min}% ${n.max}%`:``,style:e,isEnabled:!0,display:``,selector:``,comment:``,preload:!1}))}return e.variants.map(e=>{let t=Number.parseInt(e,10),n=e.replace(`regular`,``).replace(/[0-9]/g,``).trim(),r=Number.isNaN(t)?400:t;return{id:Ge(10),key:e,weight:r,width:``,style:n===`i`?`italic`:n===`o`?`oblique`:`normal`,isEnabled:r===400,display:``,selector:``,comment:``,preload:!1}})}function Ln(e){return{title:e.title.trim(),status:e.status,metadata:{preload:e.preload,selector:e.selector.trim(),display:e.display,google_fonts:{variable:e.variable,formats:e.formats,font_data:e.fontData,subsets:e.subsets,font_files:Fn(e.fontFiles),font_faces:e.fontFaces}}}}function Rn(e){return e.fontData?e.fontFaces.map(t=>{let n=e.fontFiles.find(e=>e.weight===t.weight&&e.style===t.style),r=n?.file?.attachment_url||n?.url;if(!r)return``;let i=e.fontData?.axes?.find(e=>e.tag===`wght`),a=t.weight||(i?`${i.min} ${i.max}`:400),o=t.width?`font-stretch:${t.width};`:``;return`@font-face{font-family:'JooosiFonGooglePreview';font-style:${t.style};font-weight:${a};${o}font-display:${t.display||e.display};src:url('${r.replaceAll(`'`,`\\'`)}') format('${n.format}')}`}).join(`
`):``}function zn(){let{id:e}=h(),t=m(),n=!!e,[r,i]=(0,Z.useState)(Mn),[a,o]=(0,Z.useState)(()=>JSON.stringify(Ln(Mn))),[s,l]=(0,Z.useState)([]),[u,f]=(0,Z.useState)(``),[p,g]=(0,Z.useState)(0),[v,x]=(0,Z.useState)(!0),[S,C]=(0,Z.useState)(!1),[E,D]=(0,Z.useState)(!1),[O,k]=(0,Z.useState)(!1),[A,j]=(0,Z.useState)(!1),[M,N]=(0,Z.useState)(null),[te,ne]=(0,Z.useState)(wp.i18n.__(`Pack my box with five dozen liquor jugs.`,`jooosi-fon`)),[P,re]=(0,Z.useState)(18),[F,ie]=(0,Z.useState)(400),[I,ae]=(0,Z.useState)(100),[oe,se]=(0,Z.useState)(!1),[ce,le]=(0,Z.useState)([]),L=(0,Z.useRef)(0),ue=(0,Z.useMemo)(()=>Ln(r),[r]),de=Ee(!v&&JSON.stringify(ue)!==a),fe=(0,Z.useCallback)(async(e=!1)=>{C(!0);try{let{data:t}=await y.get(`/fonts/google-fonts/metadata`,{params:e?{force:1}:{}}),n=t.fonts.map(Nn);l(n),g(0),i(e=>{if(!e.fontData)return e;let t=n.find(t=>t.slug===e.fontData?.slug);return t?{...e,fontData:{...e.fontData,...t}}:e}),e&&b.success(wp.i18n.__(`Google Fonts catalog refreshed.`,`jooosi-fon`))}catch(e){N(_(e))}finally{C(!1)}},[]);(0,Z.useEffect)(()=>{let t=!1;return Promise.all([y.get(`/fonts/google-fonts/metadata`),n&&e?y.get(`/fonts/detail/${e}`):Promise.resolve(null)]).then(([e,n])=>{if(t)return;let r=e.data.fonts.map(Nn);if(l(r),n){let e=n.data,t=e.metadata.google_fonts;if(!t)throw Error(wp.i18n.__(`Google Fonts metadata is missing.`,`jooosi-fon`));let a=r.find(e=>e.slug===t.font_data.slug),s=Nn({...t.font_data,...a}),c=t.subsets.length>0?t.subsets:s.subsets.includes(`latin`)?[`latin`]:s.subsets.slice(0,1),l={title:e.title,status:e.status,preload:!!e.metadata.preload,selector:e.metadata.selector||``,display:e.metadata.display||`swap`,variable:t.variable,formats:t.formats.length>0?t.formats:[`woff2`],fontData:s,subsets:c,fontFiles:t.font_files,fontFaces:t.font_faces};i(l),o(JSON.stringify(Ln(l)))}}).catch(e=>{t||N(_(e))}).finally(()=>{t||x(!1)}),()=>{t=!0,L.current+=1}},[n,e]);let pe=(0,Z.useMemo)(()=>new X(s,{threshold:.3,ignoreLocation:!0,keys:[{name:`family`,weight:.8},{name:`category`,weight:.15},{name:`designers`,weight:.05}]}),[s]),R=(0,Z.useMemo)(()=>{let e=u.trim();return e?pe.search(e).map(({item:e})=>e):s},[s,pe,u]),me=Math.max(1,Math.ceil(R.length/jn)),z=Math.min(p,me-1),he=R.slice(z*jn,(z+1)*jn),ge=(0,Z.useCallback)(async(e,t)=>{let n=++L.current;if(t.length===0){D(!1),i(t=>t.fontData?.slug===e.slug?{...t,fontFiles:[],fontFaces:[]}:t);return}D(!0);try{let{data:r}=await y.get(`/fonts/google-fonts/webfonts/${e.slug}`,{params:{subsets:t.join(`,`)}});if(n!==L.current)return;let a=Nn(r.font),o=Object.values(r.files).map(e=>({...e,uid:Ge(10)}));i(t=>{if(t.fontData?.slug!==e.slug)return t;let n={...e,...a};return{...t,fontData:n,fontFiles:o,fontFaces:In(n,o,t.variable)}})}catch(e){n===L.current&&b.error(_(e))}finally{n===L.current&&D(!1)}},[]),_e=e=>{let t=s.find(t=>t.slug===e)||null;if(!t)return;let n=t.subsets.includes(`latin`)?[`latin`]:t.subsets.slice(0,1);i(e=>({...e,title:e.title.trim()===``||e.title===e.fontData?.family?t.family:e.title,fontData:t,subsets:n,fontFiles:[],fontFaces:[],variable:!1})),le([]),se(!1),f(``),g(0),ge(t,n)},ve=e=>{le(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},B=(e,t)=>i(n=>({...n,fontFaces:n.fontFaces.map(n=>n.id===e?{...n,...t}:n)})),ye=e=>{if(e){let e=r.fontData?.axes?.find(e=>e.tag===`wght`),t=r.fontData?.axes?.find(e=>e.tag===`wdth`);e&&ie(e.defaultValue??Math.min(Math.max(400,e.min),e.max)),t&&ae(t.defaultValue??Math.min(Math.max(100,t.min),t.max))}i(t=>({...t,variable:e,fontFaces:t.fontData?In(t.fontData,t.fontFiles,e):[]}))},be=(e,t)=>{if(!t&&r.subsets.length===1&&r.subsets.includes(e))return;let n=t?[...new Set([...r.subsets,e])]:r.subsets.filter(t=>t!==e);i(e=>({...e,subsets:n,fontFiles:[],fontFaces:[]})),r.fontData&&ge(r.fontData,n)},De=(e,t)=>i(n=>!t&&n.formats.length===1&&n.formats.includes(e)?n:{...n,formats:t?[...new Set([...n.formats,e])]:n.formats.filter(t=>t!==e)}),Oe=async i=>{if(i.preventDefault(),!r.fontData){b.error(wp.i18n.__(`Choose a Google Fonts family.`,`jooosi-fon`));return}if(E){b.error(wp.i18n.__(`Wait for the font files to finish loading.`,`jooosi-fon`));return}if(r.subsets.length===0||r.formats.length===0||r.fontFaces.every(e=>!e.isEnabled)){b.error(wp.i18n.__(`Select at least one subset, format, and variant.`,`jooosi-fon`));return}if(!O){k(!0);try{let r=n?`/fonts/google-fonts/update/${e}`:`/fonts/google-fonts/store`,{data:i}=await y.post(r,ue);o(JSON.stringify(ue)),b.success(n?wp.i18n.__(`Google Font updated.`,`jooosi-fon`):wp.i18n.__(`Google Font imported and hosted locally.`,`jooosi-fon`)),n||(de(),t(`/fonts/edit/${i.id}/google-fonts`,{replace:!0}))}catch(e){b.error(_(e))}finally{k(!1)}}},ke=async()=>{if(!(!e||A||!window.confirm(wp.i18n.__(`Move this font to the trash?`,`jooosi-fon`)))){j(!0);try{await y.post(`/fonts/delete/${e}`),o(JSON.stringify(ue)),de(),t(`/fonts/index`,{replace:!0}),b.success(wp.i18n.__(`Font moved to trash.`,`jooosi-fon`))}catch(e){b.error(_(e))}finally{j(!1)}}};if(v)return(0,$.jsx)(Ke,{});if(M&&s.length===0)return(0,$.jsx)(Ue,{children:(0,$.jsx)(U,{role:`status`,"aria-live":`polite`,children:(0,$.jsx)(`p`,{className:`text-sm text-destructive`,children:M})})});let Ae=Rn(r),je=r.variable?r.fontData?.axes?.find(e=>e.tag===`wght`):void 0,Me=r.variable?r.fontData?.axes?.find(e=>e.tag===`wdth`):void 0;return(0,$.jsxs)(`form`,{className:`grid gap-5`,onSubmit:Oe,children:[(0,$.jsx)(Je,{source:wp.i18n.__(`Google Fonts · hosted locally`,`jooosi-fon`),title:n?r.title||wp.i18n.__(`Manage Google Font`,`jooosi-fon`):wp.i18n.__(`Import a Google Font`,`jooosi-fon`),description:wp.i18n.__(`Select only what the site needs; Jooosi Fon downloads and serves the files from WordPress.`,`jooosi-fon`),icon:(0,$.jsx)(Ye,{})}),M&&(0,$.jsx)(`div`,{role:`status`,"aria-live":`polite`,className:`rounded-lg border border-destructive/20 bg-destructive/10 px-4 py-3 text-sm text-destructive`,children:M}),(0,$.jsxs)(Ue,{spacing:`sm`,children:[(0,$.jsxs)(ze,{className:`flex-row flex-wrap items-center justify-between gap-3`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Ve,{children:wp.i18n.__(`Font details`,`jooosi-fon`)}),(0,$.jsx)(Be,{children:wp.i18n.__(`Choose a catalog family and define its default CSS behavior.`,`jooosi-fon`)})]}),(0,$.jsxs)(d,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>fe(!0),disabled:S,children:[S?(0,$.jsx)(xe,{}):(0,$.jsx)(Se,{}),wp.i18n.__(`Refresh catalog`,`jooosi-fon`)]})]}),(0,$.jsxs)(U,{className:`grid gap-4 md:grid-cols-2 xl:grid-cols-[1.1fr_1.1fr_.9fr_1.25fr_.8fr]`,children:[(0,$.jsx)(V,{label:wp.i18n.__(`Name`,`jooosi-fon`),hint:wp.i18n.__(`Shown in the font library.`,`jooosi-fon`),children:(0,$.jsx)(we,{required:!0,value:r.title,onChange:e=>i({...r,title:e.target.value})})}),(0,$.jsx)(V,{label:wp.i18n.__(`Font Family`,`jooosi-fon`),hint:r.fontData?`${r.fontData.category||wp.i18n.__(`Font`,`jooosi-fon`)} · ${r.fontData.variants.length} ${wp.i18n.__(`variants`,`jooosi-fon`)}`:wp.i18n.__(`Search the local catalog.`,`jooosi-fon`),children:(0,$.jsxs)(On,{open:oe,onOpenChange:se,children:[(0,$.jsxs)(kn,{render:(0,$.jsx)(d,{type:`button`,variant:`outline`,className:`w-full justify-between font-normal`}),children:[(0,$.jsx)(`span`,{className:`truncate`,children:r.fontData?.family||wp.i18n.__(`Choose a family…`,`jooosi-fon`)}),(0,$.jsx)(Xe,{"aria-hidden":`true`,className:`text-muted-foreground`})]}),(0,$.jsxs)(An,{align:`start`,className:`flex h-[min(28rem,calc(100vh-2rem))] min-h-0 w-[min(32rem,calc(100vw-2rem))] flex-col gap-0 p-0`,children:[(0,$.jsxs)(`div`,{className:`relative border-b p-2`,children:[(0,$.jsx)(Ne,{"aria-hidden":`true`,className:`absolute left-5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground`}),(0,$.jsx)(Fe,{autoFocus:!0,"aria-label":wp.i18n.__(`Search Google Fonts families`,`jooosi-fon`),className:`pl-9`,value:u,onChange:e=>{f(e.target.value),g(0)},placeholder:wp.i18n.__(`Search family, category, or designer…`,`jooosi-fon`)})]}),(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-1`,role:`listbox`,"aria-label":wp.i18n.__(`Google Fonts families`,`jooosi-fon`),children:[he.map(e=>{let t=r.fontData?.slug===e.slug;return(0,$.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t,onClick:()=>_e(e.slug),className:c(`flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,t&&`bg-primary/[0.07]`),children:[(0,$.jsx)(`span`,{className:c(`grid size-8 shrink-0 place-items-center rounded-md border font-medium`,t?`border-primary bg-primary text-primary-foreground`:`bg-background`),children:e.family.charAt(0)}),(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`strong`,{className:`block truncate text-sm font-medium`,children:e.family}),(0,$.jsxs)(`span`,{className:`block text-xs text-muted-foreground`,children:[e.category||wp.i18n.__(`Google Fonts`,`jooosi-fon`),` · `,e.variants.length,` `,wp.i18n.__(`variants`,`jooosi-fon`)]})]}),t&&(0,$.jsx)(w,{"aria-hidden":`true`,className:`size-4 text-primary`})]},e.slug)}),R.length===0&&(0,$.jsx)(`p`,{className:`m-0 p-8 text-center text-sm text-muted-foreground`,children:wp.i18n.__(`No matching families.`,`jooosi-fon`)})]}),R.length>0&&(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-t p-2`,children:[(0,$.jsxs)(`p`,{className:`m-0 text-xs tabular-nums text-muted-foreground`,children:[z*jn+1,`–`,Math.min((z+1)*jn,R.length),` `,wp.i18n.__(`of`,`jooosi-fon`),` `,R.length]}),(0,$.jsxs)(`div`,{className:`flex gap-1`,children:[(0,$.jsx)(d,{type:`button`,size:`sm`,variant:`ghost`,disabled:z===0,onClick:()=>g(z-1),children:wp.i18n.__(`Previous`,`jooosi-fon`)}),(0,$.jsx)(d,{type:`button`,size:`sm`,variant:`ghost`,disabled:z>=me-1,onClick:()=>g(z+1),children:wp.i18n.__(`Next`,`jooosi-fon`)})]})]})]})]})}),(0,$.jsx)(V,{label:wp.i18n.__(`Font display`,`jooosi-fon`),hint:wp.i18n.__(`Text appearance while loading.`,`jooosi-fon`),children:(0,$.jsx)(Te,{value:r.display,onChange:e=>i({...r,display:e.target.value}),children:[`auto`,`block`,`swap`,`fallback`,`optional`].map(e=>(0,$.jsx)(`option`,{children:e},e))})}),(0,$.jsx)(V,{label:wp.i18n.__(`CSS selector / fallback`,`jooosi-fon`),hint:wp.i18n.__(`Optional automatic assignment.`,`jooosi-fon`),children:(0,$.jsx)(we,{value:r.selector,onChange:e=>i({...r,selector:e.target.value}),placeholder:`body | Arial, sans-serif`})}),(0,$.jsxs)(`div`,{className:`grid gap-1.5 text-sm font-medium`,children:[(0,$.jsx)(`span`,{id:`preload-family-label`,children:wp.i18n.__(`Preload family`,`jooosi-fon`)}),(0,$.jsxs)(`div`,{className:`flex h-8 items-center justify-between gap-3 rounded-lg border bg-background px-2.5`,children:[(0,$.jsx)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:r.preload?wp.i18n.__(`Enabled`,`jooosi-fon`):wp.i18n.__(`Disabled`,`jooosi-fon`)}),(0,$.jsx)(H,{size:`sm`,checked:r.preload,onCheckedChange:e=>i({...r,preload:e}),"aria-labelledby":`preload-family-label`,"aria-describedby":`preload-family-help`})]}),(0,$.jsx)(`span`,{id:`preload-family-help`,className:`text-xs font-normal text-muted-foreground`,children:wp.i18n.__(`Request selected files early.`,`jooosi-fon`)})]})]})]}),(0,$.jsxs)(`div`,{className:`grid gap-5 xl:grid-cols-[minmax(0,1fr)_320px] xl:items-start`,children:[(0,$.jsxs)(`div`,{className:`grid min-w-0 gap-5`,children:[(0,$.jsx)(`style`,{children:Ae}),(0,$.jsxs)(Ue,{className:`min-w-0`,spacing:`sm`,dense:!0,children:[(0,$.jsx)(ze,{className:`gap-3 px-4 py-3`,children:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Ve,{children:wp.i18n.__(`Variants`,`jooosi-fon`)}),(0,$.jsx)(Be,{children:wp.i18n.__(`Preview and configure each variant.`,`jooosi-fon`)})]})}),(0,$.jsxs)(U,{className:`p-0`,children:[r.fontFaces.length===0&&(0,$.jsx)(`div`,{className:`grid min-h-40 place-items-center px-4 text-center`,role:`status`,"aria-live":`polite`,children:(0,$.jsxs)(`div`,{children:[E?(0,$.jsx)(xe,{className:`mx-auto mb-3 size-7 text-primary`}):(0,$.jsx)(Ne,{"aria-hidden":`true`,className:`mx-auto mb-3 size-7 text-primary`}),(0,$.jsx)(`p`,{className:`m-0 text-sm font-medium`,children:E?wp.i18n.__(`Loading font variants…`,`jooosi-fon`):r.fontData?wp.i18n.__(`No variants match the selected subsets.`,`jooosi-fon`):wp.i18n.__(`Select a font family to preview its variants.`,`jooosi-fon`)}),(0,$.jsx)(`p`,{className:`m-0 text-xs text-muted-foreground`,children:E?wp.i18n.__(`The editor will update automatically.`,`jooosi-fon`):r.fontData?wp.i18n.__(`Try another subset or refresh the catalog.`,`jooosi-fon`):wp.i18n.__(`Use the Font Family field above to get started.`,`jooosi-fon`)})]})}),r.fontFaces.map(e=>{let t=ce.includes(e.id);return(0,$.jsxs)(`section`,{className:c(`border-b last:border-b-0`,!e.isEnabled&&`bg-muted/20`),children:[(0,$.jsxs)(`div`,{className:`grid gap-3 px-3 py-3 md:grid-cols-[44px_112px_minmax(12rem,1fr)_auto] md:items-center`,children:[(0,$.jsx)(H,{checked:e.isEnabled,onCheckedChange:t=>B(e.id,{isEnabled:t}),"aria-label":`${wp.i18n.__(`Include`,`jooosi-fon`)} ${e.key}`}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{className:`m-0 text-sm font-semibold`,children:e.weight===0?wp.i18n.__(`Variable`,`jooosi-fon`):e.weight}),(0,$.jsx)(`p`,{className:`m-0 text-xs capitalize text-muted-foreground`,children:e.style})]}),(0,$.jsx)(`div`,{className:c(`min-w-0 rounded-lg border bg-card px-3 py-2 transition-[background-color,color,opacity]`,!e.isEnabled&&`bg-muted/50 text-muted-foreground opacity-50`),children:(0,$.jsx)(Fe,{value:te,onChange:e=>ne(e.target.value),"aria-label":`${wp.i18n.__(`Preview text for variant`,`jooosi-fon`)} ${e.key}`,placeholder:wp.i18n.__(`Type preview text…`,`jooosi-fon`),className:c(`h-auto min-w-0 border-0 bg-transparent p-0 shadow-none focus-visible:border-transparent focus-visible:ring-0`,!e.isEnabled&&`text-muted-foreground`),style:{fontFamily:r.fontData?`'JooosiFonGooglePreview', sans-serif`:`inherit`,fontSize:`${P}px`,fontWeight:e.weight===0?F:e.weight,fontStyle:e.style,fontStretch:e.width?`${I}%`:`100%`}})}),(0,$.jsx)(`div`,{className:`flex justify-end`,children:(0,$.jsx)(d,{type:`button`,variant:`ghost`,size:`icon`,"aria-expanded":t,"aria-label":t?wp.i18n.__(`Close variant settings`,`jooosi-fon`):wp.i18n.__(`Open variant settings`,`jooosi-fon`),onClick:()=>ve(e.id),children:(0,$.jsx)(ee,{className:t?`rotate-180 transition-transform`:`transition-transform`})})})]}),t&&(0,$.jsxs)(`div`,{className:`grid gap-4 border-t bg-muted/20 p-4 sm:grid-cols-2 lg:grid-cols-4`,children:[(0,$.jsx)(V,{label:wp.i18n.__(`Display override`,`jooosi-fon`),children:(0,$.jsxs)(Te,{value:e.display,onChange:t=>B(e.id,{display:t.target.value}),children:[(0,$.jsx)(`option`,{value:``,children:wp.i18n.__(`Use family default`,`jooosi-fon`)}),[`auto`,`block`,`swap`,`fallback`,`optional`].map(e=>(0,$.jsx)(`option`,{children:e},e))]})}),(0,$.jsx)(V,{label:wp.i18n.__(`Variant selector`,`jooosi-fon`),children:(0,$.jsx)(we,{value:e.selector,onChange:t=>B(e.id,{selector:t.target.value}),placeholder:`.font-bold`})}),(0,$.jsx)(V,{label:wp.i18n.__(`Variant note`,`jooosi-fon`),children:(0,$.jsx)(we,{value:e.comment,onChange:t=>B(e.id,{comment:t.target.value}),placeholder:`latin`})}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-lg border bg-card px-3 py-2`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{id:`preload-${e.id}`,className:`m-0 text-sm font-medium`,children:wp.i18n.__(`Preload variant`,`jooosi-fon`)}),(0,$.jsx)(`p`,{id:`preload-help-${e.id}`,className:`m-0 text-xs text-muted-foreground`,children:wp.i18n.__(`Request this variant early.`,`jooosi-fon`)})]}),(0,$.jsx)(H,{size:`sm`,checked:e.preload,onCheckedChange:t=>B(e.id,{preload:t}),"aria-labelledby":`preload-${e.id}`,"aria-describedby":`preload-help-${e.id}`})]})]})]},e.id)})]}),r.fontFaces.length>0&&(0,$.jsxs)(He,{className:`flex-row flex-wrap items-center justify-end gap-3 px-4 py-3`,children:[(0,$.jsx)(qe,{compact:!0,label:wp.i18n.__(`Size`,`jooosi-fon`),value:P,suffix:`px`,min:12,max:96,onChange:re}),Me&&(0,$.jsx)(qe,{compact:!0,label:wp.i18n.__(`Width`,`jooosi-fon`),value:I,suffix:`%`,min:Me.min,max:Me.max,onChange:ae}),je&&(0,$.jsx)(qe,{compact:!0,label:wp.i18n.__(`Weight`,`jooosi-fon`),value:F,min:je.min,max:je.max,onChange:ie})]})]})]}),(0,$.jsxs)(`aside`,{className:`grid gap-5 xl:sticky xl:top-[calc(var(--wp-admin--admin-bar--height,32px)+5rem)]`,children:[(0,$.jsxs)(Ue,{stacked:!0,spacing:`sm`,children:[(0,$.jsxs)(ze,{className:`flex-row items-center justify-between`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Ve,{children:wp.i18n.__(`Publish`,`jooosi-fon`)}),(0,$.jsx)(Be,{children:wp.i18n.__(`Make this font available on your website.`,`jooosi-fon`)})]}),E&&(0,$.jsxs)(`span`,{role:`status`,"aria-live":`polite`,className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,$.jsx)(xe,{}),wp.i18n.__(`Loading…`,`jooosi-fon`)]})]}),(0,$.jsx)(U,{className:`grid gap-4`,children:r.fontData?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{className:`mb-2 text-sm font-medium`,children:wp.i18n.__(`Subsets`,`jooosi-fon`)}),(0,$.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:r.fontData.subsets.map(e=>{let t=r.subsets.includes(e);return(0,$.jsxs)(`label`,{className:`flex items-center gap-2 rounded-lg border px-2.5 py-2 text-xs`,children:[(0,$.jsx)(T,{checked:t,disabled:t&&r.subsets.length===1,onCheckedChange:t=>be(e,t)}),e]},e)})})]}):(0,$.jsx)(`p`,{className:`m-0 py-5 text-center text-sm text-muted-foreground`,children:wp.i18n.__(`Select a family from the catalog.`,`jooosi-fon`)})}),(0,$.jsxs)(U,{className:`grid gap-4`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{className:`mb-2 text-sm font-medium`,children:wp.i18n.__(`File formats`,`jooosi-fon`)}),(0,$.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:[`woff2`,`woff`,`ttf`].map(e=>{let t=r.formats.includes(e);return(0,$.jsxs)(`label`,{className:`flex items-center gap-2 rounded-lg border px-2.5 py-2 text-xs`,children:[(0,$.jsx)(T,{checked:t,disabled:t&&r.formats.length===1,onCheckedChange:t=>De(e,t)}),e.toUpperCase()]},e)})})]}),(0,$.jsx)(We,{}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{className:`m-0 text-sm font-medium`,children:wp.i18n.__(`Variable font`,`jooosi-fon`)}),(0,$.jsx)(`p`,{className:`m-0 text-xs text-muted-foreground`,children:r.fontData?.axes?.length?wp.i18n.__(`Use available axes`,`jooosi-fon`):wp.i18n.__(`Unavailable`,`jooosi-fon`)})]}),(0,$.jsx)(H,{checked:r.variable,disabled:!r.fontData?.axes?.length,onCheckedChange:ye,"aria-label":wp.i18n.__(`Use variable font`,`jooosi-fon`)})]})]}),(0,$.jsx)(U,{className:`grid gap-4 text-sm`,children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,$.jsx)(`span`,{children:r.status?wp.i18n.__(`Publish`,`jooosi-fon`):wp.i18n.__(`Draft`,`jooosi-fon`)}),(0,$.jsx)(H,{checked:r.status,onCheckedChange:e=>i({...r,status:e}),"aria-label":wp.i18n.__(`Publish status`,`jooosi-fon`)})]})}),(0,$.jsxs)(He,{children:[(0,$.jsxs)(d,{className:`w-full`,type:`submit`,disabled:O||E,children:[O||E?(0,$.jsx)(xe,{}):(0,$.jsx)(Ce,{"data-icon":`inline-start`}),wp.i18n.__(`Save`,`jooosi-fon`)]}),n&&(0,$.jsxs)(d,{type:`button`,variant:`destructive`,className:`w-full`,onClick:ke,disabled:A,children:[A?(0,$.jsx)(xe,{}):(0,$.jsx)(Pe,{}),wp.i18n.__(`Move to trash`,`jooosi-fon`)]})]})]}),r.fontData&&(0,$.jsxs)(Ue,{spacing:`sm`,children:[(0,$.jsxs)(ze,{children:[(0,$.jsx)(Ve,{children:wp.i18n.__(`Font information`,`jooosi-fon`)}),(0,$.jsx)(Be,{children:wp.i18n.__(`Catalog metadata for the selected family.`,`jooosi-fon`)})]}),(0,$.jsxs)(U,{className:`grid gap-3 text-sm`,children:[(0,$.jsxs)(`div`,{className:`flex justify-between gap-4`,children:[(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:wp.i18n.__(`Rank`,`jooosi-fon`)}),(0,$.jsx)(`strong`,{className:`font-medium`,children:typeof r.fontData.popularity==`number`?`#${r.fontData.popularity}`:`—`})]}),(0,$.jsxs)(`div`,{className:`flex justify-between gap-4`,children:[(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:wp.i18n.__(`Category`,`jooosi-fon`)}),(0,$.jsx)(`strong`,{className:`font-medium`,children:r.fontData.category||`—`})]}),(0,$.jsxs)(`div`,{className:`flex justify-between gap-4`,children:[(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:wp.i18n.__(`Designer`,`jooosi-fon`)}),(0,$.jsx)(`strong`,{className:`text-right font-medium`,children:r.fontData.designers?.join(`, `)||`—`})]}),(0,$.jsxs)(`div`,{className:`flex justify-between gap-4`,children:[(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:wp.i18n.__(`Last modified`,`jooosi-fon`)}),(0,$.jsx)(`strong`,{className:`font-medium`,children:(0,$.jsx)(`time`,{dateTime:r.fontData.modifiedAt||r.fontData.lastModified,children:Pn(r.fontData.modifiedAt||r.fontData.lastModified)})})]}),(0,$.jsxs)(`div`,{className:`flex justify-between gap-4`,children:[(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:wp.i18n.__(`Version`,`jooosi-fon`)}),(0,$.jsx)(`strong`,{className:`font-medium`,children:r.fontData.version||`—`})]}),(0,$.jsxs)(`div`,{className:`flex justify-between gap-4`,children:[(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:wp.i18n.__(`Subsets`,`jooosi-fon`)}),(0,$.jsx)(`strong`,{className:`font-medium`,children:r.fontData.subsets.length})]}),(0,$.jsxs)(`div`,{className:`flex justify-between gap-4`,children:[(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:wp.i18n.__(`Variants`,`jooosi-fon`)}),(0,$.jsx)(`strong`,{className:`font-medium`,children:r.fontData.variants.length})]}),!!r.fontData.axes?.length&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(We,{}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{className:`mb-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:wp.i18n.__(`Variable axes`,`jooosi-fon`)}),(0,$.jsx)(`div`,{className:`grid gap-2`,children:r.fontData.axes?.map(e=>(0,$.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto_auto] gap-3 rounded-md bg-muted/50 px-2.5 py-2 text-xs`,children:[(0,$.jsx)(`strong`,{children:e.tag}),(0,$.jsx)(`span`,{children:e.min}),(0,$.jsx)(`span`,{children:e.max})]},e.tag))})]})]})]})]})]})]})]})}export{zn as GoogleFontEditorPage};