tosijs-ui 1.7.2 → 1.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/color-input.d.ts +0 -1
  3. package/dist/color-input.js +24 -10
  4. package/dist/doc-browser.d.ts +9 -0
  5. package/dist/doc-browser.js +54 -9
  6. package/dist/doc-system/doc-system-styles.d.ts +2 -0
  7. package/dist/doc-system/doc-system-styles.js +15 -1
  8. package/dist/doc-system/doc-system.js +1 -0
  9. package/dist/doc-system/site/check-examples-cli.js +5 -3
  10. package/dist/doc-system/site/check-examples.d.ts +13 -0
  11. package/dist/doc-system/site/check-examples.js +26 -10
  12. package/dist/doc-system/site/generate-site.d.ts +2 -0
  13. package/dist/doc-system/site/generate-site.js +1 -0
  14. package/dist/doc-system/site/orchestrator.js +16 -2
  15. package/dist/doc-system/site/site-config.d.ts +7 -0
  16. package/dist/form.d.ts +0 -1
  17. package/dist/form.js +35 -21
  18. package/dist/hydrate/hydrate.js +82 -82
  19. package/dist/hydrate/hydrate.js.map +16 -15
  20. package/dist/iife.js +114 -114
  21. package/dist/iife.js.map +16 -15
  22. package/dist/index.d.ts +1 -0
  23. package/dist/index.js +1 -0
  24. package/dist/live-example/code-transform.d.ts +14 -0
  25. package/dist/live-example/code-transform.js +20 -2
  26. package/dist/live-example/component.d.ts +24 -51
  27. package/dist/live-example/component.js +44 -51
  28. package/dist/live-example/styles.d.ts +22 -50
  29. package/dist/live-example/styles.js +48 -49
  30. package/dist/live-example/types.d.ts +2 -2
  31. package/dist/pocket-bar.d.ts +99 -0
  32. package/dist/pocket-bar.js +298 -0
  33. package/dist/pop-float.d.ts +1 -1
  34. package/dist/pop-float.js +13 -7
  35. package/dist/segmented.d.ts +0 -1
  36. package/dist/segmented.js +38 -20
  37. package/dist/tsconfig.tsbuildinfo +1 -1
  38. package/dist/version.d.ts +1 -1
  39. package/dist/version.js +1 -1
  40. package/llms.txt +3 -1
  41. package/package.json +3 -3
@@ -1,79 +1,79 @@
1
- import{Sa as c5,Ta as V2}from"./index-iife-415dypjp.js";var T9={};c5(T9,{xrControllersText:()=>xk,xrControllers:()=>yk,xinTagList:()=>xg,xinTag:()=>ek,xinTabs:()=>Rl,xinTable:()=>RC,xinSizer:()=>fk,xinSidenav:()=>Vi,xinSelect:()=>KC,xinSegmented:()=>rk,xinRating:()=>$k,xinPasswordStrength:()=>Qk,xinNotification:()=>Sl,xinMenu:()=>jC,xinMd:()=>Kk,xinLocalized:()=>OC,xinForm:()=>bi,xinFloat:()=>oh,xinField:()=>Hi,xinCarousel:()=>Th,wrapIcon:()=>C3,version:()=>Zy,valueRenderer:()=>O3,updateLocalized:()=>U3,trackDrag:()=>P1,tosijs:()=>k0,tosiThemeEditor:()=>jk,tosiTagList:()=>Jy,tosiTag:()=>s9,tosiTabs:()=>X0,tosiTable:()=>W3,tosiSizer:()=>Yy,tosiSidenav:()=>Z0,tosiSelect:()=>F1,tosiSegmented:()=>Xy,tosiRow:()=>hk,tosiRouteView:()=>Ik,tosiRichText:()=>Fy,tosiRating:()=>Ay,tosiPasswordStrength:()=>_y,tosiNotification:()=>n3,tosiMonth:()=>Fk,tosiMenu:()=>I6,tosiMd:()=>N9,tosiLocalized:()=>Q1,tosiLocalePicker:()=>o6,tosiHeaderLinks:()=>ti,tosiHeader:()=>mi,tosiGrid:()=>lk,tosiForm:()=>n4,tosiFloat:()=>z0,tosiField:()=>o4,tosiDocSystem:()=>Ti,tosiDiff:()=>w0,tosiDialog:()=>$4,tosiColumn:()=>Ck,tosiCarousel:()=>q6,testManager:()=>_1,tabSelector:()=>vl,svgIcon:()=>bh,svg2DataUrl:()=>g0,styleSheet:()=>B4,spacer:()=>X9,sizeBreak:()=>ok,sideNav:()=>ji,setLocale:()=>O4,scriptTag:()=>b1,runTests:()=>c4,router:()=>M0,richTextWidgets:()=>Gy,richText:()=>Rk,rewriteImports:()=>Y1,resolveMenuItems:()=>G1,resolveIcon:()=>e1,removeLastMenu:()=>h1,postNotification:()=>f3,positionFloat:()=>O6,popMenu:()=>n,popFloat:()=>q0,popDropMenu:()=>M6,parseValueType:()=>f6,parseShortcut:()=>_4,navigate:()=>Mk,modifierKeys:()=>fh,menu:()=>b6,matchShortcut:()=>z3,markdownViewer:()=>Ak,mapBox:()=>Pk,makeSorter:()=>P4,localize:()=>c,localePicker:()=>FC,loadTransform:()=>Y0,liveTheme:()=>r,liveExample:()=>T4,legacyAliases:()=>By,keystroke:()=>uh,keycode:()=>Q6,isBreached:()=>Py,insertExamples:()=>M4,initTooltips:()=>Bg,initLocalization:()=>G3,icons:()=>O,iconRules:()=>h3,i18n:()=>L,getRouterParams:()=>Dk,gamepadText:()=>ei,gamepadState:()=>iy,findShortcutAction:()=>K3,findHighestZ:()=>P2,filterPart:()=>f4,filterForDrop:()=>V0,filterForClick:()=>P3,filterBuilder:()=>Ei,expect:()=>h9,executeInline:()=>b4,executeInIframe:()=>S4,executeCode:()=>Q7,enableTests:()=>g9,enableLiveTheme:()=>qy,elastic:()=>ik,editableRect:()=>ri,dragAndDrop:()=>U4,displayShortcut:()=>A4,disableTests:()=>w9,disableLiveTheme:()=>qk,digest:()=>Vy,diffLines:()=>P6,defineRoutes:()=>Sk,defineIcons:()=>Zh,defaultColors:()=>s1,dataTable:()=>vC,createThemeWithLegacy:()=>wk,createTheme:()=>s2,createTestContext:()=>C9,createSubMenu:()=>_3,createMenuItem:()=>H6,createMenuAction:()=>R6,createDropMenuItem:()=>D6,createDocBrowser:()=>z9,createDarkTheme:()=>u4,createColorVariables:()=>wy,componentVars:()=>Bk,commandButton:()=>p1,colorInput:()=>B3,codeEditor:()=>n1,canonicalShortcut:()=>ah,bringToFront:()=>x2,bodymovinPlayer:()=>Ih,blockStyle:()=>H9,baseVariables:()=>gy,baseTheme:()=>kk,baseDarkTheme:()=>gk,b3d:()=>Mh,availableFilters:()=>_9,applyTheme:()=>$9,applyLocalized:()=>A0,abTest:()=>Jh,XinWord:()=>vk,XinTagList:()=>yg,XinTag:()=>tk,XinSizer:()=>nk,XinSelect:()=>AC,XinSegmented:()=>Lk,XinRating:()=>Xk,XinPasswordStrength:()=>Wk,XinNotification:()=>bl,XinMenu:()=>VC,XinLocalized:()=>F4,XinForm:()=>Di,XinFloat:()=>rh,XinField:()=>Ri,XinCarousel:()=>sh,TosiThemeEditor:()=>Y9,TosiTagList:()=>L2,TosiTag:()=>c0,TosiTabs:()=>D4,TosiTable:()=>X4,TosiSizer:()=>i5,TosiSidenav:()=>I2,TosiSelect:()=>S1,TosiSegmented:()=>d2,TosiRow:()=>O9,TosiRouteView:()=>M9,TosiRating:()=>x5,TosiPasswordStrength:()=>y5,TosiNotification:()=>h2,TosiMonth:()=>v9,TosiMenu:()=>G4,TosiMd:()=>t4,TosiLocalized:()=>M1,TosiLocalePicker:()=>W4,TosiHeaderLinks:()=>G9,TosiHeader:()=>U9,TosiGrid:()=>Q9,TosiForm:()=>r4,TosiFloat:()=>f1,TosiField:()=>L4,TosiDocSystem:()=>V9,TosiDiff:()=>g3,TosiDialog:()=>N3,TosiColumn:()=>W9,TosiCarousel:()=>q4,TabSelector:()=>pl,SvgIcon:()=>l3,SizeBreak:()=>I9,SideNav:()=>qi,STORAGE_KEY:()=>H4,RichText:()=>h5,RemoteSyncManager:()=>N0,MarkdownViewer:()=>_k,MapBox:()=>G2,LocalePicker:()=>GC,LiveExample:()=>l2,FilterPart:()=>A9,FilterBuilder:()=>K9,EditableRect:()=>Z1,DataTable:()=>pC,CodeEditor:()=>o1,BodymovinPlayer:()=>Z2,B3d:()=>i3,AbTest:()=>J2});var k0={};c5(k0,{xinValue:()=>lx,xinSlot:()=>lh,xinProxy:()=>i6,xinPath:()=>Cx,xin:()=>l1,warnDeprecated:()=>j1,version:()=>l6,vars:()=>z,varDefault:()=>P,validateAgainstConstraints:()=>y6,updates:()=>d5,unobserve:()=>x0,touchElement:()=>u5,touch:()=>O1,tosiValue:()=>b,tosiUnique:()=>Oh,tosiSlot:()=>Ch,tosiSetValue:()=>hx,tosiPath:()=>V1,tosiLoader:()=>$h,tosiBlueprint:()=>Xh,tosiAccessor:()=>xx,tosi:()=>t,throttle:()=>X2,sync:()=>Gh,svgElements:()=>l4,share:()=>Ah,settings:()=>a0,scrollListItemIntoView:()=>Ex,onThemePreferencesChange:()=>Dx,onStylesheetChange:()=>Jx,on:()=>N2,observe:()=>n5,mathML:()=>E8,makeComponent:()=>m5,invertLuminance:()=>i0,initVars:()=>Rx,hotReload:()=>ih,getThemePreferences:()=>n8,getListItem:()=>q2,getListInstance:()=>f5,getListBinding:()=>Y2,getCssVar:()=>T8,elements:()=>G,deprecated:()=>B1,deleteListItem:()=>fx,debounce:()=>l0,css:()=>$2,boxedProxy:()=>a5,boxed:()=>U1,blueprintLoader:()=>Nh,blueprint:()=>Yh,bindings:()=>r1,bindParts:()=>Mx,bind:()=>d1,TOSI_ACCESSOR:()=>T5,TAKE_DESCRIPTOR:()=>x4,StyleSheet:()=>W1,MoreMath:()=>$x,Component:()=>F,Color:()=>X,BlueprintLoader:()=>t5,Blueprint:()=>g4});function D1(y,x){if(y==null||typeof y!=="object")return y;if(y instanceof Date)return new Date(y.getTime());if(x===void 0)x=new WeakMap;else if(x.has(y))return x.get(y);if(y instanceof Set){let C=new Set;x.set(y,C);for(let l of y)C.add(D1(l,x));return C}if(y instanceof Map){let C=new Map;x.set(y,C);for(let[l,i]of y)C.set(D1(l,x),D1(i,x));return C}if(Array.isArray(y)){let C=[];x.set(y,C);for(let l of y)C.push(D1(l,x));return C}let h={};x.set(y,h);for(let C in y)h[C]=D1(y[C],x);return h}var s5="-xin-data",B2=`.${s5}`,p8="-xin-event",h8=`.${p8}`,H1=Symbol.for("xin-path"),z2=Symbol.for("xin-value"),ay="xinObserve",my="xinBind",ty="xinOn",T5=Symbol.for("tosi-accessor"),x4=Symbol.for("tosi-take"),E0=Symbol("list-binding"),Q2=Symbol("list-instance"),X5=new Map;function ey(y,x){let h=X5.get(y);if(h===void 0)h=new Set,X5.set(y,h);h.add(x)}function yx(y){return X5.get(y)}var C8=new Set;function j1(y,x){if(!C8.has(y))console.warn(x),C8.add(y)}function B1(y,x){let h=!1;return(...C)=>{if(!h)console.warn(x),h=!0;return y(...C)}}var V1=(y)=>{return y&&y[H1]||void 0};function b(y){if(typeof y==="object"&&y!==null){let x=y[z2];return x!==void 0?x:y}return y}function xx(y){return y!=null?y[T5]:void 0}function hx(y,x){if(V1(y)===void 0)throw Error("tosiSetValue requires a xin or boxed proxy");y[z2]=x}var Cx=B1(V1,"xinPath is deprecated. Use tosiPath instead."),lx=B1(b,"xinValue is deprecated. Use tosiValue instead."),t2=new WeakMap,L1=new WeakMap,e2=(y)=>{let x=y.cloneNode();if(x instanceof Element){let C=L1.get(y),l=t2.get(y);if(C!=null)L1.set(x,D1(C));if(l!=null)t2.set(x,D1(l))}let h=x instanceof HTMLTemplateElement?x.content:x;for(let C of Array.from(y instanceof HTMLTemplateElement?y.content.childNodes:y.childNodes))if(C instanceof Element||C instanceof DocumentFragment)h.appendChild(e2(C));else h.appendChild(C.cloneNode());return x},a0={debug:!1,perf:!1},ix=(y)=>{try{return JSON.stringify(y)}catch(x){return"{has circular references}"}},v8=(...y)=>Error(y.map(ix).join(" ")),kx=()=>new Date(parseInt("1000000000",36)+Date.now()).valueOf().toString(36).slice(1),gx=0,wx=()=>(parseInt("10000",36)+ ++gx).toString(36).slice(-5),R8=()=>kx()+wx(),$5=Symbol("delete"),D8=Symbol("new-object"),A5=Symbol("automatic-index");function H8(y){if(y==="")return[];if(Array.isArray(y))return y;else{let x=[];while(y.length>0){let h=y.search(/\[[^\]]+\]/);if(h===-1){x.push(y.split("."));break}else{let C=y.slice(0,h);if(y=y.slice(h),C!=="")x.push(C.split("."));if(h=y.indexOf("]")+1,x.push(y.slice(1,h-1)),y.slice(h,h+1)===".")h+=1;y=y.slice(h)}}return x}}var w2=new WeakMap;function b8(y,x){if(w2.get(y)===void 0)w2.set(y,{});let h={};if(w2.get(y)[x]=h,x==="_auto_")y.forEach((C,l)=>{if(C[A5]===void 0)C[A5]=R8();h[C[A5]+""]=l});else y.forEach((C,l)=>{h[y1(C,x)+""]=l});return h}function Bx(y,x){if(w2.get(y)===void 0||w2.get(y)[x]===void 0)return b8(y,x);else return w2.get(y)[x]}function zx(y,x,h){h=h+"";let C=Bx(y,x)[h];if(C===void 0||y1(y[C],x)+""!==h)C=b8(y,x)[h];return C}function qx(y,x,h){if(y[x]===void 0&&h!==void 0)y[x]=h;return y[x]}function S8(y,x,h,C){let l=x!==""?zx(y,x,h):h;if(C===$5){if(l!==void 0)y.splice(l,1),w2.delete(y);return Symbol("deleted")}else if(C===D8){if(x===""&&y[l]===void 0)y[l]={}}else if(C!==void 0)if(l!==void 0)y[l]=C;else if(x!==""&&y1(C,x)+""===h+"")y.push(C),l=y.length-1;else throw Error(`byIdPath insert failed at [${x}=${h}]`);return y[l]}function l8(y){if(!Array.isArray(y))throw v8("setByPath failed: expected array, found",y)}function i8(y){if(y==null||!(y instanceof Object))throw v8("setByPath failed: expected Object, found",y)}function y1(y,x){let h=H8(x),C=y,l,i,k,g;for(l=0,i=h.length;C!==void 0&&l<i;l++){let w=h[l];if(Array.isArray(w))for(k=0,g=w.length;C!==void 0&&k<g;k++){let B=w[k];C=C[B]}else if(C.length===0){if(C=C[Number(w.slice(1))],w[0]!=="=")return}else if(w.includes("=")){let[B,...q]=w.split("=");C=S8(C,B,q.join("="))}else k=parseInt(w,10),C=C[k]}return C}function h4(y,x,h){let C=y;if(x==="")throw Error("setByPath cannot be used to set the root object");let l=H8(x);while(C!=null&&l.length>0){let i=l.shift();if(typeof i==="string"){let k=i.indexOf("=");if(k>-1){if(k===0)i8(C);else l8(C);let g=i.slice(0,k),w=i.slice(k+1);if(C=S8(C,g,w,l.length>0?D8:h),l.length===0)return!0}else{l8(C);let g=parseInt(i,10);if(l.length>0)C=C[g];else{if(h!==$5){if(C[g]===h)return!1;C[g]=h}else C.splice(g,1);return!0}}}else if(Array.isArray(i)&&i.length>0){i8(C);while(i.length>0){let k=i.shift();if(i.length>0||l.length>0)C=qx(C,k,i.length>0?{}:[]);else{if(h!==$5){if(C[k]===h)return!1;C[k]=h}else{if(!Object.prototype.hasOwnProperty.call(C,k))return!1;delete C[k]}return!0}}}else throw Error(`setByPath failed, bad path ${x}`)}throw Error(`setByPath(${y}, ${x}, ${h}) failed`)}var w1={},Y5=null,jx=(y)=>{Y5=y},C4=()=>{if(Y5===null)throw Error("xin proxy not initialized");return Y5},N5=null,J5=null,Vx=(y,x)=>{N5=y,J5=x},Px=()=>{if(N5===null)throw Error("bind not initialized");return N5},_x=()=>{if(J5===null)throw Error("on not initialized");return J5},k8=Symbol("observer should be removed"),m0=[],W2=[],Z5=!1,p5,v5;function Ax(y,x,h,C){let l=yx(y);if(l===void 0)return[];let i=[];for(let k of l){let g=y1(h,k);if(g!==void 0)i.push(`${y}[${k}=${g}]${C}`)}return i}var y0=(y,x)=>{if(!x.startsWith(y))return!1;if(x.length===y.length)return!0;let h=x.charAt(y.length);return h==="."||h==="["};class M8{description;test;callback;constructor(y,x){let h=typeof x==="string"?`"${x}"`:`function ${x.name}`,C;if(typeof y==="string")this.test=(l)=>typeof l==="string"&&l!==""&&(y0(l,y)||y0(y,l)),C=`test = "${y}"`;else if(y instanceof RegExp)this.test=y.test.bind(y),C=`test = "${y.toString()}"`;else if(y instanceof Function)this.test=y,C=`test = function ${y.name}`;else throw Error("expect listener test to be a string, RegExp, or test function");if(this.description=`${C}, ${h}`,typeof x==="function")this.callback=x;else throw Error("expect callback to be a path or function");m0.push(this)}}var d5=async()=>{if(p5===void 0)return;await p5},Kx=()=>{if(a0.perf)console.time("xin async update");let y=Array.from(W2);W2.length=0,Z5=!1;let x=v5;v5=void 0;try{for(let h of y)m0.filter((C)=>{let l;try{l=C.test(h)}catch(i){return console.error(`Listener ${C.description} threw "${i}" at "${h}"`),!1}if(l===k8)return x0(C),!1;return l}).forEach((C)=>{let l;try{l=C.callback(h)}catch(i){console.error(`Listener ${C.description} threw "${i}" handling "${h}"`)}if(l===k8)x0(C)})}finally{if(typeof x==="function")x();if(a0.perf)console.timeEnd("xin async update")}},O1=(y)=>{let x=typeof y==="string"?y:V1(y);if(x===void 0)throw console.error("touch was called on an invalid target",y),Error("touch was called on an invalid target");if(Z5===!1)p5=new Promise((C)=>{v5=C}),Z5=setTimeout(Kx);if(W2.find((C)=>y0(C,x))==null)W2.push(x);let h=x.match(/^(.+)\[(\d+)\](.*)$/);if(h!==null){let[,C,l,i]=h,k=parseInt(l,10),g=y1(w1,`${C}[${k}]`);if(g!=null){let w=Ax(C,k,g,i);for(let B of w)if(W2.find((q)=>y0(q,B))==null)W2.push(B)}}},C0=(y,x)=>{return new M8(y,x)},x0=(y)=>{let x=m0.indexOf(y);if(x>-1)m0.splice(x,1);else throw Error("unobserve failed, listener not found")},I8=(y,x,{bubbles:h=!1,composed:C=!1}={})=>{let l=new Event(x,{bubbles:h,composed:C});y.dispatchEvent(l)},c8=(y)=>{if(y instanceof HTMLInputElement)return y.type;else if(y instanceof HTMLSelectElement&&y.hasAttribute("multiple"))return"multi-select";else return"other"},q1=(y,x=2)=>String(y).padStart(x,"0"),Ux=(y,x)=>{switch(y){case"date":return`${x.getUTCFullYear()}-${q1(x.getUTCMonth()+1)}-${q1(x.getUTCDate())}`;case"month":return`${x.getUTCFullYear()}-${q1(x.getUTCMonth()+1)}`;case"datetime-local":return`${x.getFullYear()}-${q1(x.getMonth()+1)}-${q1(x.getDate())}T${q1(x.getHours())}:${q1(x.getMinutes())}`;default:return x.toISOString()}},Gx=(y)=>{let x=Math.floor(y/1000),h=`${q1(Math.floor(x/3600))}:${q1(Math.floor(x/60)%60)}`;return x%60===0?h:`${h}:${q1(x%60)}`},Fx=(y)=>{let x=y.match(/^(\d\d):(\d\d)(?::(\d\d)(?:\.(\d+))?)?$/);if(x==null)return NaN;let[,h,C,l,i]=x;return(Number(h)*60+Number(C))*60000+Number(l??0)*1000+Number(i??0)},Ox=(y,x)=>{let h=c8(y);switch(h){case"radio":y.checked=x!=null&&y.value===String(x);break;case"checkbox":y.checked=!!x;break;case"date":case"datetime-local":case"month":case"week":{let C=y;if(x==null||x==="")C.value="";else if(x instanceof Date||typeof x==="number"){let l=x instanceof Date?x:new Date(x);if(h==="week")try{C.valueAsDate=l}catch(i){}else C.value=Ux(h,l)}else C.value=String(x);break}case"time":{let C=y;if(x==null||x==="")C.value="";else if(typeof x==="number")C.value=Gx(x);else if(x instanceof Date)C.value=`${q1(x.getHours())}:${q1(x.getMinutes())}:${q1(x.getSeconds())}`;else C.value=String(x);break}case"multi-select":for(let C of Array.from(y.querySelectorAll("option")))C.selected=Array.isArray(x)?x.map(String).includes(C.value):x!=null?!!x[C.value]:!1;break;default:y.value=x==null?"":x}},Wx=(y)=>{switch(c8(y)){case"radio":{let x=y.parentElement?.querySelector(`[name="${y.name}"]:checked`);return x!=null?x.value:null}case"checkbox":return y.checked;case"number":case"range":{let x=y,h=typeof x.valueAsNumber==="number"?x.valueAsNumber:Number(x.value);return Number.isNaN(h)?x.value:h}case"date":case"datetime-local":case"month":case"week":{let x=y,h=x.valueAsDate??(x.value!==""?new Date(x.value):null);return h!=null&&!Number.isNaN(h.getTime())?h:x.value}case"time":{let x=y,h=typeof x.valueAsNumber==="number"?x.valueAsNumber:NaN;if(Number.isNaN(h))h=Fx(x.value);return Number.isNaN(h)?x.value:h}case"multi-select":return Array.from(y.querySelectorAll("option")).reduce((x,h)=>{return x[h.value]=h.selected,x},{});default:return y.value}},{ResizeObserver:g8}=globalThis,R5=g8!=null?new g8((y)=>{for(let x of y){let h=x.target;I8(h,"resize")}}):{observe(){},unobserve(){}},w8=(y,x,h=!0)=>{if(y!=null&&x!=null)if(typeof x==="string")y.textContent=x;else if(Array.isArray(x))x.forEach((C)=>{y.append(C instanceof Node&&h?e2(C):C)});else if(x instanceof Node)y.append(h?e2(x):x);else throw Error("expect text content or document node")},l0=(y,x=250)=>{let h;return function(...C){if(h!==void 0)clearTimeout(h);h=setTimeout(()=>{y.apply(this,C)},x)}},X2=(y,x=250)=>{let h,C=Date.now()-x;return function(...l){clearTimeout(h);let i=Date.now()-C;if(i>=x)C=Date.now(),y.apply(this,l);else h=setTimeout(()=>{C=Date.now(),y.apply(this,l)},x-i)}},r1={value:{toDOM:Ox,fromDOM(y){return Wx(y)}},text:{toDOM(y,x){y.textContent=x}},enabled:{toDOM(y,x){y.disabled=!x}},disabled:{toDOM(y,x){y.disabled=Boolean(x)}},list:{toDOM(y,x,h){Y2(y,x,h).update(x)}}};function K1(y){return y.replace(/[A-Z]/g,(x)=>{return`-${x.toLocaleLowerCase()}`})}function s8(y){return y.replace(/-([a-z])/g,(x,h)=>{return h.toLocaleUpperCase()})}var Qx=180/Math.PI,Xx=Math.PI/180;function R1(y,x,h){return h<y?NaN:x<y?y:x>h?h:x}function a1(y,x,h,C=!0){if(C)h=R1(0,h,1);return h*(x-y)+y}var $x={RADIANS_TO_DEGREES:Qx,DEGREES_TO_RADIANS:Xx,clamp:R1,lerp:a1};function T8(y,x=document.body){let h=getComputedStyle(x);if(y.endsWith(")")&&y.startsWith("var("))y=y.slice(4,-1);return h.getPropertyValue(y).trim()}var d8={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Yx=(y,x,h)=>{return(0.299*y+0.587*x+0.114*h)/255},k2=(y)=>("00"+Math.round(Number(y)).toString(16)).slice(-2);class L8{h;s;l;constructor(y,x,h){y/=255,x/=255,h/=255;let C=Math.max(y,x,h),l=C-Math.min(y,x,h),i=l!==0?C===y?(x-h)/l:C===x?2+(h-y)/l:4+(y-x)/l:0;this.h=60*i<0?60*i+360:60*i,this.s=l!==0?C<=0.5?l/(2*C-l):l/(2-(2*C-l)):0,this.l=(2*C-l)/2}}var m1=globalThis.document!==void 0?globalThis.document.createElement("span"):void 0;if(m1)m1.style.display="none";class X{r;g;b;a;static fromVar(y,x=document.body){return X.fromCss(T8(y,x))}static fromCss(y){let x=d8[String(y).trim().toLowerCase()];if(x!==void 0)y=x;let h=y.match(/^#([0-9a-fA-F]+)$/);if(h){let B=h[1],q=(j,_)=>parseInt(B.slice(j,j+_),16);if(B.length===3||B.length===4){let j=(_)=>q(_,1)*17;return new X(j(0),j(1),j(2),B.length===4?j(3)/255:1)}if(B.length===6||B.length===8)return new X(q(0,2),q(2,2),q(4,2),B.length===8?q(6,2)/255:1)}let C=y;if(m1 instanceof HTMLSpanElement)m1.style.color="black",m1.style.color=y,document.body.appendChild(m1),C=getComputedStyle(m1).color,m1.remove();let[l,i,k,g]=C.match(/[\d.]+/g)||["0","0","0","0"],w=C.startsWith("color(srgb")?255:1;return new X(Number(l)*w,Number(i)*w,Number(k)*w,g==null?1:Number(g))}static fromHsl(y,x,h,C=1){let l,i,k;if(x===0)l=i=k=h;else{let w=(_,K,U)=>{if(U<0)U+=1;if(U>1)U-=1;if(U<0.16666666666666666)return _+(K-_)*6*U;if(U<0.5)return K;if(U<0.6666666666666666)return _+(K-_)*(0.6666666666666666-U)*6;return _},B=h<0.5?h*(1+x):h+x-h*x,q=2*h-B,j=(y%360+360)%360/360;l=w(q,B,j+0.3333333333333333),i=w(q,B,j),k=w(q,B,j-0.3333333333333333)}let g=new X(l*255,i*255,k*255,C);return g.hslCached={h:(y%360+360)%360,s:x,l:h},g}static black=new X(0,0,0);static white=new X(255,255,255);constructor(y,x,h,C=1){this.r=R1(0,y,255),this.g=R1(0,x,255),this.b=R1(0,h,255),this.a=R1(0,C,1)}get inverse(){return new X(255-this.r,255-this.g,255-this.b,this.a)}get inverseLuminance(){let{h:y,s:x,l:h}=this._hsl;return X.fromHsl(y,x,1-h,this.a)}get opaque(){return this.a===1?this:new X(this.r,this.g,this.b,1)}contrasting(y=1){return this.opaque.blend(this.brightness>0.5?X.black:X.white,y)}get rgb(){let{r:y,g:x,b:h}=this;return`rgb(${y.toFixed(0)},${x.toFixed(0)},${h.toFixed(0)})`}get rgba(){let{r:y,g:x,b:h,a:C}=this;return`rgba(${y.toFixed(0)},${x.toFixed(0)},${h.toFixed(0)},${C.toFixed(2)})`}get RGBA(){return[this.r/255,this.g/255,this.b/255,this.a]}get ARGB(){return[this.a,this.r/255,this.g/255,this.b/255]}hslCached;get _hsl(){if(this.hslCached==null)this.hslCached=new L8(this.r,this.g,this.b);return this.hslCached}get hsl(){let{h:y,s:x,l:h}=this._hsl;return`hsl(${y.toFixed(0)}deg ${(x*100).toFixed(0)}% ${(h*100).toFixed(0)}%)`}get hsla(){let{h:y,s:x,l:h}=this._hsl;return`hsl(${y.toFixed(0)}deg ${(x*100).toFixed(0)}% ${(h*100).toFixed(0)}% / ${(this.a*100).toFixed(0)}%)`}get mono(){let y=this.brightness*255;return new X(y,y,y)}get brightness(){return Yx(this.r,this.g,this.b)}get html(){return this.toString()}toString(){return this.a===1?"#"+k2(this.r)+k2(this.g)+k2(this.b):"#"+k2(this.r)+k2(this.g)+k2(this.b)+k2(255*this.a)}brighten(y){let{h:x,s:h,l:C}=this._hsl,l=R1(0,C+y*(1-C),1);return X.fromHsl(x,h,l,this.a)}darken(y){let{h:x,s:h,l:C}=this._hsl,l=R1(0,C*(1-y),1);return X.fromHsl(x,h,l,this.a)}saturate(y){let{h:x,s:h,l:C}=this._hsl,l=R1(0,h+y*(1-h),1);return X.fromHsl(x,l,C,this.a)}desaturate(y){let{h:x,s:h,l:C}=this._hsl,l=R1(0,h*(1-y),1);return X.fromHsl(x,l,C,this.a)}rotate(y){let{h:x,s:h,l:C}=this._hsl,l=(x+360+y)%360;return X.fromHsl(l,h,C,this.a)}opacity(y){let{h:x,s:h,l:C}=this._hsl;return X.fromHsl(x,h,C,y)}swatch(){return console.log(`%c %c ${this.html}, ${this.rgba}`,`background-color: ${this.html}`,"background-color: transparent"),this}blend(y,x){return new X(a1(this.r,y.r,x),a1(this.g,y.g,x),a1(this.b,y.b,x),a1(this.a,y.a,x))}static blendHue(y,x,h){let C=(x-y+720)%360;if(C<180)return y+h*C;else return y-(360-C)*h}mix(y,x){let h=this._hsl,C=y._hsl;return X.fromHsl(h.s===0?C.h:C.s===0?h.h:X.blendHue(h.h,C.h,x),a1(h.s,C.s,x),a1(h.l,C.l,x),a1(this.a,y.a,x))}colorMix(y,x){return X.fromCss(`color-mix(in hsl, ${this.html}, ${y.html} ${(x*100).toFixed(0)}%)`)}static computedColorStylesheet=null;static computedColors=new Map;static recomputeQueued=!1;static registerComputedColor(y,x,h,C){if(!X.computedColors.has(y))X.computedColors.set(y,{varName:x,scale:h,method:C}),X.queueRecompute()}static queueRecompute(){if(X.recomputeQueued)return;X.recomputeQueued=!0,queueMicrotask(()=>{X.recomputeQueued=!1,X.recomputeColors()})}static recomputeColors(){if(X.computedColors.size===0)return;let y=[];for(let[h,{varName:C,scale:l,method:i}]of X.computedColors)try{let k=X.fromVar(C),g;switch(i){case"b":g=l>0?k.brighten(l):k.darken(-l);break;case"s":g=l>0?k.saturate(l):k.desaturate(-l);break;case"h":g=k.rotate(l*100);break;case"o":g=k.opacity(l);break;default:continue}y.push(` ${h}: ${g.rgba};`)}catch(k){}if(y.length===0)return;let x=`:root {
1
+ import{Sa as s5,Ta as V2}from"./index-iife-415dypjp.js";var n9={};s5(n9,{xrControllersText:()=>Uw,xrControllers:()=>Pw,xinTagList:()=>Ug,xinTag:()=>Kg,xinTabs:()=>ck,xinTable:()=>cC,xinSizer:()=>lg,xinSidenav:()=>WB,xinSelect:()=>NC,xinSegmented:()=>gg,xinRating:()=>dw,xinPasswordStrength:()=>Lw,xinNotification:()=>nk,xinMenu:()=>$C,xinMd:()=>Mw,xinLocalized:()=>RC,xinForm:()=>tB,xinFloat:()=>yC,xinField:()=>aB,xinCarousel:()=>oh,wrapIcon:()=>g3,version:()=>Iy,valueRenderer:()=>N3,updateLocalized:()=>i3,trackDrag:()=>_1,tosijs:()=>z0,tosiThemeEditor:()=>Zw,tosiTagList:()=>Sy,tosiTag:()=>m9,tosiTabs:()=>N0,tosiTable:()=>W3,tosiSizer:()=>vy,tosiSidenav:()=>R0,tosiSelect:()=>Q1,tosiSegmented:()=>Dy,tosiRow:()=>Gw,tosiRouteView:()=>xg,tosiRichText:()=>Wy,tosiRating:()=>iy,tosiPocketBar:()=>a3,tosiPasswordStrength:()=>Yy,tosiNotification:()=>e3,tosiMonth:()=>bw,tosiMenu:()=>s6,tosiMd:()=>M9,tosiLocalized:()=>O1,tosiLocalePicker:()=>a6,tosiHeaderLinks:()=>_w,tosiHeader:()=>Aw,tosiGrid:()=>$w,tosiForm:()=>o4,tosiFloat:()=>V0,tosiField:()=>E4,tosiDocSystem:()=>kw,tosiDiff:()=>l0,tosiDialog:()=>W4,tosiColumn:()=>Qw,tosiCarousel:()=>U6,testManager:()=>K1,tabSelector:()=>Lk,svgIcon:()=>q3,svg2DataUrl:()=>q0,styleSheet:()=>l4,spacer:()=>D9,sizeBreak:()=>zg,sideNav:()=>NB,setLocale:()=>i4,scriptTag:()=>S1,runTests:()=>c4,router:()=>b0,richTextWidgets:()=>Ny,richText:()=>Ew,rewriteImports:()=>W1,resolveMenuItems:()=>G1,resolveIcon:()=>e1,removeLastMenu:()=>k1,postNotification:()=>y9,positionFloat:()=>K4,popMenu:()=>r,popFloat:()=>X0,popDropMenu:()=>f6,parseValueType:()=>e6,parseShortcut:()=>P4,navigate:()=>yg,modifierKeys:()=>hC,menu:()=>c6,matchShortcut:()=>_3,markdownViewer:()=>vw,mapBox:()=>Dw,makeSorter:()=>_4,localize:()=>T,localePicker:()=>ZC,loadTransform:()=>J0,liveTheme:()=>d,liveExample:()=>f4,legacyAliases:()=>Ky,keystroke:()=>CC,keycode:()=>Z6,isBreached:()=>$y,insertExamples:()=>p4,initTooltips:()=>Ng,initLocalization:()=>O3,icons:()=>Q,iconRules:()=>w3,i18n:()=>c,getRouterParams:()=>ow,gamepadText:()=>Kw,gamepadState:()=>Vy,findShortcutAction:()=>Y3,findHighestZ:()=>X2,filterPart:()=>a4,filterForDrop:()=>_0,filterForClick:()=>G3,filterBuilder:()=>Vw,expect:()=>q9,executeInline:()=>b4,executeInIframe:()=>T4,executeCode:()=>R7,enableTests:()=>A9,enableLiveTheme:()=>Uy,elastic:()=>Yw,editableRect:()=>gw,dragAndDrop:()=>Q4,displayShortcut:()=>U4,disableTests:()=>_9,disableLiveTheme:()=>Jw,digest:()=>Qy,diffLines:()=>$6,defineRoutes:()=>ew,defineIcons:()=>ph,defaultColors:()=>c1,dataTable:()=>LC,createThemeWithLegacy:()=>Fw,createTheme:()=>f2,createTestContext:()=>l9,createSubMenu:()=>Q3,createMenuItem:()=>L6,createMenuAction:()=>T6,createDropMenuItem:()=>p6,createDocBrowser:()=>P9,createDarkTheme:()=>t4,createColorVariables:()=>_y,componentVars:()=>Nw,commandButton:()=>R1,colorInput:()=>A3,codeEditor:()=>m1,canonicalShortcut:()=>BC,bringToFront:()=>x2,bodymovinPlayer:()=>mh,blockStyle:()=>c9,baseVariables:()=>Ay,baseTheme:()=>iw,baseDarkTheme:()=>Ow,b3d:()=>rh,availableFilters:()=>Y9,applyTheme:()=>H9,applyLocalized:()=>U0,abTest:()=>Th,XinWord:()=>nw,XinTagList:()=>Pg,XinTag:()=>_g,XinSizer:()=>qg,XinSelect:()=>FC,XinSegmented:()=>wg,XinRating:()=>cw,XinPasswordStrength:()=>pw,XinNotification:()=>mk,XinMenu:()=>YC,XinLocalized:()=>Y4,XinForm:()=>oB,XinFloat:()=>eh,XinField:()=>EB,XinCarousel:()=>Eh,TosiThemeEditor:()=>v9,TosiTagList:()=>r2,TosiTag:()=>p0,TosiTabs:()=>S4,TosiTable:()=>N4,TosiSizer:()=>q5,TosiSidenav:()=>L2,TosiSelect:()=>I1,TosiSegmented:()=>u2,TosiRow:()=>J9,TosiRouteView:()=>s9,TosiRating:()=>B5,TosiPocketBar:()=>o3,TosiPasswordStrength:()=>k5,TosiNotification:()=>h2,TosiMonth:()=>T9,TosiMenu:()=>$4,TosiMd:()=>h5,TosiLocalized:()=>b1,TosiLocalePicker:()=>O4,TosiHeaderLinks:()=>N9,TosiHeader:()=>F9,TosiGrid:()=>R9,TosiForm:()=>n4,TosiFloat:()=>i1,TosiField:()=>m4,TosiDocSystem:()=>Q9,TosiDiff:()=>V3,TosiDialog:()=>H3,TosiColumn:()=>Z9,TosiCarousel:()=>V4,TabSelector:()=>pk,SvgIcon:()=>z3,SizeBreak:()=>u9,SideNav:()=>FB,STORAGE_KEY:()=>I4,RichText:()=>w5,RemoteSyncManager:()=>Z0,MarkdownViewer:()=>Hw,MapBox:()=>G2,LocalePicker:()=>JC,LiveExample:()=>k2,FilterPart:()=>i9,FilterBuilder:()=>O9,EditableRect:()=>Z1,DataTable:()=>pC,CodeEditor:()=>r1,BodymovinPlayer:()=>D2,B3d:()=>l3,AbTest:()=>R2});var z0={};s5(z0,{xinValue:()=>jx,xinSlot:()=>Ah,xinProxy:()=>j6,xinPath:()=>lx,xin:()=>B1,warnDeprecated:()=>q1,version:()=>l6,vars:()=>l,varDefault:()=>A,validateAgainstConstraints:()=>w6,updates:()=>r5,unobserve:()=>C0,touchElement:()=>t5,touch:()=>$1,tosiValue:()=>S,tosiUnique:()=>Dh,tosiSlot:()=>Xh,tosiSetValue:()=>qx,tosiPath:()=>A1,tosiLoader:()=>Sh,tosiBlueprint:()=>Mh,tosiAccessor:()=>zx,tosi:()=>e,throttle:()=>N2,sync:()=>Zh,svgElements:()=>B4,share:()=>Nh,settings:()=>t0,scrollListItemIntoView:()=>Ch,onThemePreferencesChange:()=>cx,onStylesheetChange:()=>Sx,on:()=>Z2,observe:()=>o5,mathML:()=>x6,makeComponent:()=>x3,invertLuminance:()=>g0,initVars:()=>Lx,hotReload:()=>_h,getThemePreferences:()=>t8,getListItem:()=>l2,getListInstance:()=>a5,getListBinding:()=>J2,getCssVar:()=>m8,elements:()=>G,deprecated:()=>j1,deleteListItem:()=>xh,debounce:()=>w0,css:()=>W2,boxedProxy:()=>y3,boxed:()=>U1,blueprintLoader:()=>bh,blueprint:()=>Ih,bindings:()=>u1,bindParts:()=>ux,bind:()=>f1,TOSI_ACCESSOR:()=>u5,TAKE_DESCRIPTOR:()=>h4,StyleSheet:()=>Y1,MoreMath:()=>Hx,Component:()=>$,Color:()=>O,BlueprintLoader:()=>h3,Blueprint:()=>z4,BOUND_SELECTOR:()=>o0,BOUND_CLASS:()=>t1});function v1(y,x){if(y==null||typeof y!=="object")return y;if(y instanceof Date)return new Date(y.getTime());if(x===void 0)x=new WeakMap;else if(x.has(y))return x.get(y);if(y instanceof Set){let C=new Set;x.set(y,C);for(let k of y)C.add(v1(k,x));return C}if(y instanceof Map){let C=new Map;x.set(y,C);for(let[k,B]of y)C.set(v1(k,x),v1(B,x));return C}if(Array.isArray(y)){let C=[];x.set(y,C);for(let k of y)C.push(v1(k,x));return C}let h={};x.set(y,h);for(let C in y)h[C]=v1(y[C],x);return h}var t1="-tosi-data",o0=`.${t1}`,M1=Symbol.for("xin-path"),q2=Symbol.for("xin-value"),Cx="xinObserve",kx="xinBind",Bx="xinOn",u5=Symbol.for("tosi-accessor"),h4=Symbol.for("tosi-take"),a0=Symbol("list-binding"),O2=Symbol("list-instance"),J5=new Map;function wx(y,x){let h=J5.get(y);if(h===void 0)h=new Set,J5.set(y,h);h.add(x)}function gx(y){return J5.get(y)}var q8=new Set;function q1(y,x){if(!q8.has(y))console.warn(x),q8.add(y)}function j1(y,x){let h=!1;return(...C)=>{if(!h)console.warn(x),h=!0;return y(...C)}}var A1=(y)=>{return y&&y[M1]||void 0};function S(y){if(typeof y==="object"&&y!==null){let x=y[q2];return x!==void 0?x:y}return y}function zx(y){return y!=null?y[u5]:void 0}function qx(y,x){if(A1(y)===void 0)throw Error("tosiSetValue requires a xin or boxed proxy");y[q2]=x}var lx=j1(A1,"xinPath is deprecated. Use tosiPath instead."),jx=j1(S,"xinValue is deprecated. Use tosiValue instead."),F2=new WeakMap,s1=new WeakMap,x0=(y)=>{let x=y.cloneNode();if(x instanceof Element){let C=s1.get(y),k=F2.get(y);if(C!=null)s1.set(x,v1(C));if(k!=null)F2.set(x,v1(k))}let h=x instanceof HTMLTemplateElement?x.content:x;for(let C of Array.from(y instanceof HTMLTemplateElement?y.content.childNodes:y.childNodes))if(C instanceof Element||C instanceof DocumentFragment)h.appendChild(x0(C));else h.appendChild(C.cloneNode());return x},t0={debug:!1,perf:!1},Vx=(y)=>{try{return JSON.stringify(y)}catch(x){return"{has circular references}"}},b8=(...y)=>Error(y.map(Vx).join(" ")),Xx=()=>new Date(parseInt("1000000000",36)+Date.now()).valueOf().toString(36).slice(1),Ax=0,_x=()=>(parseInt("10000",36)+ ++Ax).toString(36).slice(-5),T8=()=>Xx()+_x(),Z5=Symbol("delete"),p8=Symbol("new-object"),Q5=Symbol("automatic-index");function L8(y){if(y==="")return[];if(Array.isArray(y))return y;else{let x=[];while(y.length>0){let h=y.search(/\[[^\]]+\]/);if(h===-1){x.push(y.split("."));break}else{let C=y.slice(0,h);if(y=y.slice(h),C!=="")x.push(C.split("."));if(h=y.indexOf("]")+1,x.push(y.slice(1,h-1)),y.slice(h,h+1)===".")h+=1;y=y.slice(h)}}return x}}var z2=new WeakMap;function c8(y,x){if(z2.get(y)===void 0)z2.set(y,{});let h={};if(z2.get(y)[x]=h,x==="_auto_")y.forEach((C,k)=>{if(C[Q5]===void 0)C[Q5]=T8();h[C[Q5]+""]=k});else y.forEach((C,k)=>{h[h1(C,x)+""]=k});return h}function Kx(y,x){if(z2.get(y)===void 0||z2.get(y)[x]===void 0)return c8(y,x);else return z2.get(y)[x]}function Px(y,x,h){h=h+"";let C=Kx(y,x)[h];if(C===void 0||h1(y[C],x)+""!==h)C=c8(y,x)[h];return C}function Ux(y,x,h){if(y[x]===void 0&&h!==void 0)y[x]=h;return y[x]}function d8(y,x,h,C){let k=x!==""?Px(y,x,h):h;if(C===Z5){if(k!==void 0)y.splice(k,1),z2.delete(y);return Symbol("deleted")}else if(C===p8){if(x===""&&y[k]===void 0)y[k]={}}else if(C!==void 0)if(k!==void 0)y[k]=C;else if(x!==""&&h1(C,x)+""===h+"")y.push(C),k=y.length-1;else throw Error(`byIdPath insert failed at [${x}=${h}]`);return y[k]}function l8(y){if(!Array.isArray(y))throw b8("setByPath failed: expected array, found",y)}function j8(y){if(y==null||!(y instanceof Object))throw b8("setByPath failed: expected Object, found",y)}function h1(y,x){let h=L8(x),C=y,k,B,w,g;for(k=0,B=h.length;C!==void 0&&k<B;k++){let z=h[k];if(Array.isArray(z))for(w=0,g=z.length;C!==void 0&&w<g;w++){let q=z[w];C=C[q]}else if(C.length===0){if(C=C[Number(z.slice(1))],z[0]!=="=")return}else if(z.includes("=")){let[q,...j]=z.split("=");C=d8(C,q,j.join("="))}else w=parseInt(z,10),C=C[w]}return C}function C4(y,x,h){let C=y;if(x==="")throw Error("setByPath cannot be used to set the root object");let k=L8(x);while(C!=null&&k.length>0){let B=k.shift();if(typeof B==="string"){let w=B.indexOf("=");if(w>-1){if(w===0)j8(C);else l8(C);let g=B.slice(0,w),z=B.slice(w+1);if(C=d8(C,g,z,k.length>0?p8:h),k.length===0)return!0}else{l8(C);let g=parseInt(B,10);if(k.length>0)C=C[g];else{if(h!==Z5){if(C[g]===h)return!1;C[g]=h}else C.splice(g,1);return!0}}}else if(Array.isArray(B)&&B.length>0){j8(C);while(B.length>0){let w=B.shift();if(B.length>0||k.length>0)C=Ux(C,w,B.length>0?{}:[]);else{if(h!==Z5){if(C[w]===h)return!1;C[w]=h}else{if(!Object.prototype.hasOwnProperty.call(C,w))return!1;delete C[w]}return!0}}}else throw Error(`setByPath failed, bad path ${x}`)}throw Error(`setByPath(${y}, ${x}, ${h}) failed`)}var l1={},R5=null,Gx=(y)=>{R5=y},k4=()=>{if(R5===null)throw Error("xin proxy not initialized");return R5},D5=null,H5=null,Qx=(y,x)=>{D5=y,H5=x},$x=()=>{if(D5===null)throw Error("bind not initialized");return D5},Yx=()=>{if(H5===null)throw Error("on not initialized");return H5},V8=Symbol("observer should be removed"),e0=[],i2=[],v5=!1,M5,S5;function ix(y,x,h,C){let k=gx(y);if(k===void 0)return[];let B=[];for(let w of k){let g=h1(h,w);if(g!==void 0)B.push(`${y}[${w}=${g}]${C}`)}return B}var h0=(y,x)=>{if(!x.startsWith(y))return!1;if(x.length===y.length)return!0;let h=x.charAt(y.length);return h==="."||h==="["};class f8{description;test;callback;constructor(y,x){let h=typeof x==="string"?`"${x}"`:`function ${x.name}`,C;if(typeof y==="string")this.test=(k)=>typeof k==="string"&&k!==""&&(h0(k,y)||h0(y,k)),C=`test = "${y}"`;else if(y instanceof RegExp)this.test=y.test.bind(y),C=`test = "${y.toString()}"`;else if(y instanceof Function)this.test=y,C=`test = function ${y.name}`;else throw Error("expect listener test to be a string, RegExp, or test function");if(this.description=`${C}, ${h}`,typeof x==="function")this.callback=x;else throw Error("expect callback to be a path or function");e0.push(this)}}var r5=async()=>{if(M5===void 0)return;await M5},Ox=()=>{if(t0.perf)console.time("xin async update");let y=Array.from(i2);i2.length=0,v5=!1;let x=S5;S5=void 0;try{for(let h of y)e0.filter((C)=>{let k;try{k=C.test(h)}catch(B){return console.error(`Listener ${C.description} threw "${B}" at "${h}"`),!1}if(k===V8)return C0(C),!1;return k}).forEach((C)=>{let k;try{k=C.callback(h)}catch(B){console.error(`Listener ${C.description} threw "${B}" handling "${h}"`)}if(k===V8)C0(C)})}finally{if(typeof x==="function")x();if(t0.perf)console.timeEnd("xin async update")}},$1=(y)=>{let x=typeof y==="string"?y:A1(y);if(x===void 0)throw console.error("touch was called on an invalid target",y),Error("touch was called on an invalid target");if(v5===!1)M5=new Promise((C)=>{S5=C}),v5=setTimeout(Ox);if(i2.find((C)=>h0(C,x))==null)i2.push(x);let h=x.match(/^(.+)\[(\d+)\](.*)$/);if(h!==null){let[,C,k,B]=h,w=parseInt(k,10),g=h1(l1,`${C}[${w}]`);if(g!=null){let z=ix(C,w,g,B);for(let q of z)if(i2.find((j)=>h0(j,q))==null)i2.push(q)}}},B0=(y,x)=>{return new f8(y,x)},C0=(y)=>{let x=e0.indexOf(y);if(x>-1)e0.splice(x,1);else throw Error("unobserve failed, listener not found")},s8=(y,x,{bubbles:h=!1,composed:C=!1}={})=>{let k=new Event(x,{bubbles:h,composed:C});y.dispatchEvent(k)},u8=(y)=>{if(y instanceof HTMLInputElement)return y.type;else if(y instanceof HTMLSelectElement&&y.hasAttribute("multiple"))return"multi-select";else return"other"},X1=(y,x=2)=>String(y).padStart(x,"0"),Fx=(y,x)=>{switch(y){case"date":return`${x.getUTCFullYear()}-${X1(x.getUTCMonth()+1)}-${X1(x.getUTCDate())}`;case"month":return`${x.getUTCFullYear()}-${X1(x.getUTCMonth()+1)}`;case"datetime-local":return`${x.getFullYear()}-${X1(x.getMonth()+1)}-${X1(x.getDate())}T${X1(x.getHours())}:${X1(x.getMinutes())}`;default:return x.toISOString()}},Nx=(y)=>{let x=Math.floor(y/1000),h=`${X1(Math.floor(x/3600))}:${X1(Math.floor(x/60)%60)}`;return x%60===0?h:`${h}:${X1(x%60)}`},Wx=(y)=>{let x=y.match(/^(\d\d):(\d\d)(?::(\d\d)(?:\.(\d+))?)?$/);if(x==null)return NaN;let[,h,C,k,B]=x;return(Number(h)*60+Number(C))*60000+Number(k??0)*1000+Number(B??0)},Jx=(y,x)=>{let h=u8(y);switch(h){case"radio":y.checked=x!=null&&y.value===String(x);break;case"checkbox":y.checked=!!x;break;case"date":case"datetime-local":case"month":case"week":{let C=y;if(x==null||x==="")C.value="";else if(x instanceof Date||typeof x==="number"){let k=x instanceof Date?x:new Date(x);if(h==="week")try{C.valueAsDate=k}catch(B){}else C.value=Fx(h,k)}else C.value=String(x);break}case"time":{let C=y;if(x==null||x==="")C.value="";else if(typeof x==="number")C.value=Nx(x);else if(x instanceof Date)C.value=`${X1(x.getHours())}:${X1(x.getMinutes())}:${X1(x.getSeconds())}`;else C.value=String(x);break}case"multi-select":for(let C of Array.from(y.querySelectorAll("option")))C.selected=Array.isArray(x)?x.map(String).includes(C.value):x!=null?!!x[C.value]:!1;break;default:y.value=x==null?"":x}},Zx=(y)=>{switch(u8(y)){case"radio":{let x=y.parentElement?.querySelector(`[name="${y.name}"]:checked`);return x!=null?x.value:null}case"checkbox":return y.checked;case"number":case"range":{let x=y,h=typeof x.valueAsNumber==="number"?x.valueAsNumber:Number(x.value);return Number.isNaN(h)?x.value:h}case"date":case"datetime-local":case"month":case"week":{let x=y,h=x.valueAsDate??(x.value!==""?new Date(x.value):null);return h!=null&&!Number.isNaN(h.getTime())?h:x.value}case"time":{let x=y,h=typeof x.valueAsNumber==="number"?x.valueAsNumber:NaN;if(Number.isNaN(h))h=Wx(x.value);return Number.isNaN(h)?x.value:h}case"multi-select":return Array.from(y.querySelectorAll("option")).reduce((x,h)=>{return x[h.value]=h.selected,x},{});default:return y.value}},{ResizeObserver:X8}=globalThis,I5=X8!=null?new X8((y)=>{for(let x of y){let h=x.target;s8(h,"resize")}}):{observe(){},unobserve(){}},A8=(y,x,h=!0)=>{if(y!=null&&x!=null)if(typeof x==="string")y.textContent=x;else if(Array.isArray(x))x.forEach((C)=>{y.append(C instanceof Node&&h?x0(C):C)});else if(x instanceof Node)y.append(h?x0(x):x);else throw Error("expect text content or document node")},w0=(y,x=250)=>{let h;return function(...C){if(h!==void 0)clearTimeout(h);h=setTimeout(()=>{y.apply(this,C)},x)}},N2=(y,x=250)=>{let h,C=Date.now()-x;return function(...k){clearTimeout(h);let B=Date.now()-C;if(B>=x)C=Date.now(),y.apply(this,k);else h=setTimeout(()=>{C=Date.now(),y.apply(this,k)},x-B)}},u1={value:{toDOM:Jx,fromDOM(y){return Zx(y)}},text:{toDOM(y,x){y.textContent=x}},enabled:{toDOM(y,x){y.disabled=!x}},disabled:{toDOM(y,x){y.disabled=Boolean(x)}},list:{toDOM(y,x,h){J2(y,x,h).update(x)}}};function P1(y){return y.replace(/[A-Z]/g,(x)=>{return`-${x.toLocaleLowerCase()}`})}function r8(y){return y.replace(/-([a-z])/g,(x,h)=>{return h.toLocaleUpperCase()})}var Rx=180/Math.PI,Dx=Math.PI/180;function H1(y,x,h){return h<y?NaN:x<y?y:x>h?h:x}function E1(y,x,h,C=!0){if(C)h=H1(0,h,1);return h*(x-y)+y}var Hx={RADIANS_TO_DEGREES:Rx,DEGREES_TO_RADIANS:Dx,clamp:H1,lerp:E1};function m8(y,x=document.body){let h=getComputedStyle(x);if(y.endsWith(")")&&y.startsWith("var("))y=y.slice(4,-1);return h.getPropertyValue(y).trim()}var n8={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},vx=(y,x,h)=>{return(0.299*y+0.587*x+0.114*h)/255},w2=(y)=>("00"+Math.round(Number(y)).toString(16)).slice(-2);class E8{h;s;l;constructor(y,x,h){y/=255,x/=255,h/=255;let C=Math.max(y,x,h),k=C-Math.min(y,x,h),B=k!==0?C===y?(x-h)/k:C===x?2+(h-y)/k:4+(y-x)/k:0;this.h=60*B<0?60*B+360:60*B,this.s=k!==0?C<=0.5?k/(2*C-k):k/(2-(2*C-k)):0,this.l=(2*C-k)/2}}var o1=globalThis.document!==void 0?globalThis.document.createElement("span"):void 0;if(o1)o1.style.display="none";class O{r;g;b;a;static fromVar(y,x=document.body){return O.fromCss(m8(y,x))}static fromCss(y){let x=n8[String(y).trim().toLowerCase()];if(x!==void 0)y=x;let h=y.match(/^#([0-9a-fA-F]+)$/);if(h){let q=h[1],j=(V,_)=>parseInt(q.slice(V,V+_),16);if(q.length===3||q.length===4){let V=(_)=>j(_,1)*17;return new O(V(0),V(1),V(2),q.length===4?V(3)/255:1)}if(q.length===6||q.length===8)return new O(j(0,2),j(2,2),j(4,2),q.length===8?j(6,2)/255:1)}let C=y;if(o1 instanceof HTMLSpanElement)o1.style.color="black",o1.style.color=y,document.body.appendChild(o1),C=getComputedStyle(o1).color,o1.remove();let[k,B,w,g]=C.match(/[\d.]+/g)||["0","0","0","0"],z=C.startsWith("color(srgb")?255:1;return new O(Number(k)*z,Number(B)*z,Number(w)*z,g==null?1:Number(g))}static fromHsl(y,x,h,C=1){let k,B,w;if(x===0)k=B=w=h;else{let z=(_,P,U)=>{if(U<0)U+=1;if(U>1)U-=1;if(U<0.16666666666666666)return _+(P-_)*6*U;if(U<0.5)return P;if(U<0.6666666666666666)return _+(P-_)*(0.6666666666666666-U)*6;return _},q=h<0.5?h*(1+x):h+x-h*x,j=2*h-q,V=(y%360+360)%360/360;k=z(j,q,V+0.3333333333333333),B=z(j,q,V),w=z(j,q,V-0.3333333333333333)}let g=new O(k*255,B*255,w*255,C);return g.hslCached={h:(y%360+360)%360,s:x,l:h},g}static black=new O(0,0,0);static white=new O(255,255,255);constructor(y,x,h,C=1){this.r=H1(0,y,255),this.g=H1(0,x,255),this.b=H1(0,h,255),this.a=H1(0,C,1)}get inverse(){return new O(255-this.r,255-this.g,255-this.b,this.a)}get inverseLuminance(){let{h:y,s:x,l:h}=this._hsl;return O.fromHsl(y,x,1-h,this.a)}get opaque(){return this.a===1?this:new O(this.r,this.g,this.b,1)}contrasting(y=1){return this.opaque.blend(this.brightness>0.5?O.black:O.white,y)}get rgb(){let{r:y,g:x,b:h}=this;return`rgb(${y.toFixed(0)},${x.toFixed(0)},${h.toFixed(0)})`}get rgba(){let{r:y,g:x,b:h,a:C}=this;return`rgba(${y.toFixed(0)},${x.toFixed(0)},${h.toFixed(0)},${C.toFixed(2)})`}get RGBA(){return[this.r/255,this.g/255,this.b/255,this.a]}get ARGB(){return[this.a,this.r/255,this.g/255,this.b/255]}hslCached;get _hsl(){if(this.hslCached==null)this.hslCached=new E8(this.r,this.g,this.b);return this.hslCached}get hsl(){let{h:y,s:x,l:h}=this._hsl;return`hsl(${y.toFixed(0)}deg ${(x*100).toFixed(0)}% ${(h*100).toFixed(0)}%)`}get hsla(){let{h:y,s:x,l:h}=this._hsl;return`hsl(${y.toFixed(0)}deg ${(x*100).toFixed(0)}% ${(h*100).toFixed(0)}% / ${(this.a*100).toFixed(0)}%)`}get mono(){let y=this.brightness*255;return new O(y,y,y)}get brightness(){return vx(this.r,this.g,this.b)}get html(){return this.toString()}toString(){return this.a===1?"#"+w2(this.r)+w2(this.g)+w2(this.b):"#"+w2(this.r)+w2(this.g)+w2(this.b)+w2(255*this.a)}brighten(y){let{h:x,s:h,l:C}=this._hsl,k=H1(0,C+y*(1-C),1);return O.fromHsl(x,h,k,this.a)}darken(y){let{h:x,s:h,l:C}=this._hsl,k=H1(0,C*(1-y),1);return O.fromHsl(x,h,k,this.a)}saturate(y){let{h:x,s:h,l:C}=this._hsl,k=H1(0,h+y*(1-h),1);return O.fromHsl(x,k,C,this.a)}desaturate(y){let{h:x,s:h,l:C}=this._hsl,k=H1(0,h*(1-y),1);return O.fromHsl(x,k,C,this.a)}rotate(y){let{h:x,s:h,l:C}=this._hsl,k=(x+360+y)%360;return O.fromHsl(k,h,C,this.a)}opacity(y){let{h:x,s:h,l:C}=this._hsl;return O.fromHsl(x,h,C,y)}swatch(){return console.log(`%c %c ${this.html}, ${this.rgba}`,`background-color: ${this.html}`,"background-color: transparent"),this}blend(y,x){return new O(E1(this.r,y.r,x),E1(this.g,y.g,x),E1(this.b,y.b,x),E1(this.a,y.a,x))}static blendHue(y,x,h){let C=(x-y+720)%360;if(C<180)return y+h*C;else return y-(360-C)*h}mix(y,x){let h=this._hsl,C=y._hsl;return O.fromHsl(h.s===0?C.h:C.s===0?h.h:O.blendHue(h.h,C.h,x),E1(h.s,C.s,x),E1(h.l,C.l,x),E1(this.a,y.a,x))}colorMix(y,x){return O.fromCss(`color-mix(in hsl, ${this.html}, ${y.html} ${(x*100).toFixed(0)}%)`)}static computedColorStylesheet=null;static computedColors=new Map;static recomputeQueued=!1;static registerComputedColor(y,x,h,C){if(!O.computedColors.has(y))O.computedColors.set(y,{varName:x,scale:h,method:C}),O.queueRecompute()}static queueRecompute(){if(O.recomputeQueued)return;O.recomputeQueued=!0,queueMicrotask(()=>{O.recomputeQueued=!1,O.recomputeColors()})}static recomputeColors(){if(O.computedColors.size===0)return;let y=[];for(let[h,{varName:C,scale:k,method:B}]of O.computedColors)try{let w=O.fromVar(C),g;switch(B){case"b":g=k>0?w.brighten(k):w.darken(-k);break;case"s":g=k>0?w.saturate(k):w.desaturate(-k);break;case"h":g=w.rotate(k*100);break;case"o":g=w.opacity(k);break;default:continue}y.push(` ${h}: ${g.rgba};`)}catch(w){}if(y.length===0)return;let x=`:root {
2
2
  ${y.join(`
3
3
  `)}
4
- }`;if(X.computedColorStylesheet===null)X.computedColorStylesheet=document.createElement("style"),X.computedColorStylesheet.id="tosijs-computed-colors",document.head.append(X.computedColorStylesheet);X.computedColorStylesheet.textContent=x}}var t0=new Set,B8=!1;function Nx(){if(!B8)B8=!0,t0.add(()=>X.queueRecompute())}function Jx(y){return t0.add(y),()=>t0.delete(y)}function Zx(){Nx();for(let y of t0)y()}function W1(y,x){let h=b(x),C=G.style($2(h));C.id=y,document.head.append(C);let l=V1(x);if(l!==void 0)n5(l,()=>{C.textContent=$2(b(x)),Zx()});return C}var px=/^(animation-iteration-count|column-count|flex(-grow|-shrink)?|font-weight|line-height|opacity|order|orphans|scale|tab-size|widows|z-index|zoom)$/,r8=(y,x)=>{if(typeof x==="number"&&!px.test(y.replace(/^_+/,"")))x=`${x}px`;if(y.startsWith("_"))if(y.startsWith("__"))y="--"+y.substring(2),x=`var(${y}-default, ${x})`;else y="--"+y.substring(1);return{prop:y,value:String(x)}},vx=(y,x,h)=>{if(h===void 0)return"";if(h instanceof X)h=h.html;let C=r8(x,h);return`${y} ${C.prop}: ${C.value};`},o8=(y,x,h="")=>{let C=K1(y);if(typeof x==="object"&&!(x instanceof X)){let l=Object.keys(x).map((i)=>o8(i,x[i],`${h} `)).join(`
4
+ }`;if(O.computedColorStylesheet===null)O.computedColorStylesheet=document.createElement("style"),O.computedColorStylesheet.id="tosijs-computed-colors",document.head.append(O.computedColorStylesheet);O.computedColorStylesheet.textContent=x}}var y4=new Set,_8=!1;function Mx(){if(!_8)_8=!0,y4.add(()=>O.queueRecompute())}function Sx(y){return y4.add(y),()=>y4.delete(y)}function Ix(){Mx();for(let y of y4)y()}function Y1(y,x){let h=S(x),C=G.style(W2(h));C.id=y,document.head.append(C);let k=A1(x);if(k!==void 0)o5(k,()=>{C.textContent=W2(S(x)),Ix()});return C}var bx=/^(animation-iteration-count|column-count|flex(-grow|-shrink)?|font-weight|opacity|order|orphans|scale|tab-size|widows|z-index|zoom)$/,Tx=/^line-height$/,o8=(y,x)=>{let h=y.replace(/^_+/,""),C=y.startsWith("_"),k=bx.test(h)||!C&&Tx.test(h);if(typeof x==="number"&&!k)x=`${x}px`;if(y.startsWith("_"))if(y.startsWith("__"))y="--"+y.substring(2),x=`var(${y}-default, ${x})`;else y="--"+y.substring(1);return{prop:y,value:String(x)}},px=(y,x,h)=>{if(h===void 0)return"";if(h instanceof O)h=h.html;let C=o8(x,h);return`${y} ${C.prop}: ${C.value};`},a8=(y,x,h="")=>{let C=P1(y);if(typeof x==="object"&&!(x instanceof O)){let k=Object.keys(x).map((B)=>a8(B,x[B],`${h} `)).join(`
5
5
  `);return`${h} ${y} {
6
- ${l}
7
- ${h} }`}else return vx(h,C,x)},$2=(y,x="")=>{return Object.keys(y).map((h)=>{let C=y[h];if(typeof C==="string"){if(h==="@import")return`@import url('${C}');`;throw Error("top-level string value only allowed for `@import`")}let l=Object.keys(C).map((i)=>o8(i,C[i])).join(`
6
+ ${k}
7
+ ${h} }`}else return px(h,C,x)},W2=(y,x="")=>{return Object.keys(y).map((h)=>{let C=y[h];if(typeof C==="string"){if(h==="@import")return`@import url('${C}');`;throw Error("top-level string value only allowed for `@import`")}let k=Object.keys(C).map((B)=>a8(B,C[B])).join(`
8
8
  `);return`${x}${h} {
9
- ${l}
9
+ ${k}
10
10
  }`}).join(`
11
11
 
12
- `)},Rx=(y)=>{j1("initVars","initVars is deprecated. Just use _ and __ prefixes instead.");let x={};for(let h of Object.keys(y)){let C=y[h],l=K1(h);x[`--${l}`]=typeof C==="number"&&C!==0?String(C)+"px":C}return x},i0=(y)=>{let x={};for(let h of Object.keys(y)){let C=y[h];if(C instanceof X)x[h]=C.inverseLuminance;else if(typeof C==="string"&&(C.match(/^(#[0-9a-fA-F]{3}|rgba?\(|hsla?\()/)!=null||d8[C.trim().toLowerCase()]!==void 0))x[h]=X.fromCss(C).inverseLuminance}return x},P=new Proxy({},{get(y,x){if(y[x]===void 0){let h="--"+K1(x);y[x]=(C)=>`var(${h}, ${C})`}return y[x]}}),z=new Proxy({},{get(y,x){if(x==="default")return P;if(y[x]==null){x=K1(x);let[,h,,C,l,i]=x.match(/^([-\w]*?)((_)?(\d+)(\w?))?$/)||["",x],k=`--${h}`;if(l!=null){let g=C==null?Number(l)/100:-Number(l)/100;switch(i){case"b":case"s":case"h":case"o":{let w=`--${x}`;X.registerComputedColor(w,k,g,i),y[x]=`var(${w})`}break;case"":y[x]=`calc(var(${k}) * ${g})`;break;default:throw console.error(i),Error(`Unrecognized method ${i} for css variable ${k}`)}}else y[x]=`var(${k})`}return y[x]}});function n8(){let y=(x)=>typeof matchMedia<"u"&&matchMedia(x).matches;return{colorScheme:y("(prefers-color-scheme: dark)")?"dark":"light",contrast:y("(prefers-contrast: more)")?"more":y("(prefers-contrast: less)")?"less":y("(prefers-contrast: custom)")?"custom":"no-preference",reducedMotion:y("(prefers-reduced-motion: reduce)"),reducedTransparency:y("(prefers-reduced-transparency: reduce)"),forcedColors:y("(forced-colors: active)")}}function Dx(y){if(typeof matchMedia>"u")return()=>{};let x=["(prefers-color-scheme: dark)","(prefers-contrast: more)","(prefers-contrast: less)","(prefers-contrast: custom)","(prefers-reduced-motion: reduce)","(prefers-reduced-transparency: reduce)","(forced-colors: active)"],h=()=>y(n8()),C=x.map((l)=>matchMedia(l));for(let l of C)l.addEventListener("change",h);return()=>{for(let l of C)l.removeEventListener("change",h)}}var Hx="http://www.w3.org/1998/Math/MathML",bx="http://www.w3.org/2000/svg",n0={},f8=(y,x,h)=>{let C=r8(K1(x),h);if(C.prop.startsWith("--"))y.style.setProperty(C.prop,C.value);else y.style[x]=C.value},Sx=(y)=>{return{toDOM(x,h){f8(x,y,h)}}},z8=new WeakMap,u8=(y,x,h)=>{if(x==="style")if(typeof h==="object")for(let C of Object.keys(h))if(V1(h[C]))d1(y,h[C],Sx(C));else f8(y,C,h[C]);else y.setAttribute("style",h);else{let C=K1(x),l=y.constructor.observedAttributes;if(l?.includes(x)||l?.includes(C))if(typeof h==="boolean")h?y.setAttribute(C,""):y.removeAttribute(C);else y.setAttribute(C,h);else if(y[x]!==void 0){let{MathMLElement:i}=globalThis;if(y instanceof SVGElement||i!==void 0&&y instanceof i)y.setAttribute(x,h);else y[x]=h}else if(C==="class"){let i=(B)=>String(B||"").split(/\s+/).filter(Boolean),k=new Set,g=new Set;if(Array.isArray(h))for(let B of h)for(let q of i(B))k.add(q);else if(h!=null&&typeof h==="object")for(let[B,q]of Object.entries(h))for(let j of i(B))(q?k:g).add(j);else for(let B of i(h))k.add(B);let w=z8.get(y);if(w){for(let B of w)if(!k.has(B))y.classList.remove(B)}for(let B of g)y.classList.remove(B);for(let B of k)y.classList.add(B);z8.set(y,k)}else if(y[C]!==void 0)y[C]=h;else if(typeof h==="boolean")h?y.setAttribute(C,""):y.removeAttribute(C);else y.setAttribute(C,h)}},K5={},q8=(y)=>{if(!K5[y])K5[y]={toDOM(x,h){u8(x,y,h)}};return K5[y]},L5=(y,x,h)=>{if(x==="apply")h(y);else if(x.match(/^on[A-Z]/)!=null){let C=x.substring(2).toLowerCase();N2(y,C,h)}else if(x==="bind"){let C=typeof h.binding==="string"?r1[h.binding]:h.binding;if(C!==void 0&&h.value!==void 0)d1(y,h.value,C instanceof Function?{toDOM:C}:C);else throw Error("bad binding")}else if(x.match(/^bind[A-Z]/)!=null){let C=x.substring(4,5).toLowerCase()+x.substring(5);if(C!=="value"){let i=C==="text"?"textContent":C==="enabled"?"disabled (with .tosi.take(v => !v))":C==="disabled"?"disabled":C==="list"?".tosi.listBinding()":null;if(i)j1(`bind${C}`,`bind${x.substring(4)} is deprecated. Use { ${i}: ... } instead.`)}let l=r1[C];if(l!==void 0)d1(y,h,l);else throw Error(`${x} is not allowed, bindings.${C} is not defined`)}else if(h!=null&&typeof h==="object"&&h[x4])d1(y,h,q8(x));else if(V1(h))d1(y,h,q8(x));else u8(y,x,h)},r5=(y,...x)=>{if(n0[y]===void 0){let[l,i]=y.split("|");if(i===void 0)n0[y]=globalThis.document.createElement(l);else n0[y]=globalThis.document.createElementNS(i,l)}let h=n0[y].cloneNode(),C={};for(let l of x)if(l instanceof Element||l instanceof DocumentFragment||typeof l==="string"||typeof l==="number")if(h instanceof HTMLTemplateElement)h.content.append(l);else h.append(l);else if(V1(l))h.append(G.span({bindText:l}));else Object.assign(C,l);for(let l of Object.keys(C)){let i=C[l];L5(h,l,i)}return h},o5=(...y)=>{let x=globalThis.document.createDocumentFragment();for(let h of y)x.append(h);return x},G=new Proxy({fragment:o5},{get(y,x){if(x=x.replace(/[A-Z]/g,(h)=>`-${h.toLocaleLowerCase()}`),y[x]===void 0)y[x]=(...h)=>r5(x,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),l4=new Proxy({fragment:o5},{get(y,x){if(y[x]===void 0)y[x]=(...h)=>r5(`${x}|${bx}`,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),E8=new Proxy({fragment:o5},{get(y,x){if(y[x]===void 0)y[x]=(...h)=>r5(`${x}|${Hx}`,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),j8=new WeakSet;function Mx(y,x,h="part"){let C=`[data-${h}]`;for(let l of Array.from(y.querySelectorAll(C))){if(j8.has(l))continue;let i=l.getAttribute(`data-${h}`);if(i==null)continue;let k=x[i];if(k==null)continue;j8.add(l);for(let g of Object.keys(k))L5(l,g,k[g])}}var Ix=["sort","splice","copyWithin","fill","pop","push","reverse","shift","unshift"],cx=!0,sx=/^\.?([^.[\](),])+(\.[^.[\](),]+|\[\d+\]|\[[^=[\](),]*=[^[\]()]+\])*$/,Tx=(y)=>sx.test(y),E1=(y="",x="")=>{if(y==="")return x;else if(x.startsWith("[")&&x.endsWith("]"))return`${y}${x}`;else if(x.match(/^\d+$/)!==null||x.includes("="))return`${y}[${x}]`;else return`${y}.${x}`},e0={};function U5(y,x){if(y!==null&&(typeof y==="object"||typeof y==="function"))return y;return new Proxy(e0,t1(x,!0))}var a8=()=>new Proxy({},t1("^",!0)),G5=(y)=>{let x=y(a8())?.path;if(!x?.startsWith("^."))throw Error("selector must return a property of the item");return x.substring(2)},F5=(y,x,h)=>{for(let C=0;C<y.length;C++)if(`${y1(y[C],x)}`===`${h}`)return C;return-1},dx=(y,x)=>({listFind(h,C){if(h instanceof Element){let k=h;while(k&&!k[Q2]&&k.parentElement)k=k.parentElement;let g=k?.[Q2];if(g==null)return;let w=x.indexOf(g);return w!==-1?U1[y][w]:void 0}let l=G5(h),i=F5(x,l,C);return i!==-1?U1[y][i]:void 0},listUpdate(h,C){let l=G5(h),i=y1(C,l),k=F5(x,l,i);if(k!==-1){let g=U1[y][k];for(let w of Object.keys(C))g[w]=C[w];return g}return U1[y].push(C),U1[y][x.length-1]},listRemove(h,C){let l=G5(h),i=F5(x,l,C);if(i===-1)return!1;return U1[y].splice(i,1),!0}}),V8=!1;function Lx(){if(!V8)console.warn("xinValue, tosiValue, xinPath, tosiPath, etc. are deprecated. Use .tosi.value, .tosi.path, .tosi.observe(), etc. instead."),V8=!0}var P8=(y)=>{return y===e0},rx=(y,x)=>({get(h,C){switch(C){case"value":return x===e0?y1(w1,y):x.valueOf?x.valueOf():x;case"path":return y;case"touch":return()=>O1(y);case"observe":return(l)=>{let i=C0(y,l);return()=>x0(i)};case"bind":return(l,i,k)=>{Px()(l,y,i,k)};case"on":{let l=x===e0?y1(w1,y):x.valueOf?x.valueOf():x;return(i,k)=>_x()(i,k,l)}case"binding":return(l)=>({bind:{value:y,binding:l}});case"listBinding":return(l=({span:k})=>k({bindText:"^"}),i={})=>{let k=i.virtual?.itemsPerRow??1,g=[];for(let w=0;w<k;w++)g.push(l(G,a8(),w));return[{bindList:{value:y,...i}},G.template(...g)]};case"listFind":case"listUpdate":case"listRemove":return dx(y,Array.isArray(x)?x:[])[C];case"take":return(...l)=>{let i=l[l.length-1],k=l.slice(0,-1).map((g)=>typeof g==="string"?g:g[H1]);return{[x4]:!0,paths:[y,...k],transform:i}}}return},set(h,C,l){if(C==="value"){if(l=b(l),b(l1[y])!==l&&h4(w1,y,l))O1(y);return!0}return!1}}),E2=(y,x)=>new Proxy(x,rx(y,x)),_8=new Set(["path","value","touch","observe","bind","on","binding","listBinding","listFind","listUpdate","listRemove","take"]),A8=new Map([[H1,"path"],["xinPath","path"],["tosiPath","path"],[z2,"value"],["xinValue","value"],["tosiValue","value"],[ay,"observe"],["xinObserve","observe"],["tosiObserve","observe"],[ty,"on"],["xinOn","on"],["tosiOn","on"],[my,"bind"],["xinBind","bind"],["tosiBind","bind"],["tosiBinding","binding"],["tosiListBinding","listBinding"]]),t1=(y,x)=>({get(h,C){if((C==="tosi"||C===T5)&&x)return E2(y,h);if(P8(h)){let w=()=>y1(w1,y);switch(C){case"valueOf":case"toJSON":return()=>w();case Symbol.toPrimitive:return(j)=>{let _=w();if(j==="number")return Number(_);if(j==="string")return String(_);return _};case"toString":return()=>String(w())}if(_8.has(C))return E2(y,h)[C];let B=A8.get(C);if(B!==void 0)return Lx(),E2(y,h)[B];let q=w();if(q!=null){let j=Object(q);if(C in j){let _=j[C];return typeof _==="function"?_.bind(j):_}}return}if(x&&(C==="valueOf"||C==="toJSON"))return()=>h.valueOf?h.valueOf():h;if(x&&!(C in h)&&_8.has(C))return E2(y,h)[C];let l=A8.get(C);if(l!==void 0)return E2(y,h)[l];if(typeof C==="symbol")return h[C];let i=Object.getOwnPropertyDescriptor(h,C);if(i&&!i.configurable&&!i.writable&&"value"in i)return i.value;let k=C,g=k.match(/^([^.[]+)\.(.+)$/)??k.match(/^([^\]]+)(\[.+)/)??k.match(/^(\[[^\]]+\])\.(.+)$/)??k.match(/^(\[[^\]]+\])\[(.+)$/);if(g!==null){let[,w,B]=g,q=E1(y,w),j=b(y1(h,w));return j!==null&&typeof j==="object"?new Proxy(j,t1(q,x))[B]:j}if(k.startsWith("[")&&k.endsWith("]"))k=k.substring(1,k.length-1);if(!Array.isArray(h)&&h[k]!==void 0||Array.isArray(h)&&k.includes("=")){let w;if(k.includes("=")){let[B,q]=k.split("=");w=h.find((j)=>`${y1(j,B)}`===q)}else w=h[k];if(w instanceof Object){w=b(w);let B=E1(y,k);return new Proxy(w instanceof Function?w.bind(h):w,t1(B,x))}else return x?U5(w,E1(y,k)):w}else if(Array.isArray(h)){let w=h[k];return typeof w==="function"?(...B)=>{let q=B.map((_)=>b(_)),j=w.apply(h,q);if(Ix.includes(k))O1(y);if(j!=null&&typeof j==="object"){if(k==="find"||k==="findLast"||k==="at"){let _=h.indexOf(j);if(_!==-1)return new Proxy(j,t1(E1(y,String(_)),x))}}return j}:typeof w==="object"?new Proxy(b(w),t1(E1(y,k),x)):x?U5(w,E1(y,k)):w}else{let w=h[k];if(w!==null&&typeof w==="object")w=b(w);return x?U5(w,E1(y,k)):w}},set(h,C,l){if(l=b(l),typeof C==="symbol"&&C!==z2)return h[C]=l,!0;if(l!==null&&typeof l==="object")if(Array.isArray(l))for(let k=0;k<l.length;k++)l[k]=b(l[k]);else for(let k of Object.keys(l))l[k]=b(l[k]);let i=C===z2||C==="xinValue"||C==="tosiValue"||C==="value"&&(P8(h)||x&&!("value"in h))?y:E1(y,C);if(cx&&!Tx(i))throw Error(`setting invalid path ${i}`);if(b(l1[i])!==l&&h4(w1,i,l))O1(i);return!0}}),n5=(y,x)=>{let h=typeof x==="function"?x:l1[x];if(typeof h!=="function")throw Error(`observe expects a function or path to a function, ${x} is neither`);return C0(y,h)},l1=new Proxy(w1,t1("",!1));jx(l1);var U1=new Proxy(w1,t1("",!0)),ox=16,nx=100;function K8(y,x){let h=Array.from(y.querySelectorAll(B2));if(y.matches(B2))h.unshift(y);for(let C of h){let l=L1.get(C);for(let i of l){if(i.path.startsWith("^"))i.path=`${x}${i.path.substring(1)}`;if(i.binding.toDOM!=null)i.binding.toDOM(C,l1[i.path],i.options)}}}var U8=!1;class m8{boundElement;listTop;listBottom;isNamespaced;templates;options;itemToElement;idToElement=new Map;array=[];_filteredCache;_update;_previousSlice;static filterBoundObservers=new WeakMap;constructor(y,x,h={}){if(this.boundElement=y,this.itemToElement=new WeakMap,h.idPath!=null){let g=V1(x);if(g!=null)ey(g,h.idPath)}let C=h.virtual?.itemsPerRow??1,l=Array.from(y.children).find((g)=>g instanceof HTMLTemplateElement),i=null;if(l!=null){let g=C;if(l.content.children.length<1||l.content.children.length!==g)throw Error(`ListBinding expects a template with exactly ${g} child element(s)`);this.templates=Array.from(l.content.children).map((w)=>e2(w)),i=l.nextElementSibling,l.remove()}else if(y.children.length===1)this.templates=[y.children[0]],this.templates[0].remove();else throw Error("ListBinding expects a <template> child or exactly one child element");this.options=h;let k=y.namespaceURI;if(this.isNamespaced=k==="http://www.w3.org/2000/svg"||k==="http://www.w3.org/1998/Math/MathML",this.isNamespaced)this.listTop=null,this.listBottom=null;else if(this.listTop=document.createElement("div"),this.listBottom=document.createElement("div"),this.listTop.classList.add("virtual-list-padding"),this.listBottom.classList.add("virtual-list-padding"),this.listTop.setAttribute("role","presentation"),this.listBottom.setAttribute("role","presentation"),this.listTop.setAttribute("aria-hidden","true"),this.listBottom.setAttribute("aria-hidden","true"),i!=null)this.boundElement.insertBefore(this.listTop,i),this.boundElement.insertBefore(this.listBottom,i);else this.boundElement.append(this.listTop),this.boundElement.append(this.listBottom);if(C>1){this.boundElement.classList.add("tosi-virtual-grid");let g=this.boundElement.style;if(g!=null)g.setProperty("--tosi-columns",String(C)),g.display=g.display||"grid",g.gridTemplateColumns=g.gridTemplateColumns||"repeat(var(--tosi-columns), 1fr)";if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.gridColumn="1 / -1",this.listBottom.style.gridColumn="1 / -1"}if(h.virtual!=null&&!this.boundElement.getAttribute("role"))this.boundElement.setAttribute("role",C>1?"grid":"list");if(this.boundElement[E0]=this,this.isNamespaced&&h.virtual!=null)console.warn("ListBinding: virtual scrolling is not supported in SVG/MathML containers, ignoring virtual option");if(!this.isNamespaced&&h.virtual!=null)if(R5.observe(this.boundElement),this._update=X2(()=>{this.update(this.array,!0)},ox),this.boundElement.addEventListener("resize",this._update),h.virtual.scrollContainer==="window")window.addEventListener("scroll",this._update),window.addEventListener("resize",this._update);else this.boundElement.addEventListener("scroll",this._update)}filteredArray(){if(this._filteredCache!=null)return this._filteredCache;let{hiddenProp:y,visibleProp:x}=this.options,h=this.array;if(y!==void 0)h=h.filter((C)=>C[y]!==!0);if(x!==void 0)h=h.filter((C)=>C[x]===!0);if(this.options.filter&&this.needle!==void 0)h=this.options.filter(h,this.needle);return this._filteredCache=h,h}visibleSlice(){let{virtual:y}=this.options,x=this.filteredArray(),h=0,C=x.length-1,l=0,i=0;if(y!=null&&this.boundElement instanceof HTMLElement){let k=this.boundElement.offsetWidth,g=y.scrollContainer==="window",w,B;if(g){w=window.innerHeight;let _=this.boundElement.getBoundingClientRect();B=Math.max(0,-_.top)}else w=this.boundElement.offsetHeight,B=this.boundElement.scrollTop;let q=y.width!=null?Math.max(1,Math.floor(k/y.width)):y.visibleColumns??1,j=Math.ceil(x.length/q);if(y.minHeight!=null){let _=y.minHeight,K=Math.ceil(w/_)+(y.rowChunkSize||1),U=q*K,Q=j*_,Y=Math.max(0,Q-w),$=Y>0?Math.min(1,Math.max(0,B/Y)):0,Z=Math.max(0,j-K+1),p=$*Z,T=Math.floor(p);if(y.rowChunkSize)T-=T%y.rowChunkSize;return h=T*q,C=h+U-1,l=B,i=Math.max(0,Q-B-w),{items:x,firstItem:h,lastItem:C,topBuffer:l,bottomBuffer:i,interpolation:{t:$,position:p,scrollTop:B,viewportHeight:w,totalScrollHeight:Q,rowHeight:y.height}}}else{let _=Math.ceil(w/y.height)+(y.rowChunkSize||1),K=q*_,U=Math.floor(B/y.height);if(U>j-_+1)U=Math.max(0,j-_+1);if(y.rowChunkSize)U-=U%y.rowChunkSize;h=U*q,C=h+K-1,l=U*y.height,i=Math.max((j-_)*y.height-l,0)}}return{items:x,firstItem:h,lastItem:C,topBuffer:l,bottomBuffer:i}}needle;filter=X2((y)=>{if(this.needle!==y)this.needle=y,this.update(this.array)},nx);update(y,x){if(y==null)y=[];if(this.array=y,!x)this._filteredCache=void 0;let{hiddenProp:h,visibleProp:C}=this.options,l=V1(y),i=this.visibleSlice();if(this.boundElement.classList.toggle("-xin-empty-list",i.items.length===0),this.options.virtual!=null)this.boundElement.setAttribute("aria-rowcount",String(i.items.length));let k=this._previousSlice,{firstItem:g,lastItem:w,topBuffer:B,bottomBuffer:q}=i,j=h===void 0&&C===void 0&&x===!0&&k!=null&&g===k.firstItem&&w===k.lastItem;if(j&&i.interpolation==null&&B===k.topBuffer&&q===k.bottomBuffer)return;if(j&&i.interpolation!=null){this._updateInterpolatedBuffers(i);return}this._previousSlice=i;let _=0,K=0,U=0,{idPath:Q}=this.options,Y=this.options.virtual?.itemsPerRow??1,$;if(Q!=null){$=new Set;for(let M=g;M<=w;M++){let N=i.items[M];if(N!==void 0)$.add(String(N[Q]))}}let Z=new Set;for(let M of Array.from(this.boundElement.children)){if(M===this.listTop||M===this.listBottom)continue;let N=M[Q2];if(N==null)continue;else if(N===!0)M.remove(),_++;else{if(Z.has(N))continue;let I;if(Q!=null)I=!$.has(String(N[Q]));else{let D=i.items.indexOf(N);I=D<g||D>w}if(I){Z.add(N);let D=this.itemToElement.get(N);if(D!=null)for(let v of D)v.remove();else M.remove();if(this.itemToElement.delete(N),Q!=null)this.idToElement.delete(String(N[Q]));_++}}}if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(B)+"px",this.listBottom.style.height=String(q)+"px";let p=[],T=Q!=null?new Set:null;for(let M=g;M<=w;M++){let N=i.items[M];if(N===void 0)continue;if(T!=null&&Q!=null){let D=String(N[Q]);if(T.has(D)){if(!U8)U8=!0,console.error(`tosijs list binding: duplicate idPath value "${D}" (idPath: "${Q}"). `+"id-path values must be unique — items sharing an id collapse to a single "+"row and updates target the wrong item. Warned once per session.")}else T.add(D)}let I=this.itemToElement.get(b(N));if(I==null&&Q!=null){let D=String(N[Q]);if(I=this.idToElement.get(D),I!=null){let v=b(N);this.itemToElement.set(v,I);for(let A1 of I)A1[Q2]=v}}if(I==null){U++;let D=b(N);if(I=this.templates.map((v)=>e2(v)),typeof N==="object")this.itemToElement.set(D,I);for(let v of I)v[Q2]=typeof N==="object"?D:!0;for(let v of I)if(this.listBottom!=null)this.boundElement.insertBefore(v,this.listBottom);else this.boundElement.append(v);if(Q!=null){let v=N[Q],A1=`${l}[${Q}=${v}]`;for(let u1 of I)K8(u1,A1);this.idToElement.set(String(v),I)}else{let v=`${l}[${M}]`;for(let A1 of I)K8(A1,v)}}if(this.options.virtual!=null){let D=String(M+1);if(Y>1)for(let v=0;v<I.length;v++){let A1=I[v];A1.setAttribute("role","gridcell"),A1.setAttribute("aria-rowindex",D),A1.setAttribute("aria-colindex",String(v+1))}else for(let v of I)v.setAttribute("role","listitem"),v.setAttribute("aria-rowindex",D)}p.push(...I)}let C1=this.listTop;for(let M of p){if(M.previousElementSibling!==C1)if(K++,C1?.nextElementSibling!=null)this.boundElement.insertBefore(M,C1.nextElementSibling);else if(this.listBottom!=null)this.boundElement.insertBefore(M,this.listBottom);else this.boundElement.append(M);C1=M}if(i.interpolation!=null)this._updateInterpolatedBuffers(i);if(a0.perf)console.log(l,"updated",{removed:_,created:U,moved:K})}_updateInterpolatedBuffers(y){let{t:x,position:h,scrollTop:C,viewportHeight:l,totalScrollHeight:i,rowHeight:k}=y.interpolation,g=0;for(let j of Array.from(this.boundElement.children)){if(j===this.listTop||j===this.listBottom)continue;g+=j.offsetHeight||k}let w=C,B=C+l-g,q=Math.max(0,x*B+(1-x)*w-h%1*k);if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(q)+"px",this.listBottom.style.height=String(Math.max(0,i-q-g))+"px"}}var Y2=(y,x,h)=>{let C=y[E0];if(x&&C===void 0)C=new m8(y,x,h),y[E0]=C;return C},f5=(y)=>{let x;while(!(x=y[Q2])&&y&&y.parentElement)y=y.parentElement;return x?{element:y,item:x}:void 0},q2=(y)=>{let x=f5(y);return x?x.item:void 0},fx=(y)=>{let x=f5(y);if(!x)return console.error("deleteListItem failed, element is not part of a list instance",y),!1;let h=Y2(x.element.parentElement);if(!h.options.idPath)return console.error("deleteListItem failed, list binding has no idPath",y.parentElement,h),!1;let C=h.array.indexOf(x.item);if(C>-1)return h.array.splice(C,1),!0;return!1},ux={start:"start",middle:"center",end:"end",nearest:"nearest"},Ex=(y,x,h={})=>{let C=Y2(y);if(C==null)return console.error("scrollListItemIntoView failed, element has no list binding",y),!1;let{position:l="middle",behavior:i="smooth"}=h,k=C.filteredArray(),g=b(x)??x,w=k.indexOf(g);if(w===-1)return console.error("scrollListItemIntoView failed, item not found in list",x),!1;let{virtual:B}=C.options;if(B!=null&&y instanceof HTMLElement){let q=B.width!=null?Math.max(1,Math.floor(y.offsetWidth/B.width)):B.visibleColumns??1,j=Math.floor(w/q),_=B.minHeight??B.height,K=Math.ceil(k.length/q),U=B.scrollContainer==="window",Q=U?window.innerHeight:y.offsetHeight,Y;if(B.minHeight!=null){let $=Math.ceil(Q/_)+(B.rowChunkSize||1),Z=K*_,p=Math.max(0,Z-Q),T=Math.max(1,K-$+1),C1=j/T;switch(l){case"start":Y=C1*p;break;case"end":Y=Math.max(0,(j-$+1)/T*p);break;case"nearest":{let M=U?Math.max(0,-y.getBoundingClientRect().top):y.scrollTop,N=p>0?M/p:0,I=Math.floor(N*T);if(j<I)Y=C1*p;else if(j>=I+$)Y=Math.max(0,(j-$+1)/T*p);else return!0;break}default:{let M=j-Math.floor($/2);Y=Math.max(0,M)/T*p}}}else{let $=j*B.height;switch(l){case"start":Y=$;break;case"end":Y=$-Q+B.height;break;case"nearest":{let Z=U?Math.max(0,-y.getBoundingClientRect().top):y.scrollTop;if($<Z)Y=$;else if($+B.height>Z+Q)Y=$-Q+B.height;else return!0;break}default:Y=$-(Q-B.height)/2}}if(Y=Math.max(0,Y),U){let $=y.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:$+Y,behavior:i})}else y.scrollTo({top:Y,behavior:i})}else{let q=C.itemToElement.get(g);if(q==null||q.length===0)return console.error("scrollListItemIntoView failed, no DOM element found for item",x),!1;q[0].scrollIntoView({block:ux[l]??"center",behavior:i})}return!0},{document:h0,MutationObserver:G8}=globalThis,u5=(y,x)=>{let h=L1.get(y);if(h==null)return;for(let C of h){let{binding:l,options:i}=C,{path:k}=C,{toDOM:g}=l;if(g!=null){if(k.startsWith("^")){let w=q2(y);if(w!=null&&w[H1]!=null)k=C.path=`${w[H1]}${k.substring(1)}`;else{if(y instanceof HTMLElement)console.warn(`Unresolved relative binding "${k}" —`,y,"is not part of a list. If this is a list template, wrap it in a <template>.");continue}}if(x==null||y0(x,k))g(y,C4()[k],i)}}};if(G8!=null)new G8((y)=>{y.forEach((x)=>{Array.from(x.addedNodes).forEach((h)=>{if(h instanceof Element)Array.from(h.querySelectorAll(B2)).forEach((C)=>u5(C))})})}).observe(h0.body,{subtree:!0,childList:!0});C0(()=>!0,(y)=>{let x=Array.from(h0.querySelectorAll(B2));for(let h of x)u5(h,y)});var t8=(y)=>{let x=y.composedPath!=null?y.composedPath()[0]:y.target;return x instanceof Element?x:null},y4=(y,x)=>{while(y!=null){let h=y.closest(x);if(h!=null)return h;let C=y.getRootNode();y=typeof ShadowRoot<"u"&&C instanceof ShadowRoot?C.host:null}return null},e8=(y,x)=>{if(y.parentElement!=null)return y4(y.parentElement,x);let h=y.getRootNode();if(typeof ShadowRoot<"u"&&h instanceof ShadowRoot)return y4(h.host,x);return null},F8=(y)=>{let x=y4(t8(y),B2);while(x!=null){let h=L1.get(x);for(let C of h??[]){let{binding:l,path:i}=C,{fromDOM:k}=l;if(k!=null){let g;try{g=k(x,C.options)}catch(w){throw console.error("Cannot get value from",x,"via",C),Error("Cannot obtain value fromDOM")}if(g!=null){let w=C4(),B=w[i];if(B==null)w[i]=g;else{let q=B[H1]!=null?B[z2]:B,j=g[H1]!=null?g[z2]:g;if(typeof q==="number"&&typeof j==="string"){let _=j.trim();if(_!==""){let K=Number(_);if(!Number.isNaN(K))j=K}}else if(j instanceof Date){if(typeof q==="number")j=j.getTime();else if(typeof q==="string")j=x.value}if(q instanceof Date&&j instanceof Date?q.getTime()!==j.getTime():q!==j)w[i]=j}}}}x=e8(x,B2)}};if(globalThis.document!=null)h0.body.addEventListener("change",F8,!0),h0.body.addEventListener("input",F8,!0);function ax(y,x,h,C){let{paths:l,transform:i}=x,{toDOM:k}=h;if(k==null)return y;let g=null,w={toDOM(q,j,_){let K=C4(),U=l.map((Y)=>K[Y]);if(g!==null&&U.every((Y,$)=>Y===g[$]))return;g=U;let Q=i(...U);k(q,Q,_)},fromDOM:h.fromDOM};y.classList?.add(s5);let B=L1.get(y);if(B==null)B=[],L1.set(y,B);for(let q of l)B.push({path:q,binding:w,options:C});if(!l[0].startsWith("^"))O1(l[0]);return y}var O8=!1,mx=(y,x)=>{if(O8)return;if(typeof ShadowRoot<"u"&&y.getRootNode!=null&&y.getRootNode()instanceof ShadowRoot)O8=!0,console.warn(`tosijs: ${x} targets an element inside a shadow root, where data bindings do not operate (documented Component design boundary). A shadow-DOM component is bound like an <input>: bind its VALUE from outside (bindings.value) and implement render() to reflect value into the shadow DOM. Warned once per session.`,y)};function d1(y,x,h,C){if(y instanceof DocumentFragment)throw Error("bind cannot bind to a DocumentFragment");if(mx(y,"bind()"),x!=null&&typeof x==="object"&&x[x4])return ax(y,x,h,C);let l;if(typeof x==="object"&&x[H1]===void 0&&C===void 0){let{value:g}=x;l=typeof g==="string"?g:g[H1],C={...x},delete C.value}else l=typeof x==="string"?x:x[H1];if(l==null)throw Error("bind requires a path or object with xin Proxy");let{toDOM:i}=h;y.classList?.add(s5);let k=L1.get(y);if(k==null)k=[],L1.set(y,k);if(k.push({path:l,binding:h,options:C}),i!=null&&!l.startsWith("^"))O1(l);if(C?.filter&&C?.needle)d1(y,C.needle,{toDOM(g,w){g[E0]?.filter(w)}});return y}var W8=new Set,tx=(y)=>{let x=y4(t8(y),h8),h=!1,C=new Proxy(y,{get(i,k){if(k==="stopPropagation")return()=>{y.stopPropagation(),h=!0};else{let g=i[k];return typeof g==="function"?g.bind(i):g}}}),l=new Set;while(!h&&x!=null){let i=t2.get(x)?.[y.type]??l;for(let k of i){if(typeof k==="function")k(C);else{let g=C4()[k];if(typeof g==="function")g(C);else throw Error(`no event handler found at path ${k}`)}if(h)continue}x=e8(x,h8)}};function N2(y,x,h){let C=t2.get(y);if(y.classList.add(p8),C==null)C={},t2.set(y,C);if(!C[x])C[x]=new Set;if(C[x].add(h),!W8.has(x))W8.add(x),h0.body.addEventListener(x,tx,!0);return()=>{C[x].delete(h)}}Vx(d1,N2);function y6(y,x){if(!y.internals)return;let h={},C="";if(y.hasAttribute("required")&&x==="")h.valueMissing=!0,C="Please fill out this field.";let l=y.getAttribute("minlength");if(l&&x.length<parseInt(l,10))h.tooShort=!0,C=`Please use at least ${l} characters.`;let i=y.getAttribute("maxlength");if(i&&x.length>parseInt(i,10))h.tooLong=!0,C=`Please use no more than ${i} characters.`;let k=y.getAttribute("pattern");if(k&&x!=="")try{if(!new RegExp(`^(?:${k})$`).test(x))h.patternMismatch=!0,C="Please match the requested format."}catch{}if(Object.keys(h).length>0)y.internals.setValidity(h,C,y);else y.internals.setValidity({})}var ex=0;function O5(){return`custom-elt${(ex++).toString(36)}`}var Q8=0,X8=new Set,$8=new Set,Y8=Symbol("tosiDrainWrapped"),N8=new WeakSet,W5=null;function yh(){if(W5===null)W5=new MutationObserver((y)=>{let x=new Set;for(let h of y)if(h.type==="attributes"&&h.target instanceof F){let C=h.target,l=s8(h.attributeName);if(C._legacyTrackedAttrs?.has(l))x.add(C)}for(let h of x)h.queueRender(!1)});return W5}var m2={};function xh(y,x){let h=m2[y],C=$2(x).replace(/:host\(([^)]+)\)/g,`${y}$1`).replace(/:host\b/g,y);m2[y]=h?h+`
13
- `+C:C}function hh(y){if(m2[y])document.head.append(G.style({id:y+"-component"},m2[y]));delete m2[y]}class F extends HTMLElement{static elements=G;static _elementCreator;static initAttributes;static formAssociated;static preferredTagName;static shadowStyleSpec;static lightStyleSpec;static extends;internals;get validity(){return this.internals?.validity}get validationMessage(){return this.internals?.validationMessage??""}get willValidate(){return this.internals?.willValidate??!1}checkValidity(){return this.internals?.checkValidity()??!0}reportValidity(){return this.internals?.reportValidity()??!0}setCustomValidity(y){if(this.internals)if(y)this.internals.setValidity({customError:!0},y);else this.internals.setValidity({})}setValidity(y,x,h){this.internals?.setValidity(y,x,h)}setFormValue(y,x){this.internals?.setFormValue(y,x)}static get observedAttributes(){let y=this.initAttributes;if(y)return["hidden",...Object.keys(y).map(K1)];return["hidden"]}instanceId;styleNode;static styleSpec;static styleNode;content=G.slot();isSlotted;static _tagName=null;static get tagName(){return this._tagName}_legacyTrackedAttrs;_attrValues;_valueChanged=!1;_pendingAttrOps;static StyleNode(y){return console.warn("StyleNode is deprecated, use static shadowStyleSpec instead"),G.style($2(y))}static elementCreator(y={}){let x=this;if(!Object.prototype.hasOwnProperty.call(x,"_elementCreator")){if(y.tag!==void 0)j1("elementCreator-tag","Passing tag to elementCreator() is deprecated. Use static preferredTagName instead.");if(y.styleSpec!==void 0)j1("elementCreator-styleSpec","Passing styleSpec to elementCreator() is deprecated. Use static lightStyleSpec instead.");if(y.extends!==void 0)j1("elementCreator-extends","Passing extends to elementCreator() is deprecated. Use static extends instead.");let h=y.tag??x.preferredTagName;if(h==null)if(typeof x.name==="string"&&x.name!==""){if(h=K1(x.name),h.startsWith("-"))h=h.slice(1)}else h=O5();if(customElements.get(h)!=null)console.warn(`${h} is already defined`);if(h.match(/\w+(-\w+)+/)==null)console.warn(`${h} is not a legal tag for a custom-element`),h=O5();while(customElements.get(h)!==void 0)h=O5();x._tagName=h;let C=y.styleSpec??x.lightStyleSpec;if(C!==void 0)xh(h,C);let l=y.extends??x.extends,i=l?{extends:l}:void 0,k=this.prototype;if(k!=null&&!Object.prototype.hasOwnProperty.call(k,Y8)){let g=k.connectedCallback;k.connectedCallback=function(){if(this._drainPendingAttrOps(),g)g.call(this)},Object.defineProperty(k,Y8,{value:!0,enumerable:!1})}window.customElements.define(h,this,i),x._elementCreator=G[h]}return x._elementCreator}initAttributes(...y){if(j1("initAttributes","initAttributes() is deprecated. Use static initAttributes = { ... } instead."),!this._legacyTrackedAttrs)this._legacyTrackedAttrs=new Set;for(let C of y)this._legacyTrackedAttrs.add(C);yh().observe(this,{attributes:!0});let x={},h={};y.forEach((C)=>{x[C]=D1(this[C]);let l=K1(C);Object.defineProperty(this,C,{enumerable:!1,get(){if(typeof x[C]==="boolean")return this.hasAttribute(l);else if(this.hasAttribute(l))return typeof x[C]==="number"?parseFloat(this.getAttribute(l)):this.getAttribute(l);else if(h[C]!==void 0)return h[C];else return x[C]},set(i){if(typeof x[C]==="boolean"){if(i!==this[C]){if(i)this.setAttribute(l,"");else this.removeAttribute(l);this.queueRender()}}else if(typeof x[C]==="number"){if(i!==parseFloat(this[C]))this.setAttribute(l,i),this.queueRender()}else if(typeof i==="object"||`${i}`!==`${this[C]}`){if(i===null||i===void 0||typeof i==="object")this.removeAttribute(l);else this.setAttribute(l,i);this.queueRender(),h[C]=i}}})})}initValue(){let y=Object.getOwnPropertyDescriptor(this,"value");if(y===void 0||y.get!==void 0||y.set!==void 0)return;let x=this.hasAttribute("value")?this.getAttribute("value"):D1(this.value);delete this.value,Object.defineProperty(this,"value",{enumerable:!1,get(){return x},set(h){if(x!==h)x=h,this._valueChanged=!0,this.queueRender(!0)}})}_parts;get parts(){let y=this.shadowRoot!=null?this.shadowRoot:this;if(this._parts==null)this._parts=new Proxy({},{get(x,h){if(typeof h!=="string")return;if(x[h]===void 0){let C=y.querySelector(`[part="${h}"]`);if(C==null)C=y.querySelector(`[data-ref="${h}"]`);if(C==null)C=y.querySelector(h);if(C==null)throw Error(`elementRef "${h}" does not exist!`);C.removeAttribute("data-ref"),x[h]=C}return x[h]}});return this._parts}attributeChangedCallback(y,x,h){let C=s8(y);if(h===null&&this._attrValues?.has(C))this._attrValues.delete(C);if(!this._legacyTrackedAttrs?.has(C))this.queueRender(!1)}constructor(){super();if(Q8+=1,this._installAttributeQueue(),this.constructor.formAssociated&&typeof this.attachInternals==="function"&&!this.internals)this.internals=this.attachInternals();let y=this.constructor.initAttributes;if(y)this._setupAttributeAccessors(y);this.instanceId=`${this.tagName.toLocaleLowerCase()}-${Q8}`,this._value=D1(this.defaultValue),this._warnOnHandlerCollisions()}_warnOnHandlerCollisions(){let y=this.constructor;if(N8.has(y))return;N8.add(y),queueMicrotask(()=>{let x=new Set;for(let i of Object.keys(this))if(/^on[A-Z]/.test(i))x.add(i);let h=Object.getPrototypeOf(this);while(h&&h!==F.prototype){for(let i of Object.getOwnPropertyNames(h))if(/^on[A-Z]/.test(i))x.add(i);h=Object.getPrototypeOf(h)}let C=this.tagName.toLowerCase();if(x.delete("onResize")&&this.handleResize===void 0)console.warn(`<${C}> defines 'onResize', which is deprecated. Rename it to 'handleResize'. The on<Event> prefix is reserved for event-handler sugar in the elements factory (creator({ onResize }) would attach a 'resize' listener) and is being retired for component callbacks in favor of the handle<Event> convention.`);if(x.size===0)return;let l=Array.from(x,(i)=>`'${i}'`).join(", ");console.warn(`<${C}> defines ${l}. The elements factory treats on<Event> property `+"names as event-handler sugar — e.g. creator({ onClick }) attaches a "+"'click' listener rather than assigning the property — so these members "+"are shadowed and cannot be set or read via the element creator. Rename them with the handle<Event> convention (e.g. 'handleClick') to keep them usable as component members.")})}_installAttributeQueue(){let y=this.constructor.initAttributes;if(!y)return;let x=new Set(Object.keys(y).map(K1)),h=[];this._pendingAttrOps=h;let C=HTMLElement.prototype;this.setAttribute=(l,i)=>{if(x.has(l))h.push(["set",l,String(i)]);else C.setAttribute.call(this,l,i)},this.removeAttribute=(l)=>{if(x.has(l))h.push(["remove",l]);else C.removeAttribute.call(this,l)},queueMicrotask(()=>this._drainPendingAttrOps())}_drainPendingAttrOps(){let y=this._pendingAttrOps;if(y===void 0)return;this._pendingAttrOps=void 0,delete this.setAttribute,delete this.removeAttribute;let x=new Set;for(let h of y)if(this.hasAttribute(h[1]))x.add(h[1]);for(let h of y)if(h[0]==="set"){if(!x.has(h[1]))this.setAttribute(h[1],h[2])}else x.delete(h[1]),this.removeAttribute(h[1])}_installedAttrAccessors;_setupAttributeAccessors(y){if(!this._attrValues)this._attrValues=new Map;if(!this._installedAttrAccessors)this._installedAttrAccessors=new Set;for(let x of Object.keys(y)){let h=K1(x),C=y[x];if(x==="value"){console.warn(`${this.tagName}: 'value' cannot be an attribute. Use the Component value property instead.`);continue}if(typeof C==="object"&&C!==null){console.warn(`${this.tagName}: initAttributes.${x} is an object. Use a regular property instead.`);continue}if(C===!0)throw Error(`${this.tagName}: static initAttributes.${x} defaults a boolean attribute to true, but HTML boolean attributes are false-by-default (presence = true, absence = false) and `+`cannot reflect a true default — it would silently become false. Use { ${x}: false }, or model it as a string/number attribute or a plain (non-attribute) property.`);let l=this,i=!1;while(l){let k=Object.getOwnPropertyDescriptor(l,x);if(k){if(!k.configurable||k.get||k.set){i=!0;break}break}l=Object.getPrototypeOf(l)}if(i)continue;this._installAttrAccessor(x,h,C)}}_installAttrAccessor(y,x,h){Object.defineProperty(this,y,{enumerable:!1,configurable:!0,get:()=>{if(typeof h==="boolean"){if(this.hasAttribute(x))return!0;if(this._attrValues.has(y))return this._attrValues.get(y);return!1}else if(this.hasAttribute(x))return typeof h==="number"?parseFloat(this.getAttribute(x)):this.getAttribute(x);else if(this._attrValues.has(y))return this._attrValues.get(y);else return h},set:(C)=>{if(typeof h==="boolean"){if(C!==this[y]){if(C)this.setAttribute(x,"");else this.removeAttribute(x);this.queueRender(),this._attrValues.set(y,!!C)}}else if(typeof h==="number"){if(C!==parseFloat(this[y]))this.setAttribute(x,C),this.queueRender(),this._attrValues.set(y,C)}else if(typeof C==="object"||`${C}`!==`${this[y]}`){if(C===null||C===void 0||typeof C==="object")this.removeAttribute(x);else this.setAttribute(x,C);this.queueRender(),this._attrValues.set(y,C)}}}),this._installedAttrAccessors.add(y)}_recoverShadowedAttrAccessors(){let y=this._installedAttrAccessors,x=this.constructor.initAttributes;if(y==null||x==null)return;let h=[];for(let C of y){let l=Object.getOwnPropertyDescriptor(this,C);if(l==null||l.get!=null||l.set!=null)continue;let i=l.value;delete this[C],this._installAttrAccessor(C,K1(C),x[C]),this[C]=i,h.push(C)}if(h.length>0&&!$8.has(this.tagName)){$8.add(this.tagName);let C=h.map((l)=>`'${l}'`).join(", ");console.warn(`<${this.tagName.toLowerCase()}> declares instance field(s) ${C} that shadow static initAttributes accessors (class fields use [[Define]] semantics). The field value was adopted and the `+"reactive accessor restored — delete the field declaration; "+"static initAttributes already defines the property.")}}connectedCallback(){if(this._recoverShadowedAttrAccessors(),this._drainPendingAttrOps(),hh(this.constructor.tagName),this.hydrate(),this.role!=null)this.setAttribute("role",this.role);if(this.constructor.formAssociated&&!this.hasAttribute("tabindex"))this.setAttribute("tabindex","0");let y=this.handleResize??this.onResize;if(y!==void 0){if(R5.observe(this),this._onResize==null)this._onResize=y.bind(this);this.addEventListener("resize",this._onResize)}if(this.value!=null&&this.getAttribute("value")!=null)this._value=this.getAttribute("value");if(this.internals&&this.value!==void 0)this.internals.setFormValue(this.value),this.validateValue();this.queueRender()}disconnectedCallback(){R5.unobserve(this)}formResetCallback(){if(this.value!==void 0)this.value=this.defaultValue??""}formDisabledCallback(y){if(y)this.setAttribute("disabled","");else this.removeAttribute("disabled")}formStateRestoreCallback(y){if(this.value!==void 0&&typeof y==="string")this.value=y}_changeQueued=!1;_renderQueued=!1;queueRender(y=!1){if(!this._hydrated)return;if(!this._changeQueued)this._changeQueued=y;if(!this._renderQueued)this._renderQueued=!0,requestAnimationFrame(()=>{if(this._changeQueued){if(I8(this,"change",{bubbles:!0,composed:!0}),this.internals&&this.value!==void 0)this.internals.setFormValue(this.value)}this._changeQueued=!1,this._renderQueued=!1,this.render()})}_hydrated=!1;_whenHydrated;_resolveHydrated;get hydrated(){return this._hydrated}get whenHydrated(){if(this._hydrated)return Promise.resolve();if(this._whenHydrated==null)this._whenHydrated=new Promise((y)=>{this._resolveHydrated=y});return this._whenHydrated}hydrate(){if(!this._hydrated){this.initValue();let y=typeof this.content!=="function",x=typeof this.content==="function"?this.content(G):this.content;if(Array.isArray(x)){let i={};x=x.filter((k)=>{if(k instanceof Node||typeof k==="string"||typeof k==="number"||V1(k))return!0;return Object.assign(i,k),!1});for(let k of Object.keys(i))L5(this,k,i[k])}let h=this.constructor,C=h.shadowStyleSpec??h.styleSpec;if(h.styleSpec&&!h.shadowStyleSpec)j1("static-styleSpec","static styleSpec is deprecated. Use static shadowStyleSpec instead.");let{styleNode:l}=h;if(C)l=h.styleNode=G.style($2(C)),delete h.styleNode;if(this.styleNode)console.warn(this,"styleNode is deprecated, use static shadowStyleSpec instead"),l=this.styleNode;if(l){let i=this.attachShadow({mode:"open"});if(i.appendChild(l.cloneNode(!0)),w8(i,x,y),!X8.has(this.tagName)&&i.querySelector(B2)!=null)X8.add(this.tagName),console.warn(`<${this.tagName.toLowerCase()}> has data-binding sugar in its shadow-DOM content, where bindings do not operate. A shadow-DOM component is bound like an <input>: bind its VALUE from outside (bindings.value) and implement render() to reflect value into `+"the shadow DOM — setting value queues render() and emits change "+"automatically. on() event handlers are fine. Warned once per component class.")}else if(x!==null){let i=Array.from(this.childNodes);w8(this,x,y),this.isSlotted=this.querySelector("slot,tosi-slot,xin-slot")!==null;let k=Array.from(this.querySelectorAll("slot"));if(k.length>0)k.forEach(i4.replaceSlot);if(i.length>0){let g={"":this};Array.from(this.querySelectorAll("tosi-slot,xin-slot")).forEach((w)=>{g[w.name]=w}),i.forEach((w)=>{let B=g[""],q=w instanceof Element?g[w.slot]:B;(q!==void 0?q:B).append(w)})}}this._hydrated=!0,this._parts=void 0,this._resolveHydrated?.()}}render(){if(this._valueChanged&&this.internals&&this.value!==void 0)this.internals.setFormValue(this.value),this.validateValue();this._valueChanged=!1}validateValue(){if(!this.internals||this.value===void 0)return;let y=typeof this.value==="string"?this.value:String(this.value);y6(this,y)}}class i4 extends F{static preferredTagName="tosi-slot";static initAttributes={name:""};content=null;static replaceSlot(y){let x=document.createElement("tosi-slot");if(y.name!=="")x.setAttribute("name",y.name);while(y.firstChild!=null)x.appendChild(y.firstChild);y.replaceWith(x)}}var Ch=i4.elementCreator();class x6 extends F{static preferredTagName="xin-slot";static initAttributes={name:""};content=null;constructor(){super();j1("xin-slot","<xin-slot> is deprecated. Use <tosi-slot> instead.")}static replaceSlot=i4.replaceSlot}var lh=x6.elementCreator(),ih=(y=()=>!0)=>{let x=localStorage.getItem("xin-state");if(x!=null){let C=JSON.parse(x);for(let l of Object.keys(C).filter(y))l1[l]=C[l]}let h=l0(()=>{let C={},l=b(l1);for(let i of Object.keys(l).filter(y))C[i]=l[i];localStorage.setItem("xin-state",JSON.stringify(C)),console.log("xin state saved to localStorage")},500);n5((C)=>{let l=C.split(/[.[]/)[0];return y(l)},h)},kh="tosijs-share",gh="tosijs-share",a2="shared",wh=1,D5=new Set,H5=new Set,b5=new Set,S5=new Set,Q5=new Map,g2=null,M5="",f0=null,Bh=null;function J8(){if(f0!=null)return Promise.resolve(f0);return new Promise((y,x)=>{let h=indexedDB.open(gh,wh);h.onupgradeneeded=()=>{h.result.createObjectStore(a2)},h.onsuccess=()=>{f0=h.result,y(f0)},h.onerror=()=>x(h.error)})}var zh={async get(y){let x=await J8();return new Promise((h,C)=>{let l=x.transaction(a2,"readonly").objectStore(a2).get(y);l.onsuccess=()=>h(l.result),l.onerror=()=>C(l.error)})},async set(y,x){let h=await J8();return new Promise((C,l)=>{let i=h.transaction(a2,"readwrite");i.objectStore(a2).put(x,y),i.oncomplete=()=>C(),i.onerror=()=>l(i.error)})}};function h6(){return Bh??zh}function qh(y){return y!=null&&y.type==="tosijs-share"&&typeof y.path==="string"}function E5(y){for(let x of D5)if(y===x||y.startsWith(x+"."))return x;return}function jh(y){for(let x of H5)if(y===x||y.startsWith(x+"."))return!0;return!1}function C6(y,x){let h=E5(y);if(h!==void 0&&b5.has(h))S5.add(h);H5.add(y),h4(w1,y,x),O1(y),d5().then(()=>{H5.delete(y)})}function Vh(){if(g2!=null)return g2;return M5=crypto.randomUUID(),g2=new BroadcastChannel(kh),g2.onmessage=(y)=>{let x=y.data;if(!qh(x))return;if(x.origin===M5)return;if(E5(x.path)===void 0)return;C6(x.path,x.value)},g2}function Ph(y,x){if(g2==null)return;let h={type:"tosijs-share",path:y,value:x,origin:M5};g2.postMessage(h)}function _h(y){if(!Q5.has(y))Q5.set(y,l0(()=>{let x=y1(w1,y);h6().set(y,x)},500));Q5.get(y)()}async function Ah(...y){if(typeof BroadcastChannel>"u")return{restored:[]};Vh();let x=[],h=h6();for(let C of y){let l=typeof C==="string"?C:V1(C);if(l===void 0)throw Error("share() requires boxed proxies or string paths. Got a non-proxy value.");if(D5.has(l))continue;D5.add(l),b5.add(l);let i=await h.get(l),k=S5.has(l);if(b5.delete(l),S5.delete(l),i!==void 0&&!k)C6(l,i),x.push(C);else if(i===void 0){let g=y1(w1,l);await h.set(l,g)}C0((g)=>g===l||g.startsWith(l+"."),(g)=>{if(jh(g))return;let w=E5(g);if(w===void 0)return;let B=y1(w1,g);Ph(g,B),_h(w)})}return{restored:x}}var I5=new Set;function Z8(y,x){for(let h of y)if(x===h||x.startsWith(h+"."))return h;return}function Kh(y){for(let x of I5)if(y===x||y.startsWith(x+"."))return!0;return!1}function Uh(y,x){I5.add(y),h4(w1,y,x),O1(y),d5().then(()=>{I5.delete(y)})}async function Gh(y,x,...h){let C=new Set,l=[],i=[],k=x.throttleInterval??100;await y.connect();let g=X2(()=>{if(l.length===0)return;let w=l.splice(0);try{y.send(w)}catch(B){l.unshift(...w),console.error("sync: transport.send failed; deltas requeued and will retry on the next flush",B)}},k);y.onReceive((w)=>{for(let B of w){if(Z8(C,B.path)===void 0)continue;Uh(B.path,B.value)}});for(let w of h){let B=typeof w==="string"?w:V1(w);if(B===void 0)throw Error("sync() requires boxed proxies or string paths. Got a non-proxy value.");C.add(B);let q=C0((j)=>j===B||j.startsWith(B+"."),(j)=>{if(Kh(j))return;if(Z8(C,j)===void 0)return;let _=y1(w1,j);l.push({path:j,value:_}),g()});i.push(q)}return{disconnect(){for(let w of i)x0(w);i.length=0,C.clear(),l.length=0,y.disconnect()}}}var l6="1.7.0";function t(y){return Object.assign(U1,y),U1}function a5(y){return j1("boxedProxy","boxedProxy is deprecated, please use tosi() instead"),t(y)}var Fh=new FinalizationRegistry((y)=>{y()});function Oh(y,x){let h=R8();U1[h]=y;let C=U1[h],l=()=>{delete l1[h]};if(x)Fh.register(x,l);return[C,l]}function i6(y,x=!1){if(x)return j1("xinProxy-boxed","xinProxy(..., true) is deprecated; use tosi(...) instead"),a5(y);return Object.keys(y).forEach((h)=>{l1[h]=y[h]}),l1}var Wh={};async function m5(y,x){let h=await x(y,{Color:X,Component:F,elements:G,svgElements:l4,mathML:E8,varDefault:P,vars:z,xin:l1,boxed:U1,xinProxy:i6,boxedProxy:a5,tosi:t,makeComponent:m5,bind:d1,on:N2,version:l6}),{type:C}=h;C.preferredTagName=y;let l=h.lightStyleSpec??h.styleSpec;if(l)C.lightStyleSpec=l;let i={type:C,creator:C.elementCreator()};return Wh[y]=i,i}var k4={":host":{display:"none"}},u0={},Qh=(y)=>import(y);class g4 extends F{static preferredTagName="tosi-blueprint";static lightStyleSpec=k4;static initAttributes={tag:"anon-elt",src:"",property:"default"};loaded;blueprintLoaded=(y)=>{};async packaged(){let{tag:y,src:x,property:h}=this,C=`${y}.${h}:${x}`;if(!this.loaded){if(u0[C]===void 0)u0[C]=Qh(x).then((l)=>{let i=l[h];return m5(y,i)});else console.log(`using cached ${y} with signature ${C}`);try{this.loaded=await u0[C]}catch(l){throw delete u0[C],l}this.blueprintLoaded(this.loaded)}return this.loaded}}var Xh=g4.elementCreator();class t5 extends F{static preferredTagName="tosi-loader";static lightStyleSpec=k4;allLoaded=()=>{};async load(){let y=Array.from(this.querySelectorAll("tosi-blueprint, xin-blueprint")).filter((h)=>h.src),x=await Promise.allSettled(y.map((h)=>h.packaged()));for(let h=0;h<x.length;h++){let C=x[h];if(C.status==="rejected")console.error(`<tosi-loader> failed to load blueprint from "${y[h].src}":`,C.reason)}this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var $h=t5.elementCreator();class k6 extends g4{static preferredTagName="xin-blueprint";static lightStyleSpec=k4;constructor(){super();j1("xin-blueprint","<xin-blueprint> is deprecated. Use <tosi-blueprint> instead.")}}var Yh=k6.elementCreator();class g6 extends F{static preferredTagName="xin-loader";static lightStyleSpec=k4;allLoaded=()=>{};constructor(){super();j1("xin-loader","<xin-loader> is deprecated. Use <tosi-loader> instead.")}async load(){let y=Array.from(this.querySelectorAll("xin-blueprint")).filter((h)=>h.src),x=await Promise.allSettled(y.map((h)=>h.packaged()));for(let h=0;h<x.length;h++){let C=x[h];if(C.status==="rejected")console.error(`<xin-loader> failed to load blueprint from "${y[h].src}":`,C.reason)}this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var Nh=g6.elementCreator();var e5={};class J2 extends F{static preferredTagName="tosi-ab";static set conditions(y){Object.assign(e5,y);for(let x of[...J2.instances])x.queueRender()}static initAttributes={condition:"",not:!1};static instances=new Set;connectedCallback(){super.connectedCallback(),J2.instances.add(this)}disconnectedCallback(){super.disconnectedCallback(),J2.instances.delete(this)}render(){if(this.condition!==""&&(this.not?e5[this.condition]!==!0:e5[this.condition]===!0))this.toggleAttribute("hidden",!1);else this.toggleAttribute("hidden",!0)}}var Jh=J2.elementCreator();var w4={};function b1(y,x){if(w4[y]===void 0){if(x!==void 0){let C=globalThis[x];w4[y]=Promise.resolve({[x]:C})}let h=G.script({src:y});document.head.append(h),w4[y]=new Promise((C)=>{h.onload=()=>C(globalThis)})}return w4[y]}var y3={};function B4(y){if(y3[y]===void 0){let x=G.link({rel:"stylesheet",type:"text/css",href:y});document.head.append(x),y3[y]=new Promise((h)=>{x.onload=h})}return y3[y]}var j2={blueprint:'<svg class="color" viewBox="0 0 24 24"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10.5,14.5 C10.5,14.5,7.5,15.5,7.5,17.5 C7.5,19.5,10.5,19.5,10.5,19.5"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M18.5,14.5 C18.5,14.5,21.5,15.5,21.5,17.5 C21.5,19.5,18.5,19.5,18.5,19.5"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M7,5.09 C7,3.94,7.9,3,9,3 C9,3,20,3,20,3 C21.1,3,22,3.94,22,5.09 C22,5.09,22,12.41,22,12.41 C22,13.56,21.1,14.5,20,14.5 C20,14.5,9,14.5,9,14.5 C7.9,14.5,7,13.56,7,12.41 C7,12.41,7,5.09,7,5.09 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14.5,5.5 C14.5,5.5,14.5,11.5,14.5,11.5"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16.5,7.5 C16.5,7.5,16.5,8.5,16.5,8.5"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.5,7.5 C12.5,7.5,12.5,8.5,12.5,8.5"/><g/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M18.5,21.5 C18.5,21.5,17.5,20.5,17.5,20.5 C17.5,20.5,16.5,21.5,16.5,21.5"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.5,21.5 C12.5,21.5,11.5,20.5,11.5,20.5 C11.5,20.5,10.5,21.5,10.5,21.5"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10.5,14.5 C10.5,14.5,18.5,14.5,18.5,14.5 C18.5,14.5,18.5,19.5,18.5,19.5 C18.5,19.5,10.5,19.5,10.5,19.5 C10.5,19.5,10.5,14.5,10.5,14.5 z"/><g><g><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14,16.5 C14,16.5,16,16.5,16,16.5 C16,16.5,14.53,19.5,14.53,19.5"/><path style="fill:#5e78ca;fill-rule:evenodd;stroke:none;" d="M3.59,8.5 C3.59,8.5,12.59,8.5,12.59,8.5 C12.59,8.5,14.53,19.5,14.53,19.5 C14.53,19.5,5.53,19.5,5.53,19.5 C5.53,19.5,3.59,8.5,3.59,8.5 z"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.59,8.5 C12.59,8.5,11.12,11.5,11.12,11.5 C11.12,11.5,2.12,11.5,2.12,11.5 C2.12,11.5,3.59,8.5,3.59,8.5"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.59,8.5 C12.59,8.5,14.53,19.5,14.53,19.5"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M4.12,11.5 C4.12,11.5,5.53,19.5,5.53,19.5"/></g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M9.24,12.5 C10.75,12.5,12.2,13.73,12.46,15.24 C12.46,15.24,12.46,15.24,12.46,15.24 C12.68,16.49,11.85,17.5,10.6,17.5 C10.6,17.5,10.55,17.5,10.55,17.5 C10.17,17.5,9.92,17.81,9.98,18.19 C9.98,18.19,9.98,18.19,9.98,18.19 C10.21,19.47,9.36,20.5,8.08,20.5 C8.08,20.5,6.39,20.5,6.39,20.5 C5.1,20.5,3.87,19.45,3.64,18.16 C3.64,18.16,3.12,15.21,3.12,15.21 C2.86,13.71,3.86,12.5,5.35,12.5 C5.35,12.5,9.24,12.5,9.24,12.5 z"/></g></g></svg> ',earth:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#a3d9ff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7,13.46 C5.1,16.52,4,20.13,4,24 C4,31.81,8.47,38.57,15,41.87 C15,41.87,15,31,15,31 C15,31,9,29,9,29 C9,29,9,19,9,19 C9,19,7,15,7,15 C7,15,7,13.46,7,13.46 z"/><path style="fill:#a3d9ff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M18.4,4.79 C20.18,4.28,22.06,4,24,4 C27.57,4,30.92,4.93,33.82,6.57 C33.82,6.57,29,13,29,13 C29,13,31,19,31,19 C31,19,37,21,37,21 C37,21,39,29,39,29 C39,29,37.35,38.89,37.35,38.89 C33.81,42.07,29.13,44,24,44 C21.03,44,18.22,43.35,15.69,42.2 C15.69,42.2,27,29,27,29 C27,29,27,25,27,25 C27,25,21,23,21,23 C21,23,15,19,15,19 C15,19,11,19,11,19 C11,19,11,13,11,13 C11,13,13,11,13,11 C13,11,15,15,15,15 C15,15,17,15,17,15 C17,15,17,9,17,9 C17,9,18.4,4.79,18.4,4.79 z"/><path style="fill:#274e42;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M18.4,4.79 C18.4,4.79,17,9,17,9 C17,9,17,15,17,15 C17,15,15,15,15,15 C15,15,13,11,13,11 C13,11,11,13,11,13 C11,13,11,19,11,19 C11,19,15,19,15,19 C15,19,21,23,21,23 C21,23,27,25,27,25 C27,25,27,29,27,29 C27,29,15.69,42.2,15.69,42.2 C15.46,42.09,15.23,41.98,15,41.87 C15,41.87,15,31,15,31 C15,31,9,29,9,29 C9,29,9,19,9,19 C9,19,7,15,7,15 C7,15,7,13.46,7,13.46 C9.57,9.32,13.62,6.19,18.4,4.79 z"/><path style="fill:#274e42;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M33.82,6.57 C33.82,6.57,29,13,29,13 C29,13,31,19,31,19 C31,19,37,21,37,21 C37,21,39,29,39,29 C39,29,37.35,38.89,37.35,38.89 C41.43,35.23,44,29.91,44,24 C44,16.52,39.9,10,33.82,6.57 z"/></g></g></g></svg> ',cmy:'<svg class="color filled" viewBox="0 0 24 24"><g><g><path style="fill:#00ff00;fill-rule:evenodd;" d="M12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C6.37,11.85,7.87,13.42,9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 z"/><path style="fill:#0000ff;fill-rule:evenodd;" d="M12,10.88 C13.1,10.01,14.49,9.5,16,9.5 C16.78,9.5,17.53,9.64,18.22,9.89 C17.63,11.85,16.13,13.42,14.22,14.11 C13.83,12.81,13.04,11.69,12,10.88 C12,10.88,12,10.88,12,10.88 z"/><path style="fill:#000000;fill-rule:evenodd;" d="M9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 C13.04,11.69,13.83,12.81,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#ff0000;fill-rule:evenodd;" d="M9.78,14.11 C9.6,14.71,9.5,15.34,9.5,16 C9.5,18.08,10.48,19.93,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#02fefe;fill-rule:evenodd;" d="M5.78,9.89 C5.6,9.29,5.5,8.66,5.5,8 C5.5,4.41,8.41,1.5,12,1.5 C15.59,1.5,18.5,4.41,18.5,8 C18.5,8.66,18.4,9.29,18.22,9.89 C17.53,9.64,16.78,9.5,16,9.5 C14.49,9.5,13.1,10.01,12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#fffe00;fill-rule:evenodd;" d="M5.78,9.89 C3.28,10.8,1.5,13.19,1.5,16 C1.5,19.59,4.41,22.5,8,22.5 C9.51,22.5,10.9,21.99,12,21.12 C10.48,19.93,9.5,18.08,9.5,16 C9.5,15.34,9.6,14.71,9.78,14.11 C7.87,13.42,6.37,11.85,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#ff00ff;fill-rule:evenodd;" d="M18.22,9.89 C20.72,10.8,22.5,13.19,22.5,16 C22.5,19.59,19.59,22.5,16,22.5 C14.49,22.5,13.1,21.99,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C16.13,13.42,17.63,11.85,18.22,9.89 z"/></g></g></svg> ',rgb:'<svg class="color filled" viewBox="0 0 24 24"><g><g><path style="fill:#ff00ff;fill-rule:evenodd;" d="M12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C6.37,11.85,7.87,13.42,9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 z"/><path style="fill:#ffff00;fill-rule:evenodd;" d="M12,10.88 C13.1,10.01,14.49,9.5,16,9.5 C16.78,9.5,17.53,9.64,18.22,9.89 C17.63,11.85,16.13,13.42,14.22,14.11 C13.83,12.81,13.04,11.69,12,10.88 C12,10.88,12,10.88,12,10.88 z"/><path style="fill:#ffffff;fill-rule:evenodd;" d="M9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 C13.04,11.69,13.83,12.81,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#00ffff;fill-rule:evenodd;" d="M9.78,14.11 C9.6,14.71,9.5,15.34,9.5,16 C9.5,18.08,10.48,19.93,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#ff0000;fill-rule:evenodd;" d="M5.78,9.89 C5.6,9.29,5.5,8.66,5.5,8 C5.5,4.41,8.41,1.5,12,1.5 C15.59,1.5,18.5,4.41,18.5,8 C18.5,8.66,18.4,9.29,18.22,9.89 C17.53,9.64,16.78,9.5,16,9.5 C14.49,9.5,13.1,10.01,12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#0000ff;fill-rule:evenodd;" d="M5.78,9.89 C3.28,10.8,1.5,13.19,1.5,16 C1.5,19.59,4.41,22.5,8,22.5 C9.51,22.5,10.9,21.99,12,21.12 C10.48,19.93,9.5,18.08,9.5,16 C9.5,15.34,9.6,14.71,9.78,14.11 C7.87,13.42,6.37,11.85,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#00ff00;fill-rule:evenodd;" d="M18.22,9.89 C20.72,10.8,22.5,13.19,22.5,16 C22.5,19.59,19.59,22.5,16,22.5 C14.49,22.5,13.1,21.99,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C16.13,13.42,17.63,11.85,18.22,9.89 z"/></g></g></svg> ',xrColor:'<svg class="color filled" viewBox="0 0 40 24"><g><g><g><path style="fill:#000000;fill-rule:evenodd;" d="M20,2 C19.99,2,19.98,2,19.98,2 C8.39,2,2,3.61,2,12 C2,18.41,5.32,22,10.54,22 C15.77,22,17.37,17.85,19.98,17.85 C19.98,17.85,19.99,17.85,20,17.85 C20.01,17.85,20.02,17.85,20.02,17.85 C22.63,17.85,24.23,22,29.46,22 C34.68,22,38,18.41,38,12 C38,3.61,31.61,2,20.02,2 C20.02,2,20.01,2,20,2 C20,2,20,2,20,2 z"/></g><path style="fill:#fbed21;fill-rule:evenodd;" d="M12.2,19.84 C15.79,19.39,17.07,16.46,19.07,16.46 C19.07,16.46,19.08,16.46,19.09,16.46 C19.09,16.46,19.1,16.46,19.11,16.46 C19.44,16.46,19.75,16.54,20.06,16.68 C20.37,16.54,20.68,16.46,21.01,16.46 C21.02,16.46,21.02,16.46,21.03,16.46 C21.04,16.46,21.04,16.46,21.05,16.46 C23.05,16.46,24.33,19.39,27.92,19.84 C31.66,19.4,33.98,16.5,33.98,11.62 C33.98,4.91,29.04,3.44,20.06,3.35 C11.07,3.44,6.14,4.91,6.14,11.62 C6.14,16.5,8.46,19.4,12.2,19.84 z"/><path style="fill:#8cc63f;fill-rule:evenodd;" d="M12.2,19.84 C12.52,19.87,12.86,19.89,13.21,19.89 C16.86,19.89,18.37,17.43,20.06,16.68 C19.75,16.54,19.44,16.46,19.11,16.46 C19.1,16.46,19.09,16.46,19.09,16.46 C19.08,16.46,19.07,16.46,19.07,16.46 C17.07,16.46,15.79,19.39,12.2,19.84 z"/><path style="fill:#8cc63f;fill-rule:evenodd;" d="M20.06,3.35 C20.37,3.35,20.69,3.35,21.01,3.35 C21.02,3.35,21.02,3.35,21.03,3.35 C21.03,3.35,21.03,3.35,21.03,3.35 C21.04,3.35,21.04,3.35,21.05,3.35 C30.64,3.35,35.92,4.68,35.92,11.62 C35.92,16.92,33.18,19.89,28.86,19.89 C28.53,19.89,28.22,19.87,27.92,19.84 C31.66,19.4,33.98,16.5,33.98,11.62 C33.98,4.91,29.04,3.44,20.06,3.35 C20.06,3.35,20.06,3.35,20.06,3.35 z"/><path style="fill:#ff1c23;fill-rule:evenodd;" d="M20.06,16.68 C21.74,17.43,23.25,19.89,26.91,19.89 C27.26,19.89,27.59,19.87,27.92,19.84 C24.33,19.39,23.05,16.46,21.05,16.46 C21.04,16.46,21.04,16.46,21.03,16.46 C21.02,16.46,21.02,16.46,21.01,16.46 C20.68,16.46,20.37,16.54,20.06,16.68 z"/><path style="fill:#ff1c23;fill-rule:evenodd;" d="M12.2,19.84 C11.9,19.87,11.59,19.89,11.26,19.89 C6.94,19.89,4.19,16.92,4.19,11.62 C4.19,4.68,9.48,3.35,19.07,3.35 C19.07,3.35,19.08,3.35,19.09,3.35 C19.09,3.35,19.09,3.35,19.09,3.35 C19.09,3.35,19.1,3.35,19.11,3.35 C19.43,3.35,19.75,3.35,20.06,3.35 C11.07,3.44,6.14,4.91,6.14,11.62 C6.14,16.5,8.46,19.4,12.2,19.84 z"/></g><g><path style="fill:#8cc63e;fill-rule:nonzero;" d="M22.55,8.63 C22.55,9.05,22.55,9.46,22.55,9.88 C22.54,10.25,22.85,10.56,23.2,10.55 C23.54,10.56,23.85,10.25,23.85,9.88 C23.85,9.46,23.85,9.05,23.85,8.63 C23.85,8.26,23.54,7.95,23.2,7.96 C22.85,7.95,22.54,8.26,22.55,8.63 z"/><path style="fill:#8cc63e;fill-rule:nonzero;" d="M17.32,8.63 C17.32,9.05,17.32,9.46,17.32,9.88 C17.31,10.25,17.62,10.56,17.97,10.55 C18.31,10.56,18.62,10.25,18.62,9.88 C18.62,9.46,18.62,9.05,18.62,8.63 C18.62,8.26,18.31,7.95,17.97,7.96 C17.62,7.95,17.31,8.26,17.32,8.63 z"/><path style="fill:#8cc63e;fill-rule:nonzero;" d="M19.99,4.39 C19.99,8.09,19.99,11.8,19.99,15.5 C19.99,15.87,20.3,16.18,20.64,16.17 C20.99,16.18,21.3,15.87,21.29,15.5 C21.29,11.8,21.29,8.09,21.29,4.39 C21.3,4.02,20.99,3.71,20.64,3.72 C20.3,3.71,19.99,4.02,19.99,4.39 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M21.43,8.63 C21.43,9.05,21.43,9.46,21.43,9.88 C21.42,10.25,21.73,10.56,22.08,10.55 C22.42,10.56,22.73,10.25,22.73,9.88 C22.73,9.46,22.73,9.05,22.73,8.63 C22.73,8.26,22.42,7.95,22.08,7.96 C21.73,7.95,21.42,8.26,21.43,8.63 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M16.2,8.63 C16.2,9.05,16.2,9.46,16.2,9.88 C16.19,10.25,16.5,10.56,16.85,10.55 C17.19,10.56,17.5,10.25,17.5,9.88 C17.5,9.46,17.5,9.05,17.5,8.63 C17.5,8.26,17.19,7.95,16.85,7.96 C16.5,7.95,16.19,8.26,16.2,8.63 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M18.87,4.39 C18.87,8.09,18.87,11.8,18.87,15.5 C18.87,15.87,19.18,16.18,19.52,16.17 C19.86,16.18,20.18,15.87,20.17,15.5 C20.17,11.8,20.17,8.09,20.17,4.39 C20.18,4.02,19.86,3.71,19.52,3.72 C19.18,3.71,18.87,4.02,18.87,4.39 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M21.97,8.63 C21.97,9.05,21.97,9.46,21.97,9.88 C21.97,10.25,22.28,10.56,22.62,10.55 C22.97,10.56,23.28,10.25,23.27,9.88 C23.27,9.46,23.27,9.05,23.27,8.63 C23.28,8.26,22.97,7.95,22.62,7.96 C22.28,7.95,21.97,8.26,21.97,8.63 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M16.74,8.63 C16.74,9.05,16.74,9.46,16.74,9.88 C16.74,10.25,17.05,10.56,17.39,10.55 C17.74,10.56,18.05,10.25,18.04,9.88 C18.04,9.46,18.04,9.05,18.04,8.63 C18.05,8.26,17.74,7.95,17.39,7.96 C17.05,7.95,16.74,8.26,16.74,8.63 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M19.41,4.39 C19.41,8.09,19.41,11.8,19.41,15.5 C19.41,15.87,19.72,16.18,20.07,16.17 C20.41,16.18,20.72,15.87,20.72,15.5 C20.72,11.8,20.72,8.09,20.72,4.39 C20.72,4.02,20.41,3.71,20.07,3.72 C19.72,3.71,19.41,4.02,19.41,4.39 z"/></g></g></svg> ',tosiFavicon:'<svg class="color" viewBox="0 0 48 48"><g><g><path style="fill:#ed247b;fill-rule:evenodd;stroke:none;" d="M1,9 C1,4.58,4.58,1,9,1 C9,1,39,1,39,1 C43.42,1,47,4.58,47,9 C47,9,47,39,47,39 C47,43.42,43.42,47,39,47 C39,47,9,47,9,47 C4.58,47,1,43.42,1,39 C1,39,1,9,1,9 z"/><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16,29 C16,29,10,31,10,35 C10,39,16,39,16,39"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32,29 C32,29,38,31,38,35 C38,39,32,39,32,39"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9,10.18 C9,7.87,10.79,6,13,6 C13,6,35,6,35,6 C37.21,6,39,7.87,39,10.18 C39,10.18,39,24.82,39,24.82 C39,27.13,37.21,29,35,29 C35,29,13,29,13,29 C10.79,29,9,27.13,9,24.82 C9,24.82,9,10.18,9,10.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24,11 C24,11,24,23,24,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28,15 C28,15,28,17,28,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,15 C20,15,20,17,20,17"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32,43 C32,43,30,41,30,41 C30,41,28,43,28,43"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,43 C20,43,18,41,18,41 C18,41,16,43,16,43"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16,29 C16,29,32,29,32,29 C32,29,32,39,32,39 C32,39,16,39,16,39 C16,39,16,29,16,29 z"/></g></g></g></svg> ',tosiPlatform:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#3ea9f5;fill-rule:evenodd;stroke:none;" d="M23.97,47 C23.97,47,39,47,39,47 C43.42,47,47,43.42,47,39 C47,39,47,9,47,9 C47,4.58,43.42,1,39,1 C39,1,9,1,9,1 C4.58,1,1,4.58,1,9 C1,9,1,39,1,39 C1,41.64,2.28,43.98,4.25,45.44 C4.09,44.82,4,44.17,4,43.5 C4,39.36,7.36,36,11.5,36 C15.14,36,18.18,38.6,18.86,42.05 C19.07,42.02,19.28,42,19.5,42 C21.99,42,24,44.01,24,46.5 C24,46.67,23.99,46.84,23.97,47 z"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:none;" d="M4.25,45.44 C4.09,44.82,4,44.17,4,43.5 C4,39.36,7.36,36,11.5,36 C15.14,36,18.18,38.6,18.86,42.05 C19.07,42.02,19.28,42,19.5,42 C21.99,42,24,44.01,24,46.5 C24,46.67,23.99,46.84,23.97,47 C23.97,47,9,47,9,47 C7.22,47,5.58,46.42,4.25,45.44 z"/></g><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M35,35 C35,35,32.17,35,32.17,35 C32.17,35,32.17,37.83,32.17,37.83"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31,39 C31,39,28.17,39,28.17,39 C28.17,39,28.17,41.83,28.17,41.83"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7.48,16 C4.45,16,2,18.45,2,21.48 C2,21.48,2,21.48,2,21.48 C2,23.98,4.02,26,6.52,26 C6.52,26,6.62,26,6.62,26 C7.38,26,8,26.62,8,27.38 C8,27.38,8,27.38,8,27.38 C8,29.93,10.07,32,12.62,32 C12.62,32,16,32,16,32 C18.58,32,20.68,29.91,20.68,27.32 C20.68,27.32,20.68,21.42,20.68,21.42 C20.68,18.43,18.25,16,15.26,16 C15.26,16,7.48,16,7.48,16 z"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,29 C17,29,33,29,33,29 C33,29,33,29,33,29 C33,34.52,28.52,39,23,39 C23,39,23,39,23,39 C19.69,39,17,36.31,17,33 C17,33,17,29,17,29 z"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M40.52,16 C43.55,16,46,18.45,46,21.48 C46,21.48,46,21.48,46,21.48 C46,23.98,43.98,26,41.48,26 C41.48,26,41.38,26,41.38,26 C40.62,26,40,26.62,40,27.38 C40,27.38,40,27.38,40,27.38 C40,29.93,37.93,32,35.38,32 C35.38,32,32,32,32,32 C29.42,32,27.32,29.91,27.32,27.32 C27.32,27.32,27.32,21.42,27.32,21.42 C27.32,18.43,29.75,16,32.74,16 C32.74,16,40.52,16,40.52,16 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M6,10.18 C6,7.87,7.79,6,10,6 C10,6,32,6,32,6 C34.21,6,36,7.87,36,10.18 C36,10.18,36,24.82,36,24.82 C36,27.13,34.21,29,32,29 C32,29,10,29,10,29 C7.79,29,6,27.13,6,24.82 C6,24.82,6,10.18,6,10.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M21,11 C21,11,21,23,21,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M25,15 C25,15,25,17,25,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,15 C17,15,17,17,17,17"/></g></g></g></svg> ',tosiUi:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M3,33 C3,31.9,3.9,31,5,31 C5,31,43,31,43,31 C44.1,31,45,31.9,45,33 C45,33,45,43,45,43 C45,44.1,44.1,45,43,45 C43,45,5,45,5,45 C3.9,45,3,44.1,3,43 C3,43,3,33,3,33 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#ed247b;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7,35 C7,35,7,36.34,7,38 C7,39.66,8.34,41,10,41 C11.66,41,13,39.66,13,38 C13,36.34,13,35,13,35"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#ed247b;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,35 C17,35,17,41,17,41"/></g><g><path style="fill:#ed247b;fill-rule:evenodd;stroke:none;" d="M38,33 C40.76,33,43,35.24,43,38 C43,40.76,40.76,43,38,43 C35.24,43,33,40.76,33,38 C33,35.24,35.24,33,38,33 z"/><path style="fill:#ed247b;fill-rule:nonzero;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M40,36 C40,36,36,40,36,40"/><path style="fill:#ed247b;fill-rule:nonzero;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M36,36 C36,36,40,40,40,40"/></g></g><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M15.97,21.01 C15.97,21.01,9.97,23.01,9.97,27.01 C9.97,31.01,15.97,31.01,15.97,31.01"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31.97,21.01 C31.97,21.01,37.97,23.01,37.97,27.01 C37.97,31.01,31.97,31.01,31.97,31.01"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31,33 C31,33,29.49,31,29.49,31 C29.49,31,27.97,33,27.97,33"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M19.97,33 C19.97,33,17.97,31,17.97,31 C17.97,31,15.97,33,15.97,33"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M15.97,21 C15.97,21,31.97,21,31.97,21 C31.97,21,31.97,31,31.97,31 C31.97,31,15.97,31,15.97,31 C15.97,31,15.97,21,15.97,21 z"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9,7.18 C9,4.87,10.79,3,13,3 C13,3,35.02,3,35.02,3 C37.23,3,39.03,4.87,39.03,7.18 C39.03,7.18,39.03,21.82,39.03,21.82 C39.03,24.13,37.23,26,35.02,26 C35.02,26,13,26,13,26 C10.79,26,9,24.13,9,21.82 C9,21.82,9,7.18,9,7.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24,11 C24,11,24,23,24,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28,15 C28,15,28,17,28,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,15 C20,15,20,17,20,17"/></g></g></g></svg> ',tosiXr:'<svg class="color" viewBox="0 0 24 24"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M8,14.25 C8,14.25,5,15.25,5,17.25 C5,19.25,8,19.25,8,19.25"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16,14.25 C16,14.25,19,15.25,19,17.25 C19,19.25,16,19.25,16,19.25"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M4.5,4.85 C4.5,3.69,5.4,2.75,6.5,2.75 C6.5,2.75,17.5,2.75,17.5,2.75 C18.61,2.75,19.5,3.69,19.5,4.85 C19.5,4.85,19.5,12.16,19.5,12.16 C19.5,13.32,18.61,14.25,17.5,14.25 C17.5,14.25,6.5,14.25,6.5,14.25 C5.4,14.25,4.5,13.32,4.5,12.16 C4.5,12.16,4.5,4.85,4.5,4.85 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12,5.25 C12,5.25,12,11.25,12,11.25"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14,7.25 C14,7.25,14,8.25,14,8.25"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10,7.25 C10,7.25,10,8.25,10,8.25"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16,21.25 C16,21.25,15,20.25,15,20.25 C15,20.25,14,21.25,14,21.25"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10,21.25 C10,21.25,9,20.25,9,20.25 C9,20.25,8,21.25,8,21.25"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M8,14.25 C8,14.25,16,14.25,16,14.25 C16,14.25,16,19.25,16,19.25 C16,19.25,8,19.25,8,19.25 C8,19.25,8,14.25,8,14.25 z"/><path style="fill:#ff7bac;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-width:1;" d="M12,4 C12,4,11.99,4,11.99,4 C6.19,4,3,4.73,3,8.5 C3,11.39,4.66,13,7.27,13 C9.88,13,10.68,11.13,11.99,11.13 C11.99,11.13,12,11.13,12,11.13 C12,11.13,12.01,11.13,12.01,11.13 C13.32,11.13,14.12,13,16.73,13 C19.34,13,21,11.39,21,8.5 C21,4.73,17.81,4,12.01,4 C12.01,4,12,4,12,4 C12,4,12,4,12,4 z"/></g></svg> ',tosi:'<svg class="color" viewBox="0 0 48 48"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M38.35,31.7 C39.78,34.37,38.78,37.69,36.11,39.13 C36.11,39.13,36.11,39.13,36.11,39.13 C33.92,40.31,31.18,39.48,29.99,37.29 C29.99,37.29,29.95,37.2,29.95,37.2 C29.58,36.53,28.75,36.27,28.08,36.64 C28.08,36.64,28.08,36.64,28.08,36.64 C25.83,37.84,23.03,37,21.82,34.76 C21.82,34.76,20.22,31.78,20.22,31.78 C18.99,29.5,19.85,26.67,22.12,25.44 C22.12,25.44,27.32,22.65,27.32,22.65 C29.96,21.23,33.24,22.22,34.66,24.85 C34.66,24.85,38.35,31.7,38.35,31.7 z"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M10.65,31.7 C9.22,34.37,10.22,37.69,12.89,39.13 C12.89,39.13,12.89,39.13,12.89,39.13 C15.08,40.31,17.82,39.48,19.01,37.29 C19.01,37.29,19.05,37.2,19.05,37.2 C19.42,36.53,20.25,36.27,20.92,36.64 C20.92,36.64,20.92,36.64,20.92,36.64 C23.17,37.84,25.97,37,27.18,34.76 C27.18,34.76,28.78,31.78,28.78,31.78 C30.01,29.5,29.15,26.67,26.88,25.44 C26.88,25.44,21.68,22.65,21.68,22.65 C19.04,21.23,15.76,22.22,14.34,24.85 C14.34,24.85,10.65,31.7,10.65,31.7 z"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32.5,43 C32.5,43,30.5,41,30.5,41 C30.5,41,28.5,43,28.5,43"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20.5,43 C20.5,43,18.5,41,18.5,41 C18.5,41,16.5,43,16.5,43"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16.5,29 C16.5,29,32.5,29,32.5,29 C32.5,29,32.5,36,32.5,36 C32.5,37.66,31.16,39,29.5,39 C29.5,39,19.5,39,19.5,39 C17.84,39,16.5,37.66,16.5,36 C16.5,36,16.5,29,16.5,29 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9.5,10.18 C9.5,7.87,11.29,6,13.5,6 C13.5,6,35.5,6,35.5,6 C37.71,6,39.5,7.87,39.5,10.18 C39.5,10.18,39.5,24.82,39.5,24.82 C39.5,27.13,37.71,29,35.5,29 C35.5,29,13.5,29,13.5,29 C11.29,29,9.5,27.13,9.5,24.82 C9.5,24.82,9.5,10.18,9.5,10.18 z"/><g><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24.5,11 C24.5,11,24.5,23,24.5,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28.5,15 C28.5,15,28.5,17,28.5,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20.5,15 C20.5,15,20.5,17,20.5,17"/></g></g></g></svg> ',discord:'<svg class="filled" version="1" viewBox="0 0 1013 768"><path d="M858 64c-60-28-131-51-204-64l-5-1c-8 14-17 32-25 51l-1 4c-35-6-75-9-116-9s-81 3-120 9l4-1c-9-22-18-40-28-57l1 3c-79 14-149 36-214 67l5-2c-132 196-168 387-150 575v0c73 55 158 99 250 127l6 2c19-26 38-55 53-85l2-3c-33-13-62-27-89-43l2 1c7-5 14-11 21-16 75 36 163 57 256 57s181-21 260-59l-4 2c7 6 14 11 21 16-25 15-53 29-83 40l-4 1c17 34 36 63 56 90l-1-2c98-30 183-74 259-130l-2 2c21-218-36-407-151-575zM338 524c-50 0-91-45-91-101s40-102 91-102 92 46 91 102-40 101-91 101zM675 524c-50 0-91-45-91-101s40-102 91-102 92 46 91 102-40 101-91 101z"></path></svg> ',facebook:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path></svg>',game:'<svg class="filled" version="1" viewBox="0 0 704 512"><path d="M528 97v-1h-336c-88 0-160 72-160 160s72 160 160 160c52 0 99-25 128-64h64c29 39 76 64 128 64 88 0 160-72 160-160 0-83-63-151-144-159zM288 288h-64v64h-64v-64h-64v-64h64v-64h64v64h64v64zM480 288c-18 0-32-14-32-32s14-32 32-32 32 14 32 32-14 32-32 32zM576 288c-18 0-32-14-32-32 0-18 14-32 32-32s32 14 32 32c0 18-14 32-32 32z"></path></svg> ',google:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M256 0c-141 0-256 115-256 256s115 256 256 256 256-115 256-256-115-256-256-256zM260 448c-106 0-192-86-192-192s86-192 192-192c52 0 95 19 129 50l-52 50c-14-14-39-30-77-30-66 0-119 54-119 121s54 121 119 121c76 0 105-55 109-83h-109v-66h181c2 10 3 19 3 32 0 110-73 188-184 188z"></path></svg> ',npm:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M0 0v512h512v-512h-512zM416 416h-64v-256h-96v256h-160v-320h320v320z"></path></svg> ',youtube:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon></svg>',blog:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10.02 C21,10.02,21,15,21,15 C21,15.53,20.79,16.04,20.41,16.41 C20.04,16.79,19.53,17,19,17 C19,17,7,17,7,17 C5.67,18.33,4.33,19.67,3,21 C3,21,3,5,3,5 C3,4.47,3.21,3.96,3.59,3.59 C3.96,3.21,4.47,3,5,3 C8.53,3,10.49,3,14.02,3"/><path style="" d="M19,2 C19.54,1.46,20.32,1.25,21.05,1.45 C21.78,1.65,22.35,2.22,22.55,2.95 C22.75,3.68,22.54,4.46,22,5 C22,5,15.5,11.5,15.5,11.5 C14.17,11.83,12.83,12.17,11.5,12.5 C11.83,11.17,12.17,9.83,12.5,8.5 C15.67,5.33,15.83,5.17,19,2 z"/><path style="" d="M14.6,3"/><path style="" d="M21,8.77"/><path style="" d="M7,7 C7,7,10,7,10,7"/><path style="" d="M7,10 C7,10,9,10,9,10"/></g></svg> ',bug:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M8,6 C8,3.79,9.79,2,12,2 C14.21,2,16,3.79,16,6 C16,6,8,6,8,6 z"/><path style="" d="M20,7 C20,7,18,9,18,9"/><path style="" d="M20,19 C20,19,18,17,18,17"/><path style="" d="M21,13 C21,13,18,13,18,13"/><path style="" d="M16.44,9 C17.3,9,18,9.7,18,10.56 C18,10.56,18,15,18,15 C18,18.31,15.31,21,12,21 C8.69,21,6,18.31,6,15 C6,15,6,10.56,6,10.56 C6,9.7,6.7,9,7.56,9 C7.56,9,16.44,9,16.44,9 z"/><path style="" d="M4,7 C4,7,6,9,6,9"/><path style="" d="M4,19 C4,19,6,17,6,17"/><path style="" d="M3,13 C3,13,6,13,6,13"/><path style="" d="M12,12 C12,12,12,17,12,17"/></g></svg> ',activity:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>',airplay:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon></svg>',alertCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',alertOctagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',alertTriangle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',alignCenter:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="10" x2="6" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="18" y1="18" x2="6" y2="18"></line></svg>',alignJustify:'<svg class="stroked" viewBox="0 0 24 24"><line x1="21" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="3" y2="18"></line></svg>',alignLeft:'<svg class="stroked" viewBox="0 0 24 24"><line x1="17" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="17" y1="18" x2="3" y2="18"></line></svg>',alignRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="21" y1="10" x2="7" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="7" y2="18"></line></svg>',anchor:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="5" r="3"></circle><line x1="12" y1="22" x2="12" y2="8"></line><path d="M5 12H2a10 10 0 0 0 20 0h-3"></path></svg>',aperture:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="14.31" y1="8" x2="20.05" y2="17.94"></line><line x1="9.69" y1="8" x2="21.17" y2="8"></line><line x1="7.38" y1="12" x2="13.12" y2="2.06"></line><line x1="9.69" y1="16" x2="3.95" y2="6.06"></line><line x1="14.31" y1="16" x2="2.83" y2="16"></line><line x1="16.62" y1="12" x2="10.88" y2="21.94"></line></svg>',archive:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line></svg>',arrowUpRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline></svg>',atSign:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"></path></svg>',award:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline></svg>',barChart2:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="20" x2="18" y2="10"></line><line x1="12" y1="20" x2="12" y2="4"></line><line x1="6" y1="20" x2="6" y2="14"></line></svg>',barChart:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="20" x2="12" y2="10"></line><line x1="18" y1="20" x2="18" y2="4"></line><line x1="6" y1="20" x2="6" y2="16"></line></svg>',batteryCharging:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 18H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3.19M15 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-3.19"></path><line x1="23" y1="13" x2="23" y2="11"></line><polyline points="11 6 7 12 13 12 9 18"></polyline></svg>',battery:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="6" width="18" height="12" rx="2" ry="2"></rect><line x1="23" y1="13" x2="23" y2="11"></line></svg>',bellOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M13.73 21a2 2 0 0 1-3.46 0"></path><path d="M18.63 13A17.89 17.89 0 0 1 18 8"></path><path d="M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14"></path><path d="M18 8a6 6 0 0 0-9.33-5"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',bell:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>',bluetooth:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6.5 6.5 17.5 17.5 12 23 12 1 17.5 6.5 6.5 17.5"></polyline></svg>',bold:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path><path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path></svg>',bookOpen:'<svg class="stroked" viewBox="0 0 24 24"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path></svg>',book:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg>',bookmark:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path></svg>',box:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',briefcase:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path></svg>',calendar:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>',cameraOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M21 21H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3m3-3h6l2 3h4a2 2 0 0 1 2 2v9.34m-7.72-2.06a4 4 0 1 1-5.56-5.56"></path></svg>',camera:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle></svg>',cast:'<svg class="stroked" viewBox="0 0 24 24"><path d="M2 16.1A5 5 0 0 1 5.9 20M2 12.05A9 9 0 0 1 9.95 20M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"></path><line x1="2" y1="20" x2="2.01" y2="20"></line></svg>',checkCircle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>',checkSquare:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 11 12 14 22 4"></polyline><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></svg>',check:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"></polyline></svg>',chrome:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="21.17" y1="8" x2="12" y2="8"></line><line x1="3.95" y1="6.06" x2="8.54" y2="14"></line><line x1="10.88" y1="21.94" x2="15.46" y2="14"></line></svg>',circle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle></svg>',clipboard:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect></svg>',clock:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>',cloudDrizzle:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="19" x2="8" y2="21"></line><line x1="8" y1="13" x2="8" y2="15"></line><line x1="16" y1="19" x2="16" y2="21"></line><line x1="16" y1="13" x2="16" y2="15"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="12" y1="15" x2="12" y2="17"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>',cloudLightning:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 16.9A5 5 0 0 0 18 7h-1.26a8 8 0 1 0-11.62 9"></path><polyline points="13 11 9 17 15 17 11 23"></polyline></svg>',cloudOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.61 16.95A5 5 0 0 0 18 10h-1.26a8 8 0 0 0-7.05-6M5 5a8 8 0 0 0 4 15h9a5 5 0 0 0 1.7-.3"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',cloudRain:'<svg class="stroked" viewBox="0 0 24 24"><line x1="16" y1="13" x2="16" y2="21"></line><line x1="8" y1="13" x2="8" y2="21"></line><line x1="12" y1="15" x2="12" y2="23"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>',cloudSnow:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20 17.58A5 5 0 0 0 18 8h-1.26A8 8 0 1 0 4 16.25"></path><line x1="8" y1="16" x2="8.01" y2="16"></line><line x1="8" y1="20" x2="8.01" y2="20"></line><line x1="12" y1="18" x2="12.01" y2="18"></line><line x1="12" y1="22" x2="12.01" y2="22"></line><line x1="16" y1="16" x2="16.01" y2="16"></line><line x1="16" y1="20" x2="16.01" y2="20"></line></svg>',cloud:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"></path></svg>',code:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg>',codepen:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"></polygon><line x1="12" y1="22" x2="12" y2="15.5"></line><polyline points="22 8.5 12 15.5 2 8.5"></polyline><polyline points="2 15.5 12 8.5 22 15.5"></polyline><line x1="12" y1="2" x2="12" y2="8.5"></line></svg>',codesandbox:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="7.5 4.21 12 6.81 16.5 4.21"></polyline><polyline points="7.5 19.79 7.5 14.6 3 12"></polyline><polyline points="21 12 16.5 14.6 16.5 19.79"></polyline><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',coffee:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 8h1a4 4 0 0 1 0 8h-1"></path><path d="M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z"></path><line x1="6" y1="1" x2="6" y2="4"></line><line x1="10" y1="1" x2="10" y2="4"></line><line x1="14" y1="1" x2="14" y2="4"></line></svg>',columns:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18"></path></svg>',command:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"></path></svg>',compass:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"></polygon></svg>',copy:'<svg class="stroked" viewBox="0 0 24 24"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>',cpu:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line><line x1="9" y1="20" x2="9" y2="23"></line><line x1="15" y1="20" x2="15" y2="23"></line><line x1="20" y1="9" x2="23" y2="9"></line><line x1="20" y1="14" x2="23" y2="14"></line><line x1="1" y1="9" x2="4" y2="9"></line><line x1="1" y1="14" x2="4" y2="14"></line></svg>',creditCard:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line></svg>',crop:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6.13 1L6 16a2 2 0 0 0 2 2h15"></path><path d="M1 6.13L16 6a2 2 0 0 1 2 2v15"></path></svg>',crosshair:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="22" y1="12" x2="18" y2="12"></line><line x1="6" y1="12" x2="2" y2="12"></line><line x1="12" y1="6" x2="12" y2="2"></line><line x1="12" y1="22" x2="12" y2="18"></line></svg>',database:'<svg class="stroked" viewBox="0 0 24 24"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path></svg>',delete:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"></path><line x1="18" y1="9" x2="12" y2="15"></line><line x1="12" y1="9" x2="18" y2="15"></line></svg>',disc:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="3"></circle></svg>',divideCircle:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line><circle cx="12" cy="12" r="10"></circle></svg>',divideSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line></svg>',divide:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="6" r="2"></circle><line x1="5" y1="12" x2="19" y2="12"></line><circle cx="12" cy="18" r="2"></circle></svg>',dollarSign:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path></svg>',downloadCloud:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="8 17 12 21 16 17"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29"></path></svg>',download:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>',dribbble:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M8.56 2.75c4.37 6.03 6.02 9.42 8.03 17.72m2.54-15.38c-3.72 4.35-8.94 5.66-16.88 5.85m19.5 1.9c-3.5-.93-6.63-.82-8.94 0-2.58.92-5.01 2.86-7.44 6.32"></path></svg>',droplet:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"></path></svg>',edit2:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>',edit3:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 20h9"></path><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg>',edit:'<svg class="stroked" viewBox="0 0 24 24"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg>',externalLink:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>',eyeOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',eye:'<svg class="stroked" viewBox="0 0 24 24"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>',fastForward:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="13 19 22 12 13 5 13 19"></polygon><polygon points="2 19 11 12 2 5 2 19"></polygon></svg>',feather:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line></svg>',figma:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z"></path><path d="M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z"></path><path d="M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 1 1-7 0z"></path><path d="M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z"></path><path d="M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z"></path></svg>',fileMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="9" y1="15" x2="15" y2="15"></line></svg>',filePlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="18" x2="12" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></svg>',fileText:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>',file:'<svg class="stroked" viewBox="0 0 24 24"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline></svg>',film:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="2.18" ry="2.18"></rect><line x1="7" y1="2" x2="7" y2="22"></line><line x1="17" y1="2" x2="17" y2="22"></line><line x1="2" y1="12" x2="22" y2="12"></line><line x1="2" y1="7" x2="7" y2="7"></line><line x1="2" y1="17" x2="7" y2="17"></line><line x1="17" y1="17" x2="22" y2="17"></line><line x1="17" y1="7" x2="22" y2="7"></line></svg>',filter:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon></svg>',flag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line></svg>',folderMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="9" y1="14" x2="15" y2="14"></line></svg>',folderPlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="12" y1="11" x2="12" y2="17"></line><line x1="9" y1="14" x2="15" y2="14"></line></svg>',folder:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>',framer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 16V9h14V2H5l14 14h-7m-7 0l7 7v-7m-7 0h7"></path></svg>',frown:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M16 16s-1.5-2-4-2-4 2-4 2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',gift:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 12 20 22 4 22 4 12"></polyline><rect x="2" y="7" width="20" height="5"></rect><line x1="12" y1="22" x2="12" y2="7"></line><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path></svg>',gitBranch:'<svg class="stroked" viewBox="0 0 24 24"><line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg>',gitCommit:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line></svg>',gitMerge:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M6 21V9a9 9 0 0 0 9 9"></path></svg>',gitPullRequest:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M13 6h3a2 2 0 0 1 2 2v7"></path><line x1="6" y1="9" x2="6" y2="21"></line></svg>',github:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>',gitlab:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"></path></svg>',globe:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path></svg>',grid:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg>',hardDrive:'<svg class="stroked" viewBox="0 0 24 24"><line x1="22" y1="12" x2="2" y2="12"></line><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><line x1="6" y1="16" x2="6.01" y2="16"></line><line x1="10" y1="16" x2="10.01" y2="16"></line></svg>',hash:'<svg class="stroked" viewBox="0 0 24 24"><line x1="4" y1="9" x2="20" y2="9"></line><line x1="4" y1="15" x2="20" y2="15"></line><line x1="10" y1="3" x2="8" y2="21"></line><line x1="16" y1="3" x2="14" y2="21"></line></svg>',headphones:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 18v-6a9 9 0 0 1 18 0v6"></path><path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"></path></svg>',heart:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>',helpCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',hexagon:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path></svg>',home:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>',image:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>',inbox:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12"></polyline><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path></svg>',info:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="7.75"></line></svg>',instagram:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line></svg>',italic:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="4" x2="10" y2="4"></line><line x1="14" y1="20" x2="5" y2="20"></line><line x1="15" y1="4" x2="9" y2="20"></line></svg>',key:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.78 7.78 5.5 5.5 0 0 1 7.78-7.78zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"></path></svg>',layers:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline></svg>',layout:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="3" y1="9" x2="21" y2="9"></line><line x1="9" y1="21" x2="9" y2="9"></line></svg>',lifeBuoy:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="4.93" y1="4.93" x2="9.17" y2="9.17"></line><line x1="14.83" y1="14.83" x2="19.07" y2="19.07"></line><line x1="14.83" y1="9.17" x2="19.07" y2="4.93"></line><line x1="14.83" y1="9.17" x2="18.36" y2="5.64"></line><line x1="4.93" y1="19.07" x2="9.17" y2="14.83"></line></svg>',link2:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg>',link:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>',linkedin:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle></svg>',list:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line></svg>',loader:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>',lock:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg> ',logIn:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line></svg>',logOut:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>',mail:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>',mapPin:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>',map:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"></polygon><line x1="8" y1="2" x2="8" y2="18"></line><line x1="16" y1="6" x2="16" y2="22"></line></svg>',maximize2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>',maximize:'<svg class="stroked" viewBox="0 0 24 24"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path></svg>',meh:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="8" y1="15" x2="16" y2="15"></line><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',menu:'<svg class="stroked" viewBox="0 0 24 24"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>',messageCircle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path></svg>',messageSquare:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>',micOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>',mic:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>',minimize2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>',minimize:'<svg class="stroked" viewBox="0 0 24 24"><path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path></svg>',minusCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="8" y1="12" x2="16" y2="12"></line></svg>',minusSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line></svg>',minus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line></svg>',monitor:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg>',moon:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>',moreHorizontal:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle></svg>',moreVertical:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"></circle><circle cx="12" cy="5" r="1"></circle><circle cx="12" cy="19" r="1"></circle></svg>',mousePointer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg>',move:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="5 9 2 12 5 15"></polyline><polyline points="9 5 12 2 15 5"></polyline><polyline points="15 19 12 22 9 19"></polyline><polyline points="19 9 22 12 19 15"></polyline><line x1="2" y1="12" x2="22" y2="12"></line><line x1="12" y1="2" x2="12" y2="22"></line></svg>',music:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle></svg>',navigation2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 19 21 12 17 5 21 12 2"></polygon></svg>',navigation:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="3 11 22 2 13 21 11 13 3 11"></polygon></svg>',octagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon></svg>',package:'<svg class="stroked" viewBox="0 0 24 24"><line x1="16.5" y1="9.4" x2="7.5" y2="4.21"></line><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',paperclip:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"></path></svg>',pauseCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="10" y1="15" x2="10" y2="9"></line><line x1="14" y1="15" x2="14" y2="9"></line></svg>',pause:'<svg class="stroked" viewBox="0 0 24 24"><rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect></svg>',penTool:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 19l7-7 3 3-7 7-3-3z"></path><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"></path><path d="M2 2l7.59 7.59"></path><circle cx="11" cy="11" r="2"></circle></svg>',percent:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="5" x2="5" y2="19"></line><circle cx="6.5" cy="6.5" r="2.5"></circle><circle cx="17.5" cy="17.5" r="2.5"></circle></svg>',phoneCall:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneForwarded:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="19 1 23 5 19 9"></polyline><line x1="15" y1="5" x2="23" y2="5"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneIncoming:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 2 16 8 22 8"></polyline><line x1="23" y1="1" x2="16" y2="8"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneMissed:'<svg class="stroked" viewBox="0 0 24 24"><line x1="23" y1="1" x2="17" y2="7"></line><line x1="17" y1="1" x2="23" y2="7"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"></path><line x1="23" y1="1" x2="1" y2="23"></line></svg>',phoneOutgoing:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 7 23 1 17 1"></polyline><line x1="16" y1="8" x2="23" y2="1"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phone:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',pieChart:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21.21 15.89A10 10 0 1 1 8 2.83"></path><path d="M22 12A10 10 0 0 0 12 2v10z"></path></svg>',playCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polygon points="10 8 16 12 10 16 10 8"></polygon></svg>',play:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>',plusCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>',plusSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>',plus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>',pocket:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 3h16a2 2 0 0 1 2 2v6a10 10 0 0 1-10 10A10 10 0 0 1 2 11V5a2 2 0 0 1 2-2z"></path><polyline points="8 10 12 14 16 10"></polyline></svg>',power:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line></svg>',printer:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect></svg>',radio:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="2"></circle><path d="M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14"></path></svg>',repeat:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path></svg>',rewind:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 19 2 12 11 5 11 19"></polygon><polygon points="22 19 13 12 22 5 22 19"></polygon></svg>',cornerDownRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 10 20 15 15 20"></polyline><path d="M4 4v7a4 4 0 0 0 4 4h12"></path></svg>',cornerRightDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="10 15 15 20 20 15"></polyline><path d="M4 4h7a4 4 0 0 1 4 4v12"></path></svg>',cornerRightUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="10 9 15 4 20 9"></polyline><path d="M4 20h7a4 4 0 0 0 4-4V4"></path></svg>',cornerUpRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 14 20 9 15 4"></polyline><path d="M4 20v-7a4 4 0 0 1 4-4h12"></path></svg>',refreshCw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg>',rotateCw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path></svg>',skipForward:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" y1="5" x2="19" y2="19"></line></svg>',toggleRight:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="16" cy="12" r="3"></circle></svg>',rss:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>',save:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg>',scissors:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="6" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><line x1="20" y1="4" x2="8.12" y2="15.88"></line><line x1="14.47" y1="14.48" x2="20" y2="20"></line><line x1="8.12" y1="8.12" x2="12" y2="12"></line></svg>',search:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',send:'<svg class="stroked" viewBox="0 0 24 24"><line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg>',server:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="8" rx="2" ry="2"></rect><rect x="2" y="14" width="20" height="8" rx="2" ry="2"></rect><line x1="6" y1="6" x2="6.01" y2="6"></line><line x1="6" y1="18" x2="6.01" y2="18"></line></svg>',settings:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M4.78,6.75 C6.02,7.26,7.26,6.02,6.75,4.78 C6.75,4.78,6.24,3.57,6.24,3.57 C5.93,2.8,6.29,1.92,7.06,1.6 C7.06,1.6,8.14,1.15,8.14,1.15 C8.91,0.83,9.79,1.2,10.11,1.96 C10.11,1.96,10.61,3.18,10.61,3.18 C11.12,4.42,12.88,4.42,13.39,3.18 C13.39,3.18,13.89,1.97,13.89,1.97 C14.21,1.2,15.09,0.83,15.86,1.15 C15.86,1.15,16.94,1.6,16.94,1.6 C17.71,1.92,18.08,2.8,17.76,3.57 C17.76,3.57,17.15,5.03,17.15,5.03 C16.64,6.27,17.88,7.51,19.12,7 C19.12,7,20.51,6.42,20.51,6.42 C21.28,6.1,22.16,6.47,22.47,7.23 C22.47,7.23,22.92,8.32,22.92,8.32 C23.24,9.09,22.88,9.96,22.11,10.28 C22.11,10.28,21.07,10.71,21.07,10.71 C19.83,11.23,19.83,12.98,21.07,13.49 C21.07,13.49,22.04,13.89,22.04,13.89 C22.8,14.21,23.17,15.09,22.85,15.86 C22.85,15.86,22.4,16.94,22.4,16.94 C22.08,17.71,21.2,18.07,20.43,17.76 C20.43,17.76,19.22,17.25,19.22,17.25 C17.98,16.74,16.74,17.98,17.25,19.22 C17.25,19.22,17.76,20.43,17.76,20.43 C18.07,21.2,17.71,22.08,16.94,22.4 C16.94,22.4,15.86,22.85,15.86,22.85 C15.09,23.17,14.21,22.8,13.89,22.04 C13.89,22.04,13.39,20.82,13.39,20.82 C12.88,19.58,11.12,19.58,10.61,20.82 C10.61,20.82,10.11,22.04,10.11,22.04 C9.79,22.8,8.91,23.17,8.14,22.85 C8.14,22.85,7.06,22.4,7.06,22.4 C6.29,22.08,5.93,21.2,6.24,20.44 C6.24,20.44,6.64,19.47,6.64,19.47 C7.16,18.23,5.92,16.99,4.68,17.5 C4.68,17.5,3.64,17.93,3.64,17.93 C2.87,18.25,1.99,17.89,1.67,17.12 C1.67,17.12,1.22,16.04,1.22,16.04 C0.91,15.27,1.27,14.39,2.04,14.07 C2.04,14.07,3.43,13.49,3.43,13.49 C4.67,12.98,4.67,11.23,3.43,10.71 C3.43,10.71,1.96,10.11,1.96,10.11 C1.2,9.79,0.83,8.91,1.15,8.14 C1.15,8.14,1.6,7.06,1.6,7.06 C1.92,6.29,2.8,5.93,3.57,6.24 C3.57,6.24,4.78,6.75,4.78,6.75 z M14.31,11.04 C14.84,12.32,14.23,13.78,12.96,14.31 C11.68,14.84,10.22,14.23,9.69,12.96 C9.16,11.68,9.77,10.22,11.04,9.69 C12.32,9.16,13.78,9.77,14.31,11.04 z"/></g></svg> ',share2:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg>',share:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path><polyline points="16 6 12 2 8 6"></polyline><line x1="12" y1="2" x2="12" y2="15"></line></svg>',shieldOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19.69 14a6.9 6.9 0 0 0 .31-2V5l-8-3-3.16 1.18"></path><path d="M4.73 4.73L4 5v7c0 6 8 10 8 10a20.29 20.29 0 0 0 5.62-4.38"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',shield:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>',shoppingBag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path><line x1="3" y1="6" x2="21" y2="6"></line><path d="M16 10a4 4 0 0 1-8 0"></path></svg>',shoppingCart:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>',shuffle:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 3 21 3 21 8"></polyline><line x1="4" y1="20" x2="21" y2="3"></line><polyline points="21 16 21 21 16 21"></polyline><line x1="15" y1="15" x2="21" y2="21"></line><line x1="4" y1="4" x2="9" y2="9"></line></svg>',sidebar:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="3" x2="9" y2="21"></line></svg>',slack:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14.5 10c-.83 0-1.5-.67-1.5-1.5v-5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5z"></path><path d="M20.5 10H19V8.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path><path d="M9.5 14c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5S8 21.33 8 20.5v-5c0-.83.67-1.5 1.5-1.5z"></path><path d="M3.5 14H5v1.5c0 .83-.67 1.5-1.5 1.5S2 16.33 2 15.5 2.67 14 3.5 14z"></path><path d="M14 14.5c0-.83.67-1.5 1.5-1.5h5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-5c-.83 0-1.5-.67-1.5-1.5z"></path><path d="M15.5 19H14v1.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path><path d="M10 9.5C10 8.67 9.33 8 8.5 8h-5C2.67 8 2 8.67 2 9.5S2.67 11 3.5 11h5c.83 0 1.5-.67 1.5-1.5z"></path><path d="M8.5 5H10V3.5C10 2.67 9.33 2 8.5 2S7 2.67 7 3.5 7.67 5 8.5 5z"></path></svg>',slash:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line></svg>',sliders:'<svg class="stroked" viewBox="0 0 24 24"><line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line></svg>',smartphone:'<svg class="stroked" viewBox="0 0 24 24"><rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>',smile:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',speaker:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><circle cx="12" cy="14" r="4"></circle><line x1="12" y1="6" x2="12.01" y2="6"></line></svg>',square:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect></svg>',star:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>',stopCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><rect x="9" y="9" width="6" height="6"></rect></svg>',sun:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>',sunrise:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="2" x2="12" y2="9"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="8 6 12 2 16 6"></polyline></svg>',sunset:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="9" x2="12" y2="2"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="16 5 12 9 8 5"></polyline></svg>',table:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"></path></svg>',tablet:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>',tag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7.01" y2="7"></line></svg>',target:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="6"></circle><circle cx="12" cy="12" r="2"></circle></svg>',terminal:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line></svg>',thermometer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z"></path></svg>',tool:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path></svg>',trash2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>',trash:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>',trello:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><rect x="7" y="7" width="3" height="9"></rect><rect x="14" y="7" width="3" height="5"></rect></svg>',trendingDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 18 13.5 8.5 8.5 13.5 1 6"></polyline><polyline points="17 18 23 18 23 12"></polyline></svg>',trendingUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 6 13.5 15.5 8.5 10.5 1 18"></polyline><polyline points="17 6 23 6 23 12"></polyline></svg>',triangle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path></svg>',truck:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="3" width="15" height="13"></rect><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"></polygon><circle cx="5.5" cy="18.5" r="2.5"></circle><circle cx="18.5" cy="18.5" r="2.5"></circle></svg>',tv:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline></svg>',twitch:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path></svg>',twitter:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>',type:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 7 4 4 20 4 20 7"></polyline><line x1="9" y1="20" x2="15" y2="20"></line><line x1="12" y1="4" x2="12" y2="20"></line></svg>',umbrella:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 12a11.05 11.05 0 0 0-22 0zm-5 7a3 3 0 0 1-6 0v-7"></path></svg>',underline:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3"></path><line x1="4" y1="21" x2="20" y2="21"></line></svg>',unlock:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 9.9-1"></path></svg>',thumbsUp:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>',arrowRightCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line></svg>',arrowRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>',chevronRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 18 15 12 9 6"></polyline></svg>',chevronsRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline></svg>',uploadCloud:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 16 12 12 8 16"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16"></polyline></svg>',upload:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>',userCheck:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><polyline points="17 11 19 13 23 9"></polyline></svg>',userMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="23" y1="11" x2="17" y2="11"></line></svg>',userPlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="20" y1="8" x2="20" y2="14"></line><line x1="23" y1="11" x2="17" y2="11"></line></svg>',userX:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="18" y1="8" x2="23" y2="13"></line><line x1="23" y1="8" x2="18" y2="13"></line></svg>',user:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>',users:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>',videoOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',video:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect></svg>',voicemail:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="5.5" cy="11.5" r="4.5"></circle><circle cx="18.5" cy="11.5" r="4.5"></circle><line x1="5.5" y1="16" x2="18.5" y2="16"></line></svg>',volume1:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>',volume2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>',volumeX:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><line x1="23" y1="9" x2="17" y2="15"></line><line x1="17" y1="9" x2="23" y2="15"></line></svg>',volume:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon></svg>',watch:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="7"></circle><polyline points="12 9 12 12 13.5 13.5"></polyline><path d="M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83"></path></svg>',wifiOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M16.72 11.06A10.94 10.94 0 0 1 19 12.55"></path><path d="M5 12.55a10.94 10.94 0 0 1 5.17-2.39"></path><path d="M10.71 5.05A16 16 0 0 1 22.58 9"></path><path d="M1.42 9a15.91 15.91 0 0 1 4.7-2.88"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>',wifi:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 12.55a11 11 0 0 1 14.08 0"></path><path d="M1.42 9a16 16 0 0 1 21.16 0"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>',wind:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2"></path></svg>',xCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',xOctagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',xSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="9" x2="15" y2="15"></line><line x1="15" y1="9" x2="9" y2="15"></line></svg>',x:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',zapOff:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="12.41 6.75 13 2 10.57 4.92"></polyline><polyline points="18.57 12.91 21 10 15.66 10"></polyline><polyline points="8 8 3 14 12 14 11 22 16 16"></polyline><line x1="1" y1="1" x2="23" y2="23"></line></svg>',zap:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>',zoomIn:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',zoomOut:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',fontBold:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M13.5,11 C15.71,11,17.5,12.68,17.5,14.75 C17.5,16.82,15.71,18.5,13.5,18.5 C13.5,18.5,8.5,18.5,8.5,18.5 C8.5,18.5,8.5,3.5,8.5,3.5 C8.5,3.5,13.5,3.5,13.5,3.5 C15.71,3.5,17.5,5.18,17.5,7.25 C17.5,9.32,15.71,11,13.5,11 C13.5,11,13.5,11,13.5,11 z"/><path style="" d="M13.5,11 C13.5,11,8.5,11,8.5,11"/><path style="" d="M12.5,11 C14.71,11,16.5,12.68,16.5,14.75 C16.5,16.82,14.71,18.5,12.5,18.5 C12.5,18.5,7.5,18.5,7.5,18.5 C7.5,18.5,7.5,3.5,7.5,3.5 C7.5,3.5,12.5,3.5,12.5,3.5 C14.71,3.5,16.5,5.18,16.5,7.25 C16.5,9.32,14.71,11,12.5,11 C12.5,11,12.5,11,12.5,11 z"/><path style="" d="M12.5,11 C12.5,11,7.5,11,7.5,11"/></g></svg> ',fontItalic:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M17,4.5 C17,4.5,13,4.5,13,4.5"/><path style="" d="M11,19.5 C11,19.5,7,19.5,7,19.5"/><path style="" d="M15,4.5 C15,4.5,9,19.5,9,19.5"/></g></svg> ',fontUnderline:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M7.5,3.5 C7.5,3.5,7.5,10.74,7.5,13.5 C7.5,16.26,9.74,18.5,12.5,18.5 C15.26,18.5,17.5,16.26,17.5,13.5 C17.5,10.74,17.5,3.5,17.5,3.5"/><path style="" d="M7.5,21.5 C7.5,21.5,17.5,21.5,17.5,21.5"/></g></svg> ',indent:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10 C21,10,8,10,8,10"/><path style="" d="M21,6 C21,6,8,6,8,6"/><path style="" d="M21,14 C21,14,8,14,8,14"/><path style="" d="M21,18 C21,18,8,18,8,18"/><path style="" d="M2.5,9 C2.5,9,5.5,12,5.5,12 C5.5,12,2.5,15,2.5,15"/></g></svg> ',listBullet:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,6 C21,6,10,6,10,6"/><path style="" d="M21,12 C21,12,10,12,10,12"/><path style="" d="M21,18 C21,18,10,18,10,18"/><path style="" d="M5.5,5 C6.05,5,6.5,5.45,6.5,6 C6.5,6.55,6.05,7,5.5,7 C4.95,7,4.5,6.55,4.5,6 C4.5,5.45,4.95,5,5.5,5 z"/><path style="" d="M5.5,11 C6.05,11,6.5,11.45,6.5,12 C6.5,12.55,6.05,13,5.5,13 C4.95,13,4.5,12.55,4.5,12 C4.5,11.45,4.95,11,5.5,11 z"/><path style="" d="M5.5,17 C6.05,17,6.5,17.45,6.5,18 C6.5,18.55,6.05,19,5.5,19 C4.95,19,4.5,18.55,4.5,18 C4.5,17.45,4.95,17,5.5,17 z"/></g></svg> ',listNumber:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,6 C21,6,10,6,10,6"/><path style="" d="M21,12 C21,12,10,12,10,12"/><path style="" d="M21,18 C21,18,10,18,10,18"/><path style="" d="M4.5,5 C4.5,5,5.5,4,5.5,4 C5.5,4,5.5,8,5.5,8"/><path style="" d="M4.5,10 C4.5,10,5.5,10,5.5,10 C6.05,10,6.5,10.45,6.5,11 C6.5,11,6.5,11,6.5,11 C6.5,11.55,6.05,12,5.5,12 C5.5,12,5.5,12,5.5,12 C4.95,12,4.5,12.45,4.5,13 C4.5,13,4.5,14,4.5,14 C4.5,14,6.5,14,6.5,14"/><path style="" d="M4.5,16 C4.5,16,5.5,16,5.5,16 C6.05,16,6.5,16.45,6.5,17 C6.5,17,6.5,17,6.5,17 C6.5,17.55,6.05,18,5.5,18 C5.5,18,4.5,18,4.5,18 C4.5,18,5.5,18,5.5,18 C6.05,18,6.5,18.45,6.5,19 C6.5,19,6.5,19,6.5,19 C6.5,19.55,6.05,20,5.5,20 C5.5,20,4.5,20,4.5,20"/></g></svg> ',outdent:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10 C21,10,8,10,8,10"/><path style="" d="M21,6 C21,6,8,6,8,6"/><path style="" d="M21,14 C21,14,8,14,8,14"/><path style="" d="M21,18 C21,18,8,18,8,18"/><path style="" d="M5.5,9 C5.5,9,2.5,12,2.5,12 C2.5,12,5.5,15,5.5,15"/></g></svg> ',pin:'<svg class="stroked" viewBox="0 0 24 24"><g><g><path style="" d="M16.23,4.73 C16.23,4.73,19.42,7.9,19.42,7.9 C19.42,7.9,14.46,15.69,14.46,15.69 C14.46,15.69,8.45,9.68,8.45,9.68 C8.45,9.68,16.23,4.73,16.23,4.73 z"/><path style="" d="M20.84,9.32 C20.84,9.32,14.47,2.95,14.47,2.95"/><path style="" d="M16.6,17.8 C16.6,17.8,6.7,7.9,6.7,7.9"/><path style="" d="M10.23,11.44 C10.23,11.44,5.99,18.51,5.99,18.51 C5.99,18.51,13.06,14.27,13.06,14.27"/></g></g></svg> ',resize:'<svg class="stroked" version="1.1" viewBox="0, 0, 24, 24"><g><path d="M9,3 L3,3 L3,9"/><path d="M15,21 L21,21 L21,15"/><path d="M3,3 L10,10"/><path d="M21,21 L14,14"/></g></svg> ',sortAscending:'<svg class="stroked" viewBox="0 0 24 24"><g><path d="M16.5,10.5 C16.5,10.5,7.5,10.5,7.5,10.5"/><path d="M14.5,6.5 C14.5,6.5,9.5,6.5,9.5,6.5"/><path d="M18.5,14.5 C18.5,14.5,5.5,14.5,5.5,14.5"/><path d="M20.5,18.5 C20.5,18.5,3.5,18.5,3.5,18.5"/></g></svg> ',sortDescending:'<svg class="stroked" viewBox="0 0 24 24"><g><path d="M16.5,14.5 C16.5,14.5,7.5,14.5,7.5,14.5"/><path d="M14.5,18.5 C14.5,18.5,9.5,18.5,9.5,18.5"/><path d="M18.5,10.5 C18.5,10.5,5.5,10.5,5.5,10.5"/><path d="M20.5,6.5 C20.5,6.5,3.5,6.5,3.5,6.5"/></g></svg> ',cornerDownLeft:"cornerDownRight0f",cornerLeftDown:"cornerRightDown0f",cornerLeftUp:"cornerRightUp0f",cornerUpLeft:"cornerUpRight0f",refreshCcw:"refreshCw0f",rotateCcw:"rotateCw0f",skipBack:"skipForward0f",toggleLeft:"toggleRight0f",thumbsDown:"thumbsUp1f",arrowDownCircle:"arrowRightCircle90r",arrowLeftCircle:"arrowRightCircle180r",arrowUpCircle:"arrowRightCircle270r",arrowDown:"arrowRight90r",arrowLeft:"arrowRight180r",arrowUp:"arrowRight270r",chevronDown:"chevronRight90r",chevronLeft:"chevronRight180r",chevronUp:"chevronRight270r",chevronsDown:"chevronsRight90r",chevronsLeft:"chevronsRight180r",chevronsUp:"chevronsRight270r",arrowDownRight:"arrowUpRight90r",arrowDownLeft:"arrowUpRight180r",arrowUpLeft:"arrowUpRight270r"};var Zh=(y)=>{Object.assign(j2,y)},g0=(y,x,h,C)=>{let l=y instanceof SVGElement?[y]:Array.from(y.querySelectorAll("svg"));if(l.length>1){let w=y.dataset?.icon||"unknown";console.error(`svg2DataUrl: composite icon "${w}" cannot be serialized as a data URL, rendering base icon only`)}let i=l[0];i.setAttribute("xmlns","http://www.w3.org/2000/svg");for(let w of i.querySelectorAll("path, polygon, line, circle, rect, ellipse, polyline")){if(x!==void 0)w.setAttribute("fill",x);if(h!==void 0)w.setAttribute("stroke",h);if(C!==void 0)w.setAttribute("stroke-width",String(C))}let k=i.querySelectorAll("[style]");i.removeAttribute("style");for(let w of[...k]){let B=w.style;if(B.fill)w.setAttribute("fill",X.fromCss(B.fill).html);if(B.stroke)w.setAttribute("stroke",X.fromCss(B.stroke).html);if(B.strokeWidth)w.setAttribute("strokeWidth",B.strokeWidth);if(B.strokeLinecap)w.setAttribute("strokeLinecap",B.strokeLinecap);if(B.strokeLinejoin)w.setAttribute("strokeLinejoin",B.strokeLinejoin);w.removeAttribute("style")}return`url(data:image/svg+xml;charset=UTF-8,${encodeURIComponent(i.outerHTML)})`},ph=(y)=>/\d$/.test(y)?y+"_":y,h3=[{prefix:/^spin(_?\d+)/,apply(y,x,h){let C=x[1].replace("_","-"),l=360/Math.abs(parseFloat(C)),i=C.startsWith("-")?"reverse":"normal",k=e1(y,[]),g=k;if(g.animate){let w=g.style.transform||"";g.animate([{transform:`${w} rotate(0deg)`},{transform:`${w} rotate(360deg)`}],{duration:l*1000,iterations:1/0,direction:i})}return C3(y,h,k)}},{prefix:"un",apply:(y)=>`slash25o$${y}75s75o`},{prefix:"check",apply:(y)=>`check75o_00aa00S$${y}75s50o`},{prefix:"cancel",apply:(y)=>`x75o_cc0000S$${y}75s50o`},{prefix:"search",apply:(y)=>`search80s30x30y$${y}50o`}],vh=0;function w6(y,x){let h=G.div();h.innerHTML=y;let C=h.querySelector("svg"),l=C.querySelectorAll("[id]");if(l.length>0){let g=new Map;for(let q of l){let j=q.id,_=`tosi_svg_id_${++vh}`;g.set(j,_),q.id=_}let w=C.innerHTML,B=w;for(let[q,j]of g){let _=q.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");B=B.replace(new RegExp(`url\\(#${_}\\)`,"g"),`url(#${j})`).replace(new RegExp(`href="#${_}"`,"g"),`href="#${j}"`)}if(B!==w)C.innerHTML=B}let i=new Set(C.classList);i.add("tosi-icon");let k=l4.svg({class:Array.from(i).join(" "),viewBox:C.getAttribute("viewBox")},...x,...C.children);if(k.style.strokeWidth=P.tosiIconStrokeWidth("2px"),i.has("filled"))k.style.stroke="none",k.style.fill="currentColor";else if(i.has("stroked"))k.style.stroke=P.tosiIconStroke("currentColor"),k.style.fill=P.tosiIconFill("none");else k.style.stroke=P.tosiIconStroke("currentColor"),k.style.fill=P.tosiIconFill("currentColor");return k.style.height=P.tosiIconSize("16px"),k}function C3(y,x,...h){let C=G.span({class:"tosi-icon-composite",dataIcon:y,style:{display:"inline-flex",position:"relative",pointerEvents:"none"}},...h);for(let l of x)if(l&&typeof l==="object"&&!("nodeType"in l)){let i=l;if(i.style&&typeof i.style==="object")Object.assign(C.style,i.style);if(i.class)C.classList.add(...String(i.class).split(" "))}return C}function Rh(y){let x=j2;if(x[y])return!0;let h=x3(y);return h!=null&&!!x[h.baseName]}function B6(y,x){for(let h of h3){let C,l;if(h.prefix instanceof RegExp){let k=new RegExp(h.prefix.source+"(.+)$"),g=y.match(k);if(!g)continue;C=g[g.length-1],C=C[0].toLowerCase()+C.slice(1),l=g}else{if(!y.startsWith(h.prefix)||y.length<=h.prefix.length)continue;C=y[h.prefix.length].toLowerCase()+y.slice(h.prefix.length+1),l=h.prefix}if(!Rh(C))continue;let i=h.apply(ph(C),l,x);if(typeof i==="string")return e1(i,x);if(i)return i}return null}var Dh=10,Hh=/(?:(?<=[a-zA-Z_])(?:_?\d+[osxyr]|[01]f|\d+W)|_[a-zA-Z0-9]+[FS])+$/;function x3(y){let x=y.match(Hh);if(!x)return null;let h=y.slice(0,x.index);if(!h)return null;if(h.endsWith("_"))h=h.slice(0,-1);if(!h)return null;if(!j2[h]){if(!h3.some((w)=>{if(w.prefix instanceof RegExp)return w.prefix.test(h);return h.startsWith(w.prefix)&&h.length>w.prefix.length}))return null}let l={},i=x[0].match(/_?\d+[osxyr]|[01]f|_[a-zA-Z0-9]+[FS]|\d+W/g);if(!i)return null;let k=[];for(let g of i){let w=g[g.length-1];if(w==="F"||w==="S"){let B=g.slice(1,-1),j=/^[0-9a-fA-F]{3,8}$/.test(B)?"#"+B:z[B];if(w==="F")l.fill=j;else l.stroke=j}else if(w==="W")l.strokeWidth=g.slice(0,-1);else{let B=parseInt(g.replace("_","-"));switch(w){case"o":l.opacity=String(B/100);break;case"s":k.push(`scale(${B/100})`);break;case"x":k.push(`translateX(${B}%)`);break;case"y":k.push(`translateY(${B}%)`);break;case"r":k.push(`rotate(${B}deg)`);break;case"f":k.push(B===0?"scaleX(-1)":"scaleY(-1)");break}}}if(k.length>0)l.transform=k.join(" "),l.transformOrigin="50% 50%";return{baseName:h,style:l}}function e1(y,x){if(y.endsWith("_"))y=y.slice(0,-1);let h=j2,C=y;for(let k=0;k<Dh;k++){let g=h[C];if(!g)break;if(g.startsWith("<"))return w6(g,x);C=g}if(C!==y){let k=B6(C,x);if(k)return k;let g=x3(C);if(g){let w=e1(g.baseName,x);return Object.assign(w.style,g.style),w}}if(y.includes("$")){let k=y.split("$"),g=e1(k[k.length-1],[]),w=k.slice(0,-1).reverse().map((B)=>{let q=e1(B,[]);return Object.assign(q.style,{position:"absolute",inset:"0",width:"100%",height:"100%"}),q});return C3(y,x,g,...w)}let l=B6(y,x);if(l)return l;let i=x3(y);if(i){let k=e1(i.baseName,x);return Object.assign(k.style,i.style),k}if(y)console.warn(`icon ${y} does not exist`);return w6(j2.square,x)}var O=new Proxy(j2,{get(y,x){return(...h)=>e1(x,h)}});class l3 extends F{static preferredTagName="tosi-icon";static lightStyleSpec={":host":{"--tosi-icon-size":"var(--xin-icon-size, 16px)","--tosi-icon-stroke-width":"var(--xin-icon-stroke-width, var(--icon-stroke-width, 2px))","--tosi-icon-stroke-linejoin":"var(--icon-stroke-linejoin, round)","--tosi-icon-stroke-linecap":"var(--icon-stroke-linecap, round)","--tosi-icon-fill":"var(--xin-icon-fill, var(--icon-fill, none))",display:"inline-flex",verticalAlign:"text-bottom",stroke:"currentColor",strokeWidth:P.tosiIconStrokeWidth("2px"),strokeLinejoin:P.tosiIconStrokeLinejoin("round"),strokeLinecap:P.tosiIconStrokeLinecap("round"),fill:P.tosiIconFill("none"),height:z.tosiIconSize},":host svg, :host .tosi-icon-composite":{height:P.tosiIconSize("16px")}};static initAttributes={icon:"",size:0,fill:"",stroke:"",strokeWidth:1};render(){super.render(),this.textContent="";let y={};if(this.size)y.height=this.size+"px",this.style.setProperty("--tosi-icon-size",`${this.size}px`),this.style.setProperty("--xin-icon-size",`${this.size}px`);if(this.stroke)y.stroke=this.stroke,y.strokeWidth=this.strokeWidth;if(this.fill)y.fill=this.fill;this.append(O[this.icon]({style:y}))}}var bh=l3.elementCreator();var z6=()=>{};function Sh(y,x){if(!x||x.trim()==="transparent")return new y.Color4(0,0,0,0);let h=x.trim().replace(/^#/,"");if(h.length===3)h=h.split("").map((l)=>l+l).join("");if(h.length===6)h+="ff";let C=parseInt(h,16);if(Number.isNaN(C)||h.length!==8)return new y.Color4(0,0,0,1);return new y.Color4((C>>>24&255)/255,(C>>>16&255)/255,(C>>>8&255)/255,(C&255)/255)}class i3 extends F{static preferredTagName="tosi-3d";static initAttributes={src:"",clearColor:"",fov:1,heroLight:!1};babylonReady;BABYLON;static shadowStyleSpec={":host":{display:"block",position:"relative"},":host canvas":{width:"100%",height:"100%"},":host .babylonVRicon":{height:50,width:80,backgroundColor:"transparent",filter:"drop-shadow(0 0 4px #000c)",backgroundImage:g0(O.xrColor()),backgroundPosition:"center",backgroundRepeat:"no-repeat",border:"none",borderRadius:5,borderStyle:"none",outline:"none",transition:"transform 0.125s ease-out"},":host .babylonVRicon:hover":{transform:"scale(1.1)"}};content=G.canvas({part:"canvas"});constructor(){super();this.babylonReady=(async()=>{let{BABYLON:y}=await b1("https://cdn.babylonjs.com/babylon.js","BABYLON");return y})()}scene;engine;sceneCreated=z6;update=z6;_update=()=>{if(this.scene){if(this.update!==void 0)this.update(this,this.BABYLON);if(this.scene.activeCamera!==void 0)this.scene.render()}};handleResize(){if(this.engine)this.engine.resize()}loadScene=async(y,x,h)=>{let{BABYLON:C}=await b1("https://cdn.babylonjs.com/loaders/babylonjs.loaders.min.js","BABYLON");C.SceneLoader.Append(y,x,this.scene,h)};loadUI=async(y)=>{let{BABYLON:x}=await b1("https://cdn.babylonjs.com/gui/babylon.gui.min.js","BABYLON"),h=x.GUI.AdvancedDynamicTexture.CreateFullscreenUI("GUI",!0,this.scene),{snippetId:C,jsonUrl:l,data:i,size:k}=y;if(k)h.idealWidth=k,h.renderAtIdealSize=!0;let g;if(C)g=await h.parseFromSnippetAsync(C);else if(l)g=await h.parseFromURLAsync(l);else if(i)g=h.parseContent(i);else return null;let w=h.getChildren()[0],B=w.children.reduce((q,j)=>{return q[j.name]=j,q},{});return{advancedTexture:h,gui:g,root:w,widgets:B}};connectedCallback(){super.connectedCallback();let{canvas:y}=this.parts;this.babylonReady.then(async(x)=>{this.BABYLON=x;let h=this.clearColor?Sh(x,this.clearColor):null;if(this.engine=new x.Engine(y,!0,h&&h.a<1?{alpha:!0,premultipliedAlpha:!1}:void 0),this.scene=new x.Scene(this.engine),h)this.scene.clearColor=h;if(this.sceneCreated)await this.sceneCreated(this,x);if(this.src){let C=this.src.lastIndexOf("/");await this.loadScene(this.src.slice(0,C+1)||"/",this.src.slice(C+1))}if(this.scene.activeCamera===void 0)new x.ArcRotateCamera("default-camera",-Math.PI/2,Math.PI/2.5,3,new x.Vector3(0,0,0),this.scene).attachControl(this.parts.canvas,!0);if(this.fov&&this.fov!==1&&this.scene.activeCamera)this.scene.activeCamera.fov*=this.fov;if(this.scene.lights.length===0){let C=new x.HemisphericLight("hemi",new x.Vector3(0,1,0),this.scene);C.intensity=0.6}if(this.heroLight){let C=new x.DirectionalLight("hero",new x.Vector3(-1,-2,1),this.scene);C.intensity=0.8}this.engine.runRenderLoop(this._update)})}}var Mh=i3.elementCreator();class Z2 extends F{static preferredTagName="tosi-lottie";static initAttributes={src:"",json:""};content=null;config={renderer:"svg",loop:!0,autoplay:!0};static bodymovinAvailable;animation;static shadowStyleSpec={":host":{width:400,height:400,display:"inline-block"}};_loading=!1;get loading(){return this._loading}constructor(){super();if(Z2.bodymovinAvailable===void 0)Z2.bodymovinAvailable=b1("https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js","bodymovin")}doneLoading=()=>{this._loading=!1};load=({bodymovin:y})=>{if(this._loading=!0,this.config.container=this.shadowRoot!==null?this.shadowRoot:void 0,this.json!=="")this.config.animationData=this.json,delete this.config.path;else if(this.src!=="")delete this.config.animationData,this.config.path=this.src;else console.log("%c<tosi-lottie>%c expected either %cjson%c (animation data) or %csrc% c(url) but found neither.","color: #44f; background: #fff; padding: 0 5px","color: default","color: #44f; background: #fff; padding: 0 5px","color: default","color: #44f; background: #fff; padding: 0 5px","color: default");if(this.animation){this.animation.destroy();let x=this.shadowRoot;if(x!==null)x.querySelector("svg")?.remove()}this.animation=y.loadAnimation(this.config),this.animation.addEventListener("DOMLoaded",this.doneLoading)};render(){super.render(),Z2.bodymovinAvailable.then(this.load).catch((y)=>{console.error(y)})}}var Ih=Z2.elementCreator();var{button:k3,slot:ch,div:z4}=G;class q4 extends F{static preferredTagName="tosi-carousel";static initAttributes={dots:!1,arrows:!1,maxVisibleItems:1,snapDuration:0.25,snapDelay:0.1,loop:!1,auto:0};lastAutoAdvance=Date.now();interval;autoAdvance=()=>{if(this.auto>0&&this.auto*1000<Date.now()-this.lastAutoAdvance)this.forward()};_page=0;get page(){return this._page}set page(y){let{scroller:x,back:h,forward:C}=this.parts;if(this.lastPage<=0)C.disabled=h.disabled=!0,y=0;else y=Math.max(0,Math.min(this.lastPage,y)),y=isNaN(y)?0:y;if(this._page!==y)this._page=isNaN(y)?0:y,this.animateScroll(this._page*x.offsetWidth),h.disabled=this.page<=0&&!this.loop,C.disabled=this.page>=this.lastPage&&!this.loop}get visibleItems(){return[...this.children].filter((y)=>getComputedStyle(y).display!=="none")}get lastPage(){return Math.max(Math.ceil(this.visibleItems.length/(this.maxVisibleItems||1))-1,0)}static shadowStyleSpec={":host":{_carouselIconSize:24,_carouselButtonColor:"#0004",_carouselButtonHoverColor:"#0006",_carouselButtonActiveColor:"#000c",_carouseButtonWidth:48,_carouselDotCurrentColor:"#0008",_carouselDotSize:8,_carouselDotSpacing:z.carouselDotSize,_carouselProgressPadding:12,_carouselDotTransition:"0.125s ease-in-out",display:"flex",flexDirection:"column",position:"relative"},":host:focus":{outline:"none",boxShadow:"none"},":host svg":{height:z.carouselIconSize},":host button":{outline:"none",border:"none",boxShadow:"none",background:"transparent",color:z.carouselButtonColor,padding:0},":host::part(back), :host::part(forward)":{position:"absolute",top:0,bottom:0,width:z.carouseButtonWidth,zIndex:2},":host::part(back)":{left:0},":host::part(forward)":{right:0},":host button:disabled":{opacity:0.5,pointerEvents:"none"},":host button:hover":{color:z.carouselButtonHoverColor},":host button:active":{color:z.carouselButtonActiveColor},":host::part(pager)":{position:"relative"},":host::part(scroller)":{overflow:"auto hidden",position:"relative"},":host::part(grid)":{display:"grid",justifyItems:"center"},":host *::-webkit-scrollbar, *::-webkit-scrollbar-thumb":{display:"none"},":host .dot":{background:z.carouselButtonColor,borderRadius:z.carouselDotSize,height:z.carouselDotSize,width:z.carouselDotSize,transition:z.carouselDotTransition},":host .dot:not(.current):hover":{background:z.carouselButtonHoverColor,height:z.carouselDotSize150,width:z.carouselDotSize150,margin:z.carouselDotSize_25},":host .dot:not(.current):active":{background:z.carouselButtonActiveColor},":host .dot.current":{background:z.carouselDotCurrentColor},":host::part(progress)":{display:"flex",gap:z.carouselDotSpacing,justifyContent:"center",padding:z.carouselProgressPadding}};easing=(y)=>{return Math.sin(y*Math.PI*0.5)};indicateCurrent=()=>{let{scroller:y,progress:x}=this.parts,h=y.scrollLeft/y.offsetWidth;[...x.children].forEach((C,l)=>{C.classList.toggle("current",Math.floor(l/this.maxVisibleItems-h)===0)}),this.lastAutoAdvance=Date.now(),clearTimeout(this.snapTimer),this.snapTimer=setTimeout(this.snapPosition,this.snapDelay*1000)};snapPosition=()=>{let{scroller:y}=this.parts,x=Math.round(y.scrollLeft/y.offsetWidth);if(x!==this.page)this.page=x>this.page?Math.ceil(x):Math.floor(x);this.lastAutoAdvance=Date.now()};back=()=>{this.page=this.page>0?this.page-1:this.lastPage};forward=()=>{this.page=this.page<this.lastPage?this.page+1:0};handleDotClick=(y)=>{let{progress:x}=this.parts,h=[...x.children].indexOf(y.target);if(h>-1)this.page=Math.floor(h/this.maxVisibleItems)};snapTimer;animationFrame;animateScroll(y,x=-1,h=0){cancelAnimationFrame(this.animationFrame);let{scroller:C}=this.parts;if(x===-1){x=C.scrollLeft,h=Date.now(),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(y,x,h)});return}let l=(Date.now()-h)/1000;if(l>=this.snapDuration||Math.abs(C.scrollLeft-y)<2)C.scrollLeft=y,this.animationFrame=null;else C.scrollLeft=x+this.easing(l/this.snapDuration)*(y-x),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(y,x,h)})}content=()=>[z4({part:"pager"},k3({title:"previous slide",part:"back"},O.chevronLeft()),z4({title:"slides",role:"group",part:"scroller"},z4({part:"grid"},ch())),k3({title:"next slide",part:"forward"},O.chevronRight())),z4({title:"choose slide to display",role:"group",part:"progress"})];connectedCallback(){super.connectedCallback(),this.ariaRoleDescription="carousel",this.ariaOrientation="horizontal",this.ariaReadOnly="true";let{back:y,forward:x,scroller:h,progress:C}=this.parts;y.addEventListener("click",this.back),x.addEventListener("click",this.forward),h.addEventListener("scroll",this.indicateCurrent),C.addEventListener("click",this.handleDotClick),this.lastAutoAdvance=Date.now(),this.interval=setInterval(this.autoAdvance,100)}disconnectedCallback(){clearInterval(this.interval)}render(){super.render();let{dots:y,arrows:x,visibleItems:h,lastPage:C}=this,{progress:l,back:i,forward:k,grid:g}=this.parts;h.forEach((w)=>{w.role="group"}),g.style.gridTemplateColumns=`${100/this.maxVisibleItems/(1+this.lastPage)}% `.repeat(h.length).trim(),g.style.width=(1+this.lastPage)*100+"%",l.textContent="",l.append(...h.map((w,B)=>k3({title:`item ${B+1}`,class:"dot"}))),this.indicateCurrent(),l.style.display=y&&C>0?"":"none",i.hidden=k.hidden=!(x&&C>0)}}var sh=q4,q6=q4.elementCreator(),Th=q6;var{div:j6,span:V6}=G;function P6(y,x){let h=y.split(`
12
+ `)},Lx=(y)=>{q1("initVars","initVars is deprecated. Just use _ and __ prefixes instead.");let x={};for(let h of Object.keys(y)){let C=y[h],k=P1(h);x[`--${k}`]=typeof C==="number"&&C!==0?String(C)+"px":C}return x},g0=(y)=>{let x={};for(let h of Object.keys(y)){let C=y[h];if(C instanceof O)x[h]=C.inverseLuminance;else if(typeof C==="string"&&(C.match(/^(#[0-9a-fA-F]{3}|rgba?\(|hsla?\()/)!=null||n8[C.trim().toLowerCase()]!==void 0))x[h]=O.fromCss(C).inverseLuminance}return x},A=new Proxy({},{get(y,x){if(y[x]===void 0){let h="--"+P1(x);y[x]=(C)=>`var(${h}, ${C})`}return y[x]}}),l=new Proxy({},{get(y,x){if(x==="default")return A;if(y[x]==null){x=P1(x);let[,h,,C,k,B]=x.match(/^([-\w]*?)((_)?(\d+)(\w?))?$/)||["",x],w=`--${h}`;if(k!=null){let g=C==null?Number(k)/100:-Number(k)/100;switch(B){case"b":case"s":case"h":case"o":{let z=`--${x}`;O.registerComputedColor(z,w,g,B),y[x]=`var(${z})`}break;case"":y[x]=`calc(var(${w}) * ${g})`;break;default:throw console.error(B),Error(`Unrecognized method ${B} for css variable ${w}`)}}else y[x]=`var(${w})`}return y[x]}});function t8(){let y=(x)=>typeof matchMedia<"u"&&matchMedia(x).matches;return{colorScheme:y("(prefers-color-scheme: dark)")?"dark":"light",contrast:y("(prefers-contrast: more)")?"more":y("(prefers-contrast: less)")?"less":y("(prefers-contrast: custom)")?"custom":"no-preference",reducedMotion:y("(prefers-reduced-motion: reduce)"),reducedTransparency:y("(prefers-reduced-transparency: reduce)"),forcedColors:y("(forced-colors: active)")}}function cx(y){if(typeof matchMedia>"u")return()=>{};let x=["(prefers-color-scheme: dark)","(prefers-contrast: more)","(prefers-contrast: less)","(prefers-contrast: custom)","(prefers-reduced-motion: reduce)","(prefers-reduced-transparency: reduce)","(forced-colors: active)"],h=()=>y(t8()),C=x.map((k)=>matchMedia(k));for(let k of C)k.addEventListener("change",h);return()=>{for(let k of C)k.removeEventListener("change",h)}}var dx="http://www.w3.org/1998/Math/MathML",fx="http://www.w3.org/2000/svg",m0={},e8=(y,x,h)=>{let C=o8(P1(x),h);if(C.prop.startsWith("--"))y.style.setProperty(C.prop,C.value);else y.style[x]=C.value},sx=(y)=>{return{toDOM(x,h){e8(x,y,h)}}},K8=new WeakMap,y6=(y,x,h)=>{if(x==="style")if(typeof h==="object")for(let C of Object.keys(h))if(A1(h[C]))f1(y,h[C],sx(C));else e8(y,C,h[C]);else y.setAttribute("style",h);else{let C=P1(x),k=y.constructor.observedAttributes;if(k?.includes(x)||k?.includes(C))if(typeof h==="boolean")h?y.setAttribute(C,""):y.removeAttribute(C);else y.setAttribute(C,h);else if(y[x]!==void 0){let{MathMLElement:B}=globalThis;if(y instanceof SVGElement||B!==void 0&&y instanceof B)y.setAttribute(x,h);else y[x]=h}else if(C==="class"){let B=(q)=>String(q||"").split(/\s+/).filter(Boolean),w=new Set,g=new Set;if(Array.isArray(h))for(let q of h)for(let j of B(q))w.add(j);else if(h!=null&&typeof h==="object")for(let[q,j]of Object.entries(h))for(let V of B(q))(j?w:g).add(V);else for(let q of B(h))w.add(q);let z=K8.get(y);if(z){for(let q of z)if(!w.has(q))y.classList.remove(q)}for(let q of g)y.classList.remove(q);for(let q of w)y.classList.add(q);K8.set(y,w)}else if(y[C]!==void 0)y[C]=h;else if(typeof h==="boolean")h?y.setAttribute(C,""):y.removeAttribute(C);else y.setAttribute(C,h)}},$5={},P8=(y)=>{if(!$5[y])$5[y]={toDOM(x,h){y6(x,y,h)}};return $5[y]},m5=(y,x,h)=>{if(x==="apply")h(y);else if(x.match(/^on[A-Z]/)!=null){let C=x.substring(2).toLowerCase();Z2(y,C,h)}else if(x==="bind"){let C=typeof h.binding==="string"?u1[h.binding]:h.binding;if(C!==void 0&&h.value!==void 0)f1(y,h.value,C instanceof Function?{toDOM:C}:C);else throw Error("bad binding")}else if(x.match(/^bind[A-Z]/)!=null){let C=x.substring(4,5).toLowerCase()+x.substring(5);if(C!=="value"){let B=C==="text"?"textContent":C==="enabled"?"disabled (with .tosi.take(v => !v))":C==="disabled"?"disabled":C==="list"?".tosi.listBinding()":null;if(B)q1(`bind${C}`,`bind${x.substring(4)} is deprecated. Use { ${B}: ... } instead.`)}let k=u1[C];if(k!==void 0)f1(y,h,k);else throw Error(`${x} is not allowed, bindings.${C} is not defined`)}else if(h!=null&&typeof h==="object"&&h[h4])f1(y,h,P8(x));else if(A1(h))f1(y,h,P8(x));else y6(y,x,h)},n5=(y,...x)=>{if(m0[y]===void 0){let[k,B]=y.split("|");if(B===void 0)m0[y]=globalThis.document.createElement(k);else m0[y]=globalThis.document.createElementNS(B,k)}let h=m0[y].cloneNode(),C={};for(let k of x)if(k instanceof Element||k instanceof DocumentFragment||typeof k==="string"||typeof k==="number")if(h instanceof HTMLTemplateElement)h.content.append(k);else h.append(k);else if(A1(k))h.append(G.span({bindText:k}));else Object.assign(C,k);for(let k of Object.keys(C)){let B=C[k];m5(h,k,B)}return h},E5=(...y)=>{let x=globalThis.document.createDocumentFragment();for(let h of y)x.append(h);return x},G=new Proxy({fragment:E5},{get(y,x){if(x=x.replace(/[A-Z]/g,(h)=>`-${h.toLocaleLowerCase()}`),y[x]===void 0)y[x]=(...h)=>n5(x,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),B4=new Proxy({fragment:E5},{get(y,x){if(y[x]===void 0)y[x]=(...h)=>n5(`${x}|${fx}`,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),x6=new Proxy({fragment:E5},{get(y,x){if(y[x]===void 0)y[x]=(...h)=>n5(`${x}|${dx}`,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),U8=new WeakSet;function ux(y,x,h="part"){let C=`[data-${h}]`;for(let k of Array.from(y.querySelectorAll(C))){if(U8.has(k))continue;let B=k.getAttribute(`data-${h}`);if(B==null)continue;let w=x[B];if(w==null)continue;U8.add(k);for(let g of Object.keys(w))m5(k,g,w[g])}}var rx=["sort","splice","copyWithin","fill","pop","push","reverse","shift","unshift"],mx=!0,nx=/^\.?([^.[\](),])+(\.[^.[\](),]+|\[\d+\]|\[[^=[\](),]*=[^[\]()]+\])*$/,Ex=(y)=>nx.test(y),n1=(y="",x="")=>{if(y==="")return x;else if(x.startsWith("[")&&x.endsWith("]"))return`${y}${x}`;else if(x.match(/^\d+$/)!==null||x.includes("="))return`${y}[${x}]`;else return`${y}.${x}`},x4={};function Y5(y,x){if(y!==null&&(typeof y==="object"||typeof y==="function"))return y;return new Proxy(x4,a1(x,!0))}var h6=()=>new Proxy({},a1("^",!0)),i5=(y)=>{let x=y(h6())?.path;if(!x?.startsWith("^."))throw Error("selector must return a property of the item");return x.substring(2)},O5=(y,x,h)=>{for(let C=0;C<y.length;C++)if(`${h1(y[C],x)}`===`${h}`)return C;return-1},ox=(y,x)=>({listFind(h,C){if(h instanceof Element){let w=h;while(w&&!w[O2]&&w.parentElement)w=w.parentElement;let g=w?.[O2];if(g==null)return;let z=x.indexOf(g);return z!==-1?U1[y][z]:void 0}let k=i5(h),B=O5(x,k,C);return B!==-1?U1[y][B]:void 0},listUpdate(h,C){let k=i5(h),B=h1(C,k),w=O5(x,k,B);if(w!==-1){let g=U1[y][w];for(let z of Object.keys(C))g[z]=C[z];return g}return U1[y].push(C),U1[y][x.length-1]},listRemove(h,C){let k=i5(h),B=O5(x,k,C);if(B===-1)return!1;return U1[y].splice(B,1),!0}}),G8=!1;function ax(){if(!G8)console.warn("xinValue, tosiValue, xinPath, tosiPath, etc. are deprecated. Use .tosi.value, .tosi.path, .tosi.observe(), etc. instead."),G8=!0}var Q8=(y)=>{return y===x4},tx=(y,x)=>({get(h,C){switch(C){case"value":return x===x4?h1(l1,y):x.valueOf?x.valueOf():x;case"path":return y;case"touch":return()=>$1(y);case"observe":return(k)=>{let B=B0(y,k);return()=>C0(B)};case"bind":return(k,B,w)=>{$x()(k,y,B,w)};case"on":{let k=x===x4?h1(l1,y):x.valueOf?x.valueOf():x;return(B,w)=>Yx()(B,w,k)}case"binding":return(k)=>({bind:{value:y,binding:k}});case"listBinding":return(k=({span:w})=>w({bindText:"^"}),B={})=>{let w=B.virtual?.itemsPerRow??1,g=[];for(let z=0;z<w;z++)g.push(k(G,h6(),z));return[{bindList:{value:y,...B}},G.template(...g)]};case"listFind":case"listUpdate":case"listRemove":return ox(y,Array.isArray(x)?x:[])[C];case"take":return(...k)=>{let B=k[k.length-1],w=k.slice(0,-1).map((g)=>typeof g==="string"?g:g[M1]);return{[h4]:!0,paths:[y,...w],transform:B}}}return},set(h,C,k){if(C==="value"){if(k=S(k),S(B1[y])!==k&&C4(l1,y,k))$1(y);return!0}return!1}}),t2=(y,x)=>new Proxy(x,tx(y,x)),$8=new Set(["path","value","touch","observe","bind","on","binding","listBinding","listFind","listUpdate","listRemove","take"]),Y8=new Map([[M1,"path"],["xinPath","path"],["tosiPath","path"],[q2,"value"],["xinValue","value"],["tosiValue","value"],[Cx,"observe"],["xinObserve","observe"],["tosiObserve","observe"],[Bx,"on"],["xinOn","on"],["tosiOn","on"],[kx,"bind"],["xinBind","bind"],["tosiBind","bind"],["tosiBinding","binding"],["tosiListBinding","listBinding"]]),a1=(y,x)=>({get(h,C){if((C==="tosi"||C===u5)&&x)return t2(y,h);if(Q8(h)){let z=()=>h1(l1,y);switch(C){case"valueOf":case"toJSON":return()=>z();case Symbol.toPrimitive:return(V)=>{let _=z();if(V==="number")return Number(_);if(V==="string")return String(_);return _};case"toString":return()=>String(z())}if($8.has(C))return t2(y,h)[C];let q=Y8.get(C);if(q!==void 0)return ax(),t2(y,h)[q];let j=z();if(j!=null){let V=Object(j);if(C in V){let _=V[C];return typeof _==="function"?_.bind(V):_}}return}if(x&&(C==="valueOf"||C==="toJSON"))return()=>h.valueOf?h.valueOf():h;if(x&&!(C in h)&&$8.has(C))return t2(y,h)[C];let k=Y8.get(C);if(k!==void 0)return t2(y,h)[k];if(typeof C==="symbol")return h[C];let B=Object.getOwnPropertyDescriptor(h,C);if(B&&!B.configurable&&!B.writable&&"value"in B)return B.value;let w=C,g=w.match(/^([^.[]+)\.(.+)$/)??w.match(/^([^\]]+)(\[.+)/)??w.match(/^(\[[^\]]+\])\.(.+)$/)??w.match(/^(\[[^\]]+\])\[(.+)$/);if(g!==null){let[,z,q]=g,j=n1(y,z),V=S(h1(h,z));return V!==null&&typeof V==="object"?new Proxy(V,a1(j,x))[q]:V}if(w.startsWith("[")&&w.endsWith("]"))w=w.substring(1,w.length-1);if(!Array.isArray(h)&&h[w]!==void 0||Array.isArray(h)&&w.includes("=")){let z;if(w.includes("=")){let[q,j]=w.split("=");z=h.find((V)=>`${h1(V,q)}`===j)}else z=h[w];if(z instanceof Object){z=S(z);let q=n1(y,w);return new Proxy(z instanceof Function?z.bind(h):z,a1(q,x))}else return x?Y5(z,n1(y,w)):z}else if(Array.isArray(h)){let z=h[w];return typeof z==="function"?(...q)=>{let j=q.map((_)=>S(_)),V=z.apply(h,j);if(rx.includes(w))$1(y);if(V!=null&&typeof V==="object"){if(w==="find"||w==="findLast"||w==="at"){let _=h.indexOf(V);if(_!==-1)return new Proxy(V,a1(n1(y,String(_)),x))}}return V}:typeof z==="object"?new Proxy(S(z),a1(n1(y,w),x)):x?Y5(z,n1(y,w)):z}else{let z=h[w];if(z!==null&&typeof z==="object")z=S(z);return x?Y5(z,n1(y,w)):z}},set(h,C,k){if(k=S(k),typeof C==="symbol"&&C!==q2)return h[C]=k,!0;if(k!==null&&typeof k==="object")if(Array.isArray(k))for(let w=0;w<k.length;w++){let g=Object.getOwnPropertyDescriptor(k,w);if(g===void 0||g.writable!==!0)continue;if(g.value!==null&&typeof g.value==="object")k[w]=S(g.value)}else for(let w of Object.keys(k)){let g=Object.getOwnPropertyDescriptor(k,w);if(g===void 0||g.writable!==!0)continue;if(g.value!==null&&typeof g.value==="object")k[w]=S(g.value)}let B=C===q2||C==="xinValue"||C==="tosiValue"||C==="value"&&(Q8(h)||x&&!("value"in h))?y:n1(y,C);if(mx&&!Ex(B))throw Error(`setting invalid path ${B}`);if(S(B1[B])!==k&&C4(l1,B,k))$1(B);return!0}}),o5=(y,x)=>{let h=typeof x==="function"?x:B1[x];if(typeof h!=="function")throw Error(`observe expects a function or path to a function, ${x} is neither`);return B0(y,h)},B1=new Proxy(l1,a1("",!1));Gx(B1);var U1=new Proxy(l1,a1("",!0)),ex=16,yh=100;function i8(y,x){let h=Array.from(y.getElementsByClassName(t1));if(y.classList.contains(t1))h.unshift(y);for(let C of h){let k=s1.get(C);for(let B of k){if(B.path.startsWith("^"))B.path=`${x}${B.path.substring(1)}`;if(B.binding.toDOM!=null)B.binding.toDOM(C,B1[B.path],B.options)}}}var O8=!1;class C6{boundElement;listTop;listBottom;isNamespaced;templates;options;itemToElement;idToElement=new Map;array=[];_filteredCache;_update;_previousSlice;static filterBoundObservers=new WeakMap;constructor(y,x,h={}){if(this.boundElement=y,this.itemToElement=new WeakMap,h.idPath!=null){let g=A1(x);if(g!=null)wx(g,h.idPath)}let C=h.virtual?.itemsPerRow??1,k=Array.from(y.children).find((g)=>g instanceof HTMLTemplateElement),B=null;if(k!=null){let g=C;if(k.content.children.length<1||k.content.children.length!==g)throw Error(`ListBinding expects a template with exactly ${g} child element(s)`);this.templates=Array.from(k.content.children).map((z)=>x0(z)),B=k.nextElementSibling,k.remove()}else if(y.children.length===1)this.templates=[y.children[0]],this.templates[0].remove();else throw Error("ListBinding expects a <template> child or exactly one child element");this.options=h;let w=y.namespaceURI;if(this.isNamespaced=w==="http://www.w3.org/2000/svg"||w==="http://www.w3.org/1998/Math/MathML",this.isNamespaced)this.listTop=null,this.listBottom=null;else if(this.listTop=document.createElement("div"),this.listBottom=document.createElement("div"),this.listTop.classList.add("virtual-list-padding"),this.listBottom.classList.add("virtual-list-padding"),this.listTop.setAttribute("role","presentation"),this.listBottom.setAttribute("role","presentation"),this.listTop.setAttribute("aria-hidden","true"),this.listBottom.setAttribute("aria-hidden","true"),B!=null)this.boundElement.insertBefore(this.listTop,B),this.boundElement.insertBefore(this.listBottom,B);else this.boundElement.append(this.listTop),this.boundElement.append(this.listBottom);if(C>1){this.boundElement.classList.add("tosi-virtual-grid");let g=this.boundElement.style;if(g!=null)g.setProperty("--tosi-columns",String(C)),g.display=g.display||"grid",g.gridTemplateColumns=g.gridTemplateColumns||"repeat(var(--tosi-columns), 1fr)";if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.gridColumn="1 / -1",this.listBottom.style.gridColumn="1 / -1"}if(h.virtual!=null&&!this.boundElement.getAttribute("role"))this.boundElement.setAttribute("role",C>1?"grid":"list");if(this.boundElement[a0]=this,this.isNamespaced&&h.virtual!=null)console.warn("ListBinding: virtual scrolling is not supported in SVG/MathML containers, ignoring virtual option");if(!this.isNamespaced&&h.virtual!=null)if(I5.observe(this.boundElement),this._update=N2(()=>{this.update(this.array,!0)},ex),this.boundElement.addEventListener("resize",this._update),h.virtual.scrollContainer==="window")window.addEventListener("scroll",this._update),window.addEventListener("resize",this._update);else this.boundElement.addEventListener("scroll",this._update)}filteredArray(){if(this._filteredCache!=null)return this._filteredCache;let{hiddenProp:y,visibleProp:x}=this.options,h=this.array;if(y!==void 0)h=h.filter((C)=>C[y]!==!0);if(x!==void 0)h=h.filter((C)=>C[x]===!0);if(this.options.filter&&this.needle!==void 0)h=this.options.filter(h,this.needle);return this._filteredCache=h,h}visibleSlice(){let{virtual:y}=this.options,x=this.filteredArray(),h=0,C=x.length-1,k=0,B=0;if(y!=null&&this.boundElement instanceof HTMLElement){let w=this.boundElement.offsetWidth,g=y.scrollContainer==="window",z,q;if(g){z=window.innerHeight;let _=this.boundElement.getBoundingClientRect();q=Math.max(0,-_.top)}else z=this.boundElement.offsetHeight,q=this.boundElement.scrollTop;let j=y.width!=null?Math.max(1,Math.floor(w/y.width)):y.visibleColumns??1,V=Math.ceil(x.length/j);if(y.minHeight!=null){let _=y.minHeight,P=Math.ceil(z/_)+(y.rowChunkSize||1),U=j*P,i=V*_,N=Math.max(0,i-z),F=N>0?Math.min(1,Math.max(0,q/N)):0,R=Math.max(0,V-P+1),D=F*R,f=Math.floor(D);if(y.rowChunkSize)f-=f%y.rowChunkSize;return h=f*j,C=h+U-1,k=q,B=Math.max(0,i-q-z),{items:x,firstItem:h,lastItem:C,topBuffer:k,bottomBuffer:B,interpolation:{t:F,position:D,scrollTop:q,viewportHeight:z,totalScrollHeight:i,rowHeight:y.height}}}else{let _=Math.ceil(z/y.height)+(y.rowChunkSize||1),P=j*_,U=Math.floor(q/y.height);if(U>V-_+1)U=Math.max(0,V-_+1);if(y.rowChunkSize)U-=U%y.rowChunkSize;h=U*j,C=h+P-1,k=U*y.height,B=Math.max((V-_)*y.height-k,0)}}return{items:x,firstItem:h,lastItem:C,topBuffer:k,bottomBuffer:B}}needle;filter=N2((y)=>{if(this.needle!==y)this.needle=y,this.update(this.array)},yh);update(y,x){if(y==null)y=[];if(this.array=y,!x)this._filteredCache=void 0;let{hiddenProp:h,visibleProp:C}=this.options,k=A1(y),B=this.visibleSlice();if(this.boundElement.classList.toggle("-xin-empty-list",B.items.length===0),this.options.virtual!=null)this.boundElement.setAttribute("aria-rowcount",String(B.items.length));let w=this._previousSlice,{firstItem:g,lastItem:z,topBuffer:q,bottomBuffer:j}=B,V=h===void 0&&C===void 0&&x===!0&&w!=null&&g===w.firstItem&&z===w.lastItem;if(V&&B.interpolation==null&&q===w.topBuffer&&j===w.bottomBuffer)return;if(V&&B.interpolation!=null){this._updateInterpolatedBuffers(B);return}this._previousSlice=B;let _=0,P=0,U=0,{idPath:i}=this.options,N=this.options.virtual?.itemsPerRow??1,F;if(i!=null){F=new Set;for(let H=g;H<=z;H++){let b=B.items[H];if(b!==void 0)F.add(String(b[i]))}}let R=new Set;for(let H of Array.from(this.boundElement.children)){if(H===this.listTop||H===this.listBottom)continue;let b=H[O2];if(b==null)continue;else if(b===!0)H.remove(),_++;else{if(R.has(b))continue;let J;if(i!=null)J=!F.has(String(b[i]));else{let u=B.items.indexOf(b);J=u<g||u>z}if(J){R.add(b);let u=this.itemToElement.get(b);if(u!=null)for(let Z of u)Z.remove();else H.remove();if(this.itemToElement.delete(b),i!=null)this.idToElement.delete(String(b[i]));_++}}}if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(q)+"px",this.listBottom.style.height=String(j)+"px";let D=[],f=i!=null?new Set:null;for(let H=g;H<=z;H++){let b=B.items[H];if(b===void 0)continue;if(f!=null&&i!=null){let u=String(b[i]);if(f.has(u)){if(!O8)O8=!0,console.error(`tosijs list binding: duplicate idPath value "${u}" (idPath: "${i}"). `+"id-path values must be unique — items sharing an id collapse to a single "+"row and updates target the wrong item. Warned once per session.")}else f.add(u)}let J=this.itemToElement.get(S(b));if(J==null&&i!=null){let u=String(b[i]);if(J=this.idToElement.get(u),J!=null){let Z=S(b);this.itemToElement.set(Z,J);for(let E of J)E[O2]=Z}}if(J==null){U++;let u=S(b);if(J=this.templates.map((Z)=>x0(Z)),typeof b==="object")this.itemToElement.set(u,J);for(let Z of J)Z[O2]=typeof b==="object"?u:!0;for(let Z of J)if(this.listBottom!=null)this.boundElement.insertBefore(Z,this.listBottom);else this.boundElement.append(Z);if(i!=null){let Z=b[i],E=`${k}[${i}=${Z}]`;for(let c0 of J)i8(c0,E);this.idToElement.set(String(Z),J)}else{let Z=`${k}[${H}]`;for(let E of J)i8(E,Z)}}if(this.options.virtual!=null){let u=String(H+1);if(N>1)for(let Z=0;Z<J.length;Z++){let E=J[Z];E.setAttribute("role","gridcell"),E.setAttribute("aria-rowindex",u),E.setAttribute("aria-colindex",String(Z+1))}else for(let Z of J)Z.setAttribute("role","listitem"),Z.setAttribute("aria-rowindex",u)}D.push(...J)}let y1=this.listTop;for(let H of D){if(H.previousElementSibling!==y1)if(P++,y1?.nextElementSibling!=null)this.boundElement.insertBefore(H,y1.nextElementSibling);else if(this.listBottom!=null)this.boundElement.insertBefore(H,this.listBottom);else this.boundElement.append(H);y1=H}if(B.interpolation!=null)this._updateInterpolatedBuffers(B);if(t0.perf)console.log(k,"updated",{removed:_,created:U,moved:P})}_updateInterpolatedBuffers(y){let{t:x,position:h,scrollTop:C,viewportHeight:k,totalScrollHeight:B,rowHeight:w}=y.interpolation,g=0;for(let V of Array.from(this.boundElement.children)){if(V===this.listTop||V===this.listBottom)continue;g+=V.offsetHeight||w}let z=C,q=C+k-g,j=Math.max(0,x*q+(1-x)*z-h%1*w);if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(j)+"px",this.listBottom.style.height=String(Math.max(0,B-j-g))+"px"}}var J2=(y,x,h)=>{let C=y[a0];if(x&&C===void 0)C=new C6(y,x,h),y[a0]=C;return C},a5=(y)=>{let x;while(!(x=y[O2])&&y&&y.parentElement)y=y.parentElement;return x?{element:y,item:x}:void 0},l2=(y)=>{let x=a5(y);return x?x.item:void 0},xh=(y)=>{let x=a5(y);if(!x)return console.error("deleteListItem failed, element is not part of a list instance",y),!1;let h=J2(x.element.parentElement);if(!h.options.idPath)return console.error("deleteListItem failed, list binding has no idPath",y.parentElement,h),!1;let C=h.array.indexOf(x.item);if(C>-1)return h.array.splice(C,1),!0;return!1},hh={start:"start",middle:"center",end:"end",nearest:"nearest"},Ch=(y,x,h={})=>{let C=J2(y);if(C==null)return console.error("scrollListItemIntoView failed, element has no list binding",y),!1;let{position:k="middle",behavior:B="smooth"}=h,w=C.filteredArray(),g=S(x)??x,z=w.indexOf(g);if(z===-1)return console.error("scrollListItemIntoView failed, item not found in list",x),!1;let{virtual:q}=C.options;if(q!=null&&y instanceof HTMLElement){let j=q.width!=null?Math.max(1,Math.floor(y.offsetWidth/q.width)):q.visibleColumns??1,V=Math.floor(z/j),_=q.minHeight??q.height,P=Math.ceil(w.length/j),U=q.scrollContainer==="window",i=U?window.innerHeight:y.offsetHeight,N;if(q.minHeight!=null){let F=Math.ceil(i/_)+(q.rowChunkSize||1),R=P*_,D=Math.max(0,R-i),f=Math.max(1,P-F+1),y1=V/f;switch(k){case"start":N=y1*D;break;case"end":N=Math.max(0,(V-F+1)/f*D);break;case"nearest":{let H=U?Math.max(0,-y.getBoundingClientRect().top):y.scrollTop,b=D>0?H/D:0,J=Math.floor(b*f);if(V<J)N=y1*D;else if(V>=J+F)N=Math.max(0,(V-F+1)/f*D);else return!0;break}default:{let H=V-Math.floor(F/2);N=Math.max(0,H)/f*D}}}else{let F=V*q.height;switch(k){case"start":N=F;break;case"end":N=F-i+q.height;break;case"nearest":{let R=U?Math.max(0,-y.getBoundingClientRect().top):y.scrollTop;if(F<R)N=F;else if(F+q.height>R+i)N=F-i+q.height;else return!0;break}default:N=F-(i-q.height)/2}}if(N=Math.max(0,N),U){let F=y.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:F+N,behavior:B})}else y.scrollTo({top:N,behavior:B})}else{let j=C.itemToElement.get(g);if(j==null||j.length===0)return console.error("scrollListItemIntoView failed, no DOM element found for item",x),!1;j[0].scrollIntoView({block:hh[k]??"center",behavior:B})}return!0},{document:k0,MutationObserver:F8}=globalThis,t5=(y,x)=>{let h=s1.get(y);if(h==null)return;for(let C of h){let{binding:k,options:B}=C,{path:w}=C,{toDOM:g}=k;if(g!=null){if(w.startsWith("^")){let z=l2(y);if(z!=null&&z[M1]!=null)w=C.path=`${z[M1]}${w.substring(1)}`;else{if(y instanceof HTMLElement)console.warn(`Unresolved relative binding "${w}" —`,y,"is not part of a list. If this is a list template, wrap it in a <template>.");continue}}if(x==null||h0(x,w))g(y,k4()[w],B)}}};if(F8!=null)new F8((y)=>{y.forEach((x)=>{Array.from(x.addedNodes).forEach((h)=>{if(h instanceof Element)Array.from(h.getElementsByClassName(t1)).forEach((C)=>t5(C))})})}).observe(k0.body,{subtree:!0,childList:!0});B0(()=>!0,(y)=>{let x=Array.from(k0.getElementsByClassName(t1));for(let h of x)t5(h,y)});var k6=(y)=>{let x=y.composed&&y.composedPath!=null?y.composedPath()[0]:y.target;return x instanceof Element?x:null},b5=(y,x)=>{while(y!=null){let h=y.closest(x);if(h!=null)return h;let C=y.getRootNode();y=typeof ShadowRoot<"u"&&C instanceof ShadowRoot?C.host:null}return null},kh=(y,x)=>{if(y.parentElement!=null)return b5(y.parentElement,x);let h=y.getRootNode();if(typeof ShadowRoot<"u"&&h instanceof ShadowRoot)return b5(h.host,x);return null},B6=(y)=>{if(y.parentElement!=null)return y.parentElement;let x=y.getRootNode();return typeof ShadowRoot<"u"&&x instanceof ShadowRoot?x.host:null},N8=(y)=>{while(y!=null&&!F2.has(y))y=B6(y);return y},W8=(y)=>{let x=b5(k6(y),o0);while(x!=null){let h=s1.get(x);for(let C of h??[]){let{binding:k,path:B}=C,{fromDOM:w}=k;if(w!=null){let g;try{g=w(x,C.options)}catch(z){throw console.error("Cannot get value from",x,"via",C),Error("Cannot obtain value fromDOM")}if(g!=null){let z=k4(),q=z[B];if(q==null)z[B]=g;else{let j=q[M1]!=null?q[q2]:q,V=g[M1]!=null?g[q2]:g;if(typeof j==="number"&&typeof V==="string"){let _=V.trim();if(_!==""){let P=Number(_);if(!Number.isNaN(P))V=P}}else if(V instanceof Date){if(typeof j==="number")V=V.getTime();else if(typeof j==="string")V=x.value}if(j instanceof Date&&V instanceof Date?j.getTime()!==V.getTime():j!==V)z[B]=V}}}}x=kh(x,o0)}};if(globalThis.document!=null)k0.body.addEventListener("change",W8,!0),k0.body.addEventListener("input",W8,!0);function Bh(y,x,h,C){let{paths:k,transform:B}=x,{toDOM:w}=h;if(w==null)return y;let g=null,z={toDOM(j,V,_){let P=k4(),U=k.map((N)=>P[N]);if(g!==null&&U.every((N,F)=>N===g[F]))return;g=U;let i=B(...U);w(j,i,_)},fromDOM:h.fromDOM};y.classList?.add(t1);let q=s1.get(y);if(q==null)q=[],s1.set(y,q);for(let j of k)q.push({path:j,binding:z,options:C});if(!k[0].startsWith("^"))$1(k[0]);return y}var J8=!1,wh=(y,x)=>{if(J8)return;if(typeof ShadowRoot<"u"&&y.getRootNode!=null&&y.getRootNode()instanceof ShadowRoot)J8=!0,console.warn(`tosijs: ${x} targets an element inside a shadow root, where data bindings do not operate (documented Component design boundary). A shadow-DOM component is bound like an <input>: bind its VALUE from outside (bindings.value) and implement render() to reflect value into the shadow DOM. Warned once per session.`,y)};function f1(y,x,h,C){if(y instanceof DocumentFragment)throw Error("bind cannot bind to a DocumentFragment");if(wh(y,"bind()"),x!=null&&typeof x==="object"&&x[h4])return Bh(y,x,h,C);let k;if(typeof x==="object"&&x[M1]===void 0&&C===void 0){let{value:g}=x;k=typeof g==="string"?g:g[M1],C={...x},delete C.value}else k=typeof x==="string"?x:x[M1];if(k==null)throw Error("bind requires a path or object with xin Proxy");let{toDOM:B}=h;y.classList?.add(t1);let w=s1.get(y);if(w==null)w=[],s1.set(y,w);if(w.push({path:k,binding:h,options:C}),B!=null&&!k.startsWith("^"))$1(k);if(C?.filter&&C?.needle)f1(y,C.needle,{toDOM(g,z){g[a0]?.filter(z)}});return y}var Z8=new Set,gh=(y)=>{let x=N8(k6(y)),h=!1,C=new Proxy(y,{get(B,w){if(w==="stopPropagation")return()=>{y.stopPropagation(),h=!0};else{let g=B[w];return typeof g==="function"?g.bind(B):g}}}),k=new Set;while(!h&&x!=null){let B=F2.get(x)?.[y.type]??k;for(let w of B){if(typeof w==="function")w(C);else{let g=k4()[w];if(typeof g==="function")g(C);else throw Error(`no event handler found at path ${w}`)}if(h)continue}x=N8(B6(x))}};function Z2(y,x,h){let C=F2.get(y);if(C==null)C={},F2.set(y,C);if(!C[x])C[x]=new Set;if(C[x].add(h),!Z8.has(x))Z8.add(x),k0.body.addEventListener(x,gh,!0);return()=>{C[x].delete(h)}}Qx(f1,Z2);function w6(y,x){if(!y.internals)return;let h={},C="";if(y.hasAttribute("required")&&x==="")h.valueMissing=!0,C="Please fill out this field.";let k=y.getAttribute("minlength");if(k&&x.length<parseInt(k,10))h.tooShort=!0,C=`Please use at least ${k} characters.`;let B=y.getAttribute("maxlength");if(B&&x.length>parseInt(B,10))h.tooLong=!0,C=`Please use no more than ${B} characters.`;let w=y.getAttribute("pattern");if(w&&x!=="")try{if(!new RegExp(`^(?:${w})$`).test(x))h.patternMismatch=!0,C="Please match the requested format."}catch{}if(Object.keys(h).length>0)y.internals.setValidity(h,C,y);else y.internals.setValidity({})}var zh=0;function F5(){return`custom-elt${(zh++).toString(36)}`}var R8=0,D8=new Set,H8=new Set,v8=Symbol("tosiDrainWrapped"),M8=new WeakSet,N5=null;function qh(){if(N5===null)N5=new MutationObserver((y)=>{let x=new Set;for(let h of y)if(h.type==="attributes"&&h.target instanceof $){let C=h.target,k=r8(h.attributeName);if(C._legacyTrackedAttrs?.has(k))x.add(C)}for(let h of x)h.queueRender(!1)});return N5}var y0={};function lh(y,x){let h=y0[y],C=W2(x).replace(/:host\(([^)]+)\)/g,`${y}$1`).replace(/:host\b/g,y);y0[y]=h?h+`
13
+ `+C:C}function jh(y){if(y0[y])document.head.append(G.style({id:y+"-component"},y0[y]));delete y0[y]}function Vh(y){let x=Object.create(null),h=(C)=>{if(Array.isArray(C)){C.forEach(h);return}if(!(C instanceof Element))return;let k=C.getAttribute("part");if(k!=null&&!(k in x))x[k]=C;for(let B of Array.from(C.children))h(B)};return h(y),x}class $ extends HTMLElement{static elements=G;static _elementCreator;static initAttributes;static formAssociated;static preferredTagName;static shadowStyleSpec;static lightStyleSpec;static extends;internals;get validity(){return this.internals?.validity}get validationMessage(){return this.internals?.validationMessage??""}get willValidate(){return this.internals?.willValidate??!1}checkValidity(){return this.internals?.checkValidity()??!0}reportValidity(){return this.internals?.reportValidity()??!0}setCustomValidity(y){if(this.internals)if(y)this.internals.setValidity({customError:!0},y);else this.internals.setValidity({})}setValidity(y,x,h){this.internals?.setValidity(y,x,h)}setFormValue(y,x){this.internals?.setFormValue(y,x)}static get observedAttributes(){let y=this.initAttributes;if(y)return["hidden",...Object.keys(y).map(P1)];return["hidden"]}instanceId;styleNode;static styleSpec;static styleNode;content=G.slot();isSlotted;static _tagName=null;static get tagName(){return this._tagName}_legacyTrackedAttrs;_attrValues;_valueChanged=!1;_pendingAttrOps;static StyleNode(y){return console.warn("StyleNode is deprecated, use static shadowStyleSpec instead"),G.style(W2(y))}static elementCreator(y={}){let x=this;if(!Object.prototype.hasOwnProperty.call(x,"_elementCreator")){if(y.tag!==void 0)q1("elementCreator-tag","Passing tag to elementCreator() is deprecated. Use static preferredTagName instead.");if(y.styleSpec!==void 0)q1("elementCreator-styleSpec","Passing styleSpec to elementCreator() is deprecated. Use static lightStyleSpec instead.");if(y.extends!==void 0)q1("elementCreator-extends","Passing extends to elementCreator() is deprecated. Use static extends instead.");let h=y.tag??x.preferredTagName;if(h==null)if(typeof x.name==="string"&&x.name!==""){if(h=P1(x.name),h.startsWith("-"))h=h.slice(1)}else h=F5();if(customElements.get(h)!=null)console.warn(`${h} is already defined`);if(h.match(/\w+(-\w+)+/)==null)console.warn(`${h} is not a legal tag for a custom-element`),h=F5();while(customElements.get(h)!==void 0)h=F5();x._tagName=h;let C=y.styleSpec??x.lightStyleSpec;if(C!==void 0)lh(h,C);let k=y.extends??x.extends,B=k?{extends:k}:void 0,w=this.prototype;if(w!=null&&!Object.prototype.hasOwnProperty.call(w,v8)){let g=w.connectedCallback;w.connectedCallback=function(){if(this._drainPendingAttrOps(),g)g.call(this)},Object.defineProperty(w,v8,{value:!0,enumerable:!1})}window.customElements.define(h,this,B),x._elementCreator=G[h]}return x._elementCreator}initAttributes(...y){if(q1("initAttributes","initAttributes() is deprecated. Use static initAttributes = { ... } instead."),!this._legacyTrackedAttrs)this._legacyTrackedAttrs=new Set;for(let C of y)this._legacyTrackedAttrs.add(C);qh().observe(this,{attributes:!0});let x={},h={};y.forEach((C)=>{x[C]=v1(this[C]);let k=P1(C);Object.defineProperty(this,C,{enumerable:!1,get(){if(typeof x[C]==="boolean")return this.hasAttribute(k);else if(this.hasAttribute(k))return typeof x[C]==="number"?parseFloat(this.getAttribute(k)):this.getAttribute(k);else if(h[C]!==void 0)return h[C];else return x[C]},set(B){if(typeof x[C]==="boolean"){if(B!==this[C]){if(B)this.setAttribute(k,"");else this.removeAttribute(k);this.queueRender()}}else if(typeof x[C]==="number"){if(B!==parseFloat(this[C]))this.setAttribute(k,B),this.queueRender()}else if(typeof B==="object"||`${B}`!==`${this[C]}`){if(B===null||B===void 0||typeof B==="object")this.removeAttribute(k);else this.setAttribute(k,B);this.queueRender(),h[C]=B}}})})}initValue(){let y=Object.getOwnPropertyDescriptor(this,"value");if(y===void 0||y.get!==void 0||y.set!==void 0)return;let x=this.hasAttribute("value")?this.getAttribute("value"):v1(this.value);delete this.value,Object.defineProperty(this,"value",{enumerable:!1,get(){return x},set(h){if(x!==h)x=h,this._valueChanged=!0,this.queueRender(!0)}})}_parts;_partsCache=Object.create(null);get parts(){let y=this;if(this._parts==null)this._parts=new Proxy({},{get(x,h){if(typeof h!=="string")return;let C=y._partsCache,k=C[h]??null,B=k;if(B!=null&&!B.isConnected)B=null;if(B==null){let w=y.shadowRoot!=null?y.shadowRoot:y;if(B=w.querySelector(`[part="${h}"]`),B==null){let g=w.querySelector(`[data-ref="${h}"]`);if(g!=null)q1("data-ref",'data-ref is deprecated and will be removed in tosijs 1.8.0 — use part="…" instead.'),g.removeAttribute("data-ref"),B=g}if(B==null)B=w.querySelector(h);if(B==null&&k!=null)return k;if(B==null)throw Error(`elementRef "${h}" does not exist!`);C[h]=B}return B}});return this._parts}attributeChangedCallback(y,x,h){let C=r8(y);if(h===null&&this._attrValues?.has(C))this._attrValues.delete(C);if(!this._legacyTrackedAttrs?.has(C))this.queueRender(!1)}constructor(){super();if(R8+=1,this._installAttributeQueue(),this.constructor.formAssociated&&typeof this.attachInternals==="function"&&!this.internals)this.internals=this.attachInternals();let y=this.constructor.initAttributes;if(y)this._setupAttributeAccessors(y);this.instanceId=`${this.tagName.toLocaleLowerCase()}-${R8}`,this._value=v1(this.defaultValue),this._warnOnHandlerCollisions()}_warnOnHandlerCollisions(){let y=this.constructor;if(M8.has(y))return;M8.add(y),queueMicrotask(()=>{let x=new Set;for(let B of Object.keys(this))if(/^on[A-Z]/.test(B))x.add(B);let h=Object.getPrototypeOf(this);while(h&&h!==$.prototype){for(let B of Object.getOwnPropertyNames(h))if(/^on[A-Z]/.test(B))x.add(B);h=Object.getPrototypeOf(h)}let C=this.tagName.toLowerCase();if(x.delete("onResize")&&this.handleResize===void 0)console.warn(`<${C}> defines 'onResize', which is deprecated. Rename it to 'handleResize'. The on<Event> prefix is reserved for event-handler sugar in the elements factory (creator({ onResize }) would attach a 'resize' listener) and is being retired for component callbacks in favor of the handle<Event> convention.`);if(x.size===0)return;let k=Array.from(x,(B)=>`'${B}'`).join(", ");console.warn(`<${C}> defines ${k}. The elements factory treats on<Event> property `+"names as event-handler sugar — e.g. creator({ onClick }) attaches a "+"'click' listener rather than assigning the property — so these members "+"are shadowed and cannot be set or read via the element creator. Rename by intent: use 'handle<Event>' for a handler function the component invokes (e.g. 'handleClick'), or 'add<Event>Listener' for a method that registers listeners for a synthetic event the component dispatches (e.g. 'addClickListener').")})}_installAttributeQueue(){let y=this.constructor.initAttributes;if(!y)return;let x=new Set(Object.keys(y).map(P1)),h=[];this._pendingAttrOps=h;let C=HTMLElement.prototype;this.setAttribute=(k,B)=>{if(x.has(k))h.push(["set",k,String(B)]);else C.setAttribute.call(this,k,B)},this.removeAttribute=(k)=>{if(x.has(k))h.push(["remove",k]);else C.removeAttribute.call(this,k)},queueMicrotask(()=>this._drainPendingAttrOps())}_drainPendingAttrOps(){let y=this._pendingAttrOps;if(y===void 0)return;this._pendingAttrOps=void 0,delete this.setAttribute,delete this.removeAttribute;let x=new Set;for(let h of y)if(this.hasAttribute(h[1]))x.add(h[1]);for(let h of y)if(h[0]==="set"){if(!x.has(h[1]))this.setAttribute(h[1],h[2])}else x.delete(h[1]),this.removeAttribute(h[1])}_installedAttrAccessors;_setupAttributeAccessors(y){if(!this._attrValues)this._attrValues=new Map;if(!this._installedAttrAccessors)this._installedAttrAccessors=new Set;for(let x of Object.keys(y)){let h=P1(x),C=y[x];if(x==="value"){console.warn(`${this.tagName}: 'value' cannot be an attribute. Use the Component value property instead.`);continue}if(typeof C==="object"&&C!==null){console.warn(`${this.tagName}: initAttributes.${x} is an object. Use a regular property instead.`);continue}if(C===!0)throw Error(`${this.tagName}: static initAttributes.${x} defaults a boolean attribute to true, but HTML boolean attributes are false-by-default (presence = true, absence = false) and `+`cannot reflect a true default — it would silently become false. Use { ${x}: false }, or model it as a string/number attribute or a plain (non-attribute) property.`);let k=this,B=!1;while(k){let w=Object.getOwnPropertyDescriptor(k,x);if(w){if(!w.configurable||w.get||w.set){B=!0;break}break}k=Object.getPrototypeOf(k)}if(B)continue;this._installAttrAccessor(x,h,C)}}_installAttrAccessor(y,x,h){Object.defineProperty(this,y,{enumerable:!1,configurable:!0,get:()=>{if(typeof h==="boolean"){if(this.hasAttribute(x))return!0;if(this._attrValues.has(y))return this._attrValues.get(y);return!1}else if(this.hasAttribute(x))return typeof h==="number"?parseFloat(this.getAttribute(x)):this.getAttribute(x);else if(this._attrValues.has(y))return this._attrValues.get(y);else return h},set:(C)=>{if(typeof h==="boolean"){if(C!==this[y]){if(C)this.setAttribute(x,"");else this.removeAttribute(x);this.queueRender(),this._attrValues.set(y,!!C)}}else if(typeof h==="number"){if(C!==parseFloat(this[y]))this.setAttribute(x,C),this.queueRender(),this._attrValues.set(y,C)}else if(typeof C==="object"||`${C}`!==`${this[y]}`){if(C===null||C===void 0||typeof C==="object")this.removeAttribute(x);else this.setAttribute(x,C);this.queueRender(),this._attrValues.set(y,C)}}}),this._installedAttrAccessors.add(y)}_recoverShadowedAttrAccessors(){let y=this._installedAttrAccessors,x=this.constructor.initAttributes;if(y==null||x==null)return;let h=[];for(let C of y){let k=Object.getOwnPropertyDescriptor(this,C);if(k==null||k.get!=null||k.set!=null)continue;let B=k.value;delete this[C],this._installAttrAccessor(C,P1(C),x[C]),this[C]=B,h.push(C)}if(h.length>0&&!H8.has(this.tagName)){H8.add(this.tagName);let C=h.map((k)=>`'${k}'`).join(", ");console.warn(`<${this.tagName.toLowerCase()}> declares instance field(s) ${C} that shadow static initAttributes accessors (class fields use [[Define]] semantics). The field value was adopted and the `+"reactive accessor restored — delete the field declaration; "+"static initAttributes already defines the property.")}}connectedCallback(){if(this._recoverShadowedAttrAccessors(),this._drainPendingAttrOps(),jh(this.constructor.tagName),this.hydrate(),this.role!=null)this.setAttribute("role",this.role);if(this.constructor.formAssociated&&!this.hasAttribute("tabindex"))this.setAttribute("tabindex","0");let y=this.handleResize??this.onResize;if(y!==void 0){if(I5.observe(this),this._onResize==null)this._onResize=y.bind(this);this.addEventListener("resize",this._onResize)}if(this.value!=null&&this.getAttribute("value")!=null)this._value=this.getAttribute("value");if(this.internals&&this.value!==void 0)this.internals.setFormValue(this.value),this.validateValue();this.queueRender()}disconnectedCallback(){I5.unobserve(this)}formResetCallback(){if(this.value!==void 0)this.value=this.defaultValue??""}formDisabledCallback(y){if(y)this.setAttribute("disabled","");else this.removeAttribute("disabled")}formStateRestoreCallback(y){if(this.value!==void 0&&typeof y==="string")this.value=y}_changeQueued=!1;_renderQueued=!1;queueRender(y=!1){if(!this._hydrated)return;if(!this._changeQueued)this._changeQueued=y;if(!this._renderQueued)this._renderQueued=!0,requestAnimationFrame(()=>{if(this._changeQueued){if(s8(this,"change",{bubbles:!0,composed:!0}),this.internals&&this.value!==void 0)this.internals.setFormValue(this.value)}this._changeQueued=!1,this._renderQueued=!1,this.render()})}_hydrated=!1;_whenHydrated;_resolveHydrated;get hydrated(){return this._hydrated}get whenHydrated(){if(this._hydrated)return Promise.resolve();if(this._whenHydrated==null)this._whenHydrated=new Promise((y)=>{this._resolveHydrated=y});return this._whenHydrated}hydrate(){if(!this._hydrated){this.initValue();let y=typeof this.content!=="function",x=typeof this.content==="function"?this.content(G):this.content;if(Array.isArray(x)){let B={};x=x.filter((w)=>{if(w instanceof Node||typeof w==="string"||typeof w==="number"||A1(w))return!0;return Object.assign(B,w),!1});for(let w of Object.keys(B))m5(this,w,B[w])}let h=this.constructor,C=h.shadowStyleSpec??h.styleSpec;if(h.styleSpec&&!h.shadowStyleSpec)q1("static-styleSpec","static styleSpec is deprecated. Use static shadowStyleSpec instead.");let{styleNode:k}=h;if(C)k=h.styleNode=G.style(W2(C)),delete h.styleNode;if(this.styleNode)console.warn(this,"styleNode is deprecated, use static shadowStyleSpec instead"),k=this.styleNode;if(k){let B=this.attachShadow({mode:"open"});if(B.appendChild(k.cloneNode(!0)),A8(B,x,y),!D8.has(this.tagName)&&B.querySelector(o0)!=null)D8.add(this.tagName),console.warn(`<${this.tagName.toLowerCase()}> has data-binding sugar in its shadow-DOM content, where bindings do not operate. A shadow-DOM component is bound like an <input>: bind its VALUE from outside (bindings.value) and implement render() to reflect value into `+"the shadow DOM — setting value queues render() and emits change "+"automatically. on() event handlers are fine. Warned once per component class.")}else if(x!==null){let B=Array.from(this.childNodes);if(!y)this._partsCache=Vh(x);A8(this,x,y),this.isSlotted=this.querySelector("slot,tosi-slot,xin-slot")!==null;let w=Array.from(this.querySelectorAll("slot"));if(w.length>0)w.forEach(w4.replaceSlot);if(B.length>0){let g={"":this};Array.from(this.querySelectorAll("tosi-slot,xin-slot")).forEach((z)=>{g[z.name]=z}),B.forEach((z)=>{let q=g[""],j=z instanceof Element?g[z.slot]:q;(j!==void 0?j:q).append(z)})}}this._hydrated=!0,this._parts=void 0,this._resolveHydrated?.()}}render(){if(this._valueChanged&&this.internals&&this.value!==void 0)this.internals.setFormValue(this.value),this.validateValue();this._valueChanged=!1}validateValue(){if(!this.internals||this.value===void 0)return;let y=typeof this.value==="string"?this.value:String(this.value);w6(this,y)}}class w4 extends ${static preferredTagName="tosi-slot";static initAttributes={name:""};content=null;static replaceSlot(y){let x=document.createElement("tosi-slot");if(y.name!=="")x.setAttribute("name",y.name);while(y.firstChild!=null)x.appendChild(y.firstChild);y.replaceWith(x)}}var Xh=w4.elementCreator();class g6 extends ${static preferredTagName="xin-slot";static initAttributes={name:""};content=null;constructor(){super();q1("xin-slot","<xin-slot> is deprecated. Use <tosi-slot> instead.")}static replaceSlot=w4.replaceSlot}var Ah=g6.elementCreator(),_h=(y=()=>!0)=>{let x=localStorage.getItem("xin-state");if(x!=null){let C=JSON.parse(x);for(let k of Object.keys(C).filter(y))B1[k]=C[k]}let h=w0(()=>{let C={},k=S(B1);for(let B of Object.keys(k).filter(y))C[B]=k[B];localStorage.setItem("xin-state",JSON.stringify(C)),console.log("xin state saved to localStorage")},500);o5((C)=>{let k=C.split(/[.[]/)[0];return y(k)},h)},Kh="tosijs-share",Ph="tosijs-share",e2="shared",Uh=1,T5=new Set,p5=new Set,L5=new Set,c5=new Set,W5=new Map,g2=null,d5="",n0=null,Gh=null;function S8(){if(n0!=null)return Promise.resolve(n0);return new Promise((y,x)=>{let h=indexedDB.open(Ph,Uh);h.onupgradeneeded=()=>{h.result.createObjectStore(e2)},h.onsuccess=()=>{n0=h.result,y(n0)},h.onerror=()=>x(h.error)})}var Qh={async get(y){let x=await S8();return new Promise((h,C)=>{let k=x.transaction(e2,"readonly").objectStore(e2).get(y);k.onsuccess=()=>h(k.result),k.onerror=()=>C(k.error)})},async set(y,x){let h=await S8();return new Promise((C,k)=>{let B=h.transaction(e2,"readwrite");B.objectStore(e2).put(x,y),B.oncomplete=()=>C(),B.onerror=()=>k(B.error)})}};function z6(){return Gh??Qh}function $h(y){return y!=null&&y.type==="tosijs-share"&&typeof y.path==="string"}function e5(y){for(let x of T5)if(y===x||y.startsWith(x+"."))return x;return}function Yh(y){for(let x of p5)if(y===x||y.startsWith(x+"."))return!0;return!1}function q6(y,x){let h=e5(y);if(h!==void 0&&L5.has(h))c5.add(h);p5.add(y),C4(l1,y,x),$1(y),r5().then(()=>{p5.delete(y)})}function ih(){if(g2!=null)return g2;return d5=crypto.randomUUID(),g2=new BroadcastChannel(Kh),g2.onmessage=(y)=>{let x=y.data;if(!$h(x))return;if(x.origin===d5)return;if(e5(x.path)===void 0)return;q6(x.path,x.value)},g2}function Oh(y,x){if(g2==null)return;let h={type:"tosijs-share",path:y,value:x,origin:d5};g2.postMessage(h)}function Fh(y){if(!W5.has(y))W5.set(y,w0(()=>{let x=h1(l1,y);z6().set(y,x)},500));W5.get(y)()}async function Nh(...y){if(typeof BroadcastChannel>"u")return{restored:[]};ih();let x=[],h=z6();for(let C of y){let k=typeof C==="string"?C:A1(C);if(k===void 0)throw Error("share() requires boxed proxies or string paths. Got a non-proxy value.");if(T5.has(k))continue;T5.add(k),L5.add(k);let B=await h.get(k),w=c5.has(k);if(L5.delete(k),c5.delete(k),B!==void 0&&!w)q6(k,B),x.push(C);else if(B===void 0){let g=h1(l1,k);await h.set(k,g)}B0((g)=>g===k||g.startsWith(k+"."),(g)=>{if(Yh(g))return;let z=e5(g);if(z===void 0)return;let q=h1(l1,g);Oh(g,q),Fh(z)})}return{restored:x}}var f5=new Set;function I8(y,x){for(let h of y)if(x===h||x.startsWith(h+"."))return h;return}function Wh(y){for(let x of f5)if(y===x||y.startsWith(x+"."))return!0;return!1}function Jh(y,x){f5.add(y),C4(l1,y,x),$1(y),r5().then(()=>{f5.delete(y)})}async function Zh(y,x,...h){let C=new Set,k=[],B=[],w=x.throttleInterval??100;await y.connect();let g=N2(()=>{if(k.length===0)return;let z=k.splice(0);try{y.send(z)}catch(q){k.unshift(...z),console.error("sync: transport.send failed; deltas requeued and will retry on the next flush",q)}},w);y.onReceive((z)=>{for(let q of z){if(I8(C,q.path)===void 0)continue;Jh(q.path,q.value)}});for(let z of h){let q=typeof z==="string"?z:A1(z);if(q===void 0)throw Error("sync() requires boxed proxies or string paths. Got a non-proxy value.");C.add(q);let j=B0((V)=>V===q||V.startsWith(q+"."),(V)=>{if(Wh(V))return;if(I8(C,V)===void 0)return;let _=h1(l1,V);k.push({path:V,value:_}),g()});B.push(j)}return{disconnect(){for(let z of B)C0(z);B.length=0,C.clear(),k.length=0,y.disconnect()}}}var l6="1.7.8";function e(y){return Object.assign(U1,y),U1}function y3(y){return q1("boxedProxy","boxedProxy is deprecated, please use tosi() instead"),e(y)}var Rh=new FinalizationRegistry((y)=>{y()});function Dh(y,x){let h=T8();U1[h]=y;let C=U1[h],k=()=>{delete B1[h]};if(x)Rh.register(x,k);return[C,k]}function j6(y,x=!1){if(x)return q1("xinProxy-boxed","xinProxy(..., true) is deprecated; use tosi(...) instead"),y3(y);return Object.keys(y).forEach((h)=>{B1[h]=y[h]}),B1}var Hh={};async function x3(y,x){let h=await x(y,{Color:O,Component:$,elements:G,svgElements:B4,mathML:x6,varDefault:A,vars:l,xin:B1,boxed:U1,xinProxy:j6,boxedProxy:y3,tosi:e,makeComponent:x3,bind:f1,on:Z2,version:l6}),{type:C}=h;C.preferredTagName=y;let k=h.lightStyleSpec??h.styleSpec;if(k)C.lightStyleSpec=k;let B={type:C,creator:C.elementCreator()};return Hh[y]=B,B}var g4={":host":{display:"none"}},E0={},vh=(y)=>import(y);async function V6(y,x,h){let C=Array.from(y.querySelectorAll(x)).filter((B)=>B.src),k=await Promise.allSettled(C.map((B)=>B.packaged()));for(let B=0;B<k.length;B++){let w=k[B];if(w.status==="rejected")console.error(`<${h}> failed to load blueprint from "${C[B].src}":`,w.reason)}}class z4 extends ${static preferredTagName="tosi-blueprint";static lightStyleSpec=g4;static initAttributes={tag:"anon-elt",src:"",property:"default"};loaded;blueprintLoaded=(y)=>{};async packaged(){let{tag:y,src:x,property:h}=this,C=`${y}.${h}:${x}`;if(!this.loaded){if(E0[C]===void 0)E0[C]=vh(x).then((k)=>{let B=k[h];return x3(y,B)});else console.log(`using cached ${y} with signature ${C}`);try{this.loaded=await E0[C]}catch(k){throw delete E0[C],k}this.blueprintLoaded(this.loaded)}return this.loaded}}var Mh=z4.elementCreator();class h3 extends ${static preferredTagName="tosi-loader";static lightStyleSpec=g4;allLoaded=()=>{};async load(){await V6(this,"tosi-blueprint, xin-blueprint","tosi-loader"),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var Sh=h3.elementCreator();class X6 extends z4{static preferredTagName="xin-blueprint";static lightStyleSpec=g4;constructor(){super();q1("xin-blueprint","<xin-blueprint> is deprecated. Use <tosi-blueprint> instead.")}}var Ih=X6.elementCreator();class A6 extends ${static preferredTagName="xin-loader";static lightStyleSpec=g4;allLoaded=()=>{};constructor(){super();q1("xin-loader","<xin-loader> is deprecated. Use <tosi-loader> instead.")}async load(){await V6(this,"xin-blueprint","xin-loader"),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var bh=A6.elementCreator();var C3={};class R2 extends ${static preferredTagName="tosi-ab";static set conditions(y){Object.assign(C3,y);for(let x of[...R2.instances])x.queueRender()}static initAttributes={condition:"",not:!1};static instances=new Set;connectedCallback(){super.connectedCallback(),R2.instances.add(this)}disconnectedCallback(){super.disconnectedCallback(),R2.instances.delete(this)}render(){if(this.condition!==""&&(this.not?C3[this.condition]!==!0:C3[this.condition]===!0))this.toggleAttribute("hidden",!1);else this.toggleAttribute("hidden",!0)}}var Th=R2.elementCreator();var q4={};function S1(y,x){if(q4[y]===void 0){if(x!==void 0){let C=globalThis[x];q4[y]=Promise.resolve({[x]:C})}let h=G.script({src:y});document.head.append(h),q4[y]=new Promise((C)=>{h.onload=()=>C(globalThis)})}return q4[y]}var k3={};function l4(y){if(k3[y]===void 0){let x=G.link({rel:"stylesheet",type:"text/css",href:y});document.head.append(x),k3[y]=new Promise((h)=>{x.onload=h})}return k3[y]}var j2={blueprint:'<svg class="color" viewBox="0 0 24 24"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10.5,14.5 C10.5,14.5,7.5,15.5,7.5,17.5 C7.5,19.5,10.5,19.5,10.5,19.5"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M18.5,14.5 C18.5,14.5,21.5,15.5,21.5,17.5 C21.5,19.5,18.5,19.5,18.5,19.5"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M7,5.09 C7,3.94,7.9,3,9,3 C9,3,20,3,20,3 C21.1,3,22,3.94,22,5.09 C22,5.09,22,12.41,22,12.41 C22,13.56,21.1,14.5,20,14.5 C20,14.5,9,14.5,9,14.5 C7.9,14.5,7,13.56,7,12.41 C7,12.41,7,5.09,7,5.09 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14.5,5.5 C14.5,5.5,14.5,11.5,14.5,11.5"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16.5,7.5 C16.5,7.5,16.5,8.5,16.5,8.5"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.5,7.5 C12.5,7.5,12.5,8.5,12.5,8.5"/><g/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M18.5,21.5 C18.5,21.5,17.5,20.5,17.5,20.5 C17.5,20.5,16.5,21.5,16.5,21.5"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.5,21.5 C12.5,21.5,11.5,20.5,11.5,20.5 C11.5,20.5,10.5,21.5,10.5,21.5"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10.5,14.5 C10.5,14.5,18.5,14.5,18.5,14.5 C18.5,14.5,18.5,19.5,18.5,19.5 C18.5,19.5,10.5,19.5,10.5,19.5 C10.5,19.5,10.5,14.5,10.5,14.5 z"/><g><g><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14,16.5 C14,16.5,16,16.5,16,16.5 C16,16.5,14.53,19.5,14.53,19.5"/><path style="fill:#5e78ca;fill-rule:evenodd;stroke:none;" d="M3.59,8.5 C3.59,8.5,12.59,8.5,12.59,8.5 C12.59,8.5,14.53,19.5,14.53,19.5 C14.53,19.5,5.53,19.5,5.53,19.5 C5.53,19.5,3.59,8.5,3.59,8.5 z"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.59,8.5 C12.59,8.5,11.12,11.5,11.12,11.5 C11.12,11.5,2.12,11.5,2.12,11.5 C2.12,11.5,3.59,8.5,3.59,8.5"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.59,8.5 C12.59,8.5,14.53,19.5,14.53,19.5"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M4.12,11.5 C4.12,11.5,5.53,19.5,5.53,19.5"/></g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M9.24,12.5 C10.75,12.5,12.2,13.73,12.46,15.24 C12.46,15.24,12.46,15.24,12.46,15.24 C12.68,16.49,11.85,17.5,10.6,17.5 C10.6,17.5,10.55,17.5,10.55,17.5 C10.17,17.5,9.92,17.81,9.98,18.19 C9.98,18.19,9.98,18.19,9.98,18.19 C10.21,19.47,9.36,20.5,8.08,20.5 C8.08,20.5,6.39,20.5,6.39,20.5 C5.1,20.5,3.87,19.45,3.64,18.16 C3.64,18.16,3.12,15.21,3.12,15.21 C2.86,13.71,3.86,12.5,5.35,12.5 C5.35,12.5,9.24,12.5,9.24,12.5 z"/></g></g></svg> ',earth:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#a3d9ff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7,13.46 C5.1,16.52,4,20.13,4,24 C4,31.81,8.47,38.57,15,41.87 C15,41.87,15,31,15,31 C15,31,9,29,9,29 C9,29,9,19,9,19 C9,19,7,15,7,15 C7,15,7,13.46,7,13.46 z"/><path style="fill:#a3d9ff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M18.4,4.79 C20.18,4.28,22.06,4,24,4 C27.57,4,30.92,4.93,33.82,6.57 C33.82,6.57,29,13,29,13 C29,13,31,19,31,19 C31,19,37,21,37,21 C37,21,39,29,39,29 C39,29,37.35,38.89,37.35,38.89 C33.81,42.07,29.13,44,24,44 C21.03,44,18.22,43.35,15.69,42.2 C15.69,42.2,27,29,27,29 C27,29,27,25,27,25 C27,25,21,23,21,23 C21,23,15,19,15,19 C15,19,11,19,11,19 C11,19,11,13,11,13 C11,13,13,11,13,11 C13,11,15,15,15,15 C15,15,17,15,17,15 C17,15,17,9,17,9 C17,9,18.4,4.79,18.4,4.79 z"/><path style="fill:#274e42;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M18.4,4.79 C18.4,4.79,17,9,17,9 C17,9,17,15,17,15 C17,15,15,15,15,15 C15,15,13,11,13,11 C13,11,11,13,11,13 C11,13,11,19,11,19 C11,19,15,19,15,19 C15,19,21,23,21,23 C21,23,27,25,27,25 C27,25,27,29,27,29 C27,29,15.69,42.2,15.69,42.2 C15.46,42.09,15.23,41.98,15,41.87 C15,41.87,15,31,15,31 C15,31,9,29,9,29 C9,29,9,19,9,19 C9,19,7,15,7,15 C7,15,7,13.46,7,13.46 C9.57,9.32,13.62,6.19,18.4,4.79 z"/><path style="fill:#274e42;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M33.82,6.57 C33.82,6.57,29,13,29,13 C29,13,31,19,31,19 C31,19,37,21,37,21 C37,21,39,29,39,29 C39,29,37.35,38.89,37.35,38.89 C41.43,35.23,44,29.91,44,24 C44,16.52,39.9,10,33.82,6.57 z"/></g></g></g></svg> ',cmy:'<svg class="color filled" viewBox="0 0 24 24"><g><g><path style="fill:#00ff00;fill-rule:evenodd;" d="M12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C6.37,11.85,7.87,13.42,9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 z"/><path style="fill:#0000ff;fill-rule:evenodd;" d="M12,10.88 C13.1,10.01,14.49,9.5,16,9.5 C16.78,9.5,17.53,9.64,18.22,9.89 C17.63,11.85,16.13,13.42,14.22,14.11 C13.83,12.81,13.04,11.69,12,10.88 C12,10.88,12,10.88,12,10.88 z"/><path style="fill:#000000;fill-rule:evenodd;" d="M9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 C13.04,11.69,13.83,12.81,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#ff0000;fill-rule:evenodd;" d="M9.78,14.11 C9.6,14.71,9.5,15.34,9.5,16 C9.5,18.08,10.48,19.93,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#02fefe;fill-rule:evenodd;" d="M5.78,9.89 C5.6,9.29,5.5,8.66,5.5,8 C5.5,4.41,8.41,1.5,12,1.5 C15.59,1.5,18.5,4.41,18.5,8 C18.5,8.66,18.4,9.29,18.22,9.89 C17.53,9.64,16.78,9.5,16,9.5 C14.49,9.5,13.1,10.01,12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#fffe00;fill-rule:evenodd;" d="M5.78,9.89 C3.28,10.8,1.5,13.19,1.5,16 C1.5,19.59,4.41,22.5,8,22.5 C9.51,22.5,10.9,21.99,12,21.12 C10.48,19.93,9.5,18.08,9.5,16 C9.5,15.34,9.6,14.71,9.78,14.11 C7.87,13.42,6.37,11.85,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#ff00ff;fill-rule:evenodd;" d="M18.22,9.89 C20.72,10.8,22.5,13.19,22.5,16 C22.5,19.59,19.59,22.5,16,22.5 C14.49,22.5,13.1,21.99,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C16.13,13.42,17.63,11.85,18.22,9.89 z"/></g></g></svg> ',rgb:'<svg class="color filled" viewBox="0 0 24 24"><g><g><path style="fill:#ff00ff;fill-rule:evenodd;" d="M12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C6.37,11.85,7.87,13.42,9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 z"/><path style="fill:#ffff00;fill-rule:evenodd;" d="M12,10.88 C13.1,10.01,14.49,9.5,16,9.5 C16.78,9.5,17.53,9.64,18.22,9.89 C17.63,11.85,16.13,13.42,14.22,14.11 C13.83,12.81,13.04,11.69,12,10.88 C12,10.88,12,10.88,12,10.88 z"/><path style="fill:#ffffff;fill-rule:evenodd;" d="M9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 C13.04,11.69,13.83,12.81,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#00ffff;fill-rule:evenodd;" d="M9.78,14.11 C9.6,14.71,9.5,15.34,9.5,16 C9.5,18.08,10.48,19.93,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#ff0000;fill-rule:evenodd;" d="M5.78,9.89 C5.6,9.29,5.5,8.66,5.5,8 C5.5,4.41,8.41,1.5,12,1.5 C15.59,1.5,18.5,4.41,18.5,8 C18.5,8.66,18.4,9.29,18.22,9.89 C17.53,9.64,16.78,9.5,16,9.5 C14.49,9.5,13.1,10.01,12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#0000ff;fill-rule:evenodd;" d="M5.78,9.89 C3.28,10.8,1.5,13.19,1.5,16 C1.5,19.59,4.41,22.5,8,22.5 C9.51,22.5,10.9,21.99,12,21.12 C10.48,19.93,9.5,18.08,9.5,16 C9.5,15.34,9.6,14.71,9.78,14.11 C7.87,13.42,6.37,11.85,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#00ff00;fill-rule:evenodd;" d="M18.22,9.89 C20.72,10.8,22.5,13.19,22.5,16 C22.5,19.59,19.59,22.5,16,22.5 C14.49,22.5,13.1,21.99,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C16.13,13.42,17.63,11.85,18.22,9.89 z"/></g></g></svg> ',xrColor:'<svg class="color filled" viewBox="0 0 40 24"><g><g><g><path style="fill:#000000;fill-rule:evenodd;" d="M20,2 C19.99,2,19.98,2,19.98,2 C8.39,2,2,3.61,2,12 C2,18.41,5.32,22,10.54,22 C15.77,22,17.37,17.85,19.98,17.85 C19.98,17.85,19.99,17.85,20,17.85 C20.01,17.85,20.02,17.85,20.02,17.85 C22.63,17.85,24.23,22,29.46,22 C34.68,22,38,18.41,38,12 C38,3.61,31.61,2,20.02,2 C20.02,2,20.01,2,20,2 C20,2,20,2,20,2 z"/></g><path style="fill:#fbed21;fill-rule:evenodd;" d="M12.2,19.84 C15.79,19.39,17.07,16.46,19.07,16.46 C19.07,16.46,19.08,16.46,19.09,16.46 C19.09,16.46,19.1,16.46,19.11,16.46 C19.44,16.46,19.75,16.54,20.06,16.68 C20.37,16.54,20.68,16.46,21.01,16.46 C21.02,16.46,21.02,16.46,21.03,16.46 C21.04,16.46,21.04,16.46,21.05,16.46 C23.05,16.46,24.33,19.39,27.92,19.84 C31.66,19.4,33.98,16.5,33.98,11.62 C33.98,4.91,29.04,3.44,20.06,3.35 C11.07,3.44,6.14,4.91,6.14,11.62 C6.14,16.5,8.46,19.4,12.2,19.84 z"/><path style="fill:#8cc63f;fill-rule:evenodd;" d="M12.2,19.84 C12.52,19.87,12.86,19.89,13.21,19.89 C16.86,19.89,18.37,17.43,20.06,16.68 C19.75,16.54,19.44,16.46,19.11,16.46 C19.1,16.46,19.09,16.46,19.09,16.46 C19.08,16.46,19.07,16.46,19.07,16.46 C17.07,16.46,15.79,19.39,12.2,19.84 z"/><path style="fill:#8cc63f;fill-rule:evenodd;" d="M20.06,3.35 C20.37,3.35,20.69,3.35,21.01,3.35 C21.02,3.35,21.02,3.35,21.03,3.35 C21.03,3.35,21.03,3.35,21.03,3.35 C21.04,3.35,21.04,3.35,21.05,3.35 C30.64,3.35,35.92,4.68,35.92,11.62 C35.92,16.92,33.18,19.89,28.86,19.89 C28.53,19.89,28.22,19.87,27.92,19.84 C31.66,19.4,33.98,16.5,33.98,11.62 C33.98,4.91,29.04,3.44,20.06,3.35 C20.06,3.35,20.06,3.35,20.06,3.35 z"/><path style="fill:#ff1c23;fill-rule:evenodd;" d="M20.06,16.68 C21.74,17.43,23.25,19.89,26.91,19.89 C27.26,19.89,27.59,19.87,27.92,19.84 C24.33,19.39,23.05,16.46,21.05,16.46 C21.04,16.46,21.04,16.46,21.03,16.46 C21.02,16.46,21.02,16.46,21.01,16.46 C20.68,16.46,20.37,16.54,20.06,16.68 z"/><path style="fill:#ff1c23;fill-rule:evenodd;" d="M12.2,19.84 C11.9,19.87,11.59,19.89,11.26,19.89 C6.94,19.89,4.19,16.92,4.19,11.62 C4.19,4.68,9.48,3.35,19.07,3.35 C19.07,3.35,19.08,3.35,19.09,3.35 C19.09,3.35,19.09,3.35,19.09,3.35 C19.09,3.35,19.1,3.35,19.11,3.35 C19.43,3.35,19.75,3.35,20.06,3.35 C11.07,3.44,6.14,4.91,6.14,11.62 C6.14,16.5,8.46,19.4,12.2,19.84 z"/></g><g><path style="fill:#8cc63e;fill-rule:nonzero;" d="M22.55,8.63 C22.55,9.05,22.55,9.46,22.55,9.88 C22.54,10.25,22.85,10.56,23.2,10.55 C23.54,10.56,23.85,10.25,23.85,9.88 C23.85,9.46,23.85,9.05,23.85,8.63 C23.85,8.26,23.54,7.95,23.2,7.96 C22.85,7.95,22.54,8.26,22.55,8.63 z"/><path style="fill:#8cc63e;fill-rule:nonzero;" d="M17.32,8.63 C17.32,9.05,17.32,9.46,17.32,9.88 C17.31,10.25,17.62,10.56,17.97,10.55 C18.31,10.56,18.62,10.25,18.62,9.88 C18.62,9.46,18.62,9.05,18.62,8.63 C18.62,8.26,18.31,7.95,17.97,7.96 C17.62,7.95,17.31,8.26,17.32,8.63 z"/><path style="fill:#8cc63e;fill-rule:nonzero;" d="M19.99,4.39 C19.99,8.09,19.99,11.8,19.99,15.5 C19.99,15.87,20.3,16.18,20.64,16.17 C20.99,16.18,21.3,15.87,21.29,15.5 C21.29,11.8,21.29,8.09,21.29,4.39 C21.3,4.02,20.99,3.71,20.64,3.72 C20.3,3.71,19.99,4.02,19.99,4.39 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M21.43,8.63 C21.43,9.05,21.43,9.46,21.43,9.88 C21.42,10.25,21.73,10.56,22.08,10.55 C22.42,10.56,22.73,10.25,22.73,9.88 C22.73,9.46,22.73,9.05,22.73,8.63 C22.73,8.26,22.42,7.95,22.08,7.96 C21.73,7.95,21.42,8.26,21.43,8.63 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M16.2,8.63 C16.2,9.05,16.2,9.46,16.2,9.88 C16.19,10.25,16.5,10.56,16.85,10.55 C17.19,10.56,17.5,10.25,17.5,9.88 C17.5,9.46,17.5,9.05,17.5,8.63 C17.5,8.26,17.19,7.95,16.85,7.96 C16.5,7.95,16.19,8.26,16.2,8.63 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M18.87,4.39 C18.87,8.09,18.87,11.8,18.87,15.5 C18.87,15.87,19.18,16.18,19.52,16.17 C19.86,16.18,20.18,15.87,20.17,15.5 C20.17,11.8,20.17,8.09,20.17,4.39 C20.18,4.02,19.86,3.71,19.52,3.72 C19.18,3.71,18.87,4.02,18.87,4.39 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M21.97,8.63 C21.97,9.05,21.97,9.46,21.97,9.88 C21.97,10.25,22.28,10.56,22.62,10.55 C22.97,10.56,23.28,10.25,23.27,9.88 C23.27,9.46,23.27,9.05,23.27,8.63 C23.28,8.26,22.97,7.95,22.62,7.96 C22.28,7.95,21.97,8.26,21.97,8.63 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M16.74,8.63 C16.74,9.05,16.74,9.46,16.74,9.88 C16.74,10.25,17.05,10.56,17.39,10.55 C17.74,10.56,18.05,10.25,18.04,9.88 C18.04,9.46,18.04,9.05,18.04,8.63 C18.05,8.26,17.74,7.95,17.39,7.96 C17.05,7.95,16.74,8.26,16.74,8.63 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M19.41,4.39 C19.41,8.09,19.41,11.8,19.41,15.5 C19.41,15.87,19.72,16.18,20.07,16.17 C20.41,16.18,20.72,15.87,20.72,15.5 C20.72,11.8,20.72,8.09,20.72,4.39 C20.72,4.02,20.41,3.71,20.07,3.72 C19.72,3.71,19.41,4.02,19.41,4.39 z"/></g></g></svg> ',tosiFavicon:'<svg class="color" viewBox="0 0 48 48"><g><g><path style="fill:#ed247b;fill-rule:evenodd;stroke:none;" d="M1,9 C1,4.58,4.58,1,9,1 C9,1,39,1,39,1 C43.42,1,47,4.58,47,9 C47,9,47,39,47,39 C47,43.42,43.42,47,39,47 C39,47,9,47,9,47 C4.58,47,1,43.42,1,39 C1,39,1,9,1,9 z"/><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16,29 C16,29,10,31,10,35 C10,39,16,39,16,39"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32,29 C32,29,38,31,38,35 C38,39,32,39,32,39"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9,10.18 C9,7.87,10.79,6,13,6 C13,6,35,6,35,6 C37.21,6,39,7.87,39,10.18 C39,10.18,39,24.82,39,24.82 C39,27.13,37.21,29,35,29 C35,29,13,29,13,29 C10.79,29,9,27.13,9,24.82 C9,24.82,9,10.18,9,10.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24,11 C24,11,24,23,24,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28,15 C28,15,28,17,28,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,15 C20,15,20,17,20,17"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32,43 C32,43,30,41,30,41 C30,41,28,43,28,43"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,43 C20,43,18,41,18,41 C18,41,16,43,16,43"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16,29 C16,29,32,29,32,29 C32,29,32,39,32,39 C32,39,16,39,16,39 C16,39,16,29,16,29 z"/></g></g></g></svg> ',tosiPlatform:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#3ea9f5;fill-rule:evenodd;stroke:none;" d="M23.97,47 C23.97,47,39,47,39,47 C43.42,47,47,43.42,47,39 C47,39,47,9,47,9 C47,4.58,43.42,1,39,1 C39,1,9,1,9,1 C4.58,1,1,4.58,1,9 C1,9,1,39,1,39 C1,41.64,2.28,43.98,4.25,45.44 C4.09,44.82,4,44.17,4,43.5 C4,39.36,7.36,36,11.5,36 C15.14,36,18.18,38.6,18.86,42.05 C19.07,42.02,19.28,42,19.5,42 C21.99,42,24,44.01,24,46.5 C24,46.67,23.99,46.84,23.97,47 z"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:none;" d="M4.25,45.44 C4.09,44.82,4,44.17,4,43.5 C4,39.36,7.36,36,11.5,36 C15.14,36,18.18,38.6,18.86,42.05 C19.07,42.02,19.28,42,19.5,42 C21.99,42,24,44.01,24,46.5 C24,46.67,23.99,46.84,23.97,47 C23.97,47,9,47,9,47 C7.22,47,5.58,46.42,4.25,45.44 z"/></g><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M35,35 C35,35,32.17,35,32.17,35 C32.17,35,32.17,37.83,32.17,37.83"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31,39 C31,39,28.17,39,28.17,39 C28.17,39,28.17,41.83,28.17,41.83"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7.48,16 C4.45,16,2,18.45,2,21.48 C2,21.48,2,21.48,2,21.48 C2,23.98,4.02,26,6.52,26 C6.52,26,6.62,26,6.62,26 C7.38,26,8,26.62,8,27.38 C8,27.38,8,27.38,8,27.38 C8,29.93,10.07,32,12.62,32 C12.62,32,16,32,16,32 C18.58,32,20.68,29.91,20.68,27.32 C20.68,27.32,20.68,21.42,20.68,21.42 C20.68,18.43,18.25,16,15.26,16 C15.26,16,7.48,16,7.48,16 z"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,29 C17,29,33,29,33,29 C33,29,33,29,33,29 C33,34.52,28.52,39,23,39 C23,39,23,39,23,39 C19.69,39,17,36.31,17,33 C17,33,17,29,17,29 z"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M40.52,16 C43.55,16,46,18.45,46,21.48 C46,21.48,46,21.48,46,21.48 C46,23.98,43.98,26,41.48,26 C41.48,26,41.38,26,41.38,26 C40.62,26,40,26.62,40,27.38 C40,27.38,40,27.38,40,27.38 C40,29.93,37.93,32,35.38,32 C35.38,32,32,32,32,32 C29.42,32,27.32,29.91,27.32,27.32 C27.32,27.32,27.32,21.42,27.32,21.42 C27.32,18.43,29.75,16,32.74,16 C32.74,16,40.52,16,40.52,16 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M6,10.18 C6,7.87,7.79,6,10,6 C10,6,32,6,32,6 C34.21,6,36,7.87,36,10.18 C36,10.18,36,24.82,36,24.82 C36,27.13,34.21,29,32,29 C32,29,10,29,10,29 C7.79,29,6,27.13,6,24.82 C6,24.82,6,10.18,6,10.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M21,11 C21,11,21,23,21,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M25,15 C25,15,25,17,25,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,15 C17,15,17,17,17,17"/></g></g></g></svg> ',tosiUi:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M3,33 C3,31.9,3.9,31,5,31 C5,31,43,31,43,31 C44.1,31,45,31.9,45,33 C45,33,45,43,45,43 C45,44.1,44.1,45,43,45 C43,45,5,45,5,45 C3.9,45,3,44.1,3,43 C3,43,3,33,3,33 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#ed247b;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7,35 C7,35,7,36.34,7,38 C7,39.66,8.34,41,10,41 C11.66,41,13,39.66,13,38 C13,36.34,13,35,13,35"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#ed247b;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,35 C17,35,17,41,17,41"/></g><g><path style="fill:#ed247b;fill-rule:evenodd;stroke:none;" d="M38,33 C40.76,33,43,35.24,43,38 C43,40.76,40.76,43,38,43 C35.24,43,33,40.76,33,38 C33,35.24,35.24,33,38,33 z"/><path style="fill:#ed247b;fill-rule:nonzero;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M40,36 C40,36,36,40,36,40"/><path style="fill:#ed247b;fill-rule:nonzero;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M36,36 C36,36,40,40,40,40"/></g></g><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M15.97,21.01 C15.97,21.01,9.97,23.01,9.97,27.01 C9.97,31.01,15.97,31.01,15.97,31.01"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31.97,21.01 C31.97,21.01,37.97,23.01,37.97,27.01 C37.97,31.01,31.97,31.01,31.97,31.01"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31,33 C31,33,29.49,31,29.49,31 C29.49,31,27.97,33,27.97,33"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M19.97,33 C19.97,33,17.97,31,17.97,31 C17.97,31,15.97,33,15.97,33"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M15.97,21 C15.97,21,31.97,21,31.97,21 C31.97,21,31.97,31,31.97,31 C31.97,31,15.97,31,15.97,31 C15.97,31,15.97,21,15.97,21 z"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9,7.18 C9,4.87,10.79,3,13,3 C13,3,35.02,3,35.02,3 C37.23,3,39.03,4.87,39.03,7.18 C39.03,7.18,39.03,21.82,39.03,21.82 C39.03,24.13,37.23,26,35.02,26 C35.02,26,13,26,13,26 C10.79,26,9,24.13,9,21.82 C9,21.82,9,7.18,9,7.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24,11 C24,11,24,23,24,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28,15 C28,15,28,17,28,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,15 C20,15,20,17,20,17"/></g></g></g></svg> ',tosiXr:'<svg class="color" viewBox="0 0 24 24"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M8,14.25 C8,14.25,5,15.25,5,17.25 C5,19.25,8,19.25,8,19.25"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16,14.25 C16,14.25,19,15.25,19,17.25 C19,19.25,16,19.25,16,19.25"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M4.5,4.85 C4.5,3.69,5.4,2.75,6.5,2.75 C6.5,2.75,17.5,2.75,17.5,2.75 C18.61,2.75,19.5,3.69,19.5,4.85 C19.5,4.85,19.5,12.16,19.5,12.16 C19.5,13.32,18.61,14.25,17.5,14.25 C17.5,14.25,6.5,14.25,6.5,14.25 C5.4,14.25,4.5,13.32,4.5,12.16 C4.5,12.16,4.5,4.85,4.5,4.85 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12,5.25 C12,5.25,12,11.25,12,11.25"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14,7.25 C14,7.25,14,8.25,14,8.25"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10,7.25 C10,7.25,10,8.25,10,8.25"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16,21.25 C16,21.25,15,20.25,15,20.25 C15,20.25,14,21.25,14,21.25"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10,21.25 C10,21.25,9,20.25,9,20.25 C9,20.25,8,21.25,8,21.25"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M8,14.25 C8,14.25,16,14.25,16,14.25 C16,14.25,16,19.25,16,19.25 C16,19.25,8,19.25,8,19.25 C8,19.25,8,14.25,8,14.25 z"/><path style="fill:#ff7bac;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-width:1;" d="M12,4 C12,4,11.99,4,11.99,4 C6.19,4,3,4.73,3,8.5 C3,11.39,4.66,13,7.27,13 C9.88,13,10.68,11.13,11.99,11.13 C11.99,11.13,12,11.13,12,11.13 C12,11.13,12.01,11.13,12.01,11.13 C13.32,11.13,14.12,13,16.73,13 C19.34,13,21,11.39,21,8.5 C21,4.73,17.81,4,12.01,4 C12.01,4,12,4,12,4 C12,4,12,4,12,4 z"/></g></svg> ',tosi:'<svg class="color" viewBox="0 0 48 48"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M38.35,31.7 C39.78,34.37,38.78,37.69,36.11,39.13 C36.11,39.13,36.11,39.13,36.11,39.13 C33.92,40.31,31.18,39.48,29.99,37.29 C29.99,37.29,29.95,37.2,29.95,37.2 C29.58,36.53,28.75,36.27,28.08,36.64 C28.08,36.64,28.08,36.64,28.08,36.64 C25.83,37.84,23.03,37,21.82,34.76 C21.82,34.76,20.22,31.78,20.22,31.78 C18.99,29.5,19.85,26.67,22.12,25.44 C22.12,25.44,27.32,22.65,27.32,22.65 C29.96,21.23,33.24,22.22,34.66,24.85 C34.66,24.85,38.35,31.7,38.35,31.7 z"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M10.65,31.7 C9.22,34.37,10.22,37.69,12.89,39.13 C12.89,39.13,12.89,39.13,12.89,39.13 C15.08,40.31,17.82,39.48,19.01,37.29 C19.01,37.29,19.05,37.2,19.05,37.2 C19.42,36.53,20.25,36.27,20.92,36.64 C20.92,36.64,20.92,36.64,20.92,36.64 C23.17,37.84,25.97,37,27.18,34.76 C27.18,34.76,28.78,31.78,28.78,31.78 C30.01,29.5,29.15,26.67,26.88,25.44 C26.88,25.44,21.68,22.65,21.68,22.65 C19.04,21.23,15.76,22.22,14.34,24.85 C14.34,24.85,10.65,31.7,10.65,31.7 z"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32.5,43 C32.5,43,30.5,41,30.5,41 C30.5,41,28.5,43,28.5,43"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20.5,43 C20.5,43,18.5,41,18.5,41 C18.5,41,16.5,43,16.5,43"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16.5,29 C16.5,29,32.5,29,32.5,29 C32.5,29,32.5,36,32.5,36 C32.5,37.66,31.16,39,29.5,39 C29.5,39,19.5,39,19.5,39 C17.84,39,16.5,37.66,16.5,36 C16.5,36,16.5,29,16.5,29 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9.5,10.18 C9.5,7.87,11.29,6,13.5,6 C13.5,6,35.5,6,35.5,6 C37.71,6,39.5,7.87,39.5,10.18 C39.5,10.18,39.5,24.82,39.5,24.82 C39.5,27.13,37.71,29,35.5,29 C35.5,29,13.5,29,13.5,29 C11.29,29,9.5,27.13,9.5,24.82 C9.5,24.82,9.5,10.18,9.5,10.18 z"/><g><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24.5,11 C24.5,11,24.5,23,24.5,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28.5,15 C28.5,15,28.5,17,28.5,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20.5,15 C20.5,15,20.5,17,20.5,17"/></g></g></g></svg> ',discord:'<svg class="filled" version="1" viewBox="0 0 1013 768"><path d="M858 64c-60-28-131-51-204-64l-5-1c-8 14-17 32-25 51l-1 4c-35-6-75-9-116-9s-81 3-120 9l4-1c-9-22-18-40-28-57l1 3c-79 14-149 36-214 67l5-2c-132 196-168 387-150 575v0c73 55 158 99 250 127l6 2c19-26 38-55 53-85l2-3c-33-13-62-27-89-43l2 1c7-5 14-11 21-16 75 36 163 57 256 57s181-21 260-59l-4 2c7 6 14 11 21 16-25 15-53 29-83 40l-4 1c17 34 36 63 56 90l-1-2c98-30 183-74 259-130l-2 2c21-218-36-407-151-575zM338 524c-50 0-91-45-91-101s40-102 91-102 92 46 91 102-40 101-91 101zM675 524c-50 0-91-45-91-101s40-102 91-102 92 46 91 102-40 101-91 101z"></path></svg> ',facebook:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path></svg>',game:'<svg class="filled" version="1" viewBox="0 0 704 512"><path d="M528 97v-1h-336c-88 0-160 72-160 160s72 160 160 160c52 0 99-25 128-64h64c29 39 76 64 128 64 88 0 160-72 160-160 0-83-63-151-144-159zM288 288h-64v64h-64v-64h-64v-64h64v-64h64v64h64v64zM480 288c-18 0-32-14-32-32s14-32 32-32 32 14 32 32-14 32-32 32zM576 288c-18 0-32-14-32-32 0-18 14-32 32-32s32 14 32 32c0 18-14 32-32 32z"></path></svg> ',google:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M256 0c-141 0-256 115-256 256s115 256 256 256 256-115 256-256-115-256-256-256zM260 448c-106 0-192-86-192-192s86-192 192-192c52 0 95 19 129 50l-52 50c-14-14-39-30-77-30-66 0-119 54-119 121s54 121 119 121c76 0 105-55 109-83h-109v-66h181c2 10 3 19 3 32 0 110-73 188-184 188z"></path></svg> ',npm:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M0 0v512h512v-512h-512zM416 416h-64v-256h-96v256h-160v-320h320v320z"></path></svg> ',youtube:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon></svg>',blog:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10.02 C21,10.02,21,15,21,15 C21,15.53,20.79,16.04,20.41,16.41 C20.04,16.79,19.53,17,19,17 C19,17,7,17,7,17 C5.67,18.33,4.33,19.67,3,21 C3,21,3,5,3,5 C3,4.47,3.21,3.96,3.59,3.59 C3.96,3.21,4.47,3,5,3 C8.53,3,10.49,3,14.02,3"/><path style="" d="M19,2 C19.54,1.46,20.32,1.25,21.05,1.45 C21.78,1.65,22.35,2.22,22.55,2.95 C22.75,3.68,22.54,4.46,22,5 C22,5,15.5,11.5,15.5,11.5 C14.17,11.83,12.83,12.17,11.5,12.5 C11.83,11.17,12.17,9.83,12.5,8.5 C15.67,5.33,15.83,5.17,19,2 z"/><path style="" d="M14.6,3"/><path style="" d="M21,8.77"/><path style="" d="M7,7 C7,7,10,7,10,7"/><path style="" d="M7,10 C7,10,9,10,9,10"/></g></svg> ',bug:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M8,6 C8,3.79,9.79,2,12,2 C14.21,2,16,3.79,16,6 C16,6,8,6,8,6 z"/><path style="" d="M20,7 C20,7,18,9,18,9"/><path style="" d="M20,19 C20,19,18,17,18,17"/><path style="" d="M21,13 C21,13,18,13,18,13"/><path style="" d="M16.44,9 C17.3,9,18,9.7,18,10.56 C18,10.56,18,15,18,15 C18,18.31,15.31,21,12,21 C8.69,21,6,18.31,6,15 C6,15,6,10.56,6,10.56 C6,9.7,6.7,9,7.56,9 C7.56,9,16.44,9,16.44,9 z"/><path style="" d="M4,7 C4,7,6,9,6,9"/><path style="" d="M4,19 C4,19,6,17,6,17"/><path style="" d="M3,13 C3,13,6,13,6,13"/><path style="" d="M12,12 C12,12,12,17,12,17"/></g></svg> ',activity:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>',airplay:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon></svg>',alertCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',alertOctagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',alertTriangle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',alignCenter:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="10" x2="6" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="18" y1="18" x2="6" y2="18"></line></svg>',alignJustify:'<svg class="stroked" viewBox="0 0 24 24"><line x1="21" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="3" y2="18"></line></svg>',alignLeft:'<svg class="stroked" viewBox="0 0 24 24"><line x1="17" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="17" y1="18" x2="3" y2="18"></line></svg>',alignRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="21" y1="10" x2="7" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="7" y2="18"></line></svg>',anchor:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="5" r="3"></circle><line x1="12" y1="22" x2="12" y2="8"></line><path d="M5 12H2a10 10 0 0 0 20 0h-3"></path></svg>',aperture:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="14.31" y1="8" x2="20.05" y2="17.94"></line><line x1="9.69" y1="8" x2="21.17" y2="8"></line><line x1="7.38" y1="12" x2="13.12" y2="2.06"></line><line x1="9.69" y1="16" x2="3.95" y2="6.06"></line><line x1="14.31" y1="16" x2="2.83" y2="16"></line><line x1="16.62" y1="12" x2="10.88" y2="21.94"></line></svg>',archive:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line></svg>',arrowUpRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline></svg>',atSign:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"></path></svg>',award:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline></svg>',barChart2:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="20" x2="18" y2="10"></line><line x1="12" y1="20" x2="12" y2="4"></line><line x1="6" y1="20" x2="6" y2="14"></line></svg>',barChart:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="20" x2="12" y2="10"></line><line x1="18" y1="20" x2="18" y2="4"></line><line x1="6" y1="20" x2="6" y2="16"></line></svg>',batteryCharging:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 18H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3.19M15 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-3.19"></path><line x1="23" y1="13" x2="23" y2="11"></line><polyline points="11 6 7 12 13 12 9 18"></polyline></svg>',battery:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="6" width="18" height="12" rx="2" ry="2"></rect><line x1="23" y1="13" x2="23" y2="11"></line></svg>',bellOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M13.73 21a2 2 0 0 1-3.46 0"></path><path d="M18.63 13A17.89 17.89 0 0 1 18 8"></path><path d="M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14"></path><path d="M18 8a6 6 0 0 0-9.33-5"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',bell:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>',bluetooth:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6.5 6.5 17.5 17.5 12 23 12 1 17.5 6.5 6.5 17.5"></polyline></svg>',bold:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path><path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path></svg>',bookOpen:'<svg class="stroked" viewBox="0 0 24 24"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path></svg>',book:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg>',bookmark:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path></svg>',box:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',briefcase:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path></svg>',calendar:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>',cameraOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M21 21H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3m3-3h6l2 3h4a2 2 0 0 1 2 2v9.34m-7.72-2.06a4 4 0 1 1-5.56-5.56"></path></svg>',camera:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle></svg>',cast:'<svg class="stroked" viewBox="0 0 24 24"><path d="M2 16.1A5 5 0 0 1 5.9 20M2 12.05A9 9 0 0 1 9.95 20M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"></path><line x1="2" y1="20" x2="2.01" y2="20"></line></svg>',checkCircle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>',checkSquare:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 11 12 14 22 4"></polyline><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></svg>',check:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"></polyline></svg>',chrome:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="21.17" y1="8" x2="12" y2="8"></line><line x1="3.95" y1="6.06" x2="8.54" y2="14"></line><line x1="10.88" y1="21.94" x2="15.46" y2="14"></line></svg>',circle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle></svg>',clipboard:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect></svg>',clock:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>',cloudDrizzle:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="19" x2="8" y2="21"></line><line x1="8" y1="13" x2="8" y2="15"></line><line x1="16" y1="19" x2="16" y2="21"></line><line x1="16" y1="13" x2="16" y2="15"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="12" y1="15" x2="12" y2="17"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>',cloudLightning:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 16.9A5 5 0 0 0 18 7h-1.26a8 8 0 1 0-11.62 9"></path><polyline points="13 11 9 17 15 17 11 23"></polyline></svg>',cloudOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.61 16.95A5 5 0 0 0 18 10h-1.26a8 8 0 0 0-7.05-6M5 5a8 8 0 0 0 4 15h9a5 5 0 0 0 1.7-.3"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',cloudRain:'<svg class="stroked" viewBox="0 0 24 24"><line x1="16" y1="13" x2="16" y2="21"></line><line x1="8" y1="13" x2="8" y2="21"></line><line x1="12" y1="15" x2="12" y2="23"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>',cloudSnow:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20 17.58A5 5 0 0 0 18 8h-1.26A8 8 0 1 0 4 16.25"></path><line x1="8" y1="16" x2="8.01" y2="16"></line><line x1="8" y1="20" x2="8.01" y2="20"></line><line x1="12" y1="18" x2="12.01" y2="18"></line><line x1="12" y1="22" x2="12.01" y2="22"></line><line x1="16" y1="16" x2="16.01" y2="16"></line><line x1="16" y1="20" x2="16.01" y2="20"></line></svg>',cloud:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"></path></svg>',code:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg>',codepen:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"></polygon><line x1="12" y1="22" x2="12" y2="15.5"></line><polyline points="22 8.5 12 15.5 2 8.5"></polyline><polyline points="2 15.5 12 8.5 22 15.5"></polyline><line x1="12" y1="2" x2="12" y2="8.5"></line></svg>',codesandbox:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="7.5 4.21 12 6.81 16.5 4.21"></polyline><polyline points="7.5 19.79 7.5 14.6 3 12"></polyline><polyline points="21 12 16.5 14.6 16.5 19.79"></polyline><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',coffee:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 8h1a4 4 0 0 1 0 8h-1"></path><path d="M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z"></path><line x1="6" y1="1" x2="6" y2="4"></line><line x1="10" y1="1" x2="10" y2="4"></line><line x1="14" y1="1" x2="14" y2="4"></line></svg>',columns:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18"></path></svg>',command:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"></path></svg>',compass:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"></polygon></svg>',copy:'<svg class="stroked" viewBox="0 0 24 24"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>',cpu:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line><line x1="9" y1="20" x2="9" y2="23"></line><line x1="15" y1="20" x2="15" y2="23"></line><line x1="20" y1="9" x2="23" y2="9"></line><line x1="20" y1="14" x2="23" y2="14"></line><line x1="1" y1="9" x2="4" y2="9"></line><line x1="1" y1="14" x2="4" y2="14"></line></svg>',creditCard:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line></svg>',crop:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6.13 1L6 16a2 2 0 0 0 2 2h15"></path><path d="M1 6.13L16 6a2 2 0 0 1 2 2v15"></path></svg>',crosshair:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="22" y1="12" x2="18" y2="12"></line><line x1="6" y1="12" x2="2" y2="12"></line><line x1="12" y1="6" x2="12" y2="2"></line><line x1="12" y1="22" x2="12" y2="18"></line></svg>',database:'<svg class="stroked" viewBox="0 0 24 24"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path></svg>',delete:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"></path><line x1="18" y1="9" x2="12" y2="15"></line><line x1="12" y1="9" x2="18" y2="15"></line></svg>',disc:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="3"></circle></svg>',divideCircle:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line><circle cx="12" cy="12" r="10"></circle></svg>',divideSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line></svg>',divide:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="6" r="2"></circle><line x1="5" y1="12" x2="19" y2="12"></line><circle cx="12" cy="18" r="2"></circle></svg>',dollarSign:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path></svg>',downloadCloud:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="8 17 12 21 16 17"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29"></path></svg>',download:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>',dribbble:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M8.56 2.75c4.37 6.03 6.02 9.42 8.03 17.72m2.54-15.38c-3.72 4.35-8.94 5.66-16.88 5.85m19.5 1.9c-3.5-.93-6.63-.82-8.94 0-2.58.92-5.01 2.86-7.44 6.32"></path></svg>',droplet:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"></path></svg>',edit2:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>',edit3:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 20h9"></path><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg>',edit:'<svg class="stroked" viewBox="0 0 24 24"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg>',externalLink:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>',eyeOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',eye:'<svg class="stroked" viewBox="0 0 24 24"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>',fastForward:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="13 19 22 12 13 5 13 19"></polygon><polygon points="2 19 11 12 2 5 2 19"></polygon></svg>',feather:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line></svg>',figma:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z"></path><path d="M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z"></path><path d="M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 1 1-7 0z"></path><path d="M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z"></path><path d="M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z"></path></svg>',fileMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="9" y1="15" x2="15" y2="15"></line></svg>',filePlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="18" x2="12" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></svg>',fileText:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>',file:'<svg class="stroked" viewBox="0 0 24 24"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline></svg>',film:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="2.18" ry="2.18"></rect><line x1="7" y1="2" x2="7" y2="22"></line><line x1="17" y1="2" x2="17" y2="22"></line><line x1="2" y1="12" x2="22" y2="12"></line><line x1="2" y1="7" x2="7" y2="7"></line><line x1="2" y1="17" x2="7" y2="17"></line><line x1="17" y1="17" x2="22" y2="17"></line><line x1="17" y1="7" x2="22" y2="7"></line></svg>',filter:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon></svg>',flag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line></svg>',folderMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="9" y1="14" x2="15" y2="14"></line></svg>',folderPlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="12" y1="11" x2="12" y2="17"></line><line x1="9" y1="14" x2="15" y2="14"></line></svg>',folder:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>',framer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 16V9h14V2H5l14 14h-7m-7 0l7 7v-7m-7 0h7"></path></svg>',frown:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M16 16s-1.5-2-4-2-4 2-4 2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',gift:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 12 20 22 4 22 4 12"></polyline><rect x="2" y="7" width="20" height="5"></rect><line x1="12" y1="22" x2="12" y2="7"></line><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path></svg>',gitBranch:'<svg class="stroked" viewBox="0 0 24 24"><line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg>',gitCommit:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line></svg>',gitMerge:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M6 21V9a9 9 0 0 0 9 9"></path></svg>',gitPullRequest:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M13 6h3a2 2 0 0 1 2 2v7"></path><line x1="6" y1="9" x2="6" y2="21"></line></svg>',github:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>',gitlab:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"></path></svg>',globe:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path></svg>',grid:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg>',hardDrive:'<svg class="stroked" viewBox="0 0 24 24"><line x1="22" y1="12" x2="2" y2="12"></line><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><line x1="6" y1="16" x2="6.01" y2="16"></line><line x1="10" y1="16" x2="10.01" y2="16"></line></svg>',hash:'<svg class="stroked" viewBox="0 0 24 24"><line x1="4" y1="9" x2="20" y2="9"></line><line x1="4" y1="15" x2="20" y2="15"></line><line x1="10" y1="3" x2="8" y2="21"></line><line x1="16" y1="3" x2="14" y2="21"></line></svg>',headphones:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 18v-6a9 9 0 0 1 18 0v6"></path><path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"></path></svg>',heart:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>',helpCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',hexagon:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path></svg>',home:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>',image:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>',inbox:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12"></polyline><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path></svg>',info:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="7.75"></line></svg>',instagram:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line></svg>',italic:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="4" x2="10" y2="4"></line><line x1="14" y1="20" x2="5" y2="20"></line><line x1="15" y1="4" x2="9" y2="20"></line></svg>',key:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.78 7.78 5.5 5.5 0 0 1 7.78-7.78zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"></path></svg>',layers:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline></svg>',layout:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="3" y1="9" x2="21" y2="9"></line><line x1="9" y1="21" x2="9" y2="9"></line></svg>',lifeBuoy:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="4.93" y1="4.93" x2="9.17" y2="9.17"></line><line x1="14.83" y1="14.83" x2="19.07" y2="19.07"></line><line x1="14.83" y1="9.17" x2="19.07" y2="4.93"></line><line x1="14.83" y1="9.17" x2="18.36" y2="5.64"></line><line x1="4.93" y1="19.07" x2="9.17" y2="14.83"></line></svg>',link2:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg>',link:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>',linkedin:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle></svg>',list:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line></svg>',loader:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>',lock:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg> ',logIn:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line></svg>',logOut:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>',mail:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>',mapPin:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>',map:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"></polygon><line x1="8" y1="2" x2="8" y2="18"></line><line x1="16" y1="6" x2="16" y2="22"></line></svg>',maximize2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>',maximize:'<svg class="stroked" viewBox="0 0 24 24"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path></svg>',meh:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="8" y1="15" x2="16" y2="15"></line><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',menu:'<svg class="stroked" viewBox="0 0 24 24"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>',messageCircle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path></svg>',messageSquare:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>',micOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>',mic:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>',minimize2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>',minimize:'<svg class="stroked" viewBox="0 0 24 24"><path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path></svg>',minusCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="8" y1="12" x2="16" y2="12"></line></svg>',minusSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line></svg>',minus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line></svg>',monitor:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg>',moon:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>',moreHorizontal:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle></svg>',moreVertical:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"></circle><circle cx="12" cy="5" r="1"></circle><circle cx="12" cy="19" r="1"></circle></svg>',mousePointer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg>',move:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="5 9 2 12 5 15"></polyline><polyline points="9 5 12 2 15 5"></polyline><polyline points="15 19 12 22 9 19"></polyline><polyline points="19 9 22 12 19 15"></polyline><line x1="2" y1="12" x2="22" y2="12"></line><line x1="12" y1="2" x2="12" y2="22"></line></svg>',music:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle></svg>',navigation2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 19 21 12 17 5 21 12 2"></polygon></svg>',navigation:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="3 11 22 2 13 21 11 13 3 11"></polygon></svg>',octagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon></svg>',package:'<svg class="stroked" viewBox="0 0 24 24"><line x1="16.5" y1="9.4" x2="7.5" y2="4.21"></line><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',paperclip:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"></path></svg>',pauseCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="10" y1="15" x2="10" y2="9"></line><line x1="14" y1="15" x2="14" y2="9"></line></svg>',pause:'<svg class="stroked" viewBox="0 0 24 24"><rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect></svg>',penTool:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 19l7-7 3 3-7 7-3-3z"></path><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"></path><path d="M2 2l7.59 7.59"></path><circle cx="11" cy="11" r="2"></circle></svg>',percent:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="5" x2="5" y2="19"></line><circle cx="6.5" cy="6.5" r="2.5"></circle><circle cx="17.5" cy="17.5" r="2.5"></circle></svg>',phoneCall:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneForwarded:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="19 1 23 5 19 9"></polyline><line x1="15" y1="5" x2="23" y2="5"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneIncoming:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 2 16 8 22 8"></polyline><line x1="23" y1="1" x2="16" y2="8"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneMissed:'<svg class="stroked" viewBox="0 0 24 24"><line x1="23" y1="1" x2="17" y2="7"></line><line x1="17" y1="1" x2="23" y2="7"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"></path><line x1="23" y1="1" x2="1" y2="23"></line></svg>',phoneOutgoing:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 7 23 1 17 1"></polyline><line x1="16" y1="8" x2="23" y2="1"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phone:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',pieChart:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21.21 15.89A10 10 0 1 1 8 2.83"></path><path d="M22 12A10 10 0 0 0 12 2v10z"></path></svg>',playCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polygon points="10 8 16 12 10 16 10 8"></polygon></svg>',play:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>',plusCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>',plusSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>',plus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>',pocket:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 3h16a2 2 0 0 1 2 2v6a10 10 0 0 1-10 10A10 10 0 0 1 2 11V5a2 2 0 0 1 2-2z"></path><polyline points="8 10 12 14 16 10"></polyline></svg>',power:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line></svg>',printer:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect></svg>',radio:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="2"></circle><path d="M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14"></path></svg>',repeat:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path></svg>',rewind:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 19 2 12 11 5 11 19"></polygon><polygon points="22 19 13 12 22 5 22 19"></polygon></svg>',cornerDownRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 10 20 15 15 20"></polyline><path d="M4 4v7a4 4 0 0 0 4 4h12"></path></svg>',cornerRightDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="10 15 15 20 20 15"></polyline><path d="M4 4h7a4 4 0 0 1 4 4v12"></path></svg>',cornerRightUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="10 9 15 4 20 9"></polyline><path d="M4 20h7a4 4 0 0 0 4-4V4"></path></svg>',cornerUpRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 14 20 9 15 4"></polyline><path d="M4 20v-7a4 4 0 0 1 4-4h12"></path></svg>',refreshCw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg>',rotateCw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path></svg>',skipForward:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" y1="5" x2="19" y2="19"></line></svg>',toggleRight:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="16" cy="12" r="3"></circle></svg>',rss:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>',save:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg>',scissors:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="6" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><line x1="20" y1="4" x2="8.12" y2="15.88"></line><line x1="14.47" y1="14.48" x2="20" y2="20"></line><line x1="8.12" y1="8.12" x2="12" y2="12"></line></svg>',search:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',send:'<svg class="stroked" viewBox="0 0 24 24"><line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg>',server:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="8" rx="2" ry="2"></rect><rect x="2" y="14" width="20" height="8" rx="2" ry="2"></rect><line x1="6" y1="6" x2="6.01" y2="6"></line><line x1="6" y1="18" x2="6.01" y2="18"></line></svg>',settings:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M4.78,6.75 C6.02,7.26,7.26,6.02,6.75,4.78 C6.75,4.78,6.24,3.57,6.24,3.57 C5.93,2.8,6.29,1.92,7.06,1.6 C7.06,1.6,8.14,1.15,8.14,1.15 C8.91,0.83,9.79,1.2,10.11,1.96 C10.11,1.96,10.61,3.18,10.61,3.18 C11.12,4.42,12.88,4.42,13.39,3.18 C13.39,3.18,13.89,1.97,13.89,1.97 C14.21,1.2,15.09,0.83,15.86,1.15 C15.86,1.15,16.94,1.6,16.94,1.6 C17.71,1.92,18.08,2.8,17.76,3.57 C17.76,3.57,17.15,5.03,17.15,5.03 C16.64,6.27,17.88,7.51,19.12,7 C19.12,7,20.51,6.42,20.51,6.42 C21.28,6.1,22.16,6.47,22.47,7.23 C22.47,7.23,22.92,8.32,22.92,8.32 C23.24,9.09,22.88,9.96,22.11,10.28 C22.11,10.28,21.07,10.71,21.07,10.71 C19.83,11.23,19.83,12.98,21.07,13.49 C21.07,13.49,22.04,13.89,22.04,13.89 C22.8,14.21,23.17,15.09,22.85,15.86 C22.85,15.86,22.4,16.94,22.4,16.94 C22.08,17.71,21.2,18.07,20.43,17.76 C20.43,17.76,19.22,17.25,19.22,17.25 C17.98,16.74,16.74,17.98,17.25,19.22 C17.25,19.22,17.76,20.43,17.76,20.43 C18.07,21.2,17.71,22.08,16.94,22.4 C16.94,22.4,15.86,22.85,15.86,22.85 C15.09,23.17,14.21,22.8,13.89,22.04 C13.89,22.04,13.39,20.82,13.39,20.82 C12.88,19.58,11.12,19.58,10.61,20.82 C10.61,20.82,10.11,22.04,10.11,22.04 C9.79,22.8,8.91,23.17,8.14,22.85 C8.14,22.85,7.06,22.4,7.06,22.4 C6.29,22.08,5.93,21.2,6.24,20.44 C6.24,20.44,6.64,19.47,6.64,19.47 C7.16,18.23,5.92,16.99,4.68,17.5 C4.68,17.5,3.64,17.93,3.64,17.93 C2.87,18.25,1.99,17.89,1.67,17.12 C1.67,17.12,1.22,16.04,1.22,16.04 C0.91,15.27,1.27,14.39,2.04,14.07 C2.04,14.07,3.43,13.49,3.43,13.49 C4.67,12.98,4.67,11.23,3.43,10.71 C3.43,10.71,1.96,10.11,1.96,10.11 C1.2,9.79,0.83,8.91,1.15,8.14 C1.15,8.14,1.6,7.06,1.6,7.06 C1.92,6.29,2.8,5.93,3.57,6.24 C3.57,6.24,4.78,6.75,4.78,6.75 z M14.31,11.04 C14.84,12.32,14.23,13.78,12.96,14.31 C11.68,14.84,10.22,14.23,9.69,12.96 C9.16,11.68,9.77,10.22,11.04,9.69 C12.32,9.16,13.78,9.77,14.31,11.04 z"/></g></svg> ',share2:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg>',share:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path><polyline points="16 6 12 2 8 6"></polyline><line x1="12" y1="2" x2="12" y2="15"></line></svg>',shieldOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19.69 14a6.9 6.9 0 0 0 .31-2V5l-8-3-3.16 1.18"></path><path d="M4.73 4.73L4 5v7c0 6 8 10 8 10a20.29 20.29 0 0 0 5.62-4.38"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',shield:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>',shoppingBag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path><line x1="3" y1="6" x2="21" y2="6"></line><path d="M16 10a4 4 0 0 1-8 0"></path></svg>',shoppingCart:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>',shuffle:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 3 21 3 21 8"></polyline><line x1="4" y1="20" x2="21" y2="3"></line><polyline points="21 16 21 21 16 21"></polyline><line x1="15" y1="15" x2="21" y2="21"></line><line x1="4" y1="4" x2="9" y2="9"></line></svg>',sidebar:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="3" x2="9" y2="21"></line></svg>',slack:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14.5 10c-.83 0-1.5-.67-1.5-1.5v-5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5z"></path><path d="M20.5 10H19V8.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path><path d="M9.5 14c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5S8 21.33 8 20.5v-5c0-.83.67-1.5 1.5-1.5z"></path><path d="M3.5 14H5v1.5c0 .83-.67 1.5-1.5 1.5S2 16.33 2 15.5 2.67 14 3.5 14z"></path><path d="M14 14.5c0-.83.67-1.5 1.5-1.5h5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-5c-.83 0-1.5-.67-1.5-1.5z"></path><path d="M15.5 19H14v1.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path><path d="M10 9.5C10 8.67 9.33 8 8.5 8h-5C2.67 8 2 8.67 2 9.5S2.67 11 3.5 11h5c.83 0 1.5-.67 1.5-1.5z"></path><path d="M8.5 5H10V3.5C10 2.67 9.33 2 8.5 2S7 2.67 7 3.5 7.67 5 8.5 5z"></path></svg>',slash:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line></svg>',sliders:'<svg class="stroked" viewBox="0 0 24 24"><line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line></svg>',smartphone:'<svg class="stroked" viewBox="0 0 24 24"><rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>',smile:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',speaker:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><circle cx="12" cy="14" r="4"></circle><line x1="12" y1="6" x2="12.01" y2="6"></line></svg>',square:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect></svg>',star:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>',stopCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><rect x="9" y="9" width="6" height="6"></rect></svg>',sun:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>',sunrise:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="2" x2="12" y2="9"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="8 6 12 2 16 6"></polyline></svg>',sunset:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="9" x2="12" y2="2"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="16 5 12 9 8 5"></polyline></svg>',table:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"></path></svg>',tablet:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>',tag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7.01" y2="7"></line></svg>',target:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="6"></circle><circle cx="12" cy="12" r="2"></circle></svg>',terminal:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line></svg>',thermometer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z"></path></svg>',tool:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path></svg>',trash2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>',trash:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>',trello:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><rect x="7" y="7" width="3" height="9"></rect><rect x="14" y="7" width="3" height="5"></rect></svg>',trendingDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 18 13.5 8.5 8.5 13.5 1 6"></polyline><polyline points="17 18 23 18 23 12"></polyline></svg>',trendingUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 6 13.5 15.5 8.5 10.5 1 18"></polyline><polyline points="17 6 23 6 23 12"></polyline></svg>',triangle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path></svg>',truck:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="3" width="15" height="13"></rect><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"></polygon><circle cx="5.5" cy="18.5" r="2.5"></circle><circle cx="18.5" cy="18.5" r="2.5"></circle></svg>',tv:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline></svg>',twitch:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path></svg>',twitter:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>',type:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 7 4 4 20 4 20 7"></polyline><line x1="9" y1="20" x2="15" y2="20"></line><line x1="12" y1="4" x2="12" y2="20"></line></svg>',umbrella:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 12a11.05 11.05 0 0 0-22 0zm-5 7a3 3 0 0 1-6 0v-7"></path></svg>',underline:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3"></path><line x1="4" y1="21" x2="20" y2="21"></line></svg>',unlock:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 9.9-1"></path></svg>',thumbsUp:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>',arrowRightCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line></svg>',arrowRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>',chevronRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 18 15 12 9 6"></polyline></svg>',chevronsRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline></svg>',uploadCloud:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 16 12 12 8 16"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16"></polyline></svg>',upload:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>',userCheck:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><polyline points="17 11 19 13 23 9"></polyline></svg>',userMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="23" y1="11" x2="17" y2="11"></line></svg>',userPlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="20" y1="8" x2="20" y2="14"></line><line x1="23" y1="11" x2="17" y2="11"></line></svg>',userX:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="18" y1="8" x2="23" y2="13"></line><line x1="23" y1="8" x2="18" y2="13"></line></svg>',user:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>',users:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>',videoOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',video:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect></svg>',voicemail:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="5.5" cy="11.5" r="4.5"></circle><circle cx="18.5" cy="11.5" r="4.5"></circle><line x1="5.5" y1="16" x2="18.5" y2="16"></line></svg>',volume1:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>',volume2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>',volumeX:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><line x1="23" y1="9" x2="17" y2="15"></line><line x1="17" y1="9" x2="23" y2="15"></line></svg>',volume:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon></svg>',watch:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="7"></circle><polyline points="12 9 12 12 13.5 13.5"></polyline><path d="M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83"></path></svg>',wifiOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M16.72 11.06A10.94 10.94 0 0 1 19 12.55"></path><path d="M5 12.55a10.94 10.94 0 0 1 5.17-2.39"></path><path d="M10.71 5.05A16 16 0 0 1 22.58 9"></path><path d="M1.42 9a15.91 15.91 0 0 1 4.7-2.88"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>',wifi:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 12.55a11 11 0 0 1 14.08 0"></path><path d="M1.42 9a16 16 0 0 1 21.16 0"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>',wind:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2"></path></svg>',xCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',xOctagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',xSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="9" x2="15" y2="15"></line><line x1="15" y1="9" x2="9" y2="15"></line></svg>',x:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',zapOff:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="12.41 6.75 13 2 10.57 4.92"></polyline><polyline points="18.57 12.91 21 10 15.66 10"></polyline><polyline points="8 8 3 14 12 14 11 22 16 16"></polyline><line x1="1" y1="1" x2="23" y2="23"></line></svg>',zap:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>',zoomIn:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',zoomOut:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',fontBold:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M13.5,11 C15.71,11,17.5,12.68,17.5,14.75 C17.5,16.82,15.71,18.5,13.5,18.5 C13.5,18.5,8.5,18.5,8.5,18.5 C8.5,18.5,8.5,3.5,8.5,3.5 C8.5,3.5,13.5,3.5,13.5,3.5 C15.71,3.5,17.5,5.18,17.5,7.25 C17.5,9.32,15.71,11,13.5,11 C13.5,11,13.5,11,13.5,11 z"/><path style="" d="M13.5,11 C13.5,11,8.5,11,8.5,11"/><path style="" d="M12.5,11 C14.71,11,16.5,12.68,16.5,14.75 C16.5,16.82,14.71,18.5,12.5,18.5 C12.5,18.5,7.5,18.5,7.5,18.5 C7.5,18.5,7.5,3.5,7.5,3.5 C7.5,3.5,12.5,3.5,12.5,3.5 C14.71,3.5,16.5,5.18,16.5,7.25 C16.5,9.32,14.71,11,12.5,11 C12.5,11,12.5,11,12.5,11 z"/><path style="" d="M12.5,11 C12.5,11,7.5,11,7.5,11"/></g></svg> ',fontItalic:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M17,4.5 C17,4.5,13,4.5,13,4.5"/><path style="" d="M11,19.5 C11,19.5,7,19.5,7,19.5"/><path style="" d="M15,4.5 C15,4.5,9,19.5,9,19.5"/></g></svg> ',fontUnderline:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M7.5,3.5 C7.5,3.5,7.5,10.74,7.5,13.5 C7.5,16.26,9.74,18.5,12.5,18.5 C15.26,18.5,17.5,16.26,17.5,13.5 C17.5,10.74,17.5,3.5,17.5,3.5"/><path style="" d="M7.5,21.5 C7.5,21.5,17.5,21.5,17.5,21.5"/></g></svg> ',indent:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10 C21,10,8,10,8,10"/><path style="" d="M21,6 C21,6,8,6,8,6"/><path style="" d="M21,14 C21,14,8,14,8,14"/><path style="" d="M21,18 C21,18,8,18,8,18"/><path style="" d="M2.5,9 C2.5,9,5.5,12,5.5,12 C5.5,12,2.5,15,2.5,15"/></g></svg> ',listBullet:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,6 C21,6,10,6,10,6"/><path style="" d="M21,12 C21,12,10,12,10,12"/><path style="" d="M21,18 C21,18,10,18,10,18"/><path style="" d="M5.5,5 C6.05,5,6.5,5.45,6.5,6 C6.5,6.55,6.05,7,5.5,7 C4.95,7,4.5,6.55,4.5,6 C4.5,5.45,4.95,5,5.5,5 z"/><path style="" d="M5.5,11 C6.05,11,6.5,11.45,6.5,12 C6.5,12.55,6.05,13,5.5,13 C4.95,13,4.5,12.55,4.5,12 C4.5,11.45,4.95,11,5.5,11 z"/><path style="" d="M5.5,17 C6.05,17,6.5,17.45,6.5,18 C6.5,18.55,6.05,19,5.5,19 C4.95,19,4.5,18.55,4.5,18 C4.5,17.45,4.95,17,5.5,17 z"/></g></svg> ',listNumber:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,6 C21,6,10,6,10,6"/><path style="" d="M21,12 C21,12,10,12,10,12"/><path style="" d="M21,18 C21,18,10,18,10,18"/><path style="" d="M4.5,5 C4.5,5,5.5,4,5.5,4 C5.5,4,5.5,8,5.5,8"/><path style="" d="M4.5,10 C4.5,10,5.5,10,5.5,10 C6.05,10,6.5,10.45,6.5,11 C6.5,11,6.5,11,6.5,11 C6.5,11.55,6.05,12,5.5,12 C5.5,12,5.5,12,5.5,12 C4.95,12,4.5,12.45,4.5,13 C4.5,13,4.5,14,4.5,14 C4.5,14,6.5,14,6.5,14"/><path style="" d="M4.5,16 C4.5,16,5.5,16,5.5,16 C6.05,16,6.5,16.45,6.5,17 C6.5,17,6.5,17,6.5,17 C6.5,17.55,6.05,18,5.5,18 C5.5,18,4.5,18,4.5,18 C4.5,18,5.5,18,5.5,18 C6.05,18,6.5,18.45,6.5,19 C6.5,19,6.5,19,6.5,19 C6.5,19.55,6.05,20,5.5,20 C5.5,20,4.5,20,4.5,20"/></g></svg> ',outdent:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10 C21,10,8,10,8,10"/><path style="" d="M21,6 C21,6,8,6,8,6"/><path style="" d="M21,14 C21,14,8,14,8,14"/><path style="" d="M21,18 C21,18,8,18,8,18"/><path style="" d="M5.5,9 C5.5,9,2.5,12,2.5,12 C2.5,12,5.5,15,5.5,15"/></g></svg> ',pin:'<svg class="stroked" viewBox="0 0 24 24"><g><g><path style="" d="M16.23,4.73 C16.23,4.73,19.42,7.9,19.42,7.9 C19.42,7.9,14.46,15.69,14.46,15.69 C14.46,15.69,8.45,9.68,8.45,9.68 C8.45,9.68,16.23,4.73,16.23,4.73 z"/><path style="" d="M20.84,9.32 C20.84,9.32,14.47,2.95,14.47,2.95"/><path style="" d="M16.6,17.8 C16.6,17.8,6.7,7.9,6.7,7.9"/><path style="" d="M10.23,11.44 C10.23,11.44,5.99,18.51,5.99,18.51 C5.99,18.51,13.06,14.27,13.06,14.27"/></g></g></svg> ',resize:'<svg class="stroked" version="1.1" viewBox="0, 0, 24, 24"><g><path d="M9,3 L3,3 L3,9"/><path d="M15,21 L21,21 L21,15"/><path d="M3,3 L10,10"/><path d="M21,21 L14,14"/></g></svg> ',sortAscending:'<svg class="stroked" viewBox="0 0 24 24"><g><path d="M16.5,10.5 C16.5,10.5,7.5,10.5,7.5,10.5"/><path d="M14.5,6.5 C14.5,6.5,9.5,6.5,9.5,6.5"/><path d="M18.5,14.5 C18.5,14.5,5.5,14.5,5.5,14.5"/><path d="M20.5,18.5 C20.5,18.5,3.5,18.5,3.5,18.5"/></g></svg> ',sortDescending:'<svg class="stroked" viewBox="0 0 24 24"><g><path d="M16.5,14.5 C16.5,14.5,7.5,14.5,7.5,14.5"/><path d="M14.5,18.5 C14.5,18.5,9.5,18.5,9.5,18.5"/><path d="M18.5,10.5 C18.5,10.5,5.5,10.5,5.5,10.5"/><path d="M20.5,6.5 C20.5,6.5,3.5,6.5,3.5,6.5"/></g></svg> ',cornerDownLeft:"cornerDownRight0f",cornerLeftDown:"cornerRightDown0f",cornerLeftUp:"cornerRightUp0f",cornerUpLeft:"cornerUpRight0f",refreshCcw:"refreshCw0f",rotateCcw:"rotateCw0f",skipBack:"skipForward0f",toggleLeft:"toggleRight0f",thumbsDown:"thumbsUp1f",arrowDownCircle:"arrowRightCircle90r",arrowLeftCircle:"arrowRightCircle180r",arrowUpCircle:"arrowRightCircle270r",arrowDown:"arrowRight90r",arrowLeft:"arrowRight180r",arrowUp:"arrowRight270r",chevronDown:"chevronRight90r",chevronLeft:"chevronRight180r",chevronUp:"chevronRight270r",chevronsDown:"chevronsRight90r",chevronsLeft:"chevronsRight180r",chevronsUp:"chevronsRight270r",arrowDownRight:"arrowUpRight90r",arrowDownLeft:"arrowUpRight180r",arrowUpLeft:"arrowUpRight270r"};var ph=(y)=>{Object.assign(j2,y)},q0=(y,x,h,C)=>{let k=y instanceof SVGElement?[y]:Array.from(y.querySelectorAll("svg"));if(k.length>1){let z=y.dataset?.icon||"unknown";console.error(`svg2DataUrl: composite icon "${z}" cannot be serialized as a data URL, rendering base icon only`)}let B=k[0];B.setAttribute("xmlns","http://www.w3.org/2000/svg");for(let z of B.querySelectorAll("path, polygon, line, circle, rect, ellipse, polyline")){if(x!==void 0)z.setAttribute("fill",x);if(h!==void 0)z.setAttribute("stroke",h);if(C!==void 0)z.setAttribute("stroke-width",String(C))}let w=B.querySelectorAll("[style]");B.removeAttribute("style");for(let z of[...w]){let q=z.style;if(q.fill)z.setAttribute("fill",O.fromCss(q.fill).html);if(q.stroke)z.setAttribute("stroke",O.fromCss(q.stroke).html);if(q.strokeWidth)z.setAttribute("strokeWidth",q.strokeWidth);if(q.strokeLinecap)z.setAttribute("strokeLinecap",q.strokeLinecap);if(q.strokeLinejoin)z.setAttribute("strokeLinejoin",q.strokeLinejoin);z.removeAttribute("style")}return`url(data:image/svg+xml;charset=UTF-8,${encodeURIComponent(B.outerHTML)})`},Lh=(y)=>/\d$/.test(y)?y+"_":y,w3=[{prefix:/^spin(_?\d+)/,apply(y,x,h){let C=x[1].replace("_","-"),k=360/Math.abs(parseFloat(C)),B=C.startsWith("-")?"reverse":"normal",w=e1(y,[]),g=w;if(g.animate){let z=g.style.transform||"";g.animate([{transform:`${z} rotate(0deg)`},{transform:`${z} rotate(360deg)`}],{duration:k*1000,iterations:1/0,direction:B})}return g3(y,h,w)}},{prefix:"un",apply:(y)=>`slash25o$${y}75s75o`},{prefix:"check",apply:(y)=>`check75o_00aa00S$${y}75s50o`},{prefix:"cancel",apply:(y)=>`x75o_cc0000S$${y}75s50o`},{prefix:"search",apply:(y)=>`search80s30x30y$${y}50o`}],ch=0;function _6(y,x){let h=G.div();h.innerHTML=y;let C=h.querySelector("svg"),k=C.querySelectorAll("[id]");if(k.length>0){let g=new Map;for(let j of k){let V=j.id,_=`tosi_svg_id_${++ch}`;g.set(V,_),j.id=_}let z=C.innerHTML,q=z;for(let[j,V]of g){let _=j.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");q=q.replace(new RegExp(`url\\(#${_}\\)`,"g"),`url(#${V})`).replace(new RegExp(`href="#${_}"`,"g"),`href="#${V}"`)}if(q!==z)C.innerHTML=q}let B=new Set(C.classList);B.add("tosi-icon");let w=B4.svg({class:Array.from(B).join(" "),viewBox:C.getAttribute("viewBox")},...x,...C.children);if(w.style.strokeWidth=A.tosiIconStrokeWidth("2px"),B.has("filled"))w.style.stroke="none",w.style.fill="currentColor";else if(B.has("stroked"))w.style.stroke=A.tosiIconStroke("currentColor"),w.style.fill=A.tosiIconFill("none");else w.style.stroke=A.tosiIconStroke("currentColor"),w.style.fill=A.tosiIconFill("currentColor");return w.style.height=A.tosiIconSize("16px"),w}function g3(y,x,...h){let C=G.span({class:"tosi-icon-composite",dataIcon:y,style:{display:"inline-flex",position:"relative",pointerEvents:"none"}},...h);for(let k of x)if(k&&typeof k==="object"&&!("nodeType"in k)){let B=k;if(B.style&&typeof B.style==="object")Object.assign(C.style,B.style);if(B.class)C.classList.add(...String(B.class).split(" "))}return C}function dh(y){let x=j2;if(x[y])return!0;let h=B3(y);return h!=null&&!!x[h.baseName]}function K6(y,x){for(let h of w3){let C,k;if(h.prefix instanceof RegExp){let w=new RegExp(h.prefix.source+"(.+)$"),g=y.match(w);if(!g)continue;C=g[g.length-1],C=C[0].toLowerCase()+C.slice(1),k=g}else{if(!y.startsWith(h.prefix)||y.length<=h.prefix.length)continue;C=y[h.prefix.length].toLowerCase()+y.slice(h.prefix.length+1),k=h.prefix}if(!dh(C))continue;let B=h.apply(Lh(C),k,x);if(typeof B==="string")return e1(B,x);if(B)return B}return null}var fh=10,sh=/(?:(?<=[a-zA-Z_])(?:_?\d+[osxyr]|[01]f|\d+W)|_[a-zA-Z0-9]+[FS])+$/;function B3(y){let x=y.match(sh);if(!x)return null;let h=y.slice(0,x.index);if(!h)return null;if(h.endsWith("_"))h=h.slice(0,-1);if(!h)return null;if(!j2[h]){if(!w3.some((z)=>{if(z.prefix instanceof RegExp)return z.prefix.test(h);return h.startsWith(z.prefix)&&h.length>z.prefix.length}))return null}let k={},B=x[0].match(/_?\d+[osxyr]|[01]f|_[a-zA-Z0-9]+[FS]|\d+W/g);if(!B)return null;let w=[];for(let g of B){let z=g[g.length-1];if(z==="F"||z==="S"){let q=g.slice(1,-1),V=/^[0-9a-fA-F]{3,8}$/.test(q)?"#"+q:l[q];if(z==="F")k.fill=V;else k.stroke=V}else if(z==="W")k.strokeWidth=g.slice(0,-1);else{let q=parseInt(g.replace("_","-"));switch(z){case"o":k.opacity=String(q/100);break;case"s":w.push(`scale(${q/100})`);break;case"x":w.push(`translateX(${q}%)`);break;case"y":w.push(`translateY(${q}%)`);break;case"r":w.push(`rotate(${q}deg)`);break;case"f":w.push(q===0?"scaleX(-1)":"scaleY(-1)");break}}}if(w.length>0)k.transform=w.join(" "),k.transformOrigin="50% 50%";return{baseName:h,style:k}}function e1(y,x){if(y.endsWith("_"))y=y.slice(0,-1);let h=j2,C=y;for(let w=0;w<fh;w++){let g=h[C];if(!g)break;if(g.startsWith("<"))return _6(g,x);C=g}if(C!==y){let w=K6(C,x);if(w)return w;let g=B3(C);if(g){let z=e1(g.baseName,x);return Object.assign(z.style,g.style),z}}if(y.includes("$")){let w=y.split("$"),g=e1(w[w.length-1],[]),z=w.slice(0,-1).reverse().map((q)=>{let j=e1(q,[]);return Object.assign(j.style,{position:"absolute",inset:"0",width:"100%",height:"100%"}),j});return g3(y,x,g,...z)}let k=K6(y,x);if(k)return k;let B=B3(y);if(B){let w=e1(B.baseName,x);return Object.assign(w.style,B.style),w}if(y)console.warn(`icon ${y} does not exist`);return _6(j2.square,x)}var Q=new Proxy(j2,{get(y,x){return(...h)=>e1(x,h)}});class z3 extends ${static preferredTagName="tosi-icon";static lightStyleSpec={":host":{"--tosi-icon-size":"var(--xin-icon-size, 16px)","--tosi-icon-stroke-width":"var(--xin-icon-stroke-width, var(--icon-stroke-width, 2px))","--tosi-icon-stroke-linejoin":"var(--icon-stroke-linejoin, round)","--tosi-icon-stroke-linecap":"var(--icon-stroke-linecap, round)","--tosi-icon-fill":"var(--xin-icon-fill, var(--icon-fill, none))",display:"inline-flex",verticalAlign:"text-bottom",stroke:"currentColor",strokeWidth:A.tosiIconStrokeWidth("2px"),strokeLinejoin:A.tosiIconStrokeLinejoin("round"),strokeLinecap:A.tosiIconStrokeLinecap("round"),fill:A.tosiIconFill("none"),height:l.tosiIconSize},":host svg, :host .tosi-icon-composite":{height:A.tosiIconSize("16px")}};static initAttributes={icon:"",size:0,fill:"",stroke:"",strokeWidth:1};render(){super.render(),this.textContent="";let y={};if(this.size)y.height=this.size+"px",this.style.setProperty("--tosi-icon-size",`${this.size}px`),this.style.setProperty("--xin-icon-size",`${this.size}px`);if(this.stroke)y.stroke=this.stroke,y.strokeWidth=this.strokeWidth;if(this.fill)y.fill=this.fill;this.append(Q[this.icon]({style:y}))}}var q3=z3.elementCreator();var P6=()=>{};function uh(y,x){if(!x||x.trim()==="transparent")return new y.Color4(0,0,0,0);let h=x.trim().replace(/^#/,"");if(h.length===3)h=h.split("").map((k)=>k+k).join("");if(h.length===6)h+="ff";let C=parseInt(h,16);if(Number.isNaN(C)||h.length!==8)return new y.Color4(0,0,0,1);return new y.Color4((C>>>24&255)/255,(C>>>16&255)/255,(C>>>8&255)/255,(C&255)/255)}class l3 extends ${static preferredTagName="tosi-3d";static initAttributes={src:"",clearColor:"",fov:1,heroLight:!1};babylonReady;BABYLON;static shadowStyleSpec={":host":{display:"block",position:"relative"},":host canvas":{width:"100%",height:"100%"},":host .babylonVRicon":{height:50,width:80,backgroundColor:"transparent",filter:"drop-shadow(0 0 4px #000c)",backgroundImage:q0(Q.xrColor()),backgroundPosition:"center",backgroundRepeat:"no-repeat",border:"none",borderRadius:5,borderStyle:"none",outline:"none",transition:"transform 0.125s ease-out"},":host .babylonVRicon:hover":{transform:"scale(1.1)"}};content=G.canvas({part:"canvas"});constructor(){super();this.babylonReady=(async()=>{let{BABYLON:y}=await S1("https://cdn.babylonjs.com/babylon.js","BABYLON");return y})()}scene;engine;sceneCreated=P6;update=P6;_update=()=>{if(this.scene){if(this.update!==void 0)this.update(this,this.BABYLON);if(this.scene.activeCamera!==void 0)this.scene.render()}};handleResize(){if(this.engine)this.engine.resize()}loadScene=async(y,x,h)=>{let{BABYLON:C}=await S1("https://cdn.babylonjs.com/loaders/babylonjs.loaders.min.js","BABYLON");C.SceneLoader.Append(y,x,this.scene,h)};loadUI=async(y)=>{let{BABYLON:x}=await S1("https://cdn.babylonjs.com/gui/babylon.gui.min.js","BABYLON"),h=x.GUI.AdvancedDynamicTexture.CreateFullscreenUI("GUI",!0,this.scene),{snippetId:C,jsonUrl:k,data:B,size:w}=y;if(w)h.idealWidth=w,h.renderAtIdealSize=!0;let g;if(C)g=await h.parseFromSnippetAsync(C);else if(k)g=await h.parseFromURLAsync(k);else if(B)g=h.parseContent(B);else return null;let z=h.getChildren()[0],q=z.children.reduce((j,V)=>{return j[V.name]=V,j},{});return{advancedTexture:h,gui:g,root:z,widgets:q}};connectedCallback(){super.connectedCallback();let{canvas:y}=this.parts;this.babylonReady.then(async(x)=>{this.BABYLON=x;let h=this.clearColor?uh(x,this.clearColor):null;if(this.engine=new x.Engine(y,!0,h&&h.a<1?{alpha:!0,premultipliedAlpha:!1}:void 0),this.scene=new x.Scene(this.engine),h)this.scene.clearColor=h;if(this.sceneCreated)await this.sceneCreated(this,x);if(this.src){let C=this.src.lastIndexOf("/");await this.loadScene(this.src.slice(0,C+1)||"/",this.src.slice(C+1))}if(this.scene.activeCamera===void 0)new x.ArcRotateCamera("default-camera",-Math.PI/2,Math.PI/2.5,3,new x.Vector3(0,0,0),this.scene).attachControl(this.parts.canvas,!0);if(this.fov&&this.fov!==1&&this.scene.activeCamera)this.scene.activeCamera.fov*=this.fov;if(this.scene.lights.length===0){let C=new x.HemisphericLight("hemi",new x.Vector3(0,1,0),this.scene);C.intensity=0.6}if(this.heroLight){let C=new x.DirectionalLight("hero",new x.Vector3(-1,-2,1),this.scene);C.intensity=0.8}this.engine.runRenderLoop(this._update)})}}var rh=l3.elementCreator();class D2 extends ${static preferredTagName="tosi-lottie";static initAttributes={src:"",json:""};content=null;config={renderer:"svg",loop:!0,autoplay:!0};static bodymovinAvailable;animation;static shadowStyleSpec={":host":{width:400,height:400,display:"inline-block"}};_loading=!1;get loading(){return this._loading}constructor(){super();if(D2.bodymovinAvailable===void 0)D2.bodymovinAvailable=S1("https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js","bodymovin")}doneLoading=()=>{this._loading=!1};load=({bodymovin:y})=>{if(this._loading=!0,this.config.container=this.shadowRoot!==null?this.shadowRoot:void 0,this.json!=="")this.config.animationData=this.json,delete this.config.path;else if(this.src!=="")delete this.config.animationData,this.config.path=this.src;else console.log("%c<tosi-lottie>%c expected either %cjson%c (animation data) or %csrc% c(url) but found neither.","color: #44f; background: #fff; padding: 0 5px","color: default","color: #44f; background: #fff; padding: 0 5px","color: default","color: #44f; background: #fff; padding: 0 5px","color: default");if(this.animation){this.animation.destroy();let x=this.shadowRoot;if(x!==null)x.querySelector("svg")?.remove()}this.animation=y.loadAnimation(this.config),this.animation.addEventListener("DOMLoaded",this.doneLoading)};render(){super.render(),D2.bodymovinAvailable.then(this.load).catch((y)=>{console.error(y)})}}var mh=D2.elementCreator();var{button:j3,slot:nh,div:j4}=G;class V4 extends ${static preferredTagName="tosi-carousel";static initAttributes={dots:!1,arrows:!1,maxVisibleItems:1,snapDuration:0.25,snapDelay:0.1,loop:!1,auto:0};lastAutoAdvance=Date.now();interval;autoAdvance=()=>{if(this.auto>0&&this.auto*1000<Date.now()-this.lastAutoAdvance)this.forward()};_page=0;get page(){return this._page}set page(y){let{scroller:x,back:h,forward:C}=this.parts;if(this.lastPage<=0)C.disabled=h.disabled=!0,y=0;else y=Math.max(0,Math.min(this.lastPage,y)),y=isNaN(y)?0:y;if(this._page!==y)this._page=isNaN(y)?0:y,this.animateScroll(this._page*x.offsetWidth),h.disabled=this.page<=0&&!this.loop,C.disabled=this.page>=this.lastPage&&!this.loop}get visibleItems(){return[...this.children].filter((y)=>getComputedStyle(y).display!=="none")}get lastPage(){return Math.max(Math.ceil(this.visibleItems.length/(this.maxVisibleItems||1))-1,0)}static shadowStyleSpec={":host":{_carouselIconSize:24,_carouselButtonColor:"#0004",_carouselButtonHoverColor:"#0006",_carouselButtonActiveColor:"#000c",_carouseButtonWidth:48,_carouselDotCurrentColor:"#0008",_carouselDotSize:8,_carouselDotSpacing:l.carouselDotSize,_carouselProgressPadding:12,_carouselDotTransition:"0.125s ease-in-out",display:"flex",flexDirection:"column",position:"relative"},":host:focus":{outline:"none",boxShadow:"none"},":host svg":{height:l.carouselIconSize},":host button":{outline:"none",border:"none",boxShadow:"none",background:"transparent",color:l.carouselButtonColor,padding:0},":host::part(back), :host::part(forward)":{position:"absolute",top:0,bottom:0,width:l.carouseButtonWidth,zIndex:2},":host::part(back)":{left:0},":host::part(forward)":{right:0},":host button:disabled":{opacity:0.5,pointerEvents:"none"},":host button:hover":{color:l.carouselButtonHoverColor},":host button:active":{color:l.carouselButtonActiveColor},":host::part(pager)":{position:"relative"},":host::part(scroller)":{overflow:"auto hidden",position:"relative"},":host::part(grid)":{display:"grid",justifyItems:"center"},":host *::-webkit-scrollbar, *::-webkit-scrollbar-thumb":{display:"none"},":host .dot":{background:l.carouselButtonColor,borderRadius:l.carouselDotSize,height:l.carouselDotSize,width:l.carouselDotSize,transition:l.carouselDotTransition},":host .dot:not(.current):hover":{background:l.carouselButtonHoverColor,height:l.carouselDotSize150,width:l.carouselDotSize150,margin:l.carouselDotSize_25},":host .dot:not(.current):active":{background:l.carouselButtonActiveColor},":host .dot.current":{background:l.carouselDotCurrentColor},":host::part(progress)":{display:"flex",gap:l.carouselDotSpacing,justifyContent:"center",padding:l.carouselProgressPadding}};easing=(y)=>{return Math.sin(y*Math.PI*0.5)};indicateCurrent=()=>{let{scroller:y,progress:x}=this.parts,h=y.scrollLeft/y.offsetWidth;[...x.children].forEach((C,k)=>{C.classList.toggle("current",Math.floor(k/this.maxVisibleItems-h)===0)}),this.lastAutoAdvance=Date.now(),clearTimeout(this.snapTimer),this.snapTimer=setTimeout(this.snapPosition,this.snapDelay*1000)};snapPosition=()=>{let{scroller:y}=this.parts,x=Math.round(y.scrollLeft/y.offsetWidth);if(x!==this.page)this.page=x>this.page?Math.ceil(x):Math.floor(x);this.lastAutoAdvance=Date.now()};back=()=>{this.page=this.page>0?this.page-1:this.lastPage};forward=()=>{this.page=this.page<this.lastPage?this.page+1:0};handleDotClick=(y)=>{let{progress:x}=this.parts,h=[...x.children].indexOf(y.target);if(h>-1)this.page=Math.floor(h/this.maxVisibleItems)};snapTimer;animationFrame;animateScroll(y,x=-1,h=0){cancelAnimationFrame(this.animationFrame);let{scroller:C}=this.parts;if(x===-1){x=C.scrollLeft,h=Date.now(),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(y,x,h)});return}let k=(Date.now()-h)/1000;if(k>=this.snapDuration||Math.abs(C.scrollLeft-y)<2)C.scrollLeft=y,this.animationFrame=null;else C.scrollLeft=x+this.easing(k/this.snapDuration)*(y-x),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(y,x,h)})}content=()=>[j4({part:"pager"},j3({title:"previous slide",part:"back"},Q.chevronLeft()),j4({title:"slides",role:"group",part:"scroller"},j4({part:"grid"},nh())),j3({title:"next slide",part:"forward"},Q.chevronRight())),j4({title:"choose slide to display",role:"group",part:"progress"})];connectedCallback(){super.connectedCallback(),this.ariaRoleDescription="carousel",this.ariaOrientation="horizontal",this.ariaReadOnly="true";let{back:y,forward:x,scroller:h,progress:C}=this.parts;y.addEventListener("click",this.back),x.addEventListener("click",this.forward),h.addEventListener("scroll",this.indicateCurrent),C.addEventListener("click",this.handleDotClick),this.lastAutoAdvance=Date.now(),this.interval=setInterval(this.autoAdvance,100)}disconnectedCallback(){clearInterval(this.interval)}render(){super.render();let{dots:y,arrows:x,visibleItems:h,lastPage:C}=this,{progress:k,back:B,forward:w,grid:g}=this.parts;h.forEach((z)=>{z.role="group"}),g.style.gridTemplateColumns=`${100/this.maxVisibleItems/(1+this.lastPage)}% `.repeat(h.length).trim(),g.style.width=(1+this.lastPage)*100+"%",k.textContent="",k.append(...h.map((z,q)=>j3({title:`item ${q+1}`,class:"dot"}))),this.indicateCurrent(),k.style.display=y&&C>0?"":"none",B.hidden=w.hidden=!(x&&C>0)}}var Eh=V4,U6=V4.elementCreator(),oh=U6;var{div:G6,span:Q6}=G;function $6(y,x){let h=y.split(`
14
14
  `),C=x.split(`
15
- `),l=h.length,i=C.length,k=Array.from({length:l+1},()=>Array(i+1).fill(0));for(let q=l-1;q>=0;q-=1)for(let j=i-1;j>=0;j-=1)k[q][j]=h[q]===C[j]?k[q+1][j+1]+1:Math.max(k[q+1][j],k[q][j+1]);let g=[],w=0,B=0;while(w<l&&B<i)if(h[w]===C[B])g.push({op:"context",text:h[w]}),w+=1,B+=1;else if(k[w+1][B]>=k[w][B+1])g.push({op:"remove",text:h[w]}),w+=1;else g.push({op:"add",text:C[B]}),B+=1;while(w<l)g.push({op:"remove",text:h[w]}),w+=1;while(B<i)g.push({op:"add",text:C[B]}),B+=1;return g}var dh={context:" ",add:"+",remove:"-"};class g3 extends F{static preferredTagName="tosi-diff";static initAttributes={original:"",modified:""};static shadowStyleSpec={":host":{display:"block",overflow:"auto",font:"var(--tosi-code-font, 12px/1.5 monospace)",background:"var(--tosi-diff-bg, #fff)",color:"var(--tosi-diff-color, #222)"},":host([hidden])":{display:"none"},".diff-line":{display:"grid",gridTemplateColumns:"1.5em 1fr",whiteSpace:"pre-wrap",wordBreak:"break-word"},".diff-line .marker":{textAlign:"center",userSelect:"none",opacity:"0.5"},".diff-add":{background:"var(--tosi-diff-add-bg, #e6ffed)"},".diff-add .marker":{color:"var(--tosi-diff-add-color, #22863a)"},".diff-remove":{background:"var(--tosi-diff-remove-bg, #ffeef0)"},".diff-remove .marker":{color:"var(--tosi-diff-remove-color, #cb2431)"}};content=()=>[j6({part:"body"})];render(){super.render();let y=P6(this.original,this.modified);this.parts.body.replaceChildren(...y.map((x)=>j6({class:`diff-line diff-${x.op}`},V6({class:"marker"},dh[x.op]),V6({class:"text"},x.text===""?" ":x.text))))}}var w0=g3.elementCreator();var{div:_6}=G,A6=new Set,B0=(y,x)=>{if(A6.has(y))return;A6.add(y),console.warn(`<tosi-code>.${y} was removed in tosijs-ui 1.7 (the editor is now CodeMirror 6, not ACE) — ${x}. See CHANGELOG 1.7.0.`)},K6=!1,j4=!1;class o1 extends F{static preferredTagName="tosi-code";source="";_handle;_loadPromise;_loadGeneration=0;_appliedMode="";_appliedDisabled;_tjsAutocomplete;get tjsAutocomplete(){return this._tjsAutocomplete}set tjsAutocomplete(y){if(this._tjsAutocomplete=y,this._handle&&this.isTjsMode())this.applyTjsExtension()}get value(){return this._handle?this._handle.getValue():this.source}set value(y){if(this._handle)this._handle.setValue(y);else this.source=y}_original;get original(){return this._original??this.value}set original(y){this._original=y}diffOverlay;_pendingDiff;get showingDiff(){if(!this.hydrated)return this._pendingDiff??!1;return!this.parts.diffHost.hidden}showDiff(y){if(!this.hydrated){this._pendingDiff=y;return}let{diffHost:x}=this.parts;if(y){if(this.diffOverlay===void 0)this.diffOverlay=w0(),x.append(this.diffOverlay);this.diffOverlay.original=this.original,this.diffOverlay.modified=this.value}x.hidden=!y}static initAttributes={mode:"javascript",disabled:!1};role="code editor";get editor(){if(!K6)K6=!0,console.info("<tosi-code>.editor is the CodeMirror 6 EditorView (the supported accessor; it was an ACE editor in 1.6). ACE-era `editor.session` / `getSession()` / "+"`setOption()` are gone — use undo()/redo()/canUndo()/canRedo() for history.");return this._handle?.view}get theme(){return B0("theme","style the editor with --code-bg / --text-color instead"),""}set theme(y){B0("theme","style the editor with --code-bg / --text-color instead")}get options(){return B0("options","configure CodeMirror via the `editor` (EditorView) instead"),{}}set options(y){B0("options","configure CodeMirror via the `editor` (EditorView) instead")}get ace(){B0("ace","use `editor`, which is now a CodeMirror EditorView");return}undo(){this._handle?.undo()}redo(){this._handle?.redo()}canUndo(){return this._handle?.canUndo()??!1}canRedo(){return this._handle?.canRedo()??!1}content=()=>[_6({part:"host"}),_6({part:"diffHost",hidden:!0})];static shadowStyleSpec={":host":{display:"block",position:"relative",width:"100%",height:"100%"},'[part="host"]':{height:"100%"},'[part="diffHost"]':{position:"absolute",inset:"0",zIndex:"5",overflow:"auto",background:P.tosiDiffBg(P.background("#fff"))},".cm-editor":{height:"100%"},".cm-scroller":{outline:"none",fontFamily:"Menlo, Monaco, Consolas, 'Courier New', monospace"}};handleResize(){this._handle?.refresh()}connectedCallback(){if(super.connectedCallback(),this.source==="")this.value=this.textContent!==null?this.textContent.trim():"";if(this._pendingDiff!==void 0){let y=this._pendingDiff;this._pendingDiff=void 0,this.showDiff(y)}if(this._loadPromise===void 0){let y=++this._loadGeneration;this._loadPromise=import("./code-editor-cm-95n31m4f.js").then(({createCmEditor:x})=>{if(y!==this._loadGeneration||!this.isConnected)return;let h=x(this.parts.host,{value:this.source,mode:this.mode,readOnly:this.disabled,root:this.shadowRoot??void 0,onChange:(C)=>this.dispatchEvent(new CustomEvent("change",{detail:{value:C}}))});return this._handle=h,this._appliedMode=this.mode,this._appliedDisabled=this.disabled,this.applyTjsExtension(),h})}}disconnectedCallback(){if(super.disconnectedCallback(),this._handle)this.source=this._handle.getValue(),this._handle.destroy(),this._handle=void 0;this._loadPromise=void 0,this._appliedMode="",this._appliedDisabled=void 0}isTjsMode(){return this.mode==="tjs"||this.mode==="ajs"}applyTjsExtension(){let y=this._handle;if(!y||!this.isTjsMode())return;import("./code-editor-cm-95n31m4f.js").then(({loadTjsExtension:x})=>x(this._tjsAutocomplete??{})).then((x)=>{if(x&&this._handle===y&&this.isTjsMode()){y.setLanguageExtension(x),this._tjsExtensionApplied=!0;return}if(!x&&this._handle===y&&this.isTjsMode()&&!j4)j4=!0,console.warn(`<tosi-code mode="${this.mode}">: tjs-lang's CodeMirror extension did not load — `+"falling back to TypeScript highlighting (no tjs autocomplete). Install the optional peer `tjs-lang`, or check that tjs-lang/editors/codemirror still exports `tjsEditorExtension`.")}).catch((x)=>{if(!j4)j4=!0,console.warn("<tosi-code>: failed to apply the tjs extension —",x)})}get tjsExtensionApplied(){return this._tjsExtensionApplied}_tjsExtensionApplied=!1;render(){if(super.render(),this._handle){if(this.disabled!==this._appliedDisabled)this._handle.setReadOnly(this.disabled),this._appliedDisabled=this.disabled;if(this.mode!==this._appliedMode)this._handle.setMode(this.mode),this._appliedMode=this.mode,this.applyTjsExtension()}}}var n1=o1.elementCreator();var{input:w3}=G,U6=X.fromCss("#8888");class G6 extends F{static preferredTagName="tosi-color";value=U6.rgba;color=U6;static shadowStyleSpec={":host":{_gap:8,_swatchSize:32,_cssWidth:72,_alphaWidth:72,display:"inline-flex",gap:z.gap,alignItems:"center"},':host input[type="color"]':{border:0,width:z.swatchSize,height:z.swatchSize,background:"transparent"},":host::part(alpha)":{width:z.alphaWidth},":host::part(css)":{width:z.cssWidth,fontFamily:"monospace"}};content=[w3({title:"base color",type:"color",part:"rgb"}),w3({type:"range",title:"opacity",part:"alpha",min:0,max:1,step:0.05}),w3({title:"css color spec",part:"css"})];valueChanged=!1;update=(y)=>{let{rgb:x,alpha:h,css:C}=this.parts;if(y.type==="input")this.color=X.fromCss(x.value),this.color.a=Number(h.value),C.value=this.color.html;else this.color=X.fromCss(C.value),x.value=this.color.html.substring(0,7),h.value=String(this.color.a);x.style.opacity=String(this.color.a),this.value=this.color.rgba,this.valueChanged=!0};connectedCallback(){super.connectedCallback();let{rgb:y,alpha:x,css:h}=this.parts;y.addEventListener("input",this.update),x.addEventListener("input",this.update),h.addEventListener("change",this.update)}render(){if(this.valueChanged){this.valueChanged=!1;return}let{rgb:y,alpha:x,css:h}=this.parts;this.color=X.fromCss(this.value),y.value=this.color.html.substring(0,7),y.style.opacity=String(this.color.a),x.value=String(this.color.a),h.value=this.color.html}}var B3=G6.elementCreator();var y2=G.div({style:{content:" ",position:"fixed",top:0,left:0,right:0,bottom:0}}),V4={passive:!0},P1=(y,x,h="move")=>{if(!y.type.startsWith("touch")){let{clientX:l,clientY:i}=y;y2.style.cursor=h,x2(y2),document.body.append(y2);let k=(g)=>{let w=g.clientX-l,B=g.clientY-i;if(x(w,B,g)===!0)y2.removeEventListener("mousemove",k),y2.removeEventListener("mouseup",k),y2.remove()};y2.addEventListener("mousemove",k,V4),y2.addEventListener("mouseup",k,V4)}else if(y instanceof TouchEvent){let l=y.changedTouches[0],i=l.identifier,k=l.clientX,g=l.clientY,w=y.target,B=0,q=0,j=(_)=>{let K=[..._.touches].find((U)=>U.identifier===i);if(K!==void 0)B=K.clientX-k,q=K.clientY-g;if(_.type==="touchmove")_.stopPropagation(),_.preventDefault();if(x(B,q,_)===!0||K===void 0)w.removeEventListener("touchmove",j),w.removeEventListener("touchend",j),w.removeEventListener("touchcancel",j)};w.addEventListener("touchmove",j),w.addEventListener("touchend",j,V4),w.addEventListener("touchcancel",j,V4)}},P2=(y="body *")=>[...document.querySelectorAll(y)].map((x)=>parseFloat(getComputedStyle(x).zIndex)).reduce((x,h)=>isNaN(x)||Number(x)<h?h:Number(x),0),x2=(y,x="body *")=>{y.style.zIndex=String(P2(x)+1)};function P4(y,x=!0){return(h,C)=>{let l=y(h),i=y(C);for(let k in l)if(l[k]!==i[k])return(Array.isArray(x)?x[k]!==!1:x)?l[k]>i[k]?1:-1:l[k]>i[k]?-1:1;return 0}}var{slot:Lh}=G;class f1 extends F{static preferredTagName="tosi-float";static floats=new Set;static initAttributes={drag:!1,remainOnResize:"remove",remainOnScroll:"remain"};content=Lh();static shadowStyleSpec={":host":{position:"fixed"}};reposition=(y)=>{if(y instanceof MouseEvent&&y.button!==0)return;if(y.target?.closest(".no-drag"))return;if(this.drag){x2(this);let h=this.offsetLeft,C=this.offsetTop;P1(y,(l,i,k)=>{if(this.style.left=`${h+l}px`,this.style.top=`${C+i}px`,this.style.right="auto",this.style.bottom="auto",k.type==="mouseup")return!0})}};connectedCallback(){super.connectedCallback(),nh(),f1.floats.add(this);let y={passive:!0};this.addEventListener("touchstart",this.reposition,y),this.addEventListener("mousedown",this.reposition,y),x2(this)}disconnectedCallback(){super.disconnectedCallback(),f1.floats.delete(this)}}var rh=f1,z0=f1.elementCreator(),oh=z0,F6=!1;function nh(){if(F6)return;F6=!0,window.addEventListener("resize",()=>{Array.from(f1.floats).forEach((y)=>{if(y.remainOnResize==="hide")y.hidden=!0;else if(y.remainOnResize==="remove")y.remove()})},{passive:!0}),document.addEventListener("scroll",(y)=>{if(y.target instanceof HTMLElement&&y.target.closest(f1.tagName))return;Array.from(f1.floats).forEach((x)=>{if(x.remainOnScroll==="hide")x.hidden=!0;else if(x.remainOnScroll==="remove")x.remove()})},{passive:!0,capture:!0})}var q0=(y)=>{let{content:x,target:h,position:C,remainOnScroll:l,remainOnResize:i,draggable:k}=y,g=Array.isArray(x)?z0(...x):z0(x);if(O6(g,h,C,l,i,k),y.class)g.setAttribute("class",y.class);return document.body.append(g),g},O6=(y,x,h,C,l,i=!1)=>{{let{position:U}=getComputedStyle(y);if(U!=="fixed")y.style.position="fixed";if(l)y.remainOnResize=l;if(C)y.remainOnScroll=C;x2(y)}y.drag=i;let{left:k,top:g,width:w,height:B}=x.getBoundingClientRect(),q=k+w*0.5,j=g+B*0.5,_=window.innerWidth,K=window.innerHeight;if(h==="side")h=(q<_*0.5?"e":"w")+(j<K*0.5?"s":"n");else if(h==="auto"||h===void 0)h=(j<K*0.5?"s":"n")+(q<_*0.5?"e":"w");if(y.style.top=y.style.left=y.style.right=y.style.bottom=y.style.transform="",h.length===2){let[U,Q]=h;switch(U){case"n":y.style.bottom=(K-g).toFixed(2)+"px";break;case"e":y.style.left=(k+w).toFixed(2)+"px";break;case"s":y.style.top=(g+B).toFixed(2)+"px";break;case"w":y.style.right=(_-k).toFixed(2)+"px";break}switch(Q){case"n":y.style.bottom=(K-g-B).toFixed(2)+"px";break;case"e":y.style.left=k.toFixed(2)+"px";break;case"s":y.style.top=g.toFixed(2)+"px";break;case"w":y.style.right=(_-k-w).toFixed(2)+"px";break}y.style.transform=""}else if(h==="n")y.style.bottom=(K-g).toFixed(2)+"px",y.style.left=q.toFixed(2)+"px",y.style.transform="translateX(-50%)";else if(h==="s")y.style.top=(g+B).toFixed(2)+"px",y.style.left=q.toFixed(2)+"px",y.style.transform="translateX(-50%)";else if(h==="e")y.style.left=(k+w).toFixed(2)+"px",y.style.top=j.toFixed(2)+"px",y.style.transform="translateY(-50%)";else if(h==="w")y.style.right=(_-k).toFixed(2)+"px",y.style.top=j.toFixed(2)+"px",y.style.transform="translateY(-50%)";y.style.setProperty("--max-height",`calc(100vh - ${y.style.top||y.style.bottom})`),y.style.setProperty("--max-width",`calc(100vw - ${y.style.left||y.style.right})`)};var W6=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||""),fh=W6?{meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧",escape:"⎋"}:{meta:"Meta",ctrl:"Ctrl",alt:"Alt",shift:"Shift",escape:"Esc"},Q6=(y)=>{if(y.code)return y.code.replace(/^Key|^Digit/,"");return y.key},uh=(y)=>{let x=[];if(y.altKey)x.push("alt");if(y.ctrlKey)x.push("ctrl");if(y.metaKey)x.push("meta");if(y.shiftKey)x.push("shift");return x.push(Q6(y)),x.join("-")},Eh=[[/\^|ctrl-?/i,"ctrlKey"],[/⌘|meta-?/i,"metaKey"],[/⌥|⎇|alt-?|option-?/i,"altKey"],[/⇧|shift-?/i,"shiftKey"]],_4=(y)=>{let x=y.trim(),h={ctrlKey:!1,metaKey:!1,altKey:!1,shiftKey:!1,key:""};for(let[C,l]of Eh)if(C.test(x))h[l]=!0,x=x.replace(C,"");return x=x.replace(/^-+/,""),h.key=x.toLowerCase(),h},z3=(y,x)=>{let h=_4(x);return y.key.toLowerCase()===h.key&&y.metaKey===h.metaKey&&y.ctrlKey===h.ctrlKey&&y.altKey===h.altKey&&y.shiftKey===h.shiftKey},ah=(y)=>{let x=_4(y),h=[];if(x.altKey)h.push("alt");if(x.ctrlKey)h.push("ctrl");if(x.metaKey)h.push("meta");if(x.shiftKey)h.push("shift");return h.push(x.key),h.join("-")},A4=(y)=>{let x=_4(y);if(W6){let C=[];if(x.ctrlKey)C.push("⌃");if(x.altKey)C.push("⌥");if(x.shiftKey)C.push("⇧");if(x.metaKey)C.push("⌘");return C.push(x.key.toUpperCase()),C.join("")}let h=[];if(x.ctrlKey)h.push("Ctrl");if(x.altKey)h.push("Alt");if(x.shiftKey)h.push("Shift");if(x.metaKey)h.push("Meta");return h.push(x.key.toUpperCase()),h.join("+")};var U4={};c5(U4,{stringToTypes:()=>v2,isTypeAllowed:()=>R2,init:()=>V3,draggedElement:()=>xC});var mh=()=>!!document.querySelector(".drag-source"),R2=(y,x)=>{if(!y)return!1;for(let h of y)if(h==="special/any")return!0;else if(h.indexOf("*")>-1){let[C,l]=h.split("/"),[i,k]=x.split("/");if((C==="*"||C===i)&&(l==="*"||l===k))return!0}else if(h===x)return!0},K4=(y)=>{for(let x of[...document.querySelectorAll(`.${y}`)])x.classList.remove(y)},Y6=()=>{if(p2)p2.disconnect(),p2=null;q3=[],K4("drag-over"),K4("drag-source"),K4("drag-target")},v2=(y,x=";")=>{return(y||"").split(x).map((h)=>h.trim()).filter((h)=>h!=="")},q3=[],p2=null,j3=(y)=>{if(!y)y=[];q3=y;let x=[...document.querySelectorAll("[data-drop]")];for(let h of x){let C=v2(h.dataset.drop);if(y.find((l)=>R2(C,l)))h.classList.add("drag-target");else h.classList.remove("drag-target")}if(!p2)p2=new MutationObserver(()=>j3(q3)),p2.observe(document.body,{childList:!0,subtree:!0})};function th(y){let x=y.target?.closest('[draggable="true"],a[href]');if(!x)return;x.classList.add("drag-source");let h=x.matches('[draggable="true"]')?v2(x.dataset.drag||"text/html"):v2(x.dataset.drag||"url");for(let C of h){let l=x.dataset.dragContent||(C==="text/html"?x.innerHTML:x.textContent);y.dataTransfer?.setData(C,l||"")}j3(y.dataTransfer?.types),y.stopPropagation()}function X6(y){if(!mh())j3(y.dataTransfer?.types);let x=y.target.closest(".drag-target");if(x&&y.dataTransfer)x.classList.add("drag-over"),y.dataTransfer.dropEffect="copy";else y.preventDefault(),y.stopPropagation()}function eh(){K4("drag-over")}function yC(y){let x=y.target.closest(".drag-target");if(x){let h=(x.dataset?.drop||"").split(";");for(let C of h)if(R2(y.dataTransfer?.types,C))if(C==="text/html")x.innerHTML=y.dataTransfer?.getData(C)||"";else x.textContent=y.dataTransfer?.getData(C)||""}Y6()}var xC=()=>document.querySelector(".drag-source"),$6=!1,V3=()=>{if($6)return;document.body.addEventListener("dragstart",th),document.body.addEventListener("dragenter",X6),document.body.addEventListener("dragover",X6),document.body.addEventListener("drop",yC),document.body.addEventListener("dragleave",eh),document.body.addEventListener("dragend",Y6),window.addEventListener("dragover",(y)=>y.preventDefault()),window.addEventListener("drop",(y)=>y.preventDefault()),$6=!0};var G1=(y)=>typeof y==="function"?y():y,{div:N6,button:P0,span:E,a:hC,tosiSlot:CC}=G,v6=(y)=>{let x=[];for(let h of y)if(h===null){if(x.length>0&&x[x.length-1]!==null)x.push(h)}else x.push(h);while(x.length>0&&x[x.length-1]===null)x.pop();return x},V0=(y,x,h=!1)=>{let C=[];for(let l of y){if(l===null){C.push(l);continue}if(typeof l==="function"){C.push(l);continue}let{acceptsDrop:i}=l;if(!i){if(!h)C.push({...l,enabled:()=>!1});continue}if(!x.some((w)=>R2(i,w))){if(!h)C.push({...l,enabled:()=>!1});continue}let g=l;if(g.menuItems){let w=V0(G1(g.menuItems),x,!0);if(w.length>0||g.dropAction){let B=h?w:V0(G1(g.menuItems),x,!1);C.push({...g,menuItems:B})}else if(!h)C.push({...g,enabled:()=>!1})}else C.push(l)}return v6(C)},P3=(y,x=!1)=>{let h=[];for(let C of y){if(C===null){h.push(C);continue}if(typeof C==="function"){h.push(C);continue}let{action:l,menuItems:i}=C;if(l||i)if(i){let k=P3(G1(i),!0);if(k.length>0){let g=x?k:P3(G1(i),!1);h.push({...C,menuItems:g})}else if(!x)h.push({...C,enabled:()=>!1})}else h.push(C);else if(!x)h.push({...C,enabled:()=>!1})}return v6(h)},lC={overflow:"hidden auto",maxHeight:`calc(${z.maxHeight} - ${P.menuInset("8px")})`,borderRadius:z.spacing50,background:P.menuBg("#fafafa"),boxShadow:P.menuShadow(`${z.spacing13} ${z.spacing50} ${z.spacing} #0004`)},iC={boxShadow:"none",border:"none !important",display:"grid",alignItems:"center",justifyContent:"flex-start",textDecoration:"none",gridTemplateColumns:"0px 1fr max-content",width:"100%",gap:0,background:"transparent",padding:P.menuItemPadding("0 8px"),height:P.menuItemHeight("48px"),lineHeight:P.menuItemHeight("48px"),textAlign:"left"},kC={color:P.menuItemColor("#222")},gC={boxShadow:"none !important",background:P.menuItemHoverBg("#eee")},J6={boxShadow:"none !important",background:P.menuItemActiveBg("#aaa"),color:P.menuItemActiveColor("#000")},wC={background:`${P.menuDropOverBg("#2196F3")} !important`,color:`${P.menuDropOverColor("#fff")} !important`},BC={color:`${P.menuDropOverColor("#fff")} !important`},zC={stroke:`${P.menuDropOverColor("#fff")} !important`},Z6={boxShadow:`inset 0 0 0 2px color-mix(in srgb, ${P.menuDropOverBg("#2196F3")} 50%, transparent) !important`},qC={".xin-menu, .tosi-menu":lC,".xin-menu > div, .tosi-menu > div":{width:P.menuWidth("auto")},".xin-menu-trigger, .tosi-menu-trigger":{paddingLeft:0,paddingRight:0,minWidth:P.touchSize("48px")},".xin-menu-separator, .tosi-menu-separator":{display:"inline-block",content:" ",height:"1px",width:"100%",background:P.menuSeparatorColor("#2224"),margin:P.menuSeparatorMargin("8px 0")},".xin-menu-element, .tosi-menu-element":{minHeight:P.menuItemHeight("48px")},".xin-menu-item, .tosi-menu-item":iC,".xin-menu-item, .xin-menu-item > span, .tosi-menu-item, .tosi-menu-item > span":kC,".xin-menu-with-icons .xin-menu-item, .tosi-menu-with-icons .tosi-menu-item":{gridTemplateColumns:"24px 1fr max-content",gap:P.menuItemGap("8px")},".xin-menu-shortcut, .tosi-menu-shortcut":{whiteSpace:"nowrap",paddingLeft:"1em",textAlign:"right",opacity:"0.65"},".xin-menu-item > :first-child, .tosi-menu-item > :first-child":{justifySelf:"center",alignSelf:"center"},".xin-menu-item svg, .tosi-menu-item svg":{stroke:P.menuItemIconColor("#222")},".xin-menu-item.xin-menu-item-checked, .tosi-menu-item.tosi-menu-item-checked":{background:P.menuItemHoverBg("#eee")},".xin-menu-item > span:nth-child(2), .tosi-menu-item > span:nth-child(2)":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"left"},".xin-menu-item:hover, .tosi-menu-item:hover":gC,".xin-menu-item.drag-target:hover, .tosi-menu-item.drag-target:hover":Z6,".xin-menu-item:active, .tosi-menu-item:active":J6,".xin-menu-item:active svg, .tosi-menu-item:active svg":{stroke:P.menuItemIconActiveColor("#000")},".xin-menu-item-highlight, .tosi-menu-item-highlight":J6,".xin-menu-item-highlight svg, .tosi-menu-item-highlight svg":{stroke:P.menuItemIconActiveColor("#000")},".xin-drop-over, .tosi-drop-over":wC,".xin-drop-over > span, .tosi-drop-over > span":BC,".xin-drop-over svg, .tosi-drop-over svg":zC,".drag-target":Z6},p6=!1;function A3(){if(p6)return;p6=!0,W1("xin-menu-helper",qC),document.addEventListener("mousedown",(y)=>{if(x1.length===0)return;let x=y.composedPath();if(!x1.find((h)=>x.includes(h.target)||x.includes(h.menu)))h1(0)}),document.body.addEventListener("keydown",(y)=>{if(y.key==="Escape")h1(0)})}var R6=(y,x)=>{let h=y.checked&&y.checked()&&"check"||!1,C=y?.icon||h||E(" ");if(typeof C==="string")C=O[C]();let l=x.role==="listbox"?"option":"menuitem",i,k=y.properties||{};if(typeof y?.action==="string")i=hC(k,{role:l,href:y.action},C,x.localized?E(c(y.caption)):E(y.caption),E({class:"tosi-menu-shortcut"},y.shortcut?A4(y.shortcut):" "));else i=P0(k,{role:l,onClick:y.action},C,x.localized?E(c(y.caption)):E(y.caption),E({class:"tosi-menu-shortcut"},y.shortcut?A4(y.shortcut):" "));if(i.classList.add("xin-menu-item","tosi-menu-item"),i.classList.toggle("xin-menu-item-checked",h!==!1),i.classList.toggle("tosi-menu-item-checked",h!==!1),y.tooltip)i.dataset.tooltip=y.tooltip;if(x.role==="listbox")i.toggleAttribute("aria-selected",h!==!1);if(y?.enabled&&!y.enabled())i.setAttribute("disabled",""),i.setAttribute("aria-disabled","true");return i},D6=(y,x)=>{let h=y?.icon||E(" ");if(typeof h==="string")h=O[h]();let C=y.properties||{},l=P0(C,{onDragenter(i){H2(),l.classList.add("xin-drop-over","tosi-drop-over"),i.preventDefault()},onDragover(i){if(i.preventDefault(),i.dataTransfer)i.dataTransfer.dropEffect="copy"},onDragleave(i){let k=i.relatedTarget;if(k&&l.contains(k))return;l.classList.remove("xin-drop-over","tosi-drop-over")},onDrop(i){if(i.preventDefault(),i.stopPropagation(),l.classList.remove("xin-drop-over","tosi-drop-over"),y.dropAction&&i.dataTransfer)y.dropAction(i.dataTransfer);h1(0)}},h,x.localized?E(c(y.caption)):E(y.caption),E(" "));if(l.classList.add("xin-menu-item","tosi-menu-item"),y.tooltip)l.dataset.tooltip=y.tooltip;if(y.dropAction&&y.acceptsDrop)l.dataset.drop=y.acceptsDrop.join(";");if(y?.enabled&&!y.enabled())l.setAttribute("disabled",""),l.setAttribute("aria-disabled","true");return l},_3=(y,x)=>{let h=y.checked&&y.checked()&&"check"||!1,C=y?.icon||h||E(" ");if(typeof C==="string")C=O[C]();let l=null,i=!1,k=y.properties||{},g=P0(k,{disabled:!(!y.enabled||y.enabled()),onClick(w){if(x._dropMode)return;n(Object.assign({},x,{menuItems:G1(y.menuItems),target:g,submenuDepth:(x.submenuDepth||0)+1,position:"side"})),w.stopPropagation(),w.preventDefault()},onDragenter(w){if(!x._dropMode)return;H2(),w.preventDefault(),w.stopPropagation();let B=w.relatedTarget;if(B&&g.contains(B))return;if(g.classList.add("xin-drop-over","tosi-drop-over"),i){if(h1((x.submenuDepth||0)+1),i=!1,l)clearTimeout(l);l=null;return}if(l)clearTimeout(l);l=setTimeout(()=>{i=!0;let q=G1(y.menuItems),j=x._dataTypes?V0(q,x._dataTypes,x.hideDisabled):q;if(j.length>0)n(Object.assign({},x,{menuItems:j,target:g,submenuDepth:(x.submenuDepth||0)+1,position:"side",_dropMode:!0,_dataTypes:x._dataTypes}))},x.disclosureDelay??200)},onDragover(w){if(!x._dropMode)return;if(w.preventDefault(),w.stopPropagation(),w.dataTransfer)w.dataTransfer.dropEffect=y.dropAction?"copy":"link"},onDragleave(w){if(!x._dropMode)return;let B=w.relatedTarget;if(B&&g.contains(B))return;if(i&&B&&x1.some((q)=>q.menu.contains(B)||q.target.contains(B)))return;if(g.classList.remove("xin-drop-over","tosi-drop-over"),l)clearTimeout(l),l=null},onDrop(w){if(!x._dropMode||!y.dropAction)return;if(w.preventDefault(),w.stopPropagation(),g.classList.remove("xin-drop-over","tosi-drop-over"),w.dataTransfer)y.dropAction(w.dataTransfer);h1(0)}},C,x.localized?E(c(y.caption)):E(y.caption),O.chevronRight({style:{justifySelf:"flex-end"}}));if(g.classList.add("xin-menu-item","tosi-menu-item"),y.tooltip)g.dataset.tooltip=y.tooltip;if(x._dropMode&&y.dropAction&&y.acceptsDrop)g.dataset.drop=y.acceptsDrop.join(";");return g},H6=(y,x)=>{if(y===null)return E({class:"xin-menu-separator tosi-menu-separator"});else if(typeof y==="function"){let h=y();return h.classList.add("xin-menu-element","tosi-menu-element"),h}else if(x._dropMode){let h=y;if(h.menuItems&&G1(h.menuItems).length>0)return _3(h,x);else if(y.dropAction)return D6(y,x);else{let l=y?.icon||E(" ");if(typeof l==="string")l=O[l]();return P0({class:"xin-menu-item tosi-menu-item",disabled:!0},l,x.localized?E(c(y.caption)):E(y.caption),E(" "))}}else{let h=y?.action?R6(y,x):_3(y,x);if(x.showChecked&&y.checked&&y.checked())requestAnimationFrame(()=>{h.scrollIntoView({block:"center"})});return h}},b6=(y)=>{let{target:x,width:h,menuItems:C,role:l="menu"}=y,i=C.find((w)=>w!=null&&typeof w!=="function"&&(w.icon||w.checked)),k=y.submenuDepth||0,g=N6({class:i?"xin-menu tosi-menu xin-menu-with-icons tosi-menu-with-icons":"xin-menu tosi-menu",role:l,onClick(){if(!y._dropMode)h1(0)},onDragover(w){if(!y._dropMode)return;w.preventDefault()},onDragenter(){if(!y._dropMode)return;H2()},onDragleave(w){if(!y._dropMode)return;let B=w.relatedTarget;if(B&&g.contains(B))return;if(B&&x1.some((q)=>q.menu.contains(B)||q.target.contains(B)))return;S6(k)}},N6({style:{minWidth:x.offsetWidth+"px",width:typeof h==="number"?`${h}px`:h},onMousedown(w){w.preventDefault(),w.stopPropagation()}},...C.map((w)=>H6(w,y))));return g},D2,x1=[],j0=null,H2=()=>{if(j0)clearTimeout(j0),j0=null},S6=(y)=>{H2(),j0=setTimeout(()=>{j0=null,h1(y)},500)},h1=(y=0)=>{if(H2(),y===0)document.querySelectorAll("tosi-menu.xin-drop-over, tosi-menu.tosi-drop-over").forEach((h)=>h.classList.remove("xin-drop-over","tosi-drop-over"));let x=x1.splice(y);for(let h of x)if(h.menu.remove(),h.onClose)h.onClose();return D2=x[0],y>0?x1[y-1]:void 0},n=(y)=>{A3(),y=Object.assign({submenuDepth:0},y);let{target:x,position:h,submenuDepth:C}=y;if(D2&&!document.body.contains(D2?.menu))D2=void 0;if(x1.length&&!document.body.contains(x1[0].menu))x1.splice(0);if(y._dropMode){if(x1.length>C&&x1[C]?.target===x)return;h1(C)}else{if(C===0&&D2?.target===x)return;let k=h1(C);if(D2?.target===x)return;if(k&&k.target===x){h1();return}}if(!y.menuItems?.length)return;let l=b6(y),i=q0({content:l,target:x,position:h});i.remainOnScroll=y._dropMode?"remain":"remove",x1.push({target:x,menu:i,onClose:y.onClose})},M6=(y)=>{A3();let{dataTypes:x,...h}=y,C=V0(y.menuItems,x,y.hideDisabled);if(!C.length)return;n({...h,menuItems:C,_dropMode:!0,_dataTypes:x})};function K3(y,x,h=[]){for(let C of y){if(!C)continue;if(typeof C==="function")continue;let{shortcut:l}=C,{menuItems:i}=C;if(l){if(z3(x,l)){let k=C;if(k.enabled&&!k.enabled())return;if(h.some((g)=>g.enabled&&!g.enabled()))return;return{action:k,path:h}}}else if(i){let k=K3(G1(i),x,[...h,C]);if(k)return k}}return}class G4 extends F{static preferredTagName="tosi-menu";static lightStyleSpec={":host":{display:"inline-flex",minWidth:z.touchSize,minHeight:z.touchSize},":host button":{margin:0,padding:0,alignSelf:"stretch",flex:"1",textAlign:"center"},":host button > tosi-slot":{display:"flex",alignItems:"center",gap:P.tosiMenuTriggerGap("10px")}};static initAttributes={menuWidth:"auto",localized:!1,icon:"",acceptsDrop:"",disclosureDelay:0,hideDisabled:!1};menuItems=[];dropAction=null;_dragMatches=!1;_matchesDrag(y){if(!this.acceptsDrop)return!1;let x=v2(this.acceptsDrop);return[...y.dataTransfer?.types||[]].some((C)=>x.some((l)=>R2([l],C)))}showMenu=(y)=>{if(y.type==="click"||y.code==="Space")n({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),y.stopPropagation(),y.preventDefault()};handleDragEnter=(y)=>{if(this._dragMatches=this._matchesDrag(y),!this._dragMatches)return;H2(),this.classList.add("xin-drop-over","tosi-drop-over");let x=[...y.dataTransfer?.types||[]];if(this.menuItems.length)M6({target:this.parts.trigger,menuItems:this.menuItems,dataTypes:x,width:this.menuWidth,localized:this.localized,disclosureDelay:this.disclosureDelay||void 0,hideDisabled:this.hideDisabled});y.preventDefault()};handleDragOver=(y)=>{if(!this._dragMatches)return;if(y.preventDefault(),y.dataTransfer)y.dataTransfer.dropEffect=this.dropAction?"copy":"link"};handleDragLeave=(y)=>{if(!this._dragMatches)return;let x=y.relatedTarget;if(x&&this.contains(x))return;if(x&&x1.some((h)=>h.menu.contains(x)||h.target.contains(x))){this.classList.remove("xin-drop-over","tosi-drop-over");return}this.classList.remove("xin-drop-over","tosi-drop-over"),S6(0)};handleDrop=(y)=>{if(!this._dragMatches||!this.dropAction)return;if(y.preventDefault(),y.stopPropagation(),this.classList.remove("xin-drop-over","tosi-drop-over"),y.dataTransfer)this.dropAction(y.dataTransfer);h1(0)};content=()=>P0({tabindex:0,part:"trigger",onClick:this.showMenu},CC());handleShortcut=async(y)=>{let x=K3(this.menuItems,y);if(!x)return;y.preventDefault(),y.stopImmediatePropagation();let{action:h,path:C}=x;if(this.isConnected&&document.body.contains(this))await this.animateShortcut(C,h);if(h.action instanceof Function)h.action()};findMenuItemByCaption(y,x){for(let h of y.querySelectorAll(".xin-menu-item")){let C=h.children[1];if(C&&C.textContent===x)return h}return null}async animateShortcut(y,x){h1(0),n({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),await new Promise((C)=>setTimeout(C,80));for(let C=0;C<y.length;C++){let l=C+1,i=x1[C]?.menu;if(!i)break;let k=this.findMenuItemByCaption(i,y[C].caption);if(!k)break;n({target:k,width:this.menuWidth,localized:this.localized,menuItems:G1(y[C].menuItems),submenuDepth:l,position:"side"}),await new Promise((g)=>setTimeout(g,80))}let h=x1[x1.length-1]?.menu;if(h){let C=this.findMenuItemByCaption(h,x.caption);if(C)C.classList.add("xin-menu-item-highlight","tosi-menu-item-highlight")}await new Promise((C)=>setTimeout(C,300)),h1(0)}constructor(){super();this.addEventListener("keydown",this.showMenu),this.addEventListener("dragenter",this.handleDragEnter),this.addEventListener("dragover",this.handleDragOver),this.addEventListener("dragleave",this.handleDragLeave),this.addEventListener("drop",this.handleDrop)}connectedCallback(){if(super.connectedCallback(),A3(),document.addEventListener("keydown",this.handleShortcut,!0),this.acceptsDrop)this.dataset.drop=this.acceptsDrop}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleShortcut)}}var I6=G4.elementCreator(),jC=I6,VC=G4;var{button:PC,span:c6,input:_C}=G,s6=(y,x)=>{return!!y.find((h)=>{if(h===null||x==null)return!1;else if(Array.isArray(h))return s6(h,x);else if(h.value===x||h===x)return!0})};class S1 extends F{static preferredTagName="tosi-select";static formAssociated=!0;static lightStyleSpec={":host":{"--tosi-select-gap":"var(--tosi-spacing-sm, 8px)","--tosi-select-touch-size":"var(--tosi-touch-size, 44px)","--tosi-select-padding":"0 var(--tosi-spacing-sm, 8px)","--tosi-select-value-padding":"0 var(--tosi-spacing-sm, 8px)","--tosi-select-icon-width":"24px","--tosi-select-field-width":"140px","--gap":"var(--tosi-select-gap)","--touch-size":"var(--tosi-select-touch-size)","--padding":"var(--tosi-select-padding)","--value-padding":"var(--tosi-select-value-padding)","--icon-width":"var(--tosi-select-icon-width)","--fieldWidth":"var(--tosi-select-field-width)",display:"inline-flex",position:"relative"},":host button":{display:"flex",alignItems:"center",justifyItems:"center",gap:z.tosiSelectGap,textAlign:"left",height:z.tosiSelectTouchSize,padding:z.tosiSelectPadding,position:"relative",width:"100%"},":host:not([show-icon]) button > :first-child":{display:"none"},":host[hide-caption] button > :nth-child(2)":{display:"none"},':host [part="value"]':{width:z.tosiSelectFieldWidth,padding:z.tosiSelectValuePadding,height:z.tosiSelectTouchSize,lineHeight:z.tosiSelectTouchSize,boxShadow:"none",whiteSpace:"nowrap",outline:"none",background:"transparent",flex:"1"},':host [part="value"]:not(:focus)':{overflow:"hidden",textOverflow:"ellipsis",background:"transparent"}};static initAttributes={editable:!1,placeholder:"",showIcon:!1,hideCaption:!1,localized:!1,disabled:!1,required:!1,name:""};_options=[];get options(){return this._options}set options(y){if(typeof y==="string")this._options=S1.parseOptionsString(y);else this._options=y;this.queueRender()}static parseOptionsString(y){return y.split(",").map((x)=>{let h=x.trim();if(h==="")return null;let[C,l]=h.split("=").map((g)=>g.trim());if(!l)return{value:C,caption:C};let[i,k]=l.split(":").map((g)=>g.trim());return{value:C,caption:i||C,icon:k||void 0}})}value="";filter="";isExpanded=!1;formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value=""}setValue=(y,x=!1)=>{if(this.value!==y)this.value=y,this.queueRender(!0);if(x)this.dispatchEvent(new Event("action"))};getValue=()=>this.value;get selectOptions(){return this.options}buildOptionMenuItem=(y)=>{if(y===null)return null;let{setValue:x,getValue:h}=this,C,l,i,k,g;if(typeof y==="string")l=i=y;else({icon:C,caption:l,value:i,tooltip:k,properties:g}=y);if(this.localized)l=c(l);let{options:w}=y;if(w)return{icon:C,caption:l,tooltip:k,properties:g,checked:()=>s6(w,h()),menuItems:w.map(this.buildOptionMenuItem)};return{icon:C,caption:l,tooltip:k,properties:g,checked:()=>h()===i,action:typeof i==="function"?async()=>{let B=await i();if(B!==void 0)x(B,!0)}:()=>{if(typeof i==="string")x(i,!0)}}};poppedOptions=[];get optionsMenu(){let y=this.selectOptions.map(this.buildOptionMenuItem);if(this.filter==="")return y;let x=(h)=>{if(h===null||typeof h==="function")return!0;else if(h.menuItems){let C=G1(h.menuItems);return h.menuItems=C.filter(x),C.length>0}else return h.caption.toLocaleLowerCase().includes(this.filter)};return y.filter(x)}handleChange=(y)=>{let{value:x}=this.parts,h=x.value||"";if(this.value!==String(h))this.value=h,this.dispatchEvent(new Event("change"));this.filter="",y.stopPropagation(),y.preventDefault()};handleKey=(y)=>{if(y.key==="Enter")y.preventDefault()};filterMenu=X2(()=>{this.filter=this.parts.value.value.toLocaleLowerCase(),h1(0),this.popOptions()});popOptions=(y)=>{if(y&&y.type==="click")this.filter="";this.poppedOptions=this.optionsMenu,this.isExpanded=!0,this.updateAriaExpanded(),n({target:this,menuItems:this.poppedOptions,showChecked:!0,role:"listbox",onClose:()=>{this.isExpanded=!1,this.updateAriaExpanded()}})};updateAriaExpanded(){let{value:y}=this.parts;y.setAttribute("aria-expanded",String(this.isExpanded))}content=()=>[PC({type:"button",part:"button",onClick:this.popOptions},c6(),_C({part:"value",value:this.value,tabindex:0,role:"combobox",ariaHaspopup:"listbox",ariaExpanded:"false",ariaAutocomplete:this.editable?"list":"none",onKeydown:this.handleKey,onInput:this.filterMenu,onChange:this.handleChange}),O.chevronDown())];get allOptions(){let y=[];function x(h){for(let C of h)if(typeof C==="string")y.push({caption:C,value:C});else if(C?.value)y.push(C);else if(C?.options)x(C.options)}return x(this.selectOptions),y}findOption(){return this.allOptions.find((x)=>x.value===this.value)||{caption:this.value,value:this.value}}localeChanged=()=>{this.queueRender()};connectedCallback(){super.connectedCallback();let y=this.getAttribute("options");if(y&&this._options.length===0)this._options=S1.parseOptionsString(y);if(this.localized)F4.allInstances.add(this)}disconnectedCallback(){if(super.disconnectedCallback(),this.localized)F4.allInstances.delete(this)}render(){super.render();let{value:y,button:x}=this.parts;x.disabled=this.disabled;let h=y.previousElementSibling,C=this.findOption(),l=c6();if(y.value=this.localized?c(C.caption):C.caption,C.icon)if(C.icon instanceof HTMLElement)l=C.icon.cloneNode(!0);else l=O[C.icon]();h.replaceWith(l),y.setAttribute("placeholder",this.localized?c(this.placeholder):this.placeholder),y.style.pointerEvents=this.editable?"":"none",y.readOnly=!this.editable}}var AC=S1,F1=S1.elementCreator(),KC=B1((...y)=>F1(...y),"xinSelect is deprecated, use tosiSelect instead (tag is now <tosi-select>)");var{span:d6}=G,{i18n:L}=t({i18n:{locale:window.navigator.language,locales:[window.navigator.language],languages:[window.navigator.language],emoji:[""],stringMap:{},localeOptions:[{icon:d6(),caption:window.navigator.language,value:window.navigator.language}]}});r1.localeOptions={toDOM(y,x){if(y instanceof S1)y.options=x}};var O4=(y)=>{if(L.locales.value.includes(y))L.locale.value=y;else console.error(`language ${y} is not available`)},U3=()=>{let y=Array.from(M1.allInstances);for(let x of y)x.localeChanged();r6()};L.locale.observe(U3);var _0="data-tosi-localized";function A0(y){let x=y.getAttribute(_0);if(!x)return;let h;try{h=JSON.parse(x)}catch(C){console.warn(`[data-tosi-localized] invalid JSON: ${x}`,C);return}if(!h||typeof h!=="object")return;for(let[C,l]of Object.entries(h)){if(typeof l!=="string")continue;y.setAttribute(C,c(l))}}function*L6(y){for(let x of Array.from(y.querySelectorAll(`[${_0}]`)))yield x;for(let x of Array.from(y.querySelectorAll("*"))){let h=x.shadowRoot;if(h)yield*L6(h)}}function r6(){if(typeof document>"u")return;for(let y of L6(document))A0(y)}var T6=null;if(typeof document<"u"&&typeof MutationObserver<"u"){let y=()=>{if(!document.body){queueMicrotask(y);return}T6=new MutationObserver((x)=>{for(let h of x){if(h.type==="attributes"&&h.target instanceof Element){A0(h.target);continue}for(let C of Array.from(h.addedNodes)){if(!(C instanceof Element))continue;if(C.hasAttribute(_0))A0(C);for(let l of Array.from(C.querySelectorAll(`[${_0}]`)))A0(l)}}}),T6.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[_0]}),r6()};y()}var UC=P4((y)=>[y.caption.toLocaleLowerCase()]);function G3(y){let[x,,h,C,...l]=y.split(`
16
- `).map((i)=>i.split("\t"));if(x&&h&&C&&l){if(L.locales.value=x,L.languages.value=h,L.emoji.value=C,L.stringMap.value=l.reduce((i,k)=>{return i[k[0].toLocaleLowerCase()]=k,i},{}),L.localeOptions.value=x.map((i,k)=>({icon:d6({title:x[k]},C[k]),caption:h[k],value:i})).sort(UC),!L.locales.value.includes(L.locale.value)){let i=L.locale.value.substring(0,2);L.locale.value=L.locales.value.find((k)=>k.substring(0,2)===i)||L.locales.value[0]}U3()}}function c(y){if(y.endsWith("…"))return c(y.substring(0,y.length-1))+"…";let x=L.locales.value.indexOf(L.locale.value);if(x>-1){let h=b(L.stringMap),C=y.toLocaleLowerCase(),l=h[C],i=l&&l[x];if((!i||i==='"')&&C.includes("#")){let k=h[C.substring(0,C.indexOf("#"))];i=k&&k[x]}if(i)i=i.split("#",2)[0],y=y.toLocaleLowerCase()===y?i.toLocaleLowerCase():i;else y=y.split("#",2)[0]}else y=y.split("#",2)[0];return y}class W4 extends F{static preferredTagName="tosi-locale-picker";static initAttributes={hideCaption:!1};content=()=>{return F1({part:"select",showIcon:!0,title:c("Language"),bindValue:L.locale,bindLocaleOptions:L.localeOptions})};render(){super.render(),this.parts.select.toggleAttribute("hide-caption",this.hideCaption)}}var GC=W4,o6=W4.elementCreator(),FC=o6;class M1 extends F{static preferredTagName="tosi-localized";static lightStyleSpec={":host":{pointerEvents:"none"}};static allInstances=new Set;static initAttributes={refString:""};contents=()=>G.tosiSlot();connectedCallback(){super.connectedCallback(),M1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),M1.allInstances.delete(this)}localeChanged(){if(!this.refString)this.refString=this.textContent||"";this.textContent=this.refString?c(this.refString):""}render(){super.render(),this.localeChanged()}}var F4=M1,Q1=M1.elementCreator(),OC=Q1;function f6(y){let x=/^\s*([a-zA-Z]+)\s*(?:\(([^)]*)\))?\s*$/.exec(y);if(!x)return{base:y.trim().toLowerCase(),args:[]};let h=x[2]===void 0?[]:x[2].split(",").map((C)=>C.trim()).filter(Boolean);return{base:x[1].toLowerCase(),args:h}}function WC(){try{return L.locale.value||void 0}catch{return}}function F3(y){let x=QC,h;return()=>{let C=WC();if(C!==x)x=C,h=y(C);return h}}var QC=Symbol("unbuilt");function n6(y){if(y===null||y===void 0||y==="")return null;let x=typeof y==="number"?y:Number(y);return Number.isFinite(x)?x:null}var XC=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],$C=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];function YC(y,x,h,C,l){let i=y<0,k=Math.abs(y),g=0;while(k>=x&&g<h.length-1)k/=x,g+=1;let w=(g===0?l:C).format(k);return`${i?"-":""}${w} ${h[g]}`}function NC(y,x){return{align:y,format:x,toDOM(h,C){h.textContent=x(C)}}}function O3(y){let{base:x,args:h}=f6(y),C=(i)=>({align:"right",format:(k)=>{let g=n6(k);return g===null?"":i(g)},toDOM(k,g){let w=n6(g);k.textContent=w===null?"":i(w),k.classList.toggle("-negative",w!==null&&w<0),k.classList.toggle("-zero",w===0)}}),l=(i)=>{let k=F3(i);return C((g)=>k().format(g))};switch(x){case"number":return l((i)=>new Intl.NumberFormat(i));case"currency":{let i=(h[0]||"USD").toUpperCase();return l((k)=>new Intl.NumberFormat(k,{style:"currency",currency:i}))}case"fixed":{let i=h[0]!==void 0?Math.max(0,Math.min(20,Math.trunc(Number(h[0]))||0)):2;return l((k)=>new Intl.NumberFormat(k,{minimumFractionDigits:i,maximumFractionDigits:i}))}case"percent":{let i=h[0]!==void 0?Math.max(0,Math.min(20,Math.trunc(Number(h[0]))||0)):0;return l((k)=>new Intl.NumberFormat(k,{style:"percent",minimumFractionDigits:i,maximumFractionDigits:i}))}case"sci":return l((i)=>new Intl.NumberFormat(i,{notation:"scientific"}));case"eng":return l((i)=>new Intl.NumberFormat(i,{notation:"engineering"}));case"bytes":{let i=(h[0]||"").toLowerCase()==="iec",k=i?1024:1000,g=i?$C:XC,w=F3((q)=>new Intl.NumberFormat(q,{maximumFractionDigits:1})),B=F3((q)=>new Intl.NumberFormat(q,{maximumFractionDigits:0}));return C((q)=>YC(q,k,g,w(),B()))}case"boolean":{let i=h[0]||"checkSquare",k=h.length===0?"square":h[1]||null,g=(w)=>{if(!w)return null;let B=O[w];return typeof B==="function"?B():document.createTextNode("")};return{align:"center",format:(w)=>g(w?i:k)??document.createTextNode(""),toDOM(w,B){let q=g(B?i:k);w.replaceChildren(...q?[q]:[])}}}default:return NC(void 0,(i)=>i==null?"":String(i))}}function JC(y,x,h){let C=y.find((l)=>l[x]!==void 0&&l[x]!==null);if(C!==void 0){let l=C[x];switch(typeof l){case"string":if(l.match(/^\d+(\.\d+)?$/))return 6*h;else if(l.includes(" "))return 20*h;else return 12*h;case"number":return 6*h;case"boolean":return 5*h;case"object":return!1;default:return 8*h}}return!1}var{div:K0,span:Q4,button:ZC}=G,u6=(y)=>y,E6=new WeakMap;function a6(y){if(!y.type||y.dataCell)return null;let x=E6.get(y);if(!x)x=O3(y.type),E6.set(y,x);return x}class X4 extends F{static preferredTagName="tosi-table";static lightStyleSpec={":host":{"--tosi-table-row-height":"32px","--tosi-table-touch-size":"var(--tosi-touch-size, 44px)","--tosi-table-dragged-header-bg":"#0004","--tosi-table-dragged-header-color":"#fff","--tosi-table-drop-header-bg":"#fff4",display:"block",overflow:"hidden",background:P.tosiTableBg("var(--tosi-bg, #fff)")},":host .scroll-area":{width:"100%",height:"100%",overflow:"auto",overscrollBehavior:"none"},":host .thead, :host .tbody":{display:"contents"},":host .tr":{display:"grid",gridTemplateColumns:z.tosiTableGridColumns,width:z.tosiTableGridRowWidth,height:z.tosiTableRowHeight,background:P.tosiTableBg("var(--tosi-bg, #fff)")},":host .thead .tr":{position:"sticky",top:"0",zIndex:"2",background:P.tosiTableHeaderBg(P.tosiTableBg("var(--tosi-bg, #fff)"))},":host .tbody-pinned-top .tr, :host .tbody-pinned-bottom .tr":{position:"sticky",zIndex:"1"},":host .th, :host .td":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"flex",alignItems:"center",height:z.tosiTableRowHeight,lineHeight:z.tosiTableRowHeight},":host .col-pinned":{position:"sticky",zIndex:"1",background:P.tosiTableBg("var(--tosi-bg, #fff)")},":host .th.col-pinned":{zIndex:"3",background:P.tosiTableHeaderBg(P.tosiTableBg("var(--tosi-bg, #fff)"))},":host .tr[aria-selected] .td":{background:P.tosiTableSelectedBg("var(--tosi-accent, #007AFF22)")},":host .td:focus, :host .th:focus":{outline:"2px solid var(--tosi-accent, #007AFF)",outlineOffset:"-2px",zIndex:"1"},":host .col-pinned:focus":{zIndex:"4"},":host .col-edge-right":{boxShadow:"1px 0 0 var(--tosi-table-edge-color, #0002)"},":host .col-edge-left":{boxShadow:"-1px 0 0 var(--tosi-table-edge-color, #0002)"},":host .row-edge-bottom":{boxShadow:"0 1px 0 var(--tosi-table-edge-color, #0002)"},":host .row-edge-top":{boxShadow:"0 -1px 0 var(--tosi-table-edge-color, #0002)"},":host .th .menu-trigger":{color:"currentColor",background:"none",padding:0,lineHeight:z.tosiTableTouchSize,height:z.tosiTableTouchSize,width:z.tosiTableTouchSize},':host [draggable="true"]':{cursor:"ew-resize"},':host [draggable="true"]:active':{background:z.tosiTableDraggedHeaderBg,color:z.tosiTableDraggedHeaderColor},":host .drag-over":{background:z.tosiTableDropHeaderBg}};static initAttributes={rowHeight:30,charWidth:15,minColumnWidth:30,select:!1,multiple:!1,pinnedTop:0,pinnedBottom:0,nosort:!1,nohide:!1,noreorder:!1,localized:!1};selectionChanged=()=>{};rowRendered=null;selectedKey=Symbol("selected");selectBinding=(y,x)=>{if(x==null)return;y.toggleAttribute("aria-selected",x[this.selectedKey]===!0)};maxVisibleRows=1e4;_head=null;_scrollArea=null;_tbodyTop=null;_tbodyBottom=null;_pinnedRowEdgeObserver=null;_rowCellsCache=new WeakMap;itemFor(y){return q2(y)}cellsFor(y){let x=b(y);for(let h of[this._tbodyTop,this._scrollArea,this._tbodyBottom]){if(!h)continue;let C=Y2(h);if(!C)continue;let l=C.itemToElement.get(x);if(l&&l.length>0){let i=l[0],k=this._rowCellsCache.get(i);if(!k)k=Array.from(i.children),this._rowCellsCache.set(i,k);return k}}return}get value(){return{array:this.array,filter:this.filter,columns:this.columns}}set value(y){let{array:x,columns:h,filter:C}=b(y);if(this._array!==x||this._columns!==h||this._filter!==C)this.queueRender();this._array=x||[],this._columns=h||null,this._filter=C||u6}rowData={visible:[],pinnedTopData:[],pinnedBottomData:[]};_array=[];_columns=null;_filter=u6;_sort;_pinnedTopRows;_pinnedBottomRows;get pinnedTopRows(){return this._pinnedTopRows}set pinnedTopRows(y){this._pinnedTopRows=y?b(y):void 0,this.queueRender()}get pinnedBottomRows(){return this._pinnedBottomRows}set pinnedBottomRows(y){this._pinnedBottomRows=y?b(y):void 0,this.queueRender()}get effectivePinnedTopData(){if(this._pinnedTopRows)return this._pinnedTopRows;return this.pinnedTop>0?this._array.slice(0,this.pinnedTop):[]}get effectivePinnedBottomData(){if(this._pinnedBottomRows)return this._pinnedBottomRows;return this.pinnedBottom>0?this._array.slice(-this.pinnedBottom):[]}get effectiveBaseData(){if(this._pinnedTopRows||this._pinnedBottomRows)return this._array;return this._array.slice(this.pinnedTop,this._array.length-this.pinnedBottom)}constructor(){super();this.rowData=t({[this.instanceId]:this.rowData})[this.instanceId]}get array(){return this._array}set array(y){this._array=b(y),this.queueRender()}get filter(){return this._filter}set filter(y){if(this._filter!==y)this._filter=y,this.queueRender()}get sort(){if(this._sort)return this._sort;let y=this._columns?.find((h)=>h.sort==="ascending"||h.sort==="descending");if(!y)return;let{prop:x}=y;return y.sort==="ascending"?(h,C)=>h[x]>C[x]?1:-1:(h,C)=>h[x]>C[x]?-1:1}set sort(y){if(this._sort!==y)this._sort=y,this.queueRender()}get columns(){if(!Array.isArray(this._columns)){let{_array:y}=this;this._columns=Object.keys(y[0]||{}).map((x)=>{let h=JC(y,x,this.charWidth);return{name:x.replace(/([a-z])([A-Z])/g,"$1 $2").toLocaleLowerCase(),prop:x,align:typeof y[0][x]==="number"||y[0][x]!==""&&!isNaN(y[0][x])?"right":"left",visible:h!==!1,width:h?h:0}})}return this._columns}set columns(y){this._columns=y,this.queueRender()}get visibleColumns(){let y=this.columns.filter((l)=>l.visible!==!1),x=y.filter((l)=>l.pinned==="left"),h=y.filter((l)=>!l.pinned),C=y.filter((l)=>l.pinned==="right");return[...x,...h,...C]}get pinnedLeft(){return this.visibleColumns.filter((y)=>y.pinned==="left").length}set pinnedLeft(y){let x=this.columns.filter((h)=>h.visible!==!1);for(let h of x)if(h.pinned==="left")delete h.pinned;for(let h=0;h<y&&h<x.length;h++)x[h].pinned="left";this.queueRender()}get pinnedRight(){return this.visibleColumns.filter((y)=>y.pinned==="right").length}set pinnedRight(y){let x=this.columns.filter((h)=>h.visible!==!1);for(let h of x)if(h.pinned==="right")delete h.pinned;for(let h=x.length-y;h<x.length;h++)if(h>=0)x[h].pinned="right";this.queueRender()}content=null;computeStickyInfo(y){let x=y.map(()=>({})),h=0,C=-1;for(let k=0;k<y.length;k++){if(y[k].pinned!=="left")break;x[k].left=h+"px",h+=y[k].width,C=k}if(C>=0)x[C].edgeClass="col-edge-right";let l=0,i=y.length;for(let k=y.length-1;k>=0;k--){if(y[k].pinned!=="right")break;x[k].right=l+"px",l+=y[k].width,i=k}if(i<y.length)x[i].edgeClass="col-edge-left";return x}cellClasses(y,x){let h=y;if(x.left!=null||x.right!=null)h+=" col-pinned";if(x.edgeClass)h+=" "+x.edgeClass;return h}rowClasses(y){return y==="visible"?"tr":"tr row-pinned"}tagPinnedRows=()=>{this.tagPinnedTbody(this._tbodyTop,"top"),this.tagPinnedTbody(this._tbodyBottom,"bottom")};tagPinnedTbody(y,x){if(!y)return;let h=Array.from(y.querySelectorAll(".tr"));if(h.length===0)return;let C=h.length-1,l=x==="top"?"row-edge-bottom":"row-edge-top";h.forEach((k,g)=>{k.classList.remove(l);let w=x==="top"?g+1:C-g;k.style[x]=`calc(var(--tosi-table-row-height) * ${w})`}),(x==="top"?h[C]:h[0]).classList.add(l)}cellStyle(y,x,h){let C={justifyContent:y.align||a6(y)?.align||"left",...h};if(x.left!=null)C.left=x.left;if(x.right!=null)C.right=x.right;return C}applyGridCellAttrs(y,x,h,C){y.setAttribute("aria-colindex",String(x+1)),y.tabIndex=-1,y.classList.add(...this.cellClasses("td",h).split(" ")),Object.assign(y.style,C)}buildCell(y,x,h,C){let l=this.cellStyle(y,h);if(y.dataCell!==void 0){let k=y.dataCell(y);return this.applyGridCellAttrs(k,x,h,l),k}let i=a6(y);if(i)return Q4({class:this.cellClasses("td",h),role:"gridcell",tabindex:-1,ariaColindex:String(x+1),style:l,bind:{value:C[y.prop],binding:{toDOM(k,g){i.toDOM(k,g)}}}});return Q4({class:this.cellClasses("td",h),role:"gridcell",tabindex:-1,ariaColindex:String(x+1),style:l,bindText:C[y.prop]})}buildRow(y,x,h,C="tr"){let l=x.map((g,w)=>this.buildCell(g,w,h[w],y)),i=this.selectBinding,k={class:C};return k.bind={value:y,binding:{toDOM:(g,w)=>{i(g,w);let B=this.rowRendered;if(B)B(w,Array.from(g.children))}}},K0(k,...l)}buildHeaderCell(y,x,h){let{popColumnMenu:C}=this,l="none",i;switch(y.sort){case"ascending":i=O.sortAscending(),l="descending";break;case"descending":l="ascending",i=O.sortDescending();break}let k=!(this.nosort&&this.nohide)?ZC({class:"menu-trigger",onClick(w){C(w.target,y),w.stopPropagation()}},i||O.moreVertical()):{},g=y.headerCell!==void 0?y.headerCell(y):Q4({class:this.cellClasses("th",h),role:"columnheader",tabindex:-1,ariaSort:l,ariaColindex:String(x+1),style:this.cellStyle(y,h)},this.captionSpan({style:{flex:"1"}},typeof y.name==="string"?y.name:y.prop),k);if(y.headerCell!==void 0)this.applyGridCellAttrs(g,x,h,this.cellStyle(y,h)),g.classList.remove("td"),g.classList.add("th"),g.setAttribute("role","columnheader");if(!this.noreorder&&g.children[0]){V3();let w=this.instanceId+"-column-header",B=g.children[0];B.setAttribute("draggable","true"),B.style.pointerEvents="all",B.dataset.drag=w,g.dataset.drop=w,B.addEventListener("dragstart",()=>{this.draggedColumn=y}),g.addEventListener("drop",this.dropColumn)}return g}buildHeader(y,x){let h=y.map((C,l)=>this.buildHeaderCell(C,l,x[l]));return K0({class:"thead",role:"rowgroup"},K0({class:"tr",role:"row"},...h))}buildPinnedBody(y,x,h,C){let l=b(y);if(!l||l.length===0)return null;let i=C==="pinned-top"?"pinnedTopRows":"pinnedBottomRows",k=this.rowClasses(C),g=y.listBinding((w,B)=>this.buildRow(B,x,h,k),{});return K0({class:`tbody tbody-${C}`,role:"rowgroup",part:i},...g)}getColumn(y){if(!this._scrollArea)return;let x=(y.touches!==void 0?y.touches[0].clientX:y.clientX)-this._scrollArea.getBoundingClientRect().x,h=y.touches!==void 0?20:5,{scrollLeft:C,clientWidth:l,scrollWidth:i}=this._scrollArea,k=this.visibleColumns,g=i-l-C,w=0;return k.find((B)=>{if(B.visible===!1)return!1;w+=B.width;let q;if(B.pinned==="left")q=w;else if(B.pinned==="right")q=w-C-g;else q=w-C;return Math.abs(x-q)<h})}setCursor=(y)=>{let x=this.getColumn(y);this.style.cursor=x!==void 0?"col-resize":""};resizeColumn=(y)=>{let x=this.getColumn(y);if(x!==void 0){let h=Number(x.width),C=y.touches!==void 0,l=C?y.touches[0].identifier:void 0;P1(y,(i,k,g)=>{if((C?[...g.touches].find((q)=>q.identifier===l):!0)===void 0)return!0;let B=h+i;if(x.width=B>this.minColumnWidth?B:this.minColumnWidth,this.setColumnWidths(),g.type==="mouseup")return!0},"col-resize")}};selectRow(y,x=!0){if(x)y[this.selectedKey]=!0;else delete y[this.selectedKey];this.updateSelectionVisuals()}selectRows(y,x=!0){for(let h of y||this.array)if(x)h[this.selectedKey]=!0;else delete h[this.selectedKey];this.updateSelectionVisuals()}deSelect(y){this.selectRows(y,!1)}updateSelectionVisuals(){let y=this._scrollArea?.querySelectorAll(".tr")??[];for(let x of y){let h=this.itemFor(x);if(h!=null)this.selectBinding(x,h)}}rangeStart;updateSelection=(y)=>{if(!this.select&&!this.multiple)return;let{target:x}=y;if(!(x instanceof HTMLElement))return;let h=this.itemFor(x);if(h==null)return;let C=y,l=window.getSelection();if(l!==null)l.removeAllRanges();let i=this.visibleRows;if(this.multiple&&C.shiftKey&&i.length>0&&this.rangeStart!==h){let k=this.rangeStart===void 0||this.rangeStart[this.selectedKey]===!0,[g,w]=[this.rangeStart!==void 0?i.indexOf(this.rangeStart):0,i.indexOf(h)].sort((B,q)=>B-q);if(g>-1)for(let B=g;B<=w;B++){let q=i[B];this.selectRow(q,k)}}else if(this.multiple&&C.metaKey){this.selectRow(h,!h[this.selectedKey]);let k=i.indexOf(h),g=i[k+1],w=k>0?i[k-1]:void 0;if(g!==void 0&&g[this.selectedKey]===!0)this.rangeStart=g;else if(w!==void 0&&w[this.selectedKey]===!0)this.rangeStart=w;else this.rangeStart=void 0}else this.rangeStart=h,this.deSelect(),this.selectRow(h,!0);this.selectionChanged(this.visibleSelectedRows),this.updateSelectionVisuals()};findCell(y,x){if(y===-1)return this.querySelector(`.thead .th[aria-colindex="${x+1}"]`);let h=this.effectivePinnedTopData,C=this.visibleRows,l=this.effectivePinnedBottomData,i;if(y<h.length)i=h[y];else if(y<h.length+C.length)i=C[y-h.length];else if(y<h.length+C.length+l.length)i=l[y-h.length-C.length];else return null;return this.cellsFor(i)?.[x]??null}_pendingFocus=null;handleScrollEnd=()=>{if(!this._pendingFocus)return;let{row:y,col:x}=this._pendingFocus;this._pendingFocus=null;let h=this.findCell(y,x);if(h)h.focus()};focusCell(y,x){this._pendingFocus={row:y,col:x};let h=this.findCell(y,x);if(h)h.focus(),h.scrollIntoView({block:"nearest",inline:"nearest"});else if(this._scrollArea){let C=this.effectivePinnedTopData,l=y-C.length;if(l>=0&&l<this.visibleRows.length)this._scrollArea.scrollTop=l*this.rowHeight}}handleKeyNav=(y)=>{let x=y.target,h=x.closest(".td")||x.closest(".th");if(!h)return;let C=parseInt(h.getAttribute("aria-colindex")||"",10);if(isNaN(C))return;let l=C-1,i=this.visibleColumns.length,k=this.effectivePinnedTopData,g=this.visibleRows,w=this.effectivePinnedBottomData,B=k.length+g.length+w.length,q=y.metaKey||y.ctrlKey,j=h.classList.contains("th"),_;if(j)_=-1;else{let Q=h.closest(".tr");if(!Q)return;let Y=q2(Q);if(Y==null)return;let $=k.indexOf(Y),Z=$===-1?g.indexOf(Y):-1,p=$===-1&&Z===-1?w.indexOf(Y):-1;if($!==-1)_=$;else if(Z!==-1)_=k.length+Z;else if(p!==-1)_=k.length+g.length+p;else return}let K=_,U=l;switch(y.key){case"ArrowUp":K=q?0:Math.max(-1,_-1);break;case"ArrowDown":K=q?B-1:Math.min(B-1,_+1);break;case"ArrowLeft":U=q?0:Math.max(0,l-1);break;case"ArrowRight":U=q?i-1:Math.min(i-1,l+1);break;case"Tab":if(y.shiftKey)if(l>0)U=l-1;else if(_>0)K=_-1,U=i-1;else return;else if(l<i-1)U=l+1;else if(_<B-1)K=_+1,U=0;else return;break;case"Home":if(q)K=0,U=0;else U=0;break;case"End":if(q)K=B-1,U=i-1;else U=i-1;break;default:return}if(K!==_||U!==l)y.preventDefault(),this.focusCell(K,U)};connectedCallback(){super.connectedCallback(),this.addEventListener("mousemove",this.setCursor),this.addEventListener("mousedown",this.resizeColumn),this.addEventListener("touchstart",this.resizeColumn,{passive:!0}),this.addEventListener("mouseup",this.updateSelection),this.addEventListener("touchend",this.updateSelection),this.addEventListener("keydown",this.handleKeyNav)}setColumnWidths(){let y=this.visibleColumns,x=y.map((l)=>l.width+"px").join(" "),h=y.reduce((l,i)=>l+i.width,0)+"px";this.style.setProperty("--tosi-table-grid-columns",x),this.style.setProperty("--tosi-table-grid-row-width",h),this.style.setProperty("--grid-columns",x),this.style.setProperty("--grid-row-width",h);let C=this.computeStickyInfo(y);for(let l of this.querySelectorAll(".col-pinned")){let i=parseInt(l.getAttribute("aria-colindex")||"",10)-1;if(!isNaN(i)&&C[i]){let k=C[i];if(k.left!=null)l.style.left=k.left;if(k.right!=null)l.style.right=k.right}}}sortByColumn=(y,x="auto")=>{for(let h of this.columns.filter((C)=>b(C.sort)!==!1))if(b(h)===y){if(x==="auto")h.sort=h.sort==="ascending"?"descending":"ascending";else h.sort=x;this.queueRender()}else delete h.sort};popColumnMenu=(y,x)=>{let{sortByColumn:h}=this,C=this.columns.filter((g)=>g.visible===!1),l=this.queueRender.bind(this),i=[];if(!this.nosort&&x.sort!==!1)i.push({caption:this.localized?`${c("Sort")} ${c("Ascending")}`:"Sort Ascending",icon:"sortAscending",action(){h(x)}},{caption:this.localized?`${c("Sort")} ${c("Descending")}`:"Sort Descending",icon:"sortDescending",action(){h(x,"descending")}});if(!this.nohide){if(i.length)i.push(null);i.push({caption:this.localized?`${c("Hide")} ${c("Column")}`:"Hide Column",icon:"eyeOff",enabled:()=>x.visible!==!0,action(){x.visible=!1,l()}},{caption:this.localized?`${c("Show")} ${c("Column")}`:"Show Column",icon:"eye",enabled:()=>C.length>0,menuItems:C.map((g)=>{return{caption:g.name||g.prop,action(){delete g.visible,l()}}})})}if(i.length)i.push(null);let k=x.pinned==="left"?"pin":x.pinned==="right"?"pin0f":"pin50o";i.push({caption:this.localized?c("Pin"):"Pin",icon:k,menuItems:[{caption:this.localized?c("Left"):"Left",icon:"pin",enabled:()=>x.pinned!=="left",action(){x.pinned="left",l()}},{caption:this.localized?c("Right"):"Right",icon:"pin0f",enabled:()=>x.pinned!=="right",action(){x.pinned="right",l()}},{caption:this.localized?c("Unpin"):"Unpin",icon:"unPin",enabled:()=>!!x.pinned,action(){delete x.pinned,l()}}]}),n({target:y,localized:this.localized,menuItems:i})};get captionSpan(){return this.localized?Q1:Q4}get visibleRows(){return b(this.rowData.visible)}get visibleSelectedRows(){return this.visibleRows.filter((y)=>y[this.selectedKey])}get selectedRows(){if(this._pinnedTopRows||this._pinnedBottomRows)return[...this._pinnedTopRows??[],...this._array,...this._pinnedBottomRows??[]].filter((x)=>x[this.selectedKey]);return this._array.filter((y)=>y[this.selectedKey])}getCells(y){let x=y instanceof Element?this.itemFor(y):y;return x==null?void 0:this.cellsFor(x)}getItem(y){return this.itemFor(y)}draggedColumn;dropColumn=(y)=>{let x=y.target.closest(".drag-over"),h=parseInt(x.getAttribute("aria-colindex")||"",10)-1,C=this.visibleColumns[h],l=this.columns.indexOf(this.draggedColumn),i=this.columns.indexOf(C);this.draggedColumn.pinned=C.pinned,this.columns.splice(l,1),this.columns.splice(i,0,this.draggedColumn),this.queueRender(),y.preventDefault(),y.stopPropagation()};render(){super.render(),this.textContent="";let y=this.effectivePinnedTopData,x=this.effectivePinnedBottomData,h=this.effectiveBaseData,C=Math.min(h.length,this.maxVisibleRows),l=this.filter(h.slice(0,C)),{sort:i}=this;if(i)l.sort(i);this.rowData.pinnedTopData=y,this.rowData.pinnedBottomData=x,this.rowData.visible=l;let k=this.visibleColumns;if(k.length===0)return;let g=this.computeStickyInfo(k);this.style.setProperty("--tosi-table-row-height",this.rowHeight>0?`${this.rowHeight}px`:"auto"),this.setColumnWidths(),this._head=this.buildHeader(k,g),this._tbodyTop=this.buildPinnedBody(this.rowData.pinnedTopData,k,g,"pinned-top"),this._tbodyBottom=this.buildPinnedBody(this.rowData.pinnedBottomData,k,g,"pinned-bottom");let w=this.rowData.visible.listBinding((B,q)=>this.buildRow(q,k,g),this.rowHeight>0?{virtual:{height:this.rowHeight}}:{});this._scrollArea=K0({class:"scroll-area",part:"visibleRows"},...[this._head,this._tbodyTop,...w,this._tbodyBottom].filter(Boolean)),this._scrollArea.addEventListener("scrollend",this.handleScrollEnd),this.append(this._scrollArea),this.observePinnedRowMutations(),this.tagPinnedRows()}observePinnedRowMutations(){this._pinnedRowEdgeObserver?.disconnect(),this._pinnedRowEdgeObserver=new MutationObserver(this.tagPinnedRows);for(let y of[this._tbodyTop,this._tbodyBottom])if(y)this._pinnedRowEdgeObserver.observe(y,{childList:!0})}}var pC=X4,W3=X4.elementCreator(),vC=W3,RC=W3;var{dialog:DC,button:Q3,header:HC,footer:bC,tosiSlot:X3,h3:$3,p:Y3,label:SC,input:MC,div:IC}=G;class N3 extends F{static preferredTagName="tosi-dialog";static lightStyleSpec={":host > dialog::backdrop":{backdropFilter:"blur(8px)"},":host > dialog:not([open])":{display:"none"},":host > dialog[open]":{minWidth:300,border:0,borderRadius:10,overflow:"hidden",maxHeight:"calc(100% - 20px)",padding:0,display:"flex",flexDirection:"column",gap:5,_dialogShadow:P.menuShadow("0 5px 10px #0004"),_dialogBackground:P.background("#fafafa"),_dialogColor:P.textColor("#222"),boxShadow:z.dialogShadow,background:z.dialogBackground,color:z.dialogColor},":host > dialog > *":{padding:"0 20px"},":host > dialog > header":{display:"flex",justifyContent:"center",gap:10},":host > dialog > footer":{display:"flex",justifyContent:"flex-end",gap:10,paddingBottom:20}};static async alert(y,x="Alert"){return new Promise((h)=>{let C=$4({removeOnClose:!0,closeOnBackgroundClick:!0,dialogWillClose(){h()}},$3({slot:"header"},x),y.includes(`
17
- `)?G.pre({style:{whiteSpace:"pre-wrap",margin:0}},y):Y3(y));document.body.append(C),C.showModal()})}static async confirm(y,x="Confirm"){return new Promise((h)=>{let C=$4({removeOnClose:!0,dialogWillClose(l){h(l==="confirm")}},$3({slot:"header"},x),Y3(y),Q3({slot:"footer",onClick(){C.close()}},"Cancel"));document.body.append(C),C.showModal()})}static async prompt(y,x="Prompt",h=""){return new Promise((C)=>{let l=MC({value:h}),i=$4({removeOnClose:!0,dialogWillClose(k){C(k==="confirm"?l.value:null)},initialFocus(){l.focus()}},$3({slot:"header"},x),Y3(SC({style:{display:"flex",flexDirection:"column",alignItems:"stretch",gap:5}},IC(y),l)),Q3({slot:"footer",onClick(){i.close()}},"Cancel"));document.body.append(i),i.showModal()})}removeOnClose=!1;closeOnBackgroundClick=!1;constructor(){super();N2(this,"click",()=>{if(this.closeOnBackgroundClick)this.close()})}dialogWillClose=(y="cancel")=>{console.log("dialog will close with",y)};initialFocus(){this.parts.ok.focus()}#y=(y)=>{};showModal=()=>{return this.style.zIndex=String(P2()),new Promise((y)=>{this.#y=y,this.parts.dialog.showModal(),requestAnimationFrame(()=>{this.initialFocus()})})};close=(y="cancel")=>{if(this.dialogWillClose(y),this.#y(y),this.parts.dialog.close(),this.removeOnClose)this.remove()};ok=()=>{this.close("confirm")};content=()=>DC({part:"dialog"},HC(X3({name:"header"})),X3(),bC(X3({name:"footer"}),Q3({part:"ok",onClick:this.ok},"OK")))}var $4=N3.elementCreator();var cC=/^readme\.md$/i;function m6(y){if(cC.test(y))return"";return y.replace(/\.[^.]+$/,"")}function b2(y){let x={};for(let C of y){let l=m6(C.filename);x[l]=(x[l]||0)+1}let h={};for(let C of y){let l=m6(C.filename);h[C.filename]=l!==""&&x[l]>1?C.filename.replace(/\./g,"-"):l}return h}function J3(y){return y===""?"/":`/${y}/`}function e6(y,x){let h=y.replace(/^\?/,"");if(!h||h.includes("=")||h.includes("&"))return null;let C=decodeURIComponent(h),l=x[C];if(l===void 0)return null;return J3(l)}function sC(y){return y.replace(/^\/+/,"").replace(/\/+$/,"").replace(/\/index\.html$/i,"")}function Z3(y,x){let h=sC(y);for(let[C,l]of Object.entries(x))if(l===h)return C;return""}function t6(y){return y.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function p3(y,x,h){if(!y)return"";for(let l of x)if(l.filename===y)return l.filename;for(let l of x)if(h[l.filename]===y)return l.filename;let C=t6(y);for(let l of x)if(h[l.filename]===C)return l.filename;for(let l of x)if(l.title&&t6(l.title)===C)return l.filename;return""}function y7(y){let x=y.pin==="top"?"A":y.pin==="bottom"?"Z":"M",h=String(y.order??500).padStart(4,"0");return x+h+(y.title||"").toLocaleLowerCase()+"\x00"+y.filename}function TC(y,x){let h=y7(y),C=y7(x);return h>C?1:C>h?-1:0}function Y4(y,x){let h=new Map;for(let k of y)h.set(k.filename,{doc:k,slug:x[k.filename]??"",children:[],depth:0});let C=new Map;for(let k of y){let g=k.parent?p3(k.parent,y,x):"";if(g&&(g===k.filename||!h.has(g)||dC(k.filename,g,y,x)))g="";C.set(k.filename,g)}let l=[];for(let k of y){let g=C.get(k.filename)||"",w=h.get(k.filename);if(g)h.get(g).children.push(w);else l.push(w)}let i=(k,g)=>{k.sort((w,B)=>TC(w.doc,B.doc));for(let w of k)w.depth=g,i(w.children,g+1)};return i(l,0),l}function dC(y,x,h,C){let l=new Map(h.map((g)=>[g.filename,g])),i=x,k=new Set([y]);while(i){if(k.has(i))return!0;k.add(i);let g=l.get(i);i=g?.parent?p3(g.parent,h,C):""}return!1}function R3(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var A2=R3();function g7(y){A2=y}var O0={exec:()=>null};function S(y,x=""){let h=typeof y=="string"?y:y.source,C={replace:(l,i)=>{let k=typeof i=="string"?i:i.source;return k=k.replace(i1.caret,"$1"),h=h.replace(l,k),C},getRegex:()=>new RegExp(h,x)};return C}var LC=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),i1={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:(y)=>new RegExp(`^( {0,3}${y})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}#`),htmlBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}<(?:[a-z].*>|!--)`,"i")},rC=/^(?:[ \t]*(?:\n|$))+/,oC=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,nC=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,W0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,fC=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,D3=/(?:[*+-]|\d{1,9}[.)])/,w7=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,B7=S(w7).replace(/bull/g,D3).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),uC=S(w7).replace(/bull/g,D3).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),H3=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,EC=/^[^\n]+/,b3=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,aC=S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",b3).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),mC=S(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,D3).getRegex(),p4="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",S3=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,tC=S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",S3).replace("tag",p4).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),z7=S(H3).replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",p4).getRegex(),eC=S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",z7).getRegex(),M3={blockquote:eC,code:oC,def:aC,fences:nC,heading:fC,hr:W0,html:tC,lheading:B7,list:mC,newline:rC,paragraph:z7,table:O0,text:EC},x7=S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",p4).getRegex(),yl={...M3,lheading:uC,table:x7,paragraph:S(H3).replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",x7).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",p4).getRegex()},xl={...M3,html:S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",S3).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:O0,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S(H3).replace("hr",W0).replace("heading",` *#{1,6} *[^
18
- ]`).replace("lheading",B7).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},hl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Cl=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,q7=/^( {2,}|\\)\n(?!\s*$)/,ll=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,v4=/[\p{P}\p{S}]/u,I3=/[\s\p{P}\p{S}]/u,j7=/[^\s\p{P}\p{S}]/u,il=S(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,I3).getRegex(),V7=/(?!~)[\p{P}\p{S}]/u,kl=/(?!~)[\s\p{P}\p{S}]/u,gl=/(?:[^\s\p{P}\p{S}]|~)/u,wl=S(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",LC?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),P7=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Bl=S(P7,"u").replace(/punct/g,v4).getRegex(),zl=S(P7,"u").replace(/punct/g,V7).getRegex(),_7="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ql=S(_7,"gu").replace(/notPunctSpace/g,j7).replace(/punctSpace/g,I3).replace(/punct/g,v4).getRegex(),jl=S(_7,"gu").replace(/notPunctSpace/g,gl).replace(/punctSpace/g,kl).replace(/punct/g,V7).getRegex(),Vl=S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,j7).replace(/punctSpace/g,I3).replace(/punct/g,v4).getRegex(),Pl=S(/\\(punct)/,"gu").replace(/punct/g,v4).getRegex(),_l=S(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Al=S(S3).replace("(?:-->|$)","-->").getRegex(),Kl=S("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Al).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),J4=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ul=S(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",J4).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),A7=S(/^!?\[(label)\]\[(ref)\]/).replace("label",J4).replace("ref",b3).getRegex(),K7=S(/^!?\[(ref)\](?:\[\])?/).replace("ref",b3).getRegex(),Gl=S("reflink|nolink(?!\\()","g").replace("reflink",A7).replace("nolink",K7).getRegex(),h7=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,c3={_backpedal:O0,anyPunctuation:Pl,autolink:_l,blockSkip:wl,br:q7,code:Cl,del:O0,emStrongLDelim:Bl,emStrongRDelimAst:ql,emStrongRDelimUnd:Vl,escape:hl,link:Ul,nolink:K7,punctuation:il,reflink:A7,reflinkSearch:Gl,tag:Kl,text:ll,url:O0},Fl={...c3,link:S(/^!?\[(label)\]\((.*?)\)/).replace("label",J4).getRegex(),reflink:S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",J4).getRegex()},v3={...c3,emStrongRDelimAst:jl,emStrongLDelim:zl,url:S(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",h7).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:S(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",h7).getRegex()},Ol={...v3,br:S(q7).replace("{2,}","*").getRegex(),text:S(v3.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},N4={normal:M3,gfm:yl,pedantic:xl},U0={normal:c3,gfm:v3,breaks:Ol,pedantic:Fl},Wl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},C7=(y)=>Wl[y];function I1(y,x){if(x){if(i1.escapeTest.test(y))return y.replace(i1.escapeReplace,C7)}else if(i1.escapeTestNoEncode.test(y))return y.replace(i1.escapeReplaceNoEncode,C7);return y}function l7(y){try{y=encodeURI(y).replace(i1.percentDecode,"%")}catch{return null}return y}function i7(y,x){let h=y.replace(i1.findPipe,(i,k,g)=>{let w=!1,B=k;for(;--B>=0&&g[B]==="\\";)w=!w;return w?"|":" |"}),C=h.split(i1.splitPipe),l=0;if(C[0].trim()||C.shift(),C.length>0&&!C.at(-1)?.trim()&&C.pop(),x)if(C.length>x)C.splice(x);else for(;C.length<x;)C.push("");for(;l<C.length;l++)C[l]=C[l].trim().replace(i1.slashPipe,"|");return C}function G0(y,x,h){let C=y.length;if(C===0)return"";let l=0;for(;l<C;){let i=y.charAt(C-l-1);if(i===x&&!h)l++;else if(i!==x&&h)l++;else break}return y.slice(0,C-l)}function Ql(y,x){if(y.indexOf(x[1])===-1)return-1;let h=0;for(let C=0;C<y.length;C++)if(y[C]==="\\")C++;else if(y[C]===x[0])h++;else if(y[C]===x[1]&&(h--,h<0))return C;return h>0?-2:-1}function k7(y,x,h,C,l){let i=x.href,k=x.title||null,g=y[1].replace(l.other.outputLinkReplace,"$1");C.state.inLink=!0;let w={type:y[0].charAt(0)==="!"?"image":"link",raw:h,href:i,title:k,text:g,tokens:C.inlineTokens(g)};return C.state.inLink=!1,w}function Xl(y,x,h){let C=y.match(h.other.indentCodeCompensation);if(C===null)return x;let l=C[1];return x.split(`
19
- `).map((i)=>{let k=i.match(h.other.beginningSpace);if(k===null)return i;let[g]=k;return g.length>=l.length?i.slice(l.length):i}).join(`
20
- `)}var Z4=class{options;rules;lexer;constructor(y){this.options=y||A2}space(y){let x=this.rules.block.newline.exec(y);if(x&&x[0].length>0)return{type:"space",raw:x[0]}}code(y){let x=this.rules.block.code.exec(y);if(x){let h=x[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:x[0],codeBlockStyle:"indented",text:this.options.pedantic?h:G0(h,`
21
- `)}}}fences(y){let x=this.rules.block.fences.exec(y);if(x){let h=x[0],C=Xl(h,x[3]||"",this.rules);return{type:"code",raw:h,lang:x[2]?x[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):x[2],text:C}}}heading(y){let x=this.rules.block.heading.exec(y);if(x){let h=x[2].trim();if(this.rules.other.endingHash.test(h)){let C=G0(h,"#");(this.options.pedantic||!C||this.rules.other.endingSpaceChar.test(C))&&(h=C.trim())}return{type:"heading",raw:x[0],depth:x[1].length,text:h,tokens:this.lexer.inline(h)}}}hr(y){let x=this.rules.block.hr.exec(y);if(x)return{type:"hr",raw:G0(x[0],`
22
- `)}}blockquote(y){let x=this.rules.block.blockquote.exec(y);if(x){let h=G0(x[0],`
15
+ `),k=h.length,B=C.length,w=Array.from({length:k+1},()=>Array(B+1).fill(0));for(let j=k-1;j>=0;j-=1)for(let V=B-1;V>=0;V-=1)w[j][V]=h[j]===C[V]?w[j+1][V+1]+1:Math.max(w[j+1][V],w[j][V+1]);let g=[],z=0,q=0;while(z<k&&q<B)if(h[z]===C[q])g.push({op:"context",text:h[z]}),z+=1,q+=1;else if(w[z+1][q]>=w[z][q+1])g.push({op:"remove",text:h[z]}),z+=1;else g.push({op:"add",text:C[q]}),q+=1;while(z<k)g.push({op:"remove",text:h[z]}),z+=1;while(q<B)g.push({op:"add",text:C[q]}),q+=1;return g}var ah={context:" ",add:"+",remove:"-"};class V3 extends ${static preferredTagName="tosi-diff";static initAttributes={original:"",modified:""};static shadowStyleSpec={":host":{display:"block",overflow:"auto",font:"var(--tosi-code-font, 12px/1.5 monospace)",background:"var(--tosi-diff-bg, #fff)",color:"var(--tosi-diff-color, #222)"},":host([hidden])":{display:"none"},".diff-line":{display:"grid",gridTemplateColumns:"1.5em 1fr",whiteSpace:"pre-wrap",wordBreak:"break-word"},".diff-line .marker":{textAlign:"center",userSelect:"none",opacity:"0.5"},".diff-add":{background:"var(--tosi-diff-add-bg, #e6ffed)"},".diff-add .marker":{color:"var(--tosi-diff-add-color, #22863a)"},".diff-remove":{background:"var(--tosi-diff-remove-bg, #ffeef0)"},".diff-remove .marker":{color:"var(--tosi-diff-remove-color, #cb2431)"}};content=()=>[G6({part:"body"})];render(){super.render();let y=$6(this.original,this.modified);this.parts.body.replaceChildren(...y.map((x)=>G6({class:`diff-line diff-${x.op}`},Q6({class:"marker"},ah[x.op]),Q6({class:"text"},x.text===""?" ":x.text))))}}var l0=V3.elementCreator();var{div:Y6}=G,i6=new Set,j0=(y,x)=>{if(i6.has(y))return;i6.add(y),console.warn(`<tosi-code>.${y} was removed in tosijs-ui 1.7 (the editor is now CodeMirror 6, not ACE) — ${x}. See CHANGELOG 1.7.0.`)},O6=!1,X4=!1;class r1 extends ${static preferredTagName="tosi-code";source="";_handle;_loadPromise;_loadGeneration=0;_appliedMode="";_appliedDisabled;_tjsAutocomplete;get tjsAutocomplete(){return this._tjsAutocomplete}set tjsAutocomplete(y){if(this._tjsAutocomplete=y,this._handle&&this.isTjsMode())this.applyTjsExtension()}get value(){return this._handle?this._handle.getValue():this.source}set value(y){if(this._handle)this._handle.setValue(y);else this.source=y}_original;get original(){return this._original??this.value}set original(y){this._original=y}diffOverlay;_pendingDiff;get showingDiff(){if(!this.hydrated)return this._pendingDiff??!1;return!this.parts.diffHost.hidden}showDiff(y){if(!this.hydrated){this._pendingDiff=y;return}let{diffHost:x}=this.parts;if(y){if(this.diffOverlay===void 0)this.diffOverlay=l0(),x.append(this.diffOverlay);this.diffOverlay.original=this.original,this.diffOverlay.modified=this.value}x.hidden=!y}static initAttributes={mode:"javascript",disabled:!1};role="code editor";get editor(){if(!O6)O6=!0,console.info("<tosi-code>.editor is the CodeMirror 6 EditorView (the supported accessor; it was an ACE editor in 1.6). ACE-era `editor.session` / `getSession()` / "+"`setOption()` are gone — use undo()/redo()/canUndo()/canRedo() for history.");return this._handle?.view}get theme(){return j0("theme","style the editor with --code-bg / --text-color instead"),""}set theme(y){j0("theme","style the editor with --code-bg / --text-color instead")}get options(){return j0("options","configure CodeMirror via the `editor` (EditorView) instead"),{}}set options(y){j0("options","configure CodeMirror via the `editor` (EditorView) instead")}get ace(){j0("ace","use `editor`, which is now a CodeMirror EditorView");return}undo(){this._handle?.undo()}redo(){this._handle?.redo()}canUndo(){return this._handle?.canUndo()??!1}canRedo(){return this._handle?.canRedo()??!1}content=()=>[Y6({part:"host"}),Y6({part:"diffHost",hidden:!0})];static shadowStyleSpec={":host":{display:"block",position:"relative",width:"100%",height:"100%"},'[part="host"]':{height:"100%"},'[part="diffHost"]':{position:"absolute",inset:"0",zIndex:"5",overflow:"auto",background:A.tosiDiffBg(A.background("#fff"))},".cm-editor":{height:"100%"},".cm-scroller":{outline:"none",fontFamily:"Menlo, Monaco, Consolas, 'Courier New', monospace"}};handleResize(){this._handle?.refresh()}connectedCallback(){if(super.connectedCallback(),this.source==="")this.value=this.textContent!==null?this.textContent.trim():"";if(this._pendingDiff!==void 0){let y=this._pendingDiff;this._pendingDiff=void 0,this.showDiff(y)}if(this._loadPromise===void 0){let y=++this._loadGeneration;this._loadPromise=import("./code-editor-cm-95n31m4f.js").then(({createCmEditor:x})=>{if(y!==this._loadGeneration||!this.isConnected)return;let h=x(this.parts.host,{value:this.source,mode:this.mode,readOnly:this.disabled,root:this.shadowRoot??void 0,onChange:(C)=>this.dispatchEvent(new CustomEvent("change",{detail:{value:C}}))});return this._handle=h,this._appliedMode=this.mode,this._appliedDisabled=this.disabled,this.applyTjsExtension(),h})}}disconnectedCallback(){if(super.disconnectedCallback(),this._handle)this.source=this._handle.getValue(),this._handle.destroy(),this._handle=void 0;this._loadPromise=void 0,this._appliedMode="",this._appliedDisabled=void 0}isTjsMode(){return this.mode==="tjs"||this.mode==="ajs"}applyTjsExtension(){let y=this._handle;if(!y||!this.isTjsMode())return;import("./code-editor-cm-95n31m4f.js").then(({loadTjsExtension:x})=>x(this._tjsAutocomplete??{})).then((x)=>{if(x&&this._handle===y&&this.isTjsMode()){y.setLanguageExtension(x),this._tjsExtensionApplied=!0;return}if(!x&&this._handle===y&&this.isTjsMode()&&!X4)X4=!0,console.warn(`<tosi-code mode="${this.mode}">: tjs-lang's CodeMirror extension did not load — `+"falling back to TypeScript highlighting (no tjs autocomplete). Install the optional peer `tjs-lang`, or check that tjs-lang/editors/codemirror still exports `tjsEditorExtension`.")}).catch((x)=>{if(!X4)X4=!0,console.warn("<tosi-code>: failed to apply the tjs extension —",x)})}get tjsExtensionApplied(){return this._tjsExtensionApplied}_tjsExtensionApplied=!1;render(){if(super.render(),this._handle){if(this.disabled!==this._appliedDisabled)this._handle.setReadOnly(this.disabled),this._appliedDisabled=this.disabled;if(this.mode!==this._appliedMode)this._handle.setMode(this.mode),this._appliedMode=this.mode,this.applyTjsExtension()}}}var m1=r1.elementCreator();var{input:X3}=G,F6=O.fromCss("#8888");class N6 extends ${static preferredTagName="tosi-color";value=F6.rgba;color=F6;static shadowStyleSpec={":host":{_gap:8,_swatchSize:32,_cssWidth:72,_alphaWidth:72,display:"inline-flex",gap:l.gap,alignItems:"center"},':host input[type="color"]':{border:0,width:l.swatchSize,height:l.swatchSize,background:"transparent"},":host::part(alpha)":{width:l.alphaWidth},":host::part(css)":{width:l.cssWidth,fontFamily:"monospace"}};content=[X3({title:"base color",type:"color",part:"rgb"}),X3({type:"range",title:"opacity",part:"alpha",min:0,max:1,step:0.05}),X3({title:"css color spec",part:"css"})];update=(y)=>{let{rgb:x,alpha:h,css:C}=this.parts;if(y.type==="input")this.color=O.fromCss(x.value),this.color.a=Number(h.value),C.value=this.color.html;else this.color=O.fromCss(C.value),x.value=this.color.html.substring(0,7),h.value=String(this.color.a);x.style.opacity=String(this.color.a),this.value=this.color.rgba};connectedCallback(){super.connectedCallback();let{rgb:y,alpha:x,css:h}=this.parts;y.addEventListener("input",this.update),x.addEventListener("input",this.update),h.addEventListener("change",this.update)}render(){let{rgb:y,alpha:x,css:h}=this.parts;this.color=O.fromCss(this.value);let C=this.color.rgba,k=String(this.color.a),B=(w)=>{try{return O.fromCss(w).rgba===C}catch{return!1}};if(!B(y.value))y.value=this.color.html.substring(0,7);if(y.style.opacity!==k)y.style.opacity=k;if(x.value!==k)x.value=k;if(!B(h.value))h.value=this.color.html}}var A3=N6.elementCreator();var y2=G.div({style:{content:" ",position:"fixed",top:0,left:0,right:0,bottom:0}}),A4={passive:!0},_1=(y,x,h="move")=>{if(!y.type.startsWith("touch")){let{clientX:k,clientY:B}=y;y2.style.cursor=h,x2(y2),document.body.append(y2);let w=(g)=>{let z=g.clientX-k,q=g.clientY-B;if(x(z,q,g)===!0)y2.removeEventListener("mousemove",w),y2.removeEventListener("mouseup",w),y2.remove()};y2.addEventListener("mousemove",w,A4),y2.addEventListener("mouseup",w,A4)}else if(y instanceof TouchEvent){let k=y.changedTouches[0],B=k.identifier,w=k.clientX,g=k.clientY,z=y.target,q=0,j=0,V=(_)=>{let P=[..._.touches].find((U)=>U.identifier===B);if(P!==void 0)q=P.clientX-w,j=P.clientY-g;if(_.type==="touchmove")_.stopPropagation(),_.preventDefault();if(x(q,j,_)===!0||P===void 0)z.removeEventListener("touchmove",V),z.removeEventListener("touchend",V),z.removeEventListener("touchcancel",V)};z.addEventListener("touchmove",V),z.addEventListener("touchend",V,A4),z.addEventListener("touchcancel",V,A4)}},X2=(y="body *")=>[...document.querySelectorAll(y)].map((x)=>parseFloat(getComputedStyle(x).zIndex)).reduce((x,h)=>isNaN(x)||Number(x)<h?h:Number(x),0),x2=(y,x="body *")=>{y.style.zIndex=String(X2(x)+1)};function _4(y,x=!0){return(h,C)=>{let k=y(h),B=y(C);for(let w in k)if(k[w]!==B[w])return(Array.isArray(x)?x[w]!==!1:x)?k[w]>B[w]?1:-1:k[w]>B[w]?-1:1;return 0}}var{slot:th}=G;class i1 extends ${static preferredTagName="tosi-float";static floats=new Set;static initAttributes={drag:!1,remainOnResize:"remove",remainOnScroll:"remain"};content=th();static shadowStyleSpec={":host":{position:"fixed"}};reposition=(y)=>{if(y instanceof MouseEvent&&y.button!==0)return;if(y.target?.closest(".no-drag"))return;if(this.drag){x2(this);let h=this.offsetLeft,C=this.offsetTop;_1(y,(k,B,w)=>{if(this.style.left=`${h+k}px`,this.style.top=`${C+B}px`,this.style.right="auto",this.style.bottom="auto",w.type==="mouseup")return!0})}};connectedCallback(){super.connectedCallback(),xC(),i1.floats.add(this);let y={passive:!0};this.addEventListener("touchstart",this.reposition,y),this.addEventListener("mousedown",this.reposition,y),x2(this)}disconnectedCallback(){super.disconnectedCallback(),i1.floats.delete(this)}}var eh=i1,V0=i1.elementCreator(),yC=V0,W6=!1;function xC(){if(W6)return;W6=!0,window.addEventListener("resize",()=>{Array.from(i1.floats).forEach((y)=>{if(y.remainOnResize==="hide")y.hidden=!0;else if(y.remainOnResize==="remove")y.remove()})},{passive:!0}),document.addEventListener("scroll",(y)=>{if(y.target instanceof HTMLElement&&y.target.closest(i1.tagName))return;Array.from(i1.floats).forEach((x)=>{if(x.remainOnScroll==="hide")x.hidden=!0;else if(x.remainOnScroll==="remove")x.remove()})},{passive:!0,capture:!0})}var X0=(y)=>{let{content:x,target:h,position:C,remainOnScroll:k,remainOnResize:B,draggable:w}=y,g=Array.isArray(x)?V0(...x):V0(x);if(K4(g,h,C,k,B,w),y.class)g.setAttribute("class",y.class);return document.body.append(g),g},K4=(y,x,h,C,k,B=!1)=>{{let{position:U}=getComputedStyle(y);if(U!=="fixed")y.style.position="fixed";if(y instanceof i1){if(k)y.remainOnResize=k;if(C)y.remainOnScroll=C;y.drag=B}x2(y)}let{left:w,top:g,width:z,height:q}=x.getBoundingClientRect(),j=w+z*0.5,V=g+q*0.5,_=window.innerWidth,P=window.innerHeight;if(h==="side")h=(j<_*0.5?"e":"w")+(V<P*0.5?"s":"n");else if(h==="auto"||h===void 0)h=(V<P*0.5?"s":"n")+(j<_*0.5?"e":"w");if(y.style.top=y.style.left=y.style.right=y.style.bottom=y.style.transform="",h.length===2){let[U,i]=h;switch(U){case"n":y.style.bottom=(P-g).toFixed(2)+"px";break;case"e":y.style.left=(w+z).toFixed(2)+"px";break;case"s":y.style.top=(g+q).toFixed(2)+"px";break;case"w":y.style.right=(_-w).toFixed(2)+"px";break}switch(i){case"n":y.style.bottom=(P-g-q).toFixed(2)+"px";break;case"e":y.style.left=w.toFixed(2)+"px";break;case"s":y.style.top=g.toFixed(2)+"px";break;case"w":y.style.right=(_-w-z).toFixed(2)+"px";break}y.style.transform=""}else if(h==="n")y.style.bottom=(P-g).toFixed(2)+"px",y.style.left=j.toFixed(2)+"px",y.style.transform="translateX(-50%)";else if(h==="s")y.style.top=(g+q).toFixed(2)+"px",y.style.left=j.toFixed(2)+"px",y.style.transform="translateX(-50%)";else if(h==="e")y.style.left=(w+z).toFixed(2)+"px",y.style.top=V.toFixed(2)+"px",y.style.transform="translateY(-50%)";else if(h==="w")y.style.right=(_-w).toFixed(2)+"px",y.style.top=V.toFixed(2)+"px",y.style.transform="translateY(-50%)";y.style.setProperty("--max-height",`calc(100vh - ${y.style.top||y.style.bottom})`),y.style.setProperty("--max-width",`calc(100vw - ${y.style.left||y.style.right})`)};var J6=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||""),hC=J6?{meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧",escape:"⎋"}:{meta:"Meta",ctrl:"Ctrl",alt:"Alt",shift:"Shift",escape:"Esc"},Z6=(y)=>{if(y.code)return y.code.replace(/^Key|^Digit/,"");return y.key},CC=(y)=>{let x=[];if(y.altKey)x.push("alt");if(y.ctrlKey)x.push("ctrl");if(y.metaKey)x.push("meta");if(y.shiftKey)x.push("shift");return x.push(Z6(y)),x.join("-")},kC=[[/\^|ctrl-?/i,"ctrlKey"],[/⌘|meta-?/i,"metaKey"],[/⌥|⎇|alt-?|option-?/i,"altKey"],[/⇧|shift-?/i,"shiftKey"]],P4=(y)=>{let x=y.trim(),h={ctrlKey:!1,metaKey:!1,altKey:!1,shiftKey:!1,key:""};for(let[C,k]of kC)if(C.test(x))h[k]=!0,x=x.replace(C,"");return x=x.replace(/^-+/,""),h.key=x.toLowerCase(),h},_3=(y,x)=>{let h=P4(x);return y.key.toLowerCase()===h.key&&y.metaKey===h.metaKey&&y.ctrlKey===h.ctrlKey&&y.altKey===h.altKey&&y.shiftKey===h.shiftKey},BC=(y)=>{let x=P4(y),h=[];if(x.altKey)h.push("alt");if(x.ctrlKey)h.push("ctrl");if(x.metaKey)h.push("meta");if(x.shiftKey)h.push("shift");return h.push(x.key),h.join("-")},U4=(y)=>{let x=P4(y);if(J6){let C=[];if(x.ctrlKey)C.push("⌃");if(x.altKey)C.push("⌥");if(x.shiftKey)C.push("⇧");if(x.metaKey)C.push("⌘");return C.push(x.key.toUpperCase()),C.join("")}let h=[];if(x.ctrlKey)h.push("Ctrl");if(x.altKey)h.push("Alt");if(x.shiftKey)h.push("Shift");if(x.metaKey)h.push("Meta");return h.push(x.key.toUpperCase()),h.join("+")};var Q4={};s5(Q4,{stringToTypes:()=>v2,isTypeAllowed:()=>M2,init:()=>U3,draggedElement:()=>lC});var wC=()=>!!document.querySelector(".drag-source"),M2=(y,x)=>{if(!y)return!1;for(let h of y)if(h==="special/any")return!0;else if(h.indexOf("*")>-1){let[C,k]=h.split("/"),[B,w]=x.split("/");if((C==="*"||C===B)&&(k==="*"||k===w))return!0}else if(h===x)return!0},G4=(y)=>{for(let x of[...document.querySelectorAll(`.${y}`)])x.classList.remove(y)},H6=()=>{if(H2)H2.disconnect(),H2=null;K3=[],G4("drag-over"),G4("drag-source"),G4("drag-target")},v2=(y,x=";")=>{return(y||"").split(x).map((h)=>h.trim()).filter((h)=>h!=="")},K3=[],H2=null,P3=(y)=>{if(!y)y=[];K3=y;let x=[...document.querySelectorAll("[data-drop]")];for(let h of x){let C=v2(h.dataset.drop);if(y.find((k)=>M2(C,k)))h.classList.add("drag-target");else h.classList.remove("drag-target")}if(!H2)H2=new MutationObserver(()=>P3(K3)),H2.observe(document.body,{childList:!0,subtree:!0})};function gC(y){let x=y.target?.closest('[draggable="true"],a[href]');if(!x)return;x.classList.add("drag-source");let h=x.matches('[draggable="true"]')?v2(x.dataset.drag||"text/html"):v2(x.dataset.drag||"url");for(let C of h){let k=x.dataset.dragContent||(C==="text/html"?x.innerHTML:x.textContent);y.dataTransfer?.setData(C,k||"")}P3(y.dataTransfer?.types),y.stopPropagation()}function R6(y){if(!wC())P3(y.dataTransfer?.types);let x=y.target.closest(".drag-target");if(x&&y.dataTransfer)x.classList.add("drag-over"),y.dataTransfer.dropEffect="copy";else y.preventDefault(),y.stopPropagation()}function zC(){G4("drag-over")}function qC(y){let x=y.target.closest(".drag-target");if(x){let h=(x.dataset?.drop||"").split(";");for(let C of h)if(M2(y.dataTransfer?.types,C))if(C==="text/html")x.innerHTML=y.dataTransfer?.getData(C)||"";else x.textContent=y.dataTransfer?.getData(C)||""}H6()}var lC=()=>document.querySelector(".drag-source"),D6=!1,U3=()=>{if(D6)return;document.body.addEventListener("dragstart",gC),document.body.addEventListener("dragenter",R6),document.body.addEventListener("dragover",R6),document.body.addEventListener("drop",qC),document.body.addEventListener("dragleave",zC),document.body.addEventListener("dragend",H6),window.addEventListener("dragover",(y)=>y.preventDefault()),window.addEventListener("drop",(y)=>y.preventDefault()),D6=!0};var G1=(y)=>typeof y==="function"?y():y,{div:v6,button:K0,span:o,a:jC,tosiSlot:VC}=G,b6=(y)=>{let x=[];for(let h of y)if(h===null){if(x.length>0&&x[x.length-1]!==null)x.push(h)}else x.push(h);while(x.length>0&&x[x.length-1]===null)x.pop();return x},_0=(y,x,h=!1)=>{let C=[];for(let k of y){if(k===null){C.push(k);continue}if(typeof k==="function"){C.push(k);continue}let{acceptsDrop:B}=k;if(!B){if(!h)C.push({...k,enabled:()=>!1});continue}if(!x.some((z)=>M2(B,z))){if(!h)C.push({...k,enabled:()=>!1});continue}let g=k;if(g.menuItems){let z=_0(G1(g.menuItems),x,!0);if(z.length>0||g.dropAction){let q=h?z:_0(G1(g.menuItems),x,!1);C.push({...g,menuItems:q})}else if(!h)C.push({...g,enabled:()=>!1})}else C.push(k)}return b6(C)},G3=(y,x=!1)=>{let h=[];for(let C of y){if(C===null){h.push(C);continue}if(typeof C==="function"){h.push(C);continue}let{action:k,menuItems:B}=C;if(k||B)if(B){let w=G3(G1(B),!0);if(w.length>0){let g=x?w:G3(G1(B),!1);h.push({...C,menuItems:g})}else if(!x)h.push({...C,enabled:()=>!1})}else h.push(C);else if(!x)h.push({...C,enabled:()=>!1})}return b6(h)},XC={overflow:"hidden auto",maxHeight:`calc(${l.maxHeight} - ${A.menuInset("8px")})`,borderRadius:l.spacing50,background:A.menuBg("#fafafa"),boxShadow:A.menuShadow(`${l.spacing13} ${l.spacing50} ${l.spacing} #0004`)},AC={boxShadow:"none",border:"none !important",display:"grid",alignItems:"center",justifyContent:"flex-start",textDecoration:"none",gridTemplateColumns:"0px 1fr max-content",width:"100%",gap:0,background:"transparent",padding:A.menuItemPadding("0 8px"),height:A.menuItemHeight("48px"),lineHeight:A.menuItemHeight("48px"),textAlign:"left"},_C={color:A.menuItemColor("#222")},KC={boxShadow:"none !important",background:A.menuItemHoverBg("#eee")},M6={boxShadow:"none !important",background:A.menuItemActiveBg("#aaa"),color:A.menuItemActiveColor("#000")},PC={background:`${A.menuDropOverBg("#2196F3")} !important`,color:`${A.menuDropOverColor("#fff")} !important`},UC={color:`${A.menuDropOverColor("#fff")} !important`},GC={stroke:`${A.menuDropOverColor("#fff")} !important`},S6={boxShadow:`inset 0 0 0 2px color-mix(in srgb, ${A.menuDropOverBg("#2196F3")} 50%, transparent) !important`},QC={".xin-menu, .tosi-menu":XC,".xin-menu > div, .tosi-menu > div":{width:A.menuWidth("auto")},".xin-menu-trigger, .tosi-menu-trigger":{paddingLeft:0,paddingRight:0,minWidth:A.touchSize("48px")},".xin-menu-separator, .tosi-menu-separator":{display:"inline-block",content:" ",height:"1px",width:"100%",background:A.menuSeparatorColor("#2224"),margin:A.menuSeparatorMargin("8px 0")},".xin-menu-element, .tosi-menu-element":{minHeight:A.menuItemHeight("48px")},".xin-menu-item, .tosi-menu-item":AC,".xin-menu-item, .xin-menu-item > span, .tosi-menu-item, .tosi-menu-item > span":_C,".xin-menu-with-icons .xin-menu-item, .tosi-menu-with-icons .tosi-menu-item":{gridTemplateColumns:"24px 1fr max-content",gap:A.menuItemGap("8px")},".xin-menu-shortcut, .tosi-menu-shortcut":{whiteSpace:"nowrap",paddingLeft:"1em",textAlign:"right",opacity:"0.65"},".xin-menu-item > :first-child, .tosi-menu-item > :first-child":{justifySelf:"center",alignSelf:"center"},".xin-menu-item svg, .tosi-menu-item svg":{stroke:A.menuItemIconColor("#222")},".xin-menu-item.xin-menu-item-checked, .tosi-menu-item.tosi-menu-item-checked":{background:A.menuItemHoverBg("#eee")},".xin-menu-item > span:nth-child(2), .tosi-menu-item > span:nth-child(2)":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"left"},".xin-menu-item:hover, .tosi-menu-item:hover":KC,".xin-menu-item.drag-target:hover, .tosi-menu-item.drag-target:hover":S6,".xin-menu-item:active, .tosi-menu-item:active":M6,".xin-menu-item:active svg, .tosi-menu-item:active svg":{stroke:A.menuItemIconActiveColor("#000")},".xin-menu-item-highlight, .tosi-menu-item-highlight":M6,".xin-menu-item-highlight svg, .tosi-menu-item-highlight svg":{stroke:A.menuItemIconActiveColor("#000")},".xin-drop-over, .tosi-drop-over":PC,".xin-drop-over > span, .tosi-drop-over > span":UC,".xin-drop-over svg, .tosi-drop-over svg":GC,".drag-target":S6},I6=!1;function $3(){if(I6)return;I6=!0,Y1("xin-menu-helper",QC),document.addEventListener("mousedown",(y)=>{if(C1.length===0)return;let x=y.composedPath();if(!C1.find((h)=>x.includes(h.target)||x.includes(h.menu)))k1(0)}),document.body.addEventListener("keydown",(y)=>{if(y.key==="Escape")k1(0)})}var T6=(y,x)=>{let h=y.checked&&y.checked()&&"check"||!1,C=y?.icon||h||o(" ");if(typeof C==="string")C=Q[C]();let k=x.role==="listbox"?"option":"menuitem",B,w=y.properties||{};if(typeof y?.action==="string")B=jC(w,{role:k,href:y.action},C,x.localized?o(T(y.caption)):o(y.caption),o({class:"tosi-menu-shortcut"},y.shortcut?U4(y.shortcut):" "));else B=K0(w,{role:k,onClick:y.action},C,x.localized?o(T(y.caption)):o(y.caption),o({class:"tosi-menu-shortcut"},y.shortcut?U4(y.shortcut):" "));if(B.classList.add("xin-menu-item","tosi-menu-item"),B.classList.toggle("xin-menu-item-checked",h!==!1),B.classList.toggle("tosi-menu-item-checked",h!==!1),y.tooltip)B.dataset.tooltip=y.tooltip;if(x.role==="listbox")B.toggleAttribute("aria-selected",h!==!1);if(y?.enabled&&!y.enabled())B.setAttribute("disabled",""),B.setAttribute("aria-disabled","true");return B},p6=(y,x)=>{let h=y?.icon||o(" ");if(typeof h==="string")h=Q[h]();let C=y.properties||{},k=K0(C,{onDragenter(B){I2(),k.classList.add("xin-drop-over","tosi-drop-over"),B.preventDefault()},onDragover(B){if(B.preventDefault(),B.dataTransfer)B.dataTransfer.dropEffect="copy"},onDragleave(B){let w=B.relatedTarget;if(w&&k.contains(w))return;k.classList.remove("xin-drop-over","tosi-drop-over")},onDrop(B){if(B.preventDefault(),B.stopPropagation(),k.classList.remove("xin-drop-over","tosi-drop-over"),y.dropAction&&B.dataTransfer)y.dropAction(B.dataTransfer);k1(0)}},h,x.localized?o(T(y.caption)):o(y.caption),o(" "));if(k.classList.add("xin-menu-item","tosi-menu-item"),y.tooltip)k.dataset.tooltip=y.tooltip;if(y.dropAction&&y.acceptsDrop)k.dataset.drop=y.acceptsDrop.join(";");if(y?.enabled&&!y.enabled())k.setAttribute("disabled",""),k.setAttribute("aria-disabled","true");return k},Q3=(y,x)=>{let h=y.checked&&y.checked()&&"check"||!1,C=y?.icon||h||o(" ");if(typeof C==="string")C=Q[C]();let k=null,B=!1,w=y.properties||{},g=K0(w,{disabled:!(!y.enabled||y.enabled()),onClick(z){if(x._dropMode)return;r(Object.assign({},x,{menuItems:G1(y.menuItems),target:g,submenuDepth:(x.submenuDepth||0)+1,position:"side"})),z.stopPropagation(),z.preventDefault()},onDragenter(z){if(!x._dropMode)return;I2(),z.preventDefault(),z.stopPropagation();let q=z.relatedTarget;if(q&&g.contains(q))return;if(g.classList.add("xin-drop-over","tosi-drop-over"),B){if(k1((x.submenuDepth||0)+1),B=!1,k)clearTimeout(k);k=null;return}if(k)clearTimeout(k);k=setTimeout(()=>{B=!0;let j=G1(y.menuItems),V=x._dataTypes?_0(j,x._dataTypes,x.hideDisabled):j;if(V.length>0)r(Object.assign({},x,{menuItems:V,target:g,submenuDepth:(x.submenuDepth||0)+1,position:"side",_dropMode:!0,_dataTypes:x._dataTypes}))},x.disclosureDelay??200)},onDragover(z){if(!x._dropMode)return;if(z.preventDefault(),z.stopPropagation(),z.dataTransfer)z.dataTransfer.dropEffect=y.dropAction?"copy":"link"},onDragleave(z){if(!x._dropMode)return;let q=z.relatedTarget;if(q&&g.contains(q))return;if(B&&q&&C1.some((j)=>j.menu.contains(q)||j.target.contains(q)))return;if(g.classList.remove("xin-drop-over","tosi-drop-over"),k)clearTimeout(k),k=null},onDrop(z){if(!x._dropMode||!y.dropAction)return;if(z.preventDefault(),z.stopPropagation(),g.classList.remove("xin-drop-over","tosi-drop-over"),z.dataTransfer)y.dropAction(z.dataTransfer);k1(0)}},C,x.localized?o(T(y.caption)):o(y.caption),Q.chevronRight({style:{justifySelf:"flex-end"}}));if(g.classList.add("xin-menu-item","tosi-menu-item"),y.tooltip)g.dataset.tooltip=y.tooltip;if(x._dropMode&&y.dropAction&&y.acceptsDrop)g.dataset.drop=y.acceptsDrop.join(";");return g},L6=(y,x)=>{if(y===null)return o({class:"xin-menu-separator tosi-menu-separator"});else if(typeof y==="function"){let h=y();return h.classList.add("xin-menu-element","tosi-menu-element"),h}else if(x._dropMode){let h=y;if(h.menuItems&&G1(h.menuItems).length>0)return Q3(h,x);else if(y.dropAction)return p6(y,x);else{let k=y?.icon||o(" ");if(typeof k==="string")k=Q[k]();return K0({class:"xin-menu-item tosi-menu-item",disabled:!0},k,x.localized?o(T(y.caption)):o(y.caption),o(" "))}}else{let h=y?.action?T6(y,x):Q3(y,x);if(x.showChecked&&y.checked&&y.checked())requestAnimationFrame(()=>{h.scrollIntoView({block:"center"})});return h}},c6=(y)=>{let{target:x,width:h,menuItems:C,role:k="menu"}=y,B=C.find((z)=>z!=null&&typeof z!=="function"&&(z.icon||z.checked)),w=y.submenuDepth||0,g=v6({class:B?"xin-menu tosi-menu xin-menu-with-icons tosi-menu-with-icons":"xin-menu tosi-menu",role:k,onClick(){if(!y._dropMode)k1(0)},onDragover(z){if(!y._dropMode)return;z.preventDefault()},onDragenter(){if(!y._dropMode)return;I2()},onDragleave(z){if(!y._dropMode)return;let q=z.relatedTarget;if(q&&g.contains(q))return;if(q&&C1.some((j)=>j.menu.contains(q)||j.target.contains(q)))return;d6(w)}},v6({style:{minWidth:x.offsetWidth+"px",width:typeof h==="number"?`${h}px`:h},onMousedown(z){z.preventDefault(),z.stopPropagation()}},...C.map((z)=>L6(z,y))));return g},S2,C1=[],A0=null,I2=()=>{if(A0)clearTimeout(A0),A0=null},d6=(y)=>{I2(),A0=setTimeout(()=>{A0=null,k1(y)},500)},k1=(y=0)=>{if(I2(),y===0)document.querySelectorAll("tosi-menu.xin-drop-over, tosi-menu.tosi-drop-over").forEach((h)=>h.classList.remove("xin-drop-over","tosi-drop-over"));let x=C1.splice(y);for(let h of x)if(h.menu.remove(),h.onClose)h.onClose();return S2=x[0],y>0?C1[y-1]:void 0},r=(y)=>{$3(),y=Object.assign({submenuDepth:0},y);let{target:x,position:h,submenuDepth:C}=y;if(S2&&!document.body.contains(S2?.menu))S2=void 0;if(C1.length&&!document.body.contains(C1[0].menu))C1.splice(0);if(y._dropMode){if(C1.length>C&&C1[C]?.target===x)return;k1(C)}else{if(C===0&&S2?.target===x)return;let w=k1(C);if(S2?.target===x)return;if(w&&w.target===x){k1();return}}if(!y.menuItems?.length)return;let k=c6(y),B=X0({content:k,target:x,position:h});B.remainOnScroll=y._dropMode?"remain":"remove",C1.push({target:x,menu:B,onClose:y.onClose})},f6=(y)=>{$3();let{dataTypes:x,...h}=y,C=_0(y.menuItems,x,y.hideDisabled);if(!C.length)return;r({...h,menuItems:C,_dropMode:!0,_dataTypes:x})};function Y3(y,x,h=[]){for(let C of y){if(!C)continue;if(typeof C==="function")continue;let{shortcut:k}=C,{menuItems:B}=C;if(k){if(_3(x,k)){let w=C;if(w.enabled&&!w.enabled())return;if(h.some((g)=>g.enabled&&!g.enabled()))return;return{action:w,path:h}}}else if(B){let w=Y3(G1(B),x,[...h,C]);if(w)return w}}return}class $4 extends ${static preferredTagName="tosi-menu";static lightStyleSpec={":host":{display:"inline-flex",minWidth:l.touchSize,minHeight:l.touchSize},":host button":{margin:0,padding:0,alignSelf:"stretch",flex:"1",textAlign:"center"},":host button > tosi-slot":{display:"flex",alignItems:"center",gap:A.tosiMenuTriggerGap("10px")}};static initAttributes={menuWidth:"auto",localized:!1,icon:"",acceptsDrop:"",disclosureDelay:0,hideDisabled:!1};menuItems=[];dropAction=null;_dragMatches=!1;_matchesDrag(y){if(!this.acceptsDrop)return!1;let x=v2(this.acceptsDrop);return[...y.dataTransfer?.types||[]].some((C)=>x.some((k)=>M2([k],C)))}showMenu=(y)=>{if(y.type==="click"||y.code==="Space")r({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),y.stopPropagation(),y.preventDefault()};handleDragEnter=(y)=>{if(this._dragMatches=this._matchesDrag(y),!this._dragMatches)return;I2(),this.classList.add("xin-drop-over","tosi-drop-over");let x=[...y.dataTransfer?.types||[]];if(this.menuItems.length)f6({target:this.parts.trigger,menuItems:this.menuItems,dataTypes:x,width:this.menuWidth,localized:this.localized,disclosureDelay:this.disclosureDelay||void 0,hideDisabled:this.hideDisabled});y.preventDefault()};handleDragOver=(y)=>{if(!this._dragMatches)return;if(y.preventDefault(),y.dataTransfer)y.dataTransfer.dropEffect=this.dropAction?"copy":"link"};handleDragLeave=(y)=>{if(!this._dragMatches)return;let x=y.relatedTarget;if(x&&this.contains(x))return;if(x&&C1.some((h)=>h.menu.contains(x)||h.target.contains(x))){this.classList.remove("xin-drop-over","tosi-drop-over");return}this.classList.remove("xin-drop-over","tosi-drop-over"),d6(0)};handleDrop=(y)=>{if(!this._dragMatches||!this.dropAction)return;if(y.preventDefault(),y.stopPropagation(),this.classList.remove("xin-drop-over","tosi-drop-over"),y.dataTransfer)this.dropAction(y.dataTransfer);k1(0)};content=()=>K0({tabindex:0,part:"trigger",onClick:this.showMenu},VC());handleShortcut=async(y)=>{let x=Y3(this.menuItems,y);if(!x)return;y.preventDefault(),y.stopImmediatePropagation();let{action:h,path:C}=x;if(this.isConnected&&document.body.contains(this))await this.animateShortcut(C,h);if(h.action instanceof Function)h.action()};findMenuItemByCaption(y,x){for(let h of y.querySelectorAll(".xin-menu-item")){let C=h.children[1];if(C&&C.textContent===x)return h}return null}async animateShortcut(y,x){k1(0),r({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),await new Promise((C)=>setTimeout(C,80));for(let C=0;C<y.length;C++){let k=C+1,B=C1[C]?.menu;if(!B)break;let w=this.findMenuItemByCaption(B,y[C].caption);if(!w)break;r({target:w,width:this.menuWidth,localized:this.localized,menuItems:G1(y[C].menuItems),submenuDepth:k,position:"side"}),await new Promise((g)=>setTimeout(g,80))}let h=C1[C1.length-1]?.menu;if(h){let C=this.findMenuItemByCaption(h,x.caption);if(C)C.classList.add("xin-menu-item-highlight","tosi-menu-item-highlight")}await new Promise((C)=>setTimeout(C,300)),k1(0)}constructor(){super();this.addEventListener("keydown",this.showMenu),this.addEventListener("dragenter",this.handleDragEnter),this.addEventListener("dragover",this.handleDragOver),this.addEventListener("dragleave",this.handleDragLeave),this.addEventListener("drop",this.handleDrop)}connectedCallback(){if(super.connectedCallback(),$3(),document.addEventListener("keydown",this.handleShortcut,!0),this.acceptsDrop)this.dataset.drop=this.acceptsDrop}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleShortcut)}}var s6=$4.elementCreator(),$C=s6,YC=$4;var{button:iC,span:u6,input:OC}=G,r6=(y,x)=>{return!!y.find((h)=>{if(h===null||x==null)return!1;else if(Array.isArray(h))return r6(h,x);else if(h.value===x||h===x)return!0})};class I1 extends ${static preferredTagName="tosi-select";static formAssociated=!0;static lightStyleSpec={":host":{"--tosi-select-gap":"var(--tosi-spacing-sm, 8px)","--tosi-select-touch-size":"var(--tosi-touch-size, 44px)","--tosi-select-padding":"0 var(--tosi-spacing-sm, 8px)","--tosi-select-value-padding":"0 var(--tosi-spacing-sm, 8px)","--tosi-select-icon-width":"24px","--tosi-select-field-width":"140px","--gap":"var(--tosi-select-gap)","--touch-size":"var(--tosi-select-touch-size)","--padding":"var(--tosi-select-padding)","--value-padding":"var(--tosi-select-value-padding)","--icon-width":"var(--tosi-select-icon-width)","--fieldWidth":"var(--tosi-select-field-width)",display:"inline-flex",position:"relative"},":host button":{display:"flex",alignItems:"center",justifyItems:"center",gap:l.tosiSelectGap,textAlign:"left",height:l.tosiSelectTouchSize,padding:l.tosiSelectPadding,position:"relative",width:"100%"},":host:not([show-icon]) button > :first-child":{display:"none"},":host[hide-caption] button > :nth-child(2)":{display:"none"},':host [part="value"]':{width:l.tosiSelectFieldWidth,padding:l.tosiSelectValuePadding,height:l.tosiSelectTouchSize,lineHeight:l.tosiSelectTouchSize,boxShadow:"none",whiteSpace:"nowrap",outline:"none",background:"transparent",flex:"1"},':host [part="value"]:not(:focus)':{overflow:"hidden",textOverflow:"ellipsis",background:"transparent"}};static initAttributes={editable:!1,placeholder:"",showIcon:!1,hideCaption:!1,localized:!1,disabled:!1,required:!1,name:""};_options=[];get options(){return this._options}set options(y){if(typeof y==="string")this._options=I1.parseOptionsString(y);else this._options=y;this.queueRender()}static parseOptionsString(y){return y.split(",").map((x)=>{let h=x.trim();if(h==="")return null;let[C,k]=h.split("=").map((g)=>g.trim());if(!k)return{value:C,caption:C};let[B,w]=k.split(":").map((g)=>g.trim());return{value:C,caption:B||C,icon:w||void 0}})}value="";filter="";isExpanded=!1;formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value=""}setValue=(y,x=!1)=>{if(this.value!==y)this.value=y,this.queueRender(!0);if(x)this.dispatchEvent(new Event("action"))};getValue=()=>this.value;get selectOptions(){return this.options}buildOptionMenuItem=(y)=>{if(y===null)return null;let{setValue:x,getValue:h}=this,C,k,B,w,g;if(typeof y==="string")k=B=y;else({icon:C,caption:k,value:B,tooltip:w,properties:g}=y);if(this.localized)k=T(k);let{options:z}=y;if(z)return{icon:C,caption:k,tooltip:w,properties:g,checked:()=>r6(z,h()),menuItems:z.map(this.buildOptionMenuItem)};return{icon:C,caption:k,tooltip:w,properties:g,checked:()=>h()===B,action:typeof B==="function"?async()=>{let q=await B();if(q!==void 0)x(q,!0)}:()=>{if(typeof B==="string")x(B,!0)}}};poppedOptions=[];get optionsMenu(){let y=this.selectOptions.map(this.buildOptionMenuItem);if(this.filter==="")return y;let x=(h)=>{if(h===null||typeof h==="function")return!0;else if(h.menuItems){let C=G1(h.menuItems);return h.menuItems=C.filter(x),C.length>0}else return h.caption.toLocaleLowerCase().includes(this.filter)};return y.filter(x)}handleChange=(y)=>{let{value:x}=this.parts,h=x.value||"";if(this.value!==String(h))this.value=h,this.dispatchEvent(new Event("change"));this.filter="",y.stopPropagation(),y.preventDefault()};handleKey=(y)=>{if(y.key==="Enter")y.preventDefault()};filterMenu=N2(()=>{this.filter=this.parts.value.value.toLocaleLowerCase(),k1(0),this.popOptions()});popOptions=(y)=>{if(y&&y.type==="click")this.filter="";this.poppedOptions=this.optionsMenu,this.isExpanded=!0,this.updateAriaExpanded(),r({target:this,menuItems:this.poppedOptions,showChecked:!0,role:"listbox",onClose:()=>{this.isExpanded=!1,this.updateAriaExpanded()}})};updateAriaExpanded(){let{value:y}=this.parts;y.setAttribute("aria-expanded",String(this.isExpanded))}content=()=>[iC({type:"button",part:"button",onClick:this.popOptions},u6(),OC({part:"value",value:this.value,tabindex:0,role:"combobox",ariaHaspopup:"listbox",ariaExpanded:"false",ariaAutocomplete:this.editable?"list":"none",onKeydown:this.handleKey,onInput:this.filterMenu,onChange:this.handleChange}),Q.chevronDown())];get allOptions(){let y=[];function x(h){for(let C of h)if(typeof C==="string")y.push({caption:C,value:C});else if(C?.value)y.push(C);else if(C?.options)x(C.options)}return x(this.selectOptions),y}findOption(){return this.allOptions.find((x)=>x.value===this.value)||{caption:this.value,value:this.value}}localeChanged=()=>{this.queueRender()};connectedCallback(){super.connectedCallback();let y=this.getAttribute("options");if(y&&this._options.length===0)this._options=I1.parseOptionsString(y);if(this.localized)Y4.allInstances.add(this)}disconnectedCallback(){if(super.disconnectedCallback(),this.localized)Y4.allInstances.delete(this)}render(){super.render();let{value:y,button:x}=this.parts;x.disabled=this.disabled;let h=y.previousElementSibling,C=this.findOption(),k=u6();if(y.value=this.localized?T(C.caption):C.caption,C.icon)if(C.icon instanceof HTMLElement)k=C.icon.cloneNode(!0);else k=Q[C.icon]();h.replaceWith(k),y.setAttribute("placeholder",this.localized?T(this.placeholder):this.placeholder),y.style.pointerEvents=this.editable?"":"none",y.readOnly=!this.editable}}var FC=I1,Q1=I1.elementCreator(),NC=j1((...y)=>Q1(...y),"xinSelect is deprecated, use tosiSelect instead (tag is now <tosi-select>)");var{span:n6}=G,{i18n:c}=e({i18n:{locale:window.navigator.language,locales:[window.navigator.language],languages:[window.navigator.language],emoji:[""],stringMap:{},localeOptions:[{icon:n6(),caption:window.navigator.language,value:window.navigator.language}]}});u1.localeOptions={toDOM(y,x){if(y instanceof I1)y.options=x}};var i4=(y)=>{if(c.locales.value.includes(y))c.locale.value=y;else console.error(`language ${y} is not available`)},i3=()=>{let y=Array.from(b1.allInstances);for(let x of y)x.localeChanged();o6()};c.locale.observe(i3);var P0="data-tosi-localized";function U0(y){let x=y.getAttribute(P0);if(!x)return;let h;try{h=JSON.parse(x)}catch(C){console.warn(`[data-tosi-localized] invalid JSON: ${x}`,C);return}if(!h||typeof h!=="object")return;for(let[C,k]of Object.entries(h)){if(typeof k!=="string")continue;y.setAttribute(C,T(k))}}function*E6(y){for(let x of Array.from(y.querySelectorAll(`[${P0}]`)))yield x;for(let x of Array.from(y.querySelectorAll("*"))){let h=x.shadowRoot;if(h)yield*E6(h)}}function o6(){if(typeof document>"u")return;for(let y of E6(document))U0(y)}var m6=null;if(typeof document<"u"&&typeof MutationObserver<"u"){let y=()=>{if(!document.body){queueMicrotask(y);return}m6=new MutationObserver((x)=>{for(let h of x){if(h.type==="attributes"&&h.target instanceof Element){U0(h.target);continue}for(let C of Array.from(h.addedNodes)){if(!(C instanceof Element))continue;if(C.hasAttribute(P0))U0(C);for(let k of Array.from(C.querySelectorAll(`[${P0}]`)))U0(k)}}}),m6.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[P0]}),o6()};y()}var WC=_4((y)=>[y.caption.toLocaleLowerCase()]);function O3(y){let[x,,h,C,...k]=y.split(`
16
+ `).map((B)=>B.split("\t"));if(x&&h&&C&&k){if(c.locales.value=x,c.languages.value=h,c.emoji.value=C,c.stringMap.value=k.reduce((B,w)=>{return B[w[0].toLocaleLowerCase()]=w,B},{}),c.localeOptions.value=x.map((B,w)=>({icon:n6({title:x[w]},C[w]),caption:h[w],value:B})).sort(WC),!c.locales.value.includes(c.locale.value)){let B=c.locale.value.substring(0,2);c.locale.value=c.locales.value.find((w)=>w.substring(0,2)===B)||c.locales.value[0]}i3()}}function T(y){if(y.endsWith("…"))return T(y.substring(0,y.length-1))+"…";let x=c.locales.value.indexOf(c.locale.value);if(x>-1){let h=S(c.stringMap),C=y.toLocaleLowerCase(),k=h[C],B=k&&k[x];if((!B||B==='"')&&C.includes("#")){let w=h[C.substring(0,C.indexOf("#"))];B=w&&w[x]}if(B)B=B.split("#",2)[0],y=y.toLocaleLowerCase()===y?B.toLocaleLowerCase():B;else y=y.split("#",2)[0]}else y=y.split("#",2)[0];return y}class O4 extends ${static preferredTagName="tosi-locale-picker";static initAttributes={hideCaption:!1};content=()=>{return Q1({part:"select",showIcon:!0,title:T("Language"),bindValue:c.locale,bindLocaleOptions:c.localeOptions})};render(){super.render(),this.parts.select.toggleAttribute("hide-caption",this.hideCaption)}}var JC=O4,a6=O4.elementCreator(),ZC=a6;class b1 extends ${static preferredTagName="tosi-localized";static lightStyleSpec={":host":{pointerEvents:"none"}};static allInstances=new Set;static initAttributes={refString:""};contents=()=>G.tosiSlot();connectedCallback(){super.connectedCallback(),b1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),b1.allInstances.delete(this)}localeChanged(){if(!this.refString)this.refString=this.textContent||"";this.textContent=this.refString?T(this.refString):""}render(){super.render(),this.localeChanged()}}var Y4=b1,O1=b1.elementCreator(),RC=O1;function e6(y){let x=/^\s*([a-zA-Z]+)\s*(?:\(([^)]*)\))?\s*$/.exec(y);if(!x)return{base:y.trim().toLowerCase(),args:[]};let h=x[2]===void 0?[]:x[2].split(",").map((C)=>C.trim()).filter(Boolean);return{base:x[1].toLowerCase(),args:h}}function DC(){try{return c.locale.value||void 0}catch{return}}function F3(y){let x=HC,h;return()=>{let C=DC();if(C!==x)x=C,h=y(C);return h}}var HC=Symbol("unbuilt");function t6(y){if(y===null||y===void 0||y==="")return null;let x=typeof y==="number"?y:Number(y);return Number.isFinite(x)?x:null}var vC=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],MC=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];function SC(y,x,h,C,k){let B=y<0,w=Math.abs(y),g=0;while(w>=x&&g<h.length-1)w/=x,g+=1;let z=(g===0?k:C).format(w);return`${B?"-":""}${z} ${h[g]}`}function IC(y,x){return{align:y,format:x,toDOM(h,C){h.textContent=x(C)}}}function N3(y){let{base:x,args:h}=e6(y),C=(B)=>({align:"right",format:(w)=>{let g=t6(w);return g===null?"":B(g)},toDOM(w,g){let z=t6(g);w.textContent=z===null?"":B(z),w.classList.toggle("-negative",z!==null&&z<0),w.classList.toggle("-zero",z===0)}}),k=(B)=>{let w=F3(B);return C((g)=>w().format(g))};switch(x){case"number":return k((B)=>new Intl.NumberFormat(B));case"currency":{let B=(h[0]||"USD").toUpperCase();return k((w)=>new Intl.NumberFormat(w,{style:"currency",currency:B}))}case"fixed":{let B=h[0]!==void 0?Math.max(0,Math.min(20,Math.trunc(Number(h[0]))||0)):2;return k((w)=>new Intl.NumberFormat(w,{minimumFractionDigits:B,maximumFractionDigits:B}))}case"percent":{let B=h[0]!==void 0?Math.max(0,Math.min(20,Math.trunc(Number(h[0]))||0)):0;return k((w)=>new Intl.NumberFormat(w,{style:"percent",minimumFractionDigits:B,maximumFractionDigits:B}))}case"sci":return k((B)=>new Intl.NumberFormat(B,{notation:"scientific"}));case"eng":return k((B)=>new Intl.NumberFormat(B,{notation:"engineering"}));case"bytes":{let B=(h[0]||"").toLowerCase()==="iec",w=B?1024:1000,g=B?MC:vC,z=F3((j)=>new Intl.NumberFormat(j,{maximumFractionDigits:1})),q=F3((j)=>new Intl.NumberFormat(j,{maximumFractionDigits:0}));return C((j)=>SC(j,w,g,z(),q()))}case"boolean":{let B=h[0]||"checkSquare",w=h.length===0?"square":h[1]||null,g=(z)=>{if(!z)return null;let q=Q[z];return typeof q==="function"?q():document.createTextNode("")};return{align:"center",format:(z)=>g(z?B:w)??document.createTextNode(""),toDOM(z,q){let j=g(q?B:w);z.replaceChildren(...j?[j]:[])}}}default:return IC(void 0,(B)=>B==null?"":String(B))}}function bC(y,x,h){let C=y.find((k)=>k[x]!==void 0&&k[x]!==null);if(C!==void 0){let k=C[x];switch(typeof k){case"string":if(k.match(/^\d+(\.\d+)?$/))return 6*h;else if(k.includes(" "))return 20*h;else return 12*h;case"number":return 6*h;case"boolean":return 5*h;case"object":return!1;default:return 8*h}}return!1}var{div:G0,span:F4,button:TC}=G,y7=(y)=>y,x7=new WeakMap;function h7(y){if(!y.type||y.dataCell)return null;let x=x7.get(y);if(!x)x=N3(y.type),x7.set(y,x);return x}class N4 extends ${static preferredTagName="tosi-table";static lightStyleSpec={":host":{"--tosi-table-row-height":"32px","--tosi-table-touch-size":"var(--tosi-touch-size, 44px)","--tosi-table-dragged-header-bg":"#0004","--tosi-table-dragged-header-color":"#fff","--tosi-table-drop-header-bg":"#fff4",display:"block",overflow:"hidden",background:A.tosiTableBg("var(--tosi-bg, #fff)")},":host .scroll-area":{width:"100%",height:"100%",overflow:"auto",overscrollBehavior:"none"},":host .thead, :host .tbody":{display:"contents"},":host .tr":{display:"grid",gridTemplateColumns:l.tosiTableGridColumns,width:l.tosiTableGridRowWidth,height:l.tosiTableRowHeight,background:A.tosiTableBg("var(--tosi-bg, #fff)")},":host .thead .tr":{position:"sticky",top:"0",zIndex:"2",background:A.tosiTableHeaderBg(A.tosiTableBg("var(--tosi-bg, #fff)"))},":host .tbody-pinned-top .tr, :host .tbody-pinned-bottom .tr":{position:"sticky",zIndex:"1"},":host .th, :host .td":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"flex",alignItems:"center",height:l.tosiTableRowHeight,lineHeight:l.tosiTableRowHeight},":host .col-pinned":{position:"sticky",zIndex:"1",background:A.tosiTableBg("var(--tosi-bg, #fff)")},":host .th.col-pinned":{zIndex:"3",background:A.tosiTableHeaderBg(A.tosiTableBg("var(--tosi-bg, #fff)"))},":host .tr[aria-selected] .td":{background:A.tosiTableSelectedBg("var(--tosi-accent, #007AFF22)")},":host .td:focus, :host .th:focus":{outline:"2px solid var(--tosi-accent, #007AFF)",outlineOffset:"-2px",zIndex:"1"},":host .col-pinned:focus":{zIndex:"4"},":host .col-edge-right":{boxShadow:"1px 0 0 var(--tosi-table-edge-color, #0002)"},":host .col-edge-left":{boxShadow:"-1px 0 0 var(--tosi-table-edge-color, #0002)"},":host .row-edge-bottom":{boxShadow:"0 1px 0 var(--tosi-table-edge-color, #0002)"},":host .row-edge-top":{boxShadow:"0 -1px 0 var(--tosi-table-edge-color, #0002)"},":host .th .menu-trigger":{color:"currentColor",background:"none",padding:0,lineHeight:l.tosiTableTouchSize,height:l.tosiTableTouchSize,width:l.tosiTableTouchSize},':host [draggable="true"]':{cursor:"ew-resize"},':host [draggable="true"]:active':{background:l.tosiTableDraggedHeaderBg,color:l.tosiTableDraggedHeaderColor},":host .drag-over":{background:l.tosiTableDropHeaderBg}};static initAttributes={rowHeight:30,charWidth:15,minColumnWidth:30,select:!1,multiple:!1,pinnedTop:0,pinnedBottom:0,nosort:!1,nohide:!1,noreorder:!1,localized:!1};selectionChanged=()=>{};rowRendered=null;selectedKey=Symbol("selected");selectBinding=(y,x)=>{if(x==null)return;y.toggleAttribute("aria-selected",x[this.selectedKey]===!0)};maxVisibleRows=1e4;_head=null;_scrollArea=null;_tbodyTop=null;_tbodyBottom=null;_pinnedRowEdgeObserver=null;_rowCellsCache=new WeakMap;itemFor(y){return l2(y)}cellsFor(y){let x=S(y);for(let h of[this._tbodyTop,this._scrollArea,this._tbodyBottom]){if(!h)continue;let C=J2(h);if(!C)continue;let k=C.itemToElement.get(x);if(k&&k.length>0){let B=k[0],w=this._rowCellsCache.get(B);if(!w)w=Array.from(B.children),this._rowCellsCache.set(B,w);return w}}return}get value(){return{array:this.array,filter:this.filter,columns:this.columns}}set value(y){let{array:x,columns:h,filter:C}=S(y);if(this._array!==x||this._columns!==h||this._filter!==C)this.queueRender();this._array=x||[],this._columns=h||null,this._filter=C||y7}rowData={visible:[],pinnedTopData:[],pinnedBottomData:[]};_array=[];_columns=null;_filter=y7;_sort;_pinnedTopRows;_pinnedBottomRows;get pinnedTopRows(){return this._pinnedTopRows}set pinnedTopRows(y){this._pinnedTopRows=y?S(y):void 0,this.queueRender()}get pinnedBottomRows(){return this._pinnedBottomRows}set pinnedBottomRows(y){this._pinnedBottomRows=y?S(y):void 0,this.queueRender()}get effectivePinnedTopData(){if(this._pinnedTopRows)return this._pinnedTopRows;return this.pinnedTop>0?this._array.slice(0,this.pinnedTop):[]}get effectivePinnedBottomData(){if(this._pinnedBottomRows)return this._pinnedBottomRows;return this.pinnedBottom>0?this._array.slice(-this.pinnedBottom):[]}get effectiveBaseData(){if(this._pinnedTopRows||this._pinnedBottomRows)return this._array;return this._array.slice(this.pinnedTop,this._array.length-this.pinnedBottom)}constructor(){super();this.rowData=e({[this.instanceId]:this.rowData})[this.instanceId]}get array(){return this._array}set array(y){this._array=S(y),this.queueRender()}get filter(){return this._filter}set filter(y){if(this._filter!==y)this._filter=y,this.queueRender()}get sort(){if(this._sort)return this._sort;let y=this._columns?.find((h)=>h.sort==="ascending"||h.sort==="descending");if(!y)return;let{prop:x}=y;return y.sort==="ascending"?(h,C)=>h[x]>C[x]?1:-1:(h,C)=>h[x]>C[x]?-1:1}set sort(y){if(this._sort!==y)this._sort=y,this.queueRender()}get columns(){if(!Array.isArray(this._columns)){let{_array:y}=this;this._columns=Object.keys(y[0]||{}).map((x)=>{let h=bC(y,x,this.charWidth);return{name:x.replace(/([a-z])([A-Z])/g,"$1 $2").toLocaleLowerCase(),prop:x,align:typeof y[0][x]==="number"||y[0][x]!==""&&!isNaN(y[0][x])?"right":"left",visible:h!==!1,width:h?h:0}})}return this._columns}set columns(y){this._columns=y,this.queueRender()}get visibleColumns(){let y=this.columns.filter((k)=>k.visible!==!1),x=y.filter((k)=>k.pinned==="left"),h=y.filter((k)=>!k.pinned),C=y.filter((k)=>k.pinned==="right");return[...x,...h,...C]}get pinnedLeft(){return this.visibleColumns.filter((y)=>y.pinned==="left").length}set pinnedLeft(y){let x=this.columns.filter((h)=>h.visible!==!1);for(let h of x)if(h.pinned==="left")delete h.pinned;for(let h=0;h<y&&h<x.length;h++)x[h].pinned="left";this.queueRender()}get pinnedRight(){return this.visibleColumns.filter((y)=>y.pinned==="right").length}set pinnedRight(y){let x=this.columns.filter((h)=>h.visible!==!1);for(let h of x)if(h.pinned==="right")delete h.pinned;for(let h=x.length-y;h<x.length;h++)if(h>=0)x[h].pinned="right";this.queueRender()}content=null;computeStickyInfo(y){let x=y.map(()=>({})),h=0,C=-1;for(let w=0;w<y.length;w++){if(y[w].pinned!=="left")break;x[w].left=h+"px",h+=y[w].width,C=w}if(C>=0)x[C].edgeClass="col-edge-right";let k=0,B=y.length;for(let w=y.length-1;w>=0;w--){if(y[w].pinned!=="right")break;x[w].right=k+"px",k+=y[w].width,B=w}if(B<y.length)x[B].edgeClass="col-edge-left";return x}cellClasses(y,x){let h=y;if(x.left!=null||x.right!=null)h+=" col-pinned";if(x.edgeClass)h+=" "+x.edgeClass;return h}rowClasses(y){return y==="visible"?"tr":"tr row-pinned"}tagPinnedRows=()=>{this.tagPinnedTbody(this._tbodyTop,"top"),this.tagPinnedTbody(this._tbodyBottom,"bottom")};tagPinnedTbody(y,x){if(!y)return;let h=Array.from(y.querySelectorAll(".tr"));if(h.length===0)return;let C=h.length-1,k=x==="top"?"row-edge-bottom":"row-edge-top";h.forEach((w,g)=>{w.classList.remove(k);let z=x==="top"?g+1:C-g;w.style[x]=`calc(var(--tosi-table-row-height) * ${z})`}),(x==="top"?h[C]:h[0]).classList.add(k)}cellStyle(y,x,h){let C={justifyContent:y.align||h7(y)?.align||"left",...h};if(x.left!=null)C.left=x.left;if(x.right!=null)C.right=x.right;return C}applyGridCellAttrs(y,x,h,C){y.setAttribute("aria-colindex",String(x+1)),y.tabIndex=-1,y.classList.add(...this.cellClasses("td",h).split(" ")),Object.assign(y.style,C)}buildCell(y,x,h,C){let k=this.cellStyle(y,h);if(y.dataCell!==void 0){let w=y.dataCell(y);return this.applyGridCellAttrs(w,x,h,k),w}let B=h7(y);if(B)return F4({class:this.cellClasses("td",h),role:"gridcell",tabindex:-1,ariaColindex:String(x+1),style:k,bind:{value:C[y.prop],binding:{toDOM(w,g){B.toDOM(w,g)}}}});return F4({class:this.cellClasses("td",h),role:"gridcell",tabindex:-1,ariaColindex:String(x+1),style:k,bindText:C[y.prop]})}buildRow(y,x,h,C="tr"){let k=x.map((g,z)=>this.buildCell(g,z,h[z],y)),B=this.selectBinding,w={class:C};return w.bind={value:y,binding:{toDOM:(g,z)=>{B(g,z);let q=this.rowRendered;if(q)q(z,Array.from(g.children))}}},G0(w,...k)}buildHeaderCell(y,x,h){let{popColumnMenu:C}=this,k="none",B;switch(y.sort){case"ascending":B=Q.sortAscending(),k="descending";break;case"descending":k="ascending",B=Q.sortDescending();break}let w=!(this.nosort&&this.nohide)?TC({class:"menu-trigger",onClick(z){C(z.target,y),z.stopPropagation()}},B||Q.moreVertical()):{},g=y.headerCell!==void 0?y.headerCell(y):F4({class:this.cellClasses("th",h),role:"columnheader",tabindex:-1,ariaSort:k,ariaColindex:String(x+1),style:this.cellStyle(y,h)},this.captionSpan({style:{flex:"1"}},typeof y.name==="string"?y.name:y.prop),w);if(y.headerCell!==void 0)this.applyGridCellAttrs(g,x,h,this.cellStyle(y,h)),g.classList.remove("td"),g.classList.add("th"),g.setAttribute("role","columnheader");if(!this.noreorder&&g.children[0]){U3();let z=this.instanceId+"-column-header",q=g.children[0];q.setAttribute("draggable","true"),q.style.pointerEvents="all",q.dataset.drag=z,g.dataset.drop=z,q.addEventListener("dragstart",()=>{this.draggedColumn=y}),g.addEventListener("drop",this.dropColumn)}return g}buildHeader(y,x){let h=y.map((C,k)=>this.buildHeaderCell(C,k,x[k]));return G0({class:"thead",role:"rowgroup"},G0({class:"tr",role:"row"},...h))}buildPinnedBody(y,x,h,C){let k=S(y);if(!k||k.length===0)return null;let B=C==="pinned-top"?"pinnedTopRows":"pinnedBottomRows",w=this.rowClasses(C),g=y.listBinding((z,q)=>this.buildRow(q,x,h,w),{});return G0({class:`tbody tbody-${C}`,role:"rowgroup",part:B},...g)}getColumn(y){if(!this._scrollArea)return;let x=(y.touches!==void 0?y.touches[0].clientX:y.clientX)-this._scrollArea.getBoundingClientRect().x,h=y.touches!==void 0?20:5,{scrollLeft:C,clientWidth:k,scrollWidth:B}=this._scrollArea,w=this.visibleColumns,g=B-k-C,z=0;return w.find((q)=>{if(q.visible===!1)return!1;z+=q.width;let j;if(q.pinned==="left")j=z;else if(q.pinned==="right")j=z-C-g;else j=z-C;return Math.abs(x-j)<h})}setCursor=(y)=>{let x=this.getColumn(y);this.style.cursor=x!==void 0?"col-resize":""};resizeColumn=(y)=>{let x=this.getColumn(y);if(x!==void 0){let h=Number(x.width),C=y.touches!==void 0,k=C?y.touches[0].identifier:void 0;_1(y,(B,w,g)=>{if((C?[...g.touches].find((j)=>j.identifier===k):!0)===void 0)return!0;let q=h+B;if(x.width=q>this.minColumnWidth?q:this.minColumnWidth,this.setColumnWidths(),g.type==="mouseup")return!0},"col-resize")}};selectRow(y,x=!0){if(x)y[this.selectedKey]=!0;else delete y[this.selectedKey];this.updateSelectionVisuals()}selectRows(y,x=!0){for(let h of y||this.array)if(x)h[this.selectedKey]=!0;else delete h[this.selectedKey];this.updateSelectionVisuals()}deSelect(y){this.selectRows(y,!1)}updateSelectionVisuals(){let y=this._scrollArea?.querySelectorAll(".tr")??[];for(let x of y){let h=this.itemFor(x);if(h!=null)this.selectBinding(x,h)}}rangeStart;updateSelection=(y)=>{if(!this.select&&!this.multiple)return;let{target:x}=y;if(!(x instanceof HTMLElement))return;let h=this.itemFor(x);if(h==null)return;let C=y,k=window.getSelection();if(k!==null)k.removeAllRanges();let B=this.visibleRows;if(this.multiple&&C.shiftKey&&B.length>0&&this.rangeStart!==h){let w=this.rangeStart===void 0||this.rangeStart[this.selectedKey]===!0,[g,z]=[this.rangeStart!==void 0?B.indexOf(this.rangeStart):0,B.indexOf(h)].sort((q,j)=>q-j);if(g>-1)for(let q=g;q<=z;q++){let j=B[q];this.selectRow(j,w)}}else if(this.multiple&&C.metaKey){this.selectRow(h,!h[this.selectedKey]);let w=B.indexOf(h),g=B[w+1],z=w>0?B[w-1]:void 0;if(g!==void 0&&g[this.selectedKey]===!0)this.rangeStart=g;else if(z!==void 0&&z[this.selectedKey]===!0)this.rangeStart=z;else this.rangeStart=void 0}else this.rangeStart=h,this.deSelect(),this.selectRow(h,!0);this.selectionChanged(this.visibleSelectedRows),this.updateSelectionVisuals()};findCell(y,x){if(y===-1)return this.querySelector(`.thead .th[aria-colindex="${x+1}"]`);let h=this.effectivePinnedTopData,C=this.visibleRows,k=this.effectivePinnedBottomData,B;if(y<h.length)B=h[y];else if(y<h.length+C.length)B=C[y-h.length];else if(y<h.length+C.length+k.length)B=k[y-h.length-C.length];else return null;return this.cellsFor(B)?.[x]??null}_pendingFocus=null;handleScrollEnd=()=>{if(!this._pendingFocus)return;let{row:y,col:x}=this._pendingFocus;this._pendingFocus=null;let h=this.findCell(y,x);if(h)h.focus()};focusCell(y,x){this._pendingFocus={row:y,col:x};let h=this.findCell(y,x);if(h)h.focus(),h.scrollIntoView({block:"nearest",inline:"nearest"});else if(this._scrollArea){let C=this.effectivePinnedTopData,k=y-C.length;if(k>=0&&k<this.visibleRows.length)this._scrollArea.scrollTop=k*this.rowHeight}}handleKeyNav=(y)=>{let x=y.target,h=x.closest(".td")||x.closest(".th");if(!h)return;let C=parseInt(h.getAttribute("aria-colindex")||"",10);if(isNaN(C))return;let k=C-1,B=this.visibleColumns.length,w=this.effectivePinnedTopData,g=this.visibleRows,z=this.effectivePinnedBottomData,q=w.length+g.length+z.length,j=y.metaKey||y.ctrlKey,V=h.classList.contains("th"),_;if(V)_=-1;else{let i=h.closest(".tr");if(!i)return;let N=l2(i);if(N==null)return;let F=w.indexOf(N),R=F===-1?g.indexOf(N):-1,D=F===-1&&R===-1?z.indexOf(N):-1;if(F!==-1)_=F;else if(R!==-1)_=w.length+R;else if(D!==-1)_=w.length+g.length+D;else return}let P=_,U=k;switch(y.key){case"ArrowUp":P=j?0:Math.max(-1,_-1);break;case"ArrowDown":P=j?q-1:Math.min(q-1,_+1);break;case"ArrowLeft":U=j?0:Math.max(0,k-1);break;case"ArrowRight":U=j?B-1:Math.min(B-1,k+1);break;case"Tab":if(y.shiftKey)if(k>0)U=k-1;else if(_>0)P=_-1,U=B-1;else return;else if(k<B-1)U=k+1;else if(_<q-1)P=_+1,U=0;else return;break;case"Home":if(j)P=0,U=0;else U=0;break;case"End":if(j)P=q-1,U=B-1;else U=B-1;break;default:return}if(P!==_||U!==k)y.preventDefault(),this.focusCell(P,U)};connectedCallback(){super.connectedCallback(),this.addEventListener("mousemove",this.setCursor),this.addEventListener("mousedown",this.resizeColumn),this.addEventListener("touchstart",this.resizeColumn,{passive:!0}),this.addEventListener("mouseup",this.updateSelection),this.addEventListener("touchend",this.updateSelection),this.addEventListener("keydown",this.handleKeyNav)}setColumnWidths(){let y=this.visibleColumns,x=y.map((k)=>k.width+"px").join(" "),h=y.reduce((k,B)=>k+B.width,0)+"px";this.style.setProperty("--tosi-table-grid-columns",x),this.style.setProperty("--tosi-table-grid-row-width",h),this.style.setProperty("--grid-columns",x),this.style.setProperty("--grid-row-width",h);let C=this.computeStickyInfo(y);for(let k of this.querySelectorAll(".col-pinned")){let B=parseInt(k.getAttribute("aria-colindex")||"",10)-1;if(!isNaN(B)&&C[B]){let w=C[B];if(w.left!=null)k.style.left=w.left;if(w.right!=null)k.style.right=w.right}}}sortByColumn=(y,x="auto")=>{for(let h of this.columns.filter((C)=>S(C.sort)!==!1))if(S(h)===y){if(x==="auto")h.sort=h.sort==="ascending"?"descending":"ascending";else h.sort=x;this.queueRender()}else delete h.sort};popColumnMenu=(y,x)=>{let{sortByColumn:h}=this,C=this.columns.filter((g)=>g.visible===!1),k=this.queueRender.bind(this),B=[];if(!this.nosort&&x.sort!==!1)B.push({caption:this.localized?`${T("Sort")} ${T("Ascending")}`:"Sort Ascending",icon:"sortAscending",action(){h(x)}},{caption:this.localized?`${T("Sort")} ${T("Descending")}`:"Sort Descending",icon:"sortDescending",action(){h(x,"descending")}});if(!this.nohide){if(B.length)B.push(null);B.push({caption:this.localized?`${T("Hide")} ${T("Column")}`:"Hide Column",icon:"eyeOff",enabled:()=>x.visible!==!0,action(){x.visible=!1,k()}},{caption:this.localized?`${T("Show")} ${T("Column")}`:"Show Column",icon:"eye",enabled:()=>C.length>0,menuItems:C.map((g)=>{return{caption:g.name||g.prop,action(){delete g.visible,k()}}})})}if(B.length)B.push(null);let w=x.pinned==="left"?"pin":x.pinned==="right"?"pin0f":"pin50o";B.push({caption:this.localized?T("Pin"):"Pin",icon:w,menuItems:[{caption:this.localized?T("Left"):"Left",icon:"pin",enabled:()=>x.pinned!=="left",action(){x.pinned="left",k()}},{caption:this.localized?T("Right"):"Right",icon:"pin0f",enabled:()=>x.pinned!=="right",action(){x.pinned="right",k()}},{caption:this.localized?T("Unpin"):"Unpin",icon:"unPin",enabled:()=>!!x.pinned,action(){delete x.pinned,k()}}]}),r({target:y,localized:this.localized,menuItems:B})};get captionSpan(){return this.localized?O1:F4}get visibleRows(){return S(this.rowData.visible)}get visibleSelectedRows(){return this.visibleRows.filter((y)=>y[this.selectedKey])}get selectedRows(){if(this._pinnedTopRows||this._pinnedBottomRows)return[...this._pinnedTopRows??[],...this._array,...this._pinnedBottomRows??[]].filter((x)=>x[this.selectedKey]);return this._array.filter((y)=>y[this.selectedKey])}getCells(y){let x=y instanceof Element?this.itemFor(y):y;return x==null?void 0:this.cellsFor(x)}getItem(y){return this.itemFor(y)}draggedColumn;dropColumn=(y)=>{let x=y.target.closest(".drag-over"),h=parseInt(x.getAttribute("aria-colindex")||"",10)-1,C=this.visibleColumns[h],k=this.columns.indexOf(this.draggedColumn),B=this.columns.indexOf(C);this.draggedColumn.pinned=C.pinned,this.columns.splice(k,1),this.columns.splice(B,0,this.draggedColumn),this.queueRender(),y.preventDefault(),y.stopPropagation()};render(){super.render(),this.textContent="";let y=this.effectivePinnedTopData,x=this.effectivePinnedBottomData,h=this.effectiveBaseData,C=Math.min(h.length,this.maxVisibleRows),k=this.filter(h.slice(0,C)),{sort:B}=this;if(B)k.sort(B);this.rowData.pinnedTopData=y,this.rowData.pinnedBottomData=x,this.rowData.visible=k;let w=this.visibleColumns;if(w.length===0)return;let g=this.computeStickyInfo(w);this.style.setProperty("--tosi-table-row-height",this.rowHeight>0?`${this.rowHeight}px`:"auto"),this.setColumnWidths(),this._head=this.buildHeader(w,g),this._tbodyTop=this.buildPinnedBody(this.rowData.pinnedTopData,w,g,"pinned-top"),this._tbodyBottom=this.buildPinnedBody(this.rowData.pinnedBottomData,w,g,"pinned-bottom");let z=this.rowData.visible.listBinding((q,j)=>this.buildRow(j,w,g),this.rowHeight>0?{virtual:{height:this.rowHeight}}:{});this._scrollArea=G0({class:"scroll-area",part:"visibleRows"},...[this._head,this._tbodyTop,...z,this._tbodyBottom].filter(Boolean)),this._scrollArea.addEventListener("scrollend",this.handleScrollEnd),this.append(this._scrollArea),this.observePinnedRowMutations(),this.tagPinnedRows()}observePinnedRowMutations(){this._pinnedRowEdgeObserver?.disconnect(),this._pinnedRowEdgeObserver=new MutationObserver(this.tagPinnedRows);for(let y of[this._tbodyTop,this._tbodyBottom])if(y)this._pinnedRowEdgeObserver.observe(y,{childList:!0})}}var pC=N4,W3=N4.elementCreator(),LC=W3,cC=W3;var{dialog:dC,button:J3,header:fC,footer:sC,tosiSlot:Z3,h3:R3,p:D3,label:uC,input:rC,div:mC}=G;class H3 extends ${static preferredTagName="tosi-dialog";static lightStyleSpec={":host > dialog::backdrop":{backdropFilter:"blur(8px)"},":host > dialog:not([open])":{display:"none"},":host > dialog[open]":{minWidth:300,border:0,borderRadius:10,overflow:"hidden",maxHeight:"calc(100% - 20px)",padding:0,display:"flex",flexDirection:"column",gap:5,_dialogShadow:A.menuShadow("0 5px 10px #0004"),_dialogBackground:A.background("#fafafa"),_dialogColor:A.textColor("#222"),boxShadow:l.dialogShadow,background:l.dialogBackground,color:l.dialogColor},":host > dialog > *":{padding:"0 20px"},":host > dialog > header":{display:"flex",justifyContent:"center",gap:10},":host > dialog > footer":{display:"flex",justifyContent:"flex-end",gap:10,paddingBottom:20}};static async alert(y,x="Alert"){return new Promise((h)=>{let C=W4({removeOnClose:!0,closeOnBackgroundClick:!0,dialogWillClose(){h()}},R3({slot:"header"},x),y.includes(`
17
+ `)?G.pre({style:{whiteSpace:"pre-wrap",margin:0}},y):D3(y));document.body.append(C),C.showModal()})}static async confirm(y,x="Confirm"){return new Promise((h)=>{let C=W4({removeOnClose:!0,dialogWillClose(k){h(k==="confirm")}},R3({slot:"header"},x),D3(y),J3({slot:"footer",onClick(){C.close()}},"Cancel"));document.body.append(C),C.showModal()})}static async prompt(y,x="Prompt",h=""){return new Promise((C)=>{let k=rC({value:h}),B=W4({removeOnClose:!0,dialogWillClose(w){C(w==="confirm"?k.value:null)},initialFocus(){k.focus()}},R3({slot:"header"},x),D3(uC({style:{display:"flex",flexDirection:"column",alignItems:"stretch",gap:5}},mC(y),k)),J3({slot:"footer",onClick(){B.close()}},"Cancel"));document.body.append(B),B.showModal()})}removeOnClose=!1;closeOnBackgroundClick=!1;constructor(){super();Z2(this,"click",()=>{if(this.closeOnBackgroundClick)this.close()})}dialogWillClose=(y="cancel")=>{console.log("dialog will close with",y)};initialFocus(){this.parts.ok.focus()}#y=(y)=>{};showModal=()=>{return this.style.zIndex=String(X2()),new Promise((y)=>{this.#y=y,this.parts.dialog.showModal(),requestAnimationFrame(()=>{this.initialFocus()})})};close=(y="cancel")=>{if(this.dialogWillClose(y),this.#y(y),this.parts.dialog.close(),this.removeOnClose)this.remove()};ok=()=>{this.close("confirm")};content=()=>dC({part:"dialog"},fC(Z3({name:"header"})),Z3(),sC(Z3({name:"footer"}),J3({part:"ok",onClick:this.ok},"OK")))}var W4=H3.elementCreator();var nC=/^readme\.md$/i;function C7(y){if(nC.test(y))return"";return y.replace(/\.[^.]+$/,"")}function b2(y){let x={};for(let C of y){let k=C7(C.filename);x[k]=(x[k]||0)+1}let h={};for(let C of y){let k=C7(C.filename);h[C.filename]=k!==""&&x[k]>1?C.filename.replace(/\./g,"-"):k}return h}function v3(y){return y===""?"/":`/${y}/`}function B7(y,x){let h=y.replace(/^\?/,"");if(!h||h.includes("=")||h.includes("&"))return null;let C=decodeURIComponent(h),k=x[C];if(k===void 0)return null;return v3(k)}function EC(y){return y.replace(/^\/+/,"").replace(/\/+$/,"").replace(/\/index\.html$/i,"")}function M3(y,x){let h=EC(y);for(let[C,k]of Object.entries(x))if(k===h)return C;return""}function k7(y){return y.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function S3(y,x,h){if(!y)return"";for(let k of x)if(k.filename===y)return k.filename;for(let k of x)if(h[k.filename]===y)return k.filename;let C=k7(y);for(let k of x)if(h[k.filename]===C)return k.filename;for(let k of x)if(k.title&&k7(k.title)===C)return k.filename;return""}function w7(y){let x=y.pin==="top"?"A":y.pin==="bottom"?"Z":"M",h=String(y.order??500).padStart(4,"0");return x+h+(y.title||"").toLocaleLowerCase()+"\x00"+y.filename}function oC(y,x){let h=w7(y),C=w7(x);return h>C?1:C>h?-1:0}function J4(y,x){let h=new Map;for(let w of y)h.set(w.filename,{doc:w,slug:x[w.filename]??"",children:[],depth:0});let C=new Map;for(let w of y){let g=w.parent?S3(w.parent,y,x):"";if(g&&(g===w.filename||!h.has(g)||aC(w.filename,g,y,x)))g="";C.set(w.filename,g)}let k=[];for(let w of y){let g=C.get(w.filename)||"",z=h.get(w.filename);if(g)h.get(g).children.push(z);else k.push(z)}let B=(w,g)=>{w.sort((z,q)=>oC(z.doc,q.doc));for(let z of w)z.depth=g,B(z.children,g+1)};return B(k,0),k}function aC(y,x,h,C){let k=new Map(h.map((g)=>[g.filename,g])),B=x,w=new Set([y]);while(B){if(w.has(B))return!0;w.add(B);let g=k.get(B);B=g?.parent?S3(g.parent,h,C):""}return!1}function b3(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var _2=b3();function X7(y){_2=y}var i0={exec:()=>null};function I(y,x=""){let h=typeof y=="string"?y:y.source,C={replace:(k,B)=>{let w=typeof B=="string"?B:B.source;return w=w.replace(w1.caret,"$1"),h=h.replace(k,w),C},getRegex:()=>new RegExp(h,x)};return C}var tC=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),w1={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:(y)=>new RegExp(`^( {0,3}${y})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}#`),htmlBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}<(?:[a-z].*>|!--)`,"i")},eC=/^(?:[ \t]*(?:\n|$))+/,yk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,O0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,hk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,T3=/(?:[*+-]|\d{1,9}[.)])/,A7=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_7=I(A7).replace(/bull/g,T3).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ck=I(A7).replace(/bull/g,T3).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),p3=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,kk=/^[^\n]+/,L3=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Bk=I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",L3).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),wk=I(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,T3).getRegex(),H4="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",c3=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,gk=I("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",c3).replace("tag",H4).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),K7=I(p3).replace("hr",O0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",H4).getRegex(),zk=I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",K7).getRegex(),d3={blockquote:zk,code:yk,def:Bk,fences:xk,heading:hk,hr:O0,html:gk,lheading:_7,list:wk,newline:eC,paragraph:K7,table:i0,text:kk},g7=I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",O0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",H4).getRegex(),qk={...d3,lheading:Ck,table:g7,paragraph:I(p3).replace("hr",O0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",g7).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",H4).getRegex()},lk={...d3,html:I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",c3).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:i0,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:I(p3).replace("hr",O0).replace("heading",` *#{1,6} *[^
18
+ ]`).replace("lheading",_7).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},jk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Vk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,P7=/^( {2,}|\\)\n(?!\s*$)/,Xk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,v4=/[\p{P}\p{S}]/u,f3=/[\s\p{P}\p{S}]/u,U7=/[^\s\p{P}\p{S}]/u,Ak=I(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,f3).getRegex(),G7=/(?!~)[\p{P}\p{S}]/u,_k=/(?!~)[\s\p{P}\p{S}]/u,Kk=/(?:[^\s\p{P}\p{S}]|~)/u,Pk=I(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",tC?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Q7=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Uk=I(Q7,"u").replace(/punct/g,v4).getRegex(),Gk=I(Q7,"u").replace(/punct/g,G7).getRegex(),$7="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Qk=I($7,"gu").replace(/notPunctSpace/g,U7).replace(/punctSpace/g,f3).replace(/punct/g,v4).getRegex(),$k=I($7,"gu").replace(/notPunctSpace/g,Kk).replace(/punctSpace/g,_k).replace(/punct/g,G7).getRegex(),Yk=I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,U7).replace(/punctSpace/g,f3).replace(/punct/g,v4).getRegex(),ik=I(/\\(punct)/,"gu").replace(/punct/g,v4).getRegex(),Ok=I(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Fk=I(c3).replace("(?:-->|$)","-->").getRegex(),Nk=I("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Fk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),R4=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Wk=I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",R4).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Y7=I(/^!?\[(label)\]\[(ref)\]/).replace("label",R4).replace("ref",L3).getRegex(),i7=I(/^!?\[(ref)\](?:\[\])?/).replace("ref",L3).getRegex(),Jk=I("reflink|nolink(?!\\()","g").replace("reflink",Y7).replace("nolink",i7).getRegex(),z7=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,s3={_backpedal:i0,anyPunctuation:ik,autolink:Ok,blockSkip:Pk,br:P7,code:Vk,del:i0,emStrongLDelim:Uk,emStrongRDelimAst:Qk,emStrongRDelimUnd:Yk,escape:jk,link:Wk,nolink:i7,punctuation:Ak,reflink:Y7,reflinkSearch:Jk,tag:Nk,text:Xk,url:i0},Zk={...s3,link:I(/^!?\[(label)\]\((.*?)\)/).replace("label",R4).getRegex(),reflink:I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",R4).getRegex()},I3={...s3,emStrongRDelimAst:$k,emStrongLDelim:Gk,url:I(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",z7).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:I(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",z7).getRegex()},Rk={...I3,br:I(P7).replace("{2,}","*").getRegex(),text:I(I3.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Z4={normal:d3,gfm:qk,pedantic:lk},Q0={normal:s3,gfm:I3,breaks:Rk,pedantic:Zk},Dk={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},q7=(y)=>Dk[y];function T1(y,x){if(x){if(w1.escapeTest.test(y))return y.replace(w1.escapeReplace,q7)}else if(w1.escapeTestNoEncode.test(y))return y.replace(w1.escapeReplaceNoEncode,q7);return y}function l7(y){try{y=encodeURI(y).replace(w1.percentDecode,"%")}catch{return null}return y}function j7(y,x){let h=y.replace(w1.findPipe,(B,w,g)=>{let z=!1,q=w;for(;--q>=0&&g[q]==="\\";)z=!z;return z?"|":" |"}),C=h.split(w1.splitPipe),k=0;if(C[0].trim()||C.shift(),C.length>0&&!C.at(-1)?.trim()&&C.pop(),x)if(C.length>x)C.splice(x);else for(;C.length<x;)C.push("");for(;k<C.length;k++)C[k]=C[k].trim().replace(w1.slashPipe,"|");return C}function $0(y,x,h){let C=y.length;if(C===0)return"";let k=0;for(;k<C;){let B=y.charAt(C-k-1);if(B===x&&!h)k++;else if(B!==x&&h)k++;else break}return y.slice(0,C-k)}function Hk(y,x){if(y.indexOf(x[1])===-1)return-1;let h=0;for(let C=0;C<y.length;C++)if(y[C]==="\\")C++;else if(y[C]===x[0])h++;else if(y[C]===x[1]&&(h--,h<0))return C;return h>0?-2:-1}function V7(y,x,h,C,k){let B=x.href,w=x.title||null,g=y[1].replace(k.other.outputLinkReplace,"$1");C.state.inLink=!0;let z={type:y[0].charAt(0)==="!"?"image":"link",raw:h,href:B,title:w,text:g,tokens:C.inlineTokens(g)};return C.state.inLink=!1,z}function vk(y,x,h){let C=y.match(h.other.indentCodeCompensation);if(C===null)return x;let k=C[1];return x.split(`
19
+ `).map((B)=>{let w=B.match(h.other.beginningSpace);if(w===null)return B;let[g]=w;return g.length>=k.length?B.slice(k.length):B}).join(`
20
+ `)}var D4=class{options;rules;lexer;constructor(y){this.options=y||_2}space(y){let x=this.rules.block.newline.exec(y);if(x&&x[0].length>0)return{type:"space",raw:x[0]}}code(y){let x=this.rules.block.code.exec(y);if(x){let h=x[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:x[0],codeBlockStyle:"indented",text:this.options.pedantic?h:$0(h,`
21
+ `)}}}fences(y){let x=this.rules.block.fences.exec(y);if(x){let h=x[0],C=vk(h,x[3]||"",this.rules);return{type:"code",raw:h,lang:x[2]?x[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):x[2],text:C}}}heading(y){let x=this.rules.block.heading.exec(y);if(x){let h=x[2].trim();if(this.rules.other.endingHash.test(h)){let C=$0(h,"#");(this.options.pedantic||!C||this.rules.other.endingSpaceChar.test(C))&&(h=C.trim())}return{type:"heading",raw:x[0],depth:x[1].length,text:h,tokens:this.lexer.inline(h)}}}hr(y){let x=this.rules.block.hr.exec(y);if(x)return{type:"hr",raw:$0(x[0],`
22
+ `)}}blockquote(y){let x=this.rules.block.blockquote.exec(y);if(x){let h=$0(x[0],`
23
23
  `).split(`
24
- `),C="",l="",i=[];for(;h.length>0;){let k=!1,g=[],w;for(w=0;w<h.length;w++)if(this.rules.other.blockquoteStart.test(h[w]))g.push(h[w]),k=!0;else if(!k)g.push(h[w]);else break;h=h.slice(w);let B=g.join(`
25
- `),q=B.replace(this.rules.other.blockquoteSetextReplace,`
24
+ `),C="",k="",B=[];for(;h.length>0;){let w=!1,g=[],z;for(z=0;z<h.length;z++)if(this.rules.other.blockquoteStart.test(h[z]))g.push(h[z]),w=!0;else if(!w)g.push(h[z]);else break;h=h.slice(z);let q=g.join(`
25
+ `),j=q.replace(this.rules.other.blockquoteSetextReplace,`
26
26
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");C=C?`${C}
27
- ${B}`:B,l=l?`${l}
28
- ${q}`:q;let j=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(q,i,!0),this.lexer.state.top=j,h.length===0)break;let _=i.at(-1);if(_?.type==="code")break;if(_?.type==="blockquote"){let K=_,U=K.raw+`
27
+ ${q}`:q,k=k?`${k}
28
+ ${j}`:j;let V=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(j,B,!0),this.lexer.state.top=V,h.length===0)break;let _=B.at(-1);if(_?.type==="code")break;if(_?.type==="blockquote"){let P=_,U=P.raw+`
29
29
  `+h.join(`
30
- `),Q=this.blockquote(U);i[i.length-1]=Q,C=C.substring(0,C.length-K.raw.length)+Q.raw,l=l.substring(0,l.length-K.text.length)+Q.text;break}else if(_?.type==="list"){let K=_,U=K.raw+`
30
+ `),i=this.blockquote(U);B[B.length-1]=i,C=C.substring(0,C.length-P.raw.length)+i.raw,k=k.substring(0,k.length-P.text.length)+i.text;break}else if(_?.type==="list"){let P=_,U=P.raw+`
31
31
  `+h.join(`
32
- `),Q=this.list(U);i[i.length-1]=Q,C=C.substring(0,C.length-_.raw.length)+Q.raw,l=l.substring(0,l.length-K.raw.length)+Q.raw,h=U.substring(i.at(-1).raw.length).split(`
33
- `);continue}}return{type:"blockquote",raw:C,tokens:i,text:l}}}list(y){let x=this.rules.block.list.exec(y);if(x){let h=x[1].trim(),C=h.length>1,l={type:"list",raw:"",ordered:C,start:C?+h.slice(0,-1):"",loose:!1,items:[]};h=C?`\\d{1,9}\\${h.slice(-1)}`:`\\${h}`,this.options.pedantic&&(h=C?h:"[*+-]");let i=this.rules.other.listItemRegex(h),k=!1;for(;y;){let w=!1,B="",q="";if(!(x=i.exec(y))||this.rules.block.hr.test(y))break;B=x[0],y=y.substring(B.length);let j=x[2].split(`
34
- `,1)[0].replace(this.rules.other.listReplaceTabs,($)=>" ".repeat(3*$.length)),_=y.split(`
35
- `,1)[0],K=!j.trim(),U=0;if(this.options.pedantic?(U=2,q=j.trimStart()):K?U=x[1].length+1:(U=x[2].search(this.rules.other.nonSpaceChar),U=U>4?1:U,q=j.slice(U),U+=x[1].length),K&&this.rules.other.blankLine.test(_)&&(B+=_+`
36
- `,y=y.substring(_.length+1),w=!0),!w){let $=this.rules.other.nextBulletRegex(U),Z=this.rules.other.hrRegex(U),p=this.rules.other.fencesBeginRegex(U),T=this.rules.other.headingBeginRegex(U),C1=this.rules.other.htmlBeginRegex(U);for(;y;){let M=y.split(`
37
- `,1)[0],N;if(_=M,this.options.pedantic?(_=_.replace(this.rules.other.listReplaceNesting," "),N=_):N=_.replace(this.rules.other.tabCharGlobal," "),p.test(_)||T.test(_)||C1.test(_)||$.test(_)||Z.test(_))break;if(N.search(this.rules.other.nonSpaceChar)>=U||!_.trim())q+=`
38
- `+N.slice(U);else{if(K||j.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||p.test(j)||T.test(j)||Z.test(j))break;q+=`
39
- `+_}!K&&!_.trim()&&(K=!0),B+=M+`
40
- `,y=y.substring(M.length+1),j=N.slice(U)}}l.loose||(k?l.loose=!0:this.rules.other.doubleBlankLine.test(B)&&(k=!0));let Q=null,Y;this.options.gfm&&(Q=this.rules.other.listIsTask.exec(q),Q&&(Y=Q[0]!=="[ ] ",q=q.replace(this.rules.other.listReplaceTask,""))),l.items.push({type:"list_item",raw:B,task:!!Q,checked:Y,loose:!1,text:q,tokens:[]}),l.raw+=B}let g=l.items.at(-1);if(g)g.raw=g.raw.trimEnd(),g.text=g.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let w=0;w<l.items.length;w++)if(this.lexer.state.top=!1,l.items[w].tokens=this.lexer.blockTokens(l.items[w].text,[]),!l.loose){let B=l.items[w].tokens.filter((j)=>j.type==="space"),q=B.length>0&&B.some((j)=>this.rules.other.anyLine.test(j.raw));l.loose=q}if(l.loose)for(let w=0;w<l.items.length;w++)l.items[w].loose=!0;return l}}html(y){let x=this.rules.block.html.exec(y);if(x)return{type:"html",block:!0,raw:x[0],pre:x[1]==="pre"||x[1]==="script"||x[1]==="style",text:x[0]}}def(y){let x=this.rules.block.def.exec(y);if(x){let h=x[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),C=x[2]?x[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=x[3]?x[3].substring(1,x[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):x[3];return{type:"def",tag:h,raw:x[0],href:C,title:l}}}table(y){let x=this.rules.block.table.exec(y);if(!x||!this.rules.other.tableDelimiter.test(x[2]))return;let h=i7(x[1]),C=x[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=x[3]?.trim()?x[3].replace(this.rules.other.tableRowBlankLine,"").split(`
41
- `):[],i={type:"table",raw:x[0],header:[],align:[],rows:[]};if(h.length===C.length){for(let k of C)this.rules.other.tableAlignRight.test(k)?i.align.push("right"):this.rules.other.tableAlignCenter.test(k)?i.align.push("center"):this.rules.other.tableAlignLeft.test(k)?i.align.push("left"):i.align.push(null);for(let k=0;k<h.length;k++)i.header.push({text:h[k],tokens:this.lexer.inline(h[k]),header:!0,align:i.align[k]});for(let k of l)i.rows.push(i7(k,i.header.length).map((g,w)=>({text:g,tokens:this.lexer.inline(g),header:!1,align:i.align[w]})));return i}}lheading(y){let x=this.rules.block.lheading.exec(y);if(x)return{type:"heading",raw:x[0],depth:x[2].charAt(0)==="="?1:2,text:x[1],tokens:this.lexer.inline(x[1])}}paragraph(y){let x=this.rules.block.paragraph.exec(y);if(x){let h=x[1].charAt(x[1].length-1)===`
42
- `?x[1].slice(0,-1):x[1];return{type:"paragraph",raw:x[0],text:h,tokens:this.lexer.inline(h)}}}text(y){let x=this.rules.block.text.exec(y);if(x)return{type:"text",raw:x[0],text:x[0],tokens:this.lexer.inline(x[0])}}escape(y){let x=this.rules.inline.escape.exec(y);if(x)return{type:"escape",raw:x[0],text:x[1]}}tag(y){let x=this.rules.inline.tag.exec(y);if(x)return!this.lexer.state.inLink&&this.rules.other.startATag.test(x[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(x[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(x[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(x[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:x[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:x[0]}}link(y){let x=this.rules.inline.link.exec(y);if(x){let h=x[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(h)){if(!this.rules.other.endAngleBracket.test(h))return;let i=G0(h.slice(0,-1),"\\");if((h.length-i.length)%2===0)return}else{let i=Ql(x[2],"()");if(i===-2)return;if(i>-1){let k=(x[0].indexOf("!")===0?5:4)+x[1].length+i;x[2]=x[2].substring(0,i),x[0]=x[0].substring(0,k).trim(),x[3]=""}}let C=x[2],l="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(C);i&&(C=i[1],l=i[3])}else l=x[3]?x[3].slice(1,-1):"";return C=C.trim(),this.rules.other.startAngleBracket.test(C)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(h)?C=C.slice(1):C=C.slice(1,-1)),k7(x,{href:C&&C.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},x[0],this.lexer,this.rules)}}reflink(y,x){let h;if((h=this.rules.inline.reflink.exec(y))||(h=this.rules.inline.nolink.exec(y))){let C=(h[2]||h[1]).replace(this.rules.other.multipleSpaceGlobal," "),l=x[C.toLowerCase()];if(!l){let i=h[0].charAt(0);return{type:"text",raw:i,text:i}}return k7(h,l,h[0],this.lexer,this.rules)}}emStrong(y,x,h=""){let C=this.rules.inline.emStrongLDelim.exec(y);if(!C||C[3]&&h.match(this.rules.other.unicodeAlphaNumeric))return;if(!(C[1]||C[2])||!h||this.rules.inline.punctuation.exec(h)){let l=[...C[0]].length-1,i,k,g=l,w=0,B=C[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(B.lastIndex=0,x=x.slice(-1*y.length+l);(C=B.exec(x))!=null;){if(i=C[1]||C[2]||C[3]||C[4]||C[5]||C[6],!i)continue;if(k=[...i].length,C[3]||C[4]){g+=k;continue}else if((C[5]||C[6])&&l%3&&!((l+k)%3)){w+=k;continue}if(g-=k,g>0)continue;k=Math.min(k,k+g+w);let q=[...C[0]][0].length,j=y.slice(0,l+C.index+q+k);if(Math.min(l,k)%2){let K=j.slice(1,-1);return{type:"em",raw:j,text:K,tokens:this.lexer.inlineTokens(K)}}let _=j.slice(2,-2);return{type:"strong",raw:j,text:_,tokens:this.lexer.inlineTokens(_)}}}}codespan(y){let x=this.rules.inline.code.exec(y);if(x){let h=x[2].replace(this.rules.other.newLineCharGlobal," "),C=this.rules.other.nonSpaceChar.test(h),l=this.rules.other.startingSpaceChar.test(h)&&this.rules.other.endingSpaceChar.test(h);return C&&l&&(h=h.substring(1,h.length-1)),{type:"codespan",raw:x[0],text:h}}}br(y){let x=this.rules.inline.br.exec(y);if(x)return{type:"br",raw:x[0]}}del(y){let x=this.rules.inline.del.exec(y);if(x)return{type:"del",raw:x[0],text:x[2],tokens:this.lexer.inlineTokens(x[2])}}autolink(y){let x=this.rules.inline.autolink.exec(y);if(x){let h,C;return x[2]==="@"?(h=x[1],C="mailto:"+h):(h=x[1],C=h),{type:"link",raw:x[0],text:h,href:C,tokens:[{type:"text",raw:h,text:h}]}}}url(y){let x;if(x=this.rules.inline.url.exec(y)){let h,C;if(x[2]==="@")h=x[0],C="mailto:"+h;else{let l;do l=x[0],x[0]=this.rules.inline._backpedal.exec(x[0])?.[0]??"";while(l!==x[0]);h=x[0],x[1]==="www."?C="http://"+x[0]:C=x[0]}return{type:"link",raw:x[0],text:h,href:C,tokens:[{type:"text",raw:h,text:h}]}}}inlineText(y){let x=this.rules.inline.text.exec(y);if(x){let h=this.lexer.state.inRawBlock;return{type:"text",raw:x[0],text:x[0],escaped:h}}}},X1=class y{tokens;options;state;tokenizer;inlineQueue;constructor(x){this.tokens=[],this.tokens.links=Object.create(null),this.options=x||A2,this.options.tokenizer=this.options.tokenizer||new Z4,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let h={other:i1,block:N4.normal,inline:U0.normal};this.options.pedantic?(h.block=N4.pedantic,h.inline=U0.pedantic):this.options.gfm&&(h.block=N4.gfm,this.options.breaks?h.inline=U0.breaks:h.inline=U0.gfm),this.tokenizer.rules=h}static get rules(){return{block:N4,inline:U0}}static lex(x,h){return new y(h).lex(x)}static lexInline(x,h){return new y(h).inlineTokens(x)}lex(x){x=x.replace(i1.carriageReturn,`
43
- `),this.blockTokens(x,this.tokens);for(let h=0;h<this.inlineQueue.length;h++){let C=this.inlineQueue[h];this.inlineTokens(C.src,C.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(x,h=[],C=!1){for(this.options.pedantic&&(x=x.replace(i1.tabCharGlobal," ").replace(i1.spaceLine,""));x;){let l;if(this.options.extensions?.block?.some((k)=>(l=k.call({lexer:this},x,h))?(x=x.substring(l.raw.length),h.push(l),!0):!1))continue;if(l=this.tokenizer.space(x)){x=x.substring(l.raw.length);let k=h.at(-1);l.raw.length===1&&k!==void 0?k.raw+=`
44
- `:h.push(l);continue}if(l=this.tokenizer.code(x)){x=x.substring(l.raw.length);let k=h.at(-1);k?.type==="paragraph"||k?.type==="text"?(k.raw+=(k.raw.endsWith(`
32
+ `),i=this.list(U);B[B.length-1]=i,C=C.substring(0,C.length-_.raw.length)+i.raw,k=k.substring(0,k.length-P.raw.length)+i.raw,h=U.substring(B.at(-1).raw.length).split(`
33
+ `);continue}}return{type:"blockquote",raw:C,tokens:B,text:k}}}list(y){let x=this.rules.block.list.exec(y);if(x){let h=x[1].trim(),C=h.length>1,k={type:"list",raw:"",ordered:C,start:C?+h.slice(0,-1):"",loose:!1,items:[]};h=C?`\\d{1,9}\\${h.slice(-1)}`:`\\${h}`,this.options.pedantic&&(h=C?h:"[*+-]");let B=this.rules.other.listItemRegex(h),w=!1;for(;y;){let z=!1,q="",j="";if(!(x=B.exec(y))||this.rules.block.hr.test(y))break;q=x[0],y=y.substring(q.length);let V=x[2].split(`
34
+ `,1)[0].replace(this.rules.other.listReplaceTabs,(F)=>" ".repeat(3*F.length)),_=y.split(`
35
+ `,1)[0],P=!V.trim(),U=0;if(this.options.pedantic?(U=2,j=V.trimStart()):P?U=x[1].length+1:(U=x[2].search(this.rules.other.nonSpaceChar),U=U>4?1:U,j=V.slice(U),U+=x[1].length),P&&this.rules.other.blankLine.test(_)&&(q+=_+`
36
+ `,y=y.substring(_.length+1),z=!0),!z){let F=this.rules.other.nextBulletRegex(U),R=this.rules.other.hrRegex(U),D=this.rules.other.fencesBeginRegex(U),f=this.rules.other.headingBeginRegex(U),y1=this.rules.other.htmlBeginRegex(U);for(;y;){let H=y.split(`
37
+ `,1)[0],b;if(_=H,this.options.pedantic?(_=_.replace(this.rules.other.listReplaceNesting," "),b=_):b=_.replace(this.rules.other.tabCharGlobal," "),D.test(_)||f.test(_)||y1.test(_)||F.test(_)||R.test(_))break;if(b.search(this.rules.other.nonSpaceChar)>=U||!_.trim())j+=`
38
+ `+b.slice(U);else{if(P||V.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||D.test(V)||f.test(V)||R.test(V))break;j+=`
39
+ `+_}!P&&!_.trim()&&(P=!0),q+=H+`
40
+ `,y=y.substring(H.length+1),V=b.slice(U)}}k.loose||(w?k.loose=!0:this.rules.other.doubleBlankLine.test(q)&&(w=!0));let i=null,N;this.options.gfm&&(i=this.rules.other.listIsTask.exec(j),i&&(N=i[0]!=="[ ] ",j=j.replace(this.rules.other.listReplaceTask,""))),k.items.push({type:"list_item",raw:q,task:!!i,checked:N,loose:!1,text:j,tokens:[]}),k.raw+=q}let g=k.items.at(-1);if(g)g.raw=g.raw.trimEnd(),g.text=g.text.trimEnd();else return;k.raw=k.raw.trimEnd();for(let z=0;z<k.items.length;z++)if(this.lexer.state.top=!1,k.items[z].tokens=this.lexer.blockTokens(k.items[z].text,[]),!k.loose){let q=k.items[z].tokens.filter((V)=>V.type==="space"),j=q.length>0&&q.some((V)=>this.rules.other.anyLine.test(V.raw));k.loose=j}if(k.loose)for(let z=0;z<k.items.length;z++)k.items[z].loose=!0;return k}}html(y){let x=this.rules.block.html.exec(y);if(x)return{type:"html",block:!0,raw:x[0],pre:x[1]==="pre"||x[1]==="script"||x[1]==="style",text:x[0]}}def(y){let x=this.rules.block.def.exec(y);if(x){let h=x[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),C=x[2]?x[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",k=x[3]?x[3].substring(1,x[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):x[3];return{type:"def",tag:h,raw:x[0],href:C,title:k}}}table(y){let x=this.rules.block.table.exec(y);if(!x||!this.rules.other.tableDelimiter.test(x[2]))return;let h=j7(x[1]),C=x[2].replace(this.rules.other.tableAlignChars,"").split("|"),k=x[3]?.trim()?x[3].replace(this.rules.other.tableRowBlankLine,"").split(`
41
+ `):[],B={type:"table",raw:x[0],header:[],align:[],rows:[]};if(h.length===C.length){for(let w of C)this.rules.other.tableAlignRight.test(w)?B.align.push("right"):this.rules.other.tableAlignCenter.test(w)?B.align.push("center"):this.rules.other.tableAlignLeft.test(w)?B.align.push("left"):B.align.push(null);for(let w=0;w<h.length;w++)B.header.push({text:h[w],tokens:this.lexer.inline(h[w]),header:!0,align:B.align[w]});for(let w of k)B.rows.push(j7(w,B.header.length).map((g,z)=>({text:g,tokens:this.lexer.inline(g),header:!1,align:B.align[z]})));return B}}lheading(y){let x=this.rules.block.lheading.exec(y);if(x)return{type:"heading",raw:x[0],depth:x[2].charAt(0)==="="?1:2,text:x[1],tokens:this.lexer.inline(x[1])}}paragraph(y){let x=this.rules.block.paragraph.exec(y);if(x){let h=x[1].charAt(x[1].length-1)===`
42
+ `?x[1].slice(0,-1):x[1];return{type:"paragraph",raw:x[0],text:h,tokens:this.lexer.inline(h)}}}text(y){let x=this.rules.block.text.exec(y);if(x)return{type:"text",raw:x[0],text:x[0],tokens:this.lexer.inline(x[0])}}escape(y){let x=this.rules.inline.escape.exec(y);if(x)return{type:"escape",raw:x[0],text:x[1]}}tag(y){let x=this.rules.inline.tag.exec(y);if(x)return!this.lexer.state.inLink&&this.rules.other.startATag.test(x[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(x[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(x[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(x[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:x[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:x[0]}}link(y){let x=this.rules.inline.link.exec(y);if(x){let h=x[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(h)){if(!this.rules.other.endAngleBracket.test(h))return;let B=$0(h.slice(0,-1),"\\");if((h.length-B.length)%2===0)return}else{let B=Hk(x[2],"()");if(B===-2)return;if(B>-1){let w=(x[0].indexOf("!")===0?5:4)+x[1].length+B;x[2]=x[2].substring(0,B),x[0]=x[0].substring(0,w).trim(),x[3]=""}}let C=x[2],k="";if(this.options.pedantic){let B=this.rules.other.pedanticHrefTitle.exec(C);B&&(C=B[1],k=B[3])}else k=x[3]?x[3].slice(1,-1):"";return C=C.trim(),this.rules.other.startAngleBracket.test(C)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(h)?C=C.slice(1):C=C.slice(1,-1)),V7(x,{href:C&&C.replace(this.rules.inline.anyPunctuation,"$1"),title:k&&k.replace(this.rules.inline.anyPunctuation,"$1")},x[0],this.lexer,this.rules)}}reflink(y,x){let h;if((h=this.rules.inline.reflink.exec(y))||(h=this.rules.inline.nolink.exec(y))){let C=(h[2]||h[1]).replace(this.rules.other.multipleSpaceGlobal," "),k=x[C.toLowerCase()];if(!k){let B=h[0].charAt(0);return{type:"text",raw:B,text:B}}return V7(h,k,h[0],this.lexer,this.rules)}}emStrong(y,x,h=""){let C=this.rules.inline.emStrongLDelim.exec(y);if(!C||C[3]&&h.match(this.rules.other.unicodeAlphaNumeric))return;if(!(C[1]||C[2])||!h||this.rules.inline.punctuation.exec(h)){let k=[...C[0]].length-1,B,w,g=k,z=0,q=C[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(q.lastIndex=0,x=x.slice(-1*y.length+k);(C=q.exec(x))!=null;){if(B=C[1]||C[2]||C[3]||C[4]||C[5]||C[6],!B)continue;if(w=[...B].length,C[3]||C[4]){g+=w;continue}else if((C[5]||C[6])&&k%3&&!((k+w)%3)){z+=w;continue}if(g-=w,g>0)continue;w=Math.min(w,w+g+z);let j=[...C[0]][0].length,V=y.slice(0,k+C.index+j+w);if(Math.min(k,w)%2){let P=V.slice(1,-1);return{type:"em",raw:V,text:P,tokens:this.lexer.inlineTokens(P)}}let _=V.slice(2,-2);return{type:"strong",raw:V,text:_,tokens:this.lexer.inlineTokens(_)}}}}codespan(y){let x=this.rules.inline.code.exec(y);if(x){let h=x[2].replace(this.rules.other.newLineCharGlobal," "),C=this.rules.other.nonSpaceChar.test(h),k=this.rules.other.startingSpaceChar.test(h)&&this.rules.other.endingSpaceChar.test(h);return C&&k&&(h=h.substring(1,h.length-1)),{type:"codespan",raw:x[0],text:h}}}br(y){let x=this.rules.inline.br.exec(y);if(x)return{type:"br",raw:x[0]}}del(y){let x=this.rules.inline.del.exec(y);if(x)return{type:"del",raw:x[0],text:x[2],tokens:this.lexer.inlineTokens(x[2])}}autolink(y){let x=this.rules.inline.autolink.exec(y);if(x){let h,C;return x[2]==="@"?(h=x[1],C="mailto:"+h):(h=x[1],C=h),{type:"link",raw:x[0],text:h,href:C,tokens:[{type:"text",raw:h,text:h}]}}}url(y){let x;if(x=this.rules.inline.url.exec(y)){let h,C;if(x[2]==="@")h=x[0],C="mailto:"+h;else{let k;do k=x[0],x[0]=this.rules.inline._backpedal.exec(x[0])?.[0]??"";while(k!==x[0]);h=x[0],x[1]==="www."?C="http://"+x[0]:C=x[0]}return{type:"link",raw:x[0],text:h,href:C,tokens:[{type:"text",raw:h,text:h}]}}}inlineText(y){let x=this.rules.inline.text.exec(y);if(x){let h=this.lexer.state.inRawBlock;return{type:"text",raw:x[0],text:x[0],escaped:h}}}},F1=class y{tokens;options;state;tokenizer;inlineQueue;constructor(x){this.tokens=[],this.tokens.links=Object.create(null),this.options=x||_2,this.options.tokenizer=this.options.tokenizer||new D4,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let h={other:w1,block:Z4.normal,inline:Q0.normal};this.options.pedantic?(h.block=Z4.pedantic,h.inline=Q0.pedantic):this.options.gfm&&(h.block=Z4.gfm,this.options.breaks?h.inline=Q0.breaks:h.inline=Q0.gfm),this.tokenizer.rules=h}static get rules(){return{block:Z4,inline:Q0}}static lex(x,h){return new y(h).lex(x)}static lexInline(x,h){return new y(h).inlineTokens(x)}lex(x){x=x.replace(w1.carriageReturn,`
43
+ `),this.blockTokens(x,this.tokens);for(let h=0;h<this.inlineQueue.length;h++){let C=this.inlineQueue[h];this.inlineTokens(C.src,C.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(x,h=[],C=!1){for(this.options.pedantic&&(x=x.replace(w1.tabCharGlobal," ").replace(w1.spaceLine,""));x;){let k;if(this.options.extensions?.block?.some((w)=>(k=w.call({lexer:this},x,h))?(x=x.substring(k.raw.length),h.push(k),!0):!1))continue;if(k=this.tokenizer.space(x)){x=x.substring(k.raw.length);let w=h.at(-1);k.raw.length===1&&w!==void 0?w.raw+=`
44
+ `:h.push(k);continue}if(k=this.tokenizer.code(x)){x=x.substring(k.raw.length);let w=h.at(-1);w?.type==="paragraph"||w?.type==="text"?(w.raw+=(w.raw.endsWith(`
45
45
  `)?"":`
46
- `)+l.raw,k.text+=`
47
- `+l.text,this.inlineQueue.at(-1).src=k.text):h.push(l);continue}if(l=this.tokenizer.fences(x)){x=x.substring(l.raw.length),h.push(l);continue}if(l=this.tokenizer.heading(x)){x=x.substring(l.raw.length),h.push(l);continue}if(l=this.tokenizer.hr(x)){x=x.substring(l.raw.length),h.push(l);continue}if(l=this.tokenizer.blockquote(x)){x=x.substring(l.raw.length),h.push(l);continue}if(l=this.tokenizer.list(x)){x=x.substring(l.raw.length),h.push(l);continue}if(l=this.tokenizer.html(x)){x=x.substring(l.raw.length),h.push(l);continue}if(l=this.tokenizer.def(x)){x=x.substring(l.raw.length);let k=h.at(-1);k?.type==="paragraph"||k?.type==="text"?(k.raw+=(k.raw.endsWith(`
46
+ `)+k.raw,w.text+=`
47
+ `+k.text,this.inlineQueue.at(-1).src=w.text):h.push(k);continue}if(k=this.tokenizer.fences(x)){x=x.substring(k.raw.length),h.push(k);continue}if(k=this.tokenizer.heading(x)){x=x.substring(k.raw.length),h.push(k);continue}if(k=this.tokenizer.hr(x)){x=x.substring(k.raw.length),h.push(k);continue}if(k=this.tokenizer.blockquote(x)){x=x.substring(k.raw.length),h.push(k);continue}if(k=this.tokenizer.list(x)){x=x.substring(k.raw.length),h.push(k);continue}if(k=this.tokenizer.html(x)){x=x.substring(k.raw.length),h.push(k);continue}if(k=this.tokenizer.def(x)){x=x.substring(k.raw.length);let w=h.at(-1);w?.type==="paragraph"||w?.type==="text"?(w.raw+=(w.raw.endsWith(`
48
48
  `)?"":`
49
- `)+l.raw,k.text+=`
50
- `+l.raw,this.inlineQueue.at(-1).src=k.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},h.push(l));continue}if(l=this.tokenizer.table(x)){x=x.substring(l.raw.length),h.push(l);continue}if(l=this.tokenizer.lheading(x)){x=x.substring(l.raw.length),h.push(l);continue}let i=x;if(this.options.extensions?.startBlock){let k=1/0,g=x.slice(1),w;this.options.extensions.startBlock.forEach((B)=>{w=B.call({lexer:this},g),typeof w=="number"&&w>=0&&(k=Math.min(k,w))}),k<1/0&&k>=0&&(i=x.substring(0,k+1))}if(this.state.top&&(l=this.tokenizer.paragraph(i))){let k=h.at(-1);C&&k?.type==="paragraph"?(k.raw+=(k.raw.endsWith(`
49
+ `)+k.raw,w.text+=`
50
+ `+k.raw,this.inlineQueue.at(-1).src=w.text):this.tokens.links[k.tag]||(this.tokens.links[k.tag]={href:k.href,title:k.title},h.push(k));continue}if(k=this.tokenizer.table(x)){x=x.substring(k.raw.length),h.push(k);continue}if(k=this.tokenizer.lheading(x)){x=x.substring(k.raw.length),h.push(k);continue}let B=x;if(this.options.extensions?.startBlock){let w=1/0,g=x.slice(1),z;this.options.extensions.startBlock.forEach((q)=>{z=q.call({lexer:this},g),typeof z=="number"&&z>=0&&(w=Math.min(w,z))}),w<1/0&&w>=0&&(B=x.substring(0,w+1))}if(this.state.top&&(k=this.tokenizer.paragraph(B))){let w=h.at(-1);C&&w?.type==="paragraph"?(w.raw+=(w.raw.endsWith(`
51
51
  `)?"":`
52
- `)+l.raw,k.text+=`
53
- `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=k.text):h.push(l),C=i.length!==x.length,x=x.substring(l.raw.length);continue}if(l=this.tokenizer.text(x)){x=x.substring(l.raw.length);let k=h.at(-1);k?.type==="text"?(k.raw+=(k.raw.endsWith(`
52
+ `)+k.raw,w.text+=`
53
+ `+k.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=w.text):h.push(k),C=B.length!==x.length,x=x.substring(k.raw.length);continue}if(k=this.tokenizer.text(x)){x=x.substring(k.raw.length);let w=h.at(-1);w?.type==="text"?(w.raw+=(w.raw.endsWith(`
54
54
  `)?"":`
55
- `)+l.raw,k.text+=`
56
- `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=k.text):h.push(l);continue}if(x){let k="Infinite loop on byte: "+x.charCodeAt(0);if(this.options.silent){console.error(k);break}else throw Error(k)}}return this.state.top=!0,h}inline(x,h=[]){return this.inlineQueue.push({src:x,tokens:h}),h}inlineTokens(x,h=[]){let C=x,l=null;if(this.tokens.links){let w=Object.keys(this.tokens.links);if(w.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(C))!=null;)w.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(C=C.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+C.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(C))!=null;)C=C.slice(0,l.index)+"++"+C.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(l=this.tokenizer.rules.inline.blockSkip.exec(C))!=null;)i=l[2]?l[2].length:0,C=C.slice(0,l.index+i)+"["+"a".repeat(l[0].length-i-2)+"]"+C.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);C=this.options.hooks?.emStrongMask?.call({lexer:this},C)??C;let k=!1,g="";for(;x;){k||(g=""),k=!1;let w;if(this.options.extensions?.inline?.some((q)=>(w=q.call({lexer:this},x,h))?(x=x.substring(w.raw.length),h.push(w),!0):!1))continue;if(w=this.tokenizer.escape(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.tag(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.link(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.reflink(x,this.tokens.links)){x=x.substring(w.raw.length);let q=h.at(-1);w.type==="text"&&q?.type==="text"?(q.raw+=w.raw,q.text+=w.text):h.push(w);continue}if(w=this.tokenizer.emStrong(x,C,g)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.codespan(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.br(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.del(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.autolink(x)){x=x.substring(w.raw.length),h.push(w);continue}if(!this.state.inLink&&(w=this.tokenizer.url(x))){x=x.substring(w.raw.length),h.push(w);continue}let B=x;if(this.options.extensions?.startInline){let q=1/0,j=x.slice(1),_;this.options.extensions.startInline.forEach((K)=>{_=K.call({lexer:this},j),typeof _=="number"&&_>=0&&(q=Math.min(q,_))}),q<1/0&&q>=0&&(B=x.substring(0,q+1))}if(w=this.tokenizer.inlineText(B)){x=x.substring(w.raw.length),w.raw.slice(-1)!=="_"&&(g=w.raw.slice(-1)),k=!0;let q=h.at(-1);q?.type==="text"?(q.raw+=w.raw,q.text+=w.text):h.push(w);continue}if(x){let q="Infinite loop on byte: "+x.charCodeAt(0);if(this.options.silent){console.error(q);break}else throw Error(q)}}return h}},S2=class{options;parser;constructor(y){this.options=y||A2}space(y){return""}code({text:y,lang:x,escaped:h}){let C=(x||"").match(i1.notSpaceStart)?.[0],l=y.replace(i1.endingNewline,"")+`
57
- `;return C?'<pre><code class="language-'+I1(C)+'">'+(h?l:I1(l,!0))+`</code></pre>
58
- `:"<pre><code>"+(h?l:I1(l,!0))+`</code></pre>
55
+ `)+k.raw,w.text+=`
56
+ `+k.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=w.text):h.push(k);continue}if(x){let w="Infinite loop on byte: "+x.charCodeAt(0);if(this.options.silent){console.error(w);break}else throw Error(w)}}return this.state.top=!0,h}inline(x,h=[]){return this.inlineQueue.push({src:x,tokens:h}),h}inlineTokens(x,h=[]){let C=x,k=null;if(this.tokens.links){let z=Object.keys(this.tokens.links);if(z.length>0)for(;(k=this.tokenizer.rules.inline.reflinkSearch.exec(C))!=null;)z.includes(k[0].slice(k[0].lastIndexOf("[")+1,-1))&&(C=C.slice(0,k.index)+"["+"a".repeat(k[0].length-2)+"]"+C.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(k=this.tokenizer.rules.inline.anyPunctuation.exec(C))!=null;)C=C.slice(0,k.index)+"++"+C.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let B;for(;(k=this.tokenizer.rules.inline.blockSkip.exec(C))!=null;)B=k[2]?k[2].length:0,C=C.slice(0,k.index+B)+"["+"a".repeat(k[0].length-B-2)+"]"+C.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);C=this.options.hooks?.emStrongMask?.call({lexer:this},C)??C;let w=!1,g="";for(;x;){w||(g=""),w=!1;let z;if(this.options.extensions?.inline?.some((j)=>(z=j.call({lexer:this},x,h))?(x=x.substring(z.raw.length),h.push(z),!0):!1))continue;if(z=this.tokenizer.escape(x)){x=x.substring(z.raw.length),h.push(z);continue}if(z=this.tokenizer.tag(x)){x=x.substring(z.raw.length),h.push(z);continue}if(z=this.tokenizer.link(x)){x=x.substring(z.raw.length),h.push(z);continue}if(z=this.tokenizer.reflink(x,this.tokens.links)){x=x.substring(z.raw.length);let j=h.at(-1);z.type==="text"&&j?.type==="text"?(j.raw+=z.raw,j.text+=z.text):h.push(z);continue}if(z=this.tokenizer.emStrong(x,C,g)){x=x.substring(z.raw.length),h.push(z);continue}if(z=this.tokenizer.codespan(x)){x=x.substring(z.raw.length),h.push(z);continue}if(z=this.tokenizer.br(x)){x=x.substring(z.raw.length),h.push(z);continue}if(z=this.tokenizer.del(x)){x=x.substring(z.raw.length),h.push(z);continue}if(z=this.tokenizer.autolink(x)){x=x.substring(z.raw.length),h.push(z);continue}if(!this.state.inLink&&(z=this.tokenizer.url(x))){x=x.substring(z.raw.length),h.push(z);continue}let q=x;if(this.options.extensions?.startInline){let j=1/0,V=x.slice(1),_;this.options.extensions.startInline.forEach((P)=>{_=P.call({lexer:this},V),typeof _=="number"&&_>=0&&(j=Math.min(j,_))}),j<1/0&&j>=0&&(q=x.substring(0,j+1))}if(z=this.tokenizer.inlineText(q)){x=x.substring(z.raw.length),z.raw.slice(-1)!=="_"&&(g=z.raw.slice(-1)),w=!0;let j=h.at(-1);j?.type==="text"?(j.raw+=z.raw,j.text+=z.text):h.push(z);continue}if(x){let j="Infinite loop on byte: "+x.charCodeAt(0);if(this.options.silent){console.error(j);break}else throw Error(j)}}return h}},T2=class{options;parser;constructor(y){this.options=y||_2}space(y){return""}code({text:y,lang:x,escaped:h}){let C=(x||"").match(w1.notSpaceStart)?.[0],k=y.replace(w1.endingNewline,"")+`
57
+ `;return C?'<pre><code class="language-'+T1(C)+'">'+(h?k:T1(k,!0))+`</code></pre>
58
+ `:"<pre><code>"+(h?k:T1(k,!0))+`</code></pre>
59
59
  `}blockquote({tokens:y}){return`<blockquote>
60
60
  ${this.parser.parse(y)}</blockquote>
61
61
  `}html({text:y}){return y}def(y){return""}heading({tokens:y,depth:x}){return`<h${x}>${this.parser.parseInline(y)}</h${x}>
62
62
  `}hr(y){return`<hr>
63
- `}list(y){let{ordered:x,start:h}=y,C="";for(let k=0;k<y.items.length;k++){let g=y.items[k];C+=this.listitem(g)}let l=x?"ol":"ul",i=x&&h!==1?' start="'+h+'"':"";return"<"+l+i+`>
64
- `+C+"</"+l+`>
65
- `}listitem(y){let x="";if(y.task){let h=this.checkbox({checked:!!y.checked});y.loose?y.tokens[0]?.type==="paragraph"?(y.tokens[0].text=h+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=h+" "+I1(y.tokens[0].tokens[0].text),y.tokens[0].tokens[0].escaped=!0)):y.tokens.unshift({type:"text",raw:h+" ",text:h+" ",escaped:!0}):x+=h+" "}return x+=this.parser.parse(y.tokens,!!y.loose),`<li>${x}</li>
63
+ `}list(y){let{ordered:x,start:h}=y,C="";for(let w=0;w<y.items.length;w++){let g=y.items[w];C+=this.listitem(g)}let k=x?"ol":"ul",B=x&&h!==1?' start="'+h+'"':"";return"<"+k+B+`>
64
+ `+C+"</"+k+`>
65
+ `}listitem(y){let x="";if(y.task){let h=this.checkbox({checked:!!y.checked});y.loose?y.tokens[0]?.type==="paragraph"?(y.tokens[0].text=h+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=h+" "+T1(y.tokens[0].tokens[0].text),y.tokens[0].tokens[0].escaped=!0)):y.tokens.unshift({type:"text",raw:h+" ",text:h+" ",escaped:!0}):x+=h+" "}return x+=this.parser.parse(y.tokens,!!y.loose),`<li>${x}</li>
66
66
  `}checkbox({checked:y}){return"<input "+(y?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:y}){return`<p>${this.parser.parseInline(y)}</p>
67
- `}table(y){let x="",h="";for(let l=0;l<y.header.length;l++)h+=this.tablecell(y.header[l]);x+=this.tablerow({text:h});let C="";for(let l=0;l<y.rows.length;l++){let i=y.rows[l];h="";for(let k=0;k<i.length;k++)h+=this.tablecell(i[k]);C+=this.tablerow({text:h})}return C&&(C=`<tbody>${C}</tbody>`),`<table>
67
+ `}table(y){let x="",h="";for(let k=0;k<y.header.length;k++)h+=this.tablecell(y.header[k]);x+=this.tablerow({text:h});let C="";for(let k=0;k<y.rows.length;k++){let B=y.rows[k];h="";for(let w=0;w<B.length;w++)h+=this.tablecell(B[w]);C+=this.tablerow({text:h})}return C&&(C=`<tbody>${C}</tbody>`),`<table>
68
68
  <thead>
69
69
  `+x+`</thead>
70
70
  `+C+`</table>
71
71
  `}tablerow({text:y}){return`<tr>
72
72
  ${y}</tr>
73
73
  `}tablecell(y){let x=this.parser.parseInline(y.tokens),h=y.header?"th":"td";return(y.align?`<${h} align="${y.align}">`:`<${h}>`)+x+`</${h}>
74
- `}strong({tokens:y}){return`<strong>${this.parser.parseInline(y)}</strong>`}em({tokens:y}){return`<em>${this.parser.parseInline(y)}</em>`}codespan({text:y}){return`<code>${I1(y,!0)}</code>`}br(y){return"<br>"}del({tokens:y}){return`<del>${this.parser.parseInline(y)}</del>`}link({href:y,title:x,tokens:h}){let C=this.parser.parseInline(h),l=l7(y);if(l===null)return C;y=l;let i='<a href="'+y+'"';return x&&(i+=' title="'+I1(x)+'"'),i+=">"+C+"</a>",i}image({href:y,title:x,text:h,tokens:C}){C&&(h=this.parser.parseInline(C,this.parser.textRenderer));let l=l7(y);if(l===null)return I1(h);y=l;let i=`<img src="${y}" alt="${h}"`;return x&&(i+=` title="${I1(x)}"`),i+=">",i}text(y){return"tokens"in y&&y.tokens?this.parser.parseInline(y.tokens):("escaped"in y)&&y.escaped?y.text:I1(y.text)}},s3=class{strong({text:y}){return y}em({text:y}){return y}codespan({text:y}){return y}del({text:y}){return y}html({text:y}){return y}text({text:y}){return y}link({text:y}){return""+y}image({text:y}){return""+y}br(){return""}},$1=class y{options;renderer;textRenderer;constructor(x){this.options=x||A2,this.options.renderer=this.options.renderer||new S2,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new s3}static parse(x,h){return new y(h).parse(x)}static parseInline(x,h){return new y(h).parseInline(x)}parse(x,h=!0){let C="";for(let l=0;l<x.length;l++){let i=x[l];if(this.options.extensions?.renderers?.[i.type]){let g=i,w=this.options.extensions.renderers[g.type].call({parser:this},g);if(w!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(g.type)){C+=w||"";continue}}let k=i;switch(k.type){case"space":{C+=this.renderer.space(k);continue}case"hr":{C+=this.renderer.hr(k);continue}case"heading":{C+=this.renderer.heading(k);continue}case"code":{C+=this.renderer.code(k);continue}case"table":{C+=this.renderer.table(k);continue}case"blockquote":{C+=this.renderer.blockquote(k);continue}case"list":{C+=this.renderer.list(k);continue}case"html":{C+=this.renderer.html(k);continue}case"def":{C+=this.renderer.def(k);continue}case"paragraph":{C+=this.renderer.paragraph(k);continue}case"text":{let g=k,w=this.renderer.text(g);for(;l+1<x.length&&x[l+1].type==="text";)g=x[++l],w+=`
75
- `+this.renderer.text(g);h?C+=this.renderer.paragraph({type:"paragraph",raw:w,text:w,tokens:[{type:"text",raw:w,text:w,escaped:!0}]}):C+=w;continue}default:{let g='Token with "'+k.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw Error(g)}}}return C}parseInline(x,h=this.renderer){let C="";for(let l=0;l<x.length;l++){let i=x[l];if(this.options.extensions?.renderers?.[i.type]){let g=this.options.extensions.renderers[i.type].call({parser:this},i);if(g!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){C+=g||"";continue}}let k=i;switch(k.type){case"escape":{C+=h.text(k);break}case"html":{C+=h.html(k);break}case"link":{C+=h.link(k);break}case"image":{C+=h.image(k);break}case"strong":{C+=h.strong(k);break}case"em":{C+=h.em(k);break}case"codespan":{C+=h.codespan(k);break}case"br":{C+=h.br(k);break}case"del":{C+=h.del(k);break}case"text":{C+=h.text(k);break}default:{let g='Token with "'+k.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw Error(g)}}}return C}},F0=class{options;block;constructor(y){this.options=y||A2}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(y){return y}postprocess(y){return y}processAllTokens(y){return y}emStrongMask(y){return y}provideLexer(){return this.block?X1.lex:X1.lexInline}provideParser(){return this.block?$1.parse:$1.parseInline}},R4=class{defaults=R3();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=$1;Renderer=S2;TextRenderer=s3;Lexer=X1;Tokenizer=Z4;Hooks=F0;constructor(...y){this.use(...y)}walkTokens(y,x){let h=[];for(let C of y)switch(h=h.concat(x.call(this,C)),C.type){case"table":{let l=C;for(let i of l.header)h=h.concat(this.walkTokens(i.tokens,x));for(let i of l.rows)for(let k of i)h=h.concat(this.walkTokens(k.tokens,x));break}case"list":{let l=C;h=h.concat(this.walkTokens(l.items,x));break}default:{let l=C;this.defaults.extensions?.childTokens?.[l.type]?this.defaults.extensions.childTokens[l.type].forEach((i)=>{let k=l[i].flat(1/0);h=h.concat(this.walkTokens(k,x))}):l.tokens&&(h=h.concat(this.walkTokens(l.tokens,x)))}}return h}use(...y){let x=this.defaults.extensions||{renderers:{},childTokens:{}};return y.forEach((h)=>{let C={...h};if(C.async=this.defaults.async||C.async||!1,h.extensions&&(h.extensions.forEach((l)=>{if(!l.name)throw Error("extension name required");if("renderer"in l){let i=x.renderers[l.name];i?x.renderers[l.name]=function(...k){let g=l.renderer.apply(this,k);return g===!1&&(g=i.apply(this,k)),g}:x.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let i=x[l.level];i?i.unshift(l.tokenizer):x[l.level]=[l.tokenizer],l.start&&(l.level==="block"?x.startBlock?x.startBlock.push(l.start):x.startBlock=[l.start]:l.level==="inline"&&(x.startInline?x.startInline.push(l.start):x.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(x.childTokens[l.name]=l.childTokens)}),C.extensions=x),h.renderer){let l=this.defaults.renderer||new S2(this.defaults);for(let i in h.renderer){if(!(i in l))throw Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let k=i,g=h.renderer[k],w=l[k];l[k]=(...B)=>{let q=g.apply(l,B);return q===!1&&(q=w.apply(l,B)),q||""}}C.renderer=l}if(h.tokenizer){let l=this.defaults.tokenizer||new Z4(this.defaults);for(let i in h.tokenizer){if(!(i in l))throw Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let k=i,g=h.tokenizer[k],w=l[k];l[k]=(...B)=>{let q=g.apply(l,B);return q===!1&&(q=w.apply(l,B)),q}}C.tokenizer=l}if(h.hooks){let l=this.defaults.hooks||new F0;for(let i in h.hooks){if(!(i in l))throw Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let k=i,g=h.hooks[k],w=l[k];F0.passThroughHooks.has(i)?l[k]=(B)=>{if(this.defaults.async&&F0.passThroughHooksRespectAsync.has(i))return(async()=>{let j=await g.call(l,B);return w.call(l,j)})();let q=g.call(l,B);return w.call(l,q)}:l[k]=(...B)=>{if(this.defaults.async)return(async()=>{let j=await g.apply(l,B);return j===!1&&(j=await w.apply(l,B)),j})();let q=g.apply(l,B);return q===!1&&(q=w.apply(l,B)),q}}C.hooks=l}if(h.walkTokens){let l=this.defaults.walkTokens,i=h.walkTokens;C.walkTokens=function(k){let g=[];return g.push(i.call(this,k)),l&&(g=g.concat(l.call(this,k))),g}}this.defaults={...this.defaults,...C}}),this}setOptions(y){return this.defaults={...this.defaults,...y},this}lexer(y,x){return X1.lex(y,x??this.defaults)}parser(y,x){return $1.parse(y,x??this.defaults)}parseMarkdown(y){return(x,h)=>{let C={...h},l={...this.defaults,...C},i=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&C.async===!1)return i(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof x>"u"||x===null)return i(Error("marked(): input parameter is undefined or null"));if(typeof x!="string")return i(Error("marked(): input parameter is of type "+Object.prototype.toString.call(x)+", string expected"));if(l.hooks&&(l.hooks.options=l,l.hooks.block=y),l.async)return(async()=>{let k=l.hooks?await l.hooks.preprocess(x):x,g=await(l.hooks?await l.hooks.provideLexer():y?X1.lex:X1.lexInline)(k,l),w=l.hooks?await l.hooks.processAllTokens(g):g;l.walkTokens&&await Promise.all(this.walkTokens(w,l.walkTokens));let B=await(l.hooks?await l.hooks.provideParser():y?$1.parse:$1.parseInline)(w,l);return l.hooks?await l.hooks.postprocess(B):B})().catch(i);try{l.hooks&&(x=l.hooks.preprocess(x));let k=(l.hooks?l.hooks.provideLexer():y?X1.lex:X1.lexInline)(x,l);l.hooks&&(k=l.hooks.processAllTokens(k)),l.walkTokens&&this.walkTokens(k,l.walkTokens);let g=(l.hooks?l.hooks.provideParser():y?$1.parse:$1.parseInline)(k,l);return l.hooks&&(g=l.hooks.postprocess(g)),g}catch(k){return i(k)}}}onError(y,x){return(h)=>{if(h.message+=`
76
- Please report this to https://github.com/markedjs/marked.`,y){let C="<p>An error occurred:</p><pre>"+I1(h.message+"",!0)+"</pre>";return x?Promise.resolve(C):C}if(x)return Promise.reject(h);throw h}}},_2=new R4;function R(y,x){return _2.parse(y,x)}R.options=R.setOptions=function(y){return _2.setOptions(y),R.defaults=_2.defaults,g7(R.defaults),R};R.getDefaults=R3;R.defaults=A2;R.use=function(...y){return _2.use(...y),R.defaults=_2.defaults,g7(R.defaults),R};R.walkTokens=function(y,x){return _2.walkTokens(y,x)};R.parseInline=_2.parseInline;R.Parser=$1;R.parser=$1.parse;R.Renderer=S2;R.TextRenderer=s3;R.Lexer=X1;R.lexer=X1.lex;R.Tokenizer=Z4;R.Hooks=F0;R.parse=R;var{options:ew,setOptions:yB,use:xB,walkTokens:hB,parseInline:CB}=R;var lB=$1.parse,iB=X1.lex;var $l=new S2,L3,r3=new R4;r3.use({renderer:{code(y){let x=String(y.lang||""),h=x.match(/^[a-z]+/)?.[0]??"",C=x.match(/#([A-Za-z0-9_-]+)/)?.[1]??"",l=x.match(/:([a-z]+)/)?.[1]??"",i=L3?.get(y.text);if(!C&&!l&&!i)return!1;let k=$l.code({...y,lang:h}),g=[C&&`data-example-id="${C}"`,l&&`data-example-mode="${l}"`].filter(Boolean).join(" ");if(g)k=k.replace(/^<pre>/,`<pre ${g}>`);if(i){let w=JSON.stringify(i.js).replace(/</g,"\\u003c");k+=`<script type="application/tosi-transpiled" data-dialect="${i.dialect}">${w}</script>`}return k}}});function T3(y){return y.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Yl(y){return y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Nl=new R4,d3=new Map,M2=[];r3.use({hooks:{preprocess(y){return d3=new Map,M2=[],y},postprocess(y){if(M2.length===0)return y;let x=M2.map((h)=>{let C=Nl.parseInline(d3.get(h)??""),l=T3(h);return`<li id="fn-${l}"><p>${C} <a href="#fnref-${l}" class="footnote-backref" aria-label="Back to reference">↩</a></p></li>`}).join(`
74
+ `}strong({tokens:y}){return`<strong>${this.parser.parseInline(y)}</strong>`}em({tokens:y}){return`<em>${this.parser.parseInline(y)}</em>`}codespan({text:y}){return`<code>${T1(y,!0)}</code>`}br(y){return"<br>"}del({tokens:y}){return`<del>${this.parser.parseInline(y)}</del>`}link({href:y,title:x,tokens:h}){let C=this.parser.parseInline(h),k=l7(y);if(k===null)return C;y=k;let B='<a href="'+y+'"';return x&&(B+=' title="'+T1(x)+'"'),B+=">"+C+"</a>",B}image({href:y,title:x,text:h,tokens:C}){C&&(h=this.parser.parseInline(C,this.parser.textRenderer));let k=l7(y);if(k===null)return T1(h);y=k;let B=`<img src="${y}" alt="${h}"`;return x&&(B+=` title="${T1(x)}"`),B+=">",B}text(y){return"tokens"in y&&y.tokens?this.parser.parseInline(y.tokens):("escaped"in y)&&y.escaped?y.text:T1(y.text)}},u3=class{strong({text:y}){return y}em({text:y}){return y}codespan({text:y}){return y}del({text:y}){return y}html({text:y}){return y}text({text:y}){return y}link({text:y}){return""+y}image({text:y}){return""+y}br(){return""}},N1=class y{options;renderer;textRenderer;constructor(x){this.options=x||_2,this.options.renderer=this.options.renderer||new T2,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new u3}static parse(x,h){return new y(h).parse(x)}static parseInline(x,h){return new y(h).parseInline(x)}parse(x,h=!0){let C="";for(let k=0;k<x.length;k++){let B=x[k];if(this.options.extensions?.renderers?.[B.type]){let g=B,z=this.options.extensions.renderers[g.type].call({parser:this},g);if(z!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(g.type)){C+=z||"";continue}}let w=B;switch(w.type){case"space":{C+=this.renderer.space(w);continue}case"hr":{C+=this.renderer.hr(w);continue}case"heading":{C+=this.renderer.heading(w);continue}case"code":{C+=this.renderer.code(w);continue}case"table":{C+=this.renderer.table(w);continue}case"blockquote":{C+=this.renderer.blockquote(w);continue}case"list":{C+=this.renderer.list(w);continue}case"html":{C+=this.renderer.html(w);continue}case"def":{C+=this.renderer.def(w);continue}case"paragraph":{C+=this.renderer.paragraph(w);continue}case"text":{let g=w,z=this.renderer.text(g);for(;k+1<x.length&&x[k+1].type==="text";)g=x[++k],z+=`
75
+ `+this.renderer.text(g);h?C+=this.renderer.paragraph({type:"paragraph",raw:z,text:z,tokens:[{type:"text",raw:z,text:z,escaped:!0}]}):C+=z;continue}default:{let g='Token with "'+w.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw Error(g)}}}return C}parseInline(x,h=this.renderer){let C="";for(let k=0;k<x.length;k++){let B=x[k];if(this.options.extensions?.renderers?.[B.type]){let g=this.options.extensions.renderers[B.type].call({parser:this},B);if(g!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(B.type)){C+=g||"";continue}}let w=B;switch(w.type){case"escape":{C+=h.text(w);break}case"html":{C+=h.html(w);break}case"link":{C+=h.link(w);break}case"image":{C+=h.image(w);break}case"strong":{C+=h.strong(w);break}case"em":{C+=h.em(w);break}case"codespan":{C+=h.codespan(w);break}case"br":{C+=h.br(w);break}case"del":{C+=h.del(w);break}case"text":{C+=h.text(w);break}default:{let g='Token with "'+w.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw Error(g)}}}return C}},Y0=class{options;block;constructor(y){this.options=y||_2}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(y){return y}postprocess(y){return y}processAllTokens(y){return y}emStrongMask(y){return y}provideLexer(){return this.block?F1.lex:F1.lexInline}provideParser(){return this.block?N1.parse:N1.parseInline}},M4=class{defaults=b3();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=N1;Renderer=T2;TextRenderer=u3;Lexer=F1;Tokenizer=D4;Hooks=Y0;constructor(...y){this.use(...y)}walkTokens(y,x){let h=[];for(let C of y)switch(h=h.concat(x.call(this,C)),C.type){case"table":{let k=C;for(let B of k.header)h=h.concat(this.walkTokens(B.tokens,x));for(let B of k.rows)for(let w of B)h=h.concat(this.walkTokens(w.tokens,x));break}case"list":{let k=C;h=h.concat(this.walkTokens(k.items,x));break}default:{let k=C;this.defaults.extensions?.childTokens?.[k.type]?this.defaults.extensions.childTokens[k.type].forEach((B)=>{let w=k[B].flat(1/0);h=h.concat(this.walkTokens(w,x))}):k.tokens&&(h=h.concat(this.walkTokens(k.tokens,x)))}}return h}use(...y){let x=this.defaults.extensions||{renderers:{},childTokens:{}};return y.forEach((h)=>{let C={...h};if(C.async=this.defaults.async||C.async||!1,h.extensions&&(h.extensions.forEach((k)=>{if(!k.name)throw Error("extension name required");if("renderer"in k){let B=x.renderers[k.name];B?x.renderers[k.name]=function(...w){let g=k.renderer.apply(this,w);return g===!1&&(g=B.apply(this,w)),g}:x.renderers[k.name]=k.renderer}if("tokenizer"in k){if(!k.level||k.level!=="block"&&k.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let B=x[k.level];B?B.unshift(k.tokenizer):x[k.level]=[k.tokenizer],k.start&&(k.level==="block"?x.startBlock?x.startBlock.push(k.start):x.startBlock=[k.start]:k.level==="inline"&&(x.startInline?x.startInline.push(k.start):x.startInline=[k.start]))}"childTokens"in k&&k.childTokens&&(x.childTokens[k.name]=k.childTokens)}),C.extensions=x),h.renderer){let k=this.defaults.renderer||new T2(this.defaults);for(let B in h.renderer){if(!(B in k))throw Error(`renderer '${B}' does not exist`);if(["options","parser"].includes(B))continue;let w=B,g=h.renderer[w],z=k[w];k[w]=(...q)=>{let j=g.apply(k,q);return j===!1&&(j=z.apply(k,q)),j||""}}C.renderer=k}if(h.tokenizer){let k=this.defaults.tokenizer||new D4(this.defaults);for(let B in h.tokenizer){if(!(B in k))throw Error(`tokenizer '${B}' does not exist`);if(["options","rules","lexer"].includes(B))continue;let w=B,g=h.tokenizer[w],z=k[w];k[w]=(...q)=>{let j=g.apply(k,q);return j===!1&&(j=z.apply(k,q)),j}}C.tokenizer=k}if(h.hooks){let k=this.defaults.hooks||new Y0;for(let B in h.hooks){if(!(B in k))throw Error(`hook '${B}' does not exist`);if(["options","block"].includes(B))continue;let w=B,g=h.hooks[w],z=k[w];Y0.passThroughHooks.has(B)?k[w]=(q)=>{if(this.defaults.async&&Y0.passThroughHooksRespectAsync.has(B))return(async()=>{let V=await g.call(k,q);return z.call(k,V)})();let j=g.call(k,q);return z.call(k,j)}:k[w]=(...q)=>{if(this.defaults.async)return(async()=>{let V=await g.apply(k,q);return V===!1&&(V=await z.apply(k,q)),V})();let j=g.apply(k,q);return j===!1&&(j=z.apply(k,q)),j}}C.hooks=k}if(h.walkTokens){let k=this.defaults.walkTokens,B=h.walkTokens;C.walkTokens=function(w){let g=[];return g.push(B.call(this,w)),k&&(g=g.concat(k.call(this,w))),g}}this.defaults={...this.defaults,...C}}),this}setOptions(y){return this.defaults={...this.defaults,...y},this}lexer(y,x){return F1.lex(y,x??this.defaults)}parser(y,x){return N1.parse(y,x??this.defaults)}parseMarkdown(y){return(x,h)=>{let C={...h},k={...this.defaults,...C},B=this.onError(!!k.silent,!!k.async);if(this.defaults.async===!0&&C.async===!1)return B(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof x>"u"||x===null)return B(Error("marked(): input parameter is undefined or null"));if(typeof x!="string")return B(Error("marked(): input parameter is of type "+Object.prototype.toString.call(x)+", string expected"));if(k.hooks&&(k.hooks.options=k,k.hooks.block=y),k.async)return(async()=>{let w=k.hooks?await k.hooks.preprocess(x):x,g=await(k.hooks?await k.hooks.provideLexer():y?F1.lex:F1.lexInline)(w,k),z=k.hooks?await k.hooks.processAllTokens(g):g;k.walkTokens&&await Promise.all(this.walkTokens(z,k.walkTokens));let q=await(k.hooks?await k.hooks.provideParser():y?N1.parse:N1.parseInline)(z,k);return k.hooks?await k.hooks.postprocess(q):q})().catch(B);try{k.hooks&&(x=k.hooks.preprocess(x));let w=(k.hooks?k.hooks.provideLexer():y?F1.lex:F1.lexInline)(x,k);k.hooks&&(w=k.hooks.processAllTokens(w)),k.walkTokens&&this.walkTokens(w,k.walkTokens);let g=(k.hooks?k.hooks.provideParser():y?N1.parse:N1.parseInline)(w,k);return k.hooks&&(g=k.hooks.postprocess(g)),g}catch(w){return B(w)}}}onError(y,x){return(h)=>{if(h.message+=`
76
+ Please report this to https://github.com/markedjs/marked.`,y){let C="<p>An error occurred:</p><pre>"+T1(h.message+"",!0)+"</pre>";return x?Promise.resolve(C):C}if(x)return Promise.reject(h);throw h}}},A2=new M4;function v(y,x){return A2.parse(y,x)}v.options=v.setOptions=function(y){return A2.setOptions(y),v.defaults=A2.defaults,X7(v.defaults),v};v.getDefaults=b3;v.defaults=_2;v.use=function(...y){return A2.use(...y),v.defaults=A2.defaults,X7(v.defaults),v};v.walkTokens=function(y,x){return A2.walkTokens(y,x)};v.parseInline=A2.parseInline;v.Parser=N1;v.parser=N1.parse;v.Renderer=T2;v.TextRenderer=u3;v.Lexer=F1;v.lexer=F1.lex;v.Tokenizer=D4;v.Hooks=Y0;v.parse=v;var{options:_q,setOptions:Kq,use:Pq,walkTokens:Uq,parseInline:Gq}=v;var Qq=N1.parse,$q=F1.lex;var Mk=new T2,n3,E3=new M4;E3.use({renderer:{code(y){let x=String(y.lang||""),h=x.match(/^[a-z]+/)?.[0]??"",C=x.match(/#([A-Za-z0-9_-]+)/)?.[1]??"",k=x.match(/:([a-z]+)/)?.[1]??"",B=n3?.get(y.text);if(!C&&!k&&!B)return!1;let w=Mk.code({...y,lang:h}),g=[C&&`data-example-id="${C}"`,k&&`data-example-mode="${k}"`].filter(Boolean).join(" ");if(g)w=w.replace(/^<pre>/,`<pre ${g}>`);if(B){let z=JSON.stringify(B.js).replace(/</g,"\\u003c");w+=`<script type="application/tosi-transpiled" data-dialect="${B.dialect}">${z}</script>`}return w}}});function r3(y){return y.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Sk(y){return y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Ik=new M4,m3=new Map,p2=[];E3.use({hooks:{preprocess(y){return m3=new Map,p2=[],y},postprocess(y){if(p2.length===0)return y;let x=p2.map((h)=>{let C=Ik.parseInline(m3.get(h)??""),k=r3(h);return`<li id="fn-${k}"><p>${C} <a href="#fnref-${k}" class="footnote-backref" aria-label="Back to reference">↩</a></p></li>`}).join(`
77
77
  `);return`${y}
78
78
  <section class="footnotes" role="doc-endnotes">
79
79
  <hr />
@@ -81,7 +81,7 @@ Please report this to https://github.com/markedjs/marked.`,y){let C="<p>An error
81
81
  ${x}
82
82
  </ol>
83
83
  </section>
84
- `}},extensions:[{name:"wikilink",level:"inline",start(y){return y.match(/\[\[/)?.index},tokenizer(y){let x=/^\[\[([^\]|]+?)(?:\|([^\]]+?))?\]\]/.exec(y);if(!x)return;return{type:"wikilink",raw:x[0],target:x[1].trim(),label:(x[2]??x[1]).trim()}},renderer(y){return`<a href="/${T3(y.target)}/" class="wikilink">${Yl(y.label)}</a>`}},{name:"footnoteDef",level:"block",start(y){return y.match(/^\[\^[^\]]+\]:/m)?.index},tokenizer(y){let x=/^\[\^([^\]]+)\]:[ \t]*([^\n]*)(?:\n|$)/.exec(y);if(!x)return;return d3.set(x[1].trim(),x[2].trim()),{type:"footnoteDef",raw:x[0]}},renderer(){return""}},{name:"footnoteRef",level:"inline",start(y){return y.match(/\[\^/)?.index},tokenizer(y){let x=/^\[\^([^\]]+)\]/.exec(y);if(!x)return;let h=x[1].trim();if(!M2.includes(h))M2.push(h);return{type:"footnoteRef",raw:x[0],id:h}},renderer(y){let x=M2.indexOf(y.id)+1,h=T3(y.id);return`<sup class="footnote-ref"><a href="#fn-${h}" id="fnref-${h}">${x}</a></sup>`}}]});function Q0(y,x={}){L3=x.bakes;try{return r3.parse(y)}finally{L3=void 0}}function U7(y,x){let h=y.headTitle?.trim();if(h)return h;let C=x?.trim()??"";if(!C)return y.title;let l=y.title.toLowerCase(),i=C.toLowerCase();if(l.includes(i)||i.includes(l))return y.title;return`${y.title} — ${C}`}var{div:K2,slot:G7,span:Jl,button:Zl}=G;class D4 extends F{static preferredTagName="tosi-tabs";static initAttributes={localized:!1};value=0;makeTab(y,x,h){let C=x.getAttribute("name"),l=x.querySelector('template[role="tab"]')?.content.cloneNode(!0)||(this.localized?Q1(C):Jl(C)),i=K2(l,{part:"tab",tabindex:0,role:"tab",ariaControls:h},x.hasAttribute("data-close")?Zl({title:"close",class:"close"},O.x()):{}),k=x.dataset.tooltip;if(k)i.dataset.tooltip=k;return i}static shadowStyleSpec={":host":{"--tosi-tabs-selected-color":"var(--xin-tabs-selected-color, var(--tosi-accent, currentColor))","--tosi-tabs-bar-color":"var(--xin-tabs-bar-color, #ccc)","--tosi-tabs-bar-height":"var(--xin-tabs-bar-height, 2px)",display:"flex",flexDirection:"column",position:"relative",overflow:"hidden",boxShadow:"none !important"},slot:{position:"relative",display:"block",flex:"1",overflow:"hidden",overflowY:"auto"},'slot[name="after-tabs"]':{flex:"0 0 auto"},"::slotted([hidden])":{display:"none !important"},":host::part(tabpanel)":{display:"flex",flexDirection:"column",overflowX:"auto"},":host::part(tabrow)":{display:"flex"},":host .tabs":{display:"flex",userSelect:"none",whiteSpace:"nowrap"},":host .tabs > div":{padding:`${z.spacing50} ${z.spacing}`,cursor:"default",display:"flex",alignItems:"baseline"},":host .tabs > [aria-selected]":{"--text-color":z.tosiTabsSelectedColor,color:z.textColor},":host .elastic":{flex:"1"},":host .border":{background:z.tosiTabsBarColor},":host .border > .selected":{content:" ",width:0,height:z.tosiTabsBarHeight,background:z.tosiTabsSelectedColor,transition:"ease-out 0.2s"},":host button.close":{border:0,background:"transparent",textAlign:"center",marginLeft:z.spacing50,padding:0},":host button.close > svg":{height:"12px"}};handleCloseTab=null;get onCloseTab(){return this.handleCloseTab}set onCloseTab(y){this.handleCloseTab=y}content=[K2({role:"tabpanel",part:"tabpanel"},K2({part:"tabrow"},K2({class:"tabs",part:"tabs"}),K2({class:"elastic"}),G7({name:"after-tabs"})),K2({class:"border"},K2({class:"selected",part:"selected"}))),G7()];addTabBody(y,x=!1){if(!y.hasAttribute("name"))throw console.error("element has no name attribute",y),Error("element has no name attribute");if(this.append(y),this.setupTabs(),x)this.value=this.bodies.length-1;this.queueRender()}removeTabBody(y){y.remove(),this.setupTabs(),this.queueRender()}keyTab=(y)=>{let{tabs:x}=this.parts,h=[...x.children].indexOf(y.target);switch(y.key){case"ArrowLeft":this.value=(h+Number(x.children.length)-1)%x.children.length,x.children[this.value].focus(),y.preventDefault();break;case"ArrowRight":this.value=(h+1)%x.children.length,x.children[this.value].focus(),y.preventDefault();break;case" ":this.pickTab(y),y.preventDefault();break;default:}};get bodies(){return[...this.children].filter((y)=>y.hasAttribute("name"))}pickTab=(y)=>{let{tabs:x}=this.parts,h=y.target,C=h.closest("button.close")!==null,l=h.closest(".tabs > div"),i=[...x.children].indexOf(l);if(C){let k=this.bodies[i];if(!this.handleCloseTab||this.handleCloseTab(k)!==!1)this.removeTabBody(this.bodies[i])}else if(i>-1)this.value=i};setupTabs=()=>{let{tabs:y}=this.parts,x=[...this.children].filter((h)=>!h.hasAttribute("slot")&&h.hasAttribute("name"));if(y.textContent="",this.value>=x.length)this.value=x.length-1;for(let h in x){let C=x[h],l=`${this.instanceId}-${h}`;C.id=l;let i=this.makeTab(this,C,l);y.append(i)}};connectedCallback(){super.connectedCallback();let{tabs:y}=this.parts;y.addEventListener("click",this.pickTab),y.addEventListener("keydown",this.keyTab),this.setupTabs(),M1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),M1.allInstances.delete(this)}localeChanged=()=>{this.queueRender()};handleResize(){this.queueRender()}render(){let{tabs:y,selected:x}=this.parts,h=this.bodies;for(let C=0;C<h.length;C++){let l=h[C],i=y.children[C],k=this.value===Number(C);if(i.toggleAttribute("aria-selected",k),l.toggleAttribute("hidden",!k),k)x.style.marginLeft=`${i.offsetLeft-y.offsetLeft}px`,x.style.width=`${i.offsetWidth}px`}}}var pl=D4,X0=D4.elementCreator(),vl=X0,Rl=X0;var{div:o3,button:Dl}=G,Hl={error:"red",warn:"orange",info:"royalblue",log:"gray",success:"green",progress:"royalblue"};class h2 extends F{static preferredTagName="tosi-notification";static singleton;static shadowStyleSpec={":host":{_notificationSpacing:8,_notificationWidth:360,_notificationPadding:`${z.notificationSpacing} ${z.notificationSpacing50} ${z.notificationSpacing} ${z.notificationSpacing200}`,_notificationBg:"#fafafa",_notificationAccentColor:"#aaa",_notificationTextColor:"#444",_notificationIconSize:z.notificationSpacing300,_notificationButtonSize:48,_notificationBorderWidth:"3px 0 0",_notificationBorderRadius:z.notificationSpacing50,position:"fixed",left:0,right:0,bottom:0,paddingBottom:z.notificationSpacing,width:z.notificationWidth,display:"flex",flexDirection:"column-reverse",margin:"0 auto",gap:z.notificationSpacing,maxHeight:"50vh",overflow:"hidden auto",boxShadow:"none !important",color:z.notificationTextColor},":host .note":{display:"grid",background:z.notificationBg,padding:z.notificationPadding,gridTemplateColumns:`${z.notificationIconSize} 1fr ${z.notificationButtonSize}`,gap:z.notificationSpacing,alignItems:"center",borderRadius:z.notificationBorderRadius,boxShadow:`0 2px 8px #0006, inset 0 0 0 2px ${z.notificationAccentColor}`,borderColor:z.notificationAccentColor,borderWidth:z.notificationBorderWidth,borderStyle:"solid",transition:"0.5s ease-in",transitionProperty:"margin, opacity",zIndex:1},":host .note button":{display:"flex",lineHeight:z.notificationButtonSize,padding:0,margin:0,height:z.notificationButtonSize,width:z.notificationButtonSize,background:"transparent",alignItems:"center",justifyContent:"center",boxShadow:"none",border:"none",position:"relative"},":host .note button:hover svg":{stroke:z.notificationAccentColor},":host .note button:active svg":{borderRadius:99,stroke:z.notificationBg,background:z.notificationAccentColor,padding:z.spacing50},":host .note svg":{height:z.notificationIconSize,width:z.notificationIconSize,pointerEvents:"none",color:z.notificationAccentColor},":host .message":{display:"flex",flexDirection:"column",alignItems:"center",gap:z.notificationSpacing},":host .note.closing":{opacity:0,zIndex:0}};static removeNote(y){y.classList.add("closing"),y.style.marginBottom=-y.offsetHeight+"px";let x=()=>{y.remove()};y.addEventListener("transitionend",x),setTimeout(x,1000)}static post(y){let{message:x,duration:h,type:C,close:l,progress:i,icon:k,color:g}=Object.assign({type:"info",duration:-1},typeof y==="string"?{message:y}:y);if(!this.singleton)this.singleton=n3();let w=this.singleton;document.body.append(w),w.style.zIndex=String(P2()+1);let B=g||Hl[C],q=i||C==="progress"?G.progress():{},j=()=>{if(l)l();h2.removeNote(U)},_=k instanceof SVGElement?k:k?O[k]():O.info(),K=C==="error"||C==="warn",U=o3({class:`note ${C}`,role:K?"alert":"status",ariaLive:K?"assertive":"polite",style:{_notificationAccentColor:B}},_,o3({class:"message"},o3(x),q),Dl({class:"close",title:"close",ariaLabel:"Close notification",apply(Q){Q.addEventListener("click",j)}},O.x()));if(w.shadowRoot.append(U),q instanceof HTMLProgressElement&&i instanceof Function){q.setAttribute("max",String(100)),q.value=i();let Q=setInterval(()=>{if(!w.shadowRoot.contains(U)){clearInterval(Q);return}let Y=i();if(q.value=Y,Y>=100)h2.removeNote(U)},1000)}if(h>0)setTimeout(()=>{h2.removeNote(U)},h*1000);return U.scrollIntoView(),j}content=null}var bl=h2,n3=h2.elementCreator(),Sl=n3;function f3(y){return h2.post(y)}var U2=(async()=>{}).constructor;function C2(y){return y.replace(/[^a-zA-Z0-9_$]/g,"")}function F7(y){return y.split(",").map((x)=>{let h=x.trim().match(/^(\w+)\s+as\s+(\w+)$/);return h?`${h[1]}: ${h[2]}`:x.trim()}).filter(Boolean).join(", ")}function Ml(y,x){let h=(C)=>/^(\.|\/|https?:)/.test(C)?C:x+C;return y.replace(/import\s+([^;'"]+?)\s+from\s+(['"])([^'"]+)\2[ \t]*;?/g,(C,l,i,k)=>{let g=`await import(${i}${h(k)}${i})`,w=l.trim(),B;if(B=w.match(/^\{([^}]*)\}$/))return`const { ${F7(B[1])} } = ${g}`;if(B=w.match(/^\*\s+as\s+(\w+)$/))return`const ${B[1]} = ${g}`;if(B=w.match(/^(\w+)$/))return`const ${B[1]} = (${g}).default`;if(B=w.match(/^(\w+)\s*,\s*\{([^}]*)\}$/))return`const { default: ${B[1]}, ${F7(B[2])} } = ${g}`;return C}).replace(/import\s+(['"])([^'"]+)\1[ \t]*;?/g,(C,l,i)=>`await import(${l}${h(i)}${l})`)}function Il(){return globalThis.__TOSI_IMPORT_RESOLVER?.prefix}function Y1(y,x,h=Il()){let C=y;for(let i of x){let k=C2(i),g=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");C=C.replace(new RegExp(`import\\s*\\{([^}]*)\\}\\s*from\\s*'${g}'`,"g"),(w,B)=>`const { ${B.replace(/\s+/g," ").trim()} } = ${k}`),C=C.replace(new RegExp(`import\\s*\\*\\s*as\\s+(\\w+)\\s+from\\s*'${g}'`,"g"),(w,B)=>`const ${B} = ${k}`),C=C.replace(new RegExp(`import\\s+(\\w+)\\s+from\\s*'${g}'`,"g"),(w,B)=>`const ${B} = ${k}`)}if(h)C=Ml(C,h);let l=C.match(/^\s*import\s+['"{*\w][^\n]*/m);if(l)throw Error(`live example: unsupported import \`${l[0].trim()}\` — imports `+`from the example context (${x.join(", ")}) are supported in { named }, * as ns, or default form`+(h?", and other packages resolve via the import-resolver.":" (enable importResolver to import other packages)."));return C}async function Q7(y,x,h){let C=Y1(y,Object.keys(x)),l=(await h(C,{transforms:["typescript"]})).code,i=Object.keys(x).map(C2),k=Object.values(x);await new U2(...i,l)(...k)}var u3="0.12.0";function a3(y){let x=globalThis.__TJS_LOCAL_BASE;return[...typeof x==="string"?[`${x}${y}`]:[],`https://cdn.jsdelivr.net/npm/tjs-lang@${u3}/dist/${y}`,`https://unpkg.com/tjs-lang@${u3}/dist/${y}`,`https://esm.sh/tjs-lang@${u3}/dist/${y}`]}async function m3(y){for(let x of y)try{let h=await import(x);if(h)return h}catch{}return null}async function cl(){try{let{tjs:x}=await import("tjs-lang/browser");if(typeof x==="function")return x}catch{}let y=await m3(a3("tjs-browser.js"));if(y&&typeof y.tjs==="function")return y.tjs;return null}var sl;async function Tl(){let y=[()=>import("tjs-lang/browser"),()=>m3(a3("tjs-browser.js"))];for(let x of y)try{let h=await x();if(h&&typeof h.extractTests==="function"&&typeof h.testUtils==="string")return{extractTests:h.extractTests,testUtils:h.testUtils}}catch{}return null}function X7(){return sl??=Tl()}async function dl(){try{let{fromTS:x}=await import("tjs-lang/browser/from-ts");if(typeof x==="function")return x}catch{}let y=await m3(a3("tjs-browser-from-ts.js"));if(y&&typeof y.fromTS==="function")return y.fromTS;return null}var Ll,rl,ol=256,$0=new Map,E3=(y,x)=>{if($0.size>=ol){let h=$0.keys().next().value;if(h!==void 0)$0.delete(h)}$0.set(y,x)},O7=!1,W7=!1;async function Y0(y="js"){if(y==="js")return(C)=>({code:C});let x=await(Ll??=cl());if(!x&&!O7)O7=!0,console.warn("tjs-lang not available — live examples run as raw JavaScript "+"(tjs/TypeScript examples will not transpile). Install with: npm install tjs-lang");let h=y==="ts"?await(rl??=dl()):null;if(y==="ts"&&!h&&!W7)W7=!0,console.warn("tjs-lang/browser/from-ts not available — `ts` examples run as raw JavaScript.");return(C)=>{let l=`${y}\x00${C}`,i=$0.get(l);if(i)return i;if(!x){let g={code:C};return E3(l,g),g}if(y==="ts")return(async()=>{let g=h?(await h(C,{emitTJS:!0})).code:C,w={code:x(g,{dialect:"tjs",runTests:!1}).code};return E3(l,w),w})();let k={code:x(C,{dialect:y,runTests:!1}).code};return E3(l,k),k}}var H4="live-example-payload";function $7(y,x,h){return h!==""?`${y}-${h}`:`${y}-${x}`}function t3(y,x){try{localStorage.setItem(y,JSON.stringify(x))}catch(h){console.warn("live-example: failed to write to localStorage",h)}}function nl(y){if(y===null)return null;try{return JSON.parse(y)}catch{return null}}function Y7(y,x,h,C,l,i){let k=new URLSearchParams({[y]:x});if(i?.sourceFile&&i.ordinal!=null)k.set("sf",i.sourceFile),k.set("ord",i.ordinal);let g=location.href.split("?")[0]+"?"+k.toString();t3(h,{remoteKey:C,sentAt:Date.now(),...l,original:i?.original}),window.open(g)}var fl=typeof BroadcastChannel<"u";class N0{storageKey;remoteKey;lastUpdate=0;interval;channel;listening=!1;onReceive;constructor(y,x,h){this.storageKey=y,this.remoteKey=x,this.onReceive=h}handlePayload=(y)=>{if(y.sentAt<=this.lastUpdate)return;if(y.remoteKey!==this.remoteKey)return;this.lastUpdate=y.sentAt,this.onReceive(y)};handleMessage=(y)=>{let x=y.data;if(x)this.handlePayload(x)};handlePoll=()=>{let y;try{y=localStorage.getItem(this.storageKey)}catch{return}let x=nl(y);if(x)this.handlePayload(x)};startListening(){if(this.listening)return;if(this.listening=!0,fl)this.channel=new BroadcastChannel(this.storageKey),this.channel.onmessage=this.handleMessage;this.interval=setInterval(this.handlePoll,500)}stopListening(){if(!this.listening)return;if(this.listening=!1,this.channel)this.channel.close(),this.channel=void 0;if(this.interval)clearInterval(this.interval),this.interval=void 0}send(y){let x={remoteKey:this.remoteKey,sentAt:Date.now(),...y};if(t3(this.storageKey,x),this.channel)this.channel.postMessage(x)}sendClose(){let y={remoteKey:this.remoteKey,sentAt:Date.now(),css:"",html:"",js:"",close:!0};if(t3(this.storageKey,y),this.channel)this.channel.postMessage(y)}}var N7="__tosiCaptureScope",{div:J7}=G;function ul(y,x){let h=y.customElements;if(!h)return;let C=(i)=>{if(!i||h.get(i))return;let k=customElements.get(i);if(k)try{h.define(i,k)}catch{}};for(let i of Object.values(x))if(i&&typeof i==="object"){for(let k of Object.values(i))if(typeof k==="function"&&"tagName"in k)C(k.tagName)}let l=y.document;if(l){let i=l.querySelectorAll("*");for(let k of i){let g=k.tagName.toLowerCase();if(g.includes("-"))C(g)}}}async function Z7(y,x){if(!x)return{code:y,extraContext:{}};let h;try{({scopeCaptureEpilogue:h}=await import("./index-0ps8jzdn.js"))}catch{return{code:y,extraContext:{}}}let C=h(y,N7);if(!C)return{code:y,extraContext:{}};return{code:y+C,extraContext:{[N7]:x}}}async function b4(y){let{html:x,css:h,js:C,context:l,transform:i,compiledJs:k,exampleElement:g,styleElement:w,widgetsElement:B,onError:q,onScope:j}=y,_=J7({class:"preview"});_.innerHTML=x,w.innerText=h;let K=g.querySelector(".preview");if(K)K.replaceWith(_);else g.insertBefore(_,B);try{let U=k??(await i(Y1(C,Object.keys(l)),{transforms:["typescript"]})).code,{code:Q,extraContext:Y}=await Z7(U,j),$={preview:_,...l,...Y},Z=Object.keys($).map(C2),p=Object.values($);await new U2(...Z,Q)(...p)}catch(U){if(console.error(U),_.append(J7({class:"preview-error"},String(U.message||U))),q)q(U);else window.alert(`Error: ${U}, the console may have more information…`)}return _}async function S4(y){let{html:x,css:h,js:C,context:l,transform:i,compiledJs:k,exampleElement:g,widgetsElement:w,onError:B,onScope:q}=y,j=g.querySelector("iframe.preview-iframe");if(!j){j=document.createElement("iframe"),j.className="preview-iframe",j.style.cssText="width: 100%; height: 100%; border: none;";let Q=g.querySelector(".preview");if(Q)Q.replaceWith(j);else g.insertBefore(j,w)}let _=j.contentDocument;if(!_)return console.error("Could not access iframe document"),null;let K=j.contentWindow;if(l.tosijs)K.tosijs=l.tosijs;if(l["tosijs-ui"])K.tosijsui=l["tosijs-ui"];_.open(),_.write(`<!DOCTYPE html>
84
+ `}},extensions:[{name:"wikilink",level:"inline",start(y){return y.match(/\[\[/)?.index},tokenizer(y){let x=/^\[\[([^\]|]+?)(?:\|([^\]]+?))?\]\]/.exec(y);if(!x)return;return{type:"wikilink",raw:x[0],target:x[1].trim(),label:(x[2]??x[1]).trim()}},renderer(y){return`<a href="/${r3(y.target)}/" class="wikilink">${Sk(y.label)}</a>`}},{name:"footnoteDef",level:"block",start(y){return y.match(/^\[\^[^\]]+\]:/m)?.index},tokenizer(y){let x=/^\[\^([^\]]+)\]:[ \t]*([^\n]*)(?:\n|$)/.exec(y);if(!x)return;return m3.set(x[1].trim(),x[2].trim()),{type:"footnoteDef",raw:x[0]}},renderer(){return""}},{name:"footnoteRef",level:"inline",start(y){return y.match(/\[\^/)?.index},tokenizer(y){let x=/^\[\^([^\]]+)\]/.exec(y);if(!x)return;let h=x[1].trim();if(!p2.includes(h))p2.push(h);return{type:"footnoteRef",raw:x[0],id:h}},renderer(y){let x=p2.indexOf(y.id)+1,h=r3(y.id);return`<sup class="footnote-ref"><a href="#fn-${h}" id="fnref-${h}">${x}</a></sup>`}}]});function F0(y,x={}){n3=x.bakes;try{return E3.parse(y)}finally{n3=void 0}}function O7(y,x){let h=y.headTitle?.trim();if(h)return h;let C=x?.trim()??"";if(!C)return y.title;let k=y.title.toLowerCase(),B=C.toLowerCase();if(k.includes(B)||B.includes(k))return y.title;return`${y.title} — ${C}`}var{div:K2,slot:F7,span:bk,button:Tk}=G;class S4 extends ${static preferredTagName="tosi-tabs";static initAttributes={localized:!1};value=0;makeTab(y,x,h){let C=x.getAttribute("name"),k=x.querySelector('template[role="tab"]')?.content.cloneNode(!0)||(this.localized?O1(C):bk(C)),B=K2(k,{part:"tab",tabindex:0,role:"tab",ariaControls:h},x.hasAttribute("data-close")?Tk({title:"close",class:"close"},Q.x()):{}),w=x.dataset.tooltip;if(w)B.dataset.tooltip=w;return B}static shadowStyleSpec={":host":{"--tosi-tabs-selected-color":"var(--xin-tabs-selected-color, var(--tosi-accent, currentColor))","--tosi-tabs-bar-color":"var(--xin-tabs-bar-color, #ccc)","--tosi-tabs-bar-height":"var(--xin-tabs-bar-height, 2px)",display:"flex",flexDirection:"column",position:"relative",overflow:"hidden",boxShadow:"none !important"},slot:{position:"relative",display:"block",flex:"1",overflow:"hidden",overflowY:"auto"},'slot[name="after-tabs"]':{flex:"0 0 auto"},"::slotted([hidden])":{display:"none !important"},":host::part(tabpanel)":{display:"flex",flexDirection:"column",overflowX:"auto"},":host::part(tabrow)":{display:"flex"},":host .tabs":{display:"flex",userSelect:"none",whiteSpace:"nowrap"},":host .tabs > div":{padding:`${l.spacing50} ${l.spacing}`,cursor:"default",display:"flex",alignItems:"baseline"},":host .tabs > [aria-selected]":{"--text-color":l.tosiTabsSelectedColor,color:l.textColor},":host .elastic":{flex:"1"},":host .border":{background:l.tosiTabsBarColor},":host .border > .selected":{content:" ",width:0,height:l.tosiTabsBarHeight,background:l.tosiTabsSelectedColor,transition:"ease-out 0.2s"},":host button.close":{border:0,background:"transparent",textAlign:"center",marginLeft:l.spacing50,padding:0},":host button.close > svg":{height:"12px"}};handleCloseTab=null;get onCloseTab(){return this.handleCloseTab}set onCloseTab(y){this.handleCloseTab=y}content=[K2({role:"tabpanel",part:"tabpanel"},K2({part:"tabrow"},K2({class:"tabs",part:"tabs"}),K2({class:"elastic"}),F7({name:"after-tabs"})),K2({class:"border"},K2({class:"selected",part:"selected"}))),F7()];addTabBody(y,x=!1){if(!y.hasAttribute("name"))throw console.error("element has no name attribute",y),Error("element has no name attribute");if(this.append(y),this.setupTabs(),x)this.value=this.bodies.length-1;this.queueRender()}removeTabBody(y){y.remove(),this.setupTabs(),this.queueRender()}keyTab=(y)=>{let{tabs:x}=this.parts,h=[...x.children].indexOf(y.target);switch(y.key){case"ArrowLeft":this.value=(h+Number(x.children.length)-1)%x.children.length,x.children[this.value].focus(),y.preventDefault();break;case"ArrowRight":this.value=(h+1)%x.children.length,x.children[this.value].focus(),y.preventDefault();break;case" ":this.pickTab(y),y.preventDefault();break;default:}};get bodies(){return[...this.children].filter((y)=>y.hasAttribute("name"))}pickTab=(y)=>{let{tabs:x}=this.parts,h=y.target,C=h.closest("button.close")!==null,k=h.closest(".tabs > div"),B=[...x.children].indexOf(k);if(C){let w=this.bodies[B];if(!this.handleCloseTab||this.handleCloseTab(w)!==!1)this.removeTabBody(this.bodies[B])}else if(B>-1)this.value=B};setupTabs=()=>{let{tabs:y}=this.parts,x=[...this.children].filter((h)=>!h.hasAttribute("slot")&&h.hasAttribute("name"));if(y.textContent="",this.value>=x.length)this.value=x.length-1;for(let h in x){let C=x[h],k=`${this.instanceId}-${h}`;C.id=k;let B=this.makeTab(this,C,k);y.append(B)}};connectedCallback(){super.connectedCallback();let{tabs:y}=this.parts;y.addEventListener("click",this.pickTab),y.addEventListener("keydown",this.keyTab),this.setupTabs(),b1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),b1.allInstances.delete(this)}localeChanged=()=>{this.queueRender()};handleResize(){this.queueRender()}render(){let{tabs:y,selected:x}=this.parts,h=this.bodies;for(let C=0;C<h.length;C++){let k=h[C],B=y.children[C],w=this.value===Number(C);if(B.toggleAttribute("aria-selected",w),k.toggleAttribute("hidden",!w),w)x.style.marginLeft=`${B.offsetLeft-y.offsetLeft}px`,x.style.width=`${B.offsetWidth}px`}}}var pk=S4,N0=S4.elementCreator(),Lk=N0,ck=N0;var{button:dk,div:fk,slot:sk}=G;class o3 extends ${static preferredTagName="tosi-pocket-bar";static initAttributes={icon:"",direction:"auto",open:!1};pinned=!1;get vertical(){return/^[ns]/.test(this.direction)}get resolvedIcon(){return this.icon||(this.vertical?"moreVertical":"moreHorizontal")}get floatPosition(){return this.direction==="auto"?"side":this.direction}reposition=()=>{if(!this.hydrated)return;K4(this.parts.bar,this.parts.handle,this.floatPosition,"remain","remain")};setOpen(y){if(this.open!==y)this.open=y;if(y)this.reposition()}handlePointerEnter=()=>this.setOpen(!0);handlePointerLeave=()=>{if(!this.pinned)this.setOpen(!1)};handleFocusIn=()=>this.setOpen(!0);handleFocusOut=()=>{requestAnimationFrame(()=>{if(!this.pinned&&!this.matches(":focus-within"))this.setOpen(!1)})};toggle=(y)=>{y?.preventDefault(),this.pinned=!this.pinned,this.setOpen(this.pinned)};handleOutsidePointer=(y)=>{if(!this.pinned)return;let x=y.composedPath();if(!x.includes(this)&&!x.includes(this.parts.bar))this.pinned=!1,this.setOpen(!1)};handleScrollResize=()=>{if(this.open)this.reposition()};content=()=>[dk({part:"handle",class:"no-drag",title:"toolbar","aria-label":"toolbar","aria-expanded":"false",onClick:this.toggle},q3({part:"handleIcon",icon:this.resolvedIcon})),fk({part:"bar",role:"toolbar",style:{flexDirection:this.vertical?"column":"row"}},sk())];static shadowStyleSpec={":host":{display:"inline-flex",position:"relative",opacity:A.tosiPocketOpacity("0.75"),transition:"opacity 0.15s ease-out"},":host([open])":{opacity:"1"},':host [part="handle"]':{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:l.spacing50,border:"0",margin:"0",cursor:"pointer",color:A.tosiPocketHandleColor("inherit"),background:A.tosiPocketBg("color-mix(in srgb, var(--tosi-bg, #fff) 85%, transparent)"),backdropFilter:"blur(12px)",borderRadius:l.spacing,transition:"background 0.15s ease-out"},':host [part="bar"]':{position:"fixed",display:"flex",gap:l.spacing25,padding:l.spacing25,background:A.tosiPocketBg("color-mix(in srgb, var(--tosi-bg, #fff) 82%, transparent)"),backdropFilter:"blur(12px)",borderRadius:l.spacing,boxShadow:`0 ${l.spacing25} ${l.spacing} #0003`,opacity:"0",pointerEvents:"none",transform:"scale(0.9)",transition:"opacity 0.15s ease-out, transform 0.15s ease-out"},':host([open]) [part="bar"]':{opacity:"1",pointerEvents:"auto",transform:"scale(1)"},"::slotted(button), ::slotted(label)":{display:"inline-flex",alignItems:"center",gap:l.spacing25,padding:l.spacing50,margin:"0",border:"0",background:"transparent",color:"inherit",font:"inherit",cursor:"pointer",borderRadius:l.spacing25,transition:"background 0.15s ease-out, opacity 0.15s, filter 0.15s"},"::slotted(button:hover), ::slotted(label:hover)":{background:"color-mix(in srgb, currentColor 15%, transparent)"},'::slotted(label:has(input[type="checkbox"]:not(:checked)))':{opacity:"0.45",filter:"grayscale(1)"}};connectedCallback(){super.connectedCallback(),this.addEventListener("pointerenter",this.handlePointerEnter),this.addEventListener("pointerleave",this.handlePointerLeave),this.addEventListener("focusin",this.handleFocusIn),this.addEventListener("focusout",this.handleFocusOut),document.addEventListener("pointerdown",this.handleOutsidePointer,!0),window.addEventListener("scroll",this.handleScrollResize,{passive:!0,capture:!0}),window.addEventListener("resize",this.handleScrollResize,{passive:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.handleOutsidePointer,!0),window.removeEventListener("scroll",this.handleScrollResize,!0),window.removeEventListener("resize",this.handleScrollResize)}render(){super.render(),this.parts.handleIcon.icon=this.resolvedIcon,this.parts.bar.style.flexDirection=this.vertical?"column":"row",this.parts.handle.setAttribute("aria-expanded",String(!!this.open)),this.reposition()}}var a3=o3.elementCreator();var{div:t3,button:uk}=G,rk={error:"red",warn:"orange",info:"royalblue",log:"gray",success:"green",progress:"royalblue"};class h2 extends ${static preferredTagName="tosi-notification";static singleton;static shadowStyleSpec={":host":{_notificationSpacing:8,_notificationWidth:360,_notificationPadding:`${l.notificationSpacing} ${l.notificationSpacing50} ${l.notificationSpacing} ${l.notificationSpacing200}`,_notificationBg:"#fafafa",_notificationAccentColor:"#aaa",_notificationTextColor:"#444",_notificationIconSize:l.notificationSpacing300,_notificationButtonSize:48,_notificationBorderWidth:"3px 0 0",_notificationBorderRadius:l.notificationSpacing50,position:"fixed",left:0,right:0,bottom:0,paddingBottom:l.notificationSpacing,width:l.notificationWidth,display:"flex",flexDirection:"column-reverse",margin:"0 auto",gap:l.notificationSpacing,maxHeight:"50vh",overflow:"hidden auto",boxShadow:"none !important",color:l.notificationTextColor},":host .note":{display:"grid",background:l.notificationBg,padding:l.notificationPadding,gridTemplateColumns:`${l.notificationIconSize} 1fr ${l.notificationButtonSize}`,gap:l.notificationSpacing,alignItems:"center",borderRadius:l.notificationBorderRadius,boxShadow:`0 2px 8px #0006, inset 0 0 0 2px ${l.notificationAccentColor}`,borderColor:l.notificationAccentColor,borderWidth:l.notificationBorderWidth,borderStyle:"solid",transition:"0.5s ease-in",transitionProperty:"margin, opacity",zIndex:1},":host .note button":{display:"flex",lineHeight:l.notificationButtonSize,padding:0,margin:0,height:l.notificationButtonSize,width:l.notificationButtonSize,background:"transparent",alignItems:"center",justifyContent:"center",boxShadow:"none",border:"none",position:"relative"},":host .note button:hover svg":{stroke:l.notificationAccentColor},":host .note button:active svg":{borderRadius:99,stroke:l.notificationBg,background:l.notificationAccentColor,padding:l.spacing50},":host .note svg":{height:l.notificationIconSize,width:l.notificationIconSize,pointerEvents:"none",color:l.notificationAccentColor},":host .message":{display:"flex",flexDirection:"column",alignItems:"center",gap:l.notificationSpacing},":host .note.closing":{opacity:0,zIndex:0}};static removeNote(y){y.classList.add("closing"),y.style.marginBottom=-y.offsetHeight+"px";let x=()=>{y.remove()};y.addEventListener("transitionend",x),setTimeout(x,1000)}static post(y){let{message:x,duration:h,type:C,close:k,progress:B,icon:w,color:g}=Object.assign({type:"info",duration:-1},typeof y==="string"?{message:y}:y);if(!this.singleton)this.singleton=e3();let z=this.singleton;document.body.append(z),z.style.zIndex=String(X2()+1);let q=g||rk[C],j=B||C==="progress"?G.progress():{},V=()=>{if(k)k();h2.removeNote(U)},_=w instanceof SVGElement?w:w?Q[w]():Q.info(),P=C==="error"||C==="warn",U=t3({class:`note ${C}`,role:P?"alert":"status",ariaLive:P?"assertive":"polite",style:{_notificationAccentColor:q}},_,t3({class:"message"},t3(x),j),uk({class:"close",title:"close",ariaLabel:"Close notification",apply(i){i.addEventListener("click",V)}},Q.x()));if(z.shadowRoot.append(U),j instanceof HTMLProgressElement&&B instanceof Function){j.setAttribute("max",String(100)),j.value=B();let i=setInterval(()=>{if(!z.shadowRoot.contains(U)){clearInterval(i);return}let N=B();if(j.value=N,N>=100)h2.removeNote(U)},1000)}if(h>0)setTimeout(()=>{h2.removeNote(U)},h*1000);return U.scrollIntoView(),V}content=null}var mk=h2,e3=h2.elementCreator(),nk=e3;function y9(y){return h2.post(y)}var P2=(async()=>{}).constructor;class Z7 extends Error{statement;constructor(y,x){super(y);this.statement=x;this.name="UnsupportedImportError"}}function C2(y){return y.replace(/[^a-zA-Z0-9_$]/g,"")}function N7(y){return y.split(",").map((x)=>{let h=x.trim().match(/^(\w+)\s+as\s+(\w+)$/);return h?`${h[1]}: ${h[2]}`:x.trim()}).filter(Boolean).join(", ")}function Ek(y,x){let h=(C)=>/^(\.|\/|https?:)/.test(C)?C:x+C;return y.replace(/import\s+([^;'"]+?)\s+from\s+(['"])([^'"]+)\2[ \t]*;?/g,(C,k,B,w)=>{let g=`await import(${B}${h(w)}${B})`,z=k.trim(),q;if(q=z.match(/^\{([^}]*)\}$/))return`const { ${N7(q[1])} } = ${g}`;if(q=z.match(/^\*\s+as\s+(\w+)$/))return`const ${q[1]} = ${g}`;if(q=z.match(/^(\w+)$/))return`const ${q[1]} = (${g}).default`;if(q=z.match(/^(\w+)\s*,\s*\{([^}]*)\}$/))return`const { default: ${q[1]}, ${N7(q[2])} } = ${g}`;return C}).replace(/import\s+(['"])([^'"]+)\1[ \t]*;?/g,(C,k,B)=>`await import(${k}${h(B)}${k})`)}function ok(){return globalThis.__TOSI_IMPORT_RESOLVER?.prefix}function W1(y,x,h=ok()){let C=y;for(let B of x){let w=C2(B),g=B.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");C=C.replace(new RegExp(`import\\s*\\{([^}]*)\\}\\s*from\\s*'${g}'`,"g"),(z,q)=>`const { ${q.replace(/\s+/g," ").trim()} } = ${w}`),C=C.replace(new RegExp(`import\\s*\\*\\s*as\\s+(\\w+)\\s+from\\s*'${g}'`,"g"),(z,q)=>`const ${q} = ${w}`),C=C.replace(new RegExp(`import\\s+(\\w+)\\s+from\\s*'${g}'`,"g"),(z,q)=>`const ${q} = ${w}`)}if(h)C=Ek(C,h);let k=C.match(/^\s*import\s+['"{*\w][^\n]*/m);if(k){let B=k[0].trim();throw new Z7(`live example: unsupported import \`${B}\` — imports `+`from the example context (${x.join(", ")}) are supported in { named }, * as ns, or default form`+(h?", and other packages resolve via the import-resolver.":" (enable importResolver to import other packages)."),B)}return C}async function R7(y,x,h){let C=W1(y,Object.keys(x)),k=(await h(C,{transforms:["typescript"]})).code,B=Object.keys(x).map(C2),w=Object.values(x);await new P2(...B,k)(...w)}var x9="0.12.0";function C9(y){let x=globalThis.__TJS_LOCAL_BASE;return[...typeof x==="string"?[`${x}${y}`]:[],`https://cdn.jsdelivr.net/npm/tjs-lang@${x9}/dist/${y}`,`https://unpkg.com/tjs-lang@${x9}/dist/${y}`,`https://esm.sh/tjs-lang@${x9}/dist/${y}`]}async function k9(y){for(let x of y)try{let h=await import(x);if(h)return h}catch{}return null}async function ak(){try{let{tjs:x}=await import("tjs-lang/browser");if(typeof x==="function")return x}catch{}let y=await k9(C9("tjs-browser.js"));if(y&&typeof y.tjs==="function")return y.tjs;return null}var tk;async function ek(){let y=[()=>import("tjs-lang/browser"),()=>k9(C9("tjs-browser.js"))];for(let x of y)try{let h=await x();if(h&&typeof h.extractTests==="function"&&typeof h.testUtils==="string")return{extractTests:h.extractTests,testUtils:h.testUtils}}catch{}return null}function D7(){return tk??=ek()}async function yB(){try{let{fromTS:x}=await import("tjs-lang/browser/from-ts");if(typeof x==="function")return x}catch{}let y=await k9(C9("tjs-browser-from-ts.js"));if(y&&typeof y.fromTS==="function")return y.fromTS;return null}var xB,hB,CB=256,W0=new Map,h9=(y,x)=>{if(W0.size>=CB){let h=W0.keys().next().value;if(h!==void 0)W0.delete(h)}W0.set(y,x)},W7=!1,J7=!1;async function J0(y="js"){if(y==="js")return(C)=>({code:C});let x=await(xB??=ak());if(!x&&!W7)W7=!0,console.warn("tjs-lang not available — live examples run as raw JavaScript "+"(tjs/TypeScript examples will not transpile). Install with: npm install tjs-lang");let h=y==="ts"?await(hB??=yB()):null;if(y==="ts"&&!h&&!J7)J7=!0,console.warn("tjs-lang/browser/from-ts not available — `ts` examples run as raw JavaScript.");return(C)=>{let k=`${y}\x00${C}`,B=W0.get(k);if(B)return B;if(!x){let g={code:C};return h9(k,g),g}if(y==="ts")return(async()=>{let g=h?(await h(C,{emitTJS:!0})).code:C,z={code:x(g,{dialect:"tjs",runTests:!1}).code};return h9(k,z),z})();let w={code:x(C,{dialect:y,runTests:!1}).code};return h9(k,w),w}}var I4="live-example-payload";function H7(y,x,h){return h!==""?`${y}-${h}`:`${y}-${x}`}function B9(y,x){try{localStorage.setItem(y,JSON.stringify(x))}catch(h){console.warn("live-example: failed to write to localStorage",h)}}function kB(y){if(y===null)return null;try{return JSON.parse(y)}catch{return null}}function v7(y,x,h,C,k,B){let w=new URLSearchParams({[y]:x});if(B?.sourceFile&&B.ordinal!=null)w.set("sf",B.sourceFile),w.set("ord",B.ordinal);let g=location.href.split("?")[0]+"?"+w.toString();B9(h,{remoteKey:C,sentAt:Date.now(),...k,original:B?.original}),window.open(g)}var BB=typeof BroadcastChannel<"u";class Z0{storageKey;remoteKey;lastUpdate=0;interval;channel;listening=!1;onReceive;constructor(y,x,h){this.storageKey=y,this.remoteKey=x,this.onReceive=h}handlePayload=(y)=>{if(y.sentAt<=this.lastUpdate)return;if(y.remoteKey!==this.remoteKey)return;this.lastUpdate=y.sentAt,this.onReceive(y)};handleMessage=(y)=>{let x=y.data;if(x)this.handlePayload(x)};handlePoll=()=>{let y;try{y=localStorage.getItem(this.storageKey)}catch{return}let x=kB(y);if(x)this.handlePayload(x)};startListening(){if(this.listening)return;if(this.listening=!0,BB)this.channel=new BroadcastChannel(this.storageKey),this.channel.onmessage=this.handleMessage;this.interval=setInterval(this.handlePoll,500)}stopListening(){if(!this.listening)return;if(this.listening=!1,this.channel)this.channel.close(),this.channel=void 0;if(this.interval)clearInterval(this.interval),this.interval=void 0}send(y){let x={remoteKey:this.remoteKey,sentAt:Date.now(),...y};if(B9(this.storageKey,x),this.channel)this.channel.postMessage(x)}sendClose(){let y={remoteKey:this.remoteKey,sentAt:Date.now(),css:"",html:"",js:"",close:!0};if(B9(this.storageKey,y),this.channel)this.channel.postMessage(y)}}var M7="__tosiCaptureScope",{div:S7}=G;function wB(y,x){let h=y.customElements;if(!h)return;let C=(B)=>{if(!B||h.get(B))return;let w=customElements.get(B);if(w)try{h.define(B,w)}catch{}};for(let B of Object.values(x))if(B&&typeof B==="object"){for(let w of Object.values(B))if(typeof w==="function"&&"tagName"in w)C(w.tagName)}let k=y.document;if(k){let B=k.querySelectorAll("*");for(let w of B){let g=w.tagName.toLowerCase();if(g.includes("-"))C(g)}}}async function I7(y,x){if(!x)return{code:y,extraContext:{}};let h;try{({scopeCaptureEpilogue:h}=await import("./index-0ps8jzdn.js"))}catch{return{code:y,extraContext:{}}}let C=h(y,M7);if(!C)return{code:y,extraContext:{}};return{code:y+C,extraContext:{[M7]:x}}}async function b4(y){let{html:x,css:h,js:C,context:k,transform:B,compiledJs:w,exampleElement:g,styleElement:z,widgetsElement:q,onError:j,onScope:V}=y,_=S7({class:"preview"});_.innerHTML=x,z.innerText=h;let P=g.querySelector(".preview");if(P)P.replaceWith(_);else g.insertBefore(_,q);try{let U=w??(await B(W1(C,Object.keys(k)),{transforms:["typescript"]})).code,{code:i,extraContext:N}=await I7(U,V),F={preview:_,...k,...N},R=Object.keys(F).map(C2),D=Object.values(F);await new P2(...R,i)(...D)}catch(U){if(console.error(U),_.append(S7({class:"preview-error"},String(U.message||U))),j)j(U);else window.alert(`Error: ${U}, the console may have more information…`)}return _}async function T4(y){let{html:x,css:h,js:C,context:k,transform:B,compiledJs:w,exampleElement:g,widgetsElement:z,onError:q,onScope:j}=y,V=g.querySelector("iframe.preview-iframe");if(!V){V=document.createElement("iframe"),V.className="preview-iframe",V.style.cssText="width: 100%; height: 100%; border: none;";let i=g.querySelector(".preview");if(i)i.replaceWith(V);else g.insertBefore(V,z)}let _=V.contentDocument;if(!_)return console.error("Could not access iframe document"),null;let P=V.contentWindow;if(k.tosijs)P.tosijs=k.tosijs;if(k["tosijs-ui"])P.tosijsui=k["tosijs-ui"];_.open(),_.write(`<!DOCTYPE html>
85
85
  <html>
86
86
  <head>
87
87
  <style>
@@ -93,24 +93,24 @@ ${x}
93
93
  <body>
94
94
  <div class="preview">${x}</div>
95
95
  </body>
96
- </html>`),_.close(),ul(K,l);let U=_.querySelector(".preview");if(!U)return console.error("Could not find preview element in iframe"),null;try{let Q=k??(await i(Y1(C,Object.keys(l)),{transforms:["typescript"]})).code,{code:Y,extraContext:$}=await Z7(Q,q),Z={preview:U,...l,...$},p=K.eval("(async () => {}).constructor"),T=Object.keys(Z).map(C2),C1=Object.values(Z);await new p(...T,Y)(...C1)}catch(Q){console.error(Q);let Y=_.createElement("div");if(Y.className="preview-error",Y.textContent=String(Q.message||Q),U.append(Y),B)B(Q);else window.alert(`Error: ${Q}, the console may have more information…`)}return U}function El(y){let x=y?.nextElementSibling??null;while(x?.tagName==="SCRIPT"&&x.getAttribute("type")==="application/tosi-transpiled")x=x.nextElementSibling;return x}function al(y){let x=y.nextElementSibling;if(x?.tagName!=="SCRIPT"||x.getAttribute("type")!=="application/tosi-transpiled")return;try{let h=JSON.parse(x.textContent||"");return typeof h==="string"?h:void 0}catch{return}}function M4(y,x,h,C,l){let i=[...y.querySelectorAll(".language-html,.language-js,.language-tjs,.language-ts,.language-css,.language-test")].filter((g)=>!g.closest(C)).map((g)=>({block:g.parentElement,language:g.classList[0].split("-").pop(),code:g.innerText,compiled:al(g.parentElement),mode:g.parentElement.getAttribute("data-example-mode")||void 0})),k=0;for(let g=0;g<i.length;g+=1){let w=[i[g]];while(g<i.length-1&&El(i[g].block)===i[g+1].block)w.push(i[g+1]),g+=1;let B=h({context:x});if(l!==void 0)B.setAttribute("data-source-file",l),B.setAttribute("data-example-ordinal",String(k));let q=w.map((K)=>K.mode).filter((K)=>!!K);if(q.length){let K=[...new Set(q)];if(K.length>1)console.error(`live example ${k+1}${l?` (${l})`:""}: contradictory modes [${K.join(", ")}] — using the first, "${q[0]}".`);B.setAttribute("mode",q[0])}let j=w.map((K)=>K.block.getAttribute("data-example-id")).find((K)=>!!K);B.id=j||`example-${k+1}`,k+=1,w[0].block.parentElement.insertBefore(B,w[0].block),w.forEach((K)=>{switch(K.language){case"js":case"tjs":case"ts":if(B.js=K.code,B.dialect=K.language,K.compiled!==void 0)B.compiledJs=K.compiled,B.compiledJsSource=K.code;break;case"html":B.html=K.code;break;case"css":B.css=K.code;break;case"test":B.test=K.code;break}K.block.remove()}),B.showDefaultTab(),B.snapshotAndRestoreLocalEdit()}}var ml=new Set(["js","tjs","ts"]),p7=new Set(["js","tjs","ts","html","css","test"]);function e3(y){let x=/^([ \t]*)```([\w-]*)[^\n]*\n([\s\S]*?)\n[ \t]*```/gm,h=[],C;while((C=x.exec(y))!==null){let l=C.index+C[0].indexOf(`
97
- `)+1;h.push({lang:C[2]||"",indent:C[1],start:C.index,end:C.index+C[0].length,codeStart:l,codeEnd:l+C[3].length})}return h}function tl(y,x){if(!x)return y;return y.split(`
96
+ </html>`),_.close(),wB(P,k);let U=_.querySelector(".preview");if(!U)return console.error("Could not find preview element in iframe"),null;try{let i=w??(await B(W1(C,Object.keys(k)),{transforms:["typescript"]})).code,{code:N,extraContext:F}=await I7(i,j),R={preview:U,...k,...F},D=P.eval("(async () => {}).constructor"),f=Object.keys(R).map(C2),y1=Object.values(R);await new D(...f,N)(...y1)}catch(i){console.error(i);let N=_.createElement("div");if(N.className="preview-error",N.textContent=String(i.message||i),U.append(N),q)q(i);else window.alert(`Error: ${i}, the console may have more information…`)}return U}function gB(y){let x=y?.nextElementSibling??null;while(x?.tagName==="SCRIPT"&&x.getAttribute("type")==="application/tosi-transpiled")x=x.nextElementSibling;return x}function zB(y){let x=y.nextElementSibling;if(x?.tagName!=="SCRIPT"||x.getAttribute("type")!=="application/tosi-transpiled")return;try{let h=JSON.parse(x.textContent||"");return typeof h==="string"?h:void 0}catch{return}}function p4(y,x,h,C,k){let B=[...y.querySelectorAll(".language-html,.language-js,.language-tjs,.language-ts,.language-css,.language-test")].filter((g)=>!g.closest(C)).map((g)=>({block:g.parentElement,language:g.classList[0].split("-").pop(),code:g.innerText,compiled:zB(g.parentElement),mode:g.parentElement.getAttribute("data-example-mode")||void 0})),w=0;for(let g=0;g<B.length;g+=1){let z=[B[g]];while(g<B.length-1&&gB(B[g].block)===B[g+1].block)z.push(B[g+1]),g+=1;let q=h({context:x});if(k!==void 0)q.setAttribute("data-source-file",k),q.setAttribute("data-example-ordinal",String(w));let j=z.map((P)=>P.mode).filter((P)=>!!P);if(j.length){let P=[...new Set(j)];if(P.length>1)console.error(`live example ${w+1}${k?` (${k})`:""}: contradictory modes [${P.join(", ")}] — using the first, "${j[0]}".`);q.setAttribute("mode",j[0])}let V=z.map((P)=>P.block.getAttribute("data-example-id")).find((P)=>!!P);q.id=V||`example-${w+1}`,w+=1,z[0].block.parentElement.insertBefore(q,z[0].block),z.forEach((P)=>{switch(P.language){case"js":case"tjs":case"ts":if(q.js=P.code,q.dialect=P.language,P.compiled!==void 0)q.compiledJs=P.compiled,q.compiledJsSource=P.code;break;case"html":q.html=P.code;break;case"css":q.css=P.code;break;case"test":q.test=P.code;break}P.block.remove()}),q.showDefaultTab(),q.snapshotAndRestoreLocalEdit()}}var qB=new Set(["js","tjs","ts"]),b7=new Set(["js","tjs","ts","html","css","test"]);function w9(y){let x=/^([ \t]*)```([\w-]*)[^\n]*\n([\s\S]*?)\n[ \t]*```/gm,h=[],C;while((C=x.exec(y))!==null){let k=C.index+C[0].indexOf(`
97
+ `)+1;h.push({lang:C[2]||"",indent:C[1],start:C.index,end:C.index+C[0].length,codeStart:k,codeEnd:k+C[3].length})}return h}function lB(y,x){if(!x)return y;return y.split(`
98
98
  `).map((h)=>h?x+h:h).join(`
99
- `)}function el(y,x){if(!x)return y;return y.split(`
99
+ `)}function jB(y,x){if(!x)return y;return y.split(`
100
100
  `).map((h)=>h.startsWith(x)?h.slice(x.length):h).join(`
101
- `)}function y9(y,x){let h=[],C=null;for(let l=0;l<x.length;l+=1){let i=x[l];if(!p7.has(i.lang)){C=null;continue}let k=x[l-1];if(C!==null&&k!==void 0&&p7.has(k.lang)&&y.slice(k.end,i.start).trim()===""&&C)C.push(i);else C=[i],h.push(C)}return h}function v7(y,x,h){let C=y9(y,e3(y))[x];if(!C)return null;let l=(w)=>w.replace(/\s+$/,""),i=[],k=(w)=>w==="js"?C.find((B)=>ml.has(B.lang)):C.find((B)=>B.lang===w);for(let w of["js","html","css","test"]){let B=h[w];if(B===void 0)continue;let q=k(w);if(!q)continue;let j=y.slice(q.codeStart,q.codeEnd);if(l(el(j,q.indent))===l(B))continue;i.push({start:q.codeStart,end:q.codeEnd,text:tl(B,q.indent)})}if(i.length===0)return null;i.sort((w,B)=>B.start-w.start);let g=y;for(let w of i)g=g.slice(0,w.start)+w.text+g.slice(w.end);return g}function R7(y,x){return`tosi-example-edit:${y}#${x}`}function D7(y,x){try{localStorage.setItem(y,JSON.stringify(x))}catch(h){console.warn("example-store: save failed",h)}}function H7(y){try{let x=localStorage.getItem(y);return x?JSON.parse(x):null}catch{return null}}function b7(y){try{localStorage.removeItem(y)}catch{}}function S7(y){try{return localStorage.getItem(y)!==null}catch{return!1}}var M7={":host":{"--tosi-example-height":"320px","--code-editors-bar-bg":"#777","--code-editors-bar-color":"#fff","--widget-bg":"#fff8","--widget-color":"#000",position:"relative",display:"flex",height:"var(--tosi-example-height)",background:"var(--background)",boxSizing:"border-box",borderRadius:z.spacing25,boxShadow:"inset 0 0 0 2px #8883",overflow:"hidden"},':host.-locally-edited [part="exampleWidgets"]':{outline:"2px solid var(--brand-color, #da1167)",outlineOffset:"1px",borderRadius:"4px"},":host.-maximize":{position:"fixed",left:"0",top:"0",height:"100vh",width:"100vw",margin:"0 !important"},".-maximize":{zIndex:101},":host.-vertical":{flexDirection:"column"},":host .layout-indicator":{transition:"0.5s ease-out",transform:"rotateZ(270deg)"},":host.-vertical .layout-indicator":{transform:"rotateZ(180deg)"},":host.-maximize .hide-if-maximized, :host:not(.-maximize) .show-if-maximized":{display:"none"},':host [part="example"]':{flex:"1 1 50%",height:"100%",position:"relative",overflowX:"auto"},":host .preview":{height:"100%",position:"relative",overflow:"hidden",boxSizing:"border-box",padding:z.spacing},":host .preview > :first-child":{marginTop:"0"},":host .preview-error":{padding:"8px 12px",margin:"8px",background:"#fee",color:"#900",borderRadius:"4px",fontSize:"13px",fontFamily:"system-ui, sans-serif",whiteSpace:"pre-wrap"},':host [part="editors"]':{flex:"1 1 200px",height:"100%",position:"relative"},':host [part="exampleWidgets"]':{position:"absolute",left:"5px",bottom:"5px","--widget-color":"var(--brand-color)",borderRadius:"5px",width:"44px",height:"44px",lineHeight:"44px",zIndex:"100"},':host [part="exampleWidgets"] svg':{stroke:"var(--widget-color)"},":host .code-editors":{overflow:"hidden",background:"white",position:"relative",top:"0",right:"0",flex:"1 1 50%",height:"100%",flexDirection:"column",zIndex:"10"},":host .code-editors:not([hidden])":{display:"flex"},":host .code-editors > h4":{padding:"5px",margin:"0",textAlign:"center",background:"var(--code-editors-bar-bg)",color:"var(--code-editors-bar-color)",cursor:"move"},":host button.transparent, :host .sizer":{width:"32px",height:"32px",lineHeight:"32px",textAlign:"center",padding:"0",margin:"0"},":host .sizer":{cursor:"nwse-resize"},':host [part="testIndicator"]':{position:"absolute",top:"8px",right:"8px",width:"12px",height:"12px",borderRadius:"50%",background:"#888",zIndex:"100",display:"none"},':host.-has-tests [part="testIndicator"]':{display:"block",opacity:"var(--tests-enabled, 1)"},':host.-test-running [part="testIndicator"]':{background:"#fa0",animation:"test-pulse 0.5s ease-in-out infinite"},':host.-test-passed [part="testIndicator"]':{background:"#0a0",animation:"test-fade 2s ease-out forwards"},':host.-test-failed [part="testIndicator"]':{background:"#c00",animation:"test-pulse 1s ease-in-out infinite"},"@keyframes test-pulse":{"0%, 100%":{opacity:"1"},"50%":{opacity:"0.4"}},"@keyframes test-fade":{"0%":{opacity:"1"},"50%":{opacity:"1"},"100%":{opacity:"0"}},':host.-test-passed [part="exampleWidgets"]':{"--widget-color":"#0a0"},':host.-test-failed [part="exampleWidgets"]':{"--widget-color":"#f00"},':host [part="testResults"]':{position:"absolute",bottom:"54px",left:"5px",background:"var(--widget-bg)",borderRadius:"5px",padding:"8px",fontSize:"14px",margin:"0",maxWidth:"400px",maxHeight:"200px",overflow:"auto",zIndex:"100"},':host [part="testResults"][hidden]':{display:"none"},":host .test-pass":{color:"#0a0"},":host .test-fail":{color:"#f00"},":host .tjs-test-results":{padding:"8px 12px",fontSize:"14px",fontFamily:"var(--mono-font, monospace)",overflow:"auto",lineHeight:"1.6"},":host .tjs-test-summary":{fontWeight:"bold",marginBottom:"6px"},":host .tjs-test-empty":{opacity:"0.6"},":host .tjs-test-error":{opacity:"0.7"}};class x9 extends Error{constructor(y){super(y);this.name="AssertionError"}}var yi=/\/(index|module|iife|module\.debug|module\.safe)\.js$/;function xi(y){if(!y)return null;for(let x of y.split(`
102
- `)){let h=x.trim();if(!h)continue;if(/^\w*Error[:\s]/.test(h))continue;let C=h.match(/[(@\s]([^()\s]+):(\d+):(\d+)\)?$/);if(!C)continue;let[,l,i,k]=C;if(yi.test(l))continue;return{url:l,line:Number(i),col:Number(k)}}return null}var I4=null;function hi(y){if(!I4||y<1)return null;return I4.split(`
103
- `)[y-1]?.trim()||null}function I7(y,x){if(y===x)return!0;if(typeof y!==typeof x)return!1;if(y===null||x===null)return y===x;if(typeof y!=="object")return!1;let h=y,C=x;if(Array.isArray(h)!==Array.isArray(C))return!1;let l=Object.keys(h),i=Object.keys(C);if(l.length!==i.length)return!1;return l.every((k)=>I7(h[k],C[k]))}var Ci=5000,li={stringify(y){if(typeof y>"u")return"undefined";if(y===null)return"null";if(typeof Element<"u"&&y instanceof Element)return`<${y.tagName.toLowerCase()}>`;if(typeof Node<"u"&&y instanceof Node)return`[${y.nodeName}]`;try{return JSON.stringify(y)}catch{return String(y)}}},{stringify:c1}=li;function c7(y,x=!1){let h=(l,i)=>{if(!(x?!l:l)){let g=new x9(x?`not: ${i}`:i),w=xi(g.stack);if(w){let B=hi(w.line),q=`line ${w.line}`;g.message=B?`${g.message} | ${B} (${q})`:`${g.message} (${q})`}throw g}};return{toBe(l){h(y===l,`Expected ${c1(y)} to be ${c1(l)}`)},toEqual(l){h(I7(y,l),`Expected ${c1(y)} to equal ${c1(l)}`)},toBeTruthy(){h(!!y,`Expected ${c1(y)} to be truthy`)},toBeFalsy(){h(!y,`Expected ${c1(y)} to be falsy`)},toBeNull(){h(y===null,`Expected ${c1(y)} to be null`)},toBeUndefined(){h(y===void 0,`Expected ${c1(y)} to be undefined`)},toBeDefined(){h(y!==void 0,`Expected ${c1(y)} to be defined`)},toContain(l){if(typeof y==="string")h(y.includes(l),`Expected "${y}" to contain "${l}"`);else if(Array.isArray(y))h(y.includes(l),`Expected array to contain ${c1(l)}`);else throw new x9("toContain requires string or array")},toHaveLength(l){let i=y.length;h(i===l,`Expected length ${i} to be ${l}`)},toMatch(l){h(l.test(y),`Expected "${y}" to match ${l}`)},toBeGreaterThan(l){h(y>l,`Expected ${y} to be greater than ${l}`)},toBeLessThan(l){h(y<l,`Expected ${y} to be less than ${l}`)},toBeInstanceOf(l){h(y instanceof l,`Expected value to be instance of ${l.name}`)},get not(){return c7(y,!x)}}}function h9(y){return c7(y)}function ii(y){return new Promise((x)=>setTimeout(x,y))}function ki(y,x,h=1000){return new Promise((C,l)=>{let i=Date.now(),k=()=>{let g=y.querySelector(x);if(g){C(g);return}if(Date.now()-i>=h){l(Error(`Timeout waiting for "${x}" after ${h}ms`));return}requestAnimationFrame(k)};k()})}function gi(y,x,h){return Promise.race([y,new Promise((C,l)=>setTimeout(()=>l(Error(`Test "${h}" timed out after ${x}ms`)),x))])}function C9(y,x=Ci){let h="",C=[];return{pending:C,expect:h9,test(l,i){let k=h?`${h} > ${l}`:l;try{let g=i();if(g instanceof Promise){let w=gi(g,x,k).then(()=>{y.push({name:k,passed:!0})}).catch((B)=>{y.push({name:k,passed:!1,error:B.message})});C.push(w)}else y.push({name:k,passed:!0})}catch(g){y.push({name:k,passed:!1,error:g.message})}},describe(l,i){let k=h;h=h?`${h} > ${l}`:l,i(),h=k}}}async function c4(y,x,h,C){let l=[],i=C9(l),k={preview:x,...h,expect:i.expect,test:i.test,describe:i.describe,waitMs:ii,waitFor:(g,w)=>ki(x,g,w)};try{let g=Y1(y,Object.keys(h)),w=(await C(g,{transforms:["typescript"]})).code,B=Object.keys(k).map((K)=>K.replace(/-/g,"")),q=Object.values(k),j=`${w}
104
- //# sourceURL=inline-test`;I4=w,await new U2(...B,j)(...q)}catch(g){l.push({name:"Test execution",passed:!1,error:g.message})}if(i.pending.length>0)await Promise.all(i.pending);return I4=null,{passed:l.filter((g)=>g.passed).length,failed:l.filter((g)=>!g.passed).length,tests:l}}var{div:N1,tosiSlot:wi,style:Bi,button:J0,pre:s7,span:l9}=G,k9="tosijs-ui-tests-enabled",d7=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function zi(){if(typeof localStorage>"u")return!1;let y=localStorage.getItem(k9);if(y!==null)return y==="true";return d7}var{testManager:_1}=t({testManager:{enabled:zi()}});function s4(){document.body.classList.toggle("tests-enabled",_1.enabled.value),document.body.style.setProperty("--tests-enabled",_1.enabled.value?"1":"0")}if(typeof document<"u")if(document.body)s4();else document.addEventListener("DOMContentLoaded",s4);function g9(){localStorage.setItem(k9,"true"),_1.enabled.value=!0,s4(),document.querySelectorAll("tosi-example").forEach((y)=>{y.refresh()})}function w9(){localStorage.setItem(k9,"false"),_1.enabled.value=!1,s4()}class l2 extends F{static preferredTagName="tosi-example";static lightStyleSpec=M7;static initAttributes={persistToDom:!1,iframe:!1,mode:""};get effectiveMode(){let y=this.mode;if(y==="iframe"||y==="ide"||y==="inline")return y;if(y)console.warn(`<tosi-example>: unknown mode "${y}" — running inline`);return this.iframe?"iframe":"inline"}prefix="lx";storageKey=H4;context={};capturedScope={};uuid=crypto.randomUUID();remoteId="";remoteSync;undoInterval;testResults;pendingValues={};pendingShowDefaultTab=!1;beforeUnloadHandler;editorsBuilt=!1;static insertExamples(y,x={},h){M4(y,x,T4,l2.tagName,h)}get activeTab(){if(!this.editorsBuilt)return;let{editors:y}=this.parts;return[...y.children].find((x)=>x.getAttribute("hidden")===null)}getEditorValue(y){if(!this.editorsBuilt)return this.pendingValues[y]??"";return this.parts[y].value}setEditorValue(y,x){if(!this.editorsBuilt){this.pendingValues[y]=x;return}let h=this.parts[y];h.value=x}flushPendingValues(){for(let[y,x]of Object.entries(this.pendingValues)){let h=this.parts[y];if(h)h.value=x}if(this.pendingValues={},this.pendingShowDefaultTab)this.pendingShowDefaultTab=!1,this.showDefaultTab()}get css(){return this.getEditorValue("css")}set css(y){this.setEditorValue("css",y)}get html(){return this.getEditorValue("html")}set html(y){this.setEditorValue("html",y)}get js(){return this.getEditorValue("js")}set js(y){this.setEditorValue("js",y)}get test(){return this.getEditorValue("test")}set test(y){this.setEditorValue("test",y)}get remoteKey(){return $7(this.prefix,this.uuid,this.remoteId)}get dialect(){return this.getAttribute("data-dialect")||"js"}set dialect(y){this.setAttribute("data-dialect",y)}compiledJs;compiledJsSource;jsOutEditor;tjsTestsView;productTabsReady=!1;lastGeneratedJs="";inlineTjsTestCount=0;lastTjsTests;async runInlineTjsTests(y){if(this.dialect==="js"){this.inlineTjsTestCount=0;return}let x=await X7();if(!x){this.inlineTjsTestCount=0;return}let h;try{h=x.extractTests(this.js)}catch{this.inlineTjsTestCount=0;return}if(this.inlineTjsTestCount=h.tests.length,h.tests.length===0){this.lastTjsTests=void 0,this.renderTjsTests();return}try{let l=`${(await y(Y1(h.code,Object.keys(this.context)))).code}
101
+ `)}function g9(y,x){let h=[],C=null;for(let k=0;k<x.length;k+=1){let B=x[k];if(!b7.has(B.lang)){C=null;continue}let w=x[k-1];if(C!==null&&w!==void 0&&b7.has(w.lang)&&y.slice(w.end,B.start).trim()===""&&C)C.push(B);else C=[B],h.push(C)}return h}function T7(y,x,h){let C=g9(y,w9(y))[x];if(!C)return null;let k=(z)=>z.replace(/\s+$/,""),B=[],w=(z)=>z==="js"?C.find((q)=>qB.has(q.lang)):C.find((q)=>q.lang===z);for(let z of["js","html","css","test"]){let q=h[z];if(q===void 0)continue;let j=w(z);if(!j)continue;let V=y.slice(j.codeStart,j.codeEnd);if(k(jB(V,j.indent))===k(q))continue;B.push({start:j.codeStart,end:j.codeEnd,text:lB(q,j.indent)})}if(B.length===0)return null;B.sort((z,q)=>q.start-z.start);let g=y;for(let z of B)g=g.slice(0,z.start)+z.text+g.slice(z.end);return g}function p7(y,x){return`tosi-example-edit:${y}#${x}`}function L7(y,x){try{localStorage.setItem(y,JSON.stringify(x))}catch(h){console.warn("example-store: save failed",h)}}function c7(y){try{let x=localStorage.getItem(y);return x?JSON.parse(x):null}catch{return null}}function d7(y){try{localStorage.removeItem(y)}catch{}}function f7(y){try{return localStorage.getItem(y)!==null}catch{return!1}}var s7={":host":{"--tosi-example-height":"320px","--code-editors-bar-bg":"#777","--code-editors-bar-color":"#fff","--widget-bg":"#fff8","--widget-color":"#000",position:"relative",display:"flex",height:"var(--tosi-example-height)",background:"var(--background)",boxSizing:"border-box",borderRadius:l.spacing25,boxShadow:"inset 0 0 0 2px #8883",overflow:"hidden"},':host.-locally-edited > [part="example"] > [part="exampleWidgets"]':{outline:"2px solid var(--brand-color, #da1167)",outlineOffset:"1px",borderRadius:"4px"},":host.-maximize":{position:"fixed",left:"0",top:"0",height:"100vh",width:"100vw",margin:"0 !important"},".-maximize":{zIndex:101},":host.-vertical":{flexDirection:"column"},":host .layout-indicator":{transition:"0.5s ease-out",transform:"rotateZ(270deg)"},":host.-vertical .layout-indicator":{transform:"rotateZ(180deg)"},':host.-maximize > [part="example"] > [part="exampleWidgets"] .hide-if-maximized, :host:not(.-maximize) > [part="example"] > [part="exampleWidgets"] .show-if-maximized':{display:"none"},':host [part="example"]':{flex:"1 1 50%",height:"100%",position:"relative",overflowX:"auto"},":host .preview":{height:"100%",position:"relative",overflow:"hidden",boxSizing:"border-box",padding:l.spacing},":host .preview > :first-child":{marginTop:"0"},":host .preview-error":{padding:"8px 12px",margin:"8px",background:"#fee",color:"#900",borderRadius:"4px",fontSize:"13px",fontFamily:"system-ui, sans-serif",whiteSpace:"pre-wrap"},':host [part="editors"]':{flex:"1 1 200px",height:"100%",position:"relative"},':host [part="exampleWidgets"]':{position:"absolute",top:"5px",right:"5px",zIndex:"100",color:"var(--text-color)","--widget-color":"var(--brand-color)","--tosi-pocket-handle-color":"var(--widget-color)"},':host [part="exampleWidgets"] button':{"--text-color":"inherit"},':host [part="exampleWidgets"] .tests-toggle input':{display:"none"},':host [part="exampleWidgets"] .tests-toggle':{opacity:"calc(0.4 + 0.6 * var(--tests-enabled, 0))",filter:"grayscale(calc(1 - var(--tests-enabled, 0)))",transition:"opacity 0.2s, filter 0.2s"},":host .code-editors":{overflow:"hidden",background:"var(--code-bg, #fdfdfd)",position:"relative",top:"0",right:"0",flex:"1 1 50%",height:"100%",flexDirection:"column",zIndex:"10"},":host .code-editors:not([hidden])":{display:"flex"},":host .code-editors > h4":{padding:"5px",margin:"0",textAlign:"center",background:"var(--code-editors-bar-bg)",color:"var(--code-editors-bar-color)",cursor:"move"},":host button.transparent, :host .sizer":{width:"32px",height:"32px",lineHeight:"32px",textAlign:"center",padding:"0",margin:"0"},":host .sizer":{cursor:"nwse-resize"},"@keyframes test-pulse":{"0%, 100%":{opacity:"1"},"50%":{opacity:"0.4"}},':host.-test-running > [part="example"] > [part="exampleWidgets"]':{"--widget-color":"#fa0",animation:"test-pulse 0.75s ease-in-out infinite"},':host.-test-passed > [part="example"] > [part="exampleWidgets"]':{"--widget-color":"#0a0"},':host.-test-failed > [part="example"] > [part="exampleWidgets"]':{"--widget-color":"#f00"},':host [part="testResults"]':{position:"absolute",bottom:"54px",left:"5px",background:"var(--widget-bg)",borderRadius:"5px",padding:"8px",fontSize:"14px",margin:"0",maxWidth:"400px",maxHeight:"200px",overflow:"auto",zIndex:"100"},':host [part="testResults"][hidden]':{display:"none"},":host .test-pass":{color:"#0a0"},":host .test-fail":{color:"#f00"},":host .tjs-test-results":{padding:"8px 12px",fontSize:"14px",fontFamily:"var(--mono-font, monospace)",overflow:"auto",lineHeight:"1.6"},":host .tjs-test-summary":{fontWeight:"bold",marginBottom:"6px"},":host .tjs-test-empty":{opacity:"0.6"},":host .tjs-test-error":{opacity:"0.7"}};class z9 extends Error{constructor(y){super(y);this.name="AssertionError"}}var VB=/\/(index|module|iife|module\.debug|module\.safe)\.js$/;function XB(y){if(!y)return null;for(let x of y.split(`
102
+ `)){let h=x.trim();if(!h)continue;if(/^\w*Error[:\s]/.test(h))continue;let C=h.match(/[(@\s]([^()\s]+):(\d+):(\d+)\)?$/);if(!C)continue;let[,k,B,w]=C;if(VB.test(k))continue;return{url:k,line:Number(B),col:Number(w)}}return null}var L4=null;function AB(y){if(!L4||y<1)return null;return L4.split(`
103
+ `)[y-1]?.trim()||null}function u7(y,x){if(y===x)return!0;if(typeof y!==typeof x)return!1;if(y===null||x===null)return y===x;if(typeof y!=="object")return!1;let h=y,C=x;if(Array.isArray(h)!==Array.isArray(C))return!1;let k=Object.keys(h),B=Object.keys(C);if(k.length!==B.length)return!1;return k.every((w)=>u7(h[w],C[w]))}var _B=5000,KB={stringify(y){if(typeof y>"u")return"undefined";if(y===null)return"null";if(typeof Element<"u"&&y instanceof Element)return`<${y.tagName.toLowerCase()}>`;if(typeof Node<"u"&&y instanceof Node)return`[${y.nodeName}]`;try{return JSON.stringify(y)}catch{return String(y)}}},{stringify:p1}=KB;function r7(y,x=!1){let h=(k,B)=>{if(!(x?!k:k)){let g=new z9(x?`not: ${B}`:B),z=XB(g.stack);if(z){let q=AB(z.line),j=`line ${z.line}`;g.message=q?`${g.message} | ${q} (${j})`:`${g.message} (${j})`}throw g}};return{toBe(k){h(y===k,`Expected ${p1(y)} to be ${p1(k)}`)},toEqual(k){h(u7(y,k),`Expected ${p1(y)} to equal ${p1(k)}`)},toBeTruthy(){h(!!y,`Expected ${p1(y)} to be truthy`)},toBeFalsy(){h(!y,`Expected ${p1(y)} to be falsy`)},toBeNull(){h(y===null,`Expected ${p1(y)} to be null`)},toBeUndefined(){h(y===void 0,`Expected ${p1(y)} to be undefined`)},toBeDefined(){h(y!==void 0,`Expected ${p1(y)} to be defined`)},toContain(k){if(typeof y==="string")h(y.includes(k),`Expected "${y}" to contain "${k}"`);else if(Array.isArray(y))h(y.includes(k),`Expected array to contain ${p1(k)}`);else throw new z9("toContain requires string or array")},toHaveLength(k){let B=y.length;h(B===k,`Expected length ${B} to be ${k}`)},toMatch(k){h(k.test(y),`Expected "${y}" to match ${k}`)},toBeGreaterThan(k){h(y>k,`Expected ${y} to be greater than ${k}`)},toBeLessThan(k){h(y<k,`Expected ${y} to be less than ${k}`)},toBeInstanceOf(k){h(y instanceof k,`Expected value to be instance of ${k.name}`)},get not(){return r7(y,!x)}}}function q9(y){return r7(y)}function PB(y){return new Promise((x)=>setTimeout(x,y))}function UB(y,x,h=1000){return new Promise((C,k)=>{let B=Date.now(),w=()=>{let g=y.querySelector(x);if(g){C(g);return}if(Date.now()-B>=h){k(Error(`Timeout waiting for "${x}" after ${h}ms`));return}requestAnimationFrame(w)};w()})}function GB(y,x,h){return Promise.race([y,new Promise((C,k)=>setTimeout(()=>k(Error(`Test "${h}" timed out after ${x}ms`)),x))])}function l9(y,x=_B){let h="",C=[];return{pending:C,expect:q9,test(k,B){let w=h?`${h} > ${k}`:k;try{let g=B();if(g instanceof Promise){let z=GB(g,x,w).then(()=>{y.push({name:w,passed:!0})}).catch((q)=>{y.push({name:w,passed:!1,error:q.message})});C.push(z)}else y.push({name:w,passed:!0})}catch(g){y.push({name:w,passed:!1,error:g.message})}},describe(k,B){let w=h;h=h?`${h} > ${k}`:k,B(),h=w}}}async function c4(y,x,h,C){let k=[],B=l9(k),w={preview:x,...h,expect:B.expect,test:B.test,describe:B.describe,waitMs:PB,waitFor:(g,z)=>UB(x,g,z)};try{let g=W1(y,Object.keys(h)),z=(await C(g,{transforms:["typescript"]})).code,q=Object.keys(w).map((P)=>P.replace(/-/g,"")),j=Object.values(w),V=`${z}
104
+ //# sourceURL=inline-test`;L4=z,await new P2(...q,V)(...j)}catch(g){k.push({name:"Test execution",passed:!1,error:g.message})}if(B.pending.length>0)await Promise.all(B.pending);return L4=null,{passed:k.filter((g)=>g.passed).length,failed:k.filter((g)=>!g.passed).length,tests:k}}var{div:L1,tosiSlot:QB,style:$B,button:U2,pre:m7,span:j9,label:YB,input:iB}=G,X9="tosijs-ui-tests-enabled",E7=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function OB(){if(typeof localStorage>"u")return!1;let y=localStorage.getItem(X9);if(y!==null)return y==="true";return E7}var{testManager:K1}=e({testManager:{enabled:OB()}});function d4(){document.body.classList.toggle("tests-enabled",K1.enabled.value),document.body.style.setProperty("--tests-enabled",K1.enabled.value?"1":"0")}if(typeof document<"u")if(document.body)d4();else document.addEventListener("DOMContentLoaded",d4);function A9(){localStorage.setItem(X9,"true"),K1.enabled.value=!0,d4(),document.querySelectorAll("tosi-example").forEach((y)=>{y.refresh()})}function _9(){localStorage.setItem(X9,"false"),K1.enabled.value=!1,d4()}class k2 extends ${static preferredTagName="tosi-example";static lightStyleSpec=s7;static initAttributes={persistToDom:!1,iframe:!1,mode:""};get effectiveMode(){let y=this.mode;if(y==="iframe"||y==="ide"||y==="inline")return y;if(y)console.warn(`<tosi-example>: unknown mode "${y}" — running inline`);return this.iframe===!0?"iframe":"inline"}prefix="lx";storageKey=I4;context={};capturedScope={};uuid=crypto.randomUUID();remoteId="";remoteSync;undoInterval;testResults;pendingValues={};pendingShowDefaultTab=!1;beforeUnloadHandler;editorsBuilt=!1;static insertExamples(y,x={},h){p4(y,x,f4,k2.tagName,h)}get activeTab(){if(!this.editorsBuilt)return;let{editors:y}=this.parts;return[...y.children].find((x)=>x.getAttribute("hidden")===null)}getEditorValue(y){if(!this.editorsBuilt)return this.pendingValues[y]??"";return this.parts[y].value}setEditorValue(y,x){if(!this.editorsBuilt){this.pendingValues[y]=x;return}let h=this.parts[y];h.value=x}flushPendingValues(){for(let[y,x]of Object.entries(this.pendingValues)){let h=this.parts[y];if(h)h.value=x}if(this.pendingValues={},this.pendingShowDefaultTab)this.pendingShowDefaultTab=!1,this.showDefaultTab()}get css(){return this.getEditorValue("css")}set css(y){this.setEditorValue("css",y)}get html(){return this.getEditorValue("html")}set html(y){this.setEditorValue("html",y)}get js(){return this.getEditorValue("js")}set js(y){this.setEditorValue("js",y)}get test(){return this.getEditorValue("test")}set test(y){this.setEditorValue("test",y)}get remoteKey(){return H7(this.prefix,this.uuid,this.remoteId)}get dialect(){return this.getAttribute("data-dialect")||"js"}set dialect(y){this.setAttribute("data-dialect",y)}compiledJs;compiledJsSource;jsOutEditor;tjsTestsView;productTabsReady=!1;lastGeneratedJs="";inlineTjsTestCount=0;lastTjsTests;async runInlineTjsTests(y){if(this.dialect==="js"){this.inlineTjsTestCount=0;return}let x=await D7();if(!x){this.inlineTjsTestCount=0;return}let h;try{h=x.extractTests(this.js)}catch{this.inlineTjsTestCount=0;return}if(this.inlineTjsTestCount=h.tests.length,h.tests.length===0){this.lastTjsTests=void 0,this.renderTjsTests();return}try{let k=`${(await y(W1(h.code,Object.keys(this.context)))).code}
105
105
  ${x.testUtils}
106
- return ${h.testRunner}`,i={preview:N1({class:"preview"}),...this.context},k=Object.keys(i).map(C2),g=Object.values(i),w=new U2(...k,l);this.lastTjsTests=await w(...g)}catch(C){this.lastTjsTests={passed:0,failed:1,results:[{description:"inline tests failed to run",passed:!1,error:String(C)}]}}this.renderTjsTests()}renderTjsTests(){let y=this.tjsTestsView;if(!y)return;let x=this.lastTjsTests;if(!x||x.results.length===0){y.replaceChildren(N1({class:"tjs-test-empty"},"No inline tjs tests."));return}y.replaceChildren(N1({class:"tjs-test-summary"},`${x.passed}/${x.results.length} passed`),...x.results.map((h)=>N1({class:h.passed?"test-pass":"test-fail"},`${h.passed?"✓":"✗"} ${h.description}`,h.error?l9({class:"tjs-test-error"},` — ${h.error}`):"")))}async computeGeneratedJs(y){if(this.dialect==="js")return"";try{return(await y(Y1(this.js,Object.keys(this.context)))).code}catch(x){return`// transpile error:
107
- // ${x.message}`}}ensureProductTabs(){if(this.productTabsReady||this.dialect==="js"||!this.hydrated||!this.editorsBuilt)return;this.productTabsReady=!0;let{editors:y}=this.parts;if(this.parts.js.setAttribute("name",this.dialect),this.parts.js.tjsAutocomplete={getLiveBindings:()=>this.liveBindings()},this.parts.js.mode=this.dialect,this.jsOutEditor=n1({name:"JS",mode:"javascript",disabled:!0}),y.append(this.jsOutEditor),this.inlineTjsTestCount>0)this.tjsTestsView=N1({name:"tjs tests",class:"tjs-test-results"}),y.append(this.tjsTestsView);y.setupTabs(),this.jsOutEditor.value=this.lastGeneratedJs,this.renderTjsTests()}captureScope=(y)=>{this.capturedScope=y};liveBindings(){let y={};for(let[h,C]of Object.entries(this.context))y[C2(h)]=C;let x=this.parts.example?.querySelector(".preview");if(x)y.preview=x;return Object.assign(y,this.capturedScope),y}updateUndo=()=>{if(this.editorsBuilt){let{activeTab:y}=this,{undo:x,redo:h}=this.parts;if(y instanceof o1)x.disabled=!y.canUndo(),h.disabled=!y.canRedo();else x.disabled=!0,h.disabled=!0}this.updateEditedIndicator(),this.updateTestResultsVisibility()};updateTestResultsVisibility(){let{testResults:y}=this.parts,x=this.testResults,h=this.editorsBuilt&&this.activeTab===this.parts.test,C=x&&x.failed>0;y.hidden=!x||x.tests.length===0||!h&&!C}undo=()=>{let{activeTab:y}=this;if(y instanceof o1)y.undo()};redo=()=>{let{activeTab:y}=this;if(y instanceof o1)y.redo()};get isMaximized(){return this.classList.contains("-maximize")}flipLayout=()=>{this.classList.toggle("-vertical")};saveToSource=async()=>{let y=this.getAttribute("data-source-file"),x=this.getAttribute("data-example-ordinal");if(!y||x===null){window.alert("No source mapping for this example.");return}let h;try{let l=await fetch(`/__docstore/source?file=${encodeURIComponent(y)}`);if(!l.ok)throw Error(String(l.status));h=await l.text()}catch{window.alert("Source endpoint unavailable — saving to source works in dev only.");return}let C=v7(h,Number(x),{js:this.js,html:this.html,css:this.css,test:this.test});if(C===null){let l=Number(x),i=y9(h,e3(h));if(l>=i.length)window.alert(`Couldn't locate this example in ${y}: it's example #${l+1} on the page, but a raw scan of the file finds only ${i.length} fenced example group(s). The page↔source ordinals `+"disagree — likely multiple docs in one file, or indented fences. "+"(File a report with the source structure.)");else window.alert("No changes to save.");return}try{let l=await fetch("/__docstore/source",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:y,content:C})});if(!l.ok)throw Error(String(l.status));window.alert(`Saved to ${y}`)}catch{window.alert("Save failed.")}};exampleMenu=()=>{let y=_1.enabled.value;n({target:this.parts.exampleWidgets,width:"auto",menuItems:[{icon:"edit2",caption:"view/edit code",action:this.showCode},{icon:"edit",caption:"view/edit code in a new window",action:this.openEditorWindow},null,{icon:this.isMaximized?"minimize":"maximize",caption:this.isMaximized?"restore preview":"maximize preview",action:this.toggleMaximize},null,{icon:y?"check":"",caption:"Run tests",action:()=>{if(y)w9();else g9()}}]})};handleShortcuts=(y)=>{if(y.metaKey||y.ctrlKey){let x=!1;switch(y.key){case"s":case"r":this.doRefresh(),x=!0;break;case"/":this.flipLayout();break;case"c":if(y.shiftKey)this.copy(),x=!0;break}if(x)y.preventDefault(),y.stopPropagation()}};content=()=>[N1({part:"example"},Bi({part:"style"}),N1({part:"testIndicator",title:"test status"}),s7({part:"testResults",hidden:!0}),J0({title:"example menu",part:"exampleWidgets",onClick:this.exampleMenu},O.code())),N1({class:"code-editors",part:"codeEditors",onKeydown:this.handleShortcuts,hidden:!0}),wi({part:"sources",hidden:!0})];buildEditorPanel(){return X0({part:"editors",onChange:this.updateUndo},n1({name:"js",mode:"javascript",part:"js"}),n1({name:"html",mode:"html",part:"html"}),n1({name:"css",mode:"css",part:"css"}),n1({name:"DOM tests",mode:"javascript",part:"test"}),N1({slot:"after-tabs",class:"row"},J0({title:"undo",part:"undo",class:"transparent",onClick:this.undo},O.cornerUpLeft()),J0({title:"redo",part:"redo",class:"transparent",onClick:this.redo},O.cornerUpRight()),J0({title:"example menu — refresh, flip, undo, copy, save/revert edits",class:"transparent source-menu",onClick:this.sourceMenu},O.moreVertical()),J0({title:"close code",class:"transparent",onClick:this.closeCode},O.x())))}ensureEditors(){if(this.editorsBuilt||!this.hydrated)return;this.parts.codeEditors.append(this.buildEditorPanel()),this.editorsBuilt=!0,this.flushPendingValues(),this.ensureProductTabs(),this.showDefaultTab(),this.updateUndo()}connectedCallback(){super.connectedCallback();let{sources:y}=this.parts;this.initFromElements([...y.children]),this.remoteSync=new N0(this.storageKey,this.remoteKey,(h)=>{if(h.close){if(this.remoteId!=="")window.close();else this.classList.remove("-maximize"),this.parts.codeEditors.hidden=!0;return}if(this.css=h.css,this.html=h.html,this.js=h.js,h.test)this.test=h.test;if(this.remoteId!==""&&h.original&&!this.originalCode)this.originalCode={...h.original};this.refresh()}),this.remoteSync.startListening();let x=Math.random()*100;this.undoInterval=setInterval(()=>{if(!document.hidden)this.updateUndo()},250+x),this.beforeUnloadHandler=()=>this.remoteSync?.sendClose(),addEventListener("beforeunload",this.beforeUnloadHandler)}disconnectedCallback(){if(super.disconnectedCallback(),this.remoteSync?.sendClose(),this.remoteSync?.stopListening(),this.undoInterval)clearInterval(this.undoInterval),this.undoInterval=void 0;if(this.beforeUnloadHandler)removeEventListener("beforeunload",this.beforeUnloadHandler),this.beforeUnloadHandler=void 0}exampleMarkdown(){let y=(x,h)=>h!==""?"```"+x+`
108
- `+h.trim()+"\n```\n":"";return y(this.dialect,this.js)+y("html",this.html)+y("css",this.css)+y("test",this.test)}copy=()=>{navigator.clipboard.writeText(this.exampleMarkdown())};downloadExample=()=>{let y=this.getAttribute("data-source-file")||"example",x=this.getAttribute("data-example-ordinal"),h=(y.split("/").pop()||"example").replace(/\.\w+$/,"")+(x!==null?`-example-${x}`:"")+".md",C=URL.createObjectURL(new Blob([this.exampleMarkdown()],{type:"text/markdown"})),l=document.createElement("a");l.href=C,l.download=h,l.click(),setTimeout(()=>URL.revokeObjectURL(C),1000)};originalCode=null;localEditKey(){let y=this.getAttribute("data-source-file"),x=this.getAttribute("data-example-ordinal");return y&&x!==null?R7(y,x):""}applyEdit(y){if(y.js!==void 0)this.js=y.js;if(y.html!==void 0)this.html=y.html;if(y.css!==void 0)this.css=y.css;if(y.test!==void 0)this.test=y.test;if(y.compiledJs!==void 0&&y.js!==void 0)this.compiledJs=y.compiledJs,this.compiledJsSource=y.js}hasLocalEdits(){if(!this.originalCode)return!1;let y=this.originalCode,x=(h)=>(h??"").replace(/\s+$/,"");return x(this.js)!==x(y.js)||x(this.html)!==x(y.html)||x(this.css)!==x(y.css)||x(this.test)!==x(y.test)}updateEditedIndicator(){this.classList.toggle("-locally-edited",this.hasLocalEdits())}canUndo(){let y=this.activeTab;return y instanceof o1&&y.canUndo()}canRedo(){let y=this.activeTab;return y instanceof o1&&y.canRedo()}saveLocalEdit=()=>{let y=this.localEditKey();if(!y){window.alert("This example has no source mapping to key a local save.");return}D7(y,{js:this.js,html:this.html,css:this.css,test:this.test,compiledJs:this.dialect!=="js"&&this.compiledJsSource===this.js?this.compiledJs:void 0}),this.updateEditedIndicator(),f3({type:"success",message:"Saved to this browser only — use “Save to source” to write the file."})};revertLocalEdit=()=>{let y=this.localEditKey();if(y)b7(y);if(this.originalCode)this.applyEdit(this.originalCode);if(this.viewingChanges)this.viewChanges();this.updateEditedIndicator(),this.refresh()};snapshotAndRestoreLocalEdit=()=>{this.originalCode={js:this.js,html:this.html,css:this.css,test:this.test};let y=this.localEditKey();if(!y||!S7(y))return;let x=H7(y);if(x)this.applyEdit(x),this.updateEditedIndicator(),this.refresh()};viewingChanges=!1;viewChanges=()=>{if(!this.hydrated)return;if(this.ensureEditors(),this.viewingChanges=!this.viewingChanges,this.viewingChanges)this.showCode();let y=this.originalCode??{};for(let x of["js","html","css","test"])this.parts[x].original=y[x]??"",this.parts[x].showDiff(this.viewingChanges)};doRefresh=()=>{if(this.remoteId!=="")this.refreshRemote();else this.refresh()};sourceMenu=(y)=>{let x=this.localEditKey(),h=()=>this.hasLocalEdits(),C=this.originalCode!=null;n({target:y.target.closest("button"),width:"auto",menuItems:[{icon:"refreshCw",caption:"Refresh",shortcut:"⌘R",action:this.doRefresh},{icon:"columns",caption:"Flip layout",shortcut:"⌘/",action:this.flipLayout},{icon:"cornerUpLeft",caption:"Undo",shortcut:"⌘Z",action:this.undo,enabled:()=>this.canUndo()},{icon:"cornerUpRight",caption:"Redo",shortcut:"⌘⇧Z",action:this.redo,enabled:()=>this.canRedo()},null,{icon:"copy",caption:"Copy as markdown",shortcut:"⌘⇧C",action:this.copy},{icon:"download",caption:"Download",action:this.downloadExample},null,...C?[this.viewingChanges?{icon:"edit",caption:"Back to editing",action:this.viewChanges}:{icon:"code",caption:"View changes",action:this.viewChanges,enabled:h}]:[],...x?[{icon:"save",caption:"Save changes (local)",action:this.saveLocalEdit,enabled:h}]:[],...x&&d7?[{icon:"upload",caption:"Save to source",action:()=>{this.saveToSource()},enabled:h}]:[],...C?[{icon:"rotateCcw",caption:"Revert to original",action:this.revertLocalEdit,enabled:h}]:[]]})};toggleMaximize=()=>{this.classList.toggle("-maximize")};showCode=()=>{this.ensureEditors(),this.classList.add("-maximize"),this.classList.toggle("-vertical",this.offsetHeight>this.offsetWidth),this.parts.codeEditors.hidden=!1,this.ensureProductTabs()};closeCode=()=>{if(this.remoteId!=="")this.remoteSync?.sendClose(),window.close();else this.remoteSync?.sendClose(),this.classList.remove("-maximize"),this.parts.codeEditors.hidden=!0};openEditorWindow=()=>{let{css:y,html:x,js:h,test:C}=this;Y7(this.prefix,this.uuid,this.storageKey,this.remoteKey,{css:y,html:x,js:h,test:C},{sourceFile:this.getAttribute("data-source-file"),ordinal:this.getAttribute("data-example-ordinal"),original:this.originalCode??void 0}),this.classList.add("-maximize"),this.parts.codeEditors.hidden=!0};refreshRemote=()=>{this.remoteSync?.send({css:this.css,html:this.html,js:this.js,test:this.test})};updateSources=()=>{if(this.persistToDom){let{sources:y}=this.parts;y.innerText="";for(let x of["js","css","html","test"])if(this[x])y.append(s7({class:`language-${x}`,innerHTML:this[x]}))}};refresh=async()=>{if(this.remoteId!=="")return;let y=this.dialect!=="js"&&!_1.enabled.value&&this.compiledJs!==void 0&&this.compiledJsSource===this.js?this.compiledJs:void 0,x=y===void 0?await Y0(this.dialect):void 0,{example:h,style:C,exampleWidgets:l}=this.parts;if(this.dialect!=="js"){if(this.lastGeneratedJs=y??await this.computeGeneratedJs(x),this.jsOutEditor)this.jsOutEditor.value=this.lastGeneratedJs;if(y===void 0)this.compiledJs=this.lastGeneratedJs,this.compiledJsSource=this.js,await this.runInlineTjsTests(x)}let i,k,g=(q)=>{k=q},w=this.dialect!=="js"&&this.editorsBuilt?this.captureScope:void 0,B=this.effectiveMode;if(B==="iframe"||B==="ide")i=await S4({html:this.html,css:this.css,js:this.js,context:this.context,transform:x,compiledJs:y,exampleElement:h,widgetsElement:l,onError:g,onScope:w});else i=await b4({html:this.html,css:this.css,js:this.js,context:this.context,transform:x,compiledJs:y,exampleElement:h,styleElement:C,widgetsElement:l,onError:g,onScope:w});if(this.persistToDom)this.updateSources();if((this.test||k)&&_1.enabled.value){await new Promise((j)=>requestAnimationFrame(j)),this.classList.add("-has-tests","-test-running"),this.classList.remove("-test-passed","-test-failed");let q=this.dialect==="js"?x:await Y0("js");if(this.testResults=this.test&&i?await c4(this.test,i,this.context,q):{passed:0,failed:0,tests:[]},k)this.testResults.failed+=1,this.testResults.tests.unshift({name:"example loads without error",passed:!1,error:String(k)});this.classList.remove("-test-running"),this.displayTestResults()}else this.classList.remove("-has-tests","-test-running","-test-passed","-test-failed")};displayTestResults(){let{testResults:y,testIndicator:x}=this.parts,h=this.testResults;if(!h||h.tests.length===0){y.hidden=!0,this.classList.remove("-test-passed","-test-failed"),x.title="no tests";return}y.innerHTML="";let C=N1({style:{marginBottom:"8px",fontWeight:"bold"}},`${h.passed}/${h.tests.length} tests passed`);y.append(C);for(let l of h.tests){let i=l.passed?"✓":"✗",k=l.passed?"test-pass":"test-fail",g=N1({class:k},l9(i+" "),l.name,l.error?l9({style:{opacity:"0.7"}},` - ${l.error}`):"");y.append(g)}this.classList.toggle("-test-passed",h.failed===0),this.classList.toggle("-test-failed",h.failed>0),x.title=h.failed===0?`${h.passed} tests passed`:`${h.failed}/${h.tests.length} tests failed`,this.updateTestResultsVisibility(),this.dispatchEvent(new CustomEvent("testcomplete",{bubbles:!0,detail:{results:h,element:this}}))}initFromElements(y){for(let x of y){x.hidden=!0;let[h,...C]=x.innerHTML.split(`
109
- `);if(["js","html","css","test"].includes(h)){let l=C.filter((k)=>k.trim()!=="").map((k)=>k.match(/^\s*/)[0].length).sort()[0],i=(l>0?C.map((k)=>k.substring(l)):C).join(`
110
- `);this.setEditorValue(h,i)}else{let l=["js","html","css","test"].find((i)=>x.matches(`.language-${i}`));if(l)this.setEditorValue(l,l==="html"?x.innerHTML:x.innerText)}}}showDefaultTab(){if(!this.hydrated||!this.editorsBuilt){this.pendingShowDefaultTab=!0;return}let{editors:y}=this.parts;if(this.js!=="")y.value=0;else if(this.html!=="")y.value=1;else if(this.css!=="")y.value=2;else if(this.test!=="")y.value=3}render(){if(super.render(),this.remoteId!==""){let y=localStorage.getItem(this.storageKey);if(y!==null){let x=JSON.parse(y);if(this.remoteKey!==x.remoteKey)return;if(this.css=x.css,this.html=x.html,this.js=x.js,x.test)this.test=x.test;this.ensureEditors(),this.parts.example.hidden=!0,this.parts.codeEditors.hidden=!1,this.classList.add("-maximize"),this.updateUndo()}}else this.refresh()}}var T4=l2.elementCreator(),i9=new URL(window.location.href).searchParams,T7=i9.get("lx");if(T7){document.title+=" [code editor]",document.body.textContent="";let y=T4({remoteId:T7}),x=i9.get("sf"),h=i9.get("ord");if(x&&h!==null)y.setAttribute("data-source-file",x),y.setAttribute("data-example-ordinal",h);document.body.append(y)}var{slot:L7}=G;class I2 extends F{static preferredTagName="tosi-sidenav";static initAttributes={minSize:800,navSize:200,compact:!1,contentVisible:!1};value="normal";content=[L7({name:"nav",part:"nav"}),L7({part:"content"})];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:`${P.navWidth("50%")} ${P.contentWidth("50%")}`,gridTemplateRows:"100%",position:"relative",margin:P.margin("0 0 0 -100%"),transition:P.sideNavTransition("0.25s ease-out")},":host slot":{position:"relative"},":host slot:not([name])":{display:"block"},':host slot[name="nav"]':{display:"block"}};handleResize=()=>{let{content:y}=this.parts,x=this.offsetParent;if(x===null)return;let h;if(this.compact=x.offsetWidth<this.minSize,[...this.childNodes].find((l)=>l instanceof Element?l.getAttribute("slot")!=="nav":!0)===void 0)h="compact/nav",this.style.setProperty("--nav-width","100%"),this.style.setProperty("--content-width","0%");else if(!this.compact)h="normal",y.classList.add("-tosi-sidenav-visible"),this.style.setProperty("--nav-width",`${this.navSize}px`),this.style.setProperty("--content-width",`calc(100% - ${this.navSize}px)`),this.style.setProperty("--margin","0");else if(y.classList.remove("-tosi-sidenav-visible"),this.style.setProperty("--nav-width","50%"),this.style.setProperty("--content-width","50%"),this.contentVisible)h="compact/content",this.style.setProperty("--margin","0 0 0 -100%");else h="compact/nav",this.style.setProperty("--margin","0 -100% 0 0");if(this.value!==h)this.value=h};observer;connectedCallback(){super.connectedCallback(),this.contentVisible=this.parts.content.childNodes.length===0,globalThis.addEventListener("resize",this.handleResize),this.observer=new MutationObserver(this.handleResize),this.observer.observe(this,{childList:!0}),this.style.setProperty("--side-nav-transition","0s"),setTimeout(()=>{this.style.removeProperty("--side-nav-transition")},250)}disconnectedCallback(){super.disconnectedCallback(),this.observer.disconnect()}render(){super.render(),this.handleResize()}}var qi=I2,Z0=I2.elementCreator(),ji=Z0,Vi=Z0;var{div:p0,span:v0,a:R0,header:Pi,button:B9,template:_i,input:Ai,h2:Ki,details:Ui,summary:Gi,ul:r7,li:o7}=G,c2={pass:P.testColorPass("#0a0"),fail:P.testColorFail("#c00"),running:P.testColorRunning("#fa0")},Fi={".view-source":{opacity:"0.9"},".view-source:hover":{opacity:"1"},"@keyframes test-pulse":{"0%, 100%":{opacity:"1"},"50%":{opacity:"0.7"}},"@keyframes test-appear":{from:{opacity:"0",transform:"scale(0.8)"},to:{opacity:"1",transform:"scale(1)"}},"@keyframes test-fade":{"0%, 20%":{opacity:"1",transform:"scale(1)"},"70%":{opacity:"1",transform:"scale(1.1)"},"100%":{opacity:"0",transform:"scale(0.9)",pointerEvents:"none"}},"body:not(.tests-enabled) .doc-link::after, body:not(.tests-enabled) .test-widget":{display:"none !important"},".doc-link.-test-passed::after, .doc-link.-test-failed::after":{content:"''",width:z.fontSize50,height:z.fontSize50,borderRadius:"50%",marginLeft:z.spacing50,display:"inline-block",verticalAlign:"middle"},".doc-link.-test-passed::after":{background:c2.pass},".doc-link.-test-failed::after":{background:c2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget":{_testBg:c2.running,position:"fixed",bottom:z.spacing,right:z.spacing,zIndex:"1000",background:z.testBg,color:"white",gap:z.spacing50},".test-widget[hidden]":{display:"none"},".test-widget.-running":{_testBg:c2.running,animation:"test-appear 0.3s ease-out, test-pulse 2s ease-in-out 0.3s infinite"},".test-widget.-passed":{_testBg:c2.pass,animation:"test-fade 3s ease-out forwards"},".test-widget.-failed":{_testBg:c2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget .count":{background:"white",color:z.testBg,borderRadius:"50%",width:z.lineHeight,height:z.lineHeight,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold"},"@keyframes example-target-pulse":{from:{boxShadow:`0 0 0 3px ${P.accent("#007aff")}`},to:{boxShadow:"0 0 0 3px transparent"}},".example-target":{animation:"example-target-pulse 1.5s ease-out",borderRadius:z.roundedRadius}},Oi=0;function z9(y){let{docs:x,context:h={},projectName:C="",projectLinks:l={},navSize:i=200,minSize:k=600,routing:g="query",initialRoute:w,onRouteChange:B,navbarLinks:q,contentElement:j}=y,_=g==="memory";for(let V of x)V.testStatus=void 0;let K=g==="query"?{}:b2(x),U=(V)=>K[V]??V,Q=(V)=>{for(let A of x)if(U(A.filename)===V)return A.filename;return""},Y=(V)=>g==="query"?`?${V}`:J3(U(V)),$=()=>{if(_)return w?Q(w):"";return g==="path"?Z3(document.location.pathname,K):document.location.search!==""?document.location.search.substring(1).split("&")[0]:""},Z=(V)=>{let A=V.getAttribute("href")||"";if(A===""||A.startsWith("#"))return null;let W;try{W=new URL(A,document.location.href)}catch{return null}if(W.origin!==document.location.origin)return null;let H=(d)=>x.some((m)=>m.filename===d)?d:null,J=W.search.replace(/^\?/,"");if(J!==""&&!J.includes("=")&&!J.includes("&")){let d=H(decodeURIComponent(J));if(d)return d}if(!_&&g!=="query"){let d=H(Z3(W.pathname,K));if(d)return d}return null},p=$()||x[0]?.filename||"README.md",T=x.find((V)=>V.filename===p)||x[0],C1=`docBrowser${Oi++}`,N=t({[C1]:{docs:x,currentDoc:T,compact:!1}})[C1],I=()=>{},D={},v,A1=!1,u1=0,w5=0;if(!_)window.__docTestResults=new Promise((V)=>{v=V});let d9=(V)=>{let A=D[V],W=N.docs.find((H)=>H.filename===V);if(W)W.testStatus=A?A.passed?"passed":"failed":void 0;I()},Ry=()=>{if(w5>=u1&&v){let V={passed:0,failed:0,pages:D};for(let A of Object.values(D))V.passed+=A.totalPassed,V.failed+=A.totalFailed;if(v(V),v=void 0,L9&&!f2)fetch("/report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)}).catch(()=>{})}},L9=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1",Dy=(V)=>{let{results:A}=V.detail,W=String(N.currentDoc.filename);D[W]={passed:A.failed===0,tests:[...A.tests],totalPassed:A.passed,totalFailed:A.failed},d9(W)},B5=(V)=>{w5++,Ry(),V5()};r1.docLink={toDOM(V,A){V.setAttribute("href",Y(A)),V.dataset.filename=A}},r1.current={toDOM(V,A){V.classList.toggle("current",A===V.dataset.filename)}},r1.testStatus={toDOM(V,A){if(V.classList.remove("-test-passed","-test-failed"),A==="passed")V.classList.add("-test-passed");else if(A==="failed")V.classList.add("-test-failed")}};let Hy=l0(()=>{let V=z5.value.toLocaleLowerCase();N.docs.forEach((A)=>{A.hidden=!A.title.toLocaleLowerCase().includes(V)&&!A.text.toLocaleLowerCase().includes(V)}),O1(N.docs),I(!0)}),z5=Ai({slot:"nav",placeholder:"search",type:"search",style:{width:"calc(100% - 10px)",margin:"5px"},onInput:Hy});if(!_)window.addEventListener("popstate",()=>{if(s){if(L0()&&!window.confirm("Discard unsaved changes to the source?")){let V=Y(String(s.doc.filename));window.history.pushState({href:V},"",V);return}j5()}T0($())}),window.addEventListener("beforeunload",(V)=>{if(L0())V.preventDefault(),V.returnValue=""});let F2=null,o2=[B9({class:"iconic",style:{color:z.linkColor},title:"navigation",bind:{value:N.compact,binding:{toDOM(V,A){V.style.display=A?"":"none",V.nextSibling.style.display=A?"":"none"}}},onClick(){if(F2)F2.contentVisible=!F2.contentVisible}},O.menu()),v0({style:{flex:"0 0 10px"}})];if(C)o2.push(R0({href:"/",style:{display:"flex",alignItems:"center",borderBottom:"none"}},l.tosijs?O.tosiUi({style:{_xinIconSize:40,marginRight:10}}):v0(),Ki(C)));o2.push(v0({class:"elastic"}));let r9=(V)=>{let A=V.icon?O[V.icon]:void 0;return R0({class:A?"iconic":"",title:V.label,target:"_blank",href:V.href},A?A():V.label)};if(q)q.forEach((V)=>o2.push(r9(V)));else{let V=[[l.tosijs,"tosi","tosijs"],[l.discord,"discord","discord"],[l.blog,"blog","blog"],[l.github,"github","github"],[l.npm,"npm","npmjs"]];for(let[A,W,H]of V)if(A)o2.push(r9({href:A,label:H,icon:W}))}let k1=j||p0();k1.classList.add("doc-content"),Object.assign(k1.style,{display:"block",maxWidth:"var(--doc-content-max-width, 44em)",margin:"auto",padding:"0 1em",overflow:"hidden"});let o9=()=>{for(let V of k1.querySelectorAll("a")){let A=Z(V);if(A!==null)V.setAttribute("href",Y(A)),V.dataset.docLink=A}},by=()=>{if(_)return;let V=location.hash.replace(/^#/,"");if(!V)return;requestAnimationFrame(()=>{let A=null;try{A=k1.querySelector(`#${CSS.escape(V)}`)}catch{A=null}if(!A)return;A.scrollIntoView({block:"center",behavior:"smooth"}),A.classList.add("example-target"),setTimeout(()=>A&&A.classList.remove("example-target"),1600)})},n9=j!==void 0&&!_,f9=(V)=>{if(n9)n9=!1;else k1.innerHTML=Q0(V.text,{bakes:V.bakes?new Map(V.bakes):void 0});if(o9(),l2.insertExamples(k1,h,V.path||void 0),by(),g==="path")document.title=U7(V,C)},T0=(V)=>{let A=x.find((W)=>W.filename===V)||x[0];N.currentDoc=A,f9(A),I(!0)},d0=(V)=>{if(!sy())return;if(_)B?.(U(V));else{let A=Y(V);window.history.pushState({href:A},"",A)}T0(V)};k1.addEventListener("click",(V)=>{if(V.defaultPrevented||V.button!==0||V.metaKey||V.ctrlKey||V.shiftKey||V.altKey)return;let A=V.target.closest("a");if(!A||A.target==="_blank"||A.hasAttribute("download"))return;let W=Z(A);if(W===null)return;V.preventDefault(),d0(W)});let Sy=(V)=>V.endsWith(".md")?"markdown":V.endsWith(".css")?"css":V.endsWith(".ts")||V.endsWith(".tjs")?"typescript":"javascript",My=(V,A)=>{if(A.endsWith(".md"))return V;return(V.match(/\/\*#[\s\S]+?\*\//g)||[]).map((H)=>H.substring(3,H.length-2).trim()).join(`
106
+ return ${h.testRunner}`,B={preview:L1({class:"preview"}),...this.context},w=Object.keys(B).map(C2),g=Object.values(B),z=new P2(...w,k);this.lastTjsTests=await z(...g)}catch(C){this.lastTjsTests={passed:0,failed:1,results:[{description:"inline tests failed to run",passed:!1,error:String(C)}]}}this.renderTjsTests()}renderTjsTests(){let y=this.tjsTestsView;if(!y)return;let x=this.lastTjsTests;if(!x||x.results.length===0){y.replaceChildren(L1({class:"tjs-test-empty"},"No inline tjs tests."));return}y.replaceChildren(L1({class:"tjs-test-summary"},`${x.passed}/${x.results.length} passed`),...x.results.map((h)=>L1({class:h.passed?"test-pass":"test-fail"},`${h.passed?"✓":"✗"} ${h.description}`,h.error?j9({class:"tjs-test-error"},` — ${h.error}`):"")))}async computeGeneratedJs(y){if(this.dialect==="js")return"";try{return(await y(W1(this.js,Object.keys(this.context)))).code}catch(x){return`// transpile error:
107
+ // ${x.message}`}}ensureProductTabs(){if(this.productTabsReady||this.dialect==="js"||!this.hydrated||!this.editorsBuilt)return;this.productTabsReady=!0;let{editors:y}=this.parts;if(this.parts.js.setAttribute("name",this.dialect),this.parts.js.tjsAutocomplete={getLiveBindings:()=>this.liveBindings()},this.parts.js.mode=this.dialect,this.jsOutEditor=m1({name:"JS",mode:"javascript",disabled:!0}),y.append(this.jsOutEditor),this.inlineTjsTestCount>0)this.tjsTestsView=L1({name:"tjs tests",class:"tjs-test-results"}),y.append(this.tjsTestsView);y.setupTabs(),this.jsOutEditor.value=this.lastGeneratedJs,this.renderTjsTests()}captureScope=(y)=>{this.capturedScope=y};liveBindings(){let y={};for(let[h,C]of Object.entries(this.context))y[C2(h)]=C;let x=this.parts.example?.querySelector(".preview");if(x)y.preview=x;return Object.assign(y,this.capturedScope),y}updateUndo=()=>{if(this.editorsBuilt){let{activeTab:y}=this,{undo:x,redo:h}=this.parts;if(y instanceof r1)x.disabled=!y.canUndo(),h.disabled=!y.canRedo();else x.disabled=!0,h.disabled=!0}this.updateEditedIndicator(),this.updateTestResultsVisibility()};updateTestResultsVisibility(){let{testResults:y}=this.parts,x=this.testResults,h=this.editorsBuilt&&this.activeTab===this.parts.test,C=x&&x.failed>0;y.hidden=!x||x.tests.length===0||!h&&!C}undo=()=>{let{activeTab:y}=this;if(y instanceof r1)y.undo()};redo=()=>{let{activeTab:y}=this;if(y instanceof r1)y.redo()};get isMaximized(){return this.classList.contains("-maximize")}flipLayout=()=>{this.classList.toggle("-vertical")};saveToSource=async()=>{let y=this.getAttribute("data-source-file"),x=this.getAttribute("data-example-ordinal");if(!y||x===null){window.alert("No source mapping for this example.");return}let h;try{let k=await fetch(`/__docstore/source?file=${encodeURIComponent(y)}`);if(!k.ok)throw Error(String(k.status));h=await k.text()}catch{window.alert("Source endpoint unavailable — saving to source works in dev only.");return}let C=T7(h,Number(x),{js:this.js,html:this.html,css:this.css,test:this.test});if(C===null){let k=Number(x),B=g9(h,w9(h));if(k>=B.length)window.alert(`Couldn't locate this example in ${y}: it's example #${k+1} on the page, but a raw scan of the file finds only ${B.length} fenced example group(s). The page↔source ordinals `+"disagree — likely multiple docs in one file, or indented fences. "+"(File a report with the source structure.)");else window.alert("No changes to save.");return}try{let k=await fetch("/__docstore/source",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:y,content:C})});if(!k.ok)throw Error(String(k.status));window.alert(`Saved to ${y}`)}catch{window.alert("Save failed.")}};handleTestsToggle=(y)=>{if(y.target.checked)A9();else _9()};updateExampleWidgets=()=>{if(!this.hydrated)return;if(this.parts.testsCheckbox)this.parts.testsCheckbox.checked=K1.enabled.value};handleShortcuts=(y)=>{if(y.metaKey||y.ctrlKey){let x=!1;switch(y.key){case"s":case"r":this.doRefresh(),x=!0;break;case"/":this.flipLayout();break;case"c":if(y.shiftKey)this.copy(),x=!0;break}if(x)y.preventDefault(),y.stopPropagation()}};content=()=>[L1({part:"example"},$B({part:"style"}),m7({part:"testResults",hidden:!0}),a3({part:"exampleWidgets",icon:"code",direction:"w"},U2({title:"view/edit code",onClick:this.showCode},Q.edit2()),U2({title:"view/edit code in a new window",onClick:this.openEditorWindow},Q.edit()),U2({title:"toggle preview size",onClick:this.toggleMaximize},Q.maximize({class:"hide-if-maximized"}),Q.minimize({class:"show-if-maximized"})),YB({class:"tests-toggle",title:"run tests"},iB({type:"checkbox",part:"testsCheckbox",onChange:this.handleTestsToggle}),Q.check()))),L1({class:"code-editors",part:"codeEditors",onKeydown:this.handleShortcuts,hidden:!0}),QB({part:"sources",hidden:!0})];buildEditorPanel(){return N0({part:"editors",onChange:this.updateUndo},m1({name:"js",mode:"javascript",part:"js"}),m1({name:"html",mode:"html",part:"html"}),m1({name:"css",mode:"css",part:"css"}),m1({name:"DOM tests",mode:"javascript",part:"test"}),L1({slot:"after-tabs",class:"row"},U2({title:"undo",part:"undo",class:"transparent",onClick:this.undo},Q.cornerUpLeft()),U2({title:"redo",part:"redo",class:"transparent",onClick:this.redo},Q.cornerUpRight()),U2({title:"example menu — refresh, flip, undo, copy, save/revert edits",class:"transparent source-menu",onClick:this.sourceMenu},Q.moreVertical()),U2({title:"close code",class:"transparent",onClick:this.closeCode},Q.x())))}ensureEditors(){if(this.editorsBuilt||!this.hydrated)return;this.parts.codeEditors.append(this.buildEditorPanel()),this.editorsBuilt=!0,this.flushPendingValues(),this.ensureProductTabs(),this.showDefaultTab(),this.updateUndo()}connectedCallback(){super.connectedCallback();let{sources:y}=this.parts;this.initFromElements([...y.children]),this.remoteSync=new Z0(this.storageKey,this.remoteKey,(h)=>{if(h.close){if(this.remoteId!=="")window.close();else this.classList.remove("-maximize"),this.parts.codeEditors.hidden=!0;return}if(this.css=h.css,this.html=h.html,this.js=h.js,h.test)this.test=h.test;if(this.remoteId!==""&&h.original&&!this.originalCode)this.originalCode={...h.original};this.refresh()}),this.remoteSync.startListening();let x=Math.random()*100;this.undoInterval=setInterval(()=>{if(!document.hidden)this.updateUndo()},250+x),this.beforeUnloadHandler=()=>this.remoteSync?.sendClose(),addEventListener("beforeunload",this.beforeUnloadHandler),this.updateExampleWidgets()}disconnectedCallback(){if(super.disconnectedCallback(),this.remoteSync?.sendClose(),this.remoteSync?.stopListening(),this.undoInterval)clearInterval(this.undoInterval),this.undoInterval=void 0;if(this.beforeUnloadHandler)removeEventListener("beforeunload",this.beforeUnloadHandler),this.beforeUnloadHandler=void 0}exampleMarkdown(){let y=(x,h)=>h!==""?"```"+x+`
108
+ `+h.trim()+"\n```\n":"";return y(this.dialect,this.js)+y("html",this.html)+y("css",this.css)+y("test",this.test)}copy=()=>{navigator.clipboard.writeText(this.exampleMarkdown())};downloadExample=()=>{let y=this.getAttribute("data-source-file")||"example",x=this.getAttribute("data-example-ordinal"),h=(y.split("/").pop()||"example").replace(/\.\w+$/,"")+(x!==null?`-example-${x}`:"")+".md",C=URL.createObjectURL(new Blob([this.exampleMarkdown()],{type:"text/markdown"})),k=document.createElement("a");k.href=C,k.download=h,k.click(),setTimeout(()=>URL.revokeObjectURL(C),1000)};originalCode=null;localEditKey(){let y=this.getAttribute("data-source-file"),x=this.getAttribute("data-example-ordinal");return y&&x!==null?p7(y,x):""}applyEdit(y){if(y.js!==void 0)this.js=y.js;if(y.html!==void 0)this.html=y.html;if(y.css!==void 0)this.css=y.css;if(y.test!==void 0)this.test=y.test;if(y.compiledJs!==void 0&&y.js!==void 0)this.compiledJs=y.compiledJs,this.compiledJsSource=y.js}hasLocalEdits(){if(!this.originalCode)return!1;let y=this.originalCode,x=(h)=>(h??"").replace(/\s+$/,"");return x(this.js)!==x(y.js)||x(this.html)!==x(y.html)||x(this.css)!==x(y.css)||x(this.test)!==x(y.test)}updateEditedIndicator(){this.classList.toggle("-locally-edited",this.hasLocalEdits())}canUndo(){let y=this.activeTab;return y instanceof r1&&y.canUndo()}canRedo(){let y=this.activeTab;return y instanceof r1&&y.canRedo()}saveLocalEdit=()=>{let y=this.localEditKey();if(!y){window.alert("This example has no source mapping to key a local save.");return}L7(y,{js:this.js,html:this.html,css:this.css,test:this.test,compiledJs:this.dialect!=="js"&&this.compiledJsSource===this.js?this.compiledJs:void 0}),this.updateEditedIndicator(),y9({type:"success",message:"Saved to this browser only — use “Save to source” to write the file."})};revertLocalEdit=()=>{let y=this.localEditKey();if(y)d7(y);if(this.originalCode)this.applyEdit(this.originalCode);if(this.viewingChanges)this.viewChanges();this.updateEditedIndicator(),this.refresh()};snapshotAndRestoreLocalEdit=()=>{this.originalCode={js:this.js,html:this.html,css:this.css,test:this.test};let y=this.localEditKey();if(!y||!f7(y))return;let x=c7(y);if(x)this.applyEdit(x),this.updateEditedIndicator(),this.refresh()};viewingChanges=!1;viewChanges=()=>{if(!this.hydrated)return;if(this.ensureEditors(),this.viewingChanges=!this.viewingChanges,this.viewingChanges)this.showCode();let y=this.originalCode??{};for(let x of["js","html","css","test"])this.parts[x].original=y[x]??"",this.parts[x].showDiff(this.viewingChanges)};doRefresh=()=>{if(this.remoteId!=="")this.refreshRemote();else this.refresh()};sourceMenu=(y)=>{let x=this.localEditKey(),h=()=>this.hasLocalEdits(),C=this.originalCode!=null;r({target:y.target.closest("button"),width:"auto",menuItems:[{icon:"refreshCw",caption:"Refresh",shortcut:"⌘R",action:this.doRefresh},{icon:"columns",caption:"Flip layout",shortcut:"⌘/",action:this.flipLayout},{icon:"cornerUpLeft",caption:"Undo",shortcut:"⌘Z",action:this.undo,enabled:()=>this.canUndo()},{icon:"cornerUpRight",caption:"Redo",shortcut:"⌘⇧Z",action:this.redo,enabled:()=>this.canRedo()},null,{icon:"copy",caption:"Copy as markdown",shortcut:"⌘⇧C",action:this.copy},{icon:"download",caption:"Download",action:this.downloadExample},null,...C?[this.viewingChanges?{icon:"edit",caption:"Back to editing",action:this.viewChanges}:{icon:"code",caption:"View changes",action:this.viewChanges,enabled:h}]:[],...x?[{icon:"save",caption:"Save changes (local)",action:this.saveLocalEdit,enabled:h}]:[],...x&&E7?[{icon:"upload",caption:"Save to source",action:()=>{this.saveToSource()},enabled:h}]:[],...C?[{icon:"rotateCcw",caption:"Revert to original",action:this.revertLocalEdit,enabled:h}]:[]]})};toggleMaximize=()=>{this.classList.toggle("-maximize")};showCode=()=>{this.ensureEditors(),this.classList.add("-maximize"),this.classList.toggle("-vertical",this.offsetHeight>this.offsetWidth),this.parts.codeEditors.hidden=!1,this.ensureProductTabs()};closeCode=()=>{if(this.remoteId!=="")this.remoteSync?.sendClose(),window.close();else this.remoteSync?.sendClose(),this.classList.remove("-maximize"),this.parts.codeEditors.hidden=!0};openEditorWindow=()=>{let{css:y,html:x,js:h,test:C}=this;v7(this.prefix,this.uuid,this.storageKey,this.remoteKey,{css:y,html:x,js:h,test:C},{sourceFile:this.getAttribute("data-source-file"),ordinal:this.getAttribute("data-example-ordinal"),original:this.originalCode??void 0}),this.classList.add("-maximize"),this.parts.codeEditors.hidden=!0};refreshRemote=()=>{this.remoteSync?.send({css:this.css,html:this.html,js:this.js,test:this.test})};updateSources=()=>{if(this.persistToDom){let{sources:y}=this.parts;y.innerText="";for(let x of["js","css","html","test"])if(this[x])y.append(m7({class:`language-${x}`,innerHTML:this[x]}))}};refresh=async()=>{if(this.remoteId!=="")return;let y=this.dialect!=="js"&&!K1.enabled.value&&this.compiledJs!==void 0&&this.compiledJsSource===this.js?this.compiledJs:void 0,x=y===void 0?await J0(this.dialect):void 0,{example:h,style:C,exampleWidgets:k}=this.parts;if(this.dialect!=="js"){if(this.lastGeneratedJs=y??await this.computeGeneratedJs(x),this.jsOutEditor)this.jsOutEditor.value=this.lastGeneratedJs;if(y===void 0)this.compiledJs=this.lastGeneratedJs,this.compiledJsSource=this.js,await this.runInlineTjsTests(x)}let B,w,g=(j)=>{w=j},z=this.dialect!=="js"&&this.editorsBuilt?this.captureScope:void 0,q=this.effectiveMode;if(q==="iframe"||q==="ide")B=await T4({html:this.html,css:this.css,js:this.js,context:this.context,transform:x,compiledJs:y,exampleElement:h,widgetsElement:k,onError:g,onScope:z});else B=await b4({html:this.html,css:this.css,js:this.js,context:this.context,transform:x,compiledJs:y,exampleElement:h,styleElement:C,widgetsElement:k,onError:g,onScope:z});if(this.persistToDom)this.updateSources();if((this.test||w)&&K1.enabled.value){await new Promise((V)=>requestAnimationFrame(V)),this.classList.add("-has-tests","-test-running"),this.classList.remove("-test-passed","-test-failed");let j=this.dialect==="js"?x:await J0("js");if(this.testResults=this.test&&B?await c4(this.test,B,this.context,j):{passed:0,failed:0,tests:[]},w)this.testResults.failed+=1,this.testResults.tests.unshift({name:"example loads without error",passed:!1,error:String(w)});this.classList.remove("-test-running"),this.displayTestResults()}else this.classList.remove("-has-tests","-test-running","-test-passed","-test-failed")};displayTestResults(){let{testResults:y,exampleWidgets:x}=this.parts,h=this.testResults;if(!h||h.tests.length===0){if(y.hidden=!0,this.classList.remove("-test-passed","-test-failed"),x)x.title="no tests";return}y.innerHTML="";let C=L1({style:{marginBottom:"8px",fontWeight:"bold"}},`${h.passed}/${h.tests.length} tests passed`);y.append(C);for(let k of h.tests){let B=k.passed?"✓":"✗",w=k.passed?"test-pass":"test-fail",g=L1({class:w},j9(B+" "),k.name,k.error?j9({style:{opacity:"0.7"}},` - ${k.error}`):"");y.append(g)}if(this.classList.toggle("-test-passed",h.failed===0),this.classList.toggle("-test-failed",h.failed>0),x)x.title=h.failed===0?`${h.passed} tests passed`:`${h.failed}/${h.tests.length} tests failed`;this.updateTestResultsVisibility(),this.dispatchEvent(new CustomEvent("testcomplete",{bubbles:!0,detail:{results:h,element:this}}))}initFromElements(y){for(let x of y){x.hidden=!0;let[h,...C]=x.innerHTML.split(`
109
+ `);if(["js","html","css","test"].includes(h)){let k=C.filter((w)=>w.trim()!=="").map((w)=>w.match(/^\s*/)[0].length).sort()[0],B=(k>0?C.map((w)=>w.substring(k)):C).join(`
110
+ `);this.setEditorValue(h,B)}else{let k=["js","html","css","test"].find((B)=>x.matches(`.language-${B}`));if(k)this.setEditorValue(k,k==="html"?x.innerHTML:x.innerText)}}}showDefaultTab(){if(!this.hydrated||!this.editorsBuilt){this.pendingShowDefaultTab=!0;return}let{editors:y}=this.parts;if(this.js!=="")y.value=0;else if(this.html!=="")y.value=1;else if(this.css!=="")y.value=2;else if(this.test!=="")y.value=3}render(){if(super.render(),this.updateExampleWidgets(),this.remoteId!==""){let y=localStorage.getItem(this.storageKey);if(y!==null){let x=JSON.parse(y);if(this.remoteKey!==x.remoteKey)return;if(this.css=x.css,this.html=x.html,this.js=x.js,x.test)this.test=x.test;this.ensureEditors(),this.parts.example.hidden=!0,this.parts.codeEditors.hidden=!1,this.classList.add("-maximize"),this.updateUndo()}}else this.refresh()}}var f4=k2.elementCreator(),V9=new URL(window.location.href).searchParams,n7=V9.get("lx");if(n7){document.title+=" [code editor]",document.body.textContent="";let y=f4({remoteId:n7}),x=V9.get("sf"),h=V9.get("ord");if(x&&h!==null)y.setAttribute("data-source-file",x),y.setAttribute("data-example-ordinal",h);document.body.append(y)}var{slot:o7}=G;class L2 extends ${static preferredTagName="tosi-sidenav";static initAttributes={minSize:800,navSize:200,compact:!1,contentVisible:!1};value="normal";content=[o7({name:"nav",part:"nav"}),o7({part:"content"})];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:`${A.navWidth("50%")} ${A.contentWidth("50%")}`,gridTemplateRows:"100%",position:"relative",margin:A.margin("0 0 0 -100%"),transition:A.sideNavTransition("0.25s ease-out")},":host slot":{position:"relative"},":host slot:not([name])":{display:"block"},':host slot[name="nav"]':{display:"block"}};handleResize=()=>{let{content:y}=this.parts,x=this.offsetParent;if(x===null)return;let h;if(this.compact=x.offsetWidth<this.minSize,[...this.childNodes].find((k)=>k instanceof Element?k.getAttribute("slot")!=="nav":!0)===void 0)h="compact/nav",this.style.setProperty("--nav-width","100%"),this.style.setProperty("--content-width","0%");else if(!this.compact)h="normal",y.classList.add("-tosi-sidenav-visible"),this.style.setProperty("--nav-width",`${this.navSize}px`),this.style.setProperty("--content-width",`calc(100% - ${this.navSize}px)`),this.style.setProperty("--margin","0");else if(y.classList.remove("-tosi-sidenav-visible"),this.style.setProperty("--nav-width","50%"),this.style.setProperty("--content-width","50%"),this.contentVisible)h="compact/content",this.style.setProperty("--margin","0 0 0 -100%");else h="compact/nav",this.style.setProperty("--margin","0 -100% 0 0");if(this.value!==h)this.value=h};observer;connectedCallback(){super.connectedCallback(),this.contentVisible=this.parts.content.childNodes.length===0,globalThis.addEventListener("resize",this.handleResize),this.observer=new MutationObserver(this.handleResize),this.observer.observe(this,{childList:!0}),this.style.setProperty("--side-nav-transition","0s"),setTimeout(()=>{this.style.removeProperty("--side-nav-transition")},250)}disconnectedCallback(){super.disconnectedCallback(),this.observer.disconnect()}render(){super.render(),this.handleResize()}}var FB=L2,R0=L2.elementCreator(),NB=R0,WB=R0;var{div:D0,span:d2,a:H0,header:JB,button:K9,template:ZB,input:RB,h2:DB,img:HB,details:vB,summary:MB,ul:a7,li:t7}=G,c2={pass:A.testColorPass("#0a0"),fail:A.testColorFail("#c00"),running:A.testColorRunning("#fa0")},SB={".view-source":{opacity:"0.9"},".view-source:hover":{opacity:"1"},"@keyframes test-pulse":{"0%, 100%":{opacity:"1"},"50%":{opacity:"0.7"}},"@keyframes test-appear":{from:{opacity:"0",transform:"scale(0.8)"},to:{opacity:"1",transform:"scale(1)"}},"@keyframes test-fade":{"0%, 20%":{opacity:"1",transform:"scale(1)"},"70%":{opacity:"1",transform:"scale(1.1)"},"100%":{opacity:"0",transform:"scale(0.9)",pointerEvents:"none"}},"body:not(.tests-enabled) .doc-link::after, body:not(.tests-enabled) .test-widget":{display:"none !important"},".doc-link.-test-passed::after, .doc-link.-test-failed::after":{content:"''",width:l.fontSize50,height:l.fontSize50,borderRadius:"50%",marginLeft:l.spacing50,display:"inline-block",verticalAlign:"middle"},".doc-link.-test-passed::after":{background:c2.pass},".doc-link.-test-failed::after":{background:c2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget":{_testBg:c2.running,position:"fixed",bottom:l.spacing,left:l.spacing,zIndex:"1000",background:l.testBg,color:"white",gap:l.spacing50},".test-widget[hidden]":{display:"none"},".test-widget.-running":{_testBg:c2.running,animation:"test-appear 0.3s ease-out, test-pulse 2s ease-in-out 0.3s infinite"},".test-widget.-passed":{_testBg:c2.pass,animation:"test-fade 3s ease-out forwards"},".test-widget.-failed":{_testBg:c2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget .count":{background:"white",color:l.testBg,borderRadius:"50%",width:l.lineHeight,height:l.lineHeight,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold"},"@keyframes example-target-pulse":{from:{boxShadow:`0 0 0 3px ${A.accent("#007aff")}`},to:{boxShadow:"0 0 0 3px transparent"}},".example-target":{animation:"example-target-pulse 1.5s ease-out",borderRadius:l.roundedRadius}},s4=40,u4=10;function IB(y){return/^(https?:)?\/\//.test(y)||y.startsWith("data:")||y.startsWith("/")||y.startsWith("./")||y.startsWith("../")||/\.(png|jpe?g|gif|webp|avif|svg|ico)(\?.*)?$/i.test(y)}function bB(y,x){if(y){if(y.trimStart().startsWith("<")){let h=d2({style:{display:"inline-flex",height:`${s4}px`,marginRight:`${u4}px`}});return h.innerHTML=y,h}if(IB(y))return HB({src:y,alt:"",style:{height:`${s4}px`,marginRight:`${u4}px`}});return Q[y]({style:{_xinIconSize:s4,marginRight:u4}})}return x.tosijs?Q.tosiUi({style:{_xinIconSize:s4,marginRight:u4}}):d2()}var TB=0;function P9(y){let{docs:x,context:h={},projectName:C="",projectLinks:k={},logo:B,navSize:w=200,minSize:g=600,routing:z="query",initialRoute:q,onRouteChange:j,navbarLinks:V,contentElement:_}=y,P=z==="memory";for(let X of x)X.testStatus=void 0;let U=z==="query"?{}:b2(x),i=(X)=>U[X]??X,N=(X)=>{for(let K of x)if(i(K.filename)===X)return K.filename;return""},F=(X)=>z==="query"?`?${X}`:v3(i(X)),R=()=>{if(P)return q?N(q):"";return z==="path"?M3(document.location.pathname,U):document.location.search!==""?document.location.search.substring(1).split("&")[0]:""},D=(X)=>{let K=X.getAttribute("href")||"";if(K===""||K.startsWith("#"))return null;let Y;try{Y=new URL(K,document.location.href)}catch{return null}if(Y.origin!==document.location.origin)return null;let M=(L)=>x.some((t)=>t.filename===L)?L:null,W=Y.search.replace(/^\?/,"");if(W!==""&&!W.includes("=")&&!W.includes("&")){let L=M(decodeURIComponent(W));if(L)return L}if(!P&&z!=="query"){let L=M(M3(Y.pathname,U));if(L)return L}return null},f=R()||x[0]?.filename||"README.md",y1=x.find((X)=>X.filename===f)||x[0],H=`docBrowser${TB++}`,J=e({[H]:{docs:x,currentDoc:y1,compact:!1}})[H],u=()=>{},Z={},E,c0=!1,Q2=0,V5=0;if(!P)window.__docTestResults=new Promise((X)=>{E=X});let E9=(X)=>{let K=Z[X],Y=J.docs.find((M)=>M.filename===X);if(Y)Y.testStatus=K?K.passed?"passed":"failed":void 0;u()},py=()=>{if(V5>=Q2&&E){let X={passed:0,failed:0,pages:Z};for(let K of Object.values(Z))X.passed+=K.totalPassed,X.failed+=K.totalFailed;if(E(X),E=void 0,o9&&!o2)fetch("/report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)}).catch(()=>{})}},o9=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1",Ly=(X)=>{let{results:K}=X.detail,Y=String(J.currentDoc.filename);Z[Y]={passed:K.failed===0,tests:[...K.tests],totalPassed:K.passed,totalFailed:K.failed},E9(Y)},X5=(X)=>{V5++,py(),P5()};u1.docLink={toDOM(X,K){X.setAttribute("href",F(K)),X.dataset.filename=K}},u1.current={toDOM(X,K){X.classList.toggle("current",K===X.dataset.filename)}},u1.testStatus={toDOM(X,K){if(X.classList.remove("-test-passed","-test-failed"),K==="passed")X.classList.add("-test-passed");else if(K==="failed")X.classList.add("-test-failed")}};let cy=w0(()=>{let X=A5.value.toLocaleLowerCase();J.docs.forEach((K)=>{K.hidden=!K.title.toLocaleLowerCase().includes(X)&&!K.text.toLocaleLowerCase().includes(X)}),$1(J.docs),u(!0)}),A5=RB({slot:"nav",placeholder:"search",type:"search",style:{width:"calc(100% - 10px)",margin:"5px"},onInput:cy});if(!P)window.addEventListener("popstate",()=>{if(p){if(s0()&&!window.confirm("Discard unsaved changes to the source?")){let X=F(String(p.doc.filename));window.history.pushState({href:X},"",X);return}K5()}d0(R())}),window.addEventListener("beforeunload",(X)=>{if(s0())X.preventDefault(),X.returnValue=""});let $2=null,n2=[K9({class:"iconic",style:{color:l.linkColor},title:"navigation",bind:{value:J.compact,binding:{toDOM(X,K){X.style.display=K?"":"none",X.nextSibling.style.display=K?"":"none"}}},onClick(){if($2)$2.contentVisible=!$2.contentVisible}},Q.menu()),d2({style:{flex:"0 0 10px"}})];if(C)n2.push(H0({href:"/",style:{display:"flex",alignItems:"center",borderBottom:"none"}},bB(B,k),DB(C)));n2.push(d2({class:"elastic"}));let a9=(X)=>{let K=X.icon?Q[X.icon]:void 0;return H0({class:K?"iconic":"",title:X.label,target:"_blank",href:X.href},K?K():X.label)};if(V)V.forEach((X)=>n2.push(a9(X)));else{let X=[[k.tosijs,"tosi","tosijs"],[k.discord,"discord","discord"],[k.blog,"blog","blog"],[k.github,"github","github"],[k.npm,"npm","npmjs"]];for(let[K,Y,M]of X)if(K)n2.push(a9({href:K,label:M,icon:Y}))}let g1=_||D0();g1.classList.add("doc-content"),Object.assign(g1.style,{display:"block",maxWidth:"var(--doc-content-max-width, 44em)",margin:"auto",padding:"0 1em",overflow:"hidden"});let t9=()=>{for(let X of g1.querySelectorAll("a")){let K=D(X);if(K!==null)X.setAttribute("href",F(K)),X.dataset.docLink=K}},dy=()=>{if(P)return;let X=location.hash.replace(/^#/,"");if(!X)return;requestAnimationFrame(()=>{let K=null;try{K=g1.querySelector(`#${CSS.escape(X)}`)}catch{K=null}if(!K)return;K.scrollIntoView({block:"center",behavior:"smooth"}),K.classList.add("example-target"),setTimeout(()=>K&&K.classList.remove("example-target"),1600)})},e9=_!==void 0&&!P,y8=(X)=>{if(e9)e9=!1;else g1.innerHTML=F0(X.text,{bakes:X.bakes?new Map(X.bakes):void 0});if(t9(),k2.insertExamples(g1,h,X.path||void 0),dy(),z==="path")document.title=O7(X,C)},d0=(X)=>{let K=x.find((Y)=>Y.filename===X)||x[0];J.currentDoc=K,y8(K),u(!0)},f0=(X)=>{if(!my())return;if(P)j?.(i(X));else{let K=F(X);window.history.pushState({href:K},"",K)}d0(X)};g1.addEventListener("click",(X)=>{if(X.defaultPrevented||X.button!==0||X.metaKey||X.ctrlKey||X.shiftKey||X.altKey)return;let K=X.target.closest("a");if(!K||K.target==="_blank"||K.hasAttribute("download"))return;let Y=D(K);if(Y===null)return;X.preventDefault(),f0(Y)});let fy=(X)=>X.endsWith(".md")?"markdown":X.endsWith(".css")?"css":X.endsWith(".ts")||X.endsWith(".tjs")?"typescript":"javascript",sy=(X,K)=>{if(K.endsWith(".md"))return X;return(X.match(/\/\*#[\s\S]+?\*\//g)||[]).map((M)=>M.substring(3,M.length-2).trim()).join(`
111
111
 
112
- `)},Iy=(V)=>{let A=l.github;if(!A||!V)return null;let W=A.match(/github\.com\/([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return W?`https://raw.githubusercontent.com/${W[1]}/${W[2]}/main/${V}`:null},u9=async(V)=>{try{let W=await fetch(`/__docstore/source?file=${encodeURIComponent(V)}`),H=W.headers.get("content-type")||"";if(W.ok&&!/text\/html/i.test(H))return await W.text()}catch{}let A=Iy(V);if(A)try{let W=await fetch(A);if(W.ok)return await W.text()}catch{}return null},cy=async(V,A)=>{try{return(await fetch("/__docstore/source",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:V,content:A})})).ok}catch{return!1}},q5=(V,A)=>{let W=URL.createObjectURL(new Blob([A],{type:"text/plain"}));R0({href:W,download:V}).click(),setTimeout(()=>URL.revokeObjectURL(W),1000)},s=null,L0=()=>s!==null&&s.editor.value!==s.original,j5=()=>{if(!s)return;s.editor.remove(),s=null,k1.style.display=""},sy=()=>{if(!s)return!0;if(L0()&&!window.confirm("Discard unsaved changes to the source?"))return!1;return j5(),!0},n2=(V)=>{if(!s)return;if(s.view=V,V==="preview")k1.innerHTML=Q0(My(s.editor.value,s.doc.path)),o9(),l2.insertExamples(k1,h,s.doc.path||void 0);else if(V==="diff")k1.replaceChildren(w0({original:s.original,modified:s.editor.value,style:{display:"block",width:"100%",height:"100%"}}));k1.style.display=V==="edit"?"none":"",s.editor.style.display=V==="edit"?"block":"none"},Ty=()=>{if(!s)return;let V=String(N.currentDoc.filename);j5(),T0(V)},dy=async()=>{if(!s)return;let{doc:V,editor:A}=s;if(await cy(V.path,A.value))s.original=A.value,n2("preview");else q5(V.path.split("/").pop()||"source.txt",A.value)},Ly=async(V)=>{if(s)return;let A=await u9(V.path);if(A===null){window.alert(`Could not load source for ${V.path}`);return}let W=n1({mode:Sy(V.path)});W.style.cssText="display:block; width:100%; height:100%; border:none;",W.value=A,k1.parentElement.append(W),s={editor:W,doc:V,view:"edit",original:A},n2("edit")},ry=(V)=>{let A=x.find((J)=>String(J.filename)===String(N.currentDoc.filename));if(!A)return;let W=(J)=>J.split("/").pop()||J,H=s?[...s.view!=="edit"?[{caption:"Edit",icon:"edit",action:()=>n2("edit")}]:[],...s.view!=="preview"?[{caption:"Preview",icon:"eye",action:()=>n2("preview")}]:[],{caption:"View changes",icon:"code",action:()=>n2("diff"),enabled:()=>L0()},null,{caption:"Save to source",icon:"save",action:()=>void dy()},{caption:"Download",icon:"download",action:()=>q5(W(s.doc.path),s.editor.value)},null,{caption:"Close editor",icon:"x",action:Ty}]:[{caption:"Edit page source",icon:"edit",action:()=>void Ly(A)},...l.github&&A.path&&A.path!=="README.md"?[{caption:"View on GitHub",icon:"github",action:()=>{window.open(`${l.github}/blob/main/${A.path}`,"_blank")}}]:[],{caption:"Download source",icon:"download",action:()=>void u9(A.path).then((J)=>{if(J!==null)q5(W(A.path),J)})}];n({target:V,position:"sw",menuItems:H})},E9={slot:"nav",class:"doc-nav",style:{display:"flex",flexDirection:"column",width:"100%",height:"calc(100% - 44px)",overflowY:"scroll"}},oy=g!=="query"?(()=>{let V=Y4(x,K),A=new Map,W=[],H=(o)=>{let u=[o.doc.filename];for(let a of o.children)u.push(...H(a));return u},J=(o)=>(u)=>{let a=u.target.closest("tosi-sidenav");if(a)a.contentVisible=!0;d0(String(o.filename)),u.preventDefault();let e=D[o.filename];if(e&&!e.passed)setTimeout(()=>{let v1=document.querySelector("tosi-example.-test-failed");if(v1)v1.scrollIntoView({behavior:"smooth",block:"center"})},100)},d=(o)=>{let u=R0({class:"doc-link",href:Y(o.doc.filename),onClick:J(o.doc)},Q1(o.doc.title));if(o.children.length===0){let v1=o7(u);return A.set(o.doc.filename,{li:v1,link:u}),v1}let a=Ui(Gi(u),r7(...o.children.map(d))),e=o7(a);return W.push({li:e,el:a,link:u,filename:o.doc.filename,subtree:H(o)}),e},m=p0(E9,r7(...V.map(d))),f=(o,u)=>{if(!u)return!0;let a=x.find((e)=>e.filename===o);return!!a&&(String(a.title).toLocaleLowerCase().includes(u)||String(a.text).toLocaleLowerCase().includes(u))},z1=(o,u,a)=>{o.classList.toggle("current",u===a);let e=D[u];o.classList.toggle("-test-passed",!!e&&e.passed),o.classList.toggle("-test-failed",!!e&&!e.passed)};return I=(o=!1)=>{let u=N.currentDoc,a=u&&u.filename!=null?String(u.filename):"",e=z5.value.trim().toLocaleLowerCase();for(let[v1,{li:u2,link:P5}]of A)u2.style.display=f(v1,e)?"":"none",z1(P5,v1,a);for(let{li:v1,el:u2,link:P5,filename:e9,subtree:_5}of W){let y8=f(e9,e)||_5.some((x8)=>A.has(x8)&&A.get(x8).li.style.display!=="none");if(v1.style.display=y8?"":"none",z1(P5,e9,a),e)u2.open=y8;else if(o)u2.open=_5.includes(a);else if(_5.includes(a))u2.open=!0}},I(!0),m})():p0({...E9,bindList:{idPath:"filename",hiddenProp:"hidden",value:N.docs}},_i(R0({class:"doc-link",bindCurrent:`${C1}.currentDoc.filename`,bindDocLink:"^.filename",bindTestStatus:"^.testStatus",onClick(V){let A=q2(V.target),W=V.target.closest("tosi-sidenav");W.contentVisible=!0,d0(String(A.filename)),V.preventDefault()}},Q1({bindText:"^.title"})))),O2=p0({style:{display:"flex",flexDirection:"column",maxWidth:"100vw",height:"100vh",overflow:"hidden"}},Pi(...o2),Z0({name:"Documentation",navSize:i,minSize:k,style:{flex:"1 1 auto",overflow:"hidden"},onChange(V){if(F2=V.target.closest(I2.tagName),F2)N.compact=F2.compact}},z5,oy,p0({style:{position:"relative",overflowY:"scroll",height:"100%"}},B9({class:"view-source",style:{display:"flex",alignItems:"center",gap:"6px",position:"fixed",top:"calc(var(--xin-header-height, 60px) + 5px)",right:"5px",zIndex:"100",fontSize:"0.875em",color:"var(--brand-color, inherit)",background:"var(--background, white)",border:"none",borderRadius:"4px",padding:"3px 8px",boxShadow:"0 1px 4px #0003",cursor:"pointer",transition:"opacity 0.2s ease"},onClick(V){let A=V.target.closest(".view-source");if(A)ry(A)},bind:{value:N.currentDoc,binding(V,A){V.style.display=A.path?"flex":"none"}}},O.code({style:{_xinIconSize:16}}),"Source"),k1)));f9(T),W1("test-indicators",Fi);let g1=B9({class:"test-widget",hidden:!0,onClick:ny},v0({part:"label"},"Tests"),v0({class:"count",part:"count"},"0"));O2.appendChild(g1);let r0=!1;function a9(){r0=!0,g1.hidden=!1,g1.classList.remove("-passed","-failed"),g1.classList.add("-running"),m9()}function m9(){let V=g1.querySelector('[part="label"]'),A=g1.querySelector('[part="count"]'),W=Object.values(D).reduce((J,d)=>J+d.totalPassed,0),H=Object.values(D).reduce((J,d)=>J+d.totalFailed,0);if(V)if(r0)V.textContent="Running";else if(H>0)V.textContent="Failed";else if(W>0)V.textContent="Passed";else V.textContent="Tests";if(A)A.textContent=H>0?String(H):String(W)}function V5(){let V=Object.values(D).reduce((A,W)=>A+W.totalFailed,0);if(r0&&w5>=u1)if(r0=!1,g1.classList.remove("-running"),V>0)g1.classList.add("-failed"),g1.classList.remove("-passed"),g1.hidden=!1;else g1.classList.add("-passed"),g1.classList.remove("-failed"),g1.hidden=!1;m9()}function ny(){let V=Object.entries(D).filter(([,W])=>!W.passed),A=[];for(let[W,H]of V){let J=x.find((m)=>m.filename===W),d=H.tests.filter((m)=>!m.passed);for(let m of d)A.push({caption:`${J?.title||W}: ${m.name}`,action:()=>{if(N.docs.find((z1)=>String(z1.filename)===W))d0(W),setTimeout(()=>{let z1=document.querySelector("tosi-example.-test-failed");if(z1)z1.scrollIntoView({behavior:"smooth",block:"center"})},100)}})}if(A.length>0)A.push(null);A.push({icon:"copy",caption:"Copy test results to clipboard",action:()=>{let W=fy();navigator.clipboard.writeText(W)}}),n({target:g1,menuItems:A})}function fy(){let V=["# Test Results",""],A=0,W=0;for(let[H,J]of Object.entries(D)){let m=x.find((f)=>f.filename===H)?.title||H;if(A+=J.totalPassed,W+=J.totalFailed,J.tests.length>0){V.push(`## ${m}`),V.push("");for(let f of J.tests){let z1=f.passed?"✓":"✗",o=f.error?`- ${z1} ${f.name}: ${f.error}`:`- ${z1} ${f.name}`;V.push(o)}V.push("")}}return V.unshift(`**Summary: ${A} passed, ${W} failed**`,""),V.join(`
113
- `)}let uy=new URLSearchParams(window.location.search),f2=!_&&uy.get("_testMode")==="1",o0=f2?$():null;if(O2.addEventListener("testcomplete",(V)=>{if(Dy(V),V5(),f2&&window.parent!==window&&o0){let{results:A}=V.detail;window.parent.postMessage({type:"tosi-test-results",filename:o0,results:A},"*")}}),f2&&o0){let V=()=>{let W=[...O2.querySelectorAll("tosi-example")].filter((J)=>J.classList.contains("-has-tests")),H=W.filter((J)=>J.classList.contains("-test-running"));if(W.length>0&&H.length===0)window.parent.postMessage({type:"tosi-tests-done",filename:o0},"*");else setTimeout(V,100)};setTimeout(V,500)}let Ey=async()=>{if(A1)return;if(!_1.enabled.value)return;if(f2)return;A1=!0;let V=x.filter((J)=>J.text.includes("```test"));if(u1=V.length,u1>0)a9();if(u1===0){if(v)v({passed:0,failed:0,pages:{}}),v=void 0;return}let A=String(N.currentDoc.filename),W=document.createElement("iframe");W.style.cssText="position: fixed; left: -10000px; top: 0; width: 800px; height: 600px; opacity: 0; pointer-events: none;",document.body.appendChild(W);let H=(J)=>{if(J.data?.type!=="tosi-test-results")return;let{filename:d,results:m}=J.data;if(!D[d])D[d]={passed:!0,tests:[],totalPassed:0,totalFailed:0};let f=D[d];f.tests.push(...m.tests),f.totalPassed+=m.passed,f.totalFailed+=m.failed,f.passed=f.totalFailed===0,d9(d),V5()};window.addEventListener("message",H);for(let J of V){if(J.filename===A)continue;W.src=g==="path"?`${window.location.origin}${Y(J.filename)}?_testMode=1`:`${window.location.origin}${window.location.pathname}?${J.filename}&_testMode=1`,await new Promise((d)=>{let m=Date.now()+30000,f=(z1)=>{if(z1.data?.type==="tosi-tests-done"&&z1.data.filename===J.filename)window.removeEventListener("message",f),d()};window.addEventListener("message",f),setTimeout(()=>{window.removeEventListener("message",f),d()},m-Date.now())}),B5(J.filename)}if(window.removeEventListener("message",H),W.remove(),V.some((J)=>J.filename===A))setTimeout(()=>B5(A),1000)},t9=()=>{if(!_1.enabled.value)return;if(L9)setTimeout(Ey,1000);else if(T.text.includes("```test"))u1=1,a9(),setTimeout(()=>B5(T.filename),2000);else if(v)v({passed:0,failed:0,pages:{}}),v=void 0};if(!_)t9(),_1.enabled.observe(t9);if(_)O2.navigate=(V)=>T0(Q(V)||V),Object.defineProperty(O2,"currentSlug",{get:()=>U(String(N.currentDoc.filename))});return O2}var Wi=`/* doc-system book stylesheet */
112
+ `)},uy=(X)=>{let K=k.github;if(!K||!X)return null;let Y=K.match(/github\.com\/([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return Y?`https://raw.githubusercontent.com/${Y[1]}/${Y[2]}/main/${X}`:null},x8=async(X)=>{try{let Y=await fetch(`/__docstore/source?file=${encodeURIComponent(X)}`),M=Y.headers.get("content-type")||"";if(Y.ok&&!/text\/html/i.test(M))return await Y.text()}catch{}let K=uy(X);if(K)try{let Y=await fetch(K);if(Y.ok)return await Y.text()}catch{}return null},ry=async(X,K)=>{try{return(await fetch("/__docstore/source",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:X,content:K})})).ok}catch{return!1}},_5=(X,K)=>{let Y=URL.createObjectURL(new Blob([K],{type:"text/plain"}));H0({href:Y,download:X}).click(),setTimeout(()=>URL.revokeObjectURL(Y),1000)},p=null,s0=()=>p!==null&&p.editor.value!==p.original,K5=()=>{if(!p)return;p.editor.remove(),p=null,g1.style.display=""},my=()=>{if(!p)return!0;if(s0()&&!window.confirm("Discard unsaved changes to the source?"))return!1;return K5(),!0},E2=(X)=>{if(!p)return;if(p.view=X,X==="preview")g1.innerHTML=F0(sy(p.editor.value,p.doc.path)),t9(),k2.insertExamples(g1,h,p.doc.path||void 0);else if(X==="diff")g1.replaceChildren(l0({original:p.original,modified:p.editor.value,style:{display:"block",width:"100%",height:"100%"}}));g1.style.display=X==="edit"?"none":"",p.editor.style.display=X==="edit"?"block":"none"},ny=()=>{if(!p)return;let X=String(J.currentDoc.filename);K5(),d0(X)},Ey=async()=>{if(!p)return;let{doc:X,editor:K}=p;if(await ry(X.path,K.value))p.original=K.value,E2("preview");else _5(X.path.split("/").pop()||"source.txt",K.value)},oy=async(X)=>{if(p)return;let K=await x8(X.path);if(K===null){window.alert(`Could not load source for ${X.path}`);return}let Y=m1({mode:fy(X.path)});Y.style.cssText="display:block; width:100%; height:100%; border:none;",Y.value=K,g1.parentElement.append(Y),p={editor:Y,doc:X,view:"edit",original:K},E2("edit")},ay=(X)=>{let K=x.find((W)=>String(W.filename)===String(J.currentDoc.filename));if(!K)return;let Y=(W)=>W.split("/").pop()||W,M=p?[...p.view!=="edit"?[{caption:"Edit",icon:"edit",action:()=>E2("edit")}]:[],...p.view!=="preview"?[{caption:"Preview",icon:"eye",action:()=>E2("preview")}]:[],{caption:"View changes",icon:"code",action:()=>E2("diff"),enabled:()=>s0()},null,{caption:"Save to source",icon:"save",action:()=>void Ey()},{caption:"Download",icon:"download",action:()=>_5(Y(p.doc.path),p.editor.value)},null,{caption:"Close editor",icon:"x",action:ny}]:[{caption:"Edit page source",icon:"edit",action:()=>void oy(K)},...k.github&&K.path&&K.path!=="README.md"?[{caption:"View on GitHub",icon:"github",action:()=>{window.open(`${k.github}/blob/main/${K.path}`,"_blank")}}]:[],{caption:"Download source",icon:"download",action:()=>void x8(K.path).then((W)=>{if(W!==null)_5(Y(K.path),W)})}];r({target:X,position:"sw",menuItems:M})},h8={slot:"nav",class:"doc-nav",style:{display:"flex",flexDirection:"column",width:"100%",height:"calc(100% - 44px)",overflowY:"scroll"}},ty=z!=="query"?(()=>{let X=J4(x,U),K=new Map,Y=[],M=(s)=>{let n=[s.doc.filename];for(let a of s.children)n.push(...M(a));return n},W=(s)=>(n)=>{let a=n.target.closest("tosi-sidenav");if(a)a.contentVisible=!0;f0(String(s.filename)),n.preventDefault();let x1=Z[s.filename];if(x1&&!x1.passed)setTimeout(()=>{let D1=document.querySelector("tosi-example.-test-failed");if(D1)D1.scrollIntoView({behavior:"smooth",block:"center"})},100)},L=(s)=>{let n=H0({class:"doc-link",href:F(s.doc.filename),onClick:W(s.doc)},O1(s.doc.title));if(s.children.length===0){let D1=t7(n);return K.set(s.doc.filename,{li:D1,link:n}),D1}let a=vB(MB(n),a7(...s.children.map(L))),x1=t7(a);return Y.push({li:x1,el:a,link:n,filename:s.doc.filename,subtree:M(s)}),x1},t=D0(h8,a7(...X.map(L))),m=(s,n)=>{if(!n)return!0;let a=x.find((x1)=>x1.filename===s);return!!a&&(String(a.title).toLocaleLowerCase().includes(n)||String(a.text).toLocaleLowerCase().includes(n))},V1=(s,n,a)=>{s.classList.toggle("current",n===a);let x1=Z[n];s.classList.toggle("-test-passed",!!x1&&x1.passed),s.classList.toggle("-test-failed",!!x1&&!x1.passed)};return u=(s=!1)=>{let n=J.currentDoc,a=n&&n.filename!=null?String(n.filename):"",x1=A5.value.trim().toLocaleLowerCase();for(let[D1,{li:a2,link:U5}]of K)a2.style.display=m(D1,x1)?"":"none",V1(U5,D1,a);for(let{li:D1,el:a2,link:U5,filename:w8,subtree:G5}of Y){let g8=m(w8,x1)||G5.some((z8)=>K.has(z8)&&K.get(z8).li.style.display!=="none");if(D1.style.display=g8?"":"none",V1(U5,w8,a),x1)a2.open=g8;else if(s)a2.open=G5.includes(a);else if(G5.includes(a))a2.open=!0}},u(!0),t})():D0({...h8,bindList:{idPath:"filename",hiddenProp:"hidden",value:J.docs}},ZB(H0({class:"doc-link",bindCurrent:`${H}.currentDoc.filename`,bindDocLink:"^.filename",bindTestStatus:"^.testStatus",onClick(X){let K=l2(X.target),Y=X.target.closest("tosi-sidenav");Y.contentVisible=!0,f0(String(K.filename)),X.preventDefault()}},O1({bindText:"^.title"})))),Y2=D0({style:{display:"flex",flexDirection:"column",maxWidth:"100vw",height:"100vh",overflow:"hidden"}},JB(...n2),R0({name:"Documentation",navSize:w,minSize:g,style:{flex:"1 1 auto",overflow:"hidden"},onChange(X){if($2=X.target.closest(L2.tagName),$2)J.compact=$2.compact}},A5,ty,D0({style:{position:"relative",overflowY:"scroll",height:"100%"}},K9({class:"view-source",style:{display:"flex",alignItems:"center",gap:"6px",position:"fixed",top:"calc(var(--xin-header-height, 60px) + 5px)",right:"5px",zIndex:"100",fontSize:"0.875em",color:"var(--brand-color, inherit)",background:"var(--background, white)",border:"none",borderRadius:"4px",padding:"3px 8px",boxShadow:"0 1px 4px #0003",cursor:"pointer",transition:"opacity 0.2s ease"},onClick(X){let K=X.target.closest(".view-source");if(K)ay(K)},bind:{value:J.currentDoc,binding(X,K){X.style.display=K.path?"flex":"none"}}},Q.code({style:{_xinIconSize:16}}),"Source"),g1)));y8(y1),Y1("test-indicators",SB);let z1=K9({class:"test-widget",hidden:!0,onClick:ey},d2({part:"label"},"Tests"),d2({class:"count",part:"count"},"0"));Y2.appendChild(z1);let u0=!1;function C8(){u0=!0,z1.hidden=!1,z1.classList.remove("-passed","-failed"),z1.classList.add("-running"),k8()}function k8(){let X=z1.querySelector('[part="label"]'),K=z1.querySelector('[part="count"]'),Y=Object.values(Z).reduce((W,L)=>W+L.totalPassed,0),M=Object.values(Z).reduce((W,L)=>W+L.totalFailed,0);if(X)if(u0)X.textContent="Running";else if(M>0)X.textContent="Failed";else if(Y>0)X.textContent="Passed";else X.textContent="Tests";if(K)K.textContent=M>0?String(M):String(Y)}function P5(){let X=Object.values(Z).reduce((K,Y)=>K+Y.totalFailed,0);if(u0&&V5>=Q2)if(u0=!1,z1.classList.remove("-running"),X>0)z1.classList.add("-failed"),z1.classList.remove("-passed"),z1.hidden=!1;else z1.classList.add("-passed"),z1.classList.remove("-failed"),z1.hidden=!1;k8()}function ey(){let X=Object.entries(Z).filter(([,Y])=>!Y.passed),K=[];for(let[Y,M]of X){let W=x.find((t)=>t.filename===Y),L=M.tests.filter((t)=>!t.passed);for(let t of L)K.push({caption:`${W?.title||Y}: ${t.name}`,action:()=>{if(J.docs.find((V1)=>String(V1.filename)===Y))f0(Y),setTimeout(()=>{let V1=document.querySelector("tosi-example.-test-failed");if(V1)V1.scrollIntoView({behavior:"smooth",block:"center"})},100)}})}if(K.length>0)K.push(null);K.push({icon:"copy",caption:"Copy test results to clipboard",action:()=>{let Y=yx();navigator.clipboard.writeText(Y)}}),r({target:z1,menuItems:K})}function yx(){let X=["# Test Results",""],K=0,Y=0;for(let[M,W]of Object.entries(Z)){let t=x.find((m)=>m.filename===M)?.title||M;if(K+=W.totalPassed,Y+=W.totalFailed,W.tests.length>0){X.push(`## ${t}`),X.push("");for(let m of W.tests){let V1=m.passed?"✓":"✗",s=m.error?`- ${V1} ${m.name}: ${m.error}`:`- ${V1} ${m.name}`;X.push(s)}X.push("")}}return X.unshift(`**Summary: ${K} passed, ${Y} failed**`,""),X.join(`
113
+ `)}let xx=new URLSearchParams(window.location.search),o2=!P&&xx.get("_testMode")==="1",r0=o2?R():null;if(Y2.addEventListener("testcomplete",(X)=>{if(Ly(X),P5(),o2&&window.parent!==window&&r0){let{results:K}=X.detail;window.parent.postMessage({type:"tosi-test-results",filename:r0,results:K},"*")}}),o2&&r0){let X=()=>{let Y=[...Y2.querySelectorAll("tosi-example")].filter((W)=>W.classList.contains("-has-tests")),M=Y.filter((W)=>W.classList.contains("-test-running"));if(Y.length>0&&M.length===0)window.parent.postMessage({type:"tosi-tests-done",filename:r0},"*");else setTimeout(X,100)};setTimeout(X,500)}let hx=async()=>{if(c0)return;if(!K1.enabled.value)return;if(o2)return;c0=!0;let X=x.filter((W)=>W.text.includes("```test"));if(Q2=X.length,Q2>0)C8();if(Q2===0){if(E)E({passed:0,failed:0,pages:{}}),E=void 0;return}let K=String(J.currentDoc.filename),Y=document.createElement("iframe");Y.style.cssText="position: fixed; left: -10000px; top: 0; width: 800px; height: 600px; opacity: 0; pointer-events: none;",document.body.appendChild(Y);let M=(W)=>{if(W.data?.type!=="tosi-test-results")return;let{filename:L,results:t}=W.data;if(!Z[L])Z[L]={passed:!0,tests:[],totalPassed:0,totalFailed:0};let m=Z[L];m.tests.push(...t.tests),m.totalPassed+=t.passed,m.totalFailed+=t.failed,m.passed=m.totalFailed===0,E9(L),P5()};window.addEventListener("message",M);for(let W of X){if(W.filename===K)continue;Y.src=z==="path"?`${window.location.origin}${F(W.filename)}?_testMode=1`:`${window.location.origin}${window.location.pathname}?${W.filename}&_testMode=1`,await new Promise((L)=>{let t=Date.now()+30000,m=(V1)=>{if(V1.data?.type==="tosi-tests-done"&&V1.data.filename===W.filename)window.removeEventListener("message",m),L()};window.addEventListener("message",m),setTimeout(()=>{window.removeEventListener("message",m),L()},t-Date.now())}),X5(W.filename)}if(window.removeEventListener("message",M),Y.remove(),X.some((W)=>W.filename===K))setTimeout(()=>X5(K),1000)},B8=()=>{if(!K1.enabled.value)return;if(o9)setTimeout(hx,1000);else if(y1.text.includes("```test"))Q2=1,C8(),setTimeout(()=>X5(y1.filename),2000);else if(E)E({passed:0,failed:0,pages:{}}),E=void 0};if(!P)B8(),K1.enabled.observe(B8);if(P)Y2.navigate=(X)=>d0(N(X)||X),Object.defineProperty(Y2,"currentSlug",{get:()=>i(String(J.currentDoc.filename))});return Y2}var pB=`/* doc-system book stylesheet */
114
114
  html { font-size: 100%; }
115
115
  body {
116
116
  font-family: Georgia, 'Times New Roman', serif;
@@ -174,7 +174,7 @@ sup.footnote-ref a { text-decoration: none; }
174
174
  .footnotes hr { border: none; border-top: 1px solid #ccc; margin: 1em 0; }
175
175
  .footnote-backref { text-decoration: none; }
176
176
  a.wikilink { text-decoration: none; border-bottom: 1px dotted currentColor; }
177
- `,Qi=`
177
+ `,LB=`
178
178
  @page { margin: 18mm 16mm; }
179
179
  .book-title { text-align: center; margin: 30vh 0 1em; }
180
180
  .book-toc { page-break-after: always; }
@@ -183,32 +183,32 @@ a.wikilink { text-decoration: none; border-bottom: 1px dotted currentColor; }
183
183
  .book-toc ol ol { padding-left: 1.2em; }
184
184
  .book-toc a { color: inherit; }
185
185
  .chapter { page-break-before: always; }
186
- `;function q9(y){return y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function d4(y){return y.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Xi(y){return y.replace(/<!--\{[\s\S]*?\}-->\s*/g,"")}function n7(y){let x=[];for(let h of y)x.push(h),x.push(...n7(h.children));return x}function f7(y){return y.map((x)=>`<li><a href="#${d4(x.doc.filename)}">${q9(x.doc.title)}</a>${x.children.length?`<ol>${f7(x.children)}</ol>`:""}</li>`).join("")}function u7(y,x){let h=y.filter((g)=>!g.hidden),C=b2(h),l=Y4(h,C),i=x.css??`${Wi}
187
- ${Qi}`,k=n7(l).map((g)=>`<section class="chapter" id="${d4(g.doc.filename)}">
188
- ${Q0(Xi(g.doc.text))}
186
+ `;function U9(y){return y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function r4(y){return y.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function cB(y){return y.replace(/<!--\{[\s\S]*?\}-->\s*/g,"")}function e7(y){let x=[];for(let h of y)x.push(h),x.push(...e7(h.children));return x}function yy(y){return y.map((x)=>`<li><a href="#${r4(x.doc.filename)}">${U9(x.doc.title)}</a>${x.children.length?`<ol>${yy(x.children)}</ol>`:""}</li>`).join("")}function xy(y,x){let h=y.filter((g)=>!g.hidden),C=b2(h),k=J4(h,C),B=x.css??`${pB}
187
+ ${LB}`,w=e7(k).map((g)=>`<section class="chapter" id="${r4(g.doc.filename)}">
188
+ ${F0(cB(g.doc.text))}
189
189
  </section>`).join(`
190
190
  `);return`<!DOCTYPE html>
191
191
  <html lang="${x.lang??"en"}">
192
192
  <head>
193
193
  <meta charset="utf-8"/>
194
- <title>${q9(x.title)}</title>
195
- <style>${i}</style>
194
+ <title>${U9(x.title)}</title>
195
+ <style>${B}</style>
196
196
  </head>
197
197
  <body>
198
- <h1 class="book-title">${q9(x.title)}</h1>
199
- <nav class="book-toc"><h2>Contents</h2><ol>${f7(l)}</ol></nav>
200
- ${k}
198
+ <h1 class="book-title">${U9(x.title)}</h1>
199
+ <nav class="book-toc"><h2>Contents</h2><ol>${yy(k)}</ol></nav>
200
+ ${w}
201
201
  ${x.autoPrint?'<script>addEventListener("load",function(){setTimeout(function(){print()},300)})</script>':""}
202
202
  </body>
203
- </html>`}var E7=200,$i=600;function Yi(y={}){let x=X.fromCss(y.accent??"#EE257B");return{_textColor:y.text??"#222",_brandColor:x,_background:y.background??"#fafafa",_buttonBg:y.buttonBg??"#fdfdfd",_inputBg:y.inputBg??"#fdfdfd",_backgroundShaded:"#f5f5f5",_navBg:x.rotate(30).desaturate(0.5).brighten(0.9),_barColor:x.opacity(0.4),_focusColor:x.opacity(0.7),_placeholderColor:x.opacity(0.4),_brandTextColor:x.rotate(30).brighten(0.9),_insetBg:x.rotate(45).brighten(0.8),_codeBg:x.rotate(-15).desaturate(0.5).brighten(0.9),_linkColor:x.rotate(-30).darken(0.5),_shadowColor:"#0004",_menuBg:"#fafafa",_menuItemActiveColor:"#000",_menuItemIconActiveColor:"#000",_menuItemActiveBg:"#aaa",_menuItemHoverBg:"#eee",_menuItemColor:"#222",_menuSeparatorColor:"#2224",_menuShadow:"0 4px 8px #0004",_scrollThumbColor:"#0006",_scrollBarColor:"#0001",_inputBorderShadow:"inset 0 0 2px #0006"}}function a7(y={}){let x=Yi(y),h=X.fromCss(y.accent??"#EE257B");return{"@import":"https://fonts.googleapis.com/css2?family=Aleo:ital,wght@0,100..900;1,100..900&famiSpline+Sans+Mono:ital,wght@0,300..700;1,300..700&display=swap",":root":{_fontFamily:"'Aleo', sans-serif",_codeFontFamily:"'Spline Sans Mono', monospace",_fontSize:"16px",_codeFontSize:"14px",...x,_tosiAccent:z.brandColor,_tosiBg:z.background,_tosiText:z.textColor,_tosiBgInset:z.insetBg,_spacing:"10px",_lineHeight:"calc(var(--font-size) * 1.6)",_h1Scale:"2",_h2Scale:"1.5",_h3Scale:"1.25",_touchSize:"32px",_headerHeight:"calc( var(--line-height) * var(--h2-scale) + var(--spacing) * 2 )",_docContentMaxWidth:"44em"},".darkmode":{...i0(x),_shadowColor:h.opacity(0.5),_menuShadow:`0 0 0 2px ${h.opacity(0.75)}`,_menuSeparatorColor:h.opacity(0.5)},".high-contrast":{filter:"contrast(2)"},"*":{boxSizing:"border-box",scrollbarColor:`${z.scrollThumbColor} ${z.scrollBarColor}`,scrollbarWidth:"thin"},body:{fontFamily:z.fontFamily,fontSize:z.fontSize,margin:"0",lineHeight:z.lineHeight,background:z.background,_tosiTabsSelectedColor:z.brandColor,_tosiTabsBarColor:z.brandTextColor,_menuItemIconColor:z.brandColor,color:z.textColor},"tosi-doc-system":{display:"block"},"tosi-doc-system tosi-sidenav::part(nav)":{background:z.navBg},"tosi-doc-system:not(:defined)":{display:"block",position:"fixed",inset:`${z.headerHeight} 0 0 0`,overflow:"auto"},"tosi-doc-system:not(:defined)::before":{content:'""',position:"fixed",top:"0",left:"0",right:"0",height:z.headerHeight,background:z.brandColor},"tosi-doc-system:not(:defined) .doc-content":{display:"block",maxWidth:z.docContentMaxWidth,margin:"auto",padding:"0 1em",overflow:"hidden"},"tosi-doc-system:not(:defined) .doc-navbar":{display:"none"},"tosi-doc-system:not(:defined) pre:has(> code.language-test)":{display:"none"},"tosi-doc-system:not(:defined) .doc-nav":{display:"none"},[`@media (min-width: ${$i}px)`]:{"tosi-doc-system:not(:defined)":{left:`${E7}px`},"tosi-doc-system:not(:defined) .doc-nav":{display:"block",position:"fixed",left:"0",top:z.headerHeight,bottom:"0",width:`${E7}px`,overflow:"auto",background:z.navBg,padding:"0"},"tosi-doc-system:not(:defined) .doc-nav summary":{cursor:"pointer"}},".center":{display:"flex",alignItems:"center",justifyContent:"center"},"input, button, select, textarea":{fontFamily:z.fontFamily,fontSize:z.fontSize,color:"currentColor",background:z.inputBg},select:{WebkitAppearance:"none",appearance:"none"},header:{background:z.brandColor,color:z.brandTextColor,_textColor:z.brandTextColor,_linkColor:z.brandTextColor,display:"flex",alignItems:"center",padding:"0 var(--spacing)",lineHeight:"calc(var(--line-height) * var(--h1-scale))",height:z.headerHeight,whiteSpace:"nowrap"},h1:{color:z.brandColor,fontSize:"calc(var(--font-size) * var(--h1-scale))",lineHeight:"calc(var(--line-height) * var(--h1-scale))",fontWeight:"400",borderBottom:`4px solid ${z.barColor}`,margin:`${z.spacing} 0 ${z.spacing200}`,padding:0},"header h2":{color:z.brandTextColor,whiteSpace:"nowrap"},h2:{color:z.brandColor,fontSize:"calc(var(--font-size) * var(--h2-scale))",lineHeight:"calc(var(--line-height) * var(--h2-scale))",margin:"calc(var(--spacing) * var(--h2-scale)) 0"},h3:{fontSize:"calc(var(--font-size) * var(--h3-scale))",lineHeight:"calc(var(--line-height) * var(--h3-scale))",margin:"calc(var(--spacing) * var(--h3-scale)) 0"},"input[type=search]":{borderRadius:99},blockquote:{position:"relative",background:z.insetBg,margin:"0 48px 56px 0",borderRadius:z.spacing,padding:"var(--spacing) calc(var(--spacing) * 2)",filter:`drop-shadow(0px 1px 1px ${z.shadowColor})`},"blockquote > :first-child":{marginTop:"0"},"blockquote > :last-child":{marginBottom:"0"},"blockquote::before":{content:'" "',display:"block",width:1,height:1,border:"10px solid transparent",borderTopColor:z.insetBg,borderRightColor:z.insetBg,position:"absolute",bottom:-20,right:24},"blockquote::after":{content:'" "',width:48,height:48,display:"block",bottom:-48,right:-24,position:"absolute",background:g0(O.tosi(),void 0,void 0,2)},a:{textDecoration:"none",color:z.linkColor,opacity:"0.9",borderBottom:"1px solid var(--brand-color)"},"button, select, .clickable":{display:"inline-flex",alignItems:"center",justifyContent:"center",transition:"ease-out 0.2s",_textColor:z.brandColor,color:z.textColor,textDecoration:"none",background:z.buttonBg,padding:"0 calc(var(--spacing) * 1.25)",border:"none",borderRadius:"calc(var(--spacing) * 0.5)"},"button, select, .clickable, input":{lineHeight:"calc(var(--line-height) + var(--spacing))"},"input, textarea":{border:"none",outline:"none",borderRadius:"calc(var(--spacing) * 0.5)",boxShadow:z.inputBorderShadow},input:{padding:"0 calc(var(--spacing) * 1.5)"},"::placeholder":{color:z.placeholderColor},img:{verticalAlign:"middle"},"button:hover, .clickable:hover":{boxShadow:"inset 0 0 0 2px var(--brand-color)"},"button:active, .clickable:active":{background:z.brandColor,color:z.brandTextColor},label:{display:"inline-flex",gap:"calc(var(--spacing) * 0.5)",alignItems:"center"},".elastic":{flex:"1 1 auto",overflow:"hidden",position:"relative"},"svg.tosi-icon, button svg":{fill:"currentColor",pointerEvents:"none"},"[aria-selected]":{background:"#08835820"},":disabled":{opacity:"0.5",filter:"saturate(0)",pointerEvents:"none"},pre:{background:z.codeBg,padding:z.spacing,borderRadius:"calc(var(--spacing) * 0.25)",overflow:"auto",fontSize:z.codeFontSize,lineHeight:"calc(var(--font-size) * 1.2)"},"pre, code":{fontFamily:z.codeFontFamily,_textColor:z.brandColor},".transparent, .iconic":{background:"none"},".iconic":{padding:"0",fontSize:"150%",height:"calc(var(--line-height) + var(--spacing))",lineHeight:"calc(var(--line-height) + var(--spacing))",width:"calc(var(--line-height) + var(--spacing))",textAlign:"center"},".transparent:hover, .iconic:hover":{background:"#0002",boxShadow:"none",color:z.textColor},".transparent:active, .iconic:active":{background:"#0004",boxShadow:"none",color:z.textColor},".current, summary:has(.current)":{background:z.background},".doc-link":{cursor:"pointer",borderBottom:"none",transition:"0.15s ease-out",marginLeft:"10px",padding:"calc(var(--spacing) * 0.5) calc(var(--spacing) * 1.5)"},".doc-link:not(.current):hover":{background:z.background},".doc-link:not(.current)":{opacity:"0.8",marginLeft:0},"tosi-example":{margin:"var(--spacing) 0"},"tosi-example [part=editors]":{background:z.insetBg},"[class*='icon-'], tosi-icon":{color:"currentcolor",pointerEvents:"none"},"[class*='icon-']":{verticalAlign:"middle"},table:{borderCollapse:"collapse"},thead:{background:z.brandColor,color:z.brandTextColor},tbody:{background:z.background},"tr:nth-child(2n)":{background:z.backgroundShaded},"th, td":{padding:"calc(var(--spacing) * 0.5) var(--spacing)"},".doc-nav ul, .doc-nav li":{listStyle:"none",margin:0,padding:0},".doc-nav li":{display:"flex",flexDirection:"column"},".doc-nav":{display:"flex",flexDirection:"column"},".doc-nav details > ul":{paddingLeft:z.spacing},".doc-nav summary":{cursor:"pointer",paddingLeft:"calc(var(--spacing) * 0.5)"},".doc-nav summary::marker":{color:z.brandColor},".doc-nav summary > .doc-link":{display:"inline-block",paddingLeft:"calc(var(--spacing) * 0.5)"},".doc-navbar":{listStyle:"none",display:"flex",flexWrap:"wrap",gap:z.spacing,margin:0,padding:z.spacing}}}var{form:Ni,slot:j9,tosiSlot:m7,label:Ji,input:Zi,span:pi}=G;function i2(y,x,h){if(h!==""&&h!==!1)y.setAttribute(x,h);else y.removeAttribute(x)}function vi(y){switch(y.type){case"checkbox":return y.checked;case"radio":{let x=y.parentElement?.querySelector(`input[type="radio"][name="${y.name}"]:checked`);return x?x.value:null}case"range":case"number":return Number(y.value);default:return Array.isArray(y.value)&&y.value.length===0?null:y.value}}function t7(y,x){if(!(y instanceof HTMLElement));else if(y instanceof HTMLInputElement)switch(y.type){case"checkbox":y.checked=x;break;case"radio":y.checked=x===y.value;break;default:y.value=String(x||"")}else if(x!=null||y.value!=null)y.value=String(x||"")}class L4 extends F{static preferredTagName="tosi-field";static lightStyleSpec={':host [part="field"]':{position:"relative",display:"flex",alignItems:"center",gap:P.prefixSuffixGap("8px")},':host [part="field"][prefix]::before':{content:"attr(prefix)"},':host [part="field"][suffix]::after':{content:"attr(suffix)"},':host [part="field"] > *, :host [part="input"] > *':{width:"100%"},":host textarea":{resize:"none"},':host input[type="checkbox"]':{width:"fit-content"},":host .hidden":{position:"absolute",pointerEvents:"none",opacity:0}};static initAttributes={caption:"",key:"",type:"",optional:!1,pattern:"",placeholder:"",min:"",max:"",step:"",fixedPrecision:-1,prefix:"",suffix:""};value=null;content=Ji(m7({part:"caption"}),pi({part:"field"},m7({part:"input",name:"input"}),Zi({part:"valueHolder"})));valueChanged=!1;handleChange=()=>{let{input:y,valueHolder:x}=this.parts,h=y.children[0]||x;if(h!==x)x.value=h.value;this.value=vi(h),this.valueChanged=!0;let C=this.closest("tosi-form");if(C&&this.key!=="")switch(this.type){case"checkbox":C.fields[this.key]=h.checked;break;case"number":case"range":if(this.fixedPrecision>-1)h.value=Number(h.value).toFixed(this.fixedPrecision),C.fields[this.key]=Number(h.value);else C.fields[this.key]=Number(h.value);break;default:C.fields[this.key]=h.value}};connectedCallback(){super.connectedCallback();let{input:y,valueHolder:x}=this.parts;x.addEventListener("change",this.handleChange),y.addEventListener("change",this.handleChange,!0)}render(){if(this.valueChanged){this.valueChanged=!1;return}let{input:y,caption:x,valueHolder:h,field:C}=this.parts;if(x.textContent?.trim()==="")x.append(this.caption!==""?this.caption:this.key);if(this.type==="text"){y.textContent="";let l=G.textarea({value:this.value});if(this.placeholder)l.setAttribute("placeholder",this.placeholder);y.append(l)}else if(this.type==="color")y.textContent="",y.append(B3({value:this.value}));else if(y.children.length===0){if(i2(h,"placeholder",this.placeholder),i2(h,"type",this.type),i2(h,"pattern",this.pattern),i2(h,"min",this.min),i2(h,"max",this.max),this.step)i2(h,"step",this.step);else if(this.fixedPrecision>0&&this.type==="number")i2(h,"step",Math.pow(10,-this.fixedPrecision))}if(t7(h,this.value),t7(y.children[0],this.value),this.prefix)C.setAttribute("prefix",this.prefix);else C.removeAttribute("prefix");if(this.suffix)C.setAttribute("suffix",this.suffix);else C.removeAttribute("suffix");if(h.classList.toggle("hidden",y.children.length>0),y.children.length>0)h.setAttribute("tabindex","-1");else h.removeAttribute("tabindex");y.style.display=y.children.length===0?"none":"",i2(h,"required",!this.optional)}}class r4 extends F{static preferredTagName="tosi-form";context={};value={};get isValid(){return[...this.querySelectorAll("*")].filter((x)=>x.required!==void 0).find((x)=>!x.reportValidity())===void 0}static shadowStyleSpec={":host":{display:"flex",flexDirection:"column"},":host::part(header), :host::part(footer)":{display:"flex"},":host::part(content)":{display:"flex",flexDirection:"column",overflow:"hidden auto",height:"100%",width:"100%",position:"relative",boxSizing:"border-box"},":host form":{display:"flex",flex:"1 1 auto",position:"relative",overflow:"hidden"}};content=[j9({part:"header",name:"header"}),Ni({part:"form"},j9({part:"content"})),j9({part:"footer",name:"footer"})];getField=(y)=>{return this.querySelector(`tosi-field[key="${y}"]`)};get fields(){if(typeof this.value==="string")try{this.value=JSON.parse(this.value)}catch{console.log("<tosi-form> could not use its value, expects valid JSON"),this.value={}}let{getField:y}=this,x=this.dispatchEvent.bind(this);return new Proxy(this.value,{get(h,C){return h[C]},set(h,C,l){if(h[C]!==l){h[C]=l;let i=y(C);if(i)i.value=l;x(new Event("change"))}return!0}})}set fields(y){let x=[...this.querySelectorAll("tosi-field")];for(let h of x)h.value=y[h.key]}submit=()=>{this.parts.form.dispatchEvent(new Event("submit"))};handleSubmit=(y)=>{y.preventDefault(),y.stopPropagation(),this.syncFieldValues();let x=this.fields;this.submitCallback(x,this.isValid)};submitCallback=(y,x)=>{console.log("override submitCallback to handle this data",{value:y,isValid:x})};connectedCallback(){super.connectedCallback();let{form:y}=this.parts;y.addEventListener("submit",this.handleSubmit),this.addEventListener("change",this.handleElementChange,!0),this.initializeNamedElements()}handleElementChange=(y)=>{let x=y.target,h=x.getAttribute("name");if(h&&"value"in x)this.fields[h]=x.value};syncFieldValues(){let y=this.fields,x=this.querySelectorAll("[name], [key]");for(let h of x){let C=h.getAttribute("name")||h.getAttribute("key");if(!C)continue;if(y[C]===void 0){let l=h.value??h.getAttribute("value");if(l!=null)y[C]=l}}}initializeNamedElements(){let y=this.fields,x=this.querySelectorAll("[name], [key]");for(let h of x){let C=h.getAttribute("name")||h.getAttribute("key");if(!C)continue;if(y[C]!==void 0)h.value=y[C]}}}var Ri=L4,Di=r4,o4=L4.elementCreator(),n4=r4.elementCreator(),Hi=o4,bi=n4;var{h2:Si,code:Mi}=G,Ii=/^(#[0-9a-f]{3,8}|(?:rgb|hsl)a?\([^)]*\))$/i;class e7 extends F{static preferredTagName="tosi-css-var-editor";static initAttributes={elementSelector:"",targetSelector:""};content=()=>[Si({part:"title"},"CSS variables"),n4({part:"variables",changeCallback:this.update})];retryTimer;retries=0;loadVars=()=>{let{title:y,variables:x}=this.parts;if(x.textContent="",!this.elementSelector)return;y.textContent=`CSS variables for ${this.elementSelector}`;let h=document.querySelector(this.elementSelector);if(!h){if(this.retries++<40)this.retryTimer=setTimeout(this.loadVars,250);return}let C=h.shadowRoot?h.shadowRoot.querySelector("style"):document.querySelector(`style#${this.elementSelector}-component`);if(!C||!C.textContent)return;let l=getComputedStyle(h),i=[...new Set(C.textContent.match(/--[\w-]+/g)??[])];for(let k of i){let g=l.getPropertyValue(k).trim(),w=Ii.test(g)?"color":"string";if(w==="color")g=X.fromCss(g).html;x.append(o4(Mi(k),{key:k,value:g,type:w}))}};update=()=>{let y=this.targetSelector||this.elementSelector;if(!y)return;let x=[...document.querySelectorAll(y)],{value:h}=this.parts.variables;for(let C of x)for(let l of Object.keys(h))C.style.setProperty(l,h[l])};connectedCallback(){super.connectedCallback(),this.retries=0,this.loadVars(),this.parts.variables.addEventListener("change",this.update)}disconnectedCallback(){if(super.disconnectedCallback(),this.retryTimer)clearTimeout(this.retryTimer)}}var Ez=e7.elementCreator();var{button:ci,div:si}=G,yy="tosi-doc-system-prefs";class V9 extends F{static preferredTagName="tosi-doc-system";static initAttributes={docs:"/docs.json",config:"",localized:"",routing:"",route:"",accent:"",background:"",text:""};context;content=null;corpus;browser;appliedRoute="";suppressed=!1;nestingDepth(){let y=0,x=this.parentNode;while(x){if(x.nodeType===Node.ELEMENT_NODE&&x.tagName==="TOSI-DOC-SYSTEM")y++;x=x.parentNode||x.host||null}return y}prefs;stylesApplied=!1;applyStyles(){if(this.stylesApplied)return;if(this.stylesApplied=!0,!document.querySelector("link[data-tosi-doc-system]"))W1("tosi-doc-system",a7({accent:this.accent||void 0,background:this.background||void 0,text:this.text||void 0}))}applyThemePrefs=()=>{let y=this.prefs.theme.value,x=y==="dark"||y==="system"&&matchMedia("(prefers-color-scheme: dark)").matches,h=this.prefs.highContrast.value;document.body.classList.toggle("darkmode",x),document.body.classList.toggle("high-contrast",h),document.documentElement.classList.toggle("darkmode",x),document.documentElement.classList.toggle("high-contrast",h)};persistPrefs(){try{localStorage.setItem(yy,JSON.stringify({theme:this.prefs.theme.value,highContrast:this.prefs.highContrast.value,locale:this.prefs.locale.value}))}catch{}}initPrefs(){let y={};try{y=JSON.parse(localStorage.getItem(yy)||"{}")}catch{}this.prefs=t({prefs:{theme:y.theme||"system",highContrast:y.highContrast||!1,locale:y.locale||""}}).prefs,this.applyThemePrefs(),matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this.applyThemePrefs),this.prefs.theme.observe(()=>{this.applyThemePrefs(),this.persistPrefs()}),this.prefs.highContrast.observe(()=>{this.applyThemePrefs(),this.persistPrefs()}),this.prefs.locale.observe(()=>this.persistPrefs())}async initLocale(){if(!this.localized)return;try{let y=await(await fetch(this.localized)).text();if(G3(y),this.prefs.locale.value)O4(this.prefs.locale.value)}catch(y){console.warn("<tosi-doc-system> could not load localization from",this.localized,y)}}settingsButton(){return ci({class:"iconic",style:{color:z.linkColor},title:"settings",onClick:(y)=>{let x=[],h="";try{h=JSON.parse(this.config||"{}").projectName||""}catch{}let C=h||document.title||"Documentation";x.push({caption:"Print as PDF",icon:"printer",action:()=>{let i=window.open("","_blank");if(!i){window.alert("Allow pop-ups to print the documentation as a book.");return}i.document.open(),i.document.write(u7(this.corpus,{title:C,autoPrint:!0})),i.document.close()}}),x.push({caption:"Download ePub",icon:"book",action:()=>{let i=document.createElement("a");i.href=`/${d4(C)}.epub`,i.download="",i.click()}}),x.push(null);let l=L.localeOptions.value||[];if(l.length>1)x.push({caption:"Language",icon:"globe",menuItems:l.map((i)=>({caption:i.caption,icon:i.icon,checked:()=>i.value===L.locale.value,action:()=>{this.prefs.locale.value=i.value,O4(i.value)}}))});x.push({caption:"Color Theme",icon:"rgb",menuItems:[{caption:"System",checked:()=>this.prefs.theme.value==="system",action:()=>this.prefs.theme.value="system"},{caption:"Dark",checked:()=>this.prefs.theme.value==="dark",action:()=>this.prefs.theme.value="dark"},{caption:"Light",checked:()=>this.prefs.theme.value==="light",action:()=>this.prefs.theme.value="light"},null,{caption:"High Contrast",checked:()=>this.prefs.highContrast.value,action:()=>this.prefs.highContrast.value=!this.prefs.highContrast.value}]}),n({target:y.target,localized:!0,menuItems:x})}},O.moreVertical())}parseLinks(y){let x=this.querySelector(y);if(!x)return[];return[...x.querySelectorAll("a")].map((h)=>({href:h.getAttribute("href")||"",label:(h.textContent||"").trim(),icon:h.dataset.icon||void 0}))}connectedCallback(){if(super.connectedCallback(),this.nestingDepth()>=2){this.suppressed=!0,this.replaceChildren(si({class:"doc-system-nested"},"\uD83D\uDCD6 nested doc-system preview (suppressed)"));return}if(this.applyStyles(),this.initPrefs(),this.initLocale(),this.corpus===void 0){let y=this.docs||"/docs.json";fetch(y).then((x)=>x.json()).then((x)=>{this.corpus=x;let h=e6(location.search,b2(x));if(h){if(h!==location.pathname){location.replace(h+location.hash);return}history.replaceState(null,"",h+location.hash)}this.queueRender()}).catch((x)=>console.error("<tosi-doc-system> could not load docs from",y,x))}}render(){if(super.render(),this.suppressed||this.corpus===void 0)return;if(this.browser!==void 0){let i=this.browser.navigate;if(i&&this.route&&this.route!==this.appliedRoute)this.appliedRoute=this.route,i(this.route);return}let y={};if(this.config)try{y=JSON.parse(this.config)}catch{console.warn("<tosi-doc-system> ignoring invalid config attribute")}let x=this.nestingDepth()>=1,h=x||this.routing==="memory"||this.routing==="internal",C=this.querySelector(".doc-content")||void 0,l=this.parseLinks(".doc-navbar");if(this.appliedRoute=this.route,this.browser=z9({docs:this.corpus,routing:h?"memory":"path",initialRoute:h?this.route||void 0:void 0,onRouteChange:h?(i)=>{this.appliedRoute=i,this.route=i}:void 0,context:this.context||{tosijs:globalThis.xinjs,"tosijs-ui":globalThis.xinjsui},projectName:y.projectName,projectLinks:y.projectLinks,navbarLinks:l.length?l:void 0,contentElement:C}),!x){let i=this.browser.querySelector("header");if(i)i.append(this.settingsButton())}this.replaceChildren(this.browser)}}var Ti=V9.elementCreator();function di(){if(typeof document>"u")return;let y=globalThis.__TOSI_IMPORT_RESOLVER;if(!y)return;import("./tjs-import-resolver-s4z0w296.js").then(({registerImportResolver:x})=>x(y)).catch((x)=>console.warn("import-resolver: registration failed",x))}di();var{div:J1,slot:Li}=G;class Z1 extends F{static preferredTagName="tosi-editable";static initAttributes={rotationSnap:0,positionSnap:0};static angleSize=15;static gridSize=8;static snapAngle=!1;static snapToGrid=!1;static shadowStyleSpec={":host":{"--handle-bg":"#fff4","--handle-color":"#2228","--handle-hover-bg":"#8ff8","--handle-hover-color":"#222","--handle-size":"20px","--handle-padding":"2px"},":host ::slotted(*)":{position:"absolute"},":host > :not(style,slot)":{boxSizing:"border-box",content:'" "',position:"absolute",display:"flex",height:z.handleSize,width:z.handleSize,padding:z.handlePadding,"--text-color":z.handleColor,background:z.handleBg},":host > .drag-size":{top:0,bottom:0,left:0,right:0,height:"auto",width:"auto",background:"transparent",cursor:"ew-resize"},':host > [part="rotate"]':{transform:`translateY(${z.handleSize_50})`},":host > [locked] > svg:first-child, :host > :not([locked]) > svg+svg":{display:"none"},":host .icon-unlock":{opacity:0.5},":host svg":{pointerEvents:"none"},":host > *:hover":{"--text-color":z.handleHoverColor,background:z.handleHoverBg}};static snappedCoords(y,x){let{gridSize:h}=Z1;return Z1.snapToGrid||y.shiftKey?x.map((C)=>Math.round(C/h)*h):x}static snappedAngle(y,x){let{angleSize:h}=Z1;return Z1.snapAngle||y.shiftKey?Math.round(x/h)*h:x}get locked(){let y=this.parentElement;if(y.style.inset)return{left:!0,top:!0,bottom:!0,right:!0};let x=y.style.right.match(/\d/)!==null,h=!x||y.style.left.match(/\d/)!==null,C=y.style.bottom.match(/\d/)!==null,l=!C||y.style.top.match(/\d/)!==null;return{left:h,top:l,bottom:C,right:x}}set locked(y){let{bottom:x,right:h}=y,{left:C,top:l}=y,i=this.parentElement,k=i.offsetLeft,g=i.offsetTop,w=i.offsetWidth,B=i.offsetHeight,q=i.offsetParent.offsetWidth-k-w,j=i.offsetParent.offsetHeight-g-B;if(Object.assign(i.style,{left:"",right:"",top:"",bottom:"",width:"",height:""}),!h)C=!0;if(!x)l=!0;if(C)i.style.left=k+"px";if(h)i.style.right=q+"px";if(C&&h)i.style.width="auto";else i.style.width=w+"px";if(l)i.style.top=g+"px";if(x)i.style.bottom=j+"px";if(l&&x)i.style.height="auto";else i.style.height=B+"px";this.queueRender()}get coords(){let{top:y,left:x,right:h,bottom:C}=this.parentElement.style;return{top:parseFloat(y),left:parseFloat(x),right:parseFloat(h),bottom:parseFloat(C)}}get left(){return this.parentElement.offsetLeft}get width(){return this.parentElement.offsetWidth}get right(){return this.parentElement.offsetParent.offsetWidth-(this.left+this.width)}get top(){return this.parentElement.offsetTop}get height(){return this.parentElement.offsetHeight}get bottom(){return this.parentElement.offsetParent.offsetHeight-(this.top+this.height)}triggerChange=()=>{this.parentElement.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};adjustPosition=(y)=>{let{locked:x}=this;this.locked=x;let h=this.parentElement,{top:C,left:l,bottom:i,right:k}=this.coords;P1(y,(g,w,B)=>{if([g,w]=Z1.snappedCoords(B,[g,w]),!isNaN(C))h.style.top=C+w+"px";if(!isNaN(i))h.style.bottom=i-w+"px";if(!isNaN(l))h.style.left=l+g+"px";if(!isNaN(k))h.style.right=k-g+"px";if(B.type==="mouseup")return this.triggerChange(),!0})};resize=(y)=>{let x=this.parentElement,{locked:h}=this;this.locked=Object.assign({left:!0,top:!0,right:!0,bottom:!0});let[C,l]=[this.right,this.bottom];P1(y,(i,k,g)=>{let w=C-i,B=l-k;if([w,B]=Z1.snappedCoords(g,[w,B]),x.style.right=w+"px",x.style.bottom=B+"px",g.type==="mouseup")return this.locked=h,this.triggerChange(),!0})};adjustSize=(y)=>{let x=this.parentElement,{locked:h}=this,C=y.target.getAttribute("part");this.locked=Object.assign({left:!0,right:!0,top:!0,bottom:!0});let l=this[C];P1(y,(i,k,g)=>{let[w]=Z1.snappedCoords(g,[l+(["left","right"].includes(C)?i:k)*(["right","bottom"].includes(C)?-1:1)]);if(x.style[C]=w+"px",g.type==="mouseup")return this.locked=h,this.triggerChange(),!0})};get rect(){return this.parentElement.getBoundingClientRect()}get center(){let y=this.parentElement.getBoundingClientRect();return{x:y.x+y.width*0.5,y:y.y+y.height*0.5}}get element(){return this.parentElement}adjustRotation=(y)=>{let{center:x}=this,{transformOrigin:h}=this.element.style;if(!h)this.element.style.transformOrigin="50% 50%";P1(y,(C,l,i)=>{let{clientX:k,clientY:g}=i,w=k-x.x,B=g-x.y,q=B>0?90:-90;if(w!==0)q=Math.atan2(B,w)*180/Math.PI;if(q=Z1.snappedAngle(i,q),q===0)this.element.style.transformOrigin="",this.element.style.transform="";else this.element.style.transform=`rotate(${q}deg)`;return this.triggerChange(),i.type==="mouseup"})};toggleLock=(y)=>{let{locked:x}=this,h=y.target.title.split(" ")[1];x[h]=!x[h],this.locked=x,this.queueRender(),y.stopPropagation(),y.preventDefault()};content=()=>[J1({part:"move",style:{top:"50%",left:"50%",transform:"translate(-50%,-50%)"}},O.move()),J1({part:"left",title:"resize left",class:"drag-size",style:{left:"-6px",width:"8px"}}),J1({part:"right",title:"resize right",class:"drag-size",style:{left:"calc(100% - 2px)",width:"8px"}}),J1({part:"top",title:"resize top",class:"drag-size",style:{top:"-6px",height:"8px",cursor:"ns-resize"}}),J1({part:"bottom",title:"resize bottom",class:"drag-size",style:{top:"calc(100% - 2px)",height:"8px",cursor:"ns-resize"}}),J1({part:"resize",style:{top:"100%",left:"100%"}},O.resize()),J1({part:"rotate",style:{top:"50%",right:"0"}},O.refreshCw()),J1({part:"lockLeft",title:"lock left",style:{top:"50%",left:0,transform:"translate(-100%, -50%)"}},O.unlock(),O.lock()),J1({part:"lockRight",title:"lock right",style:{top:"50%",left:"100%",transform:"translate(0%, -50%)"}},O.unlock(),O.lock()),J1({part:"lockTop",title:"lock top",style:{top:0,left:"50%",transform:"translate(-50%, -100%)"}},O.unlock(),O.lock()),J1({part:"lockBottom",title:"lock bottom",style:{top:"100%",left:"50%",transform:"translate(-50%, 0%)"}},O.unlock(),O.lock()),Li()];connectedCallback(){super.connectedCallback();let{left:y,right:x,top:h,bottom:C,lockLeft:l,lockRight:i,lockTop:k,lockBottom:g,move:w,resize:B,rotate:q}=this.parts,j={passive:!0};[y,x,h,C].forEach((_)=>{_.addEventListener("mousedown",this.adjustSize,j),_.addEventListener("touchstart",this.adjustSize,j)}),[l,i,k,g].forEach((_)=>{_.addEventListener("click",this.toggleLock)}),B.addEventListener("mousedown",this.resize,j),w.addEventListener("mousedown",this.adjustPosition,j),q.addEventListener("mousedown",this.adjustRotation,j),B.addEventListener("touchstart",this.resize,j),w.addEventListener("touchstart",this.adjustPosition,j),q.addEventListener("touchstart",this.adjustRotation,j)}render(){if(super.render(),!this.parentElement)return;let{lockLeft:y,lockRight:x,lockTop:h,lockBottom:C}=this.parts,{left:l,right:i,top:k,bottom:g}=this.locked;y.toggleAttribute("locked",l),x.toggleAttribute("locked",i),h.toggleAttribute("locked",k),C.toggleAttribute("locked",g)}}var ri=Z1.elementCreator();var{div:oi,input:ni,button:P9,span:fi}=G,xy=(y)=>y,hy="null filter, everything matches",_9={contains:{caption:"contains",negative:"does not contain",makeTest:(y)=>{return y=y.toLocaleLowerCase(),(x)=>String(x).toLocaleLowerCase().includes(y)}},hasTags:{caption:"has tags",makeTest:(y)=>{let x=y.split(/[\s,]/).map((h)=>h.trim().toLocaleLowerCase()).filter((h)=>h!=="");return(h)=>Array.isArray(h)&&x.find((C)=>!h.includes(C))===void 0}},doesNotHaveTags:{caption:"does not have tags",makeTest:(y)=>{let x=y.split(/[\s,]/).map((h)=>h.trim().toLocaleLowerCase()).filter((h)=>h!=="");return(h)=>Array.isArray(h)&&x.find((C)=>h.includes(C))===void 0}},equals:{caption:"=",negative:"≠",makeTest:(y)=>{if(isNaN(Number(y)))return y=String(y).toLocaleLowerCase(),(h)=>String(h).toLocaleLowerCase()===y;let x=Number(y);return(h)=>Number(h)===x}},after:{caption:"is after",negative:"is before",makeTest:(y)=>{let x=new Date(y);return(h)=>new Date(h)>x}},greaterThan:{caption:">",negative:"≤",makeTest:(y)=>{if(!isNaN(Number(y))){let x=Number(y);return(h)=>Number(h)>x}return y=y.toLocaleLowerCase(),(x)=>String(x).toLocaleLowerCase()>y}},truthy:{caption:"is true/non-empty/non-zero",negative:"is false/empty/zero",needsValue:!1,makeTest:()=>(y)=>!!y},isTrue:{caption:"= true",needsValue:!1,makeTest:()=>(y)=>y===!0},isFalse:{caption:"= false",needsValue:!1,makeTest:()=>(y)=>y===!1}},ui={description:"anything",test:()=>!0};function Cy(y){return y.options[y.selectedIndex]?.caption||""}class A9 extends F{static preferredTagName="tosi-filter-part";static lightStyleSpec={":host":{display:"flex"},":host .tosi-icon:":{verticalAlign:"middle",pointerEvents:"none"},':host [part="haystack"], :host [part="condition"]':{flex:"1"},':host [part="needle"]':{flex:2},':host [hidden]+[part="padding"]':{display:"block",content:" ",flex:"1 1 auto"}};static initAttributes={haystack:"*",condition:"contains",needle:""};fields=[];filters=_9;content=()=>[F1({part:"haystack"}),F1({part:"condition"}),ni({part:"needle",type:"search"}),fi({part:"padding"}),P9({part:"remove",title:"delete"},O.trash())];filter=ui;get state(){let{haystack:y,needle:x,condition:h}=this.parts;return{haystack:y.value,needle:x.value,condition:h.value}}set state(y){Object.assign(this,y)}buildFilter=()=>{let{haystack:y,condition:x,needle:h}=this.parts,C=x.value.startsWith("~"),l=C?x.value.slice(1):x.value,i=this.filters[l];h.hidden=i.needsValue===!1;let k=i.needsValue===!1?i.makeTest(void 0):i.makeTest(h.value),g=y.value,w;if(g!=="*")w=C?(j)=>!k(j[g]):(j)=>k(j[g]);else w=C?(j)=>Object.values(j).find((_)=>!k(_))!==void 0:(j)=>Object.values(j).find((_)=>k(_))!==void 0;let B=i.needsValue!==!1?` "${h.value}"`:"",q=`${Cy(y)} ${Cy(x)}${B}`;this.filter={description:q,test:w},this.parentElement?.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{haystack:y,condition:x,needle:h,remove:C}=this.parts;y.addEventListener("change",this.buildFilter),x.addEventListener("change",this.buildFilter),h.addEventListener("input",this.buildFilter),y.value=this.haystack,x.value=this.condition,h.value=this.needle,C.addEventListener("click",()=>{let{parentElement:l}=this;this.remove(),l?.dispatchEvent(new Event("change"))})}render(){super.render();let{haystack:y,condition:x,needle:h}=this.parts;if(y.options=[{caption:"any field",value:"*"},...this.fields.map((C)=>C.prop)],x.options=Object.keys(this.filters).map((C)=>{let l=this.filters[C];return l.negative!==void 0?[{caption:l.caption,value:C},{caption:l.negative,value:"~"+C}]:{caption:l.caption,value:C}}).flat(),this.haystack!=="")y.value=this.haystack;if(this.condition!=="")x.value=this.condition;if(this.needle!=="")h.value=this.needle;this.buildFilter()}}var f4=A9.elementCreator();class K9 extends F{static preferredTagName="tosi-filter";static lightStyleSpec={":host":{height:"auto",display:"grid",gridTemplateColumns:"32px calc(100% - 64px) 32px",alignItems:"center"},':host [part="filterContainer"]':{display:"flex",flexDirection:"column",alignItems:"stretch",flex:"1 1 auto"},':host [part="haystack"]':{_fieldWidth:"100px"},':host [part="condition"]':{_fieldWidth:"60px"},':host [part="needle"]':{_fieldWidth:"80px"},':host [part="add"], :host [part="reset"]':{"--button-size":"var(--touch-size, 32px)",borderRadius:"999px",height:"var(--button-size)",lineHeight:"var(--button-size)",margin:"0",padding:"0",textAlign:"center",width:"var(--button-size)",flex:"0 0 var(--button-size)"}};_fields=[];get fields(){return this._fields}set fields(y){this._fields=y,this.queueRender()}get state(){let{filterContainer:y}=this.parts;return[...y.children].map((x)=>x.state)}set state(y){let{fields:x,filters:h}=this,{filterContainer:C}=this.parts;C.textContent="";for(let l of y)C.append(f4({fields:x,filters:h,...l}))}filter=xy;description=hy;addFilter=()=>{let{fields:y,filters:x}=this,{filterContainer:h}=this.parts;h.append(f4({fields:y,filters:x}))};content=()=>[P9({part:"add",title:"add filter condition",onClick:this.addFilter,class:"round"},O.plus()),oi({part:"filterContainer"}),P9({part:"reset",title:"reset filter",onClick:this.reset},O.x())];filters=_9;reset=()=>{let{fields:y,filters:x}=this,{filterContainer:h}=this.parts;this.description=hy,this.filter=xy,h.textContent="",h.append(f4({fields:y,filters:x})),this.dispatchEvent(new Event("change"))};buildFilter=()=>{let{filterContainer:y}=this.parts;if(y.children.length===0){this.reset();return}let x=[...y.children].map((C)=>C.filter),h=x.map((C)=>C.test);this.description=x.map((C)=>C.description).join(", "),this.filter=(C)=>C.filter((l)=>h.find((i)=>i(l)===!1)===void 0),this.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{filterContainer:y}=this.parts;y.addEventListener("change",this.buildFilter),this.reset()}render(){super.render()}}var Ei=K9.elementCreator();var{a:ai}=G;class U9 extends F{static preferredTagName="tosi-header";static shadowStyleSpec={":host":{display:"flex",alignItems:"center",padding:P.tosiHeaderPadding("12px 24px"),background:P.tosiHeaderBg("var(--tosi-accent, #EE257B)"),lineHeight:P.tosiHeaderLineHeight("32px"),gap:P.tosiHeaderGap("8px")},"::slotted(*)":{display:"inline-flex",alignItems:"center"}};content=({slot:y})=>[y()]}var mi=U9.elementCreator(),ly={tosijs:()=>O.tosi(),discord:()=>O.discord(),blog:()=>O.blog(),github:()=>O.github(),npm:()=>O.npm()};class G9 extends F{static preferredTagName="tosi-header-links";static lightStyleSpec={":host":{display:"inline-flex",alignItems:"center",gap:"4px"},":host a":{color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",padding:"4px",opacity:"0.8",cursor:"pointer"},":host a:hover":{opacity:"1"}};links={};content=null;render(){super.render();let y=[];for(let[x,h]of Object.entries(this.links)){if(!h||!ly[x])continue;y.push(ai({title:x,target:"_blank",href:h},ly[x]()))}this.replaceChildren(...y)}}var ti=G9.elementCreator();function iy(){return navigator.getGamepads().filter((x)=>x!==null).map((x)=>{let{id:h,axes:C,buttons:l}=x;return{id:h,axes:C,buttons:l.map((i,k)=>{let{pressed:g,value:w}=i;return{index:k,pressed:g,value:w}}).filter((i)=>i.pressed||i.value!==0).reduce((i,k)=>{return i[k.index]=k.value,i},{})}})}function ei(){let y=iy();return y.length===0?"no active gamepads":y.map(({id:x,axes:h,buttons:C})=>{let l=h.map((k)=>k.toFixed(2)).join(" "),i=Object.keys(C).map((k)=>`[${k}](${C[Number(k)].toFixed(2)})`).join(" ");return`${x}
204
- ${l}
205
- ${i}`}).join(`
206
- `)}function yk(y){let x={};return y.input.onControllerAddedObservable.add((h)=>{h.onMotionControllerInitObservable.add((C)=>{let l={};C.getComponentIds().forEach((k)=>{let g=C.getComponent(k);if(l[k]={pressed:g.pressed,touched:g.touched,value:g.value,axes:{x:g.axes.x,y:g.axes.y}},g.onButtonStateChangedObservable.add((w)=>{l[k].pressed=w.pressed,l[k].touched=w.touched,l[k].value=w.value}),g.onAxisValueChangedObservable)g.onAxisValueChangedObservable.add((w)=>{l[k].axes={x:w.x,y:w.y}})}),x[C.handedness]=l})}),x}function xk(y){if(y===void 0||Object.keys(y).length===0)return"no xr inputs";return Object.keys(y).map((x)=>{let h=y[x],C=[];for(let[l,i]of Object.entries(h)){let k=[];if(i.pressed)k.push("P");if(i.touched)k.push("T");let g=i.value>0,w=i.axes.x!==0||i.axes.y!==0;if(k.length>0||g||w){let B=`${l}[${k.join("")}]`;if(g)B+=` v:${i.value.toFixed(2)}`;if(w)B+=` x:${i.axes.x.toFixed(2)} y:${i.axes.y.toFixed(2)}`;C.push(B)}}return`${x}
203
+ </html>`}var hy=200,dB=600;function fB(y={}){let x=O.fromCss(y.accent??"#EE257B");return{_textColor:y.text??"#222",_brandColor:x,_background:y.background??"#fafafa",_buttonBg:y.buttonBg??"#fdfdfd",_inputBg:y.inputBg??"#fdfdfd",_backgroundShaded:"#f5f5f5",_navBg:x.rotate(30).desaturate(0.5).brighten(0.9),_barColor:x.opacity(0.4),_focusColor:x.opacity(0.7),_placeholderColor:x.opacity(0.4),_brandTextColor:x.rotate(30).brighten(0.9),_insetBg:x.rotate(45).brighten(0.8),_codeBg:y.codeBg??"#fdfdfd",_linkColor:x.rotate(-30).darken(0.5),_shadowColor:"#0004",_menuBg:"#fafafa",_menuItemActiveColor:"#000",_menuItemIconActiveColor:"#000",_menuItemActiveBg:"#aaa",_menuItemHoverBg:"#eee",_menuItemColor:"#222",_menuSeparatorColor:"#2224",_menuShadow:"0 4px 8px #0004",_scrollThumbColor:"#0006",_scrollBarColor:"#0001",_inputBorderShadow:"inset 0 0 2px #0006"}}function Cy(y={}){let x=fB(y),h=O.fromCss(y.accent??"#EE257B");return{"@import":"https://fonts.googleapis.com/css2?family=Aleo:ital,wght@0,100..900;1,100..900&famiSpline+Sans+Mono:ital,wght@0,300..700;1,300..700&display=swap",":root":{_fontFamily:"'Aleo', sans-serif",_codeFontFamily:"'Spline Sans Mono', monospace",_fontSize:"16px",_codeFontSize:"14px",...x,_tosiAccent:l.brandColor,_tosiBg:l.background,_tosiText:l.textColor,_tosiBgInset:l.insetBg,_spacing:"10px",_lineHeight:"calc(var(--font-size) * 1.6)",_h1Scale:"2",_h2Scale:"1.5",_h3Scale:"1.25",_touchSize:"32px",_headerHeight:"calc( var(--line-height) * var(--h2-scale) + var(--spacing) * 2 )",_docContentMaxWidth:"44em"},".darkmode":{...g0(x),_shadowColor:h.opacity(0.5),_menuShadow:`0 0 0 2px ${h.opacity(0.75)}`,_menuSeparatorColor:h.opacity(0.5)},".high-contrast":{filter:"contrast(2)"},"*":{boxSizing:"border-box",scrollbarColor:`${l.scrollThumbColor} ${l.scrollBarColor}`,scrollbarWidth:"thin"},body:{fontFamily:l.fontFamily,fontSize:l.fontSize,margin:"0",lineHeight:l.lineHeight,background:l.background,_tosiTabsSelectedColor:l.brandColor,_tosiTabsBarColor:l.brandTextColor,_menuItemIconColor:l.brandColor,color:l.textColor},"tosi-doc-system":{display:"block"},"tosi-doc-system tosi-sidenav::part(nav)":{background:l.navBg},"tosi-doc-system:not(:defined)":{display:"block",position:"fixed",inset:`${l.headerHeight} 0 0 0`,overflow:"auto"},"tosi-doc-system:not(:defined)::before":{content:'""',position:"fixed",top:"0",left:"0",right:"0",height:l.headerHeight,background:l.brandColor},"tosi-doc-system:not(:defined) .doc-content":{display:"block",maxWidth:l.docContentMaxWidth,margin:"auto",padding:"0 1em",overflow:"hidden"},"tosi-doc-system:not(:defined) .doc-navbar":{display:"none"},"tosi-doc-system:not(:defined) pre:has(> code.language-test)":{display:"none"},"tosi-doc-system:not(:defined) .doc-nav":{display:"none"},[`@media (min-width: ${dB}px)`]:{"tosi-doc-system:not(:defined)":{left:`${hy}px`},"tosi-doc-system:not(:defined) .doc-nav":{display:"block",position:"fixed",left:"0",top:l.headerHeight,bottom:"0",width:`${hy}px`,overflow:"auto",background:l.navBg,padding:"0"},"tosi-doc-system:not(:defined) .doc-nav summary":{cursor:"pointer"}},".center":{display:"flex",alignItems:"center",justifyContent:"center"},"input, button, select, textarea":{fontFamily:l.fontFamily,fontSize:l.fontSize,color:"currentColor",background:l.inputBg},select:{WebkitAppearance:"none",appearance:"none"},header:{background:l.brandColor,color:l.brandTextColor,_textColor:l.brandTextColor,_linkColor:l.brandTextColor,display:"flex",alignItems:"center",padding:"0 var(--spacing)",lineHeight:"calc(var(--line-height) * var(--h1-scale))",height:l.headerHeight,whiteSpace:"nowrap"},h1:{color:l.brandColor,fontSize:"calc(var(--font-size) * var(--h1-scale))",lineHeight:"calc(var(--line-height) * var(--h1-scale))",fontWeight:"400",borderBottom:`4px solid ${l.barColor}`,margin:`${l.spacing} 0 ${l.spacing200}`,padding:0},"header h2":{color:l.brandTextColor,whiteSpace:"nowrap"},h2:{color:l.brandColor,fontSize:"calc(var(--font-size) * var(--h2-scale))",lineHeight:"calc(var(--line-height) * var(--h2-scale))",margin:"calc(var(--spacing) * var(--h2-scale)) 0"},h3:{fontSize:"calc(var(--font-size) * var(--h3-scale))",lineHeight:"calc(var(--line-height) * var(--h3-scale))",margin:"calc(var(--spacing) * var(--h3-scale)) 0"},"input[type=search]":{borderRadius:99},blockquote:{position:"relative",background:l.insetBg,margin:"0 48px 56px 0",borderRadius:l.spacing,padding:"var(--spacing) calc(var(--spacing) * 2)",filter:`drop-shadow(0px 1px 1px ${l.shadowColor})`},"blockquote > :first-child":{marginTop:"0"},"blockquote > :last-child":{marginBottom:"0"},"blockquote::before":{content:'" "',display:"block",width:1,height:1,border:"10px solid transparent",borderTopColor:l.insetBg,borderRightColor:l.insetBg,position:"absolute",bottom:-20,right:24},"blockquote::after":{content:'" "',width:48,height:48,display:"block",bottom:-48,right:-24,position:"absolute",background:q0(Q.tosi(),void 0,void 0,2)},a:{textDecoration:"none",color:l.linkColor,opacity:"0.9",borderBottom:"1px solid var(--brand-color)"},"button, select, .clickable":{display:"inline-flex",alignItems:"center",justifyContent:"center",transition:"ease-out 0.2s",_textColor:l.brandColor,color:l.textColor,textDecoration:"none",background:l.buttonBg,padding:"0 calc(var(--spacing) * 1.25)",border:"none",borderRadius:"calc(var(--spacing) * 0.5)"},"button, select, .clickable, input":{lineHeight:"calc(var(--line-height) + var(--spacing))"},"input, textarea":{border:"none",outline:"none",borderRadius:"calc(var(--spacing) * 0.5)",boxShadow:l.inputBorderShadow},input:{padding:"0 calc(var(--spacing) * 1.5)"},"::placeholder":{color:l.placeholderColor},img:{verticalAlign:"middle"},"button:hover, .clickable:hover":{boxShadow:"inset 0 0 0 2px var(--brand-color)"},"button:active, .clickable:active":{background:l.brandColor,color:l.brandTextColor},label:{display:"inline-flex",gap:"calc(var(--spacing) * 0.5)",alignItems:"center"},".elastic":{flex:"1 1 auto",overflow:"hidden",position:"relative"},"svg.tosi-icon, button svg":{fill:"currentColor",pointerEvents:"none"},"[aria-selected]":{background:"#08835820"},":disabled":{opacity:"0.5",filter:"saturate(0)",pointerEvents:"none"},pre:{background:l.codeBg,padding:l.spacing,borderRadius:"calc(var(--spacing) * 0.25)",overflow:"auto",fontSize:l.codeFontSize,lineHeight:"calc(var(--font-size) * 1.2)"},"pre, code":{fontFamily:l.codeFontFamily,_textColor:l.brandColor},".transparent, .iconic":{background:"none"},".iconic":{padding:"0",fontSize:"150%",height:"calc(var(--line-height) + var(--spacing))",lineHeight:"calc(var(--line-height) + var(--spacing))",width:"calc(var(--line-height) + var(--spacing))",textAlign:"center"},".transparent:hover, .iconic:hover":{background:"#0002",boxShadow:"none",color:l.textColor},".transparent:active, .iconic:active":{background:"#0004",boxShadow:"none",color:l.textColor},".current, summary:has(.current)":{background:l.background},".doc-link":{cursor:"pointer",borderBottom:"none",transition:"0.15s ease-out",marginLeft:"10px",padding:"calc(var(--spacing) * 0.5) calc(var(--spacing) * 1.5)"},".doc-link:not(.current):hover":{background:l.background},".doc-link:not(.current)":{opacity:"0.8",marginLeft:0},"tosi-example":{margin:"var(--spacing) 0"},"tosi-example [part=editors]":{background:l.insetBg},"[class*='icon-'], tosi-icon":{color:"currentcolor",pointerEvents:"none"},"[class*='icon-']":{verticalAlign:"middle"},table:{borderCollapse:"collapse"},thead:{background:l.brandColor,color:l.brandTextColor},tbody:{background:l.background},"tr:nth-child(2n)":{background:l.backgroundShaded},"th, td":{padding:"calc(var(--spacing) * 0.5) var(--spacing)"},".doc-nav ul, .doc-nav li":{listStyle:"none",margin:0,padding:0},".doc-nav li":{display:"flex",flexDirection:"column"},".doc-nav":{display:"flex",flexDirection:"column"},".doc-nav details > ul":{paddingLeft:l.spacing},".doc-nav details:not([open]) > ul":{display:"none"},".doc-nav summary":{cursor:"pointer",paddingLeft:"calc(var(--spacing) * 0.5)"},".doc-nav summary::marker":{color:l.brandColor},".doc-nav summary > .doc-link":{display:"inline-block",paddingLeft:"calc(var(--spacing) * 0.5)"},".doc-navbar":{listStyle:"none",display:"flex",flexWrap:"wrap",gap:l.spacing,margin:0,padding:l.spacing}}}var{form:sB,slot:G9,tosiSlot:ky,label:uB,input:rB,span:mB}=G;function B2(y,x,h){if(h!==""&&h!==!1)y.setAttribute(x,h);else y.removeAttribute(x)}function nB(y){switch(y.type){case"checkbox":return y.checked;case"radio":{let x=y.parentElement?.querySelector(`input[type="radio"][name="${y.name}"]:checked`);return x?x.value:null}case"range":case"number":return Number(y.value);default:return Array.isArray(y.value)&&y.value.length===0?null:y.value}}function By(y,x){if(!(y instanceof HTMLElement));else if(y instanceof HTMLInputElement)switch(y.type){case"checkbox":if(y.checked!==Boolean(x))y.checked=x;break;case"radio":{let h=x===y.value;if(y.checked!==h)y.checked=h;break}default:{let h=String(x||"");if(y.value!==h)y.value=h}}else if(x!=null||y.value!=null){let h=String(x||"");if(y.value!==h)y.value=h}}class m4 extends ${static preferredTagName="tosi-field";static lightStyleSpec={':host [part="field"]':{position:"relative",display:"flex",alignItems:"center",gap:A.prefixSuffixGap("8px")},':host [part="field"][prefix]::before':{content:"attr(prefix)"},':host [part="field"][suffix]::after':{content:"attr(suffix)"},':host [part="field"] > *, :host [part="input"] > *':{width:"100%"},":host textarea":{resize:"none"},':host input[type="checkbox"]':{width:"fit-content"},":host .hidden":{position:"absolute",pointerEvents:"none",opacity:0}};static initAttributes={caption:"",key:"",type:"",optional:!1,pattern:"",placeholder:"",min:"",max:"",step:"",fixedPrecision:-1,prefix:"",suffix:""};value=null;content=uB(ky({part:"caption"}),mB({part:"field"},ky({part:"input",name:"input"}),rB({part:"valueHolder"})));handleChange=()=>{let{input:y,valueHolder:x}=this.parts,h=y.children[0]||x;if(h!==x)x.value=h.value;this.value=nB(h);let C=this.closest("tosi-form");if(C&&this.key!=="")switch(this.type){case"checkbox":C.fields[this.key]=h.checked;break;case"number":case"range":if(this.fixedPrecision>-1)h.value=Number(h.value).toFixed(this.fixedPrecision),C.fields[this.key]=Number(h.value);else C.fields[this.key]=Number(h.value);break;default:C.fields[this.key]=h.value}};connectedCallback(){super.connectedCallback();let{input:y,valueHolder:x}=this.parts;x.addEventListener("change",this.handleChange),y.addEventListener("change",this.handleChange,!0)}render(){let{input:y,caption:x,valueHolder:h,field:C}=this.parts;if(x.textContent?.trim()==="")x.append(this.caption!==""?this.caption:this.key);if(this.type==="text"){let k=y.children[0];if(!(k instanceof HTMLTextAreaElement))y.textContent="",k=G.textarea({value:this.value}),y.append(k);if(this.placeholder)k.setAttribute("placeholder",this.placeholder)}else if(this.type==="color"){if(!y.children[0]?.matches("tosi-color"))y.textContent="",y.append(A3({value:this.value}))}else if(y.children.length===0){if(B2(h,"placeholder",this.placeholder),B2(h,"type",this.type),B2(h,"pattern",this.pattern),B2(h,"min",this.min),B2(h,"max",this.max),this.step)B2(h,"step",this.step);else if(this.fixedPrecision>0&&this.type==="number")B2(h,"step",Math.pow(10,-this.fixedPrecision))}if(By(h,this.value),By(y.children[0],this.value),this.prefix)C.setAttribute("prefix",this.prefix);else C.removeAttribute("prefix");if(this.suffix)C.setAttribute("suffix",this.suffix);else C.removeAttribute("suffix");if(h.classList.toggle("hidden",y.children.length>0),y.children.length>0)h.setAttribute("tabindex","-1");else h.removeAttribute("tabindex");y.style.display=y.children.length===0?"none":"",B2(h,"required",!this.optional)}}class n4 extends ${static preferredTagName="tosi-form";context={};value={};get isValid(){return[...this.querySelectorAll("*")].filter((x)=>x.required!==void 0).find((x)=>!x.reportValidity())===void 0}static shadowStyleSpec={":host":{display:"flex",flexDirection:"column"},":host::part(header), :host::part(footer)":{display:"flex"},":host::part(content)":{display:"flex",flexDirection:"column",overflow:"hidden auto",height:"100%",width:"100%",position:"relative",boxSizing:"border-box"},":host form":{display:"flex",flex:"1 1 auto",position:"relative",overflow:"hidden"}};content=[G9({part:"header",name:"header"}),sB({part:"form"},G9({part:"content"})),G9({part:"footer",name:"footer"})];getField=(y)=>{return this.querySelector(`tosi-field[key="${y}"]`)};get fields(){if(typeof this.value==="string")try{this.value=JSON.parse(this.value)}catch{console.log("<tosi-form> could not use its value, expects valid JSON"),this.value={}}let{getField:y}=this,x=this.dispatchEvent.bind(this);return new Proxy(this.value,{get(h,C){return h[C]},set(h,C,k){if(h[C]!==k){h[C]=k;let B=y(C);if(B)B.value=k;x(new Event("change"))}return!0}})}set fields(y){let x=[...this.querySelectorAll("tosi-field")];for(let h of x)h.value=y[h.key]}submit=()=>{this.parts.form.dispatchEvent(new Event("submit"))};handleSubmit=(y)=>{y.preventDefault(),y.stopPropagation(),this.syncFieldValues();let x=this.fields;this.submitCallback(x,this.isValid)};submitCallback=(y,x)=>{console.log("override submitCallback to handle this data",{value:y,isValid:x})};connectedCallback(){super.connectedCallback();let{form:y}=this.parts;y.addEventListener("submit",this.handleSubmit),this.addEventListener("change",this.handleElementChange,!0),this.initializeNamedElements()}handleElementChange=(y)=>{let x=y.target,h=x.getAttribute("name");if(h&&"value"in x)this.fields[h]=x.value};syncFieldValues(){let y=this.fields,x=this.querySelectorAll("[name], [key]");for(let h of x){let C=h.getAttribute("name")||h.getAttribute("key");if(!C)continue;if(y[C]===void 0){let k=h.value??h.getAttribute("value");if(k!=null)y[C]=k}}}initializeNamedElements(){let y=this.fields,x=this.querySelectorAll("[name], [key]");for(let h of x){let C=h.getAttribute("name")||h.getAttribute("key");if(!C)continue;if(y[C]!==void 0)h.value=y[C]}}}var EB=m4,oB=n4,E4=m4.elementCreator(),o4=n4.elementCreator(),aB=E4,tB=o4;var{h2:eB,code:yw}=G,xw=/^(#[0-9a-f]{3,8}|(?:rgb|hsl)a?\([^)]*\))$/i;class wy extends ${static preferredTagName="tosi-css-var-editor";static initAttributes={elementSelector:"",targetSelector:""};content=()=>[eB({part:"title"},"CSS variables"),o4({part:"variables",changeCallback:this.update})];retryTimer;retries=0;loadVars=()=>{let{title:y,variables:x}=this.parts;if(x.textContent="",!this.elementSelector)return;y.textContent=`CSS variables for ${this.elementSelector}`;let h=document.querySelector(this.elementSelector);if(!h){if(this.retries++<40)this.retryTimer=setTimeout(this.loadVars,250);return}let C=h.shadowRoot?h.shadowRoot.querySelector("style"):document.querySelector(`style#${this.elementSelector}-component`);if(!C||!C.textContent)return;let k=getComputedStyle(h),B=[...new Set(C.textContent.match(/--[\w-]+/g)??[])];for(let w of B){let g=k.getPropertyValue(w).trim(),z=xw.test(g)?"color":"string";if(z==="color")g=O.fromCss(g).html;x.append(E4(yw(w),{key:w,value:g,type:z}))}};update=()=>{let y=this.targetSelector||this.elementSelector;if(!y)return;let x=[...document.querySelectorAll(y)],{value:h}=this.parts.variables;for(let C of x)for(let k of Object.keys(h))C.style.setProperty(k,h[k])};connectedCallback(){super.connectedCallback(),this.retries=0,this.loadVars(),this.parts.variables.addEventListener("change",this.update)}disconnectedCallback(){if(super.disconnectedCallback(),this.retryTimer)clearTimeout(this.retryTimer)}}var Qj=wy.elementCreator();var{button:hw,div:Cw}=G,gy="tosi-doc-system-prefs";class Q9 extends ${static preferredTagName="tosi-doc-system";static initAttributes={docs:"/docs.json",config:"",localized:"",routing:"",route:"",accent:"",background:"",text:""};context;content=null;corpus;browser;appliedRoute="";suppressed=!1;nestingDepth(){let y=0,x=this.parentNode;while(x){if(x.nodeType===Node.ELEMENT_NODE&&x.tagName==="TOSI-DOC-SYSTEM")y++;x=x.parentNode||x.host||null}return y}prefs;stylesApplied=!1;applyStyles(){if(this.stylesApplied)return;if(this.stylesApplied=!0,!document.querySelector("link[data-tosi-doc-system]"))Y1("tosi-doc-system",Cy({accent:this.accent||void 0,background:this.background||void 0,text:this.text||void 0}))}applyThemePrefs=()=>{let y=this.prefs.theme.value,x=y==="dark"||y==="system"&&matchMedia("(prefers-color-scheme: dark)").matches,h=this.prefs.highContrast.value;document.body.classList.toggle("darkmode",x),document.body.classList.toggle("high-contrast",h),document.documentElement.classList.toggle("darkmode",x),document.documentElement.classList.toggle("high-contrast",h)};persistPrefs(){try{localStorage.setItem(gy,JSON.stringify({theme:this.prefs.theme.value,highContrast:this.prefs.highContrast.value,locale:this.prefs.locale.value}))}catch{}}initPrefs(){let y={};try{y=JSON.parse(localStorage.getItem(gy)||"{}")}catch{}this.prefs=e({prefs:{theme:y.theme||"system",highContrast:y.highContrast||!1,locale:y.locale||""}}).prefs,this.applyThemePrefs(),matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this.applyThemePrefs),this.prefs.theme.observe(()=>{this.applyThemePrefs(),this.persistPrefs()}),this.prefs.highContrast.observe(()=>{this.applyThemePrefs(),this.persistPrefs()}),this.prefs.locale.observe(()=>this.persistPrefs())}async initLocale(){if(!this.localized)return;try{let y=await(await fetch(this.localized)).text();if(O3(y),this.prefs.locale.value)i4(this.prefs.locale.value)}catch(y){console.warn("<tosi-doc-system> could not load localization from",this.localized,y)}}settingsButton(){return hw({class:"iconic",style:{color:l.linkColor},title:"settings",onClick:(y)=>{let x=[],h="";try{h=JSON.parse(this.config||"{}").projectName||""}catch{}let C=h||document.title||"Documentation";x.push({caption:"Print as PDF",icon:"printer",action:()=>{let B=window.open("","_blank");if(!B){window.alert("Allow pop-ups to print the documentation as a book.");return}B.document.open(),B.document.write(xy(this.corpus,{title:C,autoPrint:!0})),B.document.close()}}),x.push({caption:"Download ePub",icon:"book",action:()=>{let B=document.createElement("a");B.href=`/${r4(C)}.epub`,B.download="",B.click()}}),x.push(null);let k=c.localeOptions.value||[];if(k.length>1)x.push({caption:"Language",icon:"globe",menuItems:k.map((B)=>({caption:B.caption,icon:B.icon,checked:()=>B.value===c.locale.value,action:()=>{this.prefs.locale.value=B.value,i4(B.value)}}))});x.push({caption:"Color Theme",icon:"rgb",menuItems:[{caption:"System",checked:()=>this.prefs.theme.value==="system",action:()=>this.prefs.theme.value="system"},{caption:"Dark",checked:()=>this.prefs.theme.value==="dark",action:()=>this.prefs.theme.value="dark"},{caption:"Light",checked:()=>this.prefs.theme.value==="light",action:()=>this.prefs.theme.value="light"},null,{caption:"High Contrast",checked:()=>this.prefs.highContrast.value,action:()=>this.prefs.highContrast.value=!this.prefs.highContrast.value}]}),r({target:y.target,localized:!0,menuItems:x})}},Q.moreVertical())}parseLinks(y){let x=this.querySelector(y);if(!x)return[];return[...x.querySelectorAll("a")].map((h)=>({href:h.getAttribute("href")||"",label:(h.textContent||"").trim(),icon:h.dataset.icon||void 0}))}connectedCallback(){if(super.connectedCallback(),this.nestingDepth()>=2){this.suppressed=!0,this.replaceChildren(Cw({class:"doc-system-nested"},"\uD83D\uDCD6 nested doc-system preview (suppressed)"));return}if(this.applyStyles(),this.initPrefs(),this.initLocale(),this.corpus===void 0){let y=this.docs||"/docs.json";fetch(y).then((x)=>x.json()).then((x)=>{this.corpus=x;let h=B7(location.search,b2(x));if(h){if(h!==location.pathname){location.replace(h+location.hash);return}history.replaceState(null,"",h+location.hash)}this.queueRender()}).catch((x)=>console.error("<tosi-doc-system> could not load docs from",y,x))}}render(){if(super.render(),this.suppressed||this.corpus===void 0)return;if(this.browser!==void 0){let B=this.browser.navigate;if(B&&this.route&&this.route!==this.appliedRoute)this.appliedRoute=this.route,B(this.route);return}let y={};if(this.config)try{y=JSON.parse(this.config)}catch{console.warn("<tosi-doc-system> ignoring invalid config attribute")}let x=this.nestingDepth()>=1,h=x||this.routing==="memory"||this.routing==="internal",C=this.querySelector(".doc-content")||void 0,k=this.parseLinks(".doc-navbar");if(this.appliedRoute=this.route,this.browser=P9({docs:this.corpus,routing:h?"memory":"path",initialRoute:h?this.route||void 0:void 0,onRouteChange:h?(B)=>{this.appliedRoute=B,this.route=B}:void 0,context:this.context||{tosijs:globalThis.xinjs,"tosijs-ui":globalThis.xinjsui},projectName:y.projectName,projectLinks:y.projectLinks,logo:y.logo,navbarLinks:k.length?k:void 0,contentElement:C}),!x){let B=this.browser.querySelector("header");if(B)B.append(this.settingsButton())}this.replaceChildren(this.browser)}}var kw=Q9.elementCreator();function Bw(){if(typeof document>"u")return;let y=globalThis.__TOSI_IMPORT_RESOLVER;if(!y)return;import("./tjs-import-resolver-s4z0w296.js").then(({registerImportResolver:x})=>x(y)).catch((x)=>console.warn("import-resolver: registration failed",x))}Bw();var{div:J1,slot:ww}=G;class Z1 extends ${static preferredTagName="tosi-editable";static initAttributes={rotationSnap:0,positionSnap:0};static angleSize=15;static gridSize=8;static snapAngle=!1;static snapToGrid=!1;static shadowStyleSpec={":host":{"--handle-bg":"#fff4","--handle-color":"#2228","--handle-hover-bg":"#8ff8","--handle-hover-color":"#222","--handle-size":"20px","--handle-padding":"2px"},":host ::slotted(*)":{position:"absolute"},":host > :not(style,slot)":{boxSizing:"border-box",content:'" "',position:"absolute",display:"flex",height:l.handleSize,width:l.handleSize,padding:l.handlePadding,"--text-color":l.handleColor,background:l.handleBg},":host > .drag-size":{top:0,bottom:0,left:0,right:0,height:"auto",width:"auto",background:"transparent",cursor:"ew-resize"},':host > [part="rotate"]':{transform:`translateY(${l.handleSize_50})`},":host > [locked] > svg:first-child, :host > :not([locked]) > svg+svg":{display:"none"},":host .icon-unlock":{opacity:0.5},":host svg":{pointerEvents:"none"},":host > *:hover":{"--text-color":l.handleHoverColor,background:l.handleHoverBg}};static snappedCoords(y,x){let{gridSize:h}=Z1;return Z1.snapToGrid||y.shiftKey?x.map((C)=>Math.round(C/h)*h):x}static snappedAngle(y,x){let{angleSize:h}=Z1;return Z1.snapAngle||y.shiftKey?Math.round(x/h)*h:x}get locked(){let y=this.parentElement;if(y.style.inset)return{left:!0,top:!0,bottom:!0,right:!0};let x=y.style.right.match(/\d/)!==null,h=!x||y.style.left.match(/\d/)!==null,C=y.style.bottom.match(/\d/)!==null,k=!C||y.style.top.match(/\d/)!==null;return{left:h,top:k,bottom:C,right:x}}set locked(y){let{bottom:x,right:h}=y,{left:C,top:k}=y,B=this.parentElement,w=B.offsetLeft,g=B.offsetTop,z=B.offsetWidth,q=B.offsetHeight,j=B.offsetParent.offsetWidth-w-z,V=B.offsetParent.offsetHeight-g-q;if(Object.assign(B.style,{left:"",right:"",top:"",bottom:"",width:"",height:""}),!h)C=!0;if(!x)k=!0;if(C)B.style.left=w+"px";if(h)B.style.right=j+"px";if(C&&h)B.style.width="auto";else B.style.width=z+"px";if(k)B.style.top=g+"px";if(x)B.style.bottom=V+"px";if(k&&x)B.style.height="auto";else B.style.height=q+"px";this.queueRender()}get coords(){let{top:y,left:x,right:h,bottom:C}=this.parentElement.style;return{top:parseFloat(y),left:parseFloat(x),right:parseFloat(h),bottom:parseFloat(C)}}get left(){return this.parentElement.offsetLeft}get width(){return this.parentElement.offsetWidth}get right(){return this.parentElement.offsetParent.offsetWidth-(this.left+this.width)}get top(){return this.parentElement.offsetTop}get height(){return this.parentElement.offsetHeight}get bottom(){return this.parentElement.offsetParent.offsetHeight-(this.top+this.height)}triggerChange=()=>{this.parentElement.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};adjustPosition=(y)=>{let{locked:x}=this;this.locked=x;let h=this.parentElement,{top:C,left:k,bottom:B,right:w}=this.coords;_1(y,(g,z,q)=>{if([g,z]=Z1.snappedCoords(q,[g,z]),!isNaN(C))h.style.top=C+z+"px";if(!isNaN(B))h.style.bottom=B-z+"px";if(!isNaN(k))h.style.left=k+g+"px";if(!isNaN(w))h.style.right=w-g+"px";if(q.type==="mouseup")return this.triggerChange(),!0})};resize=(y)=>{let x=this.parentElement,{locked:h}=this;this.locked=Object.assign({left:!0,top:!0,right:!0,bottom:!0});let[C,k]=[this.right,this.bottom];_1(y,(B,w,g)=>{let z=C-B,q=k-w;if([z,q]=Z1.snappedCoords(g,[z,q]),x.style.right=z+"px",x.style.bottom=q+"px",g.type==="mouseup")return this.locked=h,this.triggerChange(),!0})};adjustSize=(y)=>{let x=this.parentElement,{locked:h}=this,C=y.target.getAttribute("part");this.locked=Object.assign({left:!0,right:!0,top:!0,bottom:!0});let k=this[C];_1(y,(B,w,g)=>{let[z]=Z1.snappedCoords(g,[k+(["left","right"].includes(C)?B:w)*(["right","bottom"].includes(C)?-1:1)]);if(x.style[C]=z+"px",g.type==="mouseup")return this.locked=h,this.triggerChange(),!0})};get rect(){return this.parentElement.getBoundingClientRect()}get center(){let y=this.parentElement.getBoundingClientRect();return{x:y.x+y.width*0.5,y:y.y+y.height*0.5}}get element(){return this.parentElement}adjustRotation=(y)=>{let{center:x}=this,{transformOrigin:h}=this.element.style;if(!h)this.element.style.transformOrigin="50% 50%";_1(y,(C,k,B)=>{let{clientX:w,clientY:g}=B,z=w-x.x,q=g-x.y,j=q>0?90:-90;if(z!==0)j=Math.atan2(q,z)*180/Math.PI;if(j=Z1.snappedAngle(B,j),j===0)this.element.style.transformOrigin="",this.element.style.transform="";else this.element.style.transform=`rotate(${j}deg)`;return this.triggerChange(),B.type==="mouseup"})};toggleLock=(y)=>{let{locked:x}=this,h=y.target.title.split(" ")[1];x[h]=!x[h],this.locked=x,this.queueRender(),y.stopPropagation(),y.preventDefault()};content=()=>[J1({part:"move",style:{top:"50%",left:"50%",transform:"translate(-50%,-50%)"}},Q.move()),J1({part:"left",title:"resize left",class:"drag-size",style:{left:"-6px",width:"8px"}}),J1({part:"right",title:"resize right",class:"drag-size",style:{left:"calc(100% - 2px)",width:"8px"}}),J1({part:"top",title:"resize top",class:"drag-size",style:{top:"-6px",height:"8px",cursor:"ns-resize"}}),J1({part:"bottom",title:"resize bottom",class:"drag-size",style:{top:"calc(100% - 2px)",height:"8px",cursor:"ns-resize"}}),J1({part:"resize",style:{top:"100%",left:"100%"}},Q.resize()),J1({part:"rotate",style:{top:"50%",right:"0"}},Q.refreshCw()),J1({part:"lockLeft",title:"lock left",style:{top:"50%",left:0,transform:"translate(-100%, -50%)"}},Q.unlock(),Q.lock()),J1({part:"lockRight",title:"lock right",style:{top:"50%",left:"100%",transform:"translate(0%, -50%)"}},Q.unlock(),Q.lock()),J1({part:"lockTop",title:"lock top",style:{top:0,left:"50%",transform:"translate(-50%, -100%)"}},Q.unlock(),Q.lock()),J1({part:"lockBottom",title:"lock bottom",style:{top:"100%",left:"50%",transform:"translate(-50%, 0%)"}},Q.unlock(),Q.lock()),ww()];connectedCallback(){super.connectedCallback();let{left:y,right:x,top:h,bottom:C,lockLeft:k,lockRight:B,lockTop:w,lockBottom:g,move:z,resize:q,rotate:j}=this.parts,V={passive:!0};[y,x,h,C].forEach((_)=>{_.addEventListener("mousedown",this.adjustSize,V),_.addEventListener("touchstart",this.adjustSize,V)}),[k,B,w,g].forEach((_)=>{_.addEventListener("click",this.toggleLock)}),q.addEventListener("mousedown",this.resize,V),z.addEventListener("mousedown",this.adjustPosition,V),j.addEventListener("mousedown",this.adjustRotation,V),q.addEventListener("touchstart",this.resize,V),z.addEventListener("touchstart",this.adjustPosition,V),j.addEventListener("touchstart",this.adjustRotation,V)}render(){if(super.render(),!this.parentElement)return;let{lockLeft:y,lockRight:x,lockTop:h,lockBottom:C}=this.parts,{left:k,right:B,top:w,bottom:g}=this.locked;y.toggleAttribute("locked",k),x.toggleAttribute("locked",B),h.toggleAttribute("locked",w),C.toggleAttribute("locked",g)}}var gw=Z1.elementCreator();var{div:zw,input:qw,button:$9,span:lw}=G,zy=(y)=>y,qy="null filter, everything matches",Y9={contains:{caption:"contains",negative:"does not contain",makeTest:(y)=>{return y=y.toLocaleLowerCase(),(x)=>String(x).toLocaleLowerCase().includes(y)}},hasTags:{caption:"has tags",makeTest:(y)=>{let x=y.split(/[\s,]/).map((h)=>h.trim().toLocaleLowerCase()).filter((h)=>h!=="");return(h)=>Array.isArray(h)&&x.find((C)=>!h.includes(C))===void 0}},doesNotHaveTags:{caption:"does not have tags",makeTest:(y)=>{let x=y.split(/[\s,]/).map((h)=>h.trim().toLocaleLowerCase()).filter((h)=>h!=="");return(h)=>Array.isArray(h)&&x.find((C)=>h.includes(C))===void 0}},equals:{caption:"=",negative:"≠",makeTest:(y)=>{if(isNaN(Number(y)))return y=String(y).toLocaleLowerCase(),(h)=>String(h).toLocaleLowerCase()===y;let x=Number(y);return(h)=>Number(h)===x}},after:{caption:"is after",negative:"is before",makeTest:(y)=>{let x=new Date(y);return(h)=>new Date(h)>x}},greaterThan:{caption:">",negative:"≤",makeTest:(y)=>{if(!isNaN(Number(y))){let x=Number(y);return(h)=>Number(h)>x}return y=y.toLocaleLowerCase(),(x)=>String(x).toLocaleLowerCase()>y}},truthy:{caption:"is true/non-empty/non-zero",negative:"is false/empty/zero",needsValue:!1,makeTest:()=>(y)=>!!y},isTrue:{caption:"= true",needsValue:!1,makeTest:()=>(y)=>y===!0},isFalse:{caption:"= false",needsValue:!1,makeTest:()=>(y)=>y===!1}},jw={description:"anything",test:()=>!0};function ly(y){return y.options[y.selectedIndex]?.caption||""}class i9 extends ${static preferredTagName="tosi-filter-part";static lightStyleSpec={":host":{display:"flex"},":host .tosi-icon:":{verticalAlign:"middle",pointerEvents:"none"},':host [part="haystack"], :host [part="condition"]':{flex:"1"},':host [part="needle"]':{flex:2},':host [hidden]+[part="padding"]':{display:"block",content:" ",flex:"1 1 auto"}};static initAttributes={haystack:"*",condition:"contains",needle:""};fields=[];filters=Y9;content=()=>[Q1({part:"haystack"}),Q1({part:"condition"}),qw({part:"needle",type:"search"}),lw({part:"padding"}),$9({part:"remove",title:"delete"},Q.trash())];filter=jw;get state(){let{haystack:y,needle:x,condition:h}=this.parts;return{haystack:y.value,needle:x.value,condition:h.value}}set state(y){Object.assign(this,y)}buildFilter=()=>{let{haystack:y,condition:x,needle:h}=this.parts,C=x.value.startsWith("~"),k=C?x.value.slice(1):x.value,B=this.filters[k];h.hidden=B.needsValue===!1;let w=B.needsValue===!1?B.makeTest(void 0):B.makeTest(h.value),g=y.value,z;if(g!=="*")z=C?(V)=>!w(V[g]):(V)=>w(V[g]);else z=C?(V)=>Object.values(V).find((_)=>!w(_))!==void 0:(V)=>Object.values(V).find((_)=>w(_))!==void 0;let q=B.needsValue!==!1?` "${h.value}"`:"",j=`${ly(y)} ${ly(x)}${q}`;this.filter={description:j,test:z},this.parentElement?.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{haystack:y,condition:x,needle:h,remove:C}=this.parts;y.addEventListener("change",this.buildFilter),x.addEventListener("change",this.buildFilter),h.addEventListener("input",this.buildFilter),y.value=this.haystack,x.value=this.condition,h.value=this.needle,C.addEventListener("click",()=>{let{parentElement:k}=this;this.remove(),k?.dispatchEvent(new Event("change"))})}render(){super.render();let{haystack:y,condition:x,needle:h}=this.parts;if(y.options=[{caption:"any field",value:"*"},...this.fields.map((C)=>C.prop)],x.options=Object.keys(this.filters).map((C)=>{let k=this.filters[C];return k.negative!==void 0?[{caption:k.caption,value:C},{caption:k.negative,value:"~"+C}]:{caption:k.caption,value:C}}).flat(),this.haystack!=="")y.value=this.haystack;if(this.condition!=="")x.value=this.condition;if(this.needle!=="")h.value=this.needle;this.buildFilter()}}var a4=i9.elementCreator();class O9 extends ${static preferredTagName="tosi-filter";static lightStyleSpec={":host":{height:"auto",display:"grid",gridTemplateColumns:"32px calc(100% - 64px) 32px",alignItems:"center"},':host [part="filterContainer"]':{display:"flex",flexDirection:"column",alignItems:"stretch",flex:"1 1 auto"},':host [part="haystack"]':{_fieldWidth:"100px"},':host [part="condition"]':{_fieldWidth:"60px"},':host [part="needle"]':{_fieldWidth:"80px"},':host [part="add"], :host [part="reset"]':{"--button-size":"var(--touch-size, 32px)",borderRadius:"999px",height:"var(--button-size)",lineHeight:"var(--button-size)",margin:"0",padding:"0",textAlign:"center",width:"var(--button-size)",flex:"0 0 var(--button-size)"}};_fields=[];get fields(){return this._fields}set fields(y){this._fields=y,this.queueRender()}get state(){let{filterContainer:y}=this.parts;return[...y.children].map((x)=>x.state)}set state(y){let{fields:x,filters:h}=this,{filterContainer:C}=this.parts;C.textContent="";for(let k of y)C.append(a4({fields:x,filters:h,...k}))}filter=zy;description=qy;addFilter=()=>{let{fields:y,filters:x}=this,{filterContainer:h}=this.parts;h.append(a4({fields:y,filters:x}))};content=()=>[$9({part:"add",title:"add filter condition",onClick:this.addFilter,class:"round"},Q.plus()),zw({part:"filterContainer"}),$9({part:"reset",title:"reset filter",onClick:this.reset},Q.x())];filters=Y9;reset=()=>{let{fields:y,filters:x}=this,{filterContainer:h}=this.parts;this.description=qy,this.filter=zy,h.textContent="",h.append(a4({fields:y,filters:x})),this.dispatchEvent(new Event("change"))};buildFilter=()=>{let{filterContainer:y}=this.parts;if(y.children.length===0){this.reset();return}let x=[...y.children].map((C)=>C.filter),h=x.map((C)=>C.test);this.description=x.map((C)=>C.description).join(", "),this.filter=(C)=>C.filter((k)=>h.find((B)=>B(k)===!1)===void 0),this.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{filterContainer:y}=this.parts;y.addEventListener("change",this.buildFilter),this.reset()}render(){super.render()}}var Vw=O9.elementCreator();var{a:Xw}=G;class F9 extends ${static preferredTagName="tosi-header";static shadowStyleSpec={":host":{display:"flex",alignItems:"center",padding:A.tosiHeaderPadding("12px 24px"),background:A.tosiHeaderBg("var(--tosi-accent, #EE257B)"),lineHeight:A.tosiHeaderLineHeight("32px"),gap:A.tosiHeaderGap("8px")},"::slotted(*)":{display:"inline-flex",alignItems:"center"}};content=({slot:y})=>[y()]}var Aw=F9.elementCreator(),jy={tosijs:()=>Q.tosi(),discord:()=>Q.discord(),blog:()=>Q.blog(),github:()=>Q.github(),npm:()=>Q.npm()};class N9 extends ${static preferredTagName="tosi-header-links";static lightStyleSpec={":host":{display:"inline-flex",alignItems:"center",gap:"4px"},":host a":{color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",padding:"4px",opacity:"0.8",cursor:"pointer"},":host a:hover":{opacity:"1"}};links={};content=null;render(){super.render();let y=[];for(let[x,h]of Object.entries(this.links)){if(!h||!jy[x])continue;y.push(Xw({title:x,target:"_blank",href:h},jy[x]()))}this.replaceChildren(...y)}}var _w=N9.elementCreator();function Vy(){return navigator.getGamepads().filter((x)=>x!==null).map((x)=>{let{id:h,axes:C,buttons:k}=x;return{id:h,axes:C,buttons:k.map((B,w)=>{let{pressed:g,value:z}=B;return{index:w,pressed:g,value:z}}).filter((B)=>B.pressed||B.value!==0).reduce((B,w)=>{return B[w.index]=w.value,B},{})}})}function Kw(){let y=Vy();return y.length===0?"no active gamepads":y.map(({id:x,axes:h,buttons:C})=>{let k=h.map((w)=>w.toFixed(2)).join(" "),B=Object.keys(C).map((w)=>`[${w}](${C[Number(w)].toFixed(2)})`).join(" ");return`${x}
204
+ ${k}
205
+ ${B}`}).join(`
206
+ `)}function Pw(y){let x={};return y.input.onControllerAddedObservable.add((h)=>{h.onMotionControllerInitObservable.add((C)=>{let k={};C.getComponentIds().forEach((w)=>{let g=C.getComponent(w);if(k[w]={pressed:g.pressed,touched:g.touched,value:g.value,axes:{x:g.axes.x,y:g.axes.y}},g.onButtonStateChangedObservable.add((z)=>{k[w].pressed=z.pressed,k[w].touched=z.touched,k[w].value=z.value}),g.onAxisValueChangedObservable)g.onAxisValueChangedObservable.add((z)=>{k[w].axes={x:z.x,y:z.y}})}),x[C.handedness]=k})}),x}function Uw(y){if(y===void 0||Object.keys(y).length===0)return"no xr inputs";return Object.keys(y).map((x)=>{let h=y[x],C=[];for(let[k,B]of Object.entries(h)){let w=[];if(B.pressed)w.push("P");if(B.touched)w.push("T");let g=B.value>0,z=B.axes.x!==0||B.axes.y!==0;if(w.length>0||g||z){let q=`${k}[${w.join("")}]`;if(g)q+=` v:${B.value.toFixed(2)}`;if(z)q+=` x:${B.axes.x.toFixed(2)} y:${B.axes.y.toFixed(2)}`;C.push(q)}}return`${x}
207
207
  ${C.join(`
208
208
  `)||"(idle)"}`}).join(`
209
- `)}var{slot:F9}=G;class O9 extends F{static preferredTagName="tosi-row";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[F9()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"row",gap:P.tosiRowGap("0"),alignItems:P.tosiRowAlign("stretch"),justifyContent:P.tosiRowJustify("flex-start")}};render(){if(super.render(),this.gap)this.style.setProperty("--tosi-row-gap",this.gap);else this.style.removeProperty("--tosi-row-gap");if(this.align)this.style.setProperty("--tosi-row-align",this.align);else this.style.removeProperty("--tosi-row-align");if(this.justify)this.style.setProperty("--tosi-row-justify",this.justify);else this.style.removeProperty("--tosi-row-justify");this.style.flexWrap=this.wrap?"wrap":""}}var hk=O9.elementCreator();class W9 extends F{static preferredTagName="tosi-column";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[F9()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"column",gap:P.tosiColumnGap("0"),alignItems:P.tosiColumnAlign("stretch"),justifyContent:P.tosiColumnJustify("flex-start")}};render(){if(super.render(),this.gap)this.style.setProperty("--tosi-column-gap",this.gap);else this.style.removeProperty("--tosi-column-gap");if(this.align)this.style.setProperty("--tosi-column-align",this.align);else this.style.removeProperty("--tosi-column-align");if(this.justify)this.style.setProperty("--tosi-column-justify",this.justify);else this.style.removeProperty("--tosi-column-justify");this.style.flexWrap=this.wrap?"wrap":""}}var Ck=W9.elementCreator();class Q9 extends F{static preferredTagName="tosi-grid";static initAttributes={columns:"",rows:"",gap:""};content=[F9()];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:P.tosiGridColumns("1fr"),gridTemplateRows:P.tosiGridRows("auto"),gap:P.tosiGridGap("0")}};render(){if(super.render(),this.columns)this.style.setProperty("--tosi-grid-columns",this.columns);else this.style.removeProperty("--tosi-grid-columns");if(this.rows)this.style.setProperty("--tosi-grid-rows",this.rows);else this.style.removeProperty("--tosi-grid-rows");if(this.gap)this.style.setProperty("--tosi-grid-gap",this.gap);else this.style.removeProperty("--tosi-grid-gap")}}var lk=Q9.elementCreator(),{span:ky}=G,ik=(...y)=>ky({style:{flex:"1 1 var(--tosi-space, 0.5em)"}},...y),X9=(...y)=>ky({style:{flex:"0 0 var(--tosi-space, 0.5em)"}},...y);var s1={accent:X.fromCss("#EE257B"),background:X.fromCss("#fafafa"),text:X.fromCss("#222222")},gy={_tosiSpacingXs:"4px",_tosiSpacingSm:"8px",_tosiSpacing:"12px",_tosiSpacingLg:"16px",_tosiSpacingXl:"24px",_tosiFontFamily:"system-ui, -apple-system, sans-serif",_tosiFontSize:"16px",_tosiLineHeight:"1.5",_tosiCodeFontFamily:"ui-monospace, monospace",_tosiCodeFontSize:"14px",_tosiTouchSize:"44px",_tosiBorderRadius:"4px",_tosiBorderRadiusLg:"8px",_tosiTransition:"0.15s ease-out"};function wy(y){let{accent:x,background:h,text:C}=y,l=y.accentText??x.contrasting(),i=y.backgroundInset??h.darken(0.03),k=y.border??C.opacity(0.15),g=y.shadow??C.opacity(0.1),w=y.focus??x.opacity(0.5);return{_tosiAccent:x,_tosiAccentLight:x.brighten(0.15),_tosiAccentDark:x.darken(0.15),_tosiAccentText:l,_tosiBg:h,_tosiBgInset:i,_tosiBgHover:h.darken(0.05),_tosiBgActive:h.darken(0.1),_tosiText:C,_tosiTextMuted:C.opacity(0.6),_tosiTextDisabled:C.opacity(0.4),_tosiBorder:k,_tosiBorderFocus:x,_tosiShadow:g,_tosiShadowColor:g,_tosiFocusRing:`0 0 0 2px ${w}`,_tosiInputBg:h,_tosiInputBorder:k,_tosiInputBorderFocus:x,_tosiButtonBg:h,_tosiButtonText:C,_tosiButtonBorder:k,_tosiButtonHoverBg:h.darken(0.05),_tosiButtonActiveBg:x,_tosiButtonActiveText:l}}function s2(y){return{":root":{...gy,...wy(y)}}}function u4(y){let h=s2(y)[":root"];return{":root":i0(h)}}function $9(y,x="tosi-theme"){W1(x,y)}var kk=s2(s1),gk=u4(s1),By={"--xin-icon-size":z.tosiIconSize,"--xin-icon-fill":z.tosiIconFill,"--xin-icon-stroke":z.tosiIconStroke,"--xin-tabs-bar-color":z.tosiTabsBarColor,"--xin-tabs-bar-height":z.tosiTabsBarHeight,"--xin-tabs-selected-color":z.tosiTabsSelectedColor,"--spacing":z.tosiSpacing,"--gap":z.tosiSpacingSm,"--touch-size":z.tosiTouchSize,"--background":z.tosiBg,"--text-color":z.tosiText,"--brand-color":z.tosiAccent,"--brand-text-color":z.tosiAccentText};function wk(y){return{":root":{...s2(y)[":root"],...By}}}function Bk(y,x){let h={};for(let[C,l]of Object.entries(x)){let i=`--tosi-${y}-${C.replace(/([A-Z])/g,"-$1").toLowerCase()}`;h[C]=`var(${i}, ${l})`}return h}var{div:T2,label:E4,input:a4,span:zk,button:zy}=G,{liveTheme:r}=t({liveTheme:{accent:String(s1.accent),background:String(s1.background),text:String(s1.text),dark:!1}}),m4=!1;function D0(){if(!m4)return;let y={accent:X.fromCss(r.accent.value),background:X.fromCss(r.background.value),text:X.fromCss(r.text.value)},x=r.dark.value?u4(y):s2(y);$9(x,"tosi-live-theme")}function qy(){if(m4)return;m4=!0,r.accent.observe(D0),r.background.observe(D0),r.text.observe(D0),r.dark.observe(D0),D0()}function qk(){m4=!1}class Y9 extends F{static preferredTagName="tosi-theme-editor";static shadowStyleSpec={":host":{display:"block",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"14px",lineHeight:"1.5",background:"#ffffff",color:"#222222",padding:"16px",borderRadius:"8px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",maxWidth:"320px"},":host .field":{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},":host label":{flex:"1",fontWeight:"500"},':host input[type="color"]':{width:"48px",height:"32px",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",padding:"2px"},':host input[type="checkbox"]':{width:"18px",height:"18px",cursor:"pointer"},":host .preview":{marginTop:"12px",padding:"12px",borderRadius:"4px",transition:"all 0.15s ease-out"},":host .preview-button":{border:"none",padding:"6px 12px",borderRadius:"4px",cursor:"pointer",fontFamily:"inherit",fontSize:"13px"},":host .actions":{marginTop:"8px",display:"flex",gap:"8px"},":host .actions button":{flex:"1",padding:"6px 12px",border:"1px solid #ccc",borderRadius:"4px",background:"#f5f5f5",color:"#222",cursor:"pointer",fontFamily:"inherit",fontSize:"13px"},":host .actions button:hover":{background:"#e8e8e8"}};content=()=>[T2({class:"field"},E4("Accent"),a4({type:"color",part:"accent"})),T2({class:"field"},E4("Background"),a4({type:"color",part:"background"})),T2({class:"field"},E4("Text"),a4({type:"color",part:"text"})),T2({class:"field"},E4("Dark mode"),a4({type:"checkbox",part:"dark"})),T2({class:"preview",part:"preview",style:{background:"var(--tosi-bg, #fafafa)",color:"var(--tosi-text, #222)"}},zk("Preview "),zy({class:"preview-button",style:{background:"var(--tosi-accent, #EE257B)",color:"var(--tosi-accent-text, white)"}},"Button")),T2({class:"actions"},zy({part:"reset"},"Reset"))];connectedCallback(){super.connectedCallback(),qy();let y=()=>{this.parts.accent.value=r.accent.value,this.parts.background.value=r.background.value,this.parts.text.value=r.text.value,this.parts.dark.checked=r.dark.value};y(),r.accent.observe(y),r.background.observe(y),r.text.observe(y),r.dark.observe(y),this.parts.accent.addEventListener("input",()=>{r.accent.value=this.parts.accent.value}),this.parts.background.addEventListener("input",()=>{r.background.value=this.parts.background.value}),this.parts.text.addEventListener("input",()=>{r.text.value=this.parts.text.value}),this.parts.dark.addEventListener("change",()=>{r.dark.value=this.parts.dark.checked}),this.parts.reset.addEventListener("click",()=>{r.accent.value=String(s1.accent),r.background.value=String(s1.background),r.text.value=String(s1.text),r.dark.value=!1})}}var jk=Y9.elementCreator();var{div:Vk}=G;class G2 extends F{static preferredTagName="tosi-map";static formAssociated=!0;static initAttributes={coords:"65.01715565258993,25.48081004203459,12",token:"",mapStyle:"mapbox://styles/mapbox/streets-v12",name:""};value="";formDisabledCallback(y){}formResetCallback(){this.value="",this.coords="65.01715565258993,25.48081004203459,12"}content=Vk({style:{width:"100%",height:"100%"}});get map(){return this._map}static mapboxCSSAvailable;static mapboxAvailable;_map;_mapPending=!1;static shadowStyleSpec={":host":{display:"inline-block",position:"relative",width:"400px",height:"400px",textAlign:"left"}};constructor(){super();if(G2.mapboxCSSAvailable===void 0)G2.mapboxCSSAvailable=B4("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.css").catch((y)=>{console.error("failed to load mapbox-gl.css",y)}),G2.mapboxAvailable=b1("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.js").catch((y)=>{console.error("failed to load mapbox-gl.js",y)})}connectedCallback(){if(super.connectedCallback(),!this.token)console.error("mapbox requires an access token which you can provide via the token attribute")}_lastCoords="";_lastStyle="";render(){if(super.render(),!this.token)return;if(this._map){if(this.coords!==this._lastCoords){let[x,h,C]=this.coords.split(",").map((l)=>Number(l));this._map.setCenter([h,x]),this._map.setZoom(C),this._lastCoords=this.coords}if(this.mapStyle!==this._lastStyle)this._map.setStyle(this.mapStyle),this._lastStyle=this.mapStyle;return}if(this._mapPending)return;this._mapPending=!0;let{div:y}=this.parts;G2.mapboxAvailable.then(({mapboxgl:x})=>{console.log("%cmapbox may complain about missing css -- don't panic!","background: orange; color: black; padding: 0 5px;");let[h,C,l]=this.coords.split(",").map((i)=>Number(i));x.accessToken=this.token,this._map=new x.Map({container:y,style:this.mapStyle,zoom:l,center:[C,h]}),this._lastCoords=this.coords,this._lastStyle=this.mapStyle,this._mapPending=!1,this._map.on("render",()=>this._map.resize()),this._map.on("moveend",()=>{let i=this._map.getCenter(),k=this._map.getZoom(),g=`${i.lat.toFixed(6)},${i.lng.toFixed(6)},${k.toFixed(1)}`;if(g!==this.value){if(this.internals)this.internals.setFormValue(g)}})}).catch((x)=>{this._mapPending=!1,console.error("tosi-map: mapbox failed to load",x)})}}var Pk=G2.elementCreator();function jy(y,x){if(x==null)x="";else if(typeof x!=="string")x=String(x);return x.replace(/\{\{([^}]+)\}\}/g,(h,C)=>{let l=l1[`${y}${C.startsWith("[")?C:"."+C}`];return l===void 0?h:jy(y,String(l))})}class t4 extends F{static preferredTagName="tosi-md";static initAttributes={src:"",elements:!1};context={};value="";content=null;options={};connectedCallback(){if(super.connectedCallback(),this.src!=="")(async()=>{let y=await fetch(this.src);this.value=await y.text()})();else if(this.value==="")if(this.elements)this.value=this.innerHTML;else this.value=this.textContent!=null?this.textContent:""}didRender=()=>{};render(){super.render(),l1[this.instanceId]=typeof this.context==="string"?JSON.parse(this.context):this.context;let y=jy(this.instanceId,this.value);if(this.elements){let x=y.split(`
210
- `).reduce((h,C)=>{if(C.startsWith("<")||h.length===0)h.push(C);else{let l=h[h.length-1];if(!l.startsWith("<")||!l.endsWith(">"))h[h.length-1]+=`
211
- `+C;else h.push(C)}return h},[]);this.innerHTML=x.map((h)=>h.startsWith("<")&&h.endsWith(">")?h:R(h,this.options)).join("")}else this.innerHTML=R(y,this.options);this.didRender()}}var _k=t4,N9=t4.elementCreator(),Ak=N9,Kk=N9;var{div:J9,span:e4,button:Z9}=G,H0=86400000,Uk=[0,1,2,3,4,5,6],Gk=[1,2,3,4,5,6,7,8,9,10,11,12],p9=(y,x=2,h="0")=>String(y).padStart(x,h),b0=(y,x,h)=>new Date(`${y}-${p9(x)}-${p9(h)}`);class v9 extends F{static preferredTagName="tosi-month";static lightStyleSpec={":host":{display:"block"},":host [part=header]":{display:"flex",alignItems:"stretch",justifyContent:"stretch"},":host[disabled]":{pointerEvents:"none",opacity:P.disabledOpacity(0.6)},':host [part="month"], :host [part="year"]':{_fieldWidth:"4em",flex:"1"},":host [part=week], :host [part=days]":{display:"grid",gridTemplateColumns:"auto auto auto auto auto auto auto",justifyItems:"stretch"},":host .today":{background:P.monthTodayBackground("transparent"),boxShadow:P.monthTodayShadow("none"),backdropFilter:P.monthTodayBackdropFilter("brightness(0.9)"),fontWeight:P.monthTodayFontWeight("800")},":host .day, :host .date":{padding:5,display:"flex",justifyContent:"center",userSelect:"none"},":host .day":{color:P.monthDayColor("hotpink"),background:P.monthDayBackground("white"),fontWeight:P.monthDayFontWeight("800")},":host .date":{cursor:"default"},":host .weekend":{background:P.monthWeekendBackground("#eee")},":host .date:not(.in-month)":{opacity:0.5},":host .date.checked":{color:P.monthDateCheckedColor("white"),background:P.monthDateCheckedBackground("hotpink")},":host:not([range]) .date.checked":{borderRadius:P.monthDateCheckedBorderRadius("10px")},":host .range-start":{borderTopLeftRadius:P.monthDateCheckedBorderRadius("10px"),borderBottomLeftRadius:P.monthDateCheckedBorderRadius("10px")},":host .range-end":{borderTopRightRadius:P.monthDateCheckedBorderRadius("10px"),borderBottomRightRadius:P.monthDateCheckedBorderRadius("10px")}};static formAssociated=!0;static initAttributes={month:NaN,year:NaN,weekStart:0,minDate:b0(new Date().getFullYear()-100,1,1).toISOString().split("T")[0],maxDate:b0(new Date().getFullYear()+10,12,31).toISOString().split("T")[0],selectable:!1,multiple:!1,range:!1,disabled:!1,readonly:!1,required:!1,name:""};selectedDays=[];value="";formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value="",this.selectedDays=[]}get endDay(){return 1-this.weekStart}get months(){return Gk.map((y)=>({caption:b0(2025,y,1).toString().split(" ")[1],value:String(y)}))}get years(){let y=Number(this.minDate.split("-")[0]),x=Number(this.maxDate.split("-")[0]),h=[];for(let C=y;C<=x;C++)h.push(String(C));return h}monthChanged=(y,x)=>{};gotoMonth(y,x){if(this.month!==x||this.year!==y)this.month=x,this.year=y,this.monthChanged(y,x)}setMonth=()=>{this.gotoMonth(Number(this.parts.year.value),Number(this.parts.month.value))};get to(){return this.selectedDays[1]||""}set to(y){this.selectedDays[1]=y,this.selectedDays.splice(2)}get from(){return this.selectedDays[0]||""}set from(y){this.selectedDays[0]=y,this.selectedDays.splice(2)}clickDate=(y)=>{let x=y.target.getAttribute("title");this.selectDate(x)};keyDate=(y)=>{let x=!1;switch(y.code){case"Space":{let h=y.target.getAttribute("title");this.selectDate(h),x=!0;break}case"Tab":break;default:console.log(y)}if(x)y.preventDefault(),y.stopPropagation()};#y="";selectDate=(y)=>{if(this.#y=y,this.range){if(!this.to)this.selectedDays=[y,y];else if(this.from===y&&this.to===y)this.selectedDays=[];else if(this.from===y)this.from=this.to;else if(this.to===y)this.to=this.from;else if(y<this.from)this.from=y;else if(y>this.to)this.to=y;else this.to=y;this.value=`${this.from},${this.to}`}else if(this.multiple){if(this.selectedDays.includes(y))this.selectedDays.splice(this.selectedDays.indexOf(y),1);else this.selectedDays.push(y),this.selectedDays.sort();this.value=this.selectedDays.join(",")}else if(this.selectable)if(this.selectedDays.includes(y))this.value="",this.selectedDays=[];else this.value=y,this.selectedDays=[y]};nextMonth=()=>{if(this.month<12)this.gotoMonth(this.year,this.month+1);else this.gotoMonth(this.year+1,1)};previousMonth=()=>{if(this.month>1)this.gotoMonth(this.year,this.month-1);else this.gotoMonth(this.year-1,12)};checkDay=(y)=>{if(!this.range)return this.selectedDays.includes(y);else if(this.range)return this.from&&y>=this.from&&y<=this.to;return!1};dateMenuItem=(y,x="")=>{return y=y.split("T")[0],{caption:x||y,enabled:()=>!y.startsWith(`${this.year}-${p9(this.month)}-`),action:()=>{this.gotoDate(y)}}};jumpMenu=()=>{n({target:this.parts.jump,menuItems:[this.dateMenuItem(new Date().toISOString(),"This Month"),...this.selectedDays.length===0?[]:[null],...this.selectedDays.map((y)=>this.dateMenuItem(y))]})};content=()=>[J9({part:"header"},Z9({part:"previous",onClick:this.previousMonth},O.chevronLeft()),e4({style:{flex:"1"}}),Z9({part:"jump",onClick:this.jumpMenu},O.calendar()),F1({part:"month",options:this.months,onChange:this.setMonth}),F1({part:"year",options:[this.year],onChange:this.setMonth}),e4({style:{flex:"1"}}),Z9({part:"next",onClick:this.nextMonth},O.chevronRight())),J9({part:"week"}),J9({part:"days"})];gotoDate(y){let x=new Date(y);this.gotoMonth(x.getFullYear(),x.getMonth()+1)}connectedCallback(){super.connectedCallback();let y=new Date(this.value.split(",").pop()||Date.now());if(isNaN(this.month))this.month=y.getMonth()+1;if(isNaN(this.year))this.year=y.getFullYear()}days=[];render(){super.render();let{week:y,days:x,jump:h,month:C,year:l,previous:i,next:k}=this.parts;this.selectedDays=this.value?this.value.split(","):[];let g=b0(this.year,this.month,1),w=new Date(g.valueOf()-(7+g.getDay()-this.weekStart)%7*H0),B=this.month===12?1:this.month+1,q=new Date(b0(this.year+(this.month===12?1:0),B,1).valueOf()-H0),j=new Date(q.valueOf()+(this.weekStart*2+5+this.endDay-q.getDay())%7*H0),_=Uk.map(($)=>new Date(w.valueOf()+$*H0).toString().split(" ")[0]);this.days=[];let K=new Date().toISOString().split("T")[0];for(let $=w.valueOf();$<=j.valueOf();$+=H0){let Z=new Date($),p=Z.toISOString().split("T")[0];this.days.push({date:Z,selected:!1,inMonth:Z.getMonth()+1===this.month,isToday:p===K,isWeekend:Z.getDay()%6===0,inRange:!!(this.from&&p>=this.from&&p<=this.to)})}C.value=String(this.month),l.value=String(this.year),C.disabled=l.disabled=h.disabled=i.disabled=k.disabled=this.disabled||this.readonly,l.options=this.years,y.textContent="",y.append(..._.map(($)=>e4({class:"day"},$))),x.textContent="";let U=null,{to:Q,from:Y}=this;x.append(...this.days.map(($)=>{let Z=["date"];if($.inMonth)Z.push("in-month");if($.isToday)Z.push("today");let p=$.date.toISOString().split("T")[0];if(this.checkDay(p))Z.push("checked");if(Z.push($.isWeekend?"weekend":"weekday"),this.range){if(Q===p)Z.push("range-end");if(Y===p)Z.push("range-start")}let T=e4({class:Z.join(" "),title:p,onClick:this.clickDate,onKeydown:this.keyDate,tabindex:"0"},$.date.getDate());if(p===this.#y)U=T;return T})),U?.focus()}}var Fk=v9.elementCreator();var Vy=async(y,x="SHA-1")=>{let C=new TextEncoder().encode(y),l=await crypto.subtle.digest(x,C);return Array.from(new Uint8Array(l)).map((g)=>g.toString(16).padStart(2,"0")).join("")},Py=async(y)=>{let x=await Vy(y),h=await fetch(`https://weakpass.com/api/v1/search/${x}`);if(h.ok){let C=await h.json();console.log("password found in weakpass database",C)}return h.status!==404},{span:R9,tosiSlot:Ok}=G;class y5 extends F{static preferredTagName="tosi-password-strength";static lightStyleSpec={":host":{display:"inline-flex",flexDirection:"column",gap:z.spacing50,position:"relative"},":host tosi-slot":{display:"flex"},':host [part="meter"]':{display:"block",position:"relative",height:P.meterHeight("24px"),background:P.indicatorBg("white"),borderRadius:P.meterRadius("4px"),boxShadow:P.meterShadow(`inset 0 0 0 2px ${z.indicatorColor}`)},':host [part="level"]':{height:P.levelHeight("20px"),content:'" "',display:"inline-block",width:0,transition:"0.15s ease-out",background:z.indicatorColor,margin:P.levelMargin("2px"),borderRadius:P.levelRadius("2px")},':host [part="description"]':{position:"absolute",inset:"0",color:z.descriptionColor,height:P.meterHeight("24px"),lineHeight:P.meterHeight("24px"),textAlign:"center"}};static initAttributes={minLength:8,goodLength:12,indicatorColors:"#f00,#f40,#f80,#ef0,#8f0,#0a2"};descriptionColors="#000,#000,#000,#000,#000,#fff";issues={tooShort:!0,short:!0,noUpper:!0,noLower:!0,noNumber:!0,noSpecial:!0};issueDescriptions={tooShort:"too short",short:"short",noUpper:"no upper case",noLower:"no lower case",noNumber:"no digits",noSpecial:"no unusual characters"};value=0;strengthDescriptions=["unacceptable","very weak","weak","moderate","strong","very strong"];strength(y){return this.issues={tooShort:y.length<this.minLength,short:y.length<this.goodLength,noUpper:!y.match(/[A-Z]/),noLower:!y.match(/[a-z]/),noNumber:!y.match(/[0-9]/),noSpecial:!y.match(/[^a-zA-Z0-9]/)},this.issues.tooShort?0:Object.values(this.issues).filter((x)=>!x).length-1}async isBreached(){let y=this.querySelector("input")?.value;if(!y||typeof y!=="string")return!0;return await Py(y)}updateIndicator=(y)=>{let{level:x,description:h}=this.parts,C=this.indicatorColors.split(","),l=this.descriptionColors.split(","),i=this.strength(y);if(this.value!==i)this.value=i,this.dispatchEvent(new Event("change"));x.style.width=`${(i+1)*16.67}%`,this.style.setProperty("--indicator-color",C[i]),this.style.setProperty("--description-color",l[i]),h.textContent=this.strengthDescriptions[i]};update=(y)=>{let x=y.target.closest("input");this.updateIndicator(x?.value||"")};content=()=>[Ok({onInput:this.update}),R9({part:"meter"},R9({part:"level"}),R9({part:"description"}))];render(){super.render();let y=this.querySelector("input");this.updateIndicator(y?.value)}}var Wk=y5,_y=y5.elementCreator(),Qk=_y;var{span:D9}=G;class x5 extends F{static preferredTagName="tosi-rating";static formAssociated=!0;static initAttributes={max:5,min:1,icon:"star",step:1,ratingStroke:"#e81",ratingFill:"#f91",emptyStroke:"#ccc",emptyFill:"#ccc",readonly:!1,iconSize:24,hollow:!1,required:!1,name:""};value="";formDisabledCallback(y){this.readonly=y}formResetCallback(){this.value=""}static shadowStyleSpec={":host":{display:"inline-block",position:"relative",width:"fit-content"},":host::part(container)":{position:"relative",display:"inline-block"},":host::part(empty), :host::part(filled)":{height:"100%",whiteSpace:"nowrap",overflow:"hidden"},":host::part(empty)":{pointerEvents:"none"},":host::part(filled)":{position:"absolute",left:0,transition:"width 0.15s ease-out"},":host svg":{transform:"scale(0.9)",pointerEvents:"all !important",transition:"0.25s ease-in-out"},":host svg:hover":{transform:"scale(1)"},":host svg:active":{transform:"scale(1.1)"}};content=()=>D9({part:"container"},D9({part:"empty"}),D9({part:"filled"}));displayValue(y){let{empty:x,filled:h}=this.parts,l=Math.round((typeof y==="string"?0:y||0)/this.step)*this.step;h.style.width=l/this.max*x.offsetWidth+"px"}update=(y)=>{if(this.readonly)return;let{empty:x}=this.parts,h=y instanceof MouseEvent?y.pageX-x.getBoundingClientRect().x:0,C=Math.min(Math.max(this.min,Math.round(h/x.offsetWidth*this.max/this.step+this.step*0.5)*this.step),this.max);if(y.type==="click")this.value=C;else if(y.type==="mousemove")this.displayValue(C);else this.displayValue(this.value||0)};handleKey=(y)=>{let x=this.value===""?NaN:Number(this.value);if(isNaN(x))x=Math.round((this.min+this.max)*0.5*this.step)*this.step;let h=!1;switch(y.key){case"ArrowUp":case"ArrowRight":x+=this.step,h=!0;break;case"ArrowDown":case"ArrowLeft":x-=this.step,h=!0;break}if(this.value=Math.max(Math.min(x,this.max),this.min),h)y.stopPropagation(),y.preventDefault()};connectedCallback(){super.connectedCallback();let{container:y}=this.parts;y.tabIndex=0,y.addEventListener("mousemove",this.update,!0),y.addEventListener("mouseleave",this.update),y.addEventListener("blur",this.update),y.addEventListener("click",this.update),y.addEventListener("keydown",this.handleKey)}_renderedIcon="";render(){super.render();let y=this.iconSize+"px";if(this.style.setProperty("--tosi-icon-size",y),this.readonly)this.role="image";else this.role="slider";this.ariaLabel=`rating ${this.value} out of ${this.max}`,this.ariaValueMax=String(this.max),this.ariaValueMin=String(this.min),this.ariaValueNow=this.value===""?String(-1):String(this.value);let{empty:x,filled:h}=this.parts;if(x.style.setProperty("--tosi-icon-fill",this.hollow?"none":this.emptyFill),x.style.setProperty("--tosi-icon-stroke",this.emptyStroke),h.style.setProperty("--tosi-icon-fill",this.ratingFill),h.style.setProperty("--tosi-icon-stroke",this.ratingStroke),this._renderedIcon!==this.icon){this._renderedIcon=this.icon;for(let C=0;C<this.max;C++)x.append(O[this.icon]()),h.append(O[this.icon]())}this.displayValue(this.value)}}var Xk=x5,Ay=x5.elementCreator(),$k=B1((...y)=>Ay(...y),"xinRating is deprecated, use tosiRating instead (tag is now <tosi-rating>)");var{tosiSlot:Ky,div:Yk,button:Nk}=G,Jk=[{caption:"Title",tagType:"H1"},{caption:"Heading",tagType:"H2"},{caption:"Subheading",tagType:"H3"},{caption:"Minor heading",tagType:"H4"},{caption:"Body",tagType:"P"},{caption:"Code Block",tagType:"PRE"}];function H9(y=Jk){return F1({title:"paragraph style",slot:"toolbar",class:"block-style",options:y.map(({caption:x,tagType:h})=>({caption:x,value:`formatBlock,${h}`}))})}var S0=()=>X9({slot:"toolbar"});function p1(y,x,h){return Nk({slot:"toolbar",dataCommand:x,title:y},h)}var Zk=()=>[p1("left-justify","justifyLeft",O.alignLeft()),p1("center","justifyCenter",O.alignCenter()),p1("right-justify","justifyRight",O.alignRight()),S0(),p1("bullet list","insertUnorderedList",O.listBullet()),p1("numbered list","insertOrderedList",O.listNumber()),S0(),p1("indent","indent",O.indent()),p1("indent","outdent",O.outdent())],Uy=()=>[p1("bold","bold",O.fontBold()),p1("italic","italic",O.fontItalic()),p1("underline","underline",O.fontUnderline())],pk=()=>[H9(),S0(),...Uy()],Gy=()=>[H9(),S0(),...Zk(),S0(),...Uy()];class h5 extends F{static preferredTagName="tosi-rich-text";static lightStyleSpec={":host":{display:"flex",flexDirection:"column",height:"100%"},':host [part="toolbar"]':{padding:4,display:"flex",gap:"0px",flex:"0 0 auto",flexWrap:"wrap"},':host [part="toolbar"] > button':{_xinIconSize:18}};static formAssociated=!0;static initAttributes={widgets:"default",name:"",required:!1};isInitialized=!1;savedValue="";formDisabledCallback(y){if(this.isInitialized)this.parts.doc.contentEditable=y?"false":"true"}formResetCallback(){this.value=""}_value="";get value(){return this.isInitialized?this.parts.doc.innerHTML:this._value}set value(y){let x=this._value;if(this._value=y,this.isInitialized){if(this.parts.doc.innerHTML!==y)this.parts.doc.innerHTML=y}if(x!==y&&this.internals)this.internals.setFormValue(y)}blockElement(y){let{doc:x}=this.parts;while(y.parentElement!==null&&y.parentElement!==x)y=y.parentElement;return y.parentElement===x?y:void 0}get selectedBlocks(){let{doc:y}=this.parts,x=window.getSelection();if(x===null)return[];let h=[];for(let C=0;C<x.rangeCount;C++){let l=x.getRangeAt(C);if(!y.contains(l.commonAncestorContainer))continue;let i=this.blockElement(l.startContainer),k=this.blockElement(l.endContainer);h.push(i);while(i!==k&&i!==null)i=i.nextElementSibling,h.push(i)}return h}get selectedText(){let y=window.getSelection();if(y===null)return"";return this.selectedBlocks.length?y.toString():""}selectionChange=()=>{};_updatingBlockStyle=!1;handleSelectChange=(y)=>{if(this._updatingBlockStyle)return;let h=y.target?.closest(S1.tagName);if(h==null)return;this.doCommand(h.value)};handleButtonClick=(y)=>{let h=y.target?.closest("button");if(h==null)return;this.doCommand(h.dataset.command)};content=[Ky({name:"toolbar",part:"toolbar",onClick:this.handleButtonClick,onChange:this.handleSelectChange}),Yk({part:"doc",contenteditable:!0,style:{flex:"1 1 auto",outline:"none"}}),Ky({part:"content"})];doCommand(y){if(y===void 0)return;let x=y.split(",");console.log("execCommand",x[0],!1,...x.slice(1)),document.execCommand(x[0],!1,...x.slice(1))}updateBlockStyle(){let y=this.parts.toolbar.querySelector(".block-style");if(y===null)return;let x=this.selectedBlocks.map((h)=>h.tagName);x=[...new Set(x)],this._updatingBlockStyle=!0,y.value=x.length===1?`formatBlock,${x[0]}`:"",this._updatingBlockStyle=!1}hasContent(){return(this.parts.doc.textContent||"").trim().length>0}handleInput=()=>{if(this.internals)this.internals.setFormValue(this.parts.doc.innerHTML),this.updateValidity()};updateValidity(){if(this.internals)if(this.required&&!this.hasContent())this.internals.setValidity({valueMissing:!0},"Please enter some content",this.parts.doc);else this.internals.setValidity({})}connectedCallback(){super.connectedCallback();let{doc:y,content:x}=this.parts;if(x.innerHTML!==""&&y.innerHTML==="")y.innerHTML=x.innerHTML,x.innerHTML="";this.isInitialized=!0,x.style.display="none",y.addEventListener("input",this.handleInput),this.updateValidity(),document.addEventListener("selectionchange",(h)=>{this.updateBlockStyle(),this.selectionChange(h,this)})}render(){let{toolbar:y}=this.parts;if(super.render(),y.children.length===0)switch(this.widgets){case"minimal":y.append(...pk());break;case"default":y.append(...Gy());break}}}var vk=h5,Fy=h5.elementCreator(),Rk=B1((...y)=>Fy(...y),"richText is deprecated, use tosiRichText instead (tag is now <tosi-rich-text>)");var{router:M0}=t({router:{path:"",hash:"",pattern:""}}),b9={};function Dk(){return{...b9}}var C5=[],S9=!1,l5=new Set;function Hk(y){let x=[];if(y==="")return{regex:/^\/?$/,paramNames:x};let h=y.split("/").map((l)=>{if(l.startsWith(":"))return x.push(l.slice(1)),"([^/]+)";return l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});return{regex:new RegExp("^/?"+h.join("/")+"/?$"),paramNames:x}}function bk(y){let x=y.split("?")[0].split("#")[0];for(let C of C5){if(C.fallback)continue;let l=x.match(C.regex);if(l){let i={};return C.paramNames.forEach((k,g)=>{i[k]=decodeURIComponent(l[g+1])}),{route:C,params:i}}}let h=C5.find((C)=>C.fallback);if(h)return{route:h,params:{}};return null}function I0(){let y=S9?window.location.hash.replace(/^#\/?/,""):window.location.pathname;M0.path.value=y,M0.hash.value=window.location.hash;let x=bk(y);if(x){b9=x.params,M0.pattern.value=x.route.regex.source;let h=new Map;for(let C of x.route.targets)h.set(C.view??"default",C);for(let C of l5){let l=C.name||"default",i=h.get(l);if(i)C.replaceChildren(i.component(x.params));else C.replaceChildren()}}else{b9={},M0.pattern.value="";for(let h of l5)h.replaceChildren()}}var Oy=!1;function Wy(){if(Oy)return;Oy=!0,window.addEventListener("popstate",I0),window.addEventListener("hashchange",I0)}function Sk(y,x={}){S9=x.hashRouting??!1,C5=y.map((h)=>{let{regex:C,paramNames:l}=Hk(h.pattern);return{regex:C,paramNames:l,targets:h.targets,fallback:h.fallback??!1}}),Wy(),I0()}function Mk(y){if(Wy(),S9)window.location.hash="#/"+y.replace(/^\//,"");else window.history.pushState({},"","/"+y.replace(/^\//,""));I0()}class M9 extends F{static preferredTagName="tosi-route-view";static initAttributes={name:"default"};content=null;connectedCallback(){if(super.connectedCallback(),l5.add(this),C5.length>0)I0()}disconnectedCallback(){super.disconnectedCallback(),l5.delete(this)}}var Ik=M9.elementCreator();var{div:ck,slot:sk,label:Tk,span:dk,input:Qy}=G;class d2 extends F{static preferredTagName="tosi-segmented";static formAssociated=!0;static initAttributes={direction:"row",other:"",multiple:!1,name:"",placeholder:"Please specify…",localized:!1,required:!1};_choices=[];get choices(){return this._choices}set choices(y){if(typeof y==="string")this._choices=d2.parseChoicesString(y);else this._choices=y;this.queueRender()}static parseChoicesString(y){return y.split(",").filter((x)=>x.trim()!=="").map((x)=>{let[h,C]=x.split("=").map((g)=>g.trim()),[l,i]=(C||h).split(":").map((g)=>g.trim()),k=i?O[i]():"";return{value:h,icon:k,caption:l}})}value="";formDisabledCallback(y){}formResetCallback(){this.value=""}get values(){return(this.value||"").split(",").map((y)=>y.trim()).filter((y)=>y!=="")}content=()=>[sk(),ck({part:"options"},Qy({part:"custom",hidden:!0}))];static shadowStyleSpec={":host":{display:"inline-flex",gap:P.segmentedOptionGap("8px"),alignItems:P.segmentedAlignItems("center")},":host, :host::part(options)":{flexDirection:P.segmentedDirection("row")},":host label":{display:"inline-grid",alignItems:"center",gap:P.segmentedOptionGap("8px"),gridTemplateColumns:P.segmentedOptionGridColumns("0px 24px 1fr"),padding:P.segmentedOptionPadding("4px 12px"),font:P.segmentedOptionFont("16px")},":host label:focus":{outline:"none",boxShadow:P.segmentedFocusShadow(`inset 0 0 0 2px ${P.segmentedOptionCurrentBackground("#44a")}`),borderRadius:P.segmentedOptionsBorderRadius("8px")},":host label.current":{color:P.segmentedOptionCurrentColor("#eee"),background:P.segmentedOptionCurrentBackground("#44a")},":host label.current:focus":{boxShadow:P.segmentedCurrentFocusShadow(`inset 0 0 0 2px ${P.segmentedOptionCurrentColor("#eee")}`)},":host svg":{height:P.segmentOptionIconSize("16px"),stroke:P.segmentedOptionIconColor("currentColor")},":host label.no-icon":{gap:0,gridTemplateColumns:P.segmentedOptionGridColumns("0px 1fr")},':host input[type="radio"], :host input[type="checkbox"]':{visibility:P.segmentedInputVisibility("hidden")},":host::part(options)":{display:"flex",borderRadius:P.segmentedOptionsBorderRadius("8px"),background:P.segmentedOptionsBackground("#fff"),color:P.segmentedOptionColor("#222"),overflow:"hidden",alignItems:P.segmentedOptionAlignItems("stretch")},":host::part(custom)":{padding:P.segmentedOptionPadding("4px 12px"),color:P.segmentedOptionCurrentColor("#eee"),background:P.segmentedOptionCurrentBackground("#44a"),font:P.segmentedOptionFont("16px"),border:"0",outline:"none"},":host::part(custom)::placeholder":{color:P.segmentedOptionCurrentColor("#eee"),opacity:P.segmentedPlaceholderOpacity(0.75)}};syncCurrent(){let{options:y}=this.parts;y.querySelectorAll("label").forEach((x)=>{let h=x.querySelector("input");x.classList.toggle("current",Boolean(h&&h.checked))})}valueChanged=!1;handleChange=()=>{let{options:y,custom:x}=this.parts;if(this.multiple){let h=[...y.querySelectorAll("input:checked")];this.value=h.map((C)=>C.value).join(",")}else{let h=y.querySelector("input:checked");if(!h)this.value="";else if(h.value)x.setAttribute("hidden",""),this.value=h.value;else x.removeAttribute("hidden"),x.focus(),x.select(),this.value=x.value}this.syncCurrent(),this.valueChanged=!0};handleKey=(y)=>{let x=!1;switch(y.code){case"Space":if(y.target instanceof HTMLLabelElement)y.target.click(),x=!0;break;case"Tab":if(!(y.target instanceof HTMLLabelElement))y.target.closest("label").focus();break;case"ArrowLeft":case"ArrowUp":{let h=y.target.closest("label");if(h.previousElementSibling instanceof HTMLLabelElement)h.previousElementSibling.focus()}x=!0;break;case"ArrowRight":case"ArrowDown":{let h=y.target.closest("label");if(h.nextElementSibling instanceof HTMLLabelElement)h.nextElementSibling.focus()}x=!0;break}if(x)y.preventDefault(),y.stopPropagation()};connectedCallback(){super.connectedCallback();let y=this.getAttribute("choices");if(y&&this._choices.length===0)this._choices=d2.parseChoicesString(y);let{options:x}=this.parts;if(this.name==="")this.name=this.instanceId;if(x.addEventListener("change",this.handleChange),x.addEventListener("keydown",this.handleKey),this.other&&this.multiple)console.warn(this,"is set to [other] and [multiple]; [other] will be ignored"),this.other=""}get _choicesWithOther(){let y=[...this.choices];if(this.other&&!this.multiple){let[x,h]=this.other.split(":");y.push({value:"",caption:x,icon:h})}return y}get isOtherValue(){return Boolean(this.value===""||this.value&&!this._choicesWithOther.find((y)=>y.value===this.value))}render(){if(super.render(),this.valueChanged){this.valueChanged=!1;return}let{options:y,custom:x}=this.parts;y.textContent="";let h=this.multiple?"checkbox":"radio",{values:C,isOtherValue:l}=this;if(y.append(...this._choicesWithOther.map((i)=>{return Tk({tabindex:0},Qy({type:h,name:this.name,value:i.value,checked:C.includes(i.value)||i.value===""&&l,tabIndex:-1}),i.icon||{class:"no-icon"},this.localized?Q1(i.caption):dk(i.caption))})),this.other&&!this.multiple)x.hidden=!l,x.value=l?this.value:"",x.placeholder=this.placeholder,y.append(x);this.syncCurrent()}}var Lk=d2,Xy=d2.elementCreator(),rk=B1((...y)=>Xy(...y),"xinSegmented is deprecated, use tosiSegmented instead (tag is now <tosi-segmented>)");var{slot:$y}=G;class I9 extends F{static preferredTagName="tosi-sizebreak";static initAttributes={minWidth:0,minHeight:0};value="normal";content=[$y({part:"normal"}),$y({part:"small",name:"small"})];static shadowStyleSpec={":host":{display:"inline-block",position:"relative"}};handleResize=()=>{let{normal:y,small:x}=this.parts,h=this.offsetParent;if(!(h instanceof HTMLElement))return;else if(h.offsetWidth<this.minWidth||h.offsetHeight<this.minHeight)y.hidden=!0,x.hidden=!1,this.value="small";else y.hidden=!1,x.hidden=!0,this.value="normal"};connectedCallback(){super.connectedCallback(),globalThis.addEventListener("resize",this.handleResize)}disconnectedCallback(){super.disconnectedCallback(),globalThis.removeEventListener("resize",this.handleResize)}}var ok=I9.elementCreator();class i5 extends F{static preferredTagName="tosi-sizer";target=null;static shadowStyleSpec={":host":{_resizeIconFill:"#222",display:"block",position:"absolute",bottom:-7,right:-7,padding:14,width:44,height:44,opacity:0.25,transition:"opacity 0.25s ease-out"},":host(:hover)":{opacity:0.5},":host svg":{width:16,height:16,stroke:z.resizeIconFill}};content=O.resize();get minSize(){let{minWidth:y,minHeight:x}=getComputedStyle(this.target);return{width:parseFloat(y)||32,height:parseFloat(x)||32}}resizeTarget=(y)=>{let{target:x}=this;if(!x)return;let{offsetWidth:h,offsetHeight:C}=x;x.style.left=x.offsetLeft+"px",x.style.top=x.offsetTop+"px",x.style.bottom="",x.style.right="";let{minSize:l}=this;P1(y,(i,k,g)=>{if(x.style.width=Math.max(l.width,h+i)+"px",x.style.height=Math.max(l.height,C+k)+"px",g.type==="mouseup")return!0},"nwse-resize")};connectedCallback(){if(super.connectedCallback(),!this.target)this.target=this.parentElement;let y={passive:!0};this.addEventListener("mousedown",this.resizeTarget,y),this.addEventListener("touchstart",this.resizeTarget,y)}}var nk=i5,Yy=i5.elementCreator(),fk=Yy;var{div:uk,input:Ek,span:ak,button:c9}=G,Ny=(y)=>y.split(/(?<!\\),/).map((x)=>x.trim().replace(/\\,/g,",")),mk=(y)=>y.map((x)=>x.replace(/,/g,"\\,")).join(",");class c0 extends F{static preferredTagName="tosi-tag";static lightStyleSpec={":host":{"--tag-close-button-color":"#000c","--tag-close-button-bg":"#fffc","--tag-button-opacity":"0.5","--tag-button-hover-opacity":"0.75","--tag-bg":P.brandColor("blue"),"--tag-text-color":P.brandTextColor("white"),display:"inline-flex",borderRadius:P.tagRoundedRadius(z.spacing50),color:z.tagTextColor,background:z.tagBg,padding:`0 ${z.spacing75} 0 ${z.spacing75}`,height:`calc(${z.lineHeight} + ${z.spacing50})`,lineHeight:`calc(${z.lineHeight} + ${z.spacing50})`},':host > [part="caption"]':{position:"relative",whiteSpace:"nowrap",overflow:"hidden",flex:"1 1 auto",fontSize:P.fontSize("16px"),color:z.tagTextColor,textOverflow:"ellipsis"},':host [part="remove"]':{boxShadow:"none",margin:`0 ${z.spacing_50} 0 ${z.spacing25}`,padding:0,display:"inline-flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:z.spacing150,width:z.spacing150,color:z.tagCloseButtonColor,background:z.tagCloseButtonBg,borderRadius:P.tagCloseButtonRadius("99px"),opacity:z.tagButtonOpacity},':host [part="remove"]:hover':{background:z.tagCloseButtonBg,opacity:z.tagButtonHoverOpacity}};static initAttributes={caption:"",removeable:!1};removeCallback=()=>{this.remove()};content=()=>[ak({part:"caption"},this.caption),c9(O.x(),{type:"button",part:"remove",hidden:!this.removeable,ariaLabel:`Remove ${this.caption}`,onClick:this.removeCallback})]}var tk=c0,s9=c0.elementCreator(),ek=B1((...y)=>s9(...y),"xinTag is deprecated, use tosiTag instead (tag is now <tosi-tag>)");class L2 extends F{static preferredTagName="tosi-tag-list";static lightStyleSpec={":host":{"--tag-list-bg":"#f8f8f8","--touch-size":"44px","--spacing":"16px",display:"grid",gridTemplateColumns:"auto",alignItems:"center",background:z.tagListBg,gap:z.spacing25,borderRadius:P.taglistRoundedRadius(z.spacing50),overflow:"hidden"},":host[editable]":{gridTemplateColumns:`0px auto ${z.touchSize}`},":host[editable][text-entry]":{gridTemplateColumns:`0px 2fr 1fr ${z.touchSize}`},':host [part="tagContainer"]':{display:"flex",content:'" "',alignItems:"center",background:z.inputBg,borderRadius:P.tagContainerRadius(z.spacing50),boxShadow:z.borderShadow,flexWrap:"nowrap",overflow:"auto hidden",gap:z.spacing25,minHeight:`calc(${z.lineHeight} + ${z.spacing})`,padding:z.spacing25},':host [part="tagMenu"]':{width:z.touchSize,height:z.touchSize,lineHeight:z.touchSize,textAlign:"center",padding:0,margin:0},":host [hidden]":{display:"none !important"},':host button[part="tagMenu"]':{background:z.brandColor,color:z.brandTextColor}};static formAssociated=!0;static initAttributes={name:"",textEntry:!1,editable:!1,placeholder:"enter tags",disabled:!1,required:!1};value="";get tags(){return Ny(this.value).filter((y)=>y!=="")}set tags(y){this.value=mk(y)}_availableTags=[];get availableTags(){return this._availableTags}set availableTags(y){if(typeof y==="string")this._availableTags=L2.parseAvailableTagsString(y);else this._availableTags=y;this.queueRender()}static parseAvailableTagsString(y){return Ny(y).map((x)=>x===""?null:x)}connectedCallback(){super.connectedCallback();let y=this.getAttribute("available-tags");if(y&&this._availableTags.length===0)this._availableTags=L2.parseAvailableTagsString(y)}formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value=""}addTag=(y)=>{let x=y.trim();if(x===""||this.tags.includes(x))return;this.tags=[...this.tags,x],this.queueRender(!0)};toggleTag=(y)=>{if(this.tags.includes(y))this.tags=this.tags.filter((x)=>x!==y),this.queueRender(!0);else this.addTag(y)};enterTag=(y)=>{let{tagInput:x}=this.parts;switch(y.key){case",":{let h=x.value.split(",")[0];this.addTag(h)}break;case"Enter":{let h=x.value.split(",")[0];this.addTag(h)}y.stopPropagation(),y.preventDefault();break;default:}};popSelectMenu=()=>{let{toggleTag:y}=this,{tagMenu:x}=this.parts,h=[...this.availableTags],C=this.tags.filter((i)=>!h.includes(i));if(C.length)h.push(null,...C);let l=h.map((i)=>{if(i===""||i===null)return null;else if(typeof i==="object")return{checked:()=>this.tags.includes(i.value),caption:i.caption,action(){y(i.value)}};else return{checked:()=>this.tags.includes(i),caption:i,action(){y(i)}}});n({target:x,width:"auto",menuItems:l})};content=()=>[c9({type:"button",style:{visibility:"hidden"},tabindex:-1}),uk({part:"tagContainer",class:"row",role:"list",ariaLabel:"Selected tags"}),Ek({part:"tagInput",class:"elastic",ariaLabel:"Enter new tag",onKeydown:this.enterTag}),c9({type:"button",title:"add tag",ariaLabel:"Select tags from list",ariaHaspopup:"listbox",part:"tagMenu",onClick:this.popSelectMenu},O.chevronDown())];removeTag=(y)=>{if(this.editable&&!this.disabled){let x=y.target.closest(c0.tagName);this.tags=this.tags.filter((h)=>h!==x.caption),x.remove(),this.queueRender(!0)}y.stopPropagation(),y.preventDefault()};render(){super.render();let{tagContainer:y,tagMenu:x,tagInput:h}=this.parts;if(x.disabled=this.disabled,h.value="",h.setAttribute("placeholder",this.placeholder),this.editable&&!this.disabled)x.toggleAttribute("hidden",!1),h.toggleAttribute("hidden",!this.textEntry);else x.toggleAttribute("hidden",!0),h.toggleAttribute("hidden",!0);y.textContent="";for(let C of this.tags)y.append(s9({caption:C,removeable:this.editable&&!this.disabled,removeCallback:this.removeTag}))}}var yg=L2,Jy=L2.elementCreator(),xg=B1((...y)=>Jy(...y),"xinTagList is deprecated, use tosiTagList instead (tag is now <tosi-tag-list>)");var Zy="1.7.2";var{span:hg}=G,s0=null,k5=null,g5=null,T1="tosi-tooltip",Cg={[`.${T1}`]:{pointerEvents:"none",padding:P.tosiTooltipPadding("4px 10px"),borderRadius:P.tosiTooltipRadius("6px"),background:P.tosiTooltipBg("#333"),color:P.tosiTooltipColor("#fff"),fontSize:P.tosiTooltipFontSize("13px"),lineHeight:"1.4",maxWidth:P.tosiTooltipMaxWidth("280px"),whiteSpace:"pre-line",boxShadow:"0 2px 8px #0003",position:"relative"},[`.${T1} p`]:{margin:"0"},[`.${T1} code`]:{background:"#fff2",padding:"0 4px",borderRadius:"3px",fontSize:"0.9em"},[`.${T1} a`]:{color:"inherit"},[`.${T1}::before`]:{content:'""',position:"absolute",width:"8px",height:"8px",background:"inherit",transform:"rotate(45deg)"},[`.${T1}.tt-s::before`]:{top:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${T1}.tt-n::before`]:{bottom:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${T1}.tt-e::before`]:{left:"-4px",top:"var(--tosi-tooltip-arrow)"},[`.${T1}.tt-w::before`]:{right:"-4px",top:"var(--tosi-tooltip-arrow)"}},py=!1;function vy(){if(py)return;py=!0,W1("tosi-tooltip",Cg)}function r2(){if(k5!==null)clearTimeout(k5),k5=null;if(s0!==null)s0.remove(),s0=null;g5=null}function lg(y){if(y.startsWith("s"))return"tt-s";if(y.startsWith("n"))return"tt-n";if(y.startsWith("e"))return"tt-e";if(y.startsWith("w"))return"tt-w";return"tt-s"}function ig(y,x,h){let C=x.getBoundingClientRect(),l=y.getBoundingClientRect(),i=C.left+C.width*0.5,k=C.top+C.height*0.5,g;if(h.startsWith("s")||h.startsWith("n"))g=Math.max(8,Math.min(l.width-8,i-l.left))-4;else g=Math.max(8,Math.min(l.height-8,k-l.top))-4;y.style.setProperty("--tosi-tooltip-arrow",g+"px")}function kg(y,x){if(x)y=c(y);let h=hg({class:T1});return h.innerHTML=R.parseInline(y),h}function gg(y,x,h){vy(),r2(),g5=y;let{top:C,left:l,width:i}=y.getBoundingClientRect(),k=l+i*0.5,g=window.innerHeight,w=window.innerWidth,B=(C>g*0.5?"n":"s")+(k>w*0.5?"w":"e"),q=kg(x,h);q.classList.add(lg(B)),s0=q0({content:q,target:y,position:B,remainOnScroll:"remove",remainOnResize:"remove"}),requestAnimationFrame(()=>{if(s0&&g5)ig(q,y,B)})}function wg(y){for(let x of y.composedPath())if(x instanceof HTMLElement&&x.dataset.tooltip)return x;return null}function Bg(y={}){vy();let{convertTitles:x=!0,delay:h=250,localize:C=!1}=y;document.addEventListener("pointermove",(l)=>{if(x){for(let g of l.composedPath())if(g instanceof HTMLElement&&g.title&&!g.dataset.tooltip){g.dataset.tooltip=g.title,g.removeAttribute("title");break}}let i=wg(l);if(i===g5)return;if(r2(),!i)return;let k=i.dataset.tooltip||null;if(!k)return;k5=setTimeout(()=>gg(i,k,C),h)}),document.addEventListener("pointerleave",r2),document.addEventListener("pointerdown",r2),document.addEventListener("keydown",r2),window.addEventListener("scroll",r2,!0)}Object.assign(globalThis,{xinjs:k0,xinjsui:T9});
209
+ `)}var{slot:W9}=G;class J9 extends ${static preferredTagName="tosi-row";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[W9()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"row",gap:A.tosiRowGap("0"),alignItems:A.tosiRowAlign("stretch"),justifyContent:A.tosiRowJustify("flex-start")}};render(){if(super.render(),this.gap)this.style.setProperty("--tosi-row-gap",this.gap);else this.style.removeProperty("--tosi-row-gap");if(this.align)this.style.setProperty("--tosi-row-align",this.align);else this.style.removeProperty("--tosi-row-align");if(this.justify)this.style.setProperty("--tosi-row-justify",this.justify);else this.style.removeProperty("--tosi-row-justify");this.style.flexWrap=this.wrap?"wrap":""}}var Gw=J9.elementCreator();class Z9 extends ${static preferredTagName="tosi-column";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[W9()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"column",gap:A.tosiColumnGap("0"),alignItems:A.tosiColumnAlign("stretch"),justifyContent:A.tosiColumnJustify("flex-start")}};render(){if(super.render(),this.gap)this.style.setProperty("--tosi-column-gap",this.gap);else this.style.removeProperty("--tosi-column-gap");if(this.align)this.style.setProperty("--tosi-column-align",this.align);else this.style.removeProperty("--tosi-column-align");if(this.justify)this.style.setProperty("--tosi-column-justify",this.justify);else this.style.removeProperty("--tosi-column-justify");this.style.flexWrap=this.wrap?"wrap":""}}var Qw=Z9.elementCreator();class R9 extends ${static preferredTagName="tosi-grid";static initAttributes={columns:"",rows:"",gap:""};content=[W9()];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:A.tosiGridColumns("1fr"),gridTemplateRows:A.tosiGridRows("auto"),gap:A.tosiGridGap("0")}};render(){if(super.render(),this.columns)this.style.setProperty("--tosi-grid-columns",this.columns);else this.style.removeProperty("--tosi-grid-columns");if(this.rows)this.style.setProperty("--tosi-grid-rows",this.rows);else this.style.removeProperty("--tosi-grid-rows");if(this.gap)this.style.setProperty("--tosi-grid-gap",this.gap);else this.style.removeProperty("--tosi-grid-gap")}}var $w=R9.elementCreator(),{span:Xy}=G,Yw=(...y)=>Xy({style:{flex:"1 1 var(--tosi-space, 0.5em)"}},...y),D9=(...y)=>Xy({style:{flex:"0 0 var(--tosi-space, 0.5em)"}},...y);var c1={accent:O.fromCss("#EE257B"),background:O.fromCss("#fafafa"),text:O.fromCss("#222222")},Ay={_tosiSpacingXs:"4px",_tosiSpacingSm:"8px",_tosiSpacing:"12px",_tosiSpacingLg:"16px",_tosiSpacingXl:"24px",_tosiFontFamily:"system-ui, -apple-system, sans-serif",_tosiFontSize:"16px",_tosiLineHeight:"1.5",_tosiCodeFontFamily:"ui-monospace, monospace",_tosiCodeFontSize:"14px",_tosiTouchSize:"44px",_tosiBorderRadius:"4px",_tosiBorderRadiusLg:"8px",_tosiTransition:"0.15s ease-out"};function _y(y){let{accent:x,background:h,text:C}=y,k=y.accentText??x.contrasting(),B=y.backgroundInset??h.darken(0.03),w=y.border??C.opacity(0.15),g=y.shadow??C.opacity(0.1),z=y.focus??x.opacity(0.5);return{_tosiAccent:x,_tosiAccentLight:x.brighten(0.15),_tosiAccentDark:x.darken(0.15),_tosiAccentText:k,_tosiBg:h,_tosiBgInset:B,_tosiBgHover:h.darken(0.05),_tosiBgActive:h.darken(0.1),_tosiText:C,_tosiTextMuted:C.opacity(0.6),_tosiTextDisabled:C.opacity(0.4),_tosiBorder:w,_tosiBorderFocus:x,_tosiShadow:g,_tosiShadowColor:g,_tosiFocusRing:`0 0 0 2px ${z}`,_tosiInputBg:h,_tosiInputBorder:w,_tosiInputBorderFocus:x,_tosiButtonBg:h,_tosiButtonText:C,_tosiButtonBorder:w,_tosiButtonHoverBg:h.darken(0.05),_tosiButtonActiveBg:x,_tosiButtonActiveText:k}}function f2(y){return{":root":{...Ay,..._y(y)}}}function t4(y){let h=f2(y)[":root"];return{":root":g0(h)}}function H9(y,x="tosi-theme"){Y1(x,y)}var iw=f2(c1),Ow=t4(c1),Ky={"--xin-icon-size":l.tosiIconSize,"--xin-icon-fill":l.tosiIconFill,"--xin-icon-stroke":l.tosiIconStroke,"--xin-tabs-bar-color":l.tosiTabsBarColor,"--xin-tabs-bar-height":l.tosiTabsBarHeight,"--xin-tabs-selected-color":l.tosiTabsSelectedColor,"--spacing":l.tosiSpacing,"--gap":l.tosiSpacingSm,"--touch-size":l.tosiTouchSize,"--background":l.tosiBg,"--text-color":l.tosiText,"--brand-color":l.tosiAccent,"--brand-text-color":l.tosiAccentText};function Fw(y){return{":root":{...f2(y)[":root"],...Ky}}}function Nw(y,x){let h={};for(let[C,k]of Object.entries(x)){let B=`--tosi-${y}-${C.replace(/([A-Z])/g,"-$1").toLowerCase()}`;h[C]=`var(${B}, ${k})`}return h}var{div:s2,label:e4,input:y5,span:Ww,button:Py}=G,{liveTheme:d}=e({liveTheme:{accent:String(c1.accent),background:String(c1.background),text:String(c1.text),dark:!1}}),x5=!1;function v0(){if(!x5)return;let y={accent:O.fromCss(d.accent.value),background:O.fromCss(d.background.value),text:O.fromCss(d.text.value)},x=d.dark.value?t4(y):f2(y);H9(x,"tosi-live-theme")}function Uy(){if(x5)return;x5=!0,d.accent.observe(v0),d.background.observe(v0),d.text.observe(v0),d.dark.observe(v0),v0()}function Jw(){x5=!1}class v9 extends ${static preferredTagName="tosi-theme-editor";static shadowStyleSpec={":host":{display:"block",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"14px",lineHeight:"1.5",background:"#ffffff",color:"#222222",padding:"16px",borderRadius:"8px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",maxWidth:"320px"},":host .field":{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},":host label":{flex:"1",fontWeight:"500"},':host input[type="color"]':{width:"48px",height:"32px",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",padding:"2px"},':host input[type="checkbox"]':{width:"18px",height:"18px",cursor:"pointer"},":host .preview":{marginTop:"12px",padding:"12px",borderRadius:"4px",transition:"all 0.15s ease-out"},":host .preview-button":{border:"none",padding:"6px 12px",borderRadius:"4px",cursor:"pointer",fontFamily:"inherit",fontSize:"13px"},":host .actions":{marginTop:"8px",display:"flex",gap:"8px"},":host .actions button":{flex:"1",padding:"6px 12px",border:"1px solid #ccc",borderRadius:"4px",background:"#f5f5f5",color:"#222",cursor:"pointer",fontFamily:"inherit",fontSize:"13px"},":host .actions button:hover":{background:"#e8e8e8"}};content=()=>[s2({class:"field"},e4("Accent"),y5({type:"color",part:"accent"})),s2({class:"field"},e4("Background"),y5({type:"color",part:"background"})),s2({class:"field"},e4("Text"),y5({type:"color",part:"text"})),s2({class:"field"},e4("Dark mode"),y5({type:"checkbox",part:"dark"})),s2({class:"preview",part:"preview",style:{background:"var(--tosi-bg, #fafafa)",color:"var(--tosi-text, #222)"}},Ww("Preview "),Py({class:"preview-button",style:{background:"var(--tosi-accent, #EE257B)",color:"var(--tosi-accent-text, white)"}},"Button")),s2({class:"actions"},Py({part:"reset"},"Reset"))];connectedCallback(){super.connectedCallback(),Uy();let y=()=>{this.parts.accent.value=d.accent.value,this.parts.background.value=d.background.value,this.parts.text.value=d.text.value,this.parts.dark.checked=d.dark.value};y(),d.accent.observe(y),d.background.observe(y),d.text.observe(y),d.dark.observe(y),this.parts.accent.addEventListener("input",()=>{d.accent.value=this.parts.accent.value}),this.parts.background.addEventListener("input",()=>{d.background.value=this.parts.background.value}),this.parts.text.addEventListener("input",()=>{d.text.value=this.parts.text.value}),this.parts.dark.addEventListener("change",()=>{d.dark.value=this.parts.dark.checked}),this.parts.reset.addEventListener("click",()=>{d.accent.value=String(c1.accent),d.background.value=String(c1.background),d.text.value=String(c1.text),d.dark.value=!1})}}var Zw=v9.elementCreator();var{div:Rw}=G;class G2 extends ${static preferredTagName="tosi-map";static formAssociated=!0;static initAttributes={coords:"65.01715565258993,25.48081004203459,12",token:"",mapStyle:"mapbox://styles/mapbox/streets-v12",name:""};value="";formDisabledCallback(y){}formResetCallback(){this.value="",this.coords="65.01715565258993,25.48081004203459,12"}content=Rw({style:{width:"100%",height:"100%"}});get map(){return this._map}static mapboxCSSAvailable;static mapboxAvailable;_map;_mapPending=!1;static shadowStyleSpec={":host":{display:"inline-block",position:"relative",width:"400px",height:"400px",textAlign:"left"}};constructor(){super();if(G2.mapboxCSSAvailable===void 0)G2.mapboxCSSAvailable=l4("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.css").catch((y)=>{console.error("failed to load mapbox-gl.css",y)}),G2.mapboxAvailable=S1("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.js").catch((y)=>{console.error("failed to load mapbox-gl.js",y)})}connectedCallback(){if(super.connectedCallback(),!this.token)console.error("mapbox requires an access token which you can provide via the token attribute")}_lastCoords="";_lastStyle="";render(){if(super.render(),!this.token)return;if(this._map){if(this.coords!==this._lastCoords){let[x,h,C]=this.coords.split(",").map((k)=>Number(k));this._map.setCenter([h,x]),this._map.setZoom(C),this._lastCoords=this.coords}if(this.mapStyle!==this._lastStyle)this._map.setStyle(this.mapStyle),this._lastStyle=this.mapStyle;return}if(this._mapPending)return;this._mapPending=!0;let{div:y}=this.parts;G2.mapboxAvailable.then(({mapboxgl:x})=>{console.log("%cmapbox may complain about missing css -- don't panic!","background: orange; color: black; padding: 0 5px;");let[h,C,k]=this.coords.split(",").map((B)=>Number(B));x.accessToken=this.token,this._map=new x.Map({container:y,style:this.mapStyle,zoom:k,center:[C,h]}),this._lastCoords=this.coords,this._lastStyle=this.mapStyle,this._mapPending=!1,this._map.on("render",()=>this._map.resize()),this._map.on("moveend",()=>{let B=this._map.getCenter(),w=this._map.getZoom(),g=`${B.lat.toFixed(6)},${B.lng.toFixed(6)},${w.toFixed(1)}`;if(g!==this.value){if(this.internals)this.internals.setFormValue(g)}})}).catch((x)=>{this._mapPending=!1,console.error("tosi-map: mapbox failed to load",x)})}}var Dw=G2.elementCreator();function Gy(y,x){if(x==null)x="";else if(typeof x!=="string")x=String(x);return x.replace(/\{\{([^}]+)\}\}/g,(h,C)=>{let k=B1[`${y}${C.startsWith("[")?C:"."+C}`];return k===void 0?h:Gy(y,String(k))})}class h5 extends ${static preferredTagName="tosi-md";static initAttributes={src:"",elements:!1};context={};value="";content=null;options={};connectedCallback(){if(super.connectedCallback(),this.src!=="")(async()=>{let y=await fetch(this.src);this.value=await y.text()})();else if(this.value==="")if(this.elements)this.value=this.innerHTML;else this.value=this.textContent!=null?this.textContent:""}didRender=()=>{};render(){super.render(),B1[this.instanceId]=typeof this.context==="string"?JSON.parse(this.context):this.context;let y=Gy(this.instanceId,this.value);if(this.elements){let x=y.split(`
210
+ `).reduce((h,C)=>{if(C.startsWith("<")||h.length===0)h.push(C);else{let k=h[h.length-1];if(!k.startsWith("<")||!k.endsWith(">"))h[h.length-1]+=`
211
+ `+C;else h.push(C)}return h},[]);this.innerHTML=x.map((h)=>h.startsWith("<")&&h.endsWith(">")?h:v(h,this.options)).join("")}else this.innerHTML=v(y,this.options);this.didRender()}}var Hw=h5,M9=h5.elementCreator(),vw=M9,Mw=M9;var{div:S9,span:C5,button:I9}=G,M0=86400000,Sw=[0,1,2,3,4,5,6],Iw=[1,2,3,4,5,6,7,8,9,10,11,12],b9=(y,x=2,h="0")=>String(y).padStart(x,h),S0=(y,x,h)=>new Date(`${y}-${b9(x)}-${b9(h)}`);class T9 extends ${static preferredTagName="tosi-month";static lightStyleSpec={":host":{display:"block"},":host [part=header]":{display:"flex",alignItems:"stretch",justifyContent:"stretch"},":host[disabled]":{pointerEvents:"none",opacity:A.disabledOpacity(0.6)},':host [part="month"], :host [part="year"]':{_fieldWidth:"4em",flex:"1"},":host [part=week], :host [part=days]":{display:"grid",gridTemplateColumns:"auto auto auto auto auto auto auto",justifyItems:"stretch"},":host .today":{background:A.monthTodayBackground("transparent"),boxShadow:A.monthTodayShadow("none"),backdropFilter:A.monthTodayBackdropFilter("brightness(0.9)"),fontWeight:A.monthTodayFontWeight("800")},":host .day, :host .date":{padding:5,display:"flex",justifyContent:"center",userSelect:"none"},":host .day":{color:A.monthDayColor("hotpink"),background:A.monthDayBackground("white"),fontWeight:A.monthDayFontWeight("800")},":host .date":{cursor:"default"},":host .weekend":{background:A.monthWeekendBackground("#eee")},":host .date:not(.in-month)":{opacity:0.5},":host .date.checked":{color:A.monthDateCheckedColor("white"),background:A.monthDateCheckedBackground("hotpink")},":host:not([range]) .date.checked":{borderRadius:A.monthDateCheckedBorderRadius("10px")},":host .range-start":{borderTopLeftRadius:A.monthDateCheckedBorderRadius("10px"),borderBottomLeftRadius:A.monthDateCheckedBorderRadius("10px")},":host .range-end":{borderTopRightRadius:A.monthDateCheckedBorderRadius("10px"),borderBottomRightRadius:A.monthDateCheckedBorderRadius("10px")}};static formAssociated=!0;static initAttributes={month:NaN,year:NaN,weekStart:0,minDate:S0(new Date().getFullYear()-100,1,1).toISOString().split("T")[0],maxDate:S0(new Date().getFullYear()+10,12,31).toISOString().split("T")[0],selectable:!1,multiple:!1,range:!1,disabled:!1,readonly:!1,required:!1,name:""};selectedDays=[];value="";formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value="",this.selectedDays=[]}get endDay(){return 1-this.weekStart}get months(){return Iw.map((y)=>({caption:S0(2025,y,1).toString().split(" ")[1],value:String(y)}))}get years(){let y=Number(this.minDate.split("-")[0]),x=Number(this.maxDate.split("-")[0]),h=[];for(let C=y;C<=x;C++)h.push(String(C));return h}monthChanged=(y,x)=>{};gotoMonth(y,x){if(this.month!==x||this.year!==y)this.month=x,this.year=y,this.monthChanged(y,x)}setMonth=()=>{this.gotoMonth(Number(this.parts.year.value),Number(this.parts.month.value))};get to(){return this.selectedDays[1]||""}set to(y){this.selectedDays[1]=y,this.selectedDays.splice(2)}get from(){return this.selectedDays[0]||""}set from(y){this.selectedDays[0]=y,this.selectedDays.splice(2)}clickDate=(y)=>{let x=y.target.getAttribute("title");this.selectDate(x)};keyDate=(y)=>{let x=!1;switch(y.code){case"Space":{let h=y.target.getAttribute("title");this.selectDate(h),x=!0;break}case"Tab":break;default:console.log(y)}if(x)y.preventDefault(),y.stopPropagation()};#y="";selectDate=(y)=>{if(this.#y=y,this.range){if(!this.to)this.selectedDays=[y,y];else if(this.from===y&&this.to===y)this.selectedDays=[];else if(this.from===y)this.from=this.to;else if(this.to===y)this.to=this.from;else if(y<this.from)this.from=y;else if(y>this.to)this.to=y;else this.to=y;this.value=`${this.from},${this.to}`}else if(this.multiple){if(this.selectedDays.includes(y))this.selectedDays.splice(this.selectedDays.indexOf(y),1);else this.selectedDays.push(y),this.selectedDays.sort();this.value=this.selectedDays.join(",")}else if(this.selectable)if(this.selectedDays.includes(y))this.value="",this.selectedDays=[];else this.value=y,this.selectedDays=[y]};nextMonth=()=>{if(this.month<12)this.gotoMonth(this.year,this.month+1);else this.gotoMonth(this.year+1,1)};previousMonth=()=>{if(this.month>1)this.gotoMonth(this.year,this.month-1);else this.gotoMonth(this.year-1,12)};checkDay=(y)=>{if(!this.range)return this.selectedDays.includes(y);else if(this.range)return this.from&&y>=this.from&&y<=this.to;return!1};dateMenuItem=(y,x="")=>{return y=y.split("T")[0],{caption:x||y,enabled:()=>!y.startsWith(`${this.year}-${b9(this.month)}-`),action:()=>{this.gotoDate(y)}}};jumpMenu=()=>{r({target:this.parts.jump,menuItems:[this.dateMenuItem(new Date().toISOString(),"This Month"),...this.selectedDays.length===0?[]:[null],...this.selectedDays.map((y)=>this.dateMenuItem(y))]})};content=()=>[S9({part:"header"},I9({part:"previous",onClick:this.previousMonth},Q.chevronLeft()),C5({style:{flex:"1"}}),I9({part:"jump",onClick:this.jumpMenu},Q.calendar()),Q1({part:"month",options:this.months,onChange:this.setMonth}),Q1({part:"year",options:[this.year],onChange:this.setMonth}),C5({style:{flex:"1"}}),I9({part:"next",onClick:this.nextMonth},Q.chevronRight())),S9({part:"week"}),S9({part:"days"})];gotoDate(y){let x=new Date(y);this.gotoMonth(x.getFullYear(),x.getMonth()+1)}connectedCallback(){super.connectedCallback();let y=new Date(this.value.split(",").pop()||Date.now());if(isNaN(this.month))this.month=y.getMonth()+1;if(isNaN(this.year))this.year=y.getFullYear()}days=[];render(){super.render();let{week:y,days:x,jump:h,month:C,year:k,previous:B,next:w}=this.parts;this.selectedDays=this.value?this.value.split(","):[];let g=S0(this.year,this.month,1),z=new Date(g.valueOf()-(7+g.getDay()-this.weekStart)%7*M0),q=this.month===12?1:this.month+1,j=new Date(S0(this.year+(this.month===12?1:0),q,1).valueOf()-M0),V=new Date(j.valueOf()+(this.weekStart*2+5+this.endDay-j.getDay())%7*M0),_=Sw.map((F)=>new Date(z.valueOf()+F*M0).toString().split(" ")[0]);this.days=[];let P=new Date().toISOString().split("T")[0];for(let F=z.valueOf();F<=V.valueOf();F+=M0){let R=new Date(F),D=R.toISOString().split("T")[0];this.days.push({date:R,selected:!1,inMonth:R.getMonth()+1===this.month,isToday:D===P,isWeekend:R.getDay()%6===0,inRange:!!(this.from&&D>=this.from&&D<=this.to)})}C.value=String(this.month),k.value=String(this.year),C.disabled=k.disabled=h.disabled=B.disabled=w.disabled=this.disabled||this.readonly,k.options=this.years,y.textContent="",y.append(..._.map((F)=>C5({class:"day"},F))),x.textContent="";let U=null,{to:i,from:N}=this;x.append(...this.days.map((F)=>{let R=["date"];if(F.inMonth)R.push("in-month");if(F.isToday)R.push("today");let D=F.date.toISOString().split("T")[0];if(this.checkDay(D))R.push("checked");if(R.push(F.isWeekend?"weekend":"weekday"),this.range){if(i===D)R.push("range-end");if(N===D)R.push("range-start")}let f=C5({class:R.join(" "),title:D,onClick:this.clickDate,onKeydown:this.keyDate,tabindex:"0"},F.date.getDate());if(D===this.#y)U=f;return f})),U?.focus()}}var bw=T9.elementCreator();var Qy=async(y,x="SHA-1")=>{let C=new TextEncoder().encode(y),k=await crypto.subtle.digest(x,C);return Array.from(new Uint8Array(k)).map((g)=>g.toString(16).padStart(2,"0")).join("")},$y=async(y)=>{let x=await Qy(y),h=await fetch(`https://weakpass.com/api/v1/search/${x}`);if(h.ok){let C=await h.json();console.log("password found in weakpass database",C)}return h.status!==404},{span:p9,tosiSlot:Tw}=G;class k5 extends ${static preferredTagName="tosi-password-strength";static lightStyleSpec={":host":{display:"inline-flex",flexDirection:"column",gap:l.spacing50,position:"relative"},":host tosi-slot":{display:"flex"},':host [part="meter"]':{display:"block",position:"relative",height:A.meterHeight("24px"),background:A.indicatorBg("white"),borderRadius:A.meterRadius("4px"),boxShadow:A.meterShadow(`inset 0 0 0 2px ${l.indicatorColor}`)},':host [part="level"]':{height:A.levelHeight("20px"),content:'" "',display:"inline-block",width:0,transition:"0.15s ease-out",background:l.indicatorColor,margin:A.levelMargin("2px"),borderRadius:A.levelRadius("2px")},':host [part="description"]':{position:"absolute",inset:"0",color:l.descriptionColor,height:A.meterHeight("24px"),lineHeight:A.meterHeight("24px"),textAlign:"center"}};static initAttributes={minLength:8,goodLength:12,indicatorColors:"#f00,#f40,#f80,#ef0,#8f0,#0a2"};descriptionColors="#000,#000,#000,#000,#000,#fff";issues={tooShort:!0,short:!0,noUpper:!0,noLower:!0,noNumber:!0,noSpecial:!0};issueDescriptions={tooShort:"too short",short:"short",noUpper:"no upper case",noLower:"no lower case",noNumber:"no digits",noSpecial:"no unusual characters"};value=0;strengthDescriptions=["unacceptable","very weak","weak","moderate","strong","very strong"];strength(y){return this.issues={tooShort:y.length<this.minLength,short:y.length<this.goodLength,noUpper:!y.match(/[A-Z]/),noLower:!y.match(/[a-z]/),noNumber:!y.match(/[0-9]/),noSpecial:!y.match(/[^a-zA-Z0-9]/)},this.issues.tooShort?0:Object.values(this.issues).filter((x)=>!x).length-1}async isBreached(){let y=this.querySelector("input")?.value;if(!y||typeof y!=="string")return!0;return await $y(y)}updateIndicator=(y)=>{let{level:x,description:h}=this.parts,C=this.indicatorColors.split(","),k=this.descriptionColors.split(","),B=this.strength(y);if(this.value!==B)this.value=B,this.dispatchEvent(new Event("change"));x.style.width=`${(B+1)*16.67}%`,this.style.setProperty("--indicator-color",C[B]),this.style.setProperty("--description-color",k[B]),h.textContent=this.strengthDescriptions[B]};update=(y)=>{let x=y.target.closest("input");this.updateIndicator(x?.value||"")};content=()=>[Tw({onInput:this.update}),p9({part:"meter"},p9({part:"level"}),p9({part:"description"}))];render(){super.render();let y=this.querySelector("input");this.updateIndicator(y?.value)}}var pw=k5,Yy=k5.elementCreator(),Lw=Yy;var{span:L9}=G;class B5 extends ${static preferredTagName="tosi-rating";static formAssociated=!0;static initAttributes={max:5,min:1,icon:"star",step:1,ratingStroke:"#e81",ratingFill:"#f91",emptyStroke:"#ccc",emptyFill:"#ccc",readonly:!1,iconSize:24,hollow:!1,required:!1,name:""};value="";formDisabledCallback(y){this.readonly=y}formResetCallback(){this.value=""}static shadowStyleSpec={":host":{display:"inline-block",position:"relative",width:"fit-content"},":host::part(container)":{position:"relative",display:"inline-block"},":host::part(empty), :host::part(filled)":{height:"100%",whiteSpace:"nowrap",overflow:"hidden"},":host::part(empty)":{pointerEvents:"none"},":host::part(filled)":{position:"absolute",left:0,transition:"width 0.15s ease-out"},":host svg":{transform:"scale(0.9)",pointerEvents:"all !important",transition:"0.25s ease-in-out"},":host svg:hover":{transform:"scale(1)"},":host svg:active":{transform:"scale(1.1)"}};content=()=>L9({part:"container"},L9({part:"empty"}),L9({part:"filled"}));displayValue(y){let{empty:x,filled:h}=this.parts,k=Math.round((typeof y==="string"?0:y||0)/this.step)*this.step;h.style.width=k/this.max*x.offsetWidth+"px"}update=(y)=>{if(this.readonly)return;let{empty:x}=this.parts,h=y instanceof MouseEvent?y.pageX-x.getBoundingClientRect().x:0,C=Math.min(Math.max(this.min,Math.round(h/x.offsetWidth*this.max/this.step+this.step*0.5)*this.step),this.max);if(y.type==="click")this.value=C;else if(y.type==="mousemove")this.displayValue(C);else this.displayValue(this.value||0)};handleKey=(y)=>{let x=this.value===""?NaN:Number(this.value);if(isNaN(x))x=Math.round((this.min+this.max)*0.5*this.step)*this.step;let h=!1;switch(y.key){case"ArrowUp":case"ArrowRight":x+=this.step,h=!0;break;case"ArrowDown":case"ArrowLeft":x-=this.step,h=!0;break}if(this.value=Math.max(Math.min(x,this.max),this.min),h)y.stopPropagation(),y.preventDefault()};connectedCallback(){super.connectedCallback();let{container:y}=this.parts;y.tabIndex=0,y.addEventListener("mousemove",this.update,!0),y.addEventListener("mouseleave",this.update),y.addEventListener("blur",this.update),y.addEventListener("click",this.update),y.addEventListener("keydown",this.handleKey)}_renderedIcon="";render(){super.render();let y=this.iconSize+"px";if(this.style.setProperty("--tosi-icon-size",y),this.readonly)this.role="image";else this.role="slider";this.ariaLabel=`rating ${this.value} out of ${this.max}`,this.ariaValueMax=String(this.max),this.ariaValueMin=String(this.min),this.ariaValueNow=this.value===""?String(-1):String(this.value);let{empty:x,filled:h}=this.parts;if(x.style.setProperty("--tosi-icon-fill",this.hollow?"none":this.emptyFill),x.style.setProperty("--tosi-icon-stroke",this.emptyStroke),h.style.setProperty("--tosi-icon-fill",this.ratingFill),h.style.setProperty("--tosi-icon-stroke",this.ratingStroke),this._renderedIcon!==this.icon){this._renderedIcon=this.icon;for(let C=0;C<this.max;C++)x.append(Q[this.icon]()),h.append(Q[this.icon]())}this.displayValue(this.value)}}var cw=B5,iy=B5.elementCreator(),dw=j1((...y)=>iy(...y),"xinRating is deprecated, use tosiRating instead (tag is now <tosi-rating>)");var{tosiSlot:Oy,div:fw,button:sw}=G,uw=[{caption:"Title",tagType:"H1"},{caption:"Heading",tagType:"H2"},{caption:"Subheading",tagType:"H3"},{caption:"Minor heading",tagType:"H4"},{caption:"Body",tagType:"P"},{caption:"Code Block",tagType:"PRE"}];function c9(y=uw){return Q1({title:"paragraph style",slot:"toolbar",class:"block-style",options:y.map(({caption:x,tagType:h})=>({caption:x,value:`formatBlock,${h}`}))})}var I0=()=>D9({slot:"toolbar"});function R1(y,x,h){return sw({slot:"toolbar",dataCommand:x,title:y},h)}var rw=()=>[R1("left-justify","justifyLeft",Q.alignLeft()),R1("center","justifyCenter",Q.alignCenter()),R1("right-justify","justifyRight",Q.alignRight()),I0(),R1("bullet list","insertUnorderedList",Q.listBullet()),R1("numbered list","insertOrderedList",Q.listNumber()),I0(),R1("indent","indent",Q.indent()),R1("indent","outdent",Q.outdent())],Fy=()=>[R1("bold","bold",Q.fontBold()),R1("italic","italic",Q.fontItalic()),R1("underline","underline",Q.fontUnderline())],mw=()=>[c9(),I0(),...Fy()],Ny=()=>[c9(),I0(),...rw(),I0(),...Fy()];class w5 extends ${static preferredTagName="tosi-rich-text";static lightStyleSpec={":host":{display:"flex",flexDirection:"column",height:"100%"},':host [part="toolbar"]':{padding:4,display:"flex",gap:"0px",flex:"0 0 auto",flexWrap:"wrap"},':host [part="toolbar"] > button':{_xinIconSize:18}};static formAssociated=!0;static initAttributes={widgets:"default",name:"",required:!1};isInitialized=!1;savedValue="";formDisabledCallback(y){if(this.isInitialized)this.parts.doc.contentEditable=y?"false":"true"}formResetCallback(){this.value=""}_value="";get value(){return this.isInitialized?this.parts.doc.innerHTML:this._value}set value(y){let x=this._value;if(this._value=y,this.isInitialized){if(this.parts.doc.innerHTML!==y)this.parts.doc.innerHTML=y}if(x!==y&&this.internals)this.internals.setFormValue(y)}blockElement(y){let{doc:x}=this.parts;while(y.parentElement!==null&&y.parentElement!==x)y=y.parentElement;return y.parentElement===x?y:void 0}get selectedBlocks(){let{doc:y}=this.parts,x=window.getSelection();if(x===null)return[];let h=[];for(let C=0;C<x.rangeCount;C++){let k=x.getRangeAt(C);if(!y.contains(k.commonAncestorContainer))continue;let B=this.blockElement(k.startContainer),w=this.blockElement(k.endContainer);h.push(B);while(B!==w&&B!==null)B=B.nextElementSibling,h.push(B)}return h}get selectedText(){let y=window.getSelection();if(y===null)return"";return this.selectedBlocks.length?y.toString():""}selectionChange=()=>{};_updatingBlockStyle=!1;handleSelectChange=(y)=>{if(this._updatingBlockStyle)return;let h=y.target?.closest(I1.tagName);if(h==null)return;this.doCommand(h.value)};handleButtonClick=(y)=>{let h=y.target?.closest("button");if(h==null)return;this.doCommand(h.dataset.command)};content=[Oy({name:"toolbar",part:"toolbar",onClick:this.handleButtonClick,onChange:this.handleSelectChange}),fw({part:"doc",contenteditable:!0,style:{flex:"1 1 auto",outline:"none"}}),Oy({part:"content"})];doCommand(y){if(y===void 0)return;let x=y.split(",");console.log("execCommand",x[0],!1,...x.slice(1)),document.execCommand(x[0],!1,...x.slice(1))}updateBlockStyle(){let y=this.parts.toolbar.querySelector(".block-style");if(y===null)return;let x=this.selectedBlocks.map((h)=>h.tagName);x=[...new Set(x)],this._updatingBlockStyle=!0,y.value=x.length===1?`formatBlock,${x[0]}`:"",this._updatingBlockStyle=!1}hasContent(){return(this.parts.doc.textContent||"").trim().length>0}handleInput=()=>{if(this.internals)this.internals.setFormValue(this.parts.doc.innerHTML),this.updateValidity()};updateValidity(){if(this.internals)if(this.required&&!this.hasContent())this.internals.setValidity({valueMissing:!0},"Please enter some content",this.parts.doc);else this.internals.setValidity({})}connectedCallback(){super.connectedCallback();let{doc:y,content:x}=this.parts;if(x.innerHTML!==""&&y.innerHTML==="")y.innerHTML=x.innerHTML,x.innerHTML="";this.isInitialized=!0,x.style.display="none",y.addEventListener("input",this.handleInput),this.updateValidity(),document.addEventListener("selectionchange",(h)=>{this.updateBlockStyle(),this.selectionChange(h,this)})}render(){let{toolbar:y}=this.parts;if(super.render(),y.children.length===0)switch(this.widgets){case"minimal":y.append(...mw());break;case"default":y.append(...Ny());break}}}var nw=w5,Wy=w5.elementCreator(),Ew=j1((...y)=>Wy(...y),"richText is deprecated, use tosiRichText instead (tag is now <tosi-rich-text>)");var{router:b0}=e({router:{path:"",hash:"",pattern:""}}),d9={};function ow(){return{...d9}}var g5=[],f9=!1,z5=new Set;function aw(y){let x=[];if(y==="")return{regex:/^\/?$/,paramNames:x};let h=y.split("/").map((k)=>{if(k.startsWith(":"))return x.push(k.slice(1)),"([^/]+)";return k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});return{regex:new RegExp("^/?"+h.join("/")+"/?$"),paramNames:x}}function tw(y){let x=y.split("?")[0].split("#")[0];for(let C of g5){if(C.fallback)continue;let k=x.match(C.regex);if(k){let B={};return C.paramNames.forEach((w,g)=>{B[w]=decodeURIComponent(k[g+1])}),{route:C,params:B}}}let h=g5.find((C)=>C.fallback);if(h)return{route:h,params:{}};return null}function T0(){let y=f9?window.location.hash.replace(/^#\/?/,""):window.location.pathname;b0.path.value=y,b0.hash.value=window.location.hash;let x=tw(y);if(x){d9=x.params,b0.pattern.value=x.route.regex.source;let h=new Map;for(let C of x.route.targets)h.set(C.view??"default",C);for(let C of z5){let k=C.name||"default",B=h.get(k);if(B)C.replaceChildren(B.component(x.params));else C.replaceChildren()}}else{d9={},b0.pattern.value="";for(let h of z5)h.replaceChildren()}}var Jy=!1;function Zy(){if(Jy)return;Jy=!0,window.addEventListener("popstate",T0),window.addEventListener("hashchange",T0)}function ew(y,x={}){f9=x.hashRouting??!1,g5=y.map((h)=>{let{regex:C,paramNames:k}=aw(h.pattern);return{regex:C,paramNames:k,targets:h.targets,fallback:h.fallback??!1}}),Zy(),T0()}function yg(y){if(Zy(),f9)window.location.hash="#/"+y.replace(/^\//,"");else window.history.pushState({},"","/"+y.replace(/^\//,""));T0()}class s9 extends ${static preferredTagName="tosi-route-view";static initAttributes={name:"default"};content=null;connectedCallback(){if(super.connectedCallback(),z5.add(this),g5.length>0)T0()}disconnectedCallback(){super.disconnectedCallback(),z5.delete(this)}}var xg=s9.elementCreator();var{div:hg,slot:Cg,label:kg,span:Bg,input:Ry}=G;class u2 extends ${static preferredTagName="tosi-segmented";static formAssociated=!0;static initAttributes={direction:"row",other:"",multiple:!1,name:"",placeholder:"Please specify…",localized:!1,required:!1};_choices=[];get choices(){return this._choices}set choices(y){if(typeof y==="string")this._choices=u2.parseChoicesString(y);else this._choices=y;this.queueRender()}static parseChoicesString(y){return y.split(",").filter((x)=>x.trim()!=="").map((x)=>{let[h,C]=x.split("=").map((g)=>g.trim()),[k,B]=(C||h).split(":").map((g)=>g.trim()),w=B?Q[B]():"";return{value:h,icon:w,caption:k}})}value="";formDisabledCallback(y){}formResetCallback(){this.value=""}get values(){return(this.value||"").split(",").map((y)=>y.trim()).filter((y)=>y!=="")}content=()=>[Cg(),hg({part:"options"},Ry({part:"custom",hidden:!0}))];static shadowStyleSpec={":host":{display:"inline-flex",gap:A.segmentedOptionGap("8px"),alignItems:A.segmentedAlignItems("center")},":host, :host::part(options)":{flexDirection:A.segmentedDirection("row")},":host label":{display:"inline-grid",alignItems:"center",gap:A.segmentedOptionGap("8px"),gridTemplateColumns:A.segmentedOptionGridColumns("0px 24px 1fr"),padding:A.segmentedOptionPadding("4px 12px"),font:A.segmentedOptionFont("16px")},":host label:focus":{outline:"none",boxShadow:A.segmentedFocusShadow(`inset 0 0 0 2px ${A.segmentedOptionCurrentBackground("#44a")}`),borderRadius:A.segmentedOptionsBorderRadius("8px")},":host label.current":{color:A.segmentedOptionCurrentColor("#eee"),background:A.segmentedOptionCurrentBackground("#44a")},":host label.current:focus":{boxShadow:A.segmentedCurrentFocusShadow(`inset 0 0 0 2px ${A.segmentedOptionCurrentColor("#eee")}`)},":host svg":{height:A.segmentOptionIconSize("16px"),stroke:A.segmentedOptionIconColor("currentColor")},":host label.no-icon":{gap:0,gridTemplateColumns:A.segmentedOptionGridColumns("0px 1fr")},':host input[type="radio"], :host input[type="checkbox"]':{visibility:A.segmentedInputVisibility("hidden")},":host::part(options)":{display:"flex",borderRadius:A.segmentedOptionsBorderRadius("8px"),background:A.segmentedOptionsBackground("#fff"),color:A.segmentedOptionColor("#222"),overflow:"hidden",alignItems:A.segmentedOptionAlignItems("stretch")},":host::part(custom)":{padding:A.segmentedOptionPadding("4px 12px"),color:A.segmentedOptionCurrentColor("#eee"),background:A.segmentedOptionCurrentBackground("#44a"),font:A.segmentedOptionFont("16px"),border:"0",outline:"none"},":host::part(custom)::placeholder":{color:A.segmentedOptionCurrentColor("#eee"),opacity:A.segmentedPlaceholderOpacity(0.75)}};syncCurrent(){let{options:y}=this.parts,{values:x,isOtherValue:h}=this;y.querySelectorAll("label").forEach((C)=>{let k=C.querySelector("input")?.value??"";C.classList.toggle("current",x.includes(k)||k===""&&h)})}handleChange=()=>{let{options:y,custom:x}=this.parts;if(this.multiple){let h=[...y.querySelectorAll("input:checked")];this.value=h.map((C)=>C.value).join(",")}else{let h=y.querySelector("input:checked");if(!h)this.value="";else if(h.value)x.setAttribute("hidden",""),this.value=h.value;else x.removeAttribute("hidden"),x.focus(),x.select(),this.value=x.value}this.syncCurrent()};handleKey=(y)=>{let x=!1;switch(y.code){case"Space":if(y.target instanceof HTMLLabelElement)y.target.click(),x=!0;break;case"Tab":if(!(y.target instanceof HTMLLabelElement))y.target.closest("label").focus();break;case"ArrowLeft":case"ArrowUp":{let h=y.target.closest("label");if(h.previousElementSibling instanceof HTMLLabelElement)h.previousElementSibling.focus()}x=!0;break;case"ArrowRight":case"ArrowDown":{let h=y.target.closest("label");if(h.nextElementSibling instanceof HTMLLabelElement)h.nextElementSibling.focus()}x=!0;break}if(x)y.preventDefault(),y.stopPropagation()};connectedCallback(){super.connectedCallback();let y=this.getAttribute("choices");if(y&&this._choices.length===0)this._choices=u2.parseChoicesString(y);let{options:x}=this.parts;if(this.name==="")this.name=this.instanceId;if(x.addEventListener("change",this.handleChange),x.addEventListener("keydown",this.handleKey),this.other&&this.multiple)console.warn(this,"is set to [other] and [multiple]; [other] will be ignored"),this.other=""}get _choicesWithOther(){let y=[...this.choices];if(this.other&&!this.multiple){let[x,h]=this.other.split(":");y.push({value:"",caption:x,icon:h})}return y}get isOtherValue(){return Boolean(this.value===""||this.value&&!this._choicesWithOther.find((y)=>y.value===this.value))}render(){super.render();let{options:y,custom:x}=this.parts,h=this.multiple?"checkbox":"radio",{values:C,isOtherValue:k}=this,B=this._choicesWithOther,w=(q)=>C.includes(q)||q===""&&k,g=[...y.querySelectorAll("label")];if(g.length===B.length&&g.every((q,j)=>q.querySelector("input")?.value===B[j].value))g.forEach((q)=>{let j=q.querySelector("input");if(j&&j.checked!==w(j.value))j.checked=w(j.value)});else y.textContent="",y.append(...B.map((q)=>kg({tabindex:0},Ry({type:h,name:this.name,value:q.value,checked:w(q.value),tabIndex:-1}),q.icon||{class:"no-icon"},this.localized?O1(q.caption):Bg(q.caption))));if(this.other&&!this.multiple){x.hidden=!k;let q=k?this.value:"";if(x.value!==q)x.value=q;if(x.placeholder=this.placeholder,x.parentElement!==y)y.append(x)}this.syncCurrent()}}var wg=u2,Dy=u2.elementCreator(),gg=j1((...y)=>Dy(...y),"xinSegmented is deprecated, use tosiSegmented instead (tag is now <tosi-segmented>)");var{slot:Hy}=G;class u9 extends ${static preferredTagName="tosi-sizebreak";static initAttributes={minWidth:0,minHeight:0};value="normal";content=[Hy({part:"normal"}),Hy({part:"small",name:"small"})];static shadowStyleSpec={":host":{display:"inline-block",position:"relative"}};handleResize=()=>{let{normal:y,small:x}=this.parts,h=this.offsetParent;if(!(h instanceof HTMLElement))return;else if(h.offsetWidth<this.minWidth||h.offsetHeight<this.minHeight)y.hidden=!0,x.hidden=!1,this.value="small";else y.hidden=!1,x.hidden=!0,this.value="normal"};connectedCallback(){super.connectedCallback(),globalThis.addEventListener("resize",this.handleResize)}disconnectedCallback(){super.disconnectedCallback(),globalThis.removeEventListener("resize",this.handleResize)}}var zg=u9.elementCreator();class q5 extends ${static preferredTagName="tosi-sizer";target=null;static shadowStyleSpec={":host":{_resizeIconFill:"#222",display:"block",position:"absolute",bottom:-7,right:-7,padding:14,width:44,height:44,opacity:0.25,transition:"opacity 0.25s ease-out"},":host(:hover)":{opacity:0.5},":host svg":{width:16,height:16,stroke:l.resizeIconFill}};content=Q.resize();get minSize(){let{minWidth:y,minHeight:x}=getComputedStyle(this.target);return{width:parseFloat(y)||32,height:parseFloat(x)||32}}resizeTarget=(y)=>{let{target:x}=this;if(!x)return;let{offsetWidth:h,offsetHeight:C}=x;x.style.left=x.offsetLeft+"px",x.style.top=x.offsetTop+"px",x.style.bottom="",x.style.right="";let{minSize:k}=this;_1(y,(B,w,g)=>{if(x.style.width=Math.max(k.width,h+B)+"px",x.style.height=Math.max(k.height,C+w)+"px",g.type==="mouseup")return!0},"nwse-resize")};connectedCallback(){if(super.connectedCallback(),!this.target)this.target=this.parentElement;let y={passive:!0};this.addEventListener("mousedown",this.resizeTarget,y),this.addEventListener("touchstart",this.resizeTarget,y)}}var qg=q5,vy=q5.elementCreator(),lg=vy;var{div:jg,input:Vg,span:Xg,button:r9}=G,My=(y)=>y.split(/(?<!\\),/).map((x)=>x.trim().replace(/\\,/g,",")),Ag=(y)=>y.map((x)=>x.replace(/,/g,"\\,")).join(",");class p0 extends ${static preferredTagName="tosi-tag";static lightStyleSpec={":host":{"--tag-close-button-color":"#000c","--tag-close-button-bg":"#fffc","--tag-button-opacity":"0.5","--tag-button-hover-opacity":"0.75","--tag-bg":A.brandColor("blue"),"--tag-text-color":A.brandTextColor("white"),display:"inline-flex",borderRadius:A.tagRoundedRadius(l.spacing50),color:l.tagTextColor,background:l.tagBg,padding:`0 ${l.spacing75} 0 ${l.spacing75}`,height:`calc(${l.lineHeight} + ${l.spacing50})`,lineHeight:`calc(${l.lineHeight} + ${l.spacing50})`},':host > [part="caption"]':{position:"relative",whiteSpace:"nowrap",overflow:"hidden",flex:"1 1 auto",fontSize:A.fontSize("16px"),color:l.tagTextColor,textOverflow:"ellipsis"},':host [part="remove"]':{boxShadow:"none",margin:`0 ${l.spacing_50} 0 ${l.spacing25}`,padding:0,display:"inline-flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:l.spacing150,width:l.spacing150,color:l.tagCloseButtonColor,background:l.tagCloseButtonBg,borderRadius:A.tagCloseButtonRadius("99px"),opacity:l.tagButtonOpacity},':host [part="remove"]:hover':{background:l.tagCloseButtonBg,opacity:l.tagButtonHoverOpacity}};static initAttributes={caption:"",removeable:!1};removeCallback=()=>{this.remove()};content=()=>[Xg({part:"caption"},this.caption),r9(Q.x(),{type:"button",part:"remove",hidden:!this.removeable,ariaLabel:`Remove ${this.caption}`,onClick:this.removeCallback})]}var _g=p0,m9=p0.elementCreator(),Kg=j1((...y)=>m9(...y),"xinTag is deprecated, use tosiTag instead (tag is now <tosi-tag>)");class r2 extends ${static preferredTagName="tosi-tag-list";static lightStyleSpec={":host":{"--tag-list-bg":"#f8f8f8","--touch-size":"44px","--spacing":"16px",display:"grid",gridTemplateColumns:"auto",alignItems:"center",background:l.tagListBg,gap:l.spacing25,borderRadius:A.taglistRoundedRadius(l.spacing50),overflow:"hidden"},":host[editable]":{gridTemplateColumns:`0px auto ${l.touchSize}`},":host[editable][text-entry]":{gridTemplateColumns:`0px 2fr 1fr ${l.touchSize}`},':host [part="tagContainer"]':{display:"flex",content:'" "',alignItems:"center",background:l.inputBg,borderRadius:A.tagContainerRadius(l.spacing50),boxShadow:l.borderShadow,flexWrap:"nowrap",overflow:"auto hidden",gap:l.spacing25,minHeight:`calc(${l.lineHeight} + ${l.spacing})`,padding:l.spacing25},':host [part="tagMenu"]':{width:l.touchSize,height:l.touchSize,lineHeight:l.touchSize,textAlign:"center",padding:0,margin:0},":host [hidden]":{display:"none !important"},':host button[part="tagMenu"]':{background:l.brandColor,color:l.brandTextColor}};static formAssociated=!0;static initAttributes={name:"",textEntry:!1,editable:!1,placeholder:"enter tags",disabled:!1,required:!1};value="";get tags(){return My(this.value).filter((y)=>y!=="")}set tags(y){this.value=Ag(y)}_availableTags=[];get availableTags(){return this._availableTags}set availableTags(y){if(typeof y==="string")this._availableTags=r2.parseAvailableTagsString(y);else this._availableTags=y;this.queueRender()}static parseAvailableTagsString(y){return My(y).map((x)=>x===""?null:x)}connectedCallback(){super.connectedCallback();let y=this.getAttribute("available-tags");if(y&&this._availableTags.length===0)this._availableTags=r2.parseAvailableTagsString(y)}formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value=""}addTag=(y)=>{let x=y.trim();if(x===""||this.tags.includes(x))return;this.tags=[...this.tags,x],this.queueRender(!0)};toggleTag=(y)=>{if(this.tags.includes(y))this.tags=this.tags.filter((x)=>x!==y),this.queueRender(!0);else this.addTag(y)};enterTag=(y)=>{let{tagInput:x}=this.parts;switch(y.key){case",":{let h=x.value.split(",")[0];this.addTag(h)}break;case"Enter":{let h=x.value.split(",")[0];this.addTag(h)}y.stopPropagation(),y.preventDefault();break;default:}};popSelectMenu=()=>{let{toggleTag:y}=this,{tagMenu:x}=this.parts,h=[...this.availableTags],C=this.tags.filter((B)=>!h.includes(B));if(C.length)h.push(null,...C);let k=h.map((B)=>{if(B===""||B===null)return null;else if(typeof B==="object")return{checked:()=>this.tags.includes(B.value),caption:B.caption,action(){y(B.value)}};else return{checked:()=>this.tags.includes(B),caption:B,action(){y(B)}}});r({target:x,width:"auto",menuItems:k})};content=()=>[r9({type:"button",style:{visibility:"hidden"},tabindex:-1}),jg({part:"tagContainer",class:"row",role:"list",ariaLabel:"Selected tags"}),Vg({part:"tagInput",class:"elastic",ariaLabel:"Enter new tag",onKeydown:this.enterTag}),r9({type:"button",title:"add tag",ariaLabel:"Select tags from list",ariaHaspopup:"listbox",part:"tagMenu",onClick:this.popSelectMenu},Q.chevronDown())];removeTag=(y)=>{if(this.editable&&!this.disabled){let x=y.target.closest(p0.tagName);this.tags=this.tags.filter((h)=>h!==x.caption),x.remove(),this.queueRender(!0)}y.stopPropagation(),y.preventDefault()};render(){super.render();let{tagContainer:y,tagMenu:x,tagInput:h}=this.parts;if(x.disabled=this.disabled,h.value="",h.setAttribute("placeholder",this.placeholder),this.editable&&!this.disabled)x.toggleAttribute("hidden",!1),h.toggleAttribute("hidden",!this.textEntry);else x.toggleAttribute("hidden",!0),h.toggleAttribute("hidden",!0);y.textContent="";for(let C of this.tags)y.append(m9({caption:C,removeable:this.editable&&!this.disabled,removeCallback:this.removeTag}))}}var Pg=r2,Sy=r2.elementCreator(),Ug=j1((...y)=>Sy(...y),"xinTagList is deprecated, use tosiTagList instead (tag is now <tosi-tag-list>)");var Iy="1.7.4";var{span:Gg}=G,L0=null,l5=null,j5=null,d1="tosi-tooltip",Qg={[`.${d1}`]:{pointerEvents:"none",padding:A.tosiTooltipPadding("4px 10px"),borderRadius:A.tosiTooltipRadius("6px"),background:A.tosiTooltipBg("#333"),color:A.tosiTooltipColor("#fff"),fontSize:A.tosiTooltipFontSize("13px"),lineHeight:"1.4",maxWidth:A.tosiTooltipMaxWidth("280px"),whiteSpace:"pre-line",boxShadow:"0 2px 8px #0003",position:"relative"},[`.${d1} p`]:{margin:"0"},[`.${d1} code`]:{background:"#fff2",padding:"0 4px",borderRadius:"3px",fontSize:"0.9em"},[`.${d1} a`]:{color:"inherit"},[`.${d1}::before`]:{content:'""',position:"absolute",width:"8px",height:"8px",background:"inherit",transform:"rotate(45deg)"},[`.${d1}.tt-s::before`]:{top:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${d1}.tt-n::before`]:{bottom:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${d1}.tt-e::before`]:{left:"-4px",top:"var(--tosi-tooltip-arrow)"},[`.${d1}.tt-w::before`]:{right:"-4px",top:"var(--tosi-tooltip-arrow)"}},by=!1;function Ty(){if(by)return;by=!0,Y1("tosi-tooltip",Qg)}function m2(){if(l5!==null)clearTimeout(l5),l5=null;if(L0!==null)L0.remove(),L0=null;j5=null}function $g(y){if(y.startsWith("s"))return"tt-s";if(y.startsWith("n"))return"tt-n";if(y.startsWith("e"))return"tt-e";if(y.startsWith("w"))return"tt-w";return"tt-s"}function Yg(y,x,h){let C=x.getBoundingClientRect(),k=y.getBoundingClientRect(),B=C.left+C.width*0.5,w=C.top+C.height*0.5,g;if(h.startsWith("s")||h.startsWith("n"))g=Math.max(8,Math.min(k.width-8,B-k.left))-4;else g=Math.max(8,Math.min(k.height-8,w-k.top))-4;y.style.setProperty("--tosi-tooltip-arrow",g+"px")}function ig(y,x){if(x)y=T(y);let h=Gg({class:d1});return h.innerHTML=v.parseInline(y),h}function Og(y,x,h){Ty(),m2(),j5=y;let{top:C,left:k,width:B}=y.getBoundingClientRect(),w=k+B*0.5,g=window.innerHeight,z=window.innerWidth,q=(C>g*0.5?"n":"s")+(w>z*0.5?"w":"e"),j=ig(x,h);j.classList.add($g(q)),L0=X0({content:j,target:y,position:q,remainOnScroll:"remove",remainOnResize:"remove"}),requestAnimationFrame(()=>{if(L0&&j5)Yg(j,y,q)})}function Fg(y){for(let x of y.composedPath())if(x instanceof HTMLElement&&x.dataset.tooltip)return x;return null}function Ng(y={}){Ty();let{convertTitles:x=!0,delay:h=250,localize:C=!1}=y;document.addEventListener("pointermove",(k)=>{if(x){for(let g of k.composedPath())if(g instanceof HTMLElement&&g.title&&!g.dataset.tooltip){g.dataset.tooltip=g.title,g.removeAttribute("title");break}}let B=Fg(k);if(B===j5)return;if(m2(),!B)return;let w=B.dataset.tooltip||null;if(!w)return;l5=setTimeout(()=>Og(B,w,C),h)}),document.addEventListener("pointerleave",m2),document.addEventListener("pointerdown",m2),document.addEventListener("keydown",m2),window.addEventListener("scroll",m2,!0)}Object.assign(globalThis,{xinjs:z0,xinjsui:n9});
212
212
 
213
- //# debugId=B45ED9C1C0F6AEAD64756E2164756E21
213
+ //# debugId=8C145371B30C7CFD64756E2164756E21
214
214
  //# sourceMappingURL=hydrate.js.map