showai-reader 0.9.0 → 0.10.0-reader.uevm5c4a

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 (66) hide show
  1. package/README.md +2 -2
  2. package/chunks/CardGrid-B5ZPO2BI.js +2 -0
  3. package/chunks/CommandReference-HHKCV753.js +3 -0
  4. package/chunks/ComparisonMatrix-RIUGQRNA.js +1 -0
  5. package/chunks/EventTimeline-AEWZDJSH.js +2 -0
  6. package/chunks/ExperimentTracker-W2H5ZDFY.js +1 -0
  7. package/chunks/{ExternalDiagram-3BONLRGZ.js → ExternalDiagram-SIOOYLR7.js} +7924 -4810
  8. package/chunks/Flowchart-6ZTZQZXC.js +12 -0
  9. package/chunks/{G2Chart-GQH7Q6PL.js → G2Chart-CWQQA4ZV.js} +2 -2
  10. package/chunks/LayerDiagram-GTULFZZP.js +2 -0
  11. package/chunks/{Mindmap-UMIFB7CR.js → Mindmap-7GTBDPMC.js} +2 -2
  12. package/chunks/RichTextEditor-PNTZXV2D.js +155 -0
  13. package/chunks/Roadmap-7TFBP7BZ.js +2 -0
  14. package/chunks/{Scene3D-J7TCRL6V.js → Scene3D-YUDPPF42.js} +2 -2
  15. package/chunks/SequenceDiagram-RWUR35XN.js +2 -0
  16. package/chunks/StatusTree-VXXL53J4.js +1 -0
  17. package/chunks/StepGuide-GJ3LBGVS.js +1 -0
  18. package/chunks/StructureBrowser-LXVTJ4CR.js +3 -0
  19. package/chunks/Waterfall-T4FNP6RH.js +2 -0
  20. package/chunks/chunk-2CCUVSMI.js +1 -0
  21. package/chunks/chunk-2YDDS4TW.js +1 -0
  22. package/chunks/{chunk-MPVTJQTD.js → chunk-36N4B6F4.js} +2 -2
  23. package/chunks/chunk-3RZMLHCB.js +1 -0
  24. package/chunks/{chunk-WDYURK6F.js → chunk-5AW2WUSZ.js} +1 -1
  25. package/chunks/chunk-7G6RMB6W.js +5 -0
  26. package/chunks/chunk-AIBH6MTQ.js +1 -0
  27. package/chunks/chunk-DCANE7XH.js +1 -0
  28. package/chunks/chunk-DVIFPZLZ.js +2 -0
  29. package/chunks/chunk-GLP5VV7P.js +1 -0
  30. package/chunks/chunk-IBO6QHGV.js +4 -0
  31. package/chunks/chunk-J6IRWTF7.js +1 -0
  32. package/chunks/chunk-JXKAISUX.js +1 -0
  33. package/chunks/{chunk-CEJFAFXK.js → chunk-LSZMAKEI.js} +43 -40
  34. package/chunks/chunk-LWAPR3HQ.js +1 -0
  35. package/chunks/{chunk-LY26FKQZ.js → chunk-MENLQ7WW.js} +1 -1
  36. package/chunks/chunk-MGSP3OGB.js +9 -0
  37. package/chunks/chunk-N2G7RUAJ.js +1 -0
  38. package/chunks/{chunk-SWLYSV5D.js → chunk-P2CMIXOU.js} +1 -1
  39. package/chunks/chunk-S4EP5SMX.js +21 -0
  40. package/chunks/{chunk-4QSHXFHM.js.LEGAL.txt → chunk-S4EP5SMX.js.LEGAL.txt} +24 -8
  41. package/chunks/{chunk-7GHGKKPY.js → chunk-SNEZ3O5V.js} +1 -1
  42. package/chunks/{chunk-LAAA5HWB.js → chunk-VRAMSIGC.js} +1 -1
  43. package/chunks/chunk-XI4I5HQF.js +1 -0
  44. package/chunks/code-highlighting-F3WJZEML.js +1 -0
  45. package/chunks/{pdf-engine-PQMJ3BVE.js → pdf-engine-XQHKQXXX.js} +1 -1
  46. package/index.js +1 -1
  47. package/manifest.json +6 -5
  48. package/package.json +1 -1
  49. package/reader-UEVM5C4A.js +46 -0
  50. package/chunks/ComparisonMatrix-SYFIP5WP.js +0 -1
  51. package/chunks/ExperimentTracker-HOUNXCEC.js +0 -1
  52. package/chunks/Flowchart-72CIZ5IT.js +0 -10
  53. package/chunks/RichTextEditor-YMFOBGOU.js +0 -155
  54. package/chunks/StatusTree-MDKGDYK5.js +0 -1
  55. package/chunks/chunk-4QSHXFHM.js +0 -21
  56. package/chunks/chunk-6WHB3GS2.js +0 -2
  57. package/chunks/chunk-DUIGVKKG.js +0 -1
  58. package/chunks/chunk-M3KEZP5Z.js +0 -1
  59. package/chunks/chunk-QSELZI5S.js +0 -1
  60. package/chunks/chunk-YSVZKKKM.js +0 -1
  61. package/reader-N3YKYCK3.js +0 -40
  62. /package/chunks/{Flowchart-72CIZ5IT.js.LEGAL.txt → Flowchart-6ZTZQZXC.js.LEGAL.txt} +0 -0
  63. /package/chunks/{G2Chart-GQH7Q6PL.js.LEGAL.txt → G2Chart-CWQQA4ZV.js.LEGAL.txt} +0 -0
  64. /package/chunks/{Scene3D-J7TCRL6V.js.LEGAL.txt → Scene3D-YUDPPF42.js.LEGAL.txt} +0 -0
  65. /package/chunks/{chunk-MPVTJQTD.js.LEGAL.txt → chunk-36N4B6F4.js.LEGAL.txt} +0 -0
  66. /package/{reader-N3YKYCK3.js.LEGAL.txt → reader-UEVM5C4A.js.LEGAL.txt} +0 -0
@@ -0,0 +1 @@
1
+ import{a as b,c as y,e as x}from"./chunk-2CCUVSMI.js";var s=e=>{throw new Error(e)},E=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function u(e,n,o){(typeof e!="string"||!e.trim())&&s(`${n} must be non-empty text.`),e.length>o&&s(`${n} must be at most ${o} characters.`)}function f(e,n,o){e!==void 0&&u(e,n,o)}function j(e,n,o,i=1){return(!Array.isArray(e)||e.length<i||e.length>o)&&s(`${n} must be an array of ${i} to ${o} items.`),e.forEach((l,a)=>{E(l)||s(`${n}[${a}] must be an object.`)}),e}function A(e,n,o){for(let i of Object.keys(e))n.includes(i)||s(`${o}.${i} is not a supported field.`)}function d(e,n){if(e===void 0)return;let[o]=x(e);o!==void 0&&s(`${n} links to ${o}; only http(s), mailto, # anchors and relative paths are allowed.`)}var w=["dir","file","object","array","field"],I=["name","kind","type","badge","summary","detail","example","exampleLang","children","open"],p={siblings:60,nodes:400,depth:8},g=e=>e.replace(/\/+$/,"")||e,T=e=>e.split("/").filter(Boolean).join("/"),C=e=>e.kind??(e.children?.length?"dir":"file");function U(e){let n=new Map,o=[],i=(l,a,m,h)=>{for(let t of l??[]){let c=(a?`${a}/`:"")+g(t.name),r={node:t,path:c,depth:m,parent:a,kind:C(t),children:[]};n.set(c,r),h.push(c),i(t.children,c,m+1,r.children)}};return i(e,null,0,o),{items:n,roots:o}}function L(e){f(e.caption,"caption",600),d(e.caption,"caption");let n=0,o=new Set,i=(l,a,m,h)=>{h>p.depth&&s(`${a} is nested deeper than ${p.depth} levels.`),j(l,a,p.siblings),l.forEach((t,c)=>{let r=`${a}[${c}]`;n+=1,n>p.nodes&&s(`The structure has more than ${p.nodes} nodes.`),A(t,I,r),u(t.name,`${r}.name`,80),g(t.name).includes("/")&&s(`${r}.name may only end with "/"; it is one path segment.`);let $=(m?`${m}/`:"")+g(t.name);o.has($)&&s(`${r}.name repeats the path ${$}; sibling names must be unique.`),o.add($),t.kind!==void 0&&!w.includes(t.kind)&&s(`${r}.kind must be one of ${w.join(", ")}.`),f(t.type,`${r}.type`,80),f(t.badge,`${r}.badge`,16),f(t.summary,`${r}.summary`,300),f(t.detail,`${r}.detail`,3e3),f(t.example,`${r}.example`,6e3),f(t.exampleLang,`${r}.exampleLang`,24),d(t.summary,`${r}.summary`),d(t.detail,`${r}.detail`),t.exampleLang!==void 0&&t.example===void 0&&s(`${r}.exampleLang needs ${r}.example.`),t.open!==void 0&&typeof t.open!="boolean"&&s(`${r}.open must be true or false.`),t.children!==void 0&&i(t.children,`${r}.children`,$,h+1)})};if(i(e.nodes,"nodes",null,1),e.initial!==void 0){u(e.initial,"initial",400);let l=T(e.initial);o.has(l)||s(`initial ${e.initial} does not match a node path.`)}}var k=["brand","teal","warm","violet","rose","slate"],S=["tile","row"],R=["icon","title","body","href","tag","tone"];function K(e){if(e.columns)return e.columns;let n=e.cards.length;return e.variant==="row"?n>3?2:1:n===4?2:Math.max(1,Math.min(3,n))}function D(e){e.variant!==void 0&&!S.includes(e.variant)&&s(`variant must be one of ${S.join(", ")}.`),e.columns!==void 0&&(!Number.isInteger(e.columns)||e.columns<1||e.columns>4)&&s("columns must be an integer from 1 to 4."),j(e.cards,"cards",24).forEach((n,o)=>{let i=`cards[${o}]`;A(n,R,i),u(n.title,`${i}.title`,80),u(n.body,`${i}.body`,400),f(n.icon,`${i}.icon`,8),f(n.tag,`${i}.tag`,16),n.tone!==void 0&&!k.includes(n.tone)&&s(`${i}.tone must be one of ${k.join(", ")}.`),n.href!==void 0?(u(n.href,`${i}.href`,2e3),b(n.href)||s(`${i}.href must be an http(s), mailto, # anchor or relative link.`),y(n.body).some(l=>l.type==="link")&&s(`${i}.body cannot contain links when the card has an href.`)):d(n.body,`${i}.body`)})}function M(e,n){return E(n)||s("Component data must be an object."),f(n.title,"title",120),e==="structure-browser"?L(n):e==="card-grid"?D(n):s(`Unknown document browsing component ${e}.`),n}export{g as a,T as b,U as c,k as d,K as e,M as f};
@@ -1 +1 @@
1
- import{d as e}from"./chunk-DUIGVKKG.js";var t=e("pdf",{"zh-CN":{loadFailed:"PDF \u65E0\u6CD5\u8BFB\u53D6\uFF1A{error}",pageFailed:"\u9875\u9762\u65E0\u6CD5\u663E\u793A\uFF1A{error}",controls:"PDF \u9605\u8BFB\u63A7\u5236",previousPage:"\u4E0A\u4E00\u9875",pageNumber:"PDF \u9875\u7801",nextPage:"\u4E0B\u4E00\u9875",zoomOut:"\u7F29\u5C0F PDF",fitWidth:"\u9002\u5408\u5BBD\u5EA6",fitWidthLabel:"PDF \u9002\u5408\u5BBD\u5EA6",zoomIn:"\u653E\u5927 PDF",download:"\u4E0B\u8F7D PDF",viewportLabel:"PDF \u7B2C {page} \u9875",loading:"\u6B63\u5728\u8BFB\u53D6 PDF\u2026",openOriginal:"\u6253\u5F00\u539F\u6587\u4EF6",pageContent:"\u7B2C {page} \u9875\u5185\u5BB9",pageText:"\u672C\u9875\u6587\u5B57",document:"PDF \u6587\u6863",emptyTitle:"\u6DFB\u52A0 PDF \u6587\u6863",emptyDescription:"\u5728\u9875\u9762\u4E2D\u7FFB\u9605\u8BBA\u6587\u3001\u62A5\u544A\u4E0E\u8D44\u6599",choose:"\u9009\u62E9 PDF",missingAsset:"PDF \u8D44\u6E90\u4E0D\u5B58\u5728\uFF1A{path}"},en:{loadFailed:"Couldn't read the PDF: {error}",pageFailed:"Couldn't display the page: {error}",controls:"PDF reader controls",previousPage:"Previous page",pageNumber:"PDF page number",nextPage:"Next page",zoomOut:"Zoom out of PDF",fitWidth:"Fit width",fitWidthLabel:"Fit PDF to width",zoomIn:"Zoom in on PDF",download:"Download PDF",viewportLabel:"PDF page {page}",loading:"Reading PDF\u2026",openOriginal:"Open original file",pageContent:"Page {page} content",pageText:"Text on this page",document:"PDF document",emptyTitle:"Add a PDF document",emptyDescription:"Page through papers, reports and references right in the page",choose:"Choose PDF",missingAsset:"PDF resource not found: {path}"}});export{t as a};
1
+ import{a as e}from"./chunk-J6IRWTF7.js";var t=e("pdf",{"zh-CN":{loadFailed:"PDF \u65E0\u6CD5\u8BFB\u53D6\uFF1A{error}",pageFailed:"\u9875\u9762\u65E0\u6CD5\u663E\u793A\uFF1A{error}",controls:"PDF \u9605\u8BFB\u63A7\u5236",previousPage:"\u4E0A\u4E00\u9875",pageNumber:"PDF \u9875\u7801",nextPage:"\u4E0B\u4E00\u9875",zoomOut:"\u7F29\u5C0F PDF",fitWidth:"\u9002\u5408\u5BBD\u5EA6",fitWidthLabel:"PDF \u9002\u5408\u5BBD\u5EA6",zoomIn:"\u653E\u5927 PDF",download:"\u4E0B\u8F7D PDF",viewportLabel:"PDF \u7B2C {page} \u9875",loading:"\u6B63\u5728\u8BFB\u53D6 PDF\u2026",openOriginal:"\u6253\u5F00\u539F\u6587\u4EF6",pageContent:"\u7B2C {page} \u9875\u5185\u5BB9",pageText:"\u672C\u9875\u6587\u5B57",document:"PDF \u6587\u6863",emptyTitle:"\u6DFB\u52A0 PDF \u6587\u6863",emptyDescription:"\u5728\u9875\u9762\u4E2D\u7FFB\u9605\u8BBA\u6587\u3001\u62A5\u544A\u4E0E\u8D44\u6599",choose:"\u9009\u62E9 PDF",missingAsset:"PDF \u8D44\u6E90\u4E0D\u5B58\u5728\uFF1A{path}"},en:{loadFailed:"Couldn't read the PDF: {error}",pageFailed:"Couldn't display the page: {error}",controls:"PDF reader controls",previousPage:"Previous page",pageNumber:"PDF page number",nextPage:"Next page",zoomOut:"Zoom out of PDF",fitWidth:"Fit width",fitWidthLabel:"Fit PDF to width",zoomIn:"Zoom in on PDF",download:"Download PDF",viewportLabel:"PDF page {page}",loading:"Reading PDF\u2026",openOriginal:"Open original file",pageContent:"Page {page} content",pageText:"Text on this page",document:"PDF document",emptyTitle:"Add a PDF document",emptyDescription:"Page through papers, reports and references right in the page",choose:"Choose PDF",missingAsset:"PDF resource not found: {path}"}});export{t as a};
@@ -0,0 +1,9 @@
1
+ function I(i){this.content=i}I.prototype={constructor:I,find:function(i){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===i)return e;return-1},get:function(i){var e=this.find(i);return e==-1?void 0:this.content[e+1]},update:function(i,e,t){var n=t&&t!=i?this.remove(t):this,r=n.find(i),s=n.content.slice();return r==-1?s.push(t||i,e):(s[r+1]=e,t&&(s[r]=t)),new I(s)},remove:function(i){var e=this.find(i);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new I(t)},addToStart:function(i,e){return new I([i,e].concat(this.remove(i).content))},addToEnd:function(i,e){var t=this.remove(i).content.slice();return t.push(i,e),new I(t)},addBefore:function(i,e,t){var n=this.remove(e),r=n.content.slice(),s=n.find(i);return r.splice(s==-1?r.length:s,0,e,t),new I(r)},forEach:function(i){for(var e=0;e<this.content.length;e+=2)i(this.content[e],this.content[e+1])},prepend:function(i){return i=I.from(i),i.size?new I(i.content.concat(this.subtract(i).content)):this},append:function(i){return i=I.from(i),i.size?new I(this.subtract(i).content.concat(i.content)):this},subtract:function(i){var e=this;i=I.from(i);for(var t=0;t<i.content.length;t+=2)e=e.remove(i.content[t]);return e},toObject:function(){var i={};return this.forEach(function(e,t){i[e]=t}),i},get size(){return this.content.length>>1}};I.from=function(i){if(i instanceof I)return i;var e=[];if(i)for(var t in i)e.push(t,i[t]);return new I(e)};var Ae=I;function Et(i,e,t){for(let n=0;;n++){if(n==i.childCount||n==e.childCount)return i.childCount==e.childCount?null:t;let r=i.child(n),s=e.child(n);if(r==s){t+=r.nodeSize;continue}if(!r.sameMarkup(s))return t;if(r.isText&&r.text!=s.text){let o=r.text,a=s.text,l=0;for(;o[l]==a[l];l++)t++;return l&&l<o.length&&l<a.length&&Mt(o.charCodeAt(l-1))&&bt(o.charCodeAt(l))&&t--,t}if(r.content.size||s.content.size){let o=Et(r.content,s.content,t+1);if(o!=null)return o}t+=r.nodeSize}}function vt(i,e,t,n){for(let r=i.childCount,s=e.childCount;;){if(r==0||s==0)return r==s?null:{a:t,b:n};let o=i.child(--r),a=e.child(--s),l=o.nodeSize;if(o==a){t-=l,n-=l;continue}if(!o.sameMarkup(a))return{a:t,b:n};if(o.isText&&o.text!=a.text){let h=o.text,c=a.text,u=h.length,f=c.length;for(;u>0&&f>0&&h[u-1]==c[f-1];)u--,f--,t--,n--;return u&&f&&u<h.length&&Mt(h.charCodeAt(u-1))&&bt(h.charCodeAt(u))&&(t++,n++),{a:t,b:n}}if(o.content.size||a.content.size){let h=vt(o.content,a.content,t-1,n-1);if(h)return h}t-=l,n-=l}}function bt(i){return i>=56320&&i<57344}function Mt(i){return i>=55296&&i<56320}var g=class i{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,t,n,r=0,s){for(let o=0,a=0;a<t;o++){let l=this.content[o],h=a+l.nodeSize;if(h>e&&n(l,r+a,s||null,o)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,t-c),n,r+c)}a=h}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let s="",o=!0;return this.nodesBetween(e,t,(a,l)=>{let h=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?r?typeof r=="function"?r(a):r:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&h||a.isTextblock)&&n&&(o?o=!1:s+=n),s+=h},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),s=1);s<e.content.length;s++)r.push(e.content[s]);return new i(r,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let n=[],r=0;if(t>e)for(let s=0,o=0;o<t;s++){let a=this.content[s],l=o+a.nodeSize;l>e&&((o<e||l>t)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,t-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,t-o-1))),n.push(a),r+=a.nodeSize),o=l}return new i(n,r)}cutByIndex(e,t){return e==t?i.empty:e==0&&t==this.content.length?this:new i(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),s=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new i(r,s)}addToStart(e){return new i([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new i(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return Et(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return vt(this,e,t,n)}findIndex(e){if(e==0)return ge(0,e);if(e==this.size)return ge(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),s=n+r.nodeSize;if(s>=e)return s==e?ge(t+1,s):ge(t,n);n=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return i.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return i.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return i.empty;let t,n=0;for(let r=0;r<e.length;r++){let s=e[r];n+=s.nodeSize,r&&s.isText&&e[r-1].sameMarkup(s)?(t||(t=e.slice(0,r)),t[t.length-1]=s.withText(t[t.length-1].text+s.text)):t&&t.push(s)}return new i(t||e,n)}static from(e){if(!e)return i.empty;if(e instanceof i)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new i([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};g.empty=new g([],0);var Fe={index:0,offset:0};function ge(i,e){return Fe.index=i,Fe.offset=e,Fe}function we(i,e){if(i===e)return!0;if(!(i&&typeof i=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(i);if(Array.isArray(e)!=t)return!1;if(t){if(i.length!=e.length)return!1;for(let n=0;n<i.length;n++)if(!we(i[n],e[n]))return!1}else{for(let n in i)if(!(n in e)||!we(i[n],e[n]))return!1;for(let n in e)if(!(n in i))return!1}return!0}var E=class i{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let s=e[r];if(this.eq(s))return e;if(this.type.excludes(s.type))t||(t=e.slice(0,r));else{if(s.type.excludes(this.type))return e;!n&&s.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(s)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&we(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return i.none;if(e instanceof i)return[e];let t=e.slice();return t.sort((n,r)=>n.type.rank-r.type.rank),t}};E.none=[];var W=class extends Error{},y=class i{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=Ct(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return n&&new i(n,this.openStart,this.openEnd)}removeBetween(e,t){return new i(Tt(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return i.empty;let n=t.openStart||0,r=t.openEnd||0;if(typeof n!="number"||typeof r!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new i(g.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)n++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)r++;return new i(e,n,r)}};y.empty=new y(g.empty,0,0);function Tt(i,e,t){let{index:n,offset:r}=i.findIndex(e),s=i.maybeChild(n),{index:o,offset:a}=i.findIndex(t);if(r==e||s.isText){if(a!=t&&!i.child(o).isText)throw new RangeError("Removing non-flat range");return i.cut(0,e).append(i.cut(t))}if(n!=o)throw new RangeError("Removing non-flat range");return i.replaceChild(n,s.copy(Tt(s.content,e-r-1,t-r-1)))}function Ct(i,e,t,n,r,s){let{index:o,offset:a}=i.findIndex(e),l=i.maybeChild(o);if(a==e||l.isText)return s&&n<=0&&r<=0&&!s.canReplace(o,o,t)?null:i.cut(0,e).append(t).append(i.cut(e));let h=Ct(l.content,e-a-1,t,o==0?n-1:0,o==i.childCount-1?r-1:0,l);return h&&i.replaceChild(o,l.copy(h))}function Sn(i,e,t){if(t.openStart>i.depth)throw new W("Inserted content deeper than insertion position");if(i.depth-t.openStart!=e.depth-t.openEnd)throw new W("Inconsistent open depths");return Rt(i,e,t,0)}function Rt(i,e,t,n){let r=i.index(n),s=i.node(n);if(r==e.index(n)&&n<i.depth-t.openStart){let o=Rt(i,e,t,n+1);return s.copy(s.content.replaceChild(r,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&i.depth==n&&e.depth==n){let o=i.parent,a=o.content;return X(o,a.cut(0,i.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}else{let{start:o,end:a}=En(t,i);return X(s,Nt(i,o,a,e,n))}else return X(s,ke(i,e,n))}function Ot(i,e){if(!e.type.compatibleContent(i.type))throw new W("Cannot join "+e.type.name+" onto "+i.type.name)}function ze(i,e,t){let n=i.node(t);return Ot(n,e.node(t)),n}function V(i,e){let t=e.length-1;t>=0&&i.isText&&i.sameMarkup(e[t])?e[t]=i.withText(e[t].text+i.text):e.push(i)}function re(i,e,t,n){let r=(e||i).node(t),s=0,o=e?e.index(t):r.childCount;i&&(s=i.index(t),i.depth>t?s++:i.textOffset&&(V(i.nodeAfter,n),s++));for(let a=s;a<o;a++)V(r.child(a),n);e&&e.depth==t&&e.textOffset&&V(e.nodeBefore,n)}function X(i,e){if(!i.type.validContent(e))throw new W("Invalid content for node "+i.type.name);return i.copy(e)}function Nt(i,e,t,n,r){let s=i.depth>r&&ze(i,e,r+1),o=n.depth>r&&ze(t,n,r+1),a=[];return re(null,i,r,a),s&&o&&e.index(r)==t.index(r)?(Ot(s,o),V(X(s,Nt(i,e,t,n,r+1)),a)):(s&&V(X(s,ke(i,e,r+1)),a),re(e,t,r,a),o&&V(X(o,ke(t,n,r+1)),a)),re(n,null,r,a),new g(a)}function ke(i,e,t){let n=[];if(re(null,i,t,n),i.depth>t){let r=ze(i,e,t+1);V(X(r,ke(i,e,t+1)),n)}return re(e,null,t,n),new g(n)}function En(i,e){let t=e.depth-i.openStart,r=e.node(t).copy(i.content);for(let s=t-1;s>=0;s--)r=e.node(s).copy(g.from(r));return{start:r.resolveNoCache(i.openStart+t),end:r.resolveNoCache(r.content.size-i.openEnd-t)}}var Se=class i{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let s=0;s<e;s++)r+=n.child(s).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return E.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let a=n;n=r,r=a}let s=n.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!r||!s[o].isInSet(r.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var s=0;s<n.length;s++)n[s].type.spec.inclusive===!1&&(!r||!n[s].isInSet(r.marks))&&(n=n[s--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new De(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],r=0,s=t;for(let o=e;;){let{index:a,offset:l}=o.content.findIndex(s),h=s-l;if(n.push(o,a,r+l),!h||(o=o.child(a),o.isText))break;s=h-1,r+=l+1}return new i(t,n,s)}static resolveCached(e,t){let n=ht.get(e);if(n)for(let s=0;s<n.elts.length;s++){let o=n.elts[s];if(o.pos==t)return o}else ht.set(e,n=new Le);let r=n.elts[n.i]=i.resolve(e,t);return n.i=(n.i+1)%vn,r}},Le=class{constructor(){this.elts=[],this.i=0}},vn=12,ht=new WeakMap,De=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},bn=Object.create(null),D=class i{constructor(e,t,n,r=E.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||g.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&we(this.attrs,t||e.defaultAttrs||bn)&&E.sameSet(this.marks,n||E.none)}copy(e=null){return e==this.content?this:new i(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new i(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return y.empty;let r=this.resolve(e),s=this.resolve(t),o=n?0:r.sharedDepth(t),a=r.start(o),h=r.node(o).content.cut(r.pos-a,s.pos-a);return new y(h,r.depth-o,s.depth-o)}replace(e,t,n){return Sn(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return Se.resolveCached(this,e)}resolveNoCache(e){return Se.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,s=>(n.isInSet(s.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),It(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=g.empty,r=0,s=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,s),a=o&&o.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=r;l<s;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let s=this.contentMatchAt(e).matchType(n),o=s&&s.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),ct(this.type.attrs,this.attrs,"node",this.type.name);let e=E.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];ct(n.type.attrs,n.attrs,"mark",n.type.name),e=n.addToSet(e)}if(!E.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=g.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}};D.prototype.text=void 0;var Be=class i extends D{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):It(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new i(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new i(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function It(i,e){for(let t=i.length-1;t>=0;t--)e=i[t].type.name+"("+e+")";return e}function ct(i,e,t,n){for(let r in e)if(!(r in i))throw new RangeError(`Unsupported attribute ${r} for ${t} of type ${n}`);for(let r in i)i[r].validate&&i[r].validate(e[r])}var K=class i{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new Je(e,t);if(n.next==null)return i.empty;let r=At(n);n.next&&n.err("Unexpected trailing text");let s=In(Nn(r));return An(s,n),s}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let s=t;r&&s<n;s++)r=r.matchType(e.child(s).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function s(o,a){let l=o.matchFragment(e,n);if(l&&(!t||l.validEnd))return g.from(a.map(h=>h.createAndFill()));for(let h=0;h<o.next.length;h++){let{type:c,next:u}=o.next[h];if(!(c.isText||c.hasRequiredAttrs())&&r.indexOf(u)==-1){r.push(u);let f=s(u,a.concat(c));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),s=r.match;if(s.matchType(e)){let o=[];for(let a=r;a.type;a=a.via)o.push(a.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:a,next:l}=s.next[o];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!r.type||l.validEnd)&&(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((n,r)=>{let s=r+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)s+=(o?", ":"")+n.next[o].type.name+"->"+e.indexOf(n.next[o].next);return s}).join(`
2
+ `)}};K.empty=new K(!0);var Je=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}};function At(i){let e=[];do e.push(Mn(i));while(i.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Mn(i){let e=[];do e.push(Tn(i));while(i.next&&i.next!=")"&&i.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Tn(i){let e=On(i);for(;;)if(i.eat("+"))e={type:"plus",expr:e};else if(i.eat("*"))e={type:"star",expr:e};else if(i.eat("?"))e={type:"opt",expr:e};else if(i.eat("{"))e=Cn(i,e);else break;return e}function ft(i){/\D/.test(i.next)&&i.err("Expected number, got '"+i.next+"'");let e=Number(i.next);return i.pos++,e}function Cn(i,e){let t=ft(i),n=t;return i.eat(",")&&(i.next!="}"?n=ft(i):n=-1),i.eat("}")||i.err("Unclosed braced range"),{type:"range",min:t,max:n,expr:e}}function Rn(i,e){let t=i.nodeTypes,n=t[e];if(n)return[n];let r=[];for(let s in t){let o=t[s];o.isInGroup(e)&&r.push(o)}return r.length==0&&i.err("No node type or group '"+e+"' found"),r}function On(i){if(i.eat("(")){let e=At(i);return i.eat(")")||i.err("Missing closing paren"),e}else if(/\W/.test(i.next))i.err("Unexpected token '"+i.next+"'");else{let e=Rn(i,i.next).map(t=>(i.inline==null?i.inline=t.isInline:i.inline!=t.isInline&&i.err("Mixing inline and block content"),{type:"name",value:t}));return i.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Nn(i){let e=[[]];return r(s(i,0),t()),e;function t(){return e.push([])-1}function n(o,a,l){let h={term:l,to:a};return e[o].push(h),h}function r(o,a){o.forEach(l=>l.to=a)}function s(o,a){if(o.type=="choice")return o.exprs.reduce((l,h)=>l.concat(s(h,a)),[]);if(o.type=="seq")for(let l=0;;l++){let h=s(o.exprs[l],a);if(l==o.exprs.length-1)return h;r(h,a=t())}else if(o.type=="star"){let l=t();return n(a,l),r(s(o.expr,l),l),[n(l)]}else if(o.type=="plus"){let l=t();return r(s(o.expr,a),l),r(s(o.expr,l),l),[n(l)]}else{if(o.type=="opt")return[n(a)].concat(s(o.expr,a));if(o.type=="range"){let l=a;for(let h=0;h<o.min;h++){let c=t();r(s(o.expr,l),c),l=c}if(o.max==-1)r(s(o.expr,l),l);else for(let h=o.min;h<o.max;h++){let c=t();n(l,c),r(s(o.expr,l),c),l=c}return[n(l)]}else{if(o.type=="name")return[n(a,void 0,o.value)];throw new Error("Unknown expr type")}}}}function Ft(i,e){return e-i}function ut(i,e){let t=[];return n(e),t.sort(Ft);function n(r){let s=i[r];if(s.length==1&&!s[0].term)return n(s[0].to);t.push(r);for(let o=0;o<s.length;o++){let{term:a,to:l}=s[o];!a&&t.indexOf(l)==-1&&n(l)}}}function In(i){let e=Object.create(null);return t(ut(i,0));function t(n){let r=[];n.forEach(o=>{i[o].forEach(({term:a,to:l})=>{if(!a)return;let h;for(let c=0;c<r.length;c++)r[c][0]==a&&(h=r[c][1]);ut(i,l).forEach(c=>{h||r.push([a,h=[]]),h.indexOf(c)==-1&&h.push(c)})})});let s=e[n.join(",")]=new K(n.indexOf(i.length-1)>-1);for(let o=0;o<r.length;o++){let a=r[o][1].sort(Ft);s.next.push({type:r[o][0],next:e[a.join(",")]||t(a)})}return s}}function An(i,e){for(let t=0,n=[i];t<n.length;t++){let r=n[t],s=!r.validEnd,o=[];for(let a=0;a<r.next.length;a++){let{type:l,next:h}=r.next[a];o.push(l.name),s&&!(l.isText||l.hasRequiredAttrs())&&(s=!1),n.indexOf(h)==-1&&n.push(h)}s&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function zt(i){let e=Object.create(null);for(let t in i){let n=i[t];if(!n.hasDefault)return null;e[t]=n.default}return e}function Lt(i,e){let t=Object.create(null);for(let n in i){let r=i[n],s=e&&e[n];if(s===void 0)if(r.hasDefault)s=r.default;else throw new RangeError("No value supplied for attribute "+n);else r.validate&&r.validate(s);t[n]=s}return t}function Dt(i,e){let t=Object.create(null);if(e)for(let n in e)t[n]=new Pe(i,n,e[n]);return t}var Ee=class i{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=Dt(e,n.attrs),this.defaultAttrs=zt(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==K.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Lt(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new D(this,this.computeAttrs(e),g.from(t),E.setFrom(n))}createChecked(e=null,t,n){return t=g.from(t),this.checkContent(t),new D(this,this.computeAttrs(e),t,E.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=g.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let r=this.contentMatch.matchFragment(t),s=r&&r.fillBefore(g.empty,!0);return s?new D(this,e,t.append(s),E.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:E.none:e}static compile(e,t){let n=Object.create(null);e.forEach((s,o)=>n[s]=new i(s,t,o));let r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let s in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function Fn(i,e,t){let n=t.split("|");return r=>{let s=r===null?"null":typeof r;if(n.indexOf(s)<0)throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${i}, got ${s}`)}}var Pe=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?Fn(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}},se=class i{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=Dt(e,r.attrs),this.excluded=null;let s=zt(this.attrs);this.instance=s?new E(this,s):null}create(e=null){return!e&&this.instance?this.instance:new E(this,Lt(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((s,o)=>n[s]=new i(s,r++,t,o)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}},pt=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=Ae.from(e.nodes),t.marks=Ae.from(e.marks||{}),this.nodes=Ee.compile(this.spec.nodes,this),this.marks=se.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let s=this.nodes[r],o=s.spec.content||"",a=s.spec.marks;if(s.contentMatch=n[o]||(n[o]=K.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=a=="_"?null:a?dt(this,a.split(" ")):a==""||!s.inlineContent?[]:null}for(let r in this.marks){let s=this.marks[r],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:dt(this,o.split(" "))}this.nodeFromJSON=r=>D.fromJSON(this,r),this.markFromJSON=r=>E.fromJSON(this,r),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Ee){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new Be(n,n.defaultAttrs,e,E.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}};function dt(i,e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],s=i.marks[r],o=s;if(s)t.push(s);else for(let a in i.marks){let l=i.marks[a];(r=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(r)>-1)&&t.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return t}function zn(i){return i.tag!=null}function Ln(i){return i.style!=null}var mt=class i{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(r=>{if(zn(r))this.tags.push(r);else if(Ln(r)){let s=/[^=]*/.exec(r.style)[0];n.indexOf(s)<0&&n.push(s),this.styles.push(r)}}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let s=e.nodes[r.node];return s.contentMatch.matchType(s)})}parse(e,t={}){let n=new ve(this,t,!1);return n.addAll(e,E.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new ve(this,t,!0);return n.addAll(e,E.none,t.from,t.to),y.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let s=this.tags[r];if(Jn(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||t.matchesContext(s.context))){if(s.getAttrs){let o=s.getAttrs(e);if(o===!1)continue;s.attrs=o||void 0}return s}}}matchStyle(e,t,n,r){for(let s=r?this.styles.indexOf(r)+1:0;s<this.styles.length;s++){let o=this.styles[s],a=o.style;if(!(a.indexOf(e)!=0||o.context&&!n.matchesContext(o.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(o.getAttrs){let l=o.getAttrs(t);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let t=[];function n(r){let s=r.priority==null?50:r.priority,o=0;for(;o<t.length;o++){let a=t[o];if((a.priority==null?50:a.priority)<s)break}t.splice(o,0,r)}for(let r in e.marks){let s=e.marks[r].spec.parseDOM;s&&s.forEach(o=>{n(o=yt(o)),o.mark||o.ignore||o.clearMark||(o.mark=r)})}for(let r in e.nodes){let s=e.nodes[r].spec.parseDOM;s&&s.forEach(o=>{n(o=yt(o)),o.node||o.ignore||o.mark||(o.node=r)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new i(e,i.schemaRules(e)))}},Bt={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Dn={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Jt={ol:!0,ul:!0},oe=1,We=2,ie=4;function gt(i,e,t){return e!=null?(e?oe:0)|(e==="full"?We:0):i&&i.whitespace=="pre"?oe|We:t&~ie}var _=class{constructor(e,t,n,r,s,o){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=o,this.content=[],this.activeMarks=E.none,this.match=s||(o&ie?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(g.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let n=this.type.contentMatch,r;return(r=n.findWrapping(e.type))?(this.match=n,r):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&oe)){let n=this.content[this.content.length-1],r;if(n&&n.isText&&(r=/[ \t\r\n\u000c]+$/.exec(n.text))){let s=n;n.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-r[0].length))}}let t=g.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(g.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Bt.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},ve=class{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,s,o=gt(null,t.preserveWhitespace,0)|(n?ie:0);r?s=new _(r.type,r.attrs,E.none,!0,t.topMatch||r.type.contentMatch,o):n?s=new _(null,null,E.none,!0,null,o):s=new _(e.schema.topNodeType,null,E.none,!0,null,o),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,s=r.options&We?"full":this.localPreserveWS||(r.options&oe)>0,{schema:o}=this.parser;if(s==="full"||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(s)if(s==="full")n=n.replace(/\r\n?/g,`
3
+ `);else if(o.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(o.linebreakReplacement.create())){let a=n.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(o.linebreakReplacement.create(),t,!0),a[l]&&this.insertNode(o.text(a[l]),t,!/\S/.test(a[l]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let a=r.content[r.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(n=n.slice(1))}n&&this.insertNode(o.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,s=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),a;Jt.hasOwnProperty(o)&&this.parser.normalizeLists&&Bn(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,n));e:if(l?l.ignore:Dn.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let h,c=this.needsBlock;if(Bt.hasOwnProperty(o))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),h=!0,s.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let u=l&&l.skip?t:this.readStyles(e,t);u&&this.addAll(e,u),h&&this.sync(s),this.needsBlock=c}else{let h=this.readStyles(e,t);h&&this.addElementByRule(e,l,h,l.consuming===!1?a:void 0)}this.localPreserveWS=r}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4
+ `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let r=0;r<this.parser.matchedStyles.length;r++){let s=this.parser.matchedStyles[r],o=n.getPropertyValue(s);if(o)for(let a=void 0;;){let l=this.parser.matchStyle(s,o,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?t=t.filter(h=>!l.clearMark(h)):t=t.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return t}addElementByRule(e,t,n,r){let s,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),n,e.nodeName=="BR")||this.leafFallback(e,n);else{let l=this.enter(o,t.attrs||null,n,t.preserveWhitespace);l&&(s=!0,n=l)}else{let l=this.parser.schema.marks[t.mark];n=n.concat(l.create(t.attrs))}let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,n,!1));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l,n),this.findAround(e,l,!1)}s&&this.sync(a)&&this.open--}addAll(e,t,n,r){let s=n||0;for(let o=n?e.childNodes[n]:e.firstChild,a=r==null?null:e.childNodes[r];o!=a;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,t);this.findAtPoint(e,s)}findPlace(e,t,n){let r,s;for(let o=this.open,a=0;o>=0;o--){let l=this.nodes[o],h=l.findWrapping(e);if(h&&(!r||r.length>h.length+a)&&(r=h,s=l,!h.length))break;if(l.solid){if(n)break;a+=2}}if(!r)return null;this.sync(s);for(let o=0;o<r.length;o++)t=this.enterInner(r[o],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(t=this.enterInner(s,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let o=E.none;for(let a of r.concat(e.marks))(s.type?s.type.allowsMarkType(a.type):xt(a.type,e.type))&&(o=a.addToSet(o));return s.content.push(e.mark(o)),!0}return!1}enter(e,t,n,r){let s=this.findPlace(e.create(t),n,!1);return s&&(s=this.enterInner(e,t,n,!0,r)),s}enterInner(e,t,n,r=!1,s){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let a=gt(e,s,o.options);o.options&ie&&o.content.length==0&&(a|=ie);let l=E.none;return n=n.filter(h=>(o.type?o.type.allowsMarkType(h.type):xt(h.type,e))?(l=h.addToSet(l),!1):!0),this.nodes.push(new _(e,t,l,r,null,a)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=oe)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),s=-(n?n.depth+1:0)+(r?0:1),o=(a,l)=>{for(;a>=0;a--){let h=t[a];if(h==""){if(a==t.length-1||a==0)continue;for(;l>=s;l--)if(o(a-1,l))return!0;return!1}else{let c=l>0||l==0&&r?this.nodes[l].type:n&&l>=s?n.node(l-s).type:null;if(!c||c.name!=h&&!c.isInGroup(h))return!1;l--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let n=this.parser.schema.nodes[t];if(n.isTextblock&&n.defaultAttrs)return n}}};function Bn(i){for(let e=i.firstChild,t=null;e;e=e.nextSibling){let n=e.nodeType==1?e.nodeName.toLowerCase():null;n&&Jt.hasOwnProperty(n)&&t?(t.appendChild(e),e=t):n=="li"?t=e:n&&(t=null)}}function Jn(i,e){return(i.matches||i.msMatchesSelector||i.webkitMatchesSelector||i.mozMatchesSelector).call(i,e)}function yt(i){let e={};for(let t in i)e[t]=i[t];return e}function xt(i,e){let t=e.schema.nodes;for(let n in t){let r=t[n];if(!r.allowsMarkType(i))continue;let s=[],o=a=>{s.push(a);for(let l=0;l<a.edgeCount;l++){let{type:h,next:c}=a.edge(l);if(h==e||s.indexOf(c)<0&&o(c))return!0}};if(o(r.contentMatch))return!0}}var wt=class i{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=ye(t).createDocumentFragment());let r=n,s=[];return e.forEach(o=>{if(s.length||o.marks.length){let a=0,l=0;for(;a<s.length&&l<o.marks.length;){let h=o.marks[l];if(!this.marks[h.type.name]){l++;continue}if(!h.eq(s[a][0])||h.type.spec.spanning===!1)break;a++,l++}for(;a<s.length;)r=s.pop()[1];for(;l<o.marks.length;){let h=o.marks[l++],c=this.serializeMark(h,o.isInline,t);c&&(s.push([h,r]),r.appendChild(c.dom),r=c.contentDOM||c.dom)}}r.appendChild(this.serializeNodeInner(o,t))}),n}serializeNodeInner(e,t){if(e.isText)return ye(t).createTextNode(e.text);let{dom:n,contentDOM:r}=xe(ye(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let s=this.serializeMark(e.marks[r],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(n),n=s.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&xe(ye(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return typeof t=="string"?{dom:e.createTextNode(t)}:xe(e,t,n,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new i(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=kt(e.nodes);return t.text||(t.text=n=>n.text),t}static marksFromSchema(e){return kt(e.marks)}};function kt(i){let e={};for(let t in i){let n=i[t].spec.toDOM;n&&(e[t]=n)}return e}function ye(i){return i.document||window.document}var St=new WeakMap;function Pn(i){let e=St.get(i);return e===void 0&&St.set(i,e=Wn(i)),e}function Wn(i){let e=null;function t(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")e||(e=[]),e.push(n);else for(let r=0;r<n.length;r++)t(n[r]);else for(let r in n)t(n[r])}return t(i),e}function xe(i,e,t,n){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let r=e[0],s;if(typeof r!="string")throw new RangeError("Invalid array passed to renderSpec");if(n&&(s=Pn(n))&&s.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=r.indexOf(" ");o>0&&(t=r.slice(0,o),r=r.slice(o+1));let a,l=t?i.createElementNS(t,r):i.createElement(r),h=e[1],c=1;if(h&&typeof h=="object"&&h.nodeType==null&&!Array.isArray(h)){c=2;for(let u in h)if(h[u]!=null){let f=u.indexOf(" ");f>0?l.setAttributeNS(u.slice(0,f),u.slice(f+1),h[u]):u=="style"&&l.style?l.style.cssText=h[u]:l.setAttribute(u,h[u])}}for(let u=c;u<e.length;u++){let f=e[u];if(f===0){if(u<e.length-1||u>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else if(typeof f=="string")l.appendChild(i.createTextNode(f));else{let{dom:d,contentDOM:m}=xe(i,f,t,n);if(l.appendChild(d),m){if(a)throw new RangeError("Multiple content holes");a=m}}}return{dom:l,contentDOM:a}}var Ut=65535,Vt=Math.pow(2,16);function Hn(i,e){return i+e*Vt}function Pt(i){return i&Ut}function qn(i){return(i-(i&Ut))/Vt}var Xt=1,Kt=2,be=4,Yt=8,he=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&Yt)>0}get deletedBefore(){return(this.delInfo&(Xt|be))>0}get deletedAfter(){return(this.delInfo&(Kt|be))>0}get deletedAcross(){return(this.delInfo&be)>0}},J=class i{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&i.empty)return i.empty}recover(e){let t=0,n=Pt(e);if(!this.inverted)for(let r=0;r<n;r++)t+=this.ranges[r*3+2]-this.ranges[r*3+1];return this.ranges[n*3]+t+qn(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let h=this.ranges[a+s],c=this.ranges[a+o],u=l+h;if(e<=u){let f=h?e==l?-1:e==u?1:t:t,d=l+r+(f<0?0:c);if(n)return d;let m=e==(t<0?l:u)?null:Hn(a/3,e-l),x=0;return h&&(x|=e==l?Kt:e==u?Xt:be,(t<0?e!=l:e!=u)&&(x|=Yt)),new he(d,x,m)}r+=c-h}return n?e+r:new he(e+r,0,null)}touches(e,t){let n=0,r=Pt(t),s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?n:0);if(l>e)break;let h=this.ranges[a+s],c=l+h;if(e<=c&&a==r*3)return!0;n+=this.ranges[a+o]-h}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,s=0;r<this.ranges.length;r+=3){let o=this.ranges[r],a=o-(this.inverted?s:0),l=o+(this.inverted?0:s),h=this.ranges[r+t],c=this.ranges[r+n];e(a,a+h,l,l+c),s+=c-h}}invert(){return new i(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?i.empty:new i(e<0?[0,-e,0]:[0,0,e])}};J.empty=new J([]);var Ue=class i{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new i(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],r!=null&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),r!=null&&r>t?n-r-1:void 0)}}invert(){let e=new i;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let s=this.from;s<this.to;s++){let o=this._maps[s],a=o.mapResult(e,t);if(a.recover!=null){let l=this.getMirror(s);if(l!=null&&l>s&&l<this.to){s=l,e=this._maps[l].recover(a.recover);continue}}r|=a.delInfo,e=a.pos}return n?e:new he(e,r,null)}},He=Object.create(null),O=class{getMap(){return J.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=He[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in He)throw new RangeError("Duplicate use of step JSON ID "+e);return He[e]=t,t.prototype.jsonID=e,t}},N=class i{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new i(e,null)}static fail(e){return new i(null,e)}static fromReplace(e,t,n,r){try{return i.ok(e.replace(t,n,r))}catch(s){if(s instanceof W)return i.fail(s.message);throw s}}};function Ke(i,e,t){let n=[];for(let r=0;r<i.childCount;r++){let s=i.child(r);s.content.size&&(s=s.copy(Ke(s.content,e,s))),s.isInline&&(s=e(s,t,r)),n.push(s)}return g.fromArray(n)}var ce=class i extends O{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),s=new y(Ke(t.content,(o,a)=>!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),r),t.openStart,t.openEnd);return N.fromReplace(e,this.from,this.to,s)}invert(){return new Y(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new i(t.pos,n.pos,this.mark)}merge(e){return e instanceof i&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new i(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new i(t.from,t.to,e.markFromJSON(t.mark))}};O.jsonID("addMark",ce);var Y=class i extends O{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new y(Ke(t.content,r=>r.mark(this.mark.removeFromSet(r.marks)),e),t.openStart,t.openEnd);return N.fromReplace(e,this.from,this.to,n)}invert(){return new ce(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new i(t.pos,n.pos,this.mark)}merge(e){return e instanceof i&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new i(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new i(t.from,t.to,e.markFromJSON(t.mark))}};O.jsonID("removeMark",Y);var fe=class i extends O{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return N.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return N.fromReplace(e,this.pos,this.pos+1,new y(g.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let n=this.mark.addToSet(t.marks);if(n.length==t.marks.length){for(let r=0;r<t.marks.length;r++)if(!t.marks[r].isInSet(n))return new i(this.pos,t.marks[r]);return new i(this.pos,this.mark)}}return new ee(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new i(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new i(t.pos,e.markFromJSON(t.mark))}};O.jsonID("addNodeMark",fe);var ee=class i extends O{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return N.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return N.fromReplace(e,this.pos,this.pos+1,new y(g.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new fe(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new i(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new i(t.pos,e.markFromJSON(t.mark))}};O.jsonID("removeNodeMark",ee);var z=class i extends O{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&Ve(e,this.from,this.to)?N.fail("Structure replace would overwrite content"):N.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new J([this.from,this.to-this.from,this.slice.size])}invert(e){return new i(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),n=this.from==this.to&&i.MAP_BIAS<0?t:e.mapResult(this.from,1);return n.deletedAcross&&t.deletedAcross?null:new i(n.pos,Math.max(n.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof i)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?y.empty:new y(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new i(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?y.empty:new y(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new i(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new i(t.from,t.to,y.fromJSON(e,t.slice),!!t.structure)}};z.MAP_BIAS=1;O.jsonID("replace",z);var B=class i extends O{constructor(e,t,n,r,s,o,a=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=s,this.insert=o,this.structure=a}apply(e){if(this.structure&&(Ve(e,this.from,this.gapFrom)||Ve(e,this.gapTo,this.to)))return N.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return N.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?N.fromReplace(e,this.from,this.to,n):N.fail("Content does not fit in gap")}getMap(){return new J([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new i(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||s>n.pos?null:new i(t.pos,n.pos,r,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new i(t.from,t.to,t.gapFrom,t.gapTo,y.fromJSON(e,t.slice),t.insert,!!t.structure)}};O.jsonID("replaceAround",B);function Ve(i,e,t){let n=i.resolve(e),r=t-e,s=n.depth;for(;r>0&&s>0&&n.indexAfter(s)==n.node(s).childCount;)s--,r--;if(r>0){let o=n.node(s).maybeChild(n.indexAfter(s));for(;r>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,r--}}return!1}function Un(i,e,t,n){let r=[],s=[],o,a;i.doc.nodesBetween(e,t,(l,h,c)=>{if(!l.isInline)return;let u=l.marks;if(!n.isInSet(u)&&c.type.allowsMarkType(n.type)){let f=Math.max(h,e),d=Math.min(h+l.nodeSize,t),m=n.addToSet(u);for(let x=0;x<u.length;x++)u[x].isInSet(m)||(o&&o.to==f&&o.mark.eq(u[x])?o.to=d:r.push(o=new Y(f,d,u[x])));a&&a.to==f?a.to=d:s.push(a=new ce(f,d,n))}}),r.forEach(l=>i.step(l)),s.forEach(l=>i.step(l))}function Vn(i,e,t,n){let r=[],s=0;i.doc.nodesBetween(e,t,(o,a)=>{if(!o.isInline)return;s++;let l=null;if(n instanceof se){let h=o.marks,c;for(;c=n.isInSet(h);)(l||(l=[])).push(c),h=c.removeFromSet(h)}else n?n.isInSet(o.marks)&&(l=[n]):l=o.marks;if(l&&l.length){let h=Math.min(a+o.nodeSize,t);for(let c=0;c<l.length;c++){let u=l[c],f;for(let d=0;d<r.length;d++){let m=r[d];m.step==s-1&&u.eq(r[d].style)&&(f=m)}f?(f.to=h,f.step=s):r.push({style:u,from:Math.max(a,e),to:h,step:s})}}}),r.forEach(o=>i.step(new Y(o.from,o.to,o.style)))}function Ye(i,e,t,n=t.contentMatch,r=!0){let s=i.doc.nodeAt(e),o=[],a=e+1;for(let l=0;l<s.childCount;l++){let h=s.child(l),c=a+h.nodeSize,u=n.matchType(h.type);if(!u)o.push(new z(a,c,y.empty));else{n=u;for(let f=0;f<h.marks.length;f++)t.allowsMarkType(h.marks[f].type)||i.step(new Y(a,c,h.marks[f]));if(r&&h.isText&&t.whitespace!="pre"){let f,d=/\r?\n|\r/g,m;for(;f=d.exec(h.text);)m||(m=new y(g.from(t.schema.text(" ",t.allowedMarks(h.marks))),0,0)),o.push(new z(a+f.index,a+f.index+f[0].length,m))}}a=c}if(!n.validEnd){let l=n.fillBefore(g.empty,!0);i.replace(a,a,new y(l,0,0))}for(let l=o.length-1;l>=0;l--)i.step(o[l])}function Xn(i,e,t){return(e==0||i.canReplace(e,i.childCount))&&(t==i.childCount||i.canReplace(0,t))}function xr(i){let t=i.parent.content.cutByIndex(i.startIndex,i.endIndex);for(let n=i.depth,r=0,s=0;;--n){let o=i.$from.node(n),a=i.$from.index(n)+r,l=i.$to.indexAfter(n)-s;if(n<i.depth&&o.canReplace(a,l,t))return n;if(n==0||o.type.spec.isolating||!Xn(o,a,l))break;a&&(r=1),l<o.childCount&&(s=1)}return null}function Kn(i,e,t){let{$from:n,$to:r,depth:s}=e,o=n.before(s+1),a=r.after(s+1),l=o,h=a,c=g.empty,u=0;for(let m=s,x=!1;m>t;m--)x||n.index(m)>0?(x=!0,c=g.from(n.node(m).copy(c)),u++):l--;let f=g.empty,d=0;for(let m=s,x=!1;m>t;m--)x||r.after(m+1)<r.end(m)?(x=!0,f=g.from(r.node(m).copy(f)),d++):h++;i.step(new B(l,h,o,a,new y(c.append(f),u,d),c.size-u,!0))}function wr(i,e,t=null,n=i){let r=Yn(i,e),s=r&&Gn(n,e);return s?r.map(Wt).concat({type:e,attrs:t}).concat(s.map(Wt)):null}function Wt(i){return{type:i,attrs:null}}function Yn(i,e){let{parent:t,startIndex:n,endIndex:r}=i,s=t.contentMatchAt(n).findWrapping(e);if(!s)return null;let o=s.length?s[0]:e;return t.canReplaceWith(n,r,o)?s:null}function Gn(i,e){let{parent:t,startIndex:n,endIndex:r}=i,s=t.child(n),o=e.contentMatch.findWrapping(s.type);if(!o)return null;let l=(o.length?o[o.length-1]:e).contentMatch;for(let h=n;l&&h<r;h++)l=l.matchType(t.child(h).type);return!l||!l.validEnd?null:o}function Qn(i,e,t){let n=g.empty;for(let o=t.length-1;o>=0;o--){if(n.size){let a=t[o].type.contentMatch.matchFragment(n);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=g.from(t[o].type.create(t[o].attrs,n))}let r=e.start,s=e.end;i.step(new B(r,s,r,s,new y(n,0,0),t.length,!0))}function Zn(i,e,t,n,r){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=i.steps.length;i.doc.nodesBetween(e,t,(o,a)=>{let l=typeof r=="function"?r(o):r;if(o.isTextblock&&!o.hasMarkup(n,l)&&jn(i.doc,i.mapping.slice(s).map(a),n)){let h=null;if(n.schema.linebreakReplacement){let d=n.whitespace=="pre",m=!!n.contentMatch.matchType(n.schema.linebreakReplacement);d&&!m?h=!1:!d&&m&&(h=!0)}h===!1&&Qt(i,o,a,s),Ye(i,i.mapping.slice(s).map(a,1),n,void 0,h===null);let c=i.mapping.slice(s),u=c.map(a,1),f=c.map(a+o.nodeSize,1);return i.step(new B(u,f,u+1,f-1,new y(g.from(n.create(l,null,o.marks)),0,0),1,!0)),h===!0&&Gt(i,o,a,s),!1}})}function Gt(i,e,t,n){e.forEach((r,s)=>{if(r.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(r.text);){let l=i.mapping.slice(n).map(t+1+s+o.index);i.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function Qt(i,e,t,n){e.forEach((r,s)=>{if(r.type==r.type.schema.linebreakReplacement){let o=i.mapping.slice(n).map(t+1+s);i.replaceWith(o,o+1,e.type.schema.text(`
5
+ `))}})}function jn(i,e,t){let n=i.resolve(e),r=n.index();return n.parent.canReplaceWith(r,r+1,t)}function $n(i,e,t,n,r){let s=i.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");t||(t=s.type);let o=t.create(n,null,r||s.marks);if(s.isLeaf)return i.replaceWith(e,e+s.nodeSize,o);if(!t.validContent(s.content))throw new RangeError("Invalid content for node type "+t.name);i.step(new B(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new y(g.from(o),0,0),1,!0))}function kr(i,e,t=1,n){let r=i.resolve(e),s=r.depth-t,o=n&&n[n.length-1]||r.parent;if(s<0||r.parent.type.spec.isolating||!r.parent.canReplace(r.index(),r.parent.childCount)||!o.type.validContent(r.parent.content.cutByIndex(r.index(),r.parent.childCount)))return!1;for(let h=r.depth-1,c=t-2;h>s;h--,c--){let u=r.node(h),f=r.index(h);if(u.type.spec.isolating)return!1;let d=u.content.cutByIndex(f,u.childCount),m=n&&n[c+1];m&&(d=d.replaceChild(0,m.type.create(m.attrs)));let x=n&&n[c]||u;if(!u.canReplace(f+1,u.childCount)||!x.type.validContent(d))return!1}let a=r.indexAfter(s),l=n&&n[0];return r.node(s).canReplaceWith(a,a,l?l.type:r.node(s+1).type)}function _n(i,e,t=1,n){let r=i.doc.resolve(e),s=g.empty,o=g.empty;for(let a=r.depth,l=r.depth-t,h=t-1;a>l;a--,h--){s=g.from(r.node(a).copy(s));let c=n&&n[h];o=g.from(c?c.type.create(c.attrs,o):r.node(a).copy(o))}i.step(new z(e,e,new y(s.append(o),t,t),!0))}function Sr(i,e){let t=i.resolve(e),n=t.index();return Zt(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(n,n+1)}function er(i,e){e.content.size||i.type.compatibleContent(e.type);let t=i.contentMatchAt(i.childCount),{linebreakReplacement:n}=i.type.schema;for(let r=0;r<e.childCount;r++){let s=e.child(r),o=s.type==n?i.type.schema.nodes.text:s.type;if(t=t.matchType(o),!t||!i.type.allowsMarks(s.marks))return!1}return t.validEnd}function Zt(i,e){return!!(i&&e&&!i.isLeaf&&er(i,e))}function Er(i,e,t=-1){let n=i.resolve(e);for(let r=n.depth;;r--){let s,o,a=n.index(r);if(r==n.depth?(s=n.nodeBefore,o=n.nodeAfter):t>0?(s=n.node(r+1),a++,o=n.node(r).maybeChild(a)):(s=n.node(r).maybeChild(a-1),o=n.node(r+1)),s&&!s.isTextblock&&Zt(s,o)&&n.node(r).canReplace(a,a+1))return e;if(r==0)break;e=t<0?n.before(r):n.after(r)}}function tr(i,e,t){let n=null,{linebreakReplacement:r}=i.doc.type.schema,s=i.doc.resolve(e-t),o=s.node().type;if(r&&o.inlineContent){let c=o.whitespace=="pre",u=!!o.contentMatch.matchType(r);c&&!u?n=!1:!c&&u&&(n=!0)}let a=i.steps.length;if(n===!1){let c=i.doc.resolve(e+t);Qt(i,c.node(),c.before(),a)}o.inlineContent&&Ye(i,e+t-1,o,s.node().contentMatchAt(s.index()),n==null);let l=i.mapping.slice(a),h=l.map(e-t);if(i.step(new z(h,l.map(e+t,-1),y.empty,!0)),n===!0){let c=i.doc.resolve(h);Gt(i,c.node(),c.before(),i.steps.length)}return i}function nr(i,e,t){let n=i.resolve(e);if(n.parent.canReplaceWith(n.index(),n.index(),t))return e;if(n.parentOffset==0)for(let r=n.depth-1;r>=0;r--){let s=n.index(r);if(n.node(r).canReplaceWith(s,s,t))return n.before(r+1);if(s>0)return null}if(n.parentOffset==n.parent.content.size)for(let r=n.depth-1;r>=0;r--){let s=n.indexAfter(r);if(n.node(r).canReplaceWith(s,s,t))return n.after(r+1);if(s<n.node(r).childCount)return null}return null}function vr(i,e,t){let n=i.resolve(e);if(!t.content.size)return e;let r=t.content;for(let s=0;s<t.openStart;s++)r=r.firstChild.content;for(let s=1;s<=(t.openStart==0&&t.size?2:1);s++)for(let o=n.depth;o>=0;o--){let a=o==n.depth?0:n.pos<=(n.start(o+1)+n.end(o+1))/2?-1:1,l=n.index(o)+(a>0?1:0),h=n.node(o),c=!1;if(s==1)c=h.canReplace(l,l,r);else{let u=h.contentMatchAt(l).findWrapping(r.firstChild.type);c=u&&h.canReplaceWith(l,l,u[0])}if(c)return a==0?n.pos:a<0?n.before(o+1):n.after(o+1)}return null}function rr(i,e,t=e,n=y.empty){if(e==t&&!n.size)return null;let r=i.resolve(e),s=i.resolve(t);return jt(r,s,n)?new z(e,t,n):new Xe(r,s,n).fit()}function jt(i,e,t){return!t.openStart&&!t.openEnd&&i.start()==e.start()&&i.parent.canReplace(i.index(),e.index(),t.content)}var Xe=class{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=g.empty;for(let r=0;r<=e.depth;r++){let s=e.node(r);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(r))})}for(let r=e.depth;r>0;r--)this.placed=g.from(e.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let h=this.findFittable();h?this.placeNodes(h):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let s=this.placed,o=n.depth,a=r.depth;for(;o&&a&&s.childCount==1;)s=s.firstChild.content,o--,a--;let l=new y(s,o,a);return e>-1?new B(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new z(n.pos,r.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let s=t.firstChild;if(t.childCount>1&&(r=0),s.type.spec.isolating&&r<=n){e=n;break}t=s.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let r,s=null;n?(s=Ht(this.unplaced.content,n-1).firstChild,r=s.content):r=this.unplaced.content;let o=r.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:h}=this.frontier[a],c,u=null;if(t==1&&(o?h.matchType(o.type)||(u=h.fillBefore(g.from(o),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:n,frontierDepth:a,parent:s,inject:u};if(t==2&&o&&(c=h.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:a,parent:s,wrap:c};if(s&&h.matchType(s.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced;return qt(e,-1)<=t?!1:(this.unplaced.size>1&&qt(e,1)>n&&n++,this.unplaced=new y(e,t+1,n),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=Ht(e,t);if(r.childCount<=1&&t>0){let s=e.size-t<=t+r.size;this.unplaced=new y(le(e,t-1,1),t-1,s?t-1:n)}else this.unplaced=new y(le(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let x=0;x<s.length;x++)this.openFrontierNode(s[x]);let o=this.unplaced,a=n?n.content:o.content,l=o.openStart-e,h=0,c=[],{match:u,type:f}=this.frontier[t];if(r){for(let x=0;x<r.childCount;x++)c.push(r.child(x));u=u.matchFragment(r)}let d=a.size+e-(o.content.size-o.openEnd);for(;h<a.childCount;){let x=a.child(h),A=u.matchType(x.type);if(!A)break;h++,(h>1||l==0||x.content.size)&&(u=A,c.push($t(x.mark(f.allowedMarks(x.marks)),h==1?l:0,h==a.childCount?d:-1)))}let m=h==a.childCount;m||(d=-1),this.placed=ae(this.placed,t,g.from(c)),this.frontier[t].match=u,m&&d<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let x=0,A=a;x<d;x++){let L=A.lastChild;this.frontier.push({type:L.type,match:L.contentMatchAt(L.childCount)}),A=L.content}this.unplaced=m?e==0?y.empty:new y(le(o.content,e-1,1),e-1,d<0?o.openEnd:e-1):new y(le(o.content,e,h),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!qe(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],s=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=qe(e,t,r,n,s);if(o){for(let a=t-1;a>=0;a--){let{match:l,type:h}=this.frontier[a],c=qe(e,a,h,l,!0);if(!c||c.childCount)continue e}return{depth:t,fit:o,move:s?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=ae(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let r=e.node(n),s=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,s)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=ae(this.placed,this.depth,g.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(g.empty,!0);t.childCount&&(this.placed=ae(this.placed,this.frontier.length,t))}};function le(i,e,t){return e==0?i.cutByIndex(t,i.childCount):i.replaceChild(0,i.firstChild.copy(le(i.firstChild.content,e-1,t)))}function ae(i,e,t){return e==0?i.append(t):i.replaceChild(i.childCount-1,i.lastChild.copy(ae(i.lastChild.content,e-1,t)))}function Ht(i,e){for(let t=0;t<e;t++)i=i.firstChild.content;return i}function $t(i,e,t){if(e<=0)return i;let n=i.content;return e>1&&(n=n.replaceChild(0,$t(n.firstChild,e-1,n.childCount==1?t-1:0))),e>0&&(n=i.type.contentMatch.fillBefore(n).append(n),t<=0&&(n=n.append(i.type.contentMatch.matchFragment(n).fillBefore(g.empty,!0)))),i.copy(n)}function qe(i,e,t,n,r){let s=i.node(e),o=r?i.indexAfter(e):i.index(e);if(o==s.childCount&&!t.compatibleContent(s.type))return null;let a=n.fillBefore(s.content,!0,o);return a&&!ir(t,s.content,o)?a:null}function ir(i,e,t){for(let n=t;n<e.childCount;n++)if(!i.allowsMarks(e.child(n).marks))return!0;return!1}function sr(i){return i.spec.defining||i.spec.definingForContent}function qt(i,e){for(let t=0;;t++){let n=e<0?i.firstChild:i.lastChild;if(!n||n.isAtom)return t;i=n.content}}function or(i,e,t,n){if(!n.size)return i.deleteRange(e,t);let r=i.doc.resolve(e),s=i.doc.resolve(t);if(jt(r,s,n))return i.step(new z(e,t,n));let o=en(r,s);o[o.length-1]==0&&o.pop();let a=-(r.depth+1);o.unshift(a);for(let f=r.depth,d=r.pos-1;f>0;f--,d--){let m=r.node(f).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;o.indexOf(f)>-1?a=f:r.before(f)==d&&o.splice(1,0,-f)}let l=o.indexOf(a),h=[],c=n.openStart;for(let f=n.content,d=0;;d++){let m=f.firstChild;if(h.push(m),d==n.openStart)break;f=m.content}for(let f=c-1;f>=0;f--){let d=h[f],m=sr(d.type);if(m&&!d.sameMarkup(r.node(Math.abs(a)-1)))c=f;else if(m||!d.type.isTextblock)break}for(let f=n.openStart;f>=0;f--){let d=(f+c+1)%(n.openStart+1),m=h[d];if(m)for(let x=0;x<o.length;x++){let A=o[(x+l)%o.length],L=!0;A<0&&(L=!1,A=-A);let q=r.node(A-1),Z=r.index(A-1);if(q.canReplaceWith(Z,Z,m.type,m.marks))return i.replace(r.before(A),L?s.after(A):t,new y(_t(n.content,0,n.openStart,d),d,n.openEnd))}}let u=i.steps.length;for(let f=o.length-1;f>=0&&(i.replace(e,t,n),!(i.steps.length>u));f--){let d=o[f];d<0||(e=r.before(d),t=s.after(d))}}function _t(i,e,t,n,r){if(e<t){let s=i.firstChild;i=i.replaceChild(0,s.copy(_t(s.content,e+1,t,n,s)))}if(e>n){let s=r.contentMatchAt(0),o=s.fillBefore(i).append(i);i=o.append(s.matchFragment(o).fillBefore(g.empty,!0))}return i}function lr(i,e,t,n){if(!n.isInline&&e==t&&i.doc.resolve(e).parent.content.size){let r=nr(i.doc,e,n.type);r!=null&&(e=t=r)}i.replaceRange(e,t,new y(g.from(n),0,0))}function ar(i,e,t){let n=i.doc.resolve(e),r=i.doc.resolve(t);if(n.parent.isTextblock&&r.parent.isTextblock&&n.start()!=r.start()&&n.parentOffset==0&&r.parentOffset==0){let o=n.sharedDepth(t),a=!1;for(let l=n.depth;l>o;l--)n.node(l).type.spec.isolating&&(a=!0);for(let l=r.depth;l>o;l--)r.node(l).type.spec.isolating&&(a=!0);if(!a){for(let l=n.depth;l>0&&e==n.start(l);l--)e=n.before(l);for(let l=r.depth;l>0&&t==r.start(l);l--)t=r.before(l);n=i.doc.resolve(e),r=i.doc.resolve(t)}}let s=en(n,r);for(let o=0;o<s.length;o++){let a=s[o],l=o==s.length-1;if(l&&a==0||n.node(a).type.contentMatch.validEnd)return i.delete(n.start(a),r.end(a));if(a>0&&(l||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return i.delete(n.before(a),r.after(a))}for(let o=1;o<=n.depth&&o<=r.depth;o++)if(e-n.start(o)==n.depth-o&&t>n.end(o)&&r.end(o)-t!=r.depth-o&&n.start(o-1)==r.start(o-1)&&n.node(o-1).canReplace(n.index(o-1),r.index(o-1)))return i.delete(n.before(o),t);i.delete(e,t)}function en(i,e){let t=[],n=Math.min(i.depth,e.depth);for(let r=n;r>=0;r--){let s=i.start(r);if(s<i.pos-(i.depth-r)||e.end(r)>e.pos+(e.depth-r)||i.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(s==e.start(r)||r==i.depth&&r==e.depth&&i.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==s-1)&&t.push(r)}return t}var Me=class i extends O{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return N.fail("No node at attribute step's position");let n=Object.create(null);for(let s in t.attrs)n[s]=t.attrs[s];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return N.fromReplace(e,this.pos,this.pos+1,new y(g.from(r),0,t.isLeaf?0:1))}getMap(){return J.empty}invert(e){return new i(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new i(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new i(t.pos,t.attr,t.value)}};O.jsonID("attr",Me);var Te=class i extends O{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let r in e.attrs)t[r]=e.attrs[r];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return N.ok(n)}getMap(){return J.empty}invert(e){return new i(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new i(t.attr,t.value)}};O.jsonID("docAttr",Te);var te=class extends Error{};te=function i(e){let t=Error.call(this,e);return t.__proto__=i.prototype,t};te.prototype=Object.create(Error.prototype);te.prototype.constructor=te;te.prototype.name="TransformError";var Ce=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Ue}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new te(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((s,o,a,l)=>{e=Math.min(e,a),t=Math.max(t,l)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=y.empty){let r=rr(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new y(g.from(n),0,0))}delete(e,t){return this.replace(e,t,y.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return or(this,e,t,n),this}replaceRangeWith(e,t,n){return lr(this,e,t,n),this}deleteRange(e,t){return ar(this,e,t),this}lift(e,t){return Kn(this,e,t),this}join(e,t=1){return tr(this,e,t),this}wrap(e,t){return Qn(this,e,t),this}setBlockType(e,t=e,n,r=null){return Zn(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return $n(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new Me(e,t,n)),this}setDocAttribute(e,t){return this.step(new Te(e,t)),this}addNodeMark(e,t){return this.step(new fe(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(t instanceof E)t.isInSet(n.marks)&&this.step(new ee(e,t));else{let r=n.marks,s,o=[];for(;s=t.isInSet(r);)o.push(new ee(e,s)),r=s.removeFromSet(r);for(let a=o.length-1;a>=0;a--)this.step(o[a])}return this}split(e,t=1,n){return _n(this,e,t,n),this}addMark(e,t,n){return Un(this,e,t,n),this}removeMark(e,t,n){return Vn(this,e,t,n),this}clearIncompatible(e,t,n){return Ye(this,e,t,n),this}};var Ge=Object.create(null),R=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new Ze(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=y.empty){let n=t.content.lastChild,r=null;for(let a=0;a<t.openEnd;a++)r=n,n=n.lastChild;let s=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){let{$from:l,$to:h}=o[a],c=e.mapping.slice(s);e.replaceRange(c.map(l.pos),c.map(h.pos),a?y.empty:t),a==0&&rn(e,s,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let s=0;s<r.length;s++){let{$from:o,$to:a}=r[s],l=e.mapping.slice(n),h=l.map(o.pos),c=l.map(a.pos);s?e.deleteRange(h,c):(e.replaceRangeWith(h,c,t),rn(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new P(e):ne(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let s=e.depth-1;s>=0;s--){let o=t<0?ne(e.node(0),e.node(s),e.before(s+1),e.index(s),t,n):ne(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Q(e.node(0))}static atStart(e){return ne(e,e,0,0,1)||new Q(e)}static atEnd(e){return ne(e,e,e.content.size,e.childCount,-1)||new Q(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=Ge[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Ge)throw new RangeError("Duplicate use of selection JSON ID "+e);return Ge[e]=t,t.prototype.jsonID=e,t}getBookmark(){return P.between(this.$anchor,this.$head).getBookmark()}};R.prototype.visible=!0;var Ze=class{constructor(e,t){this.$from=e,this.$to=t}},tn=!1;function nn(i){!tn&&!i.parent.inlineContent&&(tn=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+i.parent.type.name+")"))}var P=class i extends R{constructor(e,t=e){nn(e),nn(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return R.near(n);let r=e.resolve(t.map(this.anchor));return new i(r.parent.inlineContent?r:n,n)}replace(e,t=y.empty){if(super.replace(e,t),t==y.empty){let n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}}eq(e){return e instanceof i&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Oe(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new i(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let s=R.findFrom(t,n,!0)||R.findFrom(t,-n,!0);if(s)t=s.$head;else return R.near(t,n)}return e.parent.inlineContent||(r==0?e=t:(e=(R.findFrom(e,-n,!0)||R.findFrom(e,n,!0)).$anchor,e.pos<t.pos!=r<0&&(e=t))),new i(e,t)}};R.jsonID("text",P);var Oe=class i{constructor(e,t){this.anchor=e,this.head=t}map(e){return new i(e.map(this.anchor),e.map(this.head))}resolve(e){return P.between(e.resolve(this.anchor),e.resolve(this.head))}},H=class i extends R{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),s=e.resolve(r);return n?R.near(s):new i(s)}content(){return new y(g.from(this.node),0,0)}eq(e){return e instanceof i&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new je(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new i(e.resolve(t.anchor))}static create(e,t){return new i(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}};H.prototype.visible=!1;R.jsonID("node",H);var je=class i{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new Oe(n,n):new i(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&H.isSelectable(n)?new H(t):R.near(t)}},Q=class i extends R{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=y.empty){if(t==y.empty){e.delete(0,e.doc.content.size);let n=R.atStart(e.doc);n.eq(e.selection)||e.setSelection(n)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new i(e)}map(e){return new i(e)}eq(e){return e instanceof i}getBookmark(){return hr}};R.jsonID("all",Q);var hr={map(){return this},resolve(i){return new Q(i)}};function ne(i,e,t,n,r,s=!1){if(e.inlineContent)return P.create(i,t);for(let o=n-(r>0?0:1);r>0?o<e.childCount:o>=0;o+=r){let a=e.child(o);if(a.isAtom){if(!s&&H.isSelectable(a))return H.create(i,t-(r<0?a.nodeSize:0))}else{let l=ne(i,a,t+r,r<0?a.childCount:0,r,s);if(l)return l}t+=a.nodeSize*r}return null}function rn(i,e,t){let n=i.steps.length-1;if(n<e)return;let r=i.steps[n];if(!(r instanceof z||r instanceof B))return;let s=i.mapping.maps[n],o;s.forEach((a,l,h,c)=>{o==null&&(o=c)}),i.setSelection(R.near(i.doc.resolve(o),t))}var sn=1,Re=2,on=4,$e=class extends Ce{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|sn)&~Re,this.storedMarks=null,this}get selectionSet(){return(this.updated&sn)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Re,this}ensureMarks(e){return E.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Re)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Re,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||E.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(n==null&&(n=t),!e)return this.deleteRange(t,n);let s=this.storedMarks;if(!s){let o=this.doc.resolve(t);s=n==t?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,s)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(R.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=on,this}get scrolledIntoView(){return(this.updated&on)>0}};function ln(i,e){return!e||!i?i:i.bind(e)}var G=class{constructor(e,t,n){this.name=e,this.init=ln(t.init,n),this.apply=ln(t.apply,n)}},cr=[new G("doc",{init(i){return i.doc||i.schema.topNodeType.createAndFill()},apply(i){return i.doc}}),new G("selection",{init(i,e){return i.selection||R.atStart(e.doc)},apply(i){return i.selection}}),new G("storedMarks",{init(i){return i.storedMarks||null},apply(i,e,t,n){return n.selection.$cursor?i.storedMarks:null}}),new G("scrollToSelection",{init(){return 0},apply(i,e){return i.scrolledIntoView?e+1:e}})],ue=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=cr.slice(),t&&t.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new G(n.key,n.spec.state,n))})}},an=class i{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let s=!1;for(let o=0;o<this.config.plugins.length;o++){let a=this.config.plugins[o];if(a.spec.appendTransaction){let l=r?r[o].n:0,h=r?r[o].state:this,c=l<t.length&&a.spec.appendTransaction.call(a,l?t.slice(l):t,h,n);if(c&&n.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let u=0;u<this.config.plugins.length;u++)r.push(u<o?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),s=!0}r&&(r[o]={state:n,n:t.length})}}if(!s)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new i(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let s=n[r];t[s.name]=s.apply(e,this[s.name],this,t)}return t}get tr(){return new $e(this)}static create(e){let t=new ue(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new i(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new ue(this.schema,e.plugins),n=t.fields,r=new i(t);for(let s=0;s<n.length;s++){let o=n[s].name;r[o]=this.hasOwnProperty(o)?this[o]:n[s].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(n=>n.toJSON())),e&&typeof e=="object")for(let n in e){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],s=r.spec.state;s&&s.toJSON&&(t[n]=s.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let r=new ue(e.schema,e.plugins),s=new i(r);return r.fields.forEach(o=>{if(o.name=="doc")s.doc=D.fromJSON(e.schema,t.doc);else if(o.name=="selection")s.selection=R.fromJSON(s.doc,t.selection);else if(o.name=="storedMarks")t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let a in n){let l=n[a],h=l.spec.state;if(l.key==o.name&&h&&h.fromJSON&&Object.prototype.hasOwnProperty.call(t,a)){s[o.name]=h.fromJSON.call(l,e,t[a],s);return}}s[o.name]=o.init(e,s)}}),s}};function fn(i,e,t){for(let n in i){let r=i[n];r instanceof Function?r=r.bind(e):n=="handleDOMEvents"&&(r=fn(r,e,{})),t[n]=r}return t}var hn=class{constructor(e){this.spec=e,this.props={},e.props&&fn(e.props,this,this.props),this.key=e.key?e.key.key:un("plugin")}getState(e){return e[this.key]}},Qe=Object.create(null);function un(i){return i in Qe?i+"$"+ ++Qe[i]:(Qe[i]=0,i+"$")}var cn=class{constructor(e="key"){this.key=un(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}};var pn="showaiTextRangeEdit";function dn(i,e,t,n=!0){let r=e.filter(h=>h.to>h.from).sort((h,c)=>h.from-c.from);if(!r.length)return null;let s=[];for(let h of r){let c=!0;if(i.doc.nodesBetween(h.from,h.to,f=>{!f.isText&&f.isLeaf&&f.type.name!=="hardBreak"&&(c=!1)}),!c||!i.doc.resolve(h.from).sameParent(i.doc.resolve(h.to)))throw new Error("A text edit must stay inside a single text block.");let u=s.at(-1);u&&h.from<=u.to?u.to=Math.max(u.to,h.to):s.push({...h})}let o=i.tr;for(let h of[...s].reverse())o.delete(h.from,h.to);let a=o.mapping.map(s[0].from,-1),l=0;if(n&&t){let h=o.doc.resolve(a),c=i.doc.resolve(s[0].from).marks();if(h.parent.type.spec.code||!t.includes(`
6
+ `))o.insertText(t,a),l=t.length;else{let u=t.split(/\r?\n/).flatMap((d,m)=>[...m?[i.schema.nodes.hardBreak.create()]:[],...d?[i.schema.text(d,c)]:[]]),f=g.fromArray(u);l=f.size,o.insert(a,f)}}return o.setSelection(P.near(o.doc.resolve(a+l))),o}function mn(i,e=()=>""){let t=i.ownerDocument,n='button,input,textarea,select,summary,[role="button"],[role="slider"],[data-surface-ui],.editor-toolbar,.editor-bubble,.block-handle,.block-menu,[data-surface-handle],script,style,[hidden],svg[aria-hidden="true"],.katex-mathml',r=[],s="",o=null,a=t.createTreeWalker(i,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode(c){if(c instanceof Element){let d=getComputedStyle(c);return c.matches(n)||d.display==="none"||d.visibility==="hidden"?NodeFilter.FILTER_REJECT:c instanceof HTMLIFrameElement||c instanceof HTMLBRElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}let u=c.parentElement;if(!c.textContent||getComputedStyle(u).userSelect==="none"||!c.textContent.trim()&&/[\n\r]/.test(c.textContent)&&!getComputedStyle(u).whiteSpace.startsWith("pre"))return NodeFilter.FILTER_REJECT;let f=t.createRange();return f.selectNodeContents(c),f.getClientRects().length?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}});for(;a.nextNode();){let c=a.currentNode,u=c instanceof HTMLIFrameElement?e(c):c instanceof HTMLBRElement?`
7
+ `:c.data,f=(c instanceof Element?c:c.parentElement)?.closest("p,div,section,article,li,pre,td,th,h1,h2,h3,h4,h5,h6,blockquote");r.length&&f!==o&&(s+=f?.closest("tr")&&f.closest("tr")===o?.closest("tr")?" ":`
8
+ `),o=f??null;let d=s.length;s+=u,r.push({node:c,start:d,end:s.length})}return{entries:r,text:s,offsetAt:(c,u)=>{let f=r.find(d=>d.node===c);return f?f.start+Math.max(0,Math.min(f.end-f.start,u)):null},ranges:(c,u)=>r.flatMap(f=>{if(f.node instanceof HTMLIFrameElement||f.end<=c||f.start>=u)return[];let d=t.createRange();return f.node instanceof HTMLBRElement?d.selectNode(f.node):(d.setStart(f.node,Math.min(f.node.length,Math.max(c-f.start,0))),d.setEnd(f.node,Math.min(f.node.length,u-f.start,f.end-f.start))),[d]})}}var pe=new WeakMap,de=new WeakMap,fr=".document-widget,.portable-widget,.page-document-module,.rich-text-component,[data-surface-id],pre,table,.document-callout,.document-toggle";function Pr(i){return pe.set(i.view.dom,i),()=>{pe.delete(i.view.dom)}}function Wr(i,e){return de.set(i,{channel:e,text:""}),()=>{de.delete(i)}}function Hr(i,e){let t=de.get(i);t&&typeof e=="string"&&e.length<=256e3&&(t.text=e)}function qr(i,e){if(!["down","move","up","cancel"].includes(String(e.phase))||![e.x,e.y,e.width,e.height,e.buttons,e.offset].every(n=>typeof n=="number"&&Number.isFinite(n))||Number(e.width)<=0||Number(e.height)<=0)return;let t=i.getBoundingClientRect();i.dispatchEvent(new CustomEvent("showai:text-selection-pointer",{bubbles:!0,detail:{phase:e.phase,buttons:e.buttons,point:{x:t.left+Number(e.x)/Number(e.width)*t.width,y:t.top+Number(e.y)/Number(e.height)*t.height},caret:{node:i,offset:Number(e.offset)}}}))}function Ne(i,e){if(i.caretRangeFromPoint){let n=i.caretRangeFromPoint(e.x,e.y);return n?{node:n.startContainer,offset:n.startOffset}:null}let t=i.caretPositionFromPoint?.(e.x,e.y);return t?{node:t.offsetNode,offset:t.offset}:null}function gn(i){return(i instanceof Element?i:i.parentElement)?.closest(".document-widget,.portable-widget,.page-document-module,.rich-text-component,[data-surface-id]")}function ur(i,e,t){let n=Ne(i.ownerDocument,{x:e,y:t});return!!n&&n.node.nodeType===Node.TEXT_NODE&&i.contains(n.node)&&getComputedStyle(i).userSelect!=="none"}function yn(i,e,t){let n=Math.min(40,(t-e)/3);return n<=0?0:i<e+n?-18*Math.min(1,(e+n-i)/n):i>t-n?18*Math.min(1,(i-t+n)/n):0}function pr(i,e,t){let n=!1,r=!1,s=!1,o=e.getBoundingClientRect();for(let a=i;a&&e.contains(a);a=a.parentElement){if(!(a instanceof HTMLElement))continue;let l=getComputedStyle(a),h=a.getBoundingClientRect(),c=!r&&/auto|scroll/.test(l.overflowX)?yn(t.x,Math.max(0,h.left,o.left),Math.min(innerWidth,h.right,o.right)):0,u=!s&&/auto|scroll/.test(l.overflowY)?yn(t.y,Math.max(0,h.top,o.top),Math.min(innerHeight,h.bottom,o.bottom)):0,f=a.scrollLeft,d=a.scrollTop;if(c&&(a.scrollLeft+=c),u&&(a.scrollTop+=u),(a.scrollLeft!==f||a.scrollTop!==d)&&(n=!0,r||=a.scrollLeft!==f,s||=a.scrollTop!==d,r&&s)||a===e)break}return n}function Ur(i,e="Text selection"){let t=i.ownerDocument,n=t.defaultView,r="showai-text-"+crypto.randomUUID(),s=t.createElement("style");s.textContent=`::highlight(${r}){background:Highlight;color:HighlightText}`,i.append(s);let o=t.createElement("textarea");o.tabIndex=-1,o.hidden=!0,o.dataset.textSelectionInput="true",o.setAttribute("aria-label",e),o.style.cssText="position:fixed;left:-10000px;top:0;width:1px;height:1px;opacity:0;pointer-events:none",i.append(o);let a=n,l=null,h=null,c=0,u=!1,f=!1,d=(p,S,w={})=>{let v=de.get(p);v&&p.contentWindow?.postMessage({channel:v.channel,type:S,...w},"*")},m=()=>{n.cancelAnimationFrame(c),c=0,l=null},x=()=>{a.CSS.highlights?.delete(r);for(let p of i.querySelectorAll("iframe"))d(p,"showai:text-selection-range",{from:0,to:0});h=null,o.value="",t.activeElement===o&&o.blur(),o.hidden=!0,delete i.dataset.textSelection},A=(p,S,w)=>{let v=mn(p,C=>de.get(C)?.text??""),M=v.offsetAt(S.node,S.offset),b=v.offsetAt(w.node,w.offset);if(M===null||b===null)return;let T=Math.min(M,b),k=Math.max(M,b);h={page:p,anchor:S,head:w,model:v,from:T,to:k},o.value=v.text.slice(T,k),o.setSelectionRange(0,o.value.length),a.Highlight&&a.CSS.highlights?a.CSS.highlights.set(r,new a.Highlight(...v.ranges(T,k))):t.getSelection()?.setBaseAndExtent(S.node,S.offset,w.node,w.offset);for(let C of v.entries)C.node instanceof HTMLIFrameElement&&d(C.node,"showai:text-selection-range",{from:Math.max(0,T-C.start),to:Math.min(C.end-C.start,k-C.start)})},L=(p,S,w=Ne(t,S),v)=>{if(!w||p.closest('button,input,textarea,select,summary,[role="button"],[role="slider"],[data-surface-ui],[data-surface-handle],.block-handle,.react-flow,[data-surface-gesture="own"]')||!(w.node instanceof HTMLIFrameElement)&&!ur(p,S.x,S.y))return;let M=p.closest(".container-page");if(!M||!i.contains(M))return;for(let k=M.parentElement?.closest(".container-page");k&&i.contains(k);k=k.parentElement?.closest(".container-page"))M=k;m(),x();for(let k of M.querySelectorAll("iframe"))d(k,"showai:text-selection-content-request");let b=(w.node instanceof Element?w.node:w.node.parentElement)?.closest("[contenteditable]"),T=!b||!pe.get(b)?.isEditable;T&&t.activeElement instanceof HTMLElement&&t.activeElement.blur(),l={page:M,target:p,anchor:w,start:S,point:S,cross:!1,moved:!1,pointer:v,readOnlyStart:T,boundaries:[...M.querySelectorAll(fr)],table:p.closest("table")}},q=p=>{if(!l||!l.moved||!l.anchor.node.isConnected)return;let{page:S,anchor:w,point:v}=l,M=S.getBoundingClientRect(),b={x:Math.max(M.left+2,Math.min(M.right-2,v.x)),y:Math.max(M.top+2,Math.min(innerHeight-2,M.bottom-2,v.y))},T=t.elementFromPoint(b.x,b.y);if(!T||!S.contains(T))return;if(T instanceof HTMLIFrameElement&&!p){let F=T.getBoundingClientRect();d(T,"showai:text-selection-hit",{x:(b.x-F.left)/F.width*T.clientWidth,y:(b.y-F.top)/F.height*T.clientHeight,buttons:1});return}let k=p??Ne(t,b);if(!k||!S.contains(k.node))return;let C=l.cross||l.readOnlyStart||gn(w.node)!==gn(k.node)||!!(l.table&&T.closest("table")!==l.table);if(!C&&!(w.node instanceof HTMLIFrameElement)&&!(k.node instanceof HTMLIFrameElement)){let F=t.createRange(),$=t.createRange();F.setStart(w.node,w.offset),F.collapse(!0),$.setStart(k.node,k.offset),$.collapse(!0),F.compareBoundaryPoints(Range.START_TO_START,$)>0?(F.setStart(k.node,k.offset),F.setEnd(w.node,w.offset)):F.setEnd(k.node,k.offset),C=l.boundaries.some(U=>U.isConnected&&!U.contains(w.node)&&!U.contains(k.node)&&F.intersectsNode(U))}C&&(l.cross||(l.cross=!0,i.dataset.textSelection="true",o.hidden=!1,o.focus({preventScroll:!0}),t.getSelection()?.removeAllRanges()),l.head=k,A(S,w,k))},Z=()=>{if(l){if(l.moved){let p=t.elementFromPoint(Math.max(0,Math.min(innerWidth-1,l.point.x)),Math.max(0,Math.min(innerHeight-1,l.point.y)));if(pr(p&&l.page.contains(p)?p:l.target,l.page,l.point))if(l.cross)q();else if(l.page.querySelector(".selectedCell")){let w=l.page.getBoundingClientRect();t.dispatchEvent(new MouseEvent("mousemove",{bubbles:!0,buttons:1,clientX:l.point.x,clientY:Math.max(w.top+2,Math.min(w.bottom-2,innerHeight-2,l.point.y))}))}else{let w=l.page.getBoundingClientRect(),v=Ne(t,{x:Math.max(w.left+2,Math.min(w.right-2,l.point.x)),y:Math.max(w.top+2,Math.min(innerHeight-2,w.bottom-2,l.point.y))});v&&l.anchor.node instanceof Text&&l.page.contains(v.node)&&t.getSelection()?.setBaseAndExtent(l.anchor.node,Math.min(l.anchor.offset,l.anchor.node.length),v.node,v.offset),q()}}c=n.requestAnimationFrame(Z)}},_e=p=>{p.button===0&&p.pointerType==="mouse"&&!p.shiftKey&&!p.metaKey&&!p.ctrlKey&&p.target instanceof Element&&L(p.target,{x:p.clientX,y:p.clientY},void 0,p.pointerId)},et=p=>{if(!(!l||l.pointer!==void 0&&l.pointer!==p.pointerId)){if(!(p.buttons&1)){m();return}l.point={x:p.clientX,y:p.clientY},l.moved||=Math.hypot(l.point.x-l.start.x,l.point.y-l.start.y)>4,q(),l?.cross&&(p.preventDefault(),p.stopPropagation()),c||(c=n.requestAnimationFrame(Z))}},Ie=()=>{l?.cross&&(q(l.head),u=!0),m()},tt=p=>{l?.cross&&(p.preventDefault(),p.stopImmediatePropagation())},nt=p=>{u&&(u=!1,p.preventDefault(),p.stopPropagation())},j=p=>{if(!h||h.from===h.to)return;if(!h.anchor.node.isConnected||!h.head.node.isConnected){x();return}let S=new Map,w;for(let b of h.model.ranges(h.from,h.to)){let k=(b.startContainer instanceof Element?b.startContainer:b.startContainer.parentElement).closest("[contenteditable]"),C=k&&pe.get(k);if(!C?.isEditable||C.isDestroyed||!C.view.dom.isConnected)continue;let F=C.view.posAtDOM(b.startContainer,b.startOffset),$=C.view.posAtDOM(b.endContainer,b.endOffset);if(F>=$)continue;w??=C;let U=S.get(C)??[];U.push({from:F,to:$}),S.set(C,U)}if(!w){o.value=h.model.text.slice(h.from,h.to),o.setSelectionRange(0,o.value.length);return}let v="text-selection:"+crypto.randomUUID(),M=[...S].sort(([b],[T])=>b.view.dom.contains(T.view.dom)?-1:T.view.dom.contains(b.view.dom)?1:0);x();for(let[b,T]of M){let k=dn(b.state,T,p,b===w);k&&b.view.dispatch(k.setMeta(pn,v))}w.view.focus()},me=p=>{!h||t.activeElement!==o||!p.clipboardData||(p.clipboardData.setData("text/plain",h.model.text.slice(h.from,h.to)),p.preventDefault(),p.stopPropagation(),p.type==="cut"&&j(""))},rt=p=>{if(!(!h||t.activeElement!==o)){if((p.metaKey||p.ctrlKey)&&["z","y"].includes(p.key.toLowerCase())){x(),m();return}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(p.key)){p.preventDefault(),p.stopPropagation();let S=["ArrowLeft","ArrowUp","Home"].includes(p.key),w=h.model.ranges(h.from,h.to);S||w.reverse();for(let v of w){let M=S?v.startContainer:v.endContainer,T=(M instanceof Element?M:M.parentElement)?.closest("[contenteditable]"),k=T&&pe.get(T);if(!k?.isEditable||k.isDestroyed||!k.view.dom.isConnected)continue;let C=k.view.posAtDOM(M,S?v.startOffset:v.endOffset);x(),m(),k.commands.focus(C,{scrollIntoView:!1});return}x(),m();return}if(p.key==="Escape"){p.preventDefault(),x(),m();return}p.key==="Backspace"||p.key==="Delete"?(p.preventDefault(),p.stopPropagation(),j("")):p.key==="Enter"&&!p.isComposing&&(p.preventDefault(),p.stopPropagation(),j(`
9
+ `))}},xn=p=>{if(!f){let S=p;j(S.inputType.startsWith("delete")?"":S.data??o.value)}},wn=()=>{f=!0},kn=()=>{f=!1,j(o.value)},it=p=>{h&&t.activeElement===o&&(p.preventDefault(),p.stopPropagation(),j(p.clipboardData?.getData("text/plain")??""))},st=p=>{h&&p.target!==o&&(x(),m())},ot=p=>{p.button===0&&(m(),x(),u=!1)},lt=p=>{if(!(p.target instanceof Element))return;let{phase:S,point:w,caret:v,buttons:M}=p.detail;S==="down"?L(p.target,w,v):S==="move"&&l&&M&1?(l.point=w,l.moved||=Math.hypot(w.x-l.start.x,w.y-l.start.y)>4,q(v),c||(c=n.requestAnimationFrame(Z))):S==="up"?Ie():S==="cancel"&&m()},at=()=>m();return t.addEventListener("focusin",st,!0),t.addEventListener("pointerdown",ot,!0),i.addEventListener("pointerdown",_e,!0),t.addEventListener("pointermove",et,!0),t.addEventListener("mousemove",tt,!0),t.addEventListener("pointerup",Ie,!0),t.addEventListener("pointercancel",m,!0),i.addEventListener("click",nt,!0),t.addEventListener("copy",me,!0),t.addEventListener("cut",me,!0),t.addEventListener("keydown",rt,!0),t.addEventListener("paste",it,!0),o.addEventListener("input",xn),o.addEventListener("compositionstart",wn),o.addEventListener("compositionend",kn),i.addEventListener("showai:text-selection-pointer",lt),n.addEventListener("blur",at),()=>{m(),x(),s.remove(),o.remove(),t.removeEventListener("focusin",st,!0),t.removeEventListener("pointerdown",ot,!0),i.removeEventListener("pointerdown",_e,!0),t.removeEventListener("pointermove",et,!0),t.removeEventListener("mousemove",tt,!0),t.removeEventListener("pointerup",Ie,!0),t.removeEventListener("pointercancel",m,!0),i.removeEventListener("click",nt,!0),t.removeEventListener("copy",me,!0),t.removeEventListener("cut",me,!0),t.removeEventListener("keydown",rt,!0),t.removeEventListener("paste",it,!0),i.removeEventListener("showai:text-selection-pointer",lt),n.removeEventListener("blur",at)}}export{mn as a,g as b,E as c,y as d,De as e,pt as f,mt as g,wt as h,Ue as i,Y as j,z as k,B as l,xr as m,wr as n,kr as o,Sr as p,Er as q,vr as r,rr as s,Ce as t,R as u,Ze as v,P as w,H as x,Q as y,an as z,hn as A,cn as B,pn as C,Pr as D,Wr as E,Hr as F,qr as G,ur as H,Ur as I};
@@ -0,0 +1 @@
1
+ import{d as p}from"./chunk-2CCUVSMI.js";var r=t=>{throw new Error(t)},h=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function l(t,i,o){(typeof t!="string"||!t.trim())&&r(`${i} must be non-empty text.`),t.length>o&&r(`${i} must be at most ${o} characters.`)}function a(t,i,o){t!==void 0&&l(t,i,o)}function g(t,i){(typeof t!="string"||!t.trim())&&r(`${i} must be non-empty code.`),t.length>8e3&&r(`${i} must be at most 8000 characters.`)}function b(t,i,o,e,f=!1){(typeof t!="number"||!Number.isFinite(t)||(f?t<=o:t<o)||t>e)&&r(`${i} must be a number ${f?"above":"of at least"} ${o} and at most ${e}.`)}function y(t,i,o,e){(!Number.isInteger(t)||t<o||t>e)&&r(`${i} must be an integer from ${o} to ${e}.`)}function m(t,i,o,e=0){return(!Array.isArray(t)||t.length<e||t.length>o)&&r(`${i} must be an array of ${e} to ${o} items.`),t.forEach((f,n)=>{h(f)||r(`${i}[${n}] must be an object.`)}),t}function u(t,i,o){for(let e of Object.keys(t))i.includes(e)||r(`${o}.${e} is not a known field.`)}var w=["list","focus"],S=["active","wait"],x=["id","title","short","badge","body","code","lang","variants","note","result","cue","wait","timer","segments"];function E(t){a(t.description,"description",600),t.layout!==void 0&&!w.includes(t.layout)&&r(`layout must be one of ${w.join(", ")}.`),t.start!==void 0&&y(t.start,"start",0,999);let i=m(t.steps,"steps",40,1);t.initialStep!==void 0&&y(t.initialStep,"initialStep",0,i.length-1);let o=new Set;i.forEach((e,f)=>{let n=`steps[${f}]`;u(e,x,n),e.id!==void 0&&(l(e.id,`${n}.id`,64),o.has(e.id)&&r(`${n}.id duplicates ${e.id}.`),o.add(e.id)),l(e.title,`${n}.title`,160),a(e.short,`${n}.short`,24),a(e.badge,`${n}.badge`,24),a(e.body,`${n}.body`,3e3);for(let s of["note","result","cue","wait"])a(e[s],`${n}.${s}`,600);if(a(e.lang,`${n}.lang`,24),e.code!==void 0&&g(e.code,`${n}.code`),e.variants!==void 0){e.code!==void 0&&r(`${n} uses either code or variants, not both.`);let s=new Set;m(e.variants,`${n}.variants`,6,1).forEach((c,d)=>{let $=`${n}.variants[${d}]`;u(c,["label","code","lang"],$),l(c.label,`${$}.label`,32),s.has(c.label)&&r(`${$}.label duplicates ${c.label}.`),s.add(c.label),g(c.code,`${$}.code`),a(c.lang,`${$}.lang`,24)})}e.timer!==void 0&&(h(e.timer)||r(`${n}.timer must be an object.`),u(e.timer,["minutes","label"],`${n}.timer`),b(e.timer.minutes,`${n}.timer.minutes`,0,1440,!0),a(e.timer.label,`${n}.timer.label`,40)),e.segments!==void 0&&m(e.segments,`${n}.segments`,8,1).forEach((s,c)=>{let d=`${n}.segments[${c}]`;u(s,["start","minutes","kind"],d),b(s.start,`${d}.start`,0,1e4),b(s.minutes,`${d}.minutes`,0,1e4,!0),S.includes(s.kind)||r(`${d}.kind must be one of ${S.join(", ")}.`)})})}function k(t){a(t.description,"description",600),a(t.placeholder,"placeholder",60),a(t.program,"program",40),t.program!==void 0&&/\s/.test(t.program)&&r("program must be a single word.");let i=new Set;m(t.groups,"groups",16,1).forEach((e,f)=>{let n=`groups[${f}]`;u(e,["id","label"],n),l(e.id,`${n}.id`,64),i.has(e.id)&&r(`${n}.id duplicates ${e.id}.`),i.add(e.id),l(e.label,`${n}.label`,24)});let o=new Set;m(t.commands,"commands",300,1).forEach((e,f)=>{let n=`commands[${f}]`;if(u(e,["id","group","command","summary","detail","params","examples"],n),e.id!==void 0&&(l(e.id,`${n}.id`,64),o.has(e.id)&&r(`${n}.id duplicates ${e.id}.`),o.add(e.id)),l(e.group,`${n}.group`,64),i.has(e.group)||r(`${n}.group ${e.group} does not match a group id.`),l(e.command,`${n}.command`,240),l(e.summary,`${n}.summary`,240),a(e.detail,`${n}.detail`,3e3),e.params!==void 0){let s=new Set;m(e.params,`${n}.params`,40,1).forEach((c,d)=>{let $=`${n}.params[${d}]`;u(c,["name","meaning"],$),l(c.name,`${$}.name`,80),s.has(c.name)&&r(`${$}.name duplicates ${c.name}.`),s.add(c.name),l(c.meaning,`${$}.meaning`,400)})}e.examples!==void 0&&m(e.examples,`${n}.examples`,6,1).forEach((s,c)=>{let d=`${n}.examples[${c}]`;u(s,["label","code"],d),a(s.label,`${d}.label`,40),g(s.code,`${d}.code`)})})}function T(t,i){return h(i)||r("Component data must be an object."),a(i.title,"title",120),t==="step-guide"?E(i):t==="command-reference"?k(i):r(`Unknown doc reference component ${t}.`),i}function A(t){let i=0,o=0,e=0;for(let f of t)for(let n of f.segments??[])n.kind==="active"?i+=n.minutes:o+=n.minutes,e=Math.max(e,n.start+n.minutes);return{active:i,wait:o,total:e}}function C(t){if(!(t>0))return[];let i=[5,10,15,30,60,120,240,480].find(e=>t/e<=8)??Math.ceil(t/8/60)*60,o=[];for(let e=0;e<=t;e+=i)o.push(e);return o}function O(t){return[...new Set(t.toLowerCase().split(/\s+/).filter(Boolean))]}function L(t,i){let o=[t.command,p(t.summary),...(t.params??[]).map(e=>`${e.name} ${e.meaning}`)].map(e=>e.toLowerCase());return i.every(e=>o.some(f=>f.includes(e)))}function M(t,i){let o=t.toLowerCase(),e=[];for(let n of i)for(let s=o.indexOf(n);s>=0;s=o.indexOf(n,s+n.length))e.push([s,s+n.length]);e.sort((n,s)=>n[0]-s[0]);let f=[];for(let n of e){let s=f[f.length-1];s&&n[0]<=s[1]?s[1]=Math.max(s[1],n[1]):f.push([n[0],n[1]])}return f}export{T as a,A as b,C as c,O as d,L as e,M as f};
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-4QSHXFHM.js";import{d as e}from"./chunk-DUIGVKKG.js";a(`.sb-block.an-block{--an-text: var(--text, #222222);--an-muted: var(--muted, #6a6a6a);--an-line: var(--line, #dddddd);--an-paper: var(--paper, #ffffff);--an-surface: var(--surface, #fafafa);--an-accent: var(--accent, #120a8f);--an-accent-soft: var(--accent-soft, #eeedf9);--an-good: #2f6b4f;--an-good-soft: #e6efe9;--an-bad: #b0473f;--an-bad-soft: #f8e7e5;--an-warn: #a86b34;--an-warn-soft: #f6ece2;--an-info: #3b74b8;--an-info-soft: #e5eff8;--an-idle: #8a918c;--an-idle-soft: #f1f2ee;color:var(--an-text);font-family:inherit;font-size:14px;line-height:1.55;padding:8px 0;container-type:inline-size;overflow-wrap:anywhere}:root[data-theme=dark] .an-block,[data-theme=dark] .an-block{--an-good: #7cc3a0;--an-good-soft: #20352b;--an-bad: #e48b83;--an-bad-soft: #3b2423;--an-warn: #e0a96f;--an-warn-soft: #3a2c1e;--an-info: #8bb8eb;--an-info-soft: #1f2d3d;--an-idle: #a3aaa5;--an-idle-soft: #2a2c2b}.an-block *{box-sizing:border-box}.an-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px;margin-bottom:12px}.an-title{font-size:17px;font-weight:700;margin:0}.an-sub{color:var(--an-muted);font-size:13px;margin:0}.an-tools{margin-left:auto;display:flex;flex-wrap:wrap;gap:6px;align-items:center}.an-block .an-chip{border:1px solid var(--an-line);background:var(--an-paper);color:var(--an-muted);border-radius:999px;padding:3px 10px;font:inherit;font-size:12px;font-weight:600;cursor:pointer}.an-chip[aria-pressed=true]{border-color:currentColor;background:var(--an-surface);color:var(--an-text)}.an-chip:focus-visible,.an-item:focus-visible,.an-col-button:focus-visible,.an-row:focus-visible{outline:2px solid var(--an-accent);outline-offset:2px}.an-panel{background:var(--an-paper);border:1px solid var(--an-line);border-radius:12px;padding:12px;min-width:0}.an-panel-title{font-size:12.5px;font-weight:700;margin:0 0 8px}.an-empty{color:var(--an-muted);font-size:13px;padding:12px 0}.an-static{margin-top:10px;font-size:13px}.an-static summary{cursor:pointer;color:var(--an-muted)}.an-static table{border-collapse:collapse;width:100%;margin-top:8px}.an-static th,.an-static td{border-bottom:1px solid var(--an-line);padding:4px 6px;text-align:left;vertical-align:top}.an-tone-yes{--tone: var(--an-good);--tone-soft: var(--an-good-soft)}.an-tone-no{--tone: var(--an-bad);--tone-soft: var(--an-bad-soft)}.an-tone-partial{--tone: var(--an-warn);--tone-soft: var(--an-warn-soft)}.an-tone-neutral{--tone: var(--an-info);--tone-soft: var(--an-info-soft)}.an-tone-na{--tone: var(--an-idle);--tone-soft: transparent}.an-matrix-scroll{overflow-x:auto}.an-matrix{border-collapse:separate;border-spacing:0;width:100%;min-width:560px}.an-matrix th,.an-matrix td{padding:8px 10px;border-bottom:1px solid var(--an-line);text-align:left;vertical-align:top}.an-matrix thead th{font-size:13px;white-space:nowrap;border-bottom-width:2px}.an-matrix .an-rowhead{position:sticky;left:0;z-index:1;background:var(--an-paper);width:180px;min-width:140px}.an-row-label{font-weight:600}.an-row-hint{color:var(--an-muted);font-size:11.5px;margin-top:2px}.an-group-row th{background:var(--an-surface);color:var(--an-muted);font-size:12px;letter-spacing:.04em}.an-col-button{all:unset;cursor:pointer;display:block}.an-col-note{display:block;font-weight:500;font-size:11.5px;color:var(--an-muted);white-space:normal}.an-matrix .is-highlight{background:var(--an-accent-soft);box-shadow:inset 2px 0 var(--an-accent),inset -2px 0 var(--an-accent)}.an-matrix thead .is-highlight{color:var(--an-accent)}.an-matrix .is-focus{background:var(--an-surface);box-shadow:inset 2px 0 var(--an-text),inset -2px 0 var(--an-text)}.an-matrix.has-focus td:not(.is-focus):not(.is-highlight):not(.an-rowhead){opacity:.55}.an-matrix tbody tr:hover td,.an-matrix tbody tr:hover th{background-image:linear-gradient(var(--an-surface),var(--an-surface))}.an-cell{display:inline-flex;gap:5px;align-items:baseline;color:var(--tone);background:var(--tone-soft);border-radius:6px;padding:1px 6px;line-height:1.5;white-space:nowrap}.an-cell span{color:var(--an-text)}.an-tone-na.an-cell,.an-tone-na.an-cell span{color:var(--an-idle);padding:0}.an-note-mark{color:var(--an-muted);font-size:11px;vertical-align:super}.an-legend{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:8px;font-size:12px;color:var(--an-muted)}.an-legend b{color:var(--tone)}.an-tree-layout{display:flex;gap:16px;align-items:flex-start}.an-tree{flex:none;max-width:100%;position:relative}.an-tree svg{position:absolute;inset:0;overflow:visible}.an-root{position:absolute;border-radius:14px;background:var(--an-text);color:var(--an-paper);padding:12px 14px;display:flex;flex-direction:column;justify-content:center;font-size:13px;font-weight:600;line-height:1.45}.an-root small{opacity:.7;font-size:11px;font-weight:500}.an-group{position:absolute;background:var(--an-paper);border:1px solid var(--an-line);border-radius:12px;padding:8px 12px;display:flex;flex-direction:column;justify-content:center;gap:5px}.an-group-top{display:flex;align-items:baseline;gap:6px;font-size:13.5px}.an-group-top span{margin-left:auto;font-size:11.5px;color:var(--an-muted)}.an-group-summary{font-size:11px;color:var(--an-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.an-bar{display:flex;height:6px;border-radius:3px;overflow:hidden;background:var(--an-idle-soft)}.an-block .an-item{position:absolute;display:flex;align-items:center;gap:8px;padding:0 10px 0 6px;border-radius:9px;border:1px solid var(--an-line);background:var(--an-paper);font:inherit;font-size:12.5px;color:var(--an-text);text-align:left;cursor:pointer;transition:opacity .15s}.an-item.is-selected{border-color:var(--tone);background:var(--tone-soft)}.an-item.is-dim{opacity:.3}.an-mark{width:20px;height:20px;flex-shrink:0;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:var(--tone);background:var(--tone-soft)}.an-st-done .an-mark{color:var(--an-paper);background:var(--tone)}.an-st-todo .an-mark{border:1px dashed var(--tone)}.an-st-active .an-mark{animation:an-pulse 1.4s ease-in-out infinite}.an-item-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-st-failed .an-item-label{color:var(--an-muted);text-decoration:line-through;text-decoration-color:color-mix(in srgb,var(--an-bad) 55%,transparent)}.an-item-result{max-width:48%;font-size:11px;color:var(--an-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-st-done .an-item-result{color:var(--tone)}.an-item-source{font-size:10.5px;color:var(--an-muted);white-space:nowrap}.an-detail{width:300px;flex-shrink:0;position:sticky;top:8px;display:flex;flex-direction:column;gap:10px}.an-detail h4{font-size:15px;margin:4px 0 8px;line-height:1.4}.an-pill{display:inline-block;font-size:12px;font-weight:600;color:var(--tone);background:var(--tone-soft);border-radius:999px;padding:2px 10px}.an-field{margin-top:12px}.an-field small{display:block;font-size:11.5px;color:var(--an-muted);margin-bottom:3px}.an-result-box{margin-top:12px;padding:10px 12px;border-radius:10px;background:var(--tone-soft)}.an-tags{display:flex;flex-wrap:wrap;gap:5px}.an-tag{font-size:12px;font-weight:600;padding:2px 8px;border-radius:6px;background:var(--an-idle-soft)}@keyframes an-pulse{0%,to{opacity:1}50%{opacity:.35}}.an-tracker{background:var(--an-surface);border:1px solid var(--an-line);border-radius:14px;padding:14px}.an-tracker-grid{display:grid;grid-template-columns:250px minmax(0,1fr) 250px;gap:16px;align-items:stretch}.an-runs{display:flex;flex-direction:column;padding:0;min-height:0}.an-runs-head{padding:10px 12px 8px;border-bottom:1px solid var(--an-line)}.an-runs-list{overflow-y:auto;flex:1 1 0;min-height:0}.an-row{display:grid;grid-template-columns:16px 40px minmax(0,1fr) auto;align-items:center;gap:6px;padding:7px 10px;font-size:12px;cursor:pointer;border-bottom:1px solid var(--an-idle-soft)}.an-row:hover{background:var(--an-surface)}.an-row.is-selected{background:var(--an-accent-soft)}.an-row-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-row-name small{display:block;font-size:10.5px;color:var(--an-muted)}.an-score{font-variant-numeric:tabular-nums;font-weight:600}.an-status{font-size:10.5px;font-weight:600;color:var(--tone);background:var(--tone-soft);border-radius:999px;padding:0 7px;white-space:nowrap}.an-ex-kept{--tone: var(--an-good);--tone-soft: var(--an-good-soft)}.an-ex-discarded{--tone: var(--an-idle);--tone-soft: var(--an-idle-soft)}.an-ex-failed{--tone: var(--an-bad);--tone-soft: var(--an-bad-soft)}.an-ex-running{--tone: var(--an-info);--tone-soft: var(--an-info-soft)}.an-ex-stopped{--tone: var(--an-warn);--tone-soft: var(--an-warn-soft)}.an-main{display:flex;flex-direction:column;gap:12px;min-width:0}.an-plot-legend{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12px;color:var(--an-muted);padding:0 4px 6px;align-items:center}.an-plot-legend b{color:var(--an-text);font-size:13px}.an-plot{position:relative}.an-plot svg{display:block}.an-plot text{fill:var(--an-muted);font-size:11px}.an-grid-line{stroke:var(--an-line);stroke-dasharray:3 5}.an-frontier{fill:none;stroke:var(--an-good);stroke-width:2.5;stroke-linejoin:round}.an-baseline{stroke:var(--an-warn);stroke-dasharray:6 4}.an-plot .an-baseline-label{fill:var(--an-warn)}.an-lane{fill:var(--an-idle-soft)}.an-point{cursor:pointer}.an-point-kept{fill:var(--an-good)}.an-point-other{fill:var(--an-paper);stroke:var(--an-idle);stroke-width:1.6}.an-point-label{font-weight:600}.an-plot .an-point-label.is-frontier{fill:var(--an-good)}.an-ring{animation:an-ring 1.8s ease-out infinite;transform-box:fill-box;transform-origin:center}@keyframes an-ring{0%{opacity:.9;transform:scale(.6)}to{opacity:0;transform:scale(1.6)}}.an-tip{position:absolute;width:220px;pointer-events:none;background:var(--an-text);color:var(--an-paper);border-radius:10px;padding:10px 12px;font-size:12px;line-height:1.6;box-shadow:0 10px 30px #0003}.an-tip span{display:block;opacity:.75}.an-small-multiples{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}.an-mini text{fill:var(--an-muted);font-size:10px}.an-mini-values{display:flex;flex-wrap:wrap;gap:2px 10px;font-size:11px;color:var(--an-muted);min-height:17px}.an-stats{display:flex;flex-direction:column;gap:8px}.an-stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.an-stat{background:var(--an-paper);border:1px solid var(--an-line);border-radius:10px;padding:8px 10px;min-width:0}.an-stat.is-wide{grid-column:1 / -1}.an-stat small{display:block;font-size:11.5px;color:var(--an-muted)}.an-stat-value{display:block;font-size:21px;font-variant-numeric:tabular-nums;line-height:1.3;white-space:nowrap}.an-stat-unit{font-style:normal;font-size:12px;font-weight:500;color:var(--an-muted);margin-left:3px}.an-stat p{margin:0;font-size:10.5px;color:var(--an-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-meter{height:5px;border-radius:3px;background:var(--an-idle-soft);margin-top:6px;position:relative}.an-meter i{position:absolute;inset:0 auto 0 0;border-radius:3px;background:var(--an-good)}.an-meter i.is-total{background:var(--an-line)}.an-detail-card{background:var(--an-text);color:var(--an-paper);border-radius:10px;padding:10px 12px;font-size:12px;line-height:1.6}.an-detail-card span{display:block;opacity:.75}@container (max-width: 980px){.an-tracker-grid{grid-template-columns:minmax(0,1fr)}.an-runs{order:3;max-height:320px}.an-stats{order:2}.an-stat-grid{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}.an-tree-layout{flex-direction:column}.an-detail{width:100%;position:static}}@media(prefers-reduced-motion:reduce){.an-ring,.an-st-active .an-mark{animation:none}}@media print{.an-tools,.an-tip{display:none}.an-runs-list{overflow:visible}}
1
+ import{a}from"./chunk-S4EP5SMX.js";import{a as e}from"./chunk-J6IRWTF7.js";a(`.sb-block.an-block{--an-text: var(--text, #222222);--an-muted: var(--muted, #6a6a6a);--an-line: var(--line, #dddddd);--an-paper: var(--paper, #ffffff);--an-surface: var(--surface, #fafafa);--an-accent: var(--accent, #120a8f);--an-accent-soft: var(--accent-soft, #eeedf9);--an-good: #2f6b4f;--an-good-soft: #e6efe9;--an-bad: #b0473f;--an-bad-soft: #f8e7e5;--an-warn: #a86b34;--an-warn-soft: #f6ece2;--an-info: #3b74b8;--an-info-soft: #e5eff8;--an-idle: #8a918c;--an-idle-soft: #f1f2ee;color:var(--an-text);font-family:inherit;font-size:14px;line-height:1.55;padding:8px 0;container-type:inline-size;overflow-wrap:anywhere}:root[data-theme=dark] .an-block,[data-theme=dark] .an-block{--an-good: #7cc3a0;--an-good-soft: #20352b;--an-bad: #e48b83;--an-bad-soft: #3b2423;--an-warn: #e0a96f;--an-warn-soft: #3a2c1e;--an-info: #8bb8eb;--an-info-soft: #1f2d3d;--an-idle: #a3aaa5;--an-idle-soft: #2a2c2b}.an-block *{box-sizing:border-box}.an-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px;margin-bottom:12px}.an-title{font-size:17px;font-weight:700;margin:0}.an-sub{color:var(--an-muted);font-size:13px;margin:0}.an-tools{margin-left:auto;display:flex;flex-wrap:wrap;gap:6px;align-items:center}.an-block .an-chip{border:1px solid var(--an-line);background:var(--an-paper);color:var(--an-muted);border-radius:999px;padding:3px 10px;font:inherit;font-size:12px;font-weight:600;cursor:pointer}.an-chip[aria-pressed=true]{border-color:currentColor;background:var(--an-surface);color:var(--an-text)}.an-chip:focus-visible,.an-item:focus-visible,.an-col-button:focus-visible,.an-row:focus-visible{outline:2px solid var(--an-accent);outline-offset:2px}.an-panel{background:var(--an-paper);border:1px solid var(--an-line);border-radius:12px;padding:12px;min-width:0}.an-panel-title{font-size:12.5px;font-weight:700;margin:0 0 8px}.an-empty{color:var(--an-muted);font-size:13px;padding:12px 0}.an-static{margin-top:10px;font-size:13px}.an-static summary{cursor:pointer;color:var(--an-muted)}.an-static table{border-collapse:collapse;width:100%;margin-top:8px}.an-static th,.an-static td{border-bottom:1px solid var(--an-line);padding:4px 6px;text-align:left;vertical-align:top}.an-tone-yes{--tone: var(--an-good);--tone-soft: var(--an-good-soft)}.an-tone-no{--tone: var(--an-bad);--tone-soft: var(--an-bad-soft)}.an-tone-partial{--tone: var(--an-warn);--tone-soft: var(--an-warn-soft)}.an-tone-neutral{--tone: var(--an-info);--tone-soft: var(--an-info-soft)}.an-tone-na{--tone: var(--an-idle);--tone-soft: transparent}.an-matrix-scroll{overflow-x:auto}.an-matrix{border-collapse:separate;border-spacing:0;width:100%;min-width:560px}.an-matrix th,.an-matrix td{padding:8px 10px;border-bottom:1px solid var(--an-line);text-align:left;vertical-align:top}.an-matrix thead th{font-size:13px;white-space:nowrap;border-bottom-width:2px}.an-matrix .an-rowhead{position:sticky;left:0;z-index:1;background:var(--an-paper);width:180px;min-width:140px}.an-row-label{font-weight:600}.an-row-hint{color:var(--an-muted);font-size:11.5px;margin-top:2px}.an-group-row th{background:var(--an-surface);color:var(--an-muted);font-size:12px;letter-spacing:.04em}.an-col-button{all:unset;cursor:pointer;display:block}.an-col-note{display:block;font-weight:500;font-size:11.5px;color:var(--an-muted);white-space:normal}.an-matrix .is-highlight{background:var(--an-accent-soft);box-shadow:inset 2px 0 var(--an-accent),inset -2px 0 var(--an-accent)}.an-matrix thead .is-highlight{color:var(--an-accent)}.an-matrix .is-focus{background:var(--an-surface);box-shadow:inset 2px 0 var(--an-text),inset -2px 0 var(--an-text)}.an-matrix.has-focus td:not(.is-focus):not(.is-highlight):not(.an-rowhead){opacity:.55}.an-matrix tbody tr:hover td,.an-matrix tbody tr:hover th{background-image:linear-gradient(var(--an-surface),var(--an-surface))}.an-cell{display:inline-flex;gap:5px;align-items:baseline;color:var(--tone);background:var(--tone-soft);border-radius:6px;padding:1px 6px;line-height:1.5;white-space:nowrap}.an-cell span{color:var(--an-text)}.an-tone-na.an-cell,.an-tone-na.an-cell span{color:var(--an-idle);padding:0}.an-note-mark{color:var(--an-muted);font-size:11px;vertical-align:super}.an-legend{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:8px;font-size:12px;color:var(--an-muted)}.an-legend b{color:var(--tone)}.an-tree-layout{display:flex;gap:16px;align-items:flex-start}.an-tree{flex:none;max-width:100%;position:relative}.an-tree svg{position:absolute;inset:0;overflow:visible}.an-root{position:absolute;border-radius:14px;background:var(--an-text);color:var(--an-paper);padding:12px 14px;display:flex;flex-direction:column;justify-content:center;font-size:13px;font-weight:600;line-height:1.45}.an-root small{opacity:.7;font-size:11px;font-weight:500}.an-group{position:absolute;background:var(--an-paper);border:1px solid var(--an-line);border-radius:12px;padding:8px 12px;display:flex;flex-direction:column;justify-content:center;gap:5px}.an-group-top{display:flex;align-items:baseline;gap:6px;font-size:13.5px}.an-group-top span{margin-left:auto;font-size:11.5px;color:var(--an-muted)}.an-group-summary{font-size:11px;color:var(--an-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.an-bar{display:flex;height:6px;border-radius:3px;overflow:hidden;background:var(--an-idle-soft)}.an-block .an-item{position:absolute;display:flex;align-items:center;gap:8px;padding:0 10px 0 6px;border-radius:9px;border:1px solid var(--an-line);background:var(--an-paper);font:inherit;font-size:12.5px;color:var(--an-text);text-align:left;cursor:pointer;transition:opacity .15s}.an-item.is-selected{border-color:var(--tone);background:var(--tone-soft)}.an-item.is-dim{opacity:.3}.an-mark{width:20px;height:20px;flex-shrink:0;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:var(--tone);background:var(--tone-soft)}.an-st-done .an-mark{color:var(--an-paper);background:var(--tone)}.an-st-todo .an-mark{border:1px dashed var(--tone)}.an-st-active .an-mark{animation:an-pulse 1.4s ease-in-out infinite}.an-item-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-st-failed .an-item-label{color:var(--an-muted);text-decoration:line-through;text-decoration-color:color-mix(in srgb,var(--an-bad) 55%,transparent)}.an-item-result{max-width:48%;font-size:11px;color:var(--an-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-st-done .an-item-result{color:var(--tone)}.an-item-source{font-size:10.5px;color:var(--an-muted);white-space:nowrap}.an-detail{width:300px;flex-shrink:0;position:sticky;top:8px;display:flex;flex-direction:column;gap:10px}.an-detail h4{font-size:15px;margin:4px 0 8px;line-height:1.4}.an-pill{display:inline-block;font-size:12px;font-weight:600;color:var(--tone);background:var(--tone-soft);border-radius:999px;padding:2px 10px}.an-field{margin-top:12px}.an-field small{display:block;font-size:11.5px;color:var(--an-muted);margin-bottom:3px}.an-result-box{margin-top:12px;padding:10px 12px;border-radius:10px;background:var(--tone-soft)}.an-tags{display:flex;flex-wrap:wrap;gap:5px}.an-tag{font-size:12px;font-weight:600;padding:2px 8px;border-radius:6px;background:var(--an-idle-soft)}@keyframes an-pulse{0%,to{opacity:1}50%{opacity:.35}}.an-tracker{background:var(--an-surface);border:1px solid var(--an-line);border-radius:14px;padding:14px}.an-tracker-grid{display:grid;grid-template-columns:250px minmax(0,1fr) 250px;gap:16px;align-items:stretch}.an-runs{display:flex;flex-direction:column;padding:0;min-height:0}.an-runs-head{padding:10px 12px 8px;border-bottom:1px solid var(--an-line)}.an-runs-list{overflow-y:auto;flex:1 1 0;min-height:0}.an-row{display:grid;grid-template-columns:16px 40px minmax(0,1fr) auto;align-items:center;gap:6px;padding:7px 10px;font-size:12px;cursor:pointer;border-bottom:1px solid var(--an-idle-soft)}.an-row:hover{background:var(--an-surface)}.an-row.is-selected{background:var(--an-accent-soft)}.an-row-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-row-name small{display:block;font-size:10.5px;color:var(--an-muted)}.an-score{font-variant-numeric:tabular-nums;font-weight:600}.an-status{font-size:10.5px;font-weight:600;color:var(--tone);background:var(--tone-soft);border-radius:999px;padding:0 7px;white-space:nowrap}.an-ex-kept{--tone: var(--an-good);--tone-soft: var(--an-good-soft)}.an-ex-discarded{--tone: var(--an-idle);--tone-soft: var(--an-idle-soft)}.an-ex-failed{--tone: var(--an-bad);--tone-soft: var(--an-bad-soft)}.an-ex-running{--tone: var(--an-info);--tone-soft: var(--an-info-soft)}.an-ex-stopped{--tone: var(--an-warn);--tone-soft: var(--an-warn-soft)}.an-main{display:flex;flex-direction:column;gap:12px;min-width:0}.an-plot-legend{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12px;color:var(--an-muted);padding:0 4px 6px;align-items:center}.an-plot-legend b{color:var(--an-text);font-size:13px}.an-plot{position:relative}.an-plot svg{display:block}.an-plot text{fill:var(--an-muted);font-size:11px}.an-grid-line{stroke:var(--an-line);stroke-dasharray:3 5}.an-frontier{fill:none;stroke:var(--an-good);stroke-width:2.5;stroke-linejoin:round}.an-baseline{stroke:var(--an-warn);stroke-dasharray:6 4}.an-plot .an-baseline-label{fill:var(--an-warn)}.an-lane{fill:var(--an-idle-soft)}.an-point{cursor:pointer}.an-point-kept{fill:var(--an-good)}.an-point-other{fill:var(--an-paper);stroke:var(--an-idle);stroke-width:1.6}.an-point-label{font-weight:600}.an-plot .an-point-label.is-frontier{fill:var(--an-good)}.an-ring{animation:an-ring 1.8s ease-out infinite;transform-box:fill-box;transform-origin:center}@keyframes an-ring{0%{opacity:.9;transform:scale(.6)}to{opacity:0;transform:scale(1.6)}}.an-tip{position:absolute;width:220px;pointer-events:none;background:var(--an-text);color:var(--an-paper);border-radius:10px;padding:10px 12px;font-size:12px;line-height:1.6;box-shadow:0 10px 30px #0003}.an-tip span{display:block;opacity:.75}.an-small-multiples{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}.an-mini text{fill:var(--an-muted);font-size:10px}.an-mini-values{display:flex;flex-wrap:wrap;gap:2px 10px;font-size:11px;color:var(--an-muted);min-height:17px}.an-stats{display:flex;flex-direction:column;gap:8px}.an-stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.an-stat{background:var(--an-paper);border:1px solid var(--an-line);border-radius:10px;padding:8px 10px;min-width:0}.an-stat.is-wide{grid-column:1 / -1}.an-stat small{display:block;font-size:11.5px;color:var(--an-muted)}.an-stat-value{display:block;font-size:21px;font-variant-numeric:tabular-nums;line-height:1.3;white-space:nowrap}.an-stat-unit{font-style:normal;font-size:12px;font-weight:500;color:var(--an-muted);margin-left:3px}.an-stat p{margin:0;font-size:10.5px;color:var(--an-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-meter{height:5px;border-radius:3px;background:var(--an-idle-soft);margin-top:6px;position:relative}.an-meter i{position:absolute;inset:0 auto 0 0;border-radius:3px;background:var(--an-good)}.an-meter i.is-total{background:var(--an-line)}.an-detail-card{background:var(--an-text);color:var(--an-paper);border-radius:10px;padding:10px 12px;font-size:12px;line-height:1.6}.an-detail-card span{display:block;opacity:.75}@container (max-width: 980px){.an-tracker-grid{grid-template-columns:minmax(0,1fr)}.an-runs{order:3;max-height:320px}.an-stats{order:2}.an-stat-grid{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}.an-tree-layout{flex-direction:column}.an-detail{width:100%;position:static}}@media(prefers-reduced-motion:reduce){.an-ring,.an-st-active .an-mark{animation:none}}@media print{.an-tools,.an-tip{display:none}.an-runs-list{overflow:visible}}
2
2
  `);var n=e("analysis",{"zh-CN":{"matrix.title":"\u5BF9\u6BD4\u77E9\u9635","matrix.legend.yes":"\u91C7\u7528 / \u6EE1\u8DB3","matrix.legend.no":"\u4E0D\u91C7\u7528 / \u4E0D\u6EE1\u8DB3","matrix.legend.partial":"\u90E8\u5206\u6216\u6709\u6539\u52A8","matrix.legend.neutral":"\u4E2D\u6027\u8BF4\u660E","matrix.legend.na":"\u672A\u6D89\u53CA","matrix.diffOnly":"\u53EA\u770B\u5DEE\u5F02 {count}/{total}","matrix.clearFocus":"\u53D6\u6D88\u805A\u7126","matrix.dimension":"\u7EF4\u5EA6","matrix.source":"\u6765\u6E90 \u2197","matrix.allSame":"\u6240\u6709\u7EF4\u5EA6\u5728\u5404\u5217\u4E4B\u95F4\u90FD\u76F8\u540C\u3002","matrix.focusHint":"\u70B9\u51FB\u5217\u5934\u53EF\u805A\u7126\u4E00\u5217","matrix.notes":"\u6CE8\u91CA","matrix.note":"{column} \xB7 {row}\uFF1A{note}","tree.title":"\u72B6\u6001\u6811","tree.status.done":"\u8D70\u901A","tree.status.active":"\u8FDB\u884C\u4E2D","tree.status.failed":"\u6CA1\u8D70\u901A","tree.status.todo":"\u5F85\u63A2\u7D22","tree.status.paused":"\u6401\u7F6E","tree.highlightByStatus":"\u6309\u72B6\u6001\u7A81\u51FA","tree.question":"\u95EE\u9898","tree.source":"\u6765\u6E90\uFF1A{source}","tree.detail":"\u8BF4\u660E","tree.result":"\u7ED3\u679C","tree.links":"\u5173\u8054","tree.overall":"\u6574\u4F53\u8FDB\u5EA6","tree.readAll":"\u6309\u7C7B\u522B\u9605\u8BFB\u5168\u90E8\u6761\u76EE\uFF08{count}\uFF09","tree.itemResult":"{label}\uFF1A{result}","tracker.title":"\u5B9E\u9A8C\u8FFD\u8E2A","tracker.status.kept":"\u4FDD\u7559","tracker.status.discarded":"\u653E\u5F03","tracker.status.failed":"\u5931\u8D25","tracker.status.running":"\u8FD0\u884C\u4E2D","tracker.status.stopped":"\u5DF2\u505C\u6B62","tracker.overTime":"{metric} \u968F\u65F6\u95F4\u7684\u5206\u5E03","tracker.noScore":"\u65E0\u5206\u6570","tracker.baseline":"\u57FA\u7EBF {value}","tracker.startTime":"\u5F00\u59CB\u65F6\u95F4 \u2192","tracker.minutes":"{count} \u5206\u949F","tracker.metricValue":"{metric}\uFF1A{value}","tracker.best":"\u6700\u4F73","tracker.updatedAt":"\u66F4\u65B0\u4E8E {time}","tracker.runs":"\u8FD0\u884C \xB7 {count}","tracker.filterByStatus":"\u6309\u72B6\u6001\u7B5B\u9009","tracker.all":"\u5168\u90E8","tracker.showRun":"\u5728\u66F2\u7EBF\u4E2D\u663E\u793A {id}","tracker.allExperiments":"\u5168\u90E8\u5B9E\u9A8C \xB7 {metric}","tracker.higherIsBetter":"\u8D8A\u9AD8\u8D8A\u597D","tracker.lowerIsBetter":"\u8D8A\u4F4E\u8D8A\u597D","tracker.frontier":"\u2014 \u6700\u4F18\u524D\u6CBF","tracker.legendKept":"\u25CF \u4FDD\u7559","tracker.legendOther":"\u25CB \u5176\u4ED6","tracker.listSeparator":"\u3001","tracker.runsHint":"\u6A2A\u8F74\u4E3A\u8BAD\u7EC3\u6B65\uFF1B\u5728\u5DE6\u4FA7\u52FE\u9009\u4EE5\u663E\u793A\u6216\u9690\u85CF","tracker.total":"\u5B9E\u9A8C\u603B\u6570","tracker.runningCount":"\u8FD0\u884C\u4E2D {count}","tracker.groupBest":"{group}\u6700\u4F73","tracker.currentBest":"\u5F53\u524D\u6700\u4F73","tracker.gain":"\u6BD4\u57FA\u7EBF\u6539\u5584","tracker.gainDetail":"\u524D\u6CBF\u4E0A\u7684\u6700\u4F73 {best} \xB7 \u57FA\u7EBF {baseline}","tracker.keepRate":"\u4FDD\u7559\u7387","tracker.keepRateDetail":"\u4FDD\u7559 {kept} \xB7 \u8FD0\u884C\u4E2D {running}","tracker.resourceHours":"{unit} \xB7 \u65F6","tracker.budget":"\u9884\u7B97 {value}","tracker.cost":"\u4F30\u7B97\u6210\u672C","tracker.costRate":"\u6309 {rate} / {unit}\xB7\u65F6","tracker.byCategory":"\u6309\u65B9\u5411 \xB7 \u4FDD\u7559 / \u603B\u6570","tracker.readTable":"\u4EE5\u8868\u683C\u9605\u8BFB\u5168\u90E8\u5B9E\u9A8C\uFF08{count}\uFF09","tracker.column.name":"\u540D\u79F0","tracker.column.start":"\u5F00\u59CB","tracker.column.status":"\u72B6\u6001","tracker.column.note":"\u5907\u6CE8"},en:{"matrix.title":"Comparison matrix","matrix.legend.yes":"Adopted / met","matrix.legend.no":"Not adopted / not met","matrix.legend.partial":"Partly or with changes","matrix.legend.neutral":"Neutral note","matrix.legend.na":"Not covered","matrix.diffOnly":"Differences only {count}/{total}","matrix.clearFocus":"Clear focus","matrix.dimension":"Dimension","matrix.source":"Source \u2197","matrix.allSame":"Every dimension is the same across all columns.","matrix.focusHint":"Click a column header to focus it","matrix.notes":"Notes","matrix.note":"{column} \xB7 {row}: {note}","tree.title":"Status tree","tree.status.done":"Worked","tree.status.active":"In progress","tree.status.failed":"Didn't work","tree.status.todo":"To explore","tree.status.paused":"On hold","tree.highlightByStatus":"Highlight by status","tree.question":"Question","tree.source":"Source: {source}","tree.detail":"Details","tree.result":"Result","tree.links":"Related","tree.overall":"Overall progress","tree.readAll":"Read all items by category ({count})","tree.itemResult":"{label}: {result}","tracker.title":"Experiment tracker","tracker.status.kept":"Kept","tracker.status.discarded":"Discarded","tracker.status.failed":"Failed","tracker.status.running":"Running","tracker.status.stopped":"Stopped","tracker.overTime":"{metric} over time","tracker.noScore":"No score","tracker.baseline":"Baseline {value}","tracker.startTime":"Start time \u2192","tracker.minutes":"{count} min","tracker.metricValue":"{metric}: {value}","tracker.best":"Best","tracker.updatedAt":"Updated {time}","tracker.runs":"Runs \xB7 {count}","tracker.filterByStatus":"Filter by status","tracker.all":"All","tracker.showRun":"Show {id} in charts","tracker.allExperiments":"All experiments \xB7 {metric}","tracker.higherIsBetter":"higher is better","tracker.lowerIsBetter":"lower is better","tracker.frontier":"\u2014 Best frontier","tracker.legendKept":"\u25CF Kept","tracker.legendOther":"\u25CB Other","tracker.listSeparator":", ","tracker.runsHint":"X-axis shows training steps; check runs on the left to show or hide them","tracker.total":"Experiments","tracker.runningCount":"Running {count}","tracker.groupBest":"Best in {group}","tracker.currentBest":"Current best","tracker.gain":"Gain over baseline","tracker.gainDetail":"Best on the frontier {best} \xB7 baseline {baseline}","tracker.keepRate":"Keep rate","tracker.keepRateDetail":"Kept {kept} \xB7 running {running}","tracker.resourceHours":"{unit} hours","tracker.budget":"Budget {value}","tracker.cost":"Estimated cost","tracker.costRate":"At {rate} per {unit} hour","tracker.byCategory":"By direction \xB7 kept / total","tracker.readTable":"Read all experiments as a table ({count})","tracker.column.name":"Name","tracker.column.start":"Start","tracker.column.status":"Status","tracker.column.note":"Notes"}});export{n as a};
@@ -0,0 +1,21 @@
1
+ import{c as Va,e as $a,f as Ya}from"./chunk-J6IRWTF7.js";import{a as b,c as N}from"./chunk-DCANE7XH.js";var xt=b(l=>{"use strict";var Xa=Symbol.for("react.transitional.element"),Zu=Symbol.for("react.portal"),Ju=Symbol.for("react.fragment"),Qu=Symbol.for("react.strict_mode"),$u=Symbol.for("react.profiler"),Yu=Symbol.for("react.consumer"),ed=Symbol.for("react.context"),ad=Symbol.for("react.forward_ref"),td=Symbol.for("react.suspense"),od=Symbol.for("react.memo"),st=Symbol.for("react.lazy"),ud=Symbol.for("react.activity"),dd=Symbol.for("react.view_transition"),ut=Symbol.iterator;function ld(e){return e===null||typeof e!="object"?null:(e=ut&&e[ut]||e["@@iterator"],typeof e=="function"?e:null)}var ft={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},it=Object.assign,ct={};function O(e,a,o){this.props=e,this.context=a,this.refs=ct,this.updater=o||ft}O.prototype.isReactComponent={};O.prototype.setState=function(e,a){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,a,"setState")};O.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function nt(){}nt.prototype=O.prototype;function ja(e,a,o){this.props=e,this.context=a,this.refs=ct,this.updater=o||ft}var Ka=ja.prototype=new nt;Ka.constructor=ja;it(Ka,O.prototype);Ka.isPureReactComponent=!0;var dt=Array.isArray;function Na(){}var f={H:null,A:null,T:null,S:null},pt=Object.prototype.hasOwnProperty;function Za(e,a,o){var u=o.ref;return{$$typeof:Xa,type:e,key:a,ref:u!==void 0?u:null,props:o}}function rd(e,a){return Za(e.type,a,e.props)}function Ja(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xa}function sd(e){var a={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(o){return a[o]})}var lt=/\/+/g;function Wa(e,a){return typeof e=="object"&&e!==null&&e.key!=null?sd(""+e.key):a.toString(36)}function fd(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Na,Na):(e.status="pending",e.then(function(a){e.status==="pending"&&(e.status="fulfilled",e.value=a)},function(a){e.status==="pending"&&(e.status="rejected",e.reason=a)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function H(e,a,o,u,d){var r=typeof e;(r==="undefined"||r==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(r){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Xa:case Zu:s=!0;break;case st:return s=e._init,H(s(e._payload),a,o,u,d)}}if(s)return d=d(e),s=u===""?"."+Wa(e,0):u,dt(d)?(o="",s!=null&&(o=s.replace(lt,"$&/")+"/"),H(d,a,o,"",function(v){return v})):d!=null&&(Ja(d)&&(d=rd(d,o+(d.key==null||e&&e.key===d.key?"":(""+d.key).replace(lt,"$&/")+"/")+s)),a.push(d)),1;s=0;var c=u===""?".":u+":";if(dt(e))for(var i=0;i<e.length;i++)u=e[i],r=c+Wa(u,i),s+=H(u,a,o,r,d);else if(i=ld(e),typeof i=="function")for(e=i.call(e),i=0;!(u=e.next()).done;)u=u.value,r=c+Wa(u,i++),s+=H(u,a,o,r,d);else if(r==="object"){if(typeof e.then=="function")return H(fd(e),a,o,u,d);throw a=String(e),Error("Objects are not valid as a React child (found: "+(a==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.")}return s}function X(e,a,o){if(e==null)return e;var u=[],d=0;return H(e,u,"","",function(r){return a.call(o,r,d++)}),u}function id(e){if(e._status===-1){var a=e._result,o=a();o.then(function(u){(e._status===0||e._status===-1)&&(e._status=1,e._result=u,o.status===void 0&&(o.status="fulfilled",o.value=u))},function(u){(e._status===0||e._status===-1)&&(e._status=2,e._result=u,o.status===void 0&&(o.status="rejected",o.reason=u))}),e._status===-1&&(e._status=0,e._result=o)}if(e._status===1)return e._result.default;throw e._result}var rt=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function mt(e){var a=f.T,o={};o.types=a!==null?a.types:null,f.T=o;try{var u=e(),d=f.S;d!==null&&d(o,u),typeof u=="object"&&u!==null&&typeof u.then=="function"&&u.then(Na,rt)}catch(r){rt(r)}finally{a!==null&&o.types!==null&&(a.types=o.types),f.T=a}}function Lt(e){var a=f.T;if(a!==null){var o=a.types;o===null?a.types=[e]:o.indexOf(e)===-1&&o.push(e)}else mt(Lt.bind(null,e))}var cd={map:X,forEach:function(e,a,o){X(e,function(){a.apply(this,arguments)},o)},count:function(e){var a=0;return X(e,function(){a++}),a},toArray:function(e){return X(e,function(a){return a})||[]},only:function(e){if(!Ja(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};l.Activity=ud;l.Children=cd;l.Component=O;l.Fragment=Ju;l.Profiler=$u;l.PureComponent=ja;l.StrictMode=Qu;l.Suspense=td;l.ViewTransition=dd;l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=f;l.__COMPILER_RUNTIME={__proto__:null,c:function(e){return f.H.useMemoCache(e)}};l.addTransitionType=Lt;l.cache=function(e){return function(){return e.apply(null,arguments)}};l.cacheSignal=function(){return null};l.cloneElement=function(e,a,o){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var u=it({},e.props),d=e.key;if(a!=null)for(r in a.key!==void 0&&(d=""+a.key),a)!pt.call(a,r)||r==="key"||r==="__self"||r==="__source"||r==="ref"&&a.ref===void 0||(u[r]=a[r]);var r=arguments.length-2;if(r===1)u.children=o;else if(1<r){for(var s=Array(r),c=0;c<r;c++)s[c]=arguments[c+2];u.children=s}return Za(e.type,d,u)};l.createContext=function(e){return e={$$typeof:ed,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Yu,_context:e},e};l.createElement=function(e,a,o){var u,d={},r=null;if(a!=null)for(u in a.key!==void 0&&(r=""+a.key),a)pt.call(a,u)&&u!=="key"&&u!=="__self"&&u!=="__source"&&(d[u]=a[u]);var s=arguments.length-2;if(s===1)d.children=o;else if(1<s){for(var c=Array(s),i=0;i<s;i++)c[i]=arguments[i+2];d.children=c}if(e&&e.defaultProps)for(u in s=e.defaultProps,s)d[u]===void 0&&(d[u]=s[u]);return Za(e,r,d)};l.createRef=function(){return{current:null}};l.forwardRef=function(e){return{$$typeof:ad,render:e}};l.isValidElement=Ja;l.lazy=function(e){return{$$typeof:st,_payload:{_status:-1,_result:e},_init:id}};l.memo=function(e,a){return{$$typeof:od,type:e,compare:a===void 0?null:a}};l.startTransition=mt;l.unstable_useCacheRefresh=function(){return f.H.useCacheRefresh()};l.use=function(e){return f.H.use(e)};l.useActionState=function(e,a,o){return f.H.useActionState(e,a,o)};l.useCallback=function(e,a){return f.H.useCallback(e,a)};l.useContext=function(e){return f.H.useContext(e)};l.useDebugValue=function(){};l.useDeferredValue=function(e,a){return f.H.useDeferredValue(e,a)};l.useEffect=function(e,a){return f.H.useEffect(e,a)};l.useEffectEvent=function(e){return f.H.useEffectEvent(e)};l.useId=function(){return f.H.useId()};l.useImperativeHandle=function(e,a,o){return f.H.useImperativeHandle(e,a,o)};l.useInsertionEffect=function(e,a){return f.H.useInsertionEffect(e,a)};l.useLayoutEffect=function(e,a){return f.H.useLayoutEffect(e,a)};l.useMemo=function(e,a){return f.H.useMemo(e,a)};l.useOptimistic=function(e,a){return f.H.useOptimistic(e,a)};l.useReducer=function(e,a,o){return f.H.useReducer(e,a,o)};l.useRef=function(e){return f.H.useRef(e)};l.useState=function(e){return f.H.useState(e)};l.useSyncExternalStore=function(e,a,o){return f.H.useSyncExternalStore(e,a,o)};l.useTransition=function(){return f.H.useTransition()};l.version="19.3.0"});var U=b((Dd,It)=>{"use strict";It.exports=xt()});var vu=b(Oa=>{"use strict";var pd=Symbol.for("react.transitional.element"),md=Symbol.for("react.fragment");function Ru(e,a,o){var u=null;if(o!==void 0&&(u=""+o),a.key!==void 0&&(u=""+a.key),"key"in a){o={};for(var d in a)d!=="key"&&(o[d]=a[d])}else o=a;return a=o.ref,{$$typeof:pd,type:e,key:u,ref:a!==void 0?a:null,props:o}}Oa.Fragment=md;Oa.jsx=Ru;Oa.jsxs=Ru});var Ld=b((Qn,qu)=>{"use strict";qu.exports=vu()});var Ou=b(n=>{"use strict";var xd=U();function Hu(e){var a="https://react.dev/errors/"+e;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+e+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function C(){}var p={d:{f:C,r:function(){throw Error(Hu(522))},D:C,C,L:C,m:C,X:C,S:C,M:C},p:0,findDOMNode:null},Id=Symbol.for("react.portal"),hd=Symbol.for("react.recoverable"),bu=Symbol.for("react.optimistic_key");function Cd(e,a,o){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Id,key:u==null?null:u===bu?bu:""+u,children:e,containerInfo:a,implementation:o}}var V=xd.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Ua(e,a){if(e==="font")return"";if(typeof a=="string")return a==="use-credentials"?a:""}n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=p;n.browser=function(e){return{$$typeof:hd,_reason:e}};n.createPortal=function(e,a){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)throw Error(Hu(299));return Cd(e,a,null,o)};n.flushSync=function(e){var a=V.T,o=p.p;try{if(V.T=null,p.p=2,e)return e()}finally{V.T=a,p.p=o,p.d.f()}};n.preconnect=function(e,a){typeof e=="string"&&(a?(a=a.crossOrigin,a=typeof a=="string"?a==="use-credentials"?a:"":void 0):a=null,p.d.C(e,a))};n.prefetchDNS=function(e){typeof e=="string"&&p.d.D(e)};n.preinit=function(e,a){if(typeof e=="string"&&a&&typeof a.as=="string"){var o=a.as,u=Ua(o,a.crossOrigin),d=typeof a.integrity=="string"?a.integrity:void 0,r=typeof a.fetchPriority=="string"?a.fetchPriority:void 0;o==="style"?p.d.S(e,typeof a.precedence=="string"?a.precedence:void 0,{crossOrigin:u,integrity:d,fetchPriority:r}):o==="script"&&p.d.X(e,{crossOrigin:u,integrity:d,fetchPriority:r,nonce:typeof a.nonce=="string"?a.nonce:void 0})}};n.preinitModule=function(e,a){if(typeof e=="string")if(typeof a=="object"&&a!==null){if(a.as==null||a.as==="script"){var o=Ua(a.as,a.crossOrigin);p.d.M(e,{crossOrigin:o,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0,fetchPriority:typeof a.fetchPriority=="string"?a.fetchPriority:void 0})}}else a==null&&p.d.M(e)};n.preload=function(e,a){if(typeof e=="string"&&typeof a=="object"&&a!==null&&typeof a.as=="string"){var o=a.as,u=Ua(o,a.crossOrigin);p.d.L(e,o,{crossOrigin:u,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0,type:typeof a.type=="string"?a.type:void 0,fetchPriority:typeof a.fetchPriority=="string"?a.fetchPriority:void 0,referrerPolicy:typeof a.referrerPolicy=="string"?a.referrerPolicy:void 0,imageSrcSet:typeof a.imageSrcSet=="string"?a.imageSrcSet:void 0,imageSizes:typeof a.imageSizes=="string"?a.imageSizes:void 0,media:typeof a.media=="string"?a.media:void 0})}};n.preloadModule=function(e,a){if(typeof e=="string")if(a){var o=Ua(a.as,a.crossOrigin);p.d.m(e,{as:typeof a.as=="string"&&a.as!=="script"?a.as:void 0,crossOrigin:o,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0,fetchPriority:typeof a.fetchPriority=="string"?a.fetchPriority:void 0})}else p.d.m(e)};n.requestFormReset=function(e){p.d.r(e)};n.unstable_batchedUpdates=function(e,a){return e(a)};n.useFormState=function(e,a,o){return V.H.useFormState(e,a,o)};n.useFormStatus=function(){return V.H.useHostTransitionStatus()};n.version="19.3.0"});var gd=b((Yn,zu)=>{"use strict";function Uu(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Uu)}catch(e){console.error(e)}}Uu(),zu.exports=Ou()});function et(e){return e.replace(/@charset[^;]+;/g,"").replaceAll(":root",":scope").replace(/(?<![\w-])(?:html|body)(?=[,{])/g,":scope")}var Ku=`.portable-document { max-width: none; padding: 24px 0 12px; }
2
+ .portable-title { padding-right: 96px; font-size: 28px; margin-bottom: 24px; }
3
+ .portable-options { display: none; }
4
+ .portable-app { min-height: 0; }
5
+ .portable-app:has(> .container-workspace > .container-main > .container-page.is-root),
6
+ .portable-app > .container-workspace:has(> .container-main > .container-page.is-root) {
7
+ height: auto;
8
+ }
9
+ .portable-app > .container-workspace > .container-main:has(> .container-page.is-root) {
10
+ flex: none;
11
+ }
12
+ .portable-app > .container-workspace > .container-main > .container-page.is-root {
13
+ height: auto;
14
+ overflow: visible;
15
+ overscroll-behavior: auto;
16
+ scrollbar-gutter: auto;
17
+ }`;function at(e,a){return`@scope (#${e}) {
18
+ ${a}
19
+ ${Ku}
20
+ }`}var tt=[],Ga=new Set;function ot({root:e,scoped:a},o){let u=e.ownerDocument.createElement("style");u.dataset.showaiReaderStyle=e.id,u.textContent=a?at(e.id,et(o)):o,(a?e:e.ownerDocument.head).append(u)}function wd(e){tt.push(e);for(let a of Ga)ot(a,e)}function Pd(e,{scoped:a=!0}={}){let o={root:e,scoped:a};Ga.add(o);for(let u of tt)ot(o,u);return()=>{Ga.delete(o),e.ownerDocument.querySelectorAll(`style[data-showai-reader-style="${e.id}"]`).forEach(u=>u.remove())}}var j=N(U(),1);var ht=e=>e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function Ct(e,a,o=[]){if(a==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:ht(e),size:24,node:a,...o.length>0?{aliases:o}:{}}}var gt=e=>{let a="",o=!1;for(let u of e){if(u==="-"||u==="_"||u<=" "){o=a.length>0;continue}a.length===0?a+=u.toLowerCase():a+=o?u.toUpperCase():u,o=!1}return a};var St=e=>{let a=gt(e);return a.charAt(0).toUpperCase()+a.slice(1)};var E=N(U(),1);var _=(...e)=>e.filter((a,o,u)=>!!a&&a.trim()!==""&&u.indexOf(a)===o).join(" ").trim();var x={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function Qa(e){return e!=null}function kt(e,a={}){let o=a.attributeNames??{},u=m=>o[m]??m,d=e.size??e.width??x.width,r=e.size??e.height??x.height,s=e.aliases?.filter(m=>typeof m=="string"&&m.trim()!=="").map(m=>`lucide-${m}`)??[],c=[...e.name?[`lucide-${e.name}`]:[],...s],i=a.className?.split(" ").filter(Boolean)??[],v=a.includeDefaultClasses===!1?_(...i):_("lucide",...c,...i),_a=a.absoluteStrokeWidth?Number(a.strokeWidth??x["stroke-width"])*Number(e.size??e.width??x.width)/Number(a.size??a.width??x.width):a.strokeWidth??x["stroke-width"];return["svg",{...Object.entries(x).reduce((m,[g,q])=>(m[u(g)]=q,m),{}),..."color"in a&&a.color&&{[u("stroke")]:a.color},..."size"in a&&Qa(a.size)&&{[u("width")]:a.size,[u("height")]:a.size},..."width"in a&&Qa(a.width)&&{[u("width")]:a.width},..."height"in a&&Qa(a.height)&&{[u("height")]:a.height},[u("stroke-width")]:_a,...v&&{[u("class")]:v},[u("viewBox")]:`0 0 ${d} ${r}`,...a.hasA11yProp===!1?{[u("aria-hidden")]:"true"}:{},..."attributes"in a&&a.attributes},e.node.map(m=>{let[g,q,G]=m,W=a.nonScalingStroke?{[u("vector-effect")]:"non-scaling-stroke",...q}:q;return G?[g,W,G]:[g,W]})]}function yt(e,a={}){return kt(e,{...a,attributeNames:{...a.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}var wt=e=>{for(let a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};var z=N(U(),1);var nd=(0,z.createContext)({});var Pt=()=>(0,z.useContext)(nd);var Mt=(0,E.forwardRef)(({color:e,size:a,width:o,height:u,strokeWidth:d,absoluteStrokeWidth:r,nonScalingStroke:s,className:c="",children:i,iconNode:v=[],icon:_a={node:v,aliases:[],size:24},...Ea},m)=>{let{size:g=24,strokeWidth:q=2,absoluteStrokeWidth:G=!1,nonScalingStroke:W=!1,color:_u="currentColor",className:Eu=""}=Pt()??{},Vu=!!i||wt(Ea),[Gu,Wu,Nu=[]]=yt(_a,{color:e??_u,width:o??a??g,height:u??a??g,strokeWidth:d??q,absoluteStrokeWidth:r??G,nonScalingStroke:s??W,className:_(Eu,c),hasA11yProp:Vu,attributes:Ea});return(0,E.createElement)(Gu,{ref:m,...Wu},[...Nu.map(([Xu,ju])=>(0,E.createElement)(Xu,ju)),...Array.isArray(i)?i:[i]])});function t(e,a=[],o=[]){let u=typeof e=="string"?Ct(e,a,o):e,d=(0,j.forwardRef)(({className:r,...s},c)=>(0,j.createElement)(Mt,{ref:c,icon:u,className:r,...s}));return u.name&&(d.displayName=St(u.name)),d}var At={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};At.node;var K=t(At);var Dt={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};Dt.node;var Z=t(Dt);var Bt={name:"chart-column",size:24,node:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],aliases:["bar-chart-3"]};Bt.node;var S=t(Bt);var Tt={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};Tt.node;var J=t(Tt);var Ft={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};Ft.node;var Q=t(Ft);var Rt={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};Rt.node;var $=t(Rt);var vt={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};vt.node;var Y=t(vt);var qt={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};qt.node;var I=t(qt);var bt={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};bt.node;var ee=t(bt);var Ht={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};Ht.node;var ae=t(Ht);var Ot={name:"expand",size:24,node:[["path",{d:"m15 15 6 6",key:"1s409w"}],["path",{d:"m15 9 6-6",key:"ko1vev"}],["path",{d:"M21 16v5h-5",key:"1ck2sf"}],["path",{d:"M21 8V3h-5",key:"1qoq8a"}],["path",{d:"M3 16v5h5",key:"1t08am"}],["path",{d:"m3 21 6-6",key:"wwnumi"}],["path",{d:"M3 8V3h5",key:"1ln10m"}],["path",{d:"M9 9 3 3",key:"v551iv"}]]};Ot.node;var te=t(Ot);var Ut={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};Ut.node;var oe=t(Ut);var zt={name:"grip-vertical",size:24,node:[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]};zt.node;var ue=t(zt);var _t={name:"heading-1",size:24,node:[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]]};_t.node;var de=t(_t);var Et={name:"heading-2",size:24,node:[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]]};Et.node;var le=t(Et);var Vt={name:"heading-3",size:24,node:[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]};Vt.node;var re=t(Vt);var Gt={name:"image-plus",size:24,node:[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]};Gt.node;var se=t(Gt);var Wt={name:"link-2",size:24,node:[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]};Wt.node;var fe=t(Wt);var Nt={name:"list-ordered",size:24,node:[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]};Nt.node;var ie=t(Nt);var Xt={name:"list-tree",size:24,node:[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]]};Xt.node;var ce=t(Xt);var jt={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};jt.node;var ne=t(jt);var Kt={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};Kt.node;var pe=t(Kt);var Zt={name:"message-square-quote",size:24,node:[["path",{d:"M14 14a2 2 0 0 0 2-2V8h-2",key:"1r06pg"}],["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M8 14a2 2 0 0 0 2-2V8H8",key:"1jzu5j"}]]};Zt.node;var me=t(Zt);var Jt={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};Jt.node;var Le=t(Jt);var Qt={name:"network",size:24,node:[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]};Qt.node;var xe=t(Qt);var $t={name:"panel-top",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}]]};$t.node;var Ie=t($t);var Yt={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};Yt.node;var he=t(Yt);var eo={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};eo.node;var Ce=t(eo);var ao={name:"quote",size:24,node:[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]};ao.node;var ge=t(ao);var to={name:"redo-2",size:24,node:[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]};to.node;var Se=t(to);var oo={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};oo.node;var ke=t(oo);var uo={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};uo.node;var k=t(uo);var lo={name:"square-check-big",size:24,node:[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],aliases:["check-square"]};lo.node;var y=t(lo);var ro={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};ro.node;var ye=t(ro);var so={name:"table-2",size:24,node:[["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]};so.node;var we=t(so);var fo={name:"text-align-center",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],aliases:["align-center"]};fo.node;var w=t(fo);var io={name:"text-align-end",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],aliases:["align-right"]};io.node;var P=t(io);var co={name:"text-align-start",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],aliases:["text","align-left"]};co.node;var L=t(co);var no={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};no.node;var M=t(no);var po={name:"type",size:24,node:[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]]};po.node;var Pe=t(po);var mo={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};mo.node;var Me=t(mo);var Lo={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};Lo.node;var Ae=t(Lo);var xo={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};xo.node;var De=t(xo);var Io={name:"align-center-horizontal",size:24,node:[["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"M10 16v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4",key:"11f1s0"}],["path",{d:"M10 8V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v4",key:"t14dx9"}],["path",{d:"M20 16v1a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-1",key:"1w07xs"}],["path",{d:"M14 8V7c0-1.1.9-2 2-2h2a2 2 0 0 1 2 2v1",key:"1apec2"}]]};Io.node;var Be=t(Io);var ho={name:"align-center-vertical",size:24,node:[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4",key:"14d6g8"}],["path",{d:"M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4",key:"1e2lrw"}],["path",{d:"M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1",key:"1fkdwx"}],["path",{d:"M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1",key:"1euafb"}]]};ho.node;var Te=t(ho);var Co={name:"align-end-horizontal",size:24,node:[["rect",{width:"6",height:"16",x:"4",y:"2",rx:"2",key:"z5wdxg"}],["rect",{width:"6",height:"9",x:"14",y:"9",rx:"2",key:"um7a8w"}],["path",{d:"M22 22H2",key:"19qnx5"}]]};Co.node;var Fe=t(Co);var go={name:"align-end-vertical",size:24,node:[["rect",{width:"16",height:"6",x:"2",y:"4",rx:"2",key:"10wcwx"}],["rect",{width:"9",height:"6",x:"9",y:"14",rx:"2",key:"4p5bwg"}],["path",{d:"M22 22V2",key:"12ipfv"}]]};go.node;var Re=t(go);var So={name:"align-horizontal-distribute-center",size:24,node:[["rect",{width:"6",height:"14",x:"4",y:"5",rx:"2",key:"1wwnby"}],["rect",{width:"6",height:"10",x:"14",y:"7",rx:"2",key:"1fe6j6"}],["path",{d:"M17 22v-5",key:"4b6g73"}],["path",{d:"M17 7V2",key:"hnrr36"}],["path",{d:"M7 22v-3",key:"1r4jpn"}],["path",{d:"M7 5V2",key:"liy1u9"}]]};So.node;var ve=t(So);var ko={name:"align-start-horizontal",size:24,node:[["rect",{width:"6",height:"16",x:"4",y:"6",rx:"2",key:"1n4dg1"}],["rect",{width:"6",height:"9",x:"14",y:"6",rx:"2",key:"17khns"}],["path",{d:"M22 2H2",key:"fhrpnj"}]]};ko.node;var qe=t(ko);var yo={name:"align-start-vertical",size:24,node:[["rect",{width:"9",height:"6",x:"6",y:"14",rx:"2",key:"lpm2y7"}],["rect",{width:"16",height:"6",x:"6",y:"4",rx:"2",key:"rdj6ps"}],["path",{d:"M2 2v20",key:"1ivd8o"}]]};yo.node;var be=t(yo);var wo={name:"align-vertical-distribute-center",size:24,node:[["path",{d:"M22 17h-3",key:"1lwga1"}],["path",{d:"M22 7h-5",key:"o2endc"}],["path",{d:"M5 17H2",key:"1gx9xc"}],["path",{d:"M7 7H2",key:"6bq26l"}],["rect",{x:"5",y:"14",width:"14",height:"6",rx:"2",key:"1qrzuf"}],["rect",{x:"7",y:"4",width:"10",height:"6",rx:"2",key:"we8e9z"}]]};wo.node;var He=t(wo);var Po={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};Po.node;var Oe=t(Po);var Mo={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};Mo.node;var Ue=t(Mo);var Ao={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};Ao.node;var ze=t(Ao);var Do={name:"bold",size:24,node:[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]};Do.node;var _e=t(Do);var Bo={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};Bo.node;var Ee=t(Bo);var To={name:"bookmark-plus",size:24,node:[["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M15 10H9",key:"o6yqo3"}],["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]]};To.node;var Ve=t(To);var Fo={name:"bookmark",size:24,node:[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]]};Fo.node;var Ge=t(Fo);var Ro={name:"bring-to-front",size:24,node:[["rect",{x:"8",y:"8",width:"8",height:"8",rx:"2",key:"yj20xf"}],["path",{d:"M4 10a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2",key:"1ltk23"}],["path",{d:"M14 20a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2",key:"1q24h9"}]]};Ro.node;var We=t(Ro);var vo={name:"chart-no-axes-combined",size:24,node:[["path",{d:"M12 16v5",key:"zza2cw"}],["path",{d:"M16 14.639V21",key:"1s85h0"}],["path",{d:"M20 10.656V21",key:"q45596"}],["path",{d:"m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15",key:"1fw8x9"}],["path",{d:"M4 18.463V21",key:"1otddq"}],["path",{d:"M8 14.656V21",key:"1t2idw"}]]};vo.node;var Ne=t(vo);var qo={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};qo.node;var Xe=t(qo);var bo={name:"circle",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]};bo.node;var je=t(bo);var Ho={name:"clipboard",size:24,node:[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]};Ho.node;var Ke=t(Ho);var Oo={name:"code",size:24,node:[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]};Oo.node;var Ze=t(Oo);var Uo={name:"columns-3",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],aliases:["panels-left-right"]};Uo.node;var A=t(Uo);var zo={name:"database",size:24,node:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]};zo.node;var Je=t(zo);var _o={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};_o.node;var D=t(_o);var Eo={name:"eraser",size:24,node:[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]]};Eo.node;var Qe=t(Eo);var Vo={name:"file-braces",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],aliases:["file-json"]};Vo.node;var B=t(Vo);var Go={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};Go.node;var $e=t(Go);var Wo={name:"flask-conical",size:24,node:[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]};Wo.node;var Ye=t(Wo);var No={name:"focus",size:24,node:[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]};No.node;var ea=t(No);var Xo={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};Xo.node;var aa=t(Xo);var jo={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};jo.node;var ta=t(jo);var Ko={name:"funnel",size:24,node:[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],aliases:["filter"]};Ko.node;var T=t(Ko);var Zo={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};Zo.node;var oa=t(Zo);var Jo={name:"grip-horizontal",size:24,node:[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]]};Jo.node;var ua=t(Jo);var Qo={name:"hand",size:24,node:[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]]};Qo.node;var da=t(Qo);var $o={name:"highlighter",size:24,node:[["path",{d:"m9 11-6 6v3h9l3-3",key:"1a3l36"}],["path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4",key:"14a9rk"}]]};$o.node;var la=t($o);var Yo={name:"images",size:24,node:[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]]};Yo.node;var ra=t(Yo);var eu={name:"italic",size:24,node:[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]};eu.node;var sa=t(eu);var au={name:"lasso",size:24,node:[["path",{d:"M3.704 14.467a10 8 0 1 1 3.115 2.375",key:"wxgc5m"}],["path",{d:"M7 22a5 5 0 0 1-2-3.994",key:"1xp6a4"}],["circle",{cx:"5",cy:"16",r:"2",key:"18csp3"}]]};au.node;var fa=t(au);var tu={name:"layout-dashboard",size:24,node:[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]};tu.node;var ia=t(tu);var ou={name:"layout-list",size:24,node:[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]]};ou.node;var ca=t(ou);var uu={name:"lock-keyhole-open",size:24,node:[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{width:"18",height:"12",x:"3",y:"10",rx:"2",key:"l0tzu3"}],["path",{d:"M7 10V7a5 5 0 0 1 9.33-2.5",key:"car5b7"}]],aliases:["unlock-keyhole"]};uu.node;var h=t(uu);var du={name:"lock-keyhole",size:24,node:[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]};du.node;var na=t(du);var lu={name:"map",size:24,node:[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]};lu.node;var pa=t(lu);var ru={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};ru.node;var ma=t(ru);var su={name:"mouse-pointer-2",size:24,node:[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]};su.node;var La=t(su);var fu={name:"music-2",size:24,node:[["circle",{cx:"8",cy:"18",r:"4",key:"1fc0mg"}],["path",{d:"M12 18V2l7 4",key:"g04rme"}]]};fu.node;var xa=t(fu);var iu={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};iu.node;var Ia=t(iu);var cu={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};cu.node;var ha=t(cu);var nu={name:"printer",size:24,node:[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]};nu.node;var Ca=t(nu);var pu={name:"puzzle",size:24,node:[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]};pu.node;var ga=t(pu);var mu={name:"ruler",size:24,node:[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]]};mu.node;var Sa=t(mu);var Lu={name:"scissors",size:24,node:[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]};Lu.node;var ka=t(Lu);var xu={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};xu.node;var ya=t(xu);var Iu={name:"send-to-back",size:24,node:[["rect",{x:"14",y:"14",width:"8",height:"8",rx:"2",key:"1b0bso"}],["rect",{x:"2",y:"2",width:"8",height:"8",rx:"2",key:"1x09vl"}],["path",{d:"M7 14v1a2 2 0 0 0 2 2h1",key:"pao6x6"}],["path",{d:"M14 7h1a2 2 0 0 1 2 2v1",key:"19tdru"}]]};Iu.node;var wa=t(Iu);var hu={name:"settings-2",size:24,node:[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]};hu.node;var Pa=t(hu);var Cu={name:"square-dashed",size:24,node:[["path",{d:"M5 3a2 2 0 0 0-2 2",key:"y57alp"}],["path",{d:"M19 3a2 2 0 0 1 2 2",key:"18rm91"}],["path",{d:"M21 19a2 2 0 0 1-2 2",key:"1j7049"}],["path",{d:"M5 21a2 2 0 0 1-2-2",key:"sbafld"}],["path",{d:"M9 3h1",key:"1yesri"}],["path",{d:"M9 21h1",key:"15o7lz"}],["path",{d:"M14 3h1",key:"1ec4yj"}],["path",{d:"M14 21h1",key:"v9vybs"}],["path",{d:"M3 9v1",key:"1r0deq"}],["path",{d:"M21 9v1",key:"mxsmne"}],["path",{d:"M3 14v1",key:"vnatye"}],["path",{d:"M21 14v1",key:"169vum"}]],aliases:["box-select"]};Cu.node;var F=t(Cu);var gu={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};gu.node;var Ma=t(gu);var Su={name:"strikethrough",size:24,node:[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]};Su.node;var Aa=t(Su);var ku={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};ku.node;var Da=t(ku);var yu={name:"table-cells-merge",size:24,node:[["path",{d:"M12 21v-6",key:"lihzve"}],["path",{d:"M12 9V3",key:"da5inc"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M3 9h18",key:"1pudct"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};yu.node;var Ba=t(yu);var wu={name:"table-columns-split",size:24,node:[["path",{d:"M14 14v2",key:"w2a1xv"}],["path",{d:"M14 20v2",key:"1lq872"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M14 8v2",key:"i67w9a"}],["path",{d:"M2 15h8",key:"82wtch"}],["path",{d:"M2 3h6a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H2",key:"up0l64"}],["path",{d:"M2 9h8",key:"yelfik"}],["path",{d:"M22 15h-4",key:"1es58f"}],["path",{d:"M22 3h-2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h2",key:"pdjoqf"}],["path",{d:"M22 9h-4",key:"1luja7"}],["path",{d:"M5 3v18",key:"14hmio"}]]};wu.node;var Ta=t(wu);var Pu={name:"table-cells-split",size:24,node:[["path",{d:"M12 15V9",key:"8c7uyn"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M3 9h18",key:"1pudct"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};Pu.node;var Fa=t(Pu);var Mu={name:"table-properties",size:24,node:[["path",{d:"M15 3v18",key:"14nvp0"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]};Mu.node;var Ra=t(Mu);var Au={name:"table-rows-split",size:24,node:[["path",{d:"M14 10h2",key:"1lstlu"}],["path",{d:"M15 22v-8",key:"1fwwgm"}],["path",{d:"M15 2v4",key:"1044rn"}],["path",{d:"M2 10h2",key:"1r8dkt"}],["path",{d:"M20 10h2",key:"1ug425"}],["path",{d:"M3 19h18",key:"awlh7x"}],["path",{d:"M3 22v-6a2 2 135 0 1 2-2h14a2 2 45 0 1 2 2v6",key:"ibqhof"}],["path",{d:"M3 2v2a2 2 45 0 0 2 2h14a2 2 135 0 0 2-2V2",key:"1uenja"}],["path",{d:"M8 10h2",key:"66od0"}],["path",{d:"M9 22v-8",key:"fmnu31"}],["path",{d:"M9 2v4",key:"j1yeou"}]]};Au.node;var va=t(Au);var Du={name:"text-align-justify",size:24,node:[["path",{d:"M3 5h18",key:"1u36vt"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 19h18",key:"awlh7x"}]],aliases:["align-justify"]};Du.node;var R=t(Du);var Bu={name:"underline",size:24,node:[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]};Bu.node;var qa=t(Bu);var Tu={name:"ungroup",size:24,node:[["rect",{x:"11",y:"14",width:"10",height:"7",rx:"2",key:"nfm8rk"}],["rect",{x:"3",y:"3",width:"10",height:"7",rx:"2",key:"1ljebb"}]]};Tu.node;var ba=t(Tu);var Fu={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]};Fu.node;var Ha=t(Fu);var za=N(U(),1);function Sd(){return(0,za.useSyncExternalStore)($a,Va,Va)}function tp(e){let a=Sd();return(0,za.useMemo)(()=>Ya(e),[e,a])}export{wd as a,Pd as b,U as c,Be as d,Te as e,Fe as f,Re as g,ve as h,qe as i,be as j,He as k,Oe as l,K as m,Ue as n,ze as o,Z as p,_e as q,Ee as r,Ve as s,Ge as t,We as u,S as v,Ne as w,J as x,Q as y,$ as z,Y as A,Xe as B,je as C,Ke as D,I as E,Ze as F,A as G,ee as H,Je as I,ae as J,D as K,Qe as L,te as M,oe as N,B as O,$e as P,Ye as Q,ea as R,aa as S,ta as T,T as U,oa as V,ua as W,ue as X,da as Y,de as Z,le as _,re as $,la as aa,se as ba,ra as ca,sa as da,fa as ea,ia as fa,ca as ga,fe as ha,ie as ia,ce as ja,ne as ka,h as la,na as ma,pa as na,pe as oa,me as pa,Le as qa,ma as ra,La as sa,xa as ta,xe as ua,Ie as va,Ia as wa,ha as xa,he as ya,Ce as za,Ca as Aa,ga as Ba,ge as Ca,Se as Da,ke as Ea,Sa as Fa,ka as Ga,ya as Ha,wa as Ia,Pa as Ja,k as Ka,y as La,F as Ma,ye as Na,Ma as Oa,Aa as Pa,Da as Qa,we as Ra,Ba as Sa,Ta,Fa as Ua,Ra as Va,va as Wa,w as Xa,P as Ya,R as Za,L as _a,M as $a,Pe as ab,qa as bb,Me as cb,ba as db,Ae as eb,Ha as fb,De as gb,Ld as hb,gd as ib,Sd as jb,tp as kb};
21
+ /*! For license information please see chunk-S4EP5SMX.js.LEGAL.txt */