ikoneme-lib 0.1.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,32 @@ export function getBorderConfig(borderId: any): {
3
3
  label: string;
4
4
  color: string;
5
5
  plural: boolean;
6
+ image: any;
7
+ };
8
+ export function getBorderMetrics(size: any): {
9
+ frame: number;
10
+ corner: number;
11
+ };
12
+ export function getBorderImageStyle(border: any, size: any): {
13
+ borderStyle?: undefined;
14
+ borderColor?: undefined;
15
+ borderWidth?: undefined;
16
+ borderImageSource?: undefined;
17
+ borderImageSlice?: undefined;
18
+ borderImageWidth?: undefined;
19
+ borderImageRepeat?: undefined;
20
+ borderRadius?: undefined;
21
+ backgroundClip?: undefined;
22
+ } | {
23
+ borderStyle: string;
24
+ borderColor: string;
25
+ borderWidth: string;
26
+ borderImageSource: string;
27
+ borderImageSlice: string;
28
+ borderImageWidth: string;
29
+ borderImageRepeat: string;
30
+ borderRadius: number;
31
+ backgroundClip: string;
6
32
  };
7
33
  export function getIconConfig(zone: any, url: any): any;
8
34
  export function getIconUrlByIndex(zone: any, index: any): any;
@@ -36,36 +62,22 @@ export function createDefaultIkon(): {
36
62
  };
37
63
  border: any;
38
64
  };
39
- export function normalizeIkon(icon: any): any;
40
- export function normalizeIkoneme(ikons: any): any;
41
- export function generateIkonemeFromText(text: any): {
42
- context: {
43
- name: any;
44
- url: any;
45
- };
65
+ export function createEmptyIkon(): {
66
+ context: any;
46
67
  reference: {
47
68
  left: any;
48
69
  right: any;
49
70
  };
50
- role: {
51
- name: any;
52
- url: any;
53
- };
54
- modes: {
55
- name: any;
56
- url: any;
57
- };
58
- root: {
59
- name: any;
60
- url: any;
61
- };
71
+ role: any;
72
+ modes: any;
73
+ root: any;
62
74
  rootName: any;
63
- tenses: {
64
- name: any;
65
- url: any;
66
- };
75
+ tenses: any;
67
76
  border: any;
68
- }[];
77
+ };
78
+ export function normalizeIkon(icon: any): any;
79
+ export function normalizeIkoneme(ikons: any): any;
80
+ export function generateIkonemeFromText(text: any): Promise<any[]>;
69
81
  export namespace ZONE_CONFIG {
70
82
  let context: {
71
83
  tooltip: string;
@@ -97,5 +109,6 @@ export const BORDER_CONFIG: {
97
109
  label: string;
98
110
  color: string;
99
111
  plural: boolean;
112
+ image: any;
100
113
  }[];
101
114
  export const BORDER_IDS: string[];
@@ -1,41 +1,41 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),S=require("react");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),B=require("react");/**
2
2
  * @license lucide-react v0.294.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */var je={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
6
+ */var De={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
7
7
  * @license lucide-react v0.294.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const Ie=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),D=(e,n)=>{const s=S.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:p=2,absoluteStrokeWidth:c,className:w="",children:f,..._},T)=>S.createElement("svg",{ref:T,...je,width:i,height:i,stroke:r,strokeWidth:c?Number(p)*24/Number(i):p,className:["lucide",`lucide-${Ie(e)}`,w].join(" "),..._},[...n.map(([j,b])=>S.createElement(j,b)),...Array.isArray(f)?f:[f]]));return s.displayName=`${e}`,s};/**
11
+ */const Le=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),z=(e,t)=>{const o=B.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:c=2,absoluteStrokeWidth:n,className:y="",children:g,...s},a)=>B.createElement("svg",{ref:a,...De,width:i,height:i,stroke:r,strokeWidth:n?Number(c)*24/Number(i):c,className:["lucide",`lucide-${Le(e)}`,y].join(" "),...s},[...t.map(([u,v])=>B.createElement(u,v)),...Array.isArray(g)?g:[g]]));return o.displayName=`${e}`,o};/**
12
12
  * @license lucide-react v0.294.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const Se=D("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
16
+ */const Oe=z("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
17
17
  * @license lucide-react v0.294.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const _e=D("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]]);/**
21
+ */const Re=z("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]]);/**
22
22
  * @license lucide-react v0.294.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */const Ne=D("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
26
+ */const Ge=z("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
27
27
  * @license lucide-react v0.294.0 - ISC
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const Te=D("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
31
+ */const Ke=z("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
32
32
  * @license lucide-react v0.294.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const Ke=D("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),g={context:[{tooltip:"Male",url:"https://text2ikon.komunikon.com/gender-assets/KomunIKON_Male.svg"},{tooltip:"Female",url:"https://text2ikon.komunikon.com/gender-assets/KomunIKON_Female.svg"},{tooltip:"Non Binary",url:"https://text2ikon.komunikon.com/gender-assets/KomunIKON_Non-Binary.png"}],reference:[{tooltip:"Asterisk",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_asterisk.svg"},{tooltip:"Zero",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Zero.svg"},{tooltip:"One",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_One.svg"},{tooltip:"Two",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Two.svg"},{tooltip:"Three",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Three.svg"},{tooltip:"Four",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Four.svg"},{tooltip:"Five",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Five.svg"},{tooltip:"Six",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Six.svg"},{tooltip:"Seven",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Seven.svg"},{tooltip:"Eight",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Eight.svg"},{tooltip:"Nine",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Nine.svg"}],role:[{tooltip:"agent",url:"https://text2ikon.komunikon.com/case-assets/KomunIKON_agent.svg"},{tooltip:"patient",url:"https://text2ikon.komunikon.com/case-assets/KomunIKON_patient.svg"},{tooltip:"reflexive",url:"https://text2ikon.komunikon.com/case-assets/KomunIKON_reflexive.svg"},{tooltip:"recipricol",url:"https://text2ikon.komunikon.com/_next/image?url=%2Fcase-assets%2Frecipricol.jpg&w=48&q=75"}],modes:[{tooltip:"Exclam",url:"https://text2ikon.komunikon.com/mode-assets/KomunIKON_Exclam.svg"},{tooltip:"Which",url:"https://text2ikon.komunikon.com/mode-assets/KomunIKON_Which.svg"}],root:[{tooltip:"Love/Passion",url:"https://ikondb.komunikon.com/uploads/images/icons/ZFcaar88AP.png"},{tooltip:"Star/Excellence",url:"https://ikondb.komunikon.com/uploads/images/icons/M0ADaSXzWe.png"},{tooltip:"Value/Precious",url:"https://ikondb.komunikon.com/uploads/images/icons/6ghAUKbdIs.png"},{tooltip:"Fire/Hot",url:"https://ikondb.komunikon.com/uploads/images/icons/zq0n4vHSQW.png"},{tooltip:"Water/Fluid",url:"https://ikondb.komunikon.com/uploads/images/icons/DVhDIm6KqB.png"},{tooltip:"Flower/Beauty",url:"https://ikondb.komunikon.com/uploads/images/icons/UnpCfhHsUa.png"},{tooltip:"Leaf/Nature",url:"https://ikondb.komunikon.com/uploads/images/icons/5Ex6my6BI7.png"}],tenses:[{tooltip:"adas",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_adas.svg"},{tooltip:"adis",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_adis.svg"},{tooltip:"ados",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_ados.svg"},{tooltip:"antas",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_antas.svg"},{tooltip:"antis",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_antis.svg"},{tooltip:"antos",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_antos.svg"},{tooltip:"as",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_as.svg"},{tooltip:"intas",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_intas.svg"},{tooltip:"intis",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_intis.svg"},{tooltip:"intis2",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_intis2.svg"},{tooltip:"intos",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_intos.svg"},{tooltip:"intos2",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_intos2.svg"},{tooltip:"is",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_is.svg"},{tooltip:"ontas",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_ontas.svg"},{tooltip:"ontis",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_ontis.svg"},{tooltip:"ontis2",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_ontis2.svg"},{tooltip:"ontos",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_ontos.svg"},{tooltip:"ontos2",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_ontos2.svg"},{tooltip:"os",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_os.svg"}]},L=[{id:"name",label:"Name",color:"#60a5fa",plural:!1},{id:"verb",label:"Verb",color:"#f87171",plural:!1},{id:"adjective",label:"Adjective",color:"#4ade80",plural:!1},{id:"adverb",label:"Adverb",color:"#fb923c",plural:!1},{id:"conjunction",label:"Conjunction",color:"#a78bfa",plural:!1},{id:"neutral",label:"Neutral",color:"#94a3b8",plural:!1},{id:"name_plural",label:"Name (plural)",color:"#60a5fa",plural:!0},{id:"verb_plural",label:"Verb (plural)",color:"#f87171",plural:!0},{id:"adjective_plural",label:"Adjective (plural)",color:"#4ade80",plural:!0},{id:"adverb_plural",label:"Adverb (plural)",color:"#fb923c",plural:!0},{id:"conjunction_plural",label:"Conjunction (plural)",color:"#a78bfa",plural:!0},{id:"neutral_plural",label:"Neutral (plural)",color:"#94a3b8",plural:!0}],ne=L.map(e=>e.id),Re=new Set(ne);function re(e){return L.find(n=>n.id===e)??null}function K(e,n){var s;return(s=g[e])==null?void 0:s.find(r=>r.url===n)}function Ce(e,n){var s,r;return(r=(s=g[e])==null?void 0:s[n])==null?void 0:r.url}function N(e){return e==null?null:typeof e=="object"&&"url"in e?e.url:e}function ie(e){return e==null?null:typeof e=="object"?e.svg||e.url||null:e}function k(e){return{name:e.tooltip,url:e.url}}function q(){return{context:k(g.context[0]),reference:{left:null,right:null},role:k(g.role[0]),modes:k(g.modes[0]),root:k(g.root[0]),rootName:null,tenses:k(g.tenses[0]),border:null}}function se(e){var f,_,T,j,b,m,I;if(!e)return e;const n=e.reference||{left:null,right:null},s=typeof e.context=="string"?K("context",e.context):null,r=typeof e.role=="string"?K("role",e.role):null,i=typeof e.modes=="string"?K("modes",e.modes):null,p=typeof e.root=="string"?K("root",e.root):null,c=typeof e.tenses=="string"?K("tenses",e.tenses):null,w=e.border!=null&&Re.has(e.border)?e.border:null;return{...e,context:typeof e.context=="object"&&((f=e.context)==null?void 0:f.url)!=null?e.context:s?k(s):{name:"",url:e.context||""},reference:{left:n.left==null?null:typeof n.left=="object"&&((_=n.left)==null?void 0:_.url)!=null?n.left:K("reference",n.left)?k(K("reference",n.left)):{name:"",url:n.left},right:n.right==null?null:typeof n.right=="object"&&((T=n.right)==null?void 0:T.url)!=null?n.right:K("reference",n.right)?k(K("reference",n.right)):{name:"",url:n.right}},role:typeof e.role=="object"&&((j=e.role)==null?void 0:j.url)!=null?e.role:r?k(r):{name:"",url:e.role||""},modes:typeof e.modes=="object"&&((b=e.modes)==null?void 0:b.url)!=null?e.modes:i?k(i):{name:"",url:e.modes||""},root:typeof e.root=="object"&&((m=e.root)==null?void 0:m.url)!=null?{...e.root,name:e.rootName??e.root.name}:p?{name:e.rootName??p.tooltip,url:p.url}:{name:e.rootName??"",url:e.root||""},tenses:typeof e.tenses=="object"&&((I=e.tenses)==null?void 0:I.url)!=null?e.tenses:c?k(c):{name:"",url:e.tenses||""},border:w}}function Ee(e){return(e||[]).map(se)}function $e(e){let n=0;for(let s=0;s<e.length;s++){const r=e.charCodeAt(s);n=(n<<5)-n+r,n=n&n}return Math.abs(n)}class Me{constructor(n){this.seed=n}next(){const r=Math.pow(2,32);return this.seed=(1664525*this.seed+1013904223)%r,this.seed/r}nextInt(n,s){return Math.floor(this.next()*(s-n))+n}}function Oe(e){const n=e.toLowerCase().split(/\s+/).filter(Boolean),s=[];for(const r of n){const i={...q()},p=$e(r),c=new Me(p);i.context=k(g.context[c.nextInt(0,g.context.length)]);const w=c.next()>.5,f=c.nextInt(1,g.reference.length);i.reference={left:w?k(g.reference[0]):null,right:k(g.reference[f])},i.role=k(g.role[c.nextInt(0,g.role.length)]),i.modes=k(g.modes[c.nextInt(0,g.modes.length)]),i.root=k(g.root[c.nextInt(0,g.root.length)]),i.tenses=k(g.tenses[c.nextInt(0,g.tenses.length)]);const _=L.filter(T=>!T.plural);i.border=_[c.nextInt(0,_.length)].id,s.push(i)}return s.length>0?s:[q()]}const P={maxWidth:"100%",maxHeight:"100%",width:"100%",height:"100%",objectFit:"contain",display:"block",boxSizing:"border-box"},oe=e=>({display:"flex",alignItems:"center",justifyContent:"center",minWidth:0,minHeight:0,overflow:"hidden",boxSizing:"border-box",padding:`${e}px`});function Be(e=768){const[n,s]=S.useState(()=>typeof window<"u"&&window.innerWidth<e);return S.useEffect(()=>{const r=window.matchMedia(`(max-width: ${e-1}px)`),i=()=>s(r.matches);return r.addEventListener("change",i),()=>r.removeEventListener("change",i)},[e]),n}function F({ikon:e,onClick:n,size:s=64,onZoneClick:r,selectedZone:i,isSelected:p=!1,isPaired:c=!1,onEdit:w,onDelete:f,hideActionOverlay:_=!1}){var ee,te;const[T,j]=S.useState(!1),b=Be(),m=e!=null&&e.border?re(e.border):null,I=(a,C)=>{r?(C.stopPropagation(),r(a)):n&&n(C)},R=a=>{r&&(a.currentTarget.style.filter="brightness(1.3)")},y=a=>{r&&(a.currentTarget.style.filter="brightness(1)")},E=(a,C)=>{const z=i===a;return{boxSizing:"border-box",...C,cursor:r||n?"pointer":"default",transition:"all 0.2s, filter 0.2s",border:z?"2px solid var(--ikoneme-primary)":C.border||"none",boxShadow:z?"0 0 8px var(--ikoneme-primary)":"none",position:"relative"}},$=(a,C)=>{const z=ie(C);if(!z)return null;const U=K(a,N(C)),ve=C&&typeof C=="object"&&C.name||(U==null?void 0:U.tooltip)||a;return t.jsx("img",{src:z,alt:ve,style:P,onError:we=>{we.target.style.display="none"}})},o=!_&&!r&&(w||f),l=b?28:24,u=4,d=3*l+2*u,x=o?d:s,h=b||T,v=x,M=Math.max(2,Math.round(v/40)),xe=Math.max(2,Math.round(v/44)),O=Math.max(2,Math.round(v/72)),ge=Math.max(2,Math.round(v/40)),G=1.18,Z=`minmax(0, ${G}fr) repeat(4, minmax(0, ${.95}fr)) minmax(0, ${G}fr)`,he="minmax(0, 0.6fr) minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(0, 0.6fr)",fe=m?{border:`${M}px solid ${m.color}`}:{border:p&&!c?"2px solid rgba(0, 168, 132, 0.8)":"1px solid rgba(255, 255, 255, 0.1)"},X=m!=null&&m.plural?{boxShadow:[`inset -${M}px 0 0 ${m.color}`,`inset -${M*2}px 0 0 ${m.color}`,`inset -${M*3}px 0 0 ${m.color}`,`inset 0 -${M}px 0 ${m.color}`,`inset 0 -${M*2}px 0 ${m.color}`,`inset 0 -${M*3}px 0 ${m.color}`].join(", ")}:{},ke=p&&!c?"rgba(0, 168, 132, 0.15)":"white",Q=m&&!m.plural?X.boxShadow:null,Y=[p&&!c?"0 0 12px rgba(0, 168, 132, 0.4)":null,i==="border"?"0 0 0 3px var(--ikoneme-primary)":null,Q].filter(Boolean).join(", "),be=["0 0 10px rgba(0, 168, 132, 0.5)",Q].filter(Boolean).join(", "),J=t.jsxs(t.Fragment,{children:[t.jsxs("div",{onClick:r?()=>r("border"):n?a=>n(a):void 0,style:{width:`${v}px`,height:`${v}px`,boxSizing:"border-box",display:"grid",padding:`${xe}px`,gridTemplateColumns:Z,gridTemplateRows:Z,cursor:n||r?"pointer":"default",borderRadius:"4px",overflow:"hidden",flexShrink:0,transition:"transform 0.2s, box-shadow 0.2s, border 0.2s",background:ke,boxShadow:Y,...fe},onMouseEnter:a=>{n&&!r&&!c&&(a.currentTarget.style.transform="scale(1.05)",p||(a.currentTarget.style.boxShadow=be))},onMouseLeave:a=>{n&&!r&&!c&&(a.currentTarget.style.transform="scale(1)",p||(a.currentTarget.style.boxShadow=Y))},children:[t.jsx("div",{onClick:a=>I("context",a),onMouseEnter:R,onMouseLeave:y,style:E("context",{gridColumn:"1 / 2",gridRow:"1 / 2",display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(100, 50, 150, 0.1)",borderRight:"1px solid rgba(0, 0, 0, 0.14)",borderBottom:"1px solid rgba(0, 0, 0, 0.14)",minWidth:0,minHeight:0,overflow:"hidden",padding:`${O}px`}),className:"ikoneme-zone",children:$("context",e.context)}),t.jsxs("div",{onClick:a=>I("reference",a),onMouseEnter:R,onMouseLeave:y,style:E("reference",{gridColumn:"2 / 6",gridRow:"1 / 2",display:"grid",gridTemplateColumns:he,gridTemplateRows:"minmax(0, 1fr)",background:"rgba(50, 100, 200, 0.1)",borderRight:"1px solid rgba(0, 0, 0, 0.14)",borderBottom:"1px solid rgba(0, 0, 0, 0.14)",minWidth:0,minHeight:0,overflow:"hidden"}),className:"ikoneme-zone",children:[t.jsx("div",{style:{minWidth:0,minHeight:0,overflow:"hidden",borderRight:"1px solid rgba(0, 0, 0, 0.14)"}}),t.jsx("div",{style:{...oe(O),borderRight:"1px solid rgba(0, 0, 0, 0.14)"},children:N((ee=e.reference)==null?void 0:ee.left)&&t.jsx("img",{src:N(e.reference.left),alt:"Asterisk",style:P,onError:a=>{a.target.style.display="none"}})}),t.jsx("div",{style:{...oe(O),borderRight:"1px solid rgba(0, 0, 0, 0.14)"},children:N((te=e.reference)==null?void 0:te.right)&&t.jsx("img",{src:N(e.reference.right),alt:"Number",style:P,onError:a=>{a.target.style.display="none"}})}),t.jsx("div",{style:{minWidth:0,minHeight:0,overflow:"hidden"}})]}),t.jsx("div",{onClick:a=>I("role",a),onMouseEnter:R,onMouseLeave:y,style:E("role",{gridColumn:"6 / 7",gridRow:"1 / 2",display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(200, 50, 50, 0.1)",borderBottom:"1px solid rgba(0, 0, 0, 0.14)",minWidth:0,minHeight:0,overflow:"hidden",padding:`${O}px`}),className:"ikoneme-zone",children:$("role",e.role)}),t.jsx("div",{onClick:a=>I("modes",a),onMouseEnter:R,onMouseLeave:y,style:E("modes",{gridColumn:"1 / 2",gridRow:"2 / 6",display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(50, 150, 100, 0.1)",borderRight:"1px solid rgba(0, 0, 0, 0.14)",borderBottom:"1px solid rgba(0, 0, 0, 0.14)",minWidth:0,minHeight:0,overflow:"hidden",padding:`${O}px`}),className:"ikoneme-zone",children:$("modes",e.modes)}),t.jsx("div",{onClick:a=>I("root",a),onMouseEnter:R,onMouseLeave:y,style:E("root",{gridColumn:"2 / 6",gridRow:"2 / 6",display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(150, 150, 50, 0.1)",borderRight:"1px solid rgba(0, 0, 0, 0.14)",borderBottom:"1px solid rgba(0, 0, 0, 0.14)",minWidth:0,minHeight:0,overflow:"hidden",padding:`${ge}px`}),className:"ikoneme-zone",children:$("root",e.root)}),t.jsx("div",{onClick:a=>{r&&(a.stopPropagation(),r("border"))},style:{gridColumn:"6 / 7",gridRow:"2 / 6",background:"rgba(0, 0, 0, 0.05)",borderBottom:"1px solid rgba(0, 0, 0, 0.14)",minWidth:0,minHeight:0,overflow:"hidden",boxSizing:"border-box",cursor:r?"pointer":"default"}}),t.jsx("div",{onClick:a=>I("tenses",a),onMouseEnter:R,onMouseLeave:y,style:E("tenses",{gridColumn:"1 / 7",gridRow:"6 / 7",display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(100, 100, 200, 0.1)",minWidth:0,minHeight:0,overflow:"hidden",padding:`${O}px`}),className:"ikoneme-zone",children:$("tenses",e.tenses)})]}),(m==null?void 0:m.plural)&&t.jsx("div",{"aria-hidden":!0,style:{position:"absolute",top:0,left:0,right:0,bottom:0,width:`${v}px`,height:`${v}px`,borderRadius:"4px",pointerEvents:"none",...X}})]}),ye=t.jsx("div",{style:{minHeight:`${l}px`,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"},"aria-hidden":!h,children:t.jsxs("div",{style:{display:"flex",gap:`${u}px`,flexWrap:"nowrap",width:`${d}px`,justifyContent:"center",opacity:h?1:0,pointerEvents:h?"auto":"none",transition:"opacity 0.15s ease"},children:[w&&t.jsx("button",{onClick:a=>{a.stopPropagation(),w()},style:{width:`${l}px`,height:`${l}px`,borderRadius:"6px",border:"none",background:"rgba(0, 168, 132, 0.95)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background 0.2s",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.3)"},onMouseEnter:a=>a.currentTarget.style.background="rgba(0, 168, 132, 1)",onMouseLeave:a=>a.currentTarget.style.background="rgba(0, 168, 132, 0.95)",title:"Edit",children:t.jsx(_e,{size:b?16:14,color:"white"})}),f&&t.jsx("button",{onClick:a=>{a.stopPropagation(),f()},style:{width:`${l}px`,height:`${l}px`,borderRadius:"6px",border:"none",background:"rgba(220, 38, 38, 0.95)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background 0.2s",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.3)"},onMouseEnter:a=>a.currentTarget.style.background="rgba(220, 38, 38, 1)",onMouseLeave:a=>a.currentTarget.style.background="rgba(220, 38, 38, 0.95)",title:"Delete",children:t.jsx(Te,{size:b?16:14,color:"white"})})]})});return o?t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",width:`${d}px`,flexShrink:0,gap:"6px"},onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),children:[t.jsx("div",{style:{position:"relative",width:`${v}px`,height:`${v}px`},children:J}),ye]}):t.jsx("div",{style:{position:"relative",width:`${s}px`,height:`${s}px`,flexShrink:0},onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),children:J})}const V="https://ikondb.iigap.com",Le=60*60*1e3;let W=null,B=null;const A=new Map;function ze(e){return!e||Array.isArray(e)?null:e.origin||e.preview||e.thumb||e.svg||null}function We(e){if(!e||Array.isArray(e))return{};const{origin:n=null,preview:s=null,thumb:r=null,svg:i=null}=e;return{origin:n,preview:s,thumb:r,svg:i}}async function Ae(e){const n=await fetch(`${e}/api/ikons`);if(!n.ok)throw new Error(`IkonDB GET /api/ikons -> ${n.status}`);const s=await n.json();return(Array.isArray(s==null?void 0:s.data)?s.data:[]).map(i=>({id:i.id,name:i.description||"",url:ze(i.media)})).filter(i=>i.url)}async function le({baseUrl:e=V}={}){return W&&Date.now()-W.at<Le?W.list:B||(B=Ae(e).then(n=>(W={at:Date.now(),list:n},n)).finally(()=>{B=null}),B)}async function ae(e,{baseUrl:n=V,limit:s=20}={}){const r=(e||"").trim().toLowerCase();if(!r)return[];const i=await le({baseUrl:n}),p=[];for(const c of i)if(c.name.toLowerCase().includes(r)&&(p.push(c),p.length>=s))break;return p}async function ce(e,{baseUrl:n=V}={}){if(e==null)return null;if(A.has(e))return A.get(e);const s=await fetch(`${n}/api/ikons/${encodeURIComponent(e)}`);if(!s.ok)throw new Error(`IkonDB GET /api/ikons/${e} -> ${s.status}`);const r=await s.json();if((r==null?void 0:r.status)!=="success"||!(r!=null&&r.data))return A.set(e,null),null;const i=We(r.data.media),p={id:r.data.id,name:r.data.description||"",url:i.origin||i.preview||i.thumb||i.svg||null,...i};return A.set(e,p),p}async function de(e){try{return await ae(e)}catch{return[]}}function De(){W=null,B=null,A.clear()}const H={context:{name:"Context",description:"Northwest - Contextual information"},reference:{name:"Reference",description:"North - Reference point"},role:{name:"Role",description:"Northeast - Role indicator"},modes:{name:"Modes",description:"West - Mode settings"},root:{name:"Root",description:"Center - Core meaning"},tenses:{name:"Tenses",description:"South - Time/tense indicator"},border:{name:"Border",description:"Grammatical category — singular (one border) or plural (stacked borders)"}},He=1,Fe=300,Ve=10,Ue=5;function ue({ikon:e,onSave:n,onClose:s,searchRoot:r=de}){const[i,p]=S.useState({...e,reference:e.reference?{...e.reference}:{left:null,right:null},rootName:e.rootName??null}),[c,w]=S.useState("root"),[f,_]=S.useState(""),[T,j]=S.useState([]),[b,m]=S.useState(!1),I=(o,l)=>{const u=K(o==="reference"?"reference":o,l),d=u?{name:u.tooltip,url:u.url}:{name:"",url:l};if(o==="reference"){const x=g.reference[0].url;p(l===x?h=>{var v;return{...h,reference:{...h.reference,left:N((v=h.reference)==null?void 0:v.left)===x?null:{name:g.reference[0].tooltip,url:x}}}}:h=>{var v;return{...h,reference:{...h.reference,right:N((v=h.reference)==null?void 0:v.right)===l?null:d}}})}else p(x=>({...x,[o]:N(x[o])===l?null:d}))},R=o=>{w(o)},y=o=>{p(l=>({...l,border:o==null||l.border===o?null:o}))};S.useEffect(()=>{if(c!=="root"||f.length<He){j([]);return}const o=setTimeout(async()=>{m(!0);try{const l=await r(f.trim());j((l||[]).slice(0,Ve))}catch{j([])}finally{m(!1)}},Fe);return()=>clearTimeout(o)},[c,f,r]);const E=S.useCallback(async o=>{if(p(l=>({...l,root:{id:o.id??null,name:o.name,url:o.url},rootName:o.name})),o.id!=null)try{const l=await ce(o.id);if(!l)return;p(u=>{var d;return((d=u.root)==null?void 0:d.id)!==o.id?u:{...u,root:{id:l.id,name:o.name,url:l.origin||o.url,svg:l.svg||void 0,thumb:l.thumb||void 0,preview:l.preview||void 0},rootName:o.name}})}catch{}},[]),$=()=>{n(i),s()};return t.jsxs("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"var(--ikoneme-background)",display:"flex",flexDirection:"column",zIndex:1e3,overflow:"hidden"},children:[t.jsxs("div",{style:{padding:"16px 20px",background:"var(--ikoneme-panel-bg)",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flex:1},children:[t.jsx("button",{onClick:s,style:{background:"transparent",border:"none",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center"},title:"Back",children:t.jsx(Se,{color:"var(--ikoneme-text-primary)",size:24})}),t.jsx("h2",{style:{color:"var(--ikoneme-text-primary)",fontSize:"clamp(18px, 4vw, 20px)",fontWeight:"600",margin:0},children:"Edit Ikon"})]}),t.jsx("button",{onClick:$,style:{padding:"10px 24px",background:"var(--ikoneme-primary)",border:"none",borderRadius:"8px",color:"white",cursor:"pointer",fontSize:"clamp(13px, 3vw, 14px)",fontWeight:"500",transition:"background 0.2s",whiteSpace:"nowrap"},onMouseEnter:o=>o.currentTarget.style.background="var(--ikoneme-primary-dark)",onMouseLeave:o=>o.currentTarget.style.background="var(--ikoneme-primary)",children:"Save"})]}),t.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"20px",maxWidth:"800px",width:"100%",margin:"0 auto",WebkitOverflowScrolling:"touch"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",marginBottom:"24px",gap:"12px"},children:[t.jsx("p",{style:{color:"var(--ikoneme-text-secondary)",fontSize:"clamp(12px, 3vw, 13px)",textAlign:"center"},children:"Click on a zone or the border area to edit it"}),t.jsx(F,{ikon:i,size:280,onZoneClick:R,selectedZone:c}),t.jsx("div",{style:{color:"var(--ikoneme-text-primary)",fontSize:"clamp(14px, 3.5vw, 16px)",fontWeight:"500",textAlign:"center",padding:"8px 16px",background:"var(--ikoneme-primary)",borderRadius:"20px"},children:H[c].name})]}),t.jsxs("div",{style:{marginBottom:"20px"},children:[t.jsx("h3",{style:{color:"var(--ikoneme-text-primary)",fontSize:"clamp(14px, 3.5vw, 16px)",marginBottom:"8px",fontWeight:"500"},children:c==="border"?"Select Border Type":"Choose Icon for: "+H[c].name}),c==="border"?t.jsxs("p",{style:{color:"var(--ikoneme-text-secondary)",fontSize:"clamp(11px, 2.5vw, 12px)",marginBottom:"12px"},children:[H.border.description,". Click the same border again to clear."]}):c==="reference"?t.jsxs("p",{style:{color:"var(--ikoneme-text-secondary)",fontSize:"clamp(11px, 2.5vw, 12px)",marginBottom:"12px"},children:["Click ",t.jsx("strong",{children:"Asterisk"})," to toggle left cell. Click any ",t.jsx("strong",{children:"number"})," ","to toggle right cell."]}):c==="root"?t.jsx("p",{style:{color:"var(--ikoneme-text-secondary)",fontSize:"clamp(11px, 2.5vw, 12px)",marginBottom:"12px"},children:"Search for an icon below. The icon's name is stored with the ikon."}):t.jsxs("p",{style:{color:"var(--ikoneme-text-secondary)",fontSize:"clamp(11px, 2.5vw, 12px)",marginBottom:"12px"},children:[H[c].description,". Click the same icon again to clear."]}),c==="border"?t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{marginBottom:"12px"},children:t.jsx("button",{onClick:()=>y(null),style:{width:"100%",padding:"10px 14px",background:i.border==null?"var(--ikoneme-primary)":"var(--ikoneme-surface)",border:`2px solid ${i.border==null?"var(--ikoneme-primary-dark)":"var(--ikoneme-border)"}`,borderRadius:"8px",color:i.border==null?"white":"var(--ikoneme-text-primary)",fontSize:"14px",cursor:"pointer",textAlign:"left",fontWeight:i.border==null?"600":"400",transition:"all 0.2s"},children:"No border"})}),t.jsx("div",{style:{marginBottom:"8px"},children:t.jsx("span",{style:{color:"var(--ikoneme-text-secondary)",fontSize:"12px",fontWeight:"600"},children:"Singular"})}),t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"10px",marginBottom:"16px"},children:L.filter(o=>!o.plural).map(o=>{const l=i.border===o.id;return t.jsxs("button",{onClick:()=>y(o.id),title:o.label,style:{padding:"8px",background:l?"var(--ikoneme-primary)":"var(--ikoneme-surface)",border:`2px solid ${l?"var(--ikoneme-primary-dark)":"var(--ikoneme-border)"}`,borderRadius:"8px",cursor:"pointer",display:"flex",flexDirection:"column",alignItems:"center",gap:"6px",transition:"all 0.2s",position:"relative"},onMouseEnter:d=>{l||(d.currentTarget.style.background="var(--ikoneme-hover)")},onMouseLeave:d=>{l||(d.currentTarget.style.background="var(--ikoneme-surface)")},children:[t.jsx("div",{style:{border:`5px solid ${o.color}`,borderRadius:"4px",width:"64px",height:"64px",flexShrink:0}}),t.jsx("span",{style:{fontSize:"11px",color:l?"white":"var(--ikoneme-text-primary)",fontWeight:l?"600":"400"},children:o.label}),t.jsx("div",{className:"ikon-tooltip",style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",background:"rgba(0,0,0,0.95)",color:"white",padding:"6px 10px",borderRadius:"6px",fontSize:"11px",whiteSpace:"nowrap",opacity:0,pointerEvents:"none",transition:"opacity 0.2s",marginBottom:"8px",zIndex:100},children:o.label})]},o.id)})}),t.jsx("div",{style:{marginBottom:"8px"},children:t.jsx("span",{style:{color:"var(--ikoneme-text-secondary)",fontSize:"12px",fontWeight:"600"},children:"Plural"})}),t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"10px"},children:L.filter(o=>o.plural).map(o=>{const l=i.border===o.id,u=5,d={boxShadow:[`inset -${u}px 0 0 ${o.color}`,`inset -${u*2}px 0 0 ${o.color}`,`inset -${u*3}px 0 0 ${o.color}`,`inset 0 -${u}px 0 ${o.color}`,`inset 0 -${u*2}px 0 ${o.color}`,`inset 0 -${u*3}px 0 ${o.color}`].join(", ")};return t.jsxs("button",{onClick:()=>y(o.id),title:o.label,style:{padding:"8px",background:l?"var(--ikoneme-primary)":"var(--ikoneme-surface)",border:`2px solid ${l?"var(--ikoneme-primary-dark)":"var(--ikoneme-border)"}`,borderRadius:"8px",cursor:"pointer",display:"flex",flexDirection:"column",alignItems:"center",gap:"6px",transition:"all 0.2s",position:"relative"},onMouseEnter:x=>{l||(x.currentTarget.style.background="var(--ikoneme-hover)")},onMouseLeave:x=>{l||(x.currentTarget.style.background="var(--ikoneme-surface)")},children:[t.jsx("div",{style:{border:`${u}px solid ${o.color}`,borderRadius:"4px",width:"64px",height:"64px",flexShrink:0,...d}}),t.jsx("span",{style:{fontSize:"11px",color:l?"white":"var(--ikoneme-text-primary)",fontWeight:l?"600":"400"},children:o.label}),t.jsx("div",{className:"ikon-tooltip",style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",background:"rgba(0,0,0,0.95)",color:"white",padding:"6px 10px",borderRadius:"6px",fontSize:"11px",whiteSpace:"nowrap",opacity:0,pointerEvents:"none",transition:"opacity 0.2s",marginBottom:"8px",zIndex:100},children:o.label})]},o.id)})})]}):c==="root"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"16px",padding:"10px 12px",background:"var(--ikoneme-surface)",borderRadius:"8px",border:"1px solid var(--ikoneme-border)"},children:[t.jsx(Ne,{size:18,color:"var(--ikoneme-text-secondary)"}),t.jsx("input",{type:"text",value:f,onChange:o=>_(o.target.value),placeholder:"Search icons...",style:{flex:1,border:"none",background:"transparent",color:"var(--ikoneme-text-primary)",fontSize:"14px",outline:"none"}})]}),b&&t.jsx("p",{style:{color:"var(--ikoneme-text-secondary)",fontSize:"13px",marginBottom:"12px"},children:"Searching…"}),t.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${Ue}, 1fr)`,gap:"10px"},children:T.map((o,l)=>{const u=N(i.root)===o.url;return t.jsxs("button",{onClick:()=>E(o),title:o.name,style:{padding:"12px",background:u?"var(--ikoneme-primary)":"var(--ikoneme-surface)",border:"2px solid",borderColor:u?"var(--ikoneme-primary-dark)":"var(--ikoneme-border)",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",aspectRatio:"1",position:"relative",minHeight:"70px",minWidth:"70px"},onMouseEnter:d=>{d.currentTarget.style.transform="scale(1.05)",u||(d.currentTarget.style.background="var(--ikoneme-hover)")},onMouseLeave:d=>{d.currentTarget.style.transform="scale(1)",u||(d.currentTarget.style.background="var(--ikoneme-surface)")},children:[t.jsx("div",{style:{width:"100%",height:"100%",background:"white",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",padding:"4px"},children:t.jsx("img",{src:o.url,alt:o.name,style:{maxWidth:"100%",maxHeight:"100%",width:"100%",height:"100%",objectFit:"contain"},onError:d=>{d.target.style.display="none"}})}),t.jsx("div",{className:"ikon-tooltip",style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",background:"rgba(0, 0, 0, 0.95)",color:"white",padding:"6px 10px",borderRadius:"6px",fontSize:"11px",whiteSpace:"nowrap",opacity:0,pointerEvents:"none",transition:"opacity 0.2s",marginBottom:"8px",zIndex:100},children:o.name})]},`${o.url}-${l}`)})})]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:g[c].length<=3?"repeat(3, 1fr)":"repeat(auto-fit, minmax(90px, 1fr))",gap:"10px"},children:g[c].map((o,l)=>{var d,x;let u=!1;if(c==="reference"){const h=g.reference[0].url;o.url===h?u=N((d=i.reference)==null?void 0:d.left)===h:u=N((x=i.reference)==null?void 0:x.right)===o.url}else u=N(i[c])===o.url;return t.jsxs("button",{onClick:()=>I(c,o.url),title:o.tooltip,style:{padding:"12px",background:u?"var(--ikoneme-primary)":"var(--ikoneme-surface)",border:"2px solid",borderColor:u?"var(--ikoneme-primary-dark)":"var(--ikoneme-border)",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",aspectRatio:"1",position:"relative",minHeight:"70px",minWidth:"70px"},onMouseEnter:h=>{h.currentTarget.style.transform="scale(1.05)",u||(h.currentTarget.style.background="var(--ikoneme-hover)")},onMouseLeave:h=>{h.currentTarget.style.transform="scale(1)",u||(h.currentTarget.style.background="var(--ikoneme-surface)")},children:[t.jsx("div",{style:{width:"100%",height:"100%",background:"white",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",padding:"4px"},children:t.jsx("img",{src:o.url,alt:o.tooltip,style:{maxWidth:"100%",maxHeight:"100%",width:"100%",height:"100%",objectFit:"contain"}})}),t.jsx("div",{style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",background:"rgba(0, 0, 0, 0.95)",color:"white",padding:"6px 10px",borderRadius:"6px",fontSize:"11px",whiteSpace:"nowrap",opacity:0,pointerEvents:"none",transition:"opacity 0.2s",marginBottom:"8px",zIndex:100},className:"ikon-tooltip",children:o.tooltip})]},l)})})]}),t.jsx("style",{children:`
36
+ */const Pe=z("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ee="https://ikondb.iigap.com",He=60*60*1e3;let $=null,K=null;const A=new Map;function We(e){return!e||Array.isArray(e)?null:e.origin||e.preview||e.thumb||e.svg||null}function $e(e){if(!e||Array.isArray(e))return{};const{origin:t=null,preview:o=null,thumb:r=null,svg:i=null}=e;return{origin:t,preview:o,thumb:r,svg:i}}async function Ae(e){const t=await fetch(`${e}/api/ikons`);if(!t.ok)throw new Error(`IkonDB GET /api/ikons -> ${t.status}`);const o=await t.json();return(Array.isArray(o==null?void 0:o.data)?o.data:[]).map(i=>({id:i.id,name:i.description||"",url:We(i.media)})).filter(i=>i.url)}async function we({baseUrl:e=ee}={}){return $&&Date.now()-$.at<He?$.list:K||(K=Ae(e).then(t=>($={at:Date.now(),list:t},t)).finally(()=>{K=null}),K)}async function de(e,{baseUrl:t=ee,limit:o=20}={}){const r=(e||"").trim().toLowerCase();if(!r)return[];const i=await we({baseUrl:t}),c=[];for(const n of i)if(n.name.toLowerCase().includes(r)&&(c.push(n),c.length>=o))break;return c}async function ye(e,{baseUrl:t=ee}={}){if(e==null)return null;if(A.has(e))return A.get(e);const o=await fetch(`${t}/api/ikons/${encodeURIComponent(e)}`);if(!o.ok)throw new Error(`IkonDB GET /api/ikons/${e} -> ${o.status}`);const r=await o.json();if((r==null?void 0:r.status)!=="success"||!(r!=null&&r.data))return A.set(e,null),null;const i=$e(r.data.media),c={id:r.data.id,name:r.data.description||"",url:i.origin||i.preview||i.thumb||i.svg||null,...i};return A.set(e,c),c}async function ve(e){try{return await de(e)}catch{return[]}}function ze(){$=null,K=null,A.clear()}const Ue="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2016.0.4,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='78px'%20height='78px'%20viewBox='0%200%2078%2078'%20enable-background='new%200%200%2078%2078'%20xml:space='preserve'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23E6BE1E'%20d='M3,3L3,3C1.438,4.392,0,7.172,0,9.261V78h68.921%20c2.165,0,4.685-1.348,6.079-3l0,0H3V3z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23E6BE1E'%20d='M75,75L75,75c1.562-1.391,3-4.174,3-6.261V0H9.079%20C6.914,0,4.395,1.346,3,3l0,0h72V75z'/%3e%3c/g%3e%3crect%20x='75'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20y='75'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20x='30'%20y='1.5'%20fill='%23FFFFFF'%20width='18'%20height='1.5'/%3e%3crect%20x='30'%20y='75'%20fill='%23FFFFFF'%20width='18'%20height='1.5'/%3e%3crect%20x='75'%20y='30'%20fill='%23FFFFFF'%20width='1.5'%20height='18'/%3e%3crect%20x='1.5'%20y='30'%20fill='%23FFFFFF'%20width='1.5'%20height='18'/%3e%3c/svg%3e",Ye="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2016.0.4,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='78px'%20height='78px'%20viewBox='0%200%2078%2078'%20enable-background='new%200%200%2078%2078'%20xml:space='preserve'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23960000'%20d='M3,3L3,3C1.438,4.392,0,7.172,0,9.261V78h68.921%20c2.165,0,4.685-1.348,6.079-3l0,0H3V3z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23960000'%20d='M75,75L75,75c1.562-1.391,3-4.174,3-6.261V0H9.079%20C6.914,0,4.395,1.346,3,3l0,0h72V75z'/%3e%3c/g%3e%3cg%3e%3crect%20x='9'%20y='1.5'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='24'%20y='1.5'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='39'%20y='1.5'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='54'%20y='1.5'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='69'%20y='1.5'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='75'%20y='61.5'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3crect%20x='75'%20y='46.5'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3crect%20x='75'%20y='31.5'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3crect%20x='75'%20y='16.5'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3crect%20x='75'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3c/g%3e%3cg%3e%3crect%20x='61.5'%20y='75'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='46.5'%20y='75'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='31.5'%20y='75'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='16.5'%20y='75'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='75'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='9'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3crect%20x='1.5'%20y='24'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3crect%20x='1.5'%20y='39'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3crect%20x='1.5'%20y='54'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3crect%20x='1.5'%20y='69'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3c/g%3e%3crect%20x='75'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20y='75'%20fill='%23303030'%20width='3'%20height='3'/%3e%3c/svg%3e",Ze="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2016.0.4,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='78px'%20height='78px'%20viewBox='0%200%2078%2078'%20enable-background='new%200%200%2078%2078'%20xml:space='preserve'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23006E96'%20d='M3,3L3,3C1.438,4.392,0,7.172,0,9.261V78h68.921%20c2.165,0,4.685-1.348,6.079-3l0,0H3V3z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23006E96'%20d='M75,75L75,75c1.562-1.391,3-4.174,3-6.261V0H9.079%20C6.914,0,4.395,1.346,3,3l0,0h72V75z'/%3e%3c/g%3e%3crect%20x='75'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20y='75'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20x='58.5'%20y='1.5'%20fill='%23FFFFFF'%20width='18'%20height='1.5'/%3e%3crect%20x='75'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='18'/%3e%3crect%20x='1.5'%20y='75'%20fill='%23FFFFFF'%20width='18'%20height='1.5'/%3e%3crect%20x='1.5'%20y='58.5'%20fill='%23FFFFFF'%20width='1.5'%20height='18'/%3e%3c/svg%3e",qe="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2016.0.4,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='78px'%20height='78px'%20viewBox='0%200%2078%2078'%20enable-background='new%200%200%2078%2078'%20xml:space='preserve'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23E6821E'%20d='M3,3L3,3C1.438,4.392,0,7.172,0,9.261V78h68.921%20c2.165,0,4.685-1.348,6.079-3l0,0H3V3z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23E6821E'%20d='M75,75L75,75c1.562-1.391,3-4.174,3-6.261V0H9.079%20C6.914,0,4.395,1.346,3,3l0,0h72V75z'/%3e%3c/g%3e%3crect%20x='75'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20y='75'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20x='6'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='6'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='9'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='12'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='15'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='18'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='21'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='24'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='27'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='30'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='33'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='36'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='39'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='42'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='45'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='48'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='51'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='54'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='57'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='60'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='63'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='66'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='69'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='72'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='4.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='7.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='10.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='13.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='16.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='19.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='22.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='25.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='28.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='31.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='34.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='37.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='40.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='43.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='46.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='49.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='52.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='55.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='58.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='61.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='64.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='67.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='70.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='9'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='12'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='15'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='18'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='21'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='24'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='27'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='30'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='33'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='36'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='39'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='42'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='45'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='48'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='51'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='54'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='57'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='60'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='63'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='66'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='69'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='72'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='4.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='7.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='10.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='13.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='16.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='19.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='22.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='25.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='28.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='31.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='34.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='37.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='40.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='43.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='46.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='49.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='52.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='55.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='58.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='61.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='64.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='67.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='70.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3c/svg%3e",Xe="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2016.0.4,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='78px'%20height='78px'%20viewBox='0%200%2078%2078'%20enable-background='new%200%200%2078%2078'%20xml:space='preserve'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23508C50'%20d='M3,3L3,3C1.438,4.392,0,7.172,0,9.261V78h68.921%20c2.165,0,4.685-1.348,6.079-3l0,0H3V3z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23508C50'%20d='M75,75L75,75c1.562-1.391,3-4.174,3-6.261V0H9.079%20C6.914,0,4.395,1.346,3,3l0,0h72V75z'/%3e%3c/g%3e%3crect%20x='75'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20y='75'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20x='1.5'%20y='9'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='18'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='27'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='36'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='45'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='54'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='63'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='72'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='6'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='15'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='24'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='33'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='42'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='51'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='60'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='75'%20y='69'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3c/svg%3e",Qe="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2028.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='78px'%20height='78px'%20viewBox='0%200%2078%2078'%20style='enable-background:new%200%200%2078%2078;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill-rule:evenodd;clip-rule:evenodd;fill:%236F6F6F;}%20.st1{fill:%23303030;}%20%3c/style%3e%3cg%20id='Neutral_00000127737234708554144110000011539647311500563641_'%3e%3cg%3e%3cpath%20class='st0'%20d='M3,3L3,3C1.4,4.4,0,7.2,0,9.3V78h68.9c2.2,0,4.7-1.3,6.1-3l0,0H3V3z'/%3e%3cpath%20class='st0'%20d='M75,75L75,75c1.6-1.4,3-4.2,3-6.3V0H9.1C6.9,0,4.4,1.3,3,3l0,0h72V75z'/%3e%3c/g%3e%3crect%20x='75'%20class='st1'%20width='3'%20height='3'/%3e%3crect%20y='75'%20class='st1'%20width='3'%20height='3'/%3e%3c/g%3e%3c/svg%3e",Je="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2016.0.4,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='150px'%20height='78px'%20viewBox='0%200%20150%2078'%20enable-background='new%200%200%20150%2078'%20xml:space='preserve'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23E6BE1E'%20d='M3,3L3,3C1.438,4.392,0,7.172,0,9.261L0.102,78h140.921%20c2.063,0,4.583-1.348,5.977-3h0.102h-144L3,3z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23E6BE1E'%20d='M147,75L147,75c1.562-1.391,3-4.174,3-6.261L150.102,0H9.181%20C6.914,0,4.395,1.346,3,3h0.102h144L147,75z'/%3e%3c/g%3e%3crect%20x='147'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20y='75'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20x='65.102'%20y='1.5'%20fill='%23FFFFFF'%20width='18'%20height='1.5'/%3e%3crect%20x='65.102'%20y='75'%20fill='%23FFFFFF'%20width='18'%20height='1.5'/%3e%3crect%20x='147'%20y='30'%20fill='%23FFFFFF'%20width='1.5'%20height='18'/%3e%3crect%20x='1.5'%20y='30'%20fill='%23FFFFFF'%20width='1.5'%20height='18'/%3e%3c/svg%3e",et="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2016.0.4,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='150px'%20height='78px'%20viewBox='0%200%20150%2078'%20enable-background='new%200%200%20150%2078'%20xml:space='preserve'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23960000'%20d='M3,3L3,3C1.438,4.392,0,7.172,0,9.261V78h140.921%20c2.165,0,4.685-1.348,6.079-3l0,0H3V3z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23960000'%20d='M147,75L147,75c1.562-1.391,3-4.174,3-6.261V0H9.079%20C6.914,0,4.395,1.346,3,3l0,0h144V75z'/%3e%3c/g%3e%3crect%20x='147'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20y='75'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20x='81'%20y='1.5'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='96'%20y='1.5'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='111'%20y='1.5'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='126'%20y='1.5'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='141'%20y='1.5'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3cg%3e%3crect%20x='6'%20y='1.5'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='21'%20y='1.5'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='36'%20y='1.5'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='51'%20y='1.5'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='66'%20y='1.5'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3c/g%3e%3cg%3e%3crect%20x='76.5'%20y='75'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='91.5'%20y='75'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='106.5'%20y='75'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='121.5'%20y='75'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='136.5'%20y='75'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3c/g%3e%3crect%20x='147'%20y='61.5'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3crect%20x='147'%20y='46.5'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3crect%20x='147'%20y='31.5'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3crect%20x='147'%20y='16.5'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3crect%20x='147'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3cg%3e%3crect%20x='61.5'%20y='75'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='46.5'%20y='75'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='31.5'%20y='75'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='16.5'%20y='75'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='75'%20fill='%23FFFFFF'%20width='7.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='9'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3crect%20x='1.5'%20y='24'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3crect%20x='1.5'%20y='39'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3crect%20x='1.5'%20y='54'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3crect%20x='1.5'%20y='69'%20fill='%23FFFFFF'%20width='1.5'%20height='7.5'/%3e%3c/g%3e%3c/svg%3e",tt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2016.0.4,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='150px'%20height='78px'%20viewBox='0%200%20150%2078'%20enable-background='new%200%200%20150%2078'%20xml:space='preserve'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23006E96'%20d='M3.084,3L3.084,3c-1.562,1.392-3,4.172-3,6.261V78h140.921%20c2.165,0,4.685-1.348,6.079-3l0,0h-144V3z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23006E96'%20d='M147.084,75L147.084,75c1.562-1.391,3-4.174,3-6.261V0H9.163%20C6.998,0,4.479,1.346,3.084,3l0,0h144V75z'/%3e%3c/g%3e%3crect%20x='147'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20y='75'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20x='130.584'%20y='1.5'%20fill='%23FFFFFF'%20width='18'%20height='1.5'/%3e%3crect%20x='147.084'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='18'/%3e%3crect%20x='1.584'%20y='75'%20fill='%23FFFFFF'%20width='18'%20height='1.5'/%3e%3crect%20x='1.584'%20y='58.5'%20fill='%23FFFFFF'%20width='1.5'%20height='18'/%3e%3c/svg%3e",it="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2016.0.4,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='150px'%20height='78px'%20viewBox='0%200%20150%2078'%20enable-background='new%200%200%20150%2078'%20xml:space='preserve'%3e%3cg%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23E6821E'%20d='M2.917,3L2.917,3c-1.562,1.392-3,4.172-3,6.261V78h140.921%20c2.165,0,4.685-1.348,6.079-3l0,0h-144V3z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23E6821E'%20d='M146.917,75L146.917,75c1.562-1.391,3-4.174,3-6.261V0H8.996%20C6.831,0,4.312,1.346,2.917,3l0,0h144V75z'/%3e%3c/g%3e%3crect%20x='147'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20y='75'%20fill='%23303030'%20width='3'%20height='3'/%3e%3c/g%3e%3crect%20x='1.5'%20y='6'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='9'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='12'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='15'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='18'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='21'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='24'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='27'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='30'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='33'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='36'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='39'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='42'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='45'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='48'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='51'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='54'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='57'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='60'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='63'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='66'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='69'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='72'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='4.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='7.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='10.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='13.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='16.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='19.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='22.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='25.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='28.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='31.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='34.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='37.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='40.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='43.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='46.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='49.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='52.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='55.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='58.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='61.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='64.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='67.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='70.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='144'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='142.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3cg%3e%3crect%20x='6'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='9'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='12'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='15'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='18'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='21'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='24'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='27'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='30'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='33'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='36'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='39'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='42'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='45'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='48'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='51'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='54'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='57'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='60'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='63'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='66'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='69'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='72'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3c/g%3e%3cg%3e%3crect%20x='75'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='78'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='81'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='84'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='87'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='90'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='93'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='96'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='99'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='102'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='105'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='108'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='111'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='114'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='117'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='120'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='123'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='126'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='129'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='132'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='135'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='138'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='141'%20y='1.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3c/g%3e%3cg%3e%3crect%20x='73.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='76.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='79.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='82.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='85.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='88.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='91.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='94.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='97.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='100.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='103.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='106.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='109.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='112.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='115.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='118.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='121.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='124.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='127.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='130.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='133.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='136.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='139.5'%20y='75'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3c/g%3e%3cg%3e%3crect%20x='147.002'%20y='4.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='7.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='10.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='13.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='16.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='19.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='22.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='25.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='28.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='31.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='34.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='37.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='40.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='43.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='46.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='49.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='52.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='55.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='58.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='61.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='64.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='67.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147.002'%20y='70.5'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3c/g%3e%3c/svg%3e",rt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2016.0.4,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='150px'%20height='78px'%20viewBox='0%200%20150%2078'%20enable-background='new%200%200%20150%2078'%20xml:space='preserve'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23508C50'%20d='M3,3L3,3C1.438,4.392,0,7.172,0,9.261V78h140.921%20c2.165,0,4.685-1.348,6.079-3l0,0H3V3z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%23508C50'%20d='M147,75L147,75c1.562-1.391,3-4.174,3-6.261V0H9.079%20C6.914,0,4.395,1.346,3,3l0,0h144V75z'/%3e%3c/g%3e%3crect%20x='147'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20y='75'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20x='1.5'%20y='9'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='18'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='27'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='36'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='45'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='54'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='63'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='1.5'%20y='72'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147'%20y='6'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147'%20y='15'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147'%20y='24'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147'%20y='33'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147'%20y='42'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147'%20y='51'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147'%20y='60'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3crect%20x='147'%20y='69'%20fill='%23FFFFFF'%20width='1.5'%20height='1.5'/%3e%3c/svg%3e",lt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2016.0.4,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='150px'%20height='78px'%20viewBox='0%200%20150%2078'%20enable-background='new%200%200%20150%2078'%20xml:space='preserve'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%236F6F6F'%20d='M3,3L3,3C1.438,4.392,0,7.172,0,9.261V78h140.921%20c2.165,0,4.685-1.348,6.079-3l0,0H3V3z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%236F6F6F'%20d='M147,75L147,75c1.562-1.391,3-4.174,3-6.261V0H9.079%20C6.914,0,4.395,1.346,3,3l0,0h144V75z'/%3e%3c/g%3e%3crect%20x='147'%20fill='%23303030'%20width='3'%20height='3'/%3e%3crect%20y='75'%20fill='%23303030'%20width='3'%20height='3'/%3e%3c/svg%3e",I={context:[{tooltip:"Male",url:"https://text2ikon.komunikon.com/gender-assets/KomunIKON_Male.svg"},{tooltip:"Female",url:"https://text2ikon.komunikon.com/gender-assets/KomunIKON_Female.svg"},{tooltip:"Non Binary",url:"https://text2ikon.komunikon.com/gender-assets/KomunIKON_Non-Binary.png"}],reference:[{tooltip:"Asterisk",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_asterisk.svg"},{tooltip:"Zero",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Zero.svg"},{tooltip:"One",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_One.svg"},{tooltip:"Two",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Two.svg"},{tooltip:"Three",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Three.svg"},{tooltip:"Four",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Four.svg"},{tooltip:"Five",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Five.svg"},{tooltip:"Six",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Six.svg"},{tooltip:"Seven",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Seven.svg"},{tooltip:"Eight",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Eight.svg"},{tooltip:"Nine",url:"https://text2ikon.komunikon.com/reference-assets/KomunIKON_Nine.svg"}],role:[{tooltip:"agent",url:"https://text2ikon.komunikon.com/case-assets/KomunIKON_agent.svg"},{tooltip:"patient",url:"https://text2ikon.komunikon.com/case-assets/KomunIKON_patient.svg"},{tooltip:"reflexive",url:"https://text2ikon.komunikon.com/case-assets/KomunIKON_reflexive.svg"},{tooltip:"recipricol",url:"https://text2ikon.komunikon.com/_next/image?url=%2Fcase-assets%2Frecipricol.jpg&w=48&q=75"}],modes:[{tooltip:"Exclam",url:"https://text2ikon.komunikon.com/mode-assets/KomunIKON_Exclam.svg"},{tooltip:"Which",url:"https://text2ikon.komunikon.com/mode-assets/KomunIKON_Which.svg"}],root:[{tooltip:"Love/Passion",url:"https://ikondb.iigap.com/storage/media/960/ZFcaar88AP.png"},{tooltip:"Star/Excellence",url:"https://ikondb.iigap.com/storage/media/991/M0ADaSXzWe.png"},{tooltip:"Value/Precious",url:"https://ikondb.iigap.com/storage/media/942/6ghAUKbdIs.png"},{tooltip:"Fire/Hot",url:"https://ikondb.iigap.com/storage/media/1478/zq0n4vHSQW.png"},{tooltip:"Water/Fluid",url:"https://ikondb.iigap.com/storage/media/1480/DVhDIm6KqB.png"},{tooltip:"Flower/Beauty",url:"https://ikondb.iigap.com/storage/media/1048/UnpCfhHsUa.png"},{tooltip:"Leaf/Nature",url:"https://ikondb.iigap.com/storage/media/1398/5Ex6my6BI7.png"}],tenses:[{tooltip:"adas",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_adas.svg"},{tooltip:"adis",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_adis.svg"},{tooltip:"ados",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_ados.svg"},{tooltip:"antas",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_antas.svg"},{tooltip:"antis",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_antis.svg"},{tooltip:"antos",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_antos.svg"},{tooltip:"as",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_as.svg"},{tooltip:"intas",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_intas.svg"},{tooltip:"intis",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_intis.svg"},{tooltip:"intis2",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_intis2.svg"},{tooltip:"intos",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_intos.svg"},{tooltip:"intos2",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_intos2.svg"},{tooltip:"is",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_is.svg"},{tooltip:"ontas",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_ontas.svg"},{tooltip:"ontis",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_ontis.svg"},{tooltip:"ontis2",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_ontis2.svg"},{tooltip:"ontos",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_ontos.svg"},{tooltip:"ontos2",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_ontos2.svg"},{tooltip:"os",url:"https://text2ikon.komunikon.com/time-assets/KomunIKON_Verbal_Tense_os.svg"}]},P=[{id:"name",label:"Name",color:"#E6BE1E",plural:!1,image:Ue},{id:"verb",label:"Verb",color:"#960000",plural:!1,image:Ye},{id:"adjective",label:"Adjective",color:"#006E96",plural:!1,image:Ze},{id:"adverb",label:"Adverb",color:"#E6821E",plural:!1,image:qe},{id:"conjunction",label:"Conjunction",color:"#508C50",plural:!1,image:Xe},{id:"neutral",label:"Neutral",color:"#6F6F6F",plural:!1,image:Qe},{id:"name_plural",label:"Name (plural)",color:"#E6BE1E",plural:!0,image:Je},{id:"verb_plural",label:"Verb (plural)",color:"#960000",plural:!0,image:et},{id:"adjective_plural",label:"Adjective (plural)",color:"#006E96",plural:!0,image:tt},{id:"adverb_plural",label:"Adverb (plural)",color:"#E6821E",plural:!0,image:it},{id:"conjunction_plural",label:"Conjunction (plural)",color:"#508C50",plural:!0,image:rt},{id:"neutral_plural",label:"Neutral (plural)",color:"#6F6F6F",plural:!0,image:lt}],be=P.map(e=>e.id),ot=new Set(be);function te(e){return P.find(t=>t.id===e)??null}function ie(e){const t=e/78,o=Math.max(2,Math.round(3*t));return{frame:o,corner:Math.max(o,Math.round(9*t))}}function Q(e,t){const o=typeof e=="string"?te(e):e;if(!o)return{};const{frame:r,corner:i}=ie(t),c=o.plural?"11.538% 6%":"11.538%";return{borderStyle:"solid",borderColor:"transparent",borderWidth:`${r}px`,borderImageSource:`url("${o.image}")`,borderImageSlice:c,borderImageWidth:`${i}px`,borderImageRepeat:"stretch",borderRadius:0,backgroundClip:"padding-box"}}function N(e,t){var o;return(o=I[e])==null?void 0:o.find(r=>r.url===t)}function Ft(e,t){var o,r;return(r=(o=I[e])==null?void 0:o[t])==null?void 0:r.url}function M(e){return e==null?null:typeof e=="object"&&"url"in e?e.url:e}function J(e){return e==null?null:typeof e=="object"?e.svg||e.url||null:e}function _(e){return{name:e.tooltip,url:e.url}}function he(){return{context:_(I.context[0]),reference:{left:null,right:null},role:_(I.role[0]),modes:_(I.modes[0]),root:_(I.root[0]),rootName:null,tenses:_(I.tenses[0]),border:null}}function nt(){return{context:null,reference:{left:null,right:null},role:null,modes:null,root:null,rootName:null,tenses:null,border:null}}function ke(e){var g,s,a,u,v,S,k;if(!e)return e;const t=e.reference||{left:null,right:null},o=typeof e.context=="string"?N("context",e.context):null,r=typeof e.role=="string"?N("role",e.role):null,i=typeof e.modes=="string"?N("modes",e.modes):null,c=typeof e.root=="string"?N("root",e.root):null,n=typeof e.tenses=="string"?N("tenses",e.tenses):null,y=e.border!=null&&ot.has(e.border)?e.border:null;return{...e,context:typeof e.context=="object"&&((g=e.context)==null?void 0:g.url)!=null?e.context:o?_(o):{name:"",url:e.context||""},reference:{left:t.left==null?null:typeof t.left=="object"&&((s=t.left)==null?void 0:s.url)!=null?t.left:N("reference",t.left)?_(N("reference",t.left)):{name:"",url:t.left},right:t.right==null?null:typeof t.right=="object"&&((a=t.right)==null?void 0:a.url)!=null?t.right:N("reference",t.right)?_(N("reference",t.right)):{name:"",url:t.right}},role:typeof e.role=="object"&&((u=e.role)==null?void 0:u.url)!=null?e.role:r?_(r):{name:"",url:e.role||""},modes:typeof e.modes=="object"&&((v=e.modes)==null?void 0:v.url)!=null?e.modes:i?_(i):{name:"",url:e.modes||""},root:typeof e.root=="object"&&((S=e.root)==null?void 0:S.url)!=null?{...e.root,name:e.rootName??e.root.name}:c?{name:e.rootName??c.tooltip,url:c.url}:{name:e.rootName??"",url:e.root||""},tenses:typeof e.tenses=="object"&&((k=e.tenses)==null?void 0:k.url)!=null?e.tenses:n?_(n):{name:"",url:e.tenses||""},border:y}}function ct(e){return(e||[]).map(ke)}function ht(e){let t=0;for(let o=0;o<e.length;o++){const r=e.charCodeAt(o);t=(t<<5)-t+r,t=t&t}return Math.abs(t)}class st{constructor(t){this.seed=t}next(){const r=Math.pow(2,32);return this.seed=(1664525*this.seed+1013904223)%r,this.seed/r}nextInt(t,o){return Math.floor(this.next()*(o-t))+t}}async function at(e){try{const[t]=await de(e,{limit:1});return t?{name:t.name,url:t.url}:null}catch{return null}}const dt={name:"Not found",url:null};async function gt(e){const t=e.toLowerCase().split(/\s+/).filter(Boolean),o=await Promise.all(t.map(async r=>{const i={...he()},c=ht(r),n=new st(c);i.context=_(I.context[n.nextInt(0,I.context.length)]);const y=n.next()>.5,g=n.nextInt(1,I.reference.length);i.reference={left:y?_(I.reference[0]):null,right:_(I.reference[g])},i.role=_(I.role[n.nextInt(0,I.role.length)]),i.modes=_(I.modes[n.nextInt(0,I.modes.length)]);const s=await at(r);i.root=s??dt,i.rootName=(s==null?void 0:s.name)??null,i.tenses=_(I.tenses[n.nextInt(0,I.tenses.length)]);const a=P.filter(u=>!u.plural);return i.border=a[n.nextInt(0,a.length)].id,i}));return o.length>0?o:[he()]}const ue=1.18,Z=.95,se=[ue,Z,Z,Z,Z,ue],Ie=[.6,1.4,1.4,.6],R={context:"rgba(100, 50, 150, 0.1)",reference:"rgba(50, 100, 200, 0.1)",role:"rgba(200, 50, 50, 0.1)",modes:"rgba(50, 150, 100, 0.1)",root:"rgba(150, 150, 50, 0.1)",east:"rgba(0, 0, 0, 0.05)",tenses:"rgba(100, 100, 200, 0.1)"},V="rgba(0, 0, 0, 0.14)",xt={context:{cols:[0,1],rows:[0,1]},reference:{cols:[1,5],rows:[0,1]},role:{cols:[5,6],rows:[0,1]},modes:{cols:[0,1],rows:[1,5]},root:{cols:[1,5],rows:[1,5]},east:{cols:[5,6],rows:[1,5]},tenses:{cols:[0,6],rows:[5,6]}};function Se(e){return{framePad:Math.max(2,Math.round(e/44)),zonePad:Math.max(2,Math.round(e/72)),rootPad:Math.max(2,Math.round(e/40))}}function ne(e,t){const o=t.reduce((i,c)=>i+c,0),r=[0];for(const i of t)r.push(r[r.length-1]+e*i/o);return r}const ce={maxWidth:"100%",maxHeight:"100%",width:"100%",height:"100%",objectFit:"contain",display:"block",boxSizing:"border-box"},pe=e=>({display:"flex",alignItems:"center",justifyContent:"center",minWidth:0,minHeight:0,overflow:"hidden",boxSizing:"border-box",padding:`${e}px`});function ft(e=768){const[t,o]=B.useState(()=>typeof window<"u"&&window.innerWidth<e);return B.useEffect(()=>{const r=window.matchMedia(`(max-width: ${e-1}px)`),i=()=>o(r.matches);return r.addEventListener("change",i),()=>r.removeEventListener("change",i)},[e]),t}function re({ikon:e,onClick:t,size:o=64,onZoneClick:r,selectedZone:i,isSelected:c=!1,isPaired:n=!1,onEdit:y,onDelete:g,hideActionOverlay:s=!1}){var xe,fe;const[a,u]=B.useState(!1),v=ft(),S=e!=null&&e.border?te(e.border):null,k=(d,j)=>{r?(j.stopPropagation(),r(d)):t&&t(j)},E=d=>{r&&(d.currentTarget.style.filter="brightness(1.3)")},b=d=>{r&&(d.currentTarget.style.filter="brightness(1)")},p=(d,j)=>{const W=i===d;return{boxSizing:"border-box",...j,cursor:r||t?"pointer":"default",transition:"all 0.2s, filter 0.2s",border:W?"2px solid var(--ikoneme-primary)":j.border||"none",boxShadow:W?"0 0 8px var(--ikoneme-primary)":"none",position:"relative"}},T=(d,j)=>{const W=J(j),Fe=N(d,M(j)),Me=j&&typeof j=="object"&&j.name||(Fe==null?void 0:Fe.tooltip)||d;return W?l.jsx("img",{src:W,alt:Me,style:ce,onError:Ne=>{Ne.target.style.display="none"}}):j!=null&&j.name?l.jsx("span",{style:{fontSize:"10px",lineHeight:1.2,textAlign:"center",color:"var(--ikoneme-text-secondary, #888)",wordBreak:"break-word",padding:"2px"},children:j.name}):null},F=!s&&!r&&(y||g),h=v?28:24,x=4,f=3*h+2*x,m=F?f:o,w=v||a,C=m,{framePad:G,zonePad:D,rootPad:U}=Se(C),O=d=>d.map(j=>`minmax(0, ${j}fr)`).join(" "),L=O(se),H=O(Ie),le=S?Q(S,C):{border:c&&!n?"2px solid rgba(0, 168, 132, 0.8)":"1px solid rgba(255, 255, 255, 0.1)"},oe=c&&!n?"rgba(0, 168, 132, 0.15)":"white",Y=[c&&!n?"0 0 12px rgba(0, 168, 132, 0.4)":null,i==="border"?"0 0 0 3px var(--ikoneme-primary)":null].filter(Boolean).join(", "),Ve="0 0 10px rgba(0, 168, 132, 0.5)",ge=l.jsx(l.Fragment,{children:l.jsxs("div",{onClick:r?()=>r("border"):t?d=>t(d):void 0,style:{width:`${C}px`,height:`${C}px`,boxSizing:"border-box",display:"grid",padding:`${G}px`,gridTemplateColumns:L,gridTemplateRows:L,cursor:t||r?"pointer":"default",borderRadius:"4px",overflow:"hidden",flexShrink:0,transition:"transform 0.2s, box-shadow 0.2s, border 0.2s",backgroundColor:oe,boxShadow:Y,...le},onMouseEnter:d=>{t&&!r&&!n&&(d.currentTarget.style.transform="scale(1.05)",c||(d.currentTarget.style.boxShadow=Ve))},onMouseLeave:d=>{t&&!r&&!n&&(d.currentTarget.style.transform="scale(1)",c||(d.currentTarget.style.boxShadow=Y))},children:[l.jsx("div",{onClick:d=>k("context",d),onMouseEnter:E,onMouseLeave:b,style:p("context",{gridColumn:"1 / 2",gridRow:"1 / 2",display:"flex",alignItems:"center",justifyContent:"center",background:R.context,borderRight:`1px solid ${V}`,borderBottom:`1px solid ${V}`,minWidth:0,minHeight:0,overflow:"hidden",padding:`${D}px`}),className:"ikoneme-zone",children:T("context",e.context)}),l.jsxs("div",{onClick:d=>k("reference",d),onMouseEnter:E,onMouseLeave:b,style:p("reference",{gridColumn:"2 / 6",gridRow:"1 / 2",display:"grid",gridTemplateColumns:H,gridTemplateRows:"minmax(0, 1fr)",background:R.reference,borderRight:`1px solid ${V}`,borderBottom:`1px solid ${V}`,minWidth:0,minHeight:0,overflow:"hidden"}),className:"ikoneme-zone",children:[l.jsx("div",{style:{minWidth:0,minHeight:0,overflow:"hidden",borderRight:`1px solid ${V}`}}),l.jsx("div",{style:{...pe(D),borderRight:`1px solid ${V}`},children:M((xe=e.reference)==null?void 0:xe.left)&&l.jsx("img",{src:M(e.reference.left),alt:"Asterisk",style:ce,onError:d=>{d.target.style.display="none"}})}),l.jsx("div",{style:{...pe(D),borderRight:`1px solid ${V}`},children:M((fe=e.reference)==null?void 0:fe.right)&&l.jsx("img",{src:M(e.reference.right),alt:"Number",style:ce,onError:d=>{d.target.style.display="none"}})}),l.jsx("div",{style:{minWidth:0,minHeight:0,overflow:"hidden"}})]}),l.jsx("div",{onClick:d=>k("role",d),onMouseEnter:E,onMouseLeave:b,style:p("role",{gridColumn:"6 / 7",gridRow:"1 / 2",display:"flex",alignItems:"center",justifyContent:"center",background:R.role,borderBottom:`1px solid ${V}`,minWidth:0,minHeight:0,overflow:"hidden",padding:`${D}px`}),className:"ikoneme-zone",children:T("role",e.role)}),l.jsx("div",{onClick:d=>k("modes",d),onMouseEnter:E,onMouseLeave:b,style:p("modes",{gridColumn:"1 / 2",gridRow:"2 / 6",display:"flex",alignItems:"center",justifyContent:"center",background:R.modes,borderRight:`1px solid ${V}`,borderBottom:`1px solid ${V}`,minWidth:0,minHeight:0,overflow:"hidden",padding:`${D}px`}),className:"ikoneme-zone",children:T("modes",e.modes)}),l.jsx("div",{onClick:d=>k("root",d),onMouseEnter:E,onMouseLeave:b,style:p("root",{gridColumn:"2 / 6",gridRow:"2 / 6",display:"flex",alignItems:"center",justifyContent:"center",background:R.root,borderRight:`1px solid ${V}`,borderBottom:`1px solid ${V}`,minWidth:0,minHeight:0,overflow:"hidden",padding:`${U}px`}),className:"ikoneme-zone",children:T("root",e.root)}),l.jsx("div",{onClick:d=>{r&&(d.stopPropagation(),r("border"))},style:{gridColumn:"6 / 7",gridRow:"2 / 6",background:R.east,borderBottom:`1px solid ${V}`,minWidth:0,minHeight:0,overflow:"hidden",boxSizing:"border-box",cursor:r?"pointer":"default"}}),l.jsx("div",{onClick:d=>k("tenses",d),onMouseEnter:E,onMouseLeave:b,style:p("tenses",{gridColumn:"1 / 7",gridRow:"6 / 7",display:"flex",alignItems:"center",justifyContent:"center",background:R.tenses,minWidth:0,minHeight:0,overflow:"hidden",padding:`${D}px`}),className:"ikoneme-zone",children:T("tenses",e.tenses)})]})}),Be=l.jsx("div",{style:{minHeight:`${h}px`,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"},"aria-hidden":!w,children:l.jsxs("div",{style:{display:"flex",gap:`${x}px`,flexWrap:"nowrap",width:`${f}px`,justifyContent:"center",opacity:w?1:0,pointerEvents:w?"auto":"none",transition:"opacity 0.15s ease"},children:[y&&l.jsx("button",{onClick:d=>{d.stopPropagation(),y()},style:{width:`${h}px`,height:`${h}px`,borderRadius:"6px",border:"none",background:"rgba(0, 168, 132, 0.95)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background 0.2s",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.3)"},onMouseEnter:d=>d.currentTarget.style.background="rgba(0, 168, 132, 1)",onMouseLeave:d=>d.currentTarget.style.background="rgba(0, 168, 132, 0.95)",title:"Edit",children:l.jsx(Re,{size:v?16:14,color:"white"})}),g&&l.jsx("button",{onClick:d=>{d.stopPropagation(),g()},style:{width:`${h}px`,height:`${h}px`,borderRadius:"6px",border:"none",background:"rgba(220, 38, 38, 0.95)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background 0.2s",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.3)"},onMouseEnter:d=>d.currentTarget.style.background="rgba(220, 38, 38, 1)",onMouseLeave:d=>d.currentTarget.style.background="rgba(220, 38, 38, 0.95)",title:"Delete",children:l.jsx(Ke,{size:v?16:14,color:"white"})})]})});return F?l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",width:`${f}px`,flexShrink:0,gap:"6px"},onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[l.jsx("div",{style:{position:"relative",width:`${C}px`,height:`${C}px`},children:ge}),Be]}):l.jsx("div",{style:{position:"relative",width:`${o}px`,height:`${o}px`,flexShrink:0},onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:ge})}const q={context:{name:"Context",description:"Northwest - Contextual information"},reference:{name:"Reference",description:"North - Reference point"},role:{name:"Role",description:"Northeast - Role indicator"},modes:{name:"Modes",description:"West - Mode settings"},root:{name:"Root",description:"Center - Core meaning"},tenses:{name:"Tenses",description:"South - Time/tense indicator"},border:{name:"Border",description:"Grammatical category — singular (single frame) or plural (double frame)"}},ut=1,pt=300,mt=10,wt=5;function Ee({ikon:e,onSave:t,onClose:o,searchRoot:r=ve}){const[i,c]=B.useState({...e,reference:e.reference?{...e.reference}:{left:null,right:null},rootName:e.rootName??null}),[n,y]=B.useState("root"),[g,s]=B.useState(""),[a,u]=B.useState([]),[v,S]=B.useState(!1),k=(F,h)=>{const x=N(F==="reference"?"reference":F,h),f=x?{name:x.tooltip,url:x.url}:{name:"",url:h};if(F==="reference"){const m=I.reference[0].url;c(h===m?w=>{var C;return{...w,reference:{...w.reference,left:M((C=w.reference)==null?void 0:C.left)===m?null:{name:I.reference[0].tooltip,url:m}}}}:w=>{var C;return{...w,reference:{...w.reference,right:M((C=w.reference)==null?void 0:C.right)===h?null:f}}})}else c(m=>({...m,[F]:M(m[F])===h?null:f}))},E=F=>{y(F)},b=F=>{c(h=>({...h,border:F==null||h.border===F?null:F}))};B.useEffect(()=>{if(n!=="root"||g.length<ut){u([]);return}const F=setTimeout(async()=>{S(!0);try{const h=await r(g.trim());u((h||[]).slice(0,mt))}catch{u([])}finally{S(!1)}},pt);return()=>clearTimeout(F)},[n,g,r]);const p=B.useCallback(async F=>{if(c(h=>({...h,root:{id:F.id??null,name:F.name,url:F.url},rootName:F.name})),F.id!=null)try{const h=await ye(F.id);if(!h)return;c(x=>{var f;return((f=x.root)==null?void 0:f.id)!==F.id?x:{...x,root:{id:h.id,name:F.name,url:h.origin||F.url,svg:h.svg||void 0,thumb:h.thumb||void 0,preview:h.preview||void 0},rootName:F.name}})}catch{}},[]),T=()=>{t(i),o()};return l.jsxs("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"var(--ikoneme-background)",display:"flex",flexDirection:"column",zIndex:1e3,overflow:"hidden"},children:[l.jsxs("div",{style:{padding:"16px 20px",background:"var(--ikoneme-panel-bg)",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flex:1},children:[l.jsx("button",{onClick:o,style:{background:"transparent",border:"none",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center"},title:"Back",children:l.jsx(Oe,{color:"var(--ikoneme-text-primary)",size:24})}),l.jsx("h2",{style:{color:"var(--ikoneme-text-primary)",fontSize:"clamp(18px, 4vw, 20px)",fontWeight:"600",margin:0},children:"Edit Ikon"})]}),l.jsx("button",{onClick:T,style:{padding:"10px 24px",background:"var(--ikoneme-primary)",border:"none",borderRadius:"8px",color:"white",cursor:"pointer",fontSize:"clamp(13px, 3vw, 14px)",fontWeight:"500",transition:"background 0.2s",whiteSpace:"nowrap"},onMouseEnter:F=>F.currentTarget.style.background="var(--ikoneme-primary-dark)",onMouseLeave:F=>F.currentTarget.style.background="var(--ikoneme-primary)",children:"Save"})]}),l.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"20px",maxWidth:"800px",width:"100%",margin:"0 auto",WebkitOverflowScrolling:"touch"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",marginBottom:"24px",gap:"12px"},children:[l.jsx("p",{style:{color:"var(--ikoneme-text-secondary)",fontSize:"clamp(12px, 3vw, 13px)",textAlign:"center"},children:"Click on a zone or the border area to edit it"}),l.jsx(re,{ikon:i,size:280,onZoneClick:E,selectedZone:n}),l.jsx("div",{style:{color:"var(--ikoneme-text-primary)",fontSize:"clamp(14px, 3.5vw, 16px)",fontWeight:"500",textAlign:"center",padding:"8px 16px",background:"var(--ikoneme-primary)",borderRadius:"20px"},children:q[n].name})]}),l.jsxs("div",{style:{marginBottom:"20px"},children:[l.jsx("h3",{style:{color:"var(--ikoneme-text-primary)",fontSize:"clamp(14px, 3.5vw, 16px)",marginBottom:"8px",fontWeight:"500"},children:n==="border"?"Select Border Type":"Choose Icon for: "+q[n].name}),n==="border"?l.jsxs("p",{style:{color:"var(--ikoneme-text-secondary)",fontSize:"clamp(11px, 2.5vw, 12px)",marginBottom:"12px"},children:[q.border.description,". Click the same border again to clear."]}):n==="reference"?l.jsxs("p",{style:{color:"var(--ikoneme-text-secondary)",fontSize:"clamp(11px, 2.5vw, 12px)",marginBottom:"12px"},children:["Click ",l.jsx("strong",{children:"Asterisk"})," to toggle left cell. Click any ",l.jsx("strong",{children:"number"})," ","to toggle right cell."]}):n==="root"?l.jsx("p",{style:{color:"var(--ikoneme-text-secondary)",fontSize:"clamp(11px, 2.5vw, 12px)",marginBottom:"12px"},children:"Search for an icon below. The icon's name is stored with the ikon."}):l.jsxs("p",{style:{color:"var(--ikoneme-text-secondary)",fontSize:"clamp(11px, 2.5vw, 12px)",marginBottom:"12px"},children:[q[n].description,". Click the same icon again to clear."]}),n==="border"?l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{marginBottom:"12px"},children:l.jsx("button",{onClick:()=>b(null),style:{width:"100%",padding:"10px 14px",background:i.border==null?"var(--ikoneme-primary)":"var(--ikoneme-surface)",border:`2px solid ${i.border==null?"var(--ikoneme-primary-dark)":"var(--ikoneme-border)"}`,borderRadius:"8px",color:i.border==null?"white":"var(--ikoneme-text-primary)",fontSize:"14px",cursor:"pointer",textAlign:"left",fontWeight:i.border==null?"600":"400",transition:"all 0.2s"},children:"No border"})}),l.jsx("div",{style:{marginBottom:"8px"},children:l.jsx("span",{style:{color:"var(--ikoneme-text-secondary)",fontSize:"12px",fontWeight:"600"},children:"Singular"})}),l.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"10px",marginBottom:"16px"},children:P.filter(F=>!F.plural).map(F=>{const h=i.border===F.id;return l.jsxs("button",{onClick:()=>b(F.id),title:F.label,style:{padding:"8px",background:h?"var(--ikoneme-primary)":"var(--ikoneme-surface)",border:`2px solid ${h?"var(--ikoneme-primary-dark)":"var(--ikoneme-border)"}`,borderRadius:"8px",cursor:"pointer",display:"flex",flexDirection:"column",alignItems:"center",gap:"6px",transition:"all 0.2s",position:"relative"},onMouseEnter:x=>{h||(x.currentTarget.style.background="var(--ikoneme-hover)")},onMouseLeave:x=>{h||(x.currentTarget.style.background="var(--ikoneme-surface)")},children:[l.jsx("div",{style:{boxSizing:"border-box",width:"64px",height:"64px",flexShrink:0,...Q(F,160)}}),l.jsx("span",{style:{fontSize:"11px",color:h?"white":"var(--ikoneme-text-primary)",fontWeight:h?"600":"400"},children:F.label}),l.jsx("div",{className:"ikon-tooltip",style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",background:"rgba(0,0,0,0.95)",color:"white",padding:"6px 10px",borderRadius:"6px",fontSize:"11px",whiteSpace:"nowrap",opacity:0,pointerEvents:"none",transition:"opacity 0.2s",marginBottom:"8px",zIndex:100},children:F.label})]},F.id)})}),l.jsx("div",{style:{marginBottom:"8px"},children:l.jsx("span",{style:{color:"var(--ikoneme-text-secondary)",fontSize:"12px",fontWeight:"600"},children:"Plural"})}),l.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"10px"},children:P.filter(F=>F.plural).map(F=>{const h=i.border===F.id;return l.jsxs("button",{onClick:()=>b(F.id),title:F.label,style:{padding:"8px",background:h?"var(--ikoneme-primary)":"var(--ikoneme-surface)",border:`2px solid ${h?"var(--ikoneme-primary-dark)":"var(--ikoneme-border)"}`,borderRadius:"8px",cursor:"pointer",display:"flex",flexDirection:"column",alignItems:"center",gap:"6px",transition:"all 0.2s",position:"relative"},onMouseEnter:x=>{h||(x.currentTarget.style.background="var(--ikoneme-hover)")},onMouseLeave:x=>{h||(x.currentTarget.style.background="var(--ikoneme-surface)")},children:[l.jsx("div",{style:{boxSizing:"border-box",width:"64px",height:"64px",flexShrink:0,...Q(F,160)}}),l.jsx("span",{style:{fontSize:"11px",color:h?"white":"var(--ikoneme-text-primary)",fontWeight:h?"600":"400"},children:F.label}),l.jsx("div",{className:"ikon-tooltip",style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",background:"rgba(0,0,0,0.95)",color:"white",padding:"6px 10px",borderRadius:"6px",fontSize:"11px",whiteSpace:"nowrap",opacity:0,pointerEvents:"none",transition:"opacity 0.2s",marginBottom:"8px",zIndex:100},children:F.label})]},F.id)})})]}):n==="root"?l.jsxs(l.Fragment,{children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"16px",padding:"10px 12px",background:"var(--ikoneme-surface)",borderRadius:"8px",border:"1px solid var(--ikoneme-border)"},children:[l.jsx(Ge,{size:18,color:"var(--ikoneme-text-secondary)"}),l.jsx("input",{type:"text",value:g,onChange:F=>s(F.target.value),placeholder:"Search icons...",style:{flex:1,border:"none",background:"transparent",color:"var(--ikoneme-text-primary)",fontSize:"14px",outline:"none"}})]}),v&&l.jsx("p",{style:{color:"var(--ikoneme-text-secondary)",fontSize:"13px",marginBottom:"12px"},children:"Searching…"}),l.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${wt}, 1fr)`,gap:"10px"},children:a.map((F,h)=>{const x=M(i.root)===F.url;return l.jsxs("button",{onClick:()=>p(F),title:F.name,style:{padding:"12px",background:x?"var(--ikoneme-primary)":"var(--ikoneme-surface)",border:"2px solid",borderColor:x?"var(--ikoneme-primary-dark)":"var(--ikoneme-border)",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",aspectRatio:"1",position:"relative",minHeight:"70px",minWidth:"70px"},onMouseEnter:f=>{f.currentTarget.style.transform="scale(1.05)",x||(f.currentTarget.style.background="var(--ikoneme-hover)")},onMouseLeave:f=>{f.currentTarget.style.transform="scale(1)",x||(f.currentTarget.style.background="var(--ikoneme-surface)")},children:[l.jsx("div",{style:{width:"100%",height:"100%",background:"white",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",padding:"4px"},children:l.jsx("img",{src:F.url,alt:F.name,style:{maxWidth:"100%",maxHeight:"100%",width:"100%",height:"100%",objectFit:"contain"},onError:f=>{f.target.style.display="none"}})}),l.jsx("div",{className:"ikon-tooltip",style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",background:"rgba(0, 0, 0, 0.95)",color:"white",padding:"6px 10px",borderRadius:"6px",fontSize:"11px",whiteSpace:"nowrap",opacity:0,pointerEvents:"none",transition:"opacity 0.2s",marginBottom:"8px",zIndex:100},children:F.name})]},`${F.url}-${h}`)})})]}):l.jsx("div",{style:{display:"grid",gridTemplateColumns:I[n].length<=3?"repeat(3, 1fr)":"repeat(auto-fit, minmax(90px, 1fr))",gap:"10px"},children:I[n].map((F,h)=>{var f,m;let x=!1;if(n==="reference"){const w=I.reference[0].url;F.url===w?x=M((f=i.reference)==null?void 0:f.left)===w:x=M((m=i.reference)==null?void 0:m.right)===F.url}else x=M(i[n])===F.url;return l.jsxs("button",{onClick:()=>k(n,F.url),title:F.tooltip,style:{padding:"12px",background:x?"var(--ikoneme-primary)":"var(--ikoneme-surface)",border:"2px solid",borderColor:x?"var(--ikoneme-primary-dark)":"var(--ikoneme-border)",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",aspectRatio:"1",position:"relative",minHeight:"70px",minWidth:"70px"},onMouseEnter:w=>{w.currentTarget.style.transform="scale(1.05)",x||(w.currentTarget.style.background="var(--ikoneme-hover)")},onMouseLeave:w=>{w.currentTarget.style.transform="scale(1)",x||(w.currentTarget.style.background="var(--ikoneme-surface)")},children:[l.jsx("div",{style:{width:"100%",height:"100%",background:"white",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",padding:"4px"},children:l.jsx("img",{src:F.url,alt:F.tooltip,style:{maxWidth:"100%",maxHeight:"100%",width:"100%",height:"100%",objectFit:"contain"}})}),l.jsx("div",{style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",background:"rgba(0, 0, 0, 0.95)",color:"white",padding:"6px 10px",borderRadius:"6px",fontSize:"11px",whiteSpace:"nowrap",opacity:0,pointerEvents:"none",transition:"opacity 0.2s",marginBottom:"8px",zIndex:100},className:"ikon-tooltip",children:F.tooltip})]},h)})})]}),l.jsx("style",{children:`
37
37
  button:hover .ikon-tooltip {
38
38
  opacity: 1 !important;
39
39
  }
40
- `})]})]})}function pe({ikon:e,size:n=320,onClose:s}){const r=typeof window<"u"?Math.max(120,Math.min(n,window.innerWidth-48,window.innerHeight-156)):n;return t.jsx("div",{role:"dialog","aria-modal":"true","aria-label":"Zoomed ikon",onClick:s,style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.75)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,padding:"24px"},children:t.jsxs("div",{onClick:i=>i.stopPropagation(),style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"32px",maxWidth:"100%"},children:[t.jsx(F,{ikon:e,size:r}),t.jsx("button",{onClick:s,style:{width:"40px",height:"40px",borderRadius:"50%",border:"none",background:"var(--ikoneme-panel-bg)",color:"var(--ikoneme-text-primary)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},title:"Close","aria-label":"Close",children:t.jsx(Ke,{size:20})})]})})}const me={"--ikoneme-primary":"#00a884","--ikoneme-primary-dark":"#008069","--ikoneme-background":"#0c0e12","--ikoneme-panel-bg":"#181b20","--ikoneme-surface":"#080a0e","--ikoneme-border":"#2a2e36","--ikoneme-text-primary":"#e9edef","--ikoneme-text-secondary":"#8696a0","--ikoneme-hover":"#2a2e36"};function Pe({ikons:e=[],mode:n="view",size:s=64,gap:r=6,zoom:i=!0,zoomSize:p=320,onChange:c,onIkonClick:w,searchRoot:f,theme:_,className:T,style:j}){const[b,m]=S.useState(null),[I,R]=S.useState(null),y=n==="edit",E=d=>{c&&c(e.filter((x,h)=>h!==d))},$=d=>{b!=null&&c&&c(e.map((x,h)=>h===b?d:x)),m(null)},o=(d,x)=>{!y&&w&&w(d,x),i&&R(x)},l={...me,..._},u=i||!y&&!!w;return t.jsxs("div",{className:["ikoneme",T].filter(Boolean).join(" "),style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:`${r}px`,...l,...j},children:[e.map((d,x)=>t.jsx(F,{ikon:d,size:s,onClick:u?()=>o(d,x):void 0,onEdit:y?()=>m(x):void 0,onDelete:y&&c?()=>E(x):void 0},x)),y&&b!=null&&e[b]&&t.jsx("div",{style:l,children:t.jsx(ue,{ikon:e[b],searchRoot:f,onSave:$,onClose:()=>m(null)})}),i&&I!=null&&e[I]&&t.jsx("div",{style:l,children:t.jsx(pe,{ikon:e[I],size:p,onClose:()=>R(null)})})]})}exports.BORDER_CONFIG=L;exports.BORDER_IDS=ne;exports.DEFAULT_THEME=me;exports.IKONDB_BASE_URL=V;exports.Ikon=F;exports.IkonEditor=ue;exports.IkonZoomView=pe;exports.Ikoneme=Pe;exports.ZONE_CONFIG=g;exports.clearIkonDbCache=De;exports.createDefaultIkon=q;exports.defaultSearchRoot=de;exports.generateIkonemeFromText=Oe;exports.getBorderConfig=re;exports.getIconConfig=K;exports.getIconDisplayUrl=ie;exports.getIconUrl=N;exports.getIconUrlByIndex=Ce;exports.getIkonDetails=ce;exports.getIkonList=le;exports.normalizeIkon=se;exports.normalizeIkoneme=Ee;exports.searchIkons=ae;
40
+ `})]})]})}function Ce({ikon:e,size:t=320,onClose:o}){const r=typeof window<"u"?Math.max(120,Math.min(t,window.innerWidth-48,window.innerHeight-156)):t;return l.jsx("div",{role:"dialog","aria-modal":"true","aria-label":"Zoomed ikon",onClick:o,style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.75)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,padding:"24px"},children:l.jsxs("div",{onClick:i=>i.stopPropagation(),style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"32px",maxWidth:"100%"},children:[l.jsx(re,{ikon:e,size:r}),l.jsx("button",{onClick:o,style:{width:"40px",height:"40px",borderRadius:"50%",border:"none",background:"var(--ikoneme-panel-bg)",color:"var(--ikoneme-text-primary)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},title:"Close","aria-label":"Close",children:l.jsx(Pe,{size:20})})]})})}const je={"--ikoneme-primary":"#00a884","--ikoneme-primary-dark":"#008069","--ikoneme-background":"#0c0e12","--ikoneme-panel-bg":"#181b20","--ikoneme-surface":"#080a0e","--ikoneme-border":"#2a2e36","--ikoneme-text-primary":"#e9edef","--ikoneme-text-secondary":"#8696a0","--ikoneme-hover":"#2a2e36"};function yt({ikons:e=[],mode:t="view",size:o=64,gap:r=6,zoom:i=!0,zoomSize:c=320,onChange:n,onIkonClick:y,searchRoot:g,theme:s,className:a,style:u}){const[v,S]=B.useState(null),[k,E]=B.useState(null),b=t==="edit",p=f=>{n&&n(e.filter((m,w)=>w!==f))},T=f=>{v!=null&&n&&n(e.map((m,w)=>w===v?f:m)),S(null)},F=(f,m)=>{!b&&y&&y(f,m),i&&E(m)},h={...je,...s},x=i||!b&&!!y;return l.jsxs("div",{className:["ikoneme",a].filter(Boolean).join(" "),style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:`${r}px`,...h,...u},children:[e.map((f,m)=>l.jsx(re,{ikon:f,size:o,onClick:x?()=>F(f,m):void 0,onEdit:b?()=>S(m):void 0,onDelete:b&&n?()=>p(m):void 0},m)),b&&v!=null&&e[v]&&l.jsx("div",{style:h,children:l.jsx(Ee,{ikon:e[v],searchRoot:g,onSave:T,onClose:()=>S(null)})}),i&&k!=null&&e[k]&&l.jsx("div",{style:h,children:l.jsx(Ce,{ikon:e[k],size:c,onClose:()=>E(null)})})]})}const vt={context:{right:!0,bottom:!0},reference:{right:!0,bottom:!0},role:{right:!1,bottom:!0},modes:{right:!0,bottom:!0},root:{right:!0,bottom:!0},east:{right:!1,bottom:!0},tenses:{right:!1,bottom:!1}},X=new Map;function ae(e){return e?(X.has(e)||X.set(e,new Promise(t=>{const o=new Image;o.crossOrigin="anonymous",o.onload=()=>t(o),o.onerror=()=>{X.delete(e),t(null)},o.src=e})),X.get(e)):Promise.resolve(null)}function me(e,t,o,r,i,c){if(!t||i<=0||c<=0)return;const n=t.naturalWidth||t.width,y=t.naturalHeight||t.height;if(!n||!y)return;const g=Math.min(i/n,c/y),s=n*g,a=y*g;e.drawImage(t,o+(i-s)/2,r+(c-a)/2,s,a)}function bt(e,t,o,r,i,c,n){e.save(),e.fillStyle="#888",e.font=`${Math.max(10,Math.round(n/12))}px sans-serif`,e.textAlign="center",e.textBaseline="middle",e.fillText(t,o+i/2,r+c/2,i),e.restore()}function kt(e,t,o,r,i,c){const{right:n,bottom:y}=vt[t];e.fillStyle=V,n&&e.fillRect(o+i-1,r,1,c),y&&e.fillRect(o,r+c-1,i,1)}async function It(e,t,o,r,i){const c=await ae(t.image);if(!c)return;const n=t.plural?150:78,y=i/78*2,g=document.createElement("canvas");g.width=Math.round(n*y),g.height=Math.round(78*y),g.getContext("2d").drawImage(c,0,0,g.width,g.height);const s=9*y,{corner:a}=ie(i),u=g.width,v=g.height,S=[[0,0,s,s,o,r,a,a],[u-s,0,s,s,o+i-a,r,a,a],[0,v-s,s,s,o,r+i-a,a,a],[u-s,v-s,s,s,o+i-a,r+i-a,a,a],[s,0,u-2*s,s,o+a,r,i-2*a,a],[s,v-s,u-2*s,s,o+a,r+i-a,i-2*a,a],[0,s,s,v-2*s,o,r+a,a,i-2*a],[u-s,s,s,v-2*s,o+i-a,r+a,a,i-2*a]];for(const[k,E,b,p,T,F,h,x]of S)e.drawImage(g,k,E,b,p,T,F,h,x)}async function _e(e,t,o,r,i){var E,b;const c=t!=null&&t.border?te(t.border):null,n=c?ie(i).frame:1,{framePad:y,zonePad:g,rootPad:s}=Se(i);e.fillStyle="#ffffff",e.fillRect(o+n,r+n,i-2*n,i-2*n),c?await It(e,c,o,r,i):(e.strokeStyle="rgba(255, 255, 255, 0.1)",e.lineWidth=1,e.strokeRect(o+.5,r+.5,i-1,i-1));const a=n+y,u=i-2*a,v=ne(u,se).map(p=>o+a+p),S=ne(u,se).map(p=>r+a+p),k=[];for(const[p,{cols:[T,F],rows:[h,x]}]of Object.entries(xt)){const f=v[T],m=S[h],w=v[F]-f,C=S[x]-m;if(e.fillStyle=R[p],e.fillRect(f,m,w,C),kt(e,p,f,m,w,C),p==="reference"){const O=ne(w,Ie).map(L=>f+L);e.fillStyle=V;for(let L=1;L<=3;L++)e.fillRect(O[L]-1,m,1,C-1);[[(E=t==null?void 0:t.reference)==null?void 0:E.left,1],[(b=t==null?void 0:t.reference)==null?void 0:b.right,2]].forEach(([L,H])=>{const le=O[H]+g,oe=O[H+1]-O[H]-2*g;k.push(ae(J(L)).then(Y=>me(e,Y,le,m+g,oe,C-2*g)))});continue}if(p==="east")continue;const G=t==null?void 0:t[p],D=p==="root"?s:g,U=J(G);if(!U){G!=null&&G.name&&bt(e,G.name,f,m,w,C,i);continue}k.push(ae(U).then(O=>me(e,O,f+D,m+D,w-2*D,C-2*D)))}await Promise.all(k)}async function Te(e,{size:t=120,gap:o=0,padding:r=40,perRow:i=8,background:c="#ffffff",title:n=null,titleColor:y="#000000",titleFont:g="16px sans-serif",pixelRatio:s=1}={}){const a=e!=null&&e.length?e:[],u=Math.max(1,Math.min(a.length,i)),v=Math.max(1,Math.ceil(a.length/u)),S=n?60:0,k=r*2+u*t+(u-1)*o,E=r*2+S+v*t+(v-1)*o,b=document.createElement("canvas");b.width=Math.round(k*s),b.height=Math.round(E*s);const p=b.getContext("2d");return p.scale(s,s),p.fillStyle=c,p.fillRect(0,0,k,E),n&&(p.fillStyle=y,p.font=g,p.fillText(n,r,Math.max(16,r-10))),await Promise.all(a.map((T,F)=>{const h=r+F%u*(t+o),x=r+S+Math.floor(F/u)*(t+o);return _e(p,T,h,x,t)})),b}async function St(e,t){const o=await Te(e,t);return new Promise((r,i)=>{o.toBlob(c=>c?r(c):i(new Error("Could not encode the PNG")),"image/png")})}exports.BORDER_CONFIG=P;exports.BORDER_IDS=be;exports.DEFAULT_THEME=je;exports.IKONDB_BASE_URL=ee;exports.Ikon=re;exports.IkonEditor=Ee;exports.IkonZoomView=Ce;exports.Ikoneme=yt;exports.ZONE_CONFIG=I;exports.clearIkonDbCache=ze;exports.createDefaultIkon=he;exports.createEmptyIkon=nt;exports.defaultSearchRoot=ve;exports.drawIkon=_e;exports.generateIkonemeFromText=gt;exports.getBorderConfig=te;exports.getBorderImageStyle=Q;exports.getBorderMetrics=ie;exports.getIconConfig=N;exports.getIconDisplayUrl=J;exports.getIconUrl=M;exports.getIconUrlByIndex=Ft;exports.getIkonDetails=ye;exports.getIkonList=we;exports.normalizeIkon=ke;exports.normalizeIkoneme=ct;exports.renderIkonemeToCanvas=Te;exports.renderIkonemeToPng=St;exports.searchIkons=de;
41
41
  //# sourceMappingURL=ikoneme-lib.cjs.map