@theoremjs/studio 0.3.5-next.951.gc40a24e → 0.3.5-next.953.gf255d6a

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 (62) hide show
  1. package/package.json +4 -4
  2. package/page/assets/{BottomSheet-C23uYni9.js → BottomSheet-Dqu4JNyD.js} +1 -1
  3. package/page/assets/{ConsoleFrame-DojYn-Ua.js → ConsoleFrame-DPrqoO63.js} +1 -1
  4. package/page/assets/{ContextMenu-scP4QtAy.js → ContextMenu-CCkYC5oC.js} +2 -2
  5. package/page/assets/{DateInput-DPnVtBuk.js → DateInput-DwjJ32WU.js} +1 -1
  6. package/page/assets/{DropdownMenu--j6BmlDw.js → DropdownMenu-BRiIS7y5.js} +2 -2
  7. package/page/assets/{Link-BnF6JNw_.js → Link-BJzFzYZZ.js} +1 -1
  8. package/page/assets/{MenuBottomSheet-DwZ1A0ZP.js → MenuBottomSheet-Cyn-X5mT.js} +1 -1
  9. package/page/assets/{PowerSearchBottomSheet-CtXQOyfT.js → PowerSearchBottomSheet-D5BDnFGs.js} +1 -1
  10. package/page/assets/{RankedBars-DOBs3j5V.js → RankedBars-BXzW5iyc.js} +1 -1
  11. package/page/assets/{SchemaFields-GsJdP3wy.js → SchemaFields-ALf11yt1.js} +1 -1
  12. package/page/assets/{ShapedData-DAjQUJgj.js → ShapedData-BrCc-5Nm.js} +1 -1
  13. package/page/assets/{TokenizerBottomSheet-M_4Fynh0.js → TokenizerBottomSheet-_Po-O1nL.js} +1 -1
  14. package/page/assets/{ToolResultCharts-DcX0_JRq.js → ToolResultCharts-B25Wz9N0.js} +1 -1
  15. package/page/assets/{Toolbar-S-NvSzN4.js → Toolbar-BIbNDUSH.js} +1 -1
  16. package/page/assets/{TraceInspector-DnQoUd5L.js → TraceInspector-BmEdTqRp.js} +2 -2
  17. package/page/assets/{TraceOverview-nRk6pOxZ.js → TraceOverview-mRMoiRtX.js} +1 -1
  18. package/page/assets/{_virtual_studio-type-sources-BZlYhM7H.js → _virtual_studio-type-sources-CUh9eCnG.js} +16 -5
  19. package/page/assets/{browser-connection-Lruy-qTV.js → browser-connection-CGupl9NP.js} +1 -1
  20. package/page/assets/{browser-engine-B5LWYMgo.js → browser-engine-BglZe00s.js} +9 -9
  21. package/page/assets/{browser-transport-BScpLZDa.js → browser-transport-BMKJqyTU.js} +2 -2
  22. package/page/assets/{compile-Ci6XGHY4.js → compile-CFGS7Xyf.js} +1 -1
  23. package/page/assets/{compile-egress-C3etX-3o.js → compile-egress-BAQfp0hq.js} +1 -1
  24. package/page/assets/{encode-files-Ds3y6S6n.js → encode-files-D8MkiRgr.js} +1 -1
  25. package/page/assets/{export-agent-BQFIIF1w.js → export-agent-BPjy13tY.js} +1 -1
  26. package/page/assets/{getRadiusAndStrokeWidthFromDot-D8AmY_nJ.js → getRadiusAndStrokeWidthFromDot-DzvtGV5n.js} +1 -1
  27. package/page/assets/{guardrail-health-BzI8GZot.js → guardrail-health-BqzfgVwd.js} +1 -1
  28. package/page/assets/{guardrail-tester-DeAAj-Ww.js → guardrail-tester-BmMnSNZC.js} +1 -1
  29. package/page/assets/host-patterns-DzBJj2uE.js +1 -0
  30. package/page/assets/{index-fyDzED1x.js → index-1UzYNcXu.js} +8 -8
  31. package/page/assets/{json-code-UNgQyCLH.js → json-code-DGEtlWGK.js} +1 -1
  32. package/page/assets/{labels-provider-CxUJe6Bn.js → labels-provider-3Sbk2Bjb.js} +1 -1
  33. package/page/assets/{live-ingress-OuSlQ6q7.js → live-ingress-ZR7rtkDx.js} +1 -1
  34. package/page/assets/{live-messages-dgQBMP8j.js → live-messages-CJ07JRrf.js} +1 -1
  35. package/page/assets/{prompt-row-Bace3EuD.js → prompt-row-bMhO_cjO.js} +1 -1
  36. package/page/assets/{reader-DoaMWQWB.js → reader-D3Gh1gq-.js} +2 -2
  37. package/page/assets/registry-CoAjLZ3F.js +1 -0
  38. package/page/assets/{schema-2nKQb1q-.js → schema-JVGuH9o3.js} +1 -1
  39. package/page/assets/{shaped-data-KV3CIOIt.js → shaped-data-CRpw7JlX.js} +9 -9
  40. package/page/assets/{stub-CXS-AHtL.js → stub-u1_pPFZW.js} +1 -1
  41. package/page/assets/{studio-code-pane-BWTLV4RT.js → studio-code-pane-9n_JT7Xe.js} +3 -3
  42. package/page/assets/{studio-console-CjqEdyB3.js → studio-console-CVLcXMgl.js} +1 -1
  43. package/page/assets/{studio-decision-DmQs0n67.js → studio-decision-BJbqzh-i.js} +1 -1
  44. package/page/assets/{studio-embedding-_Kx6Nz3-.js → studio-embedding-C49c_URE.js} +1 -1
  45. package/page/assets/{studio-host-console-DG4ViMWJ.js → studio-host-console-CgZNhDaO.js} +2 -2
  46. package/page/assets/{studio-live-B7O4qpG_.js → studio-live-B6AxEhrA.js} +1 -1
  47. package/page/assets/{studio-map-Br_kabfa.js → studio-map-BDxiF8IC.js} +1 -1
  48. package/page/assets/{studio-media-orN5UNpz.js → studio-media-BbimKgrs.js} +1 -1
  49. package/page/assets/{studio-trace-replay-DV2HMKFc.js → studio-trace-replay-DOIf9BGF.js} +1 -1
  50. package/page/assets/{studio-type-checker-vtYkUAwV.js → studio-type-checker-DuCCZTVo.js} +1 -1
  51. package/page/assets/{tool-schema-DllL3wqs.js → tool-schema-UsTCet4o.js} +1 -1
  52. package/page/assets/{trace-record-BOw-semK.js → trace-record-BhrZGQoo.js} +1 -1
  53. package/page/assets/{tree-I-6ZPGON.js → tree-Db8E16o-.js} +1 -1
  54. package/page/assets/{turn-client-RIvnewgM.js → turn-client-DCxJT6xY.js} +1 -1
  55. package/page/assets/types-CPBggAgB.js +1 -0
  56. package/page/assets/{use-one-call-DZ3NX8RC.js → use-one-call-CxoNRi9H.js} +1 -1
  57. package/page/assets/{useDismissSearchOnTouchDrag-CCqPhJ4f.js → useDismissSearchOnTouchDrag-B5-quEz5.js} +1 -1
  58. package/page/assets/{workspace-BI6bC1mm.js → workspace-RYi4swYS.js} +1 -1
  59. package/page/index.html +23 -23
  60. package/page/assets/host-patterns-F-KZIzkF.js +0 -1
  61. package/page/assets/registry-BuJuTraO.js +0 -1
  62. package/page/assets/types-Bl7WithI.js +0 -1
@@ -1,3 +1,3 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jsonMode-DYGImCy6.js","assets/editor.api-BldS301e.js","assets/preload-helper-DpV6A1kQ.js","assets/editor-DjpsE8to.css","assets/studio-monaco-C20o5PnA.js","assets/studio-monaco-BkNqudm7.css","assets/jsonMode-jMDxUeWM.css"])))=>i.map(i=>d[i]);
2
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{d as t,l as n}from"./themeProps-Bo2jNkIC.js";import{t as r}from"./preload-helper-DpV6A1kQ.js";import{t as i}from"./HStack-B00ufja5.js";import{t as a}from"./Field-DvUFAlQ-.js";import{i as o,n as s,t as c}from"./inputStyles.stylex-CwhFgCYO.js";import{h as l}from"./index-fyDzED1x.js";import{a as u,o as d,t as f}from"./editor.api-BldS301e.js";import{serveMonacoWorkers as p,studioMonacoTheme as m}from"./studio-monaco-C20o5PnA.js";var h=new class{constructor(e,t,n){this._onDidChange=new f,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}(`json`,{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:`warning`,schemaValidation:`warning`,comments:`error`,trailingCommas:`error`},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});function g(){return r(()=>import(`./jsonMode-DYGImCy6.js`),__vite__mapDeps([0,1,2,3,4,5,6]))}d.register({id:`json`,extensions:[`.json`,`.bowerrc`,`.jshintrc`,`.jscsrc`,`.eslintrc`,`.babelrc`,`.har`],aliases:[`JSON`,`json`],mimetypes:[`application/json`]}),d.onLanguage(`json`,()=>{g().then(e=>e.setupMode(h))});var _=e(t(),1),v=n(),y=20,b=8;h.setDiagnosticsOptions({validate:!0,allowComments:!1,comments:`error`,trailingCommas:`error`,schemaValidation:`ignore`,schemaRequest:`ignore`}),h.setModeConfiguration({documentFormattingEdits:!0,documentRangeFormattingEdits:!0,diagnostics:!0,foldingRanges:!0,selectionRanges:!0,tokens:!0});var x=p(),S={language:`json`,automaticLayout:!0,editContext:!1,fixedOverflowWidgets:!0,folding:!0,fontFamily:`var(--font-family-code)`,fontSize:12,formatOnPaste:!0,glyphMargin:!1,guides:{bracketPairs:!1,indentation:!1},hideCursorInOverviewRuler:!0,lineDecorationsWidth:0,lineHeight:y,lineNumbers:`off`,lineNumbersMinChars:0,links:!1,minimap:{enabled:!1},occurrencesHighlight:`off`,overviewRulerBorder:!1,overviewRulerLanes:0,padding:{top:b,bottom:b},quickSuggestions:!1,renderLineHighlight:`none`,scrollbar:{alwaysConsumeMouseWheel:!1,handleMouseWheel:!1,horizontal:`hidden`,vertical:`hidden`},scrollBeyondLastLine:!1,selectionHighlight:!1,showFoldingControls:`mouseover`,stickyScroll:{enabled:!1},suggestOnTriggerCharacters:!1,tabSize:2,wordBasedSuggestions:`off`,wordWrap:`on`,wrappingIndent:`indent`};function C({label:e,value:t,placeholder:n,fills:r,status:d,onChange:f}){let p=(0,_.useId)(),h=(0,_.useRef)(null),g=(0,_.useRef)(void 0),b=(0,_.useRef)({value:t,placeholder:n,fills:r,onChange:f});return b.current={value:t,placeholder:n,fills:r,onChange:f},(0,_.useEffect)(()=>{let t=h.current;if(!t)return;let n=!1;return x.then(()=>{if(n)return;let r=u.create(t,{...S,ariaLabel:e,placeholder:b.current.placeholder,theme:m(),value:b.current.value});g.current=r;let i=()=>{let e=((r.getValue()===``?b.current.placeholder:void 0)?.split(`
2
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{d as t,l as n}from"./themeProps-Bo2jNkIC.js";import{t as r}from"./preload-helper-DpV6A1kQ.js";import{t as i}from"./HStack-B00ufja5.js";import{t as a}from"./Field-DvUFAlQ-.js";import{i as o,n as s,t as c}from"./inputStyles.stylex-CwhFgCYO.js";import{h as l}from"./index-1UzYNcXu.js";import{a as u,o as d,t as f}from"./editor.api-BldS301e.js";import{serveMonacoWorkers as p,studioMonacoTheme as m}from"./studio-monaco-C20o5PnA.js";var h=new class{constructor(e,t,n){this._onDidChange=new f,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}(`json`,{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:`warning`,schemaValidation:`warning`,comments:`error`,trailingCommas:`error`},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});function g(){return r(()=>import(`./jsonMode-DYGImCy6.js`),__vite__mapDeps([0,1,2,3,4,5,6]))}d.register({id:`json`,extensions:[`.json`,`.bowerrc`,`.jshintrc`,`.jscsrc`,`.eslintrc`,`.babelrc`,`.har`],aliases:[`JSON`,`json`],mimetypes:[`application/json`]}),d.onLanguage(`json`,()=>{g().then(e=>e.setupMode(h))});var _=e(t(),1),v=n(),y=20,b=8;h.setDiagnosticsOptions({validate:!0,allowComments:!1,comments:`error`,trailingCommas:`error`,schemaValidation:`ignore`,schemaRequest:`ignore`}),h.setModeConfiguration({documentFormattingEdits:!0,documentRangeFormattingEdits:!0,diagnostics:!0,foldingRanges:!0,selectionRanges:!0,tokens:!0});var x=p(),S={language:`json`,automaticLayout:!0,editContext:!1,fixedOverflowWidgets:!0,folding:!0,fontFamily:`var(--font-family-code)`,fontSize:12,formatOnPaste:!0,glyphMargin:!1,guides:{bracketPairs:!1,indentation:!1},hideCursorInOverviewRuler:!0,lineDecorationsWidth:0,lineHeight:y,lineNumbers:`off`,lineNumbersMinChars:0,links:!1,minimap:{enabled:!1},occurrencesHighlight:`off`,overviewRulerBorder:!1,overviewRulerLanes:0,padding:{top:b,bottom:b},quickSuggestions:!1,renderLineHighlight:`none`,scrollbar:{alwaysConsumeMouseWheel:!1,handleMouseWheel:!1,horizontal:`hidden`,vertical:`hidden`},scrollBeyondLastLine:!1,selectionHighlight:!1,showFoldingControls:`mouseover`,stickyScroll:{enabled:!1},suggestOnTriggerCharacters:!1,tabSize:2,wordBasedSuggestions:`off`,wordWrap:`on`,wrappingIndent:`indent`};function C({label:e,value:t,placeholder:n,fills:r,status:d,onChange:f}){let p=(0,_.useId)(),h=(0,_.useRef)(null),g=(0,_.useRef)(void 0),b=(0,_.useRef)({value:t,placeholder:n,fills:r,onChange:f});return b.current={value:t,placeholder:n,fills:r,onChange:f},(0,_.useEffect)(()=>{let t=h.current;if(!t)return;let n=!1;return x.then(()=>{if(n)return;let r=u.create(t,{...S,ariaLabel:e,placeholder:b.current.placeholder,theme:m(),value:b.current.value});g.current=r;let i=()=>{let e=((r.getValue()===``?b.current.placeholder:void 0)?.split(`
3
3
  `).length??1)*y+16;t.style.height=`${String(Math.max(r.getContentHeight(),e))}px`};r.onDidContentSizeChange(i),r.onDidChangeModelContent(()=>{let e=r.getValue();e!==b.current.value&&b.current.onChange(e)}),r.onKeyDown(e=>{let{value:t,fills:n,onChange:r}=b.current;l(t,n,r)(e.browserEvent)}),i()}),()=>{n=!0,g.current?.dispose(),g.current=void 0}},[e]),(0,_.useEffect)(()=>{g.current&&g.current.getValue()!==t&&g.current.setValue(t)},[t]),(0,v.jsx)(a,{label:e,isLabelHidden:!0,inputID:p,status:d,children:(0,v.jsx)(i,{xstyle:[o.base,d&&c[d.type],d&&s[d.type]],className:`json-code`,children:(0,v.jsx)(`div`,{ref:h,id:p,className:`json-code-host`})})})}export{C as JsonCode};
@@ -1,3 +1,3 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{d as t,l as n}from"./themeProps-Bo2jNkIC.js";import{O as r,k as i}from"./Icon-Cd9sDRzY.js";import{t as a}from"./useCalendarSystem-Crg71MEB.js";import{a as o}from"./shaped-data-KV3CIOIt.js";import{t as s}from"./fullEnglishFallback-Css2A5hC.js";import{t as c}from"./useTranslator-BKF5qhFP.js";var l=e(t(),1);function u(e){try{let t=new Intl.Locale(e);return(typeof t.getTextInfo==`function`?t.getTextInfo():t.textInfo)?.direction===`rtl`?`rtl`:`ltr`}catch{return`ltr`}}var d=n(),f=`InternationalizationProvider`;function ee(e){return Object.values(e).some(e=>Object.values(e).some(e=>typeof e==`string`))?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([e,t])=>[e,typeof t==`string`?{defaultMessage:t}:t]))])):e}function p({locale:e,messages:t,overrides:n,dir:o,calendar:s,children:c}){let p=o??u(e),m=(0,l.useMemo)(()=>s==null?`gregory`:a(s,f),[s]),h=(0,l.useMemo)(()=>{let r=t??{};return{locale:e,direction:p,calendar:m,messages:ee(r),overrides:n,translate:i(e,r,n)}},[e,p,m,t,n]);return(0,d.jsx)(r,{value:h,children:c})}p.displayName=`InternationalizationProvider`,s();var m=r;function h(e,t){let n=t&&t.cache?t.cache:oe,r=t&&t.serializer?t.serializer:ie;return(t&&t.strategy?t.strategy:te)(e,{cache:n,serializer:r})}function g(e){return e==null||typeof e==`number`||typeof e==`boolean`}function _(e,t,n,r){let i=g(r)?r:n(r),a=t.get(i);return a===void 0&&(a=e.call(this,r),t.set(i,a)),a}function v(e,t,n){let r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return a===void 0&&(a=e.apply(this,r),t.set(i,a)),a}function y(e,t,n,r,i){return n.bind(t,e,r,i)}function te(e,t){let n=e.length===1?_:v;return y(e,this,n,t.cache.create(),t.serializer)}function ne(e,t){return y(e,this,v,t.cache.create(),t.serializer)}function re(e,t){return y(e,this,_,t.cache.create(),t.serializer)}var ie=function(){return JSON.stringify(arguments)},ae=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}},oe={create:function(){return new ae}},b={variadic:ne,monadic:re},se=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function ce(e){let t={};return e.replace(se,e=>{let n=e.length;switch(e[0]){case`G`:t.era=n===4?`long`:n===5?`narrow`:`short`;break;case`y`:t.year=n===2?`2-digit`:`numeric`;break;case`Y`:case`u`:case`U`:case`r`:throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case`q`:case`Q`:throw RangeError("`q/Q` (quarter) patterns are not supported");case`M`:case`L`:t.month=[`numeric`,`2-digit`,`short`,`long`,`narrow`][n-1];break;case`w`:case`W`:throw RangeError("`w/W` (week) patterns are not supported");case`d`:t.day=[`numeric`,`2-digit`][n-1];break;case`D`:case`F`:case`g`:throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case`E`:t.weekday=n===4?`long`:n===5?`narrow`:`short`;break;case`e`:if(n<4)throw RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`c`:if(n<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`a`:t.hour12=!0;break;case`b`:case`B`:throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case`h`:t.hourCycle=`h12`,t.hour=[`numeric`,`2-digit`][n-1];break;case`H`:t.hourCycle=`h23`,t.hour=[`numeric`,`2-digit`][n-1];break;case`K`:t.hourCycle=`h11`,t.hour=[`numeric`,`2-digit`][n-1];break;case`k`:t.hourCycle=`h24`,t.hour=[`numeric`,`2-digit`][n-1];break;case`j`:case`J`:case`C`:throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case`m`:t.minute=[`numeric`,`2-digit`][n-1];break;case`s`:t.second=[`numeric`,`2-digit`][n-1];break;case`S`:case`A`:throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case`z`:t.timeZoneName=n<4?`short`:`long`;break;case`Z`:case`O`:case`v`:case`V`:case`X`:case`x`:throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return``}),t}var le=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function ue(e){if(e.length===0)throw Error(`Number skeleton cannot be empty`);let t=e.split(le).filter(e=>e.length>0),n=[];for(let e of t){let t=e.split(`/`);if(t.length===0)throw Error(`Invalid number skeleton`);let[r,...i]=t;for(let e of i)if(e.length===0)throw Error(`Invalid number skeleton`);n.push({stem:r,options:i})}return n}function de(e){return e.replace(/^(.*?)-/,``)}var x=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,S=/^(@+)?(\+|#+)?[rs]?$/g,fe=/(\*)(0+)|(#+)(0+)|(0+)/g,C=/^(0+)$/;function w(e){let t={};return e[e.length-1]===`r`?t.roundingPriority=`morePrecision`:e[e.length-1]===`s`&&(t.roundingPriority=`lessPrecision`),e.replace(S,function(e,n,r){return typeof r==`string`?r===`+`?t.minimumSignificantDigits=n.length:n[0]===`#`?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof r==`string`?r.length:0)):(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length),``}),t}function T(e){switch(e){case`sign-auto`:return{signDisplay:`auto`};case`sign-accounting`:case`()`:return{currencySign:`accounting`};case`sign-always`:case`+!`:return{signDisplay:`always`};case`sign-accounting-always`:case`()!`:return{signDisplay:`always`,currencySign:`accounting`};case`sign-except-zero`:case`+?`:return{signDisplay:`exceptZero`};case`sign-accounting-except-zero`:case`()?`:return{signDisplay:`exceptZero`,currencySign:`accounting`};case`sign-never`:case`+_`:return{signDisplay:`never`}}}function pe(e){let t;if(e[0]===`E`&&e[1]===`E`?(t={notation:`engineering`},e=e.slice(2)):e[0]===`E`&&(t={notation:`scientific`},e=e.slice(1)),t){let n=e.slice(0,2);if(n===`+!`?(t.signDisplay=`always`,e=e.slice(2)):n===`+?`&&(t.signDisplay=`exceptZero`,e=e.slice(2)),!C.test(e))throw Error(`Malformed concise eng/scientific notation`);t.minimumIntegerDigits=e.length}return t}function E(e){return T(e)||{}}function me(e){let t={};for(let n of e){switch(n.stem){case`percent`:case`%`:t.style=`percent`;continue;case`%x100`:t.style=`percent`,t.scale=100;continue;case`currency`:t.style=`currency`,t.currency=n.options[0];continue;case`group-off`:case`,_`:t.useGrouping=!1;continue;case`precision-integer`:case`.`:t.maximumFractionDigits=0;continue;case`measure-unit`:case`unit`:t.style=`unit`,t.unit=de(n.options[0]);continue;case`compact-short`:case`K`:t.notation=`compact`,t.compactDisplay=`short`;continue;case`compact-long`:case`KK`:t.notation=`compact`,t.compactDisplay=`long`;continue;case`scientific`:t={...t,notation:`scientific`,...n.options.reduce((e,t)=>({...e,...E(t)}),{})};continue;case`engineering`:t={...t,notation:`engineering`,...n.options.reduce((e,t)=>({...e,...E(t)}),{})};continue;case`notation-simple`:t.notation=`standard`;continue;case`unit-width-narrow`:t.currencyDisplay=`narrowSymbol`,t.unitDisplay=`narrow`;continue;case`unit-width-short`:t.currencyDisplay=`code`,t.unitDisplay=`short`;continue;case`unit-width-full-name`:t.currencyDisplay=`name`,t.unitDisplay=`long`;continue;case`unit-width-iso-code`:t.currencyDisplay=`symbol`;continue;case`scale`:t.scale=parseFloat(n.options[0]);continue;case`rounding-mode-floor`:t.roundingMode=`floor`;continue;case`rounding-mode-ceiling`:t.roundingMode=`ceil`;continue;case`rounding-mode-down`:t.roundingMode=`trunc`;continue;case`rounding-mode-up`:t.roundingMode=`expand`;continue;case`rounding-mode-half-even`:t.roundingMode=`halfEven`;continue;case`rounding-mode-half-down`:t.roundingMode=`halfTrunc`;continue;case`rounding-mode-half-up`:t.roundingMode=`halfExpand`;continue;case`integer-width`:if(n.options.length>1)throw RangeError(`integer-width stems only accept a single optional option`);n.options[0].replace(fe,function(e,n,r,i,a,o){if(n)t.minimumIntegerDigits=r.length;else if(i&&a)throw Error(`We currently do not support maximum integer digits`);else if(o)throw Error(`We currently do not support exact integer digits`);return``});continue}if(C.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(x.test(n.stem)){if(n.options.length>1)throw RangeError(`Fraction-precision stems only accept a single optional option`);n.stem.replace(x,function(e,n,r,i,a,o){return r===`*`?t.minimumFractionDigits=n.length:i&&i[0]===`#`?t.maximumFractionDigits=i.length:a&&o?(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),``});let e=n.options[0];e===`w`?t={...t,trailingZeroDisplay:`stripIfInteger`}:e&&(t={...t,...w(e)});continue}if(S.test(n.stem)){t={...t,...w(n.stem)};continue}let e=T(n.stem);e&&(t={...t,...e});let r=pe(n.stem);r&&(t={...t,...r})}return t}var he=function(e){return e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]=`EXPECT_ARGUMENT_CLOSING_BRACE`,e[e.EMPTY_ARGUMENT=2]=`EMPTY_ARGUMENT`,e[e.MALFORMED_ARGUMENT=3]=`MALFORMED_ARGUMENT`,e[e.EXPECT_ARGUMENT_TYPE=4]=`EXPECT_ARGUMENT_TYPE`,e[e.INVALID_ARGUMENT_TYPE=5]=`INVALID_ARGUMENT_TYPE`,e[e.EXPECT_ARGUMENT_STYLE=6]=`EXPECT_ARGUMENT_STYLE`,e[e.INVALID_NUMBER_SKELETON=7]=`INVALID_NUMBER_SKELETON`,e[e.INVALID_DATE_TIME_SKELETON=8]=`INVALID_DATE_TIME_SKELETON`,e[e.EXPECT_NUMBER_SKELETON=9]=`EXPECT_NUMBER_SKELETON`,e[e.EXPECT_DATE_TIME_SKELETON=10]=`EXPECT_DATE_TIME_SKELETON`,e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]=`UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`,e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]=`EXPECT_SELECT_ARGUMENT_OPTIONS`,e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]=`EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]=`INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]=`EXPECT_SELECT_ARGUMENT_SELECTOR`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]=`EXPECT_PLURAL_ARGUMENT_SELECTOR`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]=`EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]=`EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`,e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]=`INVALID_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]=`DUPLICATE_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]=`DUPLICATE_SELECT_ARGUMENT_SELECTOR`,e[e.MISSING_OTHER_CLAUSE=22]=`MISSING_OTHER_CLAUSE`,e[e.INVALID_TAG=23]=`INVALID_TAG`,e[e.INVALID_TAG_NAME=25]=`INVALID_TAG_NAME`,e[e.UNMATCHED_CLOSING_TAG=26]=`UNMATCHED_CLOSING_TAG`,e[e.UNCLOSED_TAG=27]=`UNCLOSED_TAG`,e}({});function D(e){return e.type===0}function ge(e){return e.type===1}function O(e){return e.type===2}function k(e){return e.type===3}function A(e){return e.type===4}function j(e){return e.type===5}function M(e){return e.type===6}function _e(e){return e.type===7}function N(e){return e.type===8}function P(e){return!!(e&&typeof e==`object`&&e.type===0)}function F(e){return!!(e&&typeof e==`object`&&e.type===1)}var I=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,L={"001":[`H`,`h`],419:[`h`,`H`,`hB`,`hb`],AC:[`H`,`h`,`hb`,`hB`],AD:[`H`,`hB`],AE:[`h`,`hB`,`hb`,`H`],AF:[`H`,`hb`,`hB`,`h`],AG:[`h`,`hb`,`H`,`hB`],AI:[`H`,`h`,`hb`,`hB`],AL:[`h`,`H`,`hB`],AM:[`H`,`hB`],AO:[`H`,`hB`],AR:[`h`,`H`,`hB`,`hb`],AS:[`h`,`H`],AT:[`H`,`hB`],AU:[`h`,`hb`,`H`,`hB`],AW:[`H`,`hB`],AX:[`H`],AZ:[`H`,`hB`,`h`],BA:[`H`,`hB`,`h`],BB:[`h`,`hb`,`H`,`hB`],BD:[`h`,`hB`,`H`],BE:[`H`,`hB`],BF:[`H`,`hB`],BG:[`H`,`hB`,`h`],BH:[`h`,`hB`,`hb`,`H`],BI:[`H`,`h`],BJ:[`H`,`hB`],BL:[`H`,`hB`],BM:[`h`,`hb`,`H`,`hB`],BN:[`hb`,`hB`,`h`,`H`],BO:[`h`,`H`,`hB`,`hb`],BQ:[`H`],BR:[`H`,`hB`],BS:[`h`,`hb`,`H`,`hB`],BT:[`h`,`H`],BW:[`H`,`h`,`hb`,`hB`],BY:[`H`,`h`],BZ:[`H`,`h`,`hb`,`hB`],CA:[`h`,`hb`,`H`,`hB`],CC:[`H`,`h`,`hb`,`hB`],CD:[`hB`,`H`],CF:[`H`,`h`,`hB`],CG:[`H`,`hB`],CH:[`H`,`hB`,`h`],CI:[`H`,`hB`],CK:[`H`,`h`,`hb`,`hB`],CL:[`h`,`H`,`hB`,`hb`],CM:[`H`,`h`,`hB`],CN:[`H`,`hB`,`hb`,`h`],CO:[`h`,`H`,`hB`,`hb`],CP:[`H`],CR:[`h`,`H`,`hB`,`hb`],CU:[`h`,`H`,`hB`,`hb`],CV:[`H`,`hB`],CW:[`H`,`hB`],CX:[`H`,`h`,`hb`,`hB`],CY:[`h`,`H`,`hb`,`hB`],CZ:[`H`],DE:[`H`,`hB`],DG:[`H`,`h`,`hb`,`hB`],DJ:[`h`,`H`],DK:[`H`],DM:[`h`,`hb`,`H`,`hB`],DO:[`h`,`H`,`hB`,`hb`],DZ:[`h`,`hB`,`hb`,`H`],EA:[`H`,`h`,`hB`,`hb`],EC:[`h`,`H`,`hB`,`hb`],EE:[`H`,`hB`],EG:[`h`,`hB`,`hb`,`H`],EH:[`h`,`hB`,`hb`,`H`],ER:[`h`,`H`],ES:[`H`,`hB`,`h`,`hb`],ET:[`hB`,`hb`,`h`,`H`],FI:[`H`],FJ:[`h`,`hb`,`H`,`hB`],FK:[`H`,`h`,`hb`,`hB`],FM:[`h`,`hb`,`H`,`hB`],FO:[`H`,`h`],FR:[`H`,`hB`],GA:[`H`,`hB`],GB:[`H`,`h`,`hb`,`hB`],GD:[`h`,`hb`,`H`,`hB`],GE:[`H`,`hB`,`h`],GF:[`H`,`hB`],GG:[`H`,`h`,`hb`,`hB`],GH:[`h`,`H`],GI:[`H`,`h`,`hb`,`hB`],GL:[`H`,`h`],GM:[`h`,`hb`,`H`,`hB`],GN:[`H`,`hB`],GP:[`H`,`hB`],GQ:[`H`,`hB`,`h`,`hb`],GR:[`h`,`H`,`hb`,`hB`],GS:[`H`,`h`,`hb`,`hB`],GT:[`h`,`H`,`hB`,`hb`],GU:[`h`,`hb`,`H`,`hB`],GW:[`H`,`hB`],GY:[`h`,`hb`,`H`,`hB`],HK:[`h`,`hB`,`hb`,`H`],HN:[`h`,`H`,`hB`,`hb`],HR:[`H`,`hB`],HU:[`H`,`h`],IC:[`H`,`h`,`hB`,`hb`],ID:[`H`],IE:[`H`,`h`,`hb`,`hB`],IL:[`H`,`hB`],IM:[`H`,`h`,`hb`,`hB`],IN:[`h`,`H`],IO:[`H`,`h`,`hb`,`hB`],IQ:[`h`,`hB`,`hb`,`H`],IR:[`hB`,`H`],IS:[`H`],IT:[`H`,`hB`],JE:[`H`,`h`,`hb`,`hB`],JM:[`h`,`hb`,`H`,`hB`],JO:[`h`,`hB`,`hb`,`H`],JP:[`H`,`K`,`h`],KE:[`hB`,`hb`,`H`,`h`],KG:[`H`,`h`,`hB`,`hb`],KH:[`hB`,`h`,`H`,`hb`],KI:[`h`,`hb`,`H`,`hB`],KM:[`H`,`h`,`hB`,`hb`],KN:[`h`,`hb`,`H`,`hB`],KP:[`h`,`H`,`hB`,`hb`],KR:[`h`,`H`,`hB`,`hb`],KW:[`h`,`hB`,`hb`,`H`],KY:[`h`,`hb`,`H`,`hB`],KZ:[`H`,`hB`],LA:[`H`,`hb`,`hB`,`h`],LB:[`h`,`hB`,`hb`,`H`],LC:[`h`,`hb`,`H`,`hB`],LI:[`H`,`hB`,`h`],LK:[`H`,`h`,`hB`,`hb`],LR:[`h`,`hb`,`H`,`hB`],LS:[`h`,`H`],LT:[`H`,`h`,`hb`,`hB`],LU:[`H`,`h`,`hB`],LV:[`H`,`hB`,`hb`,`h`],LY:[`h`,`hB`,`hb`,`H`],MA:[`H`,`h`,`hB`,`hb`],MC:[`H`,`hB`],MD:[`H`,`hB`],ME:[`H`,`hB`,`h`],MF:[`H`,`hB`],MG:[`H`,`h`],MH:[`h`,`hb`,`H`,`hB`],MK:[`H`,`h`,`hb`,`hB`],ML:[`H`],MM:[`hB`,`hb`,`H`,`h`],MN:[`H`,`h`,`hb`,`hB`],MO:[`h`,`hB`,`hb`,`H`],MP:[`h`,`hb`,`H`,`hB`],MQ:[`H`,`hB`],MR:[`h`,`hB`,`hb`,`H`],MS:[`H`,`h`,`hb`,`hB`],MT:[`H`,`h`],MU:[`H`,`h`],MV:[`H`,`h`],MW:[`h`,`hb`,`H`,`hB`],MX:[`h`,`H`,`hB`,`hb`],MY:[`hb`,`hB`,`h`,`H`],MZ:[`H`,`hB`],NA:[`h`,`H`,`hB`,`hb`],NC:[`H`,`hB`],NE:[`H`],NF:[`H`,`h`,`hb`,`hB`],NG:[`H`,`h`,`hb`,`hB`],NI:[`h`,`H`,`hB`,`hb`],NL:[`H`,`hB`],NO:[`H`,`h`],NP:[`H`,`h`,`hB`],NR:[`H`,`h`,`hb`,`hB`],NU:[`H`,`h`,`hb`,`hB`],NZ:[`h`,`hb`,`H`,`hB`],OM:[`h`,`hB`,`hb`,`H`],PA:[`h`,`H`,`hB`,`hb`],PE:[`h`,`H`,`hB`,`hb`],PF:[`H`,`h`,`hB`],PG:[`h`,`H`],PH:[`h`,`hB`,`hb`,`H`],PK:[`h`,`hB`,`H`],PL:[`H`,`h`],PM:[`H`,`hB`],PN:[`H`,`h`,`hb`,`hB`],PR:[`h`,`H`,`hB`,`hb`],PS:[`h`,`hB`,`hb`,`H`],PT:[`H`,`hB`],PW:[`h`,`H`],PY:[`h`,`H`,`hB`,`hb`],QA:[`h`,`hB`,`hb`,`H`],RE:[`H`,`hB`],RO:[`H`,`hB`],RS:[`H`,`hB`,`h`],RU:[`H`],RW:[`H`,`h`],SA:[`h`,`hB`,`hb`,`H`],SB:[`h`,`hb`,`H`,`hB`],SC:[`H`,`h`,`hB`],SD:[`h`,`hB`,`hb`,`H`],SE:[`H`],SG:[`h`,`hb`,`H`,`hB`],SH:[`H`,`h`,`hb`,`hB`],SI:[`H`,`hB`],SJ:[`H`],SK:[`H`],SL:[`h`,`hb`,`H`,`hB`],SM:[`H`,`h`,`hB`],SN:[`H`,`h`,`hB`],SO:[`h`,`H`],SR:[`H`,`hB`],SS:[`h`,`hb`,`H`,`hB`],ST:[`H`,`hB`],SV:[`h`,`H`,`hB`,`hb`],SX:[`H`,`h`,`hb`,`hB`],SY:[`h`,`hB`,`hb`,`H`],SZ:[`h`,`hb`,`H`,`hB`],TA:[`H`,`h`,`hb`,`hB`],TC:[`h`,`hb`,`H`,`hB`],TD:[`h`,`H`,`hB`],TF:[`H`,`h`,`hB`],TG:[`H`,`hB`],TH:[`H`,`h`],TJ:[`H`,`h`],TL:[`H`,`hB`,`hb`,`h`],TM:[`H`,`h`],TN:[`h`,`hB`,`hb`,`H`],TO:[`h`,`H`],TR:[`H`,`hB`],TT:[`h`,`hb`,`H`,`hB`],TW:[`hB`,`hb`,`h`,`H`],TZ:[`hB`,`hb`,`H`,`h`],UA:[`H`,`hB`,`h`],UG:[`hB`,`hb`,`H`,`h`],UM:[`h`,`hb`,`H`,`hB`],US:[`h`,`hb`,`H`,`hB`],UY:[`h`,`H`,`hB`,`hb`],UZ:[`H`,`hB`,`h`],VA:[`H`,`h`,`hB`],VC:[`h`,`hb`,`H`,`hB`],VE:[`h`,`H`,`hB`,`hb`],VG:[`h`,`hb`,`H`,`hB`],VI:[`h`,`hb`,`H`,`hB`],VN:[`H`,`h`],VU:[`h`,`H`],WF:[`H`,`hB`],WS:[`h`,`H`],XK:[`H`,`hB`,`h`],YE:[`h`,`hB`,`hb`,`H`],YT:[`H`,`hB`],ZA:[`H`,`h`,`hb`,`hB`],ZM:[`h`,`hb`,`H`,`hB`],ZW:[`H`,`h`],"af-ZA":[`H`,`h`,`hB`,`hb`],"ar-001":[`h`,`hB`,`hb`,`H`],"ca-ES":[`H`,`h`,`hB`],"en-001":[`h`,`hb`,`H`,`hB`],"en-HK":[`h`,`hb`,`H`,`hB`],"en-IL":[`H`,`h`,`hb`,`hB`],"en-MY":[`h`,`hb`,`H`,`hB`],"es-BR":[`H`,`h`,`hB`,`hb`],"es-ES":[`H`,`h`,`hB`,`hb`],"es-GQ":[`H`,`h`,`hB`,`hb`],"fr-CA":[`H`,`h`,`hB`],"gl-ES":[`H`,`h`,`hB`],"gu-IN":[`hB`,`hb`,`h`,`H`],"hi-IN":[`hB`,`h`,`H`],"it-CH":[`H`,`h`,`hB`],"it-IT":[`H`,`h`,`hB`],"kn-IN":[`hB`,`h`,`H`],"ku-SY":[`H`,`hB`],"ml-IN":[`hB`,`h`,`H`],"mr-IN":[`hB`,`hb`,`h`,`H`],"pa-IN":[`hB`,`hb`,`h`,`H`],"ta-IN":[`hB`,`h`,`hb`,`H`],"te-IN":[`hB`,`h`,`H`],"zu-ZA":[`H`,`hB`,`hb`,`h`]};function ve(e,t){let n=``;for(let r=0;r<e.length;r++){let i=e.charAt(r);if(i===`j`){let a=0;for(;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;let o=1+(a&1),s=a<2?1:3+(a>>1),c=ye(t);for((c==`H`||c==`k`)&&(s=0);s-->0;)n+=`a`;for(;o-->0;)n=c+n}else n+=i===`J`?`H`:i}return n}function ye(e){let t=e.hourCycle;if(t===void 0){let n=e;t=n.getHourCycles?.()[0]??n.hourCycles?.[0]}if(t)switch(t){case`h24`:return`k`;case`h23`:return`H`;case`h12`:return`h`;case`h11`:return`K`;default:throw Error(`Invalid hourCycle`)}let n=e.language,r;return n!==`root`&&(r=e.maximize().region),(L[`${n}-${r}`]||L[r||``]||L[n||``]||L[`${n}-001`]||L[`001`])[0].charAt(0)}var be=RegExp(`^${I.source}*`),xe=RegExp(`${I.source}*$`);function R(e,t){return{start:e,end:t}}var Se=!!Object.fromEntries,Ce=!!String.prototype.trimStart,we=!!String.prototype.trimEnd,z=Se?Object.fromEntries:function(e){let t={};for(let[n,r]of e)t[n]=r;return t},Te=Ce?function(e){return e.trimStart()}:function(e){return e.replace(be,``)},Ee=we?function(e){return e.trimEnd()}:function(e){return e.replace(xe,``)},B=RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`,`yu`);function De(e,t){return B.lastIndex=t,B.exec(e)[1]??``}function Oe(e){if(e.length===0)return null;let t=1,n=1;for(let r=0;r<e.length;){let i=e.charCodeAt(r);switch(i){case 35:case 39:case 60:case 123:case 125:return null}if(i===10)t++,n=1,r++;else if(n++,i>=55296&&i<=56319&&r+1<e.length){let t=e.charCodeAt(r+1);r+=t>=56320&&t<=57343?2:1}else r++}return{offset:e.length,line:t,column:n}}var ke=class{constructor(e,t={}){this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}parse(){if(this.offset()!==0)throw Error(`parser can only be used once`);if(this.message.length>0){let e=this.message.charCodeAt(0);if(e!==35&&e!==39&&e!==60&&e!==123&&e!==125){let e=Oe(this.message);if(e){let t=this.clonePosition();return this.position=e,{val:[{type:0,value:this.message,location:R(t,this.clonePosition())}],err:null}}}}return this.parseMessage(0,``,!1)}parseMessage(e,t,n){let r=[];for(;!this.isEOF();){let i=this.char();if(i===123){let t=this.parseArgument(e,n);if(t.err)return t;r.push(t.val)}else if(i===125&&e>0)break;else if(i===35&&(t===`plural`||t===`selectordinal`)){let e=this.clonePosition();this.bump(),r.push({type:7,location:R(e,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,R(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&V(this.peek()||0)){let n=this.parseTag(e,t);if(n.err)return n;r.push(n.val)}else{let n=this.parseLiteral(e,t);if(n.err)return n;r.push(n.val)}}return{val:r,err:null}}parseTag(e,t){let n=this.clonePosition();this.bump();let r=this.parseTagName();if(this.bumpSpace(),this.bumpIf(`/>`))return{val:{type:0,value:`<${r}/>`,location:R(n,this.clonePosition())},err:null};if(this.bumpIf(`>`)){let i=this.parseMessage(e+1,t,!0);if(i.err)return i;let a=i.val,o=this.clonePosition();if(this.bumpIf(`</`)){if(this.isEOF()||!V(this.char()))return this.error(23,R(o,this.clonePosition()));let e=this.clonePosition();return r===this.parseTagName()?(this.bumpSpace(),this.bumpIf(`>`)?{val:{type:8,value:r,children:a,location:R(n,this.clonePosition())},err:null}:this.error(23,R(o,this.clonePosition()))):this.error(26,R(e,this.clonePosition()))}return this.error(27,R(n,this.clonePosition()))}return this.error(23,R(n,this.clonePosition()))}parseTagName(){let e=this.offset();for(this.bump();!this.isEOF()&&je(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){let n=this.clonePosition(),r=``;for(;;){let n=this.tryParseQuote(t);if(n){r+=n;continue}let i=this.tryParseUnquoted(e,t);if(i){r+=i;continue}let a=this.tryParseLeftAngleBracket();if(a)r+=a;else break}let i=R(n,this.clonePosition());return{val:{type:0,value:r,location:i},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Ae(this.peek()||0))?(this.bump(),`<`):null}tryParseQuote(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),`'`;case 123:case 60:case 62:case 125:break;case 35:if(e===`plural`||e===`selectordinal`)break;return null;default:return null}this.bump();let t=[this.char()];for(this.bump();!this.isEOF();){let e=this.char();if(e===39){if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}}else t.push(e);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;let n=this.char();return n===60||n===123||n===35&&(t===`plural`||t===`selectordinal`)||n===125&&e>0?null:(this.bump(),String.fromCodePoint(n))}parseArgument(e,t){let n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,R(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,R(n,this.clonePosition()));let r=this.parseIdentifierIfPossible().value;if(!r)return this.error(3,R(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,R(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:r,location:R(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,R(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(3,R(n,this.clonePosition()))}}parseIdentifierIfPossible(){let e=this.clonePosition(),t=this.offset(),n=De(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:R(e,this.clonePosition())}}parseArgumentOptions(e,t,n,r){let i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(a){case``:return this.error(4,R(i,o));case`number`:case`date`:case`time`:{this.bumpSpace();let e=null;if(this.bumpIf(`,`)){this.bumpSpace();let t=this.clonePosition(),n=this.parseSimpleArgStyleIfPossible();if(n.err)return n;let r=Ee(n.val);if(r.length===0)return this.error(6,R(this.clonePosition(),this.clonePosition()));e={style:r,styleLocation:R(t,this.clonePosition())}}let t=this.tryParseArgumentClose(r);if(t.err)return t;let i=R(r,this.clonePosition());if(e&&e.style.startsWith(`::`)){let t=Te(e.style.slice(2));if(a===`number`){let r=this.parseNumberSkeletonFromString(t,e.styleLocation);return r.err?r:{val:{type:2,value:n,location:i,style:r.val},err:null}}{if(t.length===0)return this.error(10,i);let r=t;this.locale&&(r=ve(t,this.locale));let o={type:1,pattern:r,location:e.styleLocation,parsedOptions:this.shouldParseSkeletons?ce(r):{}};return{val:{type:a===`date`?3:4,value:n,location:i,style:o},err:null}}}return{val:{type:a===`number`?2:a===`date`?3:4,value:n,location:i,style:e?.style??null},err:null}}case`plural`:case`selectordinal`:case`select`:{let i=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(`,`))return this.error(12,R(i,{...i}));this.bumpSpace();let o=this.parseIdentifierIfPossible(),s=0;if(a!==`select`&&o.value===`offset`){if(!this.bumpIf(`:`))return this.error(13,R(this.clonePosition(),this.clonePosition()));this.bumpSpace();let e=this.tryParseDecimalInteger(13,14);if(e.err)return e;this.bumpSpace(),o=this.parseIdentifierIfPossible(),s=e.val}let c=this.tryParsePluralOrSelectOptions(e,a,t,o);if(c.err)return c;let l=this.tryParseArgumentClose(r);if(l.err)return l;let u=R(r,this.clonePosition());return a===`select`?{val:{type:5,value:n,options:z(c.val),location:u},err:null}:{val:{type:6,value:n,options:z(c.val),offset:s,pluralType:a===`plural`?`cardinal`:`ordinal`,location:u},err:null}}default:return this.error(5,R(i,o))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,R(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0,t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let e=this.clonePosition();if(!this.bumpUntil(`'`))return this.error(11,R(e,this.clonePosition()));this.bump();break}case 123:e+=1,this.bump();break;case 125:if(e>0)--e;else return{val:this.message.slice(t.offset,this.offset()),err:null};break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}}parseNumberSkeletonFromString(e,t){let n=[];try{n=ue(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?me(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,r){let i=!1,a=[],o=new Set,{value:s,location:c}=r;for(;;){if(s.length===0){let e=this.clonePosition();if(t!==`select`&&this.bumpIf(`=`)){let t=this.tryParseDecimalInteger(16,19);if(t.err)return t;c=R(e,this.clonePosition()),s=this.message.slice(e.offset,this.offset())}else break}if(o.has(s))return this.error(t===`select`?21:20,c);s===`other`&&(i=!0),this.bumpSpace();let r=this.clonePosition();if(!this.bumpIf(`{`))return this.error(t===`select`?17:18,R(this.clonePosition(),this.clonePosition()));let l=this.parseMessage(e+1,t,n);if(l.err)return l;let u=this.tryParseArgumentClose(r);if(u.err)return u;a.push([s,{value:l.val,location:R(r,this.clonePosition())}]),o.add(s),this.bumpSpace(),{value:s,location:c}=this.parseIdentifierIfPossible()}return a.length===0?this.error(t===`select`?15:16,R(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(22,R(this.clonePosition(),this.clonePosition())):{val:a,err:null}}tryParseDecimalInteger(e,t){let n=1,r=this.clonePosition();this.bumpIf(`+`)||this.bumpIf(`-`)&&(n=-1);let i=!1,a=0;for(;!this.isEOF();){let e=this.char();if(e>=48&&e<=57)i=!0,a=a*10+(e-48),this.bump();else break}let o=R(r,this.clonePosition());return i?(a*=n,Number.isSafeInteger(a)?{val:a,err:null}:this.error(t,o)):this.error(e,o)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let e=this.position.offset;if(e>=this.message.length)throw Error(`out of bound`);let t=this.message.codePointAt(e);if(t===void 0)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;let e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}bumpIf(e){if(this.message.startsWith(e,this.offset())){for(let t=0;t<e.length;t++)this.bump();return!0}return!1}bumpUntil(e){let t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){let t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&Me(this.char());)this.bump()}peek(){if(this.isEOF())return null;let e=this.char(),t=this.offset();return this.message.charCodeAt(t+(e>=65536?2:1))??null}};function V(e){return e>=97&&e<=122||e>=65&&e<=90}function Ae(e){return V(e)||e===47}function je(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Me(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function H(e){e.forEach(e=>{if(delete e.location,j(e)||M(e))for(let t in e.options)delete e.options[t].location,H(e.options[t].value);else O(e)&&P(e.style)||(k(e)||A(e))&&F(e.style)?delete e.style.location:N(e)&&H(e.children)})}function Ne(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};let n=new ke(e,t).parse();if(n.err){let e=SyntaxError(he[n.err.kind]);throw e.location=n.err.location,e.originalMessage=n.err.message,e}return t?.captureLocation||H(n.val),n.val}var U=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},W=class extends U{constructor(e,t,n,r){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join(`", "`)}"`,`INVALID_VALUE`,r)}},Pe=class extends U{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,`INVALID_VALUE`,n)}},Fe=class extends U{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,`MISSING_VALUE`,t)}};function Ie(e){return e.length<2?e:e.reduce((e,t)=>{let n=e[e.length-1];return!n||n.type!==0||t.type!==0?e.push(t):n.value+=t.value,e},[])}function Le(e){return typeof e==`function`}function G(e,t,n,r,i,a,o){if(e.length===1&&D(e[0]))return[{type:0,value:e[0].value}];let s=[];for(let c of e){if(D(c)){s.push({type:0,value:c.value});continue}if(_e(c)){typeof a==`number`&&s.push({type:0,value:n.getNumberFormat(t).format(a)});continue}let{value:e}=c;if(!(i&&e in i))throw new Fe(e,o);let l=i[e];if(ge(c))(!l||typeof l==`string`||typeof l==`number`||typeof l==`bigint`)&&(l=typeof l==`string`||typeof l==`number`||typeof l==`bigint`?String(l):``),s.push({type:typeof l==`string`?0:1,value:l});else if(k(c)){let e=typeof c.style==`string`?r.date[c.style]:F(c.style)?c.style.parsedOptions:void 0;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)})}else if(A(c)){let e=typeof c.style==`string`?r.time[c.style]:F(c.style)?c.style.parsedOptions:r.time.medium;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)})}else if(O(c)){let e=typeof c.style==`string`?r.number[c.style]:P(c.style)?c.style.parsedOptions:void 0;if(e&&e.scale){let t=e.scale||1;if(typeof l==`bigint`){if(!Number.isInteger(t))throw TypeError(`Cannot apply fractional scale ${t} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(t)}else l*=t}s.push({type:0,value:n.getNumberFormat(t,e).format(l)})}else{if(N(c)){let{children:e,value:l}=c,u=i[l];if(!Le(u))throw new Pe(l,`function`,o);let d=u(G(e,t,n,r,i,a).map(e=>e.value));Array.isArray(d)||(d=[d]),s.push(...d.map(e=>({type:typeof e==`string`?0:1,value:e})))}if(j(c)){let e=l,a=(Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0)||c.options.other;if(!a)throw new W(c.value,l,Object.keys(c.options),o);s.push(...G(a.value,t,n,r,i))}else if(M(c)){let e=`=${l}`,a=Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0;if(!a){if(!Intl.PluralRules)throw new U(`Intl.PluralRules is not available in this environment.
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{d as t,l as n}from"./themeProps-Bo2jNkIC.js";import{O as r,k as i}from"./Icon-Cd9sDRzY.js";import{t as a}from"./useCalendarSystem-Crg71MEB.js";import{a as o}from"./shaped-data-CRpw7JlX.js";import{t as s}from"./fullEnglishFallback-Css2A5hC.js";import{t as c}from"./useTranslator-BKF5qhFP.js";var l=e(t(),1);function u(e){try{let t=new Intl.Locale(e);return(typeof t.getTextInfo==`function`?t.getTextInfo():t.textInfo)?.direction===`rtl`?`rtl`:`ltr`}catch{return`ltr`}}var d=n(),f=`InternationalizationProvider`;function ee(e){return Object.values(e).some(e=>Object.values(e).some(e=>typeof e==`string`))?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([e,t])=>[e,typeof t==`string`?{defaultMessage:t}:t]))])):e}function p({locale:e,messages:t,overrides:n,dir:o,calendar:s,children:c}){let p=o??u(e),m=(0,l.useMemo)(()=>s==null?`gregory`:a(s,f),[s]),h=(0,l.useMemo)(()=>{let r=t??{};return{locale:e,direction:p,calendar:m,messages:ee(r),overrides:n,translate:i(e,r,n)}},[e,p,m,t,n]);return(0,d.jsx)(r,{value:h,children:c})}p.displayName=`InternationalizationProvider`,s();var m=r;function h(e,t){let n=t&&t.cache?t.cache:oe,r=t&&t.serializer?t.serializer:ie;return(t&&t.strategy?t.strategy:te)(e,{cache:n,serializer:r})}function g(e){return e==null||typeof e==`number`||typeof e==`boolean`}function _(e,t,n,r){let i=g(r)?r:n(r),a=t.get(i);return a===void 0&&(a=e.call(this,r),t.set(i,a)),a}function v(e,t,n){let r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return a===void 0&&(a=e.apply(this,r),t.set(i,a)),a}function y(e,t,n,r,i){return n.bind(t,e,r,i)}function te(e,t){let n=e.length===1?_:v;return y(e,this,n,t.cache.create(),t.serializer)}function ne(e,t){return y(e,this,v,t.cache.create(),t.serializer)}function re(e,t){return y(e,this,_,t.cache.create(),t.serializer)}var ie=function(){return JSON.stringify(arguments)},ae=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}},oe={create:function(){return new ae}},b={variadic:ne,monadic:re},se=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function ce(e){let t={};return e.replace(se,e=>{let n=e.length;switch(e[0]){case`G`:t.era=n===4?`long`:n===5?`narrow`:`short`;break;case`y`:t.year=n===2?`2-digit`:`numeric`;break;case`Y`:case`u`:case`U`:case`r`:throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case`q`:case`Q`:throw RangeError("`q/Q` (quarter) patterns are not supported");case`M`:case`L`:t.month=[`numeric`,`2-digit`,`short`,`long`,`narrow`][n-1];break;case`w`:case`W`:throw RangeError("`w/W` (week) patterns are not supported");case`d`:t.day=[`numeric`,`2-digit`][n-1];break;case`D`:case`F`:case`g`:throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case`E`:t.weekday=n===4?`long`:n===5?`narrow`:`short`;break;case`e`:if(n<4)throw RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`c`:if(n<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`a`:t.hour12=!0;break;case`b`:case`B`:throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case`h`:t.hourCycle=`h12`,t.hour=[`numeric`,`2-digit`][n-1];break;case`H`:t.hourCycle=`h23`,t.hour=[`numeric`,`2-digit`][n-1];break;case`K`:t.hourCycle=`h11`,t.hour=[`numeric`,`2-digit`][n-1];break;case`k`:t.hourCycle=`h24`,t.hour=[`numeric`,`2-digit`][n-1];break;case`j`:case`J`:case`C`:throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case`m`:t.minute=[`numeric`,`2-digit`][n-1];break;case`s`:t.second=[`numeric`,`2-digit`][n-1];break;case`S`:case`A`:throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case`z`:t.timeZoneName=n<4?`short`:`long`;break;case`Z`:case`O`:case`v`:case`V`:case`X`:case`x`:throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return``}),t}var le=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function ue(e){if(e.length===0)throw Error(`Number skeleton cannot be empty`);let t=e.split(le).filter(e=>e.length>0),n=[];for(let e of t){let t=e.split(`/`);if(t.length===0)throw Error(`Invalid number skeleton`);let[r,...i]=t;for(let e of i)if(e.length===0)throw Error(`Invalid number skeleton`);n.push({stem:r,options:i})}return n}function de(e){return e.replace(/^(.*?)-/,``)}var x=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,S=/^(@+)?(\+|#+)?[rs]?$/g,fe=/(\*)(0+)|(#+)(0+)|(0+)/g,C=/^(0+)$/;function w(e){let t={};return e[e.length-1]===`r`?t.roundingPriority=`morePrecision`:e[e.length-1]===`s`&&(t.roundingPriority=`lessPrecision`),e.replace(S,function(e,n,r){return typeof r==`string`?r===`+`?t.minimumSignificantDigits=n.length:n[0]===`#`?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof r==`string`?r.length:0)):(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length),``}),t}function T(e){switch(e){case`sign-auto`:return{signDisplay:`auto`};case`sign-accounting`:case`()`:return{currencySign:`accounting`};case`sign-always`:case`+!`:return{signDisplay:`always`};case`sign-accounting-always`:case`()!`:return{signDisplay:`always`,currencySign:`accounting`};case`sign-except-zero`:case`+?`:return{signDisplay:`exceptZero`};case`sign-accounting-except-zero`:case`()?`:return{signDisplay:`exceptZero`,currencySign:`accounting`};case`sign-never`:case`+_`:return{signDisplay:`never`}}}function pe(e){let t;if(e[0]===`E`&&e[1]===`E`?(t={notation:`engineering`},e=e.slice(2)):e[0]===`E`&&(t={notation:`scientific`},e=e.slice(1)),t){let n=e.slice(0,2);if(n===`+!`?(t.signDisplay=`always`,e=e.slice(2)):n===`+?`&&(t.signDisplay=`exceptZero`,e=e.slice(2)),!C.test(e))throw Error(`Malformed concise eng/scientific notation`);t.minimumIntegerDigits=e.length}return t}function E(e){return T(e)||{}}function me(e){let t={};for(let n of e){switch(n.stem){case`percent`:case`%`:t.style=`percent`;continue;case`%x100`:t.style=`percent`,t.scale=100;continue;case`currency`:t.style=`currency`,t.currency=n.options[0];continue;case`group-off`:case`,_`:t.useGrouping=!1;continue;case`precision-integer`:case`.`:t.maximumFractionDigits=0;continue;case`measure-unit`:case`unit`:t.style=`unit`,t.unit=de(n.options[0]);continue;case`compact-short`:case`K`:t.notation=`compact`,t.compactDisplay=`short`;continue;case`compact-long`:case`KK`:t.notation=`compact`,t.compactDisplay=`long`;continue;case`scientific`:t={...t,notation:`scientific`,...n.options.reduce((e,t)=>({...e,...E(t)}),{})};continue;case`engineering`:t={...t,notation:`engineering`,...n.options.reduce((e,t)=>({...e,...E(t)}),{})};continue;case`notation-simple`:t.notation=`standard`;continue;case`unit-width-narrow`:t.currencyDisplay=`narrowSymbol`,t.unitDisplay=`narrow`;continue;case`unit-width-short`:t.currencyDisplay=`code`,t.unitDisplay=`short`;continue;case`unit-width-full-name`:t.currencyDisplay=`name`,t.unitDisplay=`long`;continue;case`unit-width-iso-code`:t.currencyDisplay=`symbol`;continue;case`scale`:t.scale=parseFloat(n.options[0]);continue;case`rounding-mode-floor`:t.roundingMode=`floor`;continue;case`rounding-mode-ceiling`:t.roundingMode=`ceil`;continue;case`rounding-mode-down`:t.roundingMode=`trunc`;continue;case`rounding-mode-up`:t.roundingMode=`expand`;continue;case`rounding-mode-half-even`:t.roundingMode=`halfEven`;continue;case`rounding-mode-half-down`:t.roundingMode=`halfTrunc`;continue;case`rounding-mode-half-up`:t.roundingMode=`halfExpand`;continue;case`integer-width`:if(n.options.length>1)throw RangeError(`integer-width stems only accept a single optional option`);n.options[0].replace(fe,function(e,n,r,i,a,o){if(n)t.minimumIntegerDigits=r.length;else if(i&&a)throw Error(`We currently do not support maximum integer digits`);else if(o)throw Error(`We currently do not support exact integer digits`);return``});continue}if(C.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(x.test(n.stem)){if(n.options.length>1)throw RangeError(`Fraction-precision stems only accept a single optional option`);n.stem.replace(x,function(e,n,r,i,a,o){return r===`*`?t.minimumFractionDigits=n.length:i&&i[0]===`#`?t.maximumFractionDigits=i.length:a&&o?(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),``});let e=n.options[0];e===`w`?t={...t,trailingZeroDisplay:`stripIfInteger`}:e&&(t={...t,...w(e)});continue}if(S.test(n.stem)){t={...t,...w(n.stem)};continue}let e=T(n.stem);e&&(t={...t,...e});let r=pe(n.stem);r&&(t={...t,...r})}return t}var he=function(e){return e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]=`EXPECT_ARGUMENT_CLOSING_BRACE`,e[e.EMPTY_ARGUMENT=2]=`EMPTY_ARGUMENT`,e[e.MALFORMED_ARGUMENT=3]=`MALFORMED_ARGUMENT`,e[e.EXPECT_ARGUMENT_TYPE=4]=`EXPECT_ARGUMENT_TYPE`,e[e.INVALID_ARGUMENT_TYPE=5]=`INVALID_ARGUMENT_TYPE`,e[e.EXPECT_ARGUMENT_STYLE=6]=`EXPECT_ARGUMENT_STYLE`,e[e.INVALID_NUMBER_SKELETON=7]=`INVALID_NUMBER_SKELETON`,e[e.INVALID_DATE_TIME_SKELETON=8]=`INVALID_DATE_TIME_SKELETON`,e[e.EXPECT_NUMBER_SKELETON=9]=`EXPECT_NUMBER_SKELETON`,e[e.EXPECT_DATE_TIME_SKELETON=10]=`EXPECT_DATE_TIME_SKELETON`,e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]=`UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`,e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]=`EXPECT_SELECT_ARGUMENT_OPTIONS`,e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]=`EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]=`INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]=`EXPECT_SELECT_ARGUMENT_SELECTOR`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]=`EXPECT_PLURAL_ARGUMENT_SELECTOR`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]=`EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]=`EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`,e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]=`INVALID_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]=`DUPLICATE_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]=`DUPLICATE_SELECT_ARGUMENT_SELECTOR`,e[e.MISSING_OTHER_CLAUSE=22]=`MISSING_OTHER_CLAUSE`,e[e.INVALID_TAG=23]=`INVALID_TAG`,e[e.INVALID_TAG_NAME=25]=`INVALID_TAG_NAME`,e[e.UNMATCHED_CLOSING_TAG=26]=`UNMATCHED_CLOSING_TAG`,e[e.UNCLOSED_TAG=27]=`UNCLOSED_TAG`,e}({});function D(e){return e.type===0}function ge(e){return e.type===1}function O(e){return e.type===2}function k(e){return e.type===3}function A(e){return e.type===4}function j(e){return e.type===5}function M(e){return e.type===6}function _e(e){return e.type===7}function N(e){return e.type===8}function P(e){return!!(e&&typeof e==`object`&&e.type===0)}function F(e){return!!(e&&typeof e==`object`&&e.type===1)}var I=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,L={"001":[`H`,`h`],419:[`h`,`H`,`hB`,`hb`],AC:[`H`,`h`,`hb`,`hB`],AD:[`H`,`hB`],AE:[`h`,`hB`,`hb`,`H`],AF:[`H`,`hb`,`hB`,`h`],AG:[`h`,`hb`,`H`,`hB`],AI:[`H`,`h`,`hb`,`hB`],AL:[`h`,`H`,`hB`],AM:[`H`,`hB`],AO:[`H`,`hB`],AR:[`h`,`H`,`hB`,`hb`],AS:[`h`,`H`],AT:[`H`,`hB`],AU:[`h`,`hb`,`H`,`hB`],AW:[`H`,`hB`],AX:[`H`],AZ:[`H`,`hB`,`h`],BA:[`H`,`hB`,`h`],BB:[`h`,`hb`,`H`,`hB`],BD:[`h`,`hB`,`H`],BE:[`H`,`hB`],BF:[`H`,`hB`],BG:[`H`,`hB`,`h`],BH:[`h`,`hB`,`hb`,`H`],BI:[`H`,`h`],BJ:[`H`,`hB`],BL:[`H`,`hB`],BM:[`h`,`hb`,`H`,`hB`],BN:[`hb`,`hB`,`h`,`H`],BO:[`h`,`H`,`hB`,`hb`],BQ:[`H`],BR:[`H`,`hB`],BS:[`h`,`hb`,`H`,`hB`],BT:[`h`,`H`],BW:[`H`,`h`,`hb`,`hB`],BY:[`H`,`h`],BZ:[`H`,`h`,`hb`,`hB`],CA:[`h`,`hb`,`H`,`hB`],CC:[`H`,`h`,`hb`,`hB`],CD:[`hB`,`H`],CF:[`H`,`h`,`hB`],CG:[`H`,`hB`],CH:[`H`,`hB`,`h`],CI:[`H`,`hB`],CK:[`H`,`h`,`hb`,`hB`],CL:[`h`,`H`,`hB`,`hb`],CM:[`H`,`h`,`hB`],CN:[`H`,`hB`,`hb`,`h`],CO:[`h`,`H`,`hB`,`hb`],CP:[`H`],CR:[`h`,`H`,`hB`,`hb`],CU:[`h`,`H`,`hB`,`hb`],CV:[`H`,`hB`],CW:[`H`,`hB`],CX:[`H`,`h`,`hb`,`hB`],CY:[`h`,`H`,`hb`,`hB`],CZ:[`H`],DE:[`H`,`hB`],DG:[`H`,`h`,`hb`,`hB`],DJ:[`h`,`H`],DK:[`H`],DM:[`h`,`hb`,`H`,`hB`],DO:[`h`,`H`,`hB`,`hb`],DZ:[`h`,`hB`,`hb`,`H`],EA:[`H`,`h`,`hB`,`hb`],EC:[`h`,`H`,`hB`,`hb`],EE:[`H`,`hB`],EG:[`h`,`hB`,`hb`,`H`],EH:[`h`,`hB`,`hb`,`H`],ER:[`h`,`H`],ES:[`H`,`hB`,`h`,`hb`],ET:[`hB`,`hb`,`h`,`H`],FI:[`H`],FJ:[`h`,`hb`,`H`,`hB`],FK:[`H`,`h`,`hb`,`hB`],FM:[`h`,`hb`,`H`,`hB`],FO:[`H`,`h`],FR:[`H`,`hB`],GA:[`H`,`hB`],GB:[`H`,`h`,`hb`,`hB`],GD:[`h`,`hb`,`H`,`hB`],GE:[`H`,`hB`,`h`],GF:[`H`,`hB`],GG:[`H`,`h`,`hb`,`hB`],GH:[`h`,`H`],GI:[`H`,`h`,`hb`,`hB`],GL:[`H`,`h`],GM:[`h`,`hb`,`H`,`hB`],GN:[`H`,`hB`],GP:[`H`,`hB`],GQ:[`H`,`hB`,`h`,`hb`],GR:[`h`,`H`,`hb`,`hB`],GS:[`H`,`h`,`hb`,`hB`],GT:[`h`,`H`,`hB`,`hb`],GU:[`h`,`hb`,`H`,`hB`],GW:[`H`,`hB`],GY:[`h`,`hb`,`H`,`hB`],HK:[`h`,`hB`,`hb`,`H`],HN:[`h`,`H`,`hB`,`hb`],HR:[`H`,`hB`],HU:[`H`,`h`],IC:[`H`,`h`,`hB`,`hb`],ID:[`H`],IE:[`H`,`h`,`hb`,`hB`],IL:[`H`,`hB`],IM:[`H`,`h`,`hb`,`hB`],IN:[`h`,`H`],IO:[`H`,`h`,`hb`,`hB`],IQ:[`h`,`hB`,`hb`,`H`],IR:[`hB`,`H`],IS:[`H`],IT:[`H`,`hB`],JE:[`H`,`h`,`hb`,`hB`],JM:[`h`,`hb`,`H`,`hB`],JO:[`h`,`hB`,`hb`,`H`],JP:[`H`,`K`,`h`],KE:[`hB`,`hb`,`H`,`h`],KG:[`H`,`h`,`hB`,`hb`],KH:[`hB`,`h`,`H`,`hb`],KI:[`h`,`hb`,`H`,`hB`],KM:[`H`,`h`,`hB`,`hb`],KN:[`h`,`hb`,`H`,`hB`],KP:[`h`,`H`,`hB`,`hb`],KR:[`h`,`H`,`hB`,`hb`],KW:[`h`,`hB`,`hb`,`H`],KY:[`h`,`hb`,`H`,`hB`],KZ:[`H`,`hB`],LA:[`H`,`hb`,`hB`,`h`],LB:[`h`,`hB`,`hb`,`H`],LC:[`h`,`hb`,`H`,`hB`],LI:[`H`,`hB`,`h`],LK:[`H`,`h`,`hB`,`hb`],LR:[`h`,`hb`,`H`,`hB`],LS:[`h`,`H`],LT:[`H`,`h`,`hb`,`hB`],LU:[`H`,`h`,`hB`],LV:[`H`,`hB`,`hb`,`h`],LY:[`h`,`hB`,`hb`,`H`],MA:[`H`,`h`,`hB`,`hb`],MC:[`H`,`hB`],MD:[`H`,`hB`],ME:[`H`,`hB`,`h`],MF:[`H`,`hB`],MG:[`H`,`h`],MH:[`h`,`hb`,`H`,`hB`],MK:[`H`,`h`,`hb`,`hB`],ML:[`H`],MM:[`hB`,`hb`,`H`,`h`],MN:[`H`,`h`,`hb`,`hB`],MO:[`h`,`hB`,`hb`,`H`],MP:[`h`,`hb`,`H`,`hB`],MQ:[`H`,`hB`],MR:[`h`,`hB`,`hb`,`H`],MS:[`H`,`h`,`hb`,`hB`],MT:[`H`,`h`],MU:[`H`,`h`],MV:[`H`,`h`],MW:[`h`,`hb`,`H`,`hB`],MX:[`h`,`H`,`hB`,`hb`],MY:[`hb`,`hB`,`h`,`H`],MZ:[`H`,`hB`],NA:[`h`,`H`,`hB`,`hb`],NC:[`H`,`hB`],NE:[`H`],NF:[`H`,`h`,`hb`,`hB`],NG:[`H`,`h`,`hb`,`hB`],NI:[`h`,`H`,`hB`,`hb`],NL:[`H`,`hB`],NO:[`H`,`h`],NP:[`H`,`h`,`hB`],NR:[`H`,`h`,`hb`,`hB`],NU:[`H`,`h`,`hb`,`hB`],NZ:[`h`,`hb`,`H`,`hB`],OM:[`h`,`hB`,`hb`,`H`],PA:[`h`,`H`,`hB`,`hb`],PE:[`h`,`H`,`hB`,`hb`],PF:[`H`,`h`,`hB`],PG:[`h`,`H`],PH:[`h`,`hB`,`hb`,`H`],PK:[`h`,`hB`,`H`],PL:[`H`,`h`],PM:[`H`,`hB`],PN:[`H`,`h`,`hb`,`hB`],PR:[`h`,`H`,`hB`,`hb`],PS:[`h`,`hB`,`hb`,`H`],PT:[`H`,`hB`],PW:[`h`,`H`],PY:[`h`,`H`,`hB`,`hb`],QA:[`h`,`hB`,`hb`,`H`],RE:[`H`,`hB`],RO:[`H`,`hB`],RS:[`H`,`hB`,`h`],RU:[`H`],RW:[`H`,`h`],SA:[`h`,`hB`,`hb`,`H`],SB:[`h`,`hb`,`H`,`hB`],SC:[`H`,`h`,`hB`],SD:[`h`,`hB`,`hb`,`H`],SE:[`H`],SG:[`h`,`hb`,`H`,`hB`],SH:[`H`,`h`,`hb`,`hB`],SI:[`H`,`hB`],SJ:[`H`],SK:[`H`],SL:[`h`,`hb`,`H`,`hB`],SM:[`H`,`h`,`hB`],SN:[`H`,`h`,`hB`],SO:[`h`,`H`],SR:[`H`,`hB`],SS:[`h`,`hb`,`H`,`hB`],ST:[`H`,`hB`],SV:[`h`,`H`,`hB`,`hb`],SX:[`H`,`h`,`hb`,`hB`],SY:[`h`,`hB`,`hb`,`H`],SZ:[`h`,`hb`,`H`,`hB`],TA:[`H`,`h`,`hb`,`hB`],TC:[`h`,`hb`,`H`,`hB`],TD:[`h`,`H`,`hB`],TF:[`H`,`h`,`hB`],TG:[`H`,`hB`],TH:[`H`,`h`],TJ:[`H`,`h`],TL:[`H`,`hB`,`hb`,`h`],TM:[`H`,`h`],TN:[`h`,`hB`,`hb`,`H`],TO:[`h`,`H`],TR:[`H`,`hB`],TT:[`h`,`hb`,`H`,`hB`],TW:[`hB`,`hb`,`h`,`H`],TZ:[`hB`,`hb`,`H`,`h`],UA:[`H`,`hB`,`h`],UG:[`hB`,`hb`,`H`,`h`],UM:[`h`,`hb`,`H`,`hB`],US:[`h`,`hb`,`H`,`hB`],UY:[`h`,`H`,`hB`,`hb`],UZ:[`H`,`hB`,`h`],VA:[`H`,`h`,`hB`],VC:[`h`,`hb`,`H`,`hB`],VE:[`h`,`H`,`hB`,`hb`],VG:[`h`,`hb`,`H`,`hB`],VI:[`h`,`hb`,`H`,`hB`],VN:[`H`,`h`],VU:[`h`,`H`],WF:[`H`,`hB`],WS:[`h`,`H`],XK:[`H`,`hB`,`h`],YE:[`h`,`hB`,`hb`,`H`],YT:[`H`,`hB`],ZA:[`H`,`h`,`hb`,`hB`],ZM:[`h`,`hb`,`H`,`hB`],ZW:[`H`,`h`],"af-ZA":[`H`,`h`,`hB`,`hb`],"ar-001":[`h`,`hB`,`hb`,`H`],"ca-ES":[`H`,`h`,`hB`],"en-001":[`h`,`hb`,`H`,`hB`],"en-HK":[`h`,`hb`,`H`,`hB`],"en-IL":[`H`,`h`,`hb`,`hB`],"en-MY":[`h`,`hb`,`H`,`hB`],"es-BR":[`H`,`h`,`hB`,`hb`],"es-ES":[`H`,`h`,`hB`,`hb`],"es-GQ":[`H`,`h`,`hB`,`hb`],"fr-CA":[`H`,`h`,`hB`],"gl-ES":[`H`,`h`,`hB`],"gu-IN":[`hB`,`hb`,`h`,`H`],"hi-IN":[`hB`,`h`,`H`],"it-CH":[`H`,`h`,`hB`],"it-IT":[`H`,`h`,`hB`],"kn-IN":[`hB`,`h`,`H`],"ku-SY":[`H`,`hB`],"ml-IN":[`hB`,`h`,`H`],"mr-IN":[`hB`,`hb`,`h`,`H`],"pa-IN":[`hB`,`hb`,`h`,`H`],"ta-IN":[`hB`,`h`,`hb`,`H`],"te-IN":[`hB`,`h`,`H`],"zu-ZA":[`H`,`hB`,`hb`,`h`]};function ve(e,t){let n=``;for(let r=0;r<e.length;r++){let i=e.charAt(r);if(i===`j`){let a=0;for(;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;let o=1+(a&1),s=a<2?1:3+(a>>1),c=ye(t);for((c==`H`||c==`k`)&&(s=0);s-->0;)n+=`a`;for(;o-->0;)n=c+n}else n+=i===`J`?`H`:i}return n}function ye(e){let t=e.hourCycle;if(t===void 0){let n=e;t=n.getHourCycles?.()[0]??n.hourCycles?.[0]}if(t)switch(t){case`h24`:return`k`;case`h23`:return`H`;case`h12`:return`h`;case`h11`:return`K`;default:throw Error(`Invalid hourCycle`)}let n=e.language,r;return n!==`root`&&(r=e.maximize().region),(L[`${n}-${r}`]||L[r||``]||L[n||``]||L[`${n}-001`]||L[`001`])[0].charAt(0)}var be=RegExp(`^${I.source}*`),xe=RegExp(`${I.source}*$`);function R(e,t){return{start:e,end:t}}var Se=!!Object.fromEntries,Ce=!!String.prototype.trimStart,we=!!String.prototype.trimEnd,z=Se?Object.fromEntries:function(e){let t={};for(let[n,r]of e)t[n]=r;return t},Te=Ce?function(e){return e.trimStart()}:function(e){return e.replace(be,``)},Ee=we?function(e){return e.trimEnd()}:function(e){return e.replace(xe,``)},B=RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`,`yu`);function De(e,t){return B.lastIndex=t,B.exec(e)[1]??``}function Oe(e){if(e.length===0)return null;let t=1,n=1;for(let r=0;r<e.length;){let i=e.charCodeAt(r);switch(i){case 35:case 39:case 60:case 123:case 125:return null}if(i===10)t++,n=1,r++;else if(n++,i>=55296&&i<=56319&&r+1<e.length){let t=e.charCodeAt(r+1);r+=t>=56320&&t<=57343?2:1}else r++}return{offset:e.length,line:t,column:n}}var ke=class{constructor(e,t={}){this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}parse(){if(this.offset()!==0)throw Error(`parser can only be used once`);if(this.message.length>0){let e=this.message.charCodeAt(0);if(e!==35&&e!==39&&e!==60&&e!==123&&e!==125){let e=Oe(this.message);if(e){let t=this.clonePosition();return this.position=e,{val:[{type:0,value:this.message,location:R(t,this.clonePosition())}],err:null}}}}return this.parseMessage(0,``,!1)}parseMessage(e,t,n){let r=[];for(;!this.isEOF();){let i=this.char();if(i===123){let t=this.parseArgument(e,n);if(t.err)return t;r.push(t.val)}else if(i===125&&e>0)break;else if(i===35&&(t===`plural`||t===`selectordinal`)){let e=this.clonePosition();this.bump(),r.push({type:7,location:R(e,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,R(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&V(this.peek()||0)){let n=this.parseTag(e,t);if(n.err)return n;r.push(n.val)}else{let n=this.parseLiteral(e,t);if(n.err)return n;r.push(n.val)}}return{val:r,err:null}}parseTag(e,t){let n=this.clonePosition();this.bump();let r=this.parseTagName();if(this.bumpSpace(),this.bumpIf(`/>`))return{val:{type:0,value:`<${r}/>`,location:R(n,this.clonePosition())},err:null};if(this.bumpIf(`>`)){let i=this.parseMessage(e+1,t,!0);if(i.err)return i;let a=i.val,o=this.clonePosition();if(this.bumpIf(`</`)){if(this.isEOF()||!V(this.char()))return this.error(23,R(o,this.clonePosition()));let e=this.clonePosition();return r===this.parseTagName()?(this.bumpSpace(),this.bumpIf(`>`)?{val:{type:8,value:r,children:a,location:R(n,this.clonePosition())},err:null}:this.error(23,R(o,this.clonePosition()))):this.error(26,R(e,this.clonePosition()))}return this.error(27,R(n,this.clonePosition()))}return this.error(23,R(n,this.clonePosition()))}parseTagName(){let e=this.offset();for(this.bump();!this.isEOF()&&je(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){let n=this.clonePosition(),r=``;for(;;){let n=this.tryParseQuote(t);if(n){r+=n;continue}let i=this.tryParseUnquoted(e,t);if(i){r+=i;continue}let a=this.tryParseLeftAngleBracket();if(a)r+=a;else break}let i=R(n,this.clonePosition());return{val:{type:0,value:r,location:i},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Ae(this.peek()||0))?(this.bump(),`<`):null}tryParseQuote(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),`'`;case 123:case 60:case 62:case 125:break;case 35:if(e===`plural`||e===`selectordinal`)break;return null;default:return null}this.bump();let t=[this.char()];for(this.bump();!this.isEOF();){let e=this.char();if(e===39){if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}}else t.push(e);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;let n=this.char();return n===60||n===123||n===35&&(t===`plural`||t===`selectordinal`)||n===125&&e>0?null:(this.bump(),String.fromCodePoint(n))}parseArgument(e,t){let n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,R(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,R(n,this.clonePosition()));let r=this.parseIdentifierIfPossible().value;if(!r)return this.error(3,R(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,R(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:r,location:R(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,R(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(3,R(n,this.clonePosition()))}}parseIdentifierIfPossible(){let e=this.clonePosition(),t=this.offset(),n=De(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:R(e,this.clonePosition())}}parseArgumentOptions(e,t,n,r){let i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(a){case``:return this.error(4,R(i,o));case`number`:case`date`:case`time`:{this.bumpSpace();let e=null;if(this.bumpIf(`,`)){this.bumpSpace();let t=this.clonePosition(),n=this.parseSimpleArgStyleIfPossible();if(n.err)return n;let r=Ee(n.val);if(r.length===0)return this.error(6,R(this.clonePosition(),this.clonePosition()));e={style:r,styleLocation:R(t,this.clonePosition())}}let t=this.tryParseArgumentClose(r);if(t.err)return t;let i=R(r,this.clonePosition());if(e&&e.style.startsWith(`::`)){let t=Te(e.style.slice(2));if(a===`number`){let r=this.parseNumberSkeletonFromString(t,e.styleLocation);return r.err?r:{val:{type:2,value:n,location:i,style:r.val},err:null}}{if(t.length===0)return this.error(10,i);let r=t;this.locale&&(r=ve(t,this.locale));let o={type:1,pattern:r,location:e.styleLocation,parsedOptions:this.shouldParseSkeletons?ce(r):{}};return{val:{type:a===`date`?3:4,value:n,location:i,style:o},err:null}}}return{val:{type:a===`number`?2:a===`date`?3:4,value:n,location:i,style:e?.style??null},err:null}}case`plural`:case`selectordinal`:case`select`:{let i=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(`,`))return this.error(12,R(i,{...i}));this.bumpSpace();let o=this.parseIdentifierIfPossible(),s=0;if(a!==`select`&&o.value===`offset`){if(!this.bumpIf(`:`))return this.error(13,R(this.clonePosition(),this.clonePosition()));this.bumpSpace();let e=this.tryParseDecimalInteger(13,14);if(e.err)return e;this.bumpSpace(),o=this.parseIdentifierIfPossible(),s=e.val}let c=this.tryParsePluralOrSelectOptions(e,a,t,o);if(c.err)return c;let l=this.tryParseArgumentClose(r);if(l.err)return l;let u=R(r,this.clonePosition());return a===`select`?{val:{type:5,value:n,options:z(c.val),location:u},err:null}:{val:{type:6,value:n,options:z(c.val),offset:s,pluralType:a===`plural`?`cardinal`:`ordinal`,location:u},err:null}}default:return this.error(5,R(i,o))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,R(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0,t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let e=this.clonePosition();if(!this.bumpUntil(`'`))return this.error(11,R(e,this.clonePosition()));this.bump();break}case 123:e+=1,this.bump();break;case 125:if(e>0)--e;else return{val:this.message.slice(t.offset,this.offset()),err:null};break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}}parseNumberSkeletonFromString(e,t){let n=[];try{n=ue(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?me(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,r){let i=!1,a=[],o=new Set,{value:s,location:c}=r;for(;;){if(s.length===0){let e=this.clonePosition();if(t!==`select`&&this.bumpIf(`=`)){let t=this.tryParseDecimalInteger(16,19);if(t.err)return t;c=R(e,this.clonePosition()),s=this.message.slice(e.offset,this.offset())}else break}if(o.has(s))return this.error(t===`select`?21:20,c);s===`other`&&(i=!0),this.bumpSpace();let r=this.clonePosition();if(!this.bumpIf(`{`))return this.error(t===`select`?17:18,R(this.clonePosition(),this.clonePosition()));let l=this.parseMessage(e+1,t,n);if(l.err)return l;let u=this.tryParseArgumentClose(r);if(u.err)return u;a.push([s,{value:l.val,location:R(r,this.clonePosition())}]),o.add(s),this.bumpSpace(),{value:s,location:c}=this.parseIdentifierIfPossible()}return a.length===0?this.error(t===`select`?15:16,R(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(22,R(this.clonePosition(),this.clonePosition())):{val:a,err:null}}tryParseDecimalInteger(e,t){let n=1,r=this.clonePosition();this.bumpIf(`+`)||this.bumpIf(`-`)&&(n=-1);let i=!1,a=0;for(;!this.isEOF();){let e=this.char();if(e>=48&&e<=57)i=!0,a=a*10+(e-48),this.bump();else break}let o=R(r,this.clonePosition());return i?(a*=n,Number.isSafeInteger(a)?{val:a,err:null}:this.error(t,o)):this.error(e,o)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let e=this.position.offset;if(e>=this.message.length)throw Error(`out of bound`);let t=this.message.codePointAt(e);if(t===void 0)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;let e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}bumpIf(e){if(this.message.startsWith(e,this.offset())){for(let t=0;t<e.length;t++)this.bump();return!0}return!1}bumpUntil(e){let t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){let t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&Me(this.char());)this.bump()}peek(){if(this.isEOF())return null;let e=this.char(),t=this.offset();return this.message.charCodeAt(t+(e>=65536?2:1))??null}};function V(e){return e>=97&&e<=122||e>=65&&e<=90}function Ae(e){return V(e)||e===47}function je(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Me(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function H(e){e.forEach(e=>{if(delete e.location,j(e)||M(e))for(let t in e.options)delete e.options[t].location,H(e.options[t].value);else O(e)&&P(e.style)||(k(e)||A(e))&&F(e.style)?delete e.style.location:N(e)&&H(e.children)})}function Ne(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};let n=new ke(e,t).parse();if(n.err){let e=SyntaxError(he[n.err.kind]);throw e.location=n.err.location,e.originalMessage=n.err.message,e}return t?.captureLocation||H(n.val),n.val}var U=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},W=class extends U{constructor(e,t,n,r){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join(`", "`)}"`,`INVALID_VALUE`,r)}},Pe=class extends U{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,`INVALID_VALUE`,n)}},Fe=class extends U{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,`MISSING_VALUE`,t)}};function Ie(e){return e.length<2?e:e.reduce((e,t)=>{let n=e[e.length-1];return!n||n.type!==0||t.type!==0?e.push(t):n.value+=t.value,e},[])}function Le(e){return typeof e==`function`}function G(e,t,n,r,i,a,o){if(e.length===1&&D(e[0]))return[{type:0,value:e[0].value}];let s=[];for(let c of e){if(D(c)){s.push({type:0,value:c.value});continue}if(_e(c)){typeof a==`number`&&s.push({type:0,value:n.getNumberFormat(t).format(a)});continue}let{value:e}=c;if(!(i&&e in i))throw new Fe(e,o);let l=i[e];if(ge(c))(!l||typeof l==`string`||typeof l==`number`||typeof l==`bigint`)&&(l=typeof l==`string`||typeof l==`number`||typeof l==`bigint`?String(l):``),s.push({type:typeof l==`string`?0:1,value:l});else if(k(c)){let e=typeof c.style==`string`?r.date[c.style]:F(c.style)?c.style.parsedOptions:void 0;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)})}else if(A(c)){let e=typeof c.style==`string`?r.time[c.style]:F(c.style)?c.style.parsedOptions:r.time.medium;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)})}else if(O(c)){let e=typeof c.style==`string`?r.number[c.style]:P(c.style)?c.style.parsedOptions:void 0;if(e&&e.scale){let t=e.scale||1;if(typeof l==`bigint`){if(!Number.isInteger(t))throw TypeError(`Cannot apply fractional scale ${t} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(t)}else l*=t}s.push({type:0,value:n.getNumberFormat(t,e).format(l)})}else{if(N(c)){let{children:e,value:l}=c,u=i[l];if(!Le(u))throw new Pe(l,`function`,o);let d=u(G(e,t,n,r,i,a).map(e=>e.value));Array.isArray(d)||(d=[d]),s.push(...d.map(e=>({type:typeof e==`string`?0:1,value:e})))}if(j(c)){let e=l,a=(Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0)||c.options.other;if(!a)throw new W(c.value,l,Object.keys(c.options),o);s.push(...G(a.value,t,n,r,i))}else if(M(c)){let e=`=${l}`,a=Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0;if(!a){if(!Intl.PluralRules)throw new U(`Intl.PluralRules is not available in this environment.
2
2
  Try polyfilling it using "@formatjs/intl-pluralrules"
3
3
  `,`MISSING_INTL_API`,o);let e=typeof l==`bigint`?Number(l):l,r=n.getPluralRules(t,{type:c.pluralType}).select(e-(c.offset||0));a=(Object.prototype.hasOwnProperty.call(c.options,r)?c.options[r]:void 0)||c.options.other}if(!a)throw new W(c.value,l,Object.keys(c.options),o);let u=typeof l==`bigint`?Number(l):l;s.push(...G(a.value,t,n,r,i,u-(c.offset||0)))}}}return Ie(s)}function Re(e,t){return t?{...e,...t,...Object.keys(e).reduce((n,r)=>(n[r]={...e[r],...t[r]},n),{})}:e}function ze(e,t){return t?Object.keys(e).reduce((n,r)=>(n[r]=Re(e[r],t[r]),n),{...e}):e}function K(e){return{create(){return{get(t){return e[t]},set(t,n){e[t]=n}}}}}function Be(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:h((...e)=>new Intl.NumberFormat(...e),{cache:K(e.number),strategy:b.variadic}),getDateTimeFormat:h((...e)=>new Intl.DateTimeFormat(...e),{cache:K(e.dateTime),strategy:b.variadic}),getPluralRules:h((...e)=>new Intl.PluralRules(...e),{cache:K(e.pluralRules),strategy:b.variadic})}}var Ve=class e{constructor(t,n=e.defaultLocale,r,i){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=e=>{let t=this.formatToParts(e);if(t.length===1)return t[0].value;let n=t.reduce((e,t)=>(!e.length||t.type!==0||typeof e[e.length-1]!=`string`?e.push(t.value):e[e.length-1]+=t.value,e),[]);return n.length<=1?n[0]||``:n},this.formatToParts=e=>G(this.ast,this.locales,this.formatters,this.formats,e,void 0,this.message),this.resolvedOptions=()=>({locale:this.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}),this.getAst=()=>this.ast,this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t==`string`){if(this.message=t,!e.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");let{...n}=i||{};this.ast=e.__parse(t,{...n,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw TypeError(`A message must be provided as a String or AST.`);this.formats=ze(e.formats,r),this.formatters=i&&i.formatters||Be(this.formatterCache)}static{this.memoizedDefaultLocale=null}static get defaultLocale(){return e.memoizedDefaultLocale||=new Intl.NumberFormat().resolvedOptions().locale,e.memoizedDefaultLocale}static{this.resolveLocale=e=>{if(Intl.Locale===void 0)return;let t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale(typeof e==`string`?e:e[0])}}static{this.__parse=Ne}static{this.formats={number:{integer:{maximumFractionDigits:0},currency:{style:`currency`},percent:{style:`percent`}},date:{short:{month:`numeric`,day:`numeric`,year:`2-digit`},medium:{month:`short`,day:`numeric`,year:`numeric`},long:{month:`long`,day:`numeric`,year:`numeric`},full:{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`}},time:{short:{hour:`numeric`,minute:`numeric`},medium:{hour:`numeric`,minute:`numeric`,second:`numeric`},long:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`},full:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`}}}}},q={"@theorem.agent.handle":{defaultMessage:`@{handle}`,description:`The agent's name above its messages, on the landing and in captions.`,params:[`handle`]},"@theorem.chat.greeting":{defaultMessage:`What are we working on?`,description:`Chat landing heading, before the first message.`},"@theorem.chat.loading":{defaultMessage:`Loading…`,description:`Spinner label while the profile loads.`},"@theorem.chat.live_unsupported.title":{defaultMessage:`Live profiles aren't supported here`,description:`Shown when TheoremChat is pointed at a live profile.`},"@theorem.chat.live_unsupported.description":{defaultMessage:`Use LiveRunner from @theoremjs/react/live.`,description:`Where to go instead, under the live-profile warning.`},"@theorem.composer.placeholder":{defaultMessage:`Message @{handle}`,description:`Empty composer placeholder.`,params:[`handle`]},"@theorem.composer.listening":{defaultMessage:`Listening…`,description:`Composer placeholder while a voice note records.`},"@theorem.composer.attach":{defaultMessage:`Attach files`,description:`Paperclip button.`},"@theorem.composer.record":{defaultMessage:`Record voice`,description:`Microphone button, idle.`},"@theorem.composer.stop_recording":{defaultMessage:`Stop recording`,description:`Microphone button, recording.`},"@theorem.composer.send_options":{defaultMessage:`More send options`,description:`Menu button beside send.`},"@theorem.composer.menu.queue":{defaultMessage:`Queue`,description:`Send menu item.`},"@theorem.composer.menu.queue.description":{defaultMessage:`Send it once this reply finishes.`,description:`Send menu item detail: the message waits its turn.`},"@theorem.composer.menu.steer":{defaultMessage:`Steer this reply`,description:`Send menu item.`},"@theorem.composer.menu.steer.description":{defaultMessage:`Add it to the reply in progress. The agent reads it at its next step.`,description:`Send menu item detail: the message joins the running reply instead of waiting.`},"@theorem.composer.menu.send_now":{defaultMessage:`Send now`,description:`Send menu item.`},"@theorem.composer.menu.send_now.description":{defaultMessage:`Stop this reply and send it instead.`,description:`Send menu item detail: ends the running reply (or its wait for approval), then sends.`},"@theorem.composer.menu.stash":{defaultMessage:`Stash`,description:`Send menu item.`},"@theorem.composer.menu.stash.description":{defaultMessage:`Set it aside to send later.`,description:`Send menu item detail: the message waits in the composer until sent.`},"@theorem.composer.hint.stash-selected-draft.message":{defaultMessage:`Replacing this?`,description:`Hint when the whole draft is selected and could be stashed.`},"@theorem.composer.hint.stash-selected-draft.action":{defaultMessage:`Stash it`,description:`The hint's button.`},"@theorem.composer.drawer.steer":{defaultMessage:`steering`,description:`Drawer header when only steering messages wait.`},"@theorem.composer.drawer.queue":{defaultMessage:`queued`,description:`Drawer header when only queued messages wait.`},"@theorem.composer.drawer.stash":{defaultMessage:`stashed`,description:`Drawer header when only stashed messages wait.`},"@theorem.composer.drawer.attached":{defaultMessage:`attached`,description:`Drawer header when only files wait.`},"@theorem.composer.drawer.steer.count":{defaultMessage:`{n} steering`,description:`One part of a mixed drawer header.`,params:[`n`]},"@theorem.composer.drawer.queue.count":{defaultMessage:`{n} queued`,description:`One part of a mixed drawer header.`,params:[`n`]},"@theorem.composer.drawer.stash.count":{defaultMessage:`{n} stashed`,description:`One part of a mixed drawer header.`,params:[`n`]},"@theorem.composer.drawer.attached.count":{defaultMessage:`{n} attached`,description:`One part of a mixed drawer header.`,params:[`n`]},"@theorem.composer.drawer.separator":{defaultMessage:` · `,description:`Between the parts of a mixed drawer header.`},"@theorem.composer.pending.steer":{defaultMessage:`Steering`,description:`Name of a waiting steering message, read by screen readers on its icon.`},"@theorem.composer.pending.steer.description":{defaultMessage:`Steering: the agent reads it at its next step.`,description:`Tooltip on a waiting steering message.`},"@theorem.composer.pending.queue":{defaultMessage:`Queued`,description:`Name of a waiting queued message, read by screen readers on its icon.`},"@theorem.composer.pending.queue.description":{defaultMessage:`Queued: it sends once this reply finishes.`,description:`Tooltip on a waiting queued message.`},"@theorem.composer.pending.stash":{defaultMessage:`Stashed`,description:`Name of a waiting stashed message, read by screen readers on its icon.`},"@theorem.composer.pending.stash.description":{defaultMessage:`Stashed: it waits here until you send it.`,description:`Tooltip on a waiting stashed message.`},"@theorem.composer.pending.edit":{defaultMessage:`Edit`,description:`Waiting message: back into the composer.`},"@theorem.composer.pending.queue_action":{defaultMessage:`Queue`,description:`Stashed message: queue it.`},"@theorem.composer.pending.send_now":{defaultMessage:`Send now`,description:`Waiting message: send it now.`},"@theorem.composer.pending.move_up":{defaultMessage:`Move up`,description:`Waiting message: earlier.`},"@theorem.composer.pending.move_down":{defaultMessage:`Move down`,description:`Waiting message: later.`},"@theorem.composer.pending.remove":{defaultMessage:`Remove`,description:`Waiting message: discard.`},"@theorem.transcript.copy":{defaultMessage:`Copy`,description:`Copy a message.`},"@theorem.transcript.copied":{defaultMessage:`Copied`,description:`Right after copying a message.`},"@theorem.transcript.now":{defaultMessage:`now`,description:`Message time during its first minute.`},"@theorem.transcript.failed":{defaultMessage:`failed`,description:`Message status: the turn failed. The reason shows on hover.`},"@theorem.transcript.generated_image":{defaultMessage:`Generated image`,description:`Alt text for a generated image.`},"@theorem.transcript.generated_video":{defaultMessage:`Generated video`,description:`Alt text for a generated video.`},"@theorem.transcript.open_generated_image":{defaultMessage:`Open generated image`,description:`Opens the image full size.`},"@theorem.transcript.generating_image":{defaultMessage:`Generating image`,description:`Placeholder while an image generates.`},"@theorem.transcript.sources":{defaultMessage:`Sources`,description:`The row of source chips (screen readers).`},"@theorem.transcript.sources_more":{defaultMessage:`{count, plural, one {+# other} other {+# others}}`,description:`Overflow chip that opens the menu of remaining source citations.`,params:[`count`]},"@theorem.transcript.tool_input":{defaultMessage:`Input`,description:`A tool call's arguments, in its detail.`},"@theorem.transcript.tool_input_edited":{defaultMessage:`Input (edited)`,description:`A tool call's arguments after the user edited them on approval.`},"@theorem.transcript.tool_steps":{defaultMessage:`Calls`,description:`The calls the agent an agent tool ran made, in its detail.`},"@theorem.transcript.tool_output":{defaultMessage:`Output`,description:`A tool call's result, in its detail.`},"@theorem.transcript.tool_error":{defaultMessage:`Error`,description:`A failed tool call's failure, in its detail.`},"@theorem.transcript.tokens":{defaultMessage:`{count, plural, one {# token} other {# tokens}}`,description:`Tokens a reply used, under it, or an agent tool's called agent used, on its call row.`,params:[`count`]},"@theorem.data.shaped":{defaultMessage:`Data`,description:`Tool data drawn as fields, sections, and tables.`},"@theorem.data.json":{defaultMessage:`JSON`,description:`Tool data as its raw JSON.`},"@theorem.data.item":{defaultMessage:`Item {index}`,description:`A list row with no name of its own.`,params:[`index`]},"@theorem.data.none":{defaultMessage:`Empty`,description:`An empty list or object in tool data.`},"@theorem.data.yes":{defaultMessage:`Yes`,description:`A true value in tool data.`},"@theorem.data.no":{defaultMessage:`No`,description:`A false value in tool data.`},"@theorem.data.more":{defaultMessage:`{count} more — switch to JSON to see them`,description:`Rows past the shown ones, left to the JSON view.`,params:[`count`]},"@theorem.data.image":{defaultMessage:`Image {index}`,description:`An image in tool data, named by its place among the images and videos.`,params:[`index`]},"@theorem.data.video":{defaultMessage:`Video {index}`,description:`A video in tool data, named by its place among the images and videos.`,params:[`index`]},"@theorem.data.large":{defaultMessage:`Too large to lay out — showing the first {size} of its JSON`,description:`A payload too big to draw by its shape, shown as the start of its JSON.`,params:[`size`]},"@theorem.transcript.copy_text.tool":{defaultMessage:`Tool: {name}`,description:`A tool call in copied message text.`,params:[`name`]},"@theorem.transcript.copy_text.media":{defaultMessage:`[{mimeType} media]`,description:`Media without a link, in copied message text.`,params:[`mimeType`]},"@theorem.transcript.working":{defaultMessage:`Working…`,description:`Turn status while running, start unknown.`},"@theorem.transcript.working_for":{defaultMessage:`Working for {duration}`,description:`Turn status while running.`,params:[`duration`]},"@theorem.transcript.worked":{defaultMessage:`Worked`,description:`Turn status once done, duration unknown.`},"@theorem.transcript.worked_for":{defaultMessage:`Worked for {duration}`,description:`Turn status once done.`,params:[`duration`]},"@theorem.duration.milliseconds":{defaultMessage:`{ms}ms`,description:`Under a second.`,params:[`ms`]},"@theorem.duration.belowTenth":{defaultMessage:`<0.1ms`,description:`Above zero but under a tenth of a millisecond, such as a quick guardrail check.`},"@theorem.duration.seconds":{defaultMessage:`{seconds}s`,description:`Under a minute.`,params:[`seconds`]},"@theorem.duration.minutes":{defaultMessage:`{minutes}m`,description:`Whole minutes.`,params:[`minutes`]},"@theorem.duration.minutes_seconds":{defaultMessage:`{minutes}m {seconds}s`,description:`Minutes and seconds.`,params:[`minutes`,`seconds`]},"@theorem.gate.approval.title":{defaultMessage:`{agent} wants to {request}`,description:`Approval card heading. {agent} is the agent's handle; {request} is what the call would do, e.g. 'check the weather'.`,params:[`agent`,`request`]},"@theorem.gate.approval.title_no_agent":{defaultMessage:`The agent wants to {request}`,description:`Approval card heading when the host names no agent.`,params:[`request`]},"@theorem.gate.approval.use_tool":{defaultMessage:`use {tool}`,description:`The {request} in the heading when the tool sets no labels.request. {tool} is the tool's name in words.`,params:[`tool`]},"@theorem.gate.approval.input":{defaultMessage:`Details`,description:`Expands the arguments the tool would run with.`},"@theorem.gate.approval.deny":{defaultMessage:`Reject`,description:`Approval card button.`},"@theorem.gate.approval.approve":{defaultMessage:`Approve`,description:`Approval card button.`},"@theorem.gate.tag.bearer":{defaultMessage:`bearer`,description:`Credential type tag.`},"@theorem.gate.tag.api_key":{defaultMessage:`api_key`,description:`Credential type tag.`},"@theorem.gate.tag.oauth2":{defaultMessage:`oauth2`,description:`Credential type tag.`},"@theorem.gate.auth.title":{defaultMessage:`Sign in to use {tool}`,description:`Credential card heading. {tool} is the tool's name in words.`,params:[`tool`]},"@theorem.gate.auth.resource":{defaultMessage:`Resource: {resource}`,description:`What the credential is for.`,params:[`resource`]},"@theorem.gate.auth.no_oauth":{defaultMessage:`No OAuth authorization endpoint is configured.`,description:`OAuth tool without an authorization URL.`},"@theorem.gate.auth.authorize":{defaultMessage:`Authorize with provider`,description:`Opens the OAuth sign-in.`},"@theorem.gate.auth.provided":{defaultMessage:`Credential provided for {slot}`,description:`After submitting a credential or finishing an OAuth sign-in.`,params:[`slot`]},"@theorem.gate.auth.api_key":{defaultMessage:`API key`,description:`Secret field label, API-key tools.`},"@theorem.gate.auth.bearer":{defaultMessage:`Bearer token`,description:`Secret field label, bearer tools.`},"@theorem.gate.auth.secret_placeholder":{defaultMessage:`Secret for slot ''{slot}''`,description:`Secret field placeholder.`,params:[`slot`]},"@theorem.gate.auth.secret_note":{defaultMessage:` `,description:`Under the secret field: how the host handles the credential. Blank by default, since only the host knows; the studio says it is used for one call.`},"@theorem.gate.auth.submit":{defaultMessage:`Submit & continue`,description:`Sends the credential.`},"@theorem.voice_note.name":{defaultMessage:`voice.{format}`,description:`A voice note's name, by audio format (webm, wav, mp3, m4a, ogg).`,params:[`format`]},"@theorem.voice_note.unnamed":{defaultMessage:`voice note`,description:`A voice note's name when its format is unknown.`},"@theorem.voice_note.play":{defaultMessage:`Play {name}`,description:`Voice note, paused.`,params:[`name`]},"@theorem.voice_note.pause":{defaultMessage:`Pause {name}`,description:`Voice note, playing.`,params:[`name`]},"@theorem.voice_note.remove":{defaultMessage:`Remove {name}`,description:`Unstages a voice note.`,params:[`name`]},"@theorem.decision.state":{defaultMessage:`State`,description:`The JSON a decision is asked about (field label).`},"@theorem.decision.state_size":{defaultMessage:`{size} of {limit}`,description:`The state's size against the profile's limit, under the field.`,params:[`size`,`limit`]},"@theorem.decision.fields":{defaultMessage:`Fields`,description:`The state edited field by field.`},"@theorem.decision.add_item":{defaultMessage:`Add to {field}`,description:`Adds a row to a list in the state.`,params:[`field`]},"@theorem.decision.remove_item":{defaultMessage:`Remove {item}`,description:`Removes a row from a list in the state.`,params:[`item`]},"@theorem.decision.add_value":{defaultMessage:`Add a value`,description:`A list of words in the state, while it is empty.`},"@theorem.decision.send_null":{defaultMessage:`Send null`,description:`Sends the JSON null for a field that takes it, instead of leaving the field out.`},"@theorem.decision.shape":{defaultMessage:`Kind`,description:`Picks which of its shapes a request takes, for a tool whose input is one of several.`},"@theorem.decision.invalid_json":{defaultMessage:`Not valid JSON yet`,description:`The state doesn't parse.`},"@theorem.decision.null_state":{defaultMessage:`State can’t be null`,description:`The state is the JSON null.`},"@theorem.decision.too_large":{defaultMessage:`Over the {limit} limit`,description:`The state is larger than the profile's limit.`,params:[`limit`]},"@theorem.decision.answers":{defaultMessage:`Answers`,description:`The decision response column.`},"@theorem.decision.decide":{defaultMessage:`Decide`,description:`Asks the questions about the state.`},"@theorem.decision.deciding":{defaultMessage:`Deciding…`,description:`The decide button while it runs.`},"@theorem.decision.stop":{defaultMessage:`Stop`,description:`Cancels the running decision.`},"@theorem.decision.confidence":{defaultMessage:`{percent} sure`,description:`How sure the model is of a choice, score or box; percent is formatted, e.g. '92%'.`,params:[`percent`]},"@theorem.decision.option":{defaultMessage:`{label}, {percent}`,description:`One option and its probability (screen readers); percent is formatted.`,params:[`label`,`percent`]},"@theorem.decision.score_of":{defaultMessage:`{score} of {max}`,description:`A score on its scale from 0, e.g. 1.4 of 3.`,params:[`score`,`max`]},"@theorem.decision.type.choice":{defaultMessage:`Choice`,description:`A question that picks one label.`},"@theorem.decision.type.score":{defaultMessage:`Score`,description:`A question that places the state on a scale.`},"@theorem.decision.type.noul":{defaultMessage:`Noul`,description:`A question answered with one number.`},"@theorem.decision.type.box":{defaultMessage:`Box`,description:`A question answered with one box in an image.`},"@theorem.decision.box_edges":{defaultMessage:`Left {left}, top {top}, right {right}, bottom {bottom}`,description:`Where a box sits in its image, each edge as a share of the image from its top-left corner.`,params:[`left`,`top`,`right`,`bottom`]},"@theorem.decision.add_image":{defaultMessage:`Add an image`,description:`The drop area under the state: each image dropped or chosen becomes a state field.`},"@theorem.decision.add_image_hint":{defaultMessage:`Drop a PNG or JPEG, or choose one. It becomes a field the questions can name.`,description:`What the drop area under the state says it does.`},"@theorem.decision.replace_image":{defaultMessage:`Replace`,description:`An image field's file input, which swaps in another PNG or JPEG.`},"@theorem.decision.image_bad":{defaultMessage:`{file} is not a PNG or JPEG.`,description:`A file attached as an image that is neither.`,params:[`file`]},"@theorem.decision.edit_question":{defaultMessage:`Edit {question}`,description:`The button on an answer that opens its question where it is set up. The page shows it only when it can.`,params:[`question`]},"@theorem.decision.box_in":{defaultMessage:`The box, cut from the image`,description:`The alt text of the part of the image a box answer covers.`},"@theorem.decision.open_box":{defaultMessage:`See the box in the whole image`,description:`The cut-out box on an answer, which opens the whole image with the box outlined.`},"@theorem.decision.box_marked":{defaultMessage:`The whole image, the box outlined and the rest shaded`,description:`The alt text of the whole image a box answer opens.`},"@theorem.decision.tokens":{defaultMessage:`{count, plural, one {# token} other {# tokens}}`,description:`Input tokens the decision used, in the line under the answers.`,params:[`count`]},"@theorem.embedding.documents":{defaultMessage:`Documents`,description:`What a search looks through: the texts and files to embed (card title).`},"@theorem.embedding.document":{defaultMessage:`Document {number}`,description:`One document, by its place in the list.`,params:[`number`]},"@theorem.embedding.text":{defaultMessage:`Text`,description:`Text to split into documents (field label).`},"@theorem.embedding.text_placeholder":{defaultMessage:`Paste text to search through`,description:`The empty text field on the documents card.`},"@theorem.embedding.split":{defaultMessage:`Split by`,description:`Where the text is cut into documents (field label).`},"@theorem.embedding.split_whole":{defaultMessage:`Nothing: one document`,description:`The text is one document.`},"@theorem.embedding.split_lines":{defaultMessage:`Lines`,description:`Each line of the text is a document.`},"@theorem.embedding.split_paragraphs":{defaultMessage:`Paragraphs`,description:`Each run of text between blank lines is a document.`},"@theorem.embedding.split_commas":{defaultMessage:`Commas`,description:`Each piece of the text between commas is a document.`},"@theorem.embedding.split_custom":{defaultMessage:`A separator you type`,description:`The text is cut wherever a separator of the user’s own appears.`},"@theorem.embedding.separator":{defaultMessage:`Separator`,description:`The text the documents are cut at (field label).`},"@theorem.embedding.files":{defaultMessage:`Files`,description:`Adds files as documents (field label).`},"@theorem.embedding.drop_files":{defaultMessage:`Drop files here, or click to upload`,description:`The file field's prompt.`},"@theorem.embedding.unreadable":{defaultMessage:`{name} couldn't be read.`,description:`A chosen file the browser could not read.`,params:[`name`]},"@theorem.embedding.remove":{defaultMessage:`Remove {name}`,description:`Takes a document off the list.`,params:[`name`]},"@theorem.embedding.from_file":{defaultMessage:`From {name}`,description:`A document that is a piece of a text file, under its text.`,params:[`name`]},"@theorem.embedding.from_json":{defaultMessage:`From the JSON`,description:`The documents of a pasted list, as a group.`},"@theorem.embedding.group":{defaultMessage:`{source} · {count, plural, one {# document} other {# documents}}`,description:`A group of documents from one source, above its first few.`,params:[`source`,`count`]},"@theorem.embedding.held_file":{defaultMessage:`Held by the provider`,description:`A file the provider already holds, referred to by address, beside its type.`},"@theorem.embedding.more":{defaultMessage:`{count, plural, one {# more document} other {# more documents}}`,description:`Documents past the ones the list shows.`,params:[`count`]},"@theorem.embedding.invalid_json":{defaultMessage:`Not a list of documents: each is text, or an object with parts.`,description:`The documents' JSON doesn't read as the inputs an embedding takes.`},"@theorem.embedding.no_documents":{defaultMessage:`Add text or files to search through.`,description:`There are no documents yet.`},"@theorem.embedding.empty":{defaultMessage:`{name} is empty.`,description:`A document or the query has no text and no file.`,params:[`name`]},"@theorem.embedding.text_off":{defaultMessage:`{name} has text, and this profile embeds files only.`,description:`A document or the query has text the profile does not take.`,params:[`name`]},"@theorem.embedding.too_many":{defaultMessage:`One request takes at most {max} documents.`,description:`A request holds more inputs than the profile's model takes in one call.`,params:[`max`]},"@theorem.embedding.ready":{defaultMessage:`{count, plural, one {# document} other {# documents}} in {requests, plural, one {# request} other {# requests}}`,description:`The documents are ready: how many, and how many requests the profile’s limits make them.`,params:[`count`,`requests`]},"@theorem.embedding.index":{defaultMessage:`Index`,description:`Embeds the documents so they can be searched.`},"@theorem.embedding.indexing":{defaultMessage:`Indexing…`,description:`The index button while the documents are embedded.`},"@theorem.embedding.indexing_progress":{defaultMessage:`Indexing {done}/{total}…`,description:`The pane while the documents are embedded: the request in flight, of all of them.`,params:[`done`,`total`]},"@theorem.embedding.stop":{defaultMessage:`Stop`,description:`Cancels the running index or search.`},"@theorem.embedding.query":{defaultMessage:`Query`,description:`What to search the documents for (card title).`},"@theorem.embedding.query_placeholder":{defaultMessage:`What to search for`,description:`The empty query field.`},"@theorem.embedding.query_file":{defaultMessage:`Search with a file`,description:`Adds a file to the query, such as an image to find documents like it.`},"@theorem.embedding.query_invalid_json":{defaultMessage:`Not a query: text, or an object with parts.`,description:`The query's JSON doesn't read as one embedding input.`},"@theorem.embedding.stale":{defaultMessage:`The documents changed. Index them again.`,description:`The documents differ from the ones last embedded.`},"@theorem.embedding.remodelled":{defaultMessage:`The model changed. Index the documents again.`,description:`The last query came from another model than the one the documents were embedded with.`},"@theorem.embedding.search":{defaultMessage:`Search`,description:`Embeds the query and ranks the documents by it.`},"@theorem.embedding.searching":{defaultMessage:`Searching…`,description:`The search button while the query is embedded.`},"@theorem.embedding.results":{defaultMessage:`Results`,description:`The index and the matches (heading).`},"@theorem.embedding.indexed":{defaultMessage:`{count, plural, one {# document} other {# documents}}`,description:`How many documents the index holds, its card’s figure.`,params:[`count`]},"@theorem.embedding.view":{defaultMessage:`View`,description:`Switches the index card between the space and the list of vectors.`},"@theorem.embedding.space":{defaultMessage:`Space`,description:`The index drawn in three dimensions, alike documents together.`},"@theorem.embedding.list":{defaultMessage:`List`,description:`The index as a list of documents and their vectors.`},"@theorem.embedding.space_label":{defaultMessage:`{count, plural, one {# document} other {# documents}} drawn in three dimensions by where their vectors differ most: each document is joined to the one most like it when that pair is far more alike than the typical pair in this index, heavier the more alike, documents the lines connect share a colour, and three circles mark the planes of the axes.`,description:`What the space shows, for screen readers.`,params:[`count`]},"@theorem.embedding.space_query":{defaultMessage:`The query lands among its matches, with a line to each match far more alike than its typical document.`,description:`What the space shows after a search, for screen readers.`},"@theorem.embedding.space_off":{defaultMessage:`This browser can’t draw the space, so the vectors are listed.`,description:`WebGL2 is unavailable, so the index card shows the list.`},"@theorem.embedding.copy_vector":{defaultMessage:`Copy vector`,description:`Copies one document's vector as JSON.`},"@theorem.embedding.copy_vectors":{defaultMessage:`Copy all`,description:`Copies every vector in the index as JSON, in document order.`},"@theorem.embedding.copied":{defaultMessage:`Copied`,description:`Right after copying a vector.`},"@theorem.embedding.width":{defaultMessage:`{dimensions, plural, one {# dimension} other {# dimensions}}`,description:`How wide a vector is, after its first values in the list.`,params:[`dimensions`]},"@theorem.embedding.matches":{defaultMessage:`Matches`,description:`The documents most like the query, best first (card title).`},"@theorem.embedding.matches_shown":{defaultMessage:`Top {shown} of {count}`,description:`The matches card lists the best documents only.`,params:[`shown`,`count`]},"@theorem.embedding.best":{defaultMessage:`Best: {name}`,description:`The document most like the query, under the matches figure.`,params:[`name`]},"@theorem.embedding.no_matches":{defaultMessage:`No document has a vector as wide as the query’s.`,description:`The query and the documents were embedded by models of different widths.`},"@theorem.embedding.tokens":{defaultMessage:`{count, plural, one {# token} other {# tokens}}`,description:`Input tokens a call used, in the line under the results.`,params:[`count`]},"@theorem.host.tool":{defaultMessage:`Tool`,description:`Picks which of the host’s tools to call (field label).`},"@theorem.host.request":{defaultMessage:`Request`,description:`The input a tool call sends (card heading).`},"@theorem.host.response":{defaultMessage:`Response`,description:`What a tool call returned (section heading).`},"@theorem.host.run":{defaultMessage:`Run`,description:`Calls the tool with the request.`},"@theorem.host.image":{defaultMessage:`Image the tool returned`,description:`Alt text for an image a tool returned beside its output.`},"@theorem.host.running":{defaultMessage:`Running…`,description:`The run button while the call runs.`},"@theorem.host.stop":{defaultMessage:`Stop`,description:`Cancels the running call.`},"@theorem.host.missing":{defaultMessage:`Needs {fields}`,description:`Required fields the request is still missing, under the form.`,params:[`fields`]},"@theorem.host.shortcut":{defaultMessage:`⌘↵ to run`,description:`The keyboard shortcut that runs the call, under the form.`},"@theorem.host.no_tools":{defaultMessage:`This host has no tools yet`,description:`A host profile that allows no tools.`},"@theorem.host.earlier":{defaultMessage:`Earlier calls`,description:`Heading over this page’s previous tool calls.`},"@theorem.host.kind.function":{defaultMessage:`Function`,description:`A tool that runs a function on the host.`},"@theorem.host.kind.http":{defaultMessage:`HTTP`,description:`A tool that calls an HTTP endpoint.`},"@theorem.host.kind.mcp":{defaultMessage:`MCP`,description:`A tool served by an MCP server.`},"@theorem.host.kind.agent":{defaultMessage:`Agent`,description:`A tool that asks another agent.`},"@theorem.tool.access.read-only":{defaultMessage:`Read only`,description:`A tool that only reads.`},"@theorem.tool.access.read-write":{defaultMessage:`Read and write`,description:`A tool that can change things.`},"@theorem.tool.access.destructive":{defaultMessage:`Destructive`,description:`A tool that can delete or overwrite.`},"@theorem.host.status.running":{defaultMessage:`running`,description:`A tool call in progress.`},"@theorem.host.status.background":{defaultMessage:`in background`,description:`A tool call that replied and goes on after the turn.`},"@theorem.host.status.gate":{defaultMessage:`waiting`,description:`A tool call paused on approval or sign-in.`},"@theorem.host.status.complete":{defaultMessage:`done`,description:`A tool call that returned.`},"@theorem.host.status.error":{defaultMessage:`failed`,description:`A tool call that failed.`},"@theorem.host.status.cancel":{defaultMessage:`stopped`,description:`A tool call that was cancelled.`},"@theorem.host.finished":{defaultMessage:`{activity} in {duration}`,description:`A finished tool call: what it did, and how long it took.`,params:[`activity`,`duration`]},"@theorem.panel.trace.name":{defaultMessage:`Trace`,description:`Trace side panel (screen readers).`},"@theorem.panel.trace.show":{defaultMessage:`Show trace`,description:`Trace panel toggle, closed.`},"@theorem.panel.trace.hide":{defaultMessage:`Hide trace`,description:`Trace panel toggle, open.`},"@theorem.panel.trace.resize":{defaultMessage:`Resize trace`,description:`Trace panel drag handle.`},"@theorem.panel.resize":{defaultMessage:`Resize {name}`,description:`Drag handle for a named console panel.`,params:[`name`]},"@theorem.panel.trace.empty.title":{defaultMessage:`No trace yet`,description:`Empty trace panel.`},"@theorem.panel.trace.empty.description":{defaultMessage:`Spans for each run will show here.`,description:`Empty trace panel.`},"@theorem.panel.trace.summary":{defaultMessage:`{traces, plural, one {# trace} other {# traces}} · {spans, plural, one {# span} other {# spans}}`,description:`Trace panel line under the search: how many traces and spans it holds.`,params:[`traces`,`spans`]},"@theorem.panel.trace.separator":{defaultMessage:` · `,description:`Between facts on one trace panel line.`},"@theorem.panel.trace.search":{defaultMessage:`Search spans`,description:`Trace panel search (screen readers).`},"@theorem.panel.trace.search.placeholder":{defaultMessage:`Filter by type, status, model, text…`,description:`Trace panel search, empty.`},"@theorem.panel.trace.search.text":{defaultMessage:`Any text`,description:`Search field matching any text a span holds.`},"@theorem.panel.trace.search.text.description":{defaultMessage:`Names, values, and stored text.`,description:`What the any-text search field matches.`},"@theorem.panel.trace.no_match":{defaultMessage:`No spans match`,description:`Trace panel, when the search matches nothing.`},"@theorem.panel.trace.download":{defaultMessage:`Download trace`,description:`Saves the trace's records as a file.`},"@theorem.panel.trace.back":{defaultMessage:`Back`,description:`Leaves an open span for its turn.`},"@theorem.panel.trace.show_text":{defaultMessage:`Show text`,description:`Reveals stored text, JSON, or messages.`},"@theorem.panel.trace.hide_text":{defaultMessage:`Hide text`,description:`Hides revealed stored text.`},"@theorem.panel.trace.other":{defaultMessage:`Other`,description:`Group for attributes the trace catalog does not name.`},"@theorem.panel.trace.yes":{defaultMessage:`Yes`,description:`A true trace value.`},"@theorem.panel.trace.no":{defaultMessage:`No`,description:`A false trace value.`},"@theorem.panel.trace.tokens":{defaultMessage:`Tokens`,description:`Card of token counts.`},"@theorem.panel.trace.errors":{defaultMessage:`Errors`,description:`Card counting failed spans.`},"@theorem.panel.trace.at_least":{defaultMessage:`At least {value}`,description:`A total some calls did not report.`,params:[`value`]},"@theorem.panel.trace.about":{defaultMessage:`About {value}`,description:`A total with estimated counts.`,params:[`value`]},"@theorem.panel.trace.offset":{defaultMessage:`+{duration}`,description:`When an event happened, after its span started.`,params:[`duration`]},"@theorem.panel.trace.unit.milliseconds":{defaultMessage:`ms`,description:`Unit of a search field in milliseconds.`},"@theorem.panel.trace.unit.seconds":{defaultMessage:`s`,description:`Unit of a search field in seconds.`},"@theorem.panel.trace.unit.usd":{defaultMessage:`USD`,description:`Unit of a search field in US dollars.`},"@theorem.panel.trace.turn":{defaultMessage:`{label} {index} of {count}`,description:`Which root of the trace is shown: "Turn 2 of 3".`,params:[`label`,`index`,`count`]},"@theorem.panel.trace.turns":{defaultMessage:`Turns`,description:`List of every turn of the conversation; a row opens its turn.`},"@theorem.panel.trace.conversation":{defaultMessage:`{count, plural, one {# turn} other {# turns}}`,description:`Heading of the whole-conversation view: how many turns it holds.`,params:[`count`]},"@theorem.panel.trace.conversation.back":{defaultMessage:`All turns`,description:`Leaves a turn for the whole-conversation view.`},"@theorem.panel.trace.previous":{defaultMessage:`Previous turn`,description:`Opens the turn before this one.`},"@theorem.panel.trace.next":{defaultMessage:`Next turn`,description:`Opens the turn after this one.`},"@theorem.panel.trace.calls":{defaultMessage:`Tool calls`,description:`List of every call of a host's trace; a row opens its call.`},"@theorem.panel.trace.calls.count":{defaultMessage:`{count, plural, one {# tool call} other {# tool calls}}`,description:`Heading of a host's whole-trace view: how many tool calls it holds.`,params:[`count`]},"@theorem.panel.trace.calls.back":{defaultMessage:`All tool calls`,description:`Leaves a call for the host's whole-trace view.`},"@theorem.panel.trace.calls.previous":{defaultMessage:`Previous call`,description:`Opens the tool call before this one.`},"@theorem.panel.trace.calls.next":{defaultMessage:`Next call`,description:`Opens the tool call after this one.`},"@theorem.panel.trace.steps":{defaultMessage:`Steps`,description:`Card counting the model and tool calls of a turn.`},"@theorem.panel.trace.steps.detail":{defaultMessage:`{calls, plural, one {# model call} other {# model calls}} · {tools, plural, one {# tool} other {# tools}}`,description:`Under the steps count: how many were model calls and tool calls.`,params:[`calls`,`tools`]},"@theorem.panel.trace.failed":{defaultMessage:`{count} failed`,description:`Under the steps count, when some failed.`,params:[`count`]},"@theorem.panel.trace.firstText":{defaultMessage:`First text`,description:`Card: how long the person waited before any of the answer appeared.`},"@theorem.panel.trace.rate":{defaultMessage:`{rate} tokens/s`,description:`Under the first-text time: how fast the model wrote once it started.`,params:[`rate`]},"@theorem.panel.trace.held":{defaultMessage:`{duration} held back`,description:`Under the first-text time: how long guardrails held written text back before showing it.`,params:[`duration`]},"@theorem.panel.trace.guardrails":{defaultMessage:`Guardrails`,description:`Card: the time guardrail checks took in a turn.`},"@theorem.panel.trace.guardrails.passed":{defaultMessage:`Passed: {checks}`,description:`Under the guardrail checks that acted: the checks that let the text through, each with what it checked and its time.`,params:[`checks`]},"@theorem.panel.trace.guardrails.places":{defaultMessage:`{count, plural, one {# place} other {# places}}`,description:`A rule a guardrail check matched: how many places in the text it matched.`,params:[`count`]},"@theorem.panel.trace.guardrails.from":{defaultMessage:`from {tool}`,description:`A guardrail check: the tool the checked text came from.`,params:[`tool`]},"@theorem.panel.trace.guardrails.tainted":{defaultMessage:`Tainted`,description:`A guardrail check: a tool that writes or deletes was called after the turn read remote content.`},"@theorem.panel.trace.guardrails.steered":{defaultMessage:`Steered`,description:`A guardrail check: a tool that writes or deletes was called after the turn read remote content that looked like instructions.`},"@theorem.panel.trace.guardrails.detail":{defaultMessage:`{checks, plural, one {# check} other {# checks}} · {flagged, plural, =0 {all passed} other {# acted}}`,description:`Under the guardrail time: how many checks ran, and how many redacted, flagged, or blocked.`,params:[`checks`,`flagged`]},"@theorem.panel.trace.tokens.detail":{defaultMessage:`{input} in · {output} out`,description:`Under the token total: tokens read and written.`,params:[`input`,`output`]},"@theorem.panel.trace.time":{defaultMessage:`Where the time went`,description:`Bar splitting a turn into model, tool, and other time.`},"@theorem.panel.trace.time.model":{defaultMessage:`Model`,description:`Time spent waiting on the model.`},"@theorem.panel.trace.time.tools":{defaultMessage:`Tools`,description:`Time spent running tools.`},"@theorem.panel.trace.time.guardrails":{defaultMessage:`Guardrails`,description:`Time guardrail checks took: on the input, the stream, and the answer.`},"@theorem.panel.trace.time.hooks":{defaultMessage:`Hooks`,description:`Time the host's turn hooks took.`},"@theorem.panel.trace.time.other":{defaultMessage:`Other`,description:`Time spent on none of these: waiting between steps, the host, the network.`},"@theorem.panel.trace.charts.calls":{defaultMessage:`Tokens per model call`,description:`Chart of each model call: its tokens stacked as a bar.`},"@theorem.panel.trace.charts.cached":{defaultMessage:`Cached`,description:`Legend: input tokens read from cache.`},"@theorem.panel.trace.charts.input":{defaultMessage:`Input`,description:`Legend: input tokens read fresh.`},"@theorem.panel.trace.charts.output":{defaultMessage:`Output`,description:`Legend: tokens the model wrote.`},"@theorem.panel.trace.charts.slowest":{defaultMessage:`Slowest steps`,description:`Chart ranking the steps that took longest.`},"@theorem.panel.trace.charts.modelShare":{defaultMessage:`{share} on the model`,description:`Beside a chart's total time: the model's share.`,params:[`share`]},"@theorem.panel.trace.charts.cachedShare":{defaultMessage:`{share} of input cached`,description:`Beside a chart's total tokens: the input read from cache.`,params:[`share`]},"@theorem.panel.trace.charts.turnTime":{defaultMessage:`Time per turn`,description:`Chart of each turn: its model, tool, and other time stacked.`},"@theorem.panel.trace.charts.callTime":{defaultMessage:`Time per call`,description:`Chart of each tool call of a host's trace: its tool, check, and hook time stacked.`},"@theorem.panel.trace.charts.turnTokens":{defaultMessage:`Tokens per turn`,description:`Chart of each turn: its tokens stacked as a bar.`},"@theorem.panel.trace.charts.turn":{defaultMessage:`Turn {index}`,description:`A turn, by its order in the conversation.`,params:[`index`]},"@theorem.panel.trace.charts.hostCall":{defaultMessage:`Call {index}`,description:`A tool call, by its order in a host's trace.`,params:[`index`]},"@theorem.panel.trace.charts.call":{defaultMessage:`Model call {index}`,description:`A model call, by its order in the turn.`,params:[`index`]},"@theorem.panel.trace.charts.tokens":{defaultMessage:`{cached} cached · {fresh} new in · {output} out`,description:`A model call's tokens: read from cache, read fresh, and written.`,params:[`cached`,`fresh`,`output`]},"@theorem.panel.trace.story":{defaultMessage:`What happened`,description:`The turn told step by step.`},"@theorem.panel.trace.story.asked":{defaultMessage:`User asked`,description:`The first step: what the user sent.`},"@theorem.panel.trace.story.requested":{defaultMessage:`Asked for {count, plural, one {# tool} other {# tools}}`,description:`A model call that answered with tool calls.`,params:[`count`]},"@theorem.panel.trace.story.wrote":{defaultMessage:`Wrote a reply`,description:`A model call that answered with text.`},"@theorem.panel.trace.story.answered":{defaultMessage:`Answered`,description:`The last step: the turn ended with this answer.`},"@theorem.panel.trace.story.failed":{defaultMessage:`Ended with an error`,description:`The last step, when the turn failed.`},"@theorem.panel.trace.timeline":{defaultMessage:`Timeline`,description:`Every span of the turn on one time axis.`},"@theorem.panel.trace.timeline.zoom":{defaultMessage:`Drag across the strip to zoom`,description:`Hint beside the activity strip that zooms the timeline.`},"@theorem.panel.trace.timeline.reset":{defaultMessage:`Show the whole turn`,description:`Zooms the timeline back out to the full turn.`},"@theorem.panel.trace.input":{defaultMessage:`Input`,description:`What a span was given.`},"@theorem.panel.trace.output":{defaultMessage:`Output`,description:`What a span gave back.`},"@theorem.panel.trace.details":{defaultMessage:`All details`,description:`A span's every attribute, event, and link.`},"@theorem.panel.trace.close":{defaultMessage:`Close`,description:`Closes the open span.`},"@theorem.panel.captions.name":{defaultMessage:`Captions`,description:`Captions side panel (screen readers).`},"@theorem.panel.captions.show":{defaultMessage:`Show captions`,description:`Captions panel toggle, closed.`},"@theorem.panel.captions.hide":{defaultMessage:`Hide captions`,description:`Captions panel toggle, open.`},"@theorem.panel.captions.resize":{defaultMessage:`Resize captions`,description:`Captions panel drag handle.`},"@theorem.panel.captions.empty.title":{defaultMessage:`No captions yet`,description:`Empty captions panel.`},"@theorem.panel.captions.empty.description":{defaultMessage:`What you and the agent say will show here.`,description:`Empty captions panel.`},"@theorem.live.greeting":{defaultMessage:`Ready when you are.`,description:`Live landing heading, before a call.`},"@theorem.live.start_voice_call":{defaultMessage:`Start voice call`,description:`Live landing, voice profiles.`},"@theorem.live.start_call":{defaultMessage:`Start call`,description:`Starts or restarts a call.`},"@theorem.live.start_video_call":{defaultMessage:`Start video call`,description:`Live landing, video profiles.`},"@theorem.live.microphone":{defaultMessage:`Microphone`,description:`Mic toggle.`},"@theorem.live.mute":{defaultMessage:`Mute`,description:`Mic toggle tooltip, unmuted.`},"@theorem.live.unmute":{defaultMessage:`Unmute`,description:`Mic toggle tooltip, muted.`},"@theorem.live.camera":{defaultMessage:`Camera`,description:`Camera toggle.`},"@theorem.live.camera_on":{defaultMessage:`Turn camera on`,description:`Camera toggle tooltip, off.`},"@theorem.live.camera_off":{defaultMessage:`Turn camera off`,description:`Camera toggle tooltip, on.`},"@theorem.live.flip_camera":{defaultMessage:`Flip camera`,description:`Switches front and back camera.`},"@theorem.live.end_call":{defaultMessage:`End call`,description:`Hangs up.`},"@theorem.live.expand":{defaultMessage:`Open call`,description:`Asks the host to show a minimized call full size.`},"@theorem.live.minimize":{defaultMessage:`Minimize call`,description:`Asks the host to show the call small; the call goes on.`},"@theorem.live.new_session":{defaultMessage:`New session`,description:`Captions divider between calls.`},"@theorem.live.controls":{defaultMessage:`Call controls`,description:`The control toolbar (screen readers).`},"@theorem.live.camera_preview":{defaultMessage:`Camera preview`,description:`Self-view (screen readers).`},"@theorem.live.state.calling_tool":{defaultMessage:`calling {tool}`,description:`Call status: a tool runs.`,params:[`tool`]},"@theorem.live.state.connecting":{defaultMessage:`connecting`,description:`Call status.`},"@theorem.live.state.reconnecting":{defaultMessage:`reconnecting`,description:`Call status: the call dropped and is being taken up again.`},"@theorem.live.state.requesting_mic":{defaultMessage:`requesting mic`,description:`Call status.`},"@theorem.live.state.speaking":{defaultMessage:`speaking`,description:`Call status: the agent speaks.`},"@theorem.live.state.connected":{defaultMessage:`connected`,description:`Call status.`},"@theorem.live.state.muted":{defaultMessage:`muted`,description:`Call status.`},"@theorem.live.state.listening":{defaultMessage:`listening`,description:`Call status.`},"@theorem.live.state.error":{defaultMessage:`error`,description:`Call status.`},"@theorem.live.state.ended":{defaultMessage:`ended`,description:`Call status.`}};function He(e,t){let[n]=t.parts;return t.parts.length===1&&n?e(`@theorem.composer.drawer.${n.kind}`):t.parts.map(t=>e(`@theorem.composer.drawer.${t.kind}.count`,{n:t.n})).join(e(`@theorem.composer.drawer.separator`))}function Ue(e,t,n){let r=e(`@theorem.transcript.tokens`,{count:n.total});if(!n.cost)return r;let i=new Intl.NumberFormat(t,{style:`currency`,currency:`USD`,maximumSignificantDigits:2}).format(n.cost.usd);return`${r} · ${n.cost.partial?e(`@theorem.panel.trace.at_least`,{value:i}):i}`}function J(e,t){let n=Math.max(0,t);return n>0&&n<.05?e(`@theorem.duration.belowTenth`):n<10?e(`@theorem.duration.milliseconds`,{ms:Math.round(n*10)/10}):n<1e3?e(`@theorem.duration.milliseconds`,{ms:Math.round(n)}):n<1e4?e(`@theorem.duration.seconds`,{seconds:Math.round(n/100)/10}):n<6e4?e(`@theorem.duration.seconds`,{seconds:Math.round(n/1e3)}):X(e,Math.floor(n/6e4),Math.round(n%6e4/1e3))}function We(e,t,n){let{usage:r,elapsedMs:i}=n;return[n.model,i==null?null:J(e,i),r?.inputTokens===void 0?null:n.tokens(r.inputTokens),r?.costUsd===void 0?null:t.format(r.costUsd)].filter(Boolean).join(` · `)}function Y(e,t){let n=Math.floor(Math.max(0,t)/1e3);return n<60?e(`@theorem.duration.seconds`,{seconds:n}):X(e,Math.floor(n/60),n%60)}function X(e,t,n){return n===0?e(`@theorem.duration.minutes`,{minutes:t}):e(`@theorem.duration.minutes_seconds`,{minutes:t,seconds:n})}function Ge(e,t){return t?t.phase===`working`?t.elapsedMs===void 0?e(`@theorem.transcript.working`):e(`@theorem.transcript.working_for`,{duration:Y(e,t.elapsedMs)}):t.elapsedMs===void 0?e(`@theorem.transcript.worked`):e(`@theorem.transcript.worked_for`,{duration:J(e,t.elapsedMs)}):``}function Ke(e,t,n){return t===`calling_tool`?n?.activity??e(`@theorem.live.state.calling_tool`,{tool:o(n?.name??``).toLowerCase()}):e(`@theorem.live.state.${t}`)}function Z(e,t){return t?e(`@theorem.voice_note.name`,{format:t}):e(`@theorem.voice_note.unnamed`)}var qe=new Set(Object.keys(q));function Je(e){return q[e]?.params??[]}function Q(e,t){for(let[n,r]of Object.entries(e)){if(!Ye(n))throw Error(`Theorem labels: ${n}: not a BCP 47 locale`);for(let[e,i]of Object.entries(r??{})){if(!t&&!e.startsWith(`@theorem.`))continue;let r=Xe(n,e,i);if(r)throw Error(`Theorem labels: ${n} ${e}: ${r}`)}}}function Ye(e){try{return Intl.getCanonicalLocales(e).length===1}catch{return!1}}function Xe(e,t,n){if(typeof n!=`string`)return`the message must be a string`;let r=t.startsWith(`@theorem.`);if(!r&&!t.startsWith(`@astryx.`))return`keys start with @theorem. or @astryx.`;if(r&&!qe.has(t))return`no such label`;let i;try{i=new Ve(n,e)}catch(e){return`not a valid ICU message (${String(e)})`}if(!r)return;let a=Je(t);try{i.format(Object.fromEntries(a.map(e=>[e,1])))}catch(e){return`the message ${a.length>0?`may only use ${a.map(e=>`{${e}}`).join(`, `)}`:`takes no values`} (${String(e)})`}}var $=new WeakMap;function Ze(e){try{return new Intl.Locale(e).language}catch{return e.split(`-`)[0]??e}}function Qe(e,t){let n=Ze(t);if($.get(e)===n)return e;let r={...e,[n]:{...q,...e[n]}};return $.set(r,n),r}function $e(e,t){if(!t)return e;let n={};for(let[r,i]of[...Object.entries(e??{}),...Object.entries(t)])n[r]={...n[r],...i};return n}function et({labels:e,children:t}){let n=(0,l.use)(m),r=(0,l.useMemo)(()=>Qe(n.messages,n.locale),[n.messages,n.locale]),i=(0,l.useMemo)(()=>(Q(n.overrides??{},!1),e&&Q(e,!0),$e(n.overrides,e)),[n.overrides,e]);return r===n.messages&&i===n.overrides?(0,d.jsx)(d.Fragment,{children:t}):(0,d.jsx)(p,{locale:n.locale,dir:n.direction,messages:r,overrides:i,children:t})}function tt(){return c()}export{Ke as a,Z as c,Y as i,J as l,tt as n,We as o,He as r,Ue as s,et as t,Ge as u};
@@ -1 +1 @@
1
- import{c as e}from"./host-patterns-F-KZIzkF.js";function t(e){let t=e!==void 0;return{upstreamLog:e?.include?.upstreamLog??!0,outboundWire:e?.include?.outboundWire??!t,evidenceRaw:e?.include?.evidenceRaw??!t,usage:e?.include?.usage??!0,guardrailDecisions:e?.include?.guardrailDecisions??!0,guardrailMatchPreview:e?.include?.guardrailMatchPreview??!1}}function n(e){if(e===void 0||typeof e==`boolean`)return e??!0;let t={theorem:e.theorem??!0,host:e.host??!0};return(t.theorem||t.host)&&t}function r(e){return{sensitive:n(e?.scrub?.sensitive),injection:n(e?.scrub?.injection),canary:n(e?.scrub?.canary)}}function i(t){if(t===void 0)return 1;if(!Number.isFinite(t))throw new e(`config`,`observability.sampleRate must be a finite number`);if(t<0||t>1)throw new e(`config`,`observability.sampleRate must be between 0 and 1 inclusive`);return t}function a(e){let n=e?.writeTo,a=i(e?.sampleRate);return{record:e!==void 0&&n!==!1&&n!==void 0,writeTo:n,sampleRate:a,include:t(e),scrub:r(e),resource:{...e?.resource??{}},retainForDays:e?.retainForDays??14,rotateAfterMiB:e?.rotateAfterMiB??32,onWriteError:e?.onWriteError}}var o=[`audio`,`video`,`text`];function s(t){if(t.type!==`live`)throw new e(`request`,`Profile '${t.id}' is not type 'live'`);return t}function c(e){return e!==`text`}function l(e,t){let n=e?.[t];return n===void 0?c(t):n}function u(e,t){return l(s(e).live.ingress,t)}function d(e){let t=s(e);return o.some(e=>l(t.live.ingress,e))}function f(t){let n=s(t);if(!d(n))throw new e(`config`,`Profile '${n.id}': at least one live.ingress channel (audio, video, text) must be enabled`)}function p(t,n){if(!u(t,n))throw new e(`request`,`Profile '${t.id}' live.ingress.${n} is disabled — cannot send on this channel`)}export{a,l as i,f as n,c as r,p as t};
1
+ import{c as e}from"./host-patterns-DzBJj2uE.js";function t(e){let t=e!==void 0;return{upstreamLog:e?.include?.upstreamLog??!0,outboundWire:e?.include?.outboundWire??!t,evidenceRaw:e?.include?.evidenceRaw??!t,usage:e?.include?.usage??!0,guardrailDecisions:e?.include?.guardrailDecisions??!0,guardrailMatchPreview:e?.include?.guardrailMatchPreview??!1}}function n(e){if(e===void 0||typeof e==`boolean`)return e??!0;let t={theorem:e.theorem??!0,host:e.host??!0};return(t.theorem||t.host)&&t}function r(e){return{sensitive:n(e?.scrub?.sensitive),injection:n(e?.scrub?.injection),canary:n(e?.scrub?.canary)}}function i(t){if(t===void 0)return 1;if(!Number.isFinite(t))throw new e(`config`,`observability.sampleRate must be a finite number`);if(t<0||t>1)throw new e(`config`,`observability.sampleRate must be between 0 and 1 inclusive`);return t}function a(e){let n=e?.writeTo,a=i(e?.sampleRate);return{record:e!==void 0&&n!==!1&&n!==void 0,writeTo:n,sampleRate:a,include:t(e),scrub:r(e),resource:{...e?.resource??{}},retainForDays:e?.retainForDays??14,rotateAfterMiB:e?.rotateAfterMiB??32,onWriteError:e?.onWriteError}}var o=[`audio`,`video`,`text`];function s(t){if(t.type!==`live`)throw new e(`request`,`Profile '${t.id}' is not type 'live'`);return t}function c(e){return e!==`text`}function l(e,t){let n=e?.[t];return n===void 0?c(t):n}function u(e,t){return l(s(e).live.ingress,t)}function d(e){let t=s(e);return o.some(e=>l(t.live.ingress,e))}function f(t){let n=s(t);if(!d(n))throw new e(`config`,`Profile '${n.id}': at least one live.ingress channel (audio, video, text) must be enabled`)}function p(t,n){if(!u(t,n))throw new e(`request`,`Profile '${t.id}' live.ingress.${n} is disabled — cannot send on this channel`)}export{a,l as i,f as n,c as r,p as t};
@@ -1 +1 @@
1
- import{C as e,E as t,O as n,b as r,c as i,d as a,h as o,v as s,x as c}from"./schemas-D7cgkv3L.js";import{mi as l,si as u,vi as d,ya as f}from"./shaped-data-KV3CIOIt.js";import{C as p,M as m,O as h,j as g}from"./reader-DoaMWQWB.js";import{n as _}from"./trace-schema--4IGmLeE.js";import{T as v}from"./turn-client-RIvnewgM.js";var y=c({type:s(`open`),history:a(d).optional(),options:e(t(),t()).optional(),context:n().optional(),stated:h.optional(),model:t().optional(),effort:t().optional(),resume:c({providerState:f,awayMs:r().nonnegative()}).optional(),host:e(t(),n()).optional()}),b=o(`type`,[c({type:s(`audio`),data:t()}),c({type:s(`video`),data:t(),mimeType:t()}),c({type:s(`text`),text:t()}),c({type:s(`context`),context:n()}),c({type:s(`executeTool`),callId:t().min(1),operationId:t().min(1).max(256),decision:i(v).optional(),input:n().optional(),secret:t().optional(),output:n().optional(),grantId:t().min(1).optional(),unanswered:s(!0).optional()})]),x={ready:c({type:s(`ready`),profile:t().optional(),sessionId:t().optional()}),events:c({type:s(`events`),events:a(n())}),trace:c({type:s(`trace`),record:_}),error:c({type:s(`error`)}).and(p),executeToolResult:o(`status`,[c({type:s(`executeToolResult`),callId:t().min(1),operationId:t().min(1).max(256),status:s(`dispatched`),grantId:t().min(1),arguments:e(t(),n())}),c({type:s(`executeToolResult`),callId:t(),status:s(`settled`),operationId:t().min(1).max(256)}),c({type:s(`executeToolResult`),callId:t(),status:s(`gated`),operationId:t().min(1).max(256),gate:l}),c({type:s(`executeToolResult`),callId:t(),status:s(`refused`),operationId:t().min(1).max(256),body:p})])};function S(e){let t=g(x,e);return t.type===`events`?{type:`events`,events:t.events.map(e=>m(u,e))}:t}export{y as n,S as r,b as t};
1
+ import{C as e,E as t,O as n,b as r,c as i,d as a,h as o,v as s,x as c}from"./schemas-D7cgkv3L.js";import{mi as l,si as u,vi as d,ya as f}from"./shaped-data-CRpw7JlX.js";import{C as p,M as m,O as h,j as g}from"./reader-D3Gh1gq-.js";import{n as _}from"./trace-schema--4IGmLeE.js";import{T as v}from"./turn-client-DCxJT6xY.js";var y=c({type:s(`open`),history:a(d).optional(),options:e(t(),t()).optional(),context:n().optional(),stated:h.optional(),model:t().optional(),effort:t().optional(),resume:c({providerState:f,awayMs:r().nonnegative()}).optional(),host:e(t(),n()).optional()}),b=o(`type`,[c({type:s(`audio`),data:t()}),c({type:s(`video`),data:t(),mimeType:t()}),c({type:s(`text`),text:t()}),c({type:s(`context`),context:n()}),c({type:s(`executeTool`),callId:t().min(1),operationId:t().min(1).max(256),decision:i(v).optional(),input:n().optional(),secret:t().optional(),output:n().optional(),grantId:t().min(1).optional(),unanswered:s(!0).optional()})]),x={ready:c({type:s(`ready`),profile:t().optional(),sessionId:t().optional()}),events:c({type:s(`events`),events:a(n())}),trace:c({type:s(`trace`),record:_}),error:c({type:s(`error`)}).and(p),executeToolResult:o(`status`,[c({type:s(`executeToolResult`),callId:t().min(1),operationId:t().min(1).max(256),status:s(`dispatched`),grantId:t().min(1),arguments:e(t(),n())}),c({type:s(`executeToolResult`),callId:t(),status:s(`settled`),operationId:t().min(1).max(256)}),c({type:s(`executeToolResult`),callId:t(),status:s(`gated`),operationId:t().min(1).max(256),gate:l}),c({type:s(`executeToolResult`),callId:t(),status:s(`refused`),operationId:t().min(1).max(256),body:p})])};function S(e){let t=g(x,e);return t.type===`events`?{type:`events`,events:t.events.map(e=>m(u,e))}:t}export{y as n,S as r,b as t};
@@ -1,4 +1,4 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{d as t,l as n,r,u as i}from"./themeProps-Bo2jNkIC.js";import{C as a,T as o}from"./coarsePointer-B10KWVuz.js";import{n as s,t as c}from"./LayoutContent-BWpUj2Iy.js";import{t as l}from"./Stack-3jR93LgR.js";import{t as u}from"./mergeProps-ptS-gIMz.js";import{P as d}from"./useLayerDismissal-DwwLDEpO.js";import{a as f,d as p,t as m}from"./Icon-Cd9sDRzY.js";import{r as h}from"./Spinner-ObDlWHHD.js";import{t as g}from"./rtlStyles-CVVETNV7.js";import{t as _}from"./VisuallyHidden-Dfmmn1_I.js";import{t as v,u as y}from"./Button-Bwkht0RI.js";import{t as b}from"./Token-CGIAH1hn.js";import{t as x}from"./Tooltip-Rh2iV9Vn.js";import{t as ee}from"./createReactComponent-DVEyVJ-p.js";import{c as te,l as ne,s as re,u as ie,v as ae}from"./compile-Ci6XGHY4.js";import{n as oe,r as se}from"./useAdaptivePresentation-D53OuCPm.js";import{t as ce}from"./IconFilter-DYCjUyWk.js";import{t as le}from"./Divider-DzOWjyex.js";import{t as ue}from"./useTranslator-BKF5qhFP.js";import{t as de}from"./DropdownMenu--j6BmlDw.js";import{t as fe}from"./CheckboxInput-Dd_tzCIt.js";import{t as pe}from"./HStack-B00ufja5.js";import{t as me}from"./IconButton-BenRR-zK.js";import{t as he}from"./Field-DvUFAlQ-.js";import{i as ge,n as _e,r as ve,t as ye}from"./inputStyles.stylex-CwhFgCYO.js";import{a as be,d as xe,n as Se,o as Ce}from"./MarkdownPluginNodeRenderer-CrUcBZdC.js";import{t as we}from"./useClipboard-CE6Krn40.js";import{n as Te,s as Ee,t as De}from"./highlightStyles-CJuQk9n5.js";import{t as Oe}from"./Toolbar-S-NvSzN4.js";import{n as ke,t as Ae}from"./TextInput-DwHcdc-E.js";import{t as je}from"./ToggleButton-DS8nQhRT.js";import{t as Me}from"./Dialog-tyH-Jv5A.js";import{L as Ne,f as Pe,g as Fe,i as Ie,m as Le,p as Re,q as ze}from"./index-fyDzED1x.js";var Be=ee(`outline`,`share-off`,`ShareOff`,[[`path`,{d:`M3 12a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`,key:`svg-0`}],[`path`,{d:`M15 6a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`,key:`svg-1`}],[`path`,{d:`M15.861 15.896a3 3 0 0 0 4.265 4.22m.578 -3.417a3.012 3.012 0 0 0 -1.507 -1.45`,key:`svg-2`}],[`path`,{d:`M8.7 10.7l1.336 -.688m2.624 -1.352l2.64 -1.36`,key:`svg-3`}],[`path`,{d:`M8.7 13.3l6.6 3.4`,key:`svg-4`}],[`path`,{d:`M3 3l18 18`,key:`svg-5`}]]),S=e(t(),1);function Ve(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);return n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function C(e,...t){throw Ve(e,...t)}function He(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Ue(){return typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0}var We=Ue();function Ge(){return We&&`documentMode`in document?document.documentMode:null}var Ke=Ge();function qe(e){return We&&e.test(navigator.platform)}function Je(e){return We&&e.test(navigator.userAgent)}var Ye=qe(/Mac|iPod|iPhone|iPad/),Xe=Je(/^(?!.*Seamonkey)(?=.*Firefox).*/i);function Ze(){return!(!We||!(`InputEvent`in window)||Ke)&&`getTargetRanges`in new window.InputEvent(`input`)}var Qe=Ze();function $e(){return We&&!window.MSStream&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1)}var et=$e(),tt=Je(/Android/),nt=Je(/Version\/[\d.]+.*Safari/)&&!tt,rt=Je(/^(?=.*Chrome).*/i),it=We&&tt&&rt,at=Je(/AppleWebKit\/[\d.]+/)&&Ye&&!rt;function ot(){return 2047}var st=ot(),ct=nt||et||at?`\xA0`:`​`,lt=`
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{d as t,l as n,r,u as i}from"./themeProps-Bo2jNkIC.js";import{C as a,T as o}from"./coarsePointer-B10KWVuz.js";import{n as s,t as c}from"./LayoutContent-BWpUj2Iy.js";import{t as l}from"./Stack-3jR93LgR.js";import{t as u}from"./mergeProps-ptS-gIMz.js";import{P as d}from"./useLayerDismissal-DwwLDEpO.js";import{a as f,d as p,t as m}from"./Icon-Cd9sDRzY.js";import{r as h}from"./Spinner-ObDlWHHD.js";import{t as g}from"./rtlStyles-CVVETNV7.js";import{t as _}from"./VisuallyHidden-Dfmmn1_I.js";import{t as v,u as y}from"./Button-Bwkht0RI.js";import{t as b}from"./Token-CGIAH1hn.js";import{t as x}from"./Tooltip-Rh2iV9Vn.js";import{t as ee}from"./createReactComponent-DVEyVJ-p.js";import{c as te,l as ne,s as re,u as ie,v as ae}from"./compile-CFGS7Xyf.js";import{n as oe,r as se}from"./useAdaptivePresentation-D53OuCPm.js";import{t as ce}from"./IconFilter-DYCjUyWk.js";import{t as le}from"./Divider-DzOWjyex.js";import{t as ue}from"./useTranslator-BKF5qhFP.js";import{t as de}from"./DropdownMenu-BRiIS7y5.js";import{t as fe}from"./CheckboxInput-Dd_tzCIt.js";import{t as pe}from"./HStack-B00ufja5.js";import{t as me}from"./IconButton-BenRR-zK.js";import{t as he}from"./Field-DvUFAlQ-.js";import{i as ge,n as _e,r as ve,t as ye}from"./inputStyles.stylex-CwhFgCYO.js";import{a as be,d as xe,n as Se,o as Ce}from"./MarkdownPluginNodeRenderer-CrUcBZdC.js";import{t as we}from"./useClipboard-CE6Krn40.js";import{n as Te,s as Ee,t as De}from"./highlightStyles-CJuQk9n5.js";import{t as Oe}from"./Toolbar-BIbNDUSH.js";import{n as ke,t as Ae}from"./TextInput-DwHcdc-E.js";import{t as je}from"./ToggleButton-DS8nQhRT.js";import{t as Me}from"./Dialog-tyH-Jv5A.js";import{L as Ne,f as Pe,g as Fe,i as Ie,m as Le,p as Re,q as ze}from"./index-1UzYNcXu.js";var Be=ee(`outline`,`share-off`,`ShareOff`,[[`path`,{d:`M3 12a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`,key:`svg-0`}],[`path`,{d:`M15 6a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`,key:`svg-1`}],[`path`,{d:`M15.861 15.896a3 3 0 0 0 4.265 4.22m.578 -3.417a3.012 3.012 0 0 0 -1.507 -1.45`,key:`svg-2`}],[`path`,{d:`M8.7 10.7l1.336 -.688m2.624 -1.352l2.64 -1.36`,key:`svg-3`}],[`path`,{d:`M8.7 13.3l6.6 3.4`,key:`svg-4`}],[`path`,{d:`M3 3l18 18`,key:`svg-5`}]]),S=e(t(),1);function Ve(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);return n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function C(e,...t){throw Ve(e,...t)}function He(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Ue(){return typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0}var We=Ue();function Ge(){return We&&`documentMode`in document?document.documentMode:null}var Ke=Ge();function qe(e){return We&&e.test(navigator.platform)}function Je(e){return We&&e.test(navigator.userAgent)}var Ye=qe(/Mac|iPod|iPhone|iPad/),Xe=Je(/^(?!.*Seamonkey)(?=.*Firefox).*/i);function Ze(){return!(!We||!(`InputEvent`in window)||Ke)&&`getTargetRanges`in new window.InputEvent(`input`)}var Qe=Ze();function $e(){return We&&!window.MSStream&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1)}var et=$e(),tt=Je(/Android/),nt=Je(/Version\/[\d.]+.*Safari/)&&!tt,rt=Je(/^(?=.*Chrome).*/i),it=We&&tt&&rt,at=Je(/AppleWebKit\/[\d.]+/)&&Ye&&!rt;function ot(){return 2047}var st=ot(),ct=nt||et||at?`\xA0`:`​`,lt=`
2
2
 
3
3
  `,ut=Xe?`\xA0`:ct,dt={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},ft={directionless:1,unmergeable:2},pt={center:2,end:6,justify:4,left:1,right:3,start:5};function mt(e){let t={};for(let n of Object.keys(e))t[e[n]]=n;return t}var ht=mt(pt),gt={normal:0,segmented:2,token:1},_t=mt(gt),vt=Symbol.for(`@lexical/ctrlOrOtherKey`),yt=`$config`;function bt(){return Wu()._blockCursorElement}function xt(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-slot`)}var St=at||et||nt;function Ct(){let e=H().createElement(`img`);e.setAttribute(`data-lexical-decorator-boundary`,`true`),e.alt=``;for(let[t,n]of[[`position`,`absolute`],[`width`,`0px`],[`height`,`0px`],[`border`,`0px`],[`margin`,`0px`],[`padding`,`0px`]])e.style.setProperty(t,n,`important`);return e}function wt(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-decorator-boundary`)}var Tt=class e{element;before;after;constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}insertChild(e){let t=this.getInsertionAnchor();return t!==null&&t.parentElement!==this.element&&C(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&C(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&C(359),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;return t===this.getInsertionAnchor()?null:t}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,t,n){if(this.element===e)return t===e&&n===0?`before`:`after`;let r=Et(e,this.element);if(r===null)return`after`;let i=Array.prototype.indexOf.call(e.childNodes,r);if(i<0)return`after`;if(t===e)return n<=i?`before`:`after`;let a=Et(e,t);if(a===null)return`after`;let o=Array.prototype.indexOf.call(e.childNodes,a);return o>=0&&o<=i?`before`:`after`}getInsertionAnchor(){return this.before}};function Et(e,t){let n=t;for(;n!==null&&n.parentNode!==e;)n=n.parentNode;return n}var Dt=class e extends Tt{withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()||this.getDecoratorBoundaryAnchor(`trailing`)}getFirstChildAnchor(){let e=super.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;for(;xt(t);)e=t,t=t.nextSibling;wt(t)&&(e=t,t=t.nextSibling);let n=e?e.nextSibling:this.element.firstChild;return n!==null&&n===bt()?n:e}getDecoratorBoundaryAnchor(e){let t;if(e===`leading`){let e=super.getFirstChildAnchor();for(t=e?e.nextSibling:this.element.firstChild;xt(t);)t=t.nextSibling}else t=this.before?this.before.previousSibling:this.element.lastChild,t!==null&&t===bt()&&(t=t.previousSibling);return wt(t)?t:null}setDecoratorBoundaryAnchor(e,t){let n=this.getDecoratorBoundaryAnchor(e);if(t!==(n!==null)){if(n!==null)this.element.removeChild(n);else if(e===`leading`){let e=this.getFirstChildAnchor();this.element.insertBefore(Ct(),e?e.nextSibling:this.element.firstChild)}else this.element.insertBefore(Ct(),this.before)}}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){let t=this.element,n=this.after===null?t.firstChild:this.after.nextSibling,r=e===`empty`&&xt(n)?null:e;if(t.__lexicalLastChildKind!==r){if(t.__lexicalLastChildKind=r,r===null)this.removeManagedLineBreak();else{let e=r===`decorator`&&St;this.insertManagedLineBreak(e)}}}removeManagedLineBreak(){let e=this.getManagedLineBreak();if(e){let t=this.element,n=e.nodeName===`IMG`?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.getManagedLineBreak();if(t){if(e===(t.nodeName===`IMG`))return;this.removeManagedLineBreak()}let n=this.element,r=this.before||this.getDecoratorBoundaryAnchor(`trailing`),i=H().createElement(`br`);if(i.setAttribute(`data-lexical-managed-linebreak`,`true`),n.insertBefore(i,r),e){let e=H().createElement(`img`);e.setAttribute(`data-lexical-managed-linebreak`,`true`),e.style.setProperty(`display`,`inline`,`important`),e.style.setProperty(`border`,`0px`,`important`),e.style.setProperty(`margin`,`0px`,`important`),e.alt=``,n.insertBefore(e,i),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=i}getFirstChildOffset(){let e=this.getFirstChild(),t=this.getInsertionAnchor(),n=0;for(let r=this.element.firstChild;r!==null&&r!==e&&r!==t;r=r.nextSibling)n++;return n}resolveChildIndex(e,t,n,r){if(n===this.element){let t=this.getFirstChildOffset(),n=bt(),i=this.element.childNodes,a=Math.min(r,i.length),o=0;for(let e=t;e<a;e++)i[e]!==n&&o++;return[e,Math.min(o,e.getChildrenSize())]}let i=Ot(t,n);i.push(r);let a=Ot(t,this.element),o=e.getIndexWithinParent();for(let e=0;e<a.length;e++){let t=i[e],n=a[e];if(t===void 0||t<n)break;if(t>n){o+=1;break}}return[e.getParentOrThrow(),o]}};function Ot(e,t){let n=[],r=t;for(;r!==e&&r!==null;r=r.parentNode){let e=0;for(let t=r.previousSibling;t!==null;t=t.previousSibling)e++;n.push(e)}return r!==e&&C(225),n.reverse()}function kt(){let e;try{e=`0.52.0+prod.esm`}catch{}return e??`"<unknown>+source"`}var At=kt(),jt=class{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){let e=Array.from(this._front).reverse();for(let t of this._back)e.push(t);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}},Mt=null;function Nt(e,t=1e3){return e instanceof Pt?e.clone():e.size<t?new Map(e):new Pt().init(new Map(e),void 0,e.size)}var Pt=class e{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new e().init(this._old,this._nursery,this._size)}init(e,t,n){return this._old=e,this._nursery=t,this._size=n,this}get size(){return this._size}has(e){return this.get(e)!==void 0}getWithTombstone(e){let t=this._nursery&&this._nursery.get(e);return t===void 0?this._old&&this._old.get(e):t}get(e){let t=this.getWithTombstone(e);return t===Mt?void 0:t}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(e=!1){if(this._nursery&&this._nursery.size>0&&(e||this.shouldCompact())){let e=new Map(this._old);for(let[t,n]of this._nursery)n===Mt?e.delete(t):e.set(t,n);this._old=e,this._nursery=void 0}return this._mutable=!1,this}set(e,t){let n=this.getWithTombstone(e);if(n===t)return this;let r=this.getNursery();return n!==Mt&&n!==void 0||(this._size++,n===Mt&&r.delete(e)),r.set(e,t),this}delete(e){let t=this.has(e);return t&&(this.getNursery().set(e,Mt),this._size--),t}getOrInsert(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}getOrInsertComputed(e,t){let n=this.get(e);if(n!==void 0)return n;let r=t(e);return this.set(e,r),r}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(let e of this.entries())yield e[0]}*values(){for(let e of this.entries())yield e[1]}*entries(){let e=this._nursery,t=this._old;if(e){if(t)for(let n of t){let t=n[0],r=e.get(t);r!==Mt&&(r!==void 0&&(n[1]=r),yield n)}for(let n of e)n[1]===Mt||t&&t.has(n[0])||(yield n)}else t&&(yield*t)}forEach(e,t){t!==void 0&&(e=e.bind(t));for(let[t,n]of this.entries())e(n,t,this)}get[Symbol.toStringTag](){return`GenMap`}[Symbol.iterator](){return this.entries()}},Ft=!1;function It(e,t,...n){let r=Ft,i;try{Ft=e,i=t()}finally{Ft=r}var a;return(a=i)===null||typeof a!=`object`&&typeof a!=`function`||typeof a.then!=`function`||C(421),i}function Lt(){return Ft}function Rt(e){let t=e.exportJSON(Ft),n=e.constructor;return t.type!==n.getType()&&C(130,n.name),N(e)&&!Array.isArray(t.children)&&C(59,n.name),t}function zt(e,t,n,r,i,a){if(N(e)){let o=e.getFirstChild();for(;o!==null;){let e=o.__key;o.__parent===t&&((N(o)||Rd(o)&&o.__slots!==null)&&zt(o,e,n,r,i,a),n.has(e)||a.delete(e),i.push(e)),o=o.getNextSibling()}}for(let o of Rd(e)&&e.__slots!==null?e.__slots.values():[]){let e=r.get(o);e!==void 0&&zd(e)&&e.__slotHost===t&&((N(e)||Rd(e)&&e.__slots!==null)&&zt(e,o,n,r,i,a),n.has(o)||a.delete(o),i.push(o))}}var Bt=!1,Vt=0;function Ht(e){Vt=e.timeStamp}function Ut(e,t,n){let r=e.nodeName===`BR`,i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&Ol(e,n)!==void 0}function Wt(e,t,n){let r=yu(lu(n)),i=r&&Ou(r,n._rootElement),a=null,o=null;i!==null&&i.anchorNode===e&&(a=i.anchorOffset,o=i.focusOffset);let s=e.nodeValue;s!==null&&Bl(t,s,a,o,!1)}function Gt(e,t,n){if(k(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return gl(t)&&n.isAttached()}function Kt(e,t,n){for(let r=e;r&&!id(r);r=tu(r)){let e=Ol(r,t);if(e!==void 0){let t=L(e,n);if(t)return P(t)||!U(r)?void 0:[r,t]}}}function qt(e,t,n){Bt=!0;let r=performance.now()-Vt>100;try{nc(e,()=>{let i=j()||function(e){return e.read(`latest`,()=>{let e=j();return e===null?null:e.clone()})}(e),a=new Map,o=e._editorState,s=e._blockCursorElement,c=!1,l=``;for(let n=0;n<t.length;n++){let u=t[n],d=u.type,f=u.target,p=Kt(f,e,o);if(!p)continue;let[m,h]=p;if(d===`characterData`)r&&O(h)&&gl(f)&&Gt(i,f,h)&&Wt(f,h,e);else if(d===`childList`){c=!0;let t=u.addedNodes;for(let n=0;n<t.length;n++){let r=t[n],i=El(r),a=r.parentNode;if(!(a==null||r===s||i!==null||Ut(r,a,e)||wt(r)||e._slotsUsed&&U(r)&&r.hasAttribute(`data-lexical-slot`)||id(r))){if(Xe){let e=(U(r)?r.innerText:null)||r.nodeValue;e&&(l+=e)}a.removeChild(r)}}let n=u.removedNodes,r=n.length;if(r>0){let t=0;for(let i=0;i<r;i++){let r=n[i];Ut(r,f,e)||s===r?(f.appendChild(r),t++):wt(r)&&t++}r!==t&&a.set(m,h)}}}if(a.size>0)for(let[t,n]of a)n.reconcileObservedMutation(t,e);let u=n.takeRecords();if(u.length>0){for(let t=0;t<u.length;t++){let n=u[t],r=n.addedNodes,i=n.target;for(let t=0;t<r.length;t++){let n=r[t],a=n.parentNode;a==null||n.nodeName!==`BR`||Ut(n,i,e)||a.removeChild(n)}}n.takeRecords()}i!==null&&(c&&z(i),Xe&&$l(e)&&i.insertRawText(l))})}finally{Bt=!1}}function Jt(e){let t=e._observer;t!==null&&qt(e,t.takeRecords(),t)}function Yt(e){(function(e){Vt===0&&lu(e).addEventListener(`textInput`,Ht,!0)})(e),e._observer=new MutationObserver((t,n)=>{qt(e,t,n)})}function Xt(e,t,n){let{isEqual:r}=e;return t===n||r!==void 0&&r(t,n)}function Zt(e,t){return Xt(e,t,e.defaultValue)}function Qt(e){return typeof e==`object`&&!!e}function $t(e,t){let n=an(e,t).getter;return Qt(n)&&n.getterTable!==void 0||C(405,t),rn(n.getterTable)}function en(e,t){let n=an(e,t).setter;return Qt(n)&&n.setterTable!==void 0||C(406,t),rn(n.setterTable)}function tn(e,t,n){let{meta:r}=an(e,t);for(let e=0;;)if(r.kind===`aliased`){if(e===n)return rn(r.aliases);e++,r=r.inner.meta}else r.kind===`nullable`||r.kind===`optional`?r=r.inner.meta:r.kind===`array`?r=r.item.meta:C(407,t,String(n))}function nn(e,t){let n=an(e,t),{setter:r}=n;Qt(r)&&r.setterTable!==void 0||C(408,t);let i=String(n.defaultValue);return mn(r.setterTable,i)||C(409,t,i),r.setterTable[i]}function rn(e){return Object.assign(Object.create(null),e)}function an(e,t){let n=e.get(t);return n===void 0&&C(410,t),n}function on(e,t,n,r,i){i!==void 0&&sn.add(i);let a=n===void 0,o=a?e(void 0):n;return a&&un(o),Object.assign(e,{accepts:i,defaultValue:o,isEqual:r,meta:t})}var sn=new WeakSet,cn=new WeakSet;function ln(e){return typeof e==`object`&&e&&cn.add(e),e}function un(e){if(typeof e==`object`&&e&&!Object.isFrozen(e)&&!cn.has(e)){Object.freeze(e);for(let t of Object.values(e))un(t)}}function dn(e){let{isEqual:t}=e;return t===void 0?void 0:(e,n)=>e==null||n==null?e===n:t(e,n)}function fn(e,t){return n=>t(n)||pn(e,n)}function pn(e,t){let{accepts:n}=e;return n===void 0?function(e,t){let{accepts:n}=e;if(n!==void 0)return pn(e,t)?{parsed:e(t)}:void 0;let r=e(t);return Zt(e,r)&&t!==e.defaultValue?void 0:{parsed:r}}(e,t)!==void 0:n.call(e,t)}function mn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function hn(e=``){return on(t=>typeof t==`string`?t:e,{kind:`string`},void 0,void 0,e=>typeof e==`string`)}var gn=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function _n(e=0,t={}){let{integer:n,clamp:r}=t,i=n&&t.min!==void 0?Math.ceil(t.min):t.min,a=n&&t.max!==void 0?Math.floor(t.max):t.max,o=e=>typeof e==`string`&&gn.test(e)?Number(e):e,s=e=>typeof e==`number`&&Number.isFinite(e)&&(!n||Number.isInteger(e)),c=e=>s(e)&&(i===void 0||e>=i)&&(a===void 0||e<=a);return on(t=>{let n=o(t);return r&&s(n)?i!==void 0&&n<i?i:a!==void 0&&n>a?a:n:c(n)?n:e},{clamp:r,integer:n,kind:`number`,max:a,min:i},void 0,void 0,e=>r?s(o(e)):c(o(e)))}function vn(e=!1){return on(t=>typeof t==`boolean`?t:e,{kind:`boolean`},void 0,void 0,e=>typeof e==`boolean`)}function yn(e,...t){let n=ln(t.length===0?e[0]:t[0]),r=new Set(e);return on(e=>e!==void 0&&r.has(e)?e:n,{kind:`enum`,values:e},n,void 0,e=>r.has(e)&&(e!==void 0||n===void 0))}function bn(e,t={}){let{defaultAsNull:n}=t;return on(t=>{if(t==null)return null;let r=e(t);return n&&Zt(e,r)?null:r},{defaultAsNull:n,inner:e,kind:`nullable`},void 0,dn(e),fn(e,e=>e==null))}function xn(e,t={}){let{omitDefault:n}=t;return on(t=>{if(t===void 0)return;let r=e(t);return n&&Zt(e,r)?void 0:r},{inner:e,kind:`optional`,omitDefault:n},void 0,dn(e),fn(e,e=>e===void 0))}function Sn(){return e=>function(e){return{meta:{fields:e,kind:`node`}}}(e)}function Cn(e,t){let n=e=>typeof e==`string`&&mn(t,e);return on(r=>n(r)?t[r]:e(r),{aliases:t,inner:e,kind:`aliased`},e.defaultValue,e.isEqual,t=>n(t)||pn(e,t))}function wn(e){return on(t=>{if(!Array.isArray(t))return[];let n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e(t[r]);return n},{item:e,kind:`array`},void 0,(t,n)=>{if(!Array.isArray(t)||!Array.isArray(n)||t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!Xt(e,t[r],n[r]))return!1;return!0},e=>Array.isArray(e))}function Tn(e,t){return Dn(0,e,{getter:{field:t.field,getterTable:t.getterTable,method:t.getter,when:t.when},setter:{field:t.field,method:t.setter,setterTable:t.setterTable}})}function En(e,t){return Dn(0,e,t)}function Dn(e,t,n){return Object.assign(e=>t(e),{accepts:t.accepts,defaultValue:t.defaultValue,getter:n.getter,isEqual:t.isEqual,meta:t.meta,setter:n.setter})}var On=`latest`,kn=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;schema;constructor(e,t){this.key=e;let n=`meta`in(r=t.parse)&&typeof r.meta==`object`&&r.meta!==null&&`kind`in r.meta&&typeof r.meta.kind==`string`&&`defaultValue`in r?t.parse:void 0;var r;this.schema=n,this.parse=t.parse.bind(t),this.unparse=(t.unparse||zn).bind(t),this.isEqual=t.isEqual?t.isEqual.bind(t):n!==void 0&&n.isEqual!==void 0?(e,t)=>Xt(n,e,t):Object.is,this.defaultValue=n===void 0?this.parse(void 0):n.defaultValue,this.resetOnCopyNode=t.resetOnCopyNode||!1}};function An(e,t){return new kn(e,t)}function jn(e,t,n=On){let r=(n===`latest`?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function Mn(e,t,n){let r;if(Fs(),typeof n==`function`){let i=e.getLatest(),a=jn(i,t);if(r=n(a),t.isEqual(a,r))return i}else r=n;let i=e.getWritable();return In(i).updateFromKnown(t,r),i}function Nn(e){let t=new Map,n=new Set;for(let{ownNodeConfig:r}of Md(typeof e==`function`?e:e.replace))if(r&&r.stateConfigs)for(let e of r.stateConfigs){let r;`stateConfig`in e?(r=e.stateConfig,e.flat&&n.add(r.key)):r=e,t.set(r.key,r)}return{flatKeys:n,sharedConfigMap:t}}var Pn=new Set([`__proto__`,`constructor`,`prototype`]),Fn=class e{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n=void 0,r=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;let{sharedConfigMap:a}=this.sharedNodeState,o=i===void 0?function(e,t,n){let r=n.size;if(t)for(let i in t){let t=e.get(i);t&&n.has(t)||r++}return r}(a,n,r):i;this.size=o}getValue(e){let t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];t!==void 0&&(n=e.parse(t)),this.updateFromKnown(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(let n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return Rn(e)&&(t.$=e),t}getWritable(t){if(this.node===t)return this;let{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new e(t,n,function(e,t,n){let r;if(n)for(let[i,a]of Object.entries(n)){if(Pn.has(i))continue;let n=e.get(i);n?t.has(n)||t.set(n,n.parse(a)):(r||={},r[i]=a)}return r}(n.sharedConfigMap,i,r),i,this.size)}resetOnCopyNode(){for(let e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){let n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);let{knownState:r,unknownState:i}=this;r.has(e)||i&&n in i||(i&&(delete i[n],this.unknownState=Rn(i)),this.size++),r.set(e,t)}updateFromUnknown(e,t){if(Pn.has(e))return;let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}};function In(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new Fn(t,function(e){return e.__state?e.__state.sharedNodeState:ol(Wu(),e.getType()).sharedNodeState}(t));return t.__state=n,n}function Ln(e,t){let n=e.getWritable(),r=t.$;return(n.__state||r)&&In(e).updateFromJSON(r),n}function Rn(e){if(e)for(let t in e)return e}function zn(e){return e}function Bn(e,t,n){for(let[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=n?n.getValue(r):r.defaultValue;if(t!==i&&!r.isEqual(t,i))return!0}return!1}function Vn(e,t,n){let{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(let[t,n]of Object.entries(r))if(!e.has(t)&&(e.add(t),n!==(i?i[t]:void 0)))return!0}return!1}function Hn(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function Un(e,t){let n=e.__mode,r=e.__format,i=e.__style,a=t.__mode,o=t.__format,s=t.__style,c=e.__state,l=t.__state;return(n===null||n===a)&&(r===null||r===o)&&(i===null||i===s)&&(e.__state===null||c===l||function(e,t){if(e===t)return!0;let n=new Set;return!(e&&Bn(n,e,t)||t&&Bn(n,t,e)||e&&Vn(n,e,t)||t&&Vn(n,t,e))}(c,l))}function Wn(e,t){let n=e.mergeWithSibling(t),r=M()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function Gn(e){let t,n,r=e;if(r.__text!==``||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&O(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==``){if(Un(t,r)){r=Wn(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&O(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==``){if(Un(r,n)){r=Wn(r,n);break}break}n.remove()}}else r.remove()}function Kn(e){return qn(e.anchor),qn(e.focus),e}function qn(e){for(;e.type===`element`;){let t=e.getNode(),n=e.offset,r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),O(r)){e.set(r.__key,i?r.getTextContentSize():0,`text`,!0);break}if(!N(r))break;e.set(r.__key,i?r.getChildrenSize():0,`element`,!0)}}var Jn=Symbol.for(`@lexical/CachedTextSize`);function Yn(e,t){return ur.read(()=>{let n=0,r=e;for(let e=0;e<t&&r!==null;e++){let i=lr.get(r);if(i===void 0&&C(345,r),N(i)){let a=dr.get(r);if(a!==void 0&&N(a)&&a.__parent!==i.__parent)n+=i.getTextContentSize();else{let e=fr.get(r),t=e&&e.__lexicalTextContent;typeof t!=`string`&&C(346,i.getType()),n+=t.length}e<t-1&&!i.isInline()&&(n+=2)}else{let e=i[Jn];e===void 0&&C(347,i.getType(),r),n+=e}r=i.__next}return n},{editor:w})}function Xn(e){N(e)||e[Jn]===void 0&&(e[Jn]=O(e)?e.__text.length:e.getTextContentSize())}var Zn=4,Qn,w,$n,T=``,er=null,tr=null,nr=null;function rr(){return{firstTextKey:nr,format:er,style:tr}}function ir(e){e.firstTextKey!==null&&(er=e.format,tr=e.style,nr=e.firstTextKey)}function ar(e){if(nr!==null)return;let t=e.__lexicalFirstTextKey;if(t===void 0&&C(348),t===null)return;let n=dr.get(t);O(n)&&(er=n.getFormat(),tr=n.getStyle(),nr=t)}var or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr=!1,_r=!1;function vr(e,t){let n=lr.get(e),r=dr.has(e);if(t!==null){let n=Ur(e);n.parentNode===t&&t.removeChild(n)}if(!r){if(w._keyToDOMMap.delete(e),N(n)){let e=Fd(n,lr);yr(e,0,e.length-1,null)}if(n!==void 0){for(let e of Or(n).values()){let t=Ar(e);vr(e,null),t!==null&&t.remove()}Xl(mr,$n,or,n,`destroyed`)}}}function yr(e,t,n,r){for(let i=t;i<=n;++i){let t=e[i];t!==void 0&&vr(t,r)}}function br(e,t){e.setProperty(`text-align`,t)}var xr=`40px`;function Sr(e,t){let n=Qn.theme.indent;if(typeof n==`string`){let r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}e.style.setProperty(`padding-inline-start`,t===0?``:`calc(${t} * var(--lexical-indent-base-value, ${xr}))`),Jl(e,`class`),Jl(e,`style`)}function Cr(e,t){let n=e.style;t===0?br(n,``):t===1?br(n,`left`):t===2?br(n,`center`):t===3?br(n,`right`):t===4?br(n,`justify`):t===5?br(n,`start`):t===6&&br(n,`end`),Jl(e,`style`)}function wr(e,t){let n=function(e){let t=e.__dir;if(t!==null)return t;if(F(e))return null;let n=e.getParent();return n===null||V(n)&&n.__dir===null?`auto`:null}(t);n===null?e.removeAttribute(`dir`):e.dir=n}function Tr(e){let t=H().createElement(`div`);return t.setAttribute(`data-lexical-slot`,e),t.style.display=`none`,t}function Er(e,t,n){t||e.contentEditable===`false`?ad(n,w):n.removeAttribute(`contenteditable`)}function Dr(e,t,n){let r=T,i=rr();T=``;let a=``,o=P(e);for(let[r,i]of n){let n=Tr(r);Er(t,o,n),t.appendChild(n),T=``;let s=rr();Mr(i,Ku(e,n,w)),ir(s),kr(e,r,t,n),a+=T}return ir(i),T=r,a}function Or(e){return Rd(e)&&e.__slots!==null?e.__slots:Ld}function kr(e,t,n,r){let i=hr.$getSlotTargetElement(e,t,n,w);i!==null&&(r.parentElement!==i&&i.appendChild(r),r.style.display=``)}function Ar(e){let t=fr.get(e);return t===void 0?null:t.parentElement}function jr(e,t,n){let r=Or(e),i=Or(t);for(let[e,t]of r)if(!i.has(e)){let e=Ar(t);vr(t,null),e!==null&&e.remove()}let a=T,o=rr(),s=``,c=null,l=P(t);for(let[e,a]of i){let i=r.get(e),o=i===void 0?null:Ar(i);T=``;let u=rr();if(o===null){o=Tr(e);let r=null;for(let e of n.children)if(!e.hasAttribute(`data-lexical-slot`)){r=e;break}n.insertBefore(o,r),Mr(a,Ku(t,o,w))}else i===a?Rr(a,o):(i!==void 0&&vr(i,o),Mr(a,Ku(t,o,w)));if(ir(u),Er(n,l,o),kr(t,e,n,o),s+=T,o.parentElement===n){let e=c===null?n.firstChild:c.nextSibling;e!==o&&n.insertBefore(o,e),c=o}}return ir(o),T=a,s}function Mr(e,t){let n=dr.get(e);if(n===void 0&&C(60),t!==null){let r=lr.get(e);if(r!==void 0){let i=fr.get(e);if(i!==void 0){let a=zd(r)?r.__slotHost:null,o=zd(n)?n.__slotHost:null,s=r.__parent!==n.__parent||a!==o,c=o!==null&&i.parentElement!==t.element;if(s||c)return t.insertChild(i),Rr(e,t.element)}}}let r=hr.$createDOM(n,w);if(function(e,t,n){let r=n._keyToDOMMap;Dl(t,n,e),r.set(e,t)}(e,r,w),O(n)?r.setAttribute(`data-lexical-text`,`true`):P(n)&&(r.setAttribute(`data-lexical-decorator`,`true`),rd(r,{captureSelection:!0})),N(n)){let e=n.__indent,t=n.__size;wr(r,n),e!==0&&Sr(r,e);let i=Or(n),a=i.size>0?Dr(n,r,i):``;if(t===0)r.__lexicalTextContent=a,r.__lexicalFirstTextKey=null,T+=a,i.size>0&&(r.__lexicalSlotTextLength=a.length);else{let e=T,o=t-1;if(Nr(Fd(n,dr),n,0,o,Ku(n,r,w)),a!==``){let t=r.__lexicalTextContent||``;r.__lexicalTextContent=a+t,T=e+a+t}i.size>0&&(r.__lexicalSlotTextLength=a.length)}let o=n.__format;o!==0&&Cr(r,o),n.isInline()||(Ir(0,n,r),Fr(n,r))}else{let t=n.getTextContent();if(P(n)){let t=n.decorate(w,Qn);t!==null&&zr(e,t),r.contentEditable=`false`;let i=Or(n);i.size>0&&Dr(n,r,i)}T+=t}return t!==null&&t.insertChild(r),hr.$decorateDOM(n,null,r,w),Xn(n),Xl(mr,$n,or,n,`created`),r}function Nr(e,t,n,r,i){let a=T,o=rr();T=``,er=null,tr=null,nr=null;let s=n;for(;s<=r;++s){let t=rr();Mr(e[s],i);let n=dr.get(e[s]);n!==null&&O(n)?er===null&&(er=n.getFormat(),tr=n.getStyle(),nr=n.__key):N(n)&&s<r&&!n.isInline()&&(T+=lt),ir(t)}let c=w._keyToDOMMap.get(t.__key);c===void 0&&C(349,t.__key),c.__lexicalTextContent=T,c.__lexicalFirstTextKey=nr,T=a+T,ir(o)}function Pr(e,t){if(!e)return!1;let n=t.get(e);return P(n)&&!n.isInline()}function Fr(e,t){let n=Ku(e,t,w);n.setDecoratorBoundaryAnchor(`leading`,Pr(e.__first,dr)),n.setDecoratorBoundaryAnchor(`trailing`,Pr(e.__last,dr))}function Ir(e,t,n){let r=Ku(t,n,w),i=function(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return Sc(e)?`line-break`:P(e)&&e.isInline()?`decorator`:null}return`empty`}return null}(t,dr);r.setManagedLineBreak(i)}function Lr(e,t,n){let r=t.__lexicalFirstTextKey;if(r!=null){let t=e.__key,i=r;for(;i!==null;){let e=dr.get(i);if(e===void 0){i=null;break}if(e.__parent===t)break;i=e.__parent}if(i!==null&&!n.has(i)){let e=dr.get(r);if(O(e))return er=e.getFormat(),void(tr=e.getStyle())}}t.__lexicalFirstTextKey=nr}function Rr(e,t){let n=lr.get(e),r=dr.get(e);n!==void 0&&r!==void 0||C(61);let i=gr||cr.has(e)||sr.has(e),a=eu(w,e);if(n===r&&!i){let e;if(N(n)){let t=a.__lexicalTextContent;typeof t!=`string`&&C(355,n.getType()),e=t,ar(a)}else e=n.getTextContent();return T+=e,a}if(n!==r&&i&&Xl(mr,$n,or,r,`updated`),hr.$updateDOM(r,n,a,w)){let n=Mr(e,null);return t===null&&C(62),t.replaceChild(n,a),vr(e,null),n}if(N(n)){N(r)||C(334,e);let t=r.__indent;(gr||t!==n.__indent)&&Sr(a,t);let o=r.__format;(gr||o!==n.__format)&&Cr(a,o);let s=i&&(Or(r).size>0||Or(n).size>0)?jr(n,r,a):``;if(i){let e=T;if(function(e,t,n){var r;er=null,tr=null,nr=null,function(e,t,n){let r=T,i=e.__size,a=t.__size;T=``;let o=n.element,s=w._keyToDOMMap.get(t.__key);s===void 0&&C(351,t.__key);let c=a-i;if(!gr&&Math.abs(c)<=1&&i>=Zn&&e.__first===t.__first&&(c!==0||!w._cloneNotNeeded.has(e.__key))){let i=s.__lexicalTextContent,l=pr.get(e.__key);if(!gr&&typeof i==`string`&&l!==void 0){let a=function(e,t){let n=t.size;if(n===0||n>=e.__size)return null;let r=e.__last,i=null,a=0;for(;r!==null&&a<n;){if(!t.has(r))return null;i=r;let e=dr.get(r);if(e===void 0)return null;r=e.__prev,a++}return a!==n||r!==null&&t.has(r)?null:i}(t,l);if(a!==null){let u=l.size;if(c===0){let e=Yn(a,u),n=a,c=0;for(;n!==null&&c<u;){let e=dr.get(n);if(e===void 0)break;let t=rr();Rr(n,o),O(e)&&er===null&&(er=e.getFormat(),tr=e.getStyle(),nr=e.__key),ir(t),n=e.__next,c++}let d=``;for(n=a,c=0;n!==null&&c<u;){let e=dr.get(n);if(e===void 0)break;let t;if(N(e)){let r=w._keyToDOMMap.get(n),i=r&&r.__lexicalTextContent;typeof i!=`string`&&C(352,e.getType()),t=i}else t=e.getTextContent();d+=t,c<u-1&&N(e)&&!e.isInline()&&(d+=lt),n=e.__next,c++}let f=s.__lexicalSlotTextLength||0,p=f>0?i.slice(f):i,m=p.slice(0,p.length-e)+d;s.__lexicalTextContent=m,T=r+m,Lr(t,s,l);return}if(function(e,t,n,r,i,a,o,s){if(s!==1&&s!==-1||o!==(s===1?2:1))return!1;let c=o-s,l=e.__last;for(let e=0;e<c-1;e++){if(l===null)return!1;let e=lr.get(l);if(e===void 0)return!1;l=e.__prev}if(l===null)return!1;let u=dr.get(a),d=lr.get(l);if(u===void 0||d===void 0||u.__prev!==d.__prev)return!1;let f=[],p=a;for(let e=0;e<o;e++){if(p===null)return!1;f.push(p);let e=dr.get(p);p=e?e.__next:null}let m=[];p=l;for(let e=0;e<c;e++){if(p===null)return!1;m.push(p);let e=lr.get(p);p=e?e.__next:null}let h=new Set(m),g=new Set(f),_=[],v=0,y=0;for(;v<c&&y<o;)if(f[y]===m[v])_.push({key:f[y],kind:`reconcile`}),v++,y++;else if(g.has(m[v])){if(h.has(f[y]))return!1;_.push({key:f[y],kind:`create`,nextIndex:y}),y++}else _.push({key:m[v],kind:`destroy`}),v++;for(;v<c;)_.push({key:m[v++],kind:`destroy`});for(;y<o;)_.push({key:f[y],kind:`create`,nextIndex:y}),y++;let b=Yn(l,c);for(let e of _){let t=rr();if(e.kind===`reconcile`)Rr(e.key,n.element);else if(e.kind===`destroy`)vr(e.key,n.element);else{let t=null;for(let n=e.nextIndex+1;n<o;n++){let e=w._keyToDOMMap.get(f[n]);if(e!==void 0){t=e;break}}Mr(e.key,n.withBefore(t??n.before))}if(e.kind!==`destroy`){let t=dr.get(e.key);t&&O(t)&&er===null&&(er=t.getFormat(),tr=t.getStyle(),nr=t.__key)}ir(t)}let x=``;for(let e=0;e<o;e++){let t=dr.get(f[e]);if(t===void 0)return!1;let n;if(N(t)){let r=w._keyToDOMMap.get(f[e]),i=r&&r.__lexicalTextContent;typeof i!=`string`&&C(350,t.getType()),n=i}else n=t.getTextContent();x+=n,e<o-1&&N(t)&&!t.isInline()&&(x+=lt)}let ee=r.__lexicalSlotTextLength||0,te=ee>0?i.slice(ee):i;return r.__lexicalTextContent=te.slice(0,te.length-b)+x,!0}(e,0,n,s,i,a,u,c)){let e=s.__lexicalTextContent;typeof e!=`string`&&C(353),T=r+e,Lr(t,s,l);return}}}if(c===0){let t=e.__first,n=0;for(;t!==null;){let e=dr.get(t);if(e===void 0)break;let r=gr||cr.has(t)||sr.has(t),i=rr();if(r)Rr(t,o);else{let n,r;if(N(e)){r=fr.get(t);let i=r&&r.__lexicalTextContent;typeof i!=`string`&&C(354,e.getType()),n=i}else n=e.getTextContent();T+=n,r!==void 0&&ar(r)}O(e)?er===null&&(er=e.getFormat(),tr=e.getStyle(),nr=e.__key):N(e)&&n<a-1&&!e.isInline()&&(T+=lt),ir(i),t=e.__next,n++}s.__lexicalTextContent=T,s.__lexicalFirstTextKey=nr,T=r+T;return}}if(i===1&&a===1){let r=e.__first,i=t.__first;if(r===i)Rr(r,o);else{let e=Ur(r),t=Mr(i,null);try{e.parentNode===o?o.replaceChild(t,e):n.insertChild(t)}catch(n){if(typeof n==`object`&&n){let a=`${n.toString()} Parent: ${o.tagName}, new child: {tag: ${t.tagName} key: ${i}}, old child: {tag: ${e.tagName}, key: ${r}}.`;throw Error(a)}throw n}vr(r,null)}let a=dr.get(i);O(a)&&er===null&&(er=a.getFormat(),tr=a.getStyle(),nr=a.__key)}else{let r=Fd(e,lr),s=Fd(t,dr);if(r.length!==i&&C(227),s.length!==a&&C(228),i===0)a!==0&&Nr(s,t,0,a-1,n);else if(a===0){if(i!==0){let e=n.after==null&&n.before==null&&Or(t).size===0&&n.element.__lexicalLineBreak==null;yr(r,0,i-1,e?null:o),e&&(o.textContent=``)}}else(function(e,t,n,r,i,a){let o=r-1,s=i-1,c,l,u=a.getFirstChild(),d=0,f=0;for(;d<=o&&f<=s;){let e=t[d],r=n[f],i=rr();if(e===r)u=Br(Rr(r,a.element)),d++,f++;else{if(l===void 0&&(l=Vr(n,f)),c===void 0)c=Vr(t,d);else if(!c.has(e)){d++,ir(i);continue}if(!l.has(e)){u=Br(Ur(e)),vr(e,a.element),d++,c.delete(e),ir(i);continue}if(c.has(r)){let e=eu(w,r);e!==u&&a.withBefore(u??a.before).insertChild(e),u=Br(Rr(r,a.element)),d++,f++}else Mr(r,a.withBefore(u??a.before)),f++}let o=dr.get(r);o!==null&&O(o)?er===null&&(er=o.getFormat(),tr=o.getStyle(),nr=o.__key):N(o)&&f<=s&&!o.isInline()&&(T+=lt),ir(i)}let p=d>o,m=f>s;if(p&&!m){let t=n[s+1],r=t===void 0?null:w.getElementByKey(t);Nr(n,e,f,s,a.withBefore(r??a.before))}else m&&!p&&yr(t,d,o,a.element)})(t,r,s,i,a,n)}s.__lexicalTextContent=T,s.__lexicalFirstTextKey=nr,T=r+T}(e,t,Ku(t,n,w)),V(t)||(r=t,er==null||er===r.__textFormat||_r||r.setTextFormat(er),function(e){tr==null||tr===e.__textStyle||_r||e.setTextStyle(tr)}(t))}(n,r,a),r.isInline()||(F(r)||Ir(0,r,a),Fr(r,a)),s!==``){let t=a.__lexicalTextContent||``;a.__lexicalTextContent=s+t,T=e+s+t,a.__lexicalSlotTextLength=s.length}else(Or(r).size>0||Or(n).size>0)&&(a.__lexicalSlotTextLength=0)}else{let e=a.__lexicalTextContent;typeof e!=`string`&&C(356,n.getType()),T+=e,ar(a)}if((gr||r.__dir!==n.__dir||r.__parent!==n.__parent)&&(wr(a,r),F(r)&&!gr))for(let e of r.getChildren())N(e)&&wr(eu(w,e.getKey()),e)}else{let t=r.getTextContent();if(P(r)){let t=r.decorate(w,Qn);t!==null&&zr(e,t),i&&(Or(r).size>0||Or(n).size>0)&&jr(n,r,a)}T+=t}if(!_r&&F(r)){let e=r.getLatest();if(e.__cachedText!==T){let t=e.getWritable();t.__cachedText=T,r=t}}return hr.$decorateDOM(r,n,a,w),Xn(r),a}function zr(e,t){let n=w._pendingDecorators,r=w._decorators;if(n===null){if(r[e]===t)return;n=Al(w)}n[e]=t}function Br(e){let t=e.nextSibling;return t!==null&&t===w._blockCursorElement&&(t=t.nextSibling),t}function Vr(e,t){let n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function Hr(e,t,n,r,i,a){T=``,er=null,tr=null,nr=null,gr=r===2,w=n,Qn=n._config,hr=n._config.dom||Zc,$n=n._nodes,or=w._listeners.mutation,sr=i,cr=a,lr=e._nodeMap,ur=e,dr=t._nodeMap,_r=t._readOnly,fr=Nt(n._keyToDOMMap),pr=function(){let e=new Map,t=t=>{for(let n of t){let t=dr.get(n);if(t===void 0)continue;let r=t.__parent;if(r===null)continue;let i=e.get(r);i===void 0&&(i=new Set,e.set(r,i)),i.add(n)}};return t(sr.keys()),t(cr),e}();let o=new Map;return mr=o,Rr(`root`,null),w=void 0,$n=void 0,sr=void 0,cr=void 0,lr=void 0,ur=void 0,dr=void 0,Qn=void 0,fr=void 0,pr=void 0,mr=void 0,hr=Zc,o}function Ur(e){let t=fr.get(e);return t===void 0&&C(75,e),t}function Wr(e){return()=>{}}function E(e){return{type:e}}var Gr=E(`SELECTION_CHANGE_COMMAND`),Kr=E(`SELECTION_INSERT_CLIPBOARD_NODES_COMMAND`),qr=E(`CLICK_COMMAND`),Jr=E(`BEFORE_INPUT_COMMAND`),Yr=E(`INPUT_COMMAND`),Xr=E(`COMPOSITION_START_COMMAND`),Zr=E(`COMPOSITION_END_COMMAND`),Qr=E(`DELETE_CHARACTER_COMMAND`),$r=E(`INSERT_LINE_BREAK_COMMAND`),ei=E(`INSERT_PARAGRAPH_COMMAND`),ti=E(`CONTROLLED_TEXT_INSERTION_COMMAND`),ni=E(`PASTE_COMMAND`),ri=E(`REMOVE_TEXT_COMMAND`),ii=E(`DELETE_WORD_COMMAND`),ai=E(`DELETE_LINE_COMMAND`),oi=E(`FORMAT_TEXT_COMMAND`),si=E(`SET_TEXT_FORMAT_COMMAND`),ci=E(`UNDO_COMMAND`),li=E(`REDO_COMMAND`),ui=E(`KEYDOWN_COMMAND`),di=E(`KEY_ARROW_RIGHT_COMMAND`),fi=E(`MOVE_TO_END`),pi=E(`KEY_ARROW_LEFT_COMMAND`),mi=E(`MOVE_TO_START`),hi=E(`KEY_ARROW_UP_COMMAND`),gi=E(`KEY_ARROW_DOWN_COMMAND`),_i=E(`KEY_ENTER_COMMAND`),vi=E(`KEY_SPACE_COMMAND`),yi=E(`KEY_BACKSPACE_COMMAND`),bi=E(`KEY_ESCAPE_COMMAND`),xi=E(`KEY_DELETE_COMMAND`),Si=E(`KEY_TAB_COMMAND`),Ci=E(`INSERT_TAB_COMMAND`),wi=E(`INDENT_CONTENT_COMMAND`),Ti=E(`OUTDENT_CONTENT_COMMAND`),Ei=E(`DROP_COMMAND`),Di=E(`FORMAT_ELEMENT_COMMAND`),Oi=E(`DRAGSTART_COMMAND`),ki=E(`DRAGOVER_COMMAND`),Ai=E(`DRAGEND_COMMAND`),ji=E(`COPY_COMMAND`),Mi=E(`CUT_COMMAND`),Ni=E(`SELECT_ALL_COMMAND`),Pi=E(`CLEAR_EDITOR_COMMAND`),Fi=E(`CLEAR_HISTORY_COMMAND`),Ii=E(`CAN_REDO_COMMAND`),Li=E(`CAN_UNDO_COMMAND`),Ri=E(`FOCUS_COMMAND`),zi=E(`BLUR_COMMAND`),Bi=E(`KEY_MODIFIER_COMMAND`);function Vi(e,t){return{...t,[vt]:e}}var Hi=Vi(`metaKey`,{ctrlKey:!Ye,metaKey:Ye}),Ui=Vi(`altKey`,{altKey:Ye,ctrlKey:!Ye}),Wi=[[`altKey`,1],[`ctrlKey`,2],[`metaKey`,4],[`shiftKey`,8]];function Gi(e,t,n){let r=e.get(t);r?r.push(n):e.set(t,[n])}var Ki=class{byKey=new Map;byCode=new Map;add(e){let{key:t,modifiers:n={}}=e;t.length>0||C(399);let r=t.toLowerCase();for(let i of function(e){let t=[0];for(let[n,r]of Wi){let i=e[n]||!1;i===`any`?t=t.concat(t.map(e=>e|r)):i&&(t=t.map(e=>e|r))}return t}(n))Gi(this.byKey,`${i}:${r}`,e),t.length===1&&(/[0-9]/.test(t)?Gi(this.byCode,`${i}:Digit${t}`,e):/[a-z]/.test(r)&&Gi(this.byCode,`${i}:Key${r.toUpperCase()}`,e));return this}matches(e){let t=e.key;if(!t)return[];let n=function(e){let t=0;for(let[n,r]of Wi)e[n]&&(t|=r);return t}(e),r=this.byKey.get(`${n}:${t.toLowerCase()}`),i=r?r.slice():[];if(this.byCode.size>0&&!(t.length===1&&t.charCodeAt(0)<=127)){let t=this.byCode.get(`${n}:${e.code}`);t&&i.push(...t)}return i}match(e){return this.matches(e)[0]}};function qi(e){let t=new Ki;for(let n of e)t.add(n);return t}function Ji(e){let t=new Map;return{dispose(){for(let e of t.values())e.dispose();t.clear()},register(n,r){let i=t.get(n);i===void 0&&(i={dispose:e(n,r),holders:new Set},t.set(n,i));let a=()=>{let e=t.get(n);e&&e.holders.delete(a)&&e.holders.size===0&&(t.delete(n),e.dispose())};return i.holders.add(a),a}}}function Yi(e,t,n,r){return e.addEventListener(t,n,r),e.removeEventListener.bind(e,t,n,r)}var Xi=Object.freeze({}),Zi,Qi=new WeakMap,$i=new WeakMap,ea=Ji(e=>(e.addEventListener(`selectionchange`,ja),()=>e.removeEventListener(`selectionchange`,ja)));function ta(e,t,n,r,i,a){let o=e.anchor,s=e.focus,c=o.getNode(),l=M(),u;if(a!==void 0)u=a;else{let e=yu(lu(l));u=e===null?null:Ou(e,l._rootElement)}let d=u===null?null:u.anchorNode,f=o.key,p=l.getElementByKey(f),m=n.length;return f!==s.key||!O(c)||(!i&&(!Qe||l._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||c.isDirty()&&m<2||Fl(n))&&o.offset!==s.offset&&!c.isComposing()||hl(c)||c.isDirty()&&m>1||(i||!Qe)&&p!==null&&!c.isComposing()&&d!==Ju(c,p,l)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||!c.isComposing()&&(c.getFormat()!==e.format||c.getStyle()!==e.style)||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let n=e.anchor.offset,r=t.getParentOrThrow(),i=ml(t);return n===0?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||i||function(e){let t=e.getPreviousSibling();return(O(t)||N(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||i)}(e,c)}function na(e,t){return gl(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function ra(e,t,n){let{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o}=Ou(e,t._rootElement),s=t._inputState;if(s.isSelectionChangeFromDOMUpdate){s.isSelectionChangeFromDOMUpdate=!1;let e=s.selectionChangeFromDOMUpdatePoints;if(s.selectionChangeFromDOMUpdatePoints=null,na(r,i)&&na(a,o)&&!s.postDeleteSelectionToRestore&&(e===null||e.anchorNode===r&&e.anchorOffset===i&&e.focusNode===a&&e.focusOffset===o))return}nc(t,()=>{if(!n)return void z(null);if(!ul(t,r,a))return;let c=j();if(s.postDeleteSelectionToRestore&&k(c)&&c.isCollapsed()){let e=c.anchor,t=s.postDeleteSelectionToRestore.anchor;(e.key===t.key&&e.offset===t.offset+1||e.offset===1&&t.getNode().is(e.getNode().getPreviousSibling()))&&(c=s.postDeleteSelectionToRestore.clone(),z(c))}if(s.postDeleteSelectionToRestore=null,k(c)){let n=c.anchor,l=n.getNode();if(c.isCollapsed()){e.type===`Range`&&r===a&&(c.dirty=!0);let i=lu(t).event,o=i?i.timeStamp:performance.now(),{format:u,style:d,offset:f,key:p,timeStamp:m}=s.collapsedSelectionFormat,h=R(),g=!1===t.isComposing()&&h.getTextContent()===``;if(o<m+200&&n.offset===f&&n.key===p)ia(c,u,d);else if(n.type===`text`)O(l)||C(141),aa(c,l);else if(n.type===`element`&&!g){N(l)||C(259);let e=n.getNode();e.isEmpty()?function(e,t){ia(e,t.getTextFormat(),t.getTextStyle())}(c,e):ia(c,c.format,``)}}else{let e=n.key,t=c.focus.key,r=c.getNodes(),a=r.length,s=c.isBackward(),l=s?o:i,u=s?i:o,d=s?t:e,f=s?e:t,p=st,m=!1;for(let e=0;e<a;e++){let t=r[e],n=t.getTextContentSize();if(O(t)&&n!==0&&!(e===0&&t.__key===d&&l===n||e===a-1&&t.__key===f&&u===0)&&(m=!0,p&=t.getFormat(),p===0))break}c.format=m?p:0}}(function(e,t,n=!1){(n||Xs(e,t))&&e.dispatchCommand(Gr)})(t,c,c!==null&&(c.dirty||!k(c)))})}function ia(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function aa(e,t){ia(e,t.getFormat(),t.getStyle())}function oa(e,t){nc(t,()=>{let n=j(),r=yu(lu(t)),i=ss();if(r){if(k(n)){let e=n.anchor,t=e.getNode();e.type===`element`&&e.offset===0&&n.isCollapsed()&&!F(t)&&R().getChildrenSize()===1&&t.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)&&(r.removeAllRanges(),n.dirty=!0)}else if(e.pointerType===`touch`||e.pointerType===`pen`){let n=Ou(r,t._rootElement).anchorNode;(U(n)||gl(n))&&z(os(i,r,t,e))}}if(Xe&&r!==null&&r.rangeCount===0){let n=t._rootElement;if(n!==null&&e.target===n){let a=e.clientY,o=n.childNodes.length;for(let e=0;e<n.childNodes.length;e++){let t=n.childNodes[e];if(U(t)){let n=t.getBoundingClientRect();if(a<=(n.top+n.bottom)/2){o=e;break}}}r.setBaseAndExtent(n,o,n,o);let s=os(i,r,t,e);s===null?r.removeAllRanges():z(s)}}B(t,qr,e)})}function sa(e,t){let n=Pu(e),r=e.pointerType;Lu(n)&&r!==`touch`&&r!==`pen`&&e.button===0&&nc(t,()=>{od(n,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}function ca(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return t.length===0?null:t[0]}function la(e){let{lastKeyCode:t}=M()._inputState;if(e==null||e.length<=1||t==null)return;let n=t.length===1?t:t===`Enter`?`
4
4
  `:t===`Tab`?` `:null;if(!n)return;let r=j();if(!k(r)||!r.isCollapsed())return;let i=r.anchor.getNode();if(!O(i))return;let{offset:a}=r.anchor;if(i.getTextContentSize()===a){let e=i.getNextSibling();if(n===`