@oliasoft-open-source/charts-library 5.7.0-beta-2 → 5.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/assets/Color-AVL7NMMY-BIf-DPKC.js +1 -0
  2. package/dist/assets/DocsRenderer-PQXLIZUC-qyGTV11Z.js +2 -0
  3. package/dist/assets/bar-chart.stories-BzVohUPy.js +145 -0
  4. package/dist/assets/client-D4qRJEjo.js +1 -0
  5. package/dist/assets/components-DLqsgYgq.js +1 -0
  6. package/dist/assets/get-draggableData-B1b9Fz-7.js +2 -0
  7. package/dist/assets/iframe-1jQmB0c2.js +2349 -0
  8. package/dist/assets/legend-DPe9PUI6.js +1285 -0
  9. package/dist/assets/legend-context-DFaDuXMy.js +28 -0
  10. package/dist/assets/line-chart-CClEihTw.js +1 -0
  11. package/dist/assets/line-chart.stories-1TWJzeri.js +1207 -0
  12. package/dist/assets/{line-chart.test-case.stories-BtJw2prg.js → line-chart.test-case.stories-pOkiau3x.js} +1 -1
  13. package/dist/assets/noto-sans-cyrillic-700-italic-DWLFq66Q.woff2 +0 -0
  14. package/dist/assets/{noto-sans-cyrillic-700-italic-Cmu_Qrsl.woff → noto-sans-cyrillic-700-italic-DaJcJxmx.woff} +0 -0
  15. package/dist/assets/noto-sans-cyrillic-700-normal-CgNbF-DS.woff +0 -0
  16. package/dist/assets/noto-sans-cyrillic-700-normal-Y97T0Ual.woff2 +0 -0
  17. package/dist/assets/noto-sans-cyrillic-ext-700-italic-CJ2zNwEf.woff2 +0 -0
  18. package/dist/assets/noto-sans-cyrillic-ext-700-italic-wfn8l9BI.woff +0 -0
  19. package/dist/assets/noto-sans-cyrillic-ext-700-normal-Cpjpjy5f.woff2 +0 -0
  20. package/dist/assets/noto-sans-cyrillic-ext-700-normal-DKaOP4w1.woff +0 -0
  21. package/dist/assets/noto-sans-devanagari-700-italic-BWxeZW2N.woff2 +0 -0
  22. package/dist/assets/noto-sans-devanagari-700-italic-DlNZooX8.woff +0 -0
  23. package/dist/assets/noto-sans-devanagari-700-normal-BeKZv04D.woff2 +0 -0
  24. package/dist/assets/noto-sans-devanagari-700-normal-DQ20I1k4.woff +0 -0
  25. package/dist/assets/noto-sans-greek-700-italic-BXqStIRT.woff +0 -0
  26. package/dist/assets/noto-sans-greek-700-italic-K6HhztJz.woff2 +0 -0
  27. package/dist/assets/noto-sans-greek-700-normal-C_NBFngB.woff2 +0 -0
  28. package/dist/assets/noto-sans-greek-700-normal-DspBLmJZ.woff +0 -0
  29. package/dist/assets/noto-sans-greek-ext-700-italic-BVb6BEPG.woff +0 -0
  30. package/dist/assets/noto-sans-greek-ext-700-italic-DrlV2HeE.woff2 +0 -0
  31. package/dist/assets/noto-sans-greek-ext-700-normal-BvxaxZ-t.woff +0 -0
  32. package/dist/assets/noto-sans-greek-ext-700-normal-CqXHsD66.woff2 +0 -0
  33. package/dist/assets/noto-sans-latin-400-italic-B5_wyGmT.woff2 +0 -0
  34. package/dist/assets/{noto-sans-latin-400-italic-D8X3Awh8.woff → noto-sans-latin-400-italic-DfHMVQD-.woff} +0 -0
  35. package/dist/assets/noto-sans-latin-400-normal-DBaOTIGl.woff2 +0 -0
  36. package/dist/assets/{noto-sans-latin-400-normal-DPpKfCgK.woff → noto-sans-latin-400-normal-DKQcY9Xy.woff} +0 -0
  37. package/dist/assets/noto-sans-latin-700-italic-BcjsTJqQ.woff2 +0 -0
  38. package/dist/assets/noto-sans-latin-700-italic-Cy-hKh7h.woff +0 -0
  39. package/dist/assets/noto-sans-latin-700-normal-CG28WTf7.woff2 +0 -0
  40. package/dist/assets/noto-sans-latin-700-normal-DVIsH__v.woff +0 -0
  41. package/dist/assets/noto-sans-latin-ext-700-italic-S9i1fPgy.woff2 +0 -0
  42. package/dist/assets/noto-sans-latin-ext-700-italic-dYKfCWXj.woff +0 -0
  43. package/dist/assets/noto-sans-latin-ext-700-normal-CDZvJj8X.woff +0 -0
  44. package/dist/assets/noto-sans-latin-ext-700-normal-CnRwbtty.woff2 +0 -0
  45. package/dist/assets/noto-sans-vietnamese-700-italic-DTbX1pks.woff +0 -0
  46. package/dist/assets/noto-sans-vietnamese-700-italic-DgcmztT9.woff2 +0 -0
  47. package/dist/assets/noto-sans-vietnamese-700-normal-BpIrMy6S.woff +0 -0
  48. package/dist/assets/noto-sans-vietnamese-700-normal-Cg_u0UBD.woff2 +0 -0
  49. package/dist/assets/pie-chart.stories-iF28DB0o.js +45 -0
  50. package/dist/assets/react-18-ViQPJ3Pf.js +1 -0
  51. package/dist/assets/react-Dgi8gd0n.js +1 -0
  52. package/dist/assets/scatter-chart.stories-Ddc14Ixd.js +41 -0
  53. package/dist/bar-chart/utils/use-bar-chart-config.d.ts +1 -1
  54. package/dist/bar-chart/utils/use-bar-chart-options.d.ts +1 -1
  55. package/dist/common/controls-portal.d.ts +1 -1
  56. package/dist/common/helpers/container.d.ts +1 -1
  57. package/dist/common/helpers/download-pgn.d.ts +1 -1
  58. package/dist/common/hooks/use-generated-labels.d.ts +1 -1
  59. package/dist/common/hooks/use-legend-state.d.ts +1 -1
  60. package/dist/common/hooks/use-reset.d.ts +1 -1
  61. package/dist/common/hooks/use-update-annotations.d.ts +1 -1
  62. package/dist/common/legend-component/legend-interface.d.ts +1 -1
  63. package/dist/common/legend-component/legend-panel.d.ts +1 -1
  64. package/dist/common/legend-component/state/legend-context.d.ts +1 -1
  65. package/dist/iframe.html +41 -59
  66. package/dist/index.html +16 -8
  67. package/dist/index.js +3821 -3841
  68. package/dist/index.json +1 -1
  69. package/dist/line-chart/controls/axes-options/axes-options-interfaces.d.ts +1 -1
  70. package/dist/line-chart/controls/controls-interfaces.d.ts +1 -1
  71. package/dist/line-chart/hooks/use-chart-functions.d.ts +1 -1
  72. package/dist/line-chart/hooks/use-chart-options.d.ts +1 -1
  73. package/dist/line-chart/hooks/use-toggle-handler.d.ts +1 -1
  74. package/dist/line-chart/line-chart.interface.d.ts +1 -1
  75. package/dist/line-chart/state/helpers.d.ts +1 -1
  76. package/dist/line-chart/utils/get-axes-ranges-from-chart.d.ts +1 -1
  77. package/dist/line-chart/utils/get-axis-range-by-type.d.ts +1 -1
  78. package/dist/project.json +1 -1
  79. package/dist/sb-addons/docs-2/manager-bundle.js +149 -1
  80. package/dist/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +438 -95
  81. package/dist/sb-addons/themes-1/manager-bundle.js +1 -1
  82. package/dist/sb-manager/globals-module-info.js +799 -0
  83. package/dist/sb-manager/globals-runtime.js +67996 -76152
  84. package/dist/sb-manager/globals.js +16 -6
  85. package/dist/sb-manager/runtime.js +10715 -17939
  86. package/dist/scatter-chart/hooks/use-scatter-chart-config.d.ts +1 -1
  87. package/dist/vite-inject-mocker-entry.js +4 -4
  88. package/package.json +2 -2
  89. package/dist/assets/Color-6BZIO3FS-kyr31le_.js +0 -1
  90. package/dist/assets/DocsRenderer-LL677BLK-Cl_sjYsB.js +0 -2
  91. package/dist/assets/WithTooltip-65CFNBJE-BLldOu9_.js +0 -9
  92. package/dist/assets/bar-chart.stories-DFFfHACi.js +0 -138
  93. package/dist/assets/formatter-EIJCOSYU-DKX-dica.js +0 -1
  94. package/dist/assets/get-draggableData-D9HMKJ0S.js +0 -2
  95. package/dist/assets/iframe-BhGhWgYN.js +0 -1419
  96. package/dist/assets/legend-Cu2I89js.js +0 -314
  97. package/dist/assets/legend-context-DIUSoId7.js +0 -9
  98. package/dist/assets/line-chart-BF1lm3kC.js +0 -1
  99. package/dist/assets/line-chart.stories-C6gjhWIO.js +0 -1207
  100. package/dist/assets/noto-sans-cyrillic-700-italic-D3UOC7d4.woff2 +0 -0
  101. package/dist/assets/noto-sans-cyrillic-700-normal-D8UNalU-.woff +0 -0
  102. package/dist/assets/noto-sans-cyrillic-700-normal-DYZmzPmX.woff2 +0 -0
  103. package/dist/assets/noto-sans-cyrillic-ext-700-italic-B0vIy3Bn.woff +0 -0
  104. package/dist/assets/noto-sans-cyrillic-ext-700-italic-MYAGlKQw.woff2 +0 -0
  105. package/dist/assets/noto-sans-cyrillic-ext-700-normal-D83T7awq.woff +0 -0
  106. package/dist/assets/noto-sans-cyrillic-ext-700-normal-OK-fZO_i.woff2 +0 -0
  107. package/dist/assets/noto-sans-devanagari-700-italic-B7b0Qocp.woff +0 -0
  108. package/dist/assets/noto-sans-devanagari-700-italic-DQbbFiZ1.woff2 +0 -0
  109. package/dist/assets/noto-sans-devanagari-700-normal-CT12sGlc.woff +0 -0
  110. package/dist/assets/noto-sans-devanagari-700-normal-DVs0dmkg.woff2 +0 -0
  111. package/dist/assets/noto-sans-greek-700-italic-DiFf_pN5.woff +0 -0
  112. package/dist/assets/noto-sans-greek-700-italic-Wr-Zu-Te.woff2 +0 -0
  113. package/dist/assets/noto-sans-greek-700-normal-DDNJsN3F.woff +0 -0
  114. package/dist/assets/noto-sans-greek-700-normal-x3kNWF-0.woff2 +0 -0
  115. package/dist/assets/noto-sans-greek-ext-700-italic-BWtLoNYq.woff2 +0 -0
  116. package/dist/assets/noto-sans-greek-ext-700-italic-D1odJgaI.woff +0 -0
  117. package/dist/assets/noto-sans-greek-ext-700-normal-BOmIwFkq.woff +0 -0
  118. package/dist/assets/noto-sans-greek-ext-700-normal-Dq1WA5-1.woff2 +0 -0
  119. package/dist/assets/noto-sans-latin-400-italic-4m5KtZ19.woff2 +0 -0
  120. package/dist/assets/noto-sans-latin-400-normal-BTkUljjl.woff2 +0 -0
  121. package/dist/assets/noto-sans-latin-700-italic-CSXnTKie.woff2 +0 -0
  122. package/dist/assets/noto-sans-latin-700-italic-Dye4NHQ1.woff +0 -0
  123. package/dist/assets/noto-sans-latin-700-normal-CrvTEWhy.woff2 +0 -0
  124. package/dist/assets/noto-sans-latin-700-normal-ZyrKABVF.woff +0 -0
  125. package/dist/assets/noto-sans-latin-ext-700-italic-ClDAM8zy.woff +0 -0
  126. package/dist/assets/noto-sans-latin-ext-700-italic-DvsrmUw0.woff2 +0 -0
  127. package/dist/assets/noto-sans-latin-ext-700-normal-BypTtJma.woff2 +0 -0
  128. package/dist/assets/noto-sans-latin-ext-700-normal-CgsG9aVh.woff +0 -0
  129. package/dist/assets/noto-sans-vietnamese-700-italic-CKIaFk_d.woff2 +0 -0
  130. package/dist/assets/noto-sans-vietnamese-700-italic-CfCpOr03.woff +0 -0
  131. package/dist/assets/noto-sans-vietnamese-700-normal-1GL2JyGE.woff +0 -0
  132. package/dist/assets/noto-sans-vietnamese-700-normal-DayJ0F-f.woff2 +0 -0
  133. package/dist/assets/pie-chart.stories-gCnKLJ_7.js +0 -45
  134. package/dist/assets/react-18-C4BVl34v.js +0 -1
  135. package/dist/assets/react-18-GUsS1Xdq.js +0 -1
  136. package/dist/assets/react-Dv33Nu8K.js +0 -1
  137. package/dist/assets/scatter-chart.stories-C1BGiX7c.js +0 -41
  138. package/dist/assets/syntaxhighlighter-ED5Y7EFY-vqxOYdgA.js +0 -6
  139. package/dist/sb-manager/manager-stores.js +0 -23
  140. /package/dist/assets/{bar-chart-const-BDQ0HT_B.js → bar-chart-const-KaipikFs.js} +0 -0
  141. /package/dist/assets/{get-custom-legend-plugin-example-Bms8_oSU.js → get-custom-legend-plugin-example-CGyRL0oI.js} +0 -0
  142. /package/dist/assets/{preload-helper-CEJlJDXQ.js → preload-helper-Dr7BywEQ.js} +0 -0
@@ -1,314 +0,0 @@
1
- import{A as e,D as t,E as n,O as r,j as i,k as a,m as o,p as s,x as c}from"./iframe-BhGhWgYN.js";import{An as l,At as u,Bt as d,Cn as f,Ct as p,Dn as m,Dt as h,En as g,Et as _,Fn as v,Ft as y,Ht as b,It as x,Lt as S,Mn as C,Mt as w,Nn as T,Nt as E,On as D,Ot as O,P as k,Pn as A,Rt as ee,Sn as j,St as te,T as ne,Tn as re,Ut as ie,Vt as ae,W as oe,Xt as se,_ as M,_n as ce,_t as le,at as ue,bn as de,bt as fe,ct as pe,d as me,dn as he,en as ge,fn as _e,ft as ve,gn as ye,hn as be,ht as xe,it as Se,jn as Ce,jt as we,kn as Te,kt as Ee,lt as De,mn as Oe,mt as ke,nn as Ae,nt as je,ot as Me,pn as Ne,pt as Pe,rt as Fe,t as Ie,tn as Le,tt as Re,ut as ze,vn as Be,vt as Ve,wn as He,wt as Ue,xn as We,xt as Ge,yn as Ke,yt as qe,zt as Je}from"./legend-context-DIUSoId7.js";var Ye={modes:{point(e,t){return $e(e,t,{intersect:!0})},nearest(e,t,n){return et(e,t,n)},x(e,t,n){return $e(e,t,{intersect:n.intersect,axis:`x`})},y(e,t,n){return $e(e,t,{intersect:n.intersect,axis:`y`})}}};function Xe(e,t,n){return(Ye.modes[n.mode]||Ye.modes.nearest)(e,t,n)}function Ze(e,t,n){return n!==`x`&&n!==`y`?e.inRange(t.x,t.y,`x`,!0)||e.inRange(t.x,t.y,`y`,!0):e.inRange(t.x,t.y,n,!0)}function Qe(e,t,n){return n===`x`?{x:e.x,y:t.y}:n===`y`?{x:t.x,y:e.y}:t}function $e(e,t,n){return e.filter(e=>n.intersect?e.inRange(t.x,t.y):Ze(e,t,n.axis))}function et(e,t,n){let r=1/0;return $e(e,t,n).reduce((e,i)=>{let a=j(t,Qe(t,i.getCenterPoint(),n.axis));return a<r?(e=[i],r=a):a===r&&e.push(i),e},[]).sort((e,t)=>e._index-t._index).slice(0,1)}function tt(e,t,n){let r=Math.cos(n),i=Math.sin(n),a=t.x,o=t.y;return{x:a+r*(e.x-a)-i*(e.y-o),y:o+i*(e.x-a)+r*(e.y-o)}}var nt=(e,t)=>t>e||e.length>t.length&&e.slice(0,t.length)===t,rt=.001,it=(e,t,n)=>Math.min(n,Math.max(t,e)),at=(e,t)=>e.value>=e.start-t&&e.value<=e.end+t;function ot(e,t,n){for(let r of Object.keys(e))e[r]=it(e[r],t,n);return e}function st(e,t,n,r){return!e||!t||n<=0?!1:(e.x-t.x)**2+(e.y-t.y)**2<=(n+r)**2}function ct(e,{x:t,y:n,x2:r,y2:i},a,{borderWidth:o,hitTolerance:s}){let c=(o+s)/2,l=e.x>=t-c-rt&&e.x<=r+c+rt,u=e.y>=n-c-rt&&e.y<=i+c+rt;return a===`x`?l:(a===`y`||l)&&u}function lt(e,{rect:t,center:n},r,{rotation:i,borderWidth:a,hitTolerance:o}){return ct(tt(e,n,C(-i)),t,r,{borderWidth:a,hitTolerance:o})}function ut(e,t){let{centerX:n,centerY:r}=e.getProps([`centerX`,`centerY`],t);return{x:n,y:r}}function dt(e,t,n,r=!0){let i=n.split(`.`),a=0;for(let o of t.split(`.`)){let s=i[a++];if(parseInt(o,10)<parseInt(s,10))break;if(nt(s,o)){if(r)throw Error(`${e} v${n} is not supported. v${t} or newer is required.`);return!1}}return!0}var ft=e=>typeof e==`string`&&e.endsWith(`%`),pt=e=>parseFloat(e)/100,mt=e=>it(pt(e),0,1),ht=(e,t)=>({x:e,y:t,x2:e,y2:t,width:0,height:0}),gt={box:e=>ht(e.centerX,e.centerY),doughnutLabel:e=>ht(e.centerX,e.centerY),ellipse:e=>({centerX:e.centerX,centerY:e.centerX,radius:0,width:0,height:0}),label:e=>ht(e.centerX,e.centerY),line:e=>ht(e.x,e.y),point:e=>({centerX:e.centerX,centerY:e.centerY,radius:0,width:0,height:0}),polygon:e=>ht(e.centerX,e.centerY)};function _t(e,t){return t===`start`?0:t===`end`?e:ft(t)?mt(t)*e:e/2}function vt(e,t,n=!0){return typeof t==`number`?t:ft(t)?(n?mt(t):pt(t))*e:e}function yt(e,t){let{x:n,width:r}=e,i=t.textAlign;return i===`center`?n+r/2:i===`end`||i===`right`?n+r:n}function bt(e,t,{borderWidth:n,position:r,xAdjust:i,yAdjust:a},o){let s=D(o),c=t.width+(s?o.width:0)+n,l=t.height+(s?o.height:0)+n,u=xt(r),d=Tt(e.x,c,i,u.x),f=Tt(e.y,l,a,u.y);return{x:d,y:f,x2:d+c,y2:f+l,width:c,height:l,centerX:d+c/2,centerY:f+l/2}}function xt(e,t=`center`){return D(e)?{x:v(e.x,t),y:v(e.y,t)}:(e=v(e,t),{x:e,y:e})}var St=(e,t)=>e&&e.autoFit&&t<1;function Ct(e,t){let n=e.font,r=He(n)?n:[n];return St(e,t)?r.map(function(e){let n=l(e);return n.size=Math.floor(e.size*t),n.lineHeight=e.lineHeight,l(n)}):r.map(e=>l(e))}function wt(e){return e&&(We(e.xValue)||We(e.yValue))}function Tt(e,t,n=0,r){return e-_t(t,r)+n}function Et(e,t,n){let r=n.init;if(r){if(r===!0)return Ot(t,n)}else return;return eee(e,t,n)}function Dt(e,t,n){let r=!1;return t.forEach(t=>{re(e[t])?(r=!0,n[t]=e[t]):We(n[t])&&delete n[t]}),r}function Ot(e,t){return gt[t.type||`line`](e)}function eee(e,t,n){let r=Be(n.init,[{chart:e,properties:t,options:n}]);if(r===!0)return Ot(t,n);if(D(r))return r}var kt=new Map,tee=e=>isNaN(e)||e<=0,nee=e=>e.reduce(function(e,t){return e+=t.string,e},``);function At(e){if(e&&typeof e==`object`){let t=e.toString();return t===`[object HTMLImageElement]`||t===`[object HTMLCanvasElement]`}}function jt(e,{x:t,y:n},r){r&&(e.translate(t,n),e.rotate(C(r)),e.translate(-t,-n))}function Mt(e,t){if(t&&t.borderWidth)return e.lineCap=t.borderCapStyle||`butt`,e.setLineDash(t.borderDash),e.lineDashOffset=t.borderDashOffset,e.lineJoin=t.borderJoinStyle||`miter`,e.lineWidth=t.borderWidth,e.strokeStyle=t.borderColor,!0}function Nt(e,t){e.shadowColor=t.backgroundShadowColor,e.shadowBlur=t.shadowBlur,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY}function Pt(e,t){let n=t.content;if(At(n))return{width:vt(n.width,t.width),height:vt(n.height,t.height)};let r=Ct(t),i=t.textStrokeWidth,a=He(n)?n:[n],o=a.join()+nee(r)+i+(e._measureText?`-spriting`:``);return kt.has(o)||kt.set(o,Bt(e,a,r,i)),kt.get(o)}function Ft(e,t,n){let{x:r,y:i,width:a,height:o}=t;e.save(),Nt(e,n);let s=Mt(e,n);e.fillStyle=n.backgroundColor,e.beginPath(),ce(e,{x:r,y:i,w:a,h:o,radius:ot(T(n.borderRadius),0,Math.min(a,o)/2)}),e.closePath(),e.fill(),s&&(e.shadowColor=n.borderShadowColor,e.stroke()),e.restore()}function It(e,t,n,r){let i=n.content;if(At(i)){e.save(),e.globalAlpha=Ut(n.opacity,i.style.opacity),e.drawImage(i,t.x,t.y,t.width,t.height),e.restore();return}let a=He(i)?i:[i],o=Ct(n,r),s=n.color,c=He(s)?s:[s],l=yt(t,n),u=t.y+n.textStrokeWidth/2;e.save(),e.textBaseline=`middle`,e.textAlign=n.textAlign,Lt(e,n)&&Vt(e,{x:l,y:u},a,o),Ht(e,{x:l,y:u},a,{fonts:o,colors:c}),e.restore()}function Lt(e,t){if(t.textStrokeWidth>0)return e.lineJoin=`round`,e.miterLimit=2,e.lineWidth=t.textStrokeWidth,e.strokeStyle=t.textStrokeColor,!0}function Rt(e,t,n,r){let{radius:i,options:a}=t,o=a.pointStyle,s=a.rotation,c=(s||0)*Oe;if(At(o)){e.save(),e.translate(n,r),e.rotate(c),e.drawImage(o,-o.width/2,-o.height/2,o.width,o.height),e.restore();return}tee(i)||zt(e,{x:n,y:r,radius:i,rotation:s,style:o,rad:c})}function zt(e,{x:t,y:n,radius:r,rotation:i,style:a,rad:o}){let s,c,l,u;switch(e.beginPath(),a){default:e.arc(t,n,r,0,be),e.closePath();break;case`triangle`:e.moveTo(t+Math.sin(o)*r,n-Math.cos(o)*r),o+=ye,e.lineTo(t+Math.sin(o)*r,n-Math.cos(o)*r),o+=ye,e.lineTo(t+Math.sin(o)*r,n-Math.cos(o)*r),e.closePath();break;case`rectRounded`:u=r*.516,l=r-u,s=Math.cos(o+Ne)*l,c=Math.sin(o+Ne)*l,e.arc(t-s,n-c,u,o-_e,o-he),e.arc(t+c,n-s,u,o-he,o),e.arc(t+s,n+c,u,o,o+he),e.arc(t-c,n+s,u,o+he,o+_e),e.closePath();break;case`rect`:if(!i){l=Math.SQRT1_2*r,e.rect(t-l,n-l,2*l,2*l);break}o+=Ne;case`rectRot`:s=Math.cos(o)*r,c=Math.sin(o)*r,e.moveTo(t-s,n-c),e.lineTo(t+c,n-s),e.lineTo(t+s,n+c),e.lineTo(t-c,n+s),e.closePath();break;case`crossRot`:o+=Ne;case`cross`:s=Math.cos(o)*r,c=Math.sin(o)*r,e.moveTo(t-s,n-c),e.lineTo(t+s,n+c),e.moveTo(t+c,n-s),e.lineTo(t-c,n+s);break;case`star`:s=Math.cos(o)*r,c=Math.sin(o)*r,e.moveTo(t-s,n-c),e.lineTo(t+s,n+c),e.moveTo(t+c,n-s),e.lineTo(t-c,n+s),o+=Ne,s=Math.cos(o)*r,c=Math.sin(o)*r,e.moveTo(t-s,n-c),e.lineTo(t+s,n+c),e.moveTo(t+c,n-s),e.lineTo(t-c,n+s);break;case`line`:s=Math.cos(o)*r,c=Math.sin(o)*r,e.moveTo(t-s,n-c),e.lineTo(t+s,n+c);break;case`dash`:e.moveTo(t,n),e.lineTo(t+Math.cos(o)*r,n+Math.sin(o)*r);break}e.fill()}function Bt(e,t,n,r){e.save();let i=t.length,a=0,o=r;for(let s=0;s<i;s++){let i=n[Math.min(s,n.length-1)];e.font=i.string;let c=t[s];a=Math.max(a,e.measureText(c).width+r),o+=i.lineHeight}return e.restore(),{width:a,height:o}}function Vt(e,{x:t,y:n},r,i){e.beginPath();let a=0;r.forEach(function(r,o){let s=i[Math.min(o,i.length-1)],c=s.lineHeight;e.font=s.string,e.strokeText(r,t,n+c/2+a),a+=c}),e.stroke()}function Ht(e,{x:t,y:n},r,{fonts:i,colors:a}){let o=0;r.forEach(function(r,s){let c=a[Math.min(s,a.length-1)],l=i[Math.min(s,i.length-1)],u=l.lineHeight;e.beginPath(),e.font=l.string,e.fillStyle=c,e.fillText(r,t,n+u/2+o),o+=u,e.fill()})}function Ut(e,t){let n=g(e)?e:t;return g(n)?it(n,0,1):1}var Wt=[`left`,`bottom`,`top`,`right`];function Gt(e,t){let{pointX:n,pointY:r,options:i}=t,a=i.callout,o=a&&a.display&&Xt(t,a);if(!o||Qt(t,a,o))return;if(e.save(),e.beginPath(),!Mt(e,a))return e.restore();let{separatorStart:s,separatorEnd:c}=Kt(t,o),{sideStart:l,sideEnd:u}=Jt(t,o,s);(a.margin>0||i.borderWidth===0)&&(e.moveTo(s.x,s.y),e.lineTo(c.x,c.y)),e.moveTo(l.x,l.y),e.lineTo(u.x,u.y);let d=tt({x:n,y:r},t.getCenterPoint(),C(-t.rotation));e.lineTo(d.x,d.y),e.stroke(),e.restore()}function Kt(e,t){let{x:n,y:r,x2:i,y2:a}=e,o=qt(e,t),s,c;return t===`left`||t===`right`?(s={x:n+o,y:r},c={x:s.x,y:a}):(s={x:n,y:r+o},c={x:i,y:s.y}),{separatorStart:s,separatorEnd:c}}function qt(e,t){let{width:n,height:r,options:i}=e,a=i.callout.margin+i.borderWidth/2;return t===`right`?n+a:t===`bottom`?r+a:-a}function Jt(e,t,n){let{y:r,width:i,height:a,options:o}=e,s=o.callout.start,c=Yt(t,o.callout),l,u;return t===`left`||t===`right`?(l={x:n.x,y:r+vt(a,s)},u={x:l.x+c,y:l.y}):(l={x:n.x+vt(i,s),y:n.y},u={x:l.x,y:l.y+c}),{sideStart:l,sideEnd:u}}function Yt(e,t){let n=t.side;return e===`left`||e===`top`?-n:n}function Xt(e,t){let n=t.position;return Wt.includes(n)?n:Zt(e,t)}function Zt(e,t){let{x:n,y:r,x2:i,y2:a,width:o,height:s,pointX:c,pointY:l,centerX:u,centerY:d,rotation:f}=e,p={x:u,y:d},m=t.start,h=vt(o,m),g=vt(s,m),_=[n,n+h,n+h,i],v=[r+g,a,r,a],y=[];for(let e=0;e<4;e++){let t=tt({x:_[e],y:v[e]},p,C(f));y.push({position:Wt[e],distance:j(t,{x:c,y:l})})}return y.sort((e,t)=>e.distance-t.distance)[0].position}function Qt(e,t,n){let{pointX:r,pointY:i}=e,a=t.margin,o=r,s=i;return n===`left`?o+=a:n===`right`?o-=a:n===`top`?s+=a:n===`bottom`&&(s-=a),e.inRange(o,s)}var $t={xScaleID:{min:`xMin`,max:`xMax`,start:`left`,end:`right`,startProp:`x`,endProp:`x2`},yScaleID:{min:`yMin`,max:`yMax`,start:`bottom`,end:`top`,startProp:`y`,endProp:`y2`}};function en(e,t,n){return t=typeof t==`number`?t:e.parse(t),m(t)?e.getPixelForValue(t):n}function tn(e,t,n){let r=t[n];if(r||n===`scaleID`)return r;let i=n.charAt(0),a=Object.values(e).filter(e=>e.axis&&e.axis===i);return a.length?a[0].id:i}function nn(e,t){if(e){let n=e.options.reverse;return{start:en(e,t.min,n?t.end:t.start),end:en(e,t.max,n?t.start:t.end)}}}function rn(e,t){let{chartArea:n,scales:r}=e,i=r[tn(r,t,`xScaleID`)],a=r[tn(r,t,`yScaleID`)],o=n.width/2,s=n.height/2;return i&&(o=en(i,t.xValue,i.left+i.width/2)),a&&(s=en(a,t.yValue,a.top+a.height/2)),{x:o,y:s}}function an(e,t){let n=e.scales,r=n[tn(n,t,`xScaleID`)],i=n[tn(n,t,`yScaleID`)];if(!r&&!i)return{};let{left:a,right:o}=r||e.chartArea,{top:s,bottom:c}=i||e.chartArea,l=ln(r,{min:t.xMin,max:t.xMax,start:a,end:o});a=l.start,o=l.end;let u=ln(i,{min:t.yMin,max:t.yMax,start:c,end:s});return s=u.start,c=u.end,{x:a,y:s,x2:o,y2:c,width:o-a,height:c-s,centerX:a+(o-a)/2,centerY:s+(c-s)/2}}function on(e,t){if(!wt(t)){let n=an(e,t),r=t.radius;(!r||isNaN(r))&&(r=Math.min(n.width,n.height)/2,t.radius=r);let i=r*2,a=n.centerX+t.xAdjust,o=n.centerY+t.yAdjust;return{x:a-r,y:o-r,x2:a+r,y2:o+r,centerX:a,centerY:o,width:i,height:i,radius:r}}return ree(e,t)}function sn(e,t){let{scales:n,chartArea:r}=e,i=n[t.scaleID],a={x:r.left,y:r.top,x2:r.right,y2:r.bottom};return i?iee(i,a,t):aee(n,a,t),a}function cn(e,t){let n=an(e,t);return n.initProperties=Et(e,n,t),n.elements=[{type:`label`,optionScope:`label`,properties:dn(e,n,t),initProperties:n.initProperties}],n}function ree(e,t){let n=rn(e,t),r=t.radius*2;return{x:n.x-t.radius+t.xAdjust,y:n.y-t.radius+t.yAdjust,x2:n.x+t.radius+t.xAdjust,y2:n.y+t.radius+t.yAdjust,centerX:n.x+t.xAdjust,centerY:n.y+t.yAdjust,radius:t.radius,width:r,height:r}}function ln(e,t){let n=nn(e,t)||t;return{start:Math.min(n.start,n.end),end:Math.max(n.start,n.end)}}function iee(e,t,n){let r=en(e,n.value,NaN),i=en(e,n.endValue,r);e.isHorizontal()?(t.x=r,t.x2=i):(t.y=r,t.y2=i)}function aee(e,t,n){for(let r of Object.keys($t)){let i=e[tn(e,n,r)];if(i){let{min:e,max:a,start:o,end:s,startProp:c,endProp:l}=$t[r],u=nn(i,{min:n[e],max:n[a],start:i[o],end:i[s]});t[c]=u.start,t[l]=u.end}}}function oee({properties:e,options:t},n,r,i){let{x:a,x2:o,width:s}=e;return un({start:a,end:o,size:s,borderWidth:t.borderWidth},{position:r.x,padding:{start:i.left,end:i.right},adjust:t.label.xAdjust,size:n.width})}function see({properties:e,options:t},n,r,i){let{y:a,y2:o,height:s}=e;return un({start:a,end:o,size:s,borderWidth:t.borderWidth},{position:r.y,padding:{start:i.top,end:i.bottom},adjust:t.label.yAdjust,size:n.height})}function un(e,t){let{start:n,end:r,borderWidth:i}=e,{position:a,padding:{start:o,end:s},adjust:c}=t,l=r-i-n-o-s-t.size;return n+i/2+c+_t(l,a)}function dn(e,t,n){let r=n.label;r.backgroundColor=`transparent`,r.callout.display=!1;let i=xt(r.position),a=Ce(r.padding),o=Pt(e.ctx,r),s=oee({properties:t,options:n},o,i,a),c=see({properties:t,options:n},o,i,a),l=o.width+a.width,u=o.height+a.height;return{x:s,y:c,x2:s+l,y2:c+u,width:l,height:u,centerX:s+l/2,centerY:c+u/2,rotation:r.rotation}}var fn=[`enter`,`leave`],pn=fn.concat(`click`);function mn(e,t,n){t.listened=Dt(n,pn,t.listeners),t.moveListened=!1,fn.forEach(e=>{re(n[e])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(e=>{!t.listened&&re(e.click)&&(t.listened=!0),t.moveListened||fn.forEach(n=>{re(e[n])&&(t.listened=!0,t.moveListened=!0)})})}function hn(e,t,n){if(e.listened)switch(t.type){case`mousemove`:case`mouseout`:return gn(e,t,n);case`click`:return vn(e,t,n)}}function gn(e,t,n){if(!e.moveListened)return;let r;r=t.type===`mousemove`?Xe(e.visibleElements,t,n.interaction):[];let i=e.hovered;e.hovered=r;let a={state:e,event:t},o=_n(a,`leave`,i,r);return _n(a,`enter`,r,i)||o}function _n({state:e,event:t},n,r,i){let a;for(let o of r)i.indexOf(o)<0&&(a=yn(o.options[n]||e.listeners[n],o,t)||a);return a}function vn(e,t,n){let r=e.listeners,i=Xe(e.visibleElements,t,n.interaction),a;for(let e of i)a=yn(e.options.click||r.click,e,t)||a;return a}function yn(e,t,n){return Be(e,[t.$context,n])===!0}var bn=[`afterDraw`,`beforeDraw`];function xn(e,t,n){let r=t.visibleElements;t.hooked=Dt(n,bn,t.hooks),t.hooked||r.forEach(e=>{t.hooked||bn.forEach(n=>{re(e.options[n])&&(t.hooked=!0)})})}function Sn(e,t,n){if(e.hooked)return Be(t.options[n]||e.hooks[n],[t.$context])}function Cn(e,t,n){let r=kn(e.scales,t,n),i=Tn(t,r,`min`,`suggestedMin`);i=Tn(t,r,`max`,`suggestedMax`)||i,i&&re(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function wn(e,t){for(let n of e)Dn(n,t)}function Tn(e,t,n,r){if(m(t[n])&&!En(e.options,n,r)){let r=e[n]!==t[n];return e[n]=t[n],r}}function En(e,t,n){return We(e[t])||We(e[n])}function Dn(e,t){for(let n of[`scaleID`,`xScaleID`,`yScaleID`]){let r=tn(t,e,n);r&&!t[r]&&On(e,n)&&console.warn(`No scale found with id '${r}' for annotation '${e.id}'`)}}function On(e,t){if(t===`scaleID`)return!0;let n=t.charAt(0);for(let t of[`Min`,`Max`,`Value`])if(We(e[n+t]))return!0;return!1}function kn(e,t,n){let r=t.axis,i=t.id,a=r+`ScaleID`,o={min:v(t.min,-1/0),max:v(t.max,1/0)};for(let s of n)s.scaleID===i?An(s,t,[`value`,`endValue`],o):tn(e,s,a)===i&&An(s,t,[r+`Min`,r+`Max`,r+`Value`],o);return o}function An(e,t,n,r){for(let i of n){let n=e[i];if(We(n)){let e=t.parse(n);r.min=Math.min(r.min,e),r.max=Math.max(r.max,e)}}}var jn=class extends Ae{inRange(e,t,n,r){let{x:i,y:a}=tt({x:e,y:t},this.getCenterPoint(r),C(-this.options.rotation));return ct({x:i,y:a},this.getProps([`x`,`y`,`x2`,`y2`],r),n,this.options)}getCenterPoint(e){return ut(this,e)}draw(e){e.save(),jt(e,this.getCenterPoint(),this.options.rotation),Ft(e,this,this.options),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,t){return cn(e,t)}};jn.id=`boxAnnotation`,jn.defaults={adjustScaleRange:!0,backgroundShadowColor:`transparent`,borderCapStyle:`butt`,borderDash:[],borderDashOffset:0,borderJoinStyle:`miter`,borderRadius:0,borderShadowColor:`transparent`,borderWidth:1,display:!0,init:void 0,hitTolerance:0,label:{backgroundColor:`transparent`,borderWidth:0,callout:{display:!1},color:`black`,content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:`bold`},height:void 0,hitTolerance:void 0,opacity:void 0,padding:6,position:`center`,rotation:void 0,textAlign:`start`,textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},jn.defaultRoutes={borderColor:`color`,backgroundColor:`color`},jn.descriptors={label:{_fallback:!0}};var Mn=class extends Ae{inRange(e,t,n,r){return lt({x:e,y:t},{rect:this.getProps([`x`,`y`,`x2`,`y2`],r),center:this.getCenterPoint(r)},n,{rotation:this.rotation,borderWidth:0,hitTolerance:this.options.hitTolerance})}getCenterPoint(e){return ut(this,e)}draw(e){let t=this.options;!t.display||!t.content||(In(e,this),e.save(),jt(e,this.getCenterPoint(),this.rotation),It(e,this,t,this._fitRatio),e.restore())}resolveElementProperties(e,t){let n=cee(e,t);if(!n)return{};let{controllerMeta:r,point:i,radius:a}=Nn(e,t,n),o=Pt(e.ctx,t),s=Pn(o,a);St(t,s)&&(o={width:o.width*s,height:o.height*s});let{position:c,xAdjust:l,yAdjust:u}=t,d=bt(i,o,{borderWidth:0,position:c,xAdjust:l,yAdjust:u});return{initProperties:Et(e,d,t),...d,...r,rotation:t.rotation,_fitRatio:s}}};Mn.id=`doughnutLabelAnnotation`,Mn.defaults={autoFit:!0,autoHide:!0,backgroundColor:`transparent`,backgroundShadowColor:`transparent`,borderColor:`transparent`,borderDash:[],borderDashOffset:0,borderJoinStyle:`miter`,borderShadowColor:`transparent`,borderWidth:0,color:`black`,content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,hitTolerance:0,init:void 0,opacity:void 0,position:`center`,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,spacing:1,textAlign:`center`,textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0},Mn.defaultRoutes={};function cee(e,t){return e.getSortedVisibleDatasetMetas().reduce(function(n,r){let i=r.controller;return i instanceof Le&&lee(e,t,r.data)&&(!n||i.innerRadius<n.controller.innerRadius)&&i.options.circumference>=90?r:n},void 0)}function lee(e,t,n){if(!t.autoHide)return!0;for(let t=0;t<n.length;t++)if(!n[t].hidden&&e.getDataVisibility(t))return!0}function Nn({chartArea:e},t,n){let{left:r,top:i,right:a,bottom:o}=e,{innerRadius:s,offsetX:c,offsetY:l}=n.controller,u=(r+a)/2+c,d=(i+o)/2+l,f={left:Math.max(u-s,r),right:Math.min(u+s,a),top:Math.max(d-s,i),bottom:Math.min(d+s,o)},p={x:(f.left+f.right)/2,y:(f.top+f.bottom)/2},m=t.spacing+t.borderWidth/2,h=s-m,g=p.y>d;return{controllerMeta:{_centerX:u,_centerY:d,_radius:h,_counterclockwise:g,...Fn(g?i+m:o-m,u,d,h)},point:p,radius:Math.min(s,Math.min(f.right-f.left,f.bottom-f.top)/2)}}function Pn({width:e,height:t},n){let r=Math.sqrt(e**2+t**2);return n*2/r}function Fn(e,t,n,r){let i=(n-e)**2,a=r**2,o=t*-2,s=t**2+i-a,c=o**2-4*s;if(c<=0)return{_startAngle:0,_endAngle:be};let l=(-o-Math.sqrt(c))/2,u=(-o+Math.sqrt(c))/2;return{_startAngle:f({x:t,y:n},{x:l,y:e}).angle,_endAngle:f({x:t,y:n},{x:u,y:e}).angle}}function In(e,t){let{_centerX:n,_centerY:r,_radius:i,_startAngle:a,_endAngle:o,_counterclockwise:s,options:c}=t;e.save();let l=Mt(e,c);e.fillStyle=c.backgroundColor,e.beginPath(),e.arc(n,r,i,a,o,s),e.closePath(),e.fill(),l&&e.stroke(),e.restore()}var Ln=class extends Ae{inRange(e,t,n,r){return lt({x:e,y:t},{rect:this.getProps([`x`,`y`,`x2`,`y2`],r),center:this.getCenterPoint(r)},n,{rotation:this.rotation,borderWidth:this.options.borderWidth,hitTolerance:this.options.hitTolerance})}getCenterPoint(e){return ut(this,e)}draw(e){let t=this.options,n=!We(this._visible)||this._visible;!t.display||!t.content||!n||(e.save(),jt(e,this.getCenterPoint(),this.rotation),Gt(e,this),Ft(e,this,t),It(e,Rn(this),t),e.restore())}resolveElementProperties(e,t){let n;if(wt(t))n=rn(e,t);else{let{centerX:r,centerY:i}=an(e,t);n={x:r,y:i}}let r=Ce(t.padding),i=Pt(e.ctx,t),a=bt(n,i,t,r);return{initProperties:Et(e,a,t),pointX:n.x,pointY:n.y,...a,rotation:t.rotation}}};Ln.id=`labelAnnotation`,Ln.defaults={adjustScaleRange:!0,backgroundColor:`transparent`,backgroundShadowColor:`transparent`,borderCapStyle:`butt`,borderDash:[],borderDashOffset:0,borderJoinStyle:`miter`,borderRadius:0,borderShadowColor:`transparent`,borderWidth:0,callout:{borderCapStyle:`butt`,borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:`miter`,borderWidth:1,display:!1,margin:5,position:`auto`,side:5,start:`50%`},color:`black`,content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,hitTolerance:0,init:void 0,opacity:void 0,padding:6,position:`center`,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:`center`,textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},Ln.defaultRoutes={borderColor:`color`};function Rn({x:e,y:t,width:n,height:r,options:i}){let a=i.borderWidth/2,o=Ce(i.padding);return{x:e+o.left+a,y:t+o.top+a,width:n-o.left-o.right-i.borderWidth,height:r-o.top-o.bottom-i.borderWidth}}var zn=(e,t,n)=>({x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}),Bn=(e,t,n)=>zn(t,n,Math.abs((e-t.y)/(n.y-t.y))).x,Vn=(e,t,n)=>zn(t,n,Math.abs((e-t.x)/(n.x-t.x))).y,Hn=e=>e*e,uee=(e,t,{x:n,y:r,x2:i,y2:a},o)=>o===`y`?{start:Math.min(r,a),end:Math.max(r,a),value:t}:{start:Math.min(n,i),end:Math.max(n,i),value:e},Un=(e,t,n,r)=>(1-r)*(1-r)*e+2*(1-r)*r*t+r*r*n,Wn=(e,t,n,r)=>({x:Un(e.x,t.x,n.x,r),y:Un(e.y,t.y,n.y,r)}),Gn=(e,t,n,r)=>2*(1-r)*(t-e)+2*r*(n-t),Kn=(e,t,n,r)=>-Math.atan2(Gn(e.x,t.x,n.x,r),Gn(e.y,t.y,n.y,r))+.5*_e,qn=class extends Ae{inRange(e,t,n,r){let i=(this.options.borderWidth+this.options.hitTolerance)/2;if(n!==`x`&&n!==`y`){let n={mouseX:e,mouseY:t},{path:a,ctx:o}=this;if(a){Mt(o,this.options),o.lineWidth+=this.options.hitTolerance;let{chart:i}=this.$context,s=e*i.currentDevicePixelRatio,c=t*i.currentDevicePixelRatio,l=o.isPointInStroke(a,s,c)||Xn(this,n,r);return o.restore(),l}let s=Hn(i);return mee(this,n,s,r)||Xn(this,n,r)}return dee(this,{mouseX:e,mouseY:t},n,{hitSize:i,useFinalPosition:r})}getCenterPoint(e){return ut(this,e)}draw(e){let{x:t,y:n,x2:r,y2:i,cp:a,options:o}=this;if(e.save(),!Mt(e,o))return e.restore();Nt(e,o);let s=Math.sqrt((r-t)**2+(i-n)**2);if(o.curve&&a)return ir(e,this,a,s),e.restore();let{startOpts:c,endOpts:l,startAdjust:u,endAdjust:d}=$n(this),f=Math.atan2(i-n,r-t);e.translate(t,n),e.rotate(f),e.beginPath(),e.moveTo(0+u,0),e.lineTo(s-d,0),e.shadowColor=o.borderShadowColor,e.stroke(),tr(e,0,u,c),tr(e,s,-d,l),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,t){let n=sn(e,t),{x:r,y:i,x2:a,y2:o}=n,s=fee(n,e.chartArea),c=s?pee({x:r,y:i},{x:a,y:o},e.chartArea):{x:r,y:i,x2:a,y2:o,width:Math.abs(a-r),height:Math.abs(o-i)};c.centerX=(a+r)/2,c.centerY=(o+i)/2,c.initProperties=Et(e,c,t),t.curve&&(c.cp=nr(c,t,j({x:c.x,y:c.y},{x:c.x2,y:c.y2})));let l=hee(e,c,t.label);return l._visible=s,c.elements=[{type:`label`,optionScope:`label`,properties:l,initProperties:c.initProperties}],c}};qn.id=`lineAnnotation`;var Jn={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};qn.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Jn),fill:!1,length:12,start:Object.assign({},Jn),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:`transparent`,borderWidth:2,curve:!1,controlPoint:{y:`-50%`},display:!0,endValue:void 0,init:void 0,hitTolerance:0,label:{backgroundColor:`rgba(0,0,0,0.8)`,backgroundShadowColor:`transparent`,borderCapStyle:`butt`,borderColor:`black`,borderDash:[],borderDashOffset:0,borderJoinStyle:`miter`,borderRadius:6,borderShadowColor:`transparent`,borderWidth:0,callout:Object.assign({},Ln.defaults.callout),color:`#fff`,content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:`bold`},height:void 0,hitTolerance:void 0,opacity:void 0,padding:6,position:`center`,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:`center`,textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},qn.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},qn.defaultRoutes={borderColor:`color`};function dee(e,{mouseX:t,mouseY:n},r,{hitSize:i,useFinalPosition:a}){return at(uee(t,n,e.getProps([`x`,`y`,`x2`,`y2`],a),r),i)||Xn(e,{mouseX:t,mouseY:n},a,r)}function fee({x:e,y:t,x2:n,y2:r},{top:i,right:a,bottom:o,left:s}){return!(e<s&&n<s||e>a&&n>a||t<i&&r<i||t>o&&r>o)}function Yn({x:e,y:t},n,{top:r,right:i,bottom:a,left:o}){return e<o&&(t=Vn(o,{x:e,y:t},n),e=o),e>i&&(t=Vn(i,{x:e,y:t},n),e=i),t<r&&(e=Bn(r,{x:e,y:t},n),t=r),t>a&&(e=Bn(a,{x:e,y:t},n),t=a),{x:e,y:t}}function pee(e,t,n){let{x:r,y:i}=Yn(e,t,n),{x:a,y:o}=Yn(t,e,n);return{x:r,y:i,x2:a,y2:o,width:Math.abs(a-r),height:Math.abs(o-i)}}function mee(e,{mouseX:t,mouseY:n},r=rt,i){let{x:a,y:o,x2:s,y2:c}=e.getProps([`x`,`y`,`x2`,`y2`],i),l=s-a,u=c-o,d=Hn(l)+Hn(u),f=d===0?-1:((t-a)*l+(n-o)*u)/d,p,m;return f<0?(p=a,m=o):f>1?(p=s,m=c):(p=a+f*l,m=o+f*u),Hn(t-p)+Hn(n-m)<=r}function Xn(e,{mouseX:t,mouseY:n},r,i){let a=e.label;return a.options.display&&a.inRange(t,n,i,r)}function hee(e,t,n){let r=n.borderWidth,i=Ce(n.padding),a=Pt(e.ctx,n);return _ee(t,n,{width:a.width+i.width+r,height:a.height+i.height+r,padding:i},e.chartArea)}function gee(e){let{x:t,y:n,x2:r,y2:i}=e,a=Math.atan2(i-n,r-t);return a>_e/2?a-_e:a<_e/-2?a+_e:a}function _ee(e,t,n,r){let{width:i,height:a,padding:o}=n,{xAdjust:s,yAdjust:c}=t,l={x:e.x,y:e.y},u={x:e.x2,y:e.y2},d=t.rotation===`auto`?gee(e):C(t.rotation),f=vee(i,a,d),p=yee(e,t,{labelSize:f,padding:o},r),m=e.cp?Wn(l,e.cp,u,p):zn(l,u,p),h={size:f.w,min:r.left,max:r.right,padding:o.left},g={size:f.h,min:r.top,max:r.bottom,padding:o.top},_=Qn(m.x,h)+s,v=Qn(m.y,g)+c;return{x:_-i/2,y:v-a/2,x2:_+i/2,y2:v+a/2,centerX:_,centerY:v,pointX:m.x,pointY:m.y,width:i,height:a,rotation:Te(d)}}function vee(e,t,n){let r=Math.cos(n),i=Math.sin(n);return{w:Math.abs(e*r)+Math.abs(t*i),h:Math.abs(e*i)+Math.abs(t*r)}}function yee(e,t,n,r){let i,a=bee(e,r);return i=t.position===`start`?Zn({w:e.x2-e.x,h:e.y2-e.y},n,t,a):t.position===`end`?1-Zn({w:e.x-e.x2,h:e.y-e.y2},n,t,a):_t(1,t.position),i}function Zn(e,t,n,r){let{labelSize:i,padding:a}=t,o=e.w*r.dx,s=e.h*r.dy,c=o>0&&(i.w/2+a.left-r.x)/o,l=s>0&&(i.h/2+a.top-r.y)/s;return it(Math.max(c,l),0,.25)}function bee(e,t){let{x:n,x2:r,y:i,y2:a}=e,o=Math.min(i,a)-t.top,s=Math.min(n,r)-t.left,c=t.bottom-Math.max(i,a),l=t.right-Math.max(n,r);return{x:Math.min(s,l),y:Math.min(o,c),dx:s<=l?1:-1,dy:o<=c?1:-1}}function Qn(e,t){let{size:n,min:r,max:i,padding:a}=t,o=n/2;return n>i-r?(i+r)/2:(r>=e-a-o&&(e=r+a+o),i<=e+a+o&&(e=i-a-o),e)}function $n(e){let t=e.options,n=t.arrowHeads&&t.arrowHeads.start,r=t.arrowHeads&&t.arrowHeads.end;return{startOpts:n,endOpts:r,startAdjust:er(e,n),endAdjust:er(e,r)}}function er(e,t){if(!t||!t.display)return 0;let{length:n,width:r}=t,i=e.options.borderWidth/2,a={x:n,y:r+i},o={x:0,y:i};return Math.abs(Bn(0,a,o))}function tr(e,t,n,r){if(!r||!r.display)return;let{length:i,width:a,fill:o,backgroundColor:s,borderColor:c}=r,l=Math.abs(t-i)+n;e.beginPath(),Nt(e,r),Mt(e,r),e.moveTo(l,-a),e.lineTo(t+n,0),e.lineTo(l,a),o===!0?(e.fillStyle=s||c,e.closePath(),e.fill(),e.shadowColor=`transparent`):e.shadowColor=r.borderShadowColor,e.stroke()}function nr(e,t,n){let{x:r,y:i,x2:a,y2:o,centerX:s,centerY:c}=e,l=Math.atan2(o-i,a-r),u=xt(t.controlPoint,0);return tt({x:s+vt(n,u.x,!1),y:c+vt(n,u.y,!1)},{x:s,y:c},l)}function rr(e,{x:t,y:n},{angle:r,adjust:i},a){!a||!a.display||(e.save(),e.translate(t,n),e.rotate(r),tr(e,0,-i,a),e.restore())}function ir(e,t,n,r){let{x:i,y:a,x2:o,y2:s,options:c}=t,{startOpts:l,endOpts:u,startAdjust:d,endAdjust:f}=$n(t),p={x:i,y:a},m={x:o,y:s},h=Kn(p,n,m,0),g=Kn(p,n,m,1)-_e,_=Wn(p,n,m,d/r),v=Wn(p,n,m,1-f/r),y=new Path2D;e.beginPath(),y.moveTo(_.x,_.y),y.quadraticCurveTo(n.x,n.y,v.x,v.y),e.shadowColor=c.borderShadowColor,e.stroke(y),t.path=y,t.ctx=e,rr(e,_,{angle:h,adjust:d},l),rr(e,v,{angle:g,adjust:f},u)}var ar=class extends Ae{inRange(e,t,n,r){let i=this.options.rotation,a=(this.options.borderWidth+this.options.hitTolerance)/2;if(n!==`x`&&n!==`y`)return or({x:e,y:t},this.getProps([`width`,`height`,`centerX`,`centerY`],r),i,a);let{x:o,y:s,x2:c,y2:l}=this.getProps([`x`,`y`,`x2`,`y2`],r),u=n===`y`?{start:s,end:l}:{start:o,end:c},d=tt({x:e,y:t},this.getCenterPoint(r),C(-i));return d[n]>=u.start-a-rt&&d[n]<=u.end+a+rt}getCenterPoint(e){return ut(this,e)}draw(e){let{width:t,height:n,centerX:r,centerY:i,options:a}=this;e.save(),jt(e,this.getCenterPoint(),a.rotation),Nt(e,this.options),e.beginPath(),e.fillStyle=a.backgroundColor;let o=Mt(e,a);e.ellipse(r,i,n/2,t/2,_e/2,0,2*_e),e.fill(),o&&(e.shadowColor=a.borderShadowColor,e.stroke()),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,t){return cn(e,t)}};ar.id=`ellipseAnnotation`,ar.defaults={adjustScaleRange:!0,backgroundShadowColor:`transparent`,borderDash:[],borderDashOffset:0,borderShadowColor:`transparent`,borderWidth:1,display:!0,hitTolerance:0,init:void 0,label:Object.assign({},jn.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},ar.defaultRoutes={borderColor:`color`,backgroundColor:`color`},ar.descriptors={label:{_fallback:!0}};function or(e,t,n,r){let{width:i,height:a,centerX:o,centerY:s}=t,c=i/2,l=a/2;if(c<=0||l<=0)return!1;let u=C(n||0),d=Math.cos(u),f=Math.sin(u),p=(d*(e.x-o)+f*(e.y-s))**2,m=(f*(e.x-o)-d*(e.y-s))**2;return p/(c+r)**2+m/(l+r)**2<=1.0001}var sr=class extends Ae{inRange(e,t,n,r){let{x:i,y:a,x2:o,y2:s,width:c}=this.getProps([`x`,`y`,`x2`,`y2`,`width`],r),l=(this.options.borderWidth+this.options.hitTolerance)/2;return n!==`x`&&n!==`y`?st({x:e,y:t},this.getCenterPoint(r),c/2,l):at(n===`y`?{start:a,end:s,value:t}:{start:i,end:o,value:e},l)}getCenterPoint(e){return ut(this,e)}draw(e){let t=this.options,n=t.borderWidth;if(t.radius<.1)return;e.save(),e.fillStyle=t.backgroundColor,Nt(e,t);let r=Mt(e,t);Rt(e,this,this.centerX,this.centerY),r&&!At(t.pointStyle)&&(e.shadowColor=t.borderShadowColor,e.stroke()),e.restore(),t.borderWidth=n}resolveElementProperties(e,t){let n=on(e,t);return n.initProperties=Et(e,n,t),n}};sr.id=`pointAnnotation`,sr.defaults={adjustScaleRange:!0,backgroundShadowColor:`transparent`,borderDash:[],borderDashOffset:0,borderShadowColor:`transparent`,borderWidth:1,display:!0,hitTolerance:0,init:void 0,pointStyle:`circle`,radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},sr.defaultRoutes={borderColor:`color`,backgroundColor:`color`};var cr=class extends Ae{inRange(e,t,n,r){if(n!==`x`&&n!==`y`)return this.options.radius>=.1&&this.elements.length>1&&ur(this.elements,e,t,r);let i=tt({x:e,y:t},this.getCenterPoint(r),C(-this.options.rotation)),a=this.elements.map(e=>n===`y`?e.bY:e.bX),o=Math.min(...a),s=Math.max(...a);return i[n]>=o&&i[n]<=s}getCenterPoint(e){return ut(this,e)}draw(e){let{elements:t,options:n}=this;e.save(),e.beginPath(),e.fillStyle=n.backgroundColor,Nt(e,n);let r=Mt(e,n),i=!0;for(let n of t)i?(e.moveTo(n.x,n.y),i=!1):e.lineTo(n.x,n.y);e.closePath(),e.fill(),r&&(e.shadowColor=n.borderShadowColor,e.stroke()),e.restore()}resolveElementProperties(e,t){let n=on(e,t),{sides:r,rotation:i}=t,a=[],o=2*_e/r,s=i*Oe;for(let i=0;i<r;i++,s+=o){let r=lr(n,t,s);r.initProperties=Et(e,n,t),a.push(r)}return n.elements=a,n}};cr.id=`polygonAnnotation`,cr.defaults={adjustScaleRange:!0,backgroundShadowColor:`transparent`,borderCapStyle:`butt`,borderDash:[],borderDashOffset:0,borderJoinStyle:`miter`,borderShadowColor:`transparent`,borderWidth:1,display:!0,hitTolerance:0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},cr.defaultRoutes={borderColor:`color`,backgroundColor:`color`};function lr({centerX:e,centerY:t},{radius:n,borderWidth:r,hitTolerance:i},a){let o=(r+i)/2,s=Math.sin(a),c=Math.cos(a),l={x:e+s*n,y:t-c*n};return{type:`point`,optionScope:`point`,properties:{x:l.x,y:l.y,centerX:l.x,centerY:l.y,bX:e+s*(n+o),bY:t-c*(n+o)}}}function ur(e,t,n,r){let i=!1,a=e[e.length-1].getProps([`bX`,`bY`],r);for(let o of e){let e=o.getProps([`bX`,`bY`],r);e.bY>n!=a.bY>n&&t<(a.bX-e.bX)*(n-e.bY)/(a.bY-e.bY)+e.bX&&(i=!i),a=e}return i}var dr={box:jn,doughnutLabel:Mn,ellipse:ar,label:Ln,line:qn,point:sr,polygon:cr};Object.keys(dr).forEach(e=>{de.describe(`elements.${dr[e].id}`,{_fallback:`plugins.annotation.common`})});var fr={update:Object.assign},pr=pn.concat(bn),mr=(e,t)=>D(t)?Cr(e,t):e,hr=e=>e===`color`||e===`font`;function gr(e=`line`){return dr[e]?e:(console.warn(`Unknown annotation type: '${e}', defaulting to 'line'`),`line`)}function _r(e,t,n,r){let i=yr(e,n.animations,r),a=t.annotations,o=Tr(t.elements,a);for(let t=0;t<a.length;t++){let n=a[t],r=xr(o,t,n.type),s=n.setContext(wr(e,r,o,n)),c=r.resolveElementProperties(e,s);c.skip=vr(c),`elements`in c&&(br(r,c.elements,s,i),delete c.elements),We(r.x)||Object.assign(r,c),Object.assign(r,c.initProperties),c.options=Sr(s),i.update(r,c)}}function vr(e){return isNaN(e.x)||isNaN(e.y)}function yr(e,t,n){return n===`reset`||n===`none`||n===`resize`?fr:new se(e,t)}function br(e,t,n,r){let i=e.elements||=[];i.length=t.length;for(let e=0;e<t.length;e++){let a=t[e],o=a.properties,s=xr(i,e,a.type,a.initProperties);o.options=Sr(n[a.optionScope].override(a)),r.update(s,o)}}function xr(e,t,n,r){let i=dr[gr(n)],a=e[t];return(!a||!(a instanceof i))&&(a=e[t]=new i,Object.assign(a,r)),a}function Sr(e){let t=dr[gr(e.type)],n={};n.id=e.id,n.type=e.type,n.drawTime=e.drawTime,Object.assign(n,Cr(e,t.defaults),Cr(e,t.defaultRoutes));for(let t of pr)n[t]=e[t];return n}function Cr(e,t){let n={};for(let r of Object.keys(t)){let i=t[r],a=e[r];hr(r)&&He(a)?n[r]=a.map(e=>mr(e,i)):n[r]=mr(a,i)}return n}function wr(e,t,n,r){return t.$context||=Object.assign(Object.create(e.getContext()),{element:t,get elements(){return n.filter(e=>e&&e.options)},id:r.id,type:`annotation`})}function Tr(e,t){let n=t.length,r=e.length;if(r<n){let t=n-r;e.splice(r,0,...Array(t))}else r>n&&e.splice(n,r-n);return e}var Er=`3.1.0`,Dr=new Map,Or=e=>e.type!==`doughnutLabel`,kr=pn.concat(bn),Ar={id:`annotation`,version:Er,beforeRegister(){dt(`chart.js`,`4.0`,ge.version)},afterRegister(){ge.register(dr)},afterUnregister(){ge.unregister(dr)},beforeInit(e){Dr.set(e,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(e,t,n){let r=Dr.get(e),i=r.annotations=[],a=n.annotations;D(a)?Object.keys(a).forEach(e=>{let t=a[e];D(t)&&(t.id=e,i.push(t))}):He(a)&&i.push(...a),wn(i.filter(Or),e.scales)},afterDataLimits(e,t){let n=Dr.get(e);Cn(e,t.scale,n.annotations.filter(Or).filter(e=>e.display&&e.adjustScaleRange))},afterUpdate(e,t,n){let r=Dr.get(e);mn(e,r,n),_r(e,r,n,t.mode),r.visibleElements=r.elements.filter(e=>!e.skip&&e.options.display),xn(e,r,n)},beforeDatasetsDraw(e,t,n){jr(e,`beforeDatasetsDraw`,n.clip)},afterDatasetsDraw(e,t,n){jr(e,`afterDatasetsDraw`,n.clip)},beforeDatasetDraw(e,t,n){jr(e,t.index,n.clip)},beforeDraw(e,t,n){jr(e,`beforeDraw`,n.clip)},afterDraw(e,t,n){jr(e,`afterDraw`,n.clip)},beforeEvent(e,t,n){hn(Dr.get(e),t.event,n)&&(t.changed=!0)},afterDestroy(e){Dr.delete(e)},getAnnotations(e){let t=Dr.get(e);return t?t.elements:[]},_getAnnotationElementsAtEventForMode(e,t,n){return Xe(e,t,n)},defaults:{animations:{numbers:{properties:[`x`,`y`,`x2`,`y2`,`width`,`height`,`centerX`,`centerY`,`pointX`,`pointY`,`radius`],type:`number`},colors:{properties:[`backgroundColor`,`borderColor`],type:`color`}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:`afterDatasetsDraw`,init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:e=>!kr.includes(e)&&e!==`init`,annotations:{_allKeys:!1,_fallback:(e,t)=>`elements.${dr[gr(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:hr,_fallback:!0},_indexable:hr}},additionalOptionScopes:[``]};function jr(e,t,n){let{ctx:r,chartArea:i}=e,a=Dr.get(e);n&&Ke(r,i);let o=Mr(a.visibleElements,t).sort((e,t)=>e.element.options.z-t.element.options.z);for(let e of o)Nr(r,i,a,e);n&&A(r)}function Mr(e,t){let n=[];for(let r of e)if(r.options.drawTime===t&&n.push({element:r,main:!0}),r.elements&&r.elements.length)for(let e of r.elements)e.options.display&&e.options.drawTime===t&&n.push({element:e});return n}function Nr(e,t,n,r){let i=r.element;r.main?(Sn(n,i,`beforeDraw`),i.draw(e,t),Sn(n,i,`afterDraw`)):i.draw(e,t)}function Pr(e){let t=null;return()=>(t??=e(),t)}function Fr(e,t){return e.filter(e=>e!==t)}function Ir(e,t){let n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);let i=[];return n.forEach(e=>i.push(e)),i}var Lr=class{enter(e){let t=this.entered.length;return this.entered=Ir(this.entered.filter(t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e))),[e]),t===0&&this.entered.length>0}leave(e){let t=this.entered.length;return this.entered=Fr(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},Rr=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){let t={};Object.keys(this.config.exposeProperties).forEach(n=>{let r=this.config.exposeProperties[n];r!=null&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},zr=r({FILE:()=>Br,HTML:()=>Ur,TEXT:()=>Hr,URL:()=>Vr},1);const Br=`__NATIVE_FILE__`,Vr=`__NATIVE_URL__`,Hr=`__NATIVE_TEXT__`,Ur=`__NATIVE_HTML__`;function Wr(e,t,n){return t.reduce((t,n)=>t||e.getData(n),``)??n}const Gr={[Br]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:[`Files`]},[Ur]:{exposeProperties:{html:(e,t)=>Wr(e,t,``),dataTransfer:e=>e},matchesTypes:[`Html`,`text/html`]},[Vr]:{exposeProperties:{urls:(e,t)=>Wr(e,t,``).split(`
2
- `),dataTransfer:e=>e},matchesTypes:[`Url`,`text/uri-list`]},[Hr]:{exposeProperties:{text:(e,t)=>Wr(e,t,``),dataTransfer:e=>e},matchesTypes:[`Text`,`text/plain`]}};function Kr(e,t){let n=Gr[e];if(!n)throw Error(`native type ${e} has no configuration`);let r=new Rr(n);return r.loadDataTransfer(t),r}function qr(e){if(!e)return null;let t=Array.prototype.slice.call(e.types||[]);return Object.keys(Gr).filter(e=>{let n=Gr[e];return n?.matchesTypes?n.matchesTypes.some(e=>t.indexOf(e)>-1):!1})[0]||null}const Jr=Pr(()=>/firefox/i.test(navigator.userAgent)),Yr=Pr(()=>!!window.safari);var Xr=class{interpolate(e){let{xs:t,ys:n,c1s:r,c2s:i,c3s:a}=this,o=t.length-1;if(e===t[o])return n[o];let s=0,c=a.length-1,l;for(;s<=c;){l=Math.floor(.5*(s+c));let r=t[l];if(r<e)s=l+1;else if(r>e)c=l-1;else return n[l]}o=Math.max(0,c);let u=e-t[o],d=u*u;return n[o]+r[o]*u+i[o]*d+a[o]*u*d}constructor(e,t){let{length:n}=e,r=[];for(let e=0;e<n;e++)r.push(e);r.sort((t,n)=>e[t]<e[n]?-1:1);let i=[],a=[],o=[],s,c;for(let r=0;r<n-1;r++)s=e[r+1]-e[r],c=t[r+1]-t[r],a.push(s),i.push(c),o.push(c/s);let l=[o[0]];for(let e=0;e<a.length-1;e++){let t=o[e],n=o[e+1];if(t*n<=0)l.push(0);else{s=a[e];let r=a[e+1],i=s+r;l.push(3*i/((i+r)/t+(i+s)/n))}}l.push(o[o.length-1]);let u=[],d=[],f;for(let e=0;e<l.length-1;e++){f=o[e];let t=l[e],n=1/a[e],r=t+l[e+1]-f-f;u.push((f-t-r)*n),d.push(r*n*n)}this.xs=e,this.ys=t,this.c1s=l,this.c2s=u,this.c3s=d}},Zr=1;function Qr(e){let t=e.nodeType===Zr?e:e.parentElement;if(!t)return null;let{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function $r(e){return{x:e.clientX,y:e.clientY}}function ei(e){return e.nodeName===`IMG`&&(Jr()||!document.documentElement?.contains(e))}function ti(e,t,n,r){let i=e?t.width:n,a=e?t.height:r;return Yr()&&e&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}function ni(e,t,n,r,i){let a=ei(t),o=Qr(a?e:t),s={x:n.x-o.x,y:n.y-o.y},{offsetWidth:c,offsetHeight:l}=e,{anchorX:u,anchorY:d}=r,{dragPreviewWidth:f,dragPreviewHeight:p}=ti(a,t,c,l),m=()=>{let e=new Xr([0,.5,1],[s.y,s.y/l*p,s.y+p-l]).interpolate(d);return Yr()&&a&&(e+=(window.devicePixelRatio-1)*p),e},h=()=>new Xr([0,.5,1],[s.x,s.x/c*f,s.x+f-c]).interpolate(u),{offsetX:g,offsetY:_}=i,v=g===0||g,y=_===0||_;return{x:v?g:h(),y:y?_:m()}}var ri=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<`u`)return window}get document(){if(this.globalContext?.document)return this.globalContext.document;if(this.window)return this.window.document}get rootElement(){return this.optionsArgs?.rootElement||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}};function ii(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ai(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ii(e,t,n[t])})}return e}var oi=class{profile(){return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:this.dragStartSourceIds?.length||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:this.dragOverTargetIds?.length||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){let e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw Error(`Cannot have two HTML5 backends at the same time.`);e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){let e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var t;(t=this.window)==null||t.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);let r=t=>this.handleDragStart(t,e),i=e=>this.handleSelectStart(e);return t.setAttribute(`draggable`,`true`),t.addEventListener(`dragstart`,r),t.addEventListener(`selectstart`,i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener(`dragstart`,r),t.removeEventListener(`selectstart`,i),t.setAttribute(`draggable`,`false`)}}connectDropTarget(e,t){let n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),i=t=>this.handleDrop(t,e);return t.addEventListener(`dragenter`,n),t.addEventListener(`dragover`,r),t.addEventListener(`drop`,i),()=>{t.removeEventListener(`dragenter`,n),t.removeEventListener(`dragover`,r),t.removeEventListener(`drop`,i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener(`dragstart`,this.handleTopDragStart),e.addEventListener(`dragstart`,this.handleTopDragStartCapture,!0),e.addEventListener(`dragend`,this.handleTopDragEndCapture,!0),e.addEventListener(`dragenter`,this.handleTopDragEnter),e.addEventListener(`dragenter`,this.handleTopDragEnterCapture,!0),e.addEventListener(`dragleave`,this.handleTopDragLeaveCapture,!0),e.addEventListener(`dragover`,this.handleTopDragOver),e.addEventListener(`dragover`,this.handleTopDragOverCapture,!0),e.addEventListener(`drop`,this.handleTopDrop),e.addEventListener(`drop`,this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener(`dragstart`,this.handleTopDragStart),e.removeEventListener(`dragstart`,this.handleTopDragStartCapture,!0),e.removeEventListener(`dragend`,this.handleTopDragEndCapture,!0),e.removeEventListener(`dragenter`,this.handleTopDragEnter),e.removeEventListener(`dragenter`,this.handleTopDragEnterCapture,!0),e.removeEventListener(`dragleave`,this.handleTopDragLeaveCapture,!0),e.removeEventListener(`dragover`,this.handleTopDragOver),e.removeEventListener(`dragover`,this.handleTopDragOverCapture,!0),e.removeEventListener(`drop`,this.handleTopDrop),e.removeEventListener(`drop`,this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){let e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return ai({dropEffect:this.altKeyPressed?`copy`:`move`},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?`copy`:this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){let e=this.monitor.getSourceId();return ai({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){let e=this.monitor.getItemType();return Object.keys(zr).some(t=>zr[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=Kr(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout(()=>this.rootElement?.addEventListener(`mousemove`,this.endDragIfSourceWasRemovedFromDOM,!0),1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)==null||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener(`mousemove`,this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||=[],this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{let t=this.sourceNodes.get(e);return t&&Qr(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>!!(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{let e=this.currentDragSourceNode;e==null||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{this.hoverRafId===null&&typeof requestAnimationFrame<`u`&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<`u`&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;let{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;let n=$r(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});let{dataTransfer:r}=e,i=qr(r);if(this.monitor.isDragging()){if(r&&typeof r.setDragImage==`function`){let e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),i=this.sourcePreviewNodes.get(e)||t;if(i){let{anchorX:e,anchorY:a,offsetX:o,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),c=ni(t,i,n,{anchorX:e,anchorY:a},{offsetX:o,offsetY:s});r.setDragImage(i,c.x,c.y)}}try{r?.setData(`application/json`,{})}catch{}this.setCurrentDragSourceNode(e.target);let{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(i)this.beginDragNativeItem(i);else if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute(`draggable`)))return;else e.preventDefault()},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var t;(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}if(!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;let{dataTransfer:n}=e,r=qr(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{let{dragEnterTargetIds:t}=this;this.dragEnterTargetIds=[],this.monitor.isDragging()&&(this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:$r(e)}),t.some(e=>this.monitor.canDropOnTarget(e))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())))},this.handleTopDragOverCapture=e=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var t;(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}},this.handleTopDragOver=e=>{let{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`none`);return}this.altKeyPressed=e.altKey,this.lastClientOffset=$r(e),this.scheduleHover(t),(t||[]).some(e=>this.monitor.canDropOnTarget(e))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`none`))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault(),this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=e=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var t;e.preventDefault(),(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}else qr(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{let{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:$r(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{let t=e.target;typeof t.dragDrop==`function`&&(t.tagName===`INPUT`||t.tagName===`SELECT`||t.tagName===`TEXTAREA`||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new ri(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new Lr(this.isNodeInDocument)}},si;function ci(){return si||(si=new Image,si.src=`data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==`),si}const li=function(e,t,n){return new oi(e,t,n)};var N=i(c(),1);const ui=(0,N.createContext)({dragDropManager:void 0});function di(e){"@babel/helpers - typeof";return di=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},di(e)}function fi(e,t){if(di(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(di(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function pi(e){var t=fi(e,`string`);return di(t)==`symbol`?t:t+``}function mi(e,t,n){return(t=pi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?hi(Object(n),!0).forEach(function(t){mi(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _i(e){return`Minified Redux error #`+e+`; visit https://redux.js.org/Errors?code=`+e+` for the full message or use the non-minified dev environment for full errors. `}var vi=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})(),yi=function(){return Math.random().toString(36).substring(7).split(``).join(`.`)},bi={INIT:`@@redux/INIT`+yi(),REPLACE:`@@redux/REPLACE`+yi(),PROBE_UNKNOWN_ACTION:function(){return`@@redux/PROBE_UNKNOWN_ACTION`+yi()}};function xi(e){if(typeof e!=`object`||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Si(e,t,n){var r;if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(_i(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(_i(1));return n(Si)(e,t)}if(typeof e!=`function`)throw Error(_i(2));var i=e,a=t,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){if(c)throw Error(_i(3));return a}function d(e){if(typeof e!=`function`)throw Error(_i(4));if(c)throw Error(_i(5));var t=!0;return l(),s.push(e),function(){if(t){if(c)throw Error(_i(6));t=!1,l();var n=s.indexOf(e);s.splice(n,1),o=null}}}function f(e){if(!xi(e))throw Error(_i(7));if(e.type===void 0)throw Error(_i(8));if(c)throw Error(_i(9));try{c=!0,a=i(a,e)}finally{c=!1}for(var t=o=s,n=0;n<t.length;n++){var r=t[n];r()}return e}function p(e){if(typeof e!=`function`)throw Error(_i(10));i=e,f({type:bi.REPLACE})}function m(){var e,t=d;return e={subscribe:function(e){if(typeof e!=`object`||!e)throw Error(_i(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}},e[vi]=function(){return this},e}return f({type:bi.INIT}),r={dispatch:f,subscribe:d,getState:u,replaceReducer:p},r[vi]=m,r}function Ci(e,t,...n){if(wi()&&t===void 0)throw Error(`invariant requires an error message argument`);if(!e){let e;if(t===void 0)e=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{let r=0;e=Error(t.replace(/%s/g,function(){return n[r++]})),e.name=`Invariant Violation`}throw e.framesToPop=1,e}}function wi(){return typeof process<`u`&&!0}function Ti(e,t,n){return t.split(`.`).reduce((e,t)=>e&&e[t]?e[t]:n||null,e)}function Ei(e,t){return e.filter(e=>e!==t)}function Di(e){return typeof e==`object`}function Oi(e,t){let n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);let i=[];return n.forEach((e,t)=>{e===1&&i.push(t)}),i}function ki(e,t){return e.filter(e=>t.indexOf(e)>-1)}const Ai=`dnd-core/INIT_COORDS`,ji=`dnd-core/BEGIN_DRAG`,Mi=`dnd-core/PUBLISH_DRAG_SOURCE`,Ni=`dnd-core/HOVER`,Pi=`dnd-core/DROP`,Fi=`dnd-core/END_DRAG`;function Ii(e,t){return{type:Ai,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var Li={type:Ai,payload:{clientOffset:null,sourceClientOffset:null}};function Ri(e){return function(t=[],n={publishSource:!0}){let{publishSource:r=!0,clientOffset:i,getSourceClientOffset:a}=n,o=e.getMonitor(),s=e.getRegistry();e.dispatch(Ii(i)),zi(t,o,s);let c=Hi(t,o);if(c==null){e.dispatch(Li);return}let l=null;if(i){if(!a)throw Error(`getSourceClientOffset must be defined`);Bi(a),l=a(c)}e.dispatch(Ii(i,l));let u=s.getSource(c).beginDrag(o,c);if(u!=null)return Vi(u),s.pinSource(c),{type:ji,payload:{itemType:s.getSourceType(c),item:u,sourceId:c,clientOffset:i||null,sourceClientOffset:l||null,isSourcePublic:!!r}}}}function zi(e,t,n){Ci(!t.isDragging(),`Cannot call beginDrag while dragging.`),e.forEach(function(e){Ci(n.getSource(e),`Expected sourceIds to be registered.`)})}function Bi(e){Ci(typeof e==`function`,`When clientOffset is provided, getSourceClientOffset must be a function.`)}function Vi(e){Ci(Di(e),`Item must be an object.`)}function Hi(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function Ui(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Ui(e,t,n[t])})}return e}function Gi(e){return function(t={}){let n=e.getMonitor(),r=e.getRegistry();Ki(n),Yi(n).forEach((i,a)=>{let o={type:Pi,payload:{dropResult:Wi({},t,qi(i,a,r,n))}};e.dispatch(o)})}}function Ki(e){Ci(e.isDragging(),`Cannot call drop while not dragging.`),Ci(!e.didDrop(),`Cannot call drop twice during one drag operation.`)}function qi(e,t,n,r){let i=n.getTarget(e),a=i?i.drop(r,e):void 0;return Ji(a),a===void 0&&(a=t===0?{}:r.getDropResult()),a}function Ji(e){Ci(e===void 0||Di(e),`Drop result must either be an object or undefined.`)}function Yi(e){let t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Xi(e){return function(){let t=e.getMonitor(),n=e.getRegistry();Zi(t);let r=t.getSourceId();return r!=null&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource()),{type:Fi}}}function Zi(e){Ci(e.isDragging(),`Cannot call endDrag while not dragging.`)}function Qi(e,t){return t===null?e===null:Array.isArray(e)?e.some(e=>e===t):e===t}function $i(e){return function(t,{clientOffset:n}={}){ea(t);let r=t.slice(0),i=e.getMonitor(),a=e.getRegistry();return na(r,a,i.getItemType()),ta(r,i,a),ra(r,i,a),{type:Ni,payload:{targetIds:r,clientOffset:n||null}}}}function ea(e){Ci(Array.isArray(e),`Expected targetIds to be an array.`)}function ta(e,t,n){Ci(t.isDragging(),`Cannot call hover while not dragging.`),Ci(!t.didDrop(),`Cannot call hover after drop.`);for(let t=0;t<e.length;t++){let r=e[t];Ci(e.lastIndexOf(r)===t,`Expected targetIds to be unique in the passed array.`),Ci(n.getTarget(r),`Expected targetIds to be registered.`)}}function na(e,t,n){for(let r=e.length-1;r>=0;r--){let i=e[r];Qi(t.getTargetType(i),n)||e.splice(r,1)}}function ra(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}function ia(e){return function(){if(e.getMonitor().isDragging())return{type:Mi}}}function aa(e){return{beginDrag:Ri(e),publishDragSource:ia(e),hover:$i(e),drop:Gi(e),endDrag:Xi(e)}}var oa=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){let e=this,{dispatch:t}=this.store;function n(n){return(...r)=>{let i=n.apply(e,r);i!==void 0&&t(i)}}let r=aa(this);return Object.keys(r).reduce((e,t)=>{let i=r[t];return e[t]=n(i),e},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{let e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function sa(e,t){return{x:e.x+t.x,y:e.y+t.y}}function ca(e,t){return{x:e.x-t.x,y:e.y-t.y}}function la(e){let{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:ca(sa(t,r),n)}function ua(e){let{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:ca(t,n)}const da=[],fa=[];da.__IS_NONE__=!0,fa.__IS_ALL__=!0;function pa(e,t){return e===da?!1:e===fa||t===void 0?!0:ki(t,e).length>0}var ma=class{subscribeToStateChange(e,t={}){let{handlerIds:n}=t;Ci(typeof e==`function`,`listener must be a function.`),Ci(n===void 0||Array.isArray(n),`handlerIds, when specified, must be an array of strings.`);let r=this.store.getState().stateId;return this.store.subscribe(()=>{let t=this.store.getState(),i=t.stateId;try{i===r||i===r+1&&!pa(t.dirtyHandlerIds,n)||e()}finally{r=i}})}subscribeToOffsetChange(e){Ci(typeof e==`function`,`listener must be a function.`);let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{let n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;let t=this.registry.getSource(e);return Ci(t,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;let t=this.registry.getTarget(e);return Ci(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop()?!1:Qi(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;let t=this.registry.getSource(e,!0);return Ci(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic()||this.registry.getSourceType(e)!==this.getItemType()?!1:t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;let{shallow:n}=t;if(!this.isDragging())return!1;let r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!Qi(r,i))return!1;let a=this.getTargetIds();if(!a.length)return!1;let o=a.indexOf(e);return n?o===a.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return la(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return ua(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},ha=typeof global<`u`?global:self,ga=ha.MutationObserver||ha.WebKitMutationObserver;function _a(e){return function(){let t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}function va(e){let t=1,n=new ga(e),r=document.createTextNode(``);return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}const ya=typeof ga==`function`?va:_a;var ba=class{enqueueTask(e){let{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.index<e.length;){let t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=ya(this.flush),this.requestErrorThrow=_a(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},xa=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},Sa=class{create(e){let t=this.freeTasks,n=t.length?t.pop():new xa(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}},Ca=new ba,xee=new Sa(Ca.registerPendingError);function See(e){Ca.enqueueTask(xee.create(e))}const wa=`dnd-core/ADD_SOURCE`,Ta=`dnd-core/ADD_TARGET`,Ea=`dnd-core/REMOVE_SOURCE`,Da=`dnd-core/REMOVE_TARGET`;function Cee(e){return{type:wa,payload:{sourceId:e}}}function wee(e){return{type:Ta,payload:{targetId:e}}}function Tee(e){return{type:Ea,payload:{sourceId:e}}}function Eee(e){return{type:Da,payload:{targetId:e}}}function Dee(e){Ci(typeof e.canDrag==`function`,`Expected canDrag to be a function.`),Ci(typeof e.beginDrag==`function`,`Expected beginDrag to be a function.`),Ci(typeof e.endDrag==`function`,`Expected endDrag to be a function.`)}function Oee(e){Ci(typeof e.canDrop==`function`,`Expected canDrop to be a function.`),Ci(typeof e.hover==`function`,`Expected hover to be a function.`),Ci(typeof e.drop==`function`,`Expected beginDrag to be a function.`)}function Oa(e,t){if(t&&Array.isArray(e)){e.forEach(e=>Oa(e,!1));return}Ci(typeof e==`string`||typeof e==`symbol`,t?`Type can only be a string, a symbol, or an array of either.`:`Type can only be a string or a symbol.`)}var ka;(function(e){e.SOURCE=`SOURCE`,e.TARGET=`TARGET`})(ka||={});var kee=0;function Aee(){return kee++}function jee(e){let t=Aee().toString();switch(e){case ka.SOURCE:return`S${t}`;case ka.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function Aa(e){switch(e[0]){case`S`:return ka.SOURCE;case`T`:return ka.TARGET;default:throw Error(`Cannot parse handler ID: ${e}`)}}function ja(e,t){let n=e.entries(),r=!1;do{let{done:e,value:[,i]}=n.next();if(i===t)return!0;r=!!e}while(!r);return!1}var Mee=class{addSource(e,t){Oa(e),Dee(t);let n=this.addHandler(ka.SOURCE,e,t);return this.store.dispatch(Cee(n)),n}addTarget(e,t){Oa(e,!0),Oee(t);let n=this.addHandler(ka.TARGET,e,t);return this.store.dispatch(wee(n)),n}containsHandler(e){return ja(this.dragSources,e)||ja(this.dropTargets,e)}getSource(e,t=!1){return Ci(this.isSourceId(e),`Expected a valid source ID.`),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return Ci(this.isTargetId(e),`Expected a valid target ID.`),this.dropTargets.get(e)}getSourceType(e){return Ci(this.isSourceId(e),`Expected a valid source ID.`),this.types.get(e)}getTargetType(e){return Ci(this.isTargetId(e),`Expected a valid target ID.`),this.types.get(e)}isSourceId(e){return Aa(e)===ka.SOURCE}isTargetId(e){return Aa(e)===ka.TARGET}removeSource(e){Ci(this.getSource(e),`Expected an existing source.`),this.store.dispatch(Tee(e)),See(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){Ci(this.getTarget(e),`Expected an existing target.`),this.store.dispatch(Eee(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){let t=this.getSource(e);Ci(t,`Expected an existing source.`),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){Ci(this.pinnedSource,`No source is pinned at the time.`),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){let r=jee(e);return this.types.set(r,t),e===ka.SOURCE?this.dragSources.set(r,n):e===ka.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}};const Nee=(e,t)=>e===t;function Pee(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function Ma(e,t,n=Nee){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}function Fee(e=da,t){switch(t.type){case Ni:break;case wa:case Ta:case Da:case Ea:return da;case ji:case Mi:case Fi:case Pi:default:return fa}let{targetIds:n=[],prevTargetIds:r=[]}=t.payload,i=Oi(n,r);if(!(i.length>0||!Ma(n,r)))return da;let a=r[r.length-1],o=n[n.length-1];return a!==o&&(a&&i.push(a),o&&i.push(o)),i}function Iee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Iee(e,t,n[t])})}return e}var Na={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Pa(e=Na,t){let{payload:n}=t;switch(t.type){case Ai:case ji:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Ni:return Pee(e.clientOffset,n.clientOffset)?e:Lee({},e,{clientOffset:n.clientOffset});case Fi:case Pi:return Na;default:return e}}function Fa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ia(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Fa(e,t,n[t])})}return e}var La={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ra(e=La,t){let{payload:n}=t;switch(t.type){case ji:return Ia({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Mi:return Ia({},e,{isSourcePublic:!0});case Ni:return Ia({},e,{targetIds:n.targetIds});case Da:return e.targetIds.indexOf(n.targetId)===-1?e:Ia({},e,{targetIds:Ei(e.targetIds,n.targetId)});case Pi:return Ia({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Fi:return Ia({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function za(e=0,t){switch(t.type){case wa:case Ta:return e+1;case Ea:case Da:return e-1;default:return e}}function Ba(e=0){return e+1}function Va(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ha(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Va(e,t,n[t])})}return e}function Ua(e={},t){return{dirtyHandlerIds:Fee(e.dirtyHandlerIds,{type:t.type,payload:Ha({},t.payload,{prevTargetIds:Ti(e,`dragOperation.targetIds`,[])})}),dragOffset:Pa(e.dragOffset,t),refCount:za(e.refCount,t),dragOperation:Ra(e.dragOperation,t),stateId:Ba(e.stateId)}}function Wa(e,t=void 0,n={},r=!1){let i=Ga(r),a=new oa(i,new ma(i,new Mee(i))),o=e(a,t,n);return a.receiveBackend(o),a}function Ga(e){let t=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__;return Si(Ua,e&&t&&t({name:`dnd-core`,instanceId:`dnd-core`}))}var P=s();function Ka(e,t){if(e==null)return{};var n=qa(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qa(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Ja=0,Ya=Symbol.for(`__REACT_DND_CONTEXT_INSTANCE__`),Xa=(0,N.memo)(function(e){var{children:t}=e;let[n,r]=Za(Ka(e,[`children`]));return(0,N.useEffect)(()=>{if(r){let e=$a();return++Ja,()=>{--Ja===0&&(e[Ya]=null)}}},[]),(0,P.jsx)(ui.Provider,{value:n,children:t})});function Za(e){return`manager`in e?[{dragDropManager:e.manager},!1]:[Qa(e.backend,e.context,e.options,e.debugMode),!e.context]}function Qa(e,t=$a(),n,r){let i=t;return i[Ya]||(i[Ya]={dragDropManager:Wa(e,t,n,r)}),i[Ya]}function $a(){return typeof global<`u`?global:window}const eo=typeof window<`u`?N.useLayoutEffect:N.useEffect;var Ree=i(ie(),1);function to(e,t,n){let[r,i]=(0,N.useState)(()=>t(e)),a=(0,N.useCallback)(()=>{let a=t(e);(0,Ree.default)(r,a)||(i(a),n&&n())},[r,e,n]);return eo(a),[r,a]}function zee(e,t,n){let[r,i]=to(e,t,n);return eo(function(){let t=e.getHandlerId();if(t!=null)return e.subscribeToStateChange(i,{handlerIds:[t]})},[e,i]),r}function no(e,t,n){return zee(t,e||(()=>({})),()=>n.reconnect())}function ro(e,t){let n=[...t||[]];return t==null&&typeof e!=`function`&&n.push(e),(0,N.useMemo)(()=>typeof e==`function`?e():e,n)}function io(e){return(0,N.useMemo)(()=>e.hooks.dragSource(),[e])}function ao(e){return(0,N.useMemo)(()=>e.hooks.dragPreview(),[e])}var oo=!1,so=!1,co=class{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){Ci(!oo,`You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor`);try{return oo=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{oo=!1}}isDragging(){if(!this.sourceId)return!1;Ci(!so,`You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor`);try{return so=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{so=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}},lo=!1,uo=class{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;Ci(!lo,`You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor`);try{return lo=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{lo=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}};function fo(e,t,n){let r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}function po(e,t,n){let r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}function mo(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;let s=Object.prototype.hasOwnProperty.bind(t);for(let o=0;o<a.length;o++){let c=a[o];if(!s(c))return!1;let l=e[c],u=t[c];if(i=n?n.call(r,l,u,c):void 0,i===!1||i===void 0&&l!==u)return!1}return!0}function ho(e){return typeof e==`object`&&!!e&&Object.prototype.hasOwnProperty.call(e,`current`)}function go(e){if(typeof e.type==`string`)return;let t=e.type.displayName||e.type.name||`the component`;throw Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function _o(e){return(t=null,n=null)=>{if(!(0,N.isValidElement)(t)){let r=t;return e(r,n),r}let r=t;return go(r),bo(r,n?t=>e(t,n):e)}}function vo(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];if(n.endsWith(`Ref`))t[n]=e[n];else{let e=_o(r);t[n]=()=>e}}),t}function yo(e,t){typeof e==`function`?e(t):e.current=t}function bo(e,t){let n=e.ref;return Ci(typeof n!=`string`,`Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs`),n?(0,N.cloneElement)(e,{ref:e=>{yo(n,e),yo(t,e)}}):(0,N.cloneElement)(e,{ref:t})}var xo=class{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){let e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){let e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){let t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n&&this.disconnectDragPreview(),this.handlerId){if(!t){this.lastConnectedDragPreview=t;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!mo(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!mo(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&=(this.dragSourceUnsubscribe(),void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=vo({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,ho(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,ho(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}},So=class{get connectTarget(){return this.dropTarget}reconnect(){let e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();let t=this.dropTarget;if(this.handlerId){if(!t){this.lastConnectedDropTarget=t;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!mo(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&=(this.unsubscribeDropTarget(),void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=vo({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,ho(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}};function Co(){let{dragDropManager:e}=(0,N.useContext)(ui);return Ci(e!=null,`Expected drag drop context`),e}function wo(e,t){let n=Co(),r=(0,N.useMemo)(()=>new xo(n.getBackend()),[n]);return eo(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),eo(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function To(){let e=Co();return(0,N.useMemo)(()=>new co(e),[e])}var Eo=class{beginDrag(){let e=this.spec,t=this.monitor,n=null;return n=typeof e.item==`object`?e.item:typeof e.item==`function`?e.item(t):{},n??null}canDrag(){let e=this.spec,t=this.monitor;return typeof e.canDrag==`boolean`?e.canDrag:typeof e.canDrag==`function`?e.canDrag(t):!0}isDragging(e,t){let n=this.spec,r=this.monitor,{isDragging:i}=n;return i?i(r):t===e.getSourceId()}endDrag(){let e=this.spec,t=this.monitor,n=this.connector,{end:r}=e;r&&r(t.getItem(),t),n.reconnect()}constructor(e,t,n){this.spec=e,this.monitor=t,this.connector=n}};function Do(e,t,n){let r=(0,N.useMemo)(()=>new Eo(e,t,n),[t,n]);return(0,N.useEffect)(()=>{r.spec=e},[e]),r}function Oo(e){return(0,N.useMemo)(()=>{let t=e.type;return Ci(t!=null,`spec.type must be defined`),t},[e])}function ko(e,t,n){let r=Co(),i=Do(e,t,n),a=Oo(e);eo(function(){if(a!=null){let[e,o]=po(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o}},[r,t,n,i,a])}function Ao(e,t){let n=ro(e,t);Ci(!n.begin,`useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)`);let r=To(),i=wo(n.options,n.previewOptions);return ko(n,r,i),[no(n.collect,r,i),io(i),ao(i)]}function jo(e){let t=Co().getMonitor(),[n,r]=to(t,e);return(0,N.useEffect)(()=>t.subscribeToOffsetChange(r)),(0,N.useEffect)(()=>t.subscribeToStateChange(r)),n}function Mo(e){return(0,N.useMemo)(()=>e.hooks.dropTarget(),[e])}function No(e){let t=Co(),n=(0,N.useMemo)(()=>new So(t.getBackend()),[t]);return eo(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function Po(){let e=Co();return(0,N.useMemo)(()=>new uo(e),[e])}function Fo(e){let{accept:t}=e;return(0,N.useMemo)(()=>(Ci(e.accept!=null,`accept must be defined`),Array.isArray(t)?t:[t]),[t])}var Io=class{canDrop(){let e=this.spec,t=this.monitor;return e.canDrop?e.canDrop(t.getItem(),t):!0}hover(){let e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){let e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}};function Lo(e,t){let n=(0,N.useMemo)(()=>new Io(e,t),[t]);return(0,N.useEffect)(()=>{n.spec=e},[e]),n}function Ro(e,t,n){let r=Co(),i=Lo(e,t),a=Fo(e);eo(function(){let[e,o]=fo(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o},[r,t,i,n,a.map(e=>e.toString()).join(`|`)])}function zo(e,t){let n=ro(e,t),r=Po(),i=No(n.options);return Ro(n,r,i),[no(n.collect,r,i),Mo(i)]}function Bo(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Vo=t((()=>{}));function Ho(){return Ho=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ho.apply(null,arguments)}var Uo=t((()=>{}));function Wo(e,t){return Wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wo(e,t)}function Go(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Wo(e,t)}function Ko(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var qo,Jo=t((()=>{qo=function(){return qo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},qo.apply(this,arguments)}})),Yo=n((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}));Jo();var Xo=Yo(),Zo=new Map,Qo=function(e){return e.cloneNode(!0)},$o=function(){return window.location.protocol===`file:`},es=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&r.readyState===2){var t=r.getResponseHeader(`Content-Type`);if(!t)throw Error(`Content type not found`);var i=(0,Xo.parse)(t).type;if(!(i===`image/svg+xml`||i===`text/plain`))throw Error(`Invalid content type: ${i}`)}if(r.readyState===4){if(r.status===404||r.responseXML===null)throw Error($o()?`Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.`:`Unable to load SVG file: `+e);if(r.status===200||$o()&&r.status===0)n(null,r);else throw Error(`There was a problem injecting the SVG: `+r.status+` `+r.statusText)}}catch(e){if(r.abort(),e instanceof Error)n(e,r);else throw e}},r.open(`GET`,e),r.withCredentials=t,r.overrideMimeType&&r.overrideMimeType(`text/xml`),r.send()},ts={},ns=function(e,t){ts[e]=ts[e]||[],ts[e].push(t)},Bee=function(e){for(var t=function(t,n){setTimeout(function(){if(Array.isArray(ts[e])){var n=Zo.get(e),r=ts[e][t];n instanceof SVGSVGElement&&r(null,Qo(n)),n instanceof Error&&r(n),t===ts[e].length-1&&delete ts[e]}},0)},n=0,r=ts[e].length;n<r;n++)t(n)},Vee=function(e,t,n){if(Zo.has(e)){var r=Zo.get(e);if(r===void 0){ns(e,n);return}if(r instanceof SVGSVGElement){n(null,Qo(r));return}}Zo.set(e,void 0),ns(e,n),es(e,t,function(t,n){t?Zo.set(e,t):n.responseXML?.documentElement instanceof SVGSVGElement&&Zo.set(e,n.responseXML.documentElement),Bee(e)})},Hee=function(e,t,n){es(e,t,function(e,t){e?n(e):t.responseXML?.documentElement instanceof SVGSVGElement&&n(null,t.responseXML.documentElement)})},Uee=0,Wee=function(){return++Uee},rs=[],is={},Gee=`http://www.w3.org/2000/svg`,as=`http://www.w3.org/1999/xlink`,ss=function(e,t,n,r,i,a,o){var s=e.getAttribute(`data-src`)||e.getAttribute(`src`);if(!s){o(Error(`Invalid data-src or src attribute`));return}if(rs.indexOf(e)!==-1){rs.splice(rs.indexOf(e),1),e=null;return}rs.push(e),e.setAttribute(`src`,``),(r?Vee:Hee)(s,i,function(r,i){if(!i){rs.splice(rs.indexOf(e),1),e=null,o(r);return}var c=e.getAttribute(`id`);c&&i.setAttribute(`id`,c);var l=e.getAttribute(`title`);l&&i.setAttribute(`title`,l);var u=e.getAttribute(`width`);u&&i.setAttribute(`width`,u);var d=e.getAttribute(`height`);d&&i.setAttribute(`height`,d);var f=Array.from(new Set(Ko(Ko(Ko([],(i.getAttribute(`class`)||``).split(` `),!0),[`injected-svg`],!1),(e.getAttribute(`class`)||``).split(` `),!0))).join(` `).trim();i.setAttribute(`class`,f);var p=e.getAttribute(`style`);p&&i.setAttribute(`style`,p),i.setAttribute(`data-src`,s);var m=[].filter.call(e.attributes,function(e){return/^data-\w[\w-]*$/.test(e.name)});if(Array.prototype.forEach.call(m,function(e){e.name&&e.value&&i.setAttribute(e.name,e.value)}),n){var h={clipPath:[`clip-path`],"color-profile":[`color-profile`],cursor:[`cursor`],filter:[`filter`],linearGradient:[`fill`,`stroke`],marker:[`marker`,`marker-start`,`marker-mid`,`marker-end`],mask:[`mask`],path:[],pattern:[`fill`,`stroke`],radialGradient:[`fill`,`stroke`]},g,_,v,y,b;Object.keys(h).forEach(function(e){g=e,v=h[e],_=i.querySelectorAll(g+`[id]`);for(var t=function(e,t){y=_[e].id,b=y+`-`+Wee();var n;Array.prototype.forEach.call(v,function(e){n=i.querySelectorAll(`[`+e+`*="`+y+`"]`);for(var t=0,r=n.length;t<r;t++){var a=n[t].getAttribute(e);a&&!a.match(RegExp(`url\\("?#`+y+`"?\\)`))||n[t].setAttribute(e,`url(#`+b+`)`)}});for(var r=i.querySelectorAll(`[*|href]`),a=[],o=0,s=r.length;o<s;o++){var c=r[o].getAttributeNS(as,`href`);c&&c.toString()===`#`+_[e].id&&a.push(r[o])}for(var l=0,u=a.length;l<u;l++)a[l].setAttributeNS(as,`href`,`#`+b);_[e].id=b},n=0,r=_.length;n<r;n++)t(n)})}i.removeAttribute(`xmlns:a`);for(var x=i.querySelectorAll(`script`),S=[],C,w,T=0,E=x.length;T<E;T++)w=x[T].getAttribute(`type`),(!w||w===`application/ecmascript`||w===`application/javascript`||w===`text/javascript`)&&(C=x[T].innerText||x[T].textContent,C&&S.push(C),i.removeChild(x[T]));if(S.length>0&&(t===`always`||t===`once`&&!is[s])){for(var D=0,O=S.length;D<O;D++)Function(S[D])(window);is[s]=!0}var k=i.querySelectorAll(`style`);if(Array.prototype.forEach.call(k,function(e){e.textContent+=``}),i.setAttribute(`xmlns`,Gee),i.setAttribute(`xmlns:xlink`,as),a(i),!e.parentNode){rs.splice(rs.indexOf(e),1),e=null,o(Error(`Parent node is null`));return}e.parentNode.replaceChild(i,e),rs.splice(rs.indexOf(e),1),e=null,o(null,i)})},Kee=function(e,t){var n=t===void 0?{}:t,r=n.afterAll,i=r===void 0?function(){}:r,a=n.afterEach,o=a===void 0?function(){}:a,s=n.beforeEach,c=s===void 0?function(){}:s,l=n.cacheRequests,u=l===void 0?!0:l,d=n.evalScripts,f=d===void 0?`never`:d,p=n.httpRequestWithCredentials,m=p===void 0?!1:p,h=n.renumerateIRIElements,g=h===void 0?!0:h;if(e&&`length`in e)for(var _=0,v=0,y=e.length;v<y;v++)ss(e[v],f,g,u,m,c,function(t,n){o(t,n),e&&`length`in e&&e.length===++_&&i(_)});else e?ss(e,f,g,u,m,c,function(t,n){o(t,n),i(1),e=null}):i(0)},qee=n(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),Jee=n(((e,t)=>{var n=qee();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),cs=n(((e,t)=>{t.exports=Jee()()}));Vo(),Uo();var ls=i(cs()),us=function(e){return(e?.ownerDocument||document).defaultView||window},ds=function(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1},fs=[`afterInjection`,`beforeInjection`,`desc`,`evalScripts`,`fallback`,`httpRequestWithCredentials`,`loading`,`renumerateIRIElements`,`src`,`title`,`useRequestCache`,`wrapper`],ps=`http://www.w3.org/2000/svg`,ms=`http://www.w3.org/1999/xlink`,hs=function(e){function t(){var t,n=[...arguments];return t=e.call.apply(e,[this].concat(n))||this,t.initialState={hasError:!1,isLoading:!0},t.state=t.initialState,t._isMounted=!1,t.reactWrapper=void 0,t.nonReactWrapper=void 0,t.refCallback=function(e){t.reactWrapper=e},t}Go(t,e);var n=t.prototype;return n.renderSVG=function(){var e=this;if(this.reactWrapper instanceof us(this.reactWrapper).Node){var t=this.props,n=t.desc,r=t.evalScripts,i=t.httpRequestWithCredentials,a=t.renumerateIRIElements,o=t.src,s=t.title,c=t.useRequestCache,l=this.props.onError,u=this.props.beforeInjection,d=this.props.afterInjection,f=this.props.wrapper,p,m;f===`svg`?(p=document.createElementNS(ps,f),p.setAttribute(`xmlns`,ps),p.setAttribute(`xmlns:xlink`,ms),m=document.createElementNS(ps,f)):(p=document.createElement(f),m=document.createElement(f)),p.appendChild(m),m.dataset.src=o,this.nonReactWrapper=this.reactWrapper.appendChild(p);var h=function(t){if(e.removeSVG(),!e._isMounted){l(t);return}e.setState(function(){return{hasError:!0,isLoading:!1}},function(){l(t)})};Kee(m,{afterEach:function(t,n){if(t){h(t);return}e._isMounted&&e.setState(function(){return{isLoading:!1}},function(){try{d(n)}catch(e){h(e)}})},beforeEach:function(e){if(e.setAttribute(`role`,`img`),n){var t=e.querySelector(`:scope > desc`);t&&e.removeChild(t);var r=document.createElement(`desc`);r.innerHTML=n,e.prepend(r)}if(s){var i=e.querySelector(`:scope > title`);i&&e.removeChild(i);var a=document.createElement(`title`);a.innerHTML=s,e.prepend(a)}try{u(e)}catch(e){h(e)}},cacheRequests:c,evalScripts:r,httpRequestWithCredentials:i,renumerateIRIElements:a})}},n.removeSVG=function(){var e;(e=this.nonReactWrapper)!=null&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(e){var t=this;ds(Ho({},e),this.props)&&this.setState(function(){return t.initialState},function(){t.removeSVG(),t.renderSVG()})},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var e=this.props;e.afterInjection,e.beforeInjection,e.desc,e.evalScripts;var t=e.fallback;e.httpRequestWithCredentials;var n=e.loading;e.renumerateIRIElements,e.src,e.title,e.useRequestCache;var r=e.wrapper,i=Bo(e,fs),a=r;return N.createElement(a,Ho({},i,{ref:this.refCallback},r===`svg`?{xmlns:ps,xmlnsXlink:ms}:{}),this.state.isLoading&&n&&N.createElement(n,null),this.state.hasError&&t&&N.createElement(t,null))},t}(N.Component);hs.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:``,evalScripts:`never`,fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:``,useRequestCache:!0,wrapper:`div`},hs.propTypes={afterInjection:ls.func,beforeInjection:ls.func,desc:ls.string,evalScripts:ls.oneOf([`always`,`once`,`never`]),fallback:ls.oneOfType([ls.func,ls.object,ls.string]),httpRequestWithCredentials:ls.bool,loading:ls.oneOfType([ls.func,ls.object,ls.string]),onError:ls.func,renumerateIRIElements:ls.bool,src:ls.string.isRequired,title:ls.string,useRequestCache:ls.bool,wrapper:ls.oneOf([`div`,`span`,`svg`])};var gs={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},_s=N.createContext&&N.createContext(gs),vs=[`attr`,`size`,`title`];function ys(e,t){if(e==null)return{};var n=bs(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bs(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function xs(){return xs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xs.apply(this,arguments)}function Ss(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Cs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ss(Object(n),!0).forEach(function(t){ws(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ss(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ws(e,t,n){return t=Ts(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ts(e){var t=Es(e,`string`);return typeof t==`symbol`?t:t+``}function Es(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ds(e){return e&&e.map((e,t)=>N.createElement(e.tag,Cs({key:t},e.attr),Ds(e.child)))}function F(e){return t=>N.createElement(Os,xs({attr:Cs({},e.attr)},t),Ds(e.child))}function Os(e){var t=t=>{var{attr:n,size:r,title:i}=e,a=ys(e,vs),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),N.createElement(`svg`,xs({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:Cs(Cs({color:e.color||t.color},t.style),e.style),height:o,width:o,xmlns:`http://www.w3.org/2000/svg`}),i&&N.createElement(`title`,null,i),e.children)};return _s===void 0?t(gs):N.createElement(_s.Consumer,null,e=>t(e))}function ks(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 9v4`},child:[]},{tag:`path`,attr:{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z`},child:[]},{tag:`path`,attr:{d:`M12 16h.01`},child:[]}]})(e)}function As(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 5l0 14`},child:[]},{tag:`path`,attr:{d:`M18 13l-6 6`},child:[]},{tag:`path`,attr:{d:`M6 13l6 6`},child:[]}]})(e)}function js(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M5 12l14 0`},child:[]},{tag:`path`,attr:{d:`M5 12l6 6`},child:[]},{tag:`path`,attr:{d:`M5 12l6 -6`},child:[]}]})(e)}function Ms(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M5 12l14 0`},child:[]},{tag:`path`,attr:{d:`M13 18l6 -6`},child:[]},{tag:`path`,attr:{d:`M13 6l6 6`},child:[]}]})(e)}function Ns(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 5l0 14`},child:[]},{tag:`path`,attr:{d:`M18 11l-6 -6`},child:[]},{tag:`path`,attr:{d:`M6 11l6 -6`},child:[]}]})(e)}function Ps(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M16 4l4 0l0 4`},child:[]},{tag:`path`,attr:{d:`M14 10l6 -6`},child:[]},{tag:`path`,attr:{d:`M8 20l-4 0l0 -4`},child:[]},{tag:`path`,attr:{d:`M4 20l6 -6`},child:[]}]})(e)}function Fs(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M16 4l4 0l0 4`},child:[]},{tag:`path`,attr:{d:`M14 10l6 -6`},child:[]},{tag:`path`,attr:{d:`M8 20l-4 0l0 -4`},child:[]},{tag:`path`,attr:{d:`M4 20l6 -6`},child:[]},{tag:`path`,attr:{d:`M16 20l4 0l0 -4`},child:[]},{tag:`path`,attr:{d:`M14 14l6 6`},child:[]},{tag:`path`,attr:{d:`M8 4l-4 0l0 4`},child:[]},{tag:`path`,attr:{d:`M4 4l6 6`},child:[]}]})(e)}function Is(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M5 9l4 0l0 -4`},child:[]},{tag:`path`,attr:{d:`M3 3l6 6`},child:[]},{tag:`path`,attr:{d:`M5 15l4 0l0 4`},child:[]},{tag:`path`,attr:{d:`M3 21l6 -6`},child:[]},{tag:`path`,attr:{d:`M19 9l-4 0l0 -4`},child:[]},{tag:`path`,attr:{d:`M15 9l6 -6`},child:[]},{tag:`path`,attr:{d:`M19 15l-4 0l0 4`},child:[]},{tag:`path`,attr:{d:`M15 15l6 6`},child:[]}]})(e)}function Ls(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M18 9l3 3l-3 3`},child:[]},{tag:`path`,attr:{d:`M15 12h6`},child:[]},{tag:`path`,attr:{d:`M6 9l-3 3l3 3`},child:[]},{tag:`path`,attr:{d:`M3 12h6`},child:[]},{tag:`path`,attr:{d:`M9 18l3 3l3 -3`},child:[]},{tag:`path`,attr:{d:`M12 15v6`},child:[]},{tag:`path`,attr:{d:`M15 6l-3 -3l-3 3`},child:[]},{tag:`path`,attr:{d:`M12 3v6`},child:[]}]})(e)}function Rs(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M21 17h-8l-3.5 -5h-6.5`},child:[]},{tag:`path`,attr:{d:`M21 7h-8l-3.495 5`},child:[]},{tag:`path`,attr:{d:`M18 10l3 -3l-3 -3`},child:[]},{tag:`path`,attr:{d:`M18 20l3 -3l-3 -3`},child:[]}]})(e)}function zs(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6`},child:[]},{tag:`path`,attr:{d:`M9 17v1a3 3 0 0 0 6 0v-1`},child:[]}]})(e)}function Bs(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M7 5h6a3.5 3.5 0 0 1 0 7h-6z`},child:[]},{tag:`path`,attr:{d:`M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7`},child:[]}]})(e)}function Vs(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11`},child:[]}]})(e)}function Hs(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M19 4v16h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12z`},child:[]},{tag:`path`,attr:{d:`M19 16h-12a2 2 0 0 0 -2 2`},child:[]},{tag:`path`,attr:{d:`M9 8h6`},child:[]}]})(e)}function Us(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M3 21l18 0`},child:[]},{tag:`path`,attr:{d:`M5 21v-14l8 -4v18`},child:[]},{tag:`path`,attr:{d:`M19 21v-10l-6 -4`},child:[]},{tag:`path`,attr:{d:`M9 9l0 .01`},child:[]},{tag:`path`,attr:{d:`M9 12l0 .01`},child:[]},{tag:`path`,attr:{d:`M9 15l0 .01`},child:[]},{tag:`path`,attr:{d:`M9 18l0 .01`},child:[]}]})(e)}function Ws(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M5 7h1a2 2 0 0 0 2 -2a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1a2 2 0 0 0 2 2h1a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2`},child:[]},{tag:`path`,attr:{d:`M9 13a3 3 0 1 0 6 0a3 3 0 0 0 -6 0`},child:[]}]})(e)}function Gs(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z`},child:[]},{tag:`path`,attr:{d:`M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z`},child:[]},{tag:`path`,attr:{d:`M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z`},child:[]},{tag:`path`,attr:{d:`M4 20h14`},child:[]}]})(e)}function Ks(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M4 19l16 0`},child:[]},{tag:`path`,attr:{d:`M4 15l4 -6l4 2l4 -5l4 4`},child:[]}]})(e)}function qs(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 3v9h9`},child:[]},{tag:`path`,attr:{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`},child:[]}]})(e)}function Js(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M5 12l5 5l10 -10`},child:[]}]})(e)}function Ys(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M6 9l6 6l6 -6`},child:[]}]})(e)}function Xs(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M15 6l-6 6l6 6`},child:[]}]})(e)}function Zs(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M9 6l6 6l-6 6`},child:[]}]})(e)}function Qs(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M6 15l6 -6l6 6`},child:[]}]})(e)}function $s(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M11 7l-5 5l5 5`},child:[]},{tag:`path`,attr:{d:`M17 7l-5 5l5 5`},child:[]}]})(e)}function ec(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M7 7l5 5l-5 5`},child:[]},{tag:`path`,attr:{d:`M13 7l5 5l-5 5`},child:[]}]})(e)}function tc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`},child:[]},{tag:`path`,attr:{d:`M9 12l2 2l4 -4`},child:[]}]})(e)}function nc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`},child:[]},{tag:`path`,attr:{d:`M10 10l4 4m0 -4l-4 4`},child:[]}]})(e)}function rc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`},child:[]}]})(e)}function ic(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2`},child:[]},{tag:`path`,attr:{d:`M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z`},child:[]}]})(e)}function ac(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`},child:[]},{tag:`path`,attr:{d:`M12 7v5l3 3`},child:[]}]})(e)}function oc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M7 8l-4 4l4 4`},child:[]},{tag:`path`,attr:{d:`M17 8l4 4l-4 4`},child:[]},{tag:`path`,attr:{d:`M14 4l-4 16`},child:[]}]})(e)}function sc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z`},child:[]},{tag:`path`,attr:{d:`M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1`},child:[]}]})(e)}function cc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M6 6v6a3 3 0 0 0 3 3h10l-4 -4m0 8l4 -4`},child:[]}]})(e)}function lc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2`},child:[]},{tag:`path`,attr:{d:`M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`},child:[]},{tag:`path`,attr:{d:`M14 4l0 4l-6 0l0 -4`},child:[]}]})(e)}function uc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M3 19l18 0`},child:[]},{tag:`path`,attr:{d:`M5 6m0 1a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1z`},child:[]}]})(e)}function dc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`},child:[]},{tag:`path`,attr:{d:`M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`},child:[]},{tag:`path`,attr:{d:`M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`},child:[]}]})(e)}function fc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`},child:[]},{tag:`path`,attr:{d:`M7 11l5 5l5 -5`},child:[]},{tag:`path`,attr:{d:`M12 4l0 12`},child:[]}]})(e)}function pc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M7.502 19.423c2.602 2.105 6.395 2.105 8.996 0c2.602 -2.105 3.262 -5.708 1.566 -8.546l-4.89 -7.26c-.42 -.625 -1.287 -.803 -1.936 -.397a1.376 1.376 0 0 0 -.41 .397l-4.893 7.26c-1.695 2.838 -1.035 6.441 1.567 8.546z`},child:[]}]})(e)}function mc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 19v.01`},child:[]},{tag:`path`,attr:{d:`M12 15v-10`},child:[]}]})(e)}function hc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6`},child:[]},{tag:`path`,attr:{d:`M11 13l9 -9`},child:[]},{tag:`path`,attr:{d:`M15 4h5v5`},child:[]}]})(e)}function gc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M10.585 10.587a2 2 0 0 0 2.829 2.828`},child:[]},{tag:`path`,attr:{d:`M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87`},child:[]},{tag:`path`,attr:{d:`M3 3l18 18`},child:[]}]})(e)}function _c(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0`},child:[]},{tag:`path`,attr:{d:`M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6`},child:[]}]})(e)}function vc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M14 3v4a1 1 0 0 0 1 1h4`},child:[]},{tag:`path`,attr:{d:`M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z`},child:[]}]})(e)}function yc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M8 4h12v2.172a2 2 0 0 1 -.586 1.414l-3.914 3.914m-.5 3.5v4l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227`},child:[]},{tag:`path`,attr:{d:`M3 3l18 18`},child:[]}]})(e)}function bc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z`},child:[]}]})(e)}function xc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`},child:[]},{tag:`path`,attr:{d:`M4 8v-2a2 2 0 0 1 2 -2h2`},child:[]},{tag:`path`,attr:{d:`M4 16v2a2 2 0 0 0 2 2h2`},child:[]},{tag:`path`,attr:{d:`M16 4h2a2 2 0 0 1 2 2v2`},child:[]},{tag:`path`,attr:{d:`M16 20h2a2 2 0 0 0 2 -2v-2`},child:[]}]})(e)}function Sc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M11 19h-6a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2.5`},child:[]},{tag:`path`,attr:{d:`M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`},child:[]},{tag:`path`,attr:{d:`M20.2 20.2l1.8 1.8`},child:[]}]})(e)}function Cc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2`},child:[]}]})(e)}function wc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`},child:[]},{tag:`path`,attr:{d:`M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`},child:[]},{tag:`path`,attr:{d:`M13.41 10.59l2.59 -2.59`},child:[]},{tag:`path`,attr:{d:`M7 12a5 5 0 0 1 5 -5`},child:[]}]})(e)}function Tc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`},child:[]},{tag:`path`,attr:{d:`M7 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`},child:[]},{tag:`path`,attr:{d:`M17 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`},child:[]},{tag:`path`,attr:{d:`M7 8v2a2 2 0 0 0 2 2h6a2 2 0 0 0 2 -2v-2`},child:[]},{tag:`path`,attr:{d:`M12 12l0 4`},child:[]}]})(e)}function Ec(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`},child:[]},{tag:`path`,attr:{d:`M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`},child:[]},{tag:`path`,attr:{d:`M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`},child:[]},{tag:`path`,attr:{d:`M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`},child:[]},{tag:`path`,attr:{d:`M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`},child:[]},{tag:`path`,attr:{d:`M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`},child:[]}]})(e)}function Dc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`},child:[]},{tag:`path`,attr:{d:`M12 17l0 .01`},child:[]},{tag:`path`,attr:{d:`M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4`},child:[]}]})(e)}function Oc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`},child:[]},{tag:`path`,attr:{d:`M12 9h.01`},child:[]},{tag:`path`,attr:{d:`M11 12h1v4h1`},child:[]}]})(e)}function kc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M11 5l6 0`},child:[]},{tag:`path`,attr:{d:`M7 19l6 0`},child:[]},{tag:`path`,attr:{d:`M14 5l-4 14`},child:[]}]})(e)}function Ac(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0z`},child:[]},{tag:`path`,attr:{d:`M15 9h.01`},child:[]}]})(e)}function jc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z`},child:[]},{tag:`path`,attr:{d:`M12 4l0 16`},child:[]}]})(e)}function Mc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z`},child:[]},{tag:`path`,attr:{d:`M4 12l16 0`},child:[]}]})(e)}function Nc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M7 3m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z`},child:[]},{tag:`path`,attr:{d:`M4.012 7.26a2.005 2.005 0 0 0 -1.012 1.737v10c0 1.1 .9 2 2 2h10c.75 0 1.158 -.385 1.5 -1`},child:[]},{tag:`path`,attr:{d:`M11 10h6`},child:[]}]})(e)}function Pc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M7 3m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z`},child:[]},{tag:`path`,attr:{d:`M4.012 7.26a2.005 2.005 0 0 0 -1.012 1.737v10c0 1.1 .9 2 2 2h10c.75 0 1.158 -.385 1.5 -1`},child:[]},{tag:`path`,attr:{d:`M11 10h6`},child:[]},{tag:`path`,attr:{d:`M14 7v6`},child:[]}]})(e)}function Fc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M9 15l3 -3m2 -2l1 -1`},child:[]},{tag:`path`,attr:{d:`M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464`},child:[]},{tag:`path`,attr:{d:`M3 3l18 18`},child:[]},{tag:`path`,attr:{d:`M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463`},child:[]}]})(e)}function Ic(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M9 15l6 -6`},child:[]},{tag:`path`,attr:{d:`M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464`},child:[]},{tag:`path`,attr:{d:`M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463`},child:[]}]})(e)}function Lc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M11 6h9`},child:[]},{tag:`path`,attr:{d:`M11 12h9`},child:[]},{tag:`path`,attr:{d:`M12 18h8`},child:[]},{tag:`path`,attr:{d:`M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4`},child:[]},{tag:`path`,attr:{d:`M6 10v-6l-2 2`},child:[]}]})(e)}function Rc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M9 6l11 0`},child:[]},{tag:`path`,attr:{d:`M9 12l11 0`},child:[]},{tag:`path`,attr:{d:`M9 18l11 0`},child:[]},{tag:`path`,attr:{d:`M5 6l0 .01`},child:[]},{tag:`path`,attr:{d:`M5 12l0 .01`},child:[]},{tag:`path`,attr:{d:`M5 18l0 .01`},child:[]}]})(e)}function zc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 3a9 9 0 1 0 9 9`},child:[]}]})(e)}function Bc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M5 11m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z`},child:[]},{tag:`path`,attr:{d:`M12 16m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`},child:[]},{tag:`path`,attr:{d:`M8 11v-5a4 4 0 0 1 8 0`},child:[]}]})(e)}function Vc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z`},child:[]},{tag:`path`,attr:{d:`M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`},child:[]},{tag:`path`,attr:{d:`M8 11v-4a4 4 0 1 1 8 0v4`},child:[]}]})(e)}function Hc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0`},child:[]},{tag:`path`,attr:{d:`M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z`},child:[]}]})(e)}function Uc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M3 20l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c3.255 2.777 3.695 7.266 1.029 10.501c-2.666 3.235 -7.615 4.215 -11.574 2.293l-4.7 1`},child:[]}]})(e)}function Wc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M5 12l14 0`},child:[]}]})(e)}function Gc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z`},child:[]}]})(e)}function Kc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z`},child:[]},{tag:`path`,attr:{d:`M8 4l0 16`},child:[]},{tag:`path`,attr:{d:`M16 4l0 16`},child:[]},{tag:`path`,attr:{d:`M4 8l4 0`},child:[]},{tag:`path`,attr:{d:`M4 16l4 0`},child:[]},{tag:`path`,attr:{d:`M4 12l16 0`},child:[]},{tag:`path`,attr:{d:`M16 8l4 0`},child:[]},{tag:`path`,attr:{d:`M16 16l4 0`},child:[]}]})(e)}function qc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M13 20l7 -7`},child:[]},{tag:`path`,attr:{d:`M13 20v-6a1 1 0 0 1 1 -1h6v-7a2 2 0 0 0 -2 -2h-12a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7`},child:[]}]})(e)}function Jc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4`},child:[]},{tag:`path`,attr:{d:`M13.5 6.5l4 4`},child:[]}]})(e)}function Yc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z`},child:[]},{tag:`path`,attr:{d:`M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z`},child:[]}]})(e)}function Xc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M7 4v16l13 -8z`},child:[]}]})(e)}function Zc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M20 5v14l-12 -7z`},child:[]},{tag:`path`,attr:{d:`M4 5l0 14`},child:[]}]})(e)}function Qc(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M4 5v14l12 -7z`},child:[]},{tag:`path`,attr:{d:`M20 5l0 14`},child:[]}]})(e)}function $c(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M5 5m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z`},child:[]}]})(e)}function el(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M3 5v14l8 -7z`},child:[]},{tag:`path`,attr:{d:`M14 5v14l8 -7z`},child:[]}]})(e)}function tl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M21 5v14l-8 -7z`},child:[]},{tag:`path`,attr:{d:`M10 5v14l-8 -7z`},child:[]}]})(e)}function nl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 5l0 14`},child:[]},{tag:`path`,attr:{d:`M5 12l14 0`},child:[]}]})(e)}function rl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M8 8a3.5 3 0 0 1 3.5 -3h1a3.5 3 0 0 1 3.5 3a3 3 0 0 1 -2 3a3 4 0 0 0 -2 4`},child:[]},{tag:`path`,attr:{d:`M12 19l0 .01`},child:[]}]})(e)}function il(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4`},child:[]},{tag:`path`,attr:{d:`M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4`},child:[]}]})(e)}function al(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747`},child:[]},{tag:`path`,attr:{d:`M20 4v5h-5`},child:[]}]})(e)}function ol(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M19.95 11a8 8 0 1 0 -.5 4m.5 5v-5h-5`},child:[]}]})(e)}function sl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M20 6v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1z`},child:[]},{tag:`path`,attr:{d:`M12 15l0 4`},child:[]},{tag:`path`,attr:{d:`M14 17l-4 0`},child:[]}]})(e)}function cl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M4 18v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1z`},child:[]},{tag:`path`,attr:{d:`M12 9v-4`},child:[]},{tag:`path`,attr:{d:`M10 7l4 0`},child:[]}]})(e)}function ll(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M19.875 8c.621 0 1.125 .512 1.125 1.143v5.714c0 .631 -.504 1.143 -1.125 1.143h-15.875a1 1 0 0 1 -1 -1v-5.857c0 -.631 .504 -1.143 1.125 -1.143h15.75z`},child:[]},{tag:`path`,attr:{d:`M9 8v2`},child:[]},{tag:`path`,attr:{d:`M6 8v3`},child:[]},{tag:`path`,attr:{d:`M12 8v3`},child:[]},{tag:`path`,attr:{d:`M18 8v3`},child:[]},{tag:`path`,attr:{d:`M15 8v2`},child:[]}]})(e)}function ul(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M7 20l10 0`},child:[]},{tag:`path`,attr:{d:`M6 6l6 -1l6 1`},child:[]},{tag:`path`,attr:{d:`M12 3l0 17`},child:[]},{tag:`path`,attr:{d:`M9 12l-3 -6l-3 6a3 3 0 0 0 6 0`},child:[]},{tag:`path`,attr:{d:`M21 12l-3 -6l-3 6a3 3 0 0 0 6 0`},child:[]}]})(e)}function dl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`},child:[]},{tag:`path`,attr:{d:`M21 21l-6 -6`},child:[]}]})(e)}function fl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z`},child:[]},{tag:`path`,attr:{d:`M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z`},child:[]},{tag:`path`,attr:{d:`M7 8l0 .01`},child:[]},{tag:`path`,attr:{d:`M7 16l0 .01`},child:[]}]})(e)}function pl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z`},child:[]},{tag:`path`,attr:{d:`M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0`},child:[]}]})(e)}function ml(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M4 6l7 0`},child:[]},{tag:`path`,attr:{d:`M4 12l7 0`},child:[]},{tag:`path`,attr:{d:`M4 18l9 0`},child:[]},{tag:`path`,attr:{d:`M15 9l3 -3l3 3`},child:[]},{tag:`path`,attr:{d:`M18 6l0 12`},child:[]}]})(e)}function hl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M4 6l9 0`},child:[]},{tag:`path`,attr:{d:`M4 12l7 0`},child:[]},{tag:`path`,attr:{d:`M4 18l7 0`},child:[]},{tag:`path`,attr:{d:`M15 15l3 3l3 -3`},child:[]},{tag:`path`,attr:{d:`M18 6l0 12`},child:[]}]})(e)}function gl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M9 12h6`},child:[]},{tag:`path`,attr:{d:`M12 9v6`},child:[]},{tag:`path`,attr:{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z`},child:[]}]})(e)}function _l(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z`},child:[]}]})(e)}function vl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`},child:[]},{tag:`path`,attr:{d:`M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7`},child:[]}]})(e)}function yl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z`},child:[]},{tag:`path`,attr:{d:`M3 10h18`},child:[]},{tag:`path`,attr:{d:`M10 3v18`},child:[]}]})(e)}function bl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`},child:[]},{tag:`path`,attr:{d:`M12 12m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0`},child:[]},{tag:`path`,attr:{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`},child:[]}]})(e)}function xl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M4 7l16 0`},child:[]},{tag:`path`,attr:{d:`M10 11l0 6`},child:[]},{tag:`path`,attr:{d:`M14 11l0 6`},child:[]},{tag:`path`,attr:{d:`M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12`},child:[]},{tag:`path`,attr:{d:`M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3`},child:[]}]})(e)}function Sl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`},child:[]},{tag:`path`,attr:{d:`M7 9l5 -5l5 5`},child:[]},{tag:`path`,attr:{d:`M12 4l0 12`},child:[]}]})(e)}function Cl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0`},child:[]},{tag:`path`,attr:{d:`M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2`},child:[]}]})(e)}function wl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`},child:[]},{tag:`path`,attr:{d:`M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2`},child:[]},{tag:`path`,attr:{d:`M16 3.13a4 4 0 0 1 0 7.75`},child:[]},{tag:`path`,attr:{d:`M21 21v-2a4 4 0 0 0 -3 -3.85`},child:[]}]})(e)}function Tl(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M18 6l-12 12`},child:[]},{tag:`path`,attr:{d:`M6 6l12 12`},child:[]}]})(e)}function El(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function Dl(e,t){e.classList?e.classList.add(t):El(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function Ol(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function kl(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=Ol(e.className,t):e.setAttribute(`class`,Ol(e.className&&e.className.baseVal||``,t))}var Al={disabled:!1},jl=N.createContext(null),Ml=function(e){return e.scrollTop};Vo();var Nl=i(o()),Pl=`unmounted`,Fl=`exited`,Il=`entering`,Ll=`entered`,Rl=`exiting`,zl=function(e){Go(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=Fl,r.appearStatus=Il):o=Ll:o=t.unmountOnExit||t.mountOnEnter?Pl:Fl,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:Fl}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=Il):(n===`entering`||n===`entered`)&&(t=Rl)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Nl.findDOMNode(this);n&&Ml(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:Pl})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Nl.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||Al.disabled){this.safeSetState({status:Ll},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:Il},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:Ll},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Nl.findDOMNode(this);if(!t||Al.disabled){this.safeSetState({status:Fl},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:Rl},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Fl},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Nl.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Bo(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return N.createElement(jl.Provider,{value:null},typeof n==`function`?n(e,r):N.cloneElement(N.Children.only(n),r))},t}(N.Component);zl.contextType=jl,zl.propTypes={};function Bl(){}zl.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Bl,onEntering:Bl,onEntered:Bl,onExit:Bl,onExiting:Bl,onExited:Bl},zl.UNMOUNTED=Pl,zl.EXITED=Fl,zl.ENTERING=Il,zl.ENTERED=Ll,zl.EXITING=Rl;var Yee=zl;Uo(),Vo();var Xee=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Dl(e,t)})},Vl=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return kl(e,t)})},Hl=function(e){Go(t,e);function t(){var t,n=[...arguments];return t=e.call.apply(e,[this].concat(n))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&Ml(e),r&&(this.appliedClasses[t][n]=r,Xee(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&Vl(e,r),i&&Vl(e,i),a&&Vl(e,a)},n.render=function(){var e=this.props;e.classNames;var t=Bo(e,[`classNames`]);return N.createElement(Yee,Ho({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(N.Component);Hl.defaultProps={classNames:``},Hl.propTypes={};var Ul=Hl;function Wl(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var Gl=(function(){if(typeof Map<`u`)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t?(n=r,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,`size`,{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){t===void 0&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()})(),Kl=typeof window<`u`&&typeof document<`u`&&window.document===document,ql=(function(){return typeof global<`u`&&global.Math===Math?global:typeof self<`u`&&self.Math===Math?self:typeof window<`u`&&window.Math===Math?window:Function(`return this`)()})(),Zee=(function(){return typeof requestAnimationFrame==`function`?requestAnimationFrame.bind(ql):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),Qee=2;function $ee(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&s()}function o(){Zee(a)}function s(){var e=Date.now();if(n){if(e-i<Qee)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return s}var ete=20,tte=[`top`,`right`,`bottom`,`left`,`width`,`height`,`size`,`weight`],nte=typeof MutationObserver<`u`,rte=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=$ee(this.refresh.bind(this),ete)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){!Kl||this.connected_||(document.addEventListener(`transitionend`,this.onTransitionEnd_),window.addEventListener(`resize`,this.refresh),nte?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener(`DOMSubtreeModified`,this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!Kl||!this.connected_||(document.removeEventListener(`transitionend`,this.onTransitionEnd_),window.removeEventListener(`resize`,this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener(`DOMSubtreeModified`,this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=t===void 0?``:t;tte.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||=new e,this.instance_},e.instance_=null,e}(),Jl=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e}),Yl=(function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||ql}),Xl=$l(0,0,0,0);function Zl(e){return parseFloat(e)||0}function Ql(e){return[...arguments].slice(1).reduce(function(t,n){var r=e[`border-`+n+`-width`];return t+Zl(r)},0)}function ite(e){for(var t=[`top`,`right`,`bottom`,`left`],n={},r=0,i=t;r<i.length;r++){var a=i[r],o=e[`padding-`+a];n[a]=Zl(o)}return n}function ate(e){var t=e.getBBox();return $l(0,0,t.width,t.height)}function ote(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Xl;var r=Yl(e).getComputedStyle(e),i=ite(r),a=i.left+i.right,o=i.top+i.bottom,s=Zl(r.width),c=Zl(r.height);if(r.boxSizing===`border-box`&&(Math.round(s+a)!==t&&(s-=Ql(r,`left`,`right`)+a),Math.round(c+o)!==n&&(c-=Ql(r,`top`,`bottom`)+o)),!cte(e)){var l=Math.round(s+a)-t,u=Math.round(c+o)-n;Math.abs(l)!==1&&(s-=l),Math.abs(u)!==1&&(c-=u)}return $l(i.left,i.top,s,c)}var ste=(function(){return typeof SVGGraphicsElement<`u`?function(e){return e instanceof Yl(e).SVGGraphicsElement}:function(e){return e instanceof Yl(e).SVGElement&&typeof e.getBBox==`function`}})();function cte(e){return e===Yl(e).document.documentElement}function lte(e){return Kl?ste(e)?ate(e):ote(e):Xl}function ute(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=typeof DOMRectReadOnly<`u`?DOMRectReadOnly:Object,o=Object.create(a.prototype);return Jl(o,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),o}function $l(e,t,n,r){return{x:e,y:t,width:n,height:r}}var dte=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=$l(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=lte(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),fte=function(){function e(e,t){var n=ute(t);Jl(this,{target:e,contentRect:n})}return e}(),pte=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new Gl,typeof e!=`function`)throw TypeError(`The callback provided as parameter 1 is not a function.`);this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(!(typeof Element>`u`||!(Element instanceof Object))){if(!(e instanceof Yl(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)||(t.set(e,new dte(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(!(typeof Element>`u`||!(Element instanceof Object))){if(!(e instanceof Yl(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new fte(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),eu=typeof WeakMap<`u`?new WeakMap:new Gl,tu=function(){function e(t){if(!(this instanceof e))throw TypeError(`Cannot call a class as a function.`);if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);var n=new pte(t,rte.getInstance(),this);eu.set(this,n)}return e}();[`observe`,`unobserve`,`disconnect`].forEach(function(e){tu.prototype[e]=function(){var t;return(t=eu.get(this))[e].apply(t,arguments)}});var nu=(function(){return ql.ResizeObserver===void 0?tu:ql.ResizeObserver})(),mte=!0;function hte(e,t){if(!mte){if(e)return;var n=`Warning: `+t;typeof console<`u`&&console.warn(n);try{throw Error(n)}catch{}}}var gte=hte;function ru(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function iu(e,t,n){return t&&ru(e.prototype,t),n&&ru(e,n),e}function au(){return au=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},au.apply(this,arguments)}function _te(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ou(e,t)}function ou(e,t){return ou=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ou(e,t)}function vte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function yte(e,t){if(e){if(typeof e==`string`)return su(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return su(e,t)}}function su(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function cu(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=yte(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lu(e){var t=(0,N.useRef)(null);function n(n){!n||n===t.current||(t.current=n,e(n))}return n}function bte(e){var t=(0,N.useRef)(e);return(0,N.useMemo)(function(){function e(e){typeof e==`function`?t.current=e(t.current):t.current=e}function n(){return t.current}return[n,e]},[])}function xte(){var e=(0,N.useRef)([]);return(0,N.useMemo)(function(){function t(){return e.current.length>0}function n(){for(var t=cu(e.current),n;!(n=t()).done;){var r=n.value;r()}e.current=[]}function r(t){e.current.push(t)}return{hasEventSubscriptions:t,removeAllEventSubscriptions:n,addEventSubscription:r}},[])}var uu=typeof window<`u`?N.useLayoutEffect:N.useEffect;function Ste(e,t){var n=(0,N.useRef)(e);return t?(n.current=e,n):(n.current=null,n)}var du={top:0,left:0,right:1,bottom:1,width:1,height:1};function Cte(e){var t=e===void 0?{}:e,n=t.enabled,r=n===void 0?!0:n,i=t.preventDefault,a=i===void 0?!0:i,o=(0,N.useRef)(null),s=(0,N.useState)(du),c=s[0],l=s[1];function u(){l(du)}var d=c!==du;function f(e){if(r){a&&e.preventDefault();var t=e.clientX,n=e.clientY;l({top:n,left:t,width:1,height:1,right:t+1,bottom:n+1})}}return{hasMousePosition:d,resetMousePosition:u,handleMouseEvent:f,trigger:{getBounds:function(){return c},getParent:o.current?function(){return o.current}:void 0},parentRef:o}}function fu(e){return parseFloat(e.replace(`px`,``))}function pu(e,t,n){return e<t?t:e>n?n:e}function mu(e){return e!=null}function hu(){var e=[...arguments];return function(t){for(var n=cu(e),r;!(r=n()).done;){var i=r.value;i&&(typeof i==`function`?i(t):i.current=t)}}}function gu(e,t){if(e!==void 0)return t||e.ResizeObserver}function _u(e,t){var n=[];if(!e||!t||e===document.body)return n;var r=t.getComputedStyle(e);return[r.overflow,r.overflowX,r.overflowY].some(function(e){return[`auto`,`scroll`].includes(e)})&&n.push(e),[].concat(n,_u(e.parentElement,t))}function vu(e){return`react-laag: Could not find a valid reference for the `+e+` element. There might be 2 causes:
4
- - Make sure that the 'ref' is set correctly on the `+e+` element when isOpen: true. Also make sure your component forwards the ref with "forwardRef()".
5
- - Make sure that you are actually rendering the `+e+` when the isOpen prop is set to true`}function yu(e){var t=e.enabled,n=e.onChange,r=e.environment,i=e.ResizeObserverPolyfill,a=e.overflowContainer,o=e.triggerOption,s=gu(r,i);(0,N.useEffect)(function(){},[s]);var c=(0,N.useRef)(null),l=!!o,u=bte({scrollContainers:[],trigger:null,layer:null}),d=u[0],f=u[1],p=xte(),m=p.hasEventSubscriptions,h=p.addEventSubscription,g=p.removeAllEventSubscriptions,_=(0,N.useCallback)(function(){var e=d(),t=e.layer,i=e.trigger,a=e.scrollContainers,o=a[0];if(!t)throw Error(vu(`layer`));if(!i&&!l)throw Error(vu(`trigger`));var s={top:0,left:0};if(o){var u=o.scrollLeft;s={top:o.scrollTop,left:u}}else{var f=r.scrollX;s={top:r.scrollY,left:f}}var p={left:0,top:0};if(o){var m=r.getComputedStyle(o),h=m.borderLeftWidth,g=m.borderTopWidth;p={left:fu(h)||0,top:fu(g)||0}}n({layer:t,trigger:i,scrollContainers:a,arrow:c.current},s,p)},[d,n,r,c,l]),v=(0,N.useCallback)(function(){var e=d(),t=e.trigger,n=e.layer,i=e.scrollContainers;if(!n)throw Error(vu(`layer`));if(!t&&!l)throw Error(vu(`trigger`));if(s){for(var a=!1,o=new s(function(){if(!a){a=!0;return}_()}),c=0,u=[t,n,document.body];c<u.length;c++){var f=u[c];f&&o.observe(f)}h(function(){for(var e=0,r=[t,n,document.body];e<r.length;e++){var i=r[e];i&&o.unobserve(i)}o.disconnect()})}for(var p=[r].concat(i),m=function(){var e=v.value;e.addEventListener(`scroll`,_),h(function(){return e.removeEventListener(`scroll`,_)})},g=cu(p),v;!(v=g()).done;)m()},[d,h,_,r,s,l]),y=(0,N.useCallback)(function(e,n){t&&e&&e!==n&&(g(),v(),_())},[g,v,_,t]),b=lu((0,N.useCallback)(function(e){var t=d().layer;f(function(t){return au({},t,{layer:e})}),y(t,e)},[d,f,y])),x=(0,N.useCallback)(function(e){var t=_u(e,r),n=t[0];if(n){var i=r.getComputedStyle(n).position;[`relative`,`absolute`,`fixed`].includes(i)||a||(n.style.position=`relative`)}return t},[r,a]),S=lu((0,N.useCallback)(function(e){var t=x(e),n=d().trigger;f(function(n){return au({},n,{trigger:e,scrollContainers:t})}),y(n,e)},[d,f,y,x])),C=o==null||o.getParent==null?void 0:o.getParent();return uu(function(){C&&f(function(e){return au({},e,{scrollContainers:x(C)})})},[C,f,x]),uu(function(){return t&&(m()||v()),function(){m()&&g()}},[t,m,v,g]),uu(function(){t&&_()}),{triggerRef:S,layerRef:b,arrowRef:c,closestScrollContainer:d().scrollContainers[0]||null}}var bu=(0,N.createContext)({});function xu(e){var t=e.children,n=e.registrations,r=(0,N.useCallback)(function(e){return n.current.add(e),function(){return n.current.delete(e)}},[n]);return(0,N.createElement)(bu.Provider,{value:r},t)}function Su(e,t){for(var n=cu(e),r;!(r=n()).done;){var i=r.value.shouldCloseWhenClickedOutside;if(!i(t))return!1}return!0}function Cu(e){var t=e.isOpen,n=e.onOutsideClick,r=e.onParentClose,i=(0,N.useRef)(null),a=(0,N.useRef)(null),o=(0,N.useRef)(new Set),s=(0,N.useContext)(bu),c=(0,N.useCallback)(function(e){var t=e.target,n=i.current&&i.current.contains(t),r=a.current&&a.current.contains(t),s=Su(o.current,e);return r&&s&&o.current.forEach(function(e){var t=e.closeChild;return t()}),!n&&!r&&s},[i,a,o]);return(0,N.useEffect)(function(){if(typeof s==`function`)return s({shouldCloseWhenClickedOutside:c,closeChild:function(){r&&r()}})},[s,c,r,o]),(0,N.useEffect)(function(){if(!t||!n||typeof s==`function`)return;function e(e){c(e)&&n()}return document.addEventListener(`click`,e,!0),function(){return document.removeEventListener(`click`,e,!0)}},[t,n,c,s]),(0,N.useEffect)(function(){t||o.current.forEach(function(e){var t=e.closeChild;return t()})},[t]),{closeOnOutsideClickRefs:{trigger:i,layer:a},registrations:o}}var wu=[`bottom-start`,`bottom-end`,`bottom-center`,`top-start`,`top-center`,`top-end`,`left-end`,`left-center`,`left-start`,`right-end`,`right-center`,`right-start`,`center`],Tu={top:`bottom`,left:`right`,bottom:`top`,right:`left`,center:`center`},Eu=function(){function e(e,t,n,r,i,a,o,s,c){this.prop=void 0,this.opposite=void 0,this.isHorizontal=void 0,this.sizeProp=void 0,this.oppositeSizeProp=void 0,this.cssProp=void 0,this.oppositeCssProp=void 0,this.isCenter=void 0,this.isPush=void 0,this.prop=e,this.opposite=t,this.isHorizontal=n,this.sizeProp=r,this.oppositeSizeProp=i,this.cssProp=a,this.oppositeCssProp=o,this.isCenter=s,this.isPush=c}var t=e.prototype;return t.factor=function(e){return e*(this.isPush?1:-1)},t.isOppositeDirection=function(e){return this.isHorizontal!==e.isHorizontal},e}();function Du(e,t){t===void 0&&(t=!0);var n=[`left`,`right`].includes(e);return new Eu(e,t?Du(Tu[e],!1):null,n,n?`width`:`height`,n?`height`:`width`,n?`left`:`top`,n?`top`:`left`,e===`center`,![`right`,`bottom`].includes(e))}var Ou={top:Du(`top`),bottom:Du(`bottom`),left:Du(`left`),right:Du(`right`)},ku=au({},Ou,{center:Du(`center`)}),Au=[`top`,`left`,`bottom`,`right`],ju=function(){function e(e){return this.top=void 0,this.left=void 0,this.right=void 0,this.bottom=void 0,Object.assign(this,e)}return e.mergeSmallestSides=function(t){var n=t[0],r=t.slice(1);if(!n)throw Error(`Please provide at least 1 bounds objects in order to merge`);for(var i=Object.fromEntries(Au.map(function(e){return[e,n[e]]})),a=cu(r),o;!(o=a()).done;)for(var s=o.value,c=cu(Au),l;!(l=c()).done;){var u=l.value;i[u]=Math.min(i[u],s[u])}return new e(i)},iu(e,[{key:`allSidesArePositive`,get:function(){var e=this;return Au.every(function(t){return e[t]>=0})}},{key:`negativeSides`,get:function(){var e=this;return Object.fromEntries(Au.filter(function(t){return e[t]<0}).map(function(t){return[t,e[t]]}))}}]),e}();function Mu(){return[...arguments].reduce(function(e,t){return e+(t?fu(t):0)},0)}function Nu(e){return{top:e.top,left:e.left,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}var Pu={top:0,left:0,right:0,bottom:0,width:0,height:0},Fu=function(){e.create=function(t){return new e(t)},e.fromElement=function(t,n){n===void 0&&(n={});var r=n,i=r.withTransform,a=i===void 0?!0:i,o=r.environment,s=o===void 0?window:o,c=r.withScrollbars,l=c===void 0?!0:c,u=new e(Nu(t.getBoundingClientRect()));if(!a){var d=s.getComputedStyle(t),f=d.width,p=d.height,m=d.boxSizing,h=d.borderLeft,g=d.borderRight,_=d.borderTop,v=d.borderBottom,y=d.paddingLeft,b=d.paddingRight,x=d.paddingTop,S=d.paddingBottom,C=m===`border-box`?fu(f):Mu(f,h,g,y,b),w=m===`border-box`?fu(p):Mu(p,_,v,x,S);u=new e(au({},u,{width:C,height:w}))}if(!l){var T=u.width-t.clientWidth,E=u.height-t.clientHeight;return u.substract({right:T,bottom:E})}return u},e.empty=function(){return new e},e.fromWindow=function(t){var n=t?.document.scrollingElement??t?.document.documentElement??{},r=n.clientWidth,i=r===void 0?0:r,a=n.clientHeight,o=a===void 0?0:a;return new e({width:i,height:o,right:i,bottom:o})};function e(e){return e===void 0&&(e={}),this.top=void 0,this.left=void 0,this.right=void 0,this.bottom=void 0,this.width=void 0,this.height=void 0,Object.assign(this,Pu,e)}var t=e.prototype;return t.toObject=function(){return Nu(this)},t.merge=function(t){var n=this.toObject();return new e(au({},n,typeof t==`function`?t(n):t))},t.substract=function(t){for(var n=this.toObject(),r=Object.entries(t),i=0,a=r;i<a.length;i++){var o=a[i],s=o[0],c=o[1];if(s in Ou){var l=Ou[s];n[s]+=l.factor(c),n[l.isHorizontal?`width`:`height`]-=c}else n[s]-=c||0}return new e(n)},t.offsetsTo=function(e){return new ju({top:e.top-this.top,bottom:this.bottom-e.bottom,left:e.left-this.left,right:this.right-e.right})},t.mapSides=function(t){for(var n=this.toObject(),r=Object.values(Ou),i=0,a=r;i<a.length;i++){var o=a[i];n[o.prop]=t(o,n[o.prop])}return new e(n)},iu(e,[{key:`surface`,get:function(){return this.width*this.height}}]),e}(),Iu=function(){function e(e,t,n,r,i){this.primary=void 0,this.secondary=void 0,this.offsets=void 0,this.subjectsBounds=void 0,this._cachedLayerBounds=null,this._cachedContainerOffsets=null,this.primary=e,this.secondary=t,this.offsets=i,this.setSubjectsBounds(n,r)}var t=e.prototype;return t.setSubjectsBounds=function(e,t){if(!t){this.subjectsBounds=e;return}var n=typeof t==`function`?t(this.primary.prop):t;this.subjectsBounds=e.merge({layer:au({},e.layer,n)})},t.getLayerBounds=function(e){if(e===void 0&&(e=0),this._cachedLayerBounds&&e===0)return this._cachedLayerBounds;var t=this.primary,n=this.secondary,r=this.subjectsBounds,i=r.trigger,a=r.layer,o=r.arrow,s=t.isHorizontal,c=t.oppositeCssProp,l=t.oppositeSizeProp,u=t.prop,d=t.opposite,f=Fu.empty();f[d.prop]=i[u]-t.factor(this.offsets.trigger),f[u]=f[d.prop]-t.factor(a[t.sizeProp]);var p=this.offsets.arrow*2,m=i[c]-(a[l]-o[l])+p,h=i[c]+(i[l]-o[l])-p;if(n.isPush||(m+=a[l],h+=a[l]),n.isCenter){var g=(s?Ou.top:Ou.left).prop,_=(s?Ou.bottom:Ou.right).prop;f[g]=pu(i[g]+i[l]/2-a[l]/2+e,m,h),f[_]=f[g]+a[l]}else{var v=n,y=i[v.prop],b=y<m?m-y:y>h?h-y:0;f[v.prop]=pu(y+e+b,m,h),f[v.opposite.prop]=f[v.prop]+n.factor(a[l])}f.width=f.right-f.left,f.height=f.bottom-f.top;var x=Fu.create(f);return e===0&&(this._cachedLayerBounds=x),x},t.getLayerCollisionBounds=function(){var e=this.offsets.container;return this.getLayerBounds().mapSides(function(t,n){return n-=t.factor(e)}).merge(function(t){var n=t.width,r=t.height;return{width:n+e*2,height:r+e*2}})},t.getContainerOffsets=function(e){if(this._cachedContainerOffsets&&!e)return this._cachedContainerOffsets;var t=this.subjectsBounds.merge({layer:e||this.getLayerCollisionBounds()}),n=ju.mergeSmallestSides(t.layerOffsetsToScrollContainers);return e||(this._cachedContainerOffsets=n),n},iu(e,[{key:`type`,get:function(){return this.primary.prop+`-`+(this.secondary.prop===`center`?`center`:[`bottom`,`right`].includes(this.secondary.prop)?`end`:`start`)}},{key:`triggerIsBigger`,get:function(){var e=this.secondary.isHorizontal,t=this.subjectsBounds,n=t.triggerHasBiggerWidth,r=t.triggerHasBiggerHeight;return e&&n||!e&&r}},{key:`fitsContainer`,get:function(){return this.getContainerOffsets().allSidesArePositive}},{key:`visibleSurface`,get:function(){var e=this.getLayerBounds(),t=this.getContainerOffsets(e).negativeSides;for(var n in t)t[n]=-t[n];return e.substract(t).surface}},{key:`secondaryOffsetSide`,get:function(){var e=this,t=this.getContainerOffsets();return(Object.entries(t.negativeSides).map(function(e){var t=e[0],n=e[1];return[Ou[t],n]}).filter(function(t){var n=t[0];return e.primary.isOppositeDirection(n)}).sort(function(e,t){var n=e[1];return t[1]-n})?.[0]??[])[0]||null}}]),e}(),Lu=function(e){_te(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.getLayerBounds=function(){var e=this.subjectsBounds,t=e.trigger,n=e.layer,r=Fu.empty();return r.top=t.top+t.height/2-n.height/2,r.bottom=r.top+n.height,r.left=t.left+t.width/2-n.width/2,r.right=r.left+n.width,r.width=r.right-r.left,r.height=r.bottom-r.top,r},t}(Iu);function Ru(e,t,n){var r=e.layer,i=e.trigger,a=e.arrow,o=t.primary.oppositeSizeProp,s=t.primary.isHorizontal?[`top`,`bottom`]:[`left`,`right`],c=s[0],l=s[1],u=r[c]+r[o]/2-i[c]-a[o]/2-n,d=r[l]-r[o]/2-i[l]+a[o]/2+n;return(u<0?-u:0)+(d>0?-d:0)}var zu={position:`absolute`,willChange:`top, left`,left:null,right:null,top:null,bottom:null};function Bu(e,t,n){var r;if(t.primary.isCenter)return zu;var i=e.layer,a=e.trigger,o=e.arrow,s=t.primary.oppositeSizeProp,c=a[s]>i[s],l=n+o[s]/2,u=i[s]-o[s]/2-n,d=Ru(e,t,n),f=t.primary.prop,p=t.primary.oppositeCssProp,m=c?i[s]/2+d:a[p]+a[s]/2-i[p];return au({},zu,(r={},r[f]=`100%`,r[p]=pu(m,l,u),r))}var Vu=function(){function e(e,t,n){this.placements=void 0,this.config=void 0,this.subjectsBounds=void 0,this.placements=e,this.config=t,this.subjectsBounds=n}e.getSidesFromPlacementType=function(e){var t=e.split(`-`),n=t[0],r=t[1],i=Ou[n];return[i,r===`center`?ku.center:i.isHorizontal?r===`start`?ku.top:ku.bottom:r===`start`?ku.left:ku.right]},e.create=function(t,n){var r={arrow:n.arrowOffset,container:n.containerOffset,trigger:n.triggerOffset};function i(i){i===void 0&&(i=n.placement);var a=e.getSidesFromPlacementType(i),o=a[0],s=a[1],c=Ou[o.isHorizontal?n.preferY:n.preferX],l=!o.isHorizontal&&t.triggerHasBiggerWidth||o.isHorizontal&&t.triggerHasBiggerHeight;function u(e,i){return new Iu(e,i,t,n.layerDimensions,r)}var d=[];return d[0]=u(o,s),d[1]=u(o,s.isCenter?c:ku.center),d[2]=u(o,ku[(s.opposite.isCenter?c.opposite:s.opposite).prop]),d[3]=u(c,l?o:ku[o.opposite.prop]),d[4]=u(c,ku.center),d[5]=u(c,l?ku[o.opposite.prop]:o),d[6]=u(Ou[c.opposite.prop],l?o:ku[o.opposite.prop]),d[7]=u(Ou[c.opposite.prop],ku.center),d[8]=u(Ou[c.opposite.prop],l?ku[o.opposite.prop]:o),d[9]=u(Ou[o.opposite.prop],s),d[10]=u(Ou[o.opposite.prop],s.isCenter?c:ku.center),d[11]=u(Ou[o.opposite.prop],ku[(s.opposite.isCenter?c.opposite:s.opposite).prop]),d=d.filter(function(e){return e.type===n.placement||n.possiblePlacements.includes(e.type)}),d}return n.placement===`center`?new e([new Lu(ku.center,ku.center,t,n.layerDimensions,r)].concat(i(n.preferY+`-`+n.preferX)),n,t):new e(i(),n,t)};var t=e.prototype;return t.filterPlacementsBySide=function(e){return this.placements.filter(function(t){return t.primary===e})},t.findFirstPlacementThatFits=function(){return this.placements.find(function(e){return e.fitsContainer})},t.placementWithBiggestVisibleSurface=function(){return this.placements.map(function(e){return{placement:e,surface:e.visibleSurface}}).sort(function(e,t){return t.surface-e.surface})[0].placement},t.findSuitablePlacement=function(){return this.config.auto?this.findFirstPlacementThatFits()||this.placementWithBiggestVisibleSurface():this.placements[0]},t.getSecondaryOffset=function(e){var t=this.config,n=t.auto,r=t.snap;if(!n||r||e instanceof Lu)return 0;var i=this.filterPlacementsBySide(e.primary);if(i.indexOf(e)===0&&e.fitsContainer)return 0;var a=i.find(function(e){return!e.fitsContainer});if(!a)return 0;var o=a.secondaryOffsetSide;if(!o)return 0;var s=e.getContainerOffsets(),c=e.secondary,l=e.triggerIsBigger||a===e?o.isPush?-1:1:c===ku.left||[ku.top,ku.center].includes(c)&&o.isPush?-1:1;return s[o.prop]*l},t.getStyles=function(e,t,n,r){var i={willChange:`top, left, width, height`};return{arrow:Bu(this.subjectsBounds.merge({layer:e}),t,this.config.arrowOffset),layer:this.config.overflowContainer?au({},i,{position:`fixed`,top:e.top,left:e.left}):au({},i,{position:`absolute`,top:e.top-this.subjectsBounds.parent.top+n.top-r.top,left:e.left-this.subjectsBounds.parent.left+n.left-r.left})}},t.getHasDisappeared=function(e){var t=this.config.overflowContainer?this.subjectsBounds.trigger:e,n=ju.mergeSmallestSides(this.subjectsBounds.offsetsToScrollContainers(t,!0));return Object.entries(n.negativeSides).some(function(e){var n=e[0];return e[1]<=-t[Ou[n].sizeProp]})?`full`:n.allSidesArePositive?null:`partial`},t.result=function(e,t){var n=this.findSuitablePlacement(),r=this.getSecondaryOffset(n),i=n.getLayerBounds(r);return{styles:this.getStyles(i,n,e,t),layerSide:n.primary.prop,placement:n,layerBounds:i,hasDisappeared:this.getHasDisappeared(i)}},e}(),Hu=function(){function e(e,t){this.overflowContainer=void 0,this.trigger=void 0,this.layer=void 0,this.arrow=void 0,this.parent=void 0,this.window=void 0,this.scrollContainers=void 0,this.overflowContainer=t,Object.assign(this,e)}e.create=function(t,n,r,i,a,o,s,c){var l=Fu.fromWindow(t);return new e({layer:Fu.fromElement(n,{environment:t,withTransform:!1}),trigger:c?Fu.create(Nu(c())):Fu.fromElement(r),arrow:a?Fu.fromElement(a):Fu.empty(),parent:i?Fu.fromElement(i):l,window:l,scrollContainers:[l].concat(o.map(function(e){return Fu.fromElement(e,{withScrollbars:!1})}))},s)};var t=e.prototype;return t.merge=function(t){return new e(au({},this,t),this.overflowContainer)},t.offsetsToScrollContainers=function(e,t){return t===void 0&&(t=!1),(this.overflowContainer&&!t?[this.window]:this.scrollContainers).map(function(t){return t.offsetsTo(e)})},iu(e,[{key:`layerOffsetsToScrollContainers`,get:function(){return this.offsetsToScrollContainers(this.layer)}},{key:`triggerHasBiggerWidth`,get:function(){return this.trigger.width>this.layer.width}},{key:`triggerHasBiggerHeight`,get:function(){return this.trigger.height>this.layer.height}}]),e}(),Uu=null,Wu={auto:!1,arrowOffset:0,containerOffset:10,triggerOffset:0,overflowContainer:!0,placement:`top-center`,possiblePlacements:wu,preferX:`right`,preferY:`bottom`,snap:!1,container:void 0,trigger:void 0};function Gu(e){var t=e.isOpen,n=t===void 0?!1:t,r=e.overflowContainer,i=r===void 0?Wu.overflowContainer:r,a=e.environment,o=a===void 0?typeof window<`u`?window:void 0:a,s=e.ResizeObserver,c=e.placement,l=c===void 0?Wu.placement:c,u=e.possiblePlacements,d=u===void 0?Wu.possiblePlacements:u,f=e.preferX,p=f===void 0?Wu.preferX:f,m=e.preferY,h=m===void 0?Wu.preferY:m,g=e.auto,_=g===void 0?Wu.auto:g,v=e.snap,y=v===void 0?Wu.snap:v,b=e.triggerOffset,x=b===void 0?Wu.triggerOffset:b,S=e.containerOffset,C=S===void 0?Wu.containerOffset:S,w=e.arrowOffset,T=w===void 0?Wu.arrowOffset:w,E=e.container,D=E===void 0?Wu.container:E,O=e.layerDimensions,k=O===void 0?null:O,A=e.onDisappear,ee=e.onOutsideClick,j=e.onParentClose,te=e.trigger,ne=(0,N.useState)(function(){return{layerSide:l===`center`?`center`:Vu.getSidesFromPlacementType(l)[0].prop,styles:{layer:{position:i?`fixed`:`absolute`,top:0,left:0},arrow:{position:`absolute`,top:0,left:0}}}}),re=ne[0],ie=ne[1],ae=(0,N.useRef)(null),oe=Ste(re,n),se=(0,N.useRef)({cancelled:!1});(0,N.useEffect)(function(){return function(){se.current.cancelled=!0}},[]);var M=yu({ResizeObserverPolyfill:s,environment:o,enabled:n,overflowContainer:i,onChange:(0,N.useCallback)(function(e,t,n){var r=e.arrow,a=e.layer,s=e.scrollContainers,c=e.trigger,u=s[0],f=Hu.create(o,a,c,u,r,s,i,te?.getBounds),m={placement:l,possiblePlacements:d,auto:_,layerDimensions:k,arrowOffset:T,containerOffset:C,triggerOffset:x,preferX:p,preferY:h,snap:y,overflowContainer:i},g=Vu.create(f,m).result(t,n),v=g.hasDisappeared,b={layerSide:g.layerSide,styles:g.styles};if(!oe.current||Ku(oe.current,b)){oe.current=b,se.current.cancelled=!0;var S={cancelled:!1};se.current=S,Promise.resolve().then(function(){S.cancelled||ie(b)})}mu(v)&&mu(A)&&A(v)},[T,_,C,o,k,A,i,l,d,p,h,y,x,oe,te]),triggerOption:te}),ce=M.triggerRef,le=M.layerRef,ue=M.arrowRef,de=M.closestScrollContainer,fe=Cu({isOpen:n,onOutsideClick:ee,onParentClose:j}),pe=fe.closeOnOutsideClickRefs,me=fe.registrations;return{triggerProps:te?{}:{ref:hu(ce,pe.trigger,ae)},layerProps:{ref:hu(le,pe.layer),style:re.styles.layer},arrowProps:{ref:ue,style:re.styles.arrow,layerSide:re.layerSide},layerSide:re.layerSide,triggerBounds:n?te?te.getBounds():ae.current?.getBoundingClientRect():null,renderLayer:function(e){return typeof document<`u`?(0,Nl.createPortal)((0,N.createElement)(xu,{registrations:me,children:e}),i||!de?Ju(D):de):null}}}function Ku(e,t){if(e.layerSide!==t.layerSide)return!0;for(var n=[`position`,`top`,`left`,`right`,`bottom`],r=0,i=n;r<i.length;r++){var a=i[r];if(e.styles.layer[a]!==t.styles.layer[a]||e.styles.arrow[a]!==t.styles.arrow[a])return!0}return!1}var qu=`layers`;function Ju(e){var t;if(typeof e==`function`){if(t=e(),!t||!(t instanceof HTMLElement))throw Error(`react-laag: You've passed a function to the 'container' prop, but it returned no valid HTMLElement`)}else if(e instanceof HTMLElement)t=e;else if(typeof e==`string`){if(t=document.getElementById(e),!t)throw Error(`react-laag: You've passed element with id '`+e+`' to the 'container' prop, but it returned no valid HTMLElement`)}else if(Uu instanceof HTMLElement)return Uu;else t=document.getElementById(qu),t||(t=document.createElement(`div`),t.id=qu,t.style.cssText=`
6
- position: absolute;
7
- top: 0px;
8
- left: 0px;
9
- right: 0px;
10
- `,document.body.appendChild(t));return t}var Yu=[`size`,`angle`,`borderWidth`,`borderColor`,`roundness`,`backgroundColor`,`layerSide`,`style`],Xu=`left`,Zu=`top`,Qu=`bottom`,$u=`right`;function ed(e,t){return Math.tan(e*(Math.PI/180))*t}function td(e,t,n,r){var i;return(i={},i[Qu]=`0 `+-r+` `+t+` `+e,i[Zu]=`0 0 `+t+` `+(e+r),i[$u]=-r+` 0 `+e+` `+t,i[Xu]=`0 0 `+(e+r)+` `+t,i)[n.prop]}function nd(e,t,n,r,i){var a,o,s,c=r/10*e*2,l=(a={},a[Qu]=[0,e],a[Zu]=[0,0],a[$u]=[e,t],a[Xu]=[0,t],a)[n.prop].join(` `),u=n.isHorizontal?`V 0`:`H `+t,d=t/2,f=t/2+ed(i,e/8),p=e/8,m=(o={},o[Qu]=[`C`,f,p,d+c,0,d,0],o[Zu]=[`C`,f,e-p,d+c,e,d,e],o[$u]=[`C`,p,t-f,0,d-c,0,d],o[Xu]=[`C`,e-p,t-f,e,d-c,e,d],o)[n.prop].join(` `),h=t/2-ed(i,e/8),g=e/8;return[`M`,l,u,m,(s={},s[Qu]=[`C`,d-c,0,h,g,l],s[Zu]=[`C`,d-c,e,h,e-g,l],s[$u]=[`C`,0,d+c,g,t-h,l],s[Xu]=[`C`,e,d+c,e-g,t-h,l],s)[n.prop].join(` `)].join(` `)}function rd(e,t,n,r,i){var a=ed(i,n),o=r.isPush?[0,n]:[e,e-n],s=o[0],c=o[1];return r.isHorizontal?[`M`,s,n,`V`,t-n,`L`,c,t-n-a,`V`,a+n,`Z`].join(` `):[`M`,n,s,`H`,t-n,`L`,t-n-a,c,`H`,a+n,`Z`].join(` `)}var id=(0,N.forwardRef)(function(e,t){var n=e.size,r=n===void 0?8:n,i=e.angle,a=i===void 0?45:i,o=e.borderWidth,s=o===void 0?0:o,c=e.borderColor,l=c===void 0?`black`:c,u=e.roundness,d=u===void 0?0:u,f=e.backgroundColor,p=f===void 0?`white`:f,m=e.layerSide,h=m===void 0?`top`:m,g=e.style,_=g===void 0?{}:g,v=vte(e,Yu);if(h===`center`)return null;var y=Ou[h],b=r,x=ed(a,r)*2,S=Math.max(b,x);return(0,N.createElement)(`svg`,au({ref:t},v,{style:au({},_,{transform:`translate`+(y.isHorizontal?`Y`:`X`)+`(-50%)`}),width:S,height:S,preserveAspectRatio:y.isPush?`xMinYMin`:`xMaxYMax`,viewBox:td(b,x,y,s)}),(0,N.createElement)(`path`,{fill:p,strokeWidth:s,stroke:l,d:nd(b,x,y,d,a)}),(0,N.createElement)(`path`,{fill:p,d:rd(b,x,s,y,a)}))}),ad;(function(e){e[e.ENTERING=0]=`ENTERING`,e[e.LEAVING=1]=`LEAVING`,e[e.IDLE=2]=`IDLE`})(ad||={});function od(e){var t=e===void 0?{}:e,n=t.delayEnter,r=n===void 0?0:n,i=t.delayLeave,a=i===void 0?0:i,o=t.hideOnScroll,s=o===void 0?!0:o,c=(0,N.useState)(!1),l=c[0],u=c[1],d=(0,N.useRef)(null),f=(0,N.useRef)(ad.IDLE),p=(0,N.useRef)(!1),m=(0,N.useCallback)(function(){clearTimeout(d.current),d.current=null,f.current=ad.IDLE},[]);function h(){f.current===ad.LEAVING&&d.current&&m(),!l&&(f.current=ad.ENTERING,d.current=window.setTimeout(function(){u(!0),d.current=null,f.current=ad.IDLE},r))}function g(e,t){if(f.current===ad.ENTERING&&d.current&&m(),l){if(t){u(!1),d.current=null,f.current=ad.IDLE;return}f.current=ad.LEAVING,d.current=window.setTimeout(function(){u(!1),d.current=null,f.current=ad.IDLE},a)}}return(0,N.useEffect)(function(){function e(){l&&s&&(m(),u(!1))}return window.addEventListener(`scroll`,e,!0),function(){window.removeEventListener(`scroll`,e,!0),d.current&&clearTimeout(d.current)}},[l,s,m]),[l,{onMouseEnter:h,onMouseLeave:g,onTouchStart:function(){p.current=!1},onTouchMove:function(){p.current=!0},onTouchEnd:function(){!p.current&&!l&&u(!0),p.current=!1}},function(){return g(null,!0)}]}function sd(e){return e}function cd(e){if(e==null)return sd;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?E(e[0],e[1]):x(e);case`string`:case`symbol`:case`number`:return ee(e)}}function ld(e){return w(e)?NaN:Number(e)}function ud(e,t,n=1){if(t??(t=e,e=0),!Number.isInteger(n)||n===0)throw Error(`The step value must be a non-zero integer.`);let r=Math.max(Math.ceil((t-e)/n),0),i=Array(r);for(let t=0;t<r;t++)i[t]=e+t*n;return i}function dd(e){return typeof e==`string`||e instanceof String}function fd(e,t=sd,n=0){if(!e)return;n<0&&(n=Math.max(e.length+n,0));let r=cd(t);if(!Array.isArray(e)){let t=Object.keys(e);for(let i=n;i<t.length;i++){let n=t[i],a=e[n];if(r(a,n,e))return a}return}return e.slice(n).find(r)}function pd(e,t){if(!e)return[];let n=ae(e)||Array.isArray(e)?ud(0,e.length):Object.keys(e),r=cd(t??sd),i=Array(n.length);for(let t=0;t<n.length;t++){let a=n[t],o=e[a];i[t]=r(o,a,e)}return i}function md(e){return Array.isArray(e)}function hd(e){return typeof e==`number`||e instanceof Number}function gd(...e){}function _d(e){return typeof e==`function`}function vd(e){return typeof e==`boolean`||e instanceof Boolean}function yd(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var bd=t((()=>{})),xd=r({default:()=>Cd},1),Sd,Cd,wd=t((()=>{bd(),Sd=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Cd=yd(function(e){return Sd.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91})})),Td=`-ms-`,Ed=`-moz-`,Dd=`-webkit-`,Od=`comm`,kd=`rule`,Ad=`decl`,jd=`@import`,Md=`@namespace`,Nd=`@keyframes`,Pd=`@layer`,Fd=Math.abs,Id=String.fromCharCode,Ld=Object.assign;function Rd(e,t){return Ud(e,0)^45?(((t<<2^Ud(e,0))<<2^Ud(e,1))<<2^Ud(e,2))<<2^Ud(e,3):0}function zd(e){return e.trim()}function Bd(e,t){return(e=t.exec(e))?e[0]:e}function Vd(e,t,n){return e.replace(t,n)}function Hd(e,t,n){return e.indexOf(t,n)}function Ud(e,t){return e.charCodeAt(t)|0}function Wd(e,t,n){return e.slice(t,n)}function Gd(e){return e.length}function Kd(e){return e.length}function qd(e,t){return t.push(e),e}function Jd(e,t){return e.map(t).join(``)}function Yd(e,t){return e.filter(function(e){return!Bd(e,t)})}var Xd=1,Zd=1,Qd=0,$d=0,ef=0,tf=``;function nf(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Xd,column:Zd,length:o,return:``,siblings:s}}function rf(e,t){return Ld(nf(``,null,null,``,null,null,0,e.siblings),e,{length:-e.length},t)}function af(e){for(;e.root;)e=rf(e.root,{children:[e]});qd(e,e.siblings)}function of(){return ef}function sf(){return ef=$d>0?Ud(tf,--$d):0,Zd--,ef===10&&(Zd=1,Xd--),ef}function cf(){return ef=$d<Qd?Ud(tf,$d++):0,Zd++,ef===10&&(Zd=1,Xd++),ef}function lf(){return Ud(tf,$d)}function uf(){return $d}function df(e,t){return Wd(tf,e,t)}function ff(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function pf(e){return Xd=Zd=1,Qd=Gd(tf=e),$d=0,[]}function mf(e){return tf=``,e}function hf(e){return zd(df($d-1,vf(e===91?e+2:e===40?e+1:e)))}function gf(e){for(;(ef=lf())&&ef<33;)cf();return ff(e)>2||ff(ef)>3?``:` `}function _f(e,t){for(;--t&&cf()&&!(ef<48||ef>102||ef>57&&ef<65||ef>70&&ef<97););return df(e,uf()+(t<6&&lf()==32&&cf()==32))}function vf(e){for(;cf();)switch(ef){case e:return $d;case 34:case 39:e!==34&&e!==39&&vf(ef);break;case 40:e===41&&vf(e);break;case 92:cf();break}return $d}function yf(e,t){for(;cf()&&e+ef!==57&&!(e+ef===84&&lf()===47););return`/*`+df(t,$d-1)+`*`+Id(e===47?e:cf())}function bf(e){for(;!ff(lf());)cf();return df(e,$d)}function xf(e){return mf(Sf(``,null,null,null,[``],e=pf(e),0,[0],e))}function Sf(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=cf()){case 40:if(m!=108&&Ud(C,d-1)==58){Hd(C+=Vd(hf(v),`&`,`&\f`),`&\f`,Fd(l?s[l-1]:0))!=-1&&(_=-1);break}case 34:case 39:case 91:C+=hf(v);break;case 9:case 10:case 13:case 32:C+=gf(m);break;case 92:C+=_f(uf()-1,7);continue;case 47:switch(lf()){case 42:case 47:qd(wf(yf(cf(),uf()),t,n,c),c),(ff(m||1)==5||ff(lf()||1)==5)&&Gd(C)&&Wd(C,-1,void 0)!==` `&&(C+=` `);break;default:C+=`/`}break;case 123*h:s[l++]=Gd(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=Vd(C,/\f/g,``)),p>0&&(Gd(C)-d||h===0&&m===47)&&qd(p>32?Tf(C+`;`,r,n,d-1,c):Tf(Vd(C,` `,``)+`;`,r,n,d-2,c),c);break;case 59:C+=`;`;default:if(qd(S=Cf(C,t,n,l,u,i,s,y,b=[],x=[],d,a),a),v===123)if(u===0)Sf(C,t,S,S,b,a,d,s,x);else{switch(f){case 99:if(Ud(C,3)===110)break;case 108:if(Ud(C,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Sf(e,S,S,r&&qd(Cf(e,S,S,0,0,i,s,y,i,b=[],d,x),x),i,x,d,s,r?b:x):Sf(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+Gd(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&sf()==125)continue}switch(C+=Id(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(Gd(C)-1)*_,_=1;break;case 64:lf()===45&&(C+=hf(cf())),f=lf(),u=d=Gd(y=C+=bf(uf())),v++;break;case 45:m===45&&Gd(C)==2&&(h=0)}}return a}function Cf(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=Kd(p),h=0,g=0,_=0;h<r;++h)for(var v=0,y=Wd(e,f+1,f=Fd(g=o[h])),b=e;v<m;++v)(b=zd(g>0?p[v]+` `+y:Vd(y,/&\f/g,p[v])))&&(c[_++]=b);return nf(e,t,n,i===0?kd:s,c,l,u,d)}function wf(e,t,n,r){return nf(e,t,n,Od,Id(of()),Wd(e,2,-2),0,r)}function Tf(e,t,n,r,i){return nf(e,t,n,Ad,Wd(e,0,r),Wd(e,r+1,-1),r,i)}function Ef(e,t,n){switch(Rd(e,t)){case 5103:return Dd+`print-`+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Dd+e+e;case 4855:return Dd+e.replace(`add`,`source-over`).replace(`substract`,`source-out`).replace(`intersect`,`source-in`).replace(`exclude`,`xor`)+e;case 4789:return Ed+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Dd+e+Ed+e+Td+e+e;case 5936:switch(Ud(e,t+11)){case 114:return Dd+e+Td+Vd(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return Dd+e+Td+Vd(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return Dd+e+Td+Vd(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}case 6828:case 4268:case 2903:return Dd+e+Td+e+e;case 6165:return Dd+e+Td+`flex-`+e+e;case 5187:return Dd+e+Vd(e,/(\w+).+(:[^]+)/,Dd+`box-$1$2`+Td+`flex-$1$2`)+e;case 5443:return Dd+e+Td+`flex-item-`+Vd(e,/flex-|-self/g,``)+(Bd(e,/flex-|baseline/)?``:Td+`grid-row-`+Vd(e,/flex-|-self/g,``))+e;case 4675:return Dd+e+Td+`flex-line-pack`+Vd(e,/align-content|flex-|-self/g,``)+e;case 5548:return Dd+e+Td+Vd(e,`shrink`,`negative`)+e;case 5292:return Dd+e+Td+Vd(e,`basis`,`preferred-size`)+e;case 6060:return Dd+`box-`+Vd(e,`-grow`,``)+Dd+e+Td+Vd(e,`grow`,`positive`)+e;case 4554:return Dd+Vd(e,/([^-])(transform)/g,`$1`+Dd+`$2`)+e;case 6187:return Vd(Vd(Vd(e,/(zoom-|grab)/,Dd+`$1`),/(image-set)/,Dd+`$1`),e,``)+e;case 5495:case 3959:return Vd(e,/(image-set\([^]*)/,Dd+"$1$`$1");case 4968:return Vd(Vd(e,/(.+:)(flex-)?(.*)/,Dd+`box-pack:$3`+Td+`flex-pack:$3`),/space-between/,`justify`)+Dd+e+e;case 4200:if(!Bd(e,/flex-|baseline/))return Td+`grid-column-align`+Wd(e,t)+e;break;case 2592:case 3360:return Td+Vd(e,`template-`,``)+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,Bd(e.props,/grid-\w+-end/)})?~Hd(e+(n=n[t].value),`span`,0)?e:Td+Vd(e,`-start`,``)+e+Td+`grid-row-span:`+(~Hd(n,`span`,0)?Bd(n,/\d+/):Bd(n,/\d+/)-+Bd(e,/\d+/))+`;`:Td+Vd(e,`-start`,``)+e;case 4896:case 4128:return n&&n.some(function(e){return Bd(e.props,/grid-\w+-start/)})?e:Td+Vd(Vd(e,`-end`,`-span`),`span `,``)+e;case 4095:case 3583:case 4068:case 2532:return Vd(e,/(.+)-inline(.+)/,Dd+`$1$2`)+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Gd(e)-1-t>6)switch(Ud(e,t+1)){case 109:if(Ud(e,t+4)!==45)break;case 102:return Vd(e,/(.+:)(.+)-([^]+)/,`$1`+Dd+`$2-$3$1`+Ed+(Ud(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~Hd(e,`stretch`,0)?Ef(Vd(e,`stretch`,`fill-available`),t,n)+e:e}break;case 5152:case 5920:return Vd(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,i,a,o,s){return Td+n+`:`+r+s+(i?Td+n+`-span:`+(a?o:o-+r)+s:``)+e});case 4949:if(Ud(e,t+6)===121)return Vd(e,`:`,`:`+Dd)+e;break;case 6444:switch(Ud(e,Ud(e,14)===45?18:11)){case 120:return Vd(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,`$1`+Dd+(Ud(e,14)===45?`inline-`:``)+`box$3$1`+Dd+`$2$3$1`+Td+`$2box$3`)+e;case 100:return Vd(e,`:`,`:`+Td)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Vd(e,`scroll-`,`scroll-snap-`)+e}return e}function Df(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}function Of(e,t,n,r){switch(e.type){case Pd:if(e.children.length)break;case jd:case Md:case Ad:return e.return=e.return||e.value;case Od:return``;case Nd:return e.return=e.value+`{`+Df(e.children,r)+`}`;case kd:if(!Gd(e.value=e.props.join(`,`)))return``}return Gd(n=Df(e.children,r))?e.return=e.value+`{`+n+`}`:``}function kf(e){var t=Kd(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function Af(e){return function(t){t.root||(t=t.return)&&e(t)}}function jf(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Ad:e.return=Ef(e.value,e.length,n);return;case Nd:return Df([rf(e,{value:Vd(e.value,`@`,`@`+Dd)})],r);case kd:if(e.length)return Jd(n=e.props,function(t){switch(Bd(t,r=/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:af(rf(e,{props:[Vd(t,/:(read-\w+)/,`:`+Ed+`$1`)]})),af(rf(e,{props:[t]})),Ld(e,{props:Yd(n,r)});break;case`::placeholder`:af(rf(e,{props:[Vd(t,/:(plac\w+)/,`:`+Dd+`input-$1`)]})),af(rf(e,{props:[Vd(t,/:(plac\w+)/,`:`+Ed+`$1`)]})),af(rf(e,{props:[Vd(t,/:(plac\w+)/,Td+`input-$1`)]})),af(rf(e,{props:[t]})),Ld(e,{props:Yd(n,r)});break}return``})}}var Mf,Nf=t((()=>{Mf={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}}));Jo(),Nf();var Pf=typeof process<`u`&&({}.REACT_APP_SC_ATTR||{}.SC_ATTR)||`data-styled`,Ff=`active`,If=`data-styled-version`,Lf=`6.3.9`,Rf=`/*!sc*/
11
- `,zf=typeof window<`u`&&typeof document<`u`,Bf=N.createContext===void 0,Vf=!!(typeof SC_DISABLE_SPEEDY==`boolean`?SC_DISABLE_SPEEDY:typeof process<`u`&&{}.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&{}.REACT_APP_SC_DISABLE_SPEEDY!==``?{}.REACT_APP_SC_DISABLE_SPEEDY!==`false`&&{}.REACT_APP_SC_DISABLE_SPEEDY:typeof process<`u`&&{}.SC_DISABLE_SPEEDY!==void 0&&{}.SC_DISABLE_SPEEDY!==``&&{}.SC_DISABLE_SPEEDY!==`false`&&{}.SC_DISABLE_SPEEDY),Hf=Object.freeze([]),Uf=Object.freeze({});function Wf(e,t,n){return n===void 0&&(n=Uf),e.theme!==n.theme&&e.theme||t||n.theme}var Gf=new Set(`a.abbr.address.area.article.aside.audio.b.bdi.bdo.blockquote.body.button.br.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.main.map.mark.menu.meter.nav.object.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.slot.small.span.strong.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.switch.symbol.text.textPath.tspan.use`.split(`.`)),Kf=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,qf=/(^-|-$)/g;function Jf(e){return e.replace(Kf,`-`).replace(qf,``)}var Yf=/(a)(d)/gi,Xf=function(e){return String.fromCharCode(e+(e>25?39:97))};function Zf(e){var t,n=``;for(t=Math.abs(e);t>52;t=t/52|0)n=Xf(t%52)+n;return(Xf(t%52)+n).replace(Yf,`$1-$2`)}var Qf,$f=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},ep=function(e){return $f(5381,e)};function tp(e){return Zf(ep(e)>>>0)}function np(e){return e.displayName||e.name||`Component`}function rp(e){return typeof e==`string`&&!0}var ip=typeof Symbol==`function`&&Symbol.for,ap=ip?Symbol.for(`react.memo`):60115,op=ip?Symbol.for(`react.forward_ref`):60112,sp={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},cp={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},lp={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},up=((Qf={})[op]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Qf[ap]=lp,Qf);function dp(e){return(`type`in(t=e)&&t.type.$$typeof)===ap?lp:`$$typeof`in e?up[e.$$typeof]:sp;var t}var fp=Object.defineProperty,pp=Object.getOwnPropertyNames,mp=Object.getOwnPropertySymbols,hp=Object.getOwnPropertyDescriptor,gp=Object.getPrototypeOf,_p=Object.prototype;function vp(e,t,n){if(typeof t!=`string`){if(_p){var r=gp(t);r&&r!==_p&&vp(e,r,n)}var i=pp(t);mp&&(i=i.concat(mp(t)));for(var a=dp(e),o=dp(t),s=0;s<i.length;++s){var c=i[s];if(!(c in cp||n&&n[c]||o&&c in o||a&&c in a)){var l=hp(t,c);try{fp(e,c,l)}catch{}}}}return e}function yp(e){return typeof e==`function`}function bp(e){return typeof e==`object`&&`styledComponentId`in e}function xp(e,t){return e&&t?`${e} ${t}`:e||t||``}function Sp(e,t){return e.join(t||``)}function Cp(e){return typeof e==`object`&&!!e&&e.constructor.name===Object.name&&!(`props`in e&&e.$$typeof)}function wp(e,t,n){if(n===void 0&&(n=!1),!n&&!Cp(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=wp(e[r],t[r]);else if(Cp(t))for(var r in t)e[r]=wp(e[r],t[r]);return e}function Tp(e,t){Object.defineProperty(e,`toString`,{value:t})}function Ep(e){var t=[...arguments].slice(1);return Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(`, `)}`:``}`)}var Dp=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}return e.prototype.indexOfGroup=function(e){if(e===this._cGroup)return this._cIndex;var t=this._cIndex;if(e>this._cGroup)for(var n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)if((i<<=1)<0)throw Ep(16,`${e}`);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var a=r;a<i;a++)this.groupSizes[a]=0}for(var o=this.indexOfGroup(e+1),s=0,c=(a=0,t.length);a<c;a++)this.tag.insertRule(o,t[a])&&(this.groupSizes[e]++,o++,s++);s>0&&this._cGroup>e&&(this._cIndex+=s)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}},e.prototype.getGroup=function(e){var t=``;if(e>=this.length||this.groupSizes[e]===0)return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,a=r;a<i;a++)t+=this.tag.getRule(a)+Rf;return t},e}(),Op=new Map,kp=new Map,Ap=1,jp=function(e){if(Op.has(e))return Op.get(e);for(;kp.has(Ap);)Ap++;var t=Ap++;return Op.set(e,t),kp.set(t,e),t},Mp=function(e,t){Ap=t+1,Op.set(e,t),kp.set(t,e)},Np=`style[${Pf}][${If}="${Lf}"]`,Pp=RegExp(`^${Pf}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),Fp=function(e){return typeof ShadowRoot<`u`&&e instanceof ShadowRoot||`host`in e&&e.nodeType===11},Ip=function(e){if(!e)return document;if(Fp(e))return e;if(`getRootNode`in e){var t=e.getRootNode();if(Fp(t))return t}return document},Lp=function(e,t,n){for(var r,i=n.split(`,`),a=0,o=i.length;a<o;a++)(r=i[a])&&e.registerName(t,r)},Rp=function(e,t){for(var n=(t.textContent??``).split(Rf),r=[],i=0,a=n.length;i<a;i++){var o=n[i].trim();if(o){var s=o.match(Pp);if(s){var c=0|parseInt(s[1],10),l=s[2];c!==0&&(Mp(l,c),Lp(e,l,s[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(o)}}},zp=function(e){for(var t=Ip(e.options.target).querySelectorAll(Np),n=0,r=t.length;n<r;n++){var i=t[n];i&&i.getAttribute(Pf)!==Ff&&(Rp(e,i),i.parentNode&&i.parentNode.removeChild(i))}};function Bp(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:null}var Vp=function(e){var t=document.head,n=e||t,r=document.createElement(`style`),i=function(e){var t=Array.from(e.querySelectorAll(`style[${Pf}]`));return t[t.length-1]}(n),a=i===void 0?null:i.nextSibling;r.setAttribute(Pf,Ff),r.setAttribute(If,Lf);var o=Bp();return o&&r.setAttribute(`nonce`,o),n.insertBefore(r,a),r},Hp=function(){function e(e){this.element=Vp(e),this.element.appendChild(document.createTextNode(``)),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=e.getRootNode().styleSheets??document.styleSheets,n=0,r=t.length;n<r;n++){var i=t[n];if(i.ownerNode===e)return i}throw Ep(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:``},e}(),Up=function(){function e(e){this.element=Vp(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:``},e}(),Wp=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(e===this.length?this.rules.push(t):this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:``},e}(),Gp=zf,Kp={isServer:!zf,useCSSOMInjection:!Vf},qp=function(){function e(e,t,n){e===void 0&&(e=Uf),t===void 0&&(t={});var r=this;this.options=qo(qo({},Kp),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&zf&&Gp&&(Gp=!1,zp(this)),Tp(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r=``,i=function(n){var i=function(e){return kp.get(e)}(n);if(i===void 0)return`continue`;var a=e.names.get(i);if(a===void 0||!a.size)return`continue`;var o=t.getGroup(n);if(o.length===0)return`continue`;var s=Pf+`.g`+n+`[id="`+i+`"]`,c=``;a.forEach(function(e){e.length>0&&(c+=e+`,`)}),r+=o+s+`{content:"`+c+`"}`+Rf},a=0;a<n;a++)i(a);return r}(r)})}return e.registerId=function(e){return jp(e)},e.prototype.rehydrate=function(){!this.server&&zf&&zp(this)},e.prototype.reconstructWithOptions=function(t,n){n===void 0&&(n=!0);var r=new e(qo(qo({},this.options),t),this.gs,n&&this.names||void 0);return!this.server&&zf&&t.target!==this.options.target&&Ip(this.options.target)!==Ip(t.target)&&zp(r),r},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new Wp(n):t?new Hp(n):new Up(n)}(this.options),new Dp(e));var e},e.prototype.hasNameForId=function(e,t){var n;return(n=this.names.get(e)?.has(t))!=null&&n},e.prototype.registerName=function(e,t){jp(e);var n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(jp(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(jp(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),Jp=/&/g,Yp=47,Xp=42;function Zp(e){if(e.indexOf(`}`)===-1)return!1;for(var t=e.length,n=0,r=0,i=!1,a=0;a<t;a++){var o=e.charCodeAt(a);if(r!==0||i||o!==Yp||e.charCodeAt(a+1)!==Xp)if(i)o===Xp&&e.charCodeAt(a+1)===Yp&&(i=!1,a++);else if(o!==34&&o!==39||a!==0&&e.charCodeAt(a-1)===92){if(r===0){if(o===123)n++;else if(o===125&&--n<0)return!0}}else r===0?r=o:r===o&&(r=0);else i=!0,a++}return n!==0||r!==0}function Qp(e,t){return e.map(function(e){return e.type===`rule`&&(e.value=`${t} ${e.value}`,e.value=e.value.replaceAll(`,`,`,${t} `),e.props=e.props.map(function(e){return`${t} ${e}`})),Array.isArray(e.children)&&e.type!==`@keyframes`&&(e.children=Qp(e.children,t)),e})}function $p(e){var t,n,r,i=e===void 0?Uf:e,a=i.options,o=a===void 0?Uf:a,s=i.plugins,c=s===void 0?Hf:s,l=function(e,r,i){return i.startsWith(n)&&i.endsWith(n)&&i.replaceAll(n,``).length>0?`.${t}`:e},u=c.slice();u.push(function(e){e.type===`rule`&&e.value.includes(`&`)&&(r||=RegExp(`\\${n}\\b`,`g`),e.props[0]=e.props[0].replace(Jp,n).replace(r,l))}),o.prefix&&u.push(jf),u.push(Of);var d=[],f=kf(u.concat(Af(function(e){return d.push(e)}))),p=function(e,i,a,s){i===void 0&&(i=``),a===void 0&&(a=``),s===void 0&&(s=`&`),t=s,n=i,r=void 0;var c=function(e){if(!Zp(e))return e;for(var t=e.length,n=``,r=0,i=0,a=0,o=!1,s=0;s<t;s++){var c=e.charCodeAt(s);if(a!==0||o||c!==Yp||e.charCodeAt(s+1)!==Xp)if(o)c===Xp&&e.charCodeAt(s+1)===Yp&&(o=!1,s++);else if(c!==34&&c!==39||s!==0&&e.charCodeAt(s-1)===92){if(a===0)if(c===123)i++;else if(c===125){if(--i<0){for(var l=s+1;l<t;){var u=e.charCodeAt(l);if(u===59||u===10)break;l++}l<t&&e.charCodeAt(l)===59&&l++,i=0,s=l-1,r=l;continue}i===0&&(n+=e.substring(r,s+1),r=s+1)}else c===59&&i===0&&(n+=e.substring(r,s+1),r=s+1)}else a===0?a=c:a===c&&(a=0);else o=!0,s++}if(r<t){var d=e.substring(r);Zp(d)||(n+=d)}return n}(function(e){if(e.indexOf(`//`)===-1)return e;for(var t=e.length,n=[],r=0,i=0,a=0,o=0;i<t;){var s=e.charCodeAt(i);if(s!==34&&s!==39||i!==0&&e.charCodeAt(i-1)===92)if(a===0)if(s===Yp&&i+1<t&&e.charCodeAt(i+1)===Xp){for(i+=2;i+1<t&&(e.charCodeAt(i)!==Xp||e.charCodeAt(i+1)!==Yp);)i++;i+=2}else if(s===40&&i>=3&&(32|e.charCodeAt(i-1))==108&&(32|e.charCodeAt(i-2))==114&&(32|e.charCodeAt(i-3))==117)o=1,i++;else if(o>0)s===41?o--:s===40&&o++,i++;else if(s===Xp&&i+1<t&&e.charCodeAt(i+1)===Yp)i>r&&n.push(e.substring(r,i)),r=i+=2;else if(s===Yp&&i+1<t&&e.charCodeAt(i+1)===Yp){for(i>r&&n.push(e.substring(r,i));i<t&&e.charCodeAt(i)!==10;)i++;r=i}else i++;else i++;else a===0?a=s:a===s&&(a=0),i++}return r===0?e:(r<t&&n.push(e.substring(r)),n.join(``))}(e)),l=xf(a||i?`${a} ${i} { ${c} }`:c);return o.namespace&&(l=Qp(l,o.namespace)),d=[],Df(l,f),d};return p.hash=c.length?c.reduce(function(e,t){return t.name||Ep(15),$f(e,t.name)},5381).toString():``,p}var em=new qp,tm=$p(),nm={shouldForwardProp:void 0,styleSheet:em,stylis:tm},rm=Bf?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(nm)}}:N.createContext(nm);rm.Consumer;var im=Bf?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(void 0)}}:N.createContext(void 0);function am(){return Bf?nm:N.useContext(rm)}function om(e){if(Bf||!N.useMemo)return e.children;var t=am().styleSheet,n=N.useMemo(function(){var n=t;return e.sheet?n=e.sheet:e.target&&(n=n.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(n=n.reconstructWithOptions({useCSSOMInjection:!1})),n},[e.disableCSSOMInjection,e.sheet,e.target,t]),r=N.useMemo(function(){return $p({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:e.stylisPlugins})},[e.enableVendorPrefixes,e.namespace,e.stylisPlugins]),i=N.useMemo(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:n,stylis:r}},[e.shouldForwardProp,n,r]);return N.createElement(rm.Provider,{value:i},N.createElement(im.Provider,{value:r},e.children))}var sm=function(){function e(e,t){var n=this;this.inject=function(e,t){t===void 0&&(t=tm);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,`@keyframes`))},this.name=e,this.id=`sc-keyframes-${e}`,this.rules=t,Tp(this,function(){throw Ep(12,String(n.name))})}return e.prototype.getName=function(e){return e===void 0&&(e=tm),this.name+e.hash},e}();function cm(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t!=`number`||t===0||e in Mf||e.startsWith(`--`)?String(t).trim():`${t}px`}var lm=function(e){return e>=`A`&&e<=`Z`};function um(e){for(var t=``,n=0;n<e.length;n++){var r=e[n];if(n===1&&r===`-`&&e[0]===`-`)return e;lm(r)?t+=`-`+r.toLowerCase():t+=r}return t.startsWith(`ms-`)?`-`+t:t}var dm=function(e){return e==null||!1===e||e===``},fm=function(e){var t=[];for(var n in e){var r=e[n];e.hasOwnProperty(n)&&!dm(r)&&(Array.isArray(r)&&r.isCss||yp(r)?t.push(`${um(n)}:`,r,`;`):Cp(r)?t.push.apply(t,Ko(Ko([`${n} {`],fm(r),!1),[`}`],!1)):t.push(`${um(n)}: ${cm(n,r)};`))}return t};function pm(e,t,n,r,i){if(i===void 0&&(i=[]),typeof e==`string`)return e&&i.push(e),i;if(dm(e))return i;if(bp(e))return i.push(`.${e.styledComponentId}`),i;if(yp(e))return!yp(a=e)||a.prototype&&a.prototype.isReactComponent||!t?(i.push(e),i):pm(e(t),t,n,r,i);var a;if(e instanceof sm)return n?(e.inject(n,r),i.push(e.getName(r))):i.push(e),i;if(Cp(e)){for(var o=fm(e),s=0;s<o.length;s++)i.push(o[s]);return i}if(!Array.isArray(e))return i.push(e.toString()),i;for(s=0;s<e.length;s++)pm(e[s],t,n,r,i);return i}function mm(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(yp(n)&&!bp(n))return!1}return!0}var hm=ep(Lf),gm=function(){function e(e,t,n){this.rules=e,this.staticRulesId=``,this.isStatic=(n===void 0||n.isStatic)&&mm(e),this.componentId=t,this.baseHash=$f(hm,t),this.baseStyle=n,qp.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n).className:``;if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=xp(r,this.staticRulesId);else{var i=Sp(pm(this.rules,e,t,n)),a=Zf($f(this.baseHash,i)>>>0);if(!t.hasNameForId(this.componentId,a)){var o=n(i,`.${a}`,void 0,this.componentId);t.insertRules(this.componentId,a,o)}r=xp(r,a),this.staticRulesId=a}else{for(var s=$f(this.baseHash,n.hash),c=``,l=0;l<this.rules.length;l++){var u=this.rules[l];if(typeof u==`string`)c+=u;else if(u){var d=Sp(pm(u,e,t,n));s=$f($f(s,String(l)),d),c+=d}}if(c){var f=Zf(s>>>0);if(!t.hasNameForId(this.componentId,f)){var p=n(c,`.${f}`,void 0,this.componentId);t.insertRules(this.componentId,f,p)}r=xp(r,f)}}return{className:r,css:typeof window>`u`?t.getTag().getGroup(jp(this.componentId)):``}},e}(),_m=Bf?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(void 0)}}:N.createContext(void 0);_m.Consumer;var vm={};function ym(e,t,n){var r=bp(e),i=e,a=!rp(e),o=t.attrs,s=o===void 0?Hf:o,c=t.componentId,l=c===void 0?function(e,t){var n=typeof e==`string`?Jf(e):`sc`;vm[n]=(vm[n]||0)+1;var r=`${n}-${tp(Lf+n+vm[n])}`;return t?`${t}-${r}`:r}(t.displayName,t.parentComponentId):c,u=t.displayName,d=u===void 0?function(e){return rp(e)?`styled.${e}`:`Styled(${np(e)})`}(e):u,f=t.displayName&&t.componentId?`${Jf(t.displayName)}-${t.componentId}`:t.componentId||l,p=r&&i.attrs?i.attrs.concat(s).filter(Boolean):s,m=t.shouldForwardProp;if(r&&i.shouldForwardProp){var h=i.shouldForwardProp;if(t.shouldForwardProp){var g=t.shouldForwardProp;m=function(e,t){return h(e,t)&&g(e,t)}}else m=h}var _=new gm(n,f,r?i.componentStyle:void 0);function v(e,t){return function(e,t,n){var r=e.attrs,i=e.componentStyle,a=e.defaultProps,o=e.foldedComponentIds,s=e.styledComponentId,c=e.target,l=Bf?void 0:N.useContext(_m),u=am(),d=e.shouldForwardProp||u.shouldForwardProp,f=Wf(t,l,a)||(Bf?void 0:Uf),p=function(e,t,n){for(var r,i=qo(qo({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var o=yp(r=e[a])?r(i):r;for(var s in o)s===`className`?i.className=xp(i.className,o[s]):s===`style`?i.style=qo(qo({},i.style),o[s]):i[s]=o[s]}return`className`in t&&typeof t.className==`string`&&(i.className=xp(i.className,t.className)),i}(r,t,f),m=p.as||c,h={};for(var g in p)p[g]===void 0||g[0]===`$`||g===`as`||g===`theme`&&p.theme===f||(g===`forwardedAs`?h.as=p.forwardedAs:d&&!d(g,m)||(h[g]=p[g]));var _=function(e,t){var n=am();return e.generateAndInjectStyles(t,n.styleSheet,n.stylis)}(i,p),v=_.className,y=_.css,b=xp(o,s);v&&(b+=` `+v),p.className&&(b+=` `+p.className),h[rp(m)&&!Gf.has(m)?`class`:`className`]=b,n&&(h.ref=n);var x=(0,N.createElement)(m,h);return Bf&&y?N.createElement(N.Fragment,null,N.createElement(`style`,{precedence:`styled-components`,href:`sc-${s}-${v}`,children:y}),x):x}(y,e,t)}v.displayName=d;var y=N.forwardRef(v);return y.attrs=p,y.componentStyle=_,y.displayName=d,y.shouldForwardProp=m,y.foldedComponentIds=r?xp(i.foldedComponentIds,i.styledComponentId):``,y.styledComponentId=f,y.target=r?i.target:e,Object.defineProperty(y,`defaultProps`,{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=r?function(e){for(var t=[...arguments].slice(1),n=0,r=t;n<r.length;n++)wp(e,r[n],!0);return e}({},i.defaultProps,e):e}}),Tp(y,function(){return`.${y.styledComponentId}`}),a&&vp(y,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),y}function bm(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n}var xm=function(e){return Object.assign(e,{isCss:!0})};function Sm(e){var t=[...arguments].slice(1);if(yp(e)||Cp(e))return xm(pm(bm(Hf,Ko([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]==`string`?pm(n):xm(pm(bm(n,t)))}function Cm(e,t,n){if(n===void 0&&(n=Uf),!t)throw Ep(1,t);var r=function(r){var i=[...arguments].slice(1);return e(t,n,Sm.apply(void 0,Ko([r],i,!1)))};return r.attrs=function(r){return Cm(e,t,qo(qo({},n),{attrs:Array.prototype.concat(n.attrs,r).filter(Boolean)}))},r.withConfig=function(r){return Cm(e,t,qo(qo({},n),r))},r}var wm=function(e){return Cm(ym,e)},Tm=wm;Gf.forEach(function(e){Tm[e]=wm(e)}),function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=mm(e),qp.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var i=r(Sp(pm(this.rules,t,n,r)),``),a=this.componentId+e;n.insertRules(a,a,i)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&qp.registerId(this.componentId+e);var i=this.componentId+e;this.isStatic?n.hasNameForId(i,i)||this.createStyles(e,t,n,r):(this.removeStyles(e,n),this.createStyles(e,t,n,r))},e}(),function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return``;var n=Bp();return`<style ${Sp([n&&`nonce="${n}"`,`${Pf}="true"`,`${If}="${Lf}"`].filter(Boolean),` `)}>${t}</style>`},this.getStyleTags=function(){if(e.sealed)throw Ep(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw Ep(2);var n=e.instance.toString();if(!n)return[];var r=((t={})[Pf]=``,t[If]=Lf,t.dangerouslySetInnerHTML={__html:n},t),i=Bp();return i&&(r.nonce=i),[N.createElement(`style`,qo({},r,{key:`sc-0-0`}))]},this.seal=function(){e.sealed=!0},this.instance=new qp({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw Ep(2);return N.createElement(om,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw Ep(3)},e}(),`${Pf}`;var Em=n(((e,t)=>{function n(e){var t,r,i=``;if(typeof e==`string`||typeof e==`number`)i+=e;else if(typeof e==`object`)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=n(e[t]))&&(i&&(i+=` `),i+=r)}else for(r in e)e[r]&&(i&&(i+=` `),i+=r);return i}function r(){for(var e,t,r=0,i=``,a=arguments.length;r<a;r++)(e=arguments[r])&&(t=n(e))&&(i&&(i+=` `),i+=t);return i}t.exports=r,t.exports.clsx=r})),Dm=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.dontSetMe=a,e.findInArray=t,e.int=i,e.isFunction=n,e.isNum=r;function t(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function n(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Function]`}function r(e){return typeof e==`number`&&!isNaN(e)}function i(e){return parseInt(e,10)}function a(e,t,n){if(e[t])return Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)}})),Om=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.browserPrefixToKey=r,e.browserPrefixToStyle=i,e.default=void 0,e.getPrefix=n;var t=[`Moz`,`Webkit`,`O`,`ms`];function n(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:`transform`;if(typeof window>`u`)return``;let n=window.document?.documentElement?.style;if(!n||e in n)return``;for(let i=0;i<t.length;i++)if(r(e,t[i])in n)return t[i];return``}function r(e,t){return t?`${t}${a(e)}`:e}function i(e,t){return t?`-${t.toLowerCase()}-${e}`:e}function a(e){let t=``,n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):e[r]===`-`?n=!0:t+=e[r];return t}e.default=n()})),km=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.addClassName=S,e.addEvent=s,e.addUserSelectStyles=y,e.createCSSTransform=m,e.createSVGTransform=h,e.getTouch=_,e.getTouchIdentifier=v,e.getTranslation=g,e.innerHeight=d,e.innerWidth=f,e.matchesSelector=a,e.matchesSelectorAndParentsTo=o,e.offsetXYFromParent=p,e.outerHeight=l,e.outerWidth=u,e.removeClassName=C,e.removeEvent=c,e.scheduleRemoveUserSelectStyles=b;var t=Dm(),n=r(Om());function r(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,i=new WeakMap;return(r=function(e,t){if(!t&&e&&e.__esModule)return e;var r,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(let t in e)t!==`default`&&{}.hasOwnProperty.call(e,t)&&((a=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?r(o,t,a):o[t]=e[t]);return o})(e,t)}var i=``;function a(e,n){return i||=(0,t.findInArray)([`matches`,`webkitMatchesSelector`,`mozMatchesSelector`,`msMatchesSelector`,`oMatchesSelector`],function(n){return(0,t.isFunction)(e[n])}),(0,t.isFunction)(e[i])?e[i](n):!1}function o(e,t,n){let r=e;do{if(a(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function s(e,t,n,r){if(!e)return;let i={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent(`on`+t,n):e[`on`+t]=n}function c(e,t,n,r){if(!e)return;let i={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent(`on`+t,n):e[`on`+t]=null}function l(e){let n=e.clientHeight,r=e.ownerDocument.defaultView.getComputedStyle(e);return n+=(0,t.int)(r.borderTopWidth),n+=(0,t.int)(r.borderBottomWidth),n}function u(e){let n=e.clientWidth,r=e.ownerDocument.defaultView.getComputedStyle(e);return n+=(0,t.int)(r.borderLeftWidth),n+=(0,t.int)(r.borderRightWidth),n}function d(e){let n=e.clientHeight,r=e.ownerDocument.defaultView.getComputedStyle(e);return n-=(0,t.int)(r.paddingTop),n-=(0,t.int)(r.paddingBottom),n}function f(e){let n=e.clientWidth,r=e.ownerDocument.defaultView.getComputedStyle(e);return n-=(0,t.int)(r.paddingLeft),n-=(0,t.int)(r.paddingRight),n}function p(e,t,n){let r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect();return{x:(e.clientX+t.scrollLeft-r.left)/n,y:(e.clientY+t.scrollTop-r.top)/n}}function m(e,t){let r=g(e,t,`px`);return{[(0,n.browserPrefixToKey)(`transform`,n.default)]:r}}function h(e,t){return g(e,t,``)}function g(e,t,n){let{x:r,y:i}=e,a=`translate(${r}${n},${i}${n})`;return t&&(a=`translate(${`${typeof t.x==`string`?t.x:t.x+n}`}, ${`${typeof t.y==`string`?t.y:t.y+n}`})`+a),a}function _(e,n){return e.targetTouches&&(0,t.findInArray)(e.targetTouches,e=>n===e.identifier)||e.changedTouches&&(0,t.findInArray)(e.changedTouches,e=>n===e.identifier)}function v(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function y(e){if(!e)return;let t=e.getElementById(`react-draggable-style-el`);t||(t=e.createElement(`style`),t.type=`text/css`,t.id=`react-draggable-style-el`,t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
12
- `,t.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
13
- `,e.getElementsByTagName(`head`)[0].appendChild(t)),e.body&&S(e.body,`react-draggable-transparent-selection`)}function b(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{x(e)}):x(e)}function x(e){if(e)try{if(e.body&&C(e.body,`react-draggable-transparent-selection`),e.selection)e.selection.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function S(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function C(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}})),Am=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.canDragX=a,e.canDragY=o,e.createCoreData=c,e.createDraggableData=l,e.getBoundPosition=r,e.getControlPosition=s,e.snapToGrid=i;var t=Dm(),n=km();function r(e,r,i){if(!e.props.bounds)return[r,i];let{bounds:a}=e.props;a=typeof a==`string`?a:u(a);let o=d(e);if(typeof a==`string`){let{ownerDocument:e}=o,r=e.defaultView,i;if(i=a===`parent`?o.parentNode:o.getRootNode().querySelector(a),!(i instanceof r.HTMLElement))throw Error(`Bounds selector "`+a+`" could not find an element.`);let s=i,c=r.getComputedStyle(o),l=r.getComputedStyle(s);a={left:-o.offsetLeft+(0,t.int)(l.paddingLeft)+(0,t.int)(c.marginLeft),top:-o.offsetTop+(0,t.int)(l.paddingTop)+(0,t.int)(c.marginTop),right:(0,n.innerWidth)(s)-(0,n.outerWidth)(o)-o.offsetLeft+(0,t.int)(l.paddingRight)-(0,t.int)(c.marginRight),bottom:(0,n.innerHeight)(s)-(0,n.outerHeight)(o)-o.offsetTop+(0,t.int)(l.paddingBottom)-(0,t.int)(c.marginBottom)}}return(0,t.isNum)(a.right)&&(r=Math.min(r,a.right)),(0,t.isNum)(a.bottom)&&(i=Math.min(i,a.bottom)),(0,t.isNum)(a.left)&&(r=Math.max(r,a.left)),(0,t.isNum)(a.top)&&(i=Math.max(i,a.top)),[r,i]}function i(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function a(e){return e.props.axis===`both`||e.props.axis===`x`}function o(e){return e.props.axis===`both`||e.props.axis===`y`}function s(e,t,r){let i=typeof t==`number`?(0,n.getTouch)(e,t):null;if(typeof t==`number`&&!i)return null;let a=d(r),o=r.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,n.offsetXYFromParent)(i||e,o,r.props.scale)}function c(e,n,r){let i=!(0,t.isNum)(e.lastX),a=d(e);return i?{node:a,deltaX:0,deltaY:0,lastX:n,lastY:r,x:n,y:r}:{node:a,deltaX:n-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:n,y:r}}function l(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function u(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function d(e){let t=e.findDOMNode();if(!t)throw Error(`<DraggableCore>: Unmounted during event!`);return t}})),jm=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=t;function t(){}})),Mm=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=d(c()),n=u(cs()),r=u(o()),i=km(),a=Am(),s=Dm(),l=u(jm());function u(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(d=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!==`default`&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function f(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){var t=m(e,`string`);return typeof t==`symbol`?t:t+``}function m(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var h={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},g=h.mouse,_=class extends t.Component{constructor(){super(...arguments),f(this,`dragging`,!1),f(this,`lastX`,NaN),f(this,`lastY`,NaN),f(this,`touchIdentifier`,null),f(this,`mounted`,!1),f(this,`handleDragStart`,e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&typeof e.button==`number`&&e.button!==0)return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(`<DraggableCore> not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;let o=(0,a.getControlPosition)(e,r,this);if(o==null)return;let{x:s,y:c}=o,u=(0,a.createCoreData)(this,s,c);(0,l.default)(`DraggableCore: handleDragStart: %j`,u),(0,l.default)(`calling`,this.props.onStart),!(this.props.onStart(e,u)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=s,this.lastY=c,(0,i.addEvent)(n,g.move,this.handleDrag),(0,i.addEvent)(n,g.stop,this.handleDragStop))}),f(this,`handleDrag`,e=>{let t=(0,a.getControlPosition)(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,a.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=(0,a.createCoreData)(this,n,r);if((0,l.default)(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r}),f(this,`handleDragStop`,e=>{if(!this.dragging)return;let t=(0,a.getControlPosition)(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,a.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let o=(0,a.createCoreData)(this,n,r);if(this.props.onStop(e,o)===!1||this.mounted===!1)return!1;let s=this.findDOMNode();s&&this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(s.ownerDocument),(0,l.default)(`DraggableCore: handleDragStop: %j`,o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,s&&((0,l.default)(`DraggableCore: Removing handlers`),(0,i.removeEvent)(s.ownerDocument,g.move,this.handleDrag),(0,i.removeEvent)(s.ownerDocument,g.stop,this.handleDragStop))}),f(this,`onMouseDown`,e=>(g=h.mouse,this.handleDragStart(e))),f(this,`onMouseUp`,e=>(g=h.mouse,this.handleDragStop(e))),f(this,`onTouchStart`,e=>(g=h.touch,this.handleDragStart(e))),f(this,`onTouchEnd`,e=>(g=h.touch,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&(0,i.addEvent)(e,h.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;(0,i.removeEvent)(t,h.mouse.move,this.handleDrag),(0,i.removeEvent)(t,h.touch.move,this.handleDrag),(0,i.removeEvent)(t,h.mouse.stop,this.handleDragStop),(0,i.removeEvent)(t,h.touch.stop,this.handleDragStop),(0,i.removeEvent)(e,h.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:r.default.findDOMNode(this)}render(){return t.cloneElement(t.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};e.default=_,f(_,`displayName`,`DraggableCore`),f(_,`propTypes`,{allowAnyClick:n.default.bool,allowMobileScroll:n.default.bool,children:n.default.node.isRequired,disabled:n.default.bool,enableUserSelectHack:n.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:n.default.arrayOf(n.default.number),handle:n.default.string,cancel:n.default.string,nodeRef:n.default.object,onStart:n.default.func,onDrag:n.default.func,onStop:n.default.func,onMouseDown:n.default.func,scale:n.default.number,className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),f(_,`defaultProps`,{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})})),Nm=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`DraggableCore`,{enumerable:!0,get:function(){return u.default}}),e.default=void 0;var t=p(c()),n=f(cs()),r=f(o()),i=Em(),a=km(),s=Am(),l=Dm(),u=f(Mm()),d=f(jm());function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(p=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!==`default`&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(null,arguments)}function h(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){var t=_(e,`string`);return typeof t==`symbol`?t:t+``}function _(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var v=class extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return n&&(!r||n.x!==r.x||n.y!==r.y)?((0,d.default)(`Draggable: getDerivedStateFromProps %j`,{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}}):null}constructor(e){super(e),h(this,`onDragStart`,(e,t)=>{if((0,d.default)(`Draggable: onDragStart: %j`,t),this.props.onStart(e,(0,s.createDraggableData)(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),h(this,`onDrag`,(e,t)=>{if(!this.state.dragging)return!1;(0,d.default)(`Draggable: onDrag: %j`,t);let n=(0,s.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=(0,s.getBoundPosition)(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)}),h(this,`onDragStop`,(e,t)=>{if(!this.state.dragging||this.props.onStop(e,(0,s.createDraggableData)(this,t))===!1)return!1;(0,d.default)(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)}),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??r.default.findDOMNode(this)}render(){let{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:c,defaultClassNameDragging:l,defaultClassNameDragged:d,position:f,positionOffset:p,scale:h,...g}=this.props,_={},v=null,y=!f||this.state.dragging,b=f||o,x={x:(0,s.canDragX)(this)&&y?this.state.x:b.x,y:(0,s.canDragY)(this)&&y?this.state.y:b.y};this.state.isElementSVG?v=(0,a.createSVGTransform)(x,p):_=(0,a.createCSSTransform)(x,p);let S=(0,i.clsx)(r.props.className||``,c,{[l]:this.state.dragging,[d]:this.state.dragged});return t.createElement(u.default,m({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:S,style:{...r.props.style,..._},transform:v}))}};e.default=v,h(v,`displayName`,`Draggable`),h(v,`propTypes`,{...u.default.propTypes,axis:n.default.oneOf([`both`,`x`,`y`,`none`]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),h(v,`defaultProps`,{...u.default.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1})})),Pm=n(((e,t)=>{var{default:n,DraggableCore:r}=Nm();t.exports=n,t.exports.default=n,t.exports.DraggableCore=r})),Fm=n((e=>{e.__esModule=!0,e.cloneElement=l;var t=n(c());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?r(Object(n),!0).forEach(function(t){a(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function a(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=s(e,`string`);return typeof t==`symbol`?t:t+``}function s(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function l(e,n){return n.style&&e.props.style&&(n.style=i(i({},e.props.style),n.style)),n.className&&e.props.className&&(n.className=`${e.props.className} ${n.className}`),t.default.cloneElement(e,n)}})),Im=n((e=>{e.__esModule=!0,e.resizableProps=void 0;var t=n(cs());Pm();function n(e){return e&&e.__esModule?e:{default:e}}e.resizableProps={axis:t.default.oneOf([`both`,`x`,`y`,`none`]),className:t.default.string,children:t.default.element.isRequired,draggableOpts:t.default.shape({allowAnyClick:t.default.bool,cancel:t.default.string,children:t.default.node,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:typeof Element<`u`?t.default.instanceOf(Element):t.default.any,grid:t.default.arrayOf(t.default.number),handle:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number}),height:function(){var e=[...arguments];let[n]=e;return n.axis===`both`||n.axis===`y`?t.default.number.isRequired(...e):t.default.number(...e)},handle:t.default.oneOfType([t.default.node,t.default.func]),handleSize:t.default.arrayOf(t.default.number),lockAspectRatio:t.default.bool,maxConstraints:t.default.arrayOf(t.default.number),minConstraints:t.default.arrayOf(t.default.number),onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,resizeHandles:t.default.arrayOf(t.default.oneOf([`s`,`w`,`e`,`n`,`sw`,`nw`,`se`,`ne`])),transformScale:t.default.number,width:function(){var e=[...arguments];let[n]=e;return n.axis===`both`||n.axis===`x`?t.default.number.isRequired(...e):t.default.number(...e)}}})),Lm=n((e=>{e.__esModule=!0,e.default=void 0;var t=o(c()),n=Pm(),r=Fm(),i=Im(),a=[`children`,`className`,`draggableOpts`,`width`,`height`,`handle`,`handleSize`,`lockAspectRatio`,`axis`,`minConstraints`,`maxConstraints`,`onResize`,`onResizeStop`,`onResizeStart`,`resizeHandles`,`transformScale`];function o(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(o=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!==`default`&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(null,arguments)}function l(e,t){if(e==null)return{};var n,r,i=u(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?d(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function p(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=h(e,`string`);return typeof t==`symbol`?t:t+``}function h(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var g=class extends t.Component{constructor(){super(...arguments),this.handleRefs={},this.lastHandleRect=null,this.slack=null,this.lastSize=null}componentWillUnmount(){this.resetData()}resetData(){this.lastHandleRect=this.slack=this.lastSize=null}runConstraints(e,t){let{minConstraints:n,maxConstraints:r,lockAspectRatio:i}=this.props;if(!n&&!r&&!i)return[e,t];if(i){let n=this.props.width/this.props.height,r=e-this.props.width,i=t-this.props.height;Math.abs(r)>Math.abs(i*n)?t=e/n:e=t*n}let[a,o]=[e,t],[s,c]=this.slack||[0,0];return e+=s,t+=c,n&&(e=Math.max(n[0],e),t=Math.max(n[1],t)),r&&(e=Math.min(r[0],e),t=Math.min(r[1],t)),this.slack=[s+(a-e),c+(o-t)],[e,t]}resizeHandler(e,t){return(n,r)=>{let{node:i,deltaX:a,deltaY:o}=r;e===`onResizeStart`&&this.resetData();let s=(this.props.axis===`both`||this.props.axis===`x`)&&t!==`n`&&t!==`s`,c=(this.props.axis===`both`||this.props.axis===`y`)&&t!==`e`&&t!==`w`;if(!s&&!c)return;let l=t[0],u=t[t.length-1],d=i.getBoundingClientRect();if(this.lastHandleRect!=null){if(u===`w`){let e=d.left-this.lastHandleRect.left;a+=e}if(l===`n`){let e=d.top-this.lastHandleRect.top;o+=e}}this.lastHandleRect=d,u===`w`&&(a=-a),l===`n`&&(o=-o);let f=this.props.width+(s?a/this.props.transformScale:0),p=this.props.height+(c?o/this.props.transformScale:0);[f,p]=this.runConstraints(f,p),e===`onResizeStop`&&this.lastSize&&({width:f,height:p}=this.lastSize);let m=f!==this.props.width||p!==this.props.height;e!==`onResizeStop`&&(this.lastSize={width:f,height:p});let h=typeof this.props[e]==`function`?this.props[e]:null;h&&!(e===`onResize`&&!m)&&(n.persist?.(),h(n,{node:i,size:{width:f,height:p},handle:t})),e===`onResizeStop`&&this.resetData()}}renderResizeHandle(e,n){let{handle:r}=this.props;if(!r)return t.createElement(`span`,{className:`react-resizable-handle react-resizable-handle-${e}`,ref:n});if(typeof r==`function`)return r(e,n);let i=typeof r.type==`string`,a=f({ref:n},i?{}:{handleAxis:e});return t.cloneElement(r,a)}render(){let e=this.props,{children:i,className:o,draggableOpts:c,width:u,height:d,handle:p,handleSize:m,lockAspectRatio:h,axis:g,minConstraints:_,maxConstraints:v,onResize:y,onResizeStop:b,onResizeStart:x,resizeHandles:S,transformScale:C}=e,w=l(e,a);return(0,r.cloneElement)(i,f(f({},w),{},{className:`${o?`${o} `:``}react-resizable`,children:[...t.Children.toArray(i.props.children),...S.map(e=>{let r=this.handleRefs[e]??(this.handleRefs[e]=t.createRef());return t.createElement(n.DraggableCore,s({},c,{nodeRef:r,key:`resizableHandle-${e}`,onStop:this.resizeHandler(`onResizeStop`,e),onStart:this.resizeHandler(`onResizeStart`,e),onDrag:this.resizeHandler(`onResize`,e)}),this.renderResizeHandle(e,r))})]}))}};e.default=g,g.propTypes=i.resizableProps,g.defaultProps={axis:`both`,handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:[`se`],transformScale:1}})),Rm=n((e=>{e.__esModule=!0,e.default=void 0;var t=s(c()),n=o(cs()),r=o(Lm()),i=Im(),a=[`handle`,`handleSize`,`onResize`,`onResizeStart`,`onResizeStop`,`draggableOpts`,`minConstraints`,`maxConstraints`,`lockAspectRatio`,`axis`,`width`,`height`,`resizeHandles`,`style`,`transformScale`];function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(s=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!==`default`&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?u(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function f(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){var t=m(e,`string`);return typeof t==`symbol`?t:t+``}function m(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function h(e,t){if(e==null)return{};var n,r,i=g(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function g(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var _=class extends t.Component{constructor(){super(...arguments),this.state={width:this.props.width,height:this.props.height,propsWidth:this.props.width,propsHeight:this.props.height},this.onResize=(e,t)=>{let{size:n}=t;this.props.onResize?(e.persist?.(),this.setState(n,()=>this.props.onResize&&this.props.onResize(e,t))):this.setState(n)}}static getDerivedStateFromProps(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null}render(){let e=this.props,{handle:n,handleSize:i,onResize:o,onResizeStart:s,onResizeStop:c,draggableOpts:u,minConstraints:f,maxConstraints:p,lockAspectRatio:m,axis:g,width:_,height:v,resizeHandles:y,style:b,transformScale:x}=e,S=h(e,a);return t.createElement(r.default,{axis:g,draggableOpts:u,handle:n,handleSize:i,height:this.state.height,lockAspectRatio:m,maxConstraints:p,minConstraints:f,onResizeStart:s,onResize:this.onResize,onResizeStop:c,resizeHandles:y,transformScale:x,width:this.state.width},t.createElement(`div`,l({},S,{style:d(d({},b),{},{width:this.state.width+`px`,height:this.state.height+`px`})})))}};e.default=_,_.propTypes=d(d({},i.resizableProps),{},{children:n.default.element})})),zm=n(((e,t)=>{t.exports=function(){throw Error(`Don't instantiate Resizable directly! Use require('react-resizable').Resizable`)},t.exports.Resizable=Lm().default,t.exports.ResizableBox=Rm().default})),Bm=Number.isNaN||function(e){return typeof e==`number`&&e!==e};function Vm(e,t){return!!(e===t||Bm(e)&&Bm(t))}function Hm(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Vm(e[n],t[n]))return!1;return!0}function Um(e,t){t===void 0&&(t=Hm);var n,r=[],i,a=!1;function o(){var o=[...arguments];return a&&n===this&&t(o,r)?i:(i=e.apply(this,o),a=!0,n=this,r=o,i)}return o}var Wm=Um;Uo();var Gm=typeof performance==`object`&&typeof performance.now==`function`?function(){return performance.now()}:function(){return Date.now()};function Km(e){cancelAnimationFrame(e.id)}function qm(e,t){var n=Gm();function r(){Gm()-n>=t?e.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var Jm=-1;function Ym(e){if(e===void 0&&(e=!1),Jm===-1||e){var t=document.createElement(`div`),n=t.style;n.width=`50px`,n.height=`50px`,n.overflow=`scroll`,document.body.appendChild(t),Jm=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Jm}var Xm=null;function Zm(e){if(e===void 0&&(e=!1),Xm===null||e){var t=document.createElement(`div`),n=t.style;n.width=`50px`,n.height=`50px`,n.overflow=`scroll`,n.direction=`rtl`;var r=document.createElement(`div`),i=r.style;return i.width=`100px`,i.height=`100px`,t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?Xm=`positive-descending`:(t.scrollLeft=1,Xm=t.scrollLeft===0?`negative`:`positive-ascending`),document.body.removeChild(t),Xm}return Xm}var Qm=150,$m=function(e,t){return e};function eh(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,o=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,c=e.initInstanceProps,l=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){Go(t,e);function t(t){var r=e.call(this,t)||this;return r._instanceProps=c(r.props,Wl(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Wl(r),isScrolling:!1,scrollDirection:`forward`,scrollOffset:typeof r.props.initialScrollOffset==`number`?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Wm(function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})}),r._callOnScroll=void 0,r._callOnScroll=Wm(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t=r.props,a=t.direction,o=t.itemSize,s=t.layout,c=r._getItemStyleCache(l&&o,l&&s,l&&a),u;if(c.hasOwnProperty(e))u=c[e];else{var d=n(r.props,e,r._instanceProps),f=i(r.props,e,r._instanceProps),p=a===`horizontal`||s===`horizontal`,m=a===`rtl`,h=p?d:0;c[e]=u={position:`absolute`,left:m?void 0:h,right:m?h:void 0,top:p?0:d,height:p?`100%`:f,width:p?f:`100%`}}return u},r._getItemStyleCache=void 0,r._getItemStyleCache=Wm(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,a=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,o=i;if(t===`rtl`)switch(Zm()){case`negative`:o=-i;break;case`positive-descending`:o=a-n-i;break}return o=Math.max(0,Math.min(o,a-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<o?`forward`:`backward`,scrollOffset:o,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.scrollHeight,a=t.scrollTop;r.setState(function(e){if(e.scrollOffset===a)return null;var t=Math.max(0,Math.min(a,i-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?`forward`:`backward`,scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,typeof t==`function`?t(e):typeof t==`object`&&t&&t.hasOwnProperty(`current`)&&(t.current=e)},r._resetIsScrollingDebounced=function(){r._resetIsScrollingTimeoutId!==null&&Km(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=qm(r._resetIsScrolling,Qm)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}t.getDerivedStateFromProps=function(e,t){return th(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?`forward`:`backward`,scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){t===void 0&&(t=`auto`);var n=this.props,r=n.itemCount,i=n.layout,o=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var c=this._outerRef;s=i===`vertical`?c.scrollWidth>c.clientWidth?Ym():0:c.scrollHeight>c.clientHeight?Ym():0}this.scrollTo(a(this.props,e,t,o,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if(typeof n==`number`&&this._outerRef!=null){var i=this._outerRef;t===`horizontal`||r===`horizontal`?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&this._outerRef!=null){var a=this._outerRef;if(t===`horizontal`||n===`horizontal`)if(t===`rtl`)switch(Zm()){case`negative`:a.scrollLeft=-i;break;case`positive-ascending`:a.scrollLeft=i;break;default:var o=a.clientWidth;a.scrollLeft=a.scrollWidth-o-i;break}else a.scrollLeft=i;else a.scrollTop=i}this._callPropsCallbacks()},d.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Km(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,a=e.height,o=e.innerRef,s=e.innerElementType,c=e.innerTagName,l=e.itemCount,u=e.itemData,d=e.itemKey,f=d===void 0?$m:d,p=e.layout,m=e.outerElementType,h=e.outerTagName,g=e.style,_=e.useIsScrolling,v=e.width,y=this.state.isScrolling,b=i===`horizontal`||p===`horizontal`,x=b?this._onScrollHorizontal:this._onScrollVertical,S=this._getRangeToRender(),C=S[0],w=S[1],T=[];if(l>0)for(var E=C;E<=w;E++)T.push((0,N.createElement)(t,{data:u,key:f(E,u),index:E,isScrolling:_?y:void 0,style:this._getItemStyle(E)}));var D=r(this.props,this._instanceProps);return(0,N.createElement)(m||h||`div`,{className:n,onScroll:x,ref:this._outerRefSetter,style:Ho({position:`relative`,height:a,width:v,overflow:`auto`,WebkitOverflowScrolling:`touch`,willChange:`transform`,direction:i},g)},(0,N.createElement)(s||c||`div`,{children:T,ref:o,style:{height:b?`100%`:D,pointerEvents:y?`none`:void 0,width:b?D:`100%`}}))},d._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered==`function`&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if(typeof this.props.onScroll==`function`){var a=this.state,o=a.scrollDirection,s=a.scrollOffset,c=a.scrollUpdateWasRequested;this._callOnScroll(o,s,c)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,a=r.scrollDirection,c=r.scrollOffset;if(t===0)return[0,0,0,0];var l=o(this.props,c,this._instanceProps),u=s(this.props,l,c,this._instanceProps),d=!i||a===`backward`?Math.max(1,n):1,f=!i||a===`forward`?Math.max(1,n):1;return[Math.max(0,l-d),Math.max(0,Math.min(t-1,u+f)),l,u]},t}(N.PureComponent),t.defaultProps={direction:`ltr`,itemData:void 0,layout:`vertical`,overscanCount:2,useIsScrolling:!1},t}var th=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},nh=eh({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,i,a){var o=e.direction,s=e.height,c=e.itemCount,l=e.itemSize,u=e.layout,d=e.width,f=o===`horizontal`||u===`horizontal`?d:s,p=Math.max(0,c*l-f),m=Math.min(p,t*l),h=Math.max(0,t*l-f+l+a);switch(n===`smart`&&(n=r>=h-f&&r<=m+f?`auto`:`center`),n){case`start`:return m;case`end`:return h;case`center`:var g=Math.round(h+(m-h)/2);return g<Math.ceil(f/2)?0:g>p+Math.floor(f/2)?p:g;case`auto`:default:return r>=h&&r<=m?r:r<h?h:m}},getStartIndexForOffset:function(e,t){var n=e.itemCount,r=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,i=e.height,a=e.itemCount,o=e.itemSize,s=e.layout,c=e.width,l=r===`horizontal`||s===`horizontal`,u=t*o,d=l?c:i,f=Math.ceil((d+n-u)/o);return Math.max(0,Math.min(a-1,t+f-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});function rh(){var e=[...arguments];return(0,N.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var ih=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function ah(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function oh(e){return`nodeType`in e}function sh(e){return e?ah(e)?e:oh(e)?e.ownerDocument?.defaultView??window:window:window}function ch(e){let{Document:t}=sh(e);return e instanceof t}function lh(e){return ah(e)?!1:e instanceof sh(e).HTMLElement}function uh(e){return e instanceof sh(e).SVGElement}function dh(e){return e?ah(e)?e.document:oh(e)?ch(e)?e:lh(e)||uh(e)?e.ownerDocument:document:document:document}var fh=ih?N.useLayoutEffect:N.useEffect;function ph(e){let t=(0,N.useRef)(e);return fh(()=>{t.current=e}),(0,N.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function mh(){let e=(0,N.useRef)(null);return[(0,N.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,N.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function hh(e,t){t===void 0&&(t=[e]);let n=(0,N.useRef)(e);return fh(()=>{n.current!==e&&(n.current=e)},t),n}function gh(e,t){let n=(0,N.useRef)();return(0,N.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function _h(e){let t=ph(e),n=(0,N.useRef)(null);return[n,(0,N.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function vh(e){let t=(0,N.useRef)();return(0,N.useEffect)(()=>{t.current=e},[e]),t.current}var yh={};function bh(e,t){return(0,N.useMemo)(()=>{if(t)return t;let n=yh[e]==null?0:yh[e]+1;return yh[e]=n,e+`-`+n},[e,t])}function xh(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var Sh=xh(1),Ch=xh(-1);function wh(e){return`clientX`in e&&`clientY`in e}function Th(e){if(!e)return!1;let{KeyboardEvent:t}=sh(e.target);return t&&e instanceof t}function Eh(e){if(!e)return!1;let{TouchEvent:t}=sh(e.target);return t&&e instanceof t}function Dh(e){if(Eh(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return wh(e)?{x:e.clientX,y:e.clientY}:null}var Oh=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[Oh.Translate.toString(e),Oh.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),kh=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function Ah(e){return e.matches(kh)?e:e.querySelector(kh)}var jh={display:`none`};function Mh(e){let{id:t,value:n}=e;return N.createElement(`div`,{id:t,style:jh},n)}function Nh(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return N.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function Ph(){let[e,t]=(0,N.useState)(``);return{announce:(0,N.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var Fh=(0,N.createContext)(null);function Ih(e){let t=(0,N.useContext)(Fh);(0,N.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function Lh(){let[e]=(0,N.useState)(()=>new Set),t=(0,N.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,N.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var Rh={draggable:`
14
- To pick up a draggable item, press the space bar.
15
- While dragging, use the arrow keys to move the item.
16
- Press space again to drop the item in its new position, or press escape to cancel.
17
- `},zh={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function Bh(e){let{announcements:t=zh,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Rh}=e,{announce:a,announcement:o}=Ph(),s=bh(`DndLiveRegion`),[c,l]=(0,N.useState)(!1);if((0,N.useEffect)(()=>{l(!0)},[]),Ih((0,N.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=N.createElement(N.Fragment,null,N.createElement(Mh,{id:r,value:i.draggable}),N.createElement(Nh,{id:s,announcement:o}));return n?(0,Nl.createPortal)(u,n):u}var Vh;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(Vh||={});function Hh(){}var Uh=Object.freeze({x:0,y:0});function Wh(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function Gh(e,t){let n=Dh(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function wte(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Kh(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function qh(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function Jh(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var Yh=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=Jh(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=Wh(Jh(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(wte)};function Xh(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var Zh=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=Xh(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(Kh)};function Qh(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function $h(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Uh}function eg(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var tg=eg(1);function ng(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function rg(e,t,n){let r=ng(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var ig={ignoreTransform:!1};function ag(e,t){t===void 0&&(t=ig);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=sh(e).getComputedStyle(e);t&&(n=rg(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function og(e){return ag(e,{ignoreTransform:!0})}function sg(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function cg(e,t){return t===void 0&&(t=sh(e).getComputedStyle(e)),t.position===`fixed`}function lg(e,t){t===void 0&&(t=sh(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}function ug(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(ch(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!lh(i)||uh(i)||n.includes(i))return n;let a=sh(e).getComputedStyle(i);return i!==e&&lg(i,a)&&n.push(i),cg(i,a)?n:r(i.parentNode)}return e?r(e):n}function dg(e){let[t]=ug(e,1);return t??null}function fg(e){return!ih||!e?null:ah(e)?e:oh(e)?ch(e)||e===dh(e).scrollingElement?window:lh(e)?e:null:null}function pg(e){return ah(e)?e.scrollX:e.scrollLeft}function mg(e){return ah(e)?e.scrollY:e.scrollTop}function hg(e){return{x:pg(e),y:mg(e)}}var gg;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(gg||={});function _g(e){return!ih||!e?!1:e===document.scrollingElement}function vg(e){let t={x:0,y:0},n=_g(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var yg={x:.2,y:.2};function bg(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=yg);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=vg(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=gg.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=gg.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=gg.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=gg.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function xg(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Sg(e){return e.reduce((e,t)=>Sh(e,hg(t)),Uh)}function Cg(e){return e.reduce((e,t)=>e+pg(t),0)}function wg(e){return e.reduce((e,t)=>e+mg(t),0)}function Tg(e,t){if(t===void 0&&(t=ag),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);dg(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var Eg=[[`x`,[`left`,`right`],Cg],[`y`,[`top`,`bottom`],wg]],Dg=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=ug(t),r=Sg(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of Eg)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,`rect`,{enumerable:!1})}},Og=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function kg(e){let{EventTarget:t}=sh(e);return e instanceof t?e:dh(e)}function Ag(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t?r>t.y:!1}var jg;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(jg||={});function Mg(e){e.preventDefault()}function Ng(e){e.stopPropagation()}var Pg;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(Pg||={});var Fg={start:[Pg.Space,Pg.Enter],cancel:[Pg.Esc],end:[Pg.Space,Pg.Enter,Pg.Tab]},Ig=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Pg.Right:return{...n,x:n.x+25};case Pg.Left:return{...n,x:n.x-25};case Pg.Down:return{...n,y:n.y+25};case Pg.Up:return{...n,y:n.y-25}}},Lg=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new Og(dh(t)),this.windowListeners=new Og(sh(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(jg.Resize,this.handleCancel),this.windowListeners.add(jg.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(jg.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Tg(n),t(Uh)}handleKeyDown(e){if(Th(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=Fg,coordinateGetter:a=Ig,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:Uh;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=Ch(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=vg(n),p=xg(n),m={x:Math.min(i===Pg.Right?p.right-p.width/2:p.right,Math.max(i===Pg.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===Pg.Down?p.bottom-p.height/2:p.bottom,Math.max(i===Pg.Down?p.top:p.top+p.height/2,u.y))},h=i===Pg.Right&&!s||i===Pg.Left&&!c,g=i===Pg.Down&&!l||i===Pg.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===Pg.Right&&e<=d.x||i===Pg.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===Pg.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===Pg.Down&&e<=d.y||i===Pg.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===Pg.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,Sh(Ch(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};Lg.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=Fg,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function Rg(e){return!!(e&&`distance`in e)}function zg(e){return!!(e&&`delay`in e)}var Bg=class{constructor(e,t,n){n===void 0&&(n=kg(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=dh(i),this.documentListeners=new Og(this.document),this.listeners=new Og(n),this.windowListeners=new Og(sh(i)),this.initialCoordinates=Dh(r)??Uh,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(jg.Resize,this.handleCancel),this.windowListeners.add(jg.DragStart,Mg),this.windowListeners.add(jg.VisibilityChange,this.handleCancel),this.windowListeners.add(jg.ContextMenu,Mg),this.documentListeners.add(jg.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(zg(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Rg(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(jg.Click,Ng,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(jg.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=Dh(e)??Uh,s=Ch(n,o);if(!t&&a){if(Rg(a)){if(a.tolerance!=null&&Ag(s,a.tolerance))return this.handleCancel();if(Ag(s,a.distance))return this.handleStart()}if(zg(a)&&Ag(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Pg.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},Vg={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},Hg=class extends Bg{constructor(e){let{event:t}=e,n=dh(t.target);super(e,Vg,n)}};Hg.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var Ug={move:{name:`mousemove`},end:{name:`mouseup`}},Wg;(function(e){e[e.RightClick=2]=`RightClick`})(Wg||={});var Gg=class extends Bg{constructor(e){super(e,Ug,dh(e.event.target))}};Gg.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Wg.RightClick?!1:(r?.({event:n}),!0)}}];var Kg={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},qg=class extends Bg{constructor(e){super(e,Kg)}static setup(){return window.addEventListener(Kg.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Kg.move.name,e)};function e(){}}};qg.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var Jg;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(Jg||={});var Yg;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(Yg||={});function Xg(e){let{acceleration:t,activator:n=Jg.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=Yg.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=Qg({delta:d,disabled:!a}),[m,h]=mh(),g=(0,N.useRef)({x:0,y:0}),_=(0,N.useRef)({x:0,y:0}),v=(0,N.useMemo)(()=>{switch(n){case Jg.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Jg.DraggableRect:return i}},[n,i,c]),y=(0,N.useRef)(null),b=(0,N.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,N.useMemo)(()=>s===Yg.TreeOrder?[...l].reverse():l,[s,l]);(0,N.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of x){if(r?.(e)===!1)continue;let n=u[l.indexOf(e)];if(!n)continue;let{direction:i,speed:a}=bg(e,n,v,t,f);for(let e of[`x`,`y`])p[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0){h(),y.current=e,m(b,o),g.current=a,_.current=i;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var Zg={x:{[gg.Backward]:!1,[gg.Forward]:!1},y:{[gg.Backward]:!1,[gg.Forward]:!1}};function Qg(e){let{delta:t,disabled:n}=e,r=vh(t);return gh(e=>{if(n||!r||!e)return Zg;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[gg.Backward]:e.x[gg.Backward]||i.x===-1,[gg.Forward]:e.x[gg.Forward]||i.x===1},y:{[gg.Backward]:e.y[gg.Backward]||i.y===-1,[gg.Forward]:e.y[gg.Forward]||i.y===1}}},[n,t,r])}function $g(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return gh(e=>t==null?null:r??e??null,[r,t])}function e_(e,t){return(0,N.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var t_;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(t_||={});var n_;(function(e){e.Optimized=`optimized`})(n_||={});var r_=new Map;function i_(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,N.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,N.useRef)(e),d=g(),f=hh(d),p=(0,N.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,N.useRef)(null),h=gh(t=>{if(d&&!n)return r_;if(!t||t===r_||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new Dg(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,N.useEffect)(()=>{u.current=e},[e]),(0,N.useEffect)(()=>{d||p()},[n,d]),(0,N.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,N.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case t_.Always:return!1;case t_.BeforeDragging:return n;default:return!n}}}function a_(e,t){return gh(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function o_(e,t){return a_(e,t)}function s_(e){let{callback:t,disabled:n}=e,r=ph(t),i=(0,N.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,N.useEffect)(()=>()=>i?.disconnect(),[i]),i}function c_(e){let{callback:t,disabled:n}=e,r=ph(t),i=(0,N.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,N.useEffect)(()=>()=>i?.disconnect(),[i]),i}function l_(e){return new Dg(ag(e),e)}function u_(e,t,n){t===void 0&&(t=l_);let[r,i]=(0,N.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=s_({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=c_({callback:a});return fh(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function d_(e){return $h(e,a_(e))}var f_=[];function Tte(e){let t=(0,N.useRef)(e),n=gh(n=>e?n&&n!==f_&&e&&t.current&&e.parentNode===t.current.parentNode?n:ug(e):f_,[e]);return(0,N.useEffect)(()=>{t.current=e},[e]),n}function Ete(e){let[t,n]=(0,N.useState)(null),r=(0,N.useRef)(e),i=(0,N.useCallback)(e=>{let t=fg(e.target);t&&n(e=>e?(e.set(t,hg(t)),new Map(e)):null)},[]);return(0,N.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=fg(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,hg(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{fg(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,N.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>Sh(e,t),Uh):Sg(e):Uh,[e,t])}function p_(e,t){t===void 0&&(t=[]);let n=(0,N.useRef)(null);return(0,N.useEffect)(()=>{n.current=null},t),(0,N.useEffect)(()=>{let t=e!==Uh;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?Ch(e,n.current):Uh}function Dte(e){(0,N.useEffect)(()=>{if(!ih)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function Ote(e,t){return(0,N.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function m_(e){return(0,N.useMemo)(()=>e?sg(e):null,[e])}var h_=[];function kte(e,t){t===void 0&&(t=ag);let[n]=e,r=m_(n?sh(n):null),[i,a]=(0,N.useState)(h_);function o(){a(()=>e.length?e.map(e=>_g(e)?r:new Dg(t(e),e)):h_)}let s=c_({callback:o});return fh(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function g_(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return lh(t)?t:e}function Ate(e){let{measure:t}=e,[n,r]=(0,N.useState)(null),i=c_({callback:(0,N.useCallback)(e=>{for(let{target:n}of e)if(lh(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=_h((0,N.useCallback)(e=>{let n=g_(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,N.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var jte=[{sensor:Hg,options:{}},{sensor:Lg,options:{}}],Mte={current:{}},__={draggable:{measure:og},droppable:{measure:og,strategy:t_.WhileDragging,frequency:n_.Optimized},dragOverlay:{measure:ag}},v_=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},Nte={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new v_,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Hh},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:__,measureDroppableContainers:Hh,windowRect:null,measuringScheduled:!1},y_={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:Hh,draggableNodes:new Map,over:null,measureDroppableContainers:Hh},b_=(0,N.createContext)(y_),x_=(0,N.createContext)(Nte);function Pte(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new v_}}}function Fte(e,t){switch(t.type){case Vh.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Vh.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Vh.DragEnd:case Vh.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Vh.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new v_(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Vh.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new v_(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case Vh.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new v_(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Ite(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,N.useContext)(b_),a=vh(r),o=vh(n?.id);return(0,N.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!Th(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=Ah(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function S_(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function Lte(e){return(0,N.useMemo)(()=>({draggable:{...__.draggable,...e?.draggable},droppable:{...__.droppable,...e?.droppable},dragOverlay:{...__.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Rte(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,N.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;fh(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=$h(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=dg(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var C_=(0,N.createContext)({...Uh,scaleX:1,scaleY:1}),w_;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(w_||={});var zte=(0,N.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=jte,collisionDetection:o=Zh,measuring:s,modifiers:c,...l}=e,[u,d]=(0,N.useReducer)(Fte,void 0,Pte),[f,p]=Lh(),[m,h]=(0,N.useState)(w_.Uninitialized),g=m===w_.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,x=_==null?null:v.get(_),S=(0,N.useRef)({initial:null,translated:null}),C=(0,N.useMemo)(()=>_==null?null:{id:_,data:x?.data??Mte,rect:S},[_,x]),w=(0,N.useRef)(null),[T,E]=(0,N.useState)(null),[D,O]=(0,N.useState)(null),k=hh(l,Object.values(l)),A=bh(`DndDescribedBy`,t),ee=(0,N.useMemo)(()=>b.getEnabled(),[b]),j=Lte(s),{droppableRects:te,measureDroppableContainers:ne,measuringScheduled:re}=i_(ee,{dragging:g,dependencies:[y.x,y.y],config:j.droppable}),ie=$g(v,_),ae=(0,N.useMemo)(()=>D?Dh(D):null,[D]),oe=Ie(),se=o_(ie,j.draggable.measure);Rte({activeNode:_==null?null:v.get(_),config:oe.layoutShiftCompensation,initialRect:se,measure:j.draggable.measure});let M=u_(ie,j.draggable.measure,se),ce=u_(ie?ie.parentElement:null),le=(0,N.useRef)({activatorEvent:null,active:null,activeNode:ie,collisionRect:null,collisions:null,droppableRects:te,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ue=b.getNodeFor(le.current.over?.id),de=Ate({measure:j.dragOverlay.measure}),fe=de.nodeRef.current??ie,pe=g?de.rect??M:null,me=!!(de.nodeRef.current&&de.rect),he=d_(me?null:M),ge=m_(fe?sh(fe):null),_e=Tte(g?ue??ie:null),ve=kte(_e),ye=S_(c,{transform:{x:y.x-he.x,y:y.y-he.y,scaleX:1,scaleY:1},activatorEvent:D,active:C,activeNodeRect:M,containerNodeRect:ce,draggingNodeRect:pe,over:le.current.over,overlayNodeRect:de.rect,scrollableAncestors:_e,scrollableAncestorRects:ve,windowRect:ge}),be=ae?Sh(ae,y):null,xe=Ete(_e),Se=p_(xe),Ce=p_(xe,[M]),we=Sh(ye,Se),Te=pe?tg(pe,ye):null,Ee=C&&Te?o({active:C,collisionRect:Te,droppableRects:te,droppableContainers:ee,pointerCoordinates:be}):null,De=qh(Ee,`id`),[Oe,ke]=(0,N.useState)(null),Ae=Qh(me?ye:Sh(ye,Ce),Oe?.rect??null,M),je=(0,N.useRef)(null),Me=(0,N.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(w.current==null)return;let i=v.get(w.current);if(!i)return;let a=e.nativeEvent;je.current=new n({active:w.current,activeNode:i,event:a,options:r,context:le,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=k.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=k.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=w.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=k.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:S}};(0,Nl.unstable_batchedUpdates)(()=>{r?.(i),h(w_.Initializing),d({type:Vh.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),E(je.current),O(a)})},onMove(e){d({type:Vh.DragMove,coordinates:e})},onEnd:o(Vh.DragEnd),onCancel:o(Vh.DragCancel)});function o(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=le.current,o=null;if(t&&i){let{cancelDrop:s}=k.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===Vh.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=Vh.DragCancel)}w.current=null,(0,Nl.unstable_batchedUpdates)(()=>{d({type:e}),h(w_.Uninitialized),ke(null),E(null),O(null),je.current=null;let t=e===Vh.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=k.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),Ne=e_(a,(0,N.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(w.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},w.current=r,Me(n,t))},[v,Me]));Dte(a),fh(()=>{M&&m===w_.Initializing&&h(w_.Initialized)},[M,m]),(0,N.useEffect)(()=>{let{onDragMove:e}=k.current,{active:t,activatorEvent:n,collisions:r,over:i}=le.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:we.x,y:we.y},over:i};(0,Nl.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[we.x,we.y]),(0,N.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=le.current;if(!e||w.current==null||!t||!i)return;let{onDragOver:a}=k.current,o=r.get(De),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,Nl.unstable_batchedUpdates)(()=>{ke(s),a?.(c),f({type:`onDragOver`,event:c})})},[De]),fh(()=>{le.current={activatorEvent:D,active:C,activeNode:ie,collisionRect:Te,collisions:Ee,droppableRects:te,draggableNodes:v,draggingNode:fe,draggingNodeRect:pe,droppableContainers:b,over:Oe,scrollableAncestors:_e,scrollAdjustedTranslate:we},S.current={initial:pe,translated:Te}},[C,ie,Ee,Te,v,fe,pe,te,b,Oe,_e,we]),Xg({...oe,delta:y,draggingRect:Te,pointerCoordinates:be,scrollableAncestors:_e,scrollableAncestorRects:ve});let Pe=(0,N.useMemo)(()=>({active:C,activeNode:ie,activeNodeRect:M,activatorEvent:D,collisions:Ee,containerNodeRect:ce,dragOverlay:de,draggableNodes:v,droppableContainers:b,droppableRects:te,over:Oe,measureDroppableContainers:ne,scrollableAncestors:_e,scrollableAncestorRects:ve,measuringConfiguration:j,measuringScheduled:re,windowRect:ge}),[C,ie,M,D,Ee,ce,de,v,b,te,Oe,ne,_e,ve,j,re,ge]),Fe=(0,N.useMemo)(()=>({activatorEvent:D,activators:Ne,active:C,activeNodeRect:M,ariaDescribedById:{draggable:A},dispatch:d,draggableNodes:v,over:Oe,measureDroppableContainers:ne}),[D,Ne,C,M,d,A,v,Oe,ne]);return N.createElement(Fh.Provider,{value:p},N.createElement(b_.Provider,{value:Fe},N.createElement(x_.Provider,{value:Pe},N.createElement(C_.Provider,{value:Ae},i)),N.createElement(Ite,{disabled:n?.restoreFocus===!1})),N.createElement(Bh,{...n,hiddenTextDescribedById:A}));function Ie(){let e=T?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),Bte=(0,N.createContext)(null),T_=`button`,Vte=`Draggable`;function Hte(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=bh(Vte),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,N.useContext)(b_),{role:p=T_,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,N.useContext)(g?C_:Bte),[v,y]=_h(),[b,x]=_h(),S=Ote(o,t),C=hh(n);return fh(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:C}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,N.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===T_?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}function E_(){return(0,N.useContext)(x_)}var Ute=`Droppable`,Wte={timeout:25};function Gte(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=bh(Ute),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,N.useContext)(b_),u=(0,N.useRef)({disabled:n}),d=(0,N.useRef)(!1),f=(0,N.useRef)(null),p=(0,N.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...Wte,...i},_=hh(h??r),v=c_({callback:(0,N.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=_h((0,N.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=hh(t);return(0,N.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,N.useEffect)(()=>(s({type:Vh.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:Vh.UnregisterDroppable,key:a,id:r})),[r]),(0,N.useEffect)(()=>{n!==u.current.disabled&&(s({type:Vh.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function Kte(e){let{animation:t,children:n}=e,[r,i]=(0,N.useState)(null),[a,o]=(0,N.useState)(null),s=vh(n);return!n&&!r&&s&&i(s),fh(()=>{if(!a)return;let e=r?.key,n=r?.props.id;if(e==null||n==null){i(null);return}Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),N.createElement(N.Fragment,null,n,r?(0,N.cloneElement)(r,{ref:o}):null)}var qte={x:0,y:0,scaleX:1,scaleY:1};function Jte(e){let{children:t}=e;return N.createElement(b_.Provider,{value:y_},N.createElement(C_.Provider,{value:qte},t))}var Yte={position:`fixed`,touchAction:`none`},Xte=e=>Th(e)?`transform 250ms ease`:void 0,Zte=(0,N.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=Xte}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...Yte,width:s.width,height:s.height,top:s.top,left:s.left,transform:Oh.Transform.toString(d),transformOrigin:i&&r?Gh(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return N.createElement(n,{className:o,style:f,ref:t},a)}),Qte={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Oh.Transform.toString(t)},{transform:Oh.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function $te(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return ph((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=g_(a);if(!c)return;let{transform:l}=sh(a).getComputedStyle(a),u=ng(l);if(!u)return;let d=typeof t==`function`?t:ene(t);return Tg(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function ene(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...Qte,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var D_=0;function tne(e){return(0,N.useMemo)(()=>{if(e!=null)return D_++,D_},[e])}var nne=N.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:m,droppableContainers:h,dragOverlay:g,over:_,measuringConfiguration:v,scrollableAncestors:y,scrollableAncestorRects:b,windowRect:x}=E_(),S=(0,N.useContext)(C_),C=tne(d?.id),w=S_(o,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:g.rect,over:_,overlayNodeRect:g.rect,scrollableAncestors:y,scrollableAncestorRects:b,transform:S,windowRect:x}),T=a_(f),E=$te({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),D=T?g.setRef:void 0;return N.createElement(Jte,null,N.createElement(Kte,{animation:E},d&&C?N.createElement(Zte,{key:C,id:d.id,ref:D,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:T,style:{zIndex:l,...i},transform:w},n):null))});function O_(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function rne(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function k_(e){return e!==null&&e>=0}function ine(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]!==t[n])return!1;return!0}function ane(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var A_=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=O_(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},j_={scaleX:1,scaleY:1},one=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...j_}:null}let s=sne(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...j_}:r<t&&r>=a?{x:0,y:o.height+s,...j_}:{x:0,y:0,...j_}};function sne(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var M_=`Sortable`,N_=N.createContext({activeIndex:-1,containerId:M_,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:A_,disabled:{draggable:!1,droppable:!1}});function cne(e){let{children:t,id:n,items:r,strategy:i=A_,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=E_(),d=bh(M_,n),f=s.rect!==null,p=(0,N.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,_=(0,N.useRef)(p),v=!ine(p,_.current),y=g!==-1&&h===-1||v,b=ane(a);fh(()=>{v&&m&&u(p)},[v,p,m,u]),(0,N.useEffect)(()=>{_.current=p},[p]);let x=(0,N.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:rne(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return N.createElement(N_.Provider,{value:x},t)}var lne=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return O_(n,r,i).indexOf(t)},une=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},dne={duration:200,easing:`ease`},P_=`transform`,fne=Oh.Transition.toString({property:P_,duration:0,easing:`linear`}),pne={roleDescription:`sortable`};function mne(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,N.useState)(null),s=(0,N.useRef)(n);return fh(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=ag(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,N.useEffect)(()=>{a&&o(null)},[a]),a}function F_(e){let{animateLayoutChanges:t=une,attributes:n,disabled:r,data:i,getNewIndex:a=lne,id:o,strategy:s,resizeObserverConfig:c,transition:l=dne}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,N.useContext)(N_),y=hne(r,p),b=u.indexOf(o),x=(0,N.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),S=(0,N.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:C,node:w,isOver:T,setNodeRef:E}=Gte({id:o,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...c}}),{active:D,activatorEvent:O,activeNodeRect:k,attributes:A,setNodeRef:ee,listeners:j,isDragging:te,over:ne,setActivatorNodeRef:re,transform:ie}=Hte({id:o,data:x,attributes:{...pne,...n},disabled:y.draggable}),ae=rh(E,ee),oe=!!D,se=oe&&!m&&k_(f)&&k_(g),M=!_&&te,ce=se?(M&&se?ie:null)??(s??v)({rects:h,activeNodeRect:k,activeIndex:f,overIndex:g,index:b}):null,le=k_(f)&&k_(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,ue=D?.id,de=(0,N.useRef)({activeId:ue,items:u,newIndex:le,containerId:d}),fe=u!==de.current.items,pe=t({active:D,containerId:d,isDragging:te,isSorting:oe,id:o,index:b,items:u,newIndex:de.current.newIndex,previousItems:de.current.items,previousContainerId:de.current.containerId,transition:l,wasDragging:de.current.activeId!=null}),me=mne({disabled:!pe,index:b,node:w,rect:C});return(0,N.useEffect)(()=>{oe&&de.current.newIndex!==le&&(de.current.newIndex=le),d!==de.current.containerId&&(de.current.containerId=d),u!==de.current.items&&(de.current.items=u)},[oe,le,d,u]),(0,N.useEffect)(()=>{if(ue===de.current.activeId)return;if(ue&&!de.current.activeId){de.current.activeId=ue;return}let e=setTimeout(()=>{de.current.activeId=ue},50);return()=>clearTimeout(e)},[ue]),{active:D,activeIndex:f,attributes:A,data:x,rect:C,index:b,newIndex:le,items:u,isOver:T,isSorting:oe,isDragging:te,listeners:j,node:w,overIndex:g,over:ne,setNodeRef:ae,setActivatorNodeRef:re,setDroppableNodeRef:E,setDraggableNodeRef:ee,transform:me??ce,transition:he()};function he(){if(me||fe&&de.current.newIndex===b)return fne;if(!(M&&!Th(O)||!l)&&(oe||pe))return Oh.Transition.toString({...l,property:P_})}}function hne(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}Pg.Down,Pg.Right,Pg.Up,Pg.Left;function I_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gne(e){if(Array.isArray(e))return I_(e)}function _ne(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function L_(e,t){if(e){if(typeof e==`string`)return I_(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I_(e,t):void 0}}function vne(){throw TypeError(`Invalid attempt to spread non-iterable instance.
18
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R_(e){return gne(e)||_ne(e)||L_(e)||vne()}function yne(e){if(Array.isArray(e))return e}function bne(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function xne(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
19
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z_(e,t){return yne(e)||bne(e,t)||L_(e,t)||xne()}function B_(e){var t=N.useRef();return t.current=e,N.useCallback(function(){var e,n=[...arguments];return(e=t.current)?.call.apply(e,[t].concat(n))},[])}function Sne(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}var V_=Sne()?N.useLayoutEffect:N.useEffect,H_=function(e,t){var n=N.useRef(!0);V_(function(){return e(n.current)},t),V_(function(){return n.current=!1,function(){n.current=!0}},[])},U_=function(e,t){H_(function(t){if(!t)return e()},t)},Cne=H_;function W_(e){var t=N.useRef(!1),n=z_(N.useState(e),2),r=n[0],i=n[1];N.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function a(e,n){n&&t.current||i(e)}return[r,a]}function G_(e){return e!==void 0}function wne(e,t){var n=t||{},r=n.defaultValue,i=n.value,a=n.onChange,o=n.postState,s=z_(W_(function(){return G_(i)?i:G_(r)?typeof r==`function`?r():r:typeof e==`function`?e():e}),2),c=s[0],l=s[1],u=i===void 0?c:i,d=o?o(u):u,f=B_(a),p=z_(W_([u]),2),m=p[0],h=p[1];return U_(function(){var e=m[0];c!==e&&f(c,e)},[m]),U_(function(){G_(i)||l(i)},[i]),[d,B_(function(e,t){l(e,t),h([u],t)})]}var K_={},Tne=[],Ene=function(e){Tne.push(e)};function Dne(e,t){}function One(e,t){}function kne(){K_={}}function q_(e,t,n){!t&&!K_[n]&&(e(!1,n),K_[n]=!0)}function J_(e,t){q_(Dne,e,t)}function Ane(e,t){q_(One,e,t)}J_.preMessage=Ene,J_.resetWarned=kne,J_.noteOnce=Ane;var Y_=J_;function jne(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function i(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=r.has(e);if(Y_(!o,`Warning: There may be circular references`),o)return!1;if(e===t)return!0;if(n&&a>1)return!1;r.add(e);var s=a+1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var c=0;c<e.length;c++)if(!i(e[c],t[c],s))return!1;return!0}if(e&&t&&di(e)===`object`&&di(t)===`object`){var l=Object.keys(e);return l.length===Object.keys(t).length?l.every(function(n){return i(e[n],t[n],s)}):!1}return!1}return i(e,t)}var Mne=jne;Vo();function X_(e,t){if(e==null)return{};var n,r,i=Bo(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Z_(e,t,n){return(e-t)/(n-t)}function Q_(e,t,n,r){var i=Z_(t,n,r),a={};switch(e){case`rtl`:a.right=`${i*100}%`,a.transform=`translateX(50%)`;break;case`btt`:a.bottom=`${i*100}%`,a.transform=`translateY(50%)`;break;case`ttb`:a.top=`${i*100}%`,a.transform=`translateY(-50%)`;break;default:a.left=`${i*100}%`,a.transform=`translateX(-50%)`;break}return a}function $_(e,t){return Array.isArray(e)?e[t]:e}var ev={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=ev.F1&&t<=ev.F12)return!1;switch(t){case ev.ALT:case ev.CAPS_LOCK:case ev.CONTEXT_MENU:case ev.CTRL:case ev.DOWN:case ev.END:case ev.ESC:case ev.HOME:case ev.INSERT:case ev.LEFT:case ev.MAC_FF_META:case ev.META:case ev.NUMLOCK:case ev.NUM_CENTER:case ev.PAGE_DOWN:case ev.PAGE_UP:case ev.PAUSE:case ev.PRINT_SCREEN:case ev.RIGHT:case ev.SHIFT:case ev.UP:case ev.WIN_KEY:case ev.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=ev.ZERO&&e<=ev.NINE||e>=ev.NUM_ZERO&&e<=ev.NUM_MULTIPLY||e>=ev.A&&e<=ev.Z||window.navigator.userAgent.indexOf(`WebKit`)!==-1&&e===0)return!0;switch(e){case ev.SPACE:case ev.QUESTION_MARK:case ev.NUM_PLUS:case ev.NUM_MINUS:case ev.NUM_PERIOD:case ev.NUM_DIVISION:case ev.SEMICOLON:case ev.DASH:case ev.EQUALS:case ev.COMMA:case ev.PERIOD:case ev.SLASH:case ev.APOSTROPHE:case ev.SINGLE_QUOTE:case ev.OPEN_SQUARE_BRACKET:case ev.BACKSLASH:case ev.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},tv=ev,nv=N.createContext({min:0,max:0,direction:`ltr`,step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),Nne=N.createContext({});Uo();var I=i(b()),Pne=[`prefixCls`,`value`,`valueIndex`,`onStartMove`,`onDelete`,`style`,`render`,`dragging`,`draggingDelete`,`onOffsetChange`,`onChangeComplete`,`onFocus`,`onMouseEnter`],rv=N.forwardRef(function(e,t){var n=e.prefixCls,r=e.value,i=e.valueIndex,a=e.onStartMove,o=e.onDelete,s=e.style,c=e.render,l=e.dragging,u=e.draggingDelete,d=e.onOffsetChange,f=e.onChangeComplete,p=e.onFocus,m=e.onMouseEnter,h=X_(e,Pne),g=N.useContext(nv),_=g.min,v=g.max,y=g.direction,b=g.disabled,x=g.keyboard,S=g.range,C=g.tabIndex,w=g.ariaLabelForHandle,T=g.ariaLabelledByForHandle,E=g.ariaRequired,D=g.ariaValueTextFormatterForHandle,O=g.styles,k=g.classNames,A=`${n}-handle`,ee=function(e){b||a(e,i)},j=function(e){p?.(e,i)},te=function(e){m(e,i)},ne=function(e){if(!b&&x){var t=null;switch(e.which||e.keyCode){case tv.LEFT:t=y===`ltr`||y===`btt`?-1:1;break;case tv.RIGHT:t=y===`ltr`||y===`btt`?1:-1;break;case tv.UP:t=y===`ttb`?-1:1;break;case tv.DOWN:t=y===`ttb`?1:-1;break;case tv.HOME:t=`min`;break;case tv.END:t=`max`;break;case tv.PAGE_UP:t=2;break;case tv.PAGE_DOWN:t=-2;break;case tv.BACKSPACE:case tv.DELETE:o?.(i);break}t!==null&&(e.preventDefault(),d(t,i))}},re=function(e){switch(e.which||e.keyCode){case tv.LEFT:case tv.RIGHT:case tv.UP:case tv.DOWN:case tv.HOME:case tv.END:case tv.PAGE_UP:case tv.PAGE_DOWN:f?.();break}},ie=Q_(y,r,_,v),ae={};i!==null&&(ae={tabIndex:b?null:$_(C,i),role:`slider`,"aria-valuemin":_,"aria-valuemax":v,"aria-valuenow":r,"aria-disabled":b,"aria-label":$_(w,i),"aria-labelledby":$_(T,i),"aria-required":$_(E,i),"aria-valuetext":$_(D,i)?.(r),"aria-orientation":y===`ltr`||y===`rtl`?`horizontal`:`vertical`,onMouseDown:ee,onTouchStart:ee,onFocus:j,onMouseEnter:te,onKeyDown:ne,onKeyUp:re});var oe=N.createElement(`div`,Ho({ref:t,className:(0,I.default)(A,mi(mi(mi({},`${A}-${i+1}`,i!==null&&S),`${A}-dragging`,l),`${A}-dragging-delete`,u),k.handle),style:gi(gi(gi({},ie),s),O.handle)},ae,h));return c&&(oe=c(oe,{index:i,prefixCls:n,value:r,dragging:l,draggingDelete:u})),oe});Uo();var Fne=[`prefixCls`,`style`,`onStartMove`,`onOffsetChange`,`values`,`handleRender`,`activeHandleRender`,`draggingIndex`,`draggingDelete`,`onFocus`],Ine=N.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.onStartMove,a=e.onOffsetChange,o=e.values,s=e.handleRender,c=e.activeHandleRender,l=e.draggingIndex,u=e.draggingDelete,d=e.onFocus,f=X_(e,Fne),p=N.useRef({}),m=z_(N.useState(!1),2),h=m[0],g=m[1],_=z_(N.useState(-1),2),v=_[0],y=_[1],b=function(e){y(e),g(!0)},x=function(e,t){b(t),d?.(e)},S=function(e,t){b(t)};N.useImperativeHandle(t,function(){return{focus:function(e){var t;(t=p.current[e])==null||t.focus()},hideHelp:function(){(0,Nl.flushSync)(function(){g(!1)})}}});var C=gi({prefixCls:n,onStartMove:i,onOffsetChange:a,render:s,onFocus:x,onMouseEnter:S},f);return N.createElement(N.Fragment,null,o.map(function(e,t){var n=l===t;return N.createElement(rv,Ho({ref:function(e){e?p.current[t]=e:delete p.current[t]},dragging:n,draggingDelete:n&&u,style:$_(r,t),key:t,value:e,valueIndex:t},C))}),c&&h&&N.createElement(rv,Ho({key:`a11y`},C,{value:o[v],valueIndex:null,dragging:l!==-1,draggingDelete:u,render:c,style:{pointerEvents:`none`},tabIndex:null,"aria-hidden":!0})))}),Lne=function(e){var t=e.prefixCls,n=e.style,r=e.children,i=e.value,a=e.onClick,o=N.useContext(nv),s=o.min,c=o.max,l=o.direction,u=o.includedStart,d=o.includedEnd,f=o.included,p=`${t}-text`,m=Q_(l,i,s,c);return N.createElement(`span`,{className:(0,I.default)(p,mi({},`${p}-active`,f&&u<=i&&i<=d)),style:gi(gi({},m),n),onMouseDown:function(e){e.stopPropagation()},onClick:function(){a(i)}},r)},Rne=function(e){var t=e.prefixCls,n=e.marks,r=e.onClick,i=`${t}-mark`;return n.length?N.createElement(`div`,{className:i},n.map(function(e){var t=e.value,n=e.style,a=e.label;return N.createElement(Lne,{key:t,prefixCls:i,style:n,value:t,onClick:r},a)})):null},zne=function(e){var t=e.prefixCls,n=e.value,r=e.style,i=e.activeStyle,a=N.useContext(nv),o=a.min,s=a.max,c=a.direction,l=a.included,u=a.includedStart,d=a.includedEnd,f=`${t}-dot`,p=l&&u<=n&&n<=d,m=gi(gi({},Q_(c,n,o,s)),typeof r==`function`?r(n):r);return p&&(m=gi(gi({},m),typeof i==`function`?i(n):i)),N.createElement(`span`,{className:(0,I.default)(f,mi({},`${f}-active`,p)),style:m})},Bne=function(e){var t=e.prefixCls,n=e.marks,r=e.dots,i=e.style,a=e.activeStyle,o=N.useContext(nv),s=o.min,c=o.max,l=o.step,u=N.useMemo(function(){var e=new Set;if(n.forEach(function(t){e.add(t.value)}),r&&l!==null)for(var t=s;t<=c;)e.add(t),t+=l;return Array.from(e)},[s,c,l,r,n]);return N.createElement(`div`,{className:`${t}-step`},u.map(function(e){return N.createElement(zne,{prefixCls:t,key:e,value:e,style:i,activeStyle:a})}))},iv=function(e){var t=e.prefixCls,n=e.style,r=e.start,i=e.end,a=e.index,o=e.onStartMove,s=e.replaceCls,c=N.useContext(nv),l=c.direction,u=c.min,d=c.max,f=c.disabled,p=c.range,m=c.classNames,h=`${t}-track`,g=Z_(r,u,d),_=Z_(i,u,d),v=function(e){!f&&o&&o(e,-1)},y={};switch(l){case`rtl`:y.right=`${g*100}%`,y.width=`${_*100-g*100}%`;break;case`btt`:y.bottom=`${g*100}%`,y.height=`${_*100-g*100}%`;break;case`ttb`:y.top=`${g*100}%`,y.height=`${_*100-g*100}%`;break;default:y.left=`${g*100}%`,y.width=`${_*100-g*100}%`}var b=s||(0,I.default)(h,mi(mi({},`${h}-${a+1}`,a!==null&&p),`${t}-track-draggable`,o),m.track);return N.createElement(`div`,{className:b,style:gi(gi({},y),n),onMouseDown:v,onTouchStart:v})},Vne=function(e){var t=e.prefixCls,n=e.style,r=e.values,i=e.startPoint,a=e.onStartMove,o=N.useContext(nv),s=o.included,c=o.range,l=o.min,u=o.styles,d=o.classNames,f=N.useMemo(function(){if(!c){if(r.length===0)return[];var e=i??l,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],a=0;a<r.length-1;a+=1)n.push({start:r[a],end:r[a+1]});return n},[r,c,i,l]);if(!s)return null;var p=f!=null&&f.length&&(d.tracks||u.tracks)?N.createElement(iv,{index:null,prefixCls:t,start:f[0].start,end:f[f.length-1].end,replaceCls:(0,I.default)(d.tracks,`${t}-tracks`),style:u.tracks}):null;return N.createElement(N.Fragment,null,p,f.map(function(e,r){var i=e.start,o=e.end;return N.createElement(iv,{index:r,prefixCls:t,style:gi(gi({},$_(n,r)),u.track),start:i,end:o,key:r,onStartMove:a})}))},Hne=130;function av(e){var t=`targetTouches`in e?e.targetTouches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function Une(e,t,n,r,i,a,o,s,c,l,u){var d=z_(N.useState(null),2),f=d[0],p=d[1],m=z_(N.useState(-1),2),h=m[0],g=m[1],_=z_(N.useState(!1),2),v=_[0],y=_[1],b=z_(N.useState(n),2),x=b[0],S=b[1],C=z_(N.useState(n),2),w=C[0],T=C[1],E=N.useRef(null),D=N.useRef(null),O=N.useRef(null),k=N.useContext(Nne),A=k.onDragStart,ee=k.onDragChange;Cne(function(){h===-1&&S(n)},[n,h]),N.useEffect(function(){return function(){document.removeEventListener(`mousemove`,E.current),document.removeEventListener(`mouseup`,D.current),O.current&&(O.current.removeEventListener(`touchmove`,E.current),O.current.removeEventListener(`touchend`,D.current))}},[]);var j=function(e,t,n){t!==void 0&&p(t),S(e);var r=e;n&&(r=e.filter(function(e,t){return t!==h})),o(r),ee&&ee({rawValues:e,deleteIndex:n?h:-1,draggingIndex:h,draggingValue:t})},te=B_(function(e,t,n){if(e===-1){var o=w[0],s=w[w.length-1],l=r-o,u=i-s,d=t*(i-r);d=Math.max(d,l),d=Math.min(d,u),d=a(o+d)-o,j(w.map(function(e){return e+d}))}else{var f=(i-r)*t,p=R_(x);p[e]=w[e];var m=c(p,f,e,`dist`);j(m.values,m.value,n)}});return[h,f,v,N.useMemo(function(){var e=R_(n).sort(function(e,t){return e-t}),t=R_(x).sort(function(e,t){return e-t}),r={};t.forEach(function(e){r[e]=(r[e]||0)+1}),e.forEach(function(e){r[e]=(r[e]||0)-1});var i=l?1:0;return Object.values(r).reduce(function(e,t){return e+Math.abs(t)},0)<=i?x:n},[n,x,l]),function(r,i,a){r.stopPropagation();var o=a||n,c=o[i];g(i),p(c),T(o),S(o),y(!1);var d=av(r),f=d.pageX,m=d.pageY,h=!1;A&&A({rawValues:o,draggingIndex:i,draggingValue:c});var _=function(n){n.preventDefault();var r=av(n),a=r.pageX,o=r.pageY,s=a-f,c=o-m,d=e.current.getBoundingClientRect(),p=d.width,g=d.height,_,v;switch(t){case`btt`:_=-c/g,v=s;break;case`ttb`:_=c/g,v=s;break;case`rtl`:_=-s/p,v=c;break;default:_=s/p,v=c}h=l?Math.abs(v)>Hne&&u<x.length:!1,y(h),te(i,_,h)},v=function e(t){t.preventDefault(),document.removeEventListener(`mouseup`,e),document.removeEventListener(`mousemove`,_),O.current&&(O.current.removeEventListener(`touchmove`,E.current),O.current.removeEventListener(`touchend`,D.current)),E.current=null,D.current=null,O.current=null,s(h),g(-1),y(!1)};document.addEventListener(`mouseup`,v),document.addEventListener(`mousemove`,_),r.currentTarget.addEventListener(`touchend`,v),r.currentTarget.addEventListener(`touchmove`,_),E.current=_,D.current=v,O.current=r.currentTarget}]}var ov=Une;function sv(e,t,n,r,i,a){var o=N.useCallback(function(n){return Math.max(e,Math.min(t,n))},[e,t]),s=N.useCallback(function(r){if(n!==null){var i=e+Math.round((o(r)-e)/n)*n,a=function(e){return(String(e).split(`.`)[1]||``).length},s=Math.max(a(n),a(t),a(e)),c=Number(i.toFixed(s));return e<=c&&c<=t?c:null}return null},[n,e,t,o]),c=N.useCallback(function(i){var a=o(i),c=r.map(function(e){return e.value});n!==null&&c.push(s(i)),c.push(e,t);var l=c[0],u=t-e;return c.forEach(function(e){var t=Math.abs(a-e);t<=u&&(l=e,u=t)}),l},[e,t,r,n,o,s]),l=function i(a,o,c){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`unit`;if(typeof o==`number`){var u,d=a[c],f=d+o,p=[];r.forEach(function(e){p.push(e.value)}),p.push(e,t),p.push(s(d));var m=o>0?1:-1;l===`unit`?p.push(s(d+m*n)):p.push(s(f)),p=p.filter(function(e){return e!==null}).filter(function(e){return o<0?e<=d:e>=d}),l===`unit`&&(p=p.filter(function(e){return e!==d}));var h=l===`unit`?d:f;u=p[0];var g=Math.abs(u-h);if(p.forEach(function(e){var t=Math.abs(e-h);t<g&&(u=e,g=t)}),u===void 0)return o<0?e:t;if(l===`dist`)return u;if(Math.abs(o)>1){var _=R_(a);return _[c]=u,i(_,o-m,c,l)}return u}else if(o===`min`)return e;else if(o===`max`)return t},u=function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`unit`,i=e[n],a=l(e,t,n,r);return{value:a,changed:a!==i}},d=function(e){return a===null&&e===0||typeof a==`number`&&e<a};return[c,function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`unit`,o=e.map(c),s=o[n];if(o[n]=l(o,t,n,r),i===!1){var f=a||0;n>0&&o[n-1]!==s&&(o[n]=Math.max(o[n],o[n-1]+f)),n<o.length-1&&o[n+1]!==s&&(o[n]=Math.min(o[n],o[n+1]-f))}else if(typeof a==`number`||a===null){for(var p=n+1;p<o.length;p+=1)for(var m=!0;d(o[p]-o[p-1])&&m;){var h=u(o,1,p);o[p]=h.value,m=h.changed}for(var g=n;g>0;--g)for(var _=!0;d(o[g]-o[g-1])&&_;){var v=u(o,-1,g-1);o[g-1]=v.value,_=v.changed}for(var y=o.length-1;y>0;--y)for(var b=!0;d(o[y]-o[y-1])&&b;){var x=u(o,-1,y-1);o[y-1]=x.value,b=x.changed}for(var S=0;S<o.length-1;S+=1)for(var C=!0;d(o[S+1]-o[S])&&C;){var w=u(o,1,S+1);o[S+1]=w.value,C=w.changed}}return{value:o[n],values:o}}]}function cv(e){return(0,N.useMemo)(function(){if(e===!0||!e)return[!!e,!1,!1,0];var t=e.editable,n=e.draggableTrack,r=e.minCount,i=e.maxCount;return[!0,t,!t&&n,r||0,i]},[e])}var Wne=N.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?`rc-slider`:n,i=e.className,a=e.style,o=e.classNames,s=e.styles,c=e.id,l=e.disabled,u=l===void 0?!1:l,d=e.keyboard,f=d===void 0?!0:d,p=e.autoFocus,m=e.onFocus,h=e.onBlur,g=e.min,_=g===void 0?0:g,v=e.max,y=v===void 0?100:v,b=e.step,x=b===void 0?1:b,S=e.value,C=e.defaultValue,w=e.range,T=e.count,E=e.onChange,D=e.onBeforeChange,O=e.onAfterChange,k=e.onChangeComplete,A=e.allowCross,ee=A===void 0?!0:A,j=e.pushable,te=j===void 0?!1:j,ne=e.reverse,re=e.vertical,ie=e.included,ae=ie===void 0?!0:ie,oe=e.startPoint,se=e.trackStyle,M=e.handleStyle,ce=e.railStyle,le=e.dotStyle,ue=e.activeDotStyle,de=e.marks,fe=e.dots,pe=e.handleRender,me=e.activeHandleRender,he=e.track,ge=e.tabIndex,_e=ge===void 0?0:ge,ve=e.ariaLabelForHandle,ye=e.ariaLabelledByForHandle,be=e.ariaRequired,xe=e.ariaValueTextFormatterForHandle,Se=N.useRef(null),Ce=N.useRef(null),we=N.useMemo(function(){return re?ne?`ttb`:`btt`:ne?`rtl`:`ltr`},[ne,re]),Te=z_(cv(w),5),Ee=Te[0],De=Te[1],Oe=Te[2],ke=Te[3],Ae=Te[4],je=N.useMemo(function(){return isFinite(_)?_:0},[_]),Me=N.useMemo(function(){return isFinite(y)?y:100},[y]),Ne=N.useMemo(function(){return x!==null&&x<=0?1:x},[x]),Pe=N.useMemo(function(){return typeof te==`boolean`?te?Ne:!1:te>=0?te:!1},[te,Ne]),Fe=N.useMemo(function(){return Object.keys(de||{}).map(function(e){var t=de[e],n={value:Number(e)};return t&&di(t)===`object`&&!N.isValidElement(t)&&(`label`in t||`style`in t)?(n.style=t.style,n.label=t.label):n.label=t,n}).filter(function(e){var t=e.label;return t||typeof t==`number`}).sort(function(e,t){return e.value-t.value})},[de]),Ie=z_(sv(je,Me,Ne,Fe,ee,Pe),2),Le=Ie[0],Re=Ie[1],ze=z_(wne(C,{value:S}),2),Be=ze[0],Ve=ze[1],He=N.useMemo(function(){var e=Be==null?[]:Array.isArray(Be)?Be:[Be],t=z_(e,1)[0],n=Be===null?[]:[t===void 0?je:t];if(Ee){if(n=R_(e),T||Be===void 0){var r=T>=0?T+1:2;for(n=n.slice(0,r);n.length<r;)n.push(n[n.length-1]??je)}n.sort(function(e,t){return e-t})}return n.forEach(function(e,t){n[t]=Le(e)}),n},[Be,Ee,je,T,Le]),Ue=function(e){return Ee?e:e[0]},We=B_(function(e){var t=R_(e).sort(function(e,t){return e-t});E&&!Mne(t,He,!0)&&E(Ue(t)),Ve(t)}),Ge=B_(function(e){e&&Se.current.hideHelp();var t=Ue(He);O?.(t),Y_(!O,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),k?.(t)}),Ke=function(e){if(!(u||!De||He.length<=ke)){var t=R_(He);t.splice(e,1),D?.(Ue(t)),We(t);var n=Math.max(0,e-1);Se.current.hideHelp(),Se.current.focus(n)}},qe=z_(ov(Ce,we,He,je,Me,Le,We,Ge,Re,De,ke),5),Je=qe[0],Ye=qe[1],Xe=qe[2],Ze=qe[3],Qe=qe[4],$e=function(e,t){if(!u){var n=R_(He),r=0,i=0,a=Me-je;He.forEach(function(t,n){var o=Math.abs(e-t);o<=a&&(a=o,r=n),t<e&&(i=n)});var o=r;De&&a!==0&&(!Ae||He.length<Ae)?(n.splice(i+1,0,e),o=i+1):n[r]=e,Ee&&!He.length&&T===void 0&&n.push(e);var s=Ue(n);if(D?.(s),We(n),t){var c,l;(c=document.activeElement)==null||(l=c.blur)==null||l.call(c),Se.current.focus(o),Qe(t,o,n)}else O?.(s),Y_(!O,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),k?.(s)}},et=function(e){e.preventDefault();var t=Ce.current.getBoundingClientRect(),n=t.width,r=t.height,i=t.left,a=t.top,o=t.bottom,s=t.right,c=e.clientX,l=e.clientY,u;switch(we){case`btt`:u=(o-l)/r;break;case`ttb`:u=(l-a)/r;break;case`rtl`:u=(s-c)/n;break;default:u=(c-i)/n}$e(Le(je+u*(Me-je)),e)},tt=z_(N.useState(null),2),nt=tt[0],rt=tt[1],it=function(e,t){if(!u){var n=Re(He,e,t);D?.(Ue(He)),We(n.values),rt(n.value)}};N.useEffect(function(){if(nt!==null){var e=He.indexOf(nt);e>=0&&Se.current.focus(e)}rt(null)},[nt]);var at=N.useMemo(function(){return Oe&&Ne===null?!1:Oe},[Oe,Ne]),ot=B_(function(e,t){Qe(e,t),D?.(Ue(He))}),st=Je!==-1;N.useEffect(function(){if(!st){var e=He.lastIndexOf(Ye);Se.current.focus(e)}},[st]);var ct=N.useMemo(function(){return R_(Ze).sort(function(e,t){return e-t})},[Ze]),lt=z_(N.useMemo(function(){return Ee?[ct[0],ct[ct.length-1]]:[je,ct[0]]},[ct,Ee,je]),2),ut=lt[0],dt=lt[1];N.useImperativeHandle(t,function(){return{focus:function(){Se.current.focus(0)},blur:function(){var e,t=document.activeElement;(e=Ce.current)!=null&&e.contains(t)&&t?.blur()}}}),N.useEffect(function(){p&&Se.current.focus(0)},[]);var ft=N.useMemo(function(){return{min:je,max:Me,direction:we,disabled:u,keyboard:f,step:Ne,included:ae,includedStart:ut,includedEnd:dt,range:Ee,tabIndex:_e,ariaLabelForHandle:ve,ariaLabelledByForHandle:ye,ariaRequired:be,ariaValueTextFormatterForHandle:xe,styles:s||{},classNames:o||{}}},[je,Me,we,u,f,Ne,ae,ut,dt,Ee,_e,ve,ye,be,xe,s,o]);return N.createElement(nv.Provider,{value:ft},N.createElement(`div`,{ref:Ce,className:(0,I.default)(r,i,mi(mi(mi(mi({},`${r}-disabled`,u),`${r}-vertical`,re),`${r}-horizontal`,!re),`${r}-with-marks`,Fe.length)),style:a,onMouseDown:et,id:c},N.createElement(`div`,{className:(0,I.default)(`${r}-rail`,o?.rail),style:gi(gi({},ce),s?.rail)}),he!==!1&&N.createElement(Vne,{prefixCls:r,style:se,values:He,startPoint:oe,onStartMove:at?ot:void 0}),N.createElement(Bne,{prefixCls:r,marks:Fe,dots:fe,style:le,activeStyle:ue}),N.createElement(Ine,{ref:Se,prefixCls:r,style:M,values:Ze,draggingIndex:Je,draggingDelete:Xe,onStartMove:ot,onOffsetChange:it,onFocus:m,onBlur:h,handleRender:pe,activeHandleRender:me,onChangeComplete:Ge,onDelete:De?Ke:void 0}),N.createElement(Rne,{prefixCls:r,marks:Fe,onClick:$e})))}),lv=n(((e,t)=>{var n=typeof Element<`u`,r=typeof Map==`function`,i=typeof Set==`function`,a=typeof ArrayBuffer==`function`&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;var s,c,l;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(!o(e[c],t[c]))return!1;return!0}var u;if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;for(u=e.entries();!(c=u.next()).done;)if(!o(c.value[1],t.get(c.value[0])))return!1;return!0}if(i&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf==`function`&&typeof t.valueOf==`function`)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString==`function`&&typeof t.toString==`function`)return e.toString()===t.toString();if(l=Object.keys(e),s=l.length,s!==Object.keys(t).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[c]))return!1;if(n&&e instanceof Element)return!1;for(c=s;c--!==0;)if(!((l[c]===`_owner`||l[c]===`__v`||l[c]===`__o`)&&e.$$typeof)&&!o(e[l[c]],t[l[c]]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||``).match(/stack|recursion/i))return console.warn(`react-fast-compare cannot handle circular refs`),!1;throw e}}}));function uv(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o;n.key&&n.debug?.call(n)&&(o=Date.now());let s=e();if(!(s.length!==r.length||s.some((e,t)=>r[t]!==e)))return i;r=s;let c;if(n.key&&n.debug?.call(n)&&(c=Date.now()),i=t(...s),n.key&&n.debug?.call(n)){let e=Math.round((Date.now()-o)*100)/100,t=Math.round((Date.now()-c)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
20
- font-size: .6rem;
21
- font-weight: bold;
22
- color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i}return o.updateDeps=e=>{r=e},o}function dv(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var fv=(e,t)=>Math.abs(e-t)<1.01,Gne=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},pv=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},mv=e=>e,hv=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},gv=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(pv(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(pv(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},_v={passive:!0},vv=typeof window>`u`?!0:`onscrollend`in window,yv=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&vv?()=>void 0:Gne(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:s}=e.options;i=o?n.scrollLeft*(s&&-1||1):n.scrollTop,a(),t(i,r)},s=o(!0),c=o(!1);n.addEventListener(`scroll`,s,_v);let l=e.options.useScrollendEvent&&vv;return l&&n.addEventListener(`scrollend`,c,_v),()=>{n.removeEventListener(`scroll`,s),l&&n.removeEventListener(`scrollend`,c)}},bv=(e,t,n)=>{if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},xv=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;let o=e+t;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:o,behavior:n})},Sv=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{n===void 0&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:mv,rangeExtractor:hv,onChange:()=>{},measureElement:bv,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=uv(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.end<a.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=uv(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,n,r,i,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a}),{key:!1}),this.getMeasurements=uv(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a},o)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let s=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let c=this.measurementsCache.slice(0,s),l=Array(a).fill(void 0);for(let e=0;e<s;e++){let t=c[e];t&&(l[t.lane]=e)}for(let i=s;i<e;i++){let e=r(i),a=this.laneAssignments.get(i),s,u;if(a!==void 0&&this.options.lanes>1){s=a;let e=l[s],r=e===void 0?void 0:c[e];u=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?c[i-1]:this.getFurthestMeasurement(c,i);u=e?e.end+this.options.gap:t+n,s=e?e.lane:i%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(i,s)}let d=o.get(e),f=typeof d==`number`?d:this.options.estimateSize(i),p=u+f;c[i]={index:i,start:u,size:f,end:p,key:e,lane:s},l[s]=i}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=uv(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?wv({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=uv(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{let n=this.indexFromElement(e),r=this.measurementsCache[n];if(!r)return;let i=r.key,a=this.elementsCache.get(i);a!==e&&(a&&this.observer.unobserve(a),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{let n=this.measurementsCache[e];if(!n)return;let r=t-(this.itemSizeCache.get(n.key)??n.size);r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange===void 0?n.start<this.getScrollOffset()+this.scrollAdjustments:this.shouldAdjustScrollPositionOnItemSizeChange(n,r,this))&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}this._measureElement(e,void 0)},this.getVirtualItems=uv(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length!==0)return dv(t[Cv(0,t.length-1,e=>dv(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.measurementsCache[e];if(!n)return;let r=this.getSize(),i=this.getScrollOffset();if(t===`auto`)if(n.end>=i+r-this.options.scrollPaddingEnd)t=`end`;else if(n.start<=i+this.options.scrollPaddingStart)t=`start`;else return[i,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,n.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:t=`start`,behavior:n}={})=>{n===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t=`auto`,behavior:n}={})=>{n===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1)),this.currentScrollToIndex=e;let r=0,i=t=>{if(!this.targetWindow)return;let r=this.getOffsetForIndex(e,t);if(!r){console.warn(`Failed to get offset for index:`,e);return}let[i,o]=r;this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.targetWindow.requestAnimationFrame(()=>{let t=()=>{if(this.currentScrollToIndex!==e)return;let t=this.getScrollOffset(),n=this.getOffsetForIndex(e,o);if(!n){console.warn(`Failed to get offset for index:`,e);return}fv(n[0],t)||a(o)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(t):t()})},a=t=>{this.targetWindow&&this.currentScrollToIndex===e&&(r++,r<10?this.targetWindow.requestAnimationFrame(()=>i(t)):console.warn(`Failed to scroll to index ${e} after 10 attempts.`))};i(t)},this.scrollBy=(e,{behavior:t}={})=>{t===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=e[e.length-1]?.end??0;else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}},Cv=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function wv({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,a=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let o=Cv(0,i,a,n),s=o;if(r===1)for(;s<i&&e[s].end<n+t;)s++;else if(r>1){let a=Array(r).fill(0);for(;s<i&&a.some(e=>e<n+t);){let t=e[s];a[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(i,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var Tv=typeof document<`u`?N.useLayoutEffect:N.useEffect;function Ev({useFlushSync:e=!0,...t}){let n=N.useReducer(()=>({}),{})[1],r={...t,onChange:(r,i)=>{var a;e&&i?(0,Nl.flushSync)(n):n(),(a=t.onChange)==null||a.call(t,r,i)}},[i]=N.useState(()=>new Sv(r));return i.setOptions(r),Tv(()=>i._didMount(),[]),Tv(()=>i._willUpdate()),i}function Dv(e){return Ev({observeElementRect:gv,observeElementOffset:yv,scrollToFn:xv,...e})}var Ov=n((e=>{e.__esModule=!0;function t(e,t){return e*e+t*t}function n(e,n){return t(e[0]-n[0],e[1]-n[1])}function r(e,n,r){var i=n[0],a=n[1],o=r[0]-i,s=r[1]-a;if(o!==0||s!==0){var c=((e[0]-i)*o+(e[1]-a)*s)/t(o,s);c>1?(i=r[0],a=r[1]):c>0&&(i+=o*c,a+=s*c)}return t(e[0]-i,e[1]-a)}function i(e,t){for(var r=e[0],i,a=[r],o=1,s=e.length;o<s;o++)i=e[o],n(i,r)>t&&(a.push(i),r=i);return r!==i&&a.push(i),a}function a(e,t,n,i,o){for(var s=i,c,l=t+1;l<n;l++){var u=r(e[l],e[t],e[n]);u>s&&(c=l,s=u)}s>i&&(c-t>1&&a(e,t,c,i,o),o.push(e[c]),n-c>1&&a(e,c,n,i,o))}function o(e,t){var n=e.length-1,r=[e[0]];return a(e,0,n,t,r),r.push(e[n]),r}function s(e,t,n){if(t===void 0&&(t=1),n===void 0&&(n=!1),e.length<=2)return e;var r=t*t;return e=n?e:i(e,r),e=o(e,r),e}e.SimplifyAP=s})),kv=n((e=>{e.__esModule=!0;function t(e,t){return e*e+t*t}function n(e,n){return t(e.longitude-n.longitude,e.latitude-n.latitude)}function r(e,n,r){var i=n.longitude,a=n.latitude,o=r.longitude-i,s=r.latitude-a;if(o!==0||s!==0){var c=((e.longitude-i)*o+(e.latitude-a)*s)/t(o,s);c>1?(i=r.longitude,a=r.latitude):c>0&&(i+=o*c,a+=s*c)}return t(e.longitude-i,e.latitude-a)}function i(e,t){for(var r=e[0],i,a=[r],o=1,s=e.length;o<s;o++)i=e[o],n(i,r)>t&&(a.push(i),r=i);return r!==i&&a.push(i),a}function a(e,t,n,i,o){for(var s=i,c,l=t+1;l<n;l++){var u=r(e[l],e[t],e[n]);u>s&&(c=l,s=u)}s>i&&(c-t>1&&a(e,t,c,i,o),o.push(e[c]),n-c>1&&a(e,c,n,i,o))}function o(e,t){var n=e.length-1,r=[e[0]];return a(e,0,n,t,r),r.push(e[n]),r}function s(e,t,n){if(t===void 0&&(t=1),n===void 0&&(n=!1),e.length<=2)return e;var r=t*t;return e=n?e:i(e,r),e=o(e,r),e}e.SimplifyLL=s})),Av=n((e=>{e.__esModule=!0;function t(e,t){return e*e+t*t}function n(e,n){return t(e.x-n.x,e.y-n.y)}function r(e,n,r){var i=n.x,a=n.y,o=r.x-i,s=r.y-a;if(o!==0||s!==0){var c=((e.x-i)*o+(e.y-a)*s)/t(o,s);c>1?(i=r.x,a=r.y):c>0&&(i+=o*c,a+=s*c)}return t(e.x-i,e.y-a)}function i(e,t){for(var r=e[0],i,a=[r],o=1,s=e.length;o<s;o++)i=e[o],n(i,r)>t&&(a.push(i),r=i);return r!==i&&a.push(i),a}function a(e,t,n,i,o){for(var s=i,c,l=t+1;l<n;l++){var u=r(e[l],e[t],e[n]);u>s&&(c=l,s=u)}s>i&&(c-t>1&&a(e,t,c,i,o),o.push(e[c]),n-c>1&&a(e,c,n,i,o))}function o(e,t){var n=e.length-1,r=[e[0]];return a(e,0,n,t,r),r.push(e[n]),r}function s(e,t,n){if(t===void 0&&(t=1),n===void 0&&(n=!1),e.length<=2)return e;var r=t*t;return e=n?e:i(e,r),e=o(e,r),e}e.Simplify=s})),jv=n((e=>{e.__esModule=!0,e.SimplifyAP=Ov().SimplifyAP,e.SimplifyLL=kv().SimplifyLL,e.Simplify=Av().Simplify})),Kne=n(((e,t)=>{((n,r)=>{typeof define==`function`&&define.amd?define([],r):typeof t==`object`&&e!==void 0?t.exports=r():n.Papa=r()})(e,function e(){var t=typeof self<`u`?self:typeof window<`u`?window:t===void 0?{}:t,n,r=!t.document&&!!t.postMessage,i=t.IS_PAPA_WORKER||!1,a={},o=0,s={};function c(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine=``,this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=y(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new p(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,n){var r=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<r){let t=this._config.newline;t||=(a=this._config.quoteChar||`"`,this._handle.guessLineEndings(e,a)),e=[...e.split(t).slice(r)].join(t)}this.isFirstChunk&&x(this._config.beforeFirstChunk)&&(a=this._config.beforeFirstChunk(e))!==void 0&&(e=a),this.isFirstChunk=!1,this._halted=!1;var r=this._partialLine+e,a=(this._partialLine=``,this._handle.parse(r,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=a.meta.cursor,r=(this._finished||(this._partialLine=r.substring(e-this._baseIndex),this._baseIndex=e),a&&a.data&&(this._rowCount+=a.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),i)t.postMessage({results:a,workerId:s.WORKER_ID,finished:r});else if(x(this._config.chunk)&&!n){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=a=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!r||!x(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),r||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){x(this._config.error)?this._config.error(e):i&&this._config.error&&t.postMessage({workerId:s.WORKER_ID,error:e,finished:!1})}}function l(e){var t;(e||={}).chunkSize||(e.chunkSize=s.RemoteChunkSize),c.call(this,e),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),r||(t.onload=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)),t.open(this._config.downloadRequestBody?`POST`:`GET`,this._input,!r),this._config.downloadRequestHeaders){var e,n=this._config.downloadRequestHeaders;for(e in n)t.setRequestHeader(e,n[e])}var i;this._config.chunkSize&&(i=this._start+this._config.chunkSize-1,t.setRequestHeader(`Range`,`bytes=`+this._start+`-`+i));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}r&&t.status===0&&this._chunkError()}},this._chunkLoaded=function(){t.readyState===4&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(e=>(e=e.getResponseHeader(`Content-Range`))===null?-1:parseInt(e.substring(e.lastIndexOf(`/`)+1)))(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(Error(e))}}function u(e){(e||={}).chunkSize||(e.chunkSize=s.LocalChunkSize),c.call(this,e);var t,n,r=typeof FileReader<`u`;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input,i=(this._config.chunkSize&&(i=Math.min(this._start+this._config.chunkSize,this._input.size),e=n.call(e,this._start,i)),t.readAsText(e,this._config.encoding));r||this._chunkLoaded({target:{result:i}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function d(e){var t;c.call(this,e||={}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,n;if(!this._finished)return e=this._config.chunkSize,t=e?(n=t.substring(0,e),t.substring(e)):(n=t,``),this._finished=!t,this.parseChunk(n)}}function f(e){c.call(this,e||={});var t=[],n=!0,r=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on(`data`,this._streamData),this._input.on(`end`,this._streamEnd),this._input.on(`error`,this._streamError)},this._checkIsFinished=function(){r&&t.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=b(function(e){try{t.push(typeof e==`string`?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=b(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=b(function(){this._streamCleanUp(),r=!0,this._streamData(``)},this),this._streamCleanUp=b(function(){this._input.removeListener(`data`,this._streamData),this._input.removeListener(`end`,this._streamEnd),this._input.removeListener(`error`,this._streamError)},this)}function p(e){var t,n,r,i,a=2**53,o=-a,c=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,u=this,d=0,f=0,p=!1,g=!1,_=[],v={data:[],errors:[],meta:{}};function b(t){return e.skipEmptyLines===`greedy`?t.join(``).trim()===``:t.length===1&&t[0].length===0}function S(){if(v&&r&&(w(`Delimiter`,`UndetectableDelimiter`,`Unable to auto-detect delimiting character; defaulted to '`+s.DefaultDelimiter+`'`),r=!1),e.skipEmptyLines&&(v.data=v.data.filter(function(e){return!b(e)})),C()){if(v)if(Array.isArray(v.data[0])){for(var t=0;C()&&t<v.data.length;t++)v.data[t].forEach(n);v.data.splice(0,1)}else v.data.forEach(n);function n(t,n){x(e.transformHeader)&&(t=e.transformHeader(t,n)),_.push(t)}}function n(t,n){for(var r=e.header?{}:[],i=0;i<t.length;i++){var s=i,u=t[i],u=((t,n)=>(t=>(e.dynamicTypingFunction&&e.dynamicTyping[t]===void 0&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping)))(t)?n===`true`||n===`TRUE`||n!==`false`&&n!==`FALSE`&&((e=>{if(c.test(e)&&(e=parseFloat(e),o<e&&e<a))return 1})(n)?parseFloat(n):l.test(n)?new Date(n):n===``?null:n):n)(s=e.header?i>=_.length?`__parsed_extra`:_[i]:s,u=e.transform?e.transform(u,s):u);s===`__parsed_extra`?(r[s]=r[s]||[],r[s].push(u)):r[s]=u}return e.header&&(i>_.length?w(`FieldMismatch`,`TooManyFields`,`Too many fields: expected `+_.length+` fields but parsed `+i,f+n):i<_.length&&w(`FieldMismatch`,`TooFewFields`,`Too few fields: expected `+_.length+` fields but parsed `+i,f+n)),r}var i;v&&(e.header||e.dynamicTyping||e.transform)&&(i=1,!v.data.length||Array.isArray(v.data[0])?(v.data=v.data.map(n),i=v.data.length):v.data=n(v.data,0),e.header&&v.meta&&(v.meta.fields=_),f+=i)}function C(){return e.header&&_.length===0}function w(e,t,n,r){e={type:e,code:t,message:n},r!==void 0&&(e.row=r),v.errors.push(e)}x(e.step)&&(i=e.step,e.step=function(t){v=t,C()?S():(S(),v.data.length!==0&&(d+=t.data.length,e.preview&&d>e.preview?n.abort():(v.data=v.data[0],i(v,u))))}),this.parse=function(i,a,o){var c=e.quoteChar||`"`,c=(e.newline||=this.guessLineEndings(i,c),r=!1,e.delimiter?x(e.delimiter)&&(e.delimiter=e.delimiter(i),v.meta.delimiter=e.delimiter):((c=((t,n,r,i,a)=>{var o,c,l,u;a||=[`,`,` `,`|`,`;`,s.RECORD_SEP,s.UNIT_SEP];for(var d=0;d<a.length;d++){for(var f,p=a[d],m=0,g=0,_=0,v=(l=void 0,new h({comments:i,delimiter:p,newline:n,preview:10}).parse(t)),y=0;y<v.data.length;y++)r&&b(v.data[y])?_++:(f=v.data[y].length,g+=f,l===void 0?l=f:0<f&&(m+=Math.abs(f-l),l=f));0<v.data.length&&(g/=v.data.length-_),(c===void 0||m<=c)&&(u===void 0||u<g)&&1.99<g&&(c=m,o=p,u=g)}return{successful:!!(e.delimiter=o),bestDelimiter:o}})(i,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=c.bestDelimiter:(r=!0,e.delimiter=s.DefaultDelimiter),v.meta.delimiter=e.delimiter),y(e));return e.preview&&e.header&&c.preview++,t=i,n=new h(c),v=n.parse(t,a,o),S(),p?{meta:{paused:!0}}:v||{meta:{paused:!1}}},this.paused=function(){return p},this.pause=function(){p=!0,n.abort(),t=x(e.chunk)?``:t.substring(n.getCharIndex())},this.resume=function(){u.streamer._halted?(p=!1,u.streamer.parseChunk(t,!0)):setTimeout(u.resume,3)},this.aborted=function(){return g},this.abort=function(){g=!0,n.abort(),v.meta.aborted=!0,x(e.complete)&&e.complete(v),t=``},this.guessLineEndings=function(e,t){e=e.substring(0,1048576);var t=RegExp(m(t)+`([^]*?)`+m(t),`gm`),n=(e=e.replace(t,``)).split(`\r`),t=e.split(`
23
- `),e=1<t.length&&t[0].length<n[0].length;if(n.length===1||e)return`
24
- `;for(var r=0,i=0;i<n.length;i++)n[i][0]===`
25
- `&&r++;return r>=n.length/2?`\r
26
- `:`\r`}}function m(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function h(e){var t=(e||={}).delimiter,n=e.newline,r=e.comments,i=e.step,a=e.preview,o=e.fastMode,c=null,l=!1,u=e.quoteChar==null?`"`:e.quoteChar,d=u;if(e.escapeChar!==void 0&&(d=e.escapeChar),(typeof t!=`string`||-1<s.BAD_DELIMITERS.indexOf(t))&&(t=`,`),r===t)throw Error(`Comment character same as delimiter`);!0===r?r=`#`:(typeof r!=`string`||-1<s.BAD_DELIMITERS.indexOf(r))&&(r=!1),n!==`
27
- `&&n!==`\r`&&n!==`\r
28
- `&&(n=`
29
- `);var f=0,p=!1;this.parse=function(s,h,g){if(typeof s!=`string`)throw Error(`Input must be a string`);var _=s.length,v=t.length,y=n.length,b=r.length,S=x(i),C=[],w=[],T=[],E=f=0;if(!s)return oe();if(o||!1!==o&&s.indexOf(u)===-1){for(var D=s.split(n),O=0;O<D.length;O++){if(T=D[O],f+=T.length,O!==D.length-1)f+=n.length;else if(g)return oe();if(!r||T.substring(0,b)!==r){if(S){if(C=[],ne(T.split(t)),se(),p)return oe()}else ne(T.split(t));if(a&&a<=O)return C=C.slice(0,a),oe(!0)}}return oe()}for(var k=s.indexOf(t,f),A=s.indexOf(n,f),ee=new RegExp(m(d)+m(u),`g`),j=s.indexOf(u,f);;)if(s[f]===u)for(j=f,f++;;){if((j=s.indexOf(u,j+1))===-1)return g||w.push({type:`Quotes`,code:`MissingQuotes`,message:`Quoted field unterminated`,row:C.length,index:f}),ie();if(j===_-1)return ie(s.substring(f,j).replace(ee,u));if(u===d&&s[j+1]===d)j++;else if(u===d||j===0||s[j-1]!==d){k!==-1&&k<j+1&&(k=s.indexOf(t,j+1));var te=re((A=A!==-1&&A<j+1?s.indexOf(n,j+1):A)===-1?k:Math.min(k,A));if(s.substr(j+1+te,v)===t){T.push(s.substring(f,j).replace(ee,u)),s[f=j+1+te+v]!==u&&(j=s.indexOf(u,f)),k=s.indexOf(t,f),A=s.indexOf(n,f);break}if(te=re(A),s.substring(j+1+te,j+1+te+y)===n){if(T.push(s.substring(f,j).replace(ee,u)),ae(j+1+te+y),k=s.indexOf(t,f),j=s.indexOf(u,f),S&&(se(),p))return oe();if(a&&C.length>=a)return oe(!0);break}w.push({type:`Quotes`,code:`InvalidQuotes`,message:`Trailing quote on quoted field is malformed`,row:C.length,index:f}),j++}}else if(r&&T.length===0&&s.substring(f,f+b)===r){if(A===-1)return oe();f=A+y,A=s.indexOf(n,f),k=s.indexOf(t,f)}else if(k!==-1&&(k<A||A===-1))T.push(s.substring(f,k)),f=k+v,k=s.indexOf(t,f);else{if(A===-1)break;if(T.push(s.substring(f,A)),ae(A+y),S&&(se(),p))return oe();if(a&&C.length>=a)return oe(!0)}return ie();function ne(e){C.push(e),E=f}function re(e){var t=0;return t=e!==-1&&(e=s.substring(j+1,e))&&e.trim()===``?e.length:t}function ie(e){return g||(e===void 0&&(e=s.substring(f)),T.push(e),f=_,ne(T),S&&se()),oe()}function ae(e){f=e,ne(T),T=[],A=s.indexOf(n,f)}function oe(r){if(e.header&&!h&&C.length&&!l){var i=C[0],a=Object.create(null),o=new Set(i);let t=!1;for(let n=0;n<i.length;n++){let r=i[n];if(a[r=x(e.transformHeader)?e.transformHeader(r,n):r]){let e,s=a[r];for(;e=r+`_`+s,s++,o.has(e););o.add(e),i[n]=e,a[r]++,t=!0,(c=c===null?{}:c)[e]=r}else a[r]=1,i[n]=r;o.add(r)}t&&console.warn(`Duplicate headers found and renamed.`),l=!0}return{data:C,errors:w,meta:{delimiter:t,linebreak:n,aborted:p,truncated:!!r,cursor:E+(h||0),renamedHeaders:c}}}function se(){i(oe()),C=[],w=[]}},this.abort=function(){p=!0},this.getCharIndex=function(){return f}}function g(e){var t=e.data,n=a[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var i={abort:function(){r=!0,_(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(x(n.userStep)){for(var o=0;o<t.results.data.length&&(n.userStep({data:t.results.data[o],errors:t.results.errors,meta:t.results.meta},i),!r);o++);delete t.results}else x(n.userChunk)&&(n.userChunk(t.results,i,t.file),delete t.results)}t.finished&&!r&&_(t.workerId,t.results)}function _(e,t){var n=a[e];x(n.userComplete)&&n.userComplete(t),n.terminate(),delete a[e]}function v(){throw Error(`Not implemented.`)}function y(e){if(typeof e!=`object`||!e)return e;var t,n=Array.isArray(e)?[]:{};for(t in e)n[t]=y(e[t]);return n}function b(e,t){return function(){e.apply(t,arguments)}}function x(e){return typeof e==`function`}return s.parse=function(n,r){var i=(r||={}).dynamicTyping||!1;if(x(i)&&(r.dynamicTypingFunction=i,i={}),r.dynamicTyping=i,r.transform=!!x(r.transform)&&r.transform,!r.worker||!s.WORKERS_SUPPORTED)return i=null,s.NODE_STREAM_INPUT,typeof n==`string`?(n=(e=>e.charCodeAt(0)===65279?e.slice(1):e)(n),i=new(r.download?l:d)(r)):!0===n.readable&&x(n.read)&&x(n.on)?i=new f(r):(t.File&&n instanceof File||n instanceof Object)&&(i=new u(r)),i.stream(n);(i=(()=>{var n;return!!s.WORKERS_SUPPORTED&&(n=(()=>{var n=t.URL||t.webkitURL||null,r=e.toString();return s.BLOB_URL||=n.createObjectURL(new Blob([`var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; `,`(`,r,`)();`],{type:`text/javascript`}))})(),(n=new t.Worker(n)).onmessage=g,n.id=o++,a[n.id]=n)})()).userStep=r.step,i.userChunk=r.chunk,i.userComplete=r.complete,i.userError=r.error,r.step=x(r.step),r.chunk=x(r.chunk),r.complete=x(r.complete),r.error=x(r.error),delete r.worker,i.postMessage({input:n,config:r,workerId:i.id})},s.unparse=function(e,t){var n=!1,r=!0,i=`,`,a=`\r
30
- `,o=`"`,c=o+o,l=!1,u=null,d=!1,f=((()=>{if(typeof t==`object`){if(typeof t.delimiter!=`string`||s.BAD_DELIMITERS.filter(function(e){return t.delimiter.indexOf(e)!==-1}).length||(i=t.delimiter),typeof t.quotes!=`boolean`&&typeof t.quotes!=`function`&&!Array.isArray(t.quotes)||(n=t.quotes),typeof t.skipEmptyLines!=`boolean`&&typeof t.skipEmptyLines!=`string`||(l=t.skipEmptyLines),typeof t.newline==`string`&&(a=t.newline),typeof t.quoteChar==`string`&&(o=t.quoteChar),typeof t.header==`boolean`&&(r=t.header),Array.isArray(t.columns)){if(t.columns.length===0)throw Error(`Option columns is empty`);u=t.columns}t.escapeChar!==void 0&&(c=t.escapeChar+o),t.escapeFormulae instanceof RegExp?d=t.escapeFormulae:typeof t.escapeFormulae==`boolean`&&t.escapeFormulae&&(d=/^[=+\-@\t\r].*$/)}})(),new RegExp(m(o),`g`));if(typeof e==`string`&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,l);if(typeof e[0]==`object`)return p(u||Object.keys(e[0]),e,l)}else if(typeof e==`object`)return typeof e.data==`string`&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||=e.meta&&e.meta.fields||u,e.fields||=Array.isArray(e.data[0])?e.fields:typeof e.data[0]==`object`?Object.keys(e.data[0]):[],Array.isArray(e.data[0])||typeof e.data[0]==`object`||(e.data=[e.data])),p(e.fields||[],e.data||[],l);throw Error(`Unable to serialize unrecognized input`);function p(e,t,n){var o=``,s=(typeof e==`string`&&(e=JSON.parse(e)),typeof t==`string`&&(t=JSON.parse(t)),Array.isArray(e)&&0<e.length),c=!Array.isArray(t[0]);if(s&&r){for(var l=0;l<e.length;l++)0<l&&(o+=i),o+=h(e[l],l);0<t.length&&(o+=a)}for(var u=0;u<t.length;u++){var d=(s?e:t[u]).length,f=!1,p=s?Object.keys(t[u]).length===0:t[u].length===0;if(n&&!s&&(f=n===`greedy`?t[u].join(``).trim()===``:t[u].length===1&&t[u][0].length===0),n===`greedy`&&s){for(var m=[],g=0;g<d;g++){var _=c?e[g]:g;m.push(t[u][_])}f=m.join(``).trim()===``}if(!f){for(var v=0;v<d;v++){0<v&&!p&&(o+=i);var y=s&&c?e[v]:v;o+=h(t[u][y],v)}u<t.length-1&&(!n||0<d&&!p)&&(o+=a)}}return o}function h(e,t){var r,a;return e==null?``:e.constructor===Date?JSON.stringify(e).slice(1,25):(a=!1,d&&typeof e==`string`&&d.test(e)&&(e=`'`+e,a=!0),r=e.toString().replace(f,c),(a=a||!0===n||typeof n==`function`&&n(e,t)||Array.isArray(n)&&n[t]||((e,t)=>{for(var n=0;n<t.length;n++)if(-1<e.indexOf(t[n]))return!0;return!1})(r,s.BAD_DELIMITERS)||-1<r.indexOf(i)||r.charAt(0)===` `||r.charAt(r.length-1)===` `)?o+r+o:r)}},s.RECORD_SEP=``,s.UNIT_SEP=``,s.BYTE_ORDER_MARK=``,s.BAD_DELIMITERS=[`\r`,`
31
- `,`"`,s.BYTE_ORDER_MARK],s.WORKERS_SUPPORTED=!r&&!!t.Worker,s.NODE_STREAM_INPUT=1,s.LocalChunkSize=10485760,s.RemoteChunkSize=5242880,s.DefaultDelimiter=`,`,s.Parser=h,s.ParserHandle=p,s.NetworkStreamer=l,s.FileStreamer=u,s.StringStreamer=d,s.ReadableStreamStreamer=f,t.jQuery&&((n=t.jQuery).fn.parse=function(e){var r=e.config||{},i=[];return this.each(function(e){if(!(n(this).prop(`tagName`).toUpperCase()===`INPUT`&&n(this).attr(`type`).toLowerCase()===`file`&&t.FileReader)||!this.files||this.files.length===0)return!0;for(var a=0;a<this.files.length;a++)i.push({file:this.files[a],inputElem:this,instanceConfig:n.extend({},r)})}),a(),this;function a(){if(i.length===0)x(e.complete)&&e.complete();else{var t,r,a,c,l=i[0];if(x(e.before)){var u=e.before(l.file,l.inputElem);if(typeof u==`object`){if(u.action===`abort`)return t=`AbortError`,r=l.file,a=l.inputElem,c=u.reason,void(x(e.error)&&e.error({name:t},r,a,c));if(u.action===`skip`)return void o();typeof u.config==`object`&&(l.instanceConfig=n.extend(l.instanceConfig,u.config))}else if(u===`skip`)return void o()}var d=l.instanceConfig.complete;l.instanceConfig.complete=function(e){x(d)&&d(e,l.file,l.inputElem),o()},s.parse(l.file,l.instanceConfig)}}function o(){i.splice(0,1),a()}}),i&&(t.onmessage=function(e){e=e.data,s.WORKER_ID===void 0&&e&&(s.WORKER_ID=e.workerId),typeof e.input==`string`?t.postMessage({workerId:s.WORKER_ID,results:s.parse(e.input,e.config),finished:!0}):(t.File&&e.input instanceof File||e.input instanceof Object)&&(e=s.parse(e.input,e.config))&&t.postMessage({workerId:s.WORKER_ID,results:e,finished:!0})}),(l.prototype=Object.create(c.prototype)).constructor=l,(u.prototype=Object.create(c.prototype)).constructor=u,(d.prototype=Object.create(d.prototype)).constructor=d,(f.prototype=Object.create(c.prototype)).constructor=f,s})}));function Mv(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Mv(e[t]))&&(r&&(r+=` `),r+=n);else for(t in e)e[t]&&(r&&(r+=` `),r+=t);return r}function qne(){for(var e,t,n=0,r=``;n<arguments.length;)(e=arguments[n++])&&(t=Mv(e))&&(r&&(r+=` `),r+=t);return r}var Nv=qne,Pv=e=>typeof e==`number`&&!isNaN(e),Fv=e=>typeof e==`string`,Iv=e=>typeof e==`function`,Lv=e=>Fv(e)||Iv(e)?e:null,Rv=e=>(0,N.isValidElement)(e)||Fv(e)||Iv(e)||Pv(e);function zv(e,t,n){n===void 0&&(n=300);let{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight=`initial`,i.height=r+`px`,i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height=`0`,i.padding=`0`,i.margin=`0`,setTimeout(t,n)})})}function Bv(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:a=300}=e;return function(e){let{children:o,position:s,preventExitTransition:c,done:l,nodeRef:u,isIn:d}=e,f=r?`${t}--${s}`:t,p=r?`${n}--${s}`:n,m=(0,N.useRef)(0);return(0,N.useLayoutEffect)(()=>{let e=u.current,t=f.split(` `),n=r=>{r.target===u.current&&(e.dispatchEvent(new Event(`d`)),e.removeEventListener(`animationend`,n),e.removeEventListener(`animationcancel`,n),m.current===0&&r.type!==`animationcancel`&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener(`animationend`,n),e.addEventListener(`animationcancel`,n)},[]),(0,N.useEffect)(()=>{let e=u.current,t=()=>{e.removeEventListener(`animationend`,t),i?zv(e,l,a):l()};d||(c?t():(m.current=1,e.className+=` ${p}`,e.addEventListener(`animationend`,t)))},[d]),N.createElement(N.Fragment,null,o)}}function Vv(e,t){return e==null?{}:{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}}var Hv={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){let n=this.list.get(e).filter(e=>e!==t);return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){let t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{let n=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)})}},Uv=e=>{let{theme:t,type:n,...r}=e;return N.createElement(`svg`,{viewBox:`0 0 24 24`,width:`100%`,height:`100%`,fill:t===`colored`?`currentColor`:`var(--toastify-icon-color-${n})`,...r})},Wv={info:function(e){return N.createElement(Uv,{...e},N.createElement(`path`,{d:`M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z`}))},warning:function(e){return N.createElement(Uv,{...e},N.createElement(`path`,{d:`M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z`}))},success:function(e){return N.createElement(Uv,{...e},N.createElement(`path`,{d:`M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z`}))},error:function(e){return N.createElement(Uv,{...e},N.createElement(`path`,{d:`M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z`}))},spinner:function(){return N.createElement(`div`,{className:`Toastify__spinner`})}};function Gv(e){let[,t]=(0,N.useReducer)(e=>e+1,0),[n,r]=(0,N.useState)([]),i=(0,N.useRef)(null),a=(0,N.useRef)(new Map).current,o=e=>n.indexOf(e)!==-1,s=(0,N.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:o,getToast:e=>a.get(e)}).current;function c(e){let{containerId:t}=e,{limit:n}=s.props;!n||t&&s.containerId!==t||(s.count-=s.queue.length,s.queue=[])}function l(e){r(t=>e==null?[]:t.filter(t=>t!==e))}function u(){let{toastContent:e,toastProps:t,staleId:n}=s.queue.shift();f(e,t,n)}function d(e,n){let{delay:r,staleId:o,...c}=n;if(!Rv(e)||function(e){return!i.current||s.props.enableMultiContainer&&e.containerId!==s.props.containerId||a.has(e.toastId)&&e.updateId==null}(c))return;let{toastId:d,updateId:p,data:m}=c,{props:h}=s,g=()=>l(d),_=p==null;_&&s.count++;let v={...h,style:h.toastStyle,key:s.toastKey++,...Object.fromEntries(Object.entries(c).filter(e=>{let[t,n]=e;return n!=null})),toastId:d,updateId:p,data:m,closeToast:g,isIn:!1,className:Lv(c.className||h.toastClassName),bodyClassName:Lv(c.bodyClassName||h.bodyClassName),progressClassName:Lv(c.progressClassName||h.progressClassName),autoClose:!c.isLoading&&(y=c.autoClose,b=h.autoClose,!1===y||Pv(y)&&y>0?y:b),deleteToast(){let e=Vv(a.get(d),`removed`);a.delete(d),Hv.emit(4,e);let n=s.queue.length;if(s.count=d==null?s.count-s.displayedToast:s.count-1,s.count<0&&(s.count=0),n>0){let e=d==null?s.props.limit:1;if(n===1||e===1)s.displayedToast++,u();else{let t=e>n?n:e;s.displayedToast=t;for(let e=0;e<t;e++)u()}}else t()}};var y,b;v.iconOut=function(e){let{theme:t,type:n,isLoading:r,icon:i}=e,a=null,o={theme:t,type:n};return!1===i||(Iv(i)?a=i(o):(0,N.isValidElement)(i)?a=(0,N.cloneElement)(i,o):Fv(i)||Pv(i)?a=i:r?a=Wv.spinner():(e=>e in Wv)(n)&&(a=Wv[n](o))),a}(v),Iv(c.onOpen)&&(v.onOpen=c.onOpen),Iv(c.onClose)&&(v.onClose=c.onClose),v.closeButton=h.closeButton,!1===c.closeButton||Rv(c.closeButton)?v.closeButton=c.closeButton:!0===c.closeButton&&(v.closeButton=!Rv(h.closeButton)||h.closeButton);let x=e;(0,N.isValidElement)(e)&&!Fv(e.type)?x=(0,N.cloneElement)(e,{closeToast:g,toastProps:v,data:m}):Iv(e)&&(x=e({closeToast:g,toastProps:v,data:m})),h.limit&&h.limit>0&&s.count>h.limit&&_?s.queue.push({toastContent:x,toastProps:v,staleId:o}):Pv(r)?setTimeout(()=>{f(x,v,o)},r):f(x,v,o)}function f(e,t,n){let{toastId:i}=t;n&&a.delete(n);let o={content:e,props:t};a.set(i,o),r(e=>[...e,i].filter(e=>e!==n)),Hv.emit(4,Vv(o,o.props.updateId==null?`added`:`updated`))}return(0,N.useEffect)(()=>(s.containerId=e.containerId,Hv.cancelEmit(3).on(0,d).on(1,e=>i.current&&l(e)).on(5,c).emit(2,s),()=>{a.clear(),Hv.emit(3,s)}),[]),(0,N.useEffect)(()=>{s.props=e,s.isToastActive=o,s.displayedToast=n.length}),{getToastToRender:function(t){let n=new Map,r=Array.from(a.values());return e.newestOnTop&&r.reverse(),r.forEach(e=>{let{position:t}=e.props;n.has(t)||n.set(t,[]),n.get(t).push(e)}),Array.from(n,e=>t(e[0],e[1]))},containerRef:i,isToastActive:o}}function Kv(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function qv(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function Jv(e){let[t,n]=(0,N.useState)(!1),[r,i]=(0,N.useState)(!1),a=(0,N.useRef)(null),o=(0,N.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,s=(0,N.useRef)(e),{autoClose:c,pauseOnHover:l,closeToast:u,onClick:d,closeOnClick:f}=e;function p(t){if(e.draggable){t.nativeEvent.type===`touchstart`&&t.nativeEvent.preventDefault(),o.didMove=!1,document.addEventListener(`mousemove`,_),document.addEventListener(`mouseup`,v),document.addEventListener(`touchmove`,_),document.addEventListener(`touchend`,v);let n=a.current;o.canCloseOnClick=!0,o.canDrag=!0,o.boundingRect=n.getBoundingClientRect(),n.style.transition=``,o.x=Kv(t.nativeEvent),o.y=qv(t.nativeEvent),e.draggableDirection===`x`?(o.start=o.x,o.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(o.start=o.y,o.removalDistance=n.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function m(t){if(o.boundingRect){let{top:n,bottom:r,left:i,right:a}=o.boundingRect;t.nativeEvent.type!==`touchend`&&e.pauseOnHover&&o.x>=i&&o.x<=a&&o.y>=n&&o.y<=r?g():h()}}function h(){n(!0)}function g(){n(!1)}function _(n){let r=a.current;o.canDrag&&r&&(o.didMove=!0,t&&g(),o.x=Kv(n),o.y=qv(n),o.delta=e.draggableDirection===`x`?o.x-o.start:o.y-o.start,o.start!==o.x&&(o.canCloseOnClick=!1),r.style.transform=`translate${e.draggableDirection}(${o.delta}px)`,r.style.opacity=``+(1-Math.abs(o.delta/o.removalDistance)))}function v(){document.removeEventListener(`mousemove`,_),document.removeEventListener(`mouseup`,v),document.removeEventListener(`touchmove`,_),document.removeEventListener(`touchend`,v);let t=a.current;if(o.canDrag&&o.didMove&&t){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return i(!0),void e.closeToast();t.style.transition=`transform 0.2s, opacity 0.2s`,t.style.transform=`translate${e.draggableDirection}(0)`,t.style.opacity=`1`}}(0,N.useEffect)(()=>{s.current=e}),(0,N.useEffect)(()=>(a.current&&a.current.addEventListener(`d`,h,{once:!0}),Iv(e.onOpen)&&e.onOpen((0,N.isValidElement)(e.children)&&e.children.props),()=>{let e=s.current;Iv(e.onClose)&&e.onClose((0,N.isValidElement)(e.children)&&e.children.props)}),[]),(0,N.useEffect)(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||g(),window.addEventListener(`focus`,h),window.addEventListener(`blur`,g)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener(`focus`,h),window.removeEventListener(`blur`,g))}),[e.pauseOnFocusLoss]);let y={onMouseDown:p,onTouchStart:p,onMouseUp:m,onTouchEnd:m};return c&&l&&(y.onMouseEnter=g,y.onMouseLeave=h),f&&(y.onClick=e=>{d&&d(e),o.canCloseOnClick&&u()}),{playToast:h,pauseToast:g,isRunning:t,preventExitTransition:r,toastRef:a,eventHandlers:y}}function Yv(e){let{closeToast:t,theme:n,ariaLabel:r=`close`}=e;return N.createElement(`button`,{className:`Toastify__close-button Toastify__close-button--${n}`,type:`button`,onClick:e=>{e.stopPropagation(),t(e)},"aria-label":r},N.createElement(`svg`,{"aria-hidden":`true`,viewBox:`0 0 14 16`},N.createElement(`path`,{fillRule:`evenodd`,d:`M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z`})))}function Xv(e){let{delay:t,isRunning:n,closeToast:r,type:i=`default`,hide:a,className:o,style:s,controlledProgress:c,progress:l,rtl:u,isIn:d,theme:f}=e,p=a||c&&l===0,m={...s,animationDuration:`${t}ms`,animationPlayState:n?`running`:`paused`,opacity:p?0:1};c&&(m.transform=`scaleX(${l})`);let h=Nv(`Toastify__progress-bar`,c?`Toastify__progress-bar--controlled`:`Toastify__progress-bar--animated`,`Toastify__progress-bar-theme--${f}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":u}),g=Iv(o)?o({rtl:u,type:i,defaultClassName:h}):Nv(h,o);return N.createElement(`div`,{role:`progressbar`,"aria-hidden":p?`true`:`false`,"aria-label":`notification timer`,className:g,style:m,[c&&l>=1?`onTransitionEnd`:`onAnimationEnd`]:c&&l<1?null:()=>{d&&r()}})}var Zv=e=>{let{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:i}=Jv(e),{closeButton:a,children:o,autoClose:s,onClick:c,type:l,hideProgressBar:u,closeToast:d,transition:f,position:p,className:m,style:h,bodyClassName:g,bodyStyle:_,progressClassName:v,progressStyle:y,updateId:b,role:x,progress:S,rtl:C,toastId:w,deleteToast:T,isIn:E,isLoading:D,iconOut:O,closeOnClick:k,theme:A}=e,ee=Nv(`Toastify__toast`,`Toastify__toast-theme--${A}`,`Toastify__toast--${l}`,{"Toastify__toast--rtl":C},{"Toastify__toast--close-on-click":k}),j=Iv(m)?m({rtl:C,position:p,type:l,defaultClassName:ee}):Nv(ee,m),te=!!S||!s,ne={closeToast:d,type:l,theme:A},re=null;return!1===a||(re=Iv(a)?a(ne):(0,N.isValidElement)(a)?(0,N.cloneElement)(a,ne):Yv(ne)),N.createElement(f,{isIn:E,done:T,position:p,preventExitTransition:n,nodeRef:r},N.createElement(`div`,{id:w,onClick:c,className:j,...i,style:h,ref:r},N.createElement(`div`,{...E&&{role:x},className:Iv(g)?g({type:l}):Nv(`Toastify__toast-body`,g),style:_},O!=null&&N.createElement(`div`,{className:Nv(`Toastify__toast-icon`,{"Toastify--animate-icon Toastify__zoom-enter":!D})},O),N.createElement(`div`,null,o)),re,N.createElement(Xv,{...b&&!te?{key:`pb-${b}`}:{},rtl:C,theme:A,delay:s,isRunning:t,isIn:E,closeToast:d,hide:u,type:l,style:y,className:v,controlledProgress:te,progress:S||0})))},Qv=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},$v=Bv(Qv(`bounce`,!0));Bv(Qv(`slide`,!0)),Bv(Qv(`zoom`)),Bv(Qv(`flip`));var ey=(0,N.forwardRef)((e,t)=>{let{getToastToRender:n,containerRef:r,isToastActive:i}=Gv(e),{className:a,style:o,rtl:s,containerId:c}=e;function l(e){let t=Nv(`Toastify__toast-container`,`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":s});return Iv(a)?a({position:e,rtl:s,defaultClassName:t}):Nv(t,Lv(a))}return(0,N.useEffect)(()=>{t&&(t.current=r.current)},[]),N.createElement(`div`,{ref:r,className:`Toastify`,id:c},n((e,t)=>{let n=t.length?{...o}:{...o,pointerEvents:`none`};return N.createElement(`div`,{className:l(e),style:n,key:`container-${e}`},t.map((e,n)=>{let{content:r,props:a}=e;return N.createElement(Zv,{...a,isIn:i(a.toastId),style:{...a.style,"--nth":n+1,"--len":t.length},key:`toast-${a.key}`},r)}))}))});ey.displayName=`ToastContainer`,ey.defaultProps={position:`top-right`,transition:$v,autoClose:5e3,closeButton:Yv,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:`x`,role:`alert`,theme:`light`};var ty,ny=new Map,ry=[],iy=1;function ay(){return``+ iy++}function oy(e){return e&&(Fv(e.toastId)||Pv(e.toastId))?e.toastId:ay()}function sy(e,t){return ny.size>0?Hv.emit(0,e,t):ry.push({content:e,options:t}),t.toastId}function cy(e,t){return{...t,type:t&&t.type||e,toastId:oy(t)}}function ly(e){return(t,n)=>sy(t,cy(e,n))}function uy(e,t){return sy(e,cy(`default`,t))}uy.loading=(e,t)=>sy(e,cy(`default`,{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),uy.promise=function(e,t,n){let r,{pending:i,error:a,success:o}=t;i&&(r=Fv(i)?uy.loading(i,n):uy.loading(i.render,{...n,...i}));let s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(e,t,i)=>{if(t==null)return void uy.dismiss(r);let a={type:e,...s,...n,data:i},o=Fv(t)?{render:t}:t;return r?uy.update(r,{...a,...o}):uy(o.render,{...a,...o}),i},l=Iv(e)?e():e;return l.then(e=>c(`success`,o,e)).catch(e=>c(`error`,a,e)),l},uy.success=ly(`success`),uy.info=ly(`info`),uy.error=ly(`error`),uy.warning=ly(`warning`),uy.warn=uy.warning,uy.dark=(e,t)=>sy(e,cy(`default`,{theme:`dark`,...t})),uy.dismiss=e=>{ny.size>0?Hv.emit(1,e):ry=ry.filter(t=>e!=null&&t.options.toastId!==e)},uy.clearWaitingQueue=function(e){return e===void 0&&(e={}),Hv.emit(5,e)},uy.isActive=e=>{let t=!1;return ny.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},uy.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{let n=function(e,t){let{containerId:n}=t,r=ny.get(n||ty);return r&&r.getToast(e)}(e,t);if(n){let{props:r,content:i}=n,a={delay:100,...r,...t,toastId:t.toastId||e,updateId:ay()};a.toastId!==e&&(a.staleId=e);let o=a.render||i;delete a.render,sy(o,a)}},0)},uy.done=e=>{uy.update(e,{progress:1})},uy.onChange=e=>(Hv.on(4,e),()=>{Hv.off(4,e)}),uy.POSITION={TOP_LEFT:`top-left`,TOP_RIGHT:`top-right`,TOP_CENTER:`top-center`,BOTTOM_LEFT:`bottom-left`,BOTTOM_RIGHT:`bottom-right`,BOTTOM_CENTER:`bottom-center`},uy.TYPE={INFO:`info`,SUCCESS:`success`,WARNING:`warning`,ERROR:`error`,DEFAULT:`default`},Hv.on(2,e=>{ty=e.containerId||e,ny.set(ty,e),ry.forEach(e=>{Hv.emit(0,e.content,e.options)}),ry=[]}).on(3,e=>{ny.delete(e.containerId||e),ny.size===0&&Hv.off(0).off(1).off(5)});var dy=n(((e,t)=>{var n=typeof Reflect<`u`?Reflect.construct:void 0,r=Object.defineProperty,i=Error.captureStackTrace;i===void 0&&(i=function(e){var t=Error();r(e,`stack`,{configurable:!0,get:function(){var e=t.stack;return r(this,`stack`,{configurable:!0,value:e,writable:!0}),e},set:function(t){r(e,`stack`,{configurable:!0,value:t,writable:!0})}})});function a(e){e!==void 0&&r(this,`message`,{configurable:!0,value:e,writable:!0});var t=this.constructor.name;t!==void 0&&t!==this.name&&r(this,`name`,{configurable:!0,value:t,writable:!0}),i(this,this.constructor)}a.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:a,writable:!0}});var o=(function(){function e(e,t){return r(e,`name`,{configurable:!0,value:t})}try{var t=function(){};if(e(t,`foo`),t.name===`foo`)return e}catch{}})();function s(e,t){if(t==null||t===Error)t=a;else if(typeof t!=`function`)throw TypeError(`super_ should be a function`);var r;if(typeof e==`string`)r=e,e=n===void 0?function(){t.apply(this,arguments)}:function(){return n(t,arguments,this.constructor)},o!==void 0&&(o(e,r),r=void 0);else if(typeof e!=`function`)throw TypeError(`constructor should be either a string or a function`);e.super_=e.super=t;var i={constructor:{configurable:!0,value:e,writable:!0}};return r!==void 0&&(i.name={configurable:!0,value:r,writable:!0}),e.prototype=Object.create(t.prototype,i),e}e=t.exports=s,e.BaseError=a})),fy=`ProseMirror-selectednode`;`${fy}`;var py=`__state_override__`,my={LastNodeCompatible:`lastNodeCompatible`,FormattingMark:`formattingMark`,FormattingNode:`formattingNode`,NodeCursor:`nodeCursor`,FontStyle:`fontStyle`,Link:`link`,Color:`color`,Alignment:`alignment`,Indentation:`indentation`,Behavior:`behavior`,Code:`code`,InlineNode:`inline`,ListContainerNode:`listContainer`,ListItemNode:`listItemNode`,Block:`block`,BlockNode:`block`,TextBlock:`textBlock`,ExcludeInputRules:`excludeFromInputRules`,PreventExits:`preventsExits`,Media:`media`},hy=Symbol.for(`__remirror__`),gy=(e=>(e.PlainExtension=`RemirrorPlainExtension`,e.NodeExtension=`RemirrorNodeExtension`,e.MarkExtension=`RemirrorMarkExtension`,e.PlainExtensionConstructor=`RemirrorPlainExtensionConstructor`,e.NodeExtensionConstructor=`RemirrorNodeExtensionConstructor`,e.MarkExtensionConstructor=`RemirrorMarkExtensionConstructor`,e.Manager=`RemirrorManager`,e.Preset=`RemirrorPreset`,e.PresetConstructor=`RemirrorPresetConstructor`,e))(gy||{}),_y=(e=>(e[e.Critical=1e6]=`Critical`,e[e.Highest=1e5]=`Highest`,e[e.High=1e4]=`High`,e[e.Medium=1e3]=`Medium`,e[e.Default=100]=`Default`,e[e.Low=10]=`Low`,e[e.Lowest=0]=`Lowest`,e))(_y||{}),vy=(e=>(e[e.None=0]=`None`,e[e.Create=1]=`Create`,e[e.EditorView=2]=`EditorView`,e[e.Runtime=3]=`Runtime`,e[e.Destroy=4]=`Destroy`,e))(vy||{}),L=(e=>(e.Undo=`_|undo|_`,e.Redo=`_|redo|_`,e.Bold=`_|bold|_`,e.Italic=`_|italic|_`,e.Underline=`_|underline|_`,e.Strike=`_|strike|_`,e.Code=`_|code|_`,e.Paragraph=`_|paragraph|_`,e.H1=`_|h1|_`,e.H2=`_|h2|_`,e.H3=`_|h3|_`,e.H4=`_|h4|_`,e.H5=`_|h5|_`,e.H6=`_|h6|_`,e.TaskList=`_|task|_`,e.BulletList=`_|bullet|_`,e.OrderedList=`_|number|_`,e.Quote=`_|quote|_`,e.Divider=`_|divider|_`,e.Codeblock=`_|codeblock|_`,e.ClearFormatting=`_|clear|_`,e.Superscript=`_|sup|_`,e.Subscript=`_|sub|_`,e.LeftAlignment=`_|left-align|_`,e.CenterAlignment=`_|center-align|_`,e.RightAlignment=`_|right-align|_`,e.JustifyAlignment=`_|justify-align|_`,e.InsertLink=`_|link|_`,e.Find=`_|find|_`,e.FindBackwards=`_|find-backwards|_`,e.FindReplace=`_|find-replace|_`,e.AddFootnote=`_|footnote|_`,e.AddComment=`_|comment|_`,e.ContextMenu=`_|context-menu|_`,e.IncreaseFontSize=`_|inc-font-size|_`,e.DecreaseFontSize=`_|dec-font-size|_`,e.IncreaseIndent=`_|indent|_`,e.DecreaseIndent=`_|dedent|_`,e.Shortcuts=`_|shortcuts|_`,e.Copy=`_|copy|_`,e.Cut=`_|cut|_`,e.Paste=`_|paste|_`,e.PastePlain=`_|paste-plain|_`,e.SelectAll=`_|select-all|_`,e.Format=`_|format|_`,e))(L||{}),R=(e=>(e.PROD=`RMR0000`,e.UNKNOWN=`RMR0001`,e.INVALID_COMMAND_ARGUMENTS=`RMR0002`,e.CUSTOM=`RMR0003`,e.CORE_HELPERS=`RMR0004`,e.MUTATION=`RMR0005`,e.INTERNAL=`RMR0006`,e.MISSING_REQUIRED_EXTENSION=`RMR0007`,e.MANAGER_PHASE_ERROR=`RMR0008`,e.INVALID_GET_EXTENSION=`RMR0010`,e.INVALID_MANAGER_ARGUMENTS=`RMR0011`,e.SCHEMA=`RMR0012`,e.HELPERS_CALLED_IN_OUTER_SCOPE=`RMR0013`,e.INVALID_MANAGER_EXTENSION=`RMR0014`,e.DUPLICATE_COMMAND_NAMES=`RMR0016`,e.DUPLICATE_HELPER_NAMES=`RMR0017`,e.NON_CHAINABLE_COMMAND=`RMR0018`,e.INVALID_EXTENSION=`RMR0019`,e.INVALID_CONTENT=`RMR0021`,e.INVALID_NAME=`RMR0050`,e.EXTENSION=`RMR0100`,e.EXTENSION_SPEC=`RMR0101`,e.EXTENSION_EXTRA_ATTRIBUTES=`RMR0102`,e.INVALID_SET_EXTENSION_OPTIONS=`RMR0103`,e.REACT_PROVIDER_CONTEXT=`RMR0200`,e.REACT_GET_ROOT_PROPS=`RMR0201`,e.REACT_EDITOR_VIEW=`RMR0202`,e.REACT_CONTROLLED=`RMR0203`,e.REACT_NODE_VIEW=`RMR0204`,e.REACT_GET_CONTEXT=`RMR0205`,e.REACT_COMPONENTS=`RMR0206`,e.REACT_HOOKS=`RMR0207`,e.I18N_CONTEXT=`RMR0300`,e))(R||{}),yy=n(((e,t)=>{var n=function(e){return r(e)&&!i(e)};function r(e){return!!e&&typeof e==`object`}function i(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||o(e)}var a=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103;function o(e){return e.$$typeof===a}function s(e){return Array.isArray(e)?[]:{}}function c(e,t){return t.clone!==!1&&t.isMergeableObject(e)?g(s(e),e,t):e}function l(e,t,n){return e.concat(t).map(function(e){return c(e,n)})}function u(e,t){if(!t.customMerge)return g;var n=t.customMerge(e);return typeof n==`function`?n:g}function d(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function f(e){return Object.keys(e).concat(d(e))}function p(e,t){try{return t in e}catch{return!1}}function m(e,t){return p(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function h(e,t,n){var r={};return n.isMergeableObject(e)&&f(e).forEach(function(t){r[t]=c(e[t],n)}),f(t).forEach(function(i){m(e,i)||(p(e,i)&&n.isMergeableObject(t[i])?r[i]=u(i,n)(e[i],t[i],n):r[i]=c(t[i],n))}),r}function g(e,t,r){r||={},r.arrayMerge=r.arrayMerge||l,r.isMergeableObject=r.isMergeableObject||n,r.cloneUnlessOtherwiseSpecified=c;var i=Array.isArray(t);return i===Array.isArray(e)?i?r.arrayMerge(e,t,r):h(e,t,r):c(t,r)}g.all=function(e,t){if(!Array.isArray(e))throw Error(`first argument should be an array`);return e.reduce(function(e,n){return g(e,n,t)},{})},t.exports=g})),by=n(((e,t)=>{t.exports=function(e){return typeof e==`object`&&!!e&&Array.isArray(e)===!1}})),xy=n(((e,t)=>{var n=by();function r(e){return n(e)===!0&&Object.prototype.toString.call(e)===`[object Object]`}t.exports=function(e){var t,n;return!(r(e)===!1||(t=e.constructor,typeof t!=`function`)||(n=t.prototype,r(n)===!1)||n.hasOwnProperty(`isPrototypeOf`)===!1)}})),Sy=n(((e,t)=>{var n=xy();t.exports=function(e){return n(e)||typeof e==`function`||Array.isArray(e)}})),Cy=n(((e,t)=>{var n=Sy();t.exports=function(e,t,r){if(!n(e))return{};typeof t==`function`&&(r=t,t=[]),typeof t==`string`&&(t=[t]);for(var i=typeof r==`function`,a=Object.keys(e),o={},s=0;s<a.length;s++){var c=a[s],l=e[c];(!t||t.indexOf(c)===-1&&(!i||r(l,c,e)))&&(o[c]=l)}return o}})),wy=n(((e,t)=>{var n=by();t.exports=function(e,t){if(!n(e)&&typeof e!=`function`)return{};var r={};if(typeof t==`string`)return t in e&&(r[t]=e[t]),r;for(var i=t.length,a=-1;++a<i;){var o=t[a];o in e&&(r[o]=e[o])}return r}})),Ty=/^[a-zà-öø-ÿ]+|[A-ZÀ-ÖØ-ß][a-zà-öø-ÿ]+|[a-zà-öø-ÿ]+|[0-9]+|[A-ZÀ-ÖØ-ß]+(?![a-zà-öø-ÿ])/g,Ey=/\S+/g;function Dy(e,t){let n={parts:[],prefixes:[]},r=e.matchAll(t),i=0;for(let t of r){if(typeof t.index!=`number`)continue;let r=t[0];n.parts.push(r);let a=e.slice(i,t.index).trim();n.prefixes.push(a),i=t.index+r.length}let a=e.slice(i).trim();return a&&(n.parts.push(``),n.prefixes.push(a)),n}function Oy(e,t){let{keepSpecialCharacters:n=!1,keep:r,prefix:i=``}=t||{},a=e.trim().normalize(`NFC`),o=a.includes(` `),s=Dy(a,o?Ey:Ty);return s.parts.map((e,t)=>{let a=s.prefixes[t]||``,c=e;return n===!1&&(r&&(c=c.normalize(`NFD`).replace(RegExp(`[^a-zA-Z\xD8\xDF\xF80-9${r.join(``)}]`,`g`),``)),r||(c=c.normalize(`NFD`).replace(/[^a-zA-ZØßø0-9]/g,``),a=``)),r&&(a=a.replace(RegExp(`[^${r.join(``)}]`,`g`),``)),t===0?a+c:!a&&!c?``:o&&!a&&i.match(/\s/)?` `+c:(a||i)+c}).filter(Boolean)}function ky(e){let t=e.matchAll(Ty).next().value,n=t?t.index:0;return e.slice(0,n+1).toUpperCase()+e.slice(n+1).toLowerCase()}function Ay(e,t){return Oy(e,t).reduce((e,t)=>e+ky(t),``)}function jy(e,t){return Oy(e,{...t,prefix:`-`}).join(``).toLowerCase()}function My(e,t,n,r){var i,a=!1,o=0;function s(){i&&clearTimeout(i)}function c(){s(),a=!0}typeof t!=`boolean`&&(r=n,n=t,t=void 0);function l(){var c=[...arguments],l=this,u=Date.now()-o;if(a)return;function d(){o=Date.now(),n.apply(l,c)}function f(){i=void 0}r&&!i&&d(),s(),r===void 0&&u>e?d():t!==!0&&(i=setTimeout(r?f:d,r===void 0?e-u:e))}return l.cancel=c,l}function Jne(e,t,n){return n===void 0?My(e,t,!1):My(e,n,t!==!1)}var Ny=dy(),Yne=i(yy(),1),Py=i(Cy(),1),Fy=i(wy(),1);function Iy(e){return e}function Ly(e,t,n){let r=e[t];return Ry(!qy(r),n),r}function Ry(e,t){if(!e)throw new Xne(t)}var Xne=class extends Ny.BaseError{constructor(){super(...arguments),this.name=`AssertionError`}};function zy(e){return Object.entries(e)}function By(e){return Object.keys(e)}function Vy(e){return Object.values(e)}function Hy(e,t,n){return e.includes(t,n)}function z(e){return Object.assign(Object.create(null),e)}function Uy(e){return Object.prototype.toString.call(e)}function Wy(e){return Uy(e).slice(8,-1)}function Gy(e,t){return n=>typeof n===e?t?t(n):!0:!1}function Ky(e){return t=>Wy(t)===e}var qy=Gy(`undefined`),Jy=Gy(`string`),Yy=Gy(`number`,e=>!Number.isNaN(e)),Xy=Gy(`function`);function Zy(e){return e===null}function Qy(e){return e===!0||e===!1}function $y(e){if(Wy(e)!==`Object`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})}function eb(e){return e==null||/^[bns]/.test(typeof e)}function tb(e){return Zy(e)||qy(e)}function nb(e){return!tb(e)&&(Xy(e)||Gy(`object`)(e))}var rb=Ky(`RegExp`);function ib(e){return Ky(`Map`)(e)}function ab(e){return Ky(`Set`)(e)}function ob(e){return nb(e)&&!ib(e)&&!ab(e)&&Object.keys(e).length===0}var sb=Array.isArray;function cb(e){return sb(e)&&e.length===0}function lb(e){return sb(e)&&e.length>0}function ub(e,t,n=e=>!!e){t.lastIndex=0;let r=[],i=t.flags,a;i.includes(`g`)||(t=new RegExp(t.source,`g${i}`));do a=t.exec(e),a&&r.push(a);while(n(a));return t.lastIndex=0,r}function db(){let e=Date.now(),t=db.last||e;return db.last=e>t?e:t+1}db.last=0;function fb(e=``){return`${e}${db().toString(36)}`}function pb(e){return(0,Py.default)(e,e=>!qy(e))}function mb(e){if(!$y(e))throw Error(`An invalid value was passed into this clone utility. Expected a plain object`);return{...e}}function hb(e,t=!1){let n=t?[...e].reverse():e,r=new Set(n);return t?[...r].reverse():[...r]}function gb(){}function _b(...e){return Yne.default.all(e,{isMergeableObject:$y})}function vb({min:e,max:t,value:n}){return n<e?e:n>t?t:n}function yb(e,t){return[...e].map((e,t)=>({value:e,index:t})).sort((e,n)=>t(e.value,n.value)||e.index-n.index).map(({value:e})=>e)}function bb(e,t,n){try{if(Jy(t)&&t in e)return e[t];sb(t)&&(t=`['${t.join(`']['`)}']`);let r=e;return t.replace(/\[\s*(["'])(.*?)\1\s*]|^\s*(\w+)\s*(?=\.|\[|$)|\.\s*(\w*)\s*(?=\.|\[|$)|\[\s*(-?\d+)\s*]/g,(e,t,n,i,a,o)=>(r=r[n||i||a||o],``)),r===void 0?n:r}catch{return n}}function xb(e,t){let n=mb(t),r=n;for(let[t,i]of e.entries()){let a=t>=e.length-1,o=r[i];if(a){if(sb(r)){let e=Number.parseInt(i.toString(),10);Yy(e)&&r.splice(e,1)}else Reflect.deleteProperty(r,i);return n}if(eb(o))return n;o=sb(o)?[...o]:{...o},r[i]=o,r=o}return n}function Sb(e){return t=>bb(t,e)}function Cb(e,t,n=!1){let r=[],i=new Set,a=Xy(t)?t:Sb(t),o=n?[...e].reverse():e;for(let e of o){let t=a(e);i.has(t)||(i.add(t),r.push(e))}return n?r.reverse():r}function wb(e,t){let n=sb(e)?e[0]:e;return Yy(t)?n<=t?Array.from({length:t+1-n},(e,t)=>t+n):Array.from({length:n+1-t},(e,t)=>-1*t+n):Array.from({length:Math.abs(n)},(e,t)=>(n<0?-1:1)*t)}function Tb(e,...t){let n=t.filter(Yy);return e>=Math.min(...n)&&e<=Math.max(...n)}function Eb(e){return Xy(e)?e():e}var Db=`https://remirror.io/docs/errors`,Ob={[R.UNKNOWN]:`An error occurred but we're not quite sure why. 🧐`,[R.INVALID_COMMAND_ARGUMENTS]:`The arguments passed to the command method were invalid.`,[R.CUSTOM]:`This is a custom error, possibly thrown by an external library.`,[R.CORE_HELPERS]:"An error occurred in a function called from the `@remirror/core-helpers` library.",[R.MUTATION]:`Mutation of immutable value detected.`,[R.INTERNAL]:`This is an error which should not occur and is internal to the remirror codebase.`,[R.MISSING_REQUIRED_EXTENSION]:`Your editor is missing a required extension.`,[R.MANAGER_PHASE_ERROR]:`This occurs when accessing a method or property before it is available.`,[R.INVALID_GET_EXTENSION]:"The user requested an invalid extension from the getExtensions method. Please check the `createExtensions` return method is returning an extension with the defined constructor.",[R.INVALID_MANAGER_ARGUMENTS]:"Invalid value(s) passed into `Manager` constructor. Only `Presets` and `Extensions` are supported.",[R.SCHEMA]:`There is a problem with the schema or you are trying to access a node / mark that doesn't exists.`,[R.HELPERS_CALLED_IN_OUTER_SCOPE]:"The `helpers` method which is passed into the ``create*` method should only be called within returned method since it relies on an active view (not present in the outer scope).",[R.INVALID_MANAGER_EXTENSION]:`You requested an invalid extension from the manager.`,[R.DUPLICATE_COMMAND_NAMES]:`Command method names must be unique within the editor.`,[R.DUPLICATE_HELPER_NAMES]:`Helper method names must be unique within the editor.`,[R.NON_CHAINABLE_COMMAND]:`Attempted to chain a non chainable command.`,[R.INVALID_EXTENSION]:`The provided extension is invalid.`,[R.INVALID_CONTENT]:`The content provided to the editor is not supported.`,[R.INVALID_NAME]:`An invalid name was used for the extension.`,[R.EXTENSION]:`An error occurred within an extension. More details should be made available.`,[R.EXTENSION_SPEC]:"The spec was defined without calling the `defaults`, `parse` or `dom` methods.",[R.EXTENSION_EXTRA_ATTRIBUTES]:`Extra attributes must either be a string or an object.`,[R.INVALID_SET_EXTENSION_OPTIONS]:"A call to `extension.setOptions` was made with invalid keys.",[R.REACT_PROVIDER_CONTEXT]:"`useRemirrorContext` was called outside of the `remirror` context. It can only be used within an active remirror context created by the `<Remirror />`.",[R.REACT_GET_ROOT_PROPS]:"`getRootProps` has been attached to the DOM more than once. It should only be attached to the dom once per editor.",[R.REACT_EDITOR_VIEW]:`A problem occurred adding the editor view to the dom.`,[R.REACT_CONTROLLED]:`There is a problem with your controlled editor setup.`,[R.REACT_NODE_VIEW]:`Something went wrong with your custom ReactNodeView Component.`,[R.REACT_GET_CONTEXT]:"You attempted to call `getContext` provided by the `useRemirror` prop during the first render of the editor. This is not possible and should only be after the editor first mounts.",[R.REACT_COMPONENTS]:`An error occurred within a remirror component.`,[R.REACT_HOOKS]:`An error occurred within a remirror hook.`,[R.I18N_CONTEXT]:"You called `useI18n()` outside of an `I18nProvider` context."};function kb(e){return Jy(e)&&Hy(Vy(R),e)}function Ab(e,t){let n=Ob[e];return`${n?`${n}
32
-
33
- `:``}${t?`${t}
34
-
35
- `:``}For more information visit ${Db}#${e.toLowerCase()}`}var jb=class extends Ny.BaseError{constructor({code:e,message:t,disableLogging:n=!1}={}){let r=kb(e)?e:R.CUSTOM;super(Ab(r,t)),this.errorCode=r,this.url=`${Db}#${r.toLowerCase()}`,n||console.error(this.message)}static create(e={}){return new jb(e)}};function B(e,t){if(!e)throw jb.create(t)}function Mb(e){if(typeof e!=`object`||!e)return e;let t=Symbol.toStringTag in e&&e[Symbol.toStringTag]===`Module`?e.default??e:e;return t&&typeof e==`object`&&`__esModule`in t&&t.__esModule&&t.default!==void 0?t.default:t}function Nb(e,t={}){return e}function Pb(e){this.content=e}Pb.prototype={constructor:Pb,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new Pb(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Pb(n)},addToStart:function(e,t){return new Pb([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Pb(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new Pb(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Pb.from(e),e.size?new Pb(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Pb.from(e),e.size?new Pb(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Pb.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},Pb.from=function(e){if(e instanceof Pb)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Pb(t)};var Fb=Pb;function Ib(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(let e=0;i.text[e]==a.text[e];e++)n++;return n}if(i.content.size||a.content.size){let e=Ib(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}function Lb(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s){n-=c,r-=c;continue}if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=0,t=Math.min(o.text.length,s.text.length);for(;e<t&&o.text[o.text.length-e-1]==s.text[s.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(o.content.size||s.content.size){let e=Lb(o.content,s.content,n-1,r-1);if(e)return e}n-=c,r-=c}}var V=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let a=0,o=0;o<t;a++){let s=this.content[a],c=o+s.nodeSize;if(c>e&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,a=0;a<n;e++){let o=this.content[e],s=a+o.nodeSize;s>t&&((a<t||s>n)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.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 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 Ib(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Lb(this,e,t,n)}findIndex(e){if(e==0)return zb(0,e);if(e==this.size)return zb(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?zb(t+1,i):zb(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return new e(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||=t.slice(0,e),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError(`Can not convert `+t+` to a Fragment`+(t.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};V.empty=new V([],0);var Rb={index:0,offset:0};function zb(e,t){return Rb.index=e,Rb.offset=t,Rb}function Bb(e,t){if(e===t)return!0;if(!(e&&typeof e==`object`)||!(t&&typeof t==`object`))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!Bb(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!Bb(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var Vb=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||=e.slice(0,r);else if(i.type.excludes(this.type))return e;else !n&&i.type.rank>this.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return 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&&Bb(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 RangeError(`Invalid input for Mark.fromJSON`);let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}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(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};Vb.none=[];var Hb=class extends Error{},H=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=Wb(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(Ub(this.content,t+this.openStart,n+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(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(V.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};H.empty=new H(V.empty,0,0);function Ub(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(Ub(a.content,t-i-1,n-i-1)))}function Wb(e,t,n,r){let{index:i,offset:a}=e.findIndex(t),o=e.maybeChild(i);if(a==t||o.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=Wb(o.content,t-a-1,n,o);return s&&e.replaceChild(i,o.copy(s))}function Gb(e,t,n){if(n.openStart>e.depth)throw new Hb(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Hb(`Inconsistent open depths`);return Kb(e,t,n,0)}function Kb(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=Kb(e,t,n,r+1);return a.copy(a.content.replaceChild(i,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let r=e.parent,i=r.content;return Zb(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}else{let{start:i,end:o}=ex(n,e);return Zb(a,Qb(e,i,o,t,r))}else return Zb(a,$b(e,t,r))}function qb(e,t){if(!t.type.compatibleContent(e.type))throw new Hb(`Cannot join `+t.type.name+` onto `+e.type.name)}function Jb(e,t,n){let r=e.node(n);return qb(r,t.node(n)),r}function Yb(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Xb(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(Yb(e.nodeAfter,r),a++));for(let e=a;e<o;e++)Yb(i.child(e),r);t&&t.depth==n&&t.textOffset&&Yb(t.nodeBefore,r)}function Zb(e,t){return e.type.checkContent(t),e.copy(t)}function Qb(e,t,n,r,i){let a=e.depth>i&&Jb(e,t,i+1),o=r.depth>i&&Jb(n,r,i+1),s=[];return Xb(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(qb(a,o),Yb(Zb(a,Qb(e,t,n,r,i+1)),s)):(a&&Yb(Zb(a,$b(e,t,i+1)),s),Xb(t,n,i,s),o&&Yb(Zb(o,$b(n,r,i+1)),s)),Xb(r,null,i,s),new V(s)}function $b(e,t,n){let r=[];return Xb(null,e,n,r),e.depth>n&&Yb(Zb(Jb(e,t,n+1),$b(e,t,n+1)),r),Xb(t,null,n,r),new V(r)}function ex(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(V.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var tx=class e{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 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 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 t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Vb.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!r||!i[a].isInSet(r.marks))&&(i=i[a--].removeFromSet(i));return i}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 i=0;i<n.length;i++)n[i].type.spec.inclusive===!1&&(!r||!n[i].isInSet(r.marks))&&(n=n[i--].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 ax(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(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=ix.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else ix.set(t,r=new nx);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%rx,i}},nx=class{constructor(){this.elts=[],this.i=0}},rx=12,ix=new WeakMap,ax=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)}},ox=Object.create(null),sx=class e{constructor(e,t,n,r=Vb.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||V.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&&Bb(this.attrs,t||e.defaultAttrs||ox)&&Vb.sameSet(this.marks,n||Vb.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}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 H.empty;let r=this.resolve(e),i=this.resolve(t),a=n?0:r.sharedDepth(t),o=r.start(a);return new H(r.node(a).content.cut(r.pos-o,i.pos-o),r.depth-a,i.depth-a)}replace(e,t,n){return Gb(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 tx.resolveCached(this,e)}resolveNoCache(e){return tx.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.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()+`)`),lx(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=V.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,t);return a?a.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),this.type.checkAttrs(this.attrs);let e=Vb.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!Vb.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.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(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=V.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}};sx.prototype.text=void 0;var cx=class e extends sx{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):lx(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(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,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 lx(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}var ux=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new dx(t,n);if(r.next==null)return e.empty;let i=fx(r);r.next&&r.err(`Unexpected trailing text`);let a=Sx(yx(i));return Cx(a,r),a}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 i=t;r&&i<n;i++)r=r.matchType(e.child(i).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 i(a,o){let s=a.matchFragment(e,n);if(s&&(!t||s.validEnd))return V.from(o.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&r.indexOf(n)==-1){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+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(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:a,next:o}=i.next[e];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!r.type||o.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 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((t,n)=>{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n<t.next.length;n++)r+=(n?`, `:``)+t.next[n].type.name+`->`+e.indexOf(t.next[n].next);return r}).join(`
36
- `)}};ux.empty=new ux(!0);var dx=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 SyntaxError(e+` (in content expression '`+this.string+`')`)}};function fx(e){let t=[];do t.push(px(e));while(e.eat(`|`));return t.length==1?t[0]:{type:`choice`,exprs:t}}function px(e){let t=[];do t.push(mx(e));while(e.next&&e.next!=`)`&&e.next!=`|`);return t.length==1?t[0]:{type:`seq`,exprs:t}}function mx(e){let t=vx(e);for(;;)if(e.eat(`+`))t={type:`plus`,expr:t};else if(e.eat(`*`))t={type:`star`,expr:t};else if(e.eat(`?`))t={type:`opt`,expr:t};else if(e.eat(`{`))t=gx(e,t);else break;return t}function hx(e){/\D/.test(e.next)&&e.err(`Expected number, got '`+e.next+`'`);let t=Number(e.next);return e.pos++,t}function gx(e,t){let n=hx(e),r=n;return e.eat(`,`)&&(r=e.next==`}`?-1:hx(e)),e.eat(`}`)||e.err(`Unclosed braced range`),{type:`range`,min:n,max:r,expr:t}}function _x(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return i.length==0&&e.err(`No node type or group '`+t+`' found`),i}function vx(e){if(e.eat(`(`)){let t=fx(e);return e.eat(`)`)||e.err(`Missing closing paren`),t}else if(/\W/.test(e.next))e.err(`Unexpected token '`+e.next+`'`);else{let t=_x(e,e.next).map(t=>(e.inline==null?e.inline=t.isInline:e.inline!=t.isInline&&e.err(`Mixing inline and block content`),{type:`name`,value:t}));return e.pos++,t.length==1?t[0]:{type:`choice`,exprs:t}}}function yx(e){let t=[[]];return i(a(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function a(e,t){if(e.type==`choice`)return e.exprs.reduce((e,n)=>e.concat(a(n,t)),[]);if(e.type==`seq`)for(let r=0;;r++){let o=a(e.exprs[r],t);if(r==e.exprs.length-1)return o;i(o,t=n())}else if(e.type==`star`){let o=n();return r(t,o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`plus`){let o=n();return i(a(e.expr,t),o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`opt`)return[r(t)].concat(a(e.expr,t));else if(e.type==`range`){let o=t;for(let t=0;t<e.min;t++){let t=n();i(a(e.expr,o),t),o=t}if(e.max==-1)i(a(e.expr,o),o);else for(let t=e.min;t<e.max;t++){let t=n();r(o,t),i(a(e.expr,o),t),o=t}return[r(o)]}else if(e.type==`name`)return[r(t,void 0,e.value)];else throw Error(`Unknown expr type`)}}function bx(e,t){return t-e}function xx(e,t){let n=[];return r(t),n.sort(bx);function r(t){let i=e[t];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(t);for(let e=0;e<i.length;e++){let{term:t,to:a}=i[e];!t&&n.indexOf(a)==-1&&r(a)}}}function Sx(e){let t=Object.create(null);return n(xx(e,0));function n(r){let i=[];r.forEach(t=>{e[t].forEach(({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);xx(e,n).forEach(e=>{r||i.push([t,r=[]]),r.indexOf(e)==-1&&r.push(e)})})});let a=t[r.join(`,`)]=new ux(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort(bx);a.next.push({type:i[e][0],next:t[r.join(`,`)]||n(r)})}return a}}function Cx(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,a=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];a.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),r.indexOf(o)==-1&&r.push(o)}i&&t.err(`Only non-generatable nodes (`+a.join(`, `)+`) in a required position (see https://prosemirror.net/docs/guide/#generatable)`)}}function wx(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Tx(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError(`No value supplied for attribute `+r)}n[r]=i}return n}function Ex(e,t,n,r){for(let r in t)if(!(r in e))throw RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in e){let r=e[n];r.validate&&r.validate(t[n])}}function Dx(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new Ax(e,r,t[r]);return n}var Ox=class e{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=Dx(e,n.attrs),this.defaultAttrs=wx(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==ux.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:Tx(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error(`NodeType.create can't construct text nodes`);return new sx(this,this.computeAttrs(e),V.from(t),Vb.setFrom(n))}createChecked(e=null,t,n){return t=V.from(t),this.checkContent(t),new sx(this,this.computeAttrs(e),t,Vb.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=V.from(t),t.size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(V.empty,!0);return i?new sx(this,e,t.append(i),Vb.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Ex(this.attrs,e,`node`,this.name)}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||=e.slice(0,n);return t?t.length?t:Vb.none:e}static compile(t,n){let r=Object.create(null);t.forEach((t,i)=>r[t]=new e(t,n,i));let i=n.spec.topNode||`doc`;if(!r[i])throw RangeError(`Schema is missing its top node type ('`+i+`')`);if(!r.text)throw RangeError(`Every schema needs a 'text' type`);for(let e in r.text.attrs)throw RangeError(`The text node type should not have attributes`);return r}};function kx(e,t,n){let r=n.split(`|`);return n=>{let i=n===null?`null`:typeof n;if(r.indexOf(i)<0)throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var Ax=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,`default`),this.default=n.default,this.validate=typeof n.validate==`string`?kx(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}},jx=class e{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=Dx(e,r.attrs),this.excluded=null;let i=wx(this.attrs);this.instance=i?new Vb(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Vb(this,Tx(this.attrs,e))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((t,a)=>r[t]=new e(t,i++,n,a)),r}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]}checkAttrs(e){Ex(this.attrs,e,`mark`,this.name)}excludes(e){return this.excluded.indexOf(e)>-1}},Mx=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=Fb.from(e.nodes),t.marks=Fb.from(e.marks||{}),this.nodes=Ox.compile(this.spec.nodes,this),this.marks=jx.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+` can not be both a node and a mark`);let t=this.nodes[e],r=t.spec.content||``,i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=ux.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError(`Multiple linebreak nodes defined`);if(!t.isInline||!t.isLeaf)throw RangeError(`Linebreak replacement nodes must be inline leaf nodes`);this.linebreakReplacement=t}t.markSet=i==`_`?null:i?Nx(this,i.split(` `)):i==``||!t.inlineContent?[]:null}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=n==null?[t]:n==``?[]:Nx(this,n.split(` `))}this.nodeFromJSON=e=>sx.fromJSON(this,e),this.markFromJSON=e=>Vb.fromJSON(this,e),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 Ox){if(e.schema!=this)throw RangeError(`Node type from different schema used (`+e.name+`)`)}else throw RangeError(`Invalid node type: `+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new cx(n,n.defaultAttrs,e,Vb.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 RangeError(`Unknown node type: `+e);return t}};function Nx(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e.marks[i],o=a;if(a)n.push(a);else for(let t in e.marks){let r=e.marks[t];(i==`_`||r.spec.group&&r.spec.group.split(` `).indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError(`Unknown mark type: '`+t[r]+`'`)}return n}function Px(e){return e.tag!=null}function Fx(e){return e.style!=null}var Ix=class e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(Px(e))this.tags.push(e);else if(Fx(e)){let t=/[^=]*/.exec(e.style)[0];n.indexOf(t)<0&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new Gx(this,t,!1);return n.addAll(e,Vb.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Gx(this,t,!0);return n.addAll(e,Vb.none,t.from,t.to),H.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(qx(e,n.tag)&&(n.namespace===void 0||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(t===!1)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],a=r.style;if(!(a.indexOf(e)!=0||r.context&&!n.matchesContext(r.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(e===!1)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=e.priority==null?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((e.priority==null?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=Jx(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=Jx(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},Lx={address:!0,article:!0,aside:!0,blockquote:!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},Rx={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},zx={ol:!0,ul:!0},Bx=1,Vx=2,Hx=4;function Ux(e,t,n){return t==null?e&&e.whitespace==`pre`?Bx|Vx:n&~Hx:(t?Bx:0)|(t===`full`?Vx:0)}var Wx=class{constructor(e,t,n,r,i,a){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=a,this.content=[],this.activeMarks=Vb.none,this.match=i||(a&Hx?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(V.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Bx)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let t=V.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(V.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&&!Lx.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},Gx=class{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,a=Ux(null,t.preserveWhitespace,0)|(n?Hx:0);i=r?new Wx(r.type,r.attrs,Vb.none,!0,t.topMatch||r.type.contentMatch,a):n?new Wx(null,null,Vb.none,!0,null,a):new Wx(e.schema.topNodeType,null,Vb.none,!0,null,a),this.nodes=[i],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,i=r.options&Vx?`full`:this.localPreserveWS||(r.options&Bx)>0,{schema:a}=this.parser;if(i===`full`||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(i)if(i===`full`)n=n.replace(/\r\n?/g,`
37
- `);else if(a.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(a.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(a.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(a.text(e[n]),t,!/\S/.test(e[n]));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 t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&i.nodeName==`BR`||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(a.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;(e.tagName==`PRE`||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),o;zx.hasOwnProperty(a)&&this.parser.normalizeLists&&Kx(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));out:if(s?s.ignore:Rx.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,t);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let n,r=this.needsBlock;if(Lx.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break out}let o=s&&s.skip?t:this.readStyles(e,t);o&&this.addAll(e,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,s,n,s.consuming===!1?o:void 0)}this.localPreserveWS=r}leafFallback(e,t){e.nodeName==`BR`&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
38
- `),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 e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),n.consuming===!1)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,a;if(t.node)if(a=this.parser.schema.nodes[t.node],a.isLeaf)this.insertNode(a.create(t.attrs),n,e.nodeName==`BR`)||this.leafFallback(e,n);else{let e=this.enter(a,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(a&&a.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(e=>this.insertNode(e,n,!1));else{let r=e;typeof t.contentElement==`string`?r=e.querySelector(t.contentElement):typeof t.contentElement==`function`?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let a=n?e.childNodes[n]:e.firstChild,o=r==null?null:e.childNodes[r];a!=o;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,a=0;t>=0;t--){let o=this.nodes[t],s=o.findWrapping(e);if(s&&(!r||r.length>s.length+a)&&(r=s,i=o,!s.length))break;if(o.solid){if(n)break;a+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&=t.match.matchType(e.type);let n=Vb.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):Yx(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&=this.enterInner(e,t,n,!0,r),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let o=Ux(e,i,a.options);a.options&Hx&&a.content.length==0&&(o|=Hx);let s=Vb.none;return n=n.filter(t=>(a.type?a.type.allowsMarkType(t.type):Yx(t.type,e))?(s=t.addToSet(s),!1):!0),this.nodes.push(new Wx(e,t,s,r,null,o)),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;else this.localPreserveWS&&(this.nodes[t].options|=Bx);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 t=n.length-1;t>=0;t--)e+=n[t].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),i=-(n?n.depth+1:0)+(r?0:1),a=(e,o)=>{for(;e>=0;e--){let s=t[e];if(s==``){if(e==t.length-1||e==0)continue;for(;o>=i;o--)if(a(e-1,o))return!0;return!1}else{let e=o>0||o==0&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=s&&!e.isInGroup(s))return!1;o--}}return!0};return a(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 e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}};function Kx(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=t.nodeType==1?t.nodeName.toLowerCase():null;e&&zx.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):e==`li`?n=t:e&&(n=null)}}function qx(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Jx(e){let t={};for(let n in e)t[n]=e[n];return t}function Yx(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let a=[],o=e=>{a.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||a.indexOf(i)<0&&o(i))return!0}};if(o(i.contentMatch))return!0}}var Xx=class e{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||=Qx(t).createDocumentFragment();let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,a=0;for(;n<i.length&&a<e.marks.length;){let t=e.marks[a];if(!this.marks[t.type.name]){a++;continue}if(!t.eq(i[n][0])||t.type.spec.spanning===!1)break;n++,a++}for(;n<i.length;)r=i.pop()[1];for(;a<e.marks.length;){let n=e.marks[a++],o=this.serializeMark(n,e.isInline,t);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=nS(Qx(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw 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 i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&nS(Qx(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return nS(e,t,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(e){let t=Zx(e.nodes);return t.text||=e=>e.text,t}static marksFromSchema(e){return Zx(e.marks)}};function Zx(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Qx(e){return e.document||window.document}var $x=new WeakMap;function eS(e){let t=$x.get(e);return t===void 0&&$x.set(e,t=tS(e)),t}function tS(e){let t=null;function n(e){if(e&&typeof e==`object`)if(Array.isArray(e))if(typeof e[0]==`string`)t||=[],t.push(e);else for(let t=0;t<e.length;t++)n(e[t]);else for(let t in e)n(e[t])}return n(e),t}function nS(e,t,n,r){if(typeof t==`string`)return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i=t[0],a;if(typeof i!=`string`)throw RangeError(`Invalid array passed to renderSpec`);if(r&&(a=eS(r))&&a.indexOf(t)>-1)throw RangeError(`Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.`);let o=i.indexOf(` `);o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s,c=n?e.createElementNS(n,i):e.createElement(i),l=t[1],u=1;if(l&&typeof l==`object`&&l.nodeType==null&&!Array.isArray(l)){for(let e in u=2,l)if(l[e]!=null){let t=e.indexOf(` `);t>0?c.setAttributeNS(e.slice(0,t),e.slice(t+1),l[e]):e==`style`&&c.style?c.style.cssText=l[e]:c.setAttribute(e,l[e])}}for(let i=u;i<t.length;i++){let a=t[i];if(a===0){if(i<t.length-1||i>u)throw RangeError(`Content hole must be the only child of its parent node`);return{dom:c,contentDOM:c}}else{let{dom:t,contentDOM:i}=nS(e,a,n,r);if(c.appendChild(t),i){if(s)throw RangeError(`Multiple content holes`);s=i}}}return{dom:c,contentDOM:s}}var rS=65535,iS=2**16;function aS(e,t){return e+t*iS}function oS(e){return e&rS}function sS(e){return(e-(e&rS))/iS}var cS=1,lS=2,uS=4,dS=8,fS=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&dS)>0}get deletedBefore(){return(this.delInfo&(cS|uS))>0}get deletedAfter(){return(this.delInfo&(lS|uS))>0}get deletedAcross(){return(this.delInfo&uS)>0}},pS=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(e){let t=0,n=oS(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[e*3+2]-this.ranges[e*3+1];return this.ranges[n*3]+t+sS(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,i=this.inverted?2:1,a=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let s=this.ranges[o]-(this.inverted?r:0);if(s>e)break;let c=this.ranges[o+i],l=this.ranges[o+a],u=s+c;if(e<=u){let i=c?e==s?-1:e==u?1:t:t,a=s+r+(i<0?0:l);if(n)return a;let d=e==(t<0?s:u)?null:aS(o/3,e-s),f=e==s?lS:e==u?cS:uS;return(t<0?e!=s:e!=u)&&(f|=dS),new fS(a,f,d)}r+=l-c}return n?e+r:new fS(e+r,0,null)}touches(e,t){let n=0,r=oS(t),i=this.inverted?2:1,a=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let s=this.ranges[t+i];if(e<=o+s&&t==r*3)return!0;n+=this.ranges[t+a]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let a=this.ranges[r],o=a-(this.inverted?i:0),s=a+(this.inverted?0:i),c=this.ranges[r+t],l=this.ranges[r+n];e(o,o+c,s,s+l),i+=l-c}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?`-`:``)+JSON.stringify(this.ranges)}static offset(t){return t==0?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};pS.empty=new pS([]);var mS=class e{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(t=0,n=this.maps.length){return new e(this._maps,this.mirror,t,n)}appendMap(e,t){this.ownData||=(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),!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.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 t=new e;return t.appendMappingInverted(this),t}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 n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(i.recover!=null){let t=this.getMirror(n);if(t!=null&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new fS(e,r,null)}},hS=Object.create(null),gS=class{getMap(){return pS.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError(`Invalid input for Step.fromJSON`);let n=hS[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in hS)throw RangeError(`Duplicate use of step JSON ID `+e);return hS[e]=t,t.prototype.jsonID=e,t}},_S=class e{constructor(e,t){this.doc=e,this.failed=t}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,r,i){try{return e.ok(t.replace(n,r,i))}catch(t){if(t instanceof Hb)return e.fail(t.message);throw t}}};function vS(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let a=e.child(i);a.content.size&&(a=a.copy(vS(a.content,t,a))),a.isInline&&(a=t(a,n,i)),r.push(a)}return V.fromArray(r)}var yS=class e extends gS{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)),i=new H(vS(t.content,(e,t)=>!e.isAtom||!t.type.allowsMarkType(this.mark.type)?e:e.mark(this.mark.addToSet(e.marks)),r),t.openStart,t.openEnd);return _S.fromReplace(e,this.from,this.to,i)}invert(){return new bS(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`addMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for AddMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};gS.jsonID(`addMark`,yS);var bS=class e extends gS{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 H(vS(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return _S.fromReplace(e,this.from,this.to,n)}invert(){return new yS(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`removeMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for RemoveMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};gS.jsonID(`removeMark`,bS);var xS=class e extends gS{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return _S.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return _S.fromReplace(e,this.pos,this.pos+1,new H(V.from(n),0,t.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let t=this.mark.addToSet(n.marks);if(t.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(t))return new e(this.pos,n.marks[r]);return new e(this.pos,this.mark)}}return new SS(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`addNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for AddNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};gS.jsonID(`addNodeMark`,xS);var SS=class e extends gS{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return _S.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return _S.fromReplace(e,this.pos,this.pos+1,new H(V.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new xS(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`removeNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for RemoveNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};gS.jsonID(`removeNodeMark`,SS);var CS=class e extends gS{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&TS(e,this.from,this.to)?_S.fail(`Structure replace would overwrite content`):_S.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new pS([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new e(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?H.empty:new H(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?H.empty:new H(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,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(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for ReplaceStep.fromJSON`);return new e(n.from,n.to,H.fromJSON(t,n.slice),!!n.structure)}};gS.jsonID(`replace`,CS);var wS=class e extends gS{constructor(e,t,n,r,i,a,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=a,this.structure=o}apply(e){if(this.structure&&(TS(e,this.from,this.gapFrom)||TS(e,this.gapTo,this.to)))return _S.fail(`Structure gap-replace would overwrite content`);let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return _S.fail(`Gap is not a flat range`);let n=this.slice.insertAt(this.insert,t.content);return n?_S.fromReplace(e,this.from,this.to,n):_S.fail(`Content does not fit in gap`)}getMap(){return new pS([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),a=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||a>r.pos?null:new e(n.pos,r.pos,i,a,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(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`||typeof n.gapFrom!=`number`||typeof n.gapTo!=`number`||typeof n.insert!=`number`)throw RangeError(`Invalid input for ReplaceAroundStep.fromJSON`);return new e(n.from,n.to,n.gapFrom,n.gapTo,H.fromJSON(t,n.slice),n.insert,!!n.structure)}};gS.jsonID(`replaceAround`,wS);function TS(e,t,n){let r=e.resolve(t),i=n-t,a=r.depth;for(;i>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,i--;if(i>0){let e=r.node(a).maybeChild(r.indexAfter(a));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function Zne(e,t,n,r){let i=[],a=[],o,s;e.doc.nodesBetween(t,n,(e,c,l)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&l.type.allowsMarkType(r.type)){let l=Math.max(c,t),d=Math.min(c+e.nodeSize,n),f=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(f)||(o&&o.to==l&&o.mark.eq(u[e])?o.to=d:i.push(o=new bS(l,d,u[e])));s&&s.to==l?s.to=d:a.push(s=new yS(l,d,r))}}),i.forEach(t=>e.step(t)),a.forEach(t=>e.step(t))}function Qne(e,t,n,r){let i=[],a=0;e.doc.nodesBetween(t,n,(e,o)=>{if(!e.isInline)return;a++;let s=null;if(r instanceof jx){let t=e.marks,n;for(;n=r.isInSet(t);)(s||=[]).push(n),t=n.removeFromSet(t)}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length){let r=Math.min(o+e.nodeSize,n);for(let e=0;e<s.length;e++){let n=s[e],c;for(let e=0;e<i.length;e++){let t=i[e];t.step==a-1&&n.eq(i[e].style)&&(c=t)}c?(c.to=r,c.step=a):i.push({style:n,from:Math.max(o,t),to:r,step:a})}}}),i.forEach(t=>e.step(new bS(t.from,t.to,t.style)))}function ES(e,t,n,r=n.contentMatch,i=!0){let a=e.doc.nodeAt(t),o=[],s=t+1;for(let t=0;t<a.childCount;t++){let c=a.child(t),l=s+c.nodeSize,u=r.matchType(c.type);if(!u)o.push(new CS(s,l,H.empty));else{r=u;for(let t=0;t<c.marks.length;t++)n.allowsMarkType(c.marks[t].type)||e.step(new bS(s,l,c.marks[t]));if(i&&c.isText&&n.whitespace!=`pre`){let e,t=/\r?\n|\r/g,r;for(;e=t.exec(c.text);)r||=new H(V.from(n.schema.text(` `,n.allowedMarks(c.marks))),0,0),o.push(new CS(s+e.index,s+e.index+e[0].length,r))}}s=l}if(!r.validEnd){let t=r.fillBefore(V.empty,!0);e.replace(s,s,new H(t,0,0))}for(let t=o.length-1;t>=0;t--)e.step(o[t])}function $ne(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function DS(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let a=e.$from.node(n),o=e.$from.index(n)+r,s=e.$to.indexAfter(n)-i;if(n<e.depth&&a.canReplace(o,s,t))return n;if(n==0||a.type.spec.isolating||!$ne(a,o,s))break;o&&(r=1),s<a.childCount&&(i=1)}return null}function ere(e,t,n){let{$from:r,$to:i,depth:a}=t,o=r.before(a+1),s=i.after(a+1),c=o,l=s,u=V.empty,d=0;for(let e=a,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,u=V.from(r.node(e).copy(u)),d++):c--;let f=V.empty,p=0;for(let e=a,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,f=V.from(i.node(e).copy(f)),p++):l++;e.step(new wS(c,l,o,s,new H(u.append(f),d,p),u.size-d,!0))}function OS(e,t,n=null,r=e){let i=tre(e,t),a=i&&nre(r,t);return a?i.map(kS).concat({type:t,attrs:n}).concat(a.map(kS)):null}function kS(e){return{type:e,attrs:null}}function tre(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.contentMatchAt(r).findWrapping(t);if(!a)return null;let o=a.length?a[0]:t;return n.canReplaceWith(r,i,o)?a:null}function nre(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.child(r),o=t.contentMatch.findWrapping(a.type);if(!o)return null;let s=(o.length?o[o.length-1]:t).contentMatch;for(let e=r;s&&e<i;e++)s=s.matchType(n.child(e).type);return!s||!s.validEnd?null:o}function rre(e,t,n){let r=V.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw RangeError(`Wrapper type given to Transform.wrap does not form valid content of its parent wrapper`)}r=V.from(n[e].type.create(n[e].attrs,r))}let i=t.start,a=t.end;e.step(new wS(i,a,i,a,new H(r,0,0),n.length,!0))}function ire(e,t,n,r,i){if(!r.isTextblock)throw RangeError(`Type given to setBlockType should be a textblock`);let a=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{let o=typeof i==`function`?i(t):i;if(t.isTextblock&&!t.hasMarkup(r,o)&&are(e.doc,e.mapping.slice(a).map(n),r)){let i=null;if(r.schema.linebreakReplacement){let e=r.whitespace==`pre`,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}i===!1&&jS(e,t,n,a),ES(e,e.mapping.slice(a).map(n,1),r,void 0,i===null);let s=e.mapping.slice(a),c=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new wS(c,l,c+1,l-1,new H(V.from(r.create(o,null,t.marks)),0,0),1,!0)),i===!0&&AS(e,t,n,a),!1}})}function AS(e,t,n,r){t.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let i=e.mapping.slice(r).map(n+1+a+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function jS(e,t,n,r){t.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+a);e.replaceWith(i,i+1,t.type.schema.text(`
39
- `))}})}function are(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function ore(e,t,n,r,i){let a=e.doc.nodeAt(t);if(!a)throw RangeError(`No node at given position`);n||=a.type;let o=n.create(r,null,i||a.marks);if(a.isLeaf)return e.replaceWith(t,t+a.nodeSize,o);if(!n.validContent(a.content))throw RangeError(`Invalid content for node type `+n.name);e.step(new wS(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new H(V.from(o),0,0),1,!0))}function MS(e,t,n=1,r){let i=e.resolve(t),a=i.depth-n,o=r&&r[r.length-1]||i.parent;if(a<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>a;e--,t--){let n=i.node(e),a=i.index(e);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(a,n.childCount),s=r&&r[t+1];s&&(o=o.replaceChild(0,s.type.create(s.attrs)));let c=r&&r[t]||n;if(!n.canReplace(a+1,n.childCount)||!c.type.validContent(o))return!1}let s=i.indexAfter(a),c=r&&r[0];return i.node(a).canReplaceWith(s,s,c?c.type:i.node(a+1).type)}function sre(e,t,n=1,r){let i=e.doc.resolve(t),a=V.empty,o=V.empty;for(let e=i.depth,t=i.depth-n,s=n-1;e>t;e--,s--){a=V.from(i.node(e).copy(a));let t=r&&r[s];o=V.from(t?t.type.create(t.attrs,o):i.node(e).copy(o))}e.step(new CS(t,t,new H(a.append(o),n,n),!0))}function NS(e,t){let n=e.resolve(t),r=n.index();return lre(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function cre(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let a=t.child(i),o=a.type==r?e.type.schema.nodes.text:a.type;if(n=n.matchType(o),!n||!e.type.allowsMarks(a.marks))return!1}return n.validEnd}function lre(e,t){return!!(e&&t&&!e.isLeaf&&cre(e,t))}function PS(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,a=e.doc.resolve(t-n),o=a.node().type;if(i&&o.inlineContent){let e=o.whitespace==`pre`,t=!!o.contentMatch.matchType(i);e&&!t?r=!1:!e&&t&&(r=!0)}let s=e.steps.length;if(r===!1){let r=e.doc.resolve(t+n);jS(e,r.node(),r.before(),s)}o.inlineContent&&ES(e,t+n-1,o,a.node().contentMatchAt(a.index()),r==null);let c=e.mapping.slice(s),l=c.map(t-n);if(e.step(new CS(l,c.map(t+n,-1),H.empty,!0)),r===!0){let t=e.doc.resolve(l);AS(e,t.node(),t.before(),e.steps.length)}return e}function FS(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)return null}return null}function IS(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(n.openStart==0&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,a=r.index(t)+(n>0?1:0),o=r.node(t),s=!1;if(e==1)s=o.canReplace(a,a,i);else{let e=o.contentMatchAt(a).findWrapping(i.firstChild.type);s=e&&o.canReplaceWith(a,a,e[0])}if(s)return n==0?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function LS(e,t,n=t,r=H.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),a=e.resolve(n);return RS(i,a,r)?new CS(t,n,r):new zS(i,a,r).fit()}function RS(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var zS=class{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=V.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=V.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):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 i=this.placed,a=n.depth,o=r.depth;for(;a&&o&&i.childCount==1;)i=i.firstChild.content,a--,o--;let s=new H(i,a,o);return e>-1?new wS(n.pos,e,this.$to.pos,this.$to.end(),s,t):s.size||n.pos!=this.$to.pos?new CS(n.pos,r.pos,s):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let e,r=null;n?(r=HS(this.unplaced.content,n-1).firstChild,e=r.content):e=this.unplaced.content;let i=e.firstChild;for(let e=this.depth;e>=0;e--){let{type:a,match:o}=this.frontier[e],s,c=null;if(t==1&&(i?o.matchType(i.type)||(c=o.fillBefore(V.from(i),!1)):r&&a.compatibleContent(r.type)))return{sliceDepth:n,frontierDepth:e,parent:r,inject:c};if(t==2&&i&&(s=o.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:e,parent:r,wrap:s};if(r&&o.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=HS(e,t);return!r.childCount||r.firstChild.isLeaf?!1:(this.unplaced=new H(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=HS(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new H(BS(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new H(BS(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let e=0;e<i.length;e++)this.openFrontierNode(i[e]);let a=this.unplaced,o=n?n.content:a.content,s=a.openStart-e,c=0,l=[],{match:u,type:d}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)l.push(r.child(e));u=u.matchFragment(r)}let f=o.size+e-(a.content.size-a.openEnd);for(;c<o.childCount;){let e=o.child(c),t=u.matchType(e.type);if(!t)break;c++,(c>1||s==0||e.content.size)&&(u=t,l.push(US(e.mark(d.allowedMarks(e.marks)),c==1?s:0,c==o.childCount?f:-1)))}let p=c==o.childCount;p||(f=-1),this.placed=VS(this.placed,t,V.from(l)),this.frontier[t].match=u,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=o;e<f;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=p?e==0?H.empty:new H(BS(a.content,e-1,1),e-1,f<0?a.openEnd:e-1):new H(BS(a.content,e,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!WS(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){scan:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=WS(e,t,r,n,i);if(a){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=WS(e,n,r,t,!0);if(!i||i.childCount)continue scan}return{depth:t,fit:a,move:i?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=VS(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=VS(this.placed,this.depth,V.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(V.empty,!0);e.childCount&&(this.placed=VS(this.placed,this.frontier.length,e))}};function BS(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(BS(e.firstChild.content,t-1,n)))}function VS(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(VS(e.lastChild.content,t-1,n)))}function HS(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function US(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,US(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(V.empty,!0)))),e.copy(r)}function WS(e,t,n,r,i){let a=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==a.childCount&&!n.compatibleContent(a.type))return null;let s=r.fillBefore(a.content,!0,o);return s&&!GS(n,a.content,o)?s:null}function GS(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function KS(e){return e.spec.defining||e.spec.definingForContent}function qS(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),a=e.doc.resolve(n);if(RS(i,a,r))return e.step(new CS(t,n,r));let o=ZS(i,a);o[o.length-1]==0&&o.pop();let s=-(i.depth+1);o.unshift(s);for(let e=i.depth,t=i.pos-1;e>0;e--,t--){let n=i.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;o.indexOf(e)>-1?s=e:i.before(e)==t&&o.splice(1,0,-e)}let c=o.indexOf(s),l=[],u=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(l.push(n),t==r.openStart)break;e=n.content}for(let e=u-1;e>=0;e--){let t=l[e],n=KS(t.type);if(n&&!t.sameMarkup(i.node(Math.abs(s)-1)))u=e;else if(n||!t.type.isTextblock)break}for(let t=r.openStart;t>=0;t--){let s=(t+u+1)%(r.openStart+1),d=l[s];if(d)for(let t=0;t<o.length;t++){let l=o[(t+c)%o.length],u=!0;l<0&&(u=!1,l=-l);let f=i.node(l-1),p=i.index(l-1);if(f.canReplaceWith(p,p,d.type,d.marks))return e.replace(i.before(l),u?a.after(l):n,new H(JS(r.content,0,r.openStart,s),s,r.openEnd))}}let d=e.steps.length;for(let s=o.length-1;s>=0&&(e.replace(t,n,r),!(e.steps.length>d));s--){let e=o[s];e<0||(t=i.before(e),n=a.after(e))}}function JS(e,t,n,r,i){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy(JS(i.content,t+1,n,r,i)))}if(t>r){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(V.empty,!0))}return e}function YS(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=FS(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new H(V.from(r),0,0))}function XS(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n),a=ZS(r,i);for(let t=0;t<a.length;t++){let n=a[t],o=t==a.length-1;if(o&&n==0||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let a=1;a<=r.depth&&a<=i.depth;a++)if(t-r.start(a)==r.depth-a&&n>r.end(a)&&i.end(a)-n!=i.depth-a&&r.start(a-1)==i.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),i.index(a-1)))return e.delete(r.before(a),n);e.delete(t,n)}function ZS(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}var QS=class e extends gS{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 _S.fail(`No node at attribute step's position`);let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return _S.fromReplace(e,this.pos,this.pos+1,new H(V.from(r),0,t.isLeaf?0:1))}getMap(){return pS.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:`attr`,pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!=`number`||typeof n.attr!=`string`)throw RangeError(`Invalid input for AttrStep.fromJSON`);return new e(n.pos,n.attr,n.value)}};gS.jsonID(`attr`,QS);var $S=class e extends gS{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return _S.ok(n)}getMap(){return pS.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:`docAttr`,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!=`string`)throw RangeError(`Invalid input for DocAttrStep.fromJSON`);return new e(n.attr,n.value)}};gS.jsonID(`docAttr`,$S);var eC=class extends Error{};eC=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},eC.prototype=Object.create(Error.prototype),eC.prototype.constructor=eC,eC.prototype.name=`TransformError`;var tC=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new mS}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new eC(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((n,r,i,a)=>{e=Math.min(e,i),t=Math.max(t,a)})}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=H.empty){let r=LS(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new H(V.from(n),0,0))}delete(e,t){return this.replace(e,t,H.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return qS(this,e,t,n),this}replaceRangeWith(e,t,n){return YS(this,e,t,n),this}deleteRange(e,t){return XS(this,e,t),this}lift(e,t){return ere(this,e,t),this}join(e,t=1){return PS(this,e,t),this}wrap(e,t){return rre(this,e,t),this}setBlockType(e,t=e,n,r=null){return ire(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return ore(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new QS(e,t,n)),this}setDocAttribute(e,t){return this.step(new $S(e,t)),this}addNodeMark(e,t){return this.step(new xS(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError(`No node at position `+e);if(t instanceof Vb)t.isInSet(n.marks)&&this.step(new SS(e,t));else{let r=n.marks,i,a=[];for(;i=t.isInSet(r);)a.push(new SS(e,i)),r=i.removeFromSet(r);for(let e=a.length-1;e>=0;e--)this.step(a[e])}return this}split(e,t=1,n){return sre(this,e,t,n),this}addMark(e,t,n){return Zne(this,e,t,n),this}removeMark(e,t,n){return Qne(this,e,t,n),this}clearIncompatible(e,t,n){return ES(this,e,t,n),this}},nC=Object.create(null),rC=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new iC(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=H.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let i=e.steps.length,a=this.ranges;for(let o=0;o<a.length;o++){let{$from:s,$to:c}=a[o],l=e.mapping.slice(i);e.replaceRange(l.map(s.pos),l.map(c.pos),o?H.empty:t),o==0&&mC(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:a,$to:o}=r[i],s=e.mapping.slice(n),c=s.map(a.pos),l=s.map(o.pos);i?e.deleteRange(c,l):(e.replaceRangeWith(c,l,t),mC(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new sC(e):pC(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?pC(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):pC(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new dC(e.node(0))}static atStart(e){return pC(e,e,0,0,1)||new dC(e)}static atEnd(e){return pC(e,e,e.content.size,e.childCount,-1)||new dC(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError(`Invalid input for Selection.fromJSON`);let n=nC[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in nC)throw RangeError(`Duplicate use of selection JSON ID `+e);return nC[e]=t,t.prototype.jsonID=e,t}getBookmark(){return sC.between(this.$anchor,this.$head).getBookmark()}};rC.prototype.visible=!0;var iC=class{constructor(e,t){this.$from=e,this.$to=t}},aC=!1;function oC(e){!aC&&!e.parent.inlineContent&&(aC=!0,console.warn(`TextSelection endpoint not pointing into a node with inline content (`+e.parent.type.name+`)`))}var sC=class e extends rC{constructor(e,t=e){oC(e),oC(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return rC.near(r);let i=t.resolve(n.map(this.anchor));return new e(i.parent.inlineContent?i:r,r)}replace(e,t=H.empty){if(super.replace(e,t),t==H.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new cC(this.anchor,this.head)}toJSON(){return{type:`text`,anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!=`number`||typeof n.head!=`number`)throw RangeError(`Invalid input for TextSelection.fromJSON`);return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let e=rC.findFrom(n,r,!0)||rC.findFrom(n,-r,!0);if(e)n=e.$head;else return rC.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(rC.findFrom(t,-r,!0)||rC.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new e(t,n)}};rC.jsonID(`text`,sC);var cC=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){return sC.between(e.resolve(this.anchor),e.resolve(this.head))}},lC=class e extends rC{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),a=t.resolve(i);return r?rC.near(a):new e(a)}content(){return new H(V.from(this.node),0,0)}eq(t){return t instanceof e&&t.anchor==this.anchor}toJSON(){return{type:`node`,anchor:this.anchor}}getBookmark(){return new uC(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!=`number`)throw RangeError(`Invalid input for NodeSelection.fromJSON`);return new e(t.resolve(n.anchor))}static create(t,n){return new e(t.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}};lC.prototype.visible=!1,rC.jsonID(`node`,lC);var uC=class e{constructor(e){this.anchor=e}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new cC(r,r):new e(r)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&lC.isSelectable(n)?new lC(t):rC.near(t)}},dC=class e extends rC{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=H.empty){if(t==H.empty){e.delete(0,e.doc.content.size);let t=rC.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:`all`}}static fromJSON(t){return new e(t)}map(t){return new e(t)}eq(t){return t instanceof e}getBookmark(){return fC}};rC.jsonID(`all`,dC);var fC={map(){return this},resolve(e){return new dC(e)}};function pC(e,t,n,r,i,a=!1){if(t.inlineContent)return sC.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let r=t.child(o);if(r.isAtom){if(!a&&lC.isSelectable(r))return lC.create(e,n-(i<0?r.nodeSize:0))}else{let t=pC(e,r,n+i,i<0?r.childCount:0,i,a);if(t)return t}n+=r.nodeSize*i}return null}function mC(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof CS||i instanceof wS))return;let a=e.mapping.maps[r],o;a.forEach((e,t,n,r)=>{o??=r}),e.setSelection(rC.near(e.doc.resolve(o),n))}var hC=1,gC=2,_C=4,vC=class extends tC{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 RangeError(`Selection passed to setSelection must point at the current document`);return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|hC)&~gC,this.storedMarks=null,this}get selectionSet(){return(this.updated&hC)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=gC,this}ensureMarks(e){return Vb.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&gC)>0}addStep(e,t){super.addStep(e,t),this.updated&=~gC,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)||Vb.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??=t,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(rC.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|=_C,this}get scrolledIntoView(){return(this.updated&_C)>0}};function yC(e,t){return!t||!e?e:e.bind(t)}var bC=class{constructor(e,t,n){this.name=e,this.init=yC(t.init,n),this.apply=yC(t.apply,n)}},xC=[new bC(`doc`,{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new bC(`selection`,{init(e,t){return e.selection||rC.atStart(t.doc)},apply(e){return e.selection}}),new bC(`storedMarks`,{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new bC(`scrollToSelection`,{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],SC=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=xC.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError(`Adding different instances of a keyed plugin (`+e.key+`)`);this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new bC(e.key,e.spec.state,e))})}},CC=class e{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 t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,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 i=!1;for(let a=0;a<this.config.plugins.length;a++){let o=this.config.plugins[a];if(o.spec.appendTransaction){let s=r?r[a].n:0,c=r?r[a].state:this,l=s<t.length&&o.spec.appendTransaction.call(o,s?t.slice(s):t,c,n);if(l&&n.filterTransaction(l,a)){if(l.setMeta(`appendedTransaction`,e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<a?{state:n,n:t.length}:{state:this,n:0})}t.push(l),n=n.applyInner(l),i=!0}r&&(r[a]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(t){if(!t.before.eq(this.doc))throw RangeError(`Applying a mismatched transaction`);let n=new e(this.config),r=this.config.fields;for(let e=0;e<r.length;e++){let i=r[e];n[i.name]=i.apply(t,this[i.name],this,n)}return n}get tr(){return new vC(this)}static create(t){let n=new SC(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n);for(let e=0;e<n.fields.length;e++)r[n.fields[e].name]=n.fields[e].init(t,r);return r}reconfigure(t){let n=new SC(this.schema,t.plugins),r=n.fields,i=new e(n);for(let e=0;e<r.length;e++){let n=r[e].name;i[n]=this.hasOwnProperty(n)?this[n]:r[e].init(t,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&typeof e==`object`)for(let n in e){if(n==`doc`||n==`selection`)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(t,n,r){if(!n)throw RangeError(`Invalid input for EditorState.fromJSON`);if(!t.schema)throw RangeError(`Required config field 'schema' missing`);let i=new SC(t.schema,t.plugins),a=new e(i);return i.fields.forEach(e=>{if(e.name==`doc`)a.doc=sx.fromJSON(t.schema,n.doc);else if(e.name==`selection`)a.selection=rC.fromJSON(a.doc,n.selection);else if(e.name==`storedMarks`)n.storedMarks&&(a.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let i in r){let o=r[i],s=o.spec.state;if(o.key==e.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(n,i)){a[e.name]=s.fromJSON.call(o,t,n[i],a);return}}a[e.name]=e.init(t,a)}}),a}};function wC(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r==`handleDOMEvents`&&(i=wC(i,t,{})),n[r]=i}return n}var TC=class{constructor(e){this.spec=e,this.props={},e.props&&wC(e.props,this,this.props),this.key=e.key?e.key.key:DC(`plugin`)}getState(e){return e[this.key]}},EC=Object.create(null);function DC(e){return e in EC?e+`$`+ ++EC[e]:(EC[e]=0,e+`$`)}var OC=class{constructor(e=`key`){this.key=DC(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}};function kC(){return typeof document<`u`?document:null}var AC=n(((e,t)=>{function n(e,t){if(typeof e!=`string`)return[e];var n=[e];typeof t==`string`||Array.isArray(t)?t={brackets:t}:t||={};var r=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:[`{}`,`[]`,`()`],i=t.escape||`___`,a=!!t.flat;r.forEach(function(e){var t=new RegExp([`\\`,e[0],`[^\\`,e[0],`\\`,e[1],`]*\\`,e[1]].join(``)),r=[];function a(t,a,o){var s=n.push(t.slice(e[0].length,-e[1].length))-1;return r.push(s),i+s+i}n.forEach(function(e,r){for(var i,o=0;e!=i;)if(i=e,e=e.replace(t,a),o++>1e4)throw Error(`References have circular dependency. Please, check them.`);n[r]=e}),r=r.reverse(),n=n.map(function(t){return r.forEach(function(n){t=t.replace(RegExp(`(\\`+i+n+`\\`+i+`)`,`g`),e[0]+`$1`+e[1])}),t})});var o=RegExp(`\\`+i+`([0-9]+)\\`+i);function s(e,t,n){for(var r=[],i,a=0;i=o.exec(e);){if(a++>1e4)throw Error(`Circular references in parenthesis`);r.push(e.slice(0,i.index)),r.push(s(t[i[1]],t)),e=e.slice(i.index+i[0].length)}return r.push(e),r}return a?n:s(n[0],n)}function r(e,t){if(t&&t.flat){var n=t&&t.escape||`___`,r=e[0],i;if(!r)return``;for(var a=RegExp(`\\`+n+`([0-9]+)\\`+n),o=0;r!=i;){if(o++>1e4)throw Error(`Circular references in `+e);i=r,r=r.replace(a,s)}return r}return e.reduce(function e(t,n){return Array.isArray(n)&&(n=n.reduce(e,``)),t+n},``);function s(t,n){if(e[n]==null)throw Error(`Reference `+n+`is undefined`);return e[n]}}function i(e,t){return Array.isArray(e)?r(e,t):n(e,t)}i.parse=n,i.stringify=r,t.exports=i})),jC=Object.freeze({__proto__:null,COPY_DESCRIPTION:{id:`extension.command.copy.description`,message:`Copy the selected text`,comment:`Description for copy command.`},COPY_LABEL:{id:`extension.command.copy.label`,message:`Copy`,comment:`Label for copy command.`},CUT_DESCRIPTION:{id:`extension.command.cut.description`,message:`Cut the selected text`,comment:`Description for cut command.`},CUT_LABEL:{id:`extension.command.cut.label`,message:`Cut`,comment:`Label for cut command.`},PASTE_DESCRIPTION:{id:`extension.command.paste.description`,message:`Paste content into the editor`,comment:`Description for paste command.`},PASTE_LABEL:{id:`extension.command.paste.label`,message:`Paste`,comment:`Label for paste command.`},SELECT_ALL_DESCRIPTION:{id:`extension.command.select-all.description`,message:`Select all content within the editor`,comment:`Description for select all command.`},SELECT_ALL_LABEL:{id:`extension.command.select-all.label`,message:`Select all`,comment:`Label for select all command.`}}),MC=Object.freeze({__proto__:null,DESCRIPTION:{id:`extension.command.toggle-bold.description`,message:`Add bold formatting to the selected text`,comment:`Description for bold formatting command.`},LABEL:{id:`extension.command.toggle-bold.label`,message:`Bold`,comment:`Label for bold formatting command.`}}),NC=Object.freeze({__proto__:null,DESCRIPTION:{id:`extension.command.toggle-code.description`,message:`Add inline code formatting to the selected text`,comment:`Description for the inline code formatting command.`},LABEL:{id:`extension.command.toggle-code.label`,message:`Code`,comment:`Label for the inline code formatting.`}}),PC=Object.freeze({__proto__:null,REDO_DESCRIPTION:{id:`extension.command.redo.description`,message:`Redo the most recent action`,comment:`Description for redo.`},REDO_LABEL:{id:`extension.command.redo.label`,message:`Redo`,comment:`Label for redo.`},UNDO_DESCRIPTION:{id:`extension.command.undo.description`,message:`Undo the most recent action`,comment:`Description for undo.`},UNDO_LABEL:{id:`extension.command.undo.label`,message:`Undo`,comment:`Label for undo.`}}),FC=Object.freeze({__proto__:null,DESCRIPTION:{id:`extension.command.toggle-italic.description`,message:`Italicize the selected text`,comment:`Description for italic formatting command.`},LABEL:{id:`extension.command.toggle-italic.label`,message:`Italic`,comment:`Label for italic formatting command.`}}),IC=Object.freeze({__proto__:null,BULLET_LIST_LABEL:{id:`extension.command.toggle-bullet-list.description`,message:`Bulleted list`,comment:`Description for inserting a bullet list into the editor.`},ORDERED_LIST_LABEL:{id:`extension.command.toggle-ordered-list.label`,message:`Ordered list`,comment:`Label for inserting an ordered list into the editor.`},TASK_LIST_LABEL:{id:`extension.command.toggle-task-list.description`,message:`Tasked list`,comment:`Description for inserting a task list into the editor.`}}),LC=Object.freeze({__proto__:null,CONVERT_DESCRIPTION:{id:`extension.command.convert-paragraph.description`,message:`Convert current block into a paragraph block.`,comment:`Description for converting a paragraph.`},CONVERT_LABEL:{id:`extension.command.convert-paragraph.label`,message:`Convert Paragraph`,comment:`Label for converting the current node into a paragraph.`},INSERT_DESCRIPTION:{id:`extension.command.insert-paragraph.description`,message:`Insert a new paragraph`,comment:`Description for inserting a paragraph.`},INSERT_LABEL:{id:`extension.command.insert-paragraph.label`,message:`Insert Paragraph`,comment:`Label for inserting a paragraph.`}}),RC=class{constructor(e,t,n={}){this.match=e,this.match=e,this.handler=typeof t==`string`?zC(t):t,this.undoable=n.undoable!==!1,this.inCode=n.inCode||!1,this.inCodeMark=n.inCodeMark!==!1}};function zC(e){return function(t,n,r,i){let a=e;if(n[1]){let e=n[0].lastIndexOf(n[1]);a+=n[0].slice(e+n[1].length),r+=e;let t=r-i;t>0&&(a=n[0].slice(e-t,e)+a,r=i)}return t.tr.insertText(a,r,i)}}var BC=500;function VC({rules:e}){let t=new TC({state:{init(){return null},apply(e,t){return e.getMeta(this)||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput(n,r,i,a){return HC(n,r,i,a,e,t)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&HC(n,r.pos,r.pos,``,e,t)})}}},isInputRules:!0});return t}function HC(e,t,n,r,i,a){if(e.composing)return!1;let o=e.state,s=o.doc.resolve(t),c=s.parent.textBetween(Math.max(0,s.parentOffset-BC),s.parentOffset,null,``)+r;for(let l=0;l<i.length;l++){let u=i[l];if(!u.inCodeMark&&s.marks().some(e=>e.type.spec.code))continue;if(s.parent.type.spec.code){if(!u.inCode)continue}else if(u.inCode===`only`)continue;let d=u.match.exec(c);if(!d||d[0].length<r.length)continue;let f=t-(d[0].length-r.length);if(!u.inCodeMark){let e=!1;if(o.doc.nodesBetween(f,s.pos,t=>{t.isInline&&t.marks.some(e=>e.type.spec.code)&&(e=!0)}),e)continue}let p=u.handler(o,d,f,n);if(p)return u.undoable&&p.setMeta(a,{transform:p,from:t,to:n,text:r}),e.dispatch(p),!0}return!1}var UC=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let i=n[r],a;if(i.spec.isInputRules&&(a=i.getState(e))){if(t){let n=e.tr,r=a.transform;for(let e=r.steps.length-1;e>=0;e--)n.step(r.steps[e].invert(r.docs[e]));if(a.text){let t=n.doc.resolve(a.from).marks();n.replaceWith(a.from,a.to,e.schema.text(a.text,t))}else n.delete(a.from,a.to);t(n)}return!0}}return!1};new RC(/--$/,`—`,{inCodeMark:!1}),new RC(/\.\.\.$/,`…`,{inCodeMark:!1}),new RC(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,`“`,{inCodeMark:!1}),new RC(/"$/,`”`,{inCodeMark:!1}),new RC(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,`‘`,{inCodeMark:!1}),new RC(/'$/,`’`,{inCodeMark:!1});function WC(e,t,n=null,r){return new RC(e,(e,i,a,o)=>{let s=n instanceof Function?n(i):n,c=e.tr.delete(a,o),l=c.doc.resolve(a).blockRange(),u=l&&OS(l,t,s);if(!u)return null;c.wrap(l,u);let d=c.doc.resolve(a-1).nodeBefore;return d&&d.type==t&&NS(c.doc,a-1)&&(!r||r(i,d))&&c.join(a-1),c})}var GC=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},KC=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},qC=null,JC=function(e,t,n){let r=qC||=document.createRange();return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},YC=function(){qC=null},XC=function(e,t,n,r){return n&&(QC(e,t,n,r,-1)||QC(e,t,n,r,1))},ZC=/^(img|br|input|textarea|hr)$/i;function QC(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:$C(e))){let n=e.parentNode;if(!n||n.nodeType!=1||rw(e)||ZC.test(e.nodeName)||e.contentEditable==`false`)return!1;t=GC(e)+(i<0?0:1),e=n}else if(e.nodeType==1){let n=e.childNodes[t+(i<0?-1:0)];if(n.nodeType==1&&n.contentEditable==`false`)if(n.pmViewDesc?.ignoreForSelection)t+=i;else return!1;else e=n,t=i<0?$C(e):0}else return!1}}function $C(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function ew(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable==`false`)return null;e=e.childNodes[t-1],t=$C(e)}else if(e.parentNode&&!rw(e))t=GC(e),e=e.parentNode;else return null}}function tw(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable==`false`)return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!rw(e))t=GC(e)+1,e=e.parentNode;else return null}}function nw(e,t,n){for(let r=t==0,i=t==$C(e);r||i;){if(e==n)return!0;let t=GC(e);if(e=e.parentNode,!e)return!1;r&&=t==0,i&&=t==$C(e)}}function rw(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var iw=function(e){return e.focusNode&&XC(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function aw(e,t){let n=document.createEvent(`Event`);return n.initEvent(`keydown`,!0,!0),n.keyCode=e,n.key=n.code=t,n}function ow(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function sw(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min($C(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min($C(r.startContainer),r.startOffset)}}}var cw=typeof navigator<`u`?navigator:null,lw=typeof document<`u`?document:null,uw=cw&&cw.userAgent||``,dw=/Edge\/(\d+)/.exec(uw),fw=/MSIE \d/.exec(uw),pw=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(uw),mw=!!(fw||pw||dw),hw=fw?document.documentMode:pw?+pw[1]:dw?+dw[1]:0,gw=!mw&&/gecko\/(\d+)/i.test(uw);gw&&+(/Firefox\/(\d+)/.exec(uw)||[0,0])[1];var _w=!mw&&/Chrome\/(\d+)/.exec(uw),vw=!!_w,yw=_w?+_w[1]:0,bw=!mw&&!!cw&&/Apple Computer/.test(cw.vendor),xw=bw&&(/Mobile\/\w+/.test(uw)||!!cw&&cw.maxTouchPoints>2),Sw=xw||(cw?/Mac/.test(cw.platform):!1),Cw=cw?/Win/.test(cw.platform):!1,ww=/Android \d/.test(uw),Tw=!!lw&&`webkitFontSmoothing`in lw.documentElement.style,Ew=Tw?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Dw(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Ow(e,t){return typeof e==`number`?e:e[t]}function kw(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function Aw(e,t,n){let r=e.someProp(`scrollThreshold`)||0,i=e.someProp(`scrollMargin`)||5,a=e.dom.ownerDocument;for(let o=n||e.dom;o;){if(o.nodeType!=1){o=KC(o);continue}let e=o,n=e==a.body,s=n?Dw(a):kw(e),c=0,l=0;if(t.top<s.top+Ow(r,`top`)?l=-(s.top-t.top+Ow(i,`top`)):t.bottom>s.bottom-Ow(r,`bottom`)&&(l=t.bottom-t.top>s.bottom-s.top?t.top+Ow(i,`top`)-s.top:t.bottom-s.bottom+Ow(i,`bottom`)),t.left<s.left+Ow(r,`left`)?c=-(s.left-t.left+Ow(i,`left`)):t.right>s.right-Ow(r,`right`)&&(c=t.right-s.right+Ow(i,`right`)),c||l)if(n)a.defaultView.scrollBy(c,l);else{let n=e.scrollLeft,r=e.scrollTop;l&&(e.scrollTop+=l),c&&(e.scrollLeft+=c);let i=e.scrollLeft-n,a=e.scrollTop-r;t={left:t.left-i,top:t.top-a,right:t.right-i,bottom:t.bottom-a}}let u=n?`fixed`:getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(u))break;o=u==`absolute`?o.offsetParent:KC(o)}}function jw(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let a=(t.left+t.right)/2,o=n+1;o<Math.min(innerHeight,t.bottom);o+=5){let t=e.root.elementFromPoint(a,o);if(!t||t==e.dom||!e.dom.contains(t))continue;let s=t.getBoundingClientRect();if(s.top>=n-20){r=t,i=s.top;break}}return{refDOM:r,refTop:i,stack:Mw(e.dom)}}function Mw(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=KC(r));return t}function Nw({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;Pw(n,r==0?0:r-t)}function Pw(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:a}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=a&&(r.scrollLeft=a)}}var Fw=null;function Iw(e){if(e.setActive)return e.setActive();if(Fw)return e.focus(Fw);let t=Mw(e);e.focus(Fw==null?{get preventScroll(){return Fw={preventScroll:!0},!0}}:void 0),Fw||(Fw=!1,Pw(t,0))}function Lw(e,t){let n,r=2e8,i,a=0,o=t.top,s=t.top,c,l;for(let u=e.firstChild,d=0;u;u=u.nextSibling,d++){let e;if(u.nodeType==1)e=u.getClientRects();else if(u.nodeType==3)e=JC(u).getClientRects();else continue;for(let f=0;f<e.length;f++){let p=e[f];if(p.top<=o&&p.bottom>=s){o=Math.max(p.bottom,o),s=Math.min(p.top,s);let e=p.left>t.left?p.left-t.left:p.right<t.left?t.left-p.right:0;if(e<r){n=u,r=e,i=e&&n.nodeType==3?{left:p.right<t.left?p.right:p.left,top:t.top}:t,u.nodeType==1&&e&&(a=d+(t.left>=(p.left+p.right)/2?1:0));continue}}else p.top>t.top&&!c&&p.left<=t.left&&p.right>=t.left&&(c=u,l={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(a=d+1)}}return!n&&c&&(n=c,i=l,r=0),n&&n.nodeType==3?Rw(n,i):!n||r&&n.nodeType==1?{node:e,offset:a}:Lw(n,i)}function Rw(e,t){let n=e.nodeValue.length,r=document.createRange(),i;for(let a=0;a<n;a++){r.setEnd(e,a+1),r.setStart(e,a);let n=Kw(r,1);if(n.top!=n.bottom&&zw(t,n)){i={node:e,offset:a+(t.left>=(n.left+n.right)/2?1:0)};break}}return r.detach(),i||{node:e,offset:0}}function zw(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Bw(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function Vw(e,t,n){let{node:r,offset:i}=Lw(t,n),a=-1;if(r.nodeType==1&&!r.firstChild){let e=r.getBoundingClientRect();a=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,a)}function Hw(e,t,n,r){let i=-1;for(let n=t,a=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0),o;if(!t)return null;if(t.dom.nodeType==1&&(t.node.isBlock&&t.parent||!t.contentDOM)&&((o=t.dom.getBoundingClientRect()).width||o.height)&&(t.node.isBlock&&t.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(t.dom.nodeName)&&(!a&&o.left>r.left||o.top>r.top?i=t.posBefore:(!a&&o.right<r.left||o.bottom<r.top)&&(i=t.posAfter),a=!0),!t.contentDOM&&i<0&&!t.node.isText))return(t.node.isBlock?r.top<(o.top+o.bottom)/2:r.left<(o.left+o.right)/2)?t.posBefore:t.posAfter;n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function Uw(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),a=i;;){let n=e.childNodes[a];if(n.nodeType==1){let e=n.getClientRects();for(let r=0;r<e.length;r++){let i=e[r];if(zw(t,i))return Uw(n,t,i)}}if((a=(a+1)%r)==i)break}return e}function Ww(e,t){let n=e.dom.ownerDocument,r,i=0,a=sw(n,t.left,t.top);a&&({node:r,offset:i}=a);let o=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),s;if(!o||!e.dom.contains(o.nodeType==1?o:o.parentNode)){let n=e.dom.getBoundingClientRect();if(!zw(t,n)||(o=Uw(e.dom,t,n),!o))return null}if(bw)for(let e=o;r&&e;e=KC(e))e.draggable&&(r=void 0);if(o=Bw(o,t),r){if(gw&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let e=r.childNodes[i],n;e.nodeName==`IMG`&&(n=e.getBoundingClientRect()).right<=t.left&&n.bottom>t.top&&i++}let n;Tw&&i&&r.nodeType==1&&(n=r.childNodes[i-1]).nodeType==1&&n.contentEditable==`false`&&n.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!=`BR`)&&(s=Hw(e,r,i,t))}s??=Vw(e,o,t);let c=e.docView.nearestDesc(o,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function Gw(e){return e.top<e.bottom||e.left<e.right}function Kw(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(Gw(e))return e}return Array.prototype.find.call(n,Gw)||e.getBoundingClientRect()}var qw=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Jw(e,t,n){let{node:r,offset:i,atom:a}=e.docView.domFromPos(t,n<0?-1:1),o=Tw||gw;if(r.nodeType==3)if(o&&(qw.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let e=Kw(JC(r,i,i),n);if(gw&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=Kw(JC(r,i-1,i-1),-1);if(t.top==e.top){let n=Kw(JC(r,i,i+1),-1);if(n.top!=e.top)return Yw(n,n.left<t.left)}}return e}else{let e=i,t=i,a=n<0?1:-1;return n<0&&!i?(t++,a=-1):n>=0&&i==r.nodeValue.length?(e--,a=1):n<0?e--:t++,Yw(Kw(JC(r,e,t),a),a<0)}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(a==null&&i&&(n<0||i==$C(r))){let e=r.childNodes[i-1];if(e.nodeType==1)return Xw(e.getBoundingClientRect(),!1)}if(a==null&&i<$C(r)){let e=r.childNodes[i];if(e.nodeType==1)return Xw(e.getBoundingClientRect(),!0)}return Xw(r.getBoundingClientRect(),n>=0)}if(a==null&&i&&(n<0||i==$C(r))){let e=r.childNodes[i-1],t=e.nodeType==3?JC(e,$C(e)-(o?0:1)):e.nodeType==1&&(e.nodeName!=`BR`||!e.nextSibling)?e:null;if(t)return Yw(Kw(t,1),!1)}if(a==null&&i<$C(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?e.nodeType==3?JC(e,0,o?0:1):e.nodeType==1?e:null:null;if(t)return Yw(Kw(t,-1),!0)}return Yw(Kw(r.nodeType==3?JC(r):r,-n),n>=0)}function Yw(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Xw(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Zw(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function Qw(e,t,n){let r=t.selection,i=n==`up`?r.$from:r.$to;return Zw(e,t,()=>{let{node:t}=e.docView.domFromPos(i.pos,n==`up`?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=Jw(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(e.nodeType==1)t=e.getClientRects();else if(e.nodeType==3)t=JC(e,0,e.nodeValue.length).getClientRects();else continue;for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&(n==`up`?r.top-i.top>(i.bottom-r.top)*2:i.bottom-r.bottom>(r.bottom-i.top)*2))return!1}}return!0})}var $w=/[\u0590-\u08ac]/;function eT(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,a=!i,o=i==r.parent.content.size,s=e.domSelection();return s?!$w.test(r.parent.textContent)||!s.modify?n==`left`||n==`backward`?a:o:Zw(e,t,()=>{let{focusNode:t,focusOffset:i,anchorNode:a,anchorOffset:o}=e.domSelectionRange(),c=s.caretBidiLevel;s.modify(`move`,n,`character`);let l=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:d}=e.domSelectionRange(),f=u&&!l.contains(u.nodeType==1?u:u.parentNode)||t==u&&i==d;try{s.collapse(a,o),t&&(t!=a||i!=o)&&s.extend&&s.extend(t,i)}catch{}return c!=null&&(s.caretBidiLevel=c),f}):r.pos==r.start()||r.pos==r.end()}var tT=null,nT=null,rT=!1;function iT(e,t,n){return tT==t&&nT==n?rT:(tT=t,nT=n,rT=n==`up`||n==`down`?Qw(e,t,n):eT(e,t,n))}var aT=0,oT=1,sT=2,cT=3,lT=class{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=aT,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}else{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}let r;if(e==this.dom&&this.contentDOM)r=t>GC(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(r==null&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return r??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i=this.getDesc(r),a;if(i&&(!t||i.node))if(n&&(a=i.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))n=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)for(let e=0;e<r.children.length;e++){let t=r.children[e];if(t.size){r=t;break}}return r}if(e<i)return r.descAt(e-n-r.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let i=this.children[n],a=t+i.size;if(a>e||i instanceof gT){r=e-t;break}t=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof uT&&e.side>=0;n--);if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,!(!e||e.dom.parentNode==this.contentDOM);n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?GC(e.dom)+1:0}}else{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,!(!e||e.dom.parentNode==this.contentDOM);n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?GC(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let a=n,o=0;;o++){let n=this.children[o],s=a+n.size;if(r==-1&&e<=s){let i=a+n.border;if(e>=i&&t<=s-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=a;for(let t=o;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=GC(n.dom)+1;break}e-=n.size}r==-1&&(r=0)}if(r>-1&&(s>t||o==this.children.length-1)){t=s;for(let e=o+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=GC(n.dom);break}t+=n.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=s}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(t.nodeType!=1||n==t.childNodes.length)throw RangeError(`No node after pos `+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let i=Math.min(e,t),a=Math.max(e,t);for(let o=0,s=0;o<this.children.length;o++){let c=this.children[o],l=s+c.size;if(i>s&&a<l)return c.setSelection(e-s-c.border,t-s-c.border,n,r);s=l}let o=this.domFromPos(e,e?-1:1),s=t==e?o:this.domFromPos(t,t?-1:1),c=n.root.getSelection(),l=n.domSelectionRange(),u=!1;if((gw||bw)&&e==t){let{node:e,offset:t}=o;if(e.nodeType==3){if(u=!!(t&&e.nodeValue[t-1]==`
40
- `),u&&t==e.nodeValue.length)for(let t=e,n;t;t=t.parentNode){if(n=t.nextSibling){n.nodeName==`BR`&&(o=s={node:n.parentNode,offset:GC(n)+1});break}let e=t.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];u=n&&(n.nodeName==`BR`||n.contentEditable==`false`)}}if(gw&&l.focusNode&&l.focusNode!=s.node&&l.focusNode.nodeType==1){let e=l.focusNode.childNodes[l.focusOffset];e&&e.contentEditable==`false`&&(r=!0)}if(!(r||u&&bw)&&XC(o.node,o.offset,l.anchorNode,l.anchorOffset)&&XC(s.node,s.offset,l.focusNode,l.focusOffset))return;let d=!1;if((c.extend||e==t)&&!(u&&gw)){c.collapse(o.node,o.offset);try{e!=t&&c.extend(s.node,s.offset),d=!0}catch{}}if(!d){if(e>t){let e=o;o=s,s=e}let n=document.createRange();n.setEnd(s.node,s.offset),n.setStart(o.node,o.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&e.type!=`selection`}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],a=n+i.size;if(n==a?e<=a&&t>=n:e<a&&t>n){let r=n+i.border,o=a-i.border;if(e>=r&&t<=o){this.dirty=e==n||t==a?sT:oT,e==r&&t==o&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=cT:i.markDirty(e-r,t-r);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?sT:cT}n=a}this.dirty=sT}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?sT:oT;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}},uT=class extends lT{constructor(e,t,n,r){let i,a=t.type.toDOM;if(typeof a==`function`&&(a=a(n,()=>{if(!i)return r;if(i.parent)return i.parent.posBeforeChild(i)})),!t.type.spec.raw){if(a.nodeType!=1){let e=document.createElement(`span`);e.appendChild(a),a=e}a.contentEditable=`false`,a.classList.add(`ProseMirror-widget`)}super(e,[],a,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==aT&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!=`selection`||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},dT=class extends lT{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e==this.textDOM?this.posAtStart+t:this.posAtStart+(t?this.size:0)}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type===`characterData`&&e.target.nodeValue==e.oldValue}},fT=class e extends lT{constructor(e,t,n,r,i){super(e,[],n,r),this.mark=t,this.spec=i}static create(t,n,r,i){let a=i.nodeViews[n.type.name],o=a&&a(n,i,r);return(!o||!o.dom)&&(o=Xx.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&cT||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=cT&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=aT){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=aT}}slice(t,n,r){let i=e.create(this.parent,this.mark,!0,r),a=this.children,o=this.size;n<o&&(a=NT(a,n,o,r)),t>0&&(a=NT(a,0,t,r));for(let e=0;e<a.length;e++)a[e].parent=i;return i.children=a,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},pT=class e extends lT{constructor(e,t,n,r,i,a,o,s,c){super(e,[],i,a),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=o}static create(t,n,r,i,a,o){let s=a.nodeViews[n.type.name],c,l=s&&s(n,a,()=>{if(!c)return o;if(c.parent)return c.parent.posBeforeChild(c)},r,i),u=l&&l.dom,d=l&&l.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw RangeError(`Text must be rendered as a DOM text node`)}else if(!u){let e=Xx.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs);({dom:u,contentDOM:d}=e)}!d&&!n.isText&&u.nodeName!=`BR`&&(u.hasAttribute(`contenteditable`)||(u.contentEditable=`false`),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=wT(u,r,n),l?c=new _T(t,n,r,i,u,d||null,f,l,a,o+1):n.isText?new hT(t,n,r,i,u,f,a):new e(t,n,r,i,u,d||null,f,a,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace==`pre`&&(e.preserveWhitespace=`full`),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>V.empty)}return e}matchesNode(e,t,n){return this.dirty==aT&&e.eq(this.node)&&TT(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,o=i&&i.pos<0,s=new DT(this,a&&a.node,e);AT(this.node,this.innerDeco,(t,i,a)=>{t.spec.marks?s.syncToMarks(t.spec.marks,n,e,i):t.type.side>=0&&!a&&s.syncToMarks(i==this.node.childCount?Vb.none:this.node.child(i).marks,n,e,i),s.placeWidget(t,e,r)},(t,a,c,l)=>{s.syncToMarks(t.marks,n,e,l);let u;s.findNodeMatch(t,a,c,l)||o&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=s.findIndexWithChild(i.node))>-1&&s.updateNodeAt(t,a,c,u,e)||s.updateNextNode(t,a,c,e,l,r)||s.addNode(t,a,c,e,r),r+=t.nodeSize}),s.syncToMarks([],n,e,0),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||this.dirty==sT)&&(a&&this.protectLocalComposition(e,a),vT(this.contentDOM,this.children,e),xw&&jT(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof sC)||n<t||r>t+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let e=i.nodeValue,a=MT(this.node.content,e,n-t,r-t);return a<0?null:{node:i,pos:a,text:e}}else return{node:i,pos:-1,text:``}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&=void 0}let a=new dT(this,i,t,r);e.input.compositionNodes.push(a),this.children=NT(this.children,n,n+r.length,e,a)}update(e,t,n,r){return this.dirty==cT||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=aT}updateOuterDeco(e){if(TT(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=ST(this.dom,this.nodeDOM,xT(this.outerDeco,this.node,t),xT(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute(`draggable`))}get domAtom(){return this.node.isAtom}};function mT(e,t,n,r,i){wT(r,t,e);let a=new pT(void 0,e,t,n,r,r,r,i,0);return a.contentDOM&&a.updateChildren(i,0),a}var hT=class e extends pT{constructor(e,t,n,r,i,a,o){super(e,t,n,r,i,null,a,o,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return this.dirty==cT||this.dirty!=aT&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=aT||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=aT,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return e.type!=`characterData`&&e.type!=`selection`}slice(t,n,r){let i=this.node.cut(t,n),a=document.createTextNode(i.text);return new e(this.parent,i,this.outerDeco,this.innerDeco,a,a,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=cT)}get domAtom(){return!1}isText(e){return this.node.text==e}},gT=class extends lT{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==aT&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName==`IMG`}},_T=class extends pT{constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r,i,a,o,c,l),this.spec=s}update(e,t,n,r){if(this.dirty==cT)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}else if(!this.contentDOM&&!e.isLeaf)return!1;else return super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};function vT(e,t,n){let r=e.firstChild,i=!1;for(let a=0;a<t.length;a++){let o=t[a],s=o.dom;if(s.parentNode==e){for(;s!=r;)r=ET(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(s,r);if(o instanceof fT){let t=r?r.previousSibling:e.lastChild;vT(o.contentDOM,o.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=ET(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}var yT=function(e){e&&(this.nodeName=e)};yT.prototype=Object.create(null);var bT=[new yT];function xT(e,t,n){if(e.length==0)return bT;let r=n?bT[0]:new yT,i=[r];for(let a=0;a<e.length;a++){let o=e[a].type.attrs;if(o)for(let e in o.nodeName&&i.push(r=new yT(o.nodeName)),o){let a=o[e];a!=null&&(n&&i.length==1&&i.push(r=new yT(t.isInline?`span`:`div`)),e==`class`?r.class=(r.class?r.class+` `:``)+a:e==`style`?r.style=(r.style?r.style+`;`:``)+a:e!=`nodeName`&&(r[e]=a))}}return i}function ST(e,t,n,r){if(n==bT&&r==bT)return t;let i=t;for(let t=0;t<r.length;t++){let a=r[t],o=n[t];if(t){let t;o&&o.nodeName==a.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==a.nodeName?i=t:(t=document.createElement(a.nodeName),t.pmIsDeco=!0,t.appendChild(i),o=bT[0],i=t)}CT(i,o||bT[0],a)}return i}function CT(e,t,n){for(let r in t)r!=`class`&&r!=`style`&&r!=`nodeName`&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!=`class`&&r!=`style`&&r!=`nodeName`&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(` `).filter(Boolean):[],i=n.class?n.class.split(` `).filter(Boolean):[];for(let t=0;t<r.length;t++)i.indexOf(r[t])==-1&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)r.indexOf(i[t])==-1&&e.classList.add(i[t]);e.classList.length==0&&e.removeAttribute(`class`)}if(t.style!=n.style){if(t.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=n.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}function wT(e,t,n){return ST(e,e,bT,xT(t,n,e.nodeType!=1))}function TT(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function ET(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var DT=class{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=OT(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n,r){let i=0,a=this.stack.length>>1,o=Math.min(a,e.length);for(;i<o&&(i==a-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<a;)this.destroyRest(),this.top.dirty=aT,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let i=-1,o=this.top.children.length;r<this.preMatch.index&&(o=Math.min(this.index+3,o));for(let t=this.index;t<o;t++){let n=this.top.children[t];if(n.matchesMark(e[a])&&!this.isLocked(n.dom)){i=t;break}}if(i>-1)i>this.index&&(this.changed=!0,this.destroyBetween(this.index,i)),this.top=this.top.children[this.index];else{let r=fT.create(this.top,e[a],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,a++}}findNodeMatch(e,t,n,r){let i=-1,a;if(r>=this.preMatch.index&&(a=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&a.matchesNode(e,t,n))i=this.top.children.indexOf(a,this.index);else for(let r=this.index,a=Math.min(this.top.children.length,r+5);r<a;r++){let a=this.top.children[r];if(a.matchesNode(e,t,n)&&!this.preMatch.matched.has(a)){i=r;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,n,r,i){let a=this.top.children[r];return a.dirty==cT&&a.dom==a.contentDOM&&(a.dirty=sT),a.update(e,t,n,i)?(this.destroyBetween(this.index,r),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t){for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e}return-1}e=t}}updateNextNode(e,t,n,r,i,a){for(let o=this.index;o<this.top.children.length;o++){let s=this.top.children[o];if(s instanceof pT){let c=this.preMatch.matched.get(s);if(c!=null&&c!=i)return!1;let l=s.dom,u,d=this.isLocked(l)&&!(e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&s.dirty!=cT&&TT(t,s.outerDeco));if(!d&&s.update(e,t,n,r))return this.destroyBetween(this.index,o),s.dom!=l&&(this.changed=!0),this.index++,!0;if(!d&&(u=this.recreateWrapper(s,e,t,n,r,a)))return this.destroyBetween(this.index,o),this.top.children[this.index]=u,u.contentDOM&&(u.dirty=sT,u.updateChildren(r,a+1),u.dirty=aT),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,i,a){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!TT(n,e.outerDeco)||!r.eq(e.innerDeco))return null;let o=pT.create(this.top,t,n,r,i,a);if(o.contentDOM){o.children=e.children,e.children=[];for(let e of o.children)e.parent=o}return e.destroy(),o}addNode(e,t,n,r,i){let a=pT.create(this.top,e,t,n,r,i);a.contentDOM&&a.updateChildren(r,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(e)&&(e==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let r=new uT(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof fT;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof hT)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((bw||vw)&&e&&e.dom.contentEditable==`false`&&this.addHackNode(`IMG`,t),this.addHackNode(`BR`,this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e==`IMG`&&(n.className=`ProseMirror-separator`,n.alt=``),e==`BR`&&(n.className=`ProseMirror-trailingBreak`);let r=new gT(this.top,[],n,null);t==this.top?t.children.splice(this.index++,0,r):t.children.push(r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}};function OT(e,t){let n=t,r=n.children.length,i=e.childCount,a=new Map,o=[];outer:for(;i>0;){let s;for(;;)if(r){let e=n.children[r-1];if(e instanceof fT)n=e,r=e.children.length;else{s=e,r--;break}}else if(n==t)break outer;else r=n.parent.children.indexOf(n),n=n.parent;let c=s.node;if(c){if(c!=e.child(i-1))break;--i,a.set(s,i),o.push(s)}}return{index:i,matched:a,matches:o.reverse()}}function kT(e,t){return e.type.side-t.type.side}function AT(e,t,n,r){let i=t.locals(e),a=0;if(i.length==0){for(let n=0;n<e.childCount;n++){let o=e.child(n);r(o,i,t.forChild(a,o),n),a+=o.nodeSize}return}let o=0,s=[],c=null;for(let l=0;;){let u,d;for(;o<i.length&&i[o].to==a;){let e=i[o++];e.widget&&(u?(d||=[u]).push(e):u=e)}if(u)if(d){d.sort(kT);for(let e=0;e<d.length;e++)n(d[e],l,!!c)}else n(u,l,!!c);let f,p;if(c)p=-1,f=c,c=null;else if(l<e.childCount)p=l,f=e.child(l++);else break;for(let e=0;e<s.length;e++)s[e].to<=a&&s.splice(e--,1);for(;o<i.length&&i[o].from<=a&&i[o].to>a;)s.push(i[o++]);let m=a+f.nodeSize;if(f.isText){let e=m;o<i.length&&i[o].from<e&&(e=i[o].from);for(let t=0;t<s.length;t++)s[t].to<e&&(e=s[t].to);e<m&&(c=f.cut(e-a),f=f.cut(0,e-a),m=e,p=-1)}else for(;o<i.length&&i[o].to<m;)o++;let h=f.isInline&&!f.isLeaf?s.filter(e=>!e.inline):s.slice();r(f,h,t.forChild(a,f),p),a=m}}function jT(e){if(e.nodeName==`UL`||e.nodeName==`OL`){let t=e.style.cssText;e.style.cssText=t+`; list-style: square !important`,window.getComputedStyle(e).listStyle,e.style.cssText=t}}function MT(e,t,n,r){for(let i=0,a=0;i<e.childCount&&a<=r;){let o=e.child(i++),s=a;if(a+=o.nodeSize,!o.isText)continue;let c=o.text;for(;i<e.childCount;){let t=e.child(i++);if(a+=t.nodeSize,!t.isText)break;c+=t.text}if(a>=n){if(a>=r&&c.slice(r-t.length-s,r-s)==t)return r-t.length;let e=s<r?c.lastIndexOf(t,r-s-1):-1;if(e>=0&&e+t.length+s>=n)return s+e;if(n==r&&c.length>=r+t.length-s&&c.slice(r-s,r-s+t.length)==t)return r}}return-1}function NT(e,t,n,r,i){let a=[];for(let o=0,s=0;o<e.length;o++){let c=e[o],l=s,u=s+=c.size;l>=n||u<=t?a.push(c):(l<t&&a.push(c.slice(0,t-l,r)),i&&=(a.push(i),void 0),u>n&&a.push(c.slice(n-l,c.size,r)))}return a}function PT(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),a=i&&i.size==0,o=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let s=r.resolve(o),c,l;if(iw(n)){for(c=o;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&lC.isSelectable(e)&&i.parent&&!(e.isInline&&nw(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new lC(o==e?s:r.resolve(e))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let t=o,i=o;for(let r=0;r<n.rangeCount;r++){let a=n.getRangeAt(r);t=Math.min(t,e.docView.posFromDOM(a.startContainer,a.startOffset,1)),i=Math.max(i,e.docView.posFromDOM(a.endContainer,a.endOffset,-1))}if(t<0)return null;[c,o]=i==e.state.selection.anchor?[i,t]:[t,i],s=r.resolve(o)}else c=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let u=r.resolve(c);if(!l){let n=t==`pointer`||e.state.selection.head<s.pos&&!a?1:-1;l=GT(e,u,s,n)}return l}function FT(e){return e.editable?e.hasFocus():qT(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function IT(e,t=!1){let n=e.state.selection;if(UT(e,n),FT(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&vw){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&XC(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)HT(e);else{let{anchor:r,head:i}=n,a,o;LT&&!(n instanceof sC)&&(n.$from.parent.inlineContent||(a=RT(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=RT(e,n.to))),e.docView.setSelection(r,i,e,t),LT&&(a&&BT(a),o&&BT(o)),n.visible?e.dom.classList.remove(`ProseMirror-hideselection`):(e.dom.classList.add(`ProseMirror-hideselection`),`onselectionchange`in document&&VT(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var LT=bw||vw&&yw<63;function RT(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,a=r?n.childNodes[r-1]:null;if(bw&&i&&i.contentEditable==`false`)return zT(i);if((!i||i.contentEditable==`false`)&&(!a||a.contentEditable==`false`)){if(i)return zT(i);if(a)return zT(a)}}function zT(e){return e.contentEditable=`true`,bw&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function BT(e){e.contentEditable=`false`,e.wasDraggable&&=(e.draggable=!0,null)}function VT(e){let t=e.dom.ownerDocument;t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener(`selectionchange`,e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard),setTimeout(()=>{(!FT(e)||e.state.selection.visible)&&e.dom.classList.remove(`ProseMirror-hideselection`)},20))})}function HT(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName==`IMG`;r?t.collapse(n.parentNode,GC(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&mw&&hw<=11&&(n.disabled=!0,n.disabled=!1)}function UT(e,t){if(t instanceof lC){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(WT(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else WT(e)}function WT(e){e.lastSelectedViewDesc&&=(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),void 0)}function GT(e,t,n,r){return e.someProp(`createSelectionBetween`,r=>r(e,t,n))||sC.between(t,n,r)}function KT(e){return e.editable&&!e.hasFocus()?!1:qT(e)}function qT(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function JT(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return XC(t.node,t.offset,n.anchorNode,n.anchorOffset)}function YT(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&rC.findFrom(a,t)}function XT(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function ZT(e,t,n){let r=e.state.selection;if(r instanceof sC)if(n.indexOf(`s`)>-1){let{$head:n}=r,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=e.state.doc.resolve(n.pos+i.nodeSize*(t<0?-1:1));return XT(e,new sC(r.$anchor,a))}else if(r.empty){if(e.endOfTextblock(t>0?`forward`:`backward`)){let n=YT(e.state,t);return n&&n instanceof lC?XT(e,n):!1}else if(!(Sw&&n.indexOf(`m`)>-1)){let n=r.$head,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter,a;if(!i||i.isText)return!1;let o=t<0?n.pos-i.nodeSize:n.pos;return i.isAtom||(a=e.docView.descAt(o))&&!a.contentDOM?lC.isSelectable(i)?XT(e,new lC(t<0?e.state.doc.resolve(n.pos-i.nodeSize):n)):Tw?XT(e,new sC(e.state.doc.resolve(t<0?o:o+i.nodeSize))):!1:!1}}else return!1;else if(r instanceof lC&&r.node.isInline)return XT(e,new sC(t>0?r.$to:r.$from));else{let n=YT(e.state,t);return n?XT(e,n):!1}}function QT(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function $T(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!=`BR`)}function eE(e,t){return t<0?tE(e):nE(e)}function tE(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,a,o=!1;for(gw&&n.nodeType==1&&r<QT(n)&&$T(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(n.nodeType!=1)break;{let e=n.childNodes[r-1];if($T(e,-1))i=n,a=--r;else if(e.nodeType==3)n=e,r=n.nodeValue.length;else break}}else if(rE(n))break;else{let t=n.previousSibling;for(;t&&$T(t,-1);)i=n.parentNode,a=GC(t),t=t.previousSibling;if(t)n=t,r=QT(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}o?oE(e,n,r):i&&oE(e,i,a)}function nE(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=QT(n),a,o;for(;;)if(r<i){if(n.nodeType!=1)break;let e=n.childNodes[r];if($T(e,1))a=n,o=++r;else break}else if(rE(n))break;else{let t=n.nextSibling;for(;t&&$T(t,1);)a=t.parentNode,o=GC(t)+1,t=t.nextSibling;if(t)n=t,r=0,i=QT(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}a&&oE(e,a,o)}function rE(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function iE(e,t){for(;e&&t==e.childNodes.length&&!rw(e);)t=GC(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable==`false`)break;e=n,t=0}}function aE(e,t){for(;e&&!t&&!rw(e);)t=GC(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable==`false`)break;e=n,t=e.childNodes.length}}function oE(e,t,n){if(t.nodeType!=3){let e,r;(r=iE(t,n))?(t=r,n=0):(e=aE(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection();if(!r)return;if(iw(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&IT(e)},50)}function sE(e,t){let n=e.state.doc.resolve(t);if(!(vw||Cw)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?`ltr`:`rtl`}if(t<n.end()){let n=e.coordsAtPos(t+1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?`ltr`:`rtl`}}return getComputedStyle(e.dom).direction==`rtl`?`rtl`:`ltr`}function cE(e,t,n){let r=e.state.selection;if(r instanceof sC&&!r.empty||n.indexOf(`s`)>-1||Sw&&n.indexOf(`m`)>-1)return!1;let{$from:i,$to:a}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?`up`:`down`)){let n=YT(e.state,t);if(n&&n instanceof lC)return XT(e,n)}if(!i.parent.inlineContent){let n=t<0?i:a,o=r instanceof dC?rC.near(n,t):rC.findFrom(n,t);return o?XT(e,o):!1}return!1}function lE(e,t){if(!(e.state.selection instanceof sC))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?`forward`:`backward`))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let r=e.state.tr;return t<0?r.delete(n.pos-a.nodeSize,n.pos):r.delete(n.pos,n.pos+a.nodeSize),e.dispatch(r),!0}return!1}function uE(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function dE(e){if(!bw||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable==`false`){let n=t.firstChild;uE(e,n,`true`),setTimeout(()=>uE(e,n,`false`),20)}return!1}function fE(e){let t=``;return e.ctrlKey&&(t+=`c`),e.metaKey&&(t+=`m`),e.altKey&&(t+=`a`),e.shiftKey&&(t+=`s`),t}function pE(e,t){let n=t.keyCode,r=fE(t);if(n==8||Sw&&n==72&&r==`c`)return lE(e,-1)||eE(e,-1);if(n==46&&!t.shiftKey||Sw&&n==68&&r==`c`)return lE(e,1)||eE(e,1);if(n==13||n==27)return!0;if(n==37||Sw&&n==66&&r==`c`){let t=n==37?sE(e,e.state.selection.from)==`ltr`?-1:1:-1;return ZT(e,t,r)||eE(e,t)}else if(n==39||Sw&&n==70&&r==`c`){let t=n==39?sE(e,e.state.selection.from)==`ltr`?1:-1:1;return ZT(e,t,r)||eE(e,t)}else if(n==38||Sw&&n==80&&r==`c`)return cE(e,-1,r)||eE(e,-1);else if(n==40||Sw&&n==78&&r==`c`)return dE(e)||cE(e,1,r)||eE(e,1);else if(r==(Sw?`m`:`c`)&&(n==66||n==73||n==89||n==90))return!0;return!1}function mE(e,t){e.someProp(`transformCopied`,n=>{t=n(t,e)});let n=[],{content:r,openStart:i,openEnd:a}=t;for(;i>1&&a>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,a--;let e=r.firstChild;n.push(e.type.name,e.attrs==e.type.defaultAttrs?null:e.attrs),r=e.content}let o=e.someProp(`clipboardSerializer`)||Xx.fromSchema(e.state.schema),s=TE(),c=s.createElement(`div`);c.appendChild(o.serializeFragment(r,{document:s}));let l=c.firstChild,u,d=0;for(;l&&l.nodeType==1&&(u=CE[l.nodeName.toLowerCase()]);){for(let e=u.length-1;e>=0;e--){let t=s.createElement(u[e]);for(;c.firstChild;)t.appendChild(c.firstChild);c.appendChild(t),d++}l=c.firstChild}return l&&l.nodeType==1&&l.setAttribute(`data-pm-slice`,`${i} ${a}${d?` -${d}`:``} ${JSON.stringify(n)}`),{dom:c,text:e.someProp(`clipboardTextSerializer`,n=>n(t,e))||t.content.textBetween(0,t.content.size,`
41
-
42
- `),slice:t}}function hE(e,t,n,r,i){let a=i.parent.type.spec.code,o,s;if(!n&&!t)return null;let c=!!t&&(r||a||!n);if(c){if(e.someProp(`transformPastedText`,n=>{t=n(t,a||r,e)}),a)return s=new H(V.from(e.state.schema.text(t.replace(/\r\n?/g,`
43
- `))),0,0),e.someProp(`transformPasted`,t=>{s=t(s,e,!0)}),s;let n=e.someProp(`clipboardTextParser`,n=>n(t,i,r,e));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,a=Xx.fromSchema(r);o=document.createElement(`div`),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=o.appendChild(document.createElement(`p`));e&&t.appendChild(a.serializeNode(r.text(e,n)))})}}else e.someProp(`transformPastedHTML`,t=>{n=t(n,e)}),o=OE(n),Tw&&kE(o);let l=o&&o.querySelector(`[data-pm-slice]`),u=l&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(l.getAttribute(`data-pm-slice`)||``);if(u&&u[3])for(let e=+u[3];e>0;e--){let e=o.firstChild;for(;e&&e.nodeType!=1;)e=e.nextSibling;if(!e)break;o=e}if(s||=(e.someProp(`clipboardParser`)||e.someProp(`domParser`)||Ix.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(c||u),context:i,ruleFromNode(e){return e.nodeName==`BR`&&!e.nextSibling&&e.parentNode&&!gE.test(e.parentNode.nodeName)?{ignore:!0}:null}}),u)s=AE(SE(s,+u[1],+u[2]),u[4]);else if(s=H.maxOpen(_E(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=SE(s,e,t)}return e.someProp(`transformPasted`,t=>{s=t(s,e,c)}),s}var gE=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function _E(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),i,a=[];if(e.forEach(e=>{if(!a)return;let t=r.findWrapping(e.type),n;if(!t)return a=null;if(n=a.length&&i.length&&yE(t,i,e,a[a.length-1],0))a[a.length-1]=n;else{a.length&&(a[a.length-1]=bE(a[a.length-1],i.length));let n=vE(e,t);a.push(n),r=r.matchType(n.type),i=t}}),a)return V.from(a)}return e}function vE(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,V.from(e));return e}function yE(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let a=yE(e,t,n,r.lastChild,i+1);if(a)return r.copy(r.content.replaceChild(r.childCount-1,a));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(V.from(vE(n,e,i+1))))}}function bE(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,bE(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(V.empty,!0);return e.copy(n.append(r))}function xE(e,t,n,r,i,a){let o=t<0?e.firstChild:e.lastChild,s=o.content;return e.childCount>1&&(a=0),i<r-1&&(s=xE(s,t,n,r,i+1,a)),i>=n&&(s=t<0?o.contentMatchAt(0).fillBefore(s,a<=i).append(s):s.append(o.contentMatchAt(o.childCount).fillBefore(V.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(s))}function SE(e,t,n){return t<e.openStart&&(e=new H(xE(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new H(xE(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var CE={thead:[`table`],tbody:[`table`],tfoot:[`table`],caption:[`table`],colgroup:[`table`],col:[`table`,`colgroup`],tr:[`table`,`tbody`],td:[`table`,`tbody`,`tr`],th:[`table`,`tbody`,`tr`]},wE=null;function TE(){return wE||=document.implementation.createHTMLDocument(`title`)}var EE=null;function DE(e){let t=window.trustedTypes;return t?(EE||=t.defaultPolicy||t.createPolicy(`ProseMirrorClipboard`,{createHTML:e=>e}),EE.createHTML(e)):e}function OE(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=TE().createElement(`div`),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&CE[r[1].toLowerCase()])&&(e=i.map(e=>`<`+e+`>`).join(``)+e+i.map(e=>`</`+e+`>`).reverse().join(``)),n.innerHTML=DE(e),i)for(let e=0;e<i.length;e++)n=n.querySelector(i[e])||n;return n}function kE(e){let t=e.querySelectorAll(vw?`span:not([class]):not([style])`:`span.Apple-converted-space`);for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==`\xA0`&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(` `),r)}}function AE(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:a,openEnd:o}=e;for(let e=r.length-2;e>=0;e-=2){let t=n.nodes[r[e]];if(!t||t.hasRequiredAttrs())break;i=V.from(t.create(r[e+1],i)),a++,o++}return new H(i,a,o)}var jE={},ME={},NE={touchstart:!0,touchmove:!0},PE=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:``,button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function FE(e){for(let t in jE){let n=jE[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{BE(e,t)&&!zE(e,t)&&(e.editable||!(t.type in ME))&&n(e,t)},NE[t]?{passive:!0}:void 0)}bw&&e.dom.addEventListener(`input`,()=>null),RE(e)}function IE(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function LE(e){for(let t in e.domObserver.stop(),e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function RE(e){e.someProp(`handleDOMEvents`,t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>zE(e,t))})}function zE(e,t){return e.someProp(`handleDOMEvents`,n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function BE(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function VE(e,t){!zE(e,t)&&jE[t.type]&&(e.editable||!(t.type in ME))&&jE[t.type](e,t)}ME.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!tD(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(ww&&vw&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),xw&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp(`handleKeyDown`,t=>t(e,aw(13,`Enter`))),e.input.lastIOSEnter=0)},200)}else e.someProp(`handleKeyDown`,t=>t(e,n))||pE(e,n)?n.preventDefault():IE(e,`key`)},ME.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},ME.keypress=(e,t)=>{let n=t;if(tD(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Sw&&n.metaKey)return;if(e.someProp(`handleKeyPress`,t=>t(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof sC)||!r.$from.sameParent(r.$to)){let t=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(t).scrollIntoView();!/[\r\n]/.test(t)&&!e.someProp(`handleTextInput`,n=>n(e,r.$from.pos,r.$to.pos,t,i))&&e.dispatch(i()),n.preventDefault()}};function HE(e){return{left:e.clientX,top:e.clientY}}function UE(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function WE(e,t,n,r,i){if(r==-1)return!1;let a=e.state.doc.resolve(r);for(let r=a.depth+1;r>0;r--)if(e.someProp(t,t=>r>a.depth?t(e,n,a.nodeAfter,a.before(r),i,!0):t(e,n,a.node(r),a.before(r),i,!1)))return!0;return!1}function GE(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n==`pointer`&&r.setMeta(`pointer`,!0),e.dispatch(r)}function KE(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&lC.isSelectable(r)?(GE(e,new lC(n),`pointer`),!0):!1}function qE(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof lC&&(r=n.node);let a=e.state.doc.resolve(t);for(let e=a.depth+1;e>0;e--){let t=e>a.depth?a.nodeAfter:a.node(e);if(lC.isSelectable(t)){i=r&&n.$from.depth>0&&e>=n.$from.depth&&a.before(n.$from.depth+1)==n.$from.pos?a.before(n.$from.depth):a.before(e);break}}return i==null?!1:(GE(e,lC.create(e.state.doc,i),`pointer`),!0)}function JE(e,t,n,r,i){return WE(e,`handleClickOn`,t,n,r)||e.someProp(`handleClick`,n=>n(e,t,r))||(i?qE(e,n):KE(e,n))}function YE(e,t,n,r){return WE(e,`handleDoubleClickOn`,t,n,r)||e.someProp(`handleDoubleClick`,n=>n(e,t,r))}function XE(e,t,n,r){return WE(e,`handleTripleClickOn`,t,n,r)||e.someProp(`handleTripleClick`,n=>n(e,t,r))||ZE(e,n,r)}function ZE(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(GE(e,sC.create(r,0,r.content.size),`pointer`),!0):!1;let i=r.resolve(t);for(let t=i.depth+1;t>0;t--){let n=t>i.depth?i.nodeAfter:i.node(t),a=i.before(t);if(n.inlineContent)GE(e,sC.create(r,a+1,a+1+n.content.size),`pointer`);else if(lC.isSelectable(n))GE(e,lC.create(r,a),`pointer`);else continue;return!0}}function QE(e){return cD(e)}var $E=Sw?`metaKey`:`ctrlKey`;jE.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=QE(e),i=Date.now(),a=`singleClick`;i-e.input.lastClick.time<500&&UE(n,e.input.lastClick)&&!n[$E]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type==`singleClick`?a=`doubleClick`:e.input.lastClick.type==`doubleClick`&&(a=`tripleClick`)),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:a,button:n.button};let o=e.posAtCoords(HE(n));o&&(a==`singleClick`?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new eD(e,o,n,!!r)):(a==`doubleClick`?YE:XE)(e,o.pos,o.inside,n)?n.preventDefault():IE(e,`pointer`))};var eD=class{constructor(e,t,n,r){this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[$E],this.allowDefault=n.shiftKey;let i,a;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),a=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,a=n.depth?n.before():0}let o=r?null:n.target,s=o?e.docView.nearestDesc(o,!0):null;this.target=s&&s.nodeDOM.nodeType==1?s.nodeDOM:null;let{selection:c}=e.state;(n.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof lC&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&gw&&!this.target.hasAttribute(`contentEditable`))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute(`contentEditable`,`false`)},20),this.view.domObserver.start()),e.root.addEventListener(`mouseup`,this.up=this.up.bind(this)),e.root.addEventListener(`mousemove`,this.move=this.move.bind(this)),IE(e,`pointer`)}done(){this.view.root.removeEventListener(`mouseup`,this.up),this.view.root.removeEventListener(`mousemove`,this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute(`draggable`),this.mightDrag.setUneditable&&this.target.removeAttribute(`contentEditable`),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>IT(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(HE(e))),this.updateAllowDefault(e),this.allowDefault||!t?IE(this.view,`pointer`):JE(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||bw&&this.mightDrag&&!this.mightDrag.node.isAtom||vw&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(GE(this.view,rC.near(this.view.state.doc.resolve(t.pos)),`pointer`),e.preventDefault()):IE(this.view,`pointer`)}move(e){this.updateAllowDefault(e),IE(this.view,`pointer`),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}};jE.touchstart=e=>{e.input.lastTouch=Date.now(),QE(e),IE(e,`pointer`)},jE.touchmove=e=>{e.input.lastTouch=Date.now(),IE(e,`pointer`)},jE.contextmenu=e=>QE(e);function tD(e,t){return e.composing?!0:bw&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var nD=ww?5e3:-1;ME.compositionstart=ME.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof sC&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>e.type.spec.inclusive===!1)||vw&&Cw&&rD(e)))e.markCursor=e.state.storedMarks||n.marks(),cD(e,!0),e.markCursor=null;else if(cD(e,!t.selection.empty),gw&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&n.nodeType==1&&r!=0;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(t.nodeType==3){let n=e.domSelection();n&&n.collapse(t,t.nodeValue.length);break}else n=t,r=-1}}e.input.composing=!0}iD(e,nD)};function rD(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable==`false`}ME.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,iD(e,20))};function iD(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>cD(e),t))}function aD(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=sD());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function oD(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=ew(t.focusNode,t.focusOffset),r=tw(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let t=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(!(!e||!e.isText(n.nodeValue)))return r}}return n||r}function sD(){let e=document.createEvent(`Event`);return e.initEvent(`event`,!0,!0),e.timeStamp}function cD(e,t=!1){if(!(ww&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),aD(e),t||e.docView&&e.docView.dirty){let n=PT(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function lD(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement(`div`));n.appendChild(t),n.style.cssText=`position: fixed; left: -10000px; top: 10px`;let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var uD=mw&&hw<15||xw&&Ew<604;jE.copy=ME.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type==`cut`;if(r.empty)return;let a=uD?null:n.clipboardData,{dom:o,text:s}=mE(e,r.content());a?(n.preventDefault(),a.clearData(),a.setData(`text/html`,o.innerHTML),a.setData(`text/plain`,s)):lD(e,o),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta(`uiEvent`,`cut`))};function dD(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function fD(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?`textarea`:`div`));n||(r.contentEditable=`true`),r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?pD(e,r.value,null,i,t):pD(e,r.textContent,r.innerHTML,i,t)},50)}function pD(e,t,n,r,i){let a=hE(e,t,n,r,e.state.selection.$from);if(e.someProp(`handlePaste`,t=>t(e,i,a||H.empty)))return!0;if(!a)return!1;let o=dD(a),s=o?e.state.tr.replaceSelectionWith(o,r):e.state.tr.replaceSelection(a);return e.dispatch(s.scrollIntoView().setMeta(`paste`,!0).setMeta(`uiEvent`,`paste`)),!0}function mD(e){let t=e.getData(`text/plain`)||e.getData(`Text`);if(t)return t;let n=e.getData(`text/uri-list`);return n?n.replace(/\r?\n/g,` `):``}ME.paste=(e,t)=>{let n=t;if(e.composing&&!ww)return;let r=uD?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&pD(e,mD(r),r.getData(`text/html`),i,n)?n.preventDefault():fD(e,n)};var hD=class{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}},gD=Sw?`altKey`:`ctrlKey`;function _D(e,t){return e.someProp(`dragCopies`,e=>!e(t))??!t[gD]}jE.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,a=i.empty?null:e.posAtCoords(HE(n)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof lC?i.to-1:i.to))){if(r&&r.mightDrag)o=lC.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&(o=lC.create(e.state.doc,t.posBefore))}}let{dom:s,text:c,slice:l}=mE(e,(o||e.state.selection).content());(!n.dataTransfer.files.length||!vw||yw>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(uD?`Text`:`text/html`,s.innerHTML),n.dataTransfer.effectAllowed=`copyMove`,uD||n.dataTransfer.setData(`text/plain`,c),e.dragging=new hD(l,_D(e,n),o)},jE.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},ME.dragover=ME.dragenter=(e,t)=>t.preventDefault(),ME.drop=(e,t)=>{try{vD(e,t,e.dragging)}finally{e.dragging=null}};function vD(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(HE(t));if(!r)return;let i=e.state.doc.resolve(r.pos),a=n&&n.slice;a?e.someProp(`transformPasted`,t=>{a=t(a,e,!1)}):a=hE(e,mD(t.dataTransfer),uD?null:t.dataTransfer.getData(`text/html`),!1,i);let o=!!(n&&_D(e,t));if(e.someProp(`handleDrop`,n=>n(e,t,a||H.empty,o))){t.preventDefault();return}if(!a)return;t.preventDefault();let s=a?IS(e.state.doc,i.pos,a):i.pos;s??=i.pos;let c=e.state.tr;if(o){let{node:e}=n;e?e.replace(c):c.deleteSelection()}let l=c.mapping.map(s),u=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,d=c.doc;if(u?c.replaceRangeWith(l,l,a.content.firstChild):c.replaceRange(l,l,a),c.doc.eq(d))return;let f=c.doc.resolve(l);if(u&&lC.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new lC(f));else{let t=c.mapping.map(s);c.mapping.maps[c.mapping.maps.length-1].forEach((e,n,r,i)=>t=i),c.setSelection(GT(e,f,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta(`uiEvent`,`drop`))}for(let e in jE.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add(`ProseMirror-focused`),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&IT(e)},20))},jE.blur=(e,t)=>{let n=t;e.focused&&=(e.domObserver.stop(),e.dom.classList.remove(`ProseMirror-focused`),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),!1)},jE.beforeinput=(e,t)=>{if(vw&&ww&&t.inputType==`deleteContentBackward`){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t||(e.dom.blur(),e.focus(),e.someProp(`handleKeyDown`,t=>t(e,aw(8,`Backspace`)))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}},ME)jE[e]=ME[e];function yD(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var bD=class e{constructor(e,t){this.toDOM=e,this.spec=t||TD,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:a}=e.mapResult(t.from+r,this.side<0?-1:1);return a?null:new CD(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&yD(this.spec,t.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},xD=class e{constructor(e,t){this.attrs=e,this.spec=t||TD}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,a=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=a?null:new CD(i,a,this)}valid(e,t){return t.from<t.to}eq(t){return this==t||t instanceof e&&yD(this.attrs,t.attrs)&&yD(this.spec,t.spec)}static is(t){return t.type instanceof e}destroy(){}},SD=class e{constructor(e,t){this.attrs=e,this.spec=t||TD}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let a=e.mapResult(t.to+r,-1);return a.deleted||a.pos<=i.pos?null:new CD(i.pos-n,a.pos-n,this)}valid(e,t){let{index:n,offset:r}=e.content.findIndex(t.from),i;return r==t.from&&!(i=e.child(n)).isText&&r+i.nodeSize==t.to}eq(t){return this==t||t instanceof e&&yD(this.attrs,t.attrs)&&yD(this.spec,t.spec)}destroy(){}},CD=class e{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(t,n){return new e(t,n,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(t,n,r){return new e(t,t,new bD(n,r))}static inline(t,n,r,i){return new e(t,n,new xD(r,i))}static node(t,n,r,i){return new e(t,n,new SD(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof xD}get widget(){return this.type instanceof bD}},wD=[],TD={},ED=class e{constructor(e,t){this.local=e.length?e:wD,this.children=t.length?t:wD}static create(e,t){return t.length?PD(t,e,0,TD):DD}find(e,t,n){let r=[];return this.findInner(e??0,t??1e9,r,0,n),r}findInner(e,t,n,r,i){for(let a=0;a<this.local.length;a++){let o=this.local[a];o.from<=t&&o.to>=e&&(!i||i(o.spec))&&n.push(o.copy(o.from+r,o.to+r))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<t&&this.children[a+1]>e){let o=this.children[a]+1;this.children[a+2].findInner(e-o,t-o,n,r+o,i)}}map(e,t,n){return this==DD||e.maps.length==0?this:this.mapInner(e,t,0,0,n||TD)}mapInner(t,n,r,i,a){let o;for(let e=0;e<this.local.length;e++){let s=this.local[e].map(t,r,i);s&&s.type.valid(n,s)?(o||=[]).push(s):a.onRemove&&a.onRemove(this.local[e].spec)}return this.children.length?kD(this.children,o||[],t,n,r,i,a):o?new e(o.sort(FD),wD):DD}add(t,n){return n.length?this==DD?e.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,a=0;t.forEach((e,t)=>{let o=t+r,s;if(s=MD(n,e,o)){for(i||=this.children.slice();a<i.length&&i[a]<t;)a+=3;i[a]==t?i[a+2]=i[a+2].addInner(e,s,o+1):i.splice(a,0,t,t+e.nodeSize,PD(s,e,o+1,TD)),a+=3}});let o=AD(a?ND(n):n,-r);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||o.splice(e--,1);return new e(o.length?this.local.concat(o).sort(FD):this.local,i||this.children)}remove(e){return e.length==0||this==DD?this:this.removeInner(e,0)}removeInner(t,n){let r=this.children,i=this.local;for(let e=0;e<r.length;e+=3){let i,a=r[e]+n,o=r[e+1]+n;for(let e=0,n;e<t.length;e++)(n=t[e])&&n.from>a&&n.to<o&&(t[e]=null,(i||=[]).push(n));if(!i)continue;r==this.children&&(r=this.children.slice());let s=r[e+2].removeInner(i,a+1);s==DD?(r.splice(e,3),e-=3):r[e+2]=s}if(i.length){for(let e=0,r;e<t.length;e++)if(r=t[e])for(let e=0;e<i.length;e++)i[e].eq(r,n)&&(i==this.local&&(i=this.local.slice()),i.splice(e--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new e(i,r):DD}forChild(t,n){if(this==DD)return this;if(n.isLeaf)return e.empty;let r,i;for(let e=0;e<this.children.length;e+=3)if(this.children[e]>=t){this.children[e]==t&&(r=this.children[e+2]);break}let a=t+1,o=a+n.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>a&&t.type instanceof xD){let e=Math.max(a,t.from)-a,n=Math.min(o,t.to)-a;e<n&&(i||=[]).push(t.copy(e,n))}}if(i){let t=new e(i.sort(FD),wD);return r?new OD([t,r]):t}return r||DD}eq(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(e){return ID(this.localsInner(e))}localsInner(e){if(this==DD)return wD;if(e.inlineContent||!this.local.some(xD.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof xD||t.push(this.local[e]);return t}forEachSet(e){e(this)}};ED.empty=new ED([],[]),ED.removeOverlap=ID;var DD=ED.empty,OD=class e{constructor(e){this.members=e}map(t,n){let r=this.members.map(e=>e.map(t,n,TD));return e.from(r)}forChild(t,n){if(n.isLeaf)return ED.empty;let r=[];for(let i=0;i<this.members.length;i++){let a=this.members[i].forChild(t,n);a!=DD&&(a instanceof e?r=r.concat(a.members):r.push(a))}return e.from(r)}eq(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length)if(!t)t=i;else{n&&=(t=t.slice(),!1);for(let e=0;e<i.length;e++)t.push(i[e])}}return t?ID(n?t:t.sort(FD)):wD}static from(t){switch(t.length){case 0:return DD;case 1:return t[0];default:return new e(t.every(e=>e instanceof ED)?t:t.reduce((e,t)=>e.concat(t instanceof ED?t:t.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}};function kD(e,t,n,r,i,a,o){let s=e.slice();for(let e=0,t=a;e<n.maps.length;e++){let r=0;n.maps[e].forEach((e,n,i,a)=>{let o=a-i-(n-e);for(let i=0;i<s.length;i+=3){let a=s[i+1];if(a<0||e>a+t-r)continue;let c=s[i]+t-r;n>=c?s[i+1]=e<=c?-2:-1:e>=t&&o&&(s[i]+=o,s[i+1]+=o)}r+=o}),t=n.maps[e].map(t,-1)}let c=!1;for(let t=0;t<s.length;t+=3)if(s[t+1]<0){if(s[t+1]==-2){c=!0,s[t+1]=-1;continue}let l=n.map(e[t]+a),u=l-i;if(u<0||u>=r.content.size){c=!0;continue}let d=n.map(e[t+1]+a,-1)-i,{index:f,offset:p}=r.content.findIndex(u),m=r.maybeChild(f);if(m&&p==u&&p+m.nodeSize==d){let r=s[t+2].mapInner(n,m,l+1,e[t]+a+1,o);r==DD?(s[t+1]=-2,c=!0):(s[t]=u,s[t+1]=d,s[t+2]=r)}else c=!0}if(c){let c=PD(jD(s,e,t,n,i,a,o),r,0,o);t=c.local;for(let e=0;e<s.length;e+=3)s[e+1]<0&&(s.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<s.length&&s[t]<n;)t+=3;s.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new ED(t.sort(FD),s)}function AD(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new CD(i.from+t,i.to+t,i.type))}return n}function jD(e,t,n,r,i,a,o){function s(e,t){for(let a=0;a<e.local.length;a++){let s=e.local[a].map(r,i,t);s?n.push(s):o.onRemove&&o.onRemove(e.local[a].spec)}for(let n=0;n<e.children.length;n+=3)s(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)e[n+1]==-1&&s(e[n+2],t[n]+a+1);return n}function MD(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t=0,a;t<e.length;t++)(a=e[t])&&a.from>n&&a.to<r&&((i||=[]).push(a),e[t]=null);return i}function ND(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function PD(e,t,n,r){let i=[],a=!1;t.forEach((t,o)=>{let s=MD(e,t,o+n);if(s){a=!0;let e=PD(s,t,n+o+1,r);e!=DD&&i.push(o,o+t.nodeSize,e)}});let o=AD(a?ND(e):e,-n).sort(FD);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||(r.onRemove&&r.onRemove(o[e].spec),o.splice(e--,1));return o.length||i.length?new ED(o,i):DD}function FD(e,t){return e.from-t.from||e.to-t.to}function ID(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let a=t[i];if(a.from==r.from){a.to!=r.to&&(t==e&&(t=e.slice()),t[i]=a.copy(a.from,r.to),LD(t,i+1,a.copy(r.to,a.to)));continue}else{a.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,a.from),LD(t,i,r.copy(a.from,r.to)));break}}}return t}function LD(e,t,n){for(;t<e.length&&FD(n,e[t])>0;)t++;e.splice(t,0,n)}function RD(e){let t=[];return e.someProp(`decorations`,n=>{let r=n(e.state);r&&r!=DD&&t.push(r)}),e.cursorWrapper&&t.push(ED.create(e.state.doc,[e.cursorWrapper.deco])),OD.from(t)}var zD={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},BD=mw&&hw<=11,VD=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}},HD=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new VD,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);mw&&hw<=11&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():bw&&e.composing&&t.some(e=>e.type==`childList`&&e.target.nodeName==`TR`)?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),BD&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,zD)),this.onCharData&&this.view.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener(`selectionchange`,this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener(`selectionchange`,this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(KT(this.view)){if(this.suppressingSelectionUpdates)return IT(this.view);if(mw&&hw<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&XC(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let n=e.focusNode;n;n=KC(n))t.add(n);for(let r=e.anchorNode;r;r=KC(r))if(t.has(r)){n=r;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.ignoreMutation({type:`selection`,target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&KT(e)&&!this.ignoreSelectionChange(n),i=-1,a=-1,o=!1,s=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],s);n&&(i=i<0?n.from:Math.min(n.from,i),a=a<0?n.to:Math.max(n.to,a),n.typeOver&&(o=!0))}if(s.some(e=>e.nodeName==`BR`)&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let e of s)if(e.nodeName==`BR`&&e.parentNode){let t=e.nextSibling;t&&t.nodeType==1&&t.contentEditable==`false`&&e.parentNode.removeChild(e)}}else if(gw&&s.length){let t=s.filter(e=>e.nodeName==`BR`);if(t.length==2){let[e,n]=t;e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of t){let t=r.parentNode;t&&t.nodeName==`LI`&&(!n||JD(e,n)!=t)&&r.remove()}}}let c=null;i<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&iw(n)&&(c=PT(e))&&c.eq(rC.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,IT(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||r)&&(i>-1&&(e.docView.markDirty(i,a),GD(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,YD(e,s)),this.handleDOMChange(i,a,o,s),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||IT(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type==`attributes`&&(n==this.view.docView||e.attributeName==`contenteditable`||e.attributeName==`style`&&!e.oldValue&&!e.target.getAttribute(`style`))||!n||n.ignoreMutation(e))return null;if(e.type==`childList`){for(let n=0;n<e.addedNodes.length;n++){let r=e.addedNodes[n];t.push(r),r.nodeType==3&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,i=e.nextSibling;if(mw&&hw<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:a}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!a||Array.prototype.indexOf.call(e.addedNodes,a)<0)&&(i=a)}let a=r&&r.parentNode==e.target?GC(r)+1:0,o=n.localPosFromDOM(e.target,a,-1),s=i&&i.parentNode==e.target?GC(i):e.target.childNodes.length;return{from:o,to:n.localPosFromDOM(e.target,s,1)}}else if(e.type==`attributes`)return{from:n.posAtStart-n.border,to:n.posAtEnd+n.border};else return this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}},UD=new WeakMap,WD=!1;function GD(e){if(!UD.has(e)&&(UD.set(e,null),[`normal`,`nowrap`,`pre-line`].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=gw,WD)return;console.warn(`ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.`),WD=!0}}function KD(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.domAtPos(e.state.selection.anchor);return XC(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function qD(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return KD(e,n)}let n;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener(`beforeinput`,r,!0),document.execCommand(`indent`),e.dom.removeEventListener(`beforeinput`,r,!0),n?KD(e,n):null}function JD(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}function YD(e,t){let{focusNode:n,focusOffset:r}=e.domSelectionRange();for(let i of t)if(i.parentNode?.nodeName==`TR`){let t=i.nextSibling;for(;t&&t.nodeName!=`TD`&&t.nodeName!=`TH`;)t=t.nextSibling;if(t){let a=t;for(;;){let e=a.firstChild;if(!e||e.nodeType!=1||e.contentEditable==`false`||/^(BR|IMG)$/.test(e.nodeName))break;a=e}a.insertBefore(i,a.firstChild),n==i&&e.domSelection().collapse(i,r)}else i.parentNode.removeChild(i)}}function XD(e,t,n){let{node:r,fromOffset:i,toOffset:a,from:o,to:s}=e.docView.parseRange(t,n),c=e.domSelectionRange(),l,u=c.anchorNode;if(u&&e.dom.contains(u.nodeType==1?u:u.parentNode)&&(l=[{node:u,offset:c.anchorOffset}],iw(c)||l.push({node:c.focusNode,offset:c.focusOffset})),vw&&e.input.lastKeyCode===8)for(let e=a;e>i;e--){let t=r.childNodes[e-1],n=t.pmViewDesc;if(t.nodeName==`BR`&&!n){a=e;break}if(!n||n.size)break}let d=e.state.doc,f=e.someProp(`domParser`)||Ix.fromSchema(e.state.schema),p=d.resolve(o),m=null,h=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:a,preserveWhitespace:p.parent.type.whitespace==`pre`?`full`:!0,findPositions:l,ruleFromNode:ZD,context:p});if(l&&l[0].pos!=null){let e=l[0].pos,t=l[1]&&l[1].pos;t??=e,m={anchor:e+o,head:t+o}}return{doc:h,sel:m,from:o,to:s}}function ZD(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName==`BR`&&e.parentNode){if(bw&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement(`div`);return e.appendChild(document.createElement(`li`)),{skip:e}}else if(e.parentNode.lastChild==e||bw&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName==`IMG`&&e.getAttribute(`mark-placeholder`))return{ignore:!0};return null}var QD=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function $D(e,t,n,r,i){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=PT(e,t);if(n&&!e.state.selection.eq(n)){if(vw&&ww&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp(`handleKeyDown`,t=>t(e,aw(13,`Enter`))))return;let r=e.state.tr.setSelection(n);t==`pointer`?r.setMeta(`pointer`,!0):t==`key`&&r.scrollIntoView(),a&&r.setMeta(`composition`,a),e.dispatch(r)}return}let o=e.state.doc.resolve(t),s=o.sharedDepth(n);t=o.before(s+1),n=e.state.doc.resolve(n).after(s+1);let c=e.state.selection,l=XD(e,t,n),u=e.state.doc,d=u.slice(l.from,l.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p=`end`):(f=e.state.selection.from,p=`start`),e.input.lastKeyCode=null;let m=iO(d.content,l.doc.content,l.from,f,p);if(m&&e.input.domChangeCount++,(xw&&e.input.lastIOSEnter>Date.now()-225||ww)&&i.some(e=>e.nodeType==1&&!QD.test(e.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp(`handleKeyDown`,t=>t(e,aw(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(!m)if(r&&c instanceof sC&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(l.sel&&l.sel.anchor!=l.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(l.sel){let t=eO(e,e.state.doc,l.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);a&&n.setMeta(`composition`,a),e.dispatch(n)}}return}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof sC&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=l.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=l.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),mw&&hw<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>l.from&&l.doc.textBetween(m.start-l.from-1,m.start-l.from+1)==` \xA0`&&(m.start--,m.endA--,m.endB--);let h=l.doc.resolveNoCache(m.start-l.from),g=l.doc.resolveNoCache(m.endB-l.from),_=u.resolve(m.start),v=h.sameParent(g)&&h.parent.inlineContent&&_.end()>=m.endA;if((xw&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some(e=>e.nodeName==`DIV`||e.nodeName==`P`))||!v&&h.pos<l.doc.content.size&&(!h.sameParent(g)||!h.parent.inlineContent)&&h.pos<g.pos&&!/\S/.test(l.doc.textBetween(h.pos,g.pos,``,``)))&&e.someProp(`handleKeyDown`,t=>t(e,aw(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&nO(u,m.start,m.endA,h,g)&&e.someProp(`handleKeyDown`,t=>t(e,aw(8,`Backspace`)))){ww&&vw&&e.domObserver.suppressSelectionUpdates();return}vw&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),ww&&!v&&h.start()!=g.start()&&g.parentOffset==0&&h.depth==g.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==m.endA&&(m.endB-=2,g=l.doc.resolveNoCache(m.endB-l.from),setTimeout(()=>{e.someProp(`handleKeyDown`,function(t){return t(e,aw(13,`Enter`))})},20));let y=m.start,b=m.endA,x=t=>{let n=t||e.state.tr.replace(y,b,l.doc.slice(m.start-l.from,m.endB-l.from));if(l.sel){let t=eO(e,n.doc,l.sel);t&&!(vw&&e.composing&&t.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==y||t.head==n.mapping.map(b)-1)||mw&&t.empty&&t.head==y)&&n.setSelection(t)}return a&&n.setMeta(`composition`,a),n.scrollIntoView()},S;if(v)if(h.pos==g.pos){mw&&hw<=11&&h.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>IT(e),20));let t=x(e.state.tr.delete(y,b)),n=u.resolve(m.start).marksAcross(u.resolve(m.endA));n&&t.ensureMarks(n),e.dispatch(t)}else if(m.endA==m.endB&&(S=tO(h.parent.content.cut(h.parentOffset,g.parentOffset),_.parent.content.cut(_.parentOffset,m.endA-_.start())))){let t=x(e.state.tr);S.type==`add`?t.addMark(y,b,S.mark):t.removeMark(y,b,S.mark),e.dispatch(t)}else if(h.parent.child(h.index()).isText&&h.index()==g.index()-(g.textOffset?0:1)){let t=h.parent.textBetween(h.parentOffset,g.parentOffset),n=()=>x(e.state.tr.insertText(t,y,b));e.someProp(`handleTextInput`,r=>r(e,y,b,t,n))||e.dispatch(n())}else e.dispatch(x());else e.dispatch(x())}function eO(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:GT(e,t.resolve(n.anchor),t.resolve(n.head))}function tO(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,a=r,o,s,c;for(let e=0;e<r.length;e++)i=r[e].removeFromSet(i);for(let e=0;e<n.length;e++)a=n[e].removeFromSet(a);if(i.length==1&&a.length==0)s=i[0],o=`add`,c=e=>e.mark(s.addToSet(e.marks));else if(i.length==0&&a.length==1)s=a[0],o=`remove`,c=e=>e.mark(s.removeFromSet(e.marks));else return null;let l=[];for(let e=0;e<t.childCount;e++)l.push(c(t.child(e)));if(V.from(l).eq(e))return{mark:s,type:o}}function nO(e,t,n,r,i){if(n-t<=i.pos-r.pos||rO(r,!0,!1)<i.pos)return!1;let a=e.resolve(t);if(!r.parent.isTextblock){let e=a.nodeAfter;return e!=null&&n==t+e.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let o=e.resolve(rO(a,!0,!0));return!o.parent.isTextblock||o.pos>n||rO(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function rO(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}function iO(e,t,n,r,i){let a=e.findDiffStart(t,n);if(a==null)return null;let{a:o,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);if(i==`end`){let e=Math.max(0,a-Math.min(o,s));r-=o+e-a}if(o<a&&e.size<t.size){let e=r<=a&&r>=o?a-r:0;a-=e,a&&a<t.size&&aO(t.textBetween(a-1,a+1))&&(a+=e?1:-1),s=a+(s-o),o=a}else if(s<a){let t=r<=a&&r>=s?a-r:0;a-=t,a&&a<e.size&&aO(e.textBetween(a-1,a+1))&&(a+=t?1:-1),o=a+(o-s),s=a}return{start:a,endA:o,endB:s}}function aO(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}var oO=class{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new PE,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(pO),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement(`div`),e&&(e.appendChild?e.appendChild(this.dom):typeof e==`function`?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=lO(this),cO(this),this.nodeViews=dO(this),this.docView=mT(this.state.doc,sO(this),RD(this),this.dom,this),this.domObserver=new HD(this,(e,t,n,r)=>$D(this,e,t,n,r)),this.domObserver.start(),FE(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;for(let t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&RE(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(pO),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];for(let n in t.state=this.state,e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,i=!1;e.storedMarks&&this.composing&&(aD(this),i=!0),this.state=e;let a=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(a||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=dO(this);fO(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(a||t.handleDOMEvents!=this._props.handleDOMEvents)&&RE(this),this.editable=lO(this),cO(this);let o=RD(this),s=sO(this),c=n.plugins!=e.plugins&&!n.doc.eq(e.doc)?`reset`:e.scrollToSelection>n.scrollToSelection?`to selection`:`preserve`,l=r||!this.docView.matchesNode(e.doc,s,o);(l||!e.selection.eq(n.selection))&&(i=!0);let u=c==`preserve`&&i&&this.dom.style.overflowAnchor==null&&jw(this);if(i){this.domObserver.stop();let t=l&&(mw||vw)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&uO(n.selection,e.selection);if(l){let n=vw?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=oD(this)),(r||!this.docView.update(e.doc,s,o,this))&&(this.docView.updateOuterDeco(s),this.docView.destroy(),this.docView=mT(e.doc,s,o,this.dom,this)),n&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&JT(this))?IT(this,t):(UT(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),this.dragging?.node&&!n.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,n),c==`reset`?this.dom.scrollTop=0:c==`to selection`?this.scrollToSelection():u&&Nw(u)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))&&!this.someProp(`handleScrollToSelection`,e=>e(this)))if(this.state.selection instanceof lC){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Aw(this,t.getBoundingClientRect(),e)}else Aw(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}}updateDraggedNode(e,t){let n=e.node,r=-1;if(this.state.doc.nodeAt(n.from)==n.node)r=n.from;else{let e=n.from+(this.state.doc.content.size-t.doc.content.size);(e>0&&this.state.doc.nodeAt(e))==n.node&&(r=e)}this.dragging=new hD(e.slice,e.move,r<0?void 0:lC.create(this.state.doc,r))}someProp(e,t){let n=this._props&&this._props[e],r;if(n!=null&&(r=t?t(n):n))return r;for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n].props[e];if(i!=null&&(r=t?t(i):i))return r}let i=this.state.plugins;if(i)for(let n=0;n<i.length;n++){let a=i[n].props[e];if(a!=null&&(r=t?t(a):a))return r}}hasFocus(){if(mw){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable==`false`)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Iw(this.dom),IT(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let e=this.dom.parentNode;e;e=e.parentNode)if(e.nodeType==9||e.nodeType==11&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Ww(this,e)}coordsAtPos(e,t=1){return Jw(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(r==null)throw RangeError(`DOM position not inside the editor`);return r}endOfTextblock(e,t){return iT(this,t||this.state,e)}pasteHTML(e,t){return pD(this,``,e,!1,t||new ClipboardEvent(`paste`))}pasteText(e,t){return pD(this,e,null,!0,t||new ClipboardEvent(`paste`))}serializeForClipboard(e){return mE(this,e)}destroy(){this.docView&&(LE(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],RD(this),this),this.dom.textContent=``):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,YC())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return VE(this,e)}domSelectionRange(){let e=this.domSelection();return e?bw&&this.root.nodeType===11&&ow(this.dom.ownerDocument)==this.dom&&qD(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};oO.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function sO(e){let t=Object.create(null);return t.class=`ProseMirror`,t.contenteditable=String(e.editable),e.someProp(`attributes`,n=>{if(typeof n==`function`&&(n=n(e.state)),n)for(let e in n)e==`class`?t.class+=` `+n[e]:e==`style`?t.style=(t.style?t.style+`;`:``)+n[e]:!t[e]&&e!=`contenteditable`&&e!=`nodeName`&&(t[e]=String(n[e]))}),t.translate||=`no`,[CD.node(0,e.state.doc.content.size,t)]}function cO(e){if(e.markCursor){let t=document.createElement(`img`);t.className=`ProseMirror-separator`,t.setAttribute(`mark-placeholder`,`true`),t.setAttribute(`alt`,``),e.cursorWrapper={dom:t,deco:CD.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function lO(e){return!e.someProp(`editable`,t=>t(e.state)===!1)}function uO(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function dO(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp(`nodeViews`,n),e.someProp(`markViews`,n),t}function fO(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r}function pO(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError(`Plugins passed directly to the view must not have a state component`)}var mO=i(n(((e,t)=>{t.exports=e=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}}))(),1);function hO(e){return!!(e.prev&&e.next&&e.prev.text.full!==e.next.text.full)}function gO(e){return!!(e.prev&&e.next&&e.prev.range.cursor!==e.next.range.cursor)}function _O(e){return!!(!e.prev&&e.next)}function vO(e){return!!(e.prev&&!e.next)}function yO(e){return!!(e.prev&&e.next&&e.prev.range.from!==e.next.range.from)}function bO(e){return e===`invalid-exit-split`}var xO=[`jump-backward-exit`,`jump-forward-exit`],SO=[`jump-backward-change`,`jump-forward-change`];function CO(e){return Hy(xO,e.exit?.exitReason)||Hy(SO,e.change?.changeReason)}function wO(e){return!!(e&&e.query.full.length>=e.suggester.matchOffset)}function TO(e){return nb(e)&&e instanceof sC}function EO(e){let{match:t,changeReason:n,exitReason:r}=e;return{...t,changeReason:n,exitReason:r}}function DO(e,t){let{invalidPrefixCharacters:n,validPrefixCharacters:r}=t;return n?!new RegExp(VO(n)).test(e):new RegExp(VO(r)).test(e)}function OO(e){let{text:t,regexp:n,$pos:r,suggester:i}=e,a=r.start(),o;return ub(t,n).forEach(e=>{if(DO(e.input.slice(Math.max(0,e.index-1),e.index),i)){let t=e.index+a,n=e[0],s=e[1];if(!Jy(n)||!Jy(s))return;let c=t+n.length,l=Math.min(c,r.pos),u=l-t;t<r.pos&&c>=r.pos&&(o={range:{from:t,to:c,cursor:l},match:e,query:{partial:n.slice(s.length,u),full:n.slice(s.length)},text:{partial:n.slice(0,u),full:n},textAfter:r.doc.textBetween(c,r.end(),`\0`,`\0`),textBefore:r.doc.textBetween(a,t,`\0`,`\0`),suggester:i})}}),o}function kO(e){let{$pos:t,suggester:n}=e,{char:r,name:i,startOfLine:a,supportedCharacters:o,matchOffset:s,multiline:c,caseInsensitive:l,unicode:u}=n,d=GO({char:r,matchOffset:s,startOfLine:a,supportedCharacters:o,multiline:c,caseInsensitive:l,unicode:u});return OO({suggester:n,text:t.doc.textBetween(t.before(),t.end(),`\0`,`\0`),regexp:d,$pos:t,char:r,name:i})}function AO(e){let{state:t,match:n}=e;try{return kO({$pos:t.doc.resolve(n.range.cursor),suggester:n.suggester})}catch{return}}function jO(e){let{prev:t,next:n,state:r}=e;return!n&&t.range.from>=r.doc.nodeSize?{exit:EO({match:t,exitReason:`delete`})}:!n||!t.query.partial?{exit:EO({match:t,exitReason:`invalid-exit-split`})}:t.range.to===n.range.cursor?{exit:EO({match:n,exitReason:`exit-end`})}:t.query.partial?{exit:EO({match:n,exitReason:`exit-split`})}:{}}function MO(e){let{prev:t,next:n,state:r}=e,i=z(),a=AO({state:r,match:t}),{exit:o}=a&&a.query.full!==t.query.full?jO({prev:t,next:a,state:r}):i;return t.range.from<n.range.from?{exit:o??EO({match:t,exitReason:`jump-forward-exit`}),change:EO({match:n,changeReason:`jump-forward-change`})}:{exit:o??EO({match:t,exitReason:`jump-backward-exit`}),change:EO({match:n,changeReason:`jump-backward-change`})}}function NO(e){let{match:t,state:n,$pos:r}=e,{selection:i}=n,a=AO({match:t,state:n});return!a||a.text.full!==t.text.full?jO({prev:t,next:a,state:n}):!i.empty&&(i.from<=t.range.from||i.to>=t.range.to)?{exit:EO({match:t,exitReason:`selection-outside`})}:r.pos>t.range.to?{exit:EO({match:t,exitReason:`move-end`})}:r.pos<=t.range.from?{exit:EO({match:t,exitReason:`move-start`})}:{}}function PO(e){let{prev:t,next:n,state:r,$pos:i}=e,a=z();if(!t&&!n)return a;let o={prev:t,next:n};return yO(o)?MO({prev:o.prev,next:o.next,state:r}):_O(o)?{change:EO({match:o.next,changeReason:`start`})}:vO(o)?NO({$pos:i,match:o.prev,state:r}):hO(o)?{change:EO({match:o.next,changeReason:`change-character`})}:gO(o)?{change:EO({match:o.next,changeReason:r.selection.empty?`move`:`selection-inside`})}:a}function FO(e,t){for(let n=e.depth;n>0;n--){let r=e.node(n);if(t.includes(r.type.name))return!0}return!1}function IO(e,t){let{$from:n,$to:r}=e;return LO(e,t)?!0:wb(n.pos,r.pos).some(e=>RO(n.doc.resolve(e),t))}function LO(e,t){let{$from:n,$to:r}=e,i=new Set((n.marksAcross(r)??[]).map(e=>e.type.name));return t.some(e=>i.has(e))}function RO(e,t){let n=new Set(e.marks().map(e=>e.type.name));return t.some(e=>n.has(e))}function zO(e,t){let{$cursor:n}=t,{validMarks:r,validNodes:i,invalidMarks:a,invalidNodes:o}=e;return!r&&!i&&cb(a)&&cb(o)?!0:!(r&&!LO(t,r)||i&&!FO(n,i)||!r&&IO(t,a)||!i&&FO(n,o))}function BO(e){let{suggesters:t,$pos:n,selectionEmpty:r}=e;for(let e of t)if(!(e.emptySelectionsOnly&&!r))try{let t=kO({suggester:e,$pos:n});if(!t)continue;let r={$from:n.doc.resolve(t.range.from),$to:n.doc.resolve(t.range.to),$cursor:n};if(zO(e,r)&&e.isValidPosition(r,t))return t}catch{}}function VO(e){return rb(e)?e.source:e}function HO(e){return e?`^`:``}function UO(e,t){return`(?:${VO(e)}){${t},}`}function WO(e){return Jy(e)?new RegExp((0,mO.default)(e)):e}function GO(e){let{char:t,matchOffset:n,startOfLine:r,supportedCharacters:i,captureChar:a=!0,caseInsensitive:o=!1,multiline:s=!1,unicode:c=!1}=e,l=`g${s?`m`:``}${o?`i`:``}${c?`u`:``}`,u=WO(t).source;return a&&(u=`(${u})`),RegExp(`${HO(r)}${u}${UO(i,n)}`,l)}var KO={appendTransaction:!1,priority:50,ignoredTag:`span`,matchOffset:0,disableDecorations:!1,startOfLine:!1,suggestClassName:`suggest`,suggestTag:`span`,supportedCharacters:/\w+/,validPrefixCharacters:/^[\s\0]?$/,invalidPrefixCharacters:null,ignoredClassName:null,invalidMarks:[],invalidNodes:[],validMarks:null,validNodes:null,isValidPosition:()=>!0,checkNextValidSelection:null,emptySelectionsOnly:!1,caseInsensitive:!1,multiline:!1,unicode:!1,captureChar:!0},qO=`__ignore_prosemirror_suggest_update__`,JO=class e{static create(t){return new e(t)}#e=!1;#t=!1;#n;#r;#i;#a=z();view;#o=ED.empty;#s=!1;#c=!1;get decorationSet(){return this.#o}get removed(){return this.#s}get match(){return this.#r?this.#r:this.#i&&this.#a.exit?this.#i:void 0}constructor(e){let t=YO();this.#n=e.map(t),this.#n=yb(this.#n,(e,t)=>t.priority-e.priority)}init(e){return this.view=e,this}setMarkRemoved=()=>{this.#s=!0};createProps(e){let{name:t,char:n}=e.suggester;return{view:this.view,addIgnored:this.addIgnored,clearIgnored:this.clearIgnored,ignoreNextExit:this.ignoreNextExit,setMarkRemoved:this.setMarkRemoved,name:t,char:n,...e}}shouldRunExit(){return this.#t?(this.#t=!1,!1):!0}findNextTextSelection=e=>{let t=e.$from.doc,n=Math.min(t.nodeSize-2,e.to+1),r=t.resolve(n),i=rC.findFrom(r,1,!0);if(TO(i))return i};updateWithNextSelection(e){let t=this.findNextTextSelection(e.selection);if(t)for(let n of this.#n){let r=this.#a.change?.suggester.name,i=this.#a.exit?.suggester.name;n.checkNextValidSelection?.(t.$from,e,{change:r,exit:i})}}changeHandler(e,t){let{change:n,exit:r}=this.#a,i=this.match;if(!n&&!r||!wO(i))return;let a=t===r?.suggester.appendTransaction&&this.shouldRunExit(),o=t===n?.suggester.appendTransaction;if(!(!a&&!o)){if(n&&r&&CO({change:n,exit:r})){let t=this.createProps(r),i=this.createProps(n);r.range.from,n.range.from,a&&r.suggester.onChange(t,e),o&&n.suggester.onChange(i,e),a&&(this.#s=!1);return}n&&o&&n.suggester.onChange(this.createProps(n),e),r&&a&&(r.suggester.onChange(this.createProps(r),e),this.#s=!1,bO(r.exitReason)&&(this.#a=z()))}}mapIgnoredDecorations(e){let t=this.#o.map(e.mapping,e.doc),n=t.find().filter(({from:e,to:t,spec:n})=>{let r=Jy(n.char)?n.char.length:1;return t-e!==r});this.#o=t.remove(n)}ignoreNextExit=()=>{this.#t=!0};addIgnored=({from:e,name:t,specific:n=!1})=>{let r=this.#n.find(e=>e.name===t);if(!r)throw Error(`No suggester exists for the name provided: ${t}`);let i=e+(Jy(r.char)?r.char.length:1),a=r.ignoredClassName?{class:r.ignoredClassName}:{},o=CD.inline(e,i,{nodeName:r.ignoredTag,...a},{name:t,specific:n,char:r.char});this.#o=this.#o.add(this.view.state.doc,[o])};removeIgnored=({from:e,name:t})=>{let n=this.#n.find(e=>e.name===t);if(!n)throw Error(`No suggester exists for the name provided: ${t}`);let r=Jy(n.char)?n.char.length:1,i=this.#o.find(e,e+r)[0];!i||i.spec.name!==t||(this.#o=this.#o.remove([i]))};clearIgnored=e=>{if(!e){this.#o=ED.empty;return}let t=this.#o.find().filter(({spec:t})=>t.name===e);this.#o=this.#o.remove(t)};shouldIgnoreMatch({range:e,suggester:{name:t}}){return this.#o.find().some(({spec:n,from:r})=>r===e.from?n.specific?n.name===t:!0:!1)}resetState(){this.#a=z(),this.#r=void 0,this.#s=!1,this.#c=!1}updateReasons(e){let{$pos:t,state:n}=e,r=this.#e,i=this.#n,a=n.selection.empty,o=TO(n.selection)?BO({suggesters:i,$pos:t,docChanged:r,selectionEmpty:a}):void 0;this.#r=o&&this.shouldIgnoreMatch(o)?void 0:o,this.#a=PO({next:this.#r,prev:this.#i,state:n,$pos:t})}findMatchAtPosition=(e,t)=>BO({suggesters:t?this.#n.filter(e=>e.name===t):this.#n,$pos:e,docChanged:!1,selectionEmpty:!0});addSuggester(e){let t=this.#n.find(t=>t.name===e.name),n=YO();return t?this.#n=this.#n.map(r=>r===t?n(e):r):this.#n=yb([...this.#n,n(e)],(e,t)=>t.priority-e.priority),()=>this.removeSuggester(e.name)}removeSuggester(e){let t=Jy(e)?e:e.name;this.#n=this.#n.filter(e=>e.name!==t),this.clearIgnored(t)}toJSON(){return this.match}apply(e){let{exit:t,change:n}=this.#a;if(this.#c&&(this.#c=!1,!t?.suggester.appendTransaction&&!n?.suggester.appendTransaction))return this;let{tr:r,state:i}=e,a=r.docChanged||r.selectionSet;return r.getMeta(`__ignore_prosemirror_suggest_update__`)||!a&&!this.#s?this:(this.#e=r.docChanged,this.mapIgnoredDecorations(r),t&&this.resetState(),this.#i=this.#r,this.updateReasons({$pos:r.selection.$from,state:i}),this)}createDecorations(e){let t=this.match;if(!wO(t))return this.#o;let{disableDecorations:n}=t.suggester;if(Xy(n)?n(e,t):n)return this.#o;let{range:r,suggester:i}=t,{name:a,suggestTag:o,suggestClassName:s}=i,{from:c,to:l}=r;return this.shouldIgnoreMatch(t)?this.#o:this.#o.add(e.doc,[CD.inline(c,l,{nodeName:o,class:a?`${s} suggest-${a}`:s},{name:a})])}setLastChangeFromAppend=()=>{this.#c=!0}};function YO(){let e=new Set;return t=>{if(e.has(t.name))throw Error(`A suggester already exists with the name '${t.name}'. The name provided must be unique.`);let n={...KO,...t};return e.add(t.name),n}}var XO=new OC(`suggest`);function ZO(e){return XO.getState(e)}function QO(e,t){return ZO(e).addSuggester(t)}function $O(e){e.setMeta(qO,!0)}function ek(e,t){return ZO(e).removeSuggester(t)}function tk(...e){let t=JO.create(e);return new TC({key:XO,view:e=>(t.init(e),{update:e=>t.changeHandler(e.state.tr,!1)}),state:{init:()=>t,apply:(e,n,r,i)=>t.apply({tr:e,state:i})},appendTransaction:(e,n,r)=>{let i=r.tr;return t.updateWithNextSelection(i),t.changeHandler(i,!0),i.docChanged||i.steps.length>0||i.selectionSet||i.storedMarksSet?(t.setLastChangeFromAppend(),i):null},props:{decorations:e=>t.createDecorations(e)}})}function nk(e,t){let n=Object.getPrototypeOf(t),r=e.selection,i=e.doc,a=e.storedMarks,o=z();for(let[e,n]of Object.entries(t))o[e]={value:n};return Object.create(n,{...o,storedMarks:{get(){return a}},selection:{get(){return r}},doc:{get(){return i}},tr:{get(){return r=e.selection,i=e.doc,a=e.storedMarks,e}}})}function rk(e){return({state:t,dispatch:n,view:r,tr:i})=>e(nk(i,t),n,r)}function ik(e){return t=>(B(t.dispatch===void 0||t.dispatch===t.view?.dispatch,{code:R.NON_CHAINABLE_COMMAND}),e(t))}AC();var ak={get isBrowser(){return!!(typeof window<`u`&&window.document!==void 0&&window.navigator&&window.navigator.userAgent)},get isJSDOM(){return ak.isBrowser&&window.navigator.userAgent.includes(`jsdom`)},get isNode(){return typeof process<`u`&&process.versions!=null&&process.versions.node!=null},get isIos(){return ak.isBrowser&&/iPod|iPhone|iPad/.test(navigator.platform)},get isMac(){return ak.isBrowser&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)},get isApple(){return ak.isNode?process.platform===`darwin`:ak.isBrowser?/Mac|iPod|iPhone|iPad/.test(window.navigator.platform):!1},get isDevelopment(){return!1},get isTest(){return!1},get isProduction(){return!0}};function ok(e,t){return(rA(e)?.getComputedStyle(e))?.getPropertyValue(t)??``}function sk(e){return nb(e)&&Yy(e.nodeType)&&Jy(e.nodeName)}function ck(e){return sk(e)&&e.nodeType===1}function lk(e){let{types:t,node:n}=e;if(!n)return!1;let r=e=>e===n.type||e===n.type.name;return sb(t)?t.some(r):r(t)}function uk(e){let{predicate:t,selection:n}=e,r=jk(n)?n.selection.$from:Nk(n)?n.$from:n;for(let e=r.depth;e>0;e--){let n=r.node(e),i=e>0?r.before(e):0,a=r.start(e),o=i+n.nodeSize;if(t(n,i))return{pos:i,depth:e,node:n,start:a,end:o}}}function dk(e){let{depth:t}=e,n=t>0?e.before(t):0,r=e.node(t);return{pos:n,start:e.start(t),node:r,end:n+r.nodeSize,depth:t}}function fk(e){let{types:t,selection:n}=e;return uk({predicate:e=>lk({types:t,node:e}),selection:n})}function pk(e){let{types:t,selection:n}=e;if(!(!Ik(n)||!lk({types:t,node:n.node})))return{pos:n.$from.pos,depth:n.$from.depth,start:n.$from.start(),end:n.$from.pos+n.node.nodeSize,node:n.node}}function mk(e){return Nk(e)?e.empty:e.selection.empty}function hk(e){return e.docChanged||e.selectionSet}function gk(e){return!!_k(e)}function _k(e){let{state:t,type:n,attrs:r}=e,{selection:i,doc:a}=t,o=Jy(n)?a.type.schema.nodes[n]:n;B(o,{code:R.SCHEMA,message:`No node exists for ${n}`});let s=pk({selection:i,types:n})??uk({predicate:e=>e.type===o,selection:i});return!r||ob(r)||!s||s.node.hasMarkup(o,{...s.node.attrs,...r})?s:void 0}function vk(...e){return t=>{if(!lb(e))return!1;let[n,...r]=e,i=!1,a=(...e)=>()=>{if(!lb(e))return!1;i=!0;let[,...n]=e;return vk(...e)({...t,next:a(...n)})},o=a(...r),s=n({...t,next:o});return i||s?s:o()}}function yk(e,t){let n=new Map,r=z();for(let i of e)for(let[e,a]of zy(i)){let i=[...n.get(e)??[],a],o=vk(...i);n.set(e,i),r[e]=t(o)}return r}function bk(e){return yk(e,e=>(t,n,r)=>e({state:t,dispatch:n,view:r,tr:t.tr,next:()=>!1}))}function xk(e,t){let n=e.attrs??{};return Object.entries(t).every(([e,t])=>n[e]===t)}function Sk(e){return nb(e)}function Ck(e,t){return sb(t)?Hy(t,e[hy]):t===e[hy]}function wk(e){return nb(e)&&e instanceof Ox}function Tk(e,t){return Jy(e)?Ly(t.nodes,e):e}function Ek(e){return nb(e)&&e instanceof jx}function Dk(e,t){return Jy(e)?Ly(t.marks,e):e}function Ok(e){return nb(e)&&e instanceof sx}function kk(e){return nb(e)&&e instanceof V}function Ak(e){return nb(e)&&e instanceof Vb}function jk(e){return nb(e)&&e instanceof CC}function Mk(e){return nb(e)&&e instanceof sC}function Nk(e){return nb(e)&&e instanceof rC}function Pk(e){return nb(e)&&e instanceof tx}function Fk(e){let{trState:t,from:n,to:r,type:i,attrs:a={}}=e,{doc:o}=t,s=Dk(i,o.type.schema);if(Object.keys(a).length===0)return o.rangeHasMark(n,r,s);let c=!1;return r>n&&o.nodesBetween(n,r,e=>c?!1:(c=(e.marks??[]).some(e=>e.type===s?xk(e,a):!1),!c)),c}function Ik(e){return nb(e)&&e instanceof lC}function Lk(e){let{trState:t,type:n,attrs:r={},from:i,to:a}=e,{selection:o,doc:s,storedMarks:c}=t;if(B(Jy(n)?s.type.schema.marks[n]:n,{code:R.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}),i&&a)try{return Math.max(i,a)<s.nodeSize&&Fk({...e,from:i,to:a})}catch{return!1}return o.empty?(c??o.$from.marks()).some(e=>e.type===n?xk(e,r??{}):!1):Fk({...e,from:o.from,to:o.to})}function Rk(e,t={}){let n=Bk(e.type.schema);if(!n)return!1;let{ignoreAttributes:r,ignoreDocAttributes:i}=t;return r?zk(n,e):i?n.content.eq(e.content):n.eq(e)}function zk(e,t){if(e===t)return!0;let n=e.type===t.type&&Vb.sameSet(e.marks,t.marks);function r(){if(e.content===t.content)return!0;if(e.content.size!==t.content.size)return!1;let n=[],r=[];e.content.forEach(e=>n.push(e)),t.content.forEach(e=>r.push(e));for(let[e,t]of n.entries()){let n=r[e];if(!n||!zk(t,n))return!1}return!0}return n&&r()}function Bk(e){return e.nodes.doc?.createAndFill()??void 0}function Vk(e){for(let t of Object.values(e.nodes))if(t.name!==`doc`&&(t.isBlock||t.isTextblock))return t;B(!1,{code:R.SCHEMA,message:`No default block node found for the provided schema.`})}function Hk(e){return e.type===Vk(e.type.schema)}function Uk(e){return!!e&&e.type.isBlock&&!e.textContent&&!e.childCount}function Wk(e,t,n){let r=e.parent.childAfter(e.parentOffset);if(!r.node)return;let i=Jy(t)?t:t.name,a=r.node.marks.find(({type:e})=>e.name===i),o=e.index(),s=e.start()+r.offset,c=o+1,l=s+r.node.nodeSize;if(!a)return n&&l<n.pos?Wk(e.doc.resolve(l+1),t,n):void 0;for(;o>0&&a.isInSet(e.parent.child(o-1).marks);)--o,s-=e.parent.child(o).nodeSize;for(;c<e.parent.childCount&&a.isInSet(e.parent.child(c).marks);)l+=e.parent.child(c).nodeSize,c+=1;let u=e.doc.textBetween(s,l,``,`
44
-
45
- `);return{from:s,to:l,text:u,mark:a}}function Gk(e){return e.content.firstChild?.textContent??``}function Kk(e,t){if(!Mk(e.selection))return;let{from:n,to:r}=e.selection,i=(t,n)=>Gk(sC.between(e.doc.resolve(t),e.doc.resolve(n)).content());for(let e=i(n-1,n);e&&!t.test(e);n--,e=i(n-1,n));for(let e=i(r,r+1);e&&!t.test(e);r++,e=i(r,r+1));if(n===r)return;let a=e.doc.textBetween(n,r,``,`
46
-
47
- `);return{from:n,to:r,text:a}}function qk(e){return Kk(e,/\W/)}function Jk(e,t=0){let n=sb(e)?e[t]:e;return Ry(Jy(n),`No match string found for match ${e}`),n??``}function Yk(e){return Mk(e)?e.$cursor:void 0}function Xk(e,t){return Ok(e)?t?e.type===t.nodes.doc:e.type.name===`doc`:!1}function Zk(e){return nb(e)&&Yy(e.anchor)&&Yy(e.head)}function Qk(e,t){let n=t.nodeSize-2,r,i=e=>vb({min:0,max:n,value:e});if(Nk(e))return e;if(e===`all`)return new dC(t);if(r=e===`start`?0:e===`end`?n:Pk(e)?e.pos:e,Yy(r))return r=i(r),sC.near(t.resolve(r));if(Zk(r)){let e=i(r.anchor),n=i(r.head);return sC.between(t.resolve(e),t.resolve(n))}let a=i(r.from),o=i(r.to);return sC.between(t.resolve(a),t.resolve(o))}var $k=3;function eA(e){let{content:t,schema:n,document:r,stringHandler:i,onError:a,attempts:o=0}=e;if(B(a&&o<=$k||o===0,{code:R.INVALID_CONTENT,message:"The invalid content has been called recursively more than ${MAX_ATTEMPTS} times. The content is invalid and the error handler has not been able to recover properly."}),Jy(t))return B(i,{code:R.INVALID_CONTENT,message:`The string '${t}' was added to the editor, but no \`stringHandler\` was added. Please provide a valid string handler which transforms your content to a \`ProsemirrorNode\` to prevent this error.`}),i({document:r,content:t,schema:n});if(jk(t))return t.doc;if(Ok(t))return t;try{return n.nodeFromJSON(t)}catch(r){let i=dA({schema:n,error:r,json:t}),s=a?.(i);return B(s,{code:R.INVALID_CONTENT,message:`An error occurred when processing the content. Please provide an \`onError\` handler to process the invalid content: ${JSON.stringify(i.invalidContent,null,2)}`}),eA({...e,content:s,attempts:o+1})}}function tA(){let e=kC();if(e)return e;throw Error(`Unable to retrieve the document from the global scope.
48
- It seems that you are running Remirror in a non-browser environment. Remirror need browser APIs to work.
49
- If you are using Jest (or other testing frameworks), make sure that you are using the JSDOM environment (https://jestjs.io/docs/29.0/configuration#testenvironment-string).
50
- If you are using Next.js (or other server-side rendering frameworks), please use dynamic import with \`ssr: false\` to load the editor component without rendering it on the server (https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr).
51
- If you are using Node.js, you can install JSDOM and Remirror will try to use it automatically, or you can create a fake document and pass it to Remirror`)}function nA(e){return e?.defaultView??(typeof window<`u`?window:void 0)??kC()?.defaultView}function rA(e){return nA(e?.ownerDocument)}function iA(e){let t=nA(e)??tA().defaultView;if(t)return t;throw Error(`Unable to retrieve the window from the global scope`)}function aA(e,t=tA()){let n=Xk(e,e.type.schema)?e.content:V.from(e);return Xx.fromSchema(e.type.schema).serializeFragment(n,{document:t})}function oA(e,t){return new(iA(t)).DOMParser().parseFromString(`<body>${e}</body>`,`text/html`).body}function sA(e,t=tA()){let n=t.createElement(`div`);return n.append(aA(e,t)),n.innerHTML}function cA(e){let{content:t,schema:n,document:r,fragment:i=!1,...a}=e,o=oA(t,r),s=Ix.fromSchema(n);return i?s.parseSlice(o,{...lA,...a}).content:s.parse(o,{...lA,...a})}var lA={preserveWhitespace:!1},uA={remove(e,t){let n=e;for(let e of t)e.invalidParentNode||(n=xb(e.path,n));return n}};function dA({json:e,schema:t,...n}){let r=new Set(By(t.marks));return{json:e,invalidContent:fA({json:e,path:[],validNodes:new Set(By(t.nodes)),validMarks:r}),transformers:uA,...n}}function fA(e){let{json:t,validMarks:n,validNodes:r,path:i=[]}=e,a={validMarks:n,validNodes:r},o=[],{type:s,marks:c,content:l}=t,{invalidParentMark:u=!1,invalidParentNode:d=!1}=e;if(c){let e=[];for(let[t,r]of c.entries()){let a=Jy(r)?r:r.type;n.has(a)||(e.unshift({name:a,path:[...i,`marks`,`${t}`],type:`mark`,invalidParentMark:u,invalidParentNode:d}),u=!0)}o.push(...e)}if(r.has(s)||(o.push({name:s,type:`node`,path:i,invalidParentMark:u,invalidParentNode:d}),d=!0),l){let e=[];for(let[t,n]of l.entries())e.unshift(...fA({...a,json:n,path:[...i,`content`,`${t}`],invalidParentMark:u,invalidParentNode:d}));o.unshift(...e)}return o}function pA(e){return!!(Mk(e)&&e.$cursor&&e.$cursor.parentOffset>=e.$cursor.parent.content.size)}function mA(e){return!!(Mk(e)&&e.$cursor&&e.$cursor.parentOffset<=0)}function hA(e){let t=rC.atStart(e.$anchor.doc);return!!(mA(e)&&t.anchor===e.anchor)}function gA({tr:e,dispatch:t}){let{$from:n,$to:r}=e.selection,i=n.blockRange(r),a=i&&DS(i);return!Yy(a)||!i?!1:(t?.(e.lift(i,a).scrollIntoView()),!0)}function _A(e,t={},n){return function(r){let{tr:i,dispatch:a,state:o}=r,s=Jy(e)?Ly(o.schema.nodes,e):e,{from:c,to:l}=Qk(n??i.selection,i.doc),u=i.doc.resolve(c),d=i.doc.resolve(l),f=u.blockRange(d),p=f&&OS(f,s,t);return!p||!f?!1:(a?.(i.wrap(f,p).scrollIntoView()),!0)}}function vA(e,t={},n){return r=>{let{tr:i,state:a}=r;return _k({state:i,type:Jy(e)?Ly(a.schema.nodes,e):e,attrs:t})?gA(r):_A(e,t,n)(r)}}function yA(e,t,n,r=!0){return function(i){let{tr:a,dispatch:o,state:s}=i,c=Jy(e)?Ly(s.schema.nodes,e):e,{from:l,to:u}=Qk(n??a.selection,a.doc),d=!1,f;return a.doc.nodesBetween(l,u,(e,n)=>{if(d)return!1;if(!e.isTextblock||e.hasMarkup(c,t))return;if(e.type===c){d=!0,f=e.attrs;return}let r=a.doc.resolve(n),i=r.index();d=r.parent.canReplaceWith(i,i+1,c),d&&(f=r.parent.attrs)}),d?(o?.(a.setBlockType(l,u,c,{...r?f:{},...t}).scrollIntoView()),!0):!1}}function bA(e){return t=>{let{tr:n,state:r}=t,{type:i,attrs:a,preserveAttrs:o=!0}=e,s=_k({state:n,type:i,attrs:a}),c=e.toggleType??Vk(r.schema);if(s)return yA(c,{...o?s.node.attrs:{},...a})(t);let l=_k({state:n,type:c,attrs:a});return yA(i,{...o?l?.node.attrs:{},...a})(t)}}function xA(e=0){let t=navigator.userAgent.match(/Chrom(e|ium)\/(\d+)\./);return t?Number.parseInt(Ly(t,2),10)>=e:!1}function SA(e,t){let{head:n,empty:r,anchor:i}=e;for(let e of t.steps)n=e.getMap().map(n);r?t.setSelection(sC.near(t.doc.resolve(n))):t.setSelection(sC.between(t.doc.resolve(i),t.doc.resolve(n)))}function CA(e){let{attrs:t={},appendText:n=``,content:r=``,keepSelection:i=!1,range:a}=e;return({state:o,tr:s,dispatch:c})=>{var l;let u=o.schema,d=Qk(e.selection??a??s.selection,s.doc),f=d.$from.index(),{from:p,to:m,$from:h}=d,g=Jy(e.type)?u.nodes[e.type]??u.marks[e.type]:e.type;if(B(Jy(e.type)?g:!0,{code:R.SCHEMA,message:`Schema contains no marks or nodes with name ${g}`}),wk(g)){if(!h.parent.canReplaceWith(f,f,g))return!1;s.replaceWith(p,m,g.create(t,r?u.text(r):void 0))}else B(r,{message:"`replaceText` cannot be called without content when using a mark type"}),s.replaceWith(p,m,u.text(r,Ek(g)?[g.create(t)]:void 0));return n&&s.insertText(n),i&&SA(o.selection,s),c&&(xA(60)&&((l=document.getSelection())==null||l.empty()),c(s)),!0}}function wA(e,t){let n=e.parent.childAfter(e.parentOffset);if(!n.node)return;let{marks:r,nodeSize:i}=n.node;if(r[0])return r[0].type;let a=e.start()+n.offset+i;return wA(e.doc.resolve(a+1),t)}function TA(e){return({dispatch:t,tr:n,state:r})=>{let{type:i,expand:a=!0,range:o}=e,{from:s,to:c,$from:l,$to:u}=Qk(e.selection??o??n.selection,n.doc),d=Jy(i)?r.schema.marks[i]:i;d!==null&&B(d,{code:R.SCHEMA,message:`Mark type: ${i} does not exist on the current schema.`});let f=d??wA(l);if(!f)return!1;let p=Wk(l,f,u);return a&&p&&(s=Math.max(0,Math.min(s,p.from)),c=Math.min(Math.max(c,p.to),n.doc.nodeSize-2)),t?.(n.removeMark(s,Yy(c)?c:s,Ek(d)?d:void 0)),!0}}function EA(e){let{node:t,predicate:n,descend:r=!0,action:i}=e;B(Ok(t),{code:R.INTERNAL,message:`Invalid "node" parameter passed to "findChildren".`}),B(Xy(n),{code:R.INTERNAL,message:`Invalid "predicate" parameter passed to "findChildren".`});let a=[];return t.descendants((e,t)=>{let o={node:e,pos:t};return n(o)?(a.push(o),i?.(o),r):r}),a}function DA({predicate:e}){return t=>EA({...t,predicate:e})}DA({predicate:e=>e.node.isText}),DA({predicate:e=>e.node.isInline}),DA({predicate:e=>e.node.isBlock});function OA(e){let{regexp:t,type:n,getAttributes:r,ignoreWhitespace:i=!1,beforeDispatch:a,updateCaptured:o,shouldSkip:s,invalidMarks:c}=e,l,u=new RC(t,(e,t,d,f)=>{let{tr:p,schema:m}=e;l||(l=Jy(n)?m.marks[n]:n,B(l,{code:R.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}));let h=t[1],g=t[0],_=kA({captureGroup:h,fullMatch:g,end:f,start:d,rule:u,state:e,ignoreWhitespace:i,invalidMarks:c,shouldSkip:s,updateCaptured:o});if(!_)return null;({start:d,end:f,captureGroup:h,fullMatch:g}=_);let v=Xy(r)?r(t):r,y=f,b=[];if(h){let e=g.search(/\S/),t=d+g.indexOf(h),n=t+h.length;b=p.storedMarks??[],n<f&&p.delete(n,f),t>d&&p.delete(d+e,t),y=d+e+h.length}return p.addMark(d,y,l.create(v)),p.setStoredMarks(b),a?.({tr:p,match:t,start:d,end:f}),p});return u}function kA({captureGroup:e,fullMatch:t,end:n,start:r,rule:i,ignoreWhitespace:a,shouldSkip:o,updateCaptured:s,state:c,invalidMarks:l}){if(t==null)return null;let u=s?.({captureGroup:e,fullMatch:t,start:r,end:n})??{};e=u.captureGroup??e,t=u.fullMatch??t,r=u.start??r,n=u.end??n;let d=c.doc.resolve(r),f=c.doc.resolve(n);return l&&IO({$from:d,$to:f},l)||i.invalidMarks&&IO({$from:d,$to:f},i.invalidMarks)||a&&e?.trim()===``||o?.({state:c,captureGroup:e,fullMatch:t,start:r,end:n,ruleType:`mark`})||i.shouldSkip?.call(i,{state:c,captureGroup:e,fullMatch:t,start:r,end:n,ruleType:`mark`})?null:{captureGroup:e,end:n,fullMatch:t,start:r}}var AA=function(){let e=Array.prototype.slice.call(arguments).filter(Boolean),t={},n=[];e.forEach(e=>{(e?e.split(` `):[]).forEach(e=>{if(e.startsWith(`atm_`)){let[,n]=e.split(`_`);t[n]=e}else n.push(e)})});let r=[];for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.push(t[e]);return r.push(...n),r.join(` `)},jA=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function MA(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`backward`,e):n.parentOffset>0)?null:n}var NA=(e,t,n)=>{let r=MA(e,n);if(!r)return!1;let i=IA(r);if(!i){let n=r.blockRange(),i=n&&DS(n);return i==null?!1:(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let a=i.nodeBefore;if(KA(e,i,t,-1))return!0;if(r.parent.content.size==0&&(PA(a,`end`)||lC.isSelectable(a)))for(let n=r.depth;;n--){let o=LS(e.doc,r.before(n),r.after(n),H.empty);if(o&&o.slice.size<o.to-o.from){if(t){let n=e.tr.step(o);n.setSelection(PA(a,`end`)?rC.findFrom(n.doc.resolve(n.mapping.map(i.pos,-1)),-1):lC.create(n.doc,i.pos-a.nodeSize)),t(n.scrollIntoView())}return!0}if(n==1||r.node(n-1).childCount>1)break}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-a.nodeSize,i.pos).scrollIntoView()),!0):!1};function PA(e,t,n=!1){for(let r=e;r;r=t==`start`?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var FA=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`backward`,e):r.parentOffset>0)return!1;a=IA(r)}let o=a&&a.nodeBefore;return!o||!lC.isSelectable(o)?!1:(t&&t(e.tr.setSelection(lC.create(e.doc,a.pos-o.nodeSize)).scrollIntoView()),!0)};function IA(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function LA(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`forward`,e):n.parentOffset<n.parent.content.size)?null:n}var RA=(e,t,n)=>{let r=LA(e,n);if(!r)return!1;let i=BA(r);if(!i)return!1;let a=i.nodeAfter;if(KA(e,i,t,1))return!0;if(r.parent.content.size==0&&(PA(a,`start`)||lC.isSelectable(a))){let n=LS(e.doc,r.before(),r.after(),H.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(PA(a,`start`)?rC.findFrom(r.doc.resolve(r.mapping.map(i.pos)),1):lC.create(r.doc,r.mapping.map(i.pos))),t(r.scrollIntoView())}return!0}}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+a.nodeSize).scrollIntoView()),!0):!1},zA=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`forward`,e):r.parentOffset<r.parent.content.size)return!1;a=BA(r)}let o=a&&a.nodeAfter;return!o||!lC.isSelectable(o)?!1:(t&&t(e.tr.setSelection(lC.create(e.doc,a.pos)).scrollIntoView()),!0)};function BA(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}var VA=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
52
- `).scrollIntoView()),!0)};function HA(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var UA=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),a=n.indexAfter(-1),o=HA(i.contentMatchAt(a));if(!o||!i.canReplaceWith(a,a,o))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,o.createAndFill());i.setSelection(rC.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},WA=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof dC||r.parent.inlineContent||i.parent.inlineContent)return!1;let a=HA(i.parent.contentMatchAt(i.indexAfter()));if(!a||!a.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,o=e.tr.insert(n,a.createAndFill());o.setSelection(sC.create(o.doc,n+1)),t(o.scrollIntoView())}return!0},GA=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(MS(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&DS(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function ure(e){return(t,n)=>{let{$from:r,$to:i}=t.selection;if(t.selection instanceof lC&&t.selection.node.isBlock)return!r.parentOffset||!MS(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let a=[],o,s,c=!1,l=!1;for(let t=r.depth;;t--)if(r.node(t).isBlock){c=r.end(t)==r.pos+(r.depth-t),l=r.start(t)==r.pos-(r.depth-t),s=HA(r.node(t-1).contentMatchAt(r.indexAfter(t-1)));let n=e&&e(i.parent,c,r);a.unshift(n||(c&&s?{type:s}:null)),o=t;break}else{if(t==1)return!1;a.unshift(null)}let u=t.tr;(t.selection instanceof sC||t.selection instanceof dC)&&u.deleteSelection();let d=u.mapping.map(r.pos),f=MS(u.doc,d,a.length,a);if(f||=(a[0]=s?{type:s}:null,MS(u.doc,d,a.length,a)),!f)return!1;if(u.split(d,a.length,a),!c&&l&&r.node(o).type!=s){let e=u.mapping.map(r.before(o)),t=u.doc.resolve(e);s&&r.node(o-1).canReplaceWith(t.index(),t.index()+1,s)&&u.setNodeMarkup(u.mapping.map(r.before(o)),s)}return n&&n(u.scrollIntoView()),!0}}var dre=ure(),fre=(e,t)=>{let{$from:n,to:r}=e.selection,i,a=n.sharedDepth(r);return a==0?!1:(i=n.before(a),t&&t(e.tr.setSelection(lC.create(e.doc,i))),!0)},pre=(e,t)=>(t&&t(e.tr.setSelection(new dC(e.doc))),!0);function mre(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,a=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(a,a+1)||!(i.isTextblock||NS(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function KA(e,t,n,r){let i=t.nodeBefore,a=t.nodeAfter,o,s,c=i.type.spec.isolating||a.type.spec.isolating;if(!c&&mre(e,t,n))return!0;let l=!c&&t.parent.canReplace(t.index(),t.index()+1);if(l&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&s.matchType(o[0]||a.type).validEnd){if(n){let r=t.pos+a.nodeSize,s=V.empty;for(let e=o.length-1;e>=0;e--)s=V.from(o[e].create(null,s));s=V.from(i.copy(s));let c=e.tr.step(new wS(t.pos-1,r,t.pos,r,new H(s,1,0),o.length,!0)),l=c.doc.resolve(r+2*o.length);l.nodeAfter&&l.nodeAfter.type==i.type&&NS(c.doc,l.pos)&&c.join(l.pos),n(c.scrollIntoView())}return!0}let u=a.type.spec.isolating||r>0&&c?null:rC.findFrom(t,1),d=u&&u.$from.blockRange(u.$to),f=d&&DS(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(l&&PA(a,`start`,!0)&&PA(i,`end`)){let r=i,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let s=a,c=1;for(;!s.isTextblock;s=s.firstChild)c++;if(r.canReplace(r.childCount,r.childCount,s.content)){if(n){let r=V.empty;for(let e=o.length-1;e>=0;e--)r=V.from(o[e].copy(r));n(e.tr.step(new wS(t.pos-o.length,t.pos+a.nodeSize,t.pos+c,t.pos+a.nodeSize-c,new H(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function qA(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,a=i.depth;for(;i.node(a).isInline;){if(!a)return!1;a--}return i.node(a).isTextblock?(n&&n(t.tr.setSelection(sC.create(t.doc,e<0?i.start(a):i.end(a)))),!0):!1}}var hre=qA(-1),gre=qA(1);function _re(e,t,n,r){for(let i=0;i<t.length;i++){let{$from:a,$to:o}=t[i],s=a.depth==0?e.inlineContent&&e.type.allowsMarkType(n):!1;if(e.nodesBetween(a.pos,o.pos,(e,t)=>{if(s||!r&&e.isAtom&&e.isInline&&t>=a.pos&&t+e.nodeSize<=o.pos)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)}),s)return!0}return!1}function vre(e){let t=[];for(let n=0;n<e.length;n++){let{$from:r,$to:i}=e[n];r.doc.nodesBetween(r.pos,i.pos,(e,n)=>{if(e.isAtom&&e.content.size&&e.isInline&&n>=r.pos&&n+e.nodeSize<=i.pos)return n+1>r.pos&&t.push(new iC(r,r.doc.resolve(n+1))),r=r.doc.resolve(n+1+e.content.size),!1}),r.pos<i.pos&&t.push(new iC(r,i))}return t}function yre(e,t=null,n){let r=(n&&n.removeWhenPresent)!==!1,i=(n&&n.enterInlineAtoms)!==!1,a=!(n&&n.includeWhitespace);return function(n,o){let{empty:s,$cursor:c,ranges:l}=n.selection;if(s&&!c||!_re(n.doc,l,e,i))return!1;if(o)if(c)e.isInSet(n.storedMarks||c.marks())?o(n.tr.removeStoredMark(e)):o(n.tr.addStoredMark(e.create(t)));else{let s,c=n.tr;i||(l=vre(l)),s=r?!l.some(t=>n.doc.rangeHasMark(t.$from.pos,t.$to.pos,e)):!l.every(t=>{let n=!1;return c.doc.nodesBetween(t.$from.pos,t.$to.pos,(r,i,a)=>{if(n)return!1;n=!e.isInSet(r.marks)&&!!a&&a.type.allowsMarkType(e)&&!(r.isText&&/^\s*$/.test(r.textBetween(Math.max(0,t.$from.pos-i),Math.min(r.nodeSize,t.$to.pos-i))))}),!n});for(let n=0;n<l.length;n++){let{$from:r,$to:i}=l[n];if(!s)c.removeMark(r.pos,i.pos,e);else{let n=r.pos,o=i.pos,s=r.nodeAfter,l=i.nodeBefore,u=a&&s&&s.isText?/^\s*/.exec(s.text)[0].length:0,d=a&&l&&l.isText?/\s*$/.exec(l.text)[0].length:0;n+u<o&&(n+=u,o-=d),c.addMark(n,o,e.create(t))}}o(c.scrollIntoView())}return!0}}function JA(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}var YA=JA(jA,NA,FA),XA=JA(jA,RA,zA),ZA={Enter:JA(VA,WA,GA,dre),"Mod-Enter":UA,Backspace:YA,"Mod-Backspace":YA,"Shift-Backspace":YA,Delete:XA,"Mod-Delete":XA,"Mod-a":pre},QA={"Ctrl-h":ZA.Backspace,"Alt-Backspace":ZA[`Mod-Backspace`],"Ctrl-d":ZA.Delete,"Ctrl-Alt-Backspace":ZA[`Mod-Delete`],"Alt-Delete":ZA[`Mod-Delete`],"Alt-d":ZA[`Mod-Delete`],"Ctrl-a":hre,"Ctrl-e":gre};for(let e in ZA)QA[e]=ZA[e];for(var $A=(typeof navigator<`u`?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<`u`&&os.platform&&os.platform()==`darwin`)?QA:ZA,ej={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},tj={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},bre=typeof navigator<`u`&&/Mac/.test(navigator.platform),xre=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),nj=0;nj<10;nj++)ej[48+nj]=ej[96+nj]=String(nj);for(var nj=1;nj<=24;nj++)ej[nj+111]=`F`+nj;for(var nj=65;nj<=90;nj++)ej[nj]=String.fromCharCode(nj+32),tj[nj]=String.fromCharCode(nj);for(var rj in ej)tj.hasOwnProperty(rj)||(tj[rj]=ej[rj]);function Sre(e){var t=!(bre&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||xre&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?tj:ej)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var Cre=typeof navigator<`u`&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),wre=typeof navigator<`u`&&/Win/.test(navigator.platform);function Tre(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==`Space`&&(n=` `);let r,i,a,o;for(let e=0;e<t.length-1;e++){let n=t[e];if(/^(cmd|meta|m)$/i.test(n))o=!0;else if(/^a(lt)?$/i.test(n))r=!0;else if(/^(c|ctrl|control)$/i.test(n))i=!0;else if(/^s(hift)?$/i.test(n))a=!0;else if(/^mod$/i.test(n))Cre?o=!0:i=!0;else throw Error(`Unrecognized modifier name: `+n)}return r&&(n=`Alt-`+n),i&&(n=`Ctrl-`+n),o&&(n=`Meta-`+n),a&&(n=`Shift-`+n),n}function Ere(e){let t=Object.create(null);for(let n in e)t[Tre(n)]=e[n];return t}function ij(e,t,n=!0){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n&&t.shiftKey&&(e=`Shift-`+e),e}function aj(e){let t=Ere(e);return function(e,n){let r=Sre(n),i,a=t[ij(r,n)];if(a&&a(e.state,e.dispatch,e))return!0;if(r.length==1&&r!=` `){if(n.shiftKey){let i=t[ij(r,n,!1)];if(i&&i(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(wre&&n.ctrlKey&&n.altKey)&&(i=ej[n.keyCode])&&i!=r){let r=t[ij(i,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}function Dre(e){let t=yb(e,(e,t)=>(t.priority??_y.Low)-(e.priority??_y.Low)),n=[],r=[];for(let e of t)Pre(e)?n.push(e):r.push(e);let i;return new TC({key:Ore,view:e=>(i=e,{}),props:{transformPasted:e=>{let t=i.state.selection.$from,r=t.node().type.name,a=new Set(t.marks().map(e=>e.type.name));for(let t of n){if(t.ignoredNodes?.includes(r)||t.ignoredMarks?.some(e=>a.has(e)))continue;let n=e.content.firstChild?.textContent??``,o=!i.state.selection.empty&&e.content.childCount===1&&n,s=ub(n,t.regexp)[0];if(o&&s&&t.type===`mark`&&t.replaceSelection){let{from:e,to:n}=i.state.selection,r=i.state.doc.slice(e,n),a=r.content.textBetween(0,r.content.size);if(typeof t.replaceSelection==`boolean`?t.replaceSelection:t.replaceSelection(a)){let e=[],{getAttributes:n,markType:i}=t,a=Xy(n)?n(s,!0):n,o=i.create(a);return r.content.forEach(t=>{if(t.isText){let n=o.addToSet(t.marks);e.push(t.mark(n))}}),H.maxOpen(V.fromArray(e))}}let{nodes:c,transformed:l}=Mre(e.content,t,i.state.schema);l&&(e=t.type===`node`&&t.nodeType.isBlock?new H(V.fromArray(c),0,0):new H(V.fromArray(c),e.openStart,e.openEnd))}return Rre(e)},handleDOMEvents:{paste:(e,t)=>{let n=t;if(!e.props.editable?.(e.state))return!1;let{clipboardData:i}=n;if(!i)return!1;let a=[...i.items].map(e=>e.getAsFile()).filter(e=>!!e);if(a.length===0)return!1;let{selection:o}=e.state;for(let{fileHandler:t,regexp:i}of r){let r=i?a.filter(e=>i.test(e.type)):a;if(r.length!==0&&t({event:n,files:r,selection:o,view:e,type:`paste`}))return n.preventDefault(),!0}return!1},drop:(e,t)=>{let n=t;if(!e.props.editable?.(e.state))return!1;let{dataTransfer:i,clientX:a,clientY:o}=n;if(!i)return!1;let s=Lre(n);if(s.length===0)return!1;let c=e.posAtCoords({left:a,top:o})?.pos??e.state.selection.anchor;for(let{fileHandler:t,regexp:i}of r){let r=i?s.filter(e=>i.test(e.type)):s;if(r.length!==0&&t({event:n,files:r,pos:c,view:e,type:`drop`}))return n.preventDefault(),!0}return!1}}}})}var Ore=new OC(`pasteRule`);function oj(e,t){return function n(r){let{fragment:i,rule:a,nodes:o}=r,{regexp:s,ignoreWhitespace:c,ignoredMarks:l,ignoredNodes:u}=a,d=!1;return i.forEach(r=>{if(u?.includes(r.type.name)||Fre(r)){o.push(r);return}if(!r.isText){let e=n({fragment:r.content,rule:a,nodes:[]});d||=e.transformed;let t=V.fromArray(e.nodes);r.type.validContent(t)?o.push(r.copy(t)):o.push(...e.nodes);return}if(r.marks.some(e=>Ire(e)||l?.includes(e.type.name))){o.push(r);return}let i=r.text??``,f=0;for(let n of ub(i,s)){let i=n[1],s=n[0];if(c&&i?.trim()===``||!s)return;let l=n.index,u=l+s.length;l>f&&o.push(r.cut(f,l));let p=r.cut(l,u);if(s&&i){let e=s.search(/\S/),t=l+s.indexOf(i),n=t+i.length;e&&o.push(r.cut(l,l+e)),p=r.cut(t,n)}e({nodes:o,rule:a,textNode:p,match:n,schema:t}),d=!0,f=u}i&&f<i.length&&o.push(r.cut(f))}),{nodes:o,transformed:d}}}function kre(e){let{nodes:t,rule:n,textNode:r,match:i,schema:a}=e,{transformMatch:o,getAttributes:s,markType:c}=n,l=Xy(s)?s(i,!1):s,u=r.text??``,d=c.create(l),f=o?.(i);if(f===``)return;if(f===!1){t.push(a.text(u,r.marks));return}let p=d.addToSet(r.marks);t.push(a.text(f??u,p))}function Are(e){let{nodes:t,rule:n,textNode:r,match:i,schema:a}=e,{transformMatch:o}=n,s=o?.(i);if(s===``||s===!1)return;let c=s??r.text??``;t.push(a.text(c,r.marks))}function jre(e){let{nodes:t,rule:n,textNode:r,match:i}=e,{getAttributes:a,nodeType:o,getContent:s}=n,c=Xy(a)?a(i,!1):a,l=(s?s(i):r)||void 0;t.push(o.createChecked(c,l))}function Mre(e,t,n){let r=[];switch(t.type){case`mark`:return oj(kre,n)({fragment:e,nodes:r,rule:t});case`node`:return oj(jre,n)({fragment:e,nodes:r,rule:t});default:return oj(Are,n)({fragment:e,nodes:r,rule:t})}}var Nre=[`mark`,`node`,`text`];function Pre(e){return Hy(Nre,e.type)}function Fre(e){return e.type.spec.code||e.type.spec.group?.split(` `).includes(`code`)}function Ire(e){return e.type.name===`code`||e.type.spec.group?.split(` `).includes(`code`)}function Lre(e){let{dataTransfer:t}=e;return t?t.files?.length>0?[...t.files]:t.items?.length?[...t.items].map(e=>e.getAsFile()).filter(e=>!!e):[]:[]}function Rre(e){let t=H.maxOpen(e.content);return t.openStart<e.openStart||t.openEnd<e.openEnd?t:e}var sj=()=>({events:{},emit(e,...t){(this.events[e]||[]).forEach(e=>e(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(e=>e!==t)}}),zre=Object.defineProperty,Bre=Object.getOwnPropertyDescriptor,U=(e,t,n,r)=>{for(var i=r>1?void 0:r?Bre(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&zre(t,n,i),i},cj=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},W=(e,t,n)=>(cj(e,t,`read from private field`),n?n.call(e):t.get(e)),lj=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},uj=(e,t,n,r)=>(cj(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n);function Vre(e,t){return e===t}function dj(e){let{previousOptions:t,update:n,equals:r=Vre}=e,i=Nb({...t,...n}),a=z(),o=By(t);for(let e of o){let n=t[e],o=i[e];if(r(n,o)){a[e]={changed:!1};continue}a[e]={changed:!0,previousValue:n,value:o}}return{changes:Nb(a),options:i,pickChanged:e=>{let t=z();for(let n of e){let e=a[n];e?.changed&&(t[n]=e.value)}return t}}}var Hre={[R.DUPLICATE_HELPER_NAMES]:`helper method`,[R.DUPLICATE_COMMAND_NAMES]:`command method`};function fj(e){let{name:t,set:n,code:r}=e,i=Hre[r];B(!n.has(t),{code:r,message:`There is a naming conflict for the name: ${t} used in this '${i}'. Please rename or remove from the editor to avoid runtime errors.`}),n.add(t)}function pj(...e){return hb(AA(...e).split(` `)).join(` `)}var mj=`__IGNORE__`,Ure=`__ALL__`,hj=class{constructor(e,...[t]){this[`~O`]={},this._mappedHandlers=z(),this.populateMappedHandlers(),this._options=this._initialOptions=_b(e,this.constructor.defaultOptions,t??z(),this.createDefaultHandlerOptions()),this._dynamicKeys=this.getDynamicKeys(),this.init()}get options(){return this._options}get dynamicKeys(){return this._dynamicKeys}get initialOptions(){return this._initialOptions}init(){}getDynamicKeys(){let e=[],{customHandlerKeys:t,handlerKeys:n,staticKeys:r}=this.constructor;for(let i of By(this._options))r.includes(i)||n.includes(i)||t.includes(i)||e.push(i);return e}ensureAllKeysAreDynamic(e){if(ak.isProduction)return;let t=[];for(let n of By(e))this._dynamicKeys.includes(n)||t.push(n);B(cb(t),{code:R.INVALID_SET_EXTENSION_OPTIONS,message:`Invalid properties passed into the 'setOptions()' method: ${JSON.stringify(t)}.`})}setOptions(e){var t;let n=this.getDynamicOptions();this.ensureAllKeysAreDynamic(e);let{changes:r,options:i,pickChanged:a}=dj({previousOptions:n,update:e});this.updateDynamicOptions(i),(t=this.onSetOptions)==null||t.call(this,{reason:`set`,changes:r,options:i,pickChanged:a,initialOptions:this._initialOptions})}resetOptions(){var e;let{changes:t,options:n,pickChanged:r}=dj({previousOptions:this.getDynamicOptions(),update:this._initialOptions});this.updateDynamicOptions(n),(e=this.onSetOptions)==null||e.call(this,{reason:`reset`,options:n,changes:t,pickChanged:r,initialOptions:this._initialOptions})}getDynamicOptions(){return(0,Py.default)(this._options,[...this.constructor.customHandlerKeys,...this.constructor.handlerKeys])}updateDynamicOptions(e){this._options={...this._options,...e}}populateMappedHandlers(){for(let e of this.constructor.handlerKeys)this._mappedHandlers[e]=[]}createDefaultHandlerOptions(){let e=z();for(let t of this.constructor.handlerKeys)e[t]=(...e)=>{let{handlerKeyOptions:n}=this.constructor,r=n[t]?.reducer,i=r?.getDefault(...e);for(let[,a]of this._mappedHandlers[t]){let o=a(...e);if(i=r?r.accumulator(i,o,...e):o,Wre(n,i,t))return i}return i};return e}addHandler(e,t,n=_y.Default){return this._mappedHandlers[e].push([n,t]),this.sortHandlers(e),()=>this._mappedHandlers[e]=this._mappedHandlers[e].filter(([,e])=>e!==t)}hasHandlers(e){return(this._mappedHandlers[e]??[]).length>0}sortHandlers(e){this._mappedHandlers[e]=yb(this._mappedHandlers[e],([e],[t])=>t-e)}addCustomHandler(e,t){return this.onAddCustomHandler?.call(this,{[e]:t})??gb}};hj.defaultOptions={},hj.staticKeys=[],hj.handlerKeys=[],hj.handlerKeyOptions={},hj.customHandlerKeys=[];function Wre(e,t,n){let{[Ure]:r}=e,i=e[n];return!r&&!i?!1:!!(i&&i.earlyReturnValue!==mj&&(Xy(i.earlyReturnValue)?i.earlyReturnValue(t)===!0:t===i.earlyReturnValue)||r&&r.earlyReturnValue!==mj&&(Xy(r.earlyReturnValue)?r.earlyReturnValue(t)===!0:t===r.earlyReturnValue))}var gj=class extends hj{constructor(...e){super(Gre,...e),this[`~E`]={},this._extensions=Cb(this.createExtensions(),e=>e.constructor),this.extensionMap=new Map;for(let e of this._extensions)this.extensionMap.set(e.constructor,e)}get priority(){return this.priorityOverride??this.options.priority??this.constructor.defaultPriority}get constructorName(){return`${Ay(this.name)}Extension`}get store(){return B(this._store,{code:R.MANAGER_PHASE_ERROR,message:`An error occurred while attempting to access the 'extension.store' when the Manager has not yet set created the lifecycle methods.`}),Nb(this._store,{requireKeys:!0})}get extensions(){return this._extensions}replaceChildExtension(e,t){this.extensionMap.has(e)&&(this.extensionMap.set(e,t),this._extensions=this.extensions.map(n=>t.constructor===e?t:n))}createExtensions(){return[]}getExtension(e){let t=this.extensionMap.get(e);return B(t,{code:R.INVALID_GET_EXTENSION,message:`'${e.name}' does not exist within the preset: '${this.name}'`}),t}isOfType(e){return this.constructor===e}setStore(e){this._store||=e}clone(...e){return new this.constructor(...e)}setPriority(e){this.priorityOverride=e}};gj.defaultPriority=_y.Default;var _j=class extends gj{static get[hy](){return gy.PlainExtensionConstructor}get[hy](){return gy.PlainExtension}},vj=class extends gj{static get[hy](){return gy.MarkExtensionConstructor}get[hy](){return gy.MarkExtension}get type(){return Ly(this.store.schema.marks,this.name)}constructor(...e){super(...e)}};vj.disableExtraAttributes=!1;var yj=class extends gj{static get[hy](){return gy.NodeExtensionConstructor}get[hy](){return gy.NodeExtension}get type(){return Ly(this.store.schema.nodes,this.name)}constructor(...e){super(...e)}};yj.disableExtraAttributes=!1;var Gre={priority:void 0,extraAttributes:{},disableExtraAttributes:!1,exclude:{}};function bj(e){return Sk(e)&&Ck(e,[gy.PlainExtension,gy.MarkExtension,gy.NodeExtension])}function Kre(e){return Sk(e)&&Ck(e,[gy.PlainExtensionConstructor,gy.MarkExtensionConstructor,gy.NodeExtensionConstructor])}function xj(e){return Sk(e)&&Ck(e,gy.PlainExtension)}function Sj(e){return Sk(e)&&Ck(e,gy.NodeExtension)}function Cj(e){return Sk(e)&&Ck(e,gy.MarkExtension)}function wj(e){return t=>{let{defaultOptions:n,customHandlerKeys:r,handlerKeys:i,staticKeys:a,defaultPriority:o,handlerKeyOptions:s,...c}=e,l=Iy(t);n&&(l.defaultOptions=n),o&&(l.defaultPriority=o),s&&(l.handlerKeyOptions=s),l.staticKeys=a??[],l.handlerKeys=i??[],l.customHandlerKeys=r??[];for(let[e,t]of Object.entries(c))l[e]||(l[e]=t);return Iy(l)}}var qre=class extends _j{constructor(){super(...arguments),this.attributeList=[],this.attributeObject=z(),this.updateAttributes=(e=!0)=>{this.transformAttributes(),e&&this.store.commands.forceUpdate(`attributes`)}}get name(){return`attributes`}onCreate(){this.transformAttributes(),this.store.setExtensionStore(`updateAttributes`,this.updateAttributes)}transformAttributes(){if(this.attributeObject=z(),this.store.managerSettings.exclude?.attributes){this.store.setStoreKey(`attributes`,this.attributeObject);return}this.attributeList=[];for(let e of this.store.extensions){if(e.options.exclude?.attributes)continue;let t=e.createAttributes?.call(e),n={...t,class:pj(...e.classNames??[],t?.class)};this.attributeList.unshift(n)}for(let e of this.attributeList)this.attributeObject={...this.attributeObject,...e,class:pj(this.attributeObject.class,e.class)};this.store.setStoreKey(`attributes`,this.attributeObject)}};function Tj(e={}){return(t,n,r)=>{(t.decoratedHelpers??={})[n]=e}}function G(e={}){return(t,n,r)=>{(t.decoratedCommands??={})[n]=e}}function Ej(e){return(t,n,r)=>{(t.decoratedKeybindings??={})[n]=e}}var Jre=class{constructor(e){this.promiseCreator=e,this.failureHandlers=[],this.successHandlers=[],this.validateHandlers=[],this.generateCommand=()=>e=>{let t=!0,{view:n,tr:r,dispatch:i}=e;if(!n)return!1;for(let n of this.validateHandlers)if(!n({...e,dispatch:()=>{}})){t=!1;break}return!i||!t?t:(this.promiseCreator(e).then(e=>{this.runHandlers(this.successHandlers,{value:e,state:n.state,tr:n.state.tr,dispatch:n.dispatch,view:n})}).catch(e=>{this.runHandlers(this.failureHandlers,{error:e,state:n.state,tr:n.state.tr,dispatch:n.dispatch,view:n})}),i(r),!0)}}validate(e,t=`push`){return this.validateHandlers[t](e),this}success(e,t=`push`){return this.successHandlers[t](e),this}failure(e,t=`push`){return this.failureHandlers[t](e),this}runHandlers(e,t){var n;for(let n of e)if(!n({...t,dispatch:()=>{}}))break;(n=t.dispatch)==null||n.call(t,t.tr)}};function Dj(e){let{type:t,attrs:n,range:r,selection:i}=e;return e=>{let{dispatch:a,tr:o,state:s}=e,c=Jy(t)?s.schema.marks[t]:t;if(B(c,{code:R.SCHEMA,message:`Mark type: ${t} does not exist on the current schema.`}),r||i){let{from:e,to:s}=Qk(i??r??o.selection,o.doc);return Lk({trState:o,type:t,...r})?a?.(o.removeMark(e,s,c)):a?.(o.addMark(e,s,c.create(n))),!0}return rk(yre(c,n))(e)}}function Yre(e,t,n){for(let{$from:r,$to:i}of n){let n=r.depth===0?t.type.allowsMarkType(e):!1;if(t.nodesBetween(r.pos,i.pos,t=>{if(n)return!1;n=t.inlineContent&&t.type.allowsMarkType(e)}),n)return!0}return!1}function Xre(e,t,n){return({tr:r,dispatch:i,state:a})=>{let o=Qk(n??r.selection,r.doc),s=Yk(o),c=Jy(e)?a.schema.marks[e]:e;if(B(c,{code:R.SCHEMA,message:`Mark type: ${e} does not exist on the current schema.`}),o.empty&&!s||!Yre(c,r.doc,o.ranges))return!1;if(!i)return!0;if(s)return r.removeStoredMark(c),t&&r.addStoredMark(c.create(t)),i(r),!0;let l=!1;for(let{$from:e,$to:t}of o.ranges){if(l)break;l=r.doc.rangeHasMark(e.pos,t.pos,c)}for(let{$from:e,$to:n}of o.ranges)l&&r.removeMark(e.pos,n.pos,c),t&&r.addMark(e.pos,n.pos,c.create(t));return i(r),!0}}function Zre(e,t={}){return({tr:n,dispatch:r,state:i})=>{let a=i.schema,o=n.selection,{from:s=o.from,to:c=s??o.to,marks:l={}}=t;if(!r)return!0;n.insertText(e,s,c);let u=Ly(n.steps,n.steps.length-1).getMap().map(c);for(let[e,t]of zy(l))n.addMark(s,u,Ly(a.marks,e).create(t));return r(n),!0}}var Oj=class extends _j{constructor(){super(...arguments),this.decorated=new Map,this.forceUpdateTransaction=(e,...t)=>{let{forcedUpdates:n}=this.getCommandMeta(e);return this.setCommandMeta(e,{forcedUpdates:hb([...n,...t])}),e}}get name(){return`commands`}get transaction(){let e=this.store.getState();this._transaction||=e.tr;let t=this._transaction.before.eq(e.doc),n=!cb(this._transaction.steps);if(!t){let t=e.tr;if(n)for(let e of this._transaction.steps)t.step(e);this._transaction=t}return this._transaction}onCreate(){this.store.setStoreKey(`getForcedUpdates`,this.getForcedUpdates.bind(this))}onView(e){let{extensions:t,helpers:n}=this.store,r=z(),i=new Set,a=z(),o=t=>{let n=z(),i=()=>t??this.transaction,s=[],c=()=>s;for(let[e,t]of Object.entries(r))a[e]?.disableChaining||(n[e]=this.chainedFactory({chain:n,command:t.original,getTr:i,getChain:c}));let l=e=>{B(e===i(),{message:"Chaining currently only supports `CommandFunction` methods which do not use the `state.tr` property. Instead you should use the provided `tr` property."})};return n.run=(t={})=>{let n=s;s=[];for(let e of n)if(!e(l)&&t.exitEarly)return;e.dispatch(i())},n.tr=()=>{let e=s;s=[];for(let t of e)t(l);return i()},n.enabled=()=>{for(let e of s)if(!e())return!1;return!0},n.new=e=>o(e),n};for(let e of t){let t=e.createCommands?.call(e)??{},o=e.decoratedCommands??{},s={};a={...a,decoratedCommands:o};for(let[r,i]of Object.entries(o)){let a=Jy(i.shortcut)&&i.shortcut.startsWith(`_|`)?{shortcut:n.getNamedShortcut(i.shortcut,e.options)}:void 0;this.updateDecorated(r,{...i,name:e.name,...a}),t[r]=e[r].bind(e),i.active&&(s[r]=()=>i.active?.call(i,e.options,this.store)??!1)}ob(t)||this.addCommands({active:s,names:i,commands:r,extensionCommands:t})}let s=o();for(let[e,t]of Object.entries(s))o[e]=t;this.store.setStoreKey(`commands`,r),this.store.setStoreKey(`chain`,o),this.store.setExtensionStore(`commands`,r),this.store.setExtensionStore(`chain`,o)}onStateUpdate({state:e}){this._transaction=e.tr}createPlugin(){return{}}customDispatch(e){return e}insertText(e,t={}){return Jy(e)?Zre(e,t):this.store.createPlaceholderCommand({promise:e,placeholder:{type:`inline`},onSuccess:(e,n,r)=>this.insertText(e,{...t,...n})(r)}).generateCommand()}selectText(e,t={}){return({tr:n,dispatch:r})=>{let i=Qk(e,n.doc);return n.selection.anchor===i.anchor&&n.selection.head===i.head&&!t.forceUpdate?!1:(r?.(n.setSelection(i)),!0)}}selectMark(e){return t=>{let{tr:n}=t,r=Wk(n.selection.$from,e);return r?this.store.commands.selectText.original({from:r.from,to:r.to})(t):!1}}delete(e){return({tr:t,dispatch:n})=>{let{from:r,to:i}=e??t.selection;return n?.(t.delete(r,i)),!0}}emptyUpdate(e){return({tr:t,dispatch:n})=>(n&&(e?.(),n(t)),!0)}forceUpdate(...e){return({tr:t,dispatch:n})=>(n?.(this.forceUpdateTransaction(t,...e)),!0)}updateNodeAttributes(e,t){return({tr:n,dispatch:r})=>(r?.(n.setNodeMarkup(e,void 0,t)),!0)}setContent(e,t){return n=>{let{tr:r,dispatch:i}=n,a=this.store.manager.createState({content:e,selection:t});return a?(i?.(r.replaceRangeWith(0,r.doc.nodeSize-2,a.doc)),!0):!1}}resetContent(){return e=>{let{tr:t,dispatch:n}=e,r=this.store.manager.createEmptyDoc();return r?this.setContent(r)(e):(n?.(t.delete(0,t.doc.nodeSize)),!0)}}emptySelection(){return({tr:e,dispatch:t})=>e.selection.empty?!1:(t?.(e.setSelection(sC.near(e.selection.$anchor))),!0)}insertNewLine(){return({dispatch:e,tr:t})=>Mk(t.selection)?(e?.(t.insertText(`
53
- `)),!0):!1}insertNode(e,t={}){return({dispatch:n,tr:r,state:i})=>{let{attrs:a,range:o,selection:s,replaceEmptyParentBlock:c=!1}=t,{from:l,to:u,$from:d}=Qk(s??o??r.selection,r.doc);if(Ok(e)||kk(e)){let t=d.before(d.depth);return n?.(c&&l===u&&Uk(d.parent)?r.replaceWith(t,t+d.parent.nodeSize,e):r.replaceWith(l,u,e)),!0}let f=Jy(e)?i.schema.nodes[e]:e;B(f,{code:R.SCHEMA,message:`The requested node type ${e} does not exist in the schema.`});let p=t.marks?.map(e=>{if(e instanceof Vb)return e;let t=Jy(e)?i.schema.marks[e]:e;return B(t,{code:R.SCHEMA,message:`The requested mark type ${e} does not exist in the schema.`}),t.create()}),m=f.createAndFill(a,Jy(t.content)?i.schema.text(t.content):t.content,p);return m?(n?.(l===u?r.insert(l,m):r.replaceRangeWith(l,u,m)),!0):!1}}focus(e){return t=>{let{dispatch:n,tr:r}=t,{view:i}=this.store;if(e===!1||i.hasFocus()&&(e===void 0||e===!0))return!1;if(e===void 0||e===!0){let{from:t=0,to:n=t}=r.selection;e={from:t,to:n}}return n&&this.delayedFocus(),this.selectText(e)(t)}}blur(e){return t=>{let{view:n}=this.store;return n.hasFocus()?(requestAnimationFrame(()=>{n.dom.blur()}),e?this.selectText(e)(t):!0):!1}}setBlockNodeType(e,t,n,r=!0){return yA(e,t,n,r)}toggleWrappingNode(e,t,n){return vA(e,t,n)}toggleBlockNodeItem(e){return bA(e)}wrapInNode(e,t,n){return _A(e,t,n)}applyMark(e,t,n){return Xre(e,t,n)}toggleMark(e){return Dj(e)}removeMark(e){return TA(e)}setMeta(e,t){return({tr:n})=>(n.setMeta(e,t),!0)}selectAll(){return this.selectText(`all`)}copy(){return e=>e.tr.selection.empty?!1:(e.dispatch&&document.execCommand(`copy`),!0)}paste(){return this.store.createPlaceholderCommand({promise:async()=>navigator.clipboard?.readText?await navigator.clipboard.readText():``,placeholder:{type:`inline`},onSuccess:(e,t,n)=>this.insertNode(cA({content:e,schema:n.state.schema}),{selection:t})(n)}).generateCommand()}cut(){return e=>e.tr.selection.empty?!1:(e.dispatch&&document.execCommand(`cut`),!0)}replaceText(e){return CA(e)}getAllCommandOptions(){let e={};for(let[t,n]of this.decorated)ob(n)||(e[t]=n);return e}getCommandOptions(e){return this.decorated.get(e)}getCommandProp(){return{tr:this.transaction,dispatch:this.store.view.dispatch,state:this.store.view.state,view:this.store.view}}updateDecorated(e,t){if(!t){this.decorated.delete(e);return}let n=this.decorated.get(e)??{name:``};this.decorated.set(e,{...n,...t})}handleIosFocus(){ak.isIos&&this.store.view.dom.focus()}delayedFocus(){this.handleIosFocus(),requestAnimationFrame(()=>{this.store.view.focus(),this.store.view.dispatch(this.transaction.scrollIntoView())})}getForcedUpdates(e){return this.getCommandMeta(e).forcedUpdates}getCommandMeta(e){let t=e.getMeta(this.pluginKey)??{};return{...Qre,...t}}setCommandMeta(e,t){let n=this.getCommandMeta(e);e.setMeta(this.pluginKey,{...n,...t})}addCommands(e){let{extensionCommands:t,commands:n,names:r,active:i}=e;for(let[e,a]of zy(t))fj({name:e,set:r,code:R.DUPLICATE_COMMAND_NAMES}),B(!$re.has(e),{code:R.DUPLICATE_COMMAND_NAMES,message:`The command name you chose is forbidden.`}),n[e]=this.createUnchainedCommand(a,i[e])}unchainedFactory(e){return(...t)=>{let{shouldDispatch:n=!0,command:r}=e,{view:i}=this.store,{state:a}=i,o;return n&&(o=i.dispatch),r(...t)({state:a,dispatch:o,view:i,tr:a.tr})}}createUnchainedCommand(e,t){let n=this.unchainedFactory({command:e});return n.enabled=this.unchainedFactory({command:e,shouldDispatch:!1}),n.isEnabled=n.enabled,n.original=e,n.active=t,n}chainedFactory(e){return(...t)=>{let{chain:n,command:r,getTr:i,getChain:a}=e,o=a(),{view:s}=this.store,{state:c}=s;return o.push(e=>r(...t)({state:c,dispatch:e,view:s,tr:i()})),n}}};U([G()],Oj.prototype,`customDispatch`,1),U([G()],Oj.prototype,`insertText`,1),U([G()],Oj.prototype,`selectText`,1),U([G()],Oj.prototype,`selectMark`,1),U([G()],Oj.prototype,`delete`,1),U([G()],Oj.prototype,`emptyUpdate`,1),U([G()],Oj.prototype,`forceUpdate`,1),U([G()],Oj.prototype,`updateNodeAttributes`,1),U([G()],Oj.prototype,`setContent`,1),U([G()],Oj.prototype,`resetContent`,1),U([G()],Oj.prototype,`emptySelection`,1),U([G()],Oj.prototype,`insertNewLine`,1),U([G()],Oj.prototype,`insertNode`,1),U([G()],Oj.prototype,`focus`,1),U([G()],Oj.prototype,`blur`,1),U([G()],Oj.prototype,`setBlockNodeType`,1),U([G()],Oj.prototype,`toggleWrappingNode`,1),U([G()],Oj.prototype,`toggleBlockNodeItem`,1),U([G()],Oj.prototype,`wrapInNode`,1),U([G()],Oj.prototype,`applyMark`,1),U([G()],Oj.prototype,`toggleMark`,1),U([G()],Oj.prototype,`removeMark`,1),U([G()],Oj.prototype,`setMeta`,1),U([G({description:({t:e})=>e(jC.SELECT_ALL_DESCRIPTION),label:({t:e})=>e(jC.SELECT_ALL_LABEL),shortcut:L.SelectAll})],Oj.prototype,`selectAll`,1),U([G({description:({t:e})=>e(jC.COPY_DESCRIPTION),label:({t:e})=>e(jC.COPY_LABEL),shortcut:L.Copy,icon:`fileCopyLine`})],Oj.prototype,`copy`,1),U([G({description:({t:e})=>e(jC.PASTE_DESCRIPTION),label:({t:e})=>e(jC.PASTE_LABEL),shortcut:L.Paste,icon:`clipboardLine`})],Oj.prototype,`paste`,1),U([G({description:({t:e})=>e(jC.CUT_DESCRIPTION),label:({t:e})=>e(jC.CUT_LABEL),shortcut:L.Cut,icon:`scissorsFill`})],Oj.prototype,`cut`,1),U([G()],Oj.prototype,`replaceText`,1),U([Tj()],Oj.prototype,`getAllCommandOptions`,1),U([Tj()],Oj.prototype,`getCommandOptions`,1),U([Tj()],Oj.prototype,`getCommandProp`,1),Oj=U([wj({defaultPriority:_y.Highest,defaultOptions:{trackerClassName:`remirror-tracker-position`,trackerNodeName:`span`},staticKeys:[`trackerClassName`,`trackerNodeName`]})],Oj);var Qre={forcedUpdates:[]},$re=new Set([`run`,`chain`,`original`,`raw`,`enabled`,`tr`,`new`]),kj=class extends _j{constructor(){super(...arguments),this.placeholders=ED.empty,this.placeholderWidgets=new Map,this.createPlaceholderCommand=e=>{let t=fb(),{promise:n,placeholder:r,onFailure:i,onSuccess:a}=e;return new Jre(n).validate(e=>this.addPlaceholder(t,r)(e)).success(e=>{let{state:n,tr:r,dispatch:o,view:s,value:c}=e,l=this.store.helpers.findPlaceholder(t);return l?(this.removePlaceholder(t)({state:n,tr:r,view:s,dispatch:()=>{}}),a(c,l,{state:n,tr:r,dispatch:o,view:s})):i?.({error:Error(`The placeholder has been removed`),state:n,tr:r,dispatch:o,view:s})??!1}).failure(e=>(this.removePlaceholder(t)({...e,dispatch:()=>{}}),i?.(e)??!1))}}get name(){return`decorations`}onCreate(){this.store.setExtensionStore(`createPlaceholderCommand`,this.createPlaceholderCommand)}createPlugin(){return{state:{init:()=>{},apply:e=>{var t,n,r,i,a,o;let{added:s,clearTrackers:c,removed:l,updated:u}=this.getMeta(e);if(c){this.placeholders=ED.empty;for(let[,e]of this.placeholderWidgets)(n=(t=e.spec).onDestroy)==null||n.call(t,this.store.view,e.spec.element);this.placeholderWidgets.clear();return}this.placeholders=this.placeholders.map(e.mapping,e.doc,{onRemove:e=>{var t,n;let r=this.placeholderWidgets.get(e.id);r&&((n=(t=r.spec).onDestroy)==null||n.call(t,this.store.view,r.spec.element))}});for(let[,e]of this.placeholderWidgets)(i=(r=e.spec).onUpdate)==null||i.call(r,this.store.view,e.from,e.spec.element,e.spec.data);for(let t of s){if(t.type===`inline`){this.addInlinePlaceholder(t,e);continue}if(t.type===`node`){this.addNodePlaceholder(t,e);continue}if(t.type===`widget`){this.addWidgetPlaceholder(t,e);continue}}for(let{id:t,data:n}of u){let r=this.placeholderWidgets.get(t);if(!r)continue;let i=CD.widget(r.from,r.spec.element,{...r.spec,data:n});this.placeholders=this.placeholders.remove([r]).add(e.doc,[i]),this.placeholderWidgets.set(t,i)}for(let e of l){let t=this.placeholders.find(void 0,void 0,t=>t.id===e&&t.__type===Aj),n=this.placeholderWidgets.get(e);n&&((o=(a=n.spec).onDestroy)==null||o.call(a,this.store.view,n.spec.element)),this.placeholders=this.placeholders.remove(t),this.placeholderWidgets.delete(e)}}},props:{decorations:e=>{let t=this.options.decorations(e);t=t.add(e.doc,this.placeholders.find());for(let n of this.store.extensions){if(!n.createDecorations)continue;let r=n.createDecorations(e).find();t=t.add(e.doc,r)}return t},handleDOMEvents:{blur:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(jj,!1)),!1),focus:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(jj,!0)),!1)}}}}updateDecorations(){return({tr:e,dispatch:t})=>(t?.(e),!0)}addPlaceholder(e,t,n){return({dispatch:r,tr:i})=>this.addPlaceholderTransaction(e,t,i,!r)?(r?.(n?i.deleteSelection():i),!0):!1}updatePlaceholder(e,t){return({dispatch:n,tr:r})=>this.updatePlaceholderTransaction({id:e,data:t,tr:r,checkOnly:!n})?(n?.(r),!0):!1}removePlaceholder(e){return({dispatch:t,tr:n})=>this.removePlaceholderTransaction({id:e,tr:n,checkOnly:!t})?(t?.(n),!0):!1}clearPlaceholders(){return({tr:e,dispatch:t})=>this.clearPlaceholdersTransaction({tr:e,checkOnly:!t})?(t?.(e),!0):!1}findPlaceholder(e){return this.findAllPlaceholders().get(e)}findAllPlaceholders(){let e=new Map,t=this.placeholders.find(void 0,void 0,e=>e.__type===Aj);for(let n of t)e.set(n.spec.id,{from:n.from,to:n.to});return e}createDecorations(e){var t;let{persistentSelectionClass:n}=this.options;return!n||this.store.view?.hasFocus()||(t=this.store.helpers).isInteracting?.call(t)?ED.empty:tie(e,ED.empty,{class:Jy(n)?n:`selection`})}onApplyState(){}addWidgetPlaceholder(e,t){let{pos:n,createElement:r,onDestroy:i,onUpdate:a,className:o,nodeName:s,id:c,type:l}=e,u=r?.(this.store.view,n)??document.createElement(s);u.classList.add(o);let d=CD.widget(n,u,{id:c,__type:Aj,type:l,element:u,onDestroy:i,onUpdate:a});this.placeholderWidgets.set(c,d),this.placeholders=this.placeholders.add(t.doc,[d])}addInlinePlaceholder(e,t){let{from:n=t.selection.from,to:r=t.selection.to,className:i,nodeName:a,id:o,type:s}=e,c;if(n===r){let e=document.createElement(a);e.classList.add(i),c=CD.widget(n,e,{id:o,type:s,__type:Aj,widget:e})}else c=CD.inline(n,r,{nodeName:a,class:i},{id:o,__type:Aj});this.placeholders=this.placeholders.add(t.doc,[c])}addNodePlaceholder(e,t){let{pos:n,className:r,nodeName:i,id:a}=e,o=Yy(n)?t.doc.resolve(n):t.selection.$from,s=Yy(n)?o.nodeAfter?{pos:n,end:o.nodeAfter.nodeSize}:void 0:dk(o);if(!s)return;let c=CD.node(s.pos,s.end,{nodeName:i,class:r},{id:a,__type:Aj});this.placeholders=this.placeholders.add(t.doc,[c])}withRequiredBase(e,t){let{placeholderNodeName:n,placeholderClassName:r}=this.options,{nodeName:i=n,className:a,...o}=t;return{nodeName:i,className:(a?[r,a]:[r]).join(` `),...o,id:e}}getMeta(e){let t=e.getMeta(this.pluginKey)??{};return{...eie,...t}}setMeta(e,t){let n=this.getMeta(e);e.setMeta(this.pluginKey,{...n,...t})}addPlaceholderTransaction(e,t,n,r=!1){if(this.findPlaceholder(e))return!1;if(r)return!0;let{added:i}=this.getMeta(n);return this.setMeta(n,{added:[...i,this.withRequiredBase(e,t)]}),!0}updatePlaceholderTransaction(e){let{id:t,tr:n,checkOnly:r=!1,data:i}=e;if(!this.findPlaceholder(t))return!1;if(r)return!0;let{updated:a}=this.getMeta(n);return this.setMeta(n,{updated:hb([...a,{id:t,data:i}])}),!0}removePlaceholderTransaction(e){let{id:t,tr:n,checkOnly:r=!1}=e;if(!this.findPlaceholder(t))return!1;if(r)return!0;let{removed:i}=this.getMeta(n);return this.setMeta(n,{removed:hb([...i,t])}),!0}clearPlaceholdersTransaction(e){let{tr:t,checkOnly:n=!1}=e;return this.getPluginState()===ED.empty?!1:(n||this.setMeta(t,{clearTrackers:!0}),!0)}};U([G()],kj.prototype,`updateDecorations`,1),U([G()],kj.prototype,`addPlaceholder`,1),U([G()],kj.prototype,`updatePlaceholder`,1),U([G()],kj.prototype,`removePlaceholder`,1),U([G()],kj.prototype,`clearPlaceholders`,1),U([Tj()],kj.prototype,`findPlaceholder`,1),U([Tj()],kj.prototype,`findAllPlaceholders`,1),kj=U([wj({defaultOptions:{persistentSelectionClass:void 0,placeholderClassName:`placeholder`,placeholderNodeName:`span`},staticKeys:[`placeholderClassName`,`placeholderNodeName`],handlerKeys:[`decorations`],handlerKeyOptions:{decorations:{reducer:{accumulator:(e,t,n)=>e.add(n.doc,t.find()),getDefault:()=>ED.empty}}},defaultPriority:_y.Low})],kj);var eie={added:[],updated:[],clearTrackers:!1,removed:[]},Aj=`placeholderDecoration`,jj=`persistentSelectionFocus`;function tie(e,t,n){let{selection:r,doc:i}=e;if(r.empty)return t;let{from:a,to:o}=r,s=Ik(r)?CD.node(a,o,n):CD.inline(a,o,n);return t.add(i,[s])}var Mj=class extends _j{get name(){return`docChanged`}onStateUpdate(e){let{firstUpdate:t,transactions:n,tr:r}=e;t||(n??[r]).some(e=>e?.docChanged)&&this.options.docChanged(e)}};Mj=U([wj({handlerKeys:[`docChanged`],handlerKeyOptions:{docChanged:{earlyReturnValue:!1}},defaultPriority:_y.Lowest})],Mj);var Nj=class extends _j{get name(){return`helpers`}onCreate(){this.store.setStringHandler(`text`,this.textToProsemirrorNode.bind(this)),this.store.setStringHandler(`html`,cA);let e=z(),t=z(),n=z(),r=new Set;for(let i of this.store.extensions){Sj(i)&&(t[i.name]=e=>gk({state:this.store.getState(),type:i.type,attrs:e}),n[i.name]=e=>_k({state:this.store.getState(),type:i.type,attrs:e})?.node.attrs),Cj(i)&&(t[i.name]=e=>Lk({trState:this.store.getState(),type:i.type,attrs:e}),n[i.name]=e=>{let t=Wk(this.store.getState().selection.$from,i.type);if(!t||!e)return t?.mark.attrs;if(xk(t.mark,e))return t.mark.attrs});let a=i.createHelpers?.call(i)??{};for(let e of Object.keys(i.decoratedHelpers??{}))a[e]=i[e].bind(i);if(!ob(a))for(let[t,n]of zy(a))fj({name:t,set:r,code:R.DUPLICATE_HELPER_NAMES}),e[t]=n}this.store.setStoreKey(`attrs`,n),this.store.setStoreKey(`active`,t),this.store.setStoreKey(`helpers`,e),this.store.setExtensionStore(`attrs`,n),this.store.setExtensionStore(`active`,t),this.store.setExtensionStore(`helpers`,e)}isSelectionEmpty(e=this.store.getState()){return mk(e)}isViewEditable(e=this.store.getState()){var t;return(t=this.store.view.props).editable?.call(t,e)??!1}getStateJSON(e=this.store.getState()){return e.toJSON()}getJSON(e=this.store.getState()){return e.doc.toJSON()}getRemirrorJSON(e=this.store.getState()){return this.getJSON(e)}insertHtml(e,t){return n=>{let{state:r}=n,i=cA({content:e,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(i,t)(n)}}getText({lineBreakDivider:e=`
54
-
55
- `,state:t=this.store.getState()}={}){return t.doc.textBetween(0,t.doc.content.size,e,`\0`)}getTextBetween(e,t,n=this.store.getState().doc){return n.textBetween(e,t,`
56
-
57
- `,`\0`)}getHTML(e=this.store.getState()){return sA(e.doc,this.store.document)}textToProsemirrorNode(e){let t=`<pre>${e.content}</pre>`;return this.store.stringHandlers.html({...e,content:t})}};U([Tj()],Nj.prototype,`isSelectionEmpty`,1),U([Tj()],Nj.prototype,`isViewEditable`,1),U([Tj()],Nj.prototype,`getStateJSON`,1),U([Tj()],Nj.prototype,`getJSON`,1),U([Tj()],Nj.prototype,`getRemirrorJSON`,1),U([G()],Nj.prototype,`insertHtml`,1),U([Tj()],Nj.prototype,`getText`,1),U([Tj()],Nj.prototype,`getTextBetween`,1),U([Tj()],Nj.prototype,`getHTML`,1),Nj=U([wj({})],Nj);var Pj=class extends _j{get name(){return`inputRules`}onCreate(){this.store.setExtensionStore(`rebuildInputRules`,this.rebuildInputRules.bind(this))}createExternalPlugins(){return[this.generateInputRulesPlugin()]}generateInputRulesPlugin(){let e=[],t=this.store.markTags[my.ExcludeInputRules];for(let n of this.store.extensions)if(!(this.store.managerSettings.exclude?.inputRules||!n.createInputRules||n.options.exclude?.inputRules))for(let r of n.createInputRules())r.shouldSkip=this.options.shouldSkipInputRule,r.invalidMarks=t,e.push(r);return VC({rules:e})}rebuildInputRules(){this.store.updateExtensionPlugins(this)}};Pj=U([wj({defaultPriority:_y.Default,handlerKeys:[`shouldSkipInputRule`],handlerKeyOptions:{shouldSkipInputRule:{earlyReturnValue:!0}}})],Pj);var Fj=class extends _j{constructor(){super(...arguments),this.extraKeyBindings=[],this.backwardMarkExitTracker=new Map,this.keydownHandler=null,this.onAddCustomHandler=({keymap:e})=>{var t,n;if(e)return this.extraKeyBindings=[...this.extraKeyBindings,e],(n=(t=this.store).rebuildKeymap)==null||n.call(t),()=>{var t,n;this.extraKeyBindings=this.extraKeyBindings.filter(t=>t!==e),(n=(t=this.store).rebuildKeymap)==null||n.call(t)}},this.rebuildKeymap=()=>{this.setupKeydownHandler()}}get name(){return`keymap`}get shortcutMap(){let{shortcuts:e}=this.options;return Jy(e)?iie[e]:e}onCreate(){this.store.setExtensionStore(`rebuildKeymap`,this.rebuildKeymap)}createExternalPlugins(){return this.store.managerSettings.exclude?.keymap?[]:(this.setupKeydownHandler(),[new TC({props:{handleKeyDown:(e,t)=>this.keydownHandler?.call(this,e,t)}})])}setupKeydownHandler(){this.keydownHandler=aj(this.generateKeymapBindings())}generateKeymapBindings(){let e=[],t=this.shortcutMap,n=this.store.getExtension(Oj),r=e=>n=>Ij({shortcut:n,map:t,store:this.store,options:e.options});for(let i of this.store.extensions){let a=i.decoratedKeybindings??{};if(!i.options.exclude?.keymap){i.createKeymap&&e.push(rie(i.createKeymap(r(i)),t));for(let[r,o]of zy(a)){if(o.isActive&&!o.isActive(i.options,this.store))continue;let a=i[r].bind(i),s=Ij({shortcut:o.shortcut,map:t,options:i.options,store:this.store}),c=Xy(o.priority)?o.priority(i.options,this.store):o.priority??_y.Low,l=z();for(let e of s)l[e]=a;e.push([c,l]),o.command&&n.updateDecorated(o.command,{shortcut:s})}}}return bk(this.sortKeymaps([...this.extraKeyBindings,...e]))}arrowRightShortcut(e){let t=this.store.markTags[my.PreventExits],n=this.store.nodeTags[my.PreventExits];return this.exitMarkForwards(t,n)(e)}arrowLeftShortcut(e){let t=this.store.markTags[my.PreventExits],n=this.store.nodeTags[my.PreventExits];return vk(this.exitNodeBackwards(n),this.exitMarkBackwards(t,n))(e)}backspace(e){let t=this.store.markTags[my.PreventExits],n=this.store.nodeTags[my.PreventExits];return vk(this.exitNodeBackwards(n,!0),this.exitMarkBackwards(t,n,!0))(e)}createKeymap(){let{selectParentNodeOnEscape:e,undoInputRuleOnBackspace:t,excludeBaseKeymap:n}=this.options,r=z();if(!n)for(let[e,t]of zy($A))r[e]=rk(t);return t&&$A.Backspace&&(r.Backspace=rk(JA(UC,$A.Backspace))),e&&(r.Escape=rk(fre)),[_y.Low,r]}getNamedShortcut(e,t={}){return e.startsWith(`_|`)?Ij({shortcut:e,map:this.shortcutMap,store:this.store,options:t}):[e]}onSetOptions(e){var t,n;let{changes:r}=e;(r.excludeBaseKeymap.changed||r.selectParentNodeOnEscape.changed||r.undoInputRuleOnBackspace.changed)&&((n=(t=this.store).rebuildKeymap)==null||n.call(t))}sortKeymaps(e){return yb(e.map(e=>sb(e)?e:[_y.Default,e]),(e,t)=>t[0]-e[0]).map(e=>e[1])}exitMarkForwards(e,t){return n=>{let{tr:r,dispatch:i}=n;if(!pA(r.selection)||fk({selection:r.selection,types:t}))return!1;let a=r.selection.$from.marks().filter(t=>!e.includes(t.type.name));if(cb(a))return!1;if(!i)return!0;for(let e of a)r.removeStoredMark(e);return i(r.insertText(` `,r.selection.from)),!0}}exitNodeBackwards(e,t=!1){return n=>{let{tr:r}=n;if(!(t?hA:mA)(r.selection))return!1;let i=r.selection.$anchor.node();return!Uk(i)||Hk(i)||e.includes(i.type.name)?!1:this.store.commands.toggleBlockNodeItem.original({type:i.type})(n)}}exitMarkBackwards(e,t,n=!1){return r=>{let{tr:i,dispatch:a}=r;if(!(n?hA:mA)(i.selection)||this.backwardMarkExitTracker.has(i.selection.anchor))return this.backwardMarkExitTracker.clear(),!1;if(fk({selection:i.selection,types:t}))return!1;let o=[...i.storedMarks??[],...i.selection.$from.marks()].filter(t=>!e.includes(t.type.name));if(cb(o))return!1;if(!a)return!0;for(let e of o)i.removeStoredMark(e);return this.backwardMarkExitTracker.set(i.selection.anchor,!0),a(i),!0}}};U([Ej({shortcut:`ArrowRight`,isActive:e=>e.exitMarksOnArrowPress})],Fj.prototype,`arrowRightShortcut`,1),U([Ej({shortcut:`ArrowLeft`,isActive:e=>e.exitMarksOnArrowPress})],Fj.prototype,`arrowLeftShortcut`,1),U([Ej({shortcut:`Backspace`,isActive:e=>e.exitMarksOnArrowPress})],Fj.prototype,`backspace`,1),U([Tj()],Fj.prototype,`getNamedShortcut`,1),Fj=U([wj({defaultPriority:_y.Low,defaultOptions:{shortcuts:`default`,undoInputRuleOnBackspace:!0,selectParentNodeOnEscape:!1,excludeBaseKeymap:!1,exitMarksOnArrowPress:!0},customHandlerKeys:[`keymap`]})],Fj);function nie(e){return Hy(Vy(L),e)}function Ij({shortcut:e,map:t,options:n,store:r}){return Jy(e)?[Lj(e,t)]:sb(e)?e.map(e=>Lj(e,t)):(e=e(n,r),Ij({shortcut:e,map:t,options:n,store:r}))}function Lj(e,t){return nie(e)?t[e]:e}function rie(e,t){let n={},r,i;sb(e)?[i,r]=e:r=e;for(let[e,i]of zy(r))n[Lj(e,t)]=i;return qy(i)?n:[i,n]}var Rj={[L.Copy]:`Mod-c`,[L.Cut]:`Mod-x`,[L.Paste]:`Mod-v`,[L.PastePlain]:`Mod-Shift-v`,[L.SelectAll]:`Mod-a`,[L.Undo]:`Mod-z`,[L.Redo]:ak.isMac?`Shift-Mod-z`:`Mod-y`,[L.Bold]:`Mod-b`,[L.Italic]:`Mod-i`,[L.Underline]:`Mod-u`,[L.Strike]:`Mod-d`,[L.Code]:"Mod-`",[L.Paragraph]:`Mod-Shift-0`,[L.H1]:`Mod-Shift-1`,[L.H2]:`Mod-Shift-2`,[L.H3]:`Mod-Shift-3`,[L.H4]:`Mod-Shift-4`,[L.H5]:`Mod-Shift-5`,[L.H6]:`Mod-Shift-6`,[L.TaskList]:`Mod-Shift-7`,[L.BulletList]:`Mod-Shift-8`,[L.OrderedList]:`Mod-Shift-9`,[L.Quote]:`Mod->`,[L.Divider]:`Mod-Shift-|`,[L.Codeblock]:`Mod-Shift-~`,[L.ClearFormatting]:`Mod-Shift-C`,[L.Superscript]:`Mod-.`,[L.Subscript]:`Mod-,`,[L.LeftAlignment]:`Mod-Shift-L`,[L.CenterAlignment]:`Mod-Shift-E`,[L.RightAlignment]:`Mod-Shift-R`,[L.JustifyAlignment]:`Mod-Shift-J`,[L.InsertLink]:`Mod-k`,[L.Find]:`Mod-f`,[L.FindBackwards]:`Mod-Shift-f`,[L.FindReplace]:`Mod-Shift-H`,[L.AddFootnote]:`Mod-Alt-f`,[L.AddComment]:`Mod-Alt-m`,[L.ContextMenu]:`Mod-Shift-\\`,[L.IncreaseFontSize]:`Mod-Shift-.`,[L.DecreaseFontSize]:`Mod-Shift-,`,[L.IncreaseIndent]:`Tab`,[L.DecreaseIndent]:`Shift-Tab`,[L.Shortcuts]:`Mod-/`,[L.Format]:ak.isMac?`Alt-Shift-f`:`Shift-Ctrl-f`},iie={default:Rj,googleDoc:{...Rj,[L.Strike]:`Mod-Shift-S`,[L.Code]:`Mod-Shift-M`,[L.Paragraph]:`Mod-Alt-0`,[L.H1]:`Mod-Alt-1`,[L.H2]:`Mod-Alt-2`,[L.H3]:`Mod-Alt-3`,[L.H4]:`Mod-Alt-4`,[L.H5]:`Mod-Alt-5`,[L.H6]:`Mod-Alt-6`,[L.OrderedList]:`Mod-Alt-7`,[L.BulletList]:`Mod-Alt-8`,[L.Quote]:`Mod-Alt-9`,[L.ClearFormatting]:`Mod-\\`,[L.IncreaseIndent]:`Mod-[`,[L.DecreaseIndent]:`Mod-]`}},aie=class extends _j{get name(){return`nodeViews`}createPlugin(){let e=[],t=z();for(let t of this.store.extensions){if(!t.createNodeViews)continue;let n=t.createNodeViews();e.unshift(Xy(n)?{[t.name]:n}:n)}e.unshift(this.store.managerSettings.nodeViews??{});for(let n of e)Object.assign(t,n);return{props:{nodeViews:t}}}},oie=class extends _j{get name(){return`pasteRules`}createExternalPlugins(){return[this.generatePasteRulesPlugin()]}generatePasteRulesPlugin(){let e=[];for(let t of this.store.extensions){if(this.store.managerSettings.exclude?.pasteRules||!t.createPasteRules||t.options.exclude?.pasteRules)continue;let n=t.createPasteRules(),r=sb(n)?n:[n];e.push(...r)}return Dre(e)}},zj=class extends _j{constructor(){super(...arguments),this.plugins=[],this.managerPlugins=[],this.applyStateHandlers=[],this.initStateHandlers=[],this.appendTransactionHandlers=[],this.pluginKeys=z(),this.stateGetters=new Map,this.getPluginStateCreator=e=>t=>e.getState(t??this.store.getState()),this.getStateByName=e=>{let t=this.stateGetters.get(e);return B(t,{message:`No plugin exists for the requested extension name.`}),t()}}get name(){return`plugins`}onCreate(){let{setStoreKey:e,setExtensionStore:t,managerSettings:n,extensions:r}=this.store;this.updateExtensionStore();let{plugins:i=[]}=n;this.updatePlugins(i,this.managerPlugins);for(let e of r)e.onApplyState&&this.applyStateHandlers.push(e.onApplyState.bind(e)),e.onInitState&&this.initStateHandlers.push(e.onInitState.bind(e)),e.onAppendTransaction&&this.appendTransactionHandlers.push(e.onAppendTransaction.bind(e)),this.extractExtensionPlugins(e);this.managerPlugins=i,this.store.setStoreKey(`plugins`,this.plugins),e(`pluginKeys`,this.pluginKeys),e(`getPluginState`,this.getStateByName),t(`getPluginState`,this.getStateByName)}createPlugin(){return{appendTransaction:(e,t,n)=>{let r=n.tr,i={previousState:t,tr:r,transactions:e,state:n};for(let e of this.appendTransactionHandlers)e(i);return this.options.appendTransaction(i),r.docChanged||r.steps.length>0||r.selectionSet||r.storedMarksSet?r:void 0},state:{init:(e,t)=>{for(let e of this.initStateHandlers)e(t)},apply:(e,t,n,r)=>{let i={previousState:n,state:r,tr:e};for(let e of this.applyStateHandlers)e(i);this.options.applyState(i)}}}}extractExtensionPlugins(e){if(!(!e.createPlugin&&!e.createExternalPlugins||this.store.managerSettings.exclude?.plugins||e.options.exclude?.plugins)){if(e.createPlugin){let t=new OC(e.name);this.pluginKeys[e.name]=t;let n=this.getPluginStateCreator(t);e.pluginKey=t,e.getPluginState=n,this.stateGetters.set(e.name,n),this.stateGetters.set(e.constructor,n);let r=new TC({...e.createPlugin(),key:t});this.updatePlugins([r],e.plugin?[e.plugin]:void 0),e.plugin=r}if(e.createExternalPlugins){let t=e.createExternalPlugins();this.updatePlugins(t,e.externalPlugins),e.externalPlugins=t}}}updatePlugins(e,t){if(!t||cb(t)){this.plugins=[...this.plugins,...e];return}if(e.length!==t.length){this.plugins=[...this.plugins.filter(e=>!t.includes(e)),...e];return}let n=new Map;for(let[r,i]of e.entries())n.set(Ly(t,r),i);this.plugins=this.plugins.map(e=>t.includes(e)?n.get(e):e)}updateExtensionStore(){let{setExtensionStore:e}=this.store;e(`updatePlugins`,this.updatePlugins.bind(this)),e(`dispatchPluginUpdate`,this.dispatchPluginUpdate.bind(this)),e(`updateExtensionPlugins`,this.updateExtensionPlugins.bind(this))}updateExtensionPlugins(e){let t=bj(e)?e:Kre(e)?this.store.manager.getExtension(e):this.store.extensions.find(t=>t.name===e);B(t,{code:R.INVALID_MANAGER_EXTENSION,message:`The extension ${e} does not exist within the editor.`}),this.extractExtensionPlugins(t),this.store.setStoreKey(`plugins`,this.plugins),this.dispatchPluginUpdate()}dispatchPluginUpdate(){B(this.store.phase>=vy.EditorView,{code:R.MANAGER_PHASE_ERROR,message:"`dispatchPluginUpdate` should only be called after the view has been added to the manager."});let{view:e,updateState:t}=this.store;t(e.state.reconfigure({plugins:this.plugins}))}};zj=U([wj({defaultPriority:_y.Highest,handlerKeys:[`applyState`,`appendTransaction`]})],zj);var Bj=class extends _j{constructor(){super(...arguments),this.dynamicAttributes={marks:z(),nodes:z()}}get name(){return`schema`}onCreate(){let{managerSettings:e,tags:t,markNames:n,nodeNames:r,extensions:i}=this.store,{defaultBlockNode:a,disableExtraAttributes:o,nodeOverride:s,markOverride:c}=e,l=e=>!!(e&&t[my.Block].includes(e));if(e.schema){let{nodes:t,marks:n}=mie(e.schema);this.addSchema(e.schema,t,n);return}let u=l(a)?{doc:z(),[a]:z()}:z(),d=z(),f=sie({settings:e,gatheredSchemaAttributes:this.gatherExtraAttributes(i),nodeNames:r,markNames:n,tags:t});for(let e of i){f[e.name]={...f[e.name],...e.options.extraAttributes};let t=o===!0||e.options.disableExtraAttributes===!0||e.constructor.disableExtraAttributes===!0;if(Sj(e)){let{spec:n,dynamic:r}=Vj({createExtensionSpec:(t,n)=>e.createNodeSpec(t,n),extraAttributes:Ly(f,e.name),override:{...s,...e.options.nodeOverride},ignoreExtraAttributes:t,name:e.constructorName,tags:e.tags});e.spec=n,u[e.name]=n,Object.keys(r).length>0&&(this.dynamicAttributes.nodes[e.name]=r)}if(Cj(e)){let{spec:n,dynamic:r}=Vj({createExtensionSpec:(t,n)=>e.createMarkSpec(t,n),extraAttributes:Ly(f,e.name),override:{...c,...e.options.markOverride},ignoreExtraAttributes:t,name:e.constructorName,tags:e.tags??[]});e.spec=n,d[e.name]=n,Object.keys(r).length>0&&(this.dynamicAttributes.marks[e.name]=r)}}let p=new Mx({nodes:u,marks:d,topNode:`doc`});this.addSchema(p,u,d)}createPlugin(){return{appendTransaction:(e,t,n)=>{let{tr:r}=n;return!e.some(e=>e.docChanged)||Object.keys(this.dynamicAttributes.nodes).length===0&&Object.keys(this.dynamicAttributes.marks).length===0?null:(r.doc.descendants((e,t)=>(this.checkAndUpdateDynamicNodes(e,t,r),this.checkAndUpdateDynamicMarks(e,t,r),!0)),r.steps.length>0?r:null)}}}addSchema(e,t,n){this.store.setStoreKey(`nodes`,t),this.store.setStoreKey(`marks`,n),this.store.setStoreKey(`schema`,e),this.store.setExtensionStore(`schema`,e),this.store.setStoreKey(`defaultBlockNode`,Vk(e).name);for(let t of Object.values(e.nodes))if(t.name!==`doc`&&(t.isBlock||t.isTextblock))break}checkAndUpdateDynamicNodes(e,t,n){for(let[r,i]of zy(this.dynamicAttributes.nodes))if(e.type.name===r)for(let[r,a]of zy(i)){if(!tb(e.attrs[r]))continue;let i={...e.attrs,[r]:a(e)};n.setNodeMarkup(t,void 0,i),$O(n)}}checkAndUpdateDynamicMarks(e,t,n){for(let[r,i]of zy(this.dynamicAttributes.marks)){let a=Ly(this.store.schema.marks,r),o=e.marks.find(e=>e.type.name===r);if(o)for(let[e,r]of zy(i)){if(!tb(o.attrs[e]))continue;let i=Wk(n.doc.resolve(t),a);if(!i)continue;let{from:s,to:c}=i,l=a.create({...o.attrs,[e]:r(o)});n.removeMark(s,c,a).addMark(s,c,l),$O(n)}}}gatherExtraAttributes(e){let t=[];for(let n of e)n.createSchemaAttributes&&t.push(...n.createSchemaAttributes());return t}};Bj=U([wj({defaultPriority:_y.Highest})],Bj);function sie(e){let{settings:t,gatheredSchemaAttributes:n,nodeNames:r,markNames:i,tags:a}=e,o=z();if(t.disableExtraAttributes)return o;let s=[...n,...t.extraAttributes??[]];for(let e of s??[]){let t=lie({identifiers:e.identifiers,nodeNames:r,markNames:i,tags:a});for(let n of t)o[n]={...o[n]??{},...e.attributes}}return o}function cie(e){return $y(e)&&sb(e.tags)}function lie(e){let{identifiers:t,nodeNames:n,markNames:r,tags:i}=e;if(t===`nodes`)return n;if(t===`marks`)return r;if(t===`all`)return[...n,...r];if(sb(t))return t;B(cie(t),{code:R.EXTENSION_EXTRA_ATTRIBUTES,message:"Invalid value passed as an identifier when creating `extraAttributes`."});let{tags:a=[],names:o=[],behavior:s=`any`,excludeNames:c,excludeTags:l,type:u}=t,d=new Set,f=u===`mark`?r:u===`node`?n:[...r,...n],p=e=>f.includes(e)&&!c?.includes(e);for(let e of o)p(e)&&d.add(e);let m=new Map;for(let e of a)if(!l?.includes(e))for(let t of i[e]){if(!p(t))continue;if(s===`any`){d.add(t);continue}let n=m.get(t)??new Set;n.add(e),m.set(t,n)}for(let[e,t]of m)t.size===a.length&&d.add(e);return[...d]}function Vj(e){let{createExtensionSpec:t,extraAttributes:n,ignoreExtraAttributes:r,name:i,tags:a,override:o}=e,s=z();function c(e,t){s[e]=t}let l=!1;function u(){l=!0}let d=t({defaults:uie(n,r,u,c),parse:die(n,r),dom:fie(n,r)},o);return B(r||l,{code:R.EXTENSION_SPEC,message:`When creating a node specification you must call the 'defaults', and parse, and 'dom' methods. To avoid this error you can set the static property 'disableExtraAttributes' of '${i}' to 'true'.`}),d.group=[...d.group?.split(` `)??[],...a].join(` `)||void 0,{spec:d,dynamic:s}}function Hj(e){return Jy(e)||Xy(e)?{default:e}:(B(e,{message:`${Uy(e)} is not supported`,code:R.EXTENSION_EXTRA_ATTRIBUTES}),e)}function uie(e,t,n,r){return()=>{n();let i=z();if(t)return i;for(let[t,n]of zy(e)){let e=Hj(n).default;Xy(e)&&(r(t,e),e=null),i[t]=e===void 0?{}:{default:e}}return i}}function die(e,t){return n=>{let r=z();if(t)return r;for(let[t,i]of zy(e)){let{parseDOM:e,...a}=Hj(i);if(ck(n)){if(tb(e)){r[t]=n.getAttribute(t)??a.default;continue}if(Xy(e)){r[t]=e(n)??a.default;continue}r[t]=n.getAttribute(e)??a.default}}return r}}function fie(e,t){return n=>{let r=z();if(t)return r;function i(e,t){if(e){if(Jy(e)){r[t]=e;return}if(sb(e)){let[i,a]=e;r[i]=a??n.attrs[t];return}for(let[t,n]of zy(e))r[t]=n}}for(let[t,a]of zy(e)){let{toDOM:e,parseDOM:o}=Hj(a);if(tb(e)){let e=Jy(o)?o:t;r[e]=n.attrs[t];continue}if(Xy(e)){i(e(n.attrs,pie(n)),t);continue}i(e,t)}return r}}function pie(e){return Ok(e)?{node:e}:Ak(e)?{mark:e}:{}}function mie(e){let t=z(),n=z();for(let[n,r]of Object.entries(e.nodes))t[n]=r.spec;for(let[t,r]of Object.entries(e.marks))n[t]=r.spec;return{nodes:t,marks:n}}var Uj=class extends _j{constructor(){super(...arguments),this.onAddCustomHandler=({suggester:e})=>{if(!(!e||this.store.managerSettings.exclude?.suggesters))return QO(this.store.getState(),e)}}get name(){return`suggest`}onCreate(){this.store.setExtensionStore(`addSuggester`,e=>QO(this.store.getState(),e)),this.store.setExtensionStore(`removeSuggester`,e=>ek(this.store.getState(),e))}createExternalPlugins(){let e=[];for(let t of this.store.extensions){if(this.store.managerSettings.exclude?.suggesters)break;if(!t.createSuggesters||t.options.exclude?.suggesters)continue;let n=t.createSuggesters(),r=sb(n)?n:[n];e.push(...r)}return[tk(...e)]}getSuggestState(e){return ZO(e??this.store.getState())}getSuggestMethods(){let{addIgnored:e,clearIgnored:t,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:i,findMatchAtPosition:a,findNextTextSelection:o,setLastChangeFromAppend:s}=this.getSuggestState();return{addIgnored:e,clearIgnored:t,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:i,findMatchAtPosition:a,findNextTextSelection:o,setLastChangeFromAppend:s}}isSuggesterActive(e){return Hy(sb(e)?e:[e],this.getSuggestState().match?.suggester.name)}};U([Tj()],Uj.prototype,`getSuggestState`,1),U([Tj()],Uj.prototype,`getSuggestMethods`,1),U([Tj()],Uj.prototype,`isSuggesterActive`,1),Uj=U([wj({customHandlerKeys:[`suggester`]})],Uj);var Wj=class extends _j{constructor(){super(...arguments),this.allTags=z(),this.plainTags=z(),this.markTags=z(),this.nodeTags=z()}get name(){return`tags`}onCreate(){this.resetTags();for(let e of this.store.extensions)this.updateTagForExtension(e);this.store.setStoreKey(`tags`,this.allTags),this.store.setExtensionStore(`tags`,this.allTags),this.store.setStoreKey(`plainTags`,this.plainTags),this.store.setExtensionStore(`plainTags`,this.plainTags),this.store.setStoreKey(`markTags`,this.markTags),this.store.setExtensionStore(`markTags`,this.markTags),this.store.setStoreKey(`nodeTags`,this.nodeTags),this.store.setExtensionStore(`nodeTags`,this.nodeTags)}resetTags(){let e=z(),t=z(),n=z(),r=z();for(let i of Vy(my))e[i]=[],t[i]=[],n[i]=[],r[i]=[];this.allTags=e,this.plainTags=t,this.markTags=n,this.nodeTags=r}updateTagForExtension(e){let t=new Set([...e.tags??[],...e.createTags?.call(e)??[],...e.options.extraTags??[],...this.store.managerSettings.extraTags?.[e.name]??[]]);for(let n of t)B(hie(n),{code:R.EXTENSION,message:`The tag provided by the extension: ${e.constructorName} is not supported by the editor. To add custom tags you can use the 'mutateTag' method.`}),this.allTags[n].push(e.name),xj(e)&&this.plainTags[n].push(e.name),Cj(e)&&this.markTags[n].push(e.name),Sj(e)&&this.nodeTags[n].push(e.name);e.tags=[...t]}};Wj=U([wj({defaultPriority:_y.Highest})],Wj);function hie(e){return Hy(Vy(my),e)}var gie=new OC(`remirrorFilePlaceholderPlugin`);function _ie(){let e=new TC({key:gie,state:{init(){return{set:ED.empty,payloads:new Map}},apply(t,{set:n,payloads:r}){n=n.map(t.mapping,t.doc);let i=t.getMeta(e);if(i)if(i.type===0){let e=document.createElement(`placeholder`),a=CD.widget(i.pos,e,{id:i.id});n=n.add(t.doc,[a]),r.set(i.id,i.payload)}else i.type===1&&(n=n.remove(n.find(void 0,void 0,e=>e.id===i.id)),r.delete(i.id));return{set:n,payloads:r}}},props:{decorations(t){return e.getState(t)?.set??null}}});return e}var vie=class extends _j{get name(){return`upload`}createExternalPlugins(){return[_ie()]}};function yie(e={}){e={exitMarksOnArrowPress:Fj.defaultOptions.exitMarksOnArrowPress,excludeBaseKeymap:Fj.defaultOptions.excludeBaseKeymap,selectParentNodeOnEscape:Fj.defaultOptions.selectParentNodeOnEscape,undoInputRuleOnBackspace:Fj.defaultOptions.undoInputRuleOnBackspace,persistentSelectionClass:kj.defaultOptions.persistentSelectionClass,...e};let t=(0,Fy.default)(e,[`excludeBaseKeymap`,`selectParentNodeOnEscape`,`undoInputRuleOnBackspace`]),n=(0,Fy.default)(e,[`persistentSelectionClass`]);return[new Wj,new Bj,new qre,new zj,new Pj,new oie,new aie,new Uj,new Oj,new Nj,new Fj(t),new Mj,new vie,new kj(n)]}var Gj=class extends _j{get name(){return`meta`}onCreate(){if(this.store.setStoreKey(`getCommandMeta`,this.getCommandMeta.bind(this)),this.options.capture)for(let e of this.store.extensions)this.captureCommands(e),this.captureKeybindings(e)}createPlugin(){return{}}captureCommands(e){let t=e.decoratedCommands??{},n=e.createCommands;for(let n of Object.keys(t)){let t=e[n];e[n]=(...r)=>i=>{let a=t(...r)(i);return i.dispatch&&a&&this.setCommandMeta(i.tr,{type:`command`,chain:i.dispatch!==i.view?.dispatch,name:n,extension:e.name,decorated:!0}),a}}n&&(e.createCommands=()=>{let t=n();for(let[n,r]of Object.entries(t))t[n]=(...t)=>i=>{let a=r(...t)(i);return i.dispatch&&a&&this.setCommandMeta(i.tr,{type:`command`,chain:i.dispatch!==i.view?.dispatch,name:n,extension:e.name,decorated:!1}),a};return t})}captureKeybindings(e){}getCommandMeta(e){return e.getMeta(this.pluginKey)??[]}setCommandMeta(e,t){let n=this.getCommandMeta(e);e.setMeta(this.pluginKey,[...n,t])}};Gj=U([wj({defaultOptions:{capture:ak.isDevelopment},staticKeys:[`capture`],defaultPriority:_y.Highest})],Gj);var Kj,qj,Jj,Yj,Xj,Zj,Qj,bie=class{constructor(e){lj(this,Kj,fb()),lj(this,qj,void 0),lj(this,Jj,void 0),lj(this,Yj,!0),lj(this,Xj,sj()),lj(this,Zj,void 0),lj(this,Qj,void 0),this.getState=()=>this.view.state??this.initialEditorState,this.getPreviousState=()=>this.previousState,this.dispatchTransaction=e=>{var t;B(!this.manager.destroyed,{code:R.MANAGER_PHASE_ERROR,message:`A transaction was dispatched to a manager that has already been destroyed. Please check your set up, or open an issue.`}),e=(t=this.props).onDispatchTransaction?.call(t,e,this.getState())??e;let n=this.getState(),{state:r,transactions:i}=n.applyTransaction(e);uj(this,Jj,n),this.updateState({state:r,tr:e,transactions:i});let a=this.manager.store.getForcedUpdates(e);cb(a)||this.updateViewProps(...a)},this.onChange=(e=z())=>{var t,n;let r=this.eventListenerProps(e);W(this,Yj)&&uj(this,Yj,!1),(n=(t=this.props).onChange)==null||n.call(t,r)},this.onBlur=e=>{var t,n;let r=this.eventListenerProps();(n=(t=this.props).onBlur)==null||n.call(t,r,e),W(this,Xj).emit(`blur`,r,e)},this.onFocus=e=>{var t,n;let r=this.eventListenerProps();(n=(t=this.props).onFocus)==null||n.call(t,r,e),W(this,Xj).emit(`focus`,r,e)},this.setContent=(e,{triggerChange:t=!1}={})=>{let{doc:n}=this.manager.createState({content:e}),r=this.getState(),{state:i}=this.getState().applyTransaction(r.tr.replaceRangeWith(0,r.doc.nodeSize-2,n));if(t)return this.updateState({state:i,triggerChange:t});this.view.updateState(i)},this.clearContent=({triggerChange:e=!1}={})=>{this.setContent(this.manager.createEmptyDoc(),{triggerChange:e})},this.createStateFromContent=(e,t)=>this.manager.createState({content:e,selection:t}),this.focus=e=>{this.manager.store.commands.focus(e)},this.blur=e=>{this.manager.store.commands.blur(e)};let{getProps:t,initialEditorState:n,element:r}=e;if(uj(this,qj,t),uj(this,Qj,n),this.manager.attachFramework(this,this.updateListener.bind(this)),this.manager.view)return;let i=this.createView(n,r);this.manager.addView(i)}get addHandler(){return W(this,Zj)??uj(this,Zj,W(this,Xj).on.bind(W(this,Xj)))}get updatableViewProps(){return{attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0}}get firstRender(){return W(this,Yj)}get props(){return W(this,qj).call(this)}get previousState(){return this.previousStateOverride??W(this,Jj)??this.initialEditorState}get manager(){return this.props.manager}get view(){return this.manager.view}get uid(){return W(this,Kj)}get initialEditorState(){return W(this,Qj)}updateListener(e){let{state:t,tr:n}=e;return W(this,Xj).emit(`updated`,this.eventListenerProps({state:t,tr:n}))}update(e){let{getProps:t}=e;return uj(this,qj,t),this}updateViewProps(...e){let t=(0,Fy.default)(this.updatableViewProps,e);this.view.setProps({...this.view.props,...t})}getAttributes(e){let{attributes:t,autoFocus:n,classNames:r=[],label:i,editable:a}=this.props,o=this.manager.store?.attributes,s=Xy(t)?t(this.eventListenerProps()):t,c={};(n||Yy(n))&&(c=e?{autoFocus:!0}:{autofocus:`true`});let l=hb(pj(e&&`Prosemirror`,`remirror-editor`,o?.class,...r).split(` `)).join(` `);return pb({role:`textbox`,...c,"aria-multiline":`true`,...a??!0?{}:{"aria-readonly":`true`},"aria-label":i??``,...o,class:l,...s})}addFocusListeners(){this.view.dom.addEventListener(`blur`,this.onBlur),this.view.dom.addEventListener(`focus`,this.onFocus)}removeFocusListeners(){this.view.dom.removeEventListener(`blur`,this.onBlur),this.view.dom.removeEventListener(`focus`,this.onFocus)}destroy(){W(this,Xj).emit(`destroy`),this.view&&this.removeFocusListeners()}eventListenerProps(e=z()){let{state:t,tr:n,transactions:r}=e;return{tr:n,transactions:r,internalUpdate:!n,view:this.view,firstRender:W(this,Yj),state:t??this.getState(),createStateFromContent:this.createStateFromContent,previousState:this.previousState,helpers:this.manager.store.helpers}}get baseOutput(){return{manager:this.manager,...this.manager.store,addHandler:this.addHandler,focus:this.focus,blur:this.blur,uid:W(this,Kj),view:this.view,getState:this.getState,getPreviousState:this.getPreviousState,getExtension:this.manager.getExtension.bind(this.manager),hasExtension:this.manager.hasExtension.bind(this.manager),clearContent:this.clearContent,setContent:this.setContent}}};Kj=new WeakMap,qj=new WeakMap,Jj=new WeakMap,Yj=new WeakMap,Xj=new WeakMap,Zj=new WeakMap,Qj=new WeakMap;function xie(e,t){let n=[],r=new WeakMap,i=[],a=new WeakMap,o=[],s={duplicateMap:a,parentExtensions:i,gatheredExtensions:o,settings:t};for(let t of e)$j(s,{extension:t});o=yb(o,(e,t)=>t.priority-e.priority);let c=new WeakSet,l=new Set;for(let e of o){let t=e.constructor,i=e.name,o=a.get(t);B(o,{message:`No entries were found for the ExtensionConstructor ${e.name}`,code:R.INTERNAL}),!(c.has(t)||l.has(i))&&(c.add(t),l.add(i),n.push(e),r.set(t,e),o.forEach(n=>n?.replaceChildExtension(t,e)))}let u=[];for(let e of n)Sie({extension:e,found:c,missing:u});return B(cb(u),{code:R.MISSING_REQUIRED_EXTENSION,message:u.map(({Constructor:e,extension:t})=>`The extension '${t.name}' requires '${e.name} in order to run correctly.`).join(`
58
- `)}),{extensions:n,extensionMap:r}}function $j(e,t){let{gatheredExtensions:n,duplicateMap:r,parentExtensions:i,settings:a}=e,{extension:o,parentExtension:s}=t,{names:c=[]}=t;B(bj(o),{code:R.INVALID_MANAGER_EXTENSION,message:`An invalid extension: ${o} was provided to the [[\`RemirrorManager\`]].`});let l=o.extensions;if(o.setPriority(a.priority?.[o.name]),n.push(o),Cie({duplicateMap:r,extension:o,parentExtension:s}),l.length!==0){if(c.includes(o.name)){gte(!1,`Circular dependency encountered when loading extensions: ${c.join(` > `)} > ${o.name}`);return}c=[...c,o.name],i.push(o);for(let t of l)$j(e,{names:c,extension:t,parentExtension:o})}}function Sie(e){let{extension:t,found:n,missing:r}=e;if(t.requiredExtensions)for(let e of t.requiredExtensions??[])n.has(e)||r.push({Constructor:e,extension:t})}function Cie(e){let{duplicateMap:t,extension:n,parentExtension:r}=e,i=n.constructor,a=t.get(i),o=r?[r]:[];t.set(i,a?[...a,...o]:o)}function wie(e){let{extension:t,nodeNames:n,markNames:r,plainNames:i,store:a,handlers:o}=e;t.setStore(a);let s=t.onCreate?.bind(t),c=t.onView?.bind(t),l=t.onStateUpdate?.bind(t),u=t.onDestroy?.bind(t);s&&o.create.push(s),c&&o.view.push(c),l&&o.update.push(l),u&&o.destroy.push(u),Cj(t)&&r.push(t.name),Sj(t)&&t.name!==`doc`&&n.push(t.name),xj(t)&&i.push(t.name)}var eM,tM,nM,rM,iM,aM,oM,sM,cM,lM,uM,dM,fM,pM=class{constructor(e,t={}){lj(this,eM,void 0),lj(this,tM,z()),lj(this,nM,z()),lj(this,rM,void 0),lj(this,iM,void 0),lj(this,aM,vy.None),lj(this,oM,void 0),lj(this,sM,!0),lj(this,cM,{create:[],view:[],update:[],destroy:[]}),lj(this,lM,[]),lj(this,uM,sj()),lj(this,dM,void 0),lj(this,fM,void 0),this.getState=()=>W(this,aM)>=vy.EditorView?this.view.state:(B(W(this,dM),{code:R.MANAGER_PHASE_ERROR,message:"`getState` can only be called after the `Framework` or the `EditorView` has been added to the manager`. Check your plugins to make sure that the decorations callback uses the state argument."}),W(this,dM)?.initialEditorState),this.updateState=e=>{let t=this.getState();this.view.updateState(e),this.onStateUpdate({previousState:t,state:e})};let{extensions:n,extensionMap:r}=xie(e,t);uj(this,oM,t),uj(this,rM,Nb(n)),uj(this,iM,r),uj(this,eM,this.createExtensionStore()),uj(this,aM,vy.Create),this.setupLifecycleHandlers();for(let e of W(this,cM).create){let t=e();t&&W(this,lM).push(t)}}static create(e,t={}){return new pM([...Eb(e),...yie(t.builtin)],t)}get[hy](){return gy.Manager}get destroyed(){return W(this,aM)===vy.Destroy}get mounted(){return W(this,aM)>=vy.EditorView&&W(this,aM)<vy.Destroy}get output(){return W(this,dM)?.frameworkOutput}get frameworkAttached(){return!!W(this,dM)}get extensions(){return W(this,rM)}get stringHandlers(){return W(this,tM)}get store(){return Nb(W(this,nM))}get extensionStore(){return Nb(W(this,eM))}get tr(){return this.getExtension(Oj).transaction}get nodes(){return W(this,nM).nodes}get marks(){return W(this,nM).marks}get schema(){return W(this,nM).schema}get extensionTags(){return W(this,nM).tags}get view(){return W(this,nM).view}get settings(){return W(this,oM)}get document(){return W(this,oM).document??tA()}setupLifecycleHandlers(){let e=W(this,eM),t=W(this,cM),n=[],r=[],i=[];e.nodeNames=n,e.markNames=r,e.plainNames=i;for(let a of W(this,rM))wie({extension:a,nodeNames:n,markNames:r,plainNames:i,handlers:t,store:e})}setStringHandler(e,t){W(this,tM)[e]=t}setStoreKey(e,t){W(this,nM)[e]=t}getStoreKey(e){let t=W(this,nM)[e];return B(!tb(t),{code:R.MANAGER_PHASE_ERROR,message:"`getStoreKey` should not be called before the values are available."}),t}setExtensionStore(e,t){B(W(this,aM)<=vy.EditorView,{code:R.MANAGER_PHASE_ERROR,message:"`setExtensionStore` should only be called during the `onCreate` lifecycle hook. Make sure to only call it within the returned methods."}),W(this,eM)[e]=t}createExtensionStore(){let e=z(),t,n;return Object.defineProperties(e,{extensions:{get:()=>W(this,rM),enumerable:!0},phase:{get:()=>W(this,aM),enumerable:!0},view:{get:()=>this.view,enumerable:!0},managerSettings:{get:()=>Nb(W(this,oM)),enumerable:!0},getState:{value:this.getState,enumerable:!0},updateState:{value:this.updateState,enumerable:!0},isMounted:{value:()=>this.mounted,enumerable:!0},getExtension:{value:this.getExtension.bind(this),enumerable:!0},manager:{get:()=>this,enumerable:!0},document:{get:()=>this.document,enumerable:!0},stringHandlers:{get:()=>W(this,tM),enumerable:!0},currentState:{get:()=>t??=this.getState(),set:e=>{t=e},enumerable:!0},previousState:{get:()=>n,set:e=>{n=e},enumerable:!0}}),e.getStoreKey=this.getStoreKey.bind(this),e.setStoreKey=this.setStoreKey.bind(this),e.setExtensionStore=this.setExtensionStore.bind(this),e.setStringHandler=this.setStringHandler.bind(this),e}addView(e){if(W(this,aM)>=vy.EditorView)return this;uj(this,sM,!0),uj(this,aM,vy.EditorView),W(this,nM).view=e;for(let t of W(this,cM).view){let n=t(e);n&&W(this,lM).push(n)}return this}attachFramework(e,t){var n;W(this,dM)!==e&&(W(this,dM)&&(W(this,dM).destroy(),(n=W(this,fM))==null||n.call(this)),uj(this,dM,e),uj(this,fM,this.addHandler(`stateUpdate`,t)))}createEmptyDoc(){let e=this.schema.nodes.doc?.createAndFill();return B(e,{code:R.INVALID_CONTENT,message:`An empty node could not be created due to an invalid schema.`}),e}createState(e={}){let{onError:t,defaultSelection:n=`end`}=this.settings,{content:r=this.createEmptyDoc(),selection:i=n,stringHandler:a=this.settings.stringHandler}=e,{schema:o,plugins:s}=this.store,c=eA({stringHandler:Jy(a)?this.stringHandlers[a]:a,document:this.document,content:r,onError:t,schema:o,selection:i});return CC.create({schema:o,doc:c,plugins:s,selection:Qk(i,c)})}addHandler(e,t){return W(this,uM).on(e,t)}onStateUpdate(e){let t=W(this,sM);W(this,eM).currentState=e.state,W(this,eM).previousState=e.previousState,t&&(uj(this,aM,vy.Runtime),uj(this,sM,!1));let n={...e,firstUpdate:t};for(let e of W(this,cM).update)e(n);W(this,uM).emit(`stateUpdate`,n)}getExtension(e){let t=W(this,iM).get(e);return B(t,{code:R.INVALID_MANAGER_EXTENSION,message:`'${e.name}' doesn't exist within this manager. Make sure it is properly added before attempting to use it.`}),t}hasExtension(e){return!!W(this,iM).get(e)}clone(){let e=W(this,rM).map(e=>e.clone(e.options)),t=pM.create(()=>e,W(this,oM));return W(this,uM).emit(`clone`,t),t}recreate(e=[],t={}){let n=W(this,rM).map(e=>e.clone(e.initialOptions)),r=pM.create(()=>[...n,...e],t);return W(this,uM).emit(`recreate`,r),r}destroy(){var e,t,n,r,i;uj(this,aM,vy.Destroy);for(let n of this.view?.state.plugins??[])(t=(e=n.getState(this.view.state))?.destroy)==null||t.call(e);(n=W(this,dM))==null||n.destroy(),(r=W(this,fM))==null||r.call(this);for(let e of W(this,lM))e();for(let e of W(this,cM).destroy)e();(i=this.view)==null||i.destroy(),W(this,uM).emit(`destroy`)}includes(e){let t=[],n=[];for(let e of W(this,rM))t.push(e.name,e.constructorName),n.push(e.constructor);return e.every(e=>Jy(e)?Hy(t,e):Hy(n,e))}},Tie=pM;eM=new WeakMap,tM=new WeakMap,nM=new WeakMap,rM=new WeakMap,iM=new WeakMap,aM=new WeakMap,oM=new WeakMap,sM=new WeakMap,cM=new WeakMap,lM=new WeakMap,uM=new WeakMap,dM=new WeakMap,fM=new WeakMap;function Eie(e,t){return!Sk(e)||!Ck(e,gy.Manager)?!1:t?e.includes(t):!0}function mM(e,t,n){return Math.min(Math.max(e,n),t)}var hM=class extends Error{constructor(e){super(`Failed to parse color: "${e}"`)}};function gM(e){if(typeof e!=`string`)throw new hM(e);if(e.trim().toLowerCase()===`transparent`)return[0,0,0,0];let t=e.trim();t=EM.test(e)?bM(e):e;let n=SM.exec(t);if(n){let e=Array.from(n).slice(1);return[...e.slice(0,3).map(e=>parseInt(xM(e,2),16)),parseInt(xM(e[3]||`f`,2),16)/255]}let r=CM.exec(t);if(r){let e=Array.from(r).slice(1);return[...e.slice(0,3).map(e=>parseInt(e,16)),parseInt(e[3]||`ff`,16)/255]}let i=wM.exec(t);if(i){let e=Array.from(i).slice(1);return[...e.slice(0,3).map(e=>parseInt(e,10)),parseFloat(e[3]||`1`)]}let a=TM.exec(t);if(a){let[t,n,r,i]=Array.from(a).slice(1).map(parseFloat);if(mM(0,100,n)!==n||mM(0,100,r)!==r)throw new hM(e);return[...OM(t,n,r),Number.isNaN(i)?1:i]}throw new hM(e)}function _M(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}var vM=e=>parseInt(e.replace(/_/g,``),36),yM=`1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm`.split(` `).reduce((e,t)=>{let n=vM(t.substring(0,3)),r=vM(t.substring(3)).toString(16),i=``;for(let e=0;e<6-r.length;e++)i+=`0`;return e[n]=`${i}${r}`,e},{});function bM(e){let t=yM[_M(e.toLowerCase().trim())];if(!t)throw new hM(e);return`#${t}`}var xM=(e,t)=>Array.from(Array(t)).map(()=>e).join(``),SM=RegExp(`^#${xM(`([a-f0-9])`,3)}([a-f0-9])?$`,`i`),CM=RegExp(`^#${xM(`([a-f0-9]{2})`,3)}([a-f0-9]{2})?$`,`i`),wM=RegExp(`^rgba?\\(\\s*(\\d+)\\s*${xM(`,\\s*(\\d+)\\s*`,2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,`i`),TM=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,EM=/^[a-z]+$/i,DM=e=>Math.round(e*255),OM=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(DM);let i=(e%360+360)%360/60,a=(1-Math.abs(2*r-1))*(t/100),o=a*(1-Math.abs(i%2-1)),s=0,c=0,l=0;i>=0&&i<1?(s=a,c=o):i>=1&&i<2?(s=o,c=a):i>=2&&i<3?(c=a,l=o):i>=3&&i<4?(c=o,l=a):i>=4&&i<5?(s=o,l=a):i>=5&&i<6&&(s=a,l=o);let u=r-a/2;return[s+u,c+u,l+u].map(DM)};function kM(e){let[t,n,r,i]=gM(e).map((e,t)=>t===3?e:e/255),a=Math.max(t,n,r),o=Math.min(t,n,r),s=(a+o)/2;if(a===o)return[0,0,s,i];let c=a-o,l=s>.5?c/(2-a-o):c/(a+o);return[60*(t===a?(n-r)/c+(n<r?6:0):n===a?(r-t)/c+2:(t-n)/c+4),l,s,i]}function AM(e,t,n,r){return`hsla(${(e%360).toFixed()}, ${mM(0,100,t*100).toFixed()}%, ${mM(0,100,n*100).toFixed()}%, ${parseFloat(mM(0,1,r).toFixed(3))})`}function jM(e,t){let[n,r,i,a]=kM(e);return AM(n,r,i-t,a)}function MM(e,t,n,r){return`rgba(${mM(0,255,e).toFixed()}, ${mM(0,255,t).toFixed()}, ${mM(0,255,n).toFixed()}, ${parseFloat(mM(0,1,r).toFixed(3))})`}function NM(e,t){return jM(e,-t)}function PM(e,t){let[n,r,i,a]=gM(e);return MM(n,r,i,a-t)}var FM=Object.freeze({__proto__:null,ANIMATED_POPOVER:`remirror-animated-popover`,BUTTON:`remirror-button`,BUTTON_ACTIVE:`remirror-button-active`,COLOR_PICKER:`remirror-color-picker`,COLOR_PICKER_CELL:`remirror-color-picker-cell`,COLOR_PICKER_CELL_SELECTED:`remirror-color-picker-cell-selected`,COMPOSITE:`remirror-composite`,DIALOG:`remirror-dialog`,DIALOG_BACKDROP:`remirror-dialog-backdrop`,EDITOR_WRAPPER:`remirror-editor-wrapper`,FLEX_COLUMN:`remirror-flex-column`,FLEX_ROW:`remirror-flex-row`,FLOATING_POPOVER:`remirror-floating-popover`,FORM:`remirror-form`,FORM_GROUP:`remirror-form-group`,FORM_LABEL:`remirror-form-label`,FORM_MESSAGE:`remirror-form-message`,GROUP:`remirror-group`,INPUT:`remirror-input`,MENU:`remirror-menu`,MENU_BAR:`remirror-menu-bar`,MENU_BUTTON:`remirror-menu-button`,MENU_BUTTON_LEFT:`remirror-menu-button-left`,MENU_BUTTON_NESTED_LEFT:`remirror-menu-button-nested-left`,MENU_BUTTON_NESTED_RIGHT:`remirror-menu-button-nested-right`,MENU_BUTTON_RIGHT:`remirror-menu-button-right`,MENU_DROPDOWN_LABEL:`remirror-menu-dropdown-label`,MENU_GROUP:`remirror-menu-group`,MENU_ITEM:`remirror-menu-item`,MENU_ITEM_CHECKBOX:`remirror-menu-item-checkbox`,MENU_ITEM_COLUMN:`remirror-menu-item-column`,MENU_ITEM_RADIO:`remirror-menu-item-radio`,MENU_ITEM_ROW:`remirror-menu-item-row`,MENU_PANE:`remirror-menu-pane`,MENU_PANE_ACTIVE:`remirror-menu-pane-active`,MENU_PANE_ICON:`remirror-menu-pane-icon`,MENU_PANE_LABEL:`remirror-menu-pane-label`,MENU_PANE_SHORTCUT:`remirror-menu-pane-shortcut`,POPOVER:`remirror-popover`,ROLE:`remirror-role`,SEPARATOR:`remirror-separator`,TAB:`remirror-tab`,TABBABLE:`remirror-tabbable`,TABLE_SIZE_EDITOR:`remirror-table-size-editor`,TABLE_SIZE_EDITOR_BODY:`remirror-table-size-editor-body`,TABLE_SIZE_EDITOR_CELL:`remirror-table-size-editor-cell`,TABLE_SIZE_EDITOR_CELL_SELECTED:`remirror-table-size-editor-cell-selected`,TABLE_SIZE_EDITOR_FOOTER:`remirror-table-size-editor-footer`,TAB_LIST:`remirror-tab-list`,TOOLBAR:`remirror-toolbar`,TOOLTIP:`remirror-tooltip`}),IM=Object.freeze({__proto__:null,COLLAPSIBLE_LIST_ITEM_BUTTON:`remirror-collapsible-list-item-button`,COLLAPSIBLE_LIST_ITEM_CLOSED:`remirror-collapsible-list-item-closed`,EDITOR:`remirror-editor`,LIST_ITEM_CHECKBOX:`remirror-list-item-checkbox`,LIST_ITEM_MARKER_CONTAINER:`remirror-list-item-marker-container`,LIST_ITEM_WITH_CUSTOM_MARKER:`remirror-list-item-with-custom-mark`,LIST_SPINE:`remirror-list-spine`,UL_LIST_CONTENT:`remirror-ul-list-content`}),LM=Object.freeze({__proto__:null,IS_EMPTY:`remirror-is-empty`}),RM=Object.freeze({__proto__:null,EDITOR:`remirror-editor`,POSITIONER:`remirror-positioner`,POSITIONER_WIDGET:`remirror-positioner-widget`}),zM={gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},BM=`#000000`,VM=`#ffffff`,HM=`#252103`,UM=PM(BM,.75),WM=`#7963d2`,GM=`#bcd263`,KM=`#fff`,qM=`#fff`,JM=zM.gray[1],YM=`rgba(10,31,68,0.08)`,XM=`rgba(10,31,68,0.10)`,ZM=`rgba(10,31,68,0.12)`,QM={background:VM,border:UM,foreground:BM,muted:JM,primary:WM,secondary:GM,primaryText:KM,secondaryText:qM,text:HM,faded:NM(PM(BM,.1),.13)};({...QM}),jM(VM,.15),jM(UM,.15),jM(BM,.15),jM(JM,.15),jM(WM,.15),jM(GM,.15),{...QM},jM(VM,.075),jM(UM,.075),jM(BM,.075),jM(JM,.075),jM(WM,.075),jM(GM,.075),{...QM},PM(BM,.1),PM(WM,.6),NM(BM,.8),NM(BM,.4),zM.gray[3],zM.blue[7],zM.blue[1],zM.blue[5],zM.blue[7],NM(BM,.4),zM.blue[5],zM.red[7],zM.red[1],zM.red[5],`${YM}`,`${XM}`,`${ZM}`;var $M=Object.defineProperty,eN=Object.getOwnPropertyDescriptor,tN=(e,t,n,r)=>{for(var i=r>1?void 0:r?eN(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&$M(t,n,i),i},nN=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},rN=(e,t,n)=>(nN(e,t,`read from private field`),n?n.call(e):t.get(e)),iN=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},aN=(e,t,n,r)=>(nN(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),oN,sN,cN,lN,uN,dN,fN,pN,mN,hN=class{constructor(e){iN(this,oN,sj()),iN(this,sN,[]),iN(this,cN,new Map),iN(this,lN,[]),iN(this,uN,!1),iN(this,dN,void 0),iN(this,fN,void 0),iN(this,pN,void 0),iN(this,mN,void 0),this.addListener=(e,t)=>rN(this,oN).on(e,t),aN(this,dN,e),aN(this,fN,e.getActive),aN(this,mN,e.getPosition),aN(this,pN,e.getID),this.hasChanged=e.hasChanged,this.events=e.events??[`state`,`scroll`]}static create(e){return new hN(e)}static fromPositioner(e,t){return hN.create({...e.basePositioner,...t})}get basePositioner(){return{getActive:rN(this,fN),getPosition:rN(this,mN),hasChanged:this.hasChanged,events:this.events,getID:rN(this,pN)}}onActiveChanged(e){this.recentUpdate=e;let t=rN(this,fN).call(this,e);aN(this,sN,t),aN(this,cN,new Map),aN(this,uN,!1),aN(this,lN,[]);let n=[];for(let[r,i]of t.entries()){let t=this.getID(i,r);rN(this,lN).push(t),n.push({setElement:t=>this.addProps({...e,data:i,element:t},r),id:t,data:i})}rN(this,oN).emit(`update`,n)}getID(e,t){return rN(this,pN)?.call(this,e,t)??t.toString()}addProps(e,t){if(rN(this,uN)||(rN(this,cN).set(t,e),rN(this,cN).size<rN(this,sN).length))return;let n=[];for(let e of rN(this,sN).keys()){let t=rN(this,cN).get(e);B(t,{code:R.INTERNAL,message:`Something went wrong when retrieving the parameters`});let r=rN(this,lN)[e];if(!r)return;n.push({position:rN(this,mN).call(this,t),element:t.element,id:r})}rN(this,oN).emit(`done`,n)}clone(e){return hN.create({...rN(this,dN),...Xy(e)?e(rN(this,dN)):e})}active(e){let t=Xy(e)?e:()=>e;return this.clone(e=>({getActive:n=>e.getActive(n).filter(t)}))}},gN=hN;oN=new WeakMap,sN=new WeakMap,cN=new WeakMap,lN=new WeakMap,uN=new WeakMap,dN=new WeakMap,fN=new WeakMap,pN=new WeakMap,mN=new WeakMap,gN.EMPTY=[];function _N(e,t=SN){let{key:n}=e?.getMeta(`positionerUpdate`)??{};return n===t}function vN(e){let{tr:t,state:n,previousState:r}=e;return!r||t&&_N(t)?!0:t?hk(t):!n.doc.eq(r.doc)||!n.selection.eq(r.selection)}function yN(e,t,n={}){let r=t.getBoundingClientRect(),{accountForPadding:i=!1}=n,a=0,o=0,s=0,c=0;if(ck(t)&&i){let e=Number.parseFloat(ok(t,`padding-left`).replace(`px`,``)),n=Number.parseFloat(ok(t,`padding-right`).replace(`px`,``)),r=Number.parseFloat(ok(t,`padding-top`).replace(`px`,``)),i=Number.parseFloat(ok(t,`padding-bottom`).replace(`px`,``)),l=Number.parseFloat(ok(t,`border-left`).replace(`px`,``)),u=Number.parseFloat(ok(t,`border-right`).replace(`px`,``)),d=Number.parseFloat(ok(t,`border-top`).replace(`px`,``)),f=Number.parseFloat(ok(t,`border-bottom`).replace(`px`,``)),p=t.offsetWidth-t.clientWidth,m=t.offsetHeight-t.clientHeight;a+=e+l+(t.dir===`rtl`?p:0),o+=n+u+(t.dir===`rtl`?0:p),s+=r+d,c+=i+f+m}let l=new DOMRect(r.left+a,r.top+s,r.width-o,r.height-c);for(let[t,n]of[[e.top,e.left],[e.top,e.right],[e.bottom,e.left],[e.bottom,e.right]])if(Tb(t,l.top,l.bottom)&&Tb(n,l.left,l.right))return!0;return!1}var bN=`remirror-positioner-widget`,xN=`positionerUpdate`,SN=`__all_positioners__`,CN={y:-999999,x:-999999,width:0,height:0},wN={...CN,left:-999999,top:-999999,bottom:-999999,right:-999999},TN={...CN,rect:{...wN,toJSON:()=>wN},visible:!1},EN=gN.create({hasChanged:vN,getActive(e){let{state:t}=e;if(!mk(t)||t.selection.$anchor.depth>2)return gN.EMPTY;let n=uk({predicate:e=>e.type.isBlock,selection:t});return n?[n]:gN.EMPTY},getPosition(e){let{view:t,data:n}=e,r=t.nodeDOM(n.pos);if(!ck(r))return TN;let i=r.getBoundingClientRect(),a=t.dom.getBoundingClientRect(),o=i.height,s=i.width,c=t.dom.scrollLeft+i.left-a.left;return{y:t.dom.scrollTop+i.top-a.top,x:c,height:o,width:s,rect:i,visible:yN(i,t.dom)}}}).clone(({getActive:e})=>({getActive:t=>{let[n]=e(t);return n&&Uk(n.node)&&n.node.type===Vk(t.state.schema)?[n]:gN.EMPTY}}));EN.clone(({getPosition:e})=>({getPosition:t=>({...e(t),width:1})})),EN.clone(({getPosition:e})=>({getPosition:t=>{let{width:n,x:r,y:i,height:a}=e(t);return{...e(t),width:1,x:n+r,rect:new DOMRect(n+r,i,1,a)}}}));function DN(e){return gN.create({hasChanged:vN,getActive:t=>{let{state:n,view:r}=t;if(!e(n)||!Mk(n.selection))return gN.EMPTY;try{let{head:e,anchor:t}=n.selection;return[{from:r.coordsAtPos(t),to:r.coordsAtPos(e)}]}catch{return gN.EMPTY}},getPosition(e){let{element:t,data:n,view:r}=e,{from:i,to:a}=n,o=t.offsetParent??r.dom,s=o.getBoundingClientRect(),c=Math.abs(a.bottom-i.top),l=c>i.bottom-i.top,u=Math.min(i.left,a.left),d=Math.min(i.top,a.top),f=o.scrollLeft+(l?a.left-s.left:u-s.left),p=o.scrollTop+d-s.top,m=l?1:Math.abs(i.left-a.right),h=new DOMRect(l?a.left:u,d,m,c);return{rect:h,y:p,x:f,height:c,width:m,visible:yN(h,r.dom)}}})}var ON=DN(e=>!e.selection.empty);DN(e=>e.selection.empty),DN(()=>!0),ON.clone(()=>({getActive:e=>{let{state:t,view:n}=e;if(!t.selection.empty)return gN.EMPTY;let r=qk(t);if(!r)return gN.EMPTY;try{return[{from:n.coordsAtPos(r.from),to:n.coordsAtPos(r.to)}]}catch{return gN.EMPTY}}}));var kN=class extends _j{constructor(){super(...arguments),this.positioners=[],this.onAddCustomHandler=({positioner:e})=>{if(e)return this.positioners=[...this.positioners,e],this.store.commands.forceUpdate(),()=>{this.positioners=this.positioners.filter(t=>t!==e)}}}get name(){return`positioner`}createAttributes(){return{class:RM.EDITOR}}init(){this.onScroll=Jne(this.options.scrollDebounce,this.onScroll.bind(this))}createEventHandlers(){return{scroll:()=>(this.onScroll(),!1),hover:(e,t)=>(this.positioner(this.getBaseProps(`hover`,{hover:t})),!1),contextmenu:(e,t)=>(this.positioner(this.getBaseProps(`contextmenu`,{contextmenu:t})),!1)}}onStateUpdate(e){this.positioner({...e,previousState:e.firstUpdate?void 0:e.previousState,event:`state`,helpers:this.store.helpers})}createDecorations(e){if(this.element??=this.createElement(),!this.element.hasChildNodes())return ED.empty;let t=CD.widget(0,this.element,{key:`positioner-widget`,side:-1,stopEvent:()=>!0});return ED.create(e.doc,[t])}forceUpdatePositioners(e=SN){return({tr:t,dispatch:n})=>(n?.(t.setMeta(xN,{key:e})),!0)}getPositionerWidget(){return this.element??=this.createElement()}createElement(){let e=document.createElement(`span`);return e.dataset.id=bN,e.setAttribute(`role`,`presentation`),e}triggerPositioner(e,t){e.hasChanged(t)&&e.onActiveChanged({...t,view:this.store.view})}positioner(e){for(let t of this.positioners)t.events.includes(e.event)&&this.triggerPositioner(t,e)}getBaseProps(e,t){let n=this.store.getState(),r=this.store.previousState;return{helpers:this.store.helpers,event:e,firstUpdate:!1,previousState:r,state:n,...t}}onScroll(){this.positioner(this.getBaseProps(`scroll`,{scroll:{scrollTop:this.store.view.dom.scrollTop}}))}};tN([G()],kN.prototype,`forceUpdatePositioners`,1),tN([Tj()],kN.prototype,`getPositionerWidget`,1),kN=tN([wj({defaultOptions:{scrollDebounce:100},customHandlerKeys:[`positioner`],staticKeys:[`scrollDebounce`]})],kN);var AN=Object.defineProperty,jN=Object.getOwnPropertyDescriptor,MN=(e,t,n,r)=>{for(var i=r>1?void 0:r?jN(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&AN(t,n,i),i},NN={icon:`bold`,label:({t:e})=>e(MC.LABEL),description:({t:e})=>e(MC.DESCRIPTION)},PN=class extends vj{get name(){return`bold`}createTags(){return[my.FormattingMark,my.FontStyle]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:`strong`,getAttrs:e.parse},{tag:`b`,getAttrs:t=>ck(t)&&t.style.fontWeight!==`normal`?e.parse(t):!1},{style:`font-weight`,getAttrs:e=>Jy(e)&&/^(bold(er)?|[5-9]\d{2,})$/.test(e)?null:!1},...t.parseDOM??[]],toDOM:t=>{let{weight:n}=this.options;return n?[`strong`,{"font-weight":n.toString()},0]:[`strong`,e.dom(t),0]}}}createInputRules(){return[OA({regexp:/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,type:this.type,ignoreWhitespace:!0})]}toggleBold(e){return Dj({type:this.type,selection:e})}setBold(e){return({tr:t,dispatch:n})=>{let{from:r,to:i}=Qk(e??t.selection,t.doc);return n?.(t.addMark(r,i,this.type.create())),!0}}removeBold(e){return({tr:t,dispatch:n})=>{let{from:r,to:i}=Qk(e??t.selection,t.doc);return t.doc.rangeHasMark(r,i,this.type)?(n?.(t.removeMark(r,i,this.type)),!0):!1}}shortcut(e){return this.toggleBold()(e)}};MN([G(NN)],PN.prototype,`toggleBold`,1),MN([G()],PN.prototype,`setBold`,1),MN([G()],PN.prototype,`removeBold`,1),MN([Ej({shortcut:L.Bold,command:`toggleBold`})],PN.prototype,`shortcut`,1),PN=MN([wj({defaultOptions:{weight:void 0},staticKeys:[`weight`]})],PN);var FN=Object.defineProperty,IN=Object.getOwnPropertyDescriptor,LN=(e,t,n,r)=>{for(var i=r>1?void 0:r?IN(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&FN(t,n,i),i},{DESCRIPTION:RN,LABEL:zN}=NC,BN={icon:`codeLine`,description:({t:e})=>e(RN),label:({t:e})=>e(zN)},VN=class extends vj{get name(){return`code`}createTags(){return[my.Code,my.ExcludeInputRules]}createMarkSpec(e,t){return{excludes:`_`,...t,attrs:e.defaults(),parseDOM:[{tag:`code`,getAttrs:e.parse},...t.parseDOM??[]],toDOM:t=>[`code`,{spellcheck:`false`,...e.dom(t)},0]}}createKeymap(){return{"Mod-`":Dj({type:this.type})}}keyboardShortcut(e){return this.toggleCode()(e)}toggleCode(){return Dj({type:this.type})}createInputRules(){return[OA({regexp:RegExp("(?:`)([^`]+)(?:`)$"),type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{type:`mark`,regexp:/`([^`]+)`/g,markType:this.type}]}};LN([Ej({shortcut:L.Code,command:`toggleCode`})],VN.prototype,`keyboardShortcut`,1),LN([G(BN)],VN.prototype,`toggleCode`,1),VN=LN([wj({})],VN);var HN=200,UN=function(){};UN.prototype.append=function(e){return e.length?(e=UN.from(e),!this.length&&e||e.length<HN&&this.leafAppend(e)||this.length<HN&&e.leafPrepend(this)||this.appendInner(e)):this},UN.prototype.prepend=function(e){return e.length?UN.from(e).append(this):this},UN.prototype.appendInner=function(e){return new GN(this,e)},UN.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?UN.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},UN.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},UN.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},UN.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},UN.from=function(e){return e instanceof UN?e:e&&e.length?new WN(e):UN.empty};var WN=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=HN)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=HN)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(UN);UN.empty=new WN([]);var GN=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(UN),KN=UN,qN=500,JN=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step){i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);return}if(i){u.push(new XN(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new XN(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new XN(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&=(o++,void 0),i||(c=l)}let l=o-r.depth;return l>QN&&(s=YN(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new mS;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new XN(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new XN(i,o,l))}else r.push(new XN(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new XN(a.maps[e]));let u=new e(this.items.slice(0,i).append(l).append(r),s);return u.emptyItemCount()>qN&&(u=u.compress(this.items.length-r.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new XN(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(KN.from(i.reverse()),a)}};JN.empty=new JN(KN.empty,0);function YN(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var XN=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},ZN=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}},QN=20;function $N(e,t,n,r){let i=n.getMeta(sP),a;if(i)return i.historyState;n.getMeta(cP)&&(e=new ZN(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(sP))return o.getMeta(sP).redo?new ZN(e.done.addTransform(n,void 0,r,oP(t)),e.undone,tP(n.mapping.maps),e.prevTime,e.prevComposition):new ZN(e.done,e.undone.addTransform(n,void 0,r,oP(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!eP(n,e.prevRanges)),s=o?nP(e.prevRanges,n.mapping):tP(n.mapping.maps);return new ZN(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,oP(t)),JN.empty,s,n.time,i??e.prevComposition)}else if(a=n.getMeta(`rebased`))return new ZN(e.done.rebased(n,a),e.undone.rebased(n,a),nP(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new ZN(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),nP(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function eP(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function tP(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function nP(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function rP(e,t,n){let r=oP(t),i=sP.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new ZN(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(sP,{redo:n,historyState:c})}var iP=!1,aP=null;function oP(e){let t=e.plugins;if(aP!=t){iP=!1,aP=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){iP=!0;break}}return iP}var sP=new OC(`history`),cP=new OC(`closeHistory`);function lP(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new TC({key:sP,state:{init(){return new ZN(JN.empty,JN.empty,null,0,-1)},apply(t,n,r){return $N(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?dP:n==`historyRedo`?fP:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function uP(e,t){return(n,r)=>{let i=sP.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=rP(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var dP=uP(!1,!0),fP=uP(!0,!0);function pP(e){let t=sP.getState(e);return t?t.done.eventCount:0}function mP(e){let t=sP.getState(e);return t?t.undone.eventCount:0}var hP=Object.defineProperty,gP=Object.getOwnPropertyDescriptor,_P=(e,t,n,r)=>{for(var i=r>1?void 0:r?gP(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&hP(t,n,i),i},vP=class extends yj{get name(){return`doc`}createNodeSpec(e,t){let{docAttributes:n,content:r}=this.options,i=z();if($y(n))for(let[e,t]of zy(n))i[e]={default:t};else for(let e of n)i[e]={default:null};return{attrs:i,content:r,...t}}setDocAttributes(e){return({tr:t,dispatch:n})=>{if(n){for(let[n,r]of Object.entries(e))t.step(new xP(n,r));n(t)}return!0}}isDefaultDocNode({state:e=this.store.getState(),options:t}={}){return Rk(e.doc,t)}};_P([G()],vP.prototype,`setDocAttributes`,1),_P([Tj()],vP.prototype,`isDefaultDocNode`,1),vP=_P([wj({defaultOptions:{content:`block+`,docAttributes:[]},defaultPriority:_y.Medium,staticKeys:[`content`,`docAttributes`],disableExtraAttributes:!0})],vP);var yP=`SetDocAttribute`,bP=`RevertSetDocAttribute`,xP=class e extends gS{static fromJSON(t,n){return new e(n.key,n.value,n.stepType)}key;stepType;value;previous;constructor(e,t,n=yP){super(),this.stepType=n,this.key=e,this.value=t}apply(e){this.previous=e.attrs[this.key];let t={...e.attrs,[this.key]:this.value};return _S.ok(e.type.create(t,e.content,e.marks))}invert(){return new e(this.key,this.previous,bP)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}};try{gS.jsonID(yP,xP),gS.jsonID(bP,xP)}catch(e){if(!e.message.startsWith(`Duplicate use of step JSON ID`))throw e}var SP=Object.defineProperty,CP=Object.getOwnPropertyDescriptor,wP=(e,t,n,r)=>{for(var i=r>1?void 0:r?CP(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&SP(t,n,i),i};function TP(e,t,n,r){let i=e.docView.posFromDOM(t,n,r);return i===null||i<0?null:i}function EP(e,t){let n=t.target;if(n){let t=TP(e,n,0);if(t!==null){let n=e.state.doc.resolve(t),r=n.node().isLeaf?0:1;return{pos:t,inside:n.start()-r}}}return e.posAtCoords({left:t.clientX,top:t.clientY})??void 0}var DP=class extends _j{constructor(){super(...arguments),this.mousedown=!1,this.mouseover=!1,this.createMouseEventHandler=e=>(t,n)=>{let r=n,i=EP(t,r);if(!i)return!1;let a=[],o=[],{inside:s,pos:c}=i;if(s===-1)return!1;let l=t.state.doc.resolve(c),u=l.depth+1;for(let e of wb(u,1))a.push({node:e>l.depth&&l.nodeAfter?l.nodeAfter:l.node(e),pos:l.before(e)});for(let{type:e}of l.marksAcross(l)??[]){let t=Wk(l,e);t&&o.push(t)}return e(r,{view:t,nodes:a,marks:o,getMark:e=>{let n=Jy(e)?t.state.schema.marks[e]:e;return B(n,{code:R.EXTENSION,message:`The mark ${e} being checked does not exist within the editor schema.`}),o.find(e=>e.mark.type===n)},getNode:e=>{let n=Jy(e)?t.state.schema.nodes[e]:e;B(n,{code:R.EXTENSION,message:`The node being checked does not exist`});let r=a.find(({node:e})=>e.type===n);if(r)return{...r,isRoot:!!a[0]?.node.eq(r.node)}}})}}get name(){return`events`}onView(){if(!this.store.managerSettings.exclude?.clickHandler)for(let e of this.store.extensions){if(!e.createEventHandlers||e.options.exclude?.clickHandler)continue;let t=e.createEventHandlers();for(let[e,n]of zy(t))this.addHandler(e,n)}}createPlugin(){let e=new WeakMap,t=(t,n,r,i,a,o,s,c)=>{let l=this.store.currentState,{schema:u,doc:d}=l,f=d.resolve(i),p=e.has(s),m=OP({$pos:f,handled:p,view:r,state:l}),h=!1;p||(h=t(s,m)||h);let g={...m,pos:i,direct:c,nodeWithPosition:{node:a,pos:o},getNode:e=>{let t=Jy(e)?u.nodes[e]:e;return B(t,{code:R.EXTENSION,message:`The node being checked does not exist`}),t===a.type?{node:a,pos:o}:void 0}};return e.set(s,!0),n(s,g)||h};return{props:{handleKeyPress:(e,t)=>this.options.keypress(t)||!1,handleKeyDown:(e,t)=>this.options.keydown(t)||!1,handleTextInput:(e,t,n,r)=>this.options.textInput({from:t,to:n,text:r})||!1,handleClickOn:(e,n,r,i,a,o)=>t(this.options.clickMark,this.options.click,e,n,r,i,a,o),handleDoubleClickOn:(e,n,r,i,a,o)=>t(this.options.doubleClickMark,this.options.doubleClick,e,n,r,i,a,o),handleTripleClickOn:(e,n,r,i,a,o)=>t(this.options.tripleClickMark,this.options.tripleClick,e,n,r,i,a,o),handleDOMEvents:{focus:(e,t)=>this.options.focus(t)||!1,blur:(e,t)=>this.options.blur(t)||!1,mousedown:(e,t)=>(this.startMouseover(),this.options.mousedown(t)||!1),mouseup:(e,t)=>(this.endMouseover(),this.options.mouseup(t)||!1),mouseleave:(e,t)=>(this.mouseover=!1,this.options.mouseleave(t)||!1),mouseenter:(e,t)=>(this.mouseover=!0,this.options.mouseenter(t)||!1),keyup:(e,t)=>this.options.keyup(t)||!1,mouseout:this.createMouseEventHandler((e,t)=>{let n={...t,hovering:!1};return this.options.hover(e,n)||!1}),mouseover:this.createMouseEventHandler((e,t)=>{let n={...t,hovering:!0};return this.options.hover(e,n)||!1}),contextmenu:this.createMouseEventHandler((e,t)=>this.options.contextmenu(e,t)||!1),scroll:(e,t)=>this.options.scroll(t)||!1,copy:(e,t)=>this.options.copy(t)||!1,cut:(e,t)=>this.options.cut(t)||!1,paste:(e,t)=>this.options.paste(t)||!1}},view:e=>{let t=e.editable,n=this.options;return{update(e){let r=e.editable;r!==t&&(n.editable(r),t=r)}}}}}isInteracting(){return this.mousedown&&this.mouseover}startMouseover(){this.mouseover=!0,!this.mousedown&&(this.mousedown=!0,this.store.document.documentElement.addEventListener(`mouseup`,()=>{this.endMouseover()},{once:!0}))}endMouseover(){this.mousedown&&(this.mousedown=!1,this.store.commands.emptyUpdate())}};wP([Tj()],DP.prototype,`isInteracting`,1),DP=wP([wj({handlerKeys:[`blur`,`focus`,`mousedown`,`mouseup`,`mouseenter`,`mouseleave`,`textInput`,`keypress`,`keyup`,`keydown`,`click`,`clickMark`,`doubleClick`,`doubleClickMark`,`tripleClick`,`tripleClickMark`,`contextmenu`,`hover`,`scroll`,`copy`,`cut`,`paste`,`editable`],handlerKeyOptions:{blur:{earlyReturnValue:!0},focus:{earlyReturnValue:!0},mousedown:{earlyReturnValue:!0},mouseleave:{earlyReturnValue:!0},mouseup:{earlyReturnValue:!0},click:{earlyReturnValue:!0},doubleClick:{earlyReturnValue:!0},tripleClick:{earlyReturnValue:!0},hover:{earlyReturnValue:!0},contextmenu:{earlyReturnValue:!0},scroll:{earlyReturnValue:!0},copy:{earlyReturnValue:!0},cut:{earlyReturnValue:!0},paste:{earlyReturnValue:!0}},defaultPriority:_y.High})],DP);function OP(e){let{handled:t,view:n,$pos:r,state:i}=e,a={getMark:gb,markRanges:[],view:n,state:i};if(t)return a;for(let{type:e}of r.marksAcross(r)??[]){let t=Wk(r,e);t&&a.markRanges.push(t)}return a.getMark=e=>{let t=Jy(e)?i.schema.marks[e]:e;return B(t,{code:R.EXTENSION,message:`The mark ${e} being checked does not exist within the editor schema.`}),a.markRanges.find(e=>e.mark.type===t)},a}var kP=class e extends rC{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):rC.near(r)}content(){return H.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new AP(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!MP(e)||!NP(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}else if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!lC.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}return null}}};kP.prototype.visible=!1,kP.findFrom=kP.findGapCursorFrom,rC.jsonID(`gapcursor`,kP);var AP=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return kP.valid(t)?new kP(t):rC.near(t)}};function jP(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function MP(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||jP(e.type))return!0;if(e.inlineContent)return!1}}return!0}function NP(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||jP(e.type))return!0;if(e.inlineContent)return!1}}return!0}function PP(){return new TC({props:{decorations:zP,createSelectionBetween(e,t,n){return t.pos==n.pos&&kP.valid(n)?new kP(n):null},handleClick:LP,handleKeyDown:FP,handleDOMEvents:{beforeinput:RP}}})}var FP=aj({ArrowLeft:IP(`horiz`,-1),ArrowRight:IP(`horiz`,1),ArrowUp:IP(`vert`,-1),ArrowDown:IP(`vert`,1)});function IP(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof sC){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=kP.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new kP(c))),!0):!1}}function LP(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!kP.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&lC.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new kP(r))),!0)}function RP(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof kP))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=V.empty;for(let e=r.length-1;e>=0;e--)i=V.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new H(i,0,0));return a.setSelection(sC.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function zP(e){if(!(e.selection instanceof kP))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,ED.create(e.doc,[CD.widget(e.selection.head,t,{key:`gapcursor`})])}var BP=Object.defineProperty,VP=Object.getOwnPropertyDescriptor,HP=(e,t,n,r)=>{for(var i=r>1?void 0:r?VP(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&BP(t,n,i),i},UP=class extends _j{get name(){return`gapCursor`}createExternalPlugins(){return[PP()]}};UP=HP([wj({})],UP);var WP=Object.defineProperty,GP=Object.getOwnPropertyDescriptor,KP=(e,t,n,r)=>{for(var i=r>1?void 0:r?GP(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&WP(t,n,i),i},qP=class extends _j{constructor(){super(...arguments),this.wrapMethod=(e,t)=>({state:n,dispatch:r,view:i})=>{let{getState:a,getDispatch:o}=this.options,s=e(Xy(a)?a():n,Xy(o)&&r?o():r,i);return t?.(s),s}}get name(){return`history`}createKeymap(){return{"Mod-y":ak.isMac?()=>!1:this.wrapMethod(fP,this.options.onRedo),"Mod-z":this.wrapMethod(dP,this.options.onUndo),"Shift-Mod-z":this.wrapMethod(fP,this.options.onRedo)}}undoShortcut(e){return this.wrapMethod(dP,this.options.onUndo)(e)}redoShortcut(e){return this.wrapMethod(fP,this.options.onRedo)(e)}createExternalPlugins(){let{depth:e,newGroupDelay:t}=this.options;return[lP({depth:e,newGroupDelay:t})]}undo(){return ik(this.wrapMethod(dP,this.options.onUndo))}redo(){return ik(this.wrapMethod(fP,this.options.onRedo))}undoDepth(e=this.store.getState()){return pP(e)}redoDepth(e=this.store.getState()){return mP(e)}};KP([Ej({shortcut:L.Undo,command:`undo`})],qP.prototype,`undoShortcut`,1),KP([Ej({shortcut:L.Redo,command:`redo`})],qP.prototype,`redoShortcut`,1),KP([G({disableChaining:!0,description:({t:e})=>e(PC.UNDO_DESCRIPTION),label:({t:e})=>e(PC.UNDO_LABEL),icon:`arrowGoBackFill`})],qP.prototype,`undo`,1),KP([G({disableChaining:!0,description:({t:e})=>e(PC.REDO_DESCRIPTION),label:({t:e})=>e(PC.REDO_LABEL),icon:`arrowGoForwardFill`})],qP.prototype,`redo`,1),KP([Tj()],qP.prototype,`undoDepth`,1),KP([Tj()],qP.prototype,`redoDepth`,1),qP=KP([wj({defaultOptions:{depth:100,newGroupDelay:500,getDispatch:void 0,getState:void 0},staticKeys:[`depth`,`newGroupDelay`],handlerKeys:[`onUndo`,`onRedo`]})],qP);var JP=Object.defineProperty,YP=Object.getOwnPropertyDescriptor,XP=(e,t,n,r)=>{for(var i=r>1?void 0:r?YP(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&JP(t,n,i),i},ZP={icon:`italic`,label:({t:e})=>e(FC.LABEL),description:({t:e})=>e(FC.DESCRIPTION)},QP=class extends vj{get name(){return`italic`}createTags(){return[my.FontStyle,my.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:`i`,getAttrs:e.parse},{tag:`em`,getAttrs:e.parse},{style:`font-style=italic`},...t.parseDOM??[]],toDOM:t=>[`em`,e.dom(t),0]}}createKeymap(){return{"Mod-i":Dj({type:this.type})}}createInputRules(){return[OA({regexp:/(?:^|[^*])\*([^*]+)\*$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith(`*`)?{}:{fullMatch:e.slice(1),start:t+1}}),OA({regexp:/(?:^|\W)_([^_]+)_$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith(`_`)?{}:{fullMatch:e.slice(1),start:t+1}})]}createPasteRules(){return[{type:`mark`,markType:this.type,regexp:/(?:^|\W)_([^_]+)_/g},{type:`mark`,markType:this.type,regexp:/\*([^*]+)\*/g}]}toggleItalic(e){return Dj({type:this.type,selection:e})}shortcut(e){return this.toggleItalic()(e)}};XP([G(ZP)],QP.prototype,`toggleItalic`,1),XP([Ej({shortcut:L.Italic,command:`toggleItalic`})],QP.prototype,`shortcut`,1),QP=XP([wj({})],QP);function $P(e,t=null){return function(n,r){let{$from:i,$to:a}=n.selection,o=i.blockRange(a);if(!o)return!1;let s=r?n.tr:null;return eF(s,o,e,t)?(r&&r(s.scrollIntoView()),!0):!1}}function eF(e,t,n,r=null){let i=!1,a=t,o=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let e=o.resolve(t.start-2);a=new ax(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new ax(t.$from,o.resolve(t.$to.end(t.depth)),t.depth)),i=!0}let s=OS(a,n,r,t);return s?(e&&tF(e,t,s,i,n),!0):!1}function tF(e,t,n,r,i){let a=V.empty;for(let e=n.length-1;e>=0;e--)a=V.from(n[e].type.create(n[e].attrs,a));e.step(new wS(t.start-(r?2:0),t.end,t.start,t.end,new H(a,0,0),n.length,!0));let o=0;for(let e=0;e<n.length;e++)n[e].type==i&&(o=e+1);let s=n.length-o,c=t.start+n.length-(r?2:0),l=t.parent;for(let n=t.startIndex,r=t.endIndex,i=!0;n<r;n++,i=!1)!i&&MS(e.doc,c,s)&&(e.split(c,s),c+=2*s),c+=l.child(n).nodeSize;return e}function nF(e){return function(t,n){let{$from:r,$to:i}=t.selection,a=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);return a?n?r.node(a.depth-1).type==e?rF(t,n,e,a):iF(t,n,a):!0:!1}}function rF(e,t,n,r){let i=e.tr,a=r.end,o=r.$to.end(r.depth);a<o&&(i.step(new wS(a-1,o,a,o,new H(V.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new ax(i.doc.resolve(r.$from.pos),i.doc.resolve(o),r.depth));let s=DS(r);if(s==null)return!1;i.lift(r,s);let c=i.doc.resolve(i.mapping.map(a,-1)-1);return NS(i.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&i.join(c.pos),t(i.scrollIntoView()),!0}function iF(e,t,n){let r=e.tr,i=n.parent;for(let e=n.end,t=n.endIndex-1,a=n.startIndex;t>a;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let a=r.doc.resolve(n.start),o=a.nodeAfter;if(r.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,c=n.endIndex==i.childCount,l=a.node(-1),u=a.index(-1);if(!l.canReplace(u+(s?0:1),u+1,o.content.append(c?V.empty:V.from(i))))return!1;let d=a.pos,f=d+o.nodeSize;return r.step(new wS(d-(s?1:0),f+(c?1:0),d+1,f-1,new H((s?V.empty:V.from(i.copy(V.empty))).append(c?V.empty:V.from(i.copy(V.empty))),s?0:1,c?0:1),s?0:1)),t(r.scrollIntoView()),!0}var aF=Object.defineProperty,oF=Object.getOwnPropertyDescriptor,sF=(e,t,n,r)=>{for(var i=r>1?void 0:r?oF(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&aF(t,n,i),i};function cF(e){return!!e.spec.group?.includes(my.ListContainerNode)}function lF(e){return!!e.spec.group?.includes(my.ListItemNode)}function uF(e){return cF(e.type)}function dF(e){return lF(e.type)}function fF(e,t){return n=>{let{dispatch:r,tr:i}=n,a=nk(i,n.state),{$from:o,$to:s}=i.selection,c=o.blockRange(s);if(!c)return!1;let l=uk({predicate:e=>cF(e.type),selection:i.selection});if(l&&c.depth-l.depth<=1&&c.startIndex===0){if(l.node.type===e)return yF(t)(n);if(cF(l.node.type))return e.validContent(l.node.content)?(r?.(i.setNodeMarkup(l.pos,e)),!0):mF(i,l,e,t)?(r?.(i.scrollIntoView()),!0):!1}return $P(e)(a,r)}}function pF(e,t=[`checked`]){return function({tr:n,dispatch:r,state:i}){let a=Tk(e,i.schema),{$from:o,$to:s}=n.selection;if(Ik(n.selection)&&n.selection.node.isBlock||o.depth<2||!o.sameParent(s))return!1;let c=o.node(-1);if(c.type!==a)return!1;if(o.parent.content.size===0&&o.node(-1).childCount===o.indexAfter(-1)){if(o.depth===2||o.node(-3).type!==a||o.index(-2)!==o.node(-2).childCount-1)return!1;if(r){let e=o.index(-1)>0,t=V.empty;for(let n=o.depth-(e?1:2);n>=o.depth-3;n--)t=V.from(o.node(n).copy(t));let i=a.contentMatch.defaultType?.createAndFill()||void 0;t=t.append(V.from(a.createAndFill(null,i)||void 0));let s=o.indexAfter(-1)<o.node(-2).childCount?1:o.indexAfter(-2)<o.node(-3).childCount?2:3;n.replace(o.before(e?void 0:-1),o.after(-s),new H(t,e?3:2,2)),n.setSelection(n.selection.constructor.near(n.doc.resolve(o.pos+(e?3:2)))),r(n.scrollIntoView())}return!0}if(c.attrs.closed&&o.sameParent(s)&&s.pos===s.end()){if(r){let e=o.after(-1),t=a.contentMatch.defaultType?.createAndFill()||void 0,i=a.createAndFill(null,t);i&&(n.insert(e,i),n.setSelection(sC.near(n.doc.resolve(e+1)))),n.delete(o.pos,s.pos),r(n.scrollIntoView())}return!0}let l=Object.fromEntries(Object.entries(c.attrs).filter(([e])=>!t.includes(e))),u=s.pos===o.end()?c.contentMatchAt(0).defaultType:null,d={...o.node().attrs};n.delete(o.pos,s.pos);let f=u?[{type:a,attrs:l},{type:u,attrs:d}]:[{type:a,attrs:l}];return MS(n.doc,o.pos,2)?(r&&r(n.split(o.pos,2,f).scrollIntoView()),!0):!1}}function mF(e,t,n,r){let i=t.node,a=e.doc.resolve(t.start),o=a.node(-1),s=a.index(-1);if(!o||!o.canReplace(s,s+1,V.from(n.create())))return!1;let c=[];for(let e=0;e<i.childCount;e++){let t=i.child(e);if(!r.validContent(t.content))return!1;let n=r.createChecked(null,t.content);c.push(n)}let l=n.createChecked(null,c),u=t.pos,d=u+i.nodeSize,f=e.selection.from;return e.replaceRangeWith(u,d,l),e.setSelection(e.selection.constructor.near(e.doc.resolve(f))),!0}function hF({listType:e,itemType:t,tr:n,range:r}){let i=r.parent,a=n.doc.slice(r.start,r.end);if(i.type===e&&a.content.firstChild?.type===t)return!1;let o=[];for(let e=0;e<a.content.childCount;e++){let n=a.content.child(e);if(!t.validContent(n.content))return!1;let r=t.createChecked(null,n.content);o.push(r)}let s=e.createChecked(null,o);return n.replaceRange(r.start,r.end,new H(V.from(s),0,0)),!0}function gF({listType:e,itemType:t,tr:n}){let r=xF(n.selection);if(!r)return!1;let i=r.startIndex===0,{from:a,to:o}=n.selection;return hF({listType:e,itemType:t,tr:n,range:r})?(n.setSelection(sC.between(n.doc.resolve(i?a:a+2),n.doc.resolve(i?o:o+2))),n.scrollIntoView(),!0):!1}function _F(e,t,n){let r=e.tr,i=n.parent,a=r.mapping.maps.length;for(let e=n.end,t=n.endIndex-1,a=n.startIndex;t>a;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(!s||r.mapping.slice(a).map(n.end)!==n.start+s.nodeSize)return!1;let c=n.startIndex===0,l=n.endIndex===i.childCount,u=o.node(-1),d=o.index(-1);if(!u.canReplace(d+(c?0:1),d+1,s.content.append(l?V.empty:V.from(i))))return!1;let f=o.pos,p=f+s.nodeSize;return r.step(new wS(f-(c?1:0),p+(l?1:0),f+1,p-1,new H((c?V.empty:V.from(i.copy(V.empty))).append(l?V.empty:V.from(i.copy(V.empty))),c?0:1,l?0:1),c?0:1)),t(r.scrollIntoView()),!0}function vF(e,t){let n=t||e.selection.$from,r=[],i,a,o,s;for(let e=n.depth;e>=0;e--){if(a=n.node(e),i=n.index(e),o=a.maybeChild(i-1),s=a.maybeChild(i),o&&s&&o.type.name===s.type.name&&uF(o)){let t=n.before(e+1);r.push(t)}if(i=n.indexAfter(e),o=a.maybeChild(i-1),s=a.maybeChild(i),o&&s&&o.type.name===s.type.name&&uF(o)){let t=n.after(e+1);r.push(t)}}r=[...new Set(r)].sort((e,t)=>t-e);let c=!1;for(let t of r)NS(e.doc,t)&&(e.join(t),c=!0);return c}function yF(e){return t=>{let{dispatch:n,tr:r}=t,i=nk(r,t.state),a=bF(e,r.selection);return a?(n&&_F(i,n,a),!0):!1}}function bF(e,t){let{$from:n,$to:r}=t;return n.blockRange(r,t=>t.firstChild?.type===e)}function xF(e){let{$from:t,$to:n}=e;return t.blockRange(n,uF)}function SF(e){let t=e.selection.$from,n=t.blockRange();if(!n||!dF(n.parent)||n.startIndex!==0)return!1;let r=t.node(n.depth-2),i=t.index(n.depth),a=t.index(n.depth-1),o=t.index(n.depth-2),s=r.maybeChild(o-1),c=s?.lastChild;if(i!==0||a!==0)return!1;if(s&&uF(s)&&c&&dF(c))return gF({listType:s.type,itemType:c.type,tr:e});if(dF(r)){let i=r,a=t.node(n.depth-3);if(uF(a))return gF({listType:a.type,itemType:i.type,tr:e})}return!1}function CF({view:e}){if(!e)return!1;{let t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;let n=t.blockRange();if(!n||!dF(n.parent)||n.startIndex!==0)return!1}{let t=e.state.tr;SF(t)&&e.dispatch(t)}{let t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;let n=t.blockRange();if(!n||!dF(n.parent)||n.startIndex!==0)return!1;let r=t.index(n.depth),i=t.index(n.depth-1),a=t.index(n.depth-2),o=n.depth-2>=1&&dF(t.node(n.depth-2));r===0&&i===0&&a<=1&&o&&nF(n.parent.type)(e.state,e.dispatch)}return NA(e.state,e.dispatch,e),!0}function wF({node:e,mark:t,updateDOM:n,updateMark:r}){let i=document.createElement(`label`);i.contentEditable=`false`,i.classList.add(IM.LIST_ITEM_MARKER_CONTAINER),i.append(t);let a=document.createElement(`div`),o=document.createElement(`li`);o.classList.add(IM.LIST_ITEM_WITH_CUSTOM_MARKER),o.append(i),o.append(a);let s=i=>i.type===e.type?(e=i,n(e,o),r(e,t),!0):!1;return s(e),{dom:o,contentDOM:a,update:s}}function TF(e,t){let n=e.node(t.depth-1),r=e.node(t.depth-2);return!dF(n)||!uF(r)?!1:{parentItem:n,parentList:r}}function EF(e,t){let n=t.parent,r=t.parent.child(t.endIndex-1),i=t.end,a=t.$to.end(t.depth);return i<a?(e.step(new wS(i-1,a,i,a,new H(V.from(r.type.create(null,n.copy())),1,0),1,!0)),new ax(e.doc.resolve(t.$from.pos),e.doc.resolve(a),t.depth)):t}function DF(e,t){let n=t.parent,r=t.parent.child(t.endIndex-1),i=t.end,a=t.$to.end(t.depth-1);return i+1<a?(e.step(new wS(i-1,a,i+1,a,new H(V.from(n.type.create(null,r.type.create(null))),2,0),0,!0)),new ax(e.selection.$from,e.selection.$to,t.depth)):t}function OF(e,t,n,r){return gF({listType:n.type,itemType:r.type,tr:e})?new ax(e.selection.$from,e.selection.$to,t.depth):t}function kF(e){let t=xF(e.selection);if(!t)return!1;let n=TF(e.selection.$from,t);if(!n)return!1;let{parentItem:r,parentList:i}=n;t=EF(e,t),t=DF(e,t),t=OF(e,t,i,r);let a=DS(t);return typeof a==`number`?(e.lift(t,a),t=xF(e.selection),t&&vF(e,e.doc.resolve(t.end-2)),!0):!0}var AF=({tr:e,dispatch:t})=>kF(e)?(t?.(e.scrollIntoView()),!0):!1;function jF(e,t,n){let r,i,a,o,s=t.doc;if(n.startIndex>=1){r=e.child(n.startIndex-1),i=e,o=s.resolve(n.start).start(n.depth),a=o+1;for(let e=0;e<n.startIndex-1;e++)a+=i.child(e).nodeSize}else{let e=t.index(n.depth-1);if(e>=1){let s=t.node(n.depth-1),c=t.start(n.depth-1);if(i=s.child(e-1),!uF(i))return!1;o=c+1;for(let t=0;t<e-1;t++)o+=s.child(t).nodeSize;if(r=i.child(i.childCount-1),a=o+i.nodeSize-r.nodeSize-1,!dF(r))return!1}else return!1}return{previousItem:r,previousList:i,previousItemStart:a,previousListStart:o}}function MF(e,t,n){let r,i,a=n.start,o=t.depth>=n.depth+2?t.end(n.depth+2):n.end-1,s=n.end;return o+1>=s?(r=e.slice(a,s),i=null):(r=e.slice(a,o),i=e.slice(o+1,s-1)),{selectedSlice:r,unselectedSlice:i}}function NF(e){let{$from:t,$to:n}=e.selection,r=xF(e.selection);if(!r)return!1;let i=e.doc.resolve(r.start).node();if(!uF(i))return!1;let a=jF(i,t,r);if(!a)return!1;let{previousItem:o,previousList:s,previousItemStart:c}=a,{selectedSlice:l,unselectedSlice:u}=MF(e.doc,n,r),d=o.content.append(V.fromArray([i.copy(l.content)])).append(u?u.content:V.empty);e.deleteRange(r.start,r.end);let f=c+o.nodeSize-2,p=o.copy(d);return p.check(),e.replaceRangeWith(c-1,f+1,p),e.setSelection(s===i?sC.between(e.doc.resolve(t.pos),e.doc.resolve(n.pos)):sC.between(e.doc.resolve(t.pos-2),e.doc.resolve(n.pos-2))),!0}var PF=({tr:e,dispatch:t})=>NF(e)?(t?.(e.scrollIntoView()),!0):!1,FF=class extends _j{get name(){return`listItemShared`}createKeymap(){let e={Tab:PF,"Shift-Tab":AF,Backspace:CF,"Mod-Backspace":CF};if(ak.isMac){let t={"Ctrl-h":e.Backspace,"Alt-Backspace":e[`Mod-Backspace`]};return{...e,...t}}return e}createPlugin(){return{appendTransaction:(e,t,n)=>{let r=n.tr;return vF(r)?r:null}}}},IF=class extends yj{get name(){return`listItem`}createTags(){return[my.ListItemNode]}createNodeSpec(e,t){return{content:`paragraph block*`,defining:!0,draggable:!1,...t,attrs:{...e.defaults(),closed:{default:!1},nested:{default:!1}},parseDOM:[{tag:`li`,getAttrs:e.parse,priority:_y.Lowest},...t.parseDOM??[]],toDOM:t=>[`li`,e.dom(t),0]}}createNodeViews(){return this.options.enableCollapsible?(e,t,n)=>{let r=document.createElement(`div`);return r.classList.add(IM.COLLAPSIBLE_LIST_ITEM_BUTTON),r.contentEditable=`false`,r.addEventListener(`click`,()=>{if(r.classList.contains(`disabled`))return;let e=n(),i=lC.create(t.state.doc,e);return t.dispatch(t.state.tr.setSelection(i)),this.store.commands.toggleListItemClosed(),!0}),wF({mark:r,node:e,updateDOM:LF,updateMark:RF})}:{}}createKeymap(){return{Enter:pF(this.type)}}createExtensions(){return[new FF]}toggleListItemClosed(e){return({state:{tr:t,selection:n},dispatch:r})=>{if(!Ik(n)||n.node.type.name!==this.name)return!1;let{node:i,from:a}=n;return e=Qy(e)?e:!i.attrs.closed,r?.(t.setNodeMarkup(a,void 0,{...i.attrs,closed:e})),!0}}liftListItemOutOfList(e){return yF(e??this.type)}};sF([G()],IF.prototype,`toggleListItemClosed`,1),sF([G()],IF.prototype,`liftListItemOutOfList`,1),IF=sF([wj({defaultOptions:{enableCollapsible:!1},staticKeys:[`enableCollapsible`]})],IF);function LF(e,t){e.attrs.closed?t.classList.add(IM.COLLAPSIBLE_LIST_ITEM_CLOSED):t.classList.remove(IM.COLLAPSIBLE_LIST_ITEM_CLOSED)}function RF(e,t){e.childCount<=1?t.classList.add(`disabled`):t.classList.remove(`disabled`)}var zF=class extends yj{get name(){return`bulletList`}createTags(){return[my.Block,my.ListContainerNode]}createNodeSpec(e,t){return{content:`listItem+`,...t,attrs:e.defaults(),parseDOM:[{tag:`ul`,getAttrs:e.parse},...t.parseDOM??[]],toDOM:t=>[`ul`,e.dom(t),0]}}createNodeViews(){return this.options.enableSpine?(e,t,n)=>{let r=document.createElement(`div`);r.style.position=`relative`;let i=n(),a=t.state.doc.resolve(i+1);if(a.node(a.depth-1)?.type?.name===`listItem`){let e=document.createElement(`div`);e.contentEditable=`false`,e.classList.add(IM.LIST_SPINE),e.addEventListener(`click`,e=>{let r=n(),i=t.state.doc.resolve(r+1),a=i.start(i.depth-1),o=lC.create(t.state.doc,a-1);t.dispatch(t.state.tr.setSelection(o)),this.store.commands.toggleListItemClosed(),e.preventDefault(),e.stopPropagation()}),r.append(e)}let o=document.createElement(`ul`);return o.classList.add(IM.UL_LIST_CONTENT),r.append(o),{dom:r,contentDOM:o}}:{}}createExtensions(){return[new IF({priority:_y.Low,enableCollapsible:this.options.enableSpine})]}toggleBulletList(){return fF(this.type,Ly(this.store.schema.nodes,`listItem`))}listShortcut(e){return this.toggleBulletList()(e)}createInputRules(){let e=/^\s*([*+-])\s$/;return[WC(e,this.type),new RC(e,(e,t,n,r)=>{let i=e.tr;return i.deleteRange(n,r),gF({listType:this.type,itemType:Ly(this.store.schema.nodes,`listItem`),tr:i})?i:null})]}};sF([G({icon:`listUnordered`,label:({t:e})=>e(IC.BULLET_LIST_LABEL)})],zF.prototype,`toggleBulletList`,1),sF([Ej({shortcut:L.BulletList,command:`toggleBulletList`})],zF.prototype,`listShortcut`,1),zF=sF([wj({defaultOptions:{enableSpine:!1},staticKeys:[`enableSpine`]})],zF);var BF=class extends yj{get name(){return`orderedList`}createTags(){return[my.Block,my.ListContainerNode]}createNodeSpec(e,t){return{content:`listItem+`,...t,attrs:{...e.defaults(),order:{default:1}},parseDOM:[{tag:`ol`,getAttrs:t=>ck(t)?{...e.parse(t),order:+(t.getAttribute(`start`)??1)}:{}},...t.parseDOM??[]],toDOM:t=>{let n=e.dom(t);return t.attrs.order===1?[`ol`,n,0]:[`ol`,{...n,start:t.attrs.order},0]}}}createExtensions(){return[new IF({priority:_y.Low})]}toggleOrderedList(){return fF(this.type,Ly(this.store.schema.nodes,`listItem`))}listShortcut(e){return this.toggleOrderedList()(e)}createInputRules(){let e=/^(\d+)\.\s$/;return[WC(e,this.type,e=>({order:+Ly(e,1)}),(e,t)=>t.childCount+t.attrs.order===+Ly(e,1)),new RC(e,(e,t,n,r)=>{let i=e.tr;if(i.deleteRange(n,r),!gF({listType:this.type,itemType:Ly(this.store.schema.nodes,`listItem`),tr:i}))return null;let a=+Ly(t,1);if(a!==1){let e=fk({selection:i.selection,types:this.type});e&&i.setNodeMarkup(e.pos,void 0,{order:a})}return i})]}};sF([G({icon:`listOrdered`,label:({t:e})=>e(IC.ORDERED_LIST_LABEL)})],BF.prototype,`toggleOrderedList`,1),sF([Ej({shortcut:L.OrderedList,command:`toggleOrderedList`})],BF.prototype,`listShortcut`,1),BF=sF([wj({})],BF);var VF=class extends yj{get name(){return`taskListItem`}createTags(){return[my.ListItemNode]}createNodeSpec(e,t){return{content:`paragraph block*`,defining:!0,draggable:!1,...t,attrs:{...e.defaults(),checked:{default:!1}},parseDOM:[{tag:`li[data-task-list-item]`,getAttrs:t=>{let n=!1;return ck(t)&&t.getAttribute(`data-checked`)!==null&&(n=!0),{checked:n,...e.parse(t)}},priority:_y.Medium},...t.parseDOM??[]],toDOM:t=>[`li`,{...e.dom(t),"data-task-list-item":``,"data-checked":t.attrs.checked?``:void 0},0]}}createNodeViews(){return(e,t,n)=>{let r=document.createElement(`input`);return r.type=`checkbox`,r.classList.add(IM.LIST_ITEM_CHECKBOX),r.contentEditable=`false`,r.addEventListener(`click`,e=>{t.editable||e.preventDefault()}),r.addEventListener(`change`,()=>{let e=n(),r=t.state.doc.resolve(e+1);this.store.commands.toggleCheckboxChecked({$pos:r})}),r.checked=e.attrs.checked,wF({node:e,mark:r,updateDOM:HF,updateMark:UF})}}createKeymap(){return{Enter:pF(this.type)}}createExtensions(){return[new FF]}toggleCheckboxChecked(e){let t,n;return typeof e==`boolean`?t=e:e&&(t=e.checked,n=e.$pos),({tr:e,dispatch:r})=>{let i=fk({selection:n??e.selection.$from,types:this.type});if(!i)return!1;let{node:a,pos:o}=i,s={...a.attrs,checked:t??!a.attrs.checked};return r?.(e.setNodeMarkup(o,void 0,s)),!0}}createInputRules(){let e=/^\s*(\[( ?|x|X)]\s)$/;return[WC(e,this.type,e=>({checked:[`x`,`X`].includes(Jk(e,2))})),new RC(e,(e,t,n,r)=>{let i=e.tr;if(i.deleteRange(n,r),!gF({listType:Ly(this.store.schema.nodes,`taskList`),itemType:this.type,tr:i}))return null;let a=[`x`,`X`].includes(Jk(t,2));if(a){let e=fk({selection:i.selection,types:this.type});e&&i.setNodeMarkup(e.pos,void 0,{checked:a})}return i})]}};sF([G()],VF.prototype,`toggleCheckboxChecked`,1);function HF(e,t){e.attrs.checked?t.setAttribute(`data-checked`,``):t.removeAttribute(`data-checked`),t.setAttribute(`data-task-list-item`,``)}function UF(e,t){t.checked=!!e.attrs.checked}var WF=class extends yj{get name(){return`taskList`}createTags(){return[my.Block,my.ListContainerNode]}createNodeSpec(e,t){return{content:`taskListItem+`,...t,attrs:e.defaults(),parseDOM:[{tag:`ul[data-task-list]`,getAttrs:e.parse,priority:_y.Medium},...t.parseDOM??[]],toDOM:t=>[`ul`,{...e.dom(t),"data-task-list":``},0]}}createExtensions(){return[new VF({})]}toggleTaskList(){return fF(this.type,Ly(this.store.schema.nodes,`taskListItem`))}listShortcut(e){return this.toggleTaskList()(e)}};sF([G({icon:`checkboxMultipleLine`,label:({t:e})=>e(IC.TASK_LIST_LABEL)})],WF.prototype,`toggleTaskList`,1),sF([Ej({shortcut:L.TaskList,command:`toggleTaskList`})],WF.prototype,`listShortcut`,1);function GF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}function KF(e,t){return Array(t+1).join(e)}function qF(e){return e.replace(/^\n*/,``)}function JF(e){for(var t=e.length;t>0&&e[t-1]===`
59
- `;)t--;return e.substring(0,t)}function YF(e){return JF(qF(e))}var XF=`ADDRESS.ARTICLE.ASIDE.AUDIO.BLOCKQUOTE.BODY.CANVAS.CENTER.DD.DIR.DIV.DL.DT.FIELDSET.FIGCAPTION.FIGURE.FOOTER.FORM.FRAMESET.H1.H2.H3.H4.H5.H6.HEADER.HGROUP.HR.HTML.ISINDEX.LI.MAIN.MENU.NAV.NOFRAMES.NOSCRIPT.OL.OUTPUT.P.PRE.SECTION.TABLE.TBODY.TD.TFOOT.TH.THEAD.TR.UL`.split(`.`);function ZF(e){return iI(e,XF)}var QF=[`AREA`,`BASE`,`BR`,`COL`,`COMMAND`,`EMBED`,`HR`,`IMG`,`INPUT`,`KEYGEN`,`LINK`,`META`,`PARAM`,`SOURCE`,`TRACK`,`WBR`];function $F(e){return iI(e,QF)}function eI(e){return aI(e,QF)}var tI=[`A`,`TABLE`,`THEAD`,`TBODY`,`TFOOT`,`TH`,`TD`,`IFRAME`,`SCRIPT`,`AUDIO`,`VIDEO`];function nI(e){return iI(e,tI)}function rI(e){return aI(e,tI)}function iI(e,t){return t.indexOf(e.nodeName)>=0}function aI(e,t){return e.getElementsByTagName&&t.some(function(t){return e.getElementsByTagName(t).length})}var oI={};oI.paragraph={filter:`p`,replacement:function(e){return`
60
-
61
- `+e+`
62
-
63
- `}},oI.lineBreak={filter:`br`,replacement:function(e,t,n){return n.br+`
64
- `}},oI.heading={filter:[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],replacement:function(e,t,n){var r=Number(t.nodeName.charAt(1));if(n.headingStyle===`setext`&&r<3){var i=KF(r===1?`=`:`-`,e.length);return`
65
-
66
- `+e+`
67
- `+i+`
68
-
69
- `}else return`
70
-
71
- `+KF(`#`,r)+` `+e+`
72
-
73
- `}},oI.blockquote={filter:`blockquote`,replacement:function(e){return e=YF(e).replace(/^/gm,`> `),`
74
-
75
- `+e+`
76
-
77
- `}},oI.list={filter:[`ul`,`ol`],replacement:function(e,t){var n=t.parentNode;return n.nodeName===`LI`&&n.lastElementChild===t?`
78
- `+e:`
79
-
80
- `+e+`
81
-
82
- `}},oI.listItem={filter:`li`,replacement:function(e,t,n){var r=n.bulletListMarker+` `,i=t.parentNode;if(i.nodeName===`OL`){var a=i.getAttribute(`start`),o=Array.prototype.indexOf.call(i.children,t);r=(a?Number(a)+o:o+1)+`. `}var s=/\n$/.test(e);return e=YF(e)+(s?`
83
- `:``),e=e.replace(/\n/gm,`
84
- `+` `.repeat(r.length)),r+e+(t.nextSibling?`
85
- `:``)}},oI.indentedCodeBlock={filter:function(e,t){return t.codeBlockStyle===`indented`&&e.nodeName===`PRE`&&e.firstChild&&e.firstChild.nodeName===`CODE`},replacement:function(e,t,n){return`
86
-
87
- `+t.firstChild.textContent.replace(/\n/g,`
88
- `)+`
89
-
90
- `}},oI.fencedCodeBlock={filter:function(e,t){return t.codeBlockStyle===`fenced`&&e.nodeName===`PRE`&&e.firstChild&&e.firstChild.nodeName===`CODE`},replacement:function(e,t,n){for(var r=((t.firstChild.getAttribute(`class`)||``).match(/language-(\S+)/)||[null,``])[1],i=t.firstChild.textContent,a=n.fence.charAt(0),o=3,s=RegExp(`^`+a+`{3,}`,`gm`),c;c=s.exec(i);)c[0].length>=o&&(o=c[0].length+1);var l=KF(a,o);return`
91
-
92
- `+l+r+`
93
- `+i.replace(/\n$/,``)+`
94
- `+l+`
95
-
96
- `}},oI.horizontalRule={filter:`hr`,replacement:function(e,t,n){return`
97
-
98
- `+n.hr+`
99
-
100
- `}},oI.inlineLink={filter:function(e,t){return t.linkStyle===`inlined`&&e.nodeName===`A`&&e.getAttribute(`href`)},replacement:function(e,t){var n=t.getAttribute(`href`);n&&=n.replace(/([()])/g,`\\$1`);var r=sI(t.getAttribute(`title`));return r&&=` "`+r.replace(/"/g,`\\"`)+`"`,`[`+e+`](`+n+r+`)`}},oI.referenceLink={filter:function(e,t){return t.linkStyle===`referenced`&&e.nodeName===`A`&&e.getAttribute(`href`)},replacement:function(e,t,n){var r=t.getAttribute(`href`),i=sI(t.getAttribute(`title`));i&&=` "`+i+`"`;var a,o;switch(n.linkReferenceStyle){case`collapsed`:a=`[`+e+`][]`,o=`[`+e+`]: `+r+i;break;case`shortcut`:a=`[`+e+`]`,o=`[`+e+`]: `+r+i;break;default:var s=this.references.length+1;a=`[`+e+`][`+s+`]`,o=`[`+s+`]: `+r+i}return this.references.push(o),a},references:[],append:function(e){var t=``;return this.references.length&&(t=`
101
-
102
- `+this.references.join(`
103
- `)+`
104
-
105
- `,this.references=[]),t}},oI.emphasis={filter:[`em`,`i`],replacement:function(e,t,n){return e.trim()?n.emDelimiter+e+n.emDelimiter:``}},oI.strong={filter:[`strong`,`b`],replacement:function(e,t,n){return e.trim()?n.strongDelimiter+e+n.strongDelimiter:``}},oI.code={filter:function(e){var t=e.previousSibling||e.nextSibling,n=e.parentNode.nodeName===`PRE`&&!t;return e.nodeName===`CODE`&&!n},replacement:function(e){if(!e)return``;e=e.replace(/\r?\n|\r/g,` `);for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?` `:``,n="`",r=e.match(/`+/gm)||[];r.indexOf(n)!==-1;)n+="`";return n+t+e+t+n}},oI.image={filter:`img`,replacement:function(e,t){var n=sI(t.getAttribute(`alt`)),r=t.getAttribute(`src`)||``,i=sI(t.getAttribute(`title`)),a=i?` "`+i+`"`:``;return r?`![`+n+`](`+r+a+`)`:``}};function sI(e){return e?e.replace(/(\n+\s*)+/g,`
106
- `):``}function cI(e){for(var t in this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[],e.rules)this.array.push(e.rules[t])}cI.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return``}})},forNode:function(e){if(e.isBlank)return this.blankRule;var t;return(t=lI(this.array,e,this.options))||(t=lI(this._keep,e,this.options))||(t=lI(this._remove,e,this.options))?t:this.defaultRule},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};function lI(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(uI(i,t,n))return i}}function uI(e,t,n){var r=e.filter;if(typeof r==`string`){if(r===t.nodeName.toLowerCase())return!0}else if(Array.isArray(r)){if(r.indexOf(t.nodeName.toLowerCase())>-1)return!0}else if(typeof r==`function`){if(r.call(e,t,n))return!0}else throw TypeError("`filter` needs to be a string, array, or function")}function dI(e){var t=e.element,n=e.isBlock,r=e.isVoid,i=e.isPre||function(e){return e.nodeName===`PRE`};if(!(!t.firstChild||i(t))){for(var a=null,o=!1,s=null,c=pI(s,t,i);c!==t;){if(c.nodeType===3||c.nodeType===4){var l=c.data.replace(/[ \r\n\t]+/g,` `);if((!a||/ $/.test(a.data))&&!o&&l[0]===` `&&(l=l.substr(1)),!l){c=fI(c);continue}c.data=l,a=c}else if(c.nodeType===1)n(c)||c.nodeName===`BR`?(a&&(a.data=a.data.replace(/ $/,``)),a=null,o=!1):r(c)||i(c)?(a=null,o=!0):a&&(o=!1);else{c=fI(c);continue}var u=pI(s,c,i);s=c,c=u}a&&(a.data=a.data.replace(/ $/,``),a.data||fI(a))}}function fI(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function pI(e,t,n){return e&&e.parentNode===t||n(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}var mI=typeof window<`u`?window:{};function hI(){var e=mI.DOMParser,t=!1;try{new e().parseFromString(``,`text/html`)&&(t=!0)}catch{}return t}function gI(){var e=function(){};return _I()?e.prototype.parseFromString=function(e){var t=new window.ActiveXObject(`htmlfile`);return t.designMode=`on`,t.open(),t.write(e),t.close(),t}:e.prototype.parseFromString=function(e){var t=document.implementation.createHTMLDocument(``);return t.open(),t.write(e),t.close(),t},e}function _I(){var e=!1;try{document.implementation.createHTMLDocument(``).open()}catch{mI.ActiveXObject&&(e=!0)}return e}var vI=hI()?mI.DOMParser:gI();function yI(e,t){var n=typeof e==`string`?xI().parseFromString(`<x-turndown id="turndown-root">`+e+`</x-turndown>`,`text/html`).getElementById(`turndown-root`):e.cloneNode(!0);return dI({element:n,isBlock:ZF,isVoid:$F,isPre:t.preformattedCode?SI:null}),n}var bI;function xI(){return bI||=new vI,bI}function SI(e){return e.nodeName===`PRE`||e.nodeName===`CODE`}function CI(e,t){return e.isBlock=ZF(e),e.isCode=e.nodeName===`CODE`||e.parentNode.isCode,e.isBlank=wI(e),e.flankingWhitespace=TI(e,t),e}function wI(e){return!$F(e)&&!nI(e)&&/^\s*$/i.test(e.textContent)&&!eI(e)&&!rI(e)}function TI(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:``,trailing:``};var n=EI(e.textContent);return n.leadingAscii&&DI(`left`,e,t)&&(n.leading=n.leadingNonAscii),n.trailingAscii&&DI(`right`,e,t)&&(n.trailing=n.trailingNonAscii),{leading:n.leading,trailing:n.trailing}}function EI(e){var t=e.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:t[1],leadingAscii:t[2],leadingNonAscii:t[3],trailing:t[4],trailingNonAscii:t[5],trailingAscii:t[6]}}function DI(e,t,n){var r,i,a;return e===`left`?(r=t.previousSibling,i=/ $/):(r=t.nextSibling,i=/^ /),r&&(r.nodeType===3?a=i.test(r.nodeValue):n.preformattedCode&&r.nodeName===`CODE`?a=!1:r.nodeType===1&&!ZF(r)&&(a=i.test(r.textContent))),a}var OI=Array.prototype.reduce,kI=[[/\\/g,`\\\\`],[/\*/g,`\\*`],[/^-/g,`\\-`],[/^\+ /g,`\\+ `],[/^(=+)/g,`\\$1`],[/^(#{1,6}) /g,`\\$1 `],[/`/g,"\\`"],[/^~~~/g,`\\~~~`],[/\[/g,`\\[`],[/\]/g,`\\]`],[/^>/g,`\\>`],[/_/g,`\\_`],[/^(\d+)\. /g,`$1\\. `]];function AI(e){if(!(this instanceof AI))return new AI(e);this.options=GF({},{rules:oI,headingStyle:`setext`,hr:`* * *`,bulletListMarker:`*`,codeBlockStyle:`indented`,fence:"```",emDelimiter:`_`,strongDelimiter:`**`,linkStyle:`inlined`,linkReferenceStyle:`full`,br:` `,preformattedCode:!1,blankReplacement:function(e,t){return t.isBlock?`
107
-
108
- `:``},keepReplacement:function(e,t){return t.isBlock?`
109
-
110
- `+t.outerHTML+`
111
-
112
- `:t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?`
113
-
114
- `+e+`
115
-
116
- `:e}},e),this.rules=new cI(this.options)}AI.prototype={turndown:function(e){if(!FI(e))throw TypeError(e+` is not a string, or an element/document/fragment node.`);if(e===``)return``;var t=jI.call(this,new yI(e,this.options));return MI.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else if(typeof e==`function`)e(this);else throw TypeError(`plugin must be a Function or an Array of Functions`);return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return kI.reduce(function(e,t){return e.replace(t[0],t[1])},e)}};function jI(e){var t=this;return OI.call(e.childNodes,function(e,n){n=new CI(n,t.options);var r=``;return n.nodeType===3?r=n.isCode?n.nodeValue:t.escape(n.nodeValue):n.nodeType===1&&(r=NI.call(t,n)),PI(e,r)},``)}function MI(e){var t=this;return this.rules.forEach(function(n){typeof n.append==`function`&&(e=PI(e,n.append(t.options)))}),e.replace(/^[\t\r\n]+/,``).replace(/[\t\r\n\s]+$/,``)}function NI(e){var t=this.rules.forNode(e),n=jI.call(this,e),r=e.flankingWhitespace;return(r.leading||r.trailing)&&(n=n.trim()),r.leading+t.replacement(n,e,this.options)+r.trailing}function PI(e,t){var n=JF(e),r=qF(t),i=Math.max(e.length-n.length,t.length-r.length);return n+`
117
-
118
- `.substring(0,i)+r}function FI(e){return e!=null&&(typeof e==`string`||e.nodeType&&(e.nodeType===1||e.nodeType===9||e.nodeType===11))}var II=AI;function LI(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:``,highlight:null,hooks:null,langPrefix:`language-`,mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}var RI=LI();function zI(e){RI=e}var BI=/[&<>"']/,VI=new RegExp(BI.source,`g`),HI=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,UI=new RegExp(HI.source,`g`),WI={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},GI=e=>WI[e];function KI(e,t){if(t){if(BI.test(e))return e.replace(VI,GI)}else if(HI.test(e))return e.replace(UI,GI);return e}var qI=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function JI(e){return e.replace(qI,(e,t)=>(t=t.toLowerCase(),t===`colon`?`:`:t.charAt(0)===`#`?t.charAt(1)===`x`?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):``))}var YI=/(^|[^\[])\^/g;function XI(e,t){e=typeof e==`string`?e:e.source,t||=``;let n={replace:(t,r)=>(r=r.source||r,r=r.replace(YI,`$1`),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n}var ZI=/[^\w:]/g,QI=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function $I(e,t,n){if(e){let e;try{e=decodeURIComponent(JI(n)).replace(ZI,``).toLowerCase()}catch{return null}if(e.indexOf(`javascript:`)===0||e.indexOf(`vbscript:`)===0||e.indexOf(`data:`)===0)return null}t&&!QI.test(n)&&(n=iL(t,n));try{n=encodeURI(n).replace(/%25/g,`%`)}catch{return null}return n}var eL={},tL=/^[^:]+:\/*[^/]*$/,nL=/^([^:]+:)[\s\S]*$/,rL=/^([^:]+:\/*[^/]*)[\s\S]*$/;function iL(e,t){eL[` `+e]||(tL.test(e)?eL[` `+e]=e+`/`:eL[` `+e]=sL(e,`/`,!0)),e=eL[` `+e];let n=e.indexOf(`:`)===-1;return t.substring(0,2)===`//`?n?t:e.replace(nL,`$1`)+t:t.charAt(0)===`/`?n?t:e.replace(rL,`$1`)+t:e+t}var aL={exec:function(){}};function oL(e,t){let n=e.replace(/\|/g,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,`|`);return n}function sL(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function cL(e,t){if(e.indexOf(t[1])===-1)return-1;let n=e.length,r=0,i=0;for(;i<n;i++)if(e[i]===`\\`)i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1}function lL(e){e&&e.sanitize&&!e.silent&&console.warn(`marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options`)}function uL(e,t){if(t<1)return``;let n=``;for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function dL(e,t,n,r){let i=t.href,a=t.title?KI(t.title):null,o=e[1].replace(/\\([\[\]])/g,`$1`);if(e[0].charAt(0)!==`!`){r.state.inLink=!0;let e={type:`link`,raw:n,href:i,title:a,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,e}return{type:`image`,raw:n,href:i,title:a,text:KI(o)}}function fL(e,t){let n=e.match(/^(\s+)(?:```)/);if(n===null)return t;let r=n[1];return t.split(`
119
- `).map(e=>{let t=e.match(/^\s+/);if(t===null)return e;let[n]=t;return n.length>=r.length?e.slice(r.length):e}).join(`
120
- `)}var pL=class{constructor(e){this.options=e||RI}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(/^ {1,4}/gm,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:sL(e,`
121
- `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=fL(e,t[3]||``);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){let t=sL(e,`#`);(this.options.pedantic||!t||/ $/.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:t[0]}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=t[0].replace(/^ *>[ \t]?/gm,``),n=this.lexer.state.top;this.lexer.state.top=!0;let r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:`blockquote`,raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,r,i,a,o,s,c,l,u,d,f,p,m=t[1].trim(),h=m.length>1,g={type:`list`,raw:``,ordered:h,start:h?+m.slice(0,-1):``,loose:!1,items:[]};m=h?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=h?m:`[*+-]`);let _=RegExp(`^( {0,3}${m})((?:[\t ][^\\n]*)?(?:\\n|$))`);for(;e&&(p=!1,!(!(t=_.exec(e))||this.rules.block.hr.test(e)));){if(n=t[0],e=e.substring(n.length),l=t[2].split(`
122
- `,1)[0].replace(/^\t+/,e=>` `.repeat(3*e.length)),u=e.split(`
123
- `,1)[0],this.options.pedantic?(a=2,f=l.trimLeft()):(a=t[2].search(/[^ ]/),a=a>4?1:a,f=l.slice(a),a+=t[1].length),s=!1,!l&&/^ *$/.test(u)&&(n+=u+`
124
- `,e=e.substring(u.length+1),p=!0),!p){let t=RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),o=RegExp(`^ {0,${Math.min(3,a-1)}}#`);for(;e&&(d=e.split(`
125
- `,1)[0],u=d,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g,` `)),!(i.test(u)||o.test(u)||t.test(u)||r.test(e)));){if(u.search(/[^ ]/)>=a||!u.trim())f+=`
126
- `+u.slice(a);else{if(s||l.search(/[^ ]/)>=4||i.test(l)||o.test(l)||r.test(l))break;f+=`
127
- `+u}!s&&!u.trim()&&(s=!0),n+=d+`
128
- `,e=e.substring(d.length+1),l=u.slice(a)}}g.loose||(c?g.loose=!0:/\n *\n *$/.test(n)&&(c=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(f),r&&(i=r[0]!==`[ ] `,f=f.replace(/^\[[ xX]\] +/,``))),g.items.push({type:`list_item`,raw:n,task:!!r,checked:i,loose:!1,text:f}),g.raw+=n}g.items[g.items.length-1].raw=n.trimRight(),g.items[g.items.length-1].text=f.trimRight(),g.raw=g.raw.trimRight();let v=g.items.length;for(o=0;o<v;o++)if(this.lexer.state.top=!1,g.items[o].tokens=this.lexer.blockTokens(g.items[o].text,[]),!g.loose){let e=g.items[o].tokens.filter(e=>e.type===`space`);g.loose=e.length>0&&e.some(e=>/\n.*\n/.test(e.raw))}if(g.loose)for(o=0;o<v;o++)g.items[o].loose=!0;return g}}html(e){let t=this.rules.block.html.exec(e);if(t){let e={type:`html`,raw:t[0],pre:!this.options.sanitizer&&(t[1]===`pre`||t[1]===`script`||t[1]===`style`),text:t[0]};if(this.options.sanitize){let n=this.options.sanitizer?this.options.sanitizer(t[0]):KI(t[0]);e.type=`paragraph`,e.text=n,e.tokens=this.lexer.inline(n)}return e}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(/\s+/g,` `),n=t[2]?t[2].replace(/^<(.*)>$/,`$1`).replace(this.rules.inline._escapes,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(t){let e={type:`table`,header:oL(t[1]).map(e=>({text:e})),align:t[2].replace(/^ *|\| *$/g,``).split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,``).split(`
129
- `):[]};if(e.header.length===e.align.length){e.raw=t[0];let n=e.align.length,r,i,a,o;for(r=0;r<n;r++)/^ *-+: *$/.test(e.align[r])?e.align[r]=`right`:/^ *:-+: *$/.test(e.align[r])?e.align[r]=`center`:/^ *:-+ *$/.test(e.align[r])?e.align[r]=`left`:e.align[r]=null;for(n=e.rows.length,r=0;r<n;r++)e.rows[r]=oL(e.rows[r],e.header.length).map(e=>({text:e}));for(n=e.header.length,i=0;i<n;i++)e.header[i].tokens=this.lexer.inline(e.header[i].text);for(n=e.rows.length,i=0;i<n;i++)for(o=e.rows[i],a=0;a<o.length;a++)o[a].tokens=this.lexer.inline(o[a].text);return e}}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
130
- `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:KI(t[1])}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?`text`:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):KI(t[0]):t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;let t=sL(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=cL(t[2],`()`);if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),dL(t,{href:n&&n.replace(this.rules.inline._escapes,`$1`),title:r&&r.replace(this.rules.inline._escapes,`$1`)},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g,` `);if(e=t[e.toLowerCase()],!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return dL(n,e,n[0],this.lexer)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrong.lDelim.exec(e);if(!r||r[3]&&n.match(/[\p{L}\p{N}]/u))return;let i=r[1]||r[2]||``;if(!i||i&&(n===``||this.rules.inline.punctuation.exec(n))){let n=r[0].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=i.length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=e.slice(0,n+r.index+(r[0].length-i.length)+a);if(Math.min(n,a)%2){let e=t.slice(1,-1);return{type:`em`,raw:t,text:e,tokens:this.lexer.inlineTokens(e)}}let c=t.slice(2,-2);return{type:`strong`,raw:t,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g,` `),n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=KI(e,!0),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){let n=this.rules.inline.autolink.exec(e);if(n){let e,r;return n[2]===`@`?(e=KI(this.options.mangle?t(n[1]):n[1]),r=`mailto:`+e):(e=KI(n[1]),r=e),{type:`link`,raw:n[0],text:e,href:r,tokens:[{type:`text`,raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,r;if(n[2]===`@`)e=KI(this.options.mangle?t(n[0]):n[0]),r=`mailto:`+e;else{let t;do t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(t!==n[0]);e=KI(n[0]),r=n[1]===`www.`?`http://`+n[0]:n[0]}return{type:`link`,raw:n[0],text:e,href:r,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e,t){let n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):KI(n[0]):n[0]:KI(this.options.smartypants?t(n[0]):n[0]),{type:`text`,raw:n[0],text:e}}}},K={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))`,def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:aL,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};K._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,K._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,K.def=XI(K.def).replace(`label`,K._label).replace(`title`,K._title).getRegex(),K.bullet=/(?:[*+-]|\d{1,9}[.)])/,K.listItemStart=XI(/^( *)(bull) */).replace(`bull`,K.bullet).getRegex(),K.list=XI(K.list).replace(/bull/g,K.bullet).replace(`hr`,`\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))`).replace(`def`,`\\n+(?=`+K.def.source+`)`).getRegex(),K._tag=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,K._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,K.html=XI(K.html,`i`).replace(`comment`,K._comment).replace(`tag`,K._tag).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),K.paragraph=XI(K._paragraph).replace(`hr`,K.hr).replace(`heading`,` {0,3}#{1,6} `).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,K._tag).getRegex(),K.blockquote=XI(K.blockquote).replace(`paragraph`,K.paragraph).getRegex(),K.normal={...K},K.gfm={...K.normal,table:`^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`},K.gfm.table=XI(K.gfm.table).replace(`hr`,K.hr).replace(`heading`,` {0,3}#{1,6} `).replace(`blockquote`,` {0,3}>`).replace(`code`,` {4}[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,K._tag).getRegex(),K.gfm.paragraph=XI(K._paragraph).replace(`hr`,K.hr).replace(`heading`,` {0,3}#{1,6} `).replace(`|lheading`,``).replace(`table`,K.gfm.table).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,K._tag).getRegex(),K.pedantic={...K.normal,html:XI(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,K._comment).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:aL,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:XI(K.normal._paragraph).replace(`hr`,K.hr).replace(`heading`,` *#{1,6} *[^
131
- ]`).replace(`lheading`,K.lheading).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).getRegex()};var q={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:aL,tag:`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`,link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:`reflink|nolink(?!\\()`,emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:aL,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};q._punctuation=`!"#$%&'()+\\-.,/:;<=>?@\\[\\]\`^{|}~`,q.punctuation=XI(q.punctuation).replace(/punctuation/g,q._punctuation).getRegex(),q.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,q.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,q._comment=XI(K._comment).replace(`(?:-->|$)`,`-->`).getRegex(),q.emStrong.lDelim=XI(q.emStrong.lDelim).replace(/punct/g,q._punctuation).getRegex(),q.emStrong.rDelimAst=XI(q.emStrong.rDelimAst,`g`).replace(/punct/g,q._punctuation).getRegex(),q.emStrong.rDelimUnd=XI(q.emStrong.rDelimUnd,`g`).replace(/punct/g,q._punctuation).getRegex(),q._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,q._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,q._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,q.autolink=XI(q.autolink).replace(`scheme`,q._scheme).replace(`email`,q._email).getRegex(),q._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,q.tag=XI(q.tag).replace(`comment`,q._comment).replace(`attribute`,q._attribute).getRegex(),q._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,q._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,q._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,q.link=XI(q.link).replace(`label`,q._label).replace(`href`,q._href).replace(`title`,q._title).getRegex(),q.reflink=XI(q.reflink).replace(`label`,q._label).replace(`ref`,K._label).getRegex(),q.nolink=XI(q.nolink).replace(`ref`,K._label).getRegex(),q.reflinkSearch=XI(q.reflinkSearch,`g`).replace(`reflink`,q.reflink).replace(`nolink`,q.nolink).getRegex(),q.normal={...q},q.pedantic={...q.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:XI(/^!?\[(label)\]\((.*?)\)/).replace(`label`,q._label).getRegex(),reflink:XI(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,q._label).getRegex()},q.gfm={...q.normal,escape:XI(q.escape).replace(`])`,`~|])`).getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},q.gfm.url=XI(q.gfm.url,`i`).replace(`email`,q.gfm._extended_email).getRegex(),q.breaks={...q.gfm,br:XI(q.br).replace(`{2,}`,`*`).getRegex(),text:XI(q.gfm.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()};function mL(e){return e.replace(/---/g,`—`).replace(/--/g,`–`).replace(/(^|[-\u2014/(\[{"\s])'/g,`$1‘`).replace(/'/g,`’`).replace(/(^|[-\u2014/(\[{\u2018\s])"/g,`$1“`).replace(/"/g,`”`).replace(/\.{3}/g,`…`)}function hL(e){let t=``,n,r,i=e.length;for(n=0;n<i;n++)r=e.charCodeAt(n),Math.random()>.5&&(r=`x`+r.toString(16)),t+=`&#`+r+`;`;return t}var gL=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||RI,this.options.tokenizer=this.options.tokenizer||new pL,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={block:K.normal,inline:q.normal};this.options.pedantic?(t.block=K.pedantic,t.inline=q.pedantic):this.options.gfm&&(t.block=K.gfm,this.options.breaks?t.inline=q.breaks:t.inline=q.gfm),this.tokenizer.rules=t}static get rules(){return{block:K,inline:q}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(/\r\n|\r/g,`
132
- `),this.blockTokens(e,this.tokens);let t;for(;t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){e=this.options.pedantic?e.replace(/\t/g,` `).replace(/^ +$/gm,``):e.replace(/^( *)(\t+)/gm,(e,t,n)=>t+` `.repeat(n.length));let n,r,i,a;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(r=>(n=r.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),n.raw.length===1&&t.length>0?t[t.length-1].raw+=`
133
- `:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&(r.type===`paragraph`||r.type===`text`)?(r.raw+=`
134
- `+n.raw,r.text+=`
135
- `+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&(r.type===`paragraph`||r.type===`text`)?(r.raw+=`
136
- `+n.raw,r.text+=`
137
- `+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(function(e){r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i))){r=t[t.length-1],a&&r.type===`paragraph`?(r.raw+=`
138
- `+n.raw,r.text+=`
139
- `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),a=i.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&r.type===`text`?(r.raw+=`
140
- `+n.raw,r.text+=`
141
- `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,i,a=e,o,s,c;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)e.includes(o[0].slice(o[0].lastIndexOf(`[`)+1,-1))&&(a=a.slice(0,o.index)+`[`+uL(`a`,o[0].length-2)+`]`+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,o.index)+`[`+uL(`a`,o[0].length-2)+`]`+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.escapedEmSt.exec(a))!=null;)a=a.slice(0,o.index+o[0].length-2)+`++`+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(s||(c=``),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(r=>(n=r.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&n.type===`text`&&r.type===`text`?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),r=t[t.length-1],r&&n.type===`text`&&r.type===`text`?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,a,c)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e,hL)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e,hL))){e=e.substring(n.raw.length),t.push(n);continue}if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(function(e){r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(i,mL)){e=e.substring(n.raw.length),n.raw.slice(-1)!==`_`&&(c=n.raw.slice(-1)),s=!0,r=t[t.length-1],r&&r.type===`text`?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},_L=class{constructor(e){this.options=e||RI}code(e,t,n){let r=(t||``).match(/\S*/)[0];if(this.options.highlight){let t=this.options.highlight(e,r);t!=null&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,``)+`
142
- `,r?`<pre><code class="`+this.options.langPrefix+KI(r)+`">`+(n?e:KI(e,!0))+`</code></pre>
143
- `:`<pre><code>`+(n?e:KI(e,!0))+`</code></pre>
144
- `}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e){return e}heading(e,t,n,r){return this.options.headerIds?`<h${t} id="${this.options.headerPrefix+r.slug(n)}">${e}</h${t}>\n`:`<h${t}>${e}</h${t}>\n`}hr(){return this.options.xhtml?`<hr/>
145
- `:`<hr>
146
- `}list(e,t,n){let r=t?`ol`:`ul`,i=t&&n!==1?` start="`+n+`"`:``;return`<`+r+i+`>
147
- `+e+`</`+r+`>
148
- `}listitem(e){return`<li>${e}</li>\n`}checkbox(e){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"`+(this.options.xhtml?` /`:``)+`> `}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&=`<tbody>${t}</tbody>`,`<table>
149
- <thead>
150
- `+e+`</thead>
151
- `+t+`</table>
152
- `}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){let n=t.header?`th`:`td`;return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return this.options.xhtml?`<br/>`:`<br>`}del(e){return`<del>${e}</del>`}link(e,t,n){if(e=$I(this.options.sanitize,this.options.baseUrl,e),e===null)return n;let r=`<a href="`+e+`"`;return t&&(r+=` title="`+t+`"`),r+=`>`+n+`</a>`,r}image(e,t,n){if(e=$I(this.options.sanitize,this.options.baseUrl,e),e===null)return n;let r=`<img src="${e}" alt="${n}"`;return t&&(r+=` title="${t}"`),r+=this.options.xhtml?`/>`:`>`,r}text(e){return e}},vL=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return``+n}image(e,t,n){return``+n}br(){return``}},yL=class{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,``).replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,``).replace(/\s/g,`-`)}getNextSafeSlug(e,t){let n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do r++,n=e+`-`+r;while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}slug(e,t={}){let n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}},bL=class e{constructor(e){this.options=e||RI,this.options.renderer=this.options.renderer||new _L,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new vL,this.slugger=new yL}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n=``,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S=e.length;for(r=0;r<S;r++){if(f=e[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[f.type]&&(x=this.options.extensions.renderers[f.type].call({parser:this},f),x!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`paragraph`,`text`].includes(f.type))){n+=x||``;continue}switch(f.type){case`space`:continue;case`hr`:n+=this.renderer.hr();continue;case`heading`:n+=this.renderer.heading(this.parseInline(f.tokens),f.depth,JI(this.parseInline(f.tokens,this.textRenderer)),this.slugger);continue;case`code`:n+=this.renderer.code(f.text,f.lang,f.escaped);continue;case`table`:for(u=``,l=``,o=f.header.length,i=0;i<o;i++)l+=this.renderer.tablecell(this.parseInline(f.header[i].tokens),{header:!0,align:f.align[i]});for(u+=this.renderer.tablerow(l),d=``,o=f.rows.length,i=0;i<o;i++){for(c=f.rows[i],l=``,s=c.length,a=0;a<s;a++)l+=this.renderer.tablecell(this.parseInline(c[a].tokens),{header:!1,align:f.align[a]});d+=this.renderer.tablerow(l)}n+=this.renderer.table(u,d);continue;case`blockquote`:d=this.parse(f.tokens),n+=this.renderer.blockquote(d);continue;case`list`:for(p=f.ordered,m=f.start,h=f.loose,o=f.items.length,d=``,i=0;i<o;i++)_=f.items[i],v=_.checked,y=_.task,g=``,_.task&&(b=this.renderer.checkbox(v),h?_.tokens.length>0&&_.tokens[0].type===`paragraph`?(_.tokens[0].text=b+` `+_.tokens[0].text,_.tokens[0].tokens&&_.tokens[0].tokens.length>0&&_.tokens[0].tokens[0].type===`text`&&(_.tokens[0].tokens[0].text=b+` `+_.tokens[0].tokens[0].text)):_.tokens.unshift({type:`text`,text:b}):g+=b),g+=this.parse(_.tokens,h),d+=this.renderer.listitem(g,y,v);n+=this.renderer.list(d,p,m);continue;case`html`:n+=this.renderer.html(f.text);continue;case`paragraph`:n+=this.renderer.paragraph(this.parseInline(f.tokens));continue;case`text`:for(d=f.tokens?this.parseInline(f.tokens):f.text;r+1<S&&e[r+1].type===`text`;)f=e[++r],d+=`
153
- `+(f.tokens?this.parseInline(f.tokens):f.text);n+=t?this.renderer.paragraph(d):d;continue;default:{let e=`Token with "`+f.type+`" type was not found.`;if(this.options.silent){console.error(e);return}else throw Error(e)}}}return n}parseInline(e,t){t||=this.renderer;let n=``,r,i,a,o=e.length;for(r=0;r<o;r++){if(i=e[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]&&(a=this.options.extensions.renderers[i.type].call({parser:this},i),a!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type))){n+=a||``;continue}switch(i.type){case`escape`:n+=t.text(i.text);break;case`html`:n+=t.html(i.text);break;case`link`:n+=t.link(i.href,i.title,this.parseInline(i.tokens,t));break;case`image`:n+=t.image(i.href,i.title,i.text);break;case`strong`:n+=t.strong(this.parseInline(i.tokens,t));break;case`em`:n+=t.em(this.parseInline(i.tokens,t));break;case`codespan`:n+=t.codespan(i.text);break;case`br`:n+=t.br();break;case`del`:n+=t.del(this.parseInline(i.tokens,t));break;case`text`:n+=t.text(i.text);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent){console.error(e);return}else throw Error(e)}}}return n}},xL=class{constructor(e){this.options=e||RI}static passThroughHooks=new Set([`preprocess`,`postprocess`]);preprocess(e){return e}postprocess(e){return e}};function SL(e,t,n){return r=>{if(r.message+=`
154
- Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+KI(r.message+``,!0)+`</pre>`;if(t)return Promise.resolve(e);if(n){n(null,e);return}return e}if(t)return Promise.reject(r);if(n){n(r);return}throw r}}function CL(e,t){return(n,r,i)=>{typeof r==`function`&&(i=r,r=null);let a={...r};r={...J.defaults,...a};let o=SL(r.silent,r.async,i);if(n==null)return o(Error(`marked(): input parameter is undefined or null`));if(typeof n!=`string`)return o(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(n)+`, string expected`));if(lL(r),r.hooks&&(r.hooks.options=r),i){let a=r.highlight,s;try{r.hooks&&(n=r.hooks.preprocess(n)),s=e(n,r)}catch(e){return o(e)}let c=function(e){let n;if(!e)try{r.walkTokens&&J.walkTokens(s,r.walkTokens),n=t(s,r),r.hooks&&(n=r.hooks.postprocess(n))}catch(t){e=t}return r.highlight=a,e?o(e):i(null,n)};if(!a||a.length<3||(delete r.highlight,!s.length))return c();let l=0;J.walkTokens(s,function(e){e.type===`code`&&(l++,setTimeout(()=>{a(e.text,e.lang,function(t,n){if(t)return c(t);n!=null&&n!==e.text&&(e.text=n,e.escaped=!0),l--,l===0&&c()})},0))}),l===0&&c();return}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(t=>e(t,r)).then(e=>r.walkTokens?Promise.all(J.walkTokens(e,r.walkTokens)).then(()=>e):e).then(e=>t(e,r)).then(e=>r.hooks?r.hooks.postprocess(e):e).catch(o);try{r.hooks&&(n=r.hooks.preprocess(n));let i=e(n,r);r.walkTokens&&J.walkTokens(i,r.walkTokens);let a=t(i,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(e){return o(e)}}}function J(e,t,n){return CL(gL.lex,bL.parse)(e,t,n)}J.options=J.setOptions=function(e){return J.defaults={...J.defaults,...e},zI(J.defaults),J},J.getDefaults=LI,J.defaults=RI,J.use=function(...e){let t=J.defaults.extensions||{renderers:{},childTokens:{}};e.forEach(e=>{let n={...e};if(n.async=J.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(e.renderer){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(e.tokenizer){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);t[e.level]?t[e.level].unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=J.defaults.renderer||new _L;for(let n in e.renderer){let r=t[n];t[n]=(...i)=>{let a=e.renderer[n].apply(t,i);return a===!1&&(a=r.apply(t,i)),a}}n.renderer=t}if(e.tokenizer){let t=J.defaults.tokenizer||new pL;for(let n in e.tokenizer){let r=t[n];t[n]=(...i)=>{let a=e.tokenizer[n].apply(t,i);return a===!1&&(a=r.apply(t,i)),a}}n.tokenizer=t}if(e.hooks){let t=J.defaults.hooks||new xL;for(let n in e.hooks){let r=t[n];xL.passThroughHooks.has(n)?t[n]=i=>{if(J.defaults.async)return Promise.resolve(e.hooks[n].call(t,i)).then(e=>r.call(t,e));let a=e.hooks[n].call(t,i);return r.call(t,a)}:t[n]=(...i)=>{let a=e.hooks[n].apply(t,i);return a===!1&&(a=r.apply(t,i)),a}}n.hooks=t}if(e.walkTokens){let t=J.defaults.walkTokens;n.walkTokens=function(n){let r=[];return r.push(e.walkTokens.call(this,n)),t&&(r=r.concat(t.call(this,n))),r}}J.setOptions(n)})},J.walkTokens=function(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(J,r)),r.type){case`table`:for(let e of r.header)n=n.concat(J.walkTokens(e.tokens,t));for(let e of r.rows)for(let r of e)n=n.concat(J.walkTokens(r.tokens,t));break;case`list`:n=n.concat(J.walkTokens(r.items,t));break;default:J.defaults.extensions&&J.defaults.extensions.childTokens&&J.defaults.extensions.childTokens[r.type]?J.defaults.extensions.childTokens[r.type].forEach(function(e){n=n.concat(J.walkTokens(r[e],t))}):r.tokens&&(n=n.concat(J.walkTokens(r.tokens,t)))}return n},J.parseInline=CL(gL.lexInline,bL.parseInline),J.Parser=bL,J.parser=bL.parse,J.Renderer=_L,J.TextRenderer=vL,J.Lexer=gL,J.lexer=gL.lex,J.Tokenizer=pL,J.Slugger=yL,J.Hooks=xL,J.parse=J,J.options,J.setOptions,J.use,J.walkTokens,J.parseInline,bL.parse,gL.lex;var wL=Object.defineProperty,TL=Object.getOwnPropertyDescriptor,EL=(e,t,n,r)=>{for(var i=r>1?void 0:r?TL(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&wL(t,n,i),i},DL=Mb(II);function OL(e){return FL.turndown(e)}function kL(e){let t=e.parentNode;if(!ck(t))return!1;if(t.nodeName===`THEAD`)return!0;if(t.nodeName!==`TABLE`&&!ML(t))return!1;let n=[...e.childNodes];return n.every(e=>e.nodeName===`TH`)&&n.some(e=>!!e.textContent)}function AL(e){return ck(e)&&e.matches(`th[data-controller-cell]`)}function jL(e){let t=e.parentNode;return!ck(t)||t.nodeName!==`TABLE`&&!ML(t)?!1:[...e.childNodes].every(e=>AL(e))}function ML(e){if(e.nodeName!==`TBODY`)return!1;let t=e.previousSibling;return t?ck(t)&&t.nodeName===`THEAD`&&!t.textContent?.trim():!0}function NL(e){let t=e.closest(`table`);if(!t)return!1;let{parentNode:n}=t;return n?!!n.closest(`table`):!0}function PL(e,t){let n=[];for(let e of t.parentNode?.childNodes??[])AL(e)||n.push(e);return`${(n.indexOf(t)===0?`| `:` `)+e.trim()} |`}var FL=new DL({codeBlockStyle:`fenced`,headingStyle:`atx`}).addRule(`taskListItems`,{filter:e=>e.nodeName===`LI`&&e.hasAttribute(`data-task-list-item`),replacement:(e,t)=>`- ${t.hasAttribute(`data-checked`)?`[x]`:`[ ]`} ${e.trimStart()}`}).addRule(`tableCell`,{filter:[`th`,`td`],replacement:(e,t)=>AL(t)?``:PL(e,t)}).addRule(`tableRow`,{filter:`tr`,replacement:(e,t)=>{let n=``,r={left:`:--`,right:`--:`,center:`:-:`},i=[...t.childNodes].filter(e=>!AL(e));if(kL(t))for(let e of i){if(!ck(e))continue;let t=`---`,i=(e.getAttribute(`align`)??``).toLowerCase();i&&(t=r[i]||t),n+=PL(t,e)}return`
155
- ${e}${n?`
156
- ${n}`:``}`}}).addRule(`table`,{filter:e=>e.nodeName!==`TABLE`||NL(e)?!1:kL([...e.rows].filter(e=>!jL(e))[0]),replacement:e=>(e=e.replace(`
157
-
158
- `,`
159
- `),`
160
-
161
- ${e}
162
-
163
- `)}).addRule(`tableSection`,{filter:[`thead`,`tbody`,`tfoot`],replacement:function(e){return e}}).keep(e=>e.nodeName===`TABLE`&&!kL(e.rows[0])).keep(e=>e.nodeName===`TABLE`&&NL(e)).addRule(`strikethrough`,{filter:[`del`,`s`,`strike`],replacement:function(e){return`~${e}~`}}).addRule(`fencedCodeBlock`,{filter:(e,t)=>!!(t.codeBlockStyle===`fenced`&&e.nodeName===`PRE`&&e.firstChild&&e.firstChild.nodeName===`CODE`),replacement:(e,t,n)=>{B(ck(t.firstChild),{code:R.EXTENSION,message:`Invalid node \`${t.firstChild?.nodeName}\` encountered for codeblock when converting html to markdown.`});let r=(t.firstChild.getAttribute(`class`)??``).match(/(?:lang|language)-(\S+)/)?.[1]??t.firstChild.getAttribute(`data-code-block-language`)??``;return`
164
-
165
- ${n.fence}${r}
166
- ${t.firstChild.textContent}
167
- ${n.fence}
168
-
169
- `}});J.use({renderer:{list(e,t,n){return t?`<ol ${n===1?``:`start="${n}"`}>
170
- ${e}</ol>
171
- `:`<ul ${e.startsWith(`<li data-task-list-item `)?`data-task-list`:``}>
172
- ${e}</ul>
173
- `},listitem(e,t,n){return t?`<li data-task-list-item ${n?`data-checked`:``}>${e}</li>
174
- `:`<li>${e}</li>
175
- `}}});function IL(e,t){let n=J(e,{gfm:!0,smartLists:!0,xhtml:!0});return t?t(n):n}var LL=class extends _j{get name(){return`markdown`}onCreate(){this.store.setStringHandler(`markdown`,this.markdownToProsemirrorNode.bind(this))}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsMarkdown?e=>{let t=document.createElement(`div`),n=Xx.fromSchema(this.store.schema);return t.append(n.serializeFragment(e.content)),this.options.htmlToMarkdown(t.innerHTML)}:void 0}}}markdownToProsemirrorNode(e){return this.store.stringHandlers.html({...e,content:this.options.markdownToHtml(e.content,this.options.htmlSanitizer)})}insertMarkdown(e,t){return n=>{let{state:r}=n,i=this.options.markdownToHtml(e,this.options.htmlSanitizer);i=!t?.alwaysWrapInBlock&&i.startsWith(`<p><`)&&i.endsWith(`</p>
176
- `)?i.slice(3,-5):`<div>${i}</div>`;let a=this.store.stringHandlers.html({content:i,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(a,{...t,replaceEmptyParentBlock:!0})(n)}}getMarkdown(e){return this.options.htmlToMarkdown(this.store.helpers.getHTML(e))}toggleBoldMarkdown(){return e=>!1}};EL([G()],LL.prototype,`insertMarkdown`,1),EL([Tj()],LL.prototype,`getMarkdown`,1),EL([G()],LL.prototype,`toggleBoldMarkdown`,1),LL=EL([wj({defaultOptions:{htmlToMarkdown:OL,markdownToHtml:IL,htmlSanitizer:void 0,activeNodes:[my.Code],copyAsMarkdown:!1},staticKeys:[`htmlToMarkdown`,`markdownToHtml`,`htmlSanitizer`]})],LL);var RL=Object.defineProperty,zL=Object.getOwnPropertyDescriptor,BL=(e,t,n,r)=>{for(var i=r>1?void 0:r?zL(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&RL(t,n,i),i},VL={icon:`paragraph`,label:({t:e})=>e(LC.INSERT_LABEL),description:({t:e})=>e(LC.INSERT_DESCRIPTION)},HL={icon:`paragraph`,label:({t:e})=>e(LC.CONVERT_LABEL),description:({t:e})=>e(LC.CONVERT_DESCRIPTION)},UL=class extends yj{get name(){return`paragraph`}createTags(){return[my.LastNodeCompatible,my.TextBlock,my.Block,my.FormattingNode]}createNodeSpec(e,t){return{content:`inline*`,draggable:!1,...t,attrs:{...e.defaults()},parseDOM:[{tag:`p`,getAttrs:t=>({...e.parse(t)})},...t.parseDOM??[]],toDOM:t=>[`p`,e.dom(t),0]}}convertParagraph(e={}){let{attrs:t,selection:n,preserveAttrs:r}=e;return this.store.commands.setBlockNodeType.original(this.type,t,n,r)}insertParagraph(e,t={}){let{selection:n,attrs:r}=t;return this.store.commands.insertNode.original(this.type,{content:e,selection:n,attrs:r})}shortcut(e){return this.convertParagraph()(e)}};BL([G(HL)],UL.prototype,`convertParagraph`,1),BL([G(VL)],UL.prototype,`insertParagraph`,1),BL([Ej({shortcut:L.Paragraph,command:`convertParagraph`})],UL.prototype,`shortcut`,1),UL=BL([wj({defaultPriority:_y.Medium})],UL);var WL=Object.defineProperty,GL=Object.getOwnPropertyDescriptor,KL=(e,t,n,r)=>{for(var i=r>1?void 0:r?GL(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&WL(t,n,i),i},qL=class extends _j{get name(){return`placeholder`}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(e,t)=>({...this.options,empty:Rk(t.doc,{ignoreAttributes:!0})}),apply:(e,t,n,r)=>JL({pluginState:t,tr:e,extension:this,state:r})},props:{decorations:e=>YL({state:e,extension:this})}}}onSetOptions(e){let{changes:t}=e;t.placeholder.changed&&this.store.phase>=vy.EditorView&&this.store.updateAttributes()}};qL=KL([wj({defaultOptions:{emptyNodeClass:LM.IS_EMPTY,placeholder:``}})],qL);function JL(e){let{pluginState:t,extension:n,tr:r,state:i}=e;return r.docChanged?{...n.options,empty:Rk(i.doc)}:t}function YL(e){let{extension:t,state:n}=e,{empty:r}=t.pluginKey.getState(n),{emptyNodeClass:i,placeholder:a}=t.options;if(!r)return null;let o=[];return n.doc.descendants((e,t)=>{let n=CD.node(t,t+e.nodeSize,{class:i,"data-placeholder":a});o.push(n)}),ED.create(n.doc,o)}var XL=Object.defineProperty,ZL=Object.getOwnPropertyDescriptor,QL=(e,t,n,r)=>{for(var i=r>1?void 0:r?ZL(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&XL(t,n,i),i},$L=class extends yj{get name(){return`text`}createTags(){return[my.InlineNode]}createNodeSpec(){return{}}};$L=QL([wj({disableExtraAttributes:!0,defaultPriority:_y.Medium})],$L);var eR={...vP.defaultOptions,...UL.defaultOptions,...qP.defaultOptions,excludeExtensions:[]};function tR(e={}){e={...eR,...e};let{content:t,depth:n,getDispatch:r,getState:i,newGroupDelay:a,excludeExtensions:o}=e,s={};for(let e of o??[])s[e]=!0;let c=[];if(!s.history){let e=new qP({depth:n,getDispatch:r,getState:i,newGroupDelay:a});c.push(e)}return s.doc||c.push(new vP({content:t})),s.text||c.push(new $L),s.paragraph||c.push(new UL),s.positioner||c.push(new kN),s.gapCursor||c.push(new UP),s.events||c.push(new DP),c}var nR=Object.defineProperty,rR=Object.getOwnPropertyDescriptor,iR=(e,t,n,r)=>{for(var i=r>1?void 0:r?rR(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&nR(t,n,i),i},aR=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},Y=(e,t,n)=>(aR(e,t,`read from private field`),n?n.call(e):t.get(e)),oR=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},sR=(e,t,n,r)=>(aR(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),cR,lR=class{constructor(){this.portals=new Map,oR(this,cR,sj()),this.on=e=>Y(this,cR).on(`update`,e),this.once=e=>{let t=Y(this,cR).on(`update`,n=>{t(),e(n)});return t}}update(){Y(this,cR).emit(`update`,this.portals)}render({Component:e,container:t}){let n=this.portals.get(t);this.portals.set(t,{Component:e,key:n?.key??fb()}),this.update()}forceUpdate(){for(let[e,{Component:t}]of this.portals)this.portals.set(e,{Component:t,key:fb()})}remove(e){this.portals.delete(e),this.update()}};cR=new WeakMap;var uR=e=>{let{portals:t}=e;return N.createElement(N.Fragment,null,t.map(([e,{Component:t,key:n}])=>(0,Nl.createPortal)(N.createElement(t,null),e,n)))};function dR(e){let[t,n]=(0,N.useState)(()=>Array.from(e.portals.entries()));return(0,N.useEffect)(()=>e.on(e=>{n(Array.from(e.entries()))}),[e]),(0,N.useMemo)(()=>t,[t])}var fR,pR,mR,hR,gR,_R,vR,yR,bR,xR,SR,CR,wR=class{constructor({getPosition:e,node:t,portalContainer:n,view:r,ReactComponent:i,options:a}){oR(this,fR,void 0),oR(this,pR,[]),oR(this,mR,void 0),oR(this,hR,void 0),oR(this,gR,void 0),oR(this,_R,void 0),oR(this,vR,void 0),oR(this,yR,!1),oR(this,bR,void 0),oR(this,xR,void 0),oR(this,SR,void 0),oR(this,CR,e=>{e&&(B(Y(this,xR),{code:R.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${Y(this,fR).type.name}' which doesn't support content.`}),e.append(Y(this,xR)))}),this.Component=()=>{let e=Y(this,gR);return B(e,{code:R.REACT_NODE_VIEW,message:`The custom react node view provided for ${Y(this,fR).type.name} doesn't have a valid ReactComponent`}),N.createElement(e,{updateAttributes:this.updateAttributes,selected:this.selected,view:Y(this,mR),getPosition:Y(this,_R),node:Y(this,fR),forwardRef:Y(this,CR),decorations:Y(this,pR)})},this.updateAttributes=e=>{if(!Y(this,mR).editable)return;let t=Y(this,_R).call(this);if(t==null)return;let n=Y(this,mR).state.tr.setNodeMarkup(t,void 0,{...Y(this,fR).attrs,...e});Y(this,mR).dispatch(n)},B(Xy(e),{message:`You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration.`}),sR(this,fR,t),sR(this,mR,r),sR(this,hR,n),sR(this,gR,i),sR(this,_R,e),sR(this,vR,a),sR(this,SR,this.createDom());let{contentDOM:o,wrapper:s}=this.createContentDom()??{};sR(this,bR,o??void 0),sR(this,xR,s),Y(this,xR)&&Y(this,SR).append(Y(this,xR)),this.setDomAttributes(Y(this,fR),Y(this,SR)),this.Component.displayName=Ay(`${Y(this,fR).type.name}NodeView`),this.renderComponent()}static create(e){let{portalContainer:t,ReactComponent:n,options:r}=e;return(e,i,a)=>new wR({options:r,node:e,view:i,getPosition:a,portalContainer:t,ReactComponent:n})}get selected(){return Y(this,yR)}get contentDOM(){return Y(this,bR)}get dom(){return Y(this,SR)}renderComponent(){Y(this,hR).render({Component:this.Component,container:Y(this,SR)})}createDom(){let{defaultBlockNode:e,defaultInlineNode:t}=Y(this,vR),n=Y(this,fR).isInline?document.createElement(t):document.createElement(e);return n.classList.add(`${jy(Y(this,fR).type.name)}-node-view-wrapper`),n}createContentDom(){var e;if(Y(this,fR).isLeaf)return;let t=(e=Y(this,fR).type.spec).toDOM?.call(e,Y(this,fR));if(!t)return;let{contentDOM:n,dom:r}=Xx.renderSpec(document,t),i;if(ck(r))return i=r,r===n&&(i=document.createElement(`span`),i.classList.add(`${jy(Y(this,fR).type.name)}-node-view-content-wrapper`),i.append(n)),ck(n),{wrapper:i,contentDOM:n}}update(e,t){return lk({types:Y(this,fR).type,node:e})?Y(this,fR)===e&&Y(this,pR)===t?!0:(Y(this,fR).sameMarkup(e)||this.setDomAttributes(e,Y(this,SR)),sR(this,fR,e),sR(this,pR,t),this.renderComponent(),!0):!1}setDomAttributes(e,t){let{toDOM:n}=Y(this,fR).type.spec,r=e.attrs;if(n){let t=n(e);if(Jy(t)||ER(t))return;$y(t[1])&&(r=t[1])}for(let[e,n]of zy(r))t.setAttribute(e,n)}selectNode(){sR(this,yR,!0),Y(this,SR)&&Y(this,SR).classList.add(fy),this.renderComponent()}deselectNode(){sR(this,yR,!1),Y(this,SR)&&Y(this,SR).classList.remove(fy),this.renderComponent()}destroy(){Y(this,hR).remove(Y(this,SR))}ignoreMutation(e){return e.type===`selection`?!Y(this,fR).type.spec.selectable:Y(this,xR)?!Y(this,xR).contains(e.target):!0}stopEvent(e){if(!Y(this,SR))return!1;if(Xy(Y(this,vR).stopEvent))return Y(this,vR).stopEvent({event:e});let t=e.target;if(!(Y(this,SR).contains(t)&&!this.contentDOM?.contains(t)))return!1;let n=e.type===`drop`;if(([`INPUT`,`BUTTON`,`SELECT`,`TEXTAREA`].includes(t.tagName)||t.isContentEditable)&&!n)return!0;let r=!!Y(this,fR).type.spec.draggable,i=lC.isSelectable(Y(this,fR)),a=e.type===`copy`,o=e.type===`paste`,s=e.type===`cut`,c=e.type===`mousedown`,l=e.type.startsWith(`drag`);return!r&&i&&l&&e.preventDefault(),!(l||n||a||o||s||c&&i)}},TR=wR;fR=new WeakMap,pR=new WeakMap,mR=new WeakMap,hR=new WeakMap,gR=new WeakMap,_R=new WeakMap,vR=new WeakMap,yR=new WeakMap,bR=new WeakMap,xR=new WeakMap,SR=new WeakMap,CR=new WeakMap;function ER(e){return sk(e)||$y(e)&&sk(e.dom)}var DR=class extends _j{constructor(){super(...arguments),this.portalContainer=new lR}get name(){return`reactComponent`}onCreate(){this.store.setStoreKey(`portalContainer`,this.portalContainer)}createNodeViews(){let e=z(),t=this.store.managerSettings.nodeViewComponents??{};for(let t of this.store.extensions)!t.ReactComponent||!Sj(t)||t.reactComponentEnvironment===`ssr`||(e[t.name]=TR.create({options:this.options,ReactComponent:t.ReactComponent,portalContainer:this.portalContainer}));let n=zy({...this.options.nodeViewComponents,...t});for(let[t,r]of n)e[t]=TR.create({options:this.options,ReactComponent:r,portalContainer:this.portalContainer});return e}};DR=iR([wj({defaultOptions:{defaultBlockNode:`div`,defaultInlineNode:`span`,defaultContentNode:`span`,defaultEnvironment:`both`,nodeViewComponents:{},stopEvent:null},staticKeys:[`defaultBlockNode`,`defaultInlineNode`,`defaultContentNode`,`defaultEnvironment`]})],DR);var OR=Object.defineProperty,kR=Object.getOwnPropertySymbols,AR=Object.prototype.hasOwnProperty,jR=Object.prototype.propertyIsEnumerable,MR=(e,t,n)=>t in e?OR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NR=(e,t)=>{for(var n in t||={})AR.call(t,n)&&MR(e,n,t[n]);if(kR)for(var n of kR(t))jR.call(t,n)&&MR(e,n,t[n]);return e};function PR(e){let t=(0,N.createContext)(null);return[n=>{let r=e(n);return N.createElement(t.Provider,{value:r},n.children)},FR(t),t]}function FR(e){return(t,n)=>{let r=(0,N.useContext)(e),i=IR(r);if(!r)throw Error("`useContextHook` must be placed inside the `Provider` returned by the `createContextState` method");if(!t)return r;if(typeof t!=`function`)throw TypeError("invalid arguments passed to `useContextHook`. This hook must be called with zero arguments, a getter function or a path string.");let a=t(r);if(!i||!n)return a;let o=t(i);return n(o,a)?o:a}}function IR(e){let t=(0,N.useRef)();return LR(()=>{t.current=e}),t.current}var LR=typeof document<`u`?N.useLayoutEffect:N.useEffect;function RR(e,t){return PR(n=>{let r=(0,N.useRef)(null),i=(0,N.useRef)(),a=t?.(n),[o,s]=(0,N.useState)(()=>e({get:zR(r),set:BR(i),previousContext:void 0,props:n,state:a})),c=[...Object.values(n),a];return(0,N.useEffect)(()=>{c.length!==0&&s(t=>e({get:zR(r),set:BR(i),previousContext:t,props:n,state:a}))},c),r.current=o,i.current=s,o})}function zR(e){return t=>{if(!e.current)throw Error("`get` called outside of function scope. `get` can only be called within a function.");if(!t)return e.current;if(typeof t!=`function`)throw TypeError("Invalid arguments passed to `useContextHook`. The hook must be called with zero arguments, a getter function or a path string.");return t(e.current)}}function BR(e){return t=>{if(!e.current)throw Error("`set` called outside of function scope. `set` can only be called within a function.");e.current(e=>NR(NR({},e),typeof t==`function`?t(e):t))}}var VR=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.errorMessages=e.ErrorType=void 0;var t;(function(e){e.MalformedUnicode=`MALFORMED_UNICODE`,e.MalformedHexadecimal=`MALFORMED_HEXADECIMAL`,e.CodePointLimit=`CODE_POINT_LIMIT`,e.OctalDeprecation=`OCTAL_DEPRECATION`,e.EndOfString=`END_OF_STRING`})(t=e.ErrorType||={}),e.errorMessages=new Map([[t.MalformedUnicode,`malformed Unicode character escape sequence`],[t.MalformedHexadecimal,`malformed hexadecimal character escape sequence`],[t.CodePointLimit,`Unicode codepoint must not be greater than 0x10FFFF in escape sequence`],[t.OctalDeprecation,`"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead`],[t.EndOfString,`malformed escape sequence at end of string`]])})),HR=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.unraw=e.errorMessages=e.ErrorType=void 0;var t=VR();Object.defineProperty(e,`ErrorType`,{enumerable:!0,get:function(){return t.ErrorType}}),Object.defineProperty(e,`errorMessages`,{enumerable:!0,get:function(){return t.errorMessages}});function n(e){return e.match(/[^a-f0-9]/i)?NaN:parseInt(e,16)}function r(e,r,i){let a=n(e);if(Number.isNaN(a)||i!==void 0&&i!==e.length)throw SyntaxError(t.errorMessages.get(r));return a}function i(e){let n=r(e,t.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(n)}function a(e,n){let i=r(e,t.ErrorType.MalformedUnicode,4);if(n!==void 0){let e=r(n,t.ErrorType.MalformedUnicode,4);return String.fromCharCode(i,e)}return String.fromCharCode(i)}function o(e){return e.charAt(0)===`{`&&e.charAt(e.length-1)===`}`}function s(e){if(!o(e))throw SyntaxError(t.errorMessages.get(t.ErrorType.MalformedUnicode));let n=r(e.slice(1,-1),t.ErrorType.MalformedUnicode);try{return String.fromCodePoint(n)}catch(e){throw e instanceof RangeError?SyntaxError(t.errorMessages.get(t.ErrorType.CodePointLimit)):e}}function c(e,n=!1){if(n)throw SyntaxError(t.errorMessages.get(t.ErrorType.OctalDeprecation));let r=parseInt(e,8);return String.fromCharCode(r)}var l=new Map([[`b`,`\b`],[`f`,`\f`],[`n`,`
177
- `],[`r`,`\r`],[`t`,` `],[`v`,`\v`],[`0`,`\0`]]);function u(e){return l.get(e)||e}var d=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function f(e,n=!1){return e.replace(d,function(e,r,o,l,d,f,p,m,h){if(r!==void 0)return`\\`;if(o!==void 0)return i(o);if(l!==void 0)return s(l);if(d!==void 0)return a(d,f);if(p!==void 0)return a(p);if(m===`0`)return`\0`;if(m!==void 0)return c(m,!n);if(h!==void 0)return u(h);throw SyntaxError(t.errorMessages.get(t.ErrorType.EndOfString))})}e.unraw=f}))(),UR=e=>typeof e==`string`,WR=e=>typeof e==`function`,GR=new Map,KR=`en`;function qR(e){return[...Array.isArray(e)?e:[e],KR]}function JR(e,t,n){let r=qR(e);return ZR(()=>QR(`date`,r,n),()=>new Intl.DateTimeFormat(r,n)).format(UR(t)?new Date(t):t)}function YR(e,t,n){let r=qR(e);return ZR(()=>QR(`number`,r,n),()=>new Intl.NumberFormat(r,n)).format(t)}function XR(e,t,n,{offset:r=0,...i}){let a=qR(e),o=t?ZR(()=>QR(`plural-ordinal`,a),()=>new Intl.PluralRules(a,{type:`ordinal`})):ZR(()=>QR(`plural-cardinal`,a),()=>new Intl.PluralRules(a,{type:`cardinal`}));return i[n]??i[o.select(n-r)]??i.other}function ZR(e,t){let n=e(),r=GR.get(n);return r||(r=t(),GR.set(n,r)),r}function QR(e,t,n){return`${e}-${t.join(`-`)}-${JSON.stringify(n)}`}var $R=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,ez=`%__lingui_octothorpe__%`,tz=(e,t,n={})=>{let r=t||e,i=e=>typeof e==`object`?e:n[e]||{style:e},a=(e,t)=>{let a=YR(r,e,Object.keys(n).length?i(`number`):void 0);return t.replace(new RegExp(ez,`g`),a)};return{plural:(e,t)=>{let{offset:n=0}=t,i=XR(r,!1,e,t);return a(e-n,i)},selectordinal:(e,t)=>{let{offset:n=0}=t,i=XR(r,!0,e,t);return a(e-n,i)},select:nz,number:(e,t)=>YR(r,e,i(t)),date:(e,t)=>JR(r,e,i(t))}},nz=(e,t)=>t[e]??t.other;function rz(e,t,n){return(r={},i)=>{let a=tz(t,n,i),o=(e,t=!1)=>Array.isArray(e)?e.reduce((e,n)=>{if(n===`#`&&t)return e+ez;if(UR(n))return e+n;let[i,s,c]=n,l={};s===`plural`||s===`selectordinal`||s===`select`?Object.entries(c).forEach(([e,t])=>{l[e]=o(t,s===`plural`||s===`selectordinal`)}):l=c;let u;if(s){let e=a[s];u=e(r[i],l)}else u=r[i];return u==null?e:e+u},``):e,s=o(e);return UR(s)&&$R.test(s)?(0,HR.unraw)(s.trim()):UR(s)?s.trim():s?String(s):``}}var iz=Object.defineProperty,az=(e,t,n)=>t in e?iz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oz=(e,t,n)=>(az(e,typeof t==`symbol`?t:t+``,n),n),sz=class{constructor(){oz(this,`_events`,{})}on(e,t){var n;return(n=this._events)[e]??(n[e]=[]),this._events[e].push(t),()=>this.removeListener(e,t)}removeListener(e,t){let n=this._getListeners(e);if(!n)return;let r=n.indexOf(t);~r&&n.splice(r,1)}emit(e,...t){let n=this._getListeners(e);n&&n.map(e=>e.apply(this,t))}_getListeners(e){let t=this._events[e];return Array.isArray(t)?t:!1}},cz=Object.defineProperty,lz=(e,t,n)=>t in e?cz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uz=(e,t,n)=>(lz(e,typeof t==`symbol`?t:t+``,n),n),dz=class extends sz{constructor(e){super(),uz(this,`_locale`,``),uz(this,`_locales`),uz(this,`_localeData`,{}),uz(this,`_messages`,{}),uz(this,`_missing`),uz(this,`t`,this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale==`string`||e.locales)&&this.activate(e.locale??KR,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,t){let n=this._localeData[e];n?Object.assign(n,t):this._localeData[e]=t}loadLocaleData(e,t){t==null?Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])):this._loadLocaleData(e,t),this.emit(`change`)}_load(e,t){let n=this._messages[e];n?Object.assign(n,t):this._messages[e]=t}load(e,t){typeof e==`string`&&typeof t==`object`?this._load(e,t):Object.entries(e).forEach(([e,t])=>this._load(e,t)),this.emit(`change`)}loadAndActivate({locale:e,locales:t,messages:n}){this._locale=e,this._locales=t||void 0,this._messages[this._locale]=n,this.emit(`change`)}activate(e,t){this._locale=e,this._locales=t,this.emit(`change`)}_(e,t,n){let r=n?.message;e||=``,UR(e)||(t=e.values||t,r=e.message,e=e.id);let i=this.messages[e],a=i===void 0,o=this._missing;if(o&&a)return WR(o)?o(this._locale,e):o;a&&this.emit(`missing`,{id:e,locale:this._locale});let s=i||r||e;return UR(s)&&$R.test(s)?JSON.parse(`"${s}"`):UR(s)?s:rz(s,this._locale,this._locales)(t,n?.formats)}date(e,t){return JR(this._locales||this._locale,e,t)}number(e,t){return YR(this._locales||this._locale,e,t)}};function fz(e={}){return new dz(e)}var pz=fz(),mz=r({_in:()=>yz,af:()=>bz,ak:()=>xz,am:()=>Sz,an:()=>Cz,ar:()=>wz,ars:()=>Tz,as:()=>Ez,asa:()=>Dz,ast:()=>Oz,az:()=>kz,be:()=>Az,bem:()=>jz,bez:()=>Mz,bg:()=>Nz,bho:()=>Pz,bm:()=>Fz,bn:()=>Iz,bo:()=>Lz,br:()=>Rz,brx:()=>zz,bs:()=>Bz,ca:()=>Vz,ce:()=>Hz,ceb:()=>Uz,cgg:()=>Wz,chr:()=>Gz,ckb:()=>Kz,cs:()=>qz,cy:()=>Jz,da:()=>Yz,de:()=>Xz,dsb:()=>Zz,dv:()=>Qz,dz:()=>$z,ee:()=>eB,el:()=>tB,en:()=>nB,eo:()=>rB,es:()=>iB,et:()=>aB,eu:()=>oB,fa:()=>sB,ff:()=>cB,fi:()=>lB,fil:()=>uB,fo:()=>dB,fr:()=>fB,fur:()=>pB,fy:()=>mB,ga:()=>hB,gd:()=>gB,gl:()=>_B,gsw:()=>vB,gu:()=>yB,guw:()=>bB,gv:()=>xB,ha:()=>SB,haw:()=>CB,he:()=>wB,hi:()=>TB,hr:()=>EB,hsb:()=>DB,hu:()=>OB,hy:()=>kB,ia:()=>AB,id:()=>jB,ig:()=>MB,ii:()=>NB,io:()=>PB,is:()=>FB,it:()=>IB,iu:()=>LB,iw:()=>RB,ja:()=>zB,jbo:()=>BB,jgo:()=>VB,ji:()=>HB,jmc:()=>UB,jv:()=>WB,jw:()=>GB,ka:()=>KB,kab:()=>qB,kaj:()=>JB,kcg:()=>YB,kde:()=>XB,kea:()=>ZB,kk:()=>QB,kkj:()=>$B,kl:()=>eV,km:()=>tV,kn:()=>nV,ko:()=>rV,ks:()=>iV,ksb:()=>aV,ksh:()=>oV,ku:()=>sV,kw:()=>cV,ky:()=>lV,lag:()=>uV,lb:()=>dV,lg:()=>fV,lkt:()=>pV,ln:()=>mV,lo:()=>hV,lt:()=>gV,lv:()=>_V,mas:()=>vV,mg:()=>yV,mgo:()=>bV,mk:()=>xV,ml:()=>SV,mn:()=>CV,mo:()=>wV,mr:()=>TV,ms:()=>EV,mt:()=>DV,my:()=>OV,nah:()=>kV,naq:()=>AV,nb:()=>jV,nd:()=>MV,ne:()=>NV,nl:()=>PV,nn:()=>FV,nnh:()=>IV,no:()=>LV,nqo:()=>RV,nr:()=>zV,nso:()=>BV,ny:()=>VV,nyn:()=>HV,om:()=>UV,or:()=>WV,os:()=>GV,osa:()=>KV,pa:()=>qV,pap:()=>JV,pl:()=>YV,prg:()=>XV,ps:()=>ZV,pt:()=>QV,pt_PT:()=>$V,rm:()=>eH,ro:()=>tH,rof:()=>nH,root:()=>rH,ru:()=>iH,rwk:()=>aH,sah:()=>oH,saq:()=>sH,sc:()=>cH,scn:()=>lH,sd:()=>uH,sdh:()=>dH,se:()=>fH,seh:()=>pH,ses:()=>mH,sg:()=>hH,sh:()=>gH,shi:()=>_H,si:()=>vH,sk:()=>yH,sl:()=>bH,sma:()=>xH,smi:()=>SH,smj:()=>CH,smn:()=>wH,sms:()=>TH,sn:()=>EH,so:()=>DH,sq:()=>OH,sr:()=>kH,ss:()=>AH,ssy:()=>jH,st:()=>MH,su:()=>NH,sv:()=>PH,sw:()=>FH,syr:()=>IH,ta:()=>LH,te:()=>RH,teo:()=>zH,th:()=>BH,ti:()=>VH,tig:()=>HH,tk:()=>UH,tl:()=>WH,tn:()=>GH,to:()=>KH,tr:()=>qH,ts:()=>JH,tzm:()=>YH,ug:()=>XH,uk:()=>ZH,ur:()=>QH,uz:()=>$H,ve:()=>eU,vi:()=>tU,vo:()=>nU,vun:()=>rU,wa:()=>iU,wae:()=>aU,wo:()=>oU,xh:()=>sU,xog:()=>cU,yi:()=>lU,yo:()=>uU,yue:()=>dU,zh:()=>fU,zu:()=>pU},1);function X(e,t){return t?`other`:e==1?`one`:`other`}function hz(e,t){return t?`other`:e==0||e==1?`one`:`other`}function gz(e,t){var n=!String(e).split(`.`)[1];return t?`other`:e==1&&n?`one`:`other`}function _z(e,t){return`other`}function vz(e,t){return t?`other`:e==1?`one`:e==2?`two`:`other`}const yz=_z,bz=X,xz=hz;function Sz(e,t){return t?`other`:e>=0&&e<=1?`one`:`other`}const Cz=X;function wz(e,t){var n=String(e).split(`.`),r=Number(n[0])==e&&n[0].slice(-2);return t?`other`:e==0?`zero`:e==1?`one`:e==2?`two`:r>=3&&r<=10?`few`:r>=11&&r<=99?`many`:`other`}function Tz(e,t){var n=String(e).split(`.`),r=Number(n[0])==e&&n[0].slice(-2);return t?`other`:e==0?`zero`:e==1?`one`:e==2?`two`:r>=3&&r<=10?`few`:r>=11&&r<=99?`many`:`other`}function Ez(e,t){return t?e==1||e==5||e==7||e==8||e==9||e==10?`one`:e==2||e==3?`two`:e==4?`few`:e==6?`many`:`other`:e>=0&&e<=1?`one`:`other`}const Dz=X,Oz=gz;function kz(e,t){var n=String(e).split(`.`)[0],r=n.slice(-1),i=n.slice(-2),a=n.slice(-3);return t?r==1||r==2||r==5||r==7||r==8||i==20||i==50||i==70||i==80?`one`:r==3||r==4||a==100||a==200||a==300||a==400||a==500||a==600||a==700||a==800||a==900?`few`:n==0||r==6||i==40||i==60||i==90?`many`:`other`:e==1?`one`:`other`}function Az(e,t){var n=String(e).split(`.`),r=Number(n[0])==e,i=r&&n[0].slice(-1),a=r&&n[0].slice(-2);return t?(i==2||i==3)&&a!=12&&a!=13?`few`:`other`:i==1&&a!=11?`one`:i>=2&&i<=4&&(a<12||a>14)?`few`:r&&i==0||i>=5&&i<=9||a>=11&&a<=14?`many`:`other`}const jz=X,Mz=X,Nz=X,Pz=hz,Fz=_z;function Iz(e,t){return t?e==1||e==5||e==7||e==8||e==9||e==10?`one`:e==2||e==3?`two`:e==4?`few`:e==6?`many`:`other`:e>=0&&e<=1?`one`:`other`}const Lz=_z;function Rz(e,t){var n=String(e).split(`.`),r=Number(n[0])==e,i=r&&n[0].slice(-1),a=r&&n[0].slice(-2),o=r&&n[0].slice(-6);return t?`other`:i==1&&a!=11&&a!=71&&a!=91?`one`:i==2&&a!=12&&a!=72&&a!=92?`two`:(i==3||i==4||i==9)&&(a<10||a>19)&&(a<70||a>79)&&(a<90||a>99)?`few`:e!=0&&r&&o==0?`many`:`other`}const zz=X;function Bz(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-1),s=r.slice(-2),c=i.slice(-1),l=i.slice(-2);return t?`other`:a&&o==1&&s!=11||c==1&&l!=11?`one`:a&&o>=2&&o<=4&&(s<12||s>14)||c>=2&&c<=4&&(l<12||l>14)?`few`:`other`}function Vz(e,t){var n=!String(e).split(`.`)[1];return t?e==1||e==3?`one`:e==2?`two`:e==4?`few`:`other`:e==1&&n?`one`:`other`}const Hz=X;function Uz(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-1),s=i.slice(-1);return t?`other`:a&&(r==1||r==2||r==3)||a&&o!=4&&o!=6&&o!=9||!a&&s!=4&&s!=6&&s!=9?`one`:`other`}const Wz=X,Gz=X,Kz=X;function qz(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1];return t?`other`:e==1&&i?`one`:r>=2&&r<=4&&i?`few`:i?`other`:`many`}function Jz(e,t){return t?e==0||e==7||e==8||e==9?`zero`:e==1?`one`:e==2?`two`:e==3||e==4?`few`:e==5||e==6?`many`:`other`:e==0?`zero`:e==1?`one`:e==2?`two`:e==3?`few`:e==6?`many`:`other`}function Yz(e,t){var n=String(e).split(`.`),r=n[0],i=Number(n[0])==e;return t?`other`:e==1||!i&&(r==0||r==1)?`one`:`other`}const Xz=gz;function Zz(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-2),s=i.slice(-2);return t?`other`:a&&o==1||s==1?`one`:a&&o==2||s==2?`two`:a&&(o==3||o==4)||s==3||s==4?`few`:`other`}const Qz=X,$z=_z,eB=X,tB=X;function nB(e,t){var n=String(e).split(`.`),r=!n[1],i=Number(n[0])==e,a=i&&n[0].slice(-1),o=i&&n[0].slice(-2);return t?a==1&&o!=11?`one`:a==2&&o!=12?`two`:a==3&&o!=13?`few`:`other`:e==1&&r?`one`:`other`}const rB=X,iB=X,aB=gz,oB=X;function sB(e,t){return t?`other`:e>=0&&e<=1?`one`:`other`}function cB(e,t){return t?`other`:e>=0&&e<2?`one`:`other`}const lB=gz;function uB(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-1),s=i.slice(-1);return t?e==1?`one`:`other`:a&&(r==1||r==2||r==3)||a&&o!=4&&o!=6&&o!=9||!a&&s!=4&&s!=6&&s!=9?`one`:`other`}const dB=X;function fB(e,t){return t?e==1?`one`:`other`:e>=0&&e<2?`one`:`other`}const pB=X,mB=gz;function hB(e,t){var n=String(e).split(`.`),r=Number(n[0])==e;return t?e==1?`one`:`other`:e==1?`one`:e==2?`two`:r&&e>=3&&e<=6?`few`:r&&e>=7&&e<=10?`many`:`other`}function gB(e,t){var n=String(e).split(`.`),r=Number(n[0])==e;return t?e==1||e==11?`one`:e==2||e==12?`two`:e==3||e==13?`few`:`other`:e==1||e==11?`one`:e==2||e==12?`two`:r&&e>=3&&e<=10||r&&e>=13&&e<=19?`few`:`other`}const _B=gz,vB=X;function yB(e,t){return t?e==1?`one`:e==2||e==3?`two`:e==4?`few`:e==6?`many`:`other`:e>=0&&e<=1?`one`:`other`}const bB=hz;function xB(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1],a=r.slice(-1),o=r.slice(-2);return t?`other`:i&&a==1?`one`:i&&a==2?`two`:i&&(o==0||o==20||o==40||o==60||o==80)?`few`:i?`other`:`many`}const SB=X,CB=X;function wB(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1],a=Number(n[0])==e,o=a&&n[0].slice(-1);return t?`other`:e==1&&i?`one`:r==2&&i?`two`:i&&(e<0||e>10)&&a&&o==0?`many`:`other`}function TB(e,t){return t?e==1?`one`:e==2||e==3?`two`:e==4?`few`:e==6?`many`:`other`:e>=0&&e<=1?`one`:`other`}function EB(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-1),s=r.slice(-2),c=i.slice(-1),l=i.slice(-2);return t?`other`:a&&o==1&&s!=11||c==1&&l!=11?`one`:a&&o>=2&&o<=4&&(s<12||s>14)||c>=2&&c<=4&&(l<12||l>14)?`few`:`other`}function DB(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-2),s=i.slice(-2);return t?`other`:a&&o==1||s==1?`one`:a&&o==2||s==2?`two`:a&&(o==3||o==4)||s==3||s==4?`few`:`other`}function OB(e,t){return t?e==1||e==5?`one`:`other`:e==1?`one`:`other`}function kB(e,t){return t?e==1?`one`:`other`:e>=0&&e<2?`one`:`other`}const AB=gz,jB=_z,MB=_z,NB=_z,PB=gz;function FB(e,t){var n=String(e).split(`.`),r=n[0],i=Number(n[0])==e,a=r.slice(-1),o=r.slice(-2);return t?`other`:i&&a==1&&o!=11||!i?`one`:`other`}function IB(e,t){var n=!String(e).split(`.`)[1];return t?e==11||e==8||e==80||e==800?`many`:`other`:e==1&&n?`one`:`other`}const LB=vz;function RB(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1],a=Number(n[0])==e,o=a&&n[0].slice(-1);return t?`other`:e==1&&i?`one`:r==2&&i?`two`:i&&(e<0||e>10)&&a&&o==0?`many`:`other`}const zB=_z,BB=_z,VB=X,HB=gz,UB=X,WB=_z,GB=_z;function KB(e,t){var n=String(e).split(`.`)[0],r=n.slice(-2);return t?n==1?`one`:n==0||r>=2&&r<=20||r==40||r==60||r==80?`many`:`other`:e==1?`one`:`other`}function qB(e,t){return t?`other`:e>=0&&e<2?`one`:`other`}const JB=X,YB=X,XB=_z,ZB=_z;function QB(e,t){var n=String(e).split(`.`),r=Number(n[0])==e,i=r&&n[0].slice(-1);return t?i==6||i==9||r&&i==0&&e!=0?`many`:`other`:e==1?`one`:`other`}const $B=X,eV=X,tV=_z;function nV(e,t){return t?`other`:e>=0&&e<=1?`one`:`other`}const rV=_z,iV=X,aV=X;function oV(e,t){return t?`other`:e==0?`zero`:e==1?`one`:`other`}const sV=X;function cV(e,t){var n=String(e).split(`.`),r=Number(n[0])==e,i=r&&n[0].slice(-2),a=r&&n[0].slice(-3),o=r&&n[0].slice(-5),s=r&&n[0].slice(-6);return t?r&&e>=1&&e<=4||i>=1&&i<=4||i>=21&&i<=24||i>=41&&i<=44||i>=61&&i<=64||i>=81&&i<=84?`one`:e==5||i==5?`many`:`other`:e==0?`zero`:e==1?`one`:i==2||i==22||i==42||i==62||i==82||r&&a==0&&(o>=1e3&&o<=2e4||o==4e4||o==6e4||o==8e4)||e!=0&&s==1e5?`two`:i==3||i==23||i==43||i==63||i==83?`few`:e!=1&&(i==1||i==21||i==41||i==61||i==81)?`many`:`other`}const lV=X;function uV(e,t){var n=String(e).split(`.`)[0];return t?`other`:e==0?`zero`:(n==0||n==1)&&e!=0?`one`:`other`}const dV=X,fV=X,pV=_z,mV=hz;function hV(e,t){return t&&e==1?`one`:`other`}function gV(e,t){var n=String(e).split(`.`),r=n[1]||``,i=Number(n[0])==e,a=i&&n[0].slice(-1),o=i&&n[0].slice(-2);return t?`other`:a==1&&(o<11||o>19)?`one`:a>=2&&a<=9&&(o<11||o>19)?`few`:r==0?`other`:`many`}function _V(e,t){var n=String(e).split(`.`),r=n[1]||``,i=r.length,a=Number(n[0])==e,o=a&&n[0].slice(-1),s=a&&n[0].slice(-2),c=r.slice(-2),l=r.slice(-1);return t?`other`:a&&o==0||s>=11&&s<=19||i==2&&c>=11&&c<=19?`zero`:o==1&&s!=11||i==2&&l==1&&c!=11||i!=2&&l==1?`one`:`other`}const vV=X,yV=hz,bV=X;function xV(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-1),s=r.slice(-2),c=i.slice(-1),l=i.slice(-2);return t?o==1&&s!=11?`one`:o==2&&s!=12?`two`:(o==7||o==8)&&s!=17&&s!=18?`many`:`other`:a&&o==1&&s!=11||c==1&&l!=11?`one`:`other`}const SV=X,CV=X;function wV(e,t){var n=String(e).split(`.`),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?e==1?`one`:`other`:e==1&&r?`one`:!r||e==0||i>=2&&i<=19?`few`:`other`}function TV(e,t){return t?e==1?`one`:e==2||e==3?`two`:e==4?`few`:`other`:e==1?`one`:`other`}function EV(e,t){return t&&e==1?`one`:`other`}function DV(e,t){var n=String(e).split(`.`),r=Number(n[0])==e&&n[0].slice(-2);return t?`other`:e==1?`one`:e==0||r>=2&&r<=10?`few`:r>=11&&r<=19?`many`:`other`}const OV=_z,kV=X,AV=vz,jV=X,MV=X;function NV(e,t){var n=String(e).split(`.`),r=Number(n[0])==e;return t?r&&e>=1&&e<=4?`one`:`other`:e==1?`one`:`other`}const PV=gz,FV=X,IV=X,LV=X,RV=_z,zV=X,BV=hz,VV=X,HV=X,UV=X;function WV(e,t){var n=String(e).split(`.`),r=Number(n[0])==e;return t?e==1||e==5||r&&e>=7&&e<=9?`one`:e==2||e==3?`two`:e==4?`few`:e==6?`many`:`other`:e==1?`one`:`other`}const GV=X,KV=_z,qV=hz,JV=X;function YV(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1],a=r.slice(-1),o=r.slice(-2);return t?`other`:e==1&&i?`one`:i&&a>=2&&a<=4&&(o<12||o>14)?`few`:i&&r!=1&&(a==0||a==1)||i&&a>=5&&a<=9||i&&o>=12&&o<=14?`many`:`other`}function XV(e,t){var n=String(e).split(`.`),r=n[1]||``,i=r.length,a=Number(n[0])==e,o=a&&n[0].slice(-1),s=a&&n[0].slice(-2),c=r.slice(-2),l=r.slice(-1);return t?`other`:a&&o==0||s>=11&&s<=19||i==2&&c>=11&&c<=19?`zero`:o==1&&s!=11||i==2&&l==1&&c!=11||i!=2&&l==1?`one`:`other`}const ZV=X;function QV(e,t){var n=String(e).split(`.`)[0];return t?`other`:n==0||n==1?`one`:`other`}const $V=gz,eH=X;function tH(e,t){var n=String(e).split(`.`),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?e==1?`one`:`other`:e==1&&r?`one`:!r||e==0||i>=2&&i<=19?`few`:`other`}const nH=X,rH=_z;function iH(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1],a=r.slice(-1),o=r.slice(-2);return t?`other`:i&&a==1&&o!=11?`one`:i&&a>=2&&a<=4&&(o<12||o>14)?`few`:i&&a==0||i&&a>=5&&a<=9||i&&o>=11&&o<=14?`many`:`other`}const aH=X,oH=_z,sH=X;function cH(e,t){var n=!String(e).split(`.`)[1];return t?e==11||e==8||e==80||e==800?`many`:`other`:e==1&&n?`one`:`other`}function lH(e,t){var n=!String(e).split(`.`)[1];return t?e==11||e==8||e==80||e==800?`many`:`other`:e==1&&n?`one`:`other`}const uH=X,dH=X,fH=vz,pH=X,mH=_z,hH=_z;function gH(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-1),s=r.slice(-2),c=i.slice(-1),l=i.slice(-2);return t?`other`:a&&o==1&&s!=11||c==1&&l!=11?`one`:a&&o>=2&&o<=4&&(s<12||s>14)||c>=2&&c<=4&&(l<12||l>14)?`few`:`other`}function _H(e,t){var n=String(e).split(`.`),r=Number(n[0])==e;return t?`other`:e>=0&&e<=1?`one`:r&&e>=2&&e<=10?`few`:`other`}function vH(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``;return t?`other`:e==0||e==1||r==0&&i==1?`one`:`other`}function yH(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1];return t?`other`:e==1&&i?`one`:r>=2&&r<=4&&i?`few`:i?`other`:`many`}function bH(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1],a=r.slice(-2);return t?`other`:i&&a==1?`one`:i&&a==2?`two`:i&&(a==3||a==4)||!i?`few`:`other`}const xH=vz,SH=vz,CH=vz,wH=vz,TH=vz,EH=X,DH=X;function OH(e,t){var n=String(e).split(`.`),r=Number(n[0])==e,i=r&&n[0].slice(-1),a=r&&n[0].slice(-2);return t?e==1?`one`:i==4&&a!=14?`many`:`other`:e==1?`one`:`other`}function kH(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-1),s=r.slice(-2),c=i.slice(-1),l=i.slice(-2);return t?`other`:a&&o==1&&s!=11||c==1&&l!=11?`one`:a&&o>=2&&o<=4&&(s<12||s>14)||c>=2&&c<=4&&(l<12||l>14)?`few`:`other`}const AH=X,jH=X,MH=X,NH=_z;function PH(e,t){var n=String(e).split(`.`),r=!n[1],i=Number(n[0])==e,a=i&&n[0].slice(-1),o=i&&n[0].slice(-2);return t?(a==1||a==2)&&o!=11&&o!=12?`one`:`other`:e==1&&r?`one`:`other`}const FH=gz,IH=X,LH=X,RH=X,zH=X,BH=_z,VH=hz,HH=X;function UH(e,t){var n=String(e).split(`.`),r=Number(n[0])==e&&n[0].slice(-1);return t?r==6||r==9||e==10?`few`:`other`:e==1?`one`:`other`}function WH(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-1),s=i.slice(-1);return t?e==1?`one`:`other`:a&&(r==1||r==2||r==3)||a&&o!=4&&o!=6&&o!=9||!a&&s!=4&&s!=6&&s!=9?`one`:`other`}const GH=X,KH=_z,qH=X,JH=X;function YH(e,t){var n=String(e).split(`.`),r=Number(n[0])==e;return t?`other`:e==0||e==1||r&&e>=11&&e<=99?`one`:`other`}const XH=X;function ZH(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1],a=Number(n[0])==e,o=a&&n[0].slice(-1),s=a&&n[0].slice(-2),c=r.slice(-1),l=r.slice(-2);return t?o==3&&s!=13?`few`:`other`:i&&c==1&&l!=11?`one`:i&&c>=2&&c<=4&&(l<12||l>14)?`few`:i&&c==0||i&&c>=5&&c<=9||i&&l>=11&&l<=14?`many`:`other`}const QH=gz,$H=X,eU=X;function tU(e,t){return t&&e==1?`one`:`other`}const nU=X,rU=X,iU=hz,aU=X,oU=_z,sU=X,cU=X,lU=gz,uU=_z,dU=_z,fU=_z;function pU(e,t){return t?`other`:e>=0&&e<=1?`one`:`other`}var mU=Object.defineProperty,hU=Object.getOwnPropertyDescriptor,gU=Object.getOwnPropertyNames,_U=Object.prototype.hasOwnProperty,vU=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of gU(t))!_U.call(e,i)&&i!==n&&mU(e,i,{get:()=>t[i],enumerable:!(r=hU(t,i))||r.enumerable});return e},yU=(e,t,n)=>(vU(e,t,`default`),n&&vU(n,t,`default`)),bU=JSON.parse(`{"extension.command.toggle-upper-case.label":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"extension.table.column_count":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"extension.table.row_count":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.toggle-columns.description":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"extension.command.toggle-columns.label":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"extension.command.set-text-direction.label":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"extension.command.set-text-direction.description":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"extension.command.toggle-heading.label":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"extension.command.toggle-callout.description":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"extension.command.toggle-callout.label":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"extension.command.toggle-code-block.description":"Add a code block","extension.command.add-annotation.label":"Add annotation","extension.command.toggle-blockquote.description":"Add blockquote formatting to the selected text","extension.command.toggle-bold.description":"Add bold formatting to the selected text","extension.command.toggle-code.description":"Add inline code formatting to the selected text","keyboard.shortcut.alt":"Alt","keyboard.shortcut.arrowDown":"Arrow Down","keyboard.shortcut.arrowLeft":"Arrow Left","keyboard.shortcut.arrowRight":"Arrow Right","keyboard.shortcut.arrowUp":"Arrow Up","keyboard.shortcut.backspace":"Backspace","ui.text-color.black":"Black","extension.command.toggle-blockquote.label":"Blockquote","ui.text-color.blue":"Blue","ui.text-color.blue.hue":["Blue ",["hue"]],"extension.command.toggle-bold.label":"Bold","extension.command.toggle-bullet-list.description":"Bulleted list","keyboard.shortcut.capsLock":"Caps Lock","extension.command.center-align.label":"Center align","extension.command.toggle-code.label":"Code","extension.command.toggle-code-block.label":"Codeblock","keyboard.shortcut.command":"Command","QcPNd6":"Image description","ogrUzJ":"Add a short description here.","yqdyzr":"Image","6/02F4":"Image source","X8H91v":"Image","zhQ7Zt":"Italic","ZL7E7l":"Underline","keyboard.shortcut.control":"Control","extension.command.convert-paragraph.description":"Convert current block into a paragraph block.","extension.command.convert-paragraph.label":"Convert Paragraph","extension.command.copy.label":"Copy","extension.command.copy.description":"Copy the selected text","extension.command.create-table.description":"Create a table with set number of rows and columns.","extension.command.create-table.label":"Create table","extension.command.cut.label":"Cut","extension.command.cut.description":"Cut the selected text","ui.text-color.cyan":"Cyan","ui.text-color.cyan.hue":["Cyan ",["hue"]],"extension.command.decrease-font-size.label":"Decrease","extension.command.decrease-indent.label":"Decrease indentation","extension.command.decrease-font-size.description":"Decrease the font size.","keyboard.shortcut.delete":"Delete","extension.command.insert-horizontal-rule.label":"Divider","keyboard.shortcut.end":"End","keyboard.shortcut.escape":"Enter","keyboard.shortcut.enter":"Enter","6PjrOF":"Add annotation","OTq5WC":"Center align","oeZ3ox":"Convert current block into a paragraph block.","m1khs+":"Convert Paragraph","w/1U+3":"Copy the selected text","kdodi0":"Copy","k0KR/u":"Create a table with set number of rows and columns.","zrwMyD":"Create table","D/nWxh":"Cut the selected text","jHPv5m":"Cut","5cNgRx":"Decrease the font size.","vyRNWx":"Decrease","Jgiol4":"Decrease indentation","1gJSHH":"Increase the font size","OQXJXz":"Increase","72TLhr":"Increase indentation","HFlfzJ":"Insert Emoji","RPq9fY":"Separate content with a diving horizontal line","OKQF+e":"Divider","zjYb9C":"Insert a new paragraph","4M4sXC":"Insert Paragraph","1Q+eVc":"Justify","ejWWtP":"Left align","wVqrpS":"Paste content into the editor","07v9aw":"Paste","zUYfou":"Redo the most recent action","9Nq9zr":"Redo","0uxaZe":"Remove annotation","iJWZAz":"Right align","g5WpPn":"Select all content within the editor","2+pZDT":"Select all","yChCR1":"Set text case","GMzAC/":"Set the font size for the selected text.","vzEyrv":"Font size","7VCkJ8":"Set the text color for the selected text.","qjWFaR":"Text color","LVWgFu":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"WXwRy1":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"G/o315":"Set the text highlight color for the selected text.","xtHg6d":"Text highlight","1p1W/p":"Add blockquote formatting to the selected text","6+rh6I":"Blockquote","0yB3LV":"Add bold formatting to the selected text","sFMo4Z":"Bold","SMKG/s":"Bulleted list","/BYCMi":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"V+3IBe":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"hbIo4L":"Add a code block","7GkMcx":"Codeblock","2r4JYl":"Add inline code formatting to the selected text","Up8Tpe":"Code","ATHSPS":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"7DC1VE":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"hnrBeo":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"NkZAcw":"Italicize the selected text","2fTW9e":"Italic","c759Ra":"Ordered list","uQwrZu":"Strikethrough the selected text","pT3qly":"Strikethrough","BHk+zu":"Subscript","18BVwM":"Superscript","tOIVCV":"Tasked list","4Janx3":"Underline the selected text","dCHt+D":"Underline","YYAprs":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"tczyZL":"Show hidden whitespace characters in your editor.","0qAX23":"Toggle Whitespace","ezMADU":"Undo the most recent action","N3P7EC":"Undo","2nj/+s":"Update annotation","dWD7u4":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"qXqgVT":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.set-font-size.label":"Font size","ui.text-color.grape":"Grape","ui.text-color.grape.hue":["Grape ",["hue"]],"ui.text-color.gray":"Gray","ui.text-color.gray.hue":["Gray ",["hue"]],"ui.text-color.green":"Green","ui.text-color.green.hue":["Green ",["hue"]],"keyboard.shortcut.home":"Home","extension.command.increase-font-size.label":"Increase","extension.command.increase-indent.label":"Increase indentation","extension.command.increase-font-size.description":"Increase the font size","ui.text-color.indigo":"Indigo","ui.text-color.indigo.hue":["Indigo ",["hue"]],"extension.command.insert-paragraph.description":"Insert a new paragraph","extension.command.insert-emoji.label":"Insert Emoji","extension.command.insert-paragraph.label":"Insert Paragraph","extension.command.toggle-italic.label":"Italic","extension.command.toggle-italic.description":"Italicize the selected text","extension.command.justify-align.label":"Justify","R7NlCw":"Alt","RbDiK5":"Arrow Down","Dgyd+E":"Arrow Left","8pdCk4":"Arrow Right","Gp/343":"Arrow Up","PFPV0A":"Backspace","0IRYvp":"Caps Lock","X7HX0D":"Command","zq0AdD":"Control","8SfToN":"Delete","Ys/uah":"End","3K5hww":"Enter","veQt1j":"Enter","ySv7i+":"Home","e6RUI1":"Page Down","EEJk31":"Page Up","7sbhAU":"Shift","Q4eplT":"Space","SUhVVC":"Tab","extension.command.left-align.label":"Left align","ui.text-color.lime":"Lime","ui.text-color.lime.hue":["Lime ",["hue"]],"react-components.mention-atom-component.zero-items":"No items available","ui.text-color.orange":"Orange","ui.text-color.orange.hue":["Orange ",["hue"]],"extension.command.toggle-ordered-list.label":"Ordered list","keyboard.shortcut.pageDown":"Page Down","keyboard.shortcut.pageUp":"Page Up","extension.command.paste.label":"Paste","extension.command.paste.description":"Paste content into the editor","ui.text-color.pink":"Pink","ui.text-color.pink.hue":["Pink ",["hue"]],"zvMfIA":"No items available","pEjhti":"Static Menu","ui.text-color.red":"Red","ui.text-color.red.hue":["Red ",["hue"]],"extension.command.redo.label":"Redo","extension.command.redo.description":"Redo the most recent action","extension.command.remove-annotation.label":"Remove annotation","extension.command.right-align.label":"Right align","extension.command.select-all.label":"Select all","extension.command.select-all.description":"Select all content within the editor","extension.command.insert-horizontal-rule.description":"Separate content with a diving horizontal line","extension.command.set-casing.label":"Set text case","extension.command.set-font-size.description":"Set the font size for the selected text.","extension.command.set-text-color.description":"Set the text color for the selected text.","extension.command.set-text-highlight.description":"Set the text highlight color for the selected text.","keyboard.shortcut.shift":"Shift","extension.command.toggle-whitespace.description":"Show hidden whitespace characters in your editor.","keyboard.shortcut.space":"Space","extension.command.toggle-strike.label":"Strikethrough","extension.command.toggle-strike.description":"Strikethrough the selected text","extension.command.toggle-subscript.label":"Subscript","extension.command.toggle-superscript.label":"Superscript","keyboard.shortcut.tab":"Tab","extension.command.toggle-task-list.description":"Tasked list","ui.text-color.teal":"Teal","ui.text-color.teal.hue":["Teal ",["hue"]],"extension.command.set-text-color.label":"Text color","extension.command.set-text-highlight.label":"Text highlight","extension.command.toggle-whitespace.label":"Toggle Whitespace","ui.text-color.transparent":"Transparent","slrB1c":"Black","6QML30":"Blue","xw+keN":["Blue ",["hue"]],"38RHqP":"Cyan","D89yPf":["Cyan ",["hue"]],"VjBLnd":"Grape","Rp40yv":["Grape ",["hue"]],"5Dm9D1":"Gray","HGjXjC":["Gray ",["hue"]],"b9fz+n":"Green","18jo3M":["Green ",["hue"]],"CFzqCV":"Indigo","aVlDku":["Indigo ",["hue"]],"04PfLc":"Lime","KRTK6Y":["Lime ",["hue"]],"pSnXFd":"Orange","ve/MJZ":["Orange ",["hue"]],"OvCgDa":"Pink","l7NqyT":["Pink ",["hue"]],"IT9k0j":"Red","AdyJ7/":["Red ",["hue"]],"3D2UWc":"Teal","Dcq0Y1":["Teal ",["hue"]],"bsi2ik":"Transparent","Tj3PRR":"Violet","xxMH5N":["Violet ",["hue"]],"Rum0ah":"White","4gaw/Q":"Yellow","hhauc3":["Yellow ",["hue"]],"extension.command.toggle-underline.label":"Underline","extension.command.toggle-underline.description":"Underline the selected text","extension.command.undo.label":"Undo","extension.command.undo.description":"Undo the most recent action","extension.command.update-annotation.label":"Update annotation","ui.text-color.violet":"Violet","ui.text-color.violet.hue":["Violet ",["hue"]],"ui.text-color.white":"White","ui.text-color.yellow":"Yellow","ui.text-color.yellow.hue":["Yellow ",["hue"]]}`),xU={};yU(xU,mz),pz.loadLocaleData(`en`,{plurals:xU.en}),pz.load(`en`,bU),pz.activate(`en`);var SU=Object.defineProperty,CU=Object.getOwnPropertyDescriptor,wU=(e,t,n,r)=>{for(var i=r>1?void 0:r?CU(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&SU(t,n,i),i},TU={...qL.defaultOptions,...DR.defaultOptions},EU=[...qL.staticKeys,...DR.staticKeys],DU=class extends _j{get name(){return`react`}onSetOptions(e){let{pickChanged:t}=e;this.getExtension(qL).setOptions(t([`placeholder`]))}createExtensions(){let{emptyNodeClass:e,placeholder:t,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:i,defaultInlineNode:a,nodeViewComponents:o}=this.options;return[new qL({emptyNodeClass:e,placeholder:t,priority:_y.Low}),new DR({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:i,defaultInlineNode:a,nodeViewComponents:o})]}};DU=wU([wj({defaultOptions:TU,staticKeys:EU})],DU);var OU=i(n((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(){var e=[...arguments];return e.length===2?r(e[0],e[1])||null:e.slice(1).reduce(function(e,t){return r(e,t)},e[0])||null}e.default=t;var n=new WeakMap;function r(e,t){if(e&&t){var r=n.get(e)||new WeakMap;n.set(e,r);var a=r.get(t)||(function(n){i(e,n),i(t,n)});return r.set(t,a),a}return e||t}function i(e,t){typeof e==`function`?e(t):e.current=t}}))(),1),kU=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},AU=(e,t,n)=>(kU(e,t,`read from private field`),n?n.call(e):t.get(e)),jU=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},MU=(e,t,n,r)=>(kU(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n);function NU(){let[,e]=(0,N.useState)(z());return(0,N.useCallback)(()=>{e(z())},[])}var PU=(0,N.createContext)(null);function FU(e){let t=(0,N.useContext)(PU),n=(0,N.useRef)(NU());B(t,{code:R.REACT_PROVIDER_CONTEXT});let{addHandler:r}=t;return(0,N.useEffect)(()=>{let t=e;if(t){if($y(t)){let{autoUpdate:e}=t;t=e?()=>n.current():void 0}if(Xy(t))return r(`updated`,t)}},[r,e]),t}function IU(e=!0){return FU({autoUpdate:e}).active}function LU(){return FU().commands}var[RU,Die]=RR(({props:e})=>{let t=e.locale??`en`,n=e.i18n??pz;return{locale:t,i18n:n,supportedLocales:e.supportedLocales??[t],t:n._.bind(n)}});function zU(e,t={}){let{core:n,react:r,...i}=t;return Eie(e)?e:Tie.create(()=>[...Eb(e),new DU(r),...tR(n)],i)}function BU(e,t={}){let n=(0,N.useRef)(e),r=(0,N.useRef)(t),[i,a]=(0,N.useState)(()=>zU(e,t));return n.current=e,r.current=t,(0,N.useEffect)(()=>i.addHandler(`destroy`,()=>{a(()=>zU(n.current,r.current))}),[i]),i}var VU=typeof OU.default==`object`&&OU.default.__esModule&&OU.default.default?OU.default.default:OU.default,HU,UU=class extends bie{constructor(e){if(super(e),jU(this,HU,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=e=>this.internalGetRootProps(e,null),this.internalGetRootProps=(e,t)=>{this.rootPropsConfig.called=!0;let{refKey:n=`ref`,ref:r,...i}=e??z();return{[n]:VU(r,this.onRef),key:this.uid,...i,children:t}},this.onRef=e=>{e&&(this.rootPropsConfig.count+=1,B(this.rootPropsConfig.count<=1,{code:R.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),MU(this,HU,e),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(qL).setOptions({placeholder:this.props.placeholder??``})}get name(){return`react`}update(e){return super.update(e),this}createView(e){return new oO(null,{state:e,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:e,...t}){let{triggerChange:n=!0,tr:r,transactions:i}=t;if(this.props.state){let{onChange:t}=this.props;B(t,{code:R.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),B(n,{code:R.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||=this.getState(),this.onChange({state:e,tr:r,transactions:i});return}!r&&!i&&(e=e.apply(e.tr.setMeta(py,{}))),this.view.updateState(e),n&&i?.length!==0&&this.onChange({state:e,tr:r,transactions:i}),this.manager.onStateUpdate({previousState:this.previousState,state:e,tr:r,transactions:i})}updateControlledState(e,t){this.previousStateOverride=t,e=e.apply(e.tr.setMeta(py,{})),this.view.updateState(e),this.manager.onStateUpdate({previousState:this.previousState,state:e}),this.previousStateOverride=void 0}addProsemirrorViewToDom(e,t){this.props.insertPosition===`start`?e.insertBefore(t,e.firstChild):e.append(t)}onRefLoad(){B(AU(this,HU),{code:R.REACT_EDITOR_VIEW,message:`Something went wrong when initializing the text editor. Please check your setup.`});let{autoFocus:e}=this.props;this.addProsemirrorViewToDom(AU(this,HU),this.view.dom),e&&this.focus(e),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&AU(this,HU)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};HU=new WeakMap;var WU=typeof document<`u`?N.useLayoutEffect:N.useEffect;function GU(e){let t=(0,N.useRef)();return WU(()=>{t.current=e}),t.current}function KU(e){let{manager:t,state:n}=e,{placeholder:r,editable:i}=e;(0,N.useRef)(!0).current&&!tb(r)&&t.getExtension(DU).setOptions({placeholder:r}),(0,N.useEffect)(()=>{r!=null&&t.getExtension(DU).setOptions({placeholder:r})},[r,t]);let[a]=(0,N.useState)(()=>{if(n)return n;let r=t.createEmptyDoc(),[i,a]=sb(e.initialContent)?e.initialContent:[e.initialContent??r];return t.createState({content:i,selection:a})}),o=qU({initialEditorState:a,getProps:()=>e});return(0,N.useEffect)(()=>()=>{o.destroy()},[o]),(0,N.useEffect)(()=>{o.onUpdate()},[i,o]),JU(o),o.frameworkOutput}function qU(e){let t=(0,N.useRef)(e);t.current=e;let n=(0,N.useMemo)(()=>new UU(t.current),[]);return n.update(e),n}function JU(e){let{state:t}=e.props,n=(0,N.useRef)(!!t),r=GU(t);WU(()=>{B(t?n.current===!0:n.current===!1,{code:R.REACT_CONTROLLED,message:n.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),!(!t||t===r)&&e.updateControlledState(t,r??void 0)},[t,r,e])}function YU(e={}){let{content:t,document:n,selection:r,extensions:i,...a}=e,o=BU(i??(()=>[]),a),[s,c]=(0,N.useState)(()=>o.createState({selection:r,content:t??o.createEmptyDoc()})),l=(0,N.useCallback)(({state:e})=>{c(e)},[]),u=(0,N.useCallback)(()=>o.output,[o]);return(0,N.useMemo)(()=>({state:s,setState:c,manager:o,onChange:l,getContext:u}),[u,o,l,s])}var XU=()=>N.createElement(`div`,{className:FM.EDITOR_WRAPPER,...FU().getRootProps()}),ZU=e=>(e.hook(),null);function QU(e){let{children:t,autoRender:n,i18n:r,locale:i,supportedLocales:a,hooks:o=[],...s}=e,c=KU(s),l=dR(c.portalContainer),u=n===`start`||n===!0||!t&&tb(n),d=n===`end`;return N.createElement(RU,{i18n:r,locale:i,supportedLocales:a},N.createElement(PU.Provider,{value:c},N.createElement(uR,{portals:l}),o.map((e,t)=>N.createElement(ZU,{hook:e,key:t})),u&&N.createElement(XU,null),t,d&&N.createElement(XU,null)))}function $U(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function eW(e){var t=document.createElement(`style`);return t.setAttribute(`data-emotion`,e.key),e.nonce!==void 0&&t.setAttribute(`nonce`,e.nonce),t.appendChild(document.createTextNode(``)),t.setAttribute(`data-s`,``),t}var tW,nW,rW=t((()=>{tW=!1,nW=function(){function e(e){var t=this;this._insertTag=function(e){var n=t.tags.length===0?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling;t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=e.speedy===void 0?!tW:e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(eW(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=$U(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode?.removeChild(e)}),this.tags=[],this.ctr=0},e}()})),iW,aW,oW,sW,cW,lW,uW,dW,fW,pW=t((()=>{iW=`-ms-`,aW=`-moz-`,oW=`-webkit-`,sW=`comm`,cW=`rule`,lW=`decl`,uW=`@import`,dW=`@keyframes`,fW=`@layer`}));function mW(e,t){return yW(e,0)^45?(((t<<2^yW(e,0))<<2^yW(e,1))<<2^yW(e,2))<<2^yW(e,3):0}function hW(e){return e.trim()}function gW(e,t){return(e=t.exec(e))?e[0]:e}function _W(e,t,n){return e.replace(t,n)}function vW(e,t){return e.indexOf(t)}function yW(e,t){return e.charCodeAt(t)|0}function bW(e,t,n){return e.slice(t,n)}function xW(e){return e.length}function SW(e){return e.length}function CW(e,t){return t.push(e),e}function wW(e,t){return e.map(t).join(``)}var TW,EW,DW,OW=t((()=>{TW=Math.abs,EW=String.fromCharCode,DW=Object.assign}));function kW(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:KW,column:qW,length:o,return:``}}function AW(e,t){return DW(kW(``,null,null,``,null,null,0),e,{length:-e.length},t)}function jW(){return XW}function MW(){return XW=YW>0?yW(ZW,--YW):0,qW--,XW===10&&(qW=1,KW--),XW}function NW(){return XW=YW<JW?yW(ZW,YW++):0,qW++,XW===10&&(qW=1,KW++),XW}function PW(){return yW(ZW,YW)}function FW(){return YW}function IW(e,t){return bW(ZW,e,t)}function LW(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function RW(e){return KW=qW=1,JW=xW(ZW=e),YW=0,[]}function zW(e){return ZW=``,e}function BW(e){return hW(IW(YW-1,UW(e===91?e+2:e===40?e+1:e)))}function VW(e){for(;(XW=PW())&&XW<33;)NW();return LW(e)>2||LW(XW)>3?``:` `}function HW(e,t){for(;--t&&NW()&&!(XW<48||XW>102||XW>57&&XW<65||XW>70&&XW<97););return IW(e,FW()+(t<6&&PW()==32&&NW()==32))}function UW(e){for(;NW();)switch(XW){case e:return YW;case 34:case 39:e!==34&&e!==39&&UW(XW);break;case 40:e===41&&UW(e);break;case 92:NW();break}return YW}function WW(e,t){for(;NW()&&e+XW!==57&&!(e+XW===84&&PW()===47););return`/*`+IW(t,YW-1)+`*`+EW(e===47?e:NW())}function GW(e){for(;!LW(PW());)NW();return IW(e,YW)}var KW,qW,JW,YW,XW,ZW,QW=t((()=>{OW(),KW=1,qW=1,JW=0,YW=0,XW=0,ZW=``}));function $W(e){return zW(eG(``,null,null,null,[``],e=RW(e),0,[0],e))}function eG(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=NW()){case 40:if(m!=108&&yW(C,d-1)==58){vW(C+=_W(BW(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=BW(v);break;case 9:case 10:case 13:case 32:C+=VW(m);break;case 92:C+=HW(FW()-1,7);continue;case 47:switch(PW()){case 42:case 47:CW(nG(WW(NW(),FW()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=xW(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=_W(C,/\f/g,``)),p>0&&xW(C)-d&&CW(p>32?rG(C+`;`,r,n,d-1):rG(_W(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(CW(S=tG(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123)if(u===0)eG(C,t,S,S,b,a,d,s,x);else switch(f===99&&yW(C,3)===110?100:f){case 100:case 108:case 109:case 115:eG(e,S,S,r&&CW(tG(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:eG(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+xW(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&MW()==125)continue}switch(C+=EW(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(xW(C)-1)*_,_=1;break;case 64:PW()===45&&(C+=BW(NW())),f=PW(),u=d=xW(y=C+=GW(FW())),v++;break;case 45:m===45&&xW(C)==2&&(h=0)}}return a}function tG(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=SW(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=bW(e,d+1,d=TW(h=o[m])),y=e;_<p;++_)(y=hW(h>0?f[_]+` `+v:_W(v,/&\f/g,f[_])))&&(c[g++]=y);return kW(e,t,n,i===0?cW:s,c,l,u)}function nG(e,t,n){return kW(e,t,n,sW,EW(jW()),bW(e,2,-2),0)}function rG(e,t,n,r){return kW(e,t,n,lW,bW(e,0,r),bW(e,r+1,-1),r)}var iG=t((()=>{pW(),OW(),QW()})),aG=t((()=>{}));function oG(e,t){for(var n=``,r=SW(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function sG(e,t,n,r){switch(e.type){case fW:if(e.children.length)break;case uW:case lW:return e.return=e.return||e.value;case sW:return``;case dW:return e.return=e.value+`{`+oG(e.children,r)+`}`;case cW:e.value=e.props.join(`,`)}return xW(n=oG(e.children,r))?e.return=e.value+`{`+n+`}`:``}var cG=t((()=>{pW(),OW()}));function lG(e){var t=SW(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function uG(e){return function(t){t.root||(t=t.return)&&e(t)}}var dG=t((()=>{OW()})),fG=t((()=>{pW(),OW(),iG(),aG(),QW(),cG(),dG()}));function pG(e,t){switch(mW(e,t)){case 5103:return oW+`print-`+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return oW+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return oW+e+aW+e+iW+e+e;case 6828:case 4268:return oW+e+iW+e+e;case 6165:return oW+e+iW+`flex-`+e+e;case 5187:return oW+e+_W(e,/(\w+).+(:[^]+)/,oW+`box-$1$2`+iW+`flex-$1$2`)+e;case 5443:return oW+e+iW+`flex-item-`+_W(e,/flex-|-self/,``)+e;case 4675:return oW+e+iW+`flex-line-pack`+_W(e,/align-content|flex-|-self/,``)+e;case 5548:return oW+e+iW+_W(e,`shrink`,`negative`)+e;case 5292:return oW+e+iW+_W(e,`basis`,`preferred-size`)+e;case 6060:return oW+`box-`+_W(e,`-grow`,``)+oW+e+iW+_W(e,`grow`,`positive`)+e;case 4554:return oW+_W(e,/([^-])(transform)/g,`$1`+oW+`$2`)+e;case 6187:return _W(_W(_W(e,/(zoom-|grab)/,oW+`$1`),/(image-set)/,oW+`$1`),e,``)+e;case 5495:case 3959:return _W(e,/(image-set\([^]*)/,oW+"$1$`$1");case 4968:return _W(_W(e,/(.+:)(flex-)?(.*)/,oW+`box-pack:$3`+iW+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+oW+e+e;case 4095:case 3583:case 4068:case 2532:return _W(e,/(.+)-inline(.+)/,oW+`$1$2`)+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(xW(e)-1-t>6)switch(yW(e,t+1)){case 109:if(yW(e,t+4)!==45)break;case 102:return _W(e,/(.+:)(.+)-([^]+)/,`$1`+oW+`$2-$3$1`+aW+(yW(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~vW(e,`stretch`)?pG(_W(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(yW(e,t+1)!==115)break;case 6444:switch(yW(e,xW(e)-3-(~vW(e,`!important`)&&10))){case 107:return _W(e,`:`,`:`+oW)+e;case 101:return _W(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+oW+(yW(e,14)===45?`inline-`:``)+`box$3$1`+oW+`$2$3$1`+iW+`$2box$3`)+e}break;case 5936:switch(yW(e,t+11)){case 114:return oW+e+iW+_W(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return oW+e+iW+_W(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return oW+e+iW+_W(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return oW+e+iW+e+e}return e}var mG,hG,gG,_G,vG,yG,bG,xG,SG=t((()=>{rW(),fG(),mG=function(e,t,n){for(var r=0,i=0;r=i,i=PW(),r===38&&i===12&&(t[n]=1),!LW(i);)NW();return IW(e,YW)},hG=function(e,t){var n=-1,r=44;do switch(LW(r)){case 0:r===38&&PW()===12&&(t[n]=1),e[n]+=mG(YW-1,t,n);break;case 2:e[n]+=BW(r);break;case 4:if(r===44){e[++n]=PW()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=EW(r)}while(r=NW());return e},gG=function(e,t){return zW(hG(RW(e),t))},_G=new WeakMap,vG=function(e){if(!(e.type!==`rule`||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!==`rule`;)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!_G.get(n))&&!r){_G.set(e,!0);for(var i=[],a=gG(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var l=0;l<o.length;l++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+` `+a[s]}}},yG=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}},bG=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case lW:e.return=pG(e.value,e.length);break;case dW:return oG([AW(e,{value:_W(e.value,`@`,`@`+oW)})],r);case cW:if(e.length)return wW(e.props,function(t){switch(gW(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return oG([AW(e,{props:[_W(t,/:(read-\w+)/,`:`+aW+`$1`)]})],r);case`::placeholder`:return oG([AW(e,{props:[_W(t,/:(plac\w+)/,`:`+oW+`input-$1`)]}),AW(e,{props:[_W(t,/:(plac\w+)/,`:`+aW+`$1`)]}),AW(e,{props:[_W(t,/:(plac\w+)/,iW+`input-$1`)]})],r)}return``})}}],xG=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){e.getAttribute(`data-emotion`).indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||bG,i={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll(`style[data-emotion^="`+t+` "]`),function(e){for(var t=e.getAttribute(`data-emotion`).split(` `),n=1;n<t.length;n++)i[t[n]]=!0;o.push(e)});var s,c=[vG,yG],l,u=[sG,uG(function(e){l.insert(e)})],d=lG(c.concat(r,u)),f=function(e){return oG($W(e),d)};s=function(e,t,n,r){l=n,f(e?e+`{`+t.styles+`}`:t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new nW({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(o),p}}));function CG(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var wG,TG,EG,DG=t((()=>{wG=!0,TG=function(e,t,n){var r=e.key+`-`+t.name;(n===!1||wG===!1)&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},EG=function(e,t,n){TG(e,t,n);var r=e.key+`-`+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?`.`+r:``,i,e.sheet,!0),i=i.next;while(i!==void 0)}}}));function OG(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var kG=t((()=>{}));function AG(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return HG={name:i.name,styles:i.styles,next:HG},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)HG={name:o.name,styles:o.styles,next:HG},o=o.next;return a.styles+`;`}return jG(e,t,n);case`function`:if(e!==void 0){var s=HG,c=n(e);return HG=s,AG(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function jG(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=AG(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:LG(s)&&(r+=RG(a)+`:`+zG(a,s)+`;`)}else{if(a===`NO_COMPONENT_SELECTOR`&&NG)throw Error(BG);if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)LG(o[c])&&(r+=RG(a)+`:`+zG(a,o[c])+`;`);else{var l=AG(e,t,o);switch(a){case`animation`:case`animationName`:r+=RG(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}}return r}function MG(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;HG=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=AG(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=AG(n,t,e[o]),r&&(i+=a[o]);VG.lastIndex=0;for(var s=``,c;(c=VG.exec(i))!==null;)s+=`-`+c[1];return{name:OG(i)+s,styles:i,next:HG}}var NG,PG,FG,IG,LG,RG,zG,BG,VG,HG,UG=t((()=>{kG(),Nf(),bd(),NG=!1,PG=/[A-Z]|^ms/g,FG=/_EMO_([^_]+?)_([^]*?)_EMO_/g,IG=function(e){return e.charCodeAt(1)===45},LG=function(e){return e!=null&&typeof e!=`boolean`},RG=yd(function(e){return IG(e)?e:e.replace(PG,`-$&`).toLowerCase()}),zG=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(FG,function(e,t,n){return HG={name:t,styles:n,next:HG},t})}return Mf[e]!==1&&!IG(e)&&typeof t==`number`&&t!==0?t+`px`:t},BG=`Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.`,VG=/label:\s*([^\s;{]+)\s*(;|$)/g}));SG(),UG(),DG();function WG(e,t){if(e.inserted[t.name]===void 0)return e.insert(``,t,e.sheet,!0)}function GG(e,t,n){var r=[],i=CG(e,r,n);return r.length<2?n:i+t(r)}var KG=function(e){var t=xG(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){var e=MG([...arguments],t.registered,void 0);return EG(t,e,!1),t.key+`-`+e.name};return{css:n,cx:function(){var e=[...arguments];return GG(t.registered,n,qG(e))},injectGlobal:function(){WG(t,MG([...arguments],t.registered))},keyframes:function(){var e=MG([...arguments],t.registered),n=`animation-`+e.name;return WG(t,{name:e.name,styles:`@keyframes `+n+`{`+e.styles+`}`}),n},hydrate:function(e){e.forEach(function(e){t.inserted[e]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:CG.bind(null,t.registered),merge:GG.bind(null,t.registered,n)}},qG=function e(t){for(var n=``,r=0;r<t.length;r++){var i=t[r];if(i!=null){var a=void 0;switch(typeof i){case`boolean`:break;case`object`:if(Array.isArray(i))a=e(i);else for(var o in a=``,i)i[o]&&o&&(a&&(a+=` `),a+=o);break;default:a=i}a&&(n&&(n+=` `),n+=a)}}return n},JG=[],YG=function(){return JG.some(function(e){return e.activeTargets.length>0})},XG=function(){return JG.some(function(e){return e.skippedTargets.length>0})},ZG=`ResizeObserver loop completed with undelivered notifications.`,QG=function(){var e;typeof ErrorEvent==`function`?e=new ErrorEvent(`error`,{message:ZG}):(e=document.createEvent(`Event`),e.initEvent(`error`,!1,!1),e.message=ZG),window.dispatchEvent(e)},$G;(function(e){e.BORDER_BOX=`border-box`,e.CONTENT_BOX=`content-box`,e.DEVICE_PIXEL_CONTENT_BOX=`device-pixel-content-box`})($G||={});var eK=function(e){return Object.freeze(e)},tK=function(){function e(e,t){this.inlineSize=e,this.blockSize=t,eK(this)}return e}(),nK=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,eK(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),rK=function(e){return e instanceof SVGElement&&`getBBox`in e},iK=function(e){if(rK(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||e.getClientRects().length)},aK=function(e){if(e instanceof Element)return!0;var t=e?.ownerDocument?.defaultView;return!!(t&&e instanceof t.Element)},oK=function(e){switch(e.tagName){case`INPUT`:if(e.type!==`image`)break;case`VIDEO`:case`AUDIO`:case`EMBED`:case`OBJECT`:case`CANVAS`:case`IFRAME`:case`IMG`:return!0}return!1},sK=typeof window<`u`?window:{},cK=new WeakMap,lK=/auto|scroll/,uK=/^tb|vertical/,dK=/msie|trident/i.test(sK.navigator&&sK.navigator.userAgent),fK=function(e){return parseFloat(e||`0`)},pK=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new tK((n?t:e)||0,(n?e:t)||0)},mK=eK({devicePixelContentBoxSize:pK(),borderBoxSize:pK(),contentBoxSize:pK(),contentRect:new nK(0,0,0,0)}),hK=function(e,t){if(t===void 0&&(t=!1),cK.has(e)&&!t)return cK.get(e);if(iK(e))return cK.set(e,mK),mK;var n=getComputedStyle(e),r=rK(e)&&e.ownerSVGElement&&e.getBBox(),i=!dK&&n.boxSizing===`border-box`,a=uK.test(n.writingMode||``),o=!r&&lK.test(n.overflowY||``),s=!r&&lK.test(n.overflowX||``),c=r?0:fK(n.paddingTop),l=r?0:fK(n.paddingRight),u=r?0:fK(n.paddingBottom),d=r?0:fK(n.paddingLeft),f=r?0:fK(n.borderTopWidth),p=r?0:fK(n.borderRightWidth),m=r?0:fK(n.borderBottomWidth),h=r?0:fK(n.borderLeftWidth),g=d+l,_=c+u,v=h+p,y=f+m,b=s?e.offsetHeight-y-e.clientHeight:0,x=o?e.offsetWidth-v-e.clientWidth:0,S=i?g+v:0,C=i?_+y:0,w=r?r.width:fK(n.width)-S-x,T=r?r.height:fK(n.height)-C-b,E=w+g+x+v,D=T+_+b+y,O=eK({devicePixelContentBoxSize:pK(Math.round(w*devicePixelRatio),Math.round(T*devicePixelRatio),a),borderBoxSize:pK(E,D,a),contentBoxSize:pK(w,T,a),contentRect:new nK(d,c,w,T)});return cK.set(e,O),O},gK=function(e,t,n){var r=hK(e,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case $G.DEVICE_PIXEL_CONTENT_BOX:return o;case $G.BORDER_BOX:return i;default:return a}},_K=function(){function e(e){var t=hK(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=eK([t.borderBoxSize]),this.contentBoxSize=eK([t.contentBoxSize]),this.devicePixelContentBoxSize=eK([t.devicePixelContentBoxSize])}return e}(),vK=function(e){if(iK(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},yK=function(){var e=1/0,t=[];JG.forEach(function(n){if(n.activeTargets.length!==0){var r=[];n.activeTargets.forEach(function(t){var n=new _K(t.target),i=vK(t.target);r.push(n),t.lastReportedSize=gK(t.target,t.observedBox),i<e&&(e=i)}),t.push(function(){n.callback.call(n.observer,r,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},bK=function(e){JG.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(vK(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},xK=function(){var e=0;for(bK(e);YG();)e=yK(),bK(e);return XG()&&QG(),e>0},SK,CK=[],wK=function(){return CK.splice(0).forEach(function(e){return e()})},TK=function(e){if(!SK){var t=0,n=document.createTextNode(``);new MutationObserver(function(){return wK()}).observe(n,{characterData:!0}),SK=function(){n.textContent=`${t?t--:t++}`}}CK.push(e),SK()},EK=function(e){TK(function(){requestAnimationFrame(e)})},DK=0,OK=function(){return!!DK},kK=250,AK={attributes:!0,characterData:!0,childList:!0,subtree:!0},jK=[`resize`,`load`,`transitionend`,`animationend`,`animationstart`,`animationiteration`,`keyup`,`keydown`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`blur`,`focus`],MK=function(e){return e===void 0&&(e=0),Date.now()+e},NK=!1,PK=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(e===void 0&&(e=kK),!NK){NK=!0;var n=MK(e);EK(function(){var r=!1;try{r=xK()}finally{if(NK=!1,e=n-MK(),!OK())return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,AK)};document.body?t():sK.addEventListener(`DOMContentLoaded`,t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),jK.forEach(function(t){return sK.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||=(this.observer&&this.observer.disconnect(),jK.forEach(function(t){return sK.removeEventListener(t,e.listener,!0)}),!0)},e}()),FK=function(e){!DK&&e>0&&PK.start(),DK+=e,!DK&&PK.stop()},IK=function(e){return!rK(e)&&!oK(e)&&getComputedStyle(e).display===`inline`},LK=function(){function e(e,t){this.target=e,this.observedBox=t||$G.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=gK(this.target,this.observedBox,!0);return IK(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),RK=function(){function e(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return e}(),zK=new WeakMap,BK=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},VK=function(){function e(){}return e.connect=function(e,t){var n=new RK(e,t);zK.set(e,n)},e.observe=function(e,t,n){var r=zK.get(e),i=r.observationTargets.length===0;BK(r.observationTargets,t)<0&&(i&&JG.push(r),r.observationTargets.push(new LK(t,n&&n.box)),FK(1),PK.schedule())},e.unobserve=function(e,t){var n=zK.get(e),r=BK(n.observationTargets,t),i=n.observationTargets.length===1;r>=0&&(i&&JG.splice(JG.indexOf(n),1),n.observationTargets.splice(r,1),FK(-1))},e.disconnect=function(e){var t=this,n=zK.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),HK=function(){function e(e){if(arguments.length===0)throw TypeError(`Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.`);if(typeof e!=`function`)throw TypeError(`Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.`);VK.connect(this,e)}return e.prototype.observe=function(e,t){if(arguments.length===0)throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!aK(e))throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element`);VK.observe(this,e,t)},e.prototype.unobserve=function(e){if(arguments.length===0)throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!aK(e))throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element`);VK.unobserve(this,e)},e.prototype.disconnect=function(){VK.disconnect(this)},e.toString=function(){return`function ResizeObserver () { [polyfill code] }`},e}(),UK=(0,N.createContext)({});function WK(e){let t=(0,N.useRef)(null);return t.current===null&&(t.current=e()),t.current}var GK=(0,N.createContext)(null),KK=(0,N.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function qK(e=!0){let t=(0,N.useContext)(GK);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,N.useId)();(0,N.useEffect)(()=>{e&&i(a)},[e]);let o=(0,N.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var JK=typeof window<`u`,YK=JK?N.useLayoutEffect:N.useEffect,XK=e=>e,ZK=XK,QK=XK;function $K(e){let t;return()=>(t===void 0&&(t=e()),t)}var eq=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},tq=e=>e*1e3,nq=e=>e/1e3,rq={skipAnimations:!1,useManualTiming:!1};function iq(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var aq=[`read`,`resolveKeyframes`,`update`,`preRender`,`render`,`postRender`],oq=40;function sq(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=aq.reduce((e,t)=>(e[t]=iq(a),e),{}),{read:s,resolveKeyframes:c,update:l,preRender:u,render:d,postRender:f}=o,p=()=>{let a=rq.useManualTiming?i.timestamp:performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,oq),1),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:aq.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||m(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<aq.length;t++)o[aq[t]].cancel(e)},state:i,steps:o}}var{schedule:cq,cancel:lq,state:uq,steps:dq}=sq(typeof requestAnimationFrame<`u`?requestAnimationFrame:XK,!0),fq=(0,N.createContext)({strict:!1}),pq={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},mq={};for(let e in pq)mq[e]={isEnabled:t=>pq[e].some(e=>!!t[e])};function hq(e){for(let t in e)mq[t]={...mq[t],...e[t]}}var gq=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.ignoreStrict.viewport`.split(`.`));function _q(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||gq.has(e)}var vq=e=>!_q(e);function yq(e){e&&(vq=t=>t.startsWith(`on`)?!_q(t):e(t))}try{yq((wd(),e(xd)).default)}catch{}function bq(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||(vq(i)||n===!0&&_q(i)||!t&&!_q(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}function xq(e){if(typeof Proxy>`u`)return e;let t=new Map;return new Proxy((...t)=>e(...t),{get:(n,r)=>r===`create`?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}var Sq=(0,N.createContext)({});function Cq(e){return typeof e==`string`||Array.isArray(e)}function wq(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}var Tq=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Eq=[`initial`,...Tq];function Dq(e){return wq(e.animate)||Eq.some(t=>Cq(e[t]))}function Oq(e){return!!(Dq(e)||e.variants)}function kq(e,t){if(Dq(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Cq(t)?t:void 0,animate:Cq(n)?n:void 0}}return e.inherit===!1?{}:t}function Aq(e){let{initial:t,animate:n}=kq(e,(0,N.useContext)(Sq));return(0,N.useMemo)(()=>({initial:t,animate:n}),[jq(t),jq(n)])}function jq(e){return Array.isArray(e)?e.join(` `):e}var Mq=Symbol.for(`motionComponentSymbol`);function Nq(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Pq(e,t,n){return(0,N.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):Nq(n)&&(n.current=r))},[t])}var Fq=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),Iq=`data-`+Fq(`framerAppearId`),{schedule:Lq,cancel:Oie}=sq(queueMicrotask,!1),Rq=(0,N.createContext)({});function zq(e,t,n,r,i){let{visualElement:a}=(0,N.useContext)(Sq),o=(0,N.useContext)(fq),s=(0,N.useContext)(GK),c=(0,N.useContext)(KK).reducedMotion,l=(0,N.useRef)(null);r||=o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:a,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));let u=l.current,d=(0,N.useContext)(Rq);u&&!u.projection&&i&&(u.type===`html`||u.type===`svg`)&&Bq(l.current,n,i,d);let f=(0,N.useRef)(!1);(0,N.useInsertionEffect)(()=>{u&&f.current&&u.update(n,s)});let p=n[Iq],m=(0,N.useRef)(!!p&&!window.MotionHandoffIsComplete?.call(window,p)&&window.MotionHasOptimisedAnimation?.call(window,p));return YK(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),Lq.render(u.render),m.current&&u.animationState&&u.animationState.animateChanges())}),(0,N.useEffect)(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&=(queueMicrotask(()=>{var e;(e=window.MotionHandoffMarkAsComplete)==null||e.call(window,p)}),!1))}),u}function Bq(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Vq(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Nq(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,layoutScroll:c,layoutRoot:l})}function Vq(e){if(e)return e.options.allowProjection===!1?Vq(e.parent):e.projection}function Hq({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&hq(e);function a(a,o){let s,c={...(0,N.useContext)(KK),...a,layoutId:Uq(a)},{isStatic:l}=c,u=Aq(a),d=r(a,l);if(!l&&JK){Wq(c,e);let n=Gq(c);s=n.MeasureLayout,u.visualElement=zq(i,d,c,t,n.ProjectionNode)}return(0,P.jsxs)(Sq.Provider,{value:u,children:[s&&u.visualElement?(0,P.jsx)(s,{visualElement:u.visualElement,...c}):null,n(i,a,Pq(d,u.visualElement,o),d,l,u.visualElement)]})}a.displayName=`motion.${typeof i==`string`?i:`create(${i.displayName??i.name??``})`}`;let o=(0,N.forwardRef)(a);return o[Mq]=i,o}function Uq({layoutId:e}){let t=(0,N.useContext)(UK).id;return t&&e!==void 0?t+`-`+e:e}function Wq(e,t){(0,N.useContext)(fq).strict}function Gq(e){let{drag:t,layout:n}=mq;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}var Kq=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function qq(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Kq.indexOf(e)>-1||/[A-Z]/u.test(e))}function Jq(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Yq(e,t,n,r){if(typeof t==`function`){let[i,a]=Jq(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Jq(r);t=t(n===void 0?e.custom:n,i,a)}return t}var Xq=e=>Array.isArray(e),Zq=e=>!!(e&&typeof e==`object`&&e.mix&&e.toValue),Qq=e=>Xq(e)?e[e.length-1]||0:e,$q=e=>!!(e&&e.getVelocity);function eJ(e){let t=$q(e)?e.get():e;return Zq(t)?t.toValue():t}function tJ({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,a){let o={latestValues:rJ(r,i,a,e),renderState:t()};return n&&(o.onMount=e=>n({props:r,current:e,...o}),o.onUpdate=e=>n(e)),o}var nJ=e=>(t,n)=>{let r=(0,N.useContext)(Sq),i=(0,N.useContext)(GK),a=()=>tJ(e,t,r,i);return n?a():WK(a)};function rJ(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=eJ(a[e]);let{initial:o,animate:s}=e,c=Dq(e),l=Oq(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!wq(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Yq(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var iJ=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],aJ=new Set(iJ),oJ=e=>t=>typeof t==`string`&&t.startsWith(e),sJ=oJ(`--`),cJ=oJ(`var(--`),lJ=e=>cJ(e)?uJ.test(e.split(`/*`)[0].trim()):!1,uJ=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,dJ=(e,t)=>t&&typeof e==`number`?t.transform(e):e,fJ=(e,t,n)=>n>t?t:n<e?e:n,pJ={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},mJ={...pJ,transform:e=>fJ(0,1,e)},hJ={...pJ,default:1},gJ=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),_J=gJ(`deg`),vJ=gJ(`%`),Z=gJ(`px`),yJ=gJ(`vh`),bJ=gJ(`vw`),xJ={...vJ,parse:e=>vJ.parse(e)/100,transform:e=>vJ.transform(e*100)},SJ={borderWidth:Z,borderTopWidth:Z,borderRightWidth:Z,borderBottomWidth:Z,borderLeftWidth:Z,borderRadius:Z,radius:Z,borderTopLeftRadius:Z,borderTopRightRadius:Z,borderBottomRightRadius:Z,borderBottomLeftRadius:Z,width:Z,maxWidth:Z,height:Z,maxHeight:Z,top:Z,right:Z,bottom:Z,left:Z,padding:Z,paddingTop:Z,paddingRight:Z,paddingBottom:Z,paddingLeft:Z,margin:Z,marginTop:Z,marginRight:Z,marginBottom:Z,marginLeft:Z,backgroundPositionX:Z,backgroundPositionY:Z},CJ={rotate:_J,rotateX:_J,rotateY:_J,rotateZ:_J,scale:hJ,scaleX:hJ,scaleY:hJ,scaleZ:hJ,skew:_J,skewX:_J,skewY:_J,distance:Z,translateX:Z,translateY:Z,translateZ:Z,x:Z,y:Z,z:Z,perspective:Z,transformPerspective:Z,opacity:mJ,originX:xJ,originY:xJ,originZ:Z},wJ={...pJ,transform:Math.round},TJ={...SJ,...CJ,zIndex:wJ,size:Z,fillOpacity:mJ,strokeOpacity:mJ,numOctaves:wJ},EJ={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},DJ=iJ.length;function OJ(e,t,n){let r=``,i=!0;for(let a=0;a<DJ;a++){let o=iJ[a],s=e[o];if(s===void 0)continue;let c=!0;if(c=typeof s==`number`?s===(o.startsWith(`scale`)?1:0):parseFloat(s)===0,!c||n){let e=dJ(s,TJ[o]);if(!c){i=!1;let t=EJ[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function kJ(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(aJ.has(e)){o=!0;continue}else if(sJ(e)){i[e]=n;continue}else{let t=dJ(n,TJ[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=OJ(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var AJ={offset:`stroke-dashoffset`,array:`stroke-dasharray`},jJ={offset:`strokeDashoffset`,array:`strokeDasharray`};function MJ(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?AJ:jJ;e[a.offset]=Z.transform(-r);let o=Z.transform(t),s=Z.transform(n);e[a.array]=`${o} ${s}`}function NJ(e,t,n){return typeof e==`string`?e:Z.transform(t+n*e)}function PJ(e,t,n){return`${NJ(t,e.x,e.width)} ${NJ(n,e.y,e.height)}`}function FJ(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:c=0,...l},u,d){if(kJ(e,l,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=PJ(m,i===void 0?.5:i,a===void 0?.5:a)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&MJ(f,o,s,c,!1)}var IJ=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),LJ=()=>({...IJ(),attrs:{}}),RJ=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function zJ(e,{style:t,vars:n},r,i){for(let a in Object.assign(e.style,t,i&&i.getProjectionStyles(r)),n)e.style.setProperty(a,n[a])}var BJ=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]);function VJ(e,t,n,r){for(let n in zJ(e,t,void 0,r),t.attrs)e.setAttribute(BJ.has(n)?n:Fq(n),t.attrs[n])}var HJ={};function UJ(e){Object.assign(HJ,e)}function WJ(e,{layout:t,layoutId:n}){return aJ.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!HJ[e]||e===`opacity`)}function GJ(e,t,n){let{style:r}=e,i={};for(let a in r)($q(r[a])||t.style&&$q(t.style[a])||WJ(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function KJ(e,t,n){let r=GJ(e,t,n);for(let n in e)if($q(e[n])||$q(t[n])){let t=iJ.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}function qJ(e,t){try{t.dimensions=typeof e.getBBox==`function`?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}var JJ=[`x`,`y`,`width`,`height`,`cx`,`cy`,`r`],YJ={useVisualState:nJ({scrapeMotionValuesFromProps:KJ,createRenderState:LJ,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let a=!!e.drag;if(!a){for(let e in i)if(aJ.has(e)){a=!0;break}}if(!a)return;let o=!t;if(t)for(let n=0;n<JJ.length;n++){let r=JJ[n];e[r]!==t[r]&&(o=!0)}o&&cq.read(()=>{qJ(n,r),cq.render(()=>{FJ(r,i,RJ(n.tagName),e.transformTemplate),VJ(n,r)})})}})},XJ={useVisualState:nJ({scrapeMotionValuesFromProps:GJ,createRenderState:IJ})};function ZJ(e,t,n){for(let r in t)!$q(t[r])&&!WJ(r,n)&&(e[r]=t[r])}function QJ({transformTemplate:e},t){return(0,N.useMemo)(()=>{let n=IJ();return kJ(n,t,e),Object.assign({},n.vars,n.style)},[t])}function $J(e,t){let n=e.style||{},r={};return ZJ(r,n,e),Object.assign(r,QJ(e,t)),r}function eY(e,t){let n={},r=$J(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function tY(e,t,n,r){let i=(0,N.useMemo)(()=>{let n=LJ();return FJ(n,t,RJ(r),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};ZJ(t,e.style,e),i.style={...t,...i.style}}return i}function nY(e=!1){return(t,n,r,{latestValues:i},a)=>{let o=(qq(t)?tY:eY)(n,i,a,t),s=bq(n,typeof t==`string`,e),c=t===N.Fragment?{}:{...s,...o,ref:r},{children:l}=n,u=(0,N.useMemo)(()=>$q(l)?l.get():l,[l]);return(0,N.createElement)(t,{...c,children:u})}}function rY(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return Hq({...qq(n)?YJ:XJ,preloadedFeatures:e,useRender:nY(r),createVisualElement:t,Component:n})}}function iY(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function aY(e,t,n){let r=e.getProps();return Yq(r,t,n===void 0?r.custom:n,e)}var oY=$K(()=>window.ScrollTimeline!==void 0),sY=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>`finished`in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){let n=this.animations.map(n=>{if(oY()&&n.attachTimeline)return n.attachTimeline(e);if(typeof t==`function`)return t(n)});return()=>{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get startTime(){return this.getAll(`startTime`)}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}flatten(){this.runAll(`flatten`)}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}},cY=class extends sY{then(e,t){return Promise.all(this.animations).then(e).catch(t)}};function lY(e,t){return e?e[t]||e.default||e:void 0}var uY=2e4;function dY(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function fY(e){return typeof e==`function`}function pY(e,t){e.timeline=t,e.onfinish=null}var mY=e=>Array.isArray(e)&&typeof e[0]==`number`,hY={linearEasing:void 0};function gY(e,t){let n=$K(e);return()=>hY[t]??n()}var _Y=gY(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),vY=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=e(eq(0,i-1,t))+`, `;return`linear(${r.substring(0,r.length-2)})`};function yY(e){return!!(typeof e==`function`&&_Y()||!e||typeof e==`string`&&(e in xY||_Y())||mY(e)||Array.isArray(e)&&e.every(yY))}var bY=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,xY={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:bY([0,.65,.55,1]),circOut:bY([.55,0,1,.45]),backIn:bY([.31,.01,.66,-.59]),backOut:bY([.33,1.53,.69,.99])};function SY(e,t){if(e)return typeof e==`function`&&_Y()?vY(e,t):mY(e)?bY(e):Array.isArray(e)?e.map(e=>SY(e,t)||xY.easeOut):xY[e]}var CY={x:!1,y:!1};function wY(){return CY.x||CY.y}function TY(e,t,n){if(e instanceof Element)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function EY(e,t){let n=TY(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function DY(e){return t=>{t.pointerType===`touch`||wY()||e(t)}}function OY(e,t,n={}){let[r,i,a]=EY(e,n),o=DY(e=>{let{target:n}=e,r=t(e);if(typeof r!=`function`||!n)return;let a=DY(e=>{r(e),n.removeEventListener(`pointerleave`,a)});n.addEventListener(`pointerleave`,a,i)});return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}var kY=(e,t)=>t?e===t?!0:kY(e,t.parentElement):!1,AY=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,jY=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function MY(e){return jY.has(e.tagName)||e.tabIndex!==-1}var NY=new WeakSet;function PY(e){return t=>{t.key===`Enter`&&e(t)}}function FY(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var IY=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=PY(()=>{if(NY.has(n))return;FY(n,`down`);let e=PY(()=>{FY(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>FY(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function LY(e){return AY(e)&&!wY()}function RY(e,t,n={}){let[r,i,a]=EY(e,n),o=e=>{let r=e.currentTarget;if(!LY(e)||NY.has(r))return;NY.add(r);let a=t(e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),!(!LY(e)||!NY.has(r))&&(NY.delete(r),typeof a==`function`&&a(e,{success:t}))},s=e=>{o(e,n.useGlobalTarget||kY(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{!MY(e)&&e.getAttribute(`tabindex`)===null&&(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),e.addEventListener(`focus`,e=>IY(e,i),i)}),a}function zY(e){return e===`x`||e===`y`?CY[e]?null:(CY[e]=!0,()=>{CY[e]=!1}):CY.x||CY.y?null:(CY.x=CY.y=!0,()=>{CY.x=CY.y=!1})}var BY=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...iJ]),VY;function HY(){VY=void 0}var UY={now:()=>(VY===void 0&&UY.set(uq.isProcessing||rq.useManualTiming?uq.timestamp:performance.now()),VY),set:e=>{VY=e,queueMicrotask(HY)}};function WY(e,t){e.indexOf(t)===-1&&e.push(t)}function GY(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var KY=class{constructor(){this.subscriptions=[]}add(e){return WY(this.subscriptions,e),()=>GY(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};function qY(e,t){return t?1e3/t*e:0}var JY=30,YY=e=>!isNaN(parseFloat(e)),XY={current:void 0},ZY=class{constructor(e,t={}){this.version=`11.18.2`,this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let n=UY.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=UY.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=YY(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new KY);let n=this.events[e].add(t);return e===`change`?()=>{n(),cq.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return XY.current&&XY.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=UY.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>JY)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,JY);return qY(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function QY(e,t){return new ZY(e,t)}function $Y(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,QY(n))}function eX(e,t){let{transitionEnd:n={},transition:r={},...i}=aY(e,t)||{};for(let t in i={...i,...n},i)$Y(e,t,Qq(i[t]))}function tX(e){return!!($q(e)&&e.add)}function nX(e,t){let n=e.getValue(`willChange`);if(tX(n))return n.add(t)}function rX(e){return e.props[Iq]}var iX={current:!1},aX=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,oX=1e-7,sX=12;function cX(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=aX(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>oX&&++s<sX);return o}function lX(e,t,n,r){if(e===t&&n===r)return XK;let i=t=>cX(t,0,1,e,n);return e=>e===0||e===1?e:aX(i(e),t,r)}var uX=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,dX=e=>t=>1-e(1-t),fX=lX(.33,1.53,.69,.99),pX=dX(fX),mX=uX(pX),hX=e=>(e*=2)<1?.5*pX(e):.5*(2-2**(-10*(e-1))),gX=e=>1-Math.sin(Math.acos(e)),_X=dX(gX),vX=uX(gX),yX=e=>/^0[^.\s]+$/u.test(e);function bX(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||yX(e)}var xX=e=>Math.round(e*1e5)/1e5,SX=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function CX(e){return e==null}var wX=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,TX=(e,t)=>n=>!!(typeof n==`string`&&wX.test(n)&&n.startsWith(e)||t&&!CX(n)&&Object.prototype.hasOwnProperty.call(n,t)),EX=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(SX);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},DX=e=>fJ(0,255,e),OX={...pJ,transform:e=>Math.round(DX(e))},kX={test:TX(`rgb`,`red`),parse:EX(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+OX.transform(e)+`, `+OX.transform(t)+`, `+OX.transform(n)+`, `+xX(mJ.transform(r))+`)`};function AX(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var jX={test:TX(`#`),parse:AX,transform:kX.transform},MX={test:TX(`hsl`,`hue`),parse:EX(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+vJ.transform(xX(t))+`, `+vJ.transform(xX(n))+`, `+xX(mJ.transform(r))+`)`},NX={test:e=>kX.test(e)||jX.test(e)||MX.test(e),parse:e=>kX.test(e)?kX.parse(e):MX.test(e)?MX.parse(e):jX.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?kX.transform(e):MX.transform(e)},PX=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function FX(e){return isNaN(e)&&typeof e==`string`&&(e.match(SX)?.length||0)+(e.match(PX)?.length||0)>0}var IX=`number`,LX=`color`,RX=`var`,zX=`var(`,BX="${}",VX=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function HX(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(VX,e=>(NX.test(e)?(r.color.push(a),i.push(LX),n.push(NX.parse(e))):e.startsWith(zX)?(r.var.push(a),i.push(RX),n.push(e)):(r.number.push(a),i.push(IX),n.push(parseFloat(e))),++a,BX)).split(BX),indexes:r,types:i}}function UX(e){return HX(e).values}function WX(e){let{split:t,types:n}=HX(e),r=t.length;return e=>{let i=``;for(let a=0;a<r;a++)if(i+=t[a],e[a]!==void 0){let t=n[a];t===IX?i+=xX(e[a]):t===LX?i+=NX.transform(e[a]):i+=e[a]}return i}}var GX=e=>typeof e==`number`?0:e;function KX(e){let t=UX(e);return WX(e)(t.map(GX))}var qX={test:FX,parse:UX,createTransformer:WX,getAnimatableNone:KX},JX=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function YX(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(SX)||[];if(!r)return e;let i=n.replace(r,``),a=JX.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}var XX=/\b([a-z-]*)\(.*?\)/gu,ZX={...qX,getAnimatableNone:e=>{let t=e.match(XX);return t?t.map(YX).join(` `):e}},QX={...TJ,color:NX,backgroundColor:NX,outlineColor:NX,fill:NX,stroke:NX,borderColor:NX,borderTopColor:NX,borderRightColor:NX,borderBottomColor:NX,borderLeftColor:NX,filter:ZX,WebkitFilter:ZX},$X=e=>QX[e];function eZ(e,t){let n=$X(e);return n!==ZX&&(n=qX),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var tZ=new Set([`auto`,`none`,`0`]);function nZ(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!tZ.has(t)&&HX(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=eZ(n,i)}var rZ=e=>e===pJ||e===Z,iZ=(e,t)=>parseFloat(e.split(`, `)[t]),aZ=(e,t)=>(n,{transform:r})=>{if(r===`none`||!r)return 0;let i=r.match(/^matrix3d\((.+)\)$/u);if(i)return iZ(i[1],t);{let t=r.match(/^matrix\((.+)\)$/u);return t?iZ(t[1],e):0}},oZ=new Set([`x`,`y`,`z`]),sZ=iJ.filter(e=>!oZ.has(e));function cZ(e){let t=[];return sZ.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}var lZ={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:aZ(4,13),y:aZ(5,14)};lZ.translateX=lZ.x,lZ.translateY=lZ.y;var uZ=new Set,dZ=!1,fZ=!1;function pZ(){if(fZ){let e=Array.from(uZ).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=cZ(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{var r;(r=e.getValue(t))==null||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}fZ=!1,dZ=!1,uZ.forEach(e=>e.complete()),uZ.clear()}function mZ(){uZ.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(fZ=!0)})}function hZ(){mZ(),pZ()}var gZ=class{constructor(e,t,n,r,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(uZ.add(this),dZ||(dZ=!0,cq.read(mZ),cq.resolveKeyframes(pZ))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let i=0;i<e.length;i++)if(e[i]===null)if(i===0){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),uZ.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,uZ.delete(this))}resume(){this.isComplete||this.scheduleResolve()}},_Z=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),vZ=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function yZ(e){let t=vZ.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var bZ=4;function xZ(e,t,n=1){QK(n<=bZ,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[r,i]=yZ(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return _Z(e)?parseFloat(e):e}return lJ(i)?xZ(i,t,n+1):i}var SZ=e=>t=>t.test(e),CZ=[pJ,Z,vJ,_J,bJ,yJ,{test:e=>e===`auto`,parse:e=>e}],wZ=e=>CZ.find(SZ(e)),TZ=class extends gZ{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),lJ(r))){let i=xZ(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!BY.has(n)||e.length!==2)return;let[r,i]=e,a=wZ(r),o=wZ(i);if(a!==o)if(rZ(a)&&rZ(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)bX(e[t])&&n.push(t);n.length&&nZ(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=lZ[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=lZ[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},EZ=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(qX.test(e)||e===`0`)&&!e.startsWith(`url(`));function DZ(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function OZ(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=EZ(i,t),s=EZ(a,t);return ZK(o===s,`You are trying to animate ${t} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`),!o||!s?!1:DZ(e)||(n===`spring`||fY(n))&&r}var kZ=e=>e!==null;function AZ(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(kZ),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}var jZ=40,MZ=class{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=UY.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>jZ?this.resolvedAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&hZ(),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=UY.now(),this.hasAttemptedResolve=!0;let{name:n,type:r,velocity:i,delay:a,onComplete:o,onUpdate:s,isGenerator:c}=this.options;if(!c&&!OZ(e,n,r,i))if(iX.current||!a){s&&s(AZ(e,this.options,t)),o&&o(),this.resolveFinishedPromise();return}else this.options.duration=0;let l=this.initPlayback(e,t);l!==!1&&(this._resolved={keyframes:e,finalKeyframe:t,...l},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type=`keyframes`,this.options.ease=`linear`}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}},NZ=(e,t,n)=>e+(t-e)*n;function PZ(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function FZ({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=PZ(s,r,e+1/3),a=PZ(s,r,e),o=PZ(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function IZ(e,t){return n=>n>0?t:e}var LZ=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},RZ=[jX,kX,MX],zZ=e=>RZ.find(t=>t.test(e));function BZ(e){let t=zZ(e);if(ZK(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===MX&&(n=FZ(n)),n}var VZ=(e,t)=>{let n=BZ(e),r=BZ(t);if(!n||!r)return IZ(e,t);let i={...n};return e=>(i.red=LZ(n.red,r.red,e),i.green=LZ(n.green,r.green,e),i.blue=LZ(n.blue,r.blue,e),i.alpha=NZ(n.alpha,r.alpha,e),kX.transform(i))},HZ=(e,t)=>n=>t(e(n)),UZ=(...e)=>e.reduce(HZ),WZ=new Set([`none`,`hidden`]);function GZ(e,t){return WZ.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function KZ(e,t){return n=>NZ(e,t,n)}function qZ(e){return typeof e==`number`?KZ:typeof e==`string`?lJ(e)?IZ:NX.test(e)?VZ:ZZ:Array.isArray(e)?JZ:typeof e==`object`?NX.test(e)?VZ:YZ:IZ}function JZ(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>qZ(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function YZ(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=qZ(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function XZ(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var ZZ=(e,t)=>{let n=qX.createTransformer(t),r=HX(e),i=HX(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?WZ.has(e)&&!i.values.length||WZ.has(t)&&!r.values.length?GZ(e,t):UZ(JZ(XZ(r,i),i.values),n):(ZK(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),IZ(e,t))};function QZ(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?NZ(e,t,n):qZ(e)(e,t)}var $Z=5;function eQ(e,t,n){let r=Math.max(t-$Z,0);return qY(n-e(r),t-r)}var tQ={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},nQ=.001;function rQ({duration:e=tQ.duration,bounce:t=tQ.bounce,velocity:n=tQ.velocity,mass:r=tQ.mass}){let i,a;ZK(e<=tq(tQ.maxDuration),`Spring duration must be 10 seconds or less`);let o=1-t;o=fJ(tQ.minDamping,tQ.maxDamping,o),e=fJ(tQ.minDuration,tQ.maxDuration,nq(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=oQ(t,o),c=Math.exp(-i);return nQ-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=oQ(t**2,o);return(-i(t)+nQ>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-nQ+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=aQ(i,a,s);if(e=tq(e),isNaN(c))return{stiffness:tQ.stiffness,damping:tQ.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var iQ=12;function aQ(e,t,n){let r=n;for(let n=1;n<iQ;n++)r-=e(r)/t(r);return r}function oQ(e,t){return e*Math.sqrt(1-t*t)}var sQ=[`duration`,`bounce`],cQ=[`stiffness`,`damping`,`mass`];function lQ(e,t){return t.some(t=>e[t]!==void 0)}function uQ(e){let t={velocity:tQ.velocity,stiffness:tQ.stiffness,damping:tQ.damping,mass:tQ.mass,isResolvedFromDuration:!1,...e};if(!lQ(e,cQ)&&lQ(e,sQ))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*fJ(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:tQ.mass,stiffness:i,damping:a}}else{let n=rQ(e);t={...t,...n,mass:tQ.mass},t.isResolvedFromDuration=!0}return t}function dQ(e=tQ.visualDuration,t=tQ.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=uQ({...n,velocity:-nq(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=nq(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?tQ.restSpeed.granular:tQ.restSpeed.default,i||=v?tQ.restDelta.granular:tQ.restDelta.default;let y;if(h<1){let e=oQ(_,h);y=t=>o-Math.exp(-h*_*t)*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=0;h<1&&(n=e===0?tq(m):eQ(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(dY(b),uY),t=vY(t=>b.next(e*t).value,e,30);return e+`ms `+t}};return b}function fQ({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=dQ({keyframes:[f.value,m(f.value)],velocity:eQ(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}var pQ=lX(.42,0,1,1),mQ=lX(0,0,.58,1),hQ=lX(.42,0,.58,1),gQ=e=>Array.isArray(e)&&typeof e[0]!=`number`,_Q={linear:XK,easeIn:pQ,easeInOut:hQ,easeOut:mQ,circIn:gX,circInOut:vX,circOut:_X,backIn:pX,backInOut:mX,backOut:fX,anticipate:hX},vQ=e=>{if(mY(e)){QK(e.length===4,`Cubic bezier arrays must contain four numerical values.`);let[t,n,r,i]=e;return lX(t,n,r,i)}else if(typeof e==`string`)return QK(_Q[e]!==void 0,`Invalid easing type '${e}'`),_Q[e];return e};function yQ(e,t,n){let r=[],i=n||QZ,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=UZ(Array.isArray(t)?t[n]||XK:t,a)),r.push(a)}return r}function bQ(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(QK(a===t.length,`Both input and output ranges must be the same length`),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=yQ(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=eq(e[r],e[r+1],n);return s[r](i)};return n?t=>l(fJ(e[0],e[a-1],t)):l}function xQ(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=eq(0,t,r);e.push(NZ(n,1,i))}}function SQ(e){let t=[0];return xQ(t,e.length-1),t}function CQ(e,t){return e.map(e=>e*t)}function wQ(e,t){return e.map(()=>t||hQ).splice(0,e.length-1)}function TQ({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=gQ(r)?r.map(vQ):vQ(r),a={done:!1,value:t[0]},o=bQ(CQ(n&&n.length===t.length?n:SQ(t),e),t,{ease:Array.isArray(i)?i:wQ(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var EQ=e=>{let t=({timestamp:t})=>e(t);return{start:()=>cq.update(t,!0),stop:()=>lq(t),now:()=>uq.isProcessing?uq.timestamp:UY.now()}},DQ={decay:fQ,inertia:fQ,tween:TQ,keyframes:TQ,spring:dQ},OQ=e=>e/100,kQ=class extends MZ{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState=`running`,this.startTime=null,this.state=`idle`,this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state===`idle`)return;this.teardown();let{onStop:e}=this.options;e&&e()};let{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new(r?.KeyframeResolver||gZ)(i,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){let{type:t=`keyframes`,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=this.options,o=fY(t)?t:DQ[t]||TQ,s,c;o!==TQ&&typeof e[0]!=`number`&&(s=UZ(OQ,QZ(e[0],e[1])),e=[0,100]);let l=o({...this.options,keyframes:e});i===`mirror`&&(c=o({...this.options,keyframes:[...e].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=dY(l));let{calculatedDuration:u}=l,d=u+r,f=d*(n+1)-r;return{generator:l,mirroredGenerator:c,mapPercentToKeyframes:s,calculatedDuration:u,resolvedDuration:d,totalDuration:f}}onPostResolved(){let{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState===`paused`||!e?this.pause():this.state=this.pendingPlayState}tick(e,t=!1){let{resolved:n}=this;if(!n){let{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}let{finalKeyframe:r,generator:i,mirroredGenerator:a,mapPercentToKeyframes:o,keyframes:s,calculatedDuration:c,totalDuration:l,resolvedDuration:u}=n;if(this.startTime===null)return i.next(0);let{delay:d,repeat:f,repeatType:p,repeatDelay:m,onUpdate:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-l/this.speed,this.startTime)),t?this.currentTime=e:this.holdTime===null?this.currentTime=Math.round(e-this.startTime)*this.speed:this.currentTime=this.holdTime;let g=this.currentTime-d*(this.speed>=0?1:-1),_=this.speed>=0?g<0:g>l;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=l);let v=this.currentTime,y=i;if(f){let e=Math.min(this.currentTime,l)/u,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,f+1),t%2&&(p===`reverse`?(n=1-n,m&&(n-=m/u)):p===`mirror`&&(y=a)),v=fJ(0,1,n)*u}let b=_?{done:!1,value:s[0]}:y.next(v);o&&(b.value=o(b.value));let{done:x}=b;!_&&c!==null&&(x=this.speed>=0?this.currentTime>=l:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&r!==void 0&&(b.value=AZ(s,this.options,r)),h&&h(b.value),S&&this.finish(),b}get duration(){let{resolved:e}=this;return e?nq(e.calculatedDuration):0}get time(){return nq(this.currentTime)}set time(e){e=tq(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=nq(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState=`running`;return}if(this.isStopped)return;let{driver:e=EQ,onPlay:t,startTime:n}=this.options;this.driver||=e(e=>this.tick(e)),t&&t();let r=this.driver.now();this.holdTime===null?this.startTime?this.state===`finished`&&(this.startTime=r):this.startTime=n??this.calcStartTime():this.startTime=r-this.holdTime,this.state===`finished`&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state=`running`,this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState=`paused`;return}this.state=`paused`,this.holdTime=this.currentTime??0}complete(){this.state!==`running`&&this.play(),this.pendingPlayState=this.state=`finished`,this.holdTime=null}finish(){this.teardown(),this.state=`finished`;let{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state=`idle`,this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}},AQ=new Set([`opacity`,`clipPath`,`filter`,`transform`]);function jQ(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeInOut`,times:c}={}){let l={[t]:n};c&&(l.offset=c);let u=SY(s,i);return Array.isArray(u)&&(l.easing=u),e.animate(l,{delay:r,duration:i,easing:Array.isArray(u)?`linear`:u,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`})}var MQ=$K(()=>Object.hasOwnProperty.call(Element.prototype,`animate`)),NQ=10,PQ=2e4;function FQ(e){return fY(e.type)||e.type===`spring`||!yY(e.ease)}function IQ(e,t){let n=new kQ({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),r={done:!1,value:e[0]},i=[],a=0;for(;!r.done&&a<PQ;)r=n.sample(a),i.push(r.value),a+=NQ;return{times:void 0,keyframes:i,duration:a-NQ,ease:`linear`}}var LQ={anticipate:hX,backInOut:mX,circInOut:vX};function RQ(e){return e in LQ}var zQ=class extends MZ{constructor(e){super(e);let{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new TZ(i,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:i,type:a,motionValue:o,name:s,startTime:c}=this.options;if(!o.owner||!o.owner.current)return!1;if(typeof i==`string`&&_Y()&&RQ(i)&&(i=LQ[i]),FQ(this.options)){let{onComplete:t,onUpdate:o,motionValue:s,element:c,...l}=this.options,u=IQ(e,l);e=u.keyframes,e.length===1&&(e[1]=e[0]),n=u.duration,r=u.times,i=u.ease,a=`keyframes`}let l=jQ(o.owner.current,s,e,{...this.options,duration:n,times:r,ease:i});return l.startTime=c??this.calcStartTime(),this.pendingTimeline?(pY(l,this.pendingTimeline),this.pendingTimeline=void 0):l.onfinish=()=>{let{onComplete:n}=this.options;o.set(AZ(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:l,duration:n,times:r,type:a,ease:i,keyframes:e}}get duration(){let{resolved:e}=this;if(!e)return 0;let{duration:t}=e;return nq(t)}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return nq(t.currentTime||0)}set time(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.currentTime=tq(e)}get speed(){let{resolved:e}=this;if(!e)return 1;let{animation:t}=e;return t.playbackRate}set speed(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.playbackRate=e}get state(){let{resolved:e}=this;if(!e)return`idle`;let{animation:t}=e;return t.playState}get startTime(){let{resolved:e}=this;if(!e)return null;let{animation:t}=e;return t.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{let{resolved:t}=this;if(!t)return XK;let{animation:n}=t;pY(n,e)}return XK}play(){if(this.isStopped)return;let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.playState===`finished`&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state===`idle`)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:e}=this;if(!e)return;let{animation:t,keyframes:n,duration:r,type:i,ease:a,times:o}=e;if(t.playState===`idle`||t.playState===`finished`)return;if(this.time){let{motionValue:e,onUpdate:t,onComplete:s,element:c,...l}=this.options,u=new kQ({...l,keyframes:n,duration:r,type:i,ease:a,times:o,isGenerator:!0}),d=tq(this.time);e.setWithVelocity(u.sample(d-NQ).value,u.sample(d).value,NQ)}let{onStop:s}=this.options;s&&s(),this.cancel()}complete(){let{resolved:e}=this;e&&e.animation.finish()}cancel(){let{resolved:e}=this;e&&e.animation.cancel()}static supports(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!t||!t.owner||!(t.owner.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return MQ()&&n&&AQ.has(n)&&!s&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}},BQ={type:`spring`,stiffness:500,damping:25,restSpeed:10},VQ=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),HQ={type:`keyframes`,duration:.8},UQ={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},WQ=(e,{keyframes:t})=>t.length>2?HQ:aJ.has(e)?e.startsWith(`scale`)?VQ(t[1]):BQ:UQ;function GQ({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}var KQ=(e,t,n,r={},i,a)=>o=>{let s=lY(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=tq(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};GQ(s)||(u={...u,...WQ(e,u)}),u.duration&&=tq(u.duration),u.repeatDelay&&=tq(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(iX.current||rq.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),d&&!a&&t.get()!==void 0){let e=AZ(u.keyframes,s);if(e!==void 0)return cq.update(()=>{u.onUpdate(e),u.onComplete()}),new cY([])}return!a&&zQ.supports(u)?new zQ(u):new kQ(u)};function qQ({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function JQ(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);let c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||l&&qQ(l,t))continue;let o={delay:n,...lY(a||{},t)},u=!1;if(window.MotionHandoffAnimation){let n=rX(e);if(n){let e=window.MotionHandoffAnimation(n,t,cq);e!==null&&(o.startTime=e,u=!0)}}nX(e,t),r.start(KQ(t,r,i,e.shouldReduceMotion&&BY.has(t)?{type:!1}:o,e,u));let d=r.animation;d&&c.push(d)}return o&&Promise.all(c).then(()=>{cq.update(()=>{o&&eX(e,o)})}),c}function YQ(e,t,n={}){let r=aY(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(JQ(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return XQ(e,t,a+r,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function XQ(e,t,n=0,r=0,i=1,a){let o=[],s=(e.variantChildren.size-1)*r,c=i===1?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(ZQ).forEach((e,r)=>{e.notify(`AnimationStart`,t),o.push(YQ(e,t,{...a,delay:n+c(r)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(o)}function ZQ(e,t){return e.sortNodePosition(t)}function QQ(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>YQ(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=YQ(e,t,n);else{let i=typeof t==`function`?aY(e,t,n.custom):t;r=Promise.all(JQ(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var $Q=Eq.length;function e$(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&e$(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<$Q;n++){let r=Eq[n],i=e.props[r];(Cq(i)||i===!1)&&(t[r]=i)}return t}var t$=[...Tq].reverse(),n$=Tq.length;function r$(e){return t=>Promise.all(t.map(({animation:t,options:n})=>QQ(e,t,n)))}function i$(e){let t=r$(e),n=s$(),r=!0,i=t=>(n,r)=>{let i=aY(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(n){t=n(e)}function o(a){let{props:o}=e,s=e$(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<n$;t++){let f=t$[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=Cq(m),g=f===a?p.isActive:null;g===!1&&(d=t);let _=m===s[f]&&m!==o[f]&&h;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),p.protectedKeys={...u},!p.isActive&&g===null||!m&&!p.prevProp||wq(m)||typeof m==`boolean`)continue;let v=a$(p.prevProp,m),y=v||f===a&&p.isActive&&!_&&h||t>d&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,w={...C,...S},T=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=Xq(t)&&Xq(n)?!iY(t,n):t!==n,r?t==null?l.add(e):T(e):t!==void 0&&l.has(e)?T(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1),y&&(!(_&&v)||b)&&c.push(...x.map(e=>({animation:e,options:{type:f}})))}if(l.size){let t={};l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}function s(t,r){var i;if(n[t].isActive===r)return Promise.resolve();(i=e.variantChildren)==null||i.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let a=o(t);for(let e in n)n[e].protectedKeys={};return a}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=s$(),r=!0}}}function a$(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!iY(t,e):!1}function o$(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function s$(){return{animate:o$(!0),whileInView:o$(),whileHover:o$(),whileTap:o$(),whileDrag:o$(),whileFocus:o$(),exit:o$()}}var c$=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},l$=class extends c${constructor(e){super(e),e.animationState||=i$(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();wq(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}},u$=0,d$={animation:{Feature:l$},exit:{Feature:class extends c${constructor(){super(...arguments),this.id=u$++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}};function f$(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function p$(e){return{point:{x:e.pageX,y:e.pageY}}}var m$=e=>t=>AY(t)&&e(t,p$(t));function h$(e,t,n,r){return f$(e,t,m$(n),r)}var g$=(e,t)=>Math.abs(e-t);function _$(e,t){let n=g$(e.x,t.x),r=g$(e.y,t.y);return Math.sqrt(n**2+r**2)}var v$=class{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=x$(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=_$(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=uq;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=y$(t,this.transformPagePoint),cq.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=x$(e.type===`pointercancel`?this.lastMoveEventInfo:y$(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!AY(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;let a=y$(p$(e),this.transformPagePoint),{point:o}=a,{timestamp:s}=uq;this.history=[{...o,timestamp:s}];let{onSessionStart:c}=t;c&&c(e,x$(a,this.history)),this.removeListeners=UZ(h$(this.contextWindow,`pointermove`,this.handlePointerMove),h$(this.contextWindow,`pointerup`,this.handlePointerUp),h$(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),lq(this.updatePoint)}};function y$(e,t){return t?{point:t(e.point)}:e}function b$(e,t){return{x:e.x-t.x,y:e.y-t.y}}function x$({point:e},t){return{point:e,delta:b$(e,C$(t)),offset:b$(e,S$(t)),velocity:w$(t,.1)}}function S$(e){return e[0]}function C$(e){return e[e.length-1]}function w$(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=C$(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>tq(t)));)n--;if(!r)return{x:0,y:0};let a=nq(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var T$=1e-4,E$=1-T$,D$=1+T$,O$=.01,k$=0-O$,A$=0+O$;function j$(e){return e.max-e.min}function M$(e,t,n){return Math.abs(e-t)<=n}function N$(e,t,n,r=.5){e.origin=r,e.originPoint=NZ(t.min,t.max,e.origin),e.scale=j$(n)/j$(t),e.translate=NZ(n.min,n.max,e.origin)-e.originPoint,(e.scale>=E$&&e.scale<=D$||isNaN(e.scale))&&(e.scale=1),(e.translate>=k$&&e.translate<=A$||isNaN(e.translate))&&(e.translate=0)}function P$(e,t,n,r){N$(e.x,t.x,n.x,r?r.originX:void 0),N$(e.y,t.y,n.y,r?r.originY:void 0)}function F$(e,t,n){e.min=n.min+t.min,e.max=e.min+j$(t)}function I$(e,t,n){F$(e.x,t.x,n.x),F$(e.y,t.y,n.y)}function L$(e,t,n){e.min=t.min-n.min,e.max=e.min+j$(t)}function R$(e,t,n){L$(e.x,t.x,n.x),L$(e.y,t.y,n.y)}function z$(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?NZ(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?NZ(n,e,r.max):Math.min(e,n)),e}function B$(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function V$(e,{top:t,left:n,bottom:r,right:i}){return{x:B$(e.x,n,i),y:B$(e.y,t,r)}}function H$(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function U$(e,t){return{x:H$(e.x,t.x),y:H$(e.y,t.y)}}function W$(e,t){let n=.5,r=j$(e),i=j$(t);return i>r?n=eq(t.min,t.max-r,e.min):r>i&&(n=eq(e.min,e.max-i,t.min)),fJ(0,1,n)}function G$(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var K$=.35;function q$(e=K$){return e===!1?e=0:e===!0&&(e=K$),{x:J$(e,`left`,`right`),y:J$(e,`top`,`bottom`)}}function J$(e,t,n){return{min:Y$(e,t),max:Y$(e,n)}}function Y$(e,t){return typeof e==`number`?e:e[t]||0}var X$=()=>({translate:0,scale:1,origin:0,originPoint:0}),Z$=()=>({x:X$(),y:X$()}),Q$=()=>({min:0,max:0}),$$=()=>({x:Q$(),y:Q$()});function e1(e){return[e(`x`),e(`y`)]}function t1({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function n1({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function r1(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function i1(e){return e===void 0||e===1}function a1({scale:e,scaleX:t,scaleY:n}){return!i1(e)||!i1(t)||!i1(n)}function o1(e){return a1(e)||s1(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function s1(e){return c1(e.x)||c1(e.y)}function c1(e){return e&&e!==`0%`}function l1(e,t,n){return n+t*(e-n)}function u1(e,t,n,r,i){return i!==void 0&&(e=l1(e,i,r)),l1(e,n,r)+t}function d1(e,t=0,n=1,r,i){e.min=u1(e.min,t,n,r,i),e.max=u1(e.max,t,n,r,i)}function f1(e,{x:t,y:n}){d1(e.x,t.translate,t.scale,t.originPoint),d1(e.y,n.translate,n.scale,n.originPoint)}var p1=.999999999999,m1=1.0000000000001;function h1(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&v1(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,f1(e,o)),r&&o1(a.latestValues)&&v1(e,a.latestValues))}t.x<m1&&t.x>p1&&(t.x=1),t.y<m1&&t.y>p1&&(t.y=1)}function g1(e,t){e.min+=t,e.max+=t}function _1(e,t,n,r,i=.5){d1(e,t,n,NZ(e.min,e.max,i),r)}function v1(e,t){_1(e.x,t.x,t.scaleX,t.scale,t.originX),_1(e.y,t.y,t.scaleY,t.scale,t.originY)}function y1(e,t){return t1(r1(e.getBoundingClientRect(),t))}function b1(e,t,n){let r=y1(e,n),{scroll:i}=t;return i&&(g1(r.x,i.offset.x),g1(r.y,i.offset.y)),r}var x1=({current:e})=>e?e.ownerDocument.defaultView:null,S1=new WeakMap,C1=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=$$(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let r=e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(p$(e).point)},i=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=zY(n),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),e1(e=>{let t=this.getAxisMotionValue(e).get()||0;if(vJ.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=j$(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&cq.postRender(()=>i(e,t)),nX(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},a=(e,t)=>{let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=T1(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&a(e,t)},o=(e,t)=>this.stop(e,t),s=()=>e1(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new v$(e,{onSessionStart:r,onStart:i,onMove:a,onSessionEnd:o,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:x1(this.visualElement)})}stop(e,t){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:r}=t;this.startAnimation(r);let{onDragEnd:i}=this.getProps();i&&cq.postRender(()=>i(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!w1(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=z$(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Nq(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=V$(n.layoutBox,e):this.constraints=!1,this.elastic=q$(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&e1(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=G$(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Nq(e))return!1;let n=e.current;QK(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=b1(n,r.root,this.visualElement.getTransformPagePoint()),a=U$(r.layout.layoutBox,i);if(t){let e=t(n1(a));this.hasMutatedConstraints=!!e,e&&(a=t1(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=e1(o=>{if(!w1(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return nX(this.visualElement,e),n.start(KQ(e,n,0,t,this.visualElement,!1))}stopAnimation(){e1(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){e1(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){e1(t=>{let{drag:n}=this.getProps();if(!w1(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-NZ(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Nq(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};e1(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=W$({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),e1(t=>{if(!w1(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(NZ(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;S1.set(this.visualElement,this);let e=this.visualElement.current,t=h$(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();Nq(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),cq.read(n);let a=f$(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(e1(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{a(),t(),i(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=K$,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function w1(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function T1(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var E1=class extends c${constructor(e){super(e),this.removeGroupControls=XK,this.removeListeners=XK,this.controls=new C1(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||XK}unmount(){this.removeGroupControls(),this.removeListeners()}},D1=e=>(t,n)=>{e&&cq.postRender(()=>e(t,n))},O1=class extends c${constructor(){super(...arguments),this.removePointerDownListener=XK}onPointerDown(e){this.session=new v$(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:x1(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:D1(e),onStart:D1(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&cq.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=h$(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},k1={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function A1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var j1={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(Z.test(e))e=parseFloat(e);else return e;return`${A1(e,t.target.x)}% ${A1(e,t.target.y)}%`}},M1={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=qX.parse(e);if(i.length>5)return r;let a=qX.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=NZ(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},N1=class extends N.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;UJ(F1),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),k1.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,a=n.projection;return a?(a.isPresent=i,r||e.layoutDependency!==t||t===void 0?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||cq.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Lq.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function P1(e){let[t,n]=qK(),r=(0,N.useContext)(UK);return(0,P.jsx)(N1,{...e,layoutGroup:r,switchLayoutGroup:(0,N.useContext)(Rq),isPresent:t,safeToRemove:n})}var F1={borderRadius:{...j1,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:j1,borderTopRightRadius:j1,borderBottomLeftRadius:j1,borderBottomRightRadius:j1,boxShadow:M1};function I1(e,t,n){let r=$q(e)?e:QY(e);return r.start(KQ(``,r,t,n)),r.animation}function L1(e){return e instanceof SVGElement&&e.tagName!==`svg`}var R1=(e,t)=>e.depth-t.depth,z1=class{constructor(){this.children=[],this.isDirty=!1}add(e){WY(this.children,e),this.isDirty=!0}remove(e){GY(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(R1),this.isDirty=!1,this.children.forEach(e)}};function B1(e,t){let n=UY.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(lq(r),e(a-t))};return cq.read(r,!0),()=>lq(r)}var V1=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],H1=V1.length,U1=e=>typeof e==`string`?parseFloat(e):e,W1=e=>typeof e==`number`||Z.test(e);function G1(e,t,n,r,i,a){i?(e.opacity=NZ(0,n.opacity===void 0?1:n.opacity,q1(r)),e.opacityExit=NZ(t.opacity===void 0?1:t.opacity,0,J1(r))):a&&(e.opacity=NZ(t.opacity===void 0?1:t.opacity,n.opacity===void 0?1:n.opacity,r));for(let i=0;i<H1;i++){let a=`border${V1[i]}Radius`,o=K1(t,a),s=K1(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||W1(o)===W1(s)?(e[a]=Math.max(NZ(U1(o),U1(s),r),0),(vJ.test(s)||vJ.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=NZ(t.rotate||0,n.rotate||0,r))}function K1(e,t){return e[t]===void 0?e.borderRadius:e[t]}var q1=Y1(0,.5,_X),J1=Y1(.5,.95,XK);function Y1(e,t,n){return r=>r<e?0:r>t?1:n(eq(e,t,r))}function X1(e,t){e.min=t.min,e.max=t.max}function Z1(e,t){X1(e.x,t.x),X1(e.y,t.y)}function Q1(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function $1(e,t,n,r,i){return e-=t,e=l1(e,1/n,r),i!==void 0&&(e=l1(e,1/i,r)),e}function e0(e,t=0,n=1,r=.5,i,a=e,o=e){if(vJ.test(t)&&(t=parseFloat(t),t=NZ(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=NZ(a.min,a.max,r);e===a&&(s-=t),e.min=$1(e.min,t,n,s,i),e.max=$1(e.max,t,n,s,i)}function t0(e,t,[n,r,i],a,o){e0(e,t[n],t[r],t[i],t.scale,a,o)}var n0=[`x`,`scaleX`,`originX`],r0=[`y`,`scaleY`,`originY`];function i0(e,t,n,r){t0(e.x,t,n0,n?n.x:void 0,r?r.x:void 0),t0(e.y,t,r0,n?n.y:void 0,r?r.y:void 0)}function a0(e){return e.translate===0&&e.scale===1}function o0(e){return a0(e.x)&&a0(e.y)}function s0(e,t){return e.min===t.min&&e.max===t.max}function c0(e,t){return s0(e.x,t.x)&&s0(e.y,t.y)}function l0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function u0(e,t){return l0(e.x,t.x)&&l0(e.y,t.y)}function d0(e){return j$(e.x)/j$(e.y)}function f0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var p0=class{constructor(){this.members=[]}add(e){WY(this.members,e),e.scheduleRender()}remove(e){if(GY(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function m0(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var h0={type:`projectionFrame`,totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},g0=typeof window<`u`&&window.MotionDebug!==void 0,_0=[``,`X`,`Y`,`Z`],v0={visibility:`hidden`},y0=1e3,b0=0;function x0(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function S0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=rX(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,cq,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&S0(r)}function C0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=b0++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,g0&&(h0.totalNodes=h0.resolvedTargetDeltas=h0.recalculatedProjection=0),this.nodes.forEach(E0),this.nodes.forEach(N0),this.nodes.forEach(P0),this.nodes.forEach(D0),g0&&window.MotionDebug.record(h0)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new z1)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new KY),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=L1(t),this.instance=t;let{layoutId:r,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||r)&&(this.isLayoutDirty=!0),e){let n,r=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=B1(r,250),k1.hasAnimatedSinceResize&&(k1.hasAnimatedSinceResize=!1,this.nodes.forEach(M0))})}r&&this.root.registerSharedNode(r,this),this.options.animate!==!1&&a&&(r||i)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let i=this.options.transition||a.getDefaultTransition()||V0,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=a.getProps(),c=!this.targetLayout||!u0(this.targetLayout,r)||n,l=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,l);let t={...lY(i,`layout`),onPlay:o,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||M0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,lq(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(F0),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&S0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(k0);return}this.isUpdating||this.nodes.forEach(A0),this.isUpdating=!1,this.nodes.forEach(j0),this.nodes.forEach(w0),this.nodes.forEach(T0),this.clearAllSnapshots();let e=UY.now();uq.delta=fJ(0,1e3/60,e-uq.timestamp),uq.timestamp=e,uq.isProcessing=!0,dq.update.process(uq),dq.preRender.process(uq),dq.render.process(uq),uq.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Lq.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(O0),this.sharedNodes.forEach(I0)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,cq.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){cq.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=$$(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!o0(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&(t||o1(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),G0(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return $$();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(q0))){let{scroll:e}=this.root;e&&(g1(t.x,e.offset.x),g1(t.y,e.offset.y))}return t}removeElementScroll(e){let t=$$();if(Z1(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Z1(t,e),g1(t.x,i.offset.x),g1(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=$$();Z1(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&v1(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o1(r.latestValues)&&v1(n,r.latestValues)}return o1(this.latestValues)&&v1(n,this.latestValues),n}removeTransform(e){let t=$$();Z1(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!o1(n.latestValues))continue;a1(n.latestValues)&&n.updateSnapshot();let r=$$();Z1(r,n.measurePageBox()),i0(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return o1(this.latestValues)&&i0(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==uq.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!(!this.layout||!(r||i))){if(this.resolvedRelativeTargetAt=uq.timestamp,!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout&&this.animationProgress!==1?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$$(),this.relativeTargetOrigin=$$(),R$(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),Z1(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=$$(),this.targetWithTransforms=$$()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),I$(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Z1(this.target,this.layout.layoutBox),f1(this.target,this.targetDelta)):Z1(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target&&this.animationProgress!==1?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$$(),this.relativeTargetOrigin=$$(),R$(this.relativeTargetOrigin,this.target,e.target),Z1(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}g0&&h0.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||a1(this.parent.latestValues)||s1(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===uq.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Z1(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;h1(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=$$());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Q1(this.prevProjectionDelta.x,this.projectionDelta.x),Q1(this.prevProjectionDelta.y,this.projectionDelta.y)),P$(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!f0(this.projectionDelta.x,this.prevProjectionDelta.x)||!f0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),g0&&h0.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if((t=this.options.visualElement)==null||t.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Z$(),this.projectionDelta=Z$(),this.projectionDeltaWithTransform=Z$()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=Z$();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=$$(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(B0));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;L0(a.x,e.x,n),L0(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(R$(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),z0(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&c0(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=$$(),Z1(d,this.relativeTarget)),s&&(this.animationValues=i,G1(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&=(lq(this.pendingAnimation),void 0),this.pendingAnimation=cq.update(()=>{k1.hasAnimatedSinceResize=!0,this.currentAnimation=I1(0,y0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(y0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&K0(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||$$();let t=j$(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=j$(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Z1(t,n),v1(t,i),P$(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new p0),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&x0(`z`,e,r,this.animationValues);for(let t=0;t<_0.length;t++)x0(`rotate${_0[t]}`,e,r,this.animationValues),x0(`skew${_0[t]}`,e,r,this.animationValues);for(let t in e.render(),r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return v0;let t={visibility:``},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.opacity=``,t.pointerEvents=eJ(e?.pointerEvents)||``,t.transform=n?n(this.latestValues,``):`none`,t;let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){let t={};return this.options.layoutId&&(t.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,t.pointerEvents=eJ(e?.pointerEvents)||``),this.hasProjected&&!o1(this.latestValues)&&(t.transform=n?n({},``):`none`,this.hasProjected=!1),t}let i=r.animationValues||r.latestValues;this.applyTransformsToTarget(),t.transform=m0(this.projectionDeltaWithTransform,this.treeScale,i),n&&(t.transform=n(i,t.transform));let{x:a,y:o}=this.projectionDelta;for(let e in t.transformOrigin=`${a.origin*100}% ${o.origin*100}% 0`,r.animationValues?t.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:t.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit,HJ){if(i[e]===void 0)continue;let{correct:n,applyTo:a}=HJ[e],o=t.transform===`none`?i[e]:n(i[e],r);if(a){let e=a.length;for(let n=0;n<e;n++)t[a[n]]=o}else t[e]=o}return this.options.layoutId&&(t.pointerEvents=r===this?eJ(e?.pointerEvents)||``:`none`),t}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(k0),this.root.sharedNodes.clear()}}}function w0(e){e.updateLayout()}function T0(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i===`size`?e1(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=j$(r);r.min=n[e].min,r.max=r.min+i}):K0(i,t.layoutBox,n)&&e1(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=j$(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Z$();P$(o,n,t.layoutBox);let s=Z$();a?P$(s,e.applyTransform(r,!0),t.measuredBox):P$(s,n,t.layoutBox);let c=!o0(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=$$();R$(o,t.layoutBox,i.layoutBox);let s=$$();R$(s,n,a.layoutBox),u0(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeTargetChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function E0(e){g0&&h0.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function D0(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function O0(e){e.clearSnapshot()}function k0(e){e.clearMeasurements()}function A0(e){e.isLayoutDirty=!1}function j0(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function M0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function N0(e){e.resolveTargetDelta()}function P0(e){e.calcProjection()}function F0(e){e.resetSkewAndRotation()}function I0(e){e.removeLeadSnapshot()}function L0(e,t,n){e.translate=NZ(t.translate,0,n),e.scale=NZ(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function R0(e,t,n,r){e.min=NZ(t.min,n.min,r),e.max=NZ(t.max,n.max,r)}function z0(e,t,n,r){R0(e.x,t.x,n.x,r),R0(e.y,t.y,n.y,r)}function B0(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var V0={duration:.45,ease:[.4,0,.1,1]},H0=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),U0=H0(`applewebkit/`)&&!H0(`chrome/`)?Math.round:XK;function W0(e){e.min=U0(e.min),e.max=U0(e.max)}function G0(e){W0(e.x),W0(e.y)}function K0(e,t,n){return e===`position`||e===`preserve-aspect`&&!M$(d0(t),d0(n),.2)}function q0(e){return e!==e.root&&e.scroll?.wasRoot}var J0=C0({attachResizeListener:(e,t)=>f$(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Y0={current:void 0},X0=C0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Y0.current){let e=new J0({});e.mount(window),e.setOptions({layoutScroll:!0}),Y0.current=e}return Y0.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Z0={pan:{Feature:O1},drag:{Feature:E1,ProjectionNode:X0,MeasureLayout:P1}};function Q0(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&cq.postRender(()=>i(t,p$(t)))}var $0=class extends c${mount(){let{current:e}=this.node;e&&(this.unmount=OY(e,e=>(Q0(this.node,e,`Start`),e=>Q0(this.node,e,`End`))))}unmount(){}},e2=class extends c${constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=UZ(f$(this.node.current,`focus`,()=>this.onFocus()),f$(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function t2(e,t,n){let{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&cq.postRender(()=>i(t,p$(t)))}var n2=class extends c${mount(){let{current:e}=this.node;e&&(this.unmount=RY(e,e=>(t2(this.node,e,`Start`),(e,{success:t})=>t2(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},r2=new WeakMap,i2=new WeakMap,a2=e=>{let t=r2.get(e.target);t&&t(e)},o2=e=>{e.forEach(a2)};function s2({root:e,...t}){let n=e||document;i2.has(n)||i2.set(n,{});let r=i2.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(o2,{root:e,...t})),r[i]}function c2(e,t,n){let r=s2(t);return r2.set(e,n),r.observe(e),()=>{r2.delete(e),r.unobserve(e)}}var l2={some:0,all:1},u2=class extends c${constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:l2[r]};return c2(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(d2(e,t))&&this.startObserver()}unmount(){}};function d2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var f2={inView:{Feature:u2},tap:{Feature:n2},focus:{Feature:e2},hover:{Feature:$0}},p2={layout:{ProjectionNode:X0,MeasureLayout:P1}},m2={current:null},h2={current:!1};function g2(){if(h2.current=!0,JK)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>m2.current=e.matches;e.addListener(t),t()}else m2.current=!1}var _2=[...CZ,NX,qX],v2=e=>_2.find(SZ(e)),y2=new WeakMap;function b2(e,t,n){for(let r in t){let i=t[r],a=n[r];if($q(i))e.addValue(r,i);else if($q(a))e.addValue(r,QY(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,QY(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var x2=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],S2=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=gZ,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=UY.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,cq.render(this.render,!1,!0))};let{latestValues:s,renderState:c,onUpdate:l}=a;this.onUpdate=l,this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=Dq(t),this.isVariantNode=Oq(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];s[e]!==void 0&&$q(t)&&t.set(s[e],!1)}}mount(e){this.current=e,y2.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),h2.current||g2(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:m2.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in y2.delete(this.current),this.projection&&this.projection.unmount(),lq(this.notifyUpdate),lq(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=aJ.has(e),r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&cq.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=t.on(`renderRequest`,this.scheduleRender),a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i(),a&&a(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in mq){let t=mq[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):$$()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<x2.length;t++){let n=x2[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=b2(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=QY(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(_Z(n)||yX(n))?n=parseFloat(n):!v2(n)&&qX.test(t)&&(n=eZ(e,t)),this.setBaseTarget(e,$q(n)?n.get():n)),$q(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Yq(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!$q(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new KY),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}},C2=class extends S2{constructor(){super(...arguments),this.KeyframeResolver=TZ}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;$q(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function w2(e){return window.getComputedStyle(e)}var T2=class extends C2{constructor(){super(...arguments),this.type=`html`,this.renderInstance=zJ}readValueFromInstance(e,t){if(aJ.has(t)){let e=$X(t);return e&&e.default||0}else{let n=w2(e),r=(sJ(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return y1(e,t)}build(e,t,n){kJ(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return GJ(e,t,n)}},E2=class extends C2{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=$$}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(aJ.has(t)){let e=$X(t);return e&&e.default||0}return t=BJ.has(t)?t:Fq(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return KJ(e,t,n)}build(e,t,n){FJ(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){VJ(e,t,n,r)}mount(e){this.isSVGTag=RJ(e.tagName),super.mount(e)}},D2=(e,t)=>qq(e)?new E2(t):new T2(t,{allowProjection:e!==N.Fragment}),O2=xq(rY({...d$,...f2,...Z0,...p2},D2));function k2(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function A2({debounce:e,scroll:t,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){let i=n||(typeof window>`u`?class{}:window.ResizeObserver);if(!i)throw Error(`This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills`);let[a,o]=(0,N.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),s=(0,N.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),c=e?typeof e==`number`?e:e.scroll:null,l=e?typeof e==`number`?e:e.resize:null,u=(0,N.useRef)(!1);(0,N.useEffect)(()=>(u.current=!0,()=>void(u.current=!1)));let[d,f,p]=(0,N.useMemo)(()=>{let e=()=>{if(!s.current.element)return;let{left:e,top:t,width:n,height:i,bottom:a,right:c,x:l,y:d}=s.current.element.getBoundingClientRect(),f={left:e,top:t,width:n,height:i,bottom:a,right:c,x:l,y:d};s.current.element instanceof HTMLElement&&r&&(f.height=s.current.element.offsetHeight,f.width=s.current.element.offsetWidth),Object.freeze(f),u.current&&!F2(s.current.lastBounds,f)&&o(s.current.lastBounds=f)};return[e,l?k2(e,l):e,c?k2(e,c):e]},[o,r,c,l]);function m(){s.current.scrollContainers&&(s.current.scrollContainers.forEach(e=>e.removeEventListener(`scroll`,p,!0)),s.current.scrollContainers=null),s.current.resizeObserver&&(s.current.resizeObserver.disconnect(),s.current.resizeObserver=null),s.current.orientationHandler&&(`orientation`in screen&&`removeEventListener`in screen.orientation?screen.orientation.removeEventListener(`change`,s.current.orientationHandler):`onorientationchange`in window&&window.removeEventListener(`orientationchange`,s.current.orientationHandler))}function h(){s.current.element&&(s.current.resizeObserver=new i(p),s.current.resizeObserver.observe(s.current.element),t&&s.current.scrollContainers&&s.current.scrollContainers.forEach(e=>e.addEventListener(`scroll`,p,{capture:!0,passive:!0})),s.current.orientationHandler=()=>{p()},`orientation`in screen&&`addEventListener`in screen.orientation?screen.orientation.addEventListener(`change`,s.current.orientationHandler):`onorientationchange`in window&&window.addEventListener(`orientationchange`,s.current.orientationHandler))}return M2(p,!!t),j2(f),(0,N.useEffect)(()=>{m(),h()},[t,p,f]),(0,N.useEffect)(()=>m,[]),[e=>{!e||e===s.current.element||(m(),s.current.element=e,s.current.scrollContainers=N2(e),h())},a,d]}function j2(e){(0,N.useEffect)(()=>{let t=e;return window.addEventListener(`resize`,t),()=>void window.removeEventListener(`resize`,t)},[e])}function M2(e,t){(0,N.useEffect)(()=>{if(t){let t=e;return window.addEventListener(`scroll`,t,{capture:!0,passive:!0}),()=>void window.removeEventListener(`scroll`,t,!0)}},[e,t])}function N2(e){let t=[];if(!e||e===document.body)return t;let{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(e);return[n,r,i].some(e=>e===`auto`||e===`scroll`)&&t.push(e),[...t,...N2(e.parentElement)]}var P2=[`x`,`y`,`top`,`bottom`,`left`,`right`,`width`,`height`],F2=(e,t)=>P2.every(n=>e[n]===t[n]),I2=e=>{throw TypeError(e)},L2=(e,t,n)=>t.has(e)||I2(`Cannot `+n),R2=(e,t,n)=>(L2(e,t,`read from private field`),n?n.call(e):t.get(e)),z2=(e,t,n)=>t.has(e)?I2(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),B2=(e,t,n,r)=>(L2(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),V2,H2=class{constructor(){z2(this,V2),this.register=e=>{R2(this,V2).push(e)},this.unregister=e=>{for(;R2(this,V2).indexOf(e)!==-1;)R2(this,V2).splice(R2(this,V2).indexOf(e),1)},this.backendChanged=e=>{for(let t of R2(this,V2))t.backendChanged(e)},B2(this,V2,[])}};V2=new WeakMap;var U2,W2,G2,K2,q2,J2,Y2,X2,Z2,Q2,$2,e4=class e{constructor(t,n,r){if(z2(this,U2),z2(this,W2),z2(this,G2),z2(this,K2),z2(this,q2),z2(this,J2,(e,t,n)=>{if(!n.backend)throw Error(`You must specify a 'backend' property in your Backend entry: ${JSON.stringify(n)}`);let r=n.backend(e,t,n.options),i=n.id,a=!n.id&&r&&r.constructor;if(a&&(i=r.constructor.name),!i)throw Error(`You must specify an 'id' property in your Backend entry: ${JSON.stringify(n)}
178
- see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-5xx`);if(a&&console.warn(`Deprecation notice: You are using a pipeline which doesn't include backends' 'id'.
179
- This might be unsupported in the future, please specify 'id' explicitely for every backend.`),R2(this,G2)[i])throw Error(`You must specify a unique 'id' property in your Backend entry:
180
- ${JSON.stringify(n)} (conflicts with: ${JSON.stringify(R2(this,G2)[i])})`);return{id:i,instance:r,preview:n.preview??!1,transition:n.transition,skipDispatchOnTransition:n.skipDispatchOnTransition??!1}}),this.setup=()=>{if(!(typeof window>`u`)){if(e.isSetUp)throw Error(`Cannot have two MultiBackends at the same time.`);e.isSetUp=!0,R2(this,Y2).call(this,window),R2(this,G2)[R2(this,U2)].instance.setup()}},this.teardown=()=>{typeof window>`u`||(e.isSetUp=!1,R2(this,X2).call(this,window),R2(this,G2)[R2(this,U2)].instance.teardown())},this.connectDragSource=(e,t,n)=>R2(this,$2).call(this,`connectDragSource`,e,t,n),this.connectDragPreview=(e,t,n)=>R2(this,$2).call(this,`connectDragPreview`,e,t,n),this.connectDropTarget=(e,t,n)=>R2(this,$2).call(this,`connectDropTarget`,e,t,n),this.profile=()=>R2(this,G2)[R2(this,U2)].instance.profile(),this.previewEnabled=()=>R2(this,G2)[R2(this,U2)].preview,this.previewsList=()=>R2(this,W2),this.backendsList=()=>R2(this,K2),z2(this,Y2,e=>{for(let t of R2(this,K2))t.transition&&e.addEventListener(t.transition.event,R2(this,Z2))}),z2(this,X2,e=>{for(let t of R2(this,K2))t.transition&&e.removeEventListener(t.transition.event,R2(this,Z2))}),z2(this,Z2,e=>{let t=R2(this,U2);if(R2(this,K2).some(t=>t.id!==R2(this,U2)&&t.transition&&t.transition.check(e)?(B2(this,U2,t.id),!0):!1),R2(this,U2)!==t){R2(this,G2)[t].instance.teardown();for(let[e,t]of Object.entries(R2(this,q2)))t.unsubscribe(),t.unsubscribe=R2(this,Q2).call(this,t.func,...t.args);R2(this,W2).backendChanged(this);let n=R2(this,G2)[R2(this,U2)];if(n.instance.setup(),n.skipDispatchOnTransition)return;let r=e.constructor,i=new r(e.type,e);e.target?.dispatchEvent(i)}}),z2(this,Q2,(e,t,n,r)=>R2(this,G2)[R2(this,U2)].instance[e](t,n,r)),z2(this,$2,(e,t,n,r)=>{let i=`${e}_${t}`,a=R2(this,Q2).call(this,e,t,n,r);return R2(this,q2)[i]={func:e,args:[t,n,r],unsubscribe:a},()=>{R2(this,q2)[i].unsubscribe(),delete R2(this,q2)[i]}}),!r||!r.backends||r.backends.length<1)throw Error(`You must specify at least one Backend, if you are coming from 2.x.x (or don't understand this error)
181
- see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx`);B2(this,W2,new H2),B2(this,G2,{}),B2(this,K2,[]);for(let e of r.backends){let r=R2(this,J2).call(this,t,n,e);R2(this,G2)[r.id]=r,R2(this,K2).push(r)}B2(this,U2,R2(this,K2)[0].id),B2(this,q2,{})}};U2=new WeakMap,W2=new WeakMap,G2=new WeakMap,K2=new WeakMap,q2=new WeakMap,J2=new WeakMap,Y2=new WeakMap,X2=new WeakMap,Z2=new WeakMap,Q2=new WeakMap,$2=new WeakMap,e4.isSetUp=!1;var t4;(function(e){e.mouse=`mouse`,e.touch=`touch`,e.keyboard=`keyboard`})(t4||={});function n4(e){return!!e.targetTouches}function r4(e,t){if(e.targetTouches.length===1)return i4(e.targetTouches[0]);if(t&&e.touches.length===1&&e.touches[0].target===t.target)return i4(e.touches[0])}function i4(e,t){return n4(e)?r4(e,t):{x:e.clientX,y:e.clientY}}(()=>{let e=!1;try{addEventListener(`test`,()=>{},Object.defineProperty({},`passive`,{get(){return e=!0,!0}}))}catch{}return e})(),t4.mouse,t4.touch,t4.keyboard;var a4=function(){return a4=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a4.apply(this,arguments)};function o4(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function s4(e){var t=e.isVisible,n=e.ease,r=n===void 0?`easeIn`:n,i=e.duration,a=e.variants,o=a===void 0?{open:{opacity:1,height:`auto`},close:{opacity:0,height:0}}:a,s=e.children,c=A2({polyfill:HK}),l=c[0],u=c[1].height,d=(0,N.useState)(t),f=d[0],p=d[1],m=(0,N.useState)(t),h=m[0],g=m[1],_=(0,N.useState)(!1),v=_[0],y=_[1];return(0,N.useEffect)(function(){y(!0),t?p(!0):g(!1)},[t]),(0,N.useEffect)(function(){f&&g(!0)},[u===0]),N.createElement(O2.div,{style:v?{overflow:`hidden`}:void 0,onAnimationComplete:function(){y(!1),t||p(!1)},initial:h?`open`:`close`,animate:h?`open`:`close`,inherit:!1,variants:o,transition:{ease:r,duration:c4(u,i)}},N.createElement(`div`,{ref:l},f&&s))}function c4(e,t){if(t)return t;if(!e)return 0;var n=e/36;return Math.round((4+10*n**.25+n/5)*10)/1500}var l4=(0,N.createContext)({}),u4={isLock:!1},d4=function(e){var t=(0,N.useState)(u4.isLock),n=t[0],r=t[1];return N.createElement(l4.Provider,{value:{isLock:n,lock:function(){return r(!0)},unlock:function(){return r(!1)}}},e.children)},f4=(0,N.createContext)({}),p4={dropTargetId:void 0,index:void 0},m4=function(e){var t=(0,N.useState)(p4.dropTargetId),n=t[0],r=t[1],i=(0,N.useState)(p4.index),a=i[0],o=i[1];return N.createElement(f4.Provider,{value:{dropTargetId:n,index:a,showPlaceholder:function(e,t){r(e),o(t)},hidePlaceholder:function(){r(p4.dropTargetId),o(p4.index)}}},e.children)},h4=function(e,t){return e.text>t.text?1:e.text<t.text?-1:0},g4=function(e,t){return e.find(function(e){return e.id===t})},_4=function(e,t,n){if(n===0)return!1;var r=e.find(function(e){return e.id===n});return r===void 0?!1:r.parent===t?!0:_4(e,t,r.parent)},v4=function(e){return typeof e==`object`&&!!e&&`id`in e&&`parent`in e&&`text`in e},y4=function(e,t,n){var r=n.tree,i=n.rootId,a=n.canDrop;if(e===null){if(t===i)return!0;var o=r.find(function(e){return e.id===t});return!!(o&&o.droppable)}else{var s=v4(e)?e.id:null;if(a){var c=a(s,t);if(c!==void 0)return c}if(s===t)return!1;var l=r.find(function(e){return e.id===s}),o=r.find(function(e){return e.id===t});return l===void 0||s===null?t===i||!!o?.droppable:o===void 0?l.parent!==0:l.parent===t||!o.droppable?!1:!_4(r,s,t)}},b4=function(e,t,n){return e.map(function(e){return e.id===t?a4(a4({},e),{parent:n}):e})},x4=function(e,t,n){if(n===0)return 0;var r=e.filter(function(e){return e.parent===t});return r[n]?e.findIndex(function(e){return e.id===r[n].id}):e.findIndex(function(e){return e.id===r[n-1].id})+1},S4=function(e,t){return e.findIndex(function(e){return e.id===t})},C4=function(e,t,n,r){var i=S4(e,t),a=x4(e,n,r);return a=a>i?a-1:a,[i,a]},w4=function(e,t,n){var r=t<0?e.length+t:t;if(r>=0&&r<e.length){var i=n<0?e.length+n:n,a=e.splice(t,1)[0];e.splice(i,0,a)}},T4=function(e,t,n,r){var i=C4(e,t,n,r),a=i[0],o=i[1],s=o4([],e,!0);return w4(s,a,o),s.map(function(e){return e.id===t?a4(a4({},e),{parent:n}):e})},E4=function(e,t){var n=e.getBoundingClientRect();return t>n.top+n.height/2?`down`:`up`},D4=function(e,t){var n=``,r=0;return e.forEach(function(i,a){var o=E4(i,t.getClientOffset()?.y||0);n===``?n=o:n!==o&&(n=o,r=a),a===e.length-1&&o===`down`&&(r=a+1)}),r},O4=function(e,t,n){var r=t.closest(`[role="list"]`)?.querySelectorAll(`:scope > [role="listitem"]`);return r?D4(r,n):null},k4=function(e,t,n){var r=e.getBoundingClientRect(),i=n.dropTargetOffset;if(i===0)return`middle`;var a=r.top+i;return t>r.bottom-i?`lower`:t<a?`upper`:`middle`},A4=function(e,t,n,r){if(!t)return null;if(e===null){var i=t.querySelectorAll(`:scope > [role="listitem"]`);return{id:r.rootId,index:D4(i,n)}}var a=n.getItem(),o=t.querySelector(`[role="list"]`),s=k4(t,n.getClientOffset()?.y||0,r);if(o){if(s===`upper`)if(y4(a,e.parent,r)){var c=O4(e,t,n);return c===null?null:{id:e.parent,index:c}}else return{id:e.id,index:0};var i=o.querySelectorAll(`:scope > [role="listitem"]`);return{id:e.id,index:D4(i,n)}}else{if(s===`middle`)return{id:e.id,index:0};if(y4(a,e.parent,r)){var c=O4(e,t,n);return c===null?null:{id:e.parent,index:c}}return null}},j4=function(e,t){return e.some(function(e){return e.parent===t})},M4=(0,N.createContext)({}),N4=function(e){var t=W4(e.tree,e.initialOpen),n=t[0],r=t[1],i=r.handleToggle,a=r.handleCloseAll,o=r.handleOpenAll,s=r.handleOpen,c=r.handleClose;(0,N.useImperativeHandle)(e.treeRef,function(){return{open:function(t){return s(t,e.onChangeOpen)},close:function(t){return c(t,e.onChangeOpen)},openAll:function(){return o(e.onChangeOpen)},closeAll:function(){return a(e.onChangeOpen)}}});var l=Co().getMonitor(),u=e.canDrop,d=e.canDrag,f=a4(a4({extraAcceptTypes:[],listComponent:`ul`,listItemComponent:`li`,placeholderComponent:`li`,sort:!0,insertDroppableFirst:!0,enableAnimateExpand:!1,dropTargetOffset:0,initialOpen:!1},e),{openIds:n,onDrop:function(t,n,r){if(t){var i={dragSourceId:t.id,dropTargetId:n,dragSource:t,dropTarget:g4(e.tree,n),monitor:l},a=e.tree;if(g4(a,t.id)||(a=o4(o4([],a,!0),[t],!1)),e.sort===!1){i.destinationIndex=C4(a,t.id,n,r)[1],i.relativeIndex=r,e.onDrop(T4(a,t.id,n,r),i);return}e.onDrop(b4(a,t.id,n),i)}else{var i={dropTargetId:n,dropTarget:g4(e.tree,n),monitor:l};e.sort===!1&&(i.destinationIndex=x4(e.tree,n,r),i.relativeIndex=r),e.onDrop(e.tree,i)}},canDrop:u?function(t,n){return u(e.tree,{dragSourceId:t??void 0,dropTargetId:n,dragSource:l.getItem(),dropTarget:g4(e.tree,n),monitor:l})}:void 0,canDrag:d?function(t){return d(g4(e.tree,t))}:void 0,onToggle:function(t){return i(t,e.onChangeOpen)}});return N.createElement(M4.Provider,{value:f},e.children)},P4=function(e){return N.createElement(N4,a4({},e),N.createElement(d4,null,N.createElement(m4,null,e.children)))},F4=function(e){var t=(0,N.useContext)(l4);(0,N.useEffect)(function(){if(e.current){var n=e.current,r=function(e){var n=e.target;(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&t.lock()},i=function(e){var n=e.target;(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&t.unlock()},a=function(e){return r(e)},o=function(e){return i(e)},s=function(e){return r(e)},c=function(e){return i(e)},l=new MutationObserver(function(){document.activeElement===document.body&&t.unlock()});return l.observe(n,{subtree:!0,childList:!0}),n.addEventListener(`mouseover`,a),n.addEventListener(`mouseout`,o),n.addEventListener(`focusin`,s),n.addEventListener(`focusout`,c),function(){l.disconnect(),n.removeEventListener(`mouseover`,a),n.removeEventListener(`mouseout`,o),n.removeEventListener(`focusin`,s),n.removeEventListener(`focusout`,c)}}},[e,t]),(0,N.useEffect)(function(){var n;(n=e.current)==null||n.setAttribute(`draggable`,t.isLock?`false`:`true`)},[e,t.isLock])},I4={TREE_ITEM:Symbol()},L4=null,R4=function(e){var t=e.target;if(t instanceof HTMLElement){var n=t.closest(`[role="listitem"]`);e.currentTarget===n&&(L4=n)}},z4=function(e){return R4(e)},B4=function(e){return R4(e)},V4=function(e,t){var n=K4();(0,N.useEffect)(function(){var e=t.current;return e?.addEventListener(`dragstart`,z4),e?.addEventListener(`touchstart`,B4,{passive:!0}),function(){e?.removeEventListener(`dragstart`,z4),e?.removeEventListener(`touchstart`,B4)}},[t]);var r=Ao({type:I4.TREE_ITEM,item:function(r){var i=a4({ref:t},e);return n.onDragStart&&n.onDragStart(i,r),i},end:function(e,t){var r=e;n.onDragEnd&&n.onDragEnd(r,t)},canDrag:function(){var r=n.canDrag;return L4===t.current?r?r(e.id):!0:!1},collect:function(e){return{isDragging:e.isDragging()}}});return[r[0].isDragging,r[1],r[2]]},H4=function(e){var t=K4(),n=(0,N.useContext)(f4),r=zo({accept:o4([I4.TREE_ITEM],t.extraAcceptTypes,!0),drop:function(e,r){var i=t.rootId,a=t.onDrop,o=n.dropTargetId,s=n.index;r.isOver({shallow:!0})&&o!==void 0&&s!==void 0&&a(v4(e)?e:null,i,s),n.hidePlaceholder()},canDrop:function(e,n){var r=t.rootId;return n.isOver({shallow:!0})?e===void 0?!1:y4(e,r,t):!1},hover:function(r,i){if(i.isOver({shallow:!0})){var a=t.rootId,o=n.dropTargetId,s=n.index,c=n.showPlaceholder,l=n.hidePlaceholder,u=A4(null,e.current,i,t);if(u===null||!y4(r,a,t)){l();return}(u.id!==o||u.index!==s)&&c(u.id,u.index)}},collect:function(e){var t=e.getItem();return{isOver:e.isOver({shallow:!0})&&e.canDrop(),dragSource:t}}}),i=r[0];return[i.isOver,i.dragSource,r[1]]},U4=function(e,t){var n=K4(),r=(0,N.useContext)(f4),i=zo({accept:o4([I4.TREE_ITEM],n.extraAcceptTypes,!0),drop:function(e,t){var i=r.dropTargetId,a=r.index;t.isOver({shallow:!0})&&i!==void 0&&a!==void 0&&n.onDrop(v4(e)?e:null,i,a),r.hidePlaceholder()},canDrop:function(r,i){if(i.isOver({shallow:!0})){var a=A4(e,t.current,i,n);return a===null?!1:y4(r,a.id,n)}return!1},hover:function(i,a){if(a.isOver({shallow:!0})){var o=r.dropTargetId,s=r.index,c=r.showPlaceholder,l=r.hidePlaceholder,u=A4(e,t.current,a,n);if(u===null||!y4(i,u.id,n)){l();return}(u.id!==o||u.index!==s)&&c(u.id,u.index)}},collect:function(e){var t=e.getItem();return{isOver:e.isOver({shallow:!0})&&e.canDrop(),dragSource:t}}}),a=i[0];return[a.isOver,a.dragSource,i[1]]},W4=function(e,t){var n=(0,N.useMemo)(function(){return t===!0?e.filter(function(t){return j4(e,t.id)}).map(function(e){return e.id}):Array.isArray(t)?t:[]},[t]),r=(0,N.useState)(n),i=r[0],a=r[1];return(0,N.useEffect)(function(){return a(n)},[n]),[i,{handleToggle:function(e,t){var n=i.includes(e)?i.filter(function(t){return t!==e}):o4(o4([],i,!0),[e],!1);a(n),t&&t(n)},handleCloseAll:function(e){a([]),e&&e([])},handleOpenAll:function(t){var n=e.filter(function(t){return j4(e,t.id)}).map(function(e){return e.id});a(n),t&&t(n)},handleOpen:function(t,n){var r=[];if(Array.isArray(t)){var o=e.filter(function(n){return t.includes(n.id)&&j4(e,n.id)});r=o4(o4([],i,!0),o.map(function(e){return e.id}),!0).filter(function(e,t,n){return n.indexOf(e)===t})}else r=i.includes(t)?i:o4(o4([],i,!0),[t],!1);a(r),n&&n(r)},handleClose:function(e,t){var n=i.filter(function(t){return Array.isArray(e)?!e.includes(t):t!==e});a(n),t&&t(n)}}]},G4=function(){return jo(function(e){var t=e.getItemType();return{item:e.getItem(),clientOffset:e.getClientOffset(),isDragging:e.isDragging()&&t===I4.TREE_ITEM}})},K4=function(){var e=(0,N.useContext)(M4);if(!e)throw Error(`useTreeContext must be used under TreeProvider`);return e},q4=function(e,t){var n=K4(),r=n.rootId,i=n.rootProps,a=n.classes,o=a?.container||``;return t&&a?.dropTarget&&(o=`${o} ${a.dropTarget}`),e===r&&a?.root&&(o=`${o} ${a.root}`),e===r&&i?.className&&(o=`${o} ${i.className}`),o=o.trim(),o},J4=function(e,t,n){t.current?n(t):n(e),(0,N.useEffect)(function(){t.current?n(t):n(e)},[t.current])},Y4=function(e){var t=K4(),n=(0,N.useContext)(f4),r=(0,N.useRef)(null),i=(0,N.useRef)(null),a=t.tree.find(function(t){return t.id===e.id}),o=t.openIds,s=t.classes,c=t.enableAnimateExpand,l=o.includes(e.id),u=V4(a,r),d=u[0],f=u[1],p=u[2],m=U4(a,r),h=m[0],g=m[1],_=m[2];J4(r,i,f),y4(g,e.id,t)&&_(r),(0,N.useEffect)(function(){t.dragPreviewRender?p(ci(),{captureDraggingState:!0}):i.current&&p(r)},[p,t.dragPreviewRender]),F4(r);var v=(0,N.useCallback)(function(){t.onToggle(a.id)},[a.id,t]),y=t.listItemComponent,b=t.canDrag?t.canDrag(e.id):!0,x=n.dropTargetId===e.id,S={depth:e.depth,isOpen:l,isDragging:d,isDropTarget:x,draggable:b,hasChild:j4(t.tree,e.id),containerRef:r,handleRef:i,onToggle:v},C=``;return s?.listItem&&(C=typeof s.listItem==`string`?s.listItem:s.listItem(a,S)),h&&s?.dropTarget&&(C=`${C} ${s.dropTarget}`),d&&s?.draggingSource&&(C=`${C} ${s.draggingSource}`),N.createElement(y,{ref:r,className:C,role:`listitem`},t.render(a,S),c&&S.hasChild&&N.createElement(s4,{isVisible:l},N.createElement(Z4,{parentId:e.id,depth:e.depth+1})),!c&&S.hasChild&&l&&N.createElement(Z4,{parentId:e.id,depth:e.depth+1}))},X4=function(e){var t=K4(),n=t.placeholderRender,r=t.placeholderComponent,i=t.classes,a=(0,N.useContext)(f4),o=Co().getMonitor(),s=o.getItem();if(!n||!s)return null;var c=e.dropTargetId===a.dropTargetId&&(e.index===a.index||e.index===void 0&&e.listCount===a.index),l=o.getTargetIds();return!c||!l.length?null:N.createElement(r,{className:i?.placeholder||``},n(s,{depth:e.depth}))},Z4=function(e){var t=K4(),n=(0,N.useRef)(null),r=t.tree.filter(function(t){return t.parent===e.parentId}),i=r,a=typeof t.sort==`function`?t.sort:h4;if(t.insertDroppableFirst){var o=r.filter(function(e){return e.droppable}),s=r.filter(function(e){return!e.droppable});t.sort===!1?i=o4(o4([],o,!0),s,!0):(o=o.sort(a),s=s.sort(a),i=o4(o4([],o,!0),s,!0))}else t.sort!==!1&&(i=r.sort(a));var c=H4(n),l=c[0],u=c[1],d=c[2];e.parentId===t.rootId&&y4(u,t.rootId,t)&&d(n);var f=q4(e.parentId,l),p=t.rootProps||{},m=t.listComponent;return N.createElement(m,a4({ref:n,role:`list`},p,{className:f}),i.map(function(t,n){return N.createElement(N.Fragment,{key:t.id},N.createElement(X4,{depth:e.depth,listCount:i.length,dropTargetId:e.parentId,index:n}),N.createElement(Y4,{id:t.id,depth:e.depth}))}),N.createElement(X4,{depth:e.depth,listCount:i.length,dropTargetId:e.parentId}))},Q4={height:`100%`,left:0,pointerEvents:`none`,position:`fixed`,top:0,width:`100%`,zIndex:100},$4=function(e){var t=e.clientOffset;return t?{pointerEvents:`none`,transform:`translate(${t.x}px, ${t.y}px)`}:{}},e3=function(){var e=K4(),t=G4(),n=t.isDragging,r=t.clientOffset;return!n||!r?null:N.createElement(`div`,{style:Q4},N.createElement(`div`,{style:$4(t)},e.dragPreviewRender&&e.dragPreviewRender(t)))};function t3(e,t){return N.createElement(P4,a4({},e,{treeRef:t}),e.dragPreviewRender&&N.createElement(e3,null),N.createElement(Z4,{parentId:e.rootId,depth:0}))}(0,N.forwardRef)(t3);var n3=Number.isNaN||function(e){return typeof e==`number`&&e!==e};function r3(e,t){return!!(e===t||n3(e)&&n3(t))}function i3(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!r3(e[n],t[n]))return!1;return!0}function a3(e,t){t===void 0&&(t=i3);var n=null;function r(){var r=[...arguments];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}function o3(e,t,n){let r=0,i,a={},o=[];return e.forEach((e,s)=>{let c=t.some(e=>e>=s-n&&e<=s+n);!c&&i===void 0?(i={index:r,startLine:s,endLine:s,lines:1},o.push(i),a[s]=i.index,r++):!c&&i?(i.endLine=s,i.lines++,a[s]=i.index):i=void 0}),{lineBlocks:a,blocks:o}}var s3=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};const c3=new class extends s3{};function l3(e,t,n){return c3.diff(e,t,n)}function u3(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function d3(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function f3(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function p3(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function m3(e,t){return f3(e,t,``)}function h3(e,t){return p3(e,t,``)}function g3(e,t){return t.slice(0,_3(e,t))}function _3(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function v3(e){return e.includes(`\r
182
- `)&&!e.startsWith(`
183
- `)&&!e.match(/[^\r]\n/)}function y3(e){return!e.includes(`\r
184
- `)&&e.includes(`
185
- `)}function b3(e){let t;for(t=e.length-1;t>=0&&e[t].match(/\s/);t--);return e.substring(t+1)}function x3(e){let t=e.match(/^\s*/);return t?t[0]:``}var S3=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,C3=RegExp(`[${S3}]+|\\s+|[^${S3}]`,`ug`);const w3=new class extends s3{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=[];for(let t of Array.from(r.segment(e))){let e=t.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}}else n=e.match(C3)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&E3(n,i,r,e),n=e,r=null,i=null)}),(r||i)&&E3(n,i,r,null),e}};function T3(e,t,n){return n?.ignoreWhitespace!=null&&!n.ignoreWhitespace?O3(e,t,n):w3.diff(e,t,n)}function E3(e,t,n,r){if(t&&n){let i=x3(t.value),a=b3(t.value),o=x3(n.value),s=b3(n.value);if(e){let r=u3(i,o);e.value=p3(e.value,o,r),t.value=m3(t.value,r),n.value=m3(n.value,r)}if(r){let e=d3(a,s);r.value=f3(r.value,s,e),t.value=h3(t.value,e),n.value=h3(n.value,e)}}else if(n){if(e){let e=x3(n.value);n.value=n.value.substring(e.length)}if(r){let e=x3(r.value);r.value=r.value.substring(e.length)}}else if(e&&r){let n=x3(r.value),i=x3(t.value),a=b3(t.value),o=u3(n,i);t.value=m3(t.value,o);let s=d3(m3(n,o),a);t.value=h3(t.value,s),r.value=f3(r.value,n,s),e.value=p3(e.value,n,n.slice(0,n.length-s.length))}else if(r){let e=x3(r.value),n=g3(b3(t.value),e);t.value=h3(t.value,n)}else if(e){let n=g3(b3(e.value),x3(t.value));t.value=m3(t.value,n)}}const D3=new class extends s3{tokenize(e){let t=RegExp(`(\\r?\\n)|[${S3}]+|[^\\S\\n\\r]+|[^${S3}]`,`ug`);return e.match(t)||[]}};function O3(e,t,n){return D3.diff(e,t,n)}function k3(e,t){if(typeof e==`function`)t.callback=e;else if(e)for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}const A3=new class extends s3{constructor(){super(...arguments),this.tokenize=N3}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
186
- `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
187
- `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
188
- `)&&(e=e.slice(0,-1)),t.endsWith(`
189
- `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function j3(e,t,n){return A3.diff(e,t,n)}function M3(e,t,n){return n=k3(n,{ignoreWhitespace:!0}),A3.diff(e,t,n)}function N3(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
190
- `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function P3(e){return e==`.`||e==`!`||e==`?`}const F3=new class extends s3{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(P3(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}};function I3(e,t,n){return F3.diff(e,t,n)}const L3=new class extends s3{tokenize(e){return e.split(/([{}:;,]|\s+)/)}};function R3(e,t,n){return L3.diff(e,t,n)}const z3=new class extends s3{constructor(){super(...arguments),this.tokenize=N3}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(V3(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function B3(e,t,n){return z3.diff(e,t,n)}function V3(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=V3(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=V3(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}const H3=new class extends s3{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function U3(e,t,n){return H3.diff(e,t,n)}function W3(e){return Array.isArray(e)?e.map(e=>W3(e)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(e=>Object.assign(Object.assign({},e),{lines:e.lines.map((t,n)=>t.startsWith(`\\`)||t.endsWith(`\r`)||e.lines[n+1]?.startsWith(`\\`)?t:t+`\r`)}))})}function G3(e){return Array.isArray(e)?e.map(e=>G3(e)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(e=>Object.assign(Object.assign({},e),{lines:e.lines.map(e=>e.endsWith(`\r`)?e.substring(0,e.length-1):e)}))})}function K3(e){return Array.isArray(e)||(e=[e]),!e.some(e=>e.hunks.some(e=>e.lines.some(e=>!e.startsWith(`\\`)&&e.endsWith(`\r`))))}function q3(e){return Array.isArray(e)||(e=[e]),e.some(e=>e.hunks.some(e=>e.lines.some(e=>e.endsWith(`\r`))))&&e.every(e=>e.hunks.every(e=>e.lines.every((t,n)=>t.startsWith(`\\`)||t.endsWith(`\r`)||e.lines[n+1]?.startsWith(`\\`))))}function J3(e){let t=e.split(/\n/),n=[],r=0;function i(){let e={};for(n.push(e);r<t.length;){let n=t[r];if(/^(---|\+\+\+|@@)\s/.test(n))break;let i=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(n);i&&(e.index=n.substring(i[0].length).trim()),r++}for(a(e),a(e),e.hunks=[];r<t.length;){let n=t[r];if(/^(Index:\s|diff\s|---\s|\+\+\+\s|===================================================================)/.test(n))break;if(/^@@/.test(n))e.hunks.push(o());else if(n)throw Error(`Unknown line `+(r+1)+` `+JSON.stringify(n));else r++}}function a(e){let n=/^(---|\+\+\+)\s+/.exec(t[r]);if(n){let i=n[1],a=t[r].substring(3).trim().split(` `,2),o=(a[1]||``).trim(),s=a[0].replace(/\\\\/g,`\\`);s.startsWith(`"`)&&s.endsWith(`"`)&&(s=s.substr(1,s.length-2)),i===`---`?(e.oldFileName=s,e.oldHeader=o):(e.newFileName=s,e.newHeader=o),r++}}function o(){let e=r,n=t[r++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),i={oldStart:+n[1],oldLines:n[2]===void 0?1:+n[2],newStart:+n[3],newLines:n[4]===void 0?1:+n[4],lines:[]};i.oldLines===0&&(i.oldStart+=1),i.newLines===0&&(i.newStart+=1);let a=0,o=0;for(;r<t.length&&(o<i.oldLines||a<i.newLines||t[r]?.startsWith(`\\`));r++){let n=t[r].length==0&&r!=t.length-1?` `:t[r][0];if(n===`+`||n===`-`||n===` `||n===`\\`)i.lines.push(t[r]),n===`+`?a++:n===`-`?o++:n===` `&&(a++,o++);else throw Error(`Hunk at line ${e+1} contained invalid line ${t[r]}`)}if(!a&&i.newLines===1&&(i.newLines=0),!o&&i.oldLines===1&&(i.oldLines=0),a!==i.newLines)throw Error(`Added line count did not match for hunk at line `+(e+1));if(o!==i.oldLines)throw Error(`Removed line count did not match for hunk at line `+(e+1));return i}for(;r<t.length;)i();return n}function Y3(e,t,n){let r=!0,i=!1,a=!1,o=1;return function s(){if(r&&!a){if(i?o++:r=!1,e+o<=n)return e+o;a=!0}if(!i)return a||(r=!0),t<=e-o?e-o++:(i=!0,s())}}function X3(e,t,n={}){let r;if(r=typeof t==`string`?J3(t):Array.isArray(t)?t:[t],r.length>1)throw Error(`applyPatch only works with a single input.`);return Z3(e,r[0],n)}function Z3(e,t,n={}){(n.autoConvertLineEndings||n.autoConvertLineEndings==null)&&(v3(e)&&K3(t)?t=W3(t):y3(e)&&q3(t)&&(t=G3(t)));let r=e.split(`
191
- `),i=t.hunks,a=n.compareLine||((e,t,n,r)=>t===r),o=n.fuzzFactor||0,s=0;if(o<0||!Number.isInteger(o))throw Error(`fuzzFactor must be a non-negative integer`);if(!i.length)return e;let c=``,l=!1,u=!1;for(let e=0;e<i[i.length-1].lines.length;e++){let t=i[i.length-1].lines[e];t[0]==`\\`&&(c[0]==`+`?l=!0:c[0]==`-`&&(u=!0)),c=t}if(l){if(u){if(!o&&r[r.length-1]==``)return!1}else if(r[r.length-1]==``)r.pop();else if(!o)return!1}else if(u){if(r[r.length-1]!=``)r.push(``);else if(!o)return!1}function d(e,t,n,i=0,o=!0,s=[],c=0){let l=0,u=!1;for(;i<e.length;i++){let f=e[i],p=f.length>0?f[0]:` `,m=f.length>0?f.substr(1):f;if(p===`-`)if(a(t+1,r[t],p,m))t++,l=0;else return!n||r[t]==null?null:(s[c]=r[t],d(e,t+1,n-1,i,!1,s,c+1));if(p===`+`){if(!o)return null;s[c]=m,c++,l=0,u=!0}if(p===` `)if(l++,s[c]=r[t],a(t+1,r[t],p,m))c++,o=!0,u=!1,t++;else return u||!n?null:r[t]&&(d(e,t+1,n-1,i+1,!1,s,c+1)||d(e,t+1,n-1,i,!1,s,c+1))||d(e,t,n-1,i+1,!1,s,c)}return c-=l,t-=l,s.length=c,{patchedLines:s,oldLineLastI:t-1}}let f=[],p=0;for(let e=0;e<i.length;e++){let t=i[e],n,a=r.length-t.oldLines+o,c;for(let e=0;e<=o;e++){c=t.oldStart+p-1;let r=Y3(c,s,a);for(;c!==void 0&&(n=d(t.lines,c,e),!n);c=r());if(n)break}if(!n)return!1;for(let e=s;e<c;e++)f.push(r[e]);for(let e=0;e<n.patchedLines.length;e++){let t=n.patchedLines[e];f.push(t)}s=n.oldLineLastI+1,p=c+1-t.oldStart}for(let e=s;e<r.length;e++)f.push(r[e]);return f.join(`
192
- `)}function Q3(e,t){let n=typeof e==`string`?J3(e):e,r=0;function i(){let e=n[r++];if(!e)return t.complete();t.loadFile(e,function(n,r){if(n)return t.complete(n);let a=X3(r,e,t);t.patched(e,a,function(e){if(e)return t.complete(e);i()})})}i()}function $3(e){return Array.isArray(e)?e.map(e=>$3(e)).reverse():Object.assign(Object.assign({},e),{oldFileName:e.newFileName,oldHeader:e.newHeader,newFileName:e.oldFileName,newHeader:e.oldHeader,hunks:e.hunks.map(e=>({oldLines:e.newLines,oldStart:e.newStart,newLines:e.oldLines,newStart:e.oldStart,lines:e.lines.map(e=>e.startsWith(`-`)?`+${e.slice(1)}`:e.startsWith(`+`)?`-${e.slice(1)}`:e)}))})}const e6={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0},t6={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!0},n6={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!1};function r6(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;j3(n,r,Object.assign(Object.assign({},s),{callback:t=>{e(l(t))}}))}else return l(j3(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||s6(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s)if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
193
- `)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function i6(e,t){if(t||=e6,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders)throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>i6(e,t)).join(`
194
- `)}let n=[];t.includeIndex&&e.oldFileName==e.newFileName&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`),t.includeFileHeaders&&(n.push(`--- `+e.oldFileName+(e.oldHeader===void 0?``:` `+e.oldHeader)),n.push(`+++ `+e.newFileName+(e.newHeader===void 0?``:` `+e.newHeader)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t];r.oldLines===0&&--r.oldStart,r.newLines===0&&--r.newStart,n.push(`@@ -`+r.oldStart+`,`+r.oldLines+` +`+r.newStart+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
195
- `)+`
196
- `}function a6(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;r6(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?i6(e,o.headerOptions):void 0)}}))}else{let s=r6(e,t,n,r,i,a,o);return s?i6(s,o?.headerOptions):void 0}}function o6(e,t,n,r,i,a){return a6(e,e,t,n,r,i,a)}function s6(e){let t=e.endsWith(`
197
- `),n=e.split(`
198
- `).map(e=>e+`
199
- `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function c6(e){let t=[],n,r;for(let i=0;i<e.length;i++)n=e[i],r=n.added?1:n.removed?-1:0,t.push([r,n.value]);return t}function l6(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];r.added?t.push(`<ins>`):r.removed&&t.push(`<del>`),t.push(u6(r.value)),r.added?t.push(`</ins>`):r.removed&&t.push(`</del>`)}return t.join(``)}function u6(e){let t=e;return t=t.replace(/&/g,`&amp;`),t=t.replace(/</g,`&lt;`),t=t.replace(/>/g,`&gt;`),t=t.replace(/"/g,`&quot;`),t}var d6=r({Diff:()=>s3,FILE_HEADERS_ONLY:()=>t6,INCLUDE_HEADERS:()=>e6,OMIT_HEADERS:()=>n6,applyPatch:()=>X3,applyPatches:()=>Q3,arrayDiff:()=>H3,canonicalize:()=>V3,characterDiff:()=>c3,convertChangesToDMP:()=>c6,convertChangesToXML:()=>l6,createPatch:()=>o6,createTwoFilesPatch:()=>a6,cssDiff:()=>L3,diffArrays:()=>U3,diffChars:()=>l3,diffCss:()=>R3,diffJson:()=>B3,diffLines:()=>j3,diffSentences:()=>I3,diffTrimmedLines:()=>M3,diffWords:()=>T3,diffWordsWithSpace:()=>O3,formatPatch:()=>i6,jsonDiff:()=>z3,lineDiff:()=>A3,parsePatch:()=>J3,reversePatch:()=>$3,sentenceDiff:()=>F3,structuredPatch:()=>r6,wordDiff:()=>w3,wordsWithSpaceDiff:()=>D3},1);function f6(e){return e==null}function p6(e){return typeof e==`object`&&!!e}function m6(e){return Array.isArray(e)?e:f6(e)?[]:[e]}function h6(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}function g6(e,t){var n=``,r;for(r=0;r<t;r+=1)n+=e;return n}function _6(e){return e===0&&1/e==-1/0}var v6={isNothing:f6,isObject:p6,toArray:m6,repeat:g6,isNegativeZero:_6,extend:h6};function y6(e,t){var n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
200
-
201
- `+e.mark.snippet),r+` `+n):r}function b6(e,t){Error.call(this),this.name=`YAMLException`,this.reason=e,this.mark=t,this.message=y6(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}b6.prototype=Object.create(Error.prototype),b6.prototype.constructor=b6,b6.prototype.toString=function(e){return this.name+`: `+y6(this,e)};var x6=b6;function S6(e,t,n,r,i){var a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}function C6(e,t){return v6.repeat(` `,t-e.length)+e}function w6(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||=79,typeof t.indent!=`number`&&(t.indent=1),typeof t.linesBefore!=`number`&&(t.linesBefore=3),typeof t.linesAfter!=`number`&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],a,o=-1;a=n.exec(e.buffer);)i.push(a.index),r.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var s=``,c,l,u=Math.min(e.line+t.linesAfter,i.length).toString().length,d=t.maxLength-(t.indent+u+3);for(c=1;c<=t.linesBefore&&!(o-c<0);c++)l=S6(e.buffer,r[o-c],i[o-c],e.position-(r[o]-r[o-c]),d),s=v6.repeat(` `,t.indent)+C6((e.line-c+1).toString(),u)+` | `+l.str+`
202
- `+s;for(l=S6(e.buffer,r[o],i[o],e.position,d),s+=v6.repeat(` `,t.indent)+C6((e.line+1).toString(),u)+` | `+l.str+`
203
- `,s+=v6.repeat(`-`,t.indent+u+3+l.pos)+`^
204
- `,c=1;c<=t.linesAfter&&!(o+c>=i.length);c++)l=S6(e.buffer,r[o+c],i[o+c],e.position-(r[o]-r[o+c]),d),s+=v6.repeat(` `,t.indent)+C6((e.line+c+1).toString(),u)+` | `+l.str+`
205
- `;return s.replace(/\n$/,``)}var T6=w6,E6=[`kind`,`multi`,`resolve`,`construct`,`instanceOf`,`predicate`,`represent`,`representName`,`defaultStyle`,`styleAliases`],D6=[`scalar`,`sequence`,`mapping`];function O6(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function k6(e,t){if(t||={},Object.keys(t).forEach(function(t){if(E6.indexOf(t)===-1)throw new x6(`Unknown option "`+t+`" is met in definition of "`+e+`" YAML type.`)}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=O6(t.styleAliases||null),D6.indexOf(this.kind)===-1)throw new x6(`Unknown kind "`+this.kind+`" is specified for "`+e+`" YAML type.`)}var A6=k6;function j6(e,t){var n=[];return e[t].forEach(function(e){var t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}function kie(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}function M6(e){return this.extend(e)}M6.prototype.extend=function(e){var t=[],n=[];if(e instanceof A6)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new x6(`Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })`);t.forEach(function(e){if(!(e instanceof A6))throw new x6(`Specified list of YAML types (or a single Type object) contains a non-Type object.`);if(e.loadKind&&e.loadKind!==`scalar`)throw new x6(`There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.`);if(e.multi)throw new x6(`There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.`)}),n.forEach(function(e){if(!(e instanceof A6))throw new x6(`Specified list of YAML types (or a single Type object) contains a non-Type object.`)});var r=Object.create(M6.prototype);return r.implicit=(this.implicit||[]).concat(t),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=j6(r,`implicit`),r.compiledExplicit=j6(r,`explicit`),r.compiledTypeMap=kie(r.compiledImplicit,r.compiledExplicit),r};var Aie=new M6({explicit:[new A6(`tag:yaml.org,2002:str`,{kind:`scalar`,construct:function(e){return e===null?``:e}}),new A6(`tag:yaml.org,2002:seq`,{kind:`sequence`,construct:function(e){return e===null?[]:e}}),new A6(`tag:yaml.org,2002:map`,{kind:`mapping`,construct:function(e){return e===null?{}:e}})]});function jie(e){if(e===null)return!0;var t=e.length;return t===1&&e===`~`||t===4&&(e===`null`||e===`Null`||e===`NULL`)}function Mie(){return null}function Nie(e){return e===null}var Pie=new A6(`tag:yaml.org,2002:null`,{kind:`scalar`,resolve:jie,construct:Mie,predicate:Nie,represent:{canonical:function(){return`~`},lowercase:function(){return`null`},uppercase:function(){return`NULL`},camelcase:function(){return`Null`},empty:function(){return``}},defaultStyle:`lowercase`});function Fie(e){if(e===null)return!1;var t=e.length;return t===4&&(e===`true`||e===`True`||e===`TRUE`)||t===5&&(e===`false`||e===`False`||e===`FALSE`)}function Iie(e){return e===`true`||e===`True`||e===`TRUE`}function Lie(e){return Object.prototype.toString.call(e)===`[object Boolean]`}var Rie=new A6(`tag:yaml.org,2002:bool`,{kind:`scalar`,resolve:Fie,construct:Iie,predicate:Lie,represent:{lowercase:function(e){return e?`true`:`false`},uppercase:function(e){return e?`TRUE`:`FALSE`},camelcase:function(e){return e?`True`:`False`}},defaultStyle:`lowercase`});function zie(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Bie(e){return 48<=e&&e<=55}function Vie(e){return 48<=e&&e<=57}function Hie(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i===`-`||i===`+`)&&(i=e[++n]),i===`0`){if(n+1===t)return!0;if(i=e[++n],i===`b`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(i!==`0`&&i!==`1`)return!1;r=!0}return r&&i!==`_`}if(i===`x`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(!zie(e.charCodeAt(n)))return!1;r=!0}return r&&i!==`_`}if(i===`o`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(!Bie(e.charCodeAt(n)))return!1;r=!0}return r&&i!==`_`}}if(i===`_`)return!1;for(;n<t;n++)if(i=e[n],i!==`_`){if(!Vie(e.charCodeAt(n)))return!1;r=!0}return!(!r||i===`_`)}function Uie(e){var t=e,n=1,r;if(t.indexOf(`_`)!==-1&&(t=t.replace(/_/g,``)),r=t[0],(r===`-`||r===`+`)&&(r===`-`&&(n=-1),t=t.slice(1),r=t[0]),t===`0`)return 0;if(r===`0`){if(t[1]===`b`)return n*parseInt(t.slice(2),2);if(t[1]===`x`)return n*parseInt(t.slice(2),16);if(t[1]===`o`)return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}function Wie(e){return Object.prototype.toString.call(e)===`[object Number]`&&e%1==0&&!v6.isNegativeZero(e)}var Gie=new A6(`tag:yaml.org,2002:int`,{kind:`scalar`,resolve:Hie,construct:Uie,predicate:Wie,represent:{binary:function(e){return e>=0?`0b`+e.toString(2):`-0b`+e.toString(2).slice(1)},octal:function(e){return e>=0?`0o`+e.toString(8):`-0o`+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?`0x`+e.toString(16).toUpperCase():`-0x`+e.toString(16).toUpperCase().slice(1)}},defaultStyle:`decimal`,styleAliases:{binary:[2,`bin`],octal:[8,`oct`],decimal:[10,`dec`],hexadecimal:[16,`hex`]}}),Kie=RegExp(`^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function qie(e){return!(e===null||!Kie.test(e)||e[e.length-1]===`_`)}function Jie(e){var t=e.replace(/_/g,``).toLowerCase(),n=t[0]===`-`?-1:1;return`+-`.indexOf(t[0])>=0&&(t=t.slice(1)),t===`.inf`?n===1?1/0:-1/0:t===`.nan`?NaN:n*parseFloat(t,10)}var Yie=/^[-+]?[0-9]+e/;function Xie(e,t){var n;if(isNaN(e))switch(t){case`lowercase`:return`.nan`;case`uppercase`:return`.NAN`;case`camelcase`:return`.NaN`}else if(e===1/0)switch(t){case`lowercase`:return`.inf`;case`uppercase`:return`.INF`;case`camelcase`:return`.Inf`}else if(e===-1/0)switch(t){case`lowercase`:return`-.inf`;case`uppercase`:return`-.INF`;case`camelcase`:return`-.Inf`}else if(v6.isNegativeZero(e))return`-0.0`;return n=e.toString(10),Yie.test(n)?n.replace(`e`,`.e`):n}function Zie(e){return Object.prototype.toString.call(e)===`[object Number]`&&(e%1!=0||v6.isNegativeZero(e))}var Qie=new A6(`tag:yaml.org,2002:float`,{kind:`scalar`,resolve:qie,construct:Jie,predicate:Zie,represent:Xie,defaultStyle:`lowercase`}),$ie=Aie.extend({implicit:[Pie,Rie,Gie,Qie]}),N6=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),P6=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$`);function eae(e){return e===null?!1:N6.exec(e)!==null||P6.exec(e)!==null}function tae(e){var t,n,r,i,a,o,s,c=0,l=null,u,d,f;if(t=N6.exec(e),t===null&&(t=P6.exec(e)),t===null)throw Error(`Date resolve error`);if(n=+t[1],r=t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+=`0`;c=+c}return t[9]&&(u=+t[10],d=+(t[11]||0),l=(u*60+d)*6e4,t[9]===`-`&&(l=-l)),f=new Date(Date.UTC(n,r,i,a,o,s,c)),l&&f.setTime(f.getTime()-l),f}function nae(e){return e.toISOString()}var rae=new A6(`tag:yaml.org,2002:timestamp`,{kind:`scalar`,resolve:eae,construct:tae,instanceOf:Date,represent:nae});function iae(e){return e===`<<`||e===null}var aae=new A6(`tag:yaml.org,2002:merge`,{kind:`scalar`,resolve:iae}),F6=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
206
- \r`;function oae(e){if(e===null)return!1;var t,n,r=0,i=e.length,a=F6;for(n=0;n<i;n++)if(t=a.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8==0}function sae(e){var t,n,r=e.replace(/[\r\n=]/g,``),i=r.length,a=F6,o=0,s=[];for(t=0;t<i;t++)t%4==0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(r.charAt(t));return n=i%4*6,n===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):n===18?(s.push(o>>10&255),s.push(o>>2&255)):n===12&&s.push(o>>4&255),new Uint8Array(s)}function cae(e){var t=``,n=0,r,i,a=e.length,o=F6;for(r=0;r<a;r++)r%3==0&&r&&(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]),n=(n<<8)+e[r];return i=a%3,i===0?(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]):i===2?(t+=o[n>>10&63],t+=o[n>>4&63],t+=o[n<<2&63],t+=o[64]):i===1&&(t+=o[n>>2&63],t+=o[n<<4&63],t+=o[64],t+=o[64]),t}function lae(e){return Object.prototype.toString.call(e)===`[object Uint8Array]`}var uae=new A6(`tag:yaml.org,2002:binary`,{kind:`scalar`,resolve:oae,construct:sae,predicate:lae,represent:cae}),dae=Object.prototype.hasOwnProperty,fae=Object.prototype.toString;function pae(e){if(e===null)return!0;var t=[],n,r,i,a,o,s=e;for(n=0,r=s.length;n<r;n+=1){if(i=s[n],o=!1,fae.call(i)!==`[object Object]`)return!1;for(a in i)if(dae.call(i,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}function mae(e){return e===null?[]:e}var hae=new A6(`tag:yaml.org,2002:omap`,{kind:`sequence`,resolve:pae,construct:mae}),gae=Object.prototype.toString;function _ae(e){if(e===null)return!0;var t,n,r,i,a,o=e;for(a=Array(o.length),t=0,n=o.length;t<n;t+=1){if(r=o[t],gae.call(r)!==`[object Object]`||(i=Object.keys(r),i.length!==1))return!1;a[t]=[i[0],r[i[0]]]}return!0}function vae(e){if(e===null)return[];var t,n,r,i,a,o=e;for(a=Array(o.length),t=0,n=o.length;t<n;t+=1)r=o[t],i=Object.keys(r),a[t]=[i[0],r[i[0]]];return a}var yae=new A6(`tag:yaml.org,2002:pairs`,{kind:`sequence`,resolve:_ae,construct:vae}),bae=Object.prototype.hasOwnProperty;function xae(e){if(e===null)return!0;var t,n=e;for(t in n)if(bae.call(n,t)&&n[t]!==null)return!1;return!0}function Sae(e){return e===null?{}:e}var Cae=new A6(`tag:yaml.org,2002:set`,{kind:`mapping`,resolve:xae,construct:Sae}),I6=$ie.extend({implicit:[rae,aae],explicit:[uae,hae,yae,Cae]}),L6=Object.prototype.hasOwnProperty,R6=1,z6=2,B6=3,V6=4,H6=1,wae=2,U6=3,Tae=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Eae=/[\x85\u2028\u2029]/,Dae=/[,\[\]\{\}]/,W6=/^(?:!|!!|![a-z\-]+!)$/i,G6=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function K6(e){return Object.prototype.toString.call(e)}function q6(e){return e===10||e===13}function J6(e){return e===9||e===32}function Y6(e){return e===9||e===32||e===10||e===13}function X6(e){return e===44||e===91||e===93||e===123||e===125}function Oae(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function kae(e){return e===120?2:e===117?4:e===85?8:0}function Aae(e){return 48<=e&&e<=57?e-48:-1}function Z6(e){return e===48?`\0`:e===97?`\x07`:e===98?`\b`:e===116||e===9?` `:e===110?`
207
- `:e===118?`\v`:e===102?`\f`:e===114?`\r`:e===101?`\x1B`:e===32?` `:e===34?`"`:e===47?`/`:e===92?`\\`:e===78?`…`:e===95?`\xA0`:e===76?`\u2028`:e===80?`\u2029`:``}function jae(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Q6(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}for(var $6=Array(256),e8=Array(256),t8=0;t8<256;t8++)$6[t8]=Z6(t8)?1:0,e8[t8]=Z6(t8);function Mae(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||I6,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function n8(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=T6(n),new x6(t,n)}function Q(e,t){throw n8(e,t)}function r8(e,t){e.onWarning&&e.onWarning.call(null,n8(e,t))}var i8={YAML:function(e,t,n){var r,i,a;e.version!==null&&Q(e,`duplication of %YAML directive`),n.length!==1&&Q(e,`YAML directive accepts exactly one argument`),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&Q(e,`ill-formed argument of the YAML directive`),i=parseInt(r[1],10),a=parseInt(r[2],10),i!==1&&Q(e,`unacceptable YAML version of the document`),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&r8(e,`unsupported YAML version of the document`)},TAG:function(e,t,n){var r,i;n.length!==2&&Q(e,`TAG directive accepts exactly two arguments`),r=n[0],i=n[1],W6.test(r)||Q(e,`ill-formed tag handle (first argument) of the TAG directive`),L6.call(e.tagMap,r)&&Q(e,`there is a previously declared suffix for "`+r+`" tag handle`),G6.test(i)||Q(e,`ill-formed tag prefix (second argument) of the TAG directive`);try{i=decodeURIComponent(i)}catch{Q(e,`tag prefix is malformed: `+i)}e.tagMap[r]=i}};function a8(e,t,n,r){var i,a,o,s;if(t<n){if(s=e.input.slice(t,n),r)for(i=0,a=s.length;i<a;i+=1)o=s.charCodeAt(i),o===9||32<=o&&o<=1114111||Q(e,`expected valid JSON character`);else Tae.test(s)&&Q(e,`the stream contains non-printable characters`);e.result+=s}}function o8(e,t,n,r){var i,a,o,s;for(v6.isObject(n)||Q(e,`cannot merge mappings; the provided source object is unacceptable`),i=Object.keys(n),o=0,s=i.length;o<s;o+=1)a=i[o],L6.call(t,a)||(Q6(t,a,n[a]),r[a]=!0)}function s8(e,t,n,r,i,a,o,s,c){var l,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,u=i.length;l<u;l+=1)Array.isArray(i[l])&&Q(e,`nested arrays are not supported inside keys`),typeof i==`object`&&K6(i[l])===`[object Object]`&&(i[l]=`[object Object]`);if(typeof i==`object`&&K6(i)===`[object Object]`&&(i=`[object Object]`),i=String(i),t===null&&(t={}),r===`tag:yaml.org,2002:merge`)if(Array.isArray(a))for(l=0,u=a.length;l<u;l+=1)o8(e,t,a[l],n);else o8(e,t,a,n);else !e.json&&!L6.call(n,i)&&L6.call(t,i)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,Q(e,`duplicated mapping key`)),Q6(t,i,a),delete n[i];return t}function c8(e){var t=e.input.charCodeAt(e.position);t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Q(e,`a line break is expected`),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function l8(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;J6(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(q6(i))for(c8(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&r8(e,`deficient indentation`),r}function u8(e){var t=e.position,n=e.input.charCodeAt(t);return!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||Y6(n)))}function d8(e,t){t===1?e.result+=` `:t>1&&(e.result+=v6.repeat(`
208
- `,t-1))}function Nae(e,t,n){var r,i,a,o,s,c,l,u,d=e.kind,f=e.result,p=e.input.charCodeAt(e.position);if(Y6(p)||X6(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),Y6(i)||n&&X6(i)))return!1;for(e.kind=`scalar`,e.result=``,a=o=e.position,s=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),Y6(i)||n&&X6(i))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),Y6(r))break}else if(e.position===e.lineStart&&u8(e)||n&&X6(p))break;else if(q6(p))if(c=e.line,l=e.lineStart,u=e.lineIndent,l8(e,!1,-1),e.lineIndent>=t){s=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=l,e.lineIndent=u;break}s&&=(a8(e,a,o,!1),d8(e,e.line-c),a=o=e.position,!1),J6(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return a8(e,a,o,!1),e.result?!0:(e.kind=d,e.result=f,!1)}function Pae(e,t){var n=e.input.charCodeAt(e.position),r,i;if(n!==39)return!1;for(e.kind=`scalar`,e.result=``,e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(a8(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else q6(n)?(a8(e,r,i,!0),d8(e,l8(e,!1,t)),r=i=e.position):e.position===e.lineStart&&u8(e)?Q(e,`unexpected end of the document within a single quoted scalar`):(e.position++,i=e.position);Q(e,`unexpected end of the stream within a single quoted scalar`)}function Fae(e,t){var n,r,i,a,o,s=e.input.charCodeAt(e.position);if(s!==34)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(s=e.input.charCodeAt(e.position))!==0;)if(s===34)return a8(e,n,e.position,!0),e.position++,!0;else if(s===92){if(a8(e,n,e.position,!0),s=e.input.charCodeAt(++e.position),q6(s))l8(e,!1,t);else if(s<256&&$6[s])e.result+=e8[s],e.position++;else if((o=kae(s))>0){for(i=o,a=0;i>0;i--)s=e.input.charCodeAt(++e.position),(o=Oae(s))>=0?a=(a<<4)+o:Q(e,`expected hexadecimal character`);e.result+=jae(a),e.position++}else Q(e,`unknown escape sequence`);n=r=e.position}else q6(s)?(a8(e,n,r,!0),d8(e,l8(e,!1,t)),n=r=e.position):e.position===e.lineStart&&u8(e)?Q(e,`unexpected end of the document within a double quoted scalar`):(e.position++,r=e.position);Q(e,`unexpected end of the stream within a double quoted scalar`)}function Iae(e,t){var n=!0,r,i,a,o=e.tag,s,c=e.anchor,l,u,d,f,p,m=Object.create(null),h,g,_,v=e.input.charCodeAt(e.position);if(v===91)u=93,p=!1,s=[];else if(v===123)u=125,p=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),v=e.input.charCodeAt(++e.position);v!==0;){if(l8(e,!0,t),v=e.input.charCodeAt(e.position),v===u)return e.position++,e.tag=o,e.anchor=c,e.kind=p?`mapping`:`sequence`,e.result=s,!0;n?v===44&&Q(e,`expected the node content, but found ','`):Q(e,`missed comma between flow collection entries`),g=h=_=null,d=f=!1,v===63&&(l=e.input.charCodeAt(e.position+1),Y6(l)&&(d=f=!0,e.position++,l8(e,!0,t))),r=e.line,i=e.lineStart,a=e.position,p8(e,t,R6,!1,!0),g=e.tag,h=e.result,l8(e,!0,t),v=e.input.charCodeAt(e.position),(f||e.line===r)&&v===58&&(d=!0,v=e.input.charCodeAt(++e.position),l8(e,!0,t),p8(e,t,R6,!1,!0),_=e.result),p?s8(e,s,m,g,h,_,r,i,a):d?s.push(s8(e,null,m,g,h,_,r,i,a)):s.push(h),l8(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(n=!0,v=e.input.charCodeAt(++e.position)):n=!1}Q(e,`unexpected end of the stream within a flow collection`)}function Lae(e,t){var n,r,i=H6,a=!1,o=!1,s=t,c=0,l=!1,u,d=e.input.charCodeAt(e.position);if(d===124)r=!1;else if(d===62)r=!0;else return!1;for(e.kind=`scalar`,e.result=``;d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)H6===i?i=d===43?U6:wae:Q(e,`repeat of a chomping mode identifier`);else if((u=Aae(d))>=0)u===0?Q(e,`bad explicit indentation width of a block scalar; it cannot be less than one`):o?Q(e,`repeat of an indentation width identifier`):(s=t+u-1,o=!0);else break;if(J6(d)){do d=e.input.charCodeAt(++e.position);while(J6(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!q6(d)&&d!==0)}for(;d!==0;){for(c8(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),q6(d)){c++;continue}if(e.lineIndent<s){i===U6?e.result+=v6.repeat(`
209
- `,a?1+c:c):i===H6&&a&&(e.result+=`
210
- `);break}for(r?J6(d)?(l=!0,e.result+=v6.repeat(`
211
- `,a?1+c:c)):l?(l=!1,e.result+=v6.repeat(`
212
- `,c+1)):c===0?a&&(e.result+=` `):e.result+=v6.repeat(`
213
- `,c):e.result+=v6.repeat(`
214
- `,a?1+c:c),a=!0,o=!0,c=0,n=e.position;!q6(d)&&d!==0;)d=e.input.charCodeAt(++e.position);a8(e,n,e.position,!1)}return!0}function f8(e,t){var n,r=e.tag,i=e.anchor,a=[],o,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Q(e,`tab characters must not be used in indentation`)),!(c!==45||(o=e.input.charCodeAt(e.position+1),!Y6(o))));){if(s=!0,e.position++,l8(e,!0,-1)&&e.lineIndent<=t){a.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,p8(e,t,B6,!1,!0),a.push(e.result),l8(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)Q(e,`bad indentation of a sequence entry`);else if(e.lineIndent<t)break}return s?(e.tag=r,e.anchor=i,e.kind=`sequence`,e.result=a,!0):!1}function Rae(e,t,n){var r,i,a,o,s,c,l=e.tag,u=e.anchor,d={},f=Object.create(null),p=null,m=null,h=null,g=!1,_=!1,v;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),v=e.input.charCodeAt(e.position);v!==0;){if(!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Q(e,`tab characters must not be used in indentation`)),r=e.input.charCodeAt(e.position+1),a=e.line,(v===63||v===58)&&Y6(r))v===63?(g&&(s8(e,d,f,p,m,null,o,s,c),p=m=h=null),_=!0,g=!0,i=!0):g?(g=!1,i=!0):Q(e,`incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line`),e.position+=1,v=r;else{if(o=e.line,s=e.lineStart,c=e.position,!p8(e,n,z6,!1,!0))break;if(e.line===a){for(v=e.input.charCodeAt(e.position);J6(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),Y6(v)||Q(e,`a whitespace character is expected after the key-value separator within a block mapping`),g&&(s8(e,d,f,p,m,null,o,s,c),p=m=h=null),_=!0,g=!1,i=!1,p=e.tag,m=e.result;else if(_)Q(e,`can not read an implicit mapping pair; a colon is missed`);else return e.tag=l,e.anchor=u,!0}else if(_)Q(e,`can not read a block mapping entry; a multiline key may not be an implicit key`);else return e.tag=l,e.anchor=u,!0}if((e.line===a||e.lineIndent>t)&&(g&&(o=e.line,s=e.lineStart,c=e.position),p8(e,t,V6,!0,i)&&(g?m=e.result:h=e.result),g||(s8(e,d,f,p,m,h,o,s,c),p=m=h=null),l8(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&v!==0)Q(e,`bad indentation of a mapping entry`);else if(e.lineIndent<t)break}return g&&s8(e,d,f,p,m,null,o,s,c),_&&(e.tag=l,e.anchor=u,e.kind=`mapping`,e.result=d),_}function zae(e){var t,n=!1,r=!1,i,a,o=e.input.charCodeAt(e.position);if(o!==33)return!1;if(e.tag!==null&&Q(e,`duplication of a tag property`),o=e.input.charCodeAt(++e.position),o===60?(n=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,i=`!!`,o=e.input.charCodeAt(++e.position)):i=`!`,t=e.position,n){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):Q(e,`unexpected end of the stream within a verbatim tag`)}else{for(;o!==0&&!Y6(o);)o===33&&(r?Q(e,`tag suffix cannot contain exclamation marks`):(i=e.input.slice(t-1,e.position+1),W6.test(i)||Q(e,`named tag handle cannot contain such characters`),r=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),Dae.test(a)&&Q(e,`tag suffix cannot contain flow indicator characters`)}a&&!G6.test(a)&&Q(e,`tag name cannot contain such characters: `+a);try{a=decodeURIComponent(a)}catch{Q(e,`tag name is malformed: `+a)}return n?e.tag=a:L6.call(e.tagMap,i)?e.tag=e.tagMap[i]+a:i===`!`?e.tag=`!`+a:i===`!!`?e.tag=`tag:yaml.org,2002:`+a:Q(e,`undeclared tag handle "`+i+`"`),!0}function Bae(e){var t,n=e.input.charCodeAt(e.position);if(n!==38)return!1;for(e.anchor!==null&&Q(e,`duplication of an anchor property`),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Y6(n)&&!X6(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Q(e,`name of an anchor node must contain at least one character`),e.anchor=e.input.slice(t,e.position),!0}function Vae(e){var t,n,r=e.input.charCodeAt(e.position);if(r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Y6(r)&&!X6(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Q(e,`name of an alias node must contain at least one character`),n=e.input.slice(t,e.position),L6.call(e.anchorMap,n)||Q(e,`unidentified alias "`+n+`"`),e.result=e.anchorMap[n],l8(e,!0,-1),!0}function p8(e,t,n,r,i){var a,o,s,c=1,l=!1,u=!1,d,f,p,m,h,g;if(e.listener!==null&&e.listener(`open`,e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=V6===n||B6===n,r&&l8(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;zae(e)||Bae(e);)l8(e,!0,-1)?(l=!0,s=a,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&=l||i,(c===1||V6===n)&&(h=R6===n||z6===n?t:t+1,g=e.position-e.lineStart,c===1?s&&(f8(e,g)||Rae(e,g,h))||Iae(e,h)?u=!0:(o&&Lae(e,h)||Pae(e,h)||Fae(e,h)?u=!0:Vae(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&Q(e,`alias node should not have any properties`)):Nae(e,h,R6===n)&&(u=!0,e.tag===null&&(e.tag=`?`)),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(u=s&&f8(e,g))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag===`?`){for(e.result!==null&&e.kind!==`scalar`&&Q(e,`unacceptable node kind for !<?> tag; it should be "scalar", not "`+e.kind+`"`),d=0,f=e.implicitTypes.length;d<f;d+=1)if(m=e.implicitTypes[d],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!==`!`){if(L6.call(e.typeMap[e.kind||`fallback`],e.tag))m=e.typeMap[e.kind||`fallback`][e.tag];else for(m=null,p=e.typeMap.multi[e.kind||`fallback`],d=0,f=p.length;d<f;d+=1)if(e.tag.slice(0,p[d].tag.length)===p[d].tag){m=p[d];break}m||Q(e,`unknown tag !<`+e.tag+`>`),e.result!==null&&m.kind!==e.kind&&Q(e,`unacceptable node kind for !<`+e.tag+`> tag; it should be "`+m.kind+`", not "`+e.kind+`"`),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Q(e,`cannot resolve a node with !<`+e.tag+`> explicit tag`)}return e.listener!==null&&e.listener(`close`,e),e.tag!==null||e.anchor!==null||u}function Hae(e){var t=e.position,n,r,i,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(l8(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!Y6(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&Q(e,`directive name must not be less than one character in length`);o!==0;){for(;J6(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!q6(o));break}if(q6(o))break;for(n=e.position;o!==0&&!Y6(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}o!==0&&c8(e),L6.call(i8,r)?i8[r](e,r,i):r8(e,`unknown document directive "`+r+`"`)}if(l8(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,l8(e,!0,-1)):a&&Q(e,`directives end mark is expected`),p8(e,e.lineIndent-1,V6,!1,!0),l8(e,!0,-1),e.checkLineBreaks&&Eae.test(e.input.slice(t,e.position))&&r8(e,`non-ASCII line breaks are interpreted as content`),e.documents.push(e.result),e.position===e.lineStart&&u8(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,l8(e,!0,-1));return}if(e.position<e.length-1)Q(e,`end of the stream or a document separator is expected`);else return}function m8(e,t){e=String(e),t||={},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
215
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new Mae(e,t),r=e.indexOf(`\0`);for(r!==-1&&(n.position=r,Q(n,`null byte is not allowed in input`)),n.input+=`\0`;n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Hae(n);return n.documents}function Uae(e,t,n){typeof t==`object`&&t&&n===void 0&&(n=t,t=null);var r=m8(e,n);if(typeof t!=`function`)return r;for(var i=0,a=r.length;i<a;i+=1)t(r[i])}function Wae(e,t){var n=m8(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new x6(`expected a single document in the stream, but found more`)}}var h8={loadAll:Uae,load:Wae},g8=Object.prototype.toString,_8=Object.prototype.hasOwnProperty,v8=65279,Gae=9,y8=10,Kae=13,qae=32,Jae=33,Yae=34,b8=35,Xae=37,Zae=38,Qae=39,$ae=42,x8=44,eoe=45,S8=58,toe=61,noe=62,roe=63,ioe=64,C8=91,w8=93,aoe=96,T8=123,ooe=124,E8=125,D8={};D8[0]=`\\0`,D8[7]=`\\a`,D8[8]=`\\b`,D8[9]=`\\t`,D8[10]=`\\n`,D8[11]=`\\v`,D8[12]=`\\f`,D8[13]=`\\r`,D8[27]=`\\e`,D8[34]=`\\"`,D8[92]=`\\\\`,D8[133]=`\\N`,D8[160]=`\\_`,D8[8232]=`\\L`,D8[8233]=`\\P`;var soe=[`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`],coe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function loe(e,t){var n,r,i,a,o,s,c;if(t===null)return{};for(n={},r=Object.keys(t),i=0,a=r.length;i<a;i+=1)o=r[i],s=String(t[o]),o.slice(0,2)===`!!`&&(o=`tag:yaml.org,2002:`+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&_8.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[o]=s;return n}function uoe(e){var t=e.toString(16).toUpperCase(),n,r;if(e<=255)n=`x`,r=2;else if(e<=65535)n=`u`,r=4;else if(e<=4294967295)n=`U`,r=8;else throw new x6(`code point within a string may not be greater than 0xFFFFFFFF`);return`\\`+n+v6.repeat(`0`,r-t.length)+t}var doe=1,O8=2;function foe(e){this.schema=e.schema||I6,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=v6.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=loe(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType===`"`?O8:doe,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer==`function`?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=``,this.duplicates=[],this.usedDuplicates=null}function k8(e,t){for(var n=v6.repeat(` `,t),r=0,i=-1,a=``,o,s=e.length;r<s;)i=e.indexOf(`
216
- `,r),i===-1?(o=e.slice(r),r=s):(o=e.slice(r,i+1),r=i+1),o.length&&o!==`
217
- `&&(a+=n),a+=o;return a}function A8(e,t){return`
218
- `+v6.repeat(` `,e.indent*t)}function poe(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function j8(e){return e===qae||e===Gae}function M8(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==v8||65536<=e&&e<=1114111}function N8(e){return M8(e)&&e!==v8&&e!==Kae&&e!==y8}function P8(e,t,n){var r=N8(e),i=r&&!j8(e);return(n?r:r&&e!==x8&&e!==C8&&e!==w8&&e!==T8&&e!==E8)&&e!==b8&&!(t===S8&&!i)||N8(t)&&!j8(t)&&e===b8||t===S8&&i}function moe(e){return M8(e)&&e!==v8&&!j8(e)&&e!==eoe&&e!==roe&&e!==S8&&e!==x8&&e!==C8&&e!==w8&&e!==T8&&e!==E8&&e!==b8&&e!==Zae&&e!==$ae&&e!==Jae&&e!==ooe&&e!==toe&&e!==noe&&e!==Qae&&e!==Yae&&e!==Xae&&e!==ioe&&e!==aoe}function hoe(e){return!j8(e)&&e!==S8}function F8(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function I8(e){return/^\n* /.test(e)}var L8=1,R8=2,z8=3,B8=4,V8=5;function goe(e,t,n,r,i,a,o,s){var c,l=0,u=null,d=!1,f=!1,p=r!==-1,m=-1,h=moe(F8(e,0))&&hoe(F8(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=F8(e,c),!M8(l))return V8;h&&=P8(l,u,s),u=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=F8(e,c),l===y8)d=!0,p&&(f||=c-m-1>r&&e[m+1]!==` `,m=c);else if(!M8(l))return V8;h&&=P8(l,u,s),u=l}f||=p&&c-m-1>r&&e[m+1]!==` `}return!d&&!f?h&&!o&&!i(e)?L8:a===O8?V8:R8:n>9&&I8(e)?V8:o?a===O8?V8:R8:f?B8:z8}function _oe(e,t,n,r,i){e.dump=function(){if(t.length===0)return e.quotingType===O8?`""`:`''`;if(!e.noCompatMode&&(soe.indexOf(t)!==-1||coe.test(t)))return e.quotingType===O8?`"`+t+`"`:`'`+t+`'`;var a=e.indent*Math.max(1,n),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=r||e.flowLevel>-1&&n>=e.flowLevel;function c(t){return poe(e,t)}switch(goe(t,s,e.indent,o,c,e.quotingType,e.forceQuotes&&!r,i)){case L8:return t;case R8:return`'`+t.replace(/'/g,`''`)+`'`;case z8:return`|`+H8(t,e.indent)+U8(k8(t,a));case B8:return`>`+H8(t,e.indent)+U8(k8(voe(t,o),a));case V8:return`"`+yoe(t)+`"`;default:throw new x6(`impossible error: invalid scalar style`)}}()}function H8(e,t){var n=I8(e)?String(t):``,r=e[e.length-1]===`
219
- `;return n+(r&&(e[e.length-2]===`
220
- `||e===`
221
- `)?`+`:r?``:`-`)+`
222
- `}function U8(e){return e[e.length-1]===`
223
- `?e.slice(0,-1):e}function voe(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var r=e.indexOf(`
224
- `);return r=r===-1?e.length:r,n.lastIndex=r,W8(e.slice(0,r),t)}(),i=e[0]===`
225
- `||e[0]===` `,a,o;o=n.exec(e);){var s=o[1],c=o[2];a=c[0]===` `,r+=s+(!i&&!a&&c!==``?`
226
- `:``)+W8(c,t),i=a}return r}function W8(e,t){if(e===``||e[0]===` `)return e;for(var n=/ [^ ]/g,r,i=0,a,o=0,s=0,c=``;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,c+=`
227
- `+e.slice(i,a),i=a+1),o=s;return c+=`
228
- `,e.length-i>t&&o>i?c+=e.slice(i,o)+`
229
- `+e.slice(o+1):c+=e.slice(i),c.slice(1)}function yoe(e){for(var t=``,n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=F8(e,i),r=D8[n],!r&&M8(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||uoe(n);return t}function boe(e,t,n){var r=``,i=e.tag,a,o,s;for(a=0,o=n.length;a<o;a+=1)s=n[a],e.replacer&&(s=e.replacer.call(n,String(a),s)),(q8(e,t,s,!1,!1)||s===void 0&&q8(e,t,null,!1,!1))&&(r!==``&&(r+=`,`+(e.condenseFlow?``:` `)),r+=e.dump);e.tag=i,e.dump=`[`+r+`]`}function G8(e,t,n,r){var i=``,a=e.tag,o,s,c;for(o=0,s=n.length;o<s;o+=1)c=n[o],e.replacer&&(c=e.replacer.call(n,String(o),c)),(q8(e,t+1,c,!0,!0,!1,!0)||c===void 0&&q8(e,t+1,null,!0,!0,!1,!0))&&((!r||i!==``)&&(i+=A8(e,t)),e.dump&&y8===e.dump.charCodeAt(0)?i+=`-`:i+=`- `,i+=e.dump);e.tag=a,e.dump=i||`[]`}function xoe(e,t,n){var r=``,i=e.tag,a=Object.keys(n),o,s,c,l,u;for(o=0,s=a.length;o<s;o+=1)u=``,r!==``&&(u+=`, `),e.condenseFlow&&(u+=`"`),c=a[o],l=n[c],e.replacer&&(l=e.replacer.call(n,c,l)),q8(e,t,c,!1,!1)&&(e.dump.length>1024&&(u+=`? `),u+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),q8(e,t,l,!1,!1)&&(u+=e.dump,r+=u));e.tag=i,e.dump=`{`+r+`}`}function Soe(e,t,n,r){var i=``,a=e.tag,o=Object.keys(n),s,c,l,u,d,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys==`function`)o.sort(e.sortKeys);else if(e.sortKeys)throw new x6(`sortKeys must be a boolean or a function`);for(s=0,c=o.length;s<c;s+=1)f=``,(!r||i!==``)&&(f+=A8(e,t)),l=o[s],u=n[l],e.replacer&&(u=e.replacer.call(n,l,u)),q8(e,t+1,l,!0,!0,!0)&&(d=e.tag!==null&&e.tag!==`?`||e.dump&&e.dump.length>1024,d&&(e.dump&&y8===e.dump.charCodeAt(0)?f+=`?`:f+=`? `),f+=e.dump,d&&(f+=A8(e,t)),q8(e,t+1,u,!0,d)&&(e.dump&&y8===e.dump.charCodeAt(0)?f+=`:`:f+=`: `,f+=e.dump,i+=f));e.tag=a,e.dump=i||`{}`}function K8(e,t,n){var r,i=n?e.explicitTypes:e.implicitTypes,a,o,s,c;for(a=0,o=i.length;a<o;a+=1)if(s=i[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t==`object`&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(n?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag=`?`,s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,g8.call(s.represent)===`[object Function]`)r=s.represent(t,c);else if(_8.call(s.represent,c))r=s.represent[c](t,c);else throw new x6(`!<`+s.tag+`> tag resolver accepts not "`+c+`" style`);e.dump=r}return!0}return!1}function q8(e,t,n,r,i,a,o){e.tag=null,e.dump=n,K8(e,n,!1)||K8(e,n,!0);var s=g8.call(e.dump),c=r,l;r&&=e.flowLevel<0||e.flowLevel>t;var u=s===`[object Object]`||s===`[object Array]`,d,f;if(u&&(d=e.duplicates.indexOf(n),f=d!==-1),(e.tag!==null&&e.tag!==`?`||f||e.indent!==2&&t>0)&&(i=!1),f&&e.usedDuplicates[d])e.dump=`*ref_`+d;else{if(u&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),s===`[object Object]`)r&&Object.keys(e.dump).length!==0?(Soe(e,t,e.dump,i),f&&(e.dump=`&ref_`+d+e.dump)):(xoe(e,t,e.dump),f&&(e.dump=`&ref_`+d+` `+e.dump));else if(s===`[object Array]`)r&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?G8(e,t-1,e.dump,i):G8(e,t,e.dump,i),f&&(e.dump=`&ref_`+d+e.dump)):(boe(e,t,e.dump),f&&(e.dump=`&ref_`+d+` `+e.dump));else if(s===`[object String]`)e.tag!==`?`&&_oe(e,e.dump,t,a,c);else if(s===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new x6(`unacceptable kind of an object to dump `+s)}e.tag!==null&&e.tag!==`?`&&(l=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`),l=e.tag[0]===`!`?`!`+l:l.slice(0,18)===`tag:yaml.org,2002:`?`!!`+l.slice(18):`!<`+l+`>`,e.dump=l+` `+e.dump)}return!0}function Coe(e,t){var n=[],r=[],i,a;for(J8(e,n,r),i=0,a=r.length;i<a;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=Array(a)}function J8(e,t,n){var r,i,a;if(typeof e==`object`&&e)if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)J8(e[i],t,n);else for(r=Object.keys(e),i=0,a=r.length;i<a;i+=1)J8(e[r[i]],t,n)}function woe(e,t){t||={};var n=new foe(t);n.noRefs||Coe(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},``,r)),q8(n,0,r,!0,!0)?n.dump+`
230
- `:``}var Toe={dump:woe},Y8=h8.load;h8.loadAll;var X8=Toe.dump,Eoe=d6,Z8;(function(e){e[e.DEFAULT=0]=`DEFAULT`,e[e.ADDED=1]=`ADDED`,e[e.REMOVED=2]=`REMOVED`,e[e.CHANGED=3]=`CHANGED`})(Z8||={});function Q8(e,t){return t===`yaml`?X8(e,{indent:2,lineWidth:-1,noRefs:!0}).trimEnd():JSON.stringify(e,null,2)}function Doe(e,t,n=`json`){let r=Q8(e,n);return r===Q8(t,n)?[{value:r}]:$8(e,t,0,n)}function Ooe(e,t){return Doe(e,t,`json`)}function koe(e,t){try{let n=JSON.parse(e),r=JSON.parse(t);return JSON.stringify(n)===JSON.stringify(r)?[{value:e}]:j3(e,t,{newlineIsToken:!1})}catch{return j3(e,t,{newlineIsToken:!1})}}function Aoe(e,t){let n=Y8(e),r=Y8(t);return X8(n,{indent:2,lineWidth:-1,noRefs:!0})===X8(r,{indent:2,lineWidth:-1,noRefs:!0})?[{value:e}]:j3(e,t,{newlineIsToken:!1})}function $8(e,t,n,r=`json`){let i=Q8(e,r),a=Q8(t,r);return i===a?[{value:e5(i,n,r)}]:typeof e==`object`&&e&&typeof t==`object`&&t&&!Array.isArray(e)&&!Array.isArray(t)?joe(e,t,n,r):Array.isArray(e)&&Array.isArray(t)?Moe(e,t,n,r):Noe(i,a,n,r)}function joe(e,t,n,r=`json`){let i=[],a=` `.repeat(n),o=` `.repeat(n+1),s=new Set(Object.keys(e)),c=Object.keys(t),l=[...s].filter(e=>!(e in t)),u=[...c,...l];i.push({value:`{
231
- `});for(let a=0;a<u.length;a++){let s=u[a],c=a===u.length-1?``:`,`,l=s in e,d=s in t;if(l&&d){let a=Q8(e[s],r);if(a===Q8(t[s],r)){let e=e5(a,n+1);i.push({value:o+JSON.stringify(s)+`: `+e+c+`
232
- `})}else{let a=o+JSON.stringify(s)+`: `,l=$8(e[s],t[s],n+1,r);if(l.length>0)if(!l[0].removed&&!l[0].added)l[0].value=a+l[0].value;else{let e=l.find(e=>e.removed),t=l.find(e=>e.added);e&&(e.value=a+e.value),t&&(t.value=a+t.value)}if(c&&l.length>0){let e=l[l.length-1];e.value=e.value.replace(/\n$/,c+`
233
- `)}i.push(...l)}}else if(l){let t=e5(Q8(e[s],r),n+1);i.push({removed:!0,value:o+JSON.stringify(s)+`: `+t+c+`
234
- `})}else{let e=e5(Q8(t[s],r),n+1);i.push({added:!0,value:o+JSON.stringify(s)+`: `+e+c+`
235
- `})}}return i.push({value:a+`}
236
- `}),i}function Moe(e,t,n,r=`json`){let i=[],a=` `.repeat(n),o=` `.repeat(n+1);i.push({value:`[
237
- `});let s=Math.max(e.length,t.length);for(let a=0;a<s;a++){let c=a===s-1?``:`,`;if(a>=e.length){let e=e5(Q8(t[a],r),n+1);i.push({added:!0,value:o+e+c+`
238
- `})}else if(a>=t.length){let t=e5(Q8(e[a],r),n+1);i.push({removed:!0,value:o+t+c+`
239
- `})}else{let s=Q8(e[a],r);if(s===Q8(t[a],r)){let e=e5(s,n+1);i.push({value:o+e+c+`
240
- `})}else{let s=$8(e[a],t[a],n+1,r);if(s.length>0&&(s[0].value=o+s[0].value),c&&s.length>0){let e=s[s.length-1];e.value=e.value.replace(/\n$/,c+`
241
- `)}i.push(...s)}}}return i.push({value:a+`]
242
- `}),i}function Noe(e,t,n,r=`json`){return j3(e5(e,n),e5(t,n)).map(e=>({value:e.value,added:e.added,removed:e.removed}))}function e5(e,t,n=`json`){if(t===0)return e;let r=` `.repeat(t);return e.split(`
243
- `).map((e,t)=>t===0?e:r+e).join(`
244
- `)}var t5;(function(e){e.CHARS=`diffChars`,e.WORDS=`diffWords`,e.WORDS_WITH_SPACE=`diffWordsWithSpace`,e.LINES=`diffLines`,e.TRIMMED_LINES=`diffTrimmedLines`,e.SENTENCES=`diffSentences`,e.CSS=`diffCss`,e.JSON=`diffJson`,e.YAML=`diffYaml`})(t5||={});var n5=e=>e===``?[]:e.replace(/\n$/,``).split(`
245
- `),r5=(e,t,n=t5.CHARS)=>{let r=(typeof n==`string`?Eoe[n]:n)(e,t),i={left:[],right:[]};return r.forEach(({added:e,removed:t,value:n})=>{let r={};return e&&(r.type=Z8.ADDED,r.value=n,i.right.push(r)),t&&(r.type=Z8.REMOVED,r.value=n,i.left.push(r)),!t&&!e&&(r.type=Z8.DEFAULT,r.value=n,i.right.push(r),i.left.push(r)),r}),i},Poe=(e,t,n=!1,r=t5.CHARS,i=0,a=[],o=!1)=>{let s=[];if(typeof e==`string`&&typeof t==`string`)if(r===t5.JSON)s=koe(e,t);else if(r===t5.YAML)try{s=Aoe(e,t)}catch{s=j3(e,t,{newlineIsToken:!1})}else s=j3(e,t,{newlineIsToken:!1});else s=Ooe(e,t);let c=i,l=i,u=[],d=0,f=[],p=[],m=(e,t,i,u,h)=>n5(e).map((e,g)=>{let _={},v={};if(!(p.includes(`${t}-${g}`)||h&&g!==0)){if(i||u){let i=!0;if(u){l+=1,_.lineNumber=l,_.type=Z8.REMOVED,_.value=e||` `;let a=s[t+1];if(a?.added){let s=n5(a.value)[g];if(s){let{value:a,lineNumber:c,type:l}=m(s,t,!0,!1,!0)[0].right;if(p.push(`${t+1}-${g}`),v.lineNumber=c,_.value===a)i=!1,v.type=0,_.type=0,v.value=a;else{v.type=l;let t=e.length>500||a.length>500;if(n||t)v.value=a;else if(o)_.rawValue=e,_.value=e,v.rawValue=a,v.value=a;else{let t=r5(e,a,r);v.value=t.right,_.value=t.left}}}}}else c+=1,v.lineNumber=c,v.type=Z8.ADDED,v.value=e;i&&!h&&(f.includes(d)||f.push(d))}else l+=1,c+=1,_.lineNumber=l,_.type=Z8.DEFAULT,_.value=e,v.lineNumber=c,v.type=Z8.DEFAULT,v.value=e;return(a?.includes(`L-${_.lineNumber}`)||a?.includes(`R-${v.lineNumber}`)&&!f.includes(d))&&f.push(d),h||(d+=1),{right:v,left:_}}}).filter(Boolean);return s.forEach(({added:e,removed:t,value:n},r)=>{u=[...u,...m(n,r,e,t)]}),{lineInformation:u,diffLines:f}},i5=null,Foe=()=>{if(i5!==null)return i5;if(typeof Worker>`u`||typeof Blob>`u`||typeof URL>`u`)return null;try{let e=new Blob(['(()=>{var Si=Object.defineProperty;var bi=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,i)=>(typeof require<"u"?require:n)[i]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error(\'Dynamic require of "\'+e+\'" is not supported\')});var _i=(e,n)=>{for(var i in n)Si(e,i,{get:n[i],enumerable:!0})};var $e={};_i($e,{Diff:()=>b,FILE_HEADERS_ONLY:()=>_n,INCLUDE_HEADERS:()=>Ue,OMIT_HEADERS:()=>Ln,applyPatch:()=>je,applyPatches:()=>bn,arrayDiff:()=>Pe,canonicalize:()=>V,characterDiff:()=>ye,convertChangesToDMP:()=>On,convertChangesToXML:()=>In,createPatch:()=>Fn,createTwoFilesPatch:()=>Ye,cssDiff:()=>Ne,diffArrays:()=>wn,diffChars:()=>sn,diffCss:()=>yn,diffJson:()=>An,diffLines:()=>N,diffSentences:()=>vn,diffTrimmedLines:()=>xn,diffWords:()=>mn,diffWordsWithSpace:()=>Le,formatPatch:()=>ee,jsonDiff:()=>Re,lineDiff:()=>ce,parsePatch:()=>Z,reversePatch:()=>Be,sentenceDiff:()=>ke,structuredPatch:()=>ae,wordDiff:()=>be,wordsWithSpaceDiff:()=>_e});var b=class{diff(n,i,r={}){let l;typeof r=="function"?(l=r,r={}):"callback"in r&&(l=r.callback);let t=this.castInput(n,r),o=this.castInput(i,r),u=this.removeEmpty(this.tokenize(t,r)),f=this.removeEmpty(this.tokenize(o,r));return this.diffWithOptionsObj(u,f,r,l)}diffWithOptionsObj(n,i,r,l){var t;let o=m=>{if(m=this.postProcess(m,r),l){setTimeout(function(){l(m)},0);return}else return m},u=i.length,f=n.length,c=1,s=u+f;r.maxEditLength!=null&&(s=Math.min(s,r.maxEditLength));let a=(t=r.timeout)!==null&&t!==void 0?t:1/0,p=Date.now()+a,d=[{oldPos:-1,lastComponent:void 0}],h=this.extractCommon(d[0],i,n,0,r);if(d[0].oldPos+1>=f&&h+1>=u)return o(this.buildValues(d[0].lastComponent,i,n));let g=-1/0,y=1/0,w=()=>{for(let m=Math.max(g,-c);m<=Math.min(y,c);m+=2){let x,A=d[m-1],C=d[m+1];A&&(d[m-1]=void 0);let F=!1;if(C){let S=C.oldPos-m;F=C&&0<=S&&S<u}let E=A&&A.oldPos+1<f;if(!F&&!E){d[m]=void 0;continue}if(!E||F&&A.oldPos<C.oldPos?x=this.addToPath(C,!0,!1,0,r):x=this.addToPath(A,!1,!0,1,r),h=this.extractCommon(x,i,n,m,r),x.oldPos+1>=f&&h+1>=u)return o(this.buildValues(x.lastComponent,i,n))||!0;d[m]=x,x.oldPos+1>=f&&(y=Math.min(y,m-1)),h+1>=u&&(g=Math.max(g,m+1))}c++};if(l)(function m(){setTimeout(function(){if(c>s||Date.now()>p)return l(void 0);w()||m()},0)})();else for(;c<=s&&Date.now()<=p;){let m=w();if(m)return m}}addToPath(n,i,r,l,t){let o=n.lastComponent;return o&&!t.oneChangePerToken&&o.added===i&&o.removed===r?{oldPos:n.oldPos+l,lastComponent:{count:o.count+1,added:i,removed:r,previousComponent:o.previousComponent}}:{oldPos:n.oldPos+l,lastComponent:{count:1,added:i,removed:r,previousComponent:o}}}extractCommon(n,i,r,l,t){let o=i.length,u=r.length,f=n.oldPos,c=f-l,s=0;for(;c+1<o&&f+1<u&&this.equals(r[f+1],i[c+1],t);)c++,f++,s++,t.oneChangePerToken&&(n.lastComponent={count:1,previousComponent:n.lastComponent,added:!1,removed:!1});return s&&!t.oneChangePerToken&&(n.lastComponent={count:s,previousComponent:n.lastComponent,added:!1,removed:!1}),n.oldPos=f,c}equals(n,i,r){return r.comparator?r.comparator(n,i):n===i||!!r.ignoreCase&&n.toLowerCase()===i.toLowerCase()}removeEmpty(n){let i=[];for(let r=0;r<n.length;r++)n[r]&&i.push(n[r]);return i}castInput(n,i){return n}tokenize(n,i){return Array.from(n)}join(n){return n.join("")}postProcess(n,i){return n}get useLongestToken(){return!1}buildValues(n,i,r){let l=[],t;for(;n;)l.push(n),t=n.previousComponent,delete n.previousComponent,n=t;l.reverse();let o=l.length,u=0,f=0,c=0;for(;u<o;u++){let s=l[u];if(s.removed)s.value=this.join(r.slice(c,c+s.count)),c+=s.count;else{if(!s.added&&this.useLongestToken){let a=i.slice(f,f+s.count);a=a.map(function(p,d){let h=r[c+d];return h.length>p.length?h:p}),s.value=this.join(a)}else s.value=this.join(i.slice(f,f+s.count));f+=s.count,s.added||(c+=s.count)}}return l}};var ve=class extends b{},ye=new ve;function sn(e,n,i){return ye.diff(e,n,i)}function Ae(e,n){let i;for(i=0;i<e.length&&i<n.length;i++)if(e[i]!=n[i])return e.slice(0,i);return e.slice(0,i)}function we(e,n){let i;if(!e||!n||e[e.length-1]!=n[n.length-1])return"";for(i=0;i<e.length&&i<n.length;i++)if(e[e.length-(i+1)]!=n[n.length-(i+1)])return e.slice(-i);return e.slice(-i)}function te(e,n,i){if(e.slice(0,n.length)!=n)throw Error(`string ${JSON.stringify(e)} doesn\'t start with prefix ${JSON.stringify(n)}; this is a bug`);return i+e.slice(n.length)}function ue(e,n,i){if(!n)return e+i;if(e.slice(-n.length)!=n)throw Error(`string ${JSON.stringify(e)} doesn\'t end with suffix ${JSON.stringify(n)}; this is a bug`);return e.slice(0,-n.length)+i}function q(e,n){return te(e,n,"")}function X(e,n){return ue(e,n,"")}function Ce(e,n){return n.slice(0,Li(e,n))}function Li(e,n){let i=0;e.length>n.length&&(i=e.length-n.length);let r=n.length;e.length<n.length&&(r=e.length);let l=Array(r),t=0;l[0]=0;for(let o=1;o<r;o++){for(n[o]==n[t]?l[o]=l[t]:l[o]=t;t>0&&n[o]!=n[t];)t=l[t];n[o]==n[t]&&t++}t=0;for(let o=i;o<e.length;o++){for(;t>0&&e[o]!=n[t];)t=l[t];e[o]==n[t]&&t++}return t}function pn(e){return e.includes(`\\r\n`)&&!e.startsWith(`\n`)&&!e.match(/[^\\r]\\n/)}function dn(e){return!e.includes(`\\r\n`)&&e.includes(`\n`)}function z(e){let n;for(n=e.length-1;n>=0&&e[n].match(/\\s/);n--);return e.substring(n+1)}function M(e){let n=e.match(/^\\s*/);return n?n[0]:""}var fe="a-zA-Z0-9_\\\\u{AD}\\\\u{C0}-\\\\u{D6}\\\\u{D8}-\\\\u{F6}\\\\u{F8}-\\\\u{2C6}\\\\u{2C8}-\\\\u{2D7}\\\\u{2DE}-\\\\u{2FF}\\\\u{1E00}-\\\\u{1EFF}",Fi=new RegExp(`[${fe}]+|\\\\s+|[^${fe}]`,"ug"),Ee=class extends b{equals(n,i,r){return r.ignoreCase&&(n=n.toLowerCase(),i=i.toLowerCase()),n.trim()===i.trim()}tokenize(n,i={}){let r;if(i.intlSegmenter){let o=i.intlSegmenter;if(o.resolvedOptions().granularity!="word")throw new Error(\'The segmenter passed must have a granularity of "word"\');r=[];for(let u of Array.from(o.segment(n))){let f=u.segment;r.length&&/\\s/.test(r[r.length-1])&&/\\s/.test(f)?r[r.length-1]+=f:r.push(f)}}else r=n.match(Fi)||[];let l=[],t=null;return r.forEach(o=>{/\\s/.test(o)?t==null?l.push(o):l.push(l.pop()+o):t!=null&&/\\s/.test(t)?l[l.length-1]==t?l.push(l.pop()+o):l.push(t+o):l.push(o),t=o}),l}join(n){return n.map((i,r)=>r==0?i:i.replace(/^\\s+/,"")).join("")}postProcess(n,i){if(!n||i.oneChangePerToken)return n;let r=null,l=null,t=null;return n.forEach(o=>{o.added?l=o:o.removed?t=o:((l||t)&&hn(r,t,l,o),r=o,l=null,t=null)}),(l||t)&&hn(r,t,l,null),n}},be=new Ee;function mn(e,n,i){return i?.ignoreWhitespace!=null&&!i.ignoreWhitespace?Le(e,n,i):be.diff(e,n,i)}function hn(e,n,i,r){if(n&&i){let l=M(n.value),t=z(n.value),o=M(i.value),u=z(i.value);if(e){let f=Ae(l,o);e.value=ue(e.value,o,f),n.value=q(n.value,f),i.value=q(i.value,f)}if(r){let f=we(t,u);r.value=te(r.value,u,f),n.value=X(n.value,f),i.value=X(i.value,f)}}else if(i){if(e){let l=M(i.value);i.value=i.value.substring(l.length)}if(r){let l=M(r.value);r.value=r.value.substring(l.length)}}else if(e&&r){let l=M(r.value),t=M(n.value),o=z(n.value),u=Ae(l,t);n.value=q(n.value,u);let f=we(q(l,u),o);n.value=X(n.value,f),r.value=te(r.value,l,f),e.value=ue(e.value,l,l.slice(0,l.length-f.length))}else if(r){let l=M(r.value),t=z(n.value),o=Ce(t,l);n.value=X(n.value,o)}else if(e){let l=z(e.value),t=M(n.value),o=Ce(l,t);n.value=q(n.value,o)}}var Se=class extends b{tokenize(n){let i=new RegExp(`(\\\\r?\\\\n)|[${fe}]+|[^\\\\S\\\\n\\\\r]+|[^${fe}]`,"ug");return n.match(i)||[]}},_e=new Se;function Le(e,n,i){return _e.diff(e,n,i)}function gn(e,n){if(typeof e=="function")n.callback=e;else if(e)for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}var Fe=class extends b{constructor(){super(...arguments),this.tokenize=Oe}equals(n,i,r){return r.ignoreWhitespace?((!r.newlineIsToken||!n.includes(`\n`))&&(n=n.trim()),(!r.newlineIsToken||!i.includes(`\n`))&&(i=i.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(n.endsWith(`\n`)&&(n=n.slice(0,-1)),i.endsWith(`\n`)&&(i=i.slice(0,-1))),super.equals(n,i,r)}},ce=new Fe;function N(e,n,i){return ce.diff(e,n,i)}function xn(e,n,i){return i=gn(i,{ignoreWhitespace:!0}),ce.diff(e,n,i)}function Oe(e,n){n.stripTrailingCr&&(e=e.replace(/\\r\\n/g,`\n`));let i=[],r=e.split(/(\\n|\\r\\n)/);r[r.length-1]||r.pop();for(let l=0;l<r.length;l++){let t=r[l];l%2&&!n.newlineIsToken?i[i.length-1]+=t:i.push(t)}return i}function Oi(e){return e=="."||e=="!"||e=="?"}var Ie=class extends b{tokenize(n){var i;let r=[],l=0;for(let t=0;t<n.length;t++){if(t==n.length-1){r.push(n.slice(l));break}if(Oi(n[t])&&n[t+1].match(/\\s/)){for(r.push(n.slice(l,t+1)),t=l=t+1;!((i=n[t+1])===null||i===void 0)&&i.match(/\\s/);)t++;r.push(n.slice(l,t+1)),l=t+1}}return r}},ke=new Ie;function vn(e,n,i){return ke.diff(e,n,i)}var Te=class extends b{tokenize(n){return n.split(/([{}:;,]|\\s+)/)}},Ne=new Te;function yn(e,n,i){return Ne.diff(e,n,i)}var De=class extends b{constructor(){super(...arguments),this.tokenize=Oe}get useLongestToken(){return!0}castInput(n,i){let{undefinedReplacement:r,stringifyReplacer:l=(t,o)=>typeof o>"u"?r:o}=i;return typeof n=="string"?n:JSON.stringify(V(n,null,null,l),null," ")}equals(n,i,r){return super.equals(n.replace(/,([\\r\\n])/g,"$1"),i.replace(/,([\\r\\n])/g,"$1"),r)}},Re=new De;function An(e,n,i){return Re.diff(e,n,i)}function V(e,n,i,r,l){n=n||[],i=i||[],r&&(e=r(l===void 0?"":l,e));let t;for(t=0;t<n.length;t+=1)if(n[t]===e)return i[t];let o;if(Object.prototype.toString.call(e)==="[object Array]"){for(n.push(e),o=new Array(e.length),i.push(o),t=0;t<e.length;t+=1)o[t]=V(e[t],n,i,r,String(t));return n.pop(),i.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e=="object"&&e!==null){n.push(e),o={},i.push(o);let u=[],f;for(f in e)Object.prototype.hasOwnProperty.call(e,f)&&u.push(f);for(u.sort(),t=0;t<u.length;t+=1)f=u[t],o[f]=V(e[f],n,i,r,f);n.pop(),i.pop()}else o=e;return o}var Me=class extends b{tokenize(n){return n.slice()}join(n){return n}removeEmpty(n){return n}},Pe=new Me;function wn(e,n,i){return Pe.diff(e,n,i)}function We(e){return Array.isArray(e)?e.map(n=>We(n)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(n=>Object.assign(Object.assign({},n),{lines:n.lines.map((i,r)=>{var l;return i.startsWith("\\\\")||i.endsWith("\\r")||!((l=n.lines[r+1])===null||l===void 0)&&l.startsWith("\\\\")?i:i+"\\r"})}))})}function He(e){return Array.isArray(e)?e.map(n=>He(n)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(n=>Object.assign(Object.assign({},n),{lines:n.lines.map(i=>i.endsWith("\\r")?i.substring(0,i.length-1):i)}))})}function Cn(e){return Array.isArray(e)||(e=[e]),!e.some(n=>n.hunks.some(i=>i.lines.some(r=>!r.startsWith("\\\\")&&r.endsWith("\\r"))))}function En(e){return Array.isArray(e)||(e=[e]),e.some(n=>n.hunks.some(i=>i.lines.some(r=>r.endsWith("\\r"))))&&e.every(n=>n.hunks.every(i=>i.lines.every((r,l)=>{var t;return r.startsWith("\\\\")||r.endsWith("\\r")||((t=i.lines[l+1])===null||t===void 0?void 0:t.startsWith("\\\\"))})))}function Z(e){let n=e.split(/\\n/),i=[],r=0;function l(){let u={};for(i.push(u);r<n.length;){let f=n[r];if(/^(---|\\+\\+\\+|@@)\\s/.test(f))break;let c=/^(?:Index:|diff(?: -r \\w+)+)\\s+/.exec(f);c&&(u.index=f.substring(c[0].length).trim()),r++}for(t(u),t(u),u.hunks=[];r<n.length;){let f=n[r];if(/^(Index:\\s|diff\\s|---\\s|\\+\\+\\+\\s|===================================================================)/.test(f))break;if(/^@@/.test(f))u.hunks.push(o());else{if(f)throw new Error("Unknown line "+(r+1)+" "+JSON.stringify(f));r++}}}function t(u){let f=/^(---|\\+\\+\\+)\\s+/.exec(n[r]);if(f){let c=f[1],s=n[r].substring(3).trim().split(" ",2),a=(s[1]||"").trim(),p=s[0].replace(/\\\\\\\\/g,"\\\\");p.startsWith(\'"\')&&p.endsWith(\'"\')&&(p=p.substr(1,p.length-2)),c==="---"?(u.oldFileName=p,u.oldHeader=a):(u.newFileName=p,u.newHeader=a),r++}}function o(){var u;let f=r,c=n[r++],s=c.split(/@@ -(\\d+)(?:,(\\d+))? \\+(\\d+)(?:,(\\d+))? @@/),a={oldStart:+s[1],oldLines:typeof s[2]>"u"?1:+s[2],newStart:+s[3],newLines:typeof s[4]>"u"?1:+s[4],lines:[]};a.oldLines===0&&(a.oldStart+=1),a.newLines===0&&(a.newStart+=1);let p=0,d=0;for(;r<n.length&&(d<a.oldLines||p<a.newLines||!((u=n[r])===null||u===void 0)&&u.startsWith("\\\\"));r++){let h=n[r].length==0&&r!=n.length-1?" ":n[r][0];if(h==="+"||h==="-"||h===" "||h==="\\\\")a.lines.push(n[r]),h==="+"?p++:h==="-"?d++:h===" "&&(p++,d++);else throw new Error(`Hunk at line ${f+1} contained invalid line ${n[r]}`)}if(!p&&a.newLines===1&&(a.newLines=0),!d&&a.oldLines===1&&(a.oldLines=0),p!==a.newLines)throw new Error("Added line count did not match for hunk at line "+(f+1));if(d!==a.oldLines)throw new Error("Removed line count did not match for hunk at line "+(f+1));return a}for(;r<n.length;)l();return i}function Sn(e,n,i){let r=!0,l=!1,t=!1,o=1;return function u(){if(r&&!t){if(l?o++:r=!1,e+o<=i)return e+o;t=!0}if(!l)return t||(r=!0),n<=e-o?e-o++:(l=!0,u())}}function je(e,n,i={}){let r;if(typeof n=="string"?r=Z(n):Array.isArray(n)?r=n:r=[n],r.length>1)throw new Error("applyPatch only works with a single input.");return Ii(e,r[0],i)}function Ii(e,n,i={}){(i.autoConvertLineEndings||i.autoConvertLineEndings==null)&&(pn(e)&&Cn(n)?n=We(n):dn(e)&&En(n)&&(n=He(n)));let r=e.split(`\n`),l=n.hunks,t=i.compareLine||((h,g,y,w)=>g===w),o=i.fuzzFactor||0,u=0;if(o<0||!Number.isInteger(o))throw new Error("fuzzFactor must be a non-negative integer");if(!l.length)return e;let f="",c=!1,s=!1;for(let h=0;h<l[l.length-1].lines.length;h++){let g=l[l.length-1].lines[h];g[0]=="\\\\"&&(f[0]=="+"?c=!0:f[0]=="-"&&(s=!0)),f=g}if(c){if(s){if(!o&&r[r.length-1]=="")return!1}else if(r[r.length-1]=="")r.pop();else if(!o)return!1}else if(s){if(r[r.length-1]!="")r.push("");else if(!o)return!1}function a(h,g,y,w=0,m=!0,x=[],A=0){let C=0,F=!1;for(;w<h.length;w++){let E=h[w],S=E.length>0?E[0]:" ",$=E.length>0?E.substr(1):E;if(S==="-")if(t(g+1,r[g],S,$))g++,C=0;else return!y||r[g]==null?null:(x[A]=r[g],a(h,g+1,y-1,w,!1,x,A+1));if(S==="+"){if(!m)return null;x[A]=$,A++,C=0,F=!0}if(S===" ")if(C++,x[A]=r[g],t(g+1,r[g],S,$))A++,m=!0,F=!1,g++;else return F||!y?null:r[g]&&(a(h,g+1,y-1,w+1,!1,x,A+1)||a(h,g+1,y-1,w,!1,x,A+1))||a(h,g,y-1,w+1,!1,x,A)}return A-=C,g-=C,x.length=A,{patchedLines:x,oldLineLastI:g-1}}let p=[],d=0;for(let h=0;h<l.length;h++){let g=l[h],y,w=r.length-g.oldLines+o,m;for(let x=0;x<=o;x++){m=g.oldStart+d-1;let A=Sn(m,u,w);for(;m!==void 0&&(y=a(g.lines,m,x),!y);m=A());if(y)break}if(!y)return!1;for(let x=u;x<m;x++)p.push(r[x]);for(let x=0;x<y.patchedLines.length;x++){let A=y.patchedLines[x];p.push(A)}u=y.oldLineLastI+1,d=m+1-g.oldStart}for(let h=u;h<r.length;h++)p.push(r[h]);return p.join(`\n`)}function bn(e,n){let i=typeof e=="string"?Z(e):e,r=0;function l(){let t=i[r++];if(!t)return n.complete();n.loadFile(t,function(o,u){if(o)return n.complete(o);let f=je(u,t,n);n.patched(t,f,function(c){if(c)return n.complete(c);l()})})}l()}function Be(e){return Array.isArray(e)?e.map(n=>Be(n)).reverse():Object.assign(Object.assign({},e),{oldFileName:e.newFileName,oldHeader:e.newHeader,newFileName:e.oldFileName,newHeader:e.oldHeader,hunks:e.hunks.map(n=>({oldLines:n.newLines,oldStart:n.newStart,newLines:n.oldLines,newStart:n.oldStart,lines:n.lines.map(i=>i.startsWith("-")?`+${i.slice(1)}`:i.startsWith("+")?`-${i.slice(1)}`:i)}))})}var Ue={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0},_n={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!0},Ln={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!1};function ae(e,n,i,r,l,t,o){let u;o?typeof o=="function"?u={callback:o}:u=o:u={},typeof u.context>"u"&&(u.context=4);let f=u.context;if(u.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(u.callback){let{callback:s}=u;N(i,r,Object.assign(Object.assign({},u),{callback:a=>{let p=c(a);s(p)}}))}else return c(N(i,r,u));function c(s){if(!s)return;s.push({value:"",lines:[]});function a(m){return m.map(function(x){return" "+x})}let p=[],d=0,h=0,g=[],y=1,w=1;for(let m=0;m<s.length;m++){let x=s[m],A=x.lines||ki(x.value);if(x.lines=A,x.added||x.removed){if(!d){let C=s[m-1];d=y,h=w,C&&(g=f>0?a(C.lines.slice(-f)):[],d-=g.length,h-=g.length)}for(let C of A)g.push((x.added?"+":"-")+C);x.added?w+=A.length:y+=A.length}else{if(d)if(A.length<=f*2&&m<s.length-2)for(let C of a(A))g.push(C);else{let C=Math.min(A.length,f);for(let E of a(A.slice(0,C)))g.push(E);let F={oldStart:d,oldLines:y-d+C,newStart:h,newLines:w-h+C,lines:g};p.push(F),d=0,h=0,g=[]}y+=A.length,w+=A.length}}for(let m of p)for(let x=0;x<m.lines.length;x++)m.lines[x].endsWith(`\n`)?m.lines[x]=m.lines[x].slice(0,-1):(m.lines.splice(x+1,0,"\\\"),x++);return{oldFileName:e,newFileName:n,oldHeader:l,newHeader:t,hunks:p}}}function ee(e,n){if(n||(n=Ue),Array.isArray(e)){if(e.length>1&&!n.includeFileHeaders)throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(r=>ee(r,n)).join(`\n`)}let i=[];n.includeIndex&&e.oldFileName==e.newFileName&&i.push("Index: "+e.oldFileName),n.includeUnderline&&i.push("==================================================================="),n.includeFileHeaders&&(i.push("--- "+e.oldFileName+(typeof e.oldHeader>"u"?"":" "+e.oldHeader)),i.push("+++ "+e.newFileName+(typeof e.newHeader>"u"?"":" "+e.newHeader)));for(let r=0;r<e.hunks.length;r++){let l=e.hunks[r];l.oldLines===0&&(l.oldStart-=1),l.newLines===0&&(l.newStart-=1),i.push("@@ -"+l.oldStart+","+l.oldLines+" +"+l.newStart+","+l.newLines+" @@");for(let t of l.lines)i.push(t)}return i.join(`\n`)+`\n`}function Ye(e,n,i,r,l,t,o){if(typeof o=="function"&&(o={callback:o}),o?.callback){let{callback:u}=o;ae(e,n,i,r,l,t,Object.assign(Object.assign({},o),{callback:f=>{u(f?ee(f,o.headerOptions):void 0)}}))}else{let u=ae(e,n,i,r,l,t,o);return u?ee(u,o?.headerOptions):void 0}}function Fn(e,n,i,r,l,t){return Ye(e,e,n,i,r,l,t)}function ki(e){let n=e.endsWith(`\n`),i=e.split(`\n`).map(r=>r+`\n`);return n?i.pop():i.push(i.pop().slice(0,-1)),i}function On(e){let n=[],i,r;for(let l=0;l<e.length;l++)i=e[l],i.added?r=1:i.removed?r=-1:r=0,n.push([r,i.value]);return n}function In(e){let n=[];for(let i=0;i<e.length;i++){let r=e[i];r.added?n.push("<ins>"):r.removed&&n.push("<del>"),n.push(Ti(r.value)),r.added?n.push("</ins>"):r.removed&&n.push("</del>")}return n.join("")}function Ti(e){let n=e;return n=n.replace(/&/g,"&amp;"),n=n.replace(/</g,"&lt;"),n=n.replace(/>/g,"&gt;"),n=n.replace(/"/g,"&quot;"),n}function zn(e){return typeof e>"u"||e===null}function Ni(e){return typeof e=="object"&&e!==null}function Di(e){return Array.isArray(e)?e:zn(e)?[]:[e]}function Ri(e,n){var i,r,l,t;if(n)for(t=Object.keys(n),i=0,r=t.length;i<r;i+=1)l=t[i],e[l]=n[l];return e}function Mi(e,n){var i="",r;for(r=0;r<n;r+=1)i+=e;return i}function Pi(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Wi=zn,Hi=Ni,ji=Di,Bi=Mi,Ui=Pi,Yi=Ri,L={isNothing:Wi,isObject:Hi,toArray:ji,repeat:Bi,isNegativeZero:Ui,extend:Yi};function Gn(e,n){var i="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+=\'in "\'+e.mark.name+\'" \'),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(i+=`\n\n`+e.mark.snippet),r+" "+i):r}function ie(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=Gn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ie.prototype=Object.create(Error.prototype);ie.prototype.constructor=ie;ie.prototype.toString=function(n){return this.name+": "+Gn(this,n)};var k=ie;function qe(e,n,i,r,l){var t="",o="",u=Math.floor(l/2)-1;return r-n>u&&(t=" ... ",n=r-u+t.length),i-r>u&&(o=" ...",i=r+u-o.length),{str:t+e.slice(n,i).replace(/\\t/g,"\\u2192")+o,pos:r-n+t.length}}function ze(e,n){return L.repeat(" ",n-e.length)+e}function $i(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var i=/\\r?\\n|\\r|\\0/g,r=[0],l=[],t,o=-1;t=i.exec(e.buffer);)l.push(t.index),r.push(t.index+t[0].length),e.position<=t.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var u="",f,c,s=Math.min(e.line+n.linesAfter,l.length).toString().length,a=n.maxLength-(n.indent+s+3);for(f=1;f<=n.linesBefore&&!(o-f<0);f++)c=qe(e.buffer,r[o-f],l[o-f],e.position-(r[o]-r[o-f]),a),u=L.repeat(" ",n.indent)+ze((e.line-f+1).toString(),s)+" | "+c.str+`\n`+u;for(c=qe(e.buffer,r[o],l[o],e.position,a),u+=L.repeat(" ",n.indent)+ze((e.line+1).toString(),s)+" | "+c.str+`\n`,u+=L.repeat("-",n.indent+s+3+c.pos)+`^\n`,f=1;f<=n.linesAfter&&!(o+f>=l.length);f++)c=qe(e.buffer,r[o+f],l[o+f],e.position-(r[o]-r[o+f]),a),u+=L.repeat(" ",n.indent)+ze((e.line+f+1).toString(),s)+" | "+c.str+`\n`;return u.replace(/\\n$/,"")}var qi=$i,zi=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Gi=["scalar","sequence","mapping"];function Ji(e){var n={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(r){n[String(r)]=i})}),n}function Ki(e,n){if(n=n||{},Object.keys(n).forEach(function(i){if(zi.indexOf(i)===-1)throw new k(\'Unknown option "\'+i+\'" is met in definition of "\'+e+\'" YAML type.\')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(i){return i},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=Ji(n.styleAliases||null),Gi.indexOf(this.kind)===-1)throw new k(\'Unknown kind "\'+this.kind+\'" is specified for "\'+e+\'" YAML type.\')}var O=Ki;function kn(e,n){var i=[];return e[n].forEach(function(r){var l=i.length;i.forEach(function(t,o){t.tag===r.tag&&t.kind===r.kind&&t.multi===r.multi&&(l=o)}),i[l]=r}),i}function Qi(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,i;function r(l){l.multi?(e.multi[l.kind].push(l),e.multi.fallback.push(l)):e[l.kind][l.tag]=e.fallback[l.tag]=l}for(n=0,i=arguments.length;n<i;n+=1)arguments[n].forEach(r);return e}function Je(e){return this.extend(e)}Je.prototype.extend=function(n){var i=[],r=[];if(n instanceof O)r.push(n);else if(Array.isArray(n))r=r.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(i=i.concat(n.implicit)),n.explicit&&(r=r.concat(n.explicit));else throw new k("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(t){if(!(t instanceof O))throw new k("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&t.loadKind!=="scalar")throw new k("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new k("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof O))throw new k("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var l=Object.create(Je.prototype);return l.implicit=(this.implicit||[]).concat(i),l.explicit=(this.explicit||[]).concat(r),l.compiledImplicit=kn(l,"implicit"),l.compiledExplicit=kn(l,"explicit"),l.compiledTypeMap=Qi(l.compiledImplicit,l.compiledExplicit),l};var Xi=Je,Vi=new O("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Zi=new O("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),er=new O("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),nr=new Xi({explicit:[Vi,Zi,er]});function ir(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function rr(){return null}function lr(e){return e===null}var or=new O("tag:yaml.org,2002:null",{kind:"scalar",resolve:ir,construct:rr,predicate:lr,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function tr(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function ur(e){return e==="true"||e==="True"||e==="TRUE"}function fr(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var cr=new O("tag:yaml.org,2002:bool",{kind:"scalar",resolve:tr,construct:ur,predicate:fr,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function ar(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function sr(e){return 48<=e&&e<=55}function pr(e){return 48<=e&&e<=57}function dr(e){if(e===null)return!1;var n=e.length,i=0,r=!1,l;if(!n)return!1;if(l=e[i],(l==="-"||l==="+")&&(l=e[++i]),l==="0"){if(i+1===n)return!0;if(l=e[++i],l==="b"){for(i++;i<n;i++)if(l=e[i],l!=="_"){if(l!=="0"&&l!=="1")return!1;r=!0}return r&&l!=="_"}if(l==="x"){for(i++;i<n;i++)if(l=e[i],l!=="_"){if(!ar(e.charCodeAt(i)))return!1;r=!0}return r&&l!=="_"}if(l==="o"){for(i++;i<n;i++)if(l=e[i],l!=="_"){if(!sr(e.charCodeAt(i)))return!1;r=!0}return r&&l!=="_"}}if(l==="_")return!1;for(;i<n;i++)if(l=e[i],l!=="_"){if(!pr(e.charCodeAt(i)))return!1;r=!0}return!(!r||l==="_")}function hr(e){var n=e,i=1,r;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),r=n[0],(r==="-"||r==="+")&&(r==="-"&&(i=-1),n=n.slice(1),r=n[0]),n==="0")return 0;if(r==="0"){if(n[1]==="b")return i*parseInt(n.slice(2),2);if(n[1]==="x")return i*parseInt(n.slice(2),16);if(n[1]==="o")return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)}function mr(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!L.isNegativeZero(e)}var gr=new O("tag:yaml.org,2002:int",{kind:"scalar",resolve:dr,construct:hr,predicate:mr,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),xr=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$");function vr(e){return!(e===null||!xr.test(e)||e[e.length-1]==="_")}function yr(e){var n,i;return n=e.replace(/_/g,"").toLowerCase(),i=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:i*parseFloat(n,10)}var Ar=/^[-+]?[0-9]+e/;function wr(e,n){var i;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(L.isNegativeZero(e))return"-0.0";return i=e.toString(10),Ar.test(i)?i.replace("e",".e"):i}function Cr(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||L.isNegativeZero(e))}var Er=new O("tag:yaml.org,2002:float",{kind:"scalar",resolve:vr,construct:yr,predicate:Cr,represent:wr,defaultStyle:"lowercase"}),Sr=nr.extend({implicit:[or,cr,gr,Er]}),br=Sr,Jn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Kn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\\\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\\\.([0-9]*))?(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function _r(e){return e===null?!1:Jn.exec(e)!==null||Kn.exec(e)!==null}function Lr(e){var n,i,r,l,t,o,u,f=0,c=null,s,a,p;if(n=Jn.exec(e),n===null&&(n=Kn.exec(e)),n===null)throw new Error("Date resolve error");if(i=+n[1],r=+n[2]-1,l=+n[3],!n[4])return new Date(Date.UTC(i,r,l));if(t=+n[4],o=+n[5],u=+n[6],n[7]){for(f=n[7].slice(0,3);f.length<3;)f+="0";f=+f}return n[9]&&(s=+n[10],a=+(n[11]||0),c=(s*60+a)*6e4,n[9]==="-"&&(c=-c)),p=new Date(Date.UTC(i,r,l,t,o,u,f)),c&&p.setTime(p.getTime()-c),p}function Fr(e){return e.toISOString()}var Or=new O("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:_r,construct:Lr,instanceOf:Date,represent:Fr});function Ir(e){return e==="<<"||e===null}var kr=new O("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ir}),Ze=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\\r`;function Tr(e){if(e===null)return!1;var n,i,r=0,l=e.length,t=Ze;for(i=0;i<l;i++)if(n=t.indexOf(e.charAt(i)),!(n>64)){if(n<0)return!1;r+=6}return r%8===0}function Nr(e){var n,i,r=e.replace(/[\\r\\n=]/g,""),l=r.length,t=Ze,o=0,u=[];for(n=0;n<l;n++)n%4===0&&n&&(u.push(o>>16&255),u.push(o>>8&255),u.push(o&255)),o=o<<6|t.indexOf(r.charAt(n));return i=l%4*6,i===0?(u.push(o>>16&255),u.push(o>>8&255),u.push(o&255)):i===18?(u.push(o>>10&255),u.push(o>>2&255)):i===12&&u.push(o>>4&255),new Uint8Array(u)}function Dr(e){var n="",i=0,r,l,t=e.length,o=Ze;for(r=0;r<t;r++)r%3===0&&r&&(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]),i=(i<<8)+e[r];return l=t%3,l===0?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]):l===2?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):l===1&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}function Rr(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Mr=new O("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Tr,construct:Nr,predicate:Rr,represent:Dr}),Pr=Object.prototype.hasOwnProperty,Wr=Object.prototype.toString;function Hr(e){if(e===null)return!0;var n=[],i,r,l,t,o,u=e;for(i=0,r=u.length;i<r;i+=1){if(l=u[i],o=!1,Wr.call(l)!=="[object Object]")return!1;for(t in l)if(Pr.call(l,t))if(!o)o=!0;else return!1;if(!o)return!1;if(n.indexOf(t)===-1)n.push(t);else return!1}return!0}function jr(e){return e!==null?e:[]}var Br=new O("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Hr,construct:jr}),Ur=Object.prototype.toString;function Yr(e){if(e===null)return!0;var n,i,r,l,t,o=e;for(t=new Array(o.length),n=0,i=o.length;n<i;n+=1){if(r=o[n],Ur.call(r)!=="[object Object]"||(l=Object.keys(r),l.length!==1))return!1;t[n]=[l[0],r[l[0]]]}return!0}function $r(e){if(e===null)return[];var n,i,r,l,t,o=e;for(t=new Array(o.length),n=0,i=o.length;n<i;n+=1)r=o[n],l=Object.keys(r),t[n]=[l[0],r[l[0]]];return t}var qr=new O("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Yr,construct:$r}),zr=Object.prototype.hasOwnProperty;function Gr(e){if(e===null)return!0;var n,i=e;for(n in i)if(zr.call(i,n)&&i[n]!==null)return!1;return!0}function Jr(e){return e!==null?e:{}}var Kr=new O("tag:yaml.org,2002:set",{kind:"mapping",resolve:Gr,construct:Jr}),Qn=br.extend({implicit:[Or,kr],explicit:[Mr,Br,qr,Kr]}),j=Object.prototype.hasOwnProperty,se=1,Xn=2,Vn=3,pe=4,Ge=1,Qr=2,Tn=3,Xr=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,Vr=/[\\x85\\u2028\\u2029]/,Zr=/[,\\[\\]\\{\\}]/,Zn=/^(?:!|!!|![a-z\\-]+!)$/i,ei=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*\'\\(\\)\\[\\]])*$/i;function Nn(e){return Object.prototype.toString.call(e)}function R(e){return e===10||e===13}function Y(e){return e===9||e===32}function T(e){return e===9||e===32||e===10||e===13}function J(e){return e===44||e===91||e===93||e===123||e===125}function el(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function nl(e){return e===120?2:e===117?4:e===85?8:0}function il(e){return 48<=e&&e<=57?e-48:-1}function Dn(e){return e===48?"\\0":e===97?"\\x07":e===98?"\\b":e===116||e===9?" ":e===110?`\n`:e===118?"\\v":e===102?"\\f":e===114?"\\r":e===101?"\\x1B":e===32?" ":e===34?\'"\':e===47?"/":e===92?"\\\\":e===78?"\\x85":e===95?"\\xA0":e===76?"\\u2028":e===80?"\\u2029":""}function rl(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function ni(e,n,i){n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[n]=i}var ii=new Array(256),ri=new Array(256);for(U=0;U<256;U++)ii[U]=Dn(U)?1:0,ri[U]=Dn(U);var U;function ll(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||Qn,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function li(e,n){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=qi(i),new k(n,i)}function v(e,n){throw li(e,n)}function de(e,n){e.onWarning&&e.onWarning.call(null,li(e,n))}var Rn={YAML:function(n,i,r){var l,t,o;n.version!==null&&v(n,"duplication of %YAML directive"),r.length!==1&&v(n,"YAML directive accepts exactly one argument"),l=/^([0-9]+)\\.([0-9]+)$/.exec(r[0]),l===null&&v(n,"ill-formed argument of the YAML directive"),t=parseInt(l[1],10),o=parseInt(l[2],10),t!==1&&v(n,"unacceptable YAML version of the document"),n.version=r[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&de(n,"unsupported YAML version of the document")},TAG:function(n,i,r){var l,t;r.length!==2&&v(n,"TAG directive accepts exactly two arguments"),l=r[0],t=r[1],Zn.test(l)||v(n,"ill-formed tag handle (first argument) of the TAG directive"),j.call(n.tagMap,l)&&v(n,\'there is a previously declared suffix for "\'+l+\'" tag handle\'),ei.test(t)||v(n,"ill-formed tag prefix (second argument) of the TAG directive");try{t=decodeURIComponent(t)}catch{v(n,"tag prefix is malformed: "+t)}n.tagMap[l]=t}};function H(e,n,i,r){var l,t,o,u;if(n<i){if(u=e.input.slice(n,i),r)for(l=0,t=u.length;l<t;l+=1)o=u.charCodeAt(l),o===9||32<=o&&o<=1114111||v(e,"expected valid JSON character");else Xr.test(u)&&v(e,"the stream contains non-printable characters");e.result+=u}}function Mn(e,n,i,r){var l,t,o,u;for(L.isObject(i)||v(e,"cannot merge mappings; the provided source object is unacceptable"),l=Object.keys(i),o=0,u=l.length;o<u;o+=1)t=l[o],j.call(n,t)||(ni(n,t,i[t]),r[t]=!0)}function K(e,n,i,r,l,t,o,u,f){var c,s;if(Array.isArray(l))for(l=Array.prototype.slice.call(l),c=0,s=l.length;c<s;c+=1)Array.isArray(l[c])&&v(e,"nested arrays are not supported inside keys"),typeof l=="object"&&Nn(l[c])==="[object Object]"&&(l[c]="[object Object]");if(typeof l=="object"&&Nn(l)==="[object Object]"&&(l="[object Object]"),l=String(l),n===null&&(n={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(t))for(c=0,s=t.length;c<s;c+=1)Mn(e,n,t[c],i);else Mn(e,n,t,i);else!e.json&&!j.call(i,l)&&j.call(n,l)&&(e.line=o||e.line,e.lineStart=u||e.lineStart,e.position=f||e.position,v(e,"duplicated mapping key")),ni(n,l,t),delete i[l];return n}function en(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):v(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function _(e,n,i){for(var r=0,l=e.input.charCodeAt(e.position);l!==0;){for(;Y(l);)l===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),l=e.input.charCodeAt(++e.position);if(n&&l===35)do l=e.input.charCodeAt(++e.position);while(l!==10&&l!==13&&l!==0);if(R(l))for(en(e),l=e.input.charCodeAt(e.position),r++,e.lineIndent=0;l===32;)e.lineIndent++,l=e.input.charCodeAt(++e.position);else break}return i!==-1&&r!==0&&e.lineIndent<i&&de(e,"deficient indentation"),r}function ge(e){var n=e.position,i;return i=e.input.charCodeAt(n),!!((i===45||i===46)&&i===e.input.charCodeAt(n+1)&&i===e.input.charCodeAt(n+2)&&(n+=3,i=e.input.charCodeAt(n),i===0||T(i)))}function nn(e,n){n===1?e.result+=" ":n>1&&(e.result+=L.repeat(`\n`,n-1))}function ol(e,n,i){var r,l,t,o,u,f,c,s,a=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),T(d)||J(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(l=e.input.charCodeAt(e.position+1),T(l)||i&&J(l)))return!1;for(e.kind="scalar",e.result="",t=o=e.position,u=!1;d!==0;){if(d===58){if(l=e.input.charCodeAt(e.position+1),T(l)||i&&J(l))break}else if(d===35){if(r=e.input.charCodeAt(e.position-1),T(r))break}else{if(e.position===e.lineStart&&ge(e)||i&&J(d))break;if(R(d))if(f=e.line,c=e.lineStart,s=e.lineIndent,_(e,!1,-1),e.lineIndent>=n){u=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=f,e.lineStart=c,e.lineIndent=s;break}}u&&(H(e,t,o,!1),nn(e,e.line-f),t=o=e.position,u=!1),Y(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return H(e,t,o,!1),e.result?!0:(e.kind=a,e.result=p,!1)}function tl(e,n){var i,r,l;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=l=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(H(e,r,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)r=e.position,e.position++,l=e.position;else return!0;else R(i)?(H(e,r,l,!0),nn(e,_(e,!1,n)),r=l=e.position):e.position===e.lineStart&&ge(e)?v(e,"unexpected end of the document within a single quoted scalar"):(e.position++,l=e.position);v(e,"unexpected end of the stream within a single quoted scalar")}function ul(e,n){var i,r,l,t,o,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=r=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return H(e,i,e.position,!0),e.position++,!0;if(u===92){if(H(e,i,e.position,!0),u=e.input.charCodeAt(++e.position),R(u))_(e,!1,n);else if(u<256&&ii[u])e.result+=ri[u],e.position++;else if((o=nl(u))>0){for(l=o,t=0;l>0;l--)u=e.input.charCodeAt(++e.position),(o=el(u))>=0?t=(t<<4)+o:v(e,"expected hexadecimal character");e.result+=rl(t),e.position++}else v(e,"unknown escape sequence");i=r=e.position}else R(u)?(H(e,i,r,!0),nn(e,_(e,!1,n)),i=r=e.position):e.position===e.lineStart&&ge(e)?v(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}v(e,"unexpected end of the stream within a double quoted scalar")}function fl(e,n){var i=!0,r,l,t,o=e.tag,u,f=e.anchor,c,s,a,p,d,h=Object.create(null),g,y,w,m;if(m=e.input.charCodeAt(e.position),m===91)s=93,d=!1,u=[];else if(m===123)s=125,d=!0,u={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),m=e.input.charCodeAt(++e.position);m!==0;){if(_(e,!0,n),m=e.input.charCodeAt(e.position),m===s)return e.position++,e.tag=o,e.anchor=f,e.kind=d?"mapping":"sequence",e.result=u,!0;i?m===44&&v(e,"expected the node content, but found \',\'"):v(e,"missed comma between flow collection entries"),y=g=w=null,a=p=!1,m===63&&(c=e.input.charCodeAt(e.position+1),T(c)&&(a=p=!0,e.position++,_(e,!0,n))),r=e.line,l=e.lineStart,t=e.position,Q(e,n,se,!1,!0),y=e.tag,g=e.result,_(e,!0,n),m=e.input.charCodeAt(e.position),(p||e.line===r)&&m===58&&(a=!0,m=e.input.charCodeAt(++e.position),_(e,!0,n),Q(e,n,se,!1,!0),w=e.result),d?K(e,u,h,y,g,w,r,l,t):a?u.push(K(e,null,h,y,g,w,r,l,t)):u.push(g),_(e,!0,n),m=e.input.charCodeAt(e.position),m===44?(i=!0,m=e.input.charCodeAt(++e.position)):i=!1}v(e,"unexpected end of the stream within a flow collection")}function cl(e,n){var i,r,l=Ge,t=!1,o=!1,u=n,f=0,c=!1,s,a;if(a=e.input.charCodeAt(e.position),a===124)r=!1;else if(a===62)r=!0;else return!1;for(e.kind="scalar",e.result="";a!==0;)if(a=e.input.charCodeAt(++e.position),a===43||a===45)Ge===l?l=a===43?Tn:Qr:v(e,"repeat of a chomping mode identifier");else if((s=il(a))>=0)s===0?v(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?v(e,"repeat of an indentation width identifier"):(u=n+s-1,o=!0);else break;if(Y(a)){do a=e.input.charCodeAt(++e.position);while(Y(a));if(a===35)do a=e.input.charCodeAt(++e.position);while(!R(a)&&a!==0)}for(;a!==0;){for(en(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!o||e.lineIndent<u)&&a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>u&&(u=e.lineIndent),R(a)){f++;continue}if(e.lineIndent<u){l===Tn?e.result+=L.repeat(`\n`,t?1+f:f):l===Ge&&t&&(e.result+=`\n`);break}for(r?Y(a)?(c=!0,e.result+=L.repeat(`\n`,t?1+f:f)):c?(c=!1,e.result+=L.repeat(`\n`,f+1)):f===0?t&&(e.result+=" "):e.result+=L.repeat(`\n`,f):e.result+=L.repeat(`\n`,t?1+f:f),t=!0,o=!0,f=0,i=e.position;!R(a)&&a!==0;)a=e.input.charCodeAt(++e.position);H(e,i,e.position,!1)}return!0}function Pn(e,n){var i,r=e.tag,l=e.anchor,t=[],o,u=!1,f;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=t),f=e.input.charCodeAt(e.position);f!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,v(e,"tab characters must not be used in indentation")),!(f!==45||(o=e.input.charCodeAt(e.position+1),!T(o))));){if(u=!0,e.position++,_(e,!0,-1)&&e.lineIndent<=n){t.push(null),f=e.input.charCodeAt(e.position);continue}if(i=e.line,Q(e,n,Vn,!1,!0),t.push(e.result),_(e,!0,-1),f=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>n)&&f!==0)v(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return u?(e.tag=r,e.anchor=l,e.kind="sequence",e.result=t,!0):!1}function al(e,n,i){var r,l,t,o,u,f,c=e.tag,s=e.anchor,a={},p=Object.create(null),d=null,h=null,g=null,y=!1,w=!1,m;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),m=e.input.charCodeAt(e.position);m!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,v(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),t=e.line,(m===63||m===58)&&T(r))m===63?(y&&(K(e,a,p,d,h,null,o,u,f),d=h=g=null),w=!0,y=!0,l=!0):y?(y=!1,l=!0):v(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,m=r;else{if(o=e.line,u=e.lineStart,f=e.position,!Q(e,i,Xn,!1,!0))break;if(e.line===t){for(m=e.input.charCodeAt(e.position);Y(m);)m=e.input.charCodeAt(++e.position);if(m===58)m=e.input.charCodeAt(++e.position),T(m)||v(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(K(e,a,p,d,h,null,o,u,f),d=h=g=null),w=!0,y=!1,l=!1,d=e.tag,h=e.result;else if(w)v(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=s,!0}else if(w)v(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=s,!0}if((e.line===t||e.lineIndent>n)&&(y&&(o=e.line,u=e.lineStart,f=e.position),Q(e,n,pe,!0,l)&&(y?h=e.result:g=e.result),y||(K(e,a,p,d,h,g,o,u,f),d=h=g=null),_(e,!0,-1),m=e.input.charCodeAt(e.position)),(e.line===t||e.lineIndent>n)&&m!==0)v(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return y&&K(e,a,p,d,h,null,o,u,f),w&&(e.tag=c,e.anchor=s,e.kind="mapping",e.result=a),w}function sl(e){var n,i=!1,r=!1,l,t,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&v(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(i=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,l="!!",o=e.input.charCodeAt(++e.position)):l="!",n=e.position,i){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(t=e.input.slice(n,e.position),o=e.input.charCodeAt(++e.position)):v(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!T(o);)o===33&&(r?v(e,"tag suffix cannot contain exclamation marks"):(l=e.input.slice(n-1,e.position+1),Zn.test(l)||v(e,"named tag handle cannot contain such characters"),r=!0,n=e.position+1)),o=e.input.charCodeAt(++e.position);t=e.input.slice(n,e.position),Zr.test(t)&&v(e,"tag suffix cannot contain flow indicator characters")}t&&!ei.test(t)&&v(e,"tag name cannot contain such characters: "+t);try{t=decodeURIComponent(t)}catch{v(e,"tag name is malformed: "+t)}return i?e.tag=t:j.call(e.tagMap,l)?e.tag=e.tagMap[l]+t:l==="!"?e.tag="!"+t:l==="!!"?e.tag="tag:yaml.org,2002:"+t:v(e,\'undeclared tag handle "\'+l+\'"\'),!0}function pl(e){var n,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&v(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),n=e.position;i!==0&&!T(i)&&!J(i);)i=e.input.charCodeAt(++e.position);return e.position===n&&v(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function dl(e){var n,i,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),n=e.position;r!==0&&!T(r)&&!J(r);)r=e.input.charCodeAt(++e.position);return e.position===n&&v(e,"name of an alias node must contain at least one character"),i=e.input.slice(n,e.position),j.call(e.anchorMap,i)||v(e,\'unidentified alias "\'+i+\'"\'),e.result=e.anchorMap[i],_(e,!0,-1),!0}function Q(e,n,i,r,l){var t,o,u,f=1,c=!1,s=!1,a,p,d,h,g,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,t=o=u=pe===i||Vn===i,r&&_(e,!0,-1)&&(c=!0,e.lineIndent>n?f=1:e.lineIndent===n?f=0:e.lineIndent<n&&(f=-1)),f===1)for(;sl(e)||pl(e);)_(e,!0,-1)?(c=!0,u=t,e.lineIndent>n?f=1:e.lineIndent===n?f=0:e.lineIndent<n&&(f=-1)):u=!1;if(u&&(u=c||l),(f===1||pe===i)&&(se===i||Xn===i?g=n:g=n+1,y=e.position-e.lineStart,f===1?u&&(Pn(e,y)||al(e,y,g))||fl(e,g)?s=!0:(o&&cl(e,g)||tl(e,g)||ul(e,g)?s=!0:dl(e)?(s=!0,(e.tag!==null||e.anchor!==null)&&v(e,"alias node should not have any properties")):ol(e,g,se===i)&&(s=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):f===0&&(s=u&&Pn(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&v(e,\'unacceptable node kind for !<?> tag; it should be "scalar", not "\'+e.kind+\'"\'),a=0,p=e.implicitTypes.length;a<p;a+=1)if(h=e.implicitTypes[a],h.resolve(e.result)){e.result=h.construct(e.result),e.tag=h.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(j.call(e.typeMap[e.kind||"fallback"],e.tag))h=e.typeMap[e.kind||"fallback"][e.tag];else for(h=null,d=e.typeMap.multi[e.kind||"fallback"],a=0,p=d.length;a<p;a+=1)if(e.tag.slice(0,d[a].tag.length)===d[a].tag){h=d[a];break}h||v(e,"unknown tag !<"+e.tag+">"),e.result!==null&&h.kind!==e.kind&&v(e,"unacceptable node kind for !<"+e.tag+\'> tag; it should be "\'+h.kind+\'", not "\'+e.kind+\'"\'),h.resolve(e.result,e.tag)?(e.result=h.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):v(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||s}function hl(e){var n=e.position,i,r,l,t=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(_(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(t=!0,o=e.input.charCodeAt(++e.position),i=e.position;o!==0&&!T(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(i,e.position),l=[],r.length<1&&v(e,"directive name must not be less than one character in length");o!==0;){for(;Y(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!R(o));break}if(R(o))break;for(i=e.position;o!==0&&!T(o);)o=e.input.charCodeAt(++e.position);l.push(e.input.slice(i,e.position))}o!==0&&en(e),j.call(Rn,r)?Rn[r](e,r,l):de(e,\'unknown document directive "\'+r+\'"\')}if(_(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,_(e,!0,-1)):t&&v(e,"directives end mark is expected"),Q(e,e.lineIndent-1,pe,!1,!0),_(e,!0,-1),e.checkLineBreaks&&Vr.test(e.input.slice(n,e.position))&&de(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ge(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,_(e,!0,-1));return}if(e.position<e.length-1)v(e,"end of the stream or a document separator is expected");else return}function oi(e,n){e=String(e),n=n||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`\n`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new ll(e,n),r=e.indexOf("\\0");for(r!==-1&&(i.position=r,v(i,"null byte is not allowed in input")),i.input+="\\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)hl(i);return i.documents}function ml(e,n,i){n!==null&&typeof n=="object"&&typeof i>"u"&&(i=n,n=null);var r=oi(e,i);if(typeof n!="function")return r;for(var l=0,t=r.length;l<t;l+=1)n(r[l])}function gl(e,n){var i=oi(e,n);if(i.length!==0){if(i.length===1)return i[0];throw new k("expected a single document in the stream, but found more")}}var xl=ml,vl=gl,ti={loadAll:xl,load:vl},ui=Object.prototype.toString,fi=Object.prototype.hasOwnProperty,rn=65279,yl=9,re=10,Al=13,wl=32,Cl=33,El=34,Ke=35,Sl=37,bl=38,_l=39,Ll=42,ci=44,Fl=45,he=58,Ol=61,Il=62,kl=63,Tl=64,ai=91,si=93,Nl=96,pi=123,Dl=124,di=125,I={};I[0]="\\\\0";I[7]="\\\\a";I[8]="\\\\b";I[9]="\\\\t";I[10]="\\\\n";I[11]="\\\\v";I[12]="\\\\f";I[13]="\\\\r";I[27]="\\\\e";I[34]=\'\\\\"\';I[92]="\\\\\\\\";I[133]="\\\\N";I[160]="\\\\_";I[8232]="\\\\L";I[8233]="\\\\P";var Rl=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Ml=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;function Pl(e,n){var i,r,l,t,o,u,f;if(n===null)return{};for(i={},r=Object.keys(n),l=0,t=r.length;l<t;l+=1)o=r[l],u=String(n[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),f=e.compiledTypeMap.fallback[o],f&&fi.call(f.styleAliases,u)&&(u=f.styleAliases[u]),i[o]=u;return i}function Wl(e){var n,i,r;if(n=e.toString(16).toUpperCase(),e<=255)i="x",r=2;else if(e<=65535)i="u",r=4;else if(e<=4294967295)i="U",r=8;else throw new k("code point within a string may not be greater than 0xFFFFFFFF");return"\\\\"+i+L.repeat("0",r-n.length)+n}var Hl=1,le=2;function jl(e){this.schema=e.schema||Qn,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=L.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Pl(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType===\'"\'?le:Hl,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Wn(e,n){for(var i=L.repeat(" ",n),r=0,l=-1,t="",o,u=e.length;r<u;)l=e.indexOf(`\n`,r),l===-1?(o=e.slice(r),r=u):(o=e.slice(r,l+1),r=l+1),o.length&&o!==`\n`&&(t+=i),t+=o;return t}function Qe(e,n){return`\n`+L.repeat(" ",e.indent*n)}function Bl(e,n){var i,r,l;for(i=0,r=e.implicitTypes.length;i<r;i+=1)if(l=e.implicitTypes[i],l.resolve(n))return!0;return!1}function me(e){return e===wl||e===yl}function oe(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==rn||65536<=e&&e<=1114111}function Hn(e){return oe(e)&&e!==rn&&e!==Al&&e!==re}function jn(e,n,i){var r=Hn(e),l=r&&!me(e);return(i?r:r&&e!==ci&&e!==ai&&e!==si&&e!==pi&&e!==di)&&e!==Ke&&!(n===he&&!l)||Hn(n)&&!me(n)&&e===Ke||n===he&&l}function Ul(e){return oe(e)&&e!==rn&&!me(e)&&e!==Fl&&e!==kl&&e!==he&&e!==ci&&e!==ai&&e!==si&&e!==pi&&e!==di&&e!==Ke&&e!==bl&&e!==Ll&&e!==Cl&&e!==Dl&&e!==Ol&&e!==Il&&e!==_l&&e!==El&&e!==Sl&&e!==Tl&&e!==Nl}function Yl(e){return!me(e)&&e!==he}function ne(e,n){var i=e.charCodeAt(n),r;return i>=55296&&i<=56319&&n+1<e.length&&(r=e.charCodeAt(n+1),r>=56320&&r<=57343)?(i-55296)*1024+r-56320+65536:i}function hi(e){var n=/^\\n* /;return n.test(e)}var mi=1,Xe=2,gi=3,xi=4,G=5;function $l(e,n,i,r,l,t,o,u){var f,c=0,s=null,a=!1,p=!1,d=r!==-1,h=-1,g=Ul(ne(e,0))&&Yl(ne(e,e.length-1));if(n||o)for(f=0;f<e.length;c>=65536?f+=2:f++){if(c=ne(e,f),!oe(c))return G;g=g&&jn(c,s,u),s=c}else{for(f=0;f<e.length;c>=65536?f+=2:f++){if(c=ne(e,f),c===re)a=!0,d&&(p=p||f-h-1>r&&e[h+1]!==" ",h=f);else if(!oe(c))return G;g=g&&jn(c,s,u),s=c}p=p||d&&f-h-1>r&&e[h+1]!==" "}return!a&&!p?g&&!o&&!l(e)?mi:t===le?G:Xe:i>9&&hi(e)?G:o?t===le?G:Xe:p?xi:gi}function ql(e,n,i,r,l){e.dump=(function(){if(n.length===0)return e.quotingType===le?\'""\':"\'\'";if(!e.noCompatMode&&(Rl.indexOf(n)!==-1||Ml.test(n)))return e.quotingType===le?\'"\'+n+\'"\':"\'"+n+"\'";var t=e.indent*Math.max(1,i),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-t),u=r||e.flowLevel>-1&&i>=e.flowLevel;function f(c){return Bl(e,c)}switch($l(n,u,e.indent,o,f,e.quotingType,e.forceQuotes&&!r,l)){case mi:return n;case Xe:return"\'"+n.replace(/\'/g,"\'\'")+"\'";case gi:return"|"+Bn(n,e.indent)+Un(Wn(n,t));case xi:return">"+Bn(n,e.indent)+Un(Wn(zl(n,o),t));case G:return\'"\'+Gl(n)+\'"\';default:throw new k("impossible error: invalid scalar style")}})()}function Bn(e,n){var i=hi(e)?String(n):"",r=e[e.length-1]===`\n`,l=r&&(e[e.length-2]===`\n`||e===`\n`),t=l?"+":r?"":"-";return i+t+`\n`}function Un(e){return e[e.length-1]===`\n`?e.slice(0,-1):e}function zl(e,n){for(var i=/(\\n+)([^\\n]*)/g,r=(function(){var c=e.indexOf(`\n`);return c=c!==-1?c:e.length,i.lastIndex=c,Yn(e.slice(0,c),n)})(),l=e[0]===`\n`||e[0]===" ",t,o;o=i.exec(e);){var u=o[1],f=o[2];t=f[0]===" ",r+=u+(!l&&!t&&f!==""?`\n`:"")+Yn(f,n),l=t}return r}function Yn(e,n){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,r,l=0,t,o=0,u=0,f="";r=i.exec(e);)u=r.index,u-l>n&&(t=o>l?o:u,f+=`\n`+e.slice(l,t),l=t+1),o=u;return f+=`\n`,e.length-l>n&&o>l?f+=e.slice(l,o)+`\n`+e.slice(o+1):f+=e.slice(l),f.slice(1)}function Gl(e){for(var n="",i=0,r,l=0;l<e.length;i>=65536?l+=2:l++)i=ne(e,l),r=I[i],!r&&oe(i)?(n+=e[l],i>=65536&&(n+=e[l+1])):n+=r||Wl(i);return n}function Jl(e,n,i){var r="",l=e.tag,t,o,u;for(t=0,o=i.length;t<o;t+=1)u=i[t],e.replacer&&(u=e.replacer.call(i,String(t),u)),(P(e,n,u,!1,!1)||typeof u>"u"&&P(e,n,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=l,e.dump="["+r+"]"}function $n(e,n,i,r){var l="",t=e.tag,o,u,f;for(o=0,u=i.length;o<u;o+=1)f=i[o],e.replacer&&(f=e.replacer.call(i,String(o),f)),(P(e,n+1,f,!0,!0,!1,!0)||typeof f>"u"&&P(e,n+1,null,!0,!0,!1,!0))&&((!r||l!=="")&&(l+=Qe(e,n)),e.dump&&re===e.dump.charCodeAt(0)?l+="-":l+="- ",l+=e.dump);e.tag=t,e.dump=l||"[]"}function Kl(e,n,i){var r="",l=e.tag,t=Object.keys(i),o,u,f,c,s;for(o=0,u=t.length;o<u;o+=1)s="",r!==""&&(s+=", "),e.condenseFlow&&(s+=\'"\'),f=t[o],c=i[f],e.replacer&&(c=e.replacer.call(i,f,c)),P(e,n,f,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?\'"\':"")+":"+(e.condenseFlow?"":" "),P(e,n,c,!1,!1)&&(s+=e.dump,r+=s));e.tag=l,e.dump="{"+r+"}"}function Ql(e,n,i,r){var l="",t=e.tag,o=Object.keys(i),u,f,c,s,a,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new k("sortKeys must be a boolean or a function");for(u=0,f=o.length;u<f;u+=1)p="",(!r||l!=="")&&(p+=Qe(e,n)),c=o[u],s=i[c],e.replacer&&(s=e.replacer.call(i,c,s)),P(e,n+1,c,!0,!0,!0)&&(a=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,a&&(e.dump&&re===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,a&&(p+=Qe(e,n)),P(e,n+1,s,!0,a)&&(e.dump&&re===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,l+=p));e.tag=t,e.dump=l||"{}"}function qn(e,n,i){var r,l,t,o,u,f;for(l=i?e.explicitTypes:e.implicitTypes,t=0,o=l.length;t<o;t+=1)if(u=l[t],(u.instanceOf||u.predicate)&&(!u.instanceOf||typeof n=="object"&&n instanceof u.instanceOf)&&(!u.predicate||u.predicate(n))){if(i?u.multi&&u.representName?e.tag=u.representName(n):e.tag=u.tag:e.tag="?",u.represent){if(f=e.styleMap[u.tag]||u.defaultStyle,ui.call(u.represent)==="[object Function]")r=u.represent(n,f);else if(fi.call(u.represent,f))r=u.represent[f](n,f);else throw new k("!<"+u.tag+\'> tag resolver accepts not "\'+f+\'" style\');e.dump=r}return!0}return!1}function P(e,n,i,r,l,t,o){e.tag=null,e.dump=i,qn(e,i,!1)||qn(e,i,!0);var u=ui.call(e.dump),f=r,c;r&&(r=e.flowLevel<0||e.flowLevel>n);var s=u==="[object Object]"||u==="[object Array]",a,p;if(s&&(a=e.duplicates.indexOf(i),p=a!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&n>0)&&(l=!1),p&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(s&&p&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),u==="[object Object]")r&&Object.keys(e.dump).length!==0?(Ql(e,n,e.dump,l),p&&(e.dump="&ref_"+a+e.dump)):(Kl(e,n,e.dump),p&&(e.dump="&ref_"+a+" "+e.dump));else if(u==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?$n(e,n-1,e.dump,l):$n(e,n,e.dump,l),p&&(e.dump="&ref_"+a+e.dump)):(Jl(e,n,e.dump),p&&(e.dump="&ref_"+a+" "+e.dump));else if(u==="[object String]")e.tag!=="?"&&ql(e,e.dump,n,t,f);else{if(u==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new k("unacceptable kind of an object to dump "+u)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}function Xl(e,n){var i=[],r=[],l,t;for(Ve(e,i,r),l=0,t=r.length;l<t;l+=1)n.duplicates.push(i[r[l]]);n.usedDuplicates=new Array(t)}function Ve(e,n,i){var r,l,t;if(e!==null&&typeof e=="object")if(l=n.indexOf(e),l!==-1)i.indexOf(l)===-1&&i.push(l);else if(n.push(e),Array.isArray(e))for(l=0,t=e.length;l<t;l+=1)Ve(e[l],n,i);else for(r=Object.keys(e),l=0,t=r.length;l<t;l+=1)Ve(e[r[l]],n,i)}function Vl(e,n){n=n||{};var i=new jl(n);i.noRefs||Xl(e,i);var r=e;return i.replacer&&(r=i.replacer.call({"":r},"",r)),P(i,0,r,!0,!0)?i.dump+`\n`:""}var Zl=Vl,eo={dump:Zl};function ln(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var on=ti.load,ut=ti.loadAll,xe=eo.dump;var ft=ln("safeLoad","load"),ct=ln("safeLoadAll","loadAll"),at=ln("safeDump","dump");var so=bi("./workerBundle"),io=$e;function D(e,n){return n==="yaml"?xe(e,{indent:2,lineWidth:-1,noRefs:!0}).trimEnd():JSON.stringify(e,null,2)}function ro(e,n,i="json"){let r=D(e,i),l=D(n,i);return r===l?[{value:r}]:tn(e,n,0,i)}function lo(e,n){return ro(e,n,"json")}function oo(e,n){try{let i=JSON.parse(e),r=JSON.parse(n),l=JSON.stringify(i),t=JSON.stringify(r);return l===t?[{value:e}]:N(e,n,{newlineIsToken:!1})}catch{return N(e,n,{newlineIsToken:!1})}}function to(e,n){let i=on(e),r=on(n),l=xe(i,{indent:2,lineWidth:-1,noRefs:!0}),t=xe(r,{indent:2,lineWidth:-1,noRefs:!0});return l===t?[{value:e}]:N(e,n,{newlineIsToken:!1})}function tn(e,n,i,r="json"){let l=D(e,r),t=D(n,r);return l===t?[{value:W(l,i,r)}]:typeof e=="object"&&e!==null&&typeof n=="object"&&n!==null&&!Array.isArray(e)&&!Array.isArray(n)?uo(e,n,i,r):Array.isArray(e)&&Array.isArray(n)?fo(e,n,i,r):co(l,t,i,r)}function uo(e,n,i,r="json"){let l=[],t=" ".repeat(i),o=" ".repeat(i+1),u=new Set(Object.keys(e)),f=Object.keys(n),c=[...u].filter(a=>!(a in n)),s=[...f,...c];l.push({value:`{\n`});for(let a=0;a<s.length;a++){let p=s[a],h=a===s.length-1?"":",",g=p in e,y=p in n;if(g&&y){let w=D(e[p],r),m=D(n[p],r);if(w===m){let x=W(w,i+1);l.push({value:o+JSON.stringify(p)+": "+x+h+`\n`})}else{let x=o+JSON.stringify(p)+": ",A=tn(e[p],n[p],i+1,r);if(A.length>0)if(!A[0].removed&&!A[0].added)A[0].value=x+A[0].value;else{let C=A.find(E=>E.removed),F=A.find(E=>E.added);C&&(C.value=x+C.value),F&&(F.value=x+F.value)}if(h&&A.length>0){let C=A[A.length-1];C.value=C.value.replace(/\\n$/,h+`\n`)}l.push(...A)}}else if(g){let w=W(D(e[p],r),i+1);l.push({removed:!0,value:o+JSON.stringify(p)+": "+w+h+`\n`})}else{let w=W(D(n[p],r),i+1);l.push({added:!0,value:o+JSON.stringify(p)+": "+w+h+`\n`})}}return l.push({value:t+`}\n`}),l}function fo(e,n,i,r="json"){let l=[],t=" ".repeat(i),o=" ".repeat(i+1);l.push({value:`[\n`});let u=Math.max(e.length,n.length);for(let f=0;f<u;f++){let s=f===u-1?"":",";if(f>=e.length){let a=W(D(n[f],r),i+1);l.push({added:!0,value:o+a+s+`\n`})}else if(f>=n.length){let a=W(D(e[f],r),i+1);l.push({removed:!0,value:o+a+s+`\n`})}else{let a=D(e[f],r),p=D(n[f],r);if(a===p){let d=W(a,i+1);l.push({value:o+d+s+`\n`})}else{let d=tn(e[f],n[f],i+1,r);if(d.length>0&&(d[0].value=o+d[0].value),s&&d.length>0){let h=d[d.length-1];h.value=h.value.replace(/\\n$/,s+`\n`)}l.push(...d)}}}return l.push({value:t+`]\n`}),l}function co(e,n,i,r="json"){let l=W(e,i),t=W(n,i);return N(l,t).map(u=>({value:u.value,added:u.added,removed:u.removed}))}function W(e,n,i="json"){if(n===0)return e;let r=" ".repeat(n);return e.split(`\n`).map((l,t)=>t===0?l:r+l).join(`\n`)}var vi=e=>e===""?[]:e.replace(/\\n$/,"").split(`\n`),ao=(e,n,i="diffChars")=>{let l=(typeof i=="string"?io[i]:i)(e,n),t={left:[],right:[]};return l.forEach(({added:o,removed:u,value:f})=>{let c={};return o&&(c.type=1,c.value=f,t.right.push(c)),u&&(c.type=2,c.value=f,t.left.push(c)),!u&&!o&&(c.type=0,c.value=f,t.right.push(c),t.left.push(c)),c}),t},yi=(e,n,i=!1,r="diffChars",l=0,t=[],o=!1)=>{let u=[];if(typeof e=="string"&&typeof n=="string")if(r==="diffJson")u=oo(e,n);else if(r==="diffYaml")try{u=to(e,n)}catch{u=N(e,n,{newlineIsToken:!1})}else u=N(e,n,{newlineIsToken:!1});else u=lo(e,n);let f=l,c=l,s=[],a=0,p=[],d=[],h=(g,y,w,m,x)=>vi(g).map((C,F)=>{let E={},S={};if(!(d.includes(`${y}-${F}`)||x&&F!==0)){if(w||m){let $=!0;if(m){c+=1,E.lineNumber=c,E.type=2,E.value=C||" ";let un=u[y+1];if(un?.added){let fn=vi(un.value)[F];if(fn){let Ai=h(fn,y,!0,!1,!0),{value:B,lineNumber:wi,type:Ci}=Ai[0].right;if(d.push(`${y+1}-${F}`),S.lineNumber=wi,E.value===B)$=!1,S.type=0,E.type=0,S.value=B;else{S.type=Ci;let cn=500,Ei=C.length>cn||B.length>cn;if(i||Ei)S.value=B;else if(o)E.rawValue=C,E.value=C,S.rawValue=B,S.value=B;else{let an=ao(C,B,r);S.value=an.right,E.value=an.left}}}}}else f+=1,S.lineNumber=f,S.type=1,S.value=C;$&&!x&&(p.includes(a)||p.push(a))}else c+=1,f+=1,E.lineNumber=c,E.type=0,E.value=C,S.lineNumber=f,S.type=0,S.value=C;return(t?.includes(`L-${E.lineNumber}`)||t?.includes(`R-${S.lineNumber}`)&&!p.includes(a))&&p.push(a),x||(a+=1),{right:S,left:E}}}).filter(Boolean);return u.forEach(({added:g,removed:y,value:w},m)=>{s=[...s,...h(w,m,g,y)]}),{lineInformation:s,diffLines:p}};self.onmessage=e=>{let{oldString:n,newString:i,disableWordDiff:r,lineCompareMethod:l,linesOffset:t,showLines:o,deferWordDiff:u}=e.data,f=yi(n,i,r,l,t,o,u);self.postMessage(f)};})();\n/*! Bundled license information:\n\njs-yaml/dist/js-yaml.mjs:\n (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)\n*/\n'],{type:`application/javascript`});i5=URL.createObjectURL(e)}catch{i5=null}return i5},Ioe=(e,t,n=!1,r=t5.CHARS,i=0,a=[],o=!1)=>{let s=()=>Poe(e,t,n,r,i,a,o),c=Foe();return c?new Promise(l=>{let u;try{u=new Worker(c)}catch{l(s());return}u.onmessage=e=>{l(e.data),u.terminate()},u.onerror=()=>{u.terminate(),l(s())},u.postMessage({oldString:e,newString:t,disableWordDiff:n,lineCompareMethod:r,linesOffset:i,showLines:a,deferWordDiff:o})}):Promise.resolve(s())};function a5(){return(0,P.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 16 16`,width:`16`,height:`16`,children:[(0,P.jsx)(`title`,{children:`expand`}),(0,P.jsx)(`path`,{d:`m8.177.677 2.896 2.896a.25.25 0 0 1-.177.427H8.75v1.25a.75.75 0 0 1-1.5 0V4H5.104a.25.25 0 0 1-.177-.427L7.823.677a.25.25 0 0 1 .354 0ZM7.25 10.75a.75.75 0 0 1 1.5 0V12h2.146a.25.25 0 0 1 .177.427l-2.896 2.896a.25.25 0 0 1-.354 0l-2.896-2.896A.25.25 0 0 1 5.104 12H7.25v-1.25Zm-5-2a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM6 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 6 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM12 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 12 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5Z`})]})}var Loe=(e,t=!1,n=``)=>{let{variables:r={},...i}=e,a={light:{diffViewerBackground:`#fff`,diffViewerColor:`#212529`,addedBackground:`#e6ffed`,addedColor:`#24292e`,removedBackground:`#ffeef0`,removedColor:`#24292e`,changedBackground:`#fffbdd`,wordAddedBackground:`#acf2bd`,wordRemovedBackground:`#fdb8c0`,addedGutterBackground:`#cdffd8`,removedGutterBackground:`#ffdce0`,gutterBackground:`#f7f7f7`,gutterBackgroundDark:`#f3f1f1`,highlightBackground:`#fffbdd`,highlightGutterBackground:`#fff5b1`,codeFoldGutterBackground:`#dbedff`,codeFoldBackground:`#f1f8ff`,emptyLineBackground:`#fafbfc`,gutterColor:`#212529`,addedGutterColor:`#212529`,removedGutterColor:`#212529`,codeFoldContentColor:`#212529`,diffViewerTitleBackground:`#fafbfc`,diffViewerTitleColor:`#212529`,diffViewerTitleBorderColor:`#eee`,...r.light||{}},dark:{diffViewerBackground:`#2e303c`,diffViewerColor:`#FFF`,addedBackground:`#2ea04326`,addedColor:`white`,removedBackground:`#f851491a`,removedColor:`white`,changedBackground:`#3e302c`,wordAddedBackground:`#2ea04366`,wordRemovedBackground:`#f8514966`,addedGutterBackground:`#3fb9504d`,removedGutterBackground:`#f851494d`,gutterBackground:`#2c2f3a`,gutterBackgroundDark:`#262933`,highlightBackground:`#2a3967`,highlightGutterBackground:`#2d4077`,codeFoldGutterBackground:`#262831`,codeFoldBackground:`#262831`,emptyLineBackground:`#363946`,gutterColor:`#f0f6fc`,addedGutterColor:`#f0f6fc`,removedGutterColor:`#f0f6fc`,codeFoldContentColor:`#9198a1`,diffViewerTitleBackground:`#2f323e`,diffViewerTitleColor:`#f0f6fc`,diffViewerTitleBorderColor:`#353846`,...r.dark||{}}},o=t?a.dark:a.light,{css:s,cx:c}=KG({key:`react-diff`,nonce:n}),l=s({width:`auto`,overflow:`hidden`,label:`content`}),u=s({label:`split-view`}),d=s({position:`sticky`,top:0,zIndex:2,label:`sticky-header`}),f=s({background:o.diffViewerTitleBackground,color:o.diffViewerTitleColor,padding:`0.5em 1em`,display:`flex`,alignItems:`center`,gap:`0.5em`,fontFamily:`monospace`,fontSize:12,fill:o.diffViewerTitleColor}),p=s({display:`flex`,label:`column-headers`}),m=s({width:`100%`,minWidth:`1000px`,overflowX:`auto`,tableLayout:`fixed`,fontSize:12,background:o.diffViewerBackground,pre:{margin:0,whiteSpace:`pre-wrap`,lineHeight:`1.6em`,width:`fit-content`},label:`diff-container`,borderCollapse:`collapse`,"@media (max-width: 768px)":{minWidth:`unset`}}),h=s({overflow:`hidden`,width:`100%`}),g=s({color:o.diffViewerColor,whiteSpace:`pre-wrap`,fontFamily:`monospace`,lineBreak:`anywhere`,textDecoration:`none`,label:`content-text`}),_=s({userSelect:`none`,label:`unselectable`}),v=s({label:`no-wrap`,pre:{whiteSpace:`pre`},[`.${g}`]:{whiteSpace:`pre`,lineBreak:`auto`}}),y=s({background:`transparent`,border:`none`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,margin:0,label:`all-expand-button`,":hover":{fill:o.addedGutterColor},":focus":{outline:`1px ${o.addedGutterColor} solid`}}),b=s({background:o.diffViewerTitleBackground,padding:`0.5em`,lineHeight:`1.4em`,height:`2.4em`,overflow:`hidden`,width:`50%`,borderBottom:`1px solid ${o.diffViewerTitleBorderColor}`,boxSizing:`border-box`,fontSize:12,label:`title-block`,":only-child":{width:`100%`},":last-child:not(:only-child)":{borderLeft:`1px solid ${o.diffViewerTitleBorderColor}`},[`.${g}`]:{color:o.diffViewerTitleColor}}),x=s({color:o.gutterColor,label:`line-number`}),S=s({background:o.removedBackground,color:o.removedColor,pre:{color:o.removedColor},[`.${x}`]:{color:o.removedGutterColor},label:`diff-removed`}),C=s({background:o.addedBackground,color:o.addedColor,pre:{color:o.addedColor},[`.${x}`]:{color:o.addedGutterColor},label:`diff-added`}),w=s({background:o.changedBackground,[`.${x}`]:{color:o.gutterColor},label:`diff-changed`}),T=s({display:`inline`,textDecoration:`none`,label:`word-diff`}),E=s({background:o.wordAddedBackground,label:`word-added`}),D=s({background:o.wordRemovedBackground,label:`word-removed`}),O=s({backgroundColor:o.codeFoldGutterBackground,label:`code-fold-gutter`,minWidth:`50px`,width:`50px`,textAlign:`center`,fill:o.codeFoldContentColor}),k=s({padding:``}),A=s({background:o.codeFoldBackground,cursor:`pointer`,display:`inline`,margin:0,border:`none`,fill:o.codeFoldContentColor,label:`code-fold-expand-button`}),ee=s({color:o.codeFoldContentColor,fontFamily:`monospace`,label:`code-fold-content`}),j=s({display:`block`,width:`10px`,height:`10px`,backgroundColor:`#ddd`,borderWidth:`1px`,borderStyle:`solid`,borderColor:o.diffViewerTitleBorderColor}),te=s({backgroundColor:o.wordAddedBackground}),ne=s({backgroundColor:o.wordRemovedBackground}),re=s({backgroundColor:o.codeFoldBackground,fontSize:12,alignItems:`center`,userSelect:`none`,fontWeight:700,cursor:`pointer`,label:`code-fold`,"&:hover":{color:o.diffViewerColor,fill:o.diffViewerColor,"& *":{color:o.diffViewerColor,fill:o.diffViewerColor}},a:{textDecoration:`underline !important`,cursor:`pointer`,pre:{display:`inline`}}}),ie=s({backgroundColor:o.emptyLineBackground,label:`empty-line`}),ae=s({width:28,paddingLeft:10,paddingRight:10,userSelect:`none`,label:`marker`,[`&.${C}`]:{pre:{color:o.addedColor}},[`&.${S}`]:{pre:{color:o.removedColor}}}),oe=s({background:o.highlightBackground,label:`highlighted-line`,[`.${E}, .${D}`]:{backgroundColor:`initial`}}),se=s({label:`highlighted-gutter`}),M=s({userSelect:`none`,minWidth:50,width:`50px`,padding:`0 10px`,whiteSpace:`nowrap`,label:`gutter`,textAlign:`center`,color:o.gutterColor,background:o.gutterBackground,"&:hover":{cursor:`pointer`,background:o.gutterBackgroundDark,pre:{opacity:1}},pre:{opacity:.5,textAlign:`center`,width:`100%`},[`&.${C}`]:{background:o.addedGutterBackground},[`&.${S}`]:{background:o.removedGutterBackground},[`&.${se}`]:{background:o.highlightGutterBackground,"&:hover":{background:o.highlightGutterBackground}}}),ce=s({"&:hover":{background:o.gutterBackground,cursor:`initial`},label:`empty-gutter`}),le={diffContainer:m,diffRemoved:S,diffAdded:C,diffChanged:w,splitView:u,marker:ae,highlightedGutter:se,highlightedLine:oe,gutter:M,line:s({verticalAlign:`baseline`,label:`line`,textDecoration:`none`}),lineContent:h,wordDiff:T,wordAdded:E,summary:f,block:j,blockAddition:te,blockDeletion:ne,wordRemoved:D,noSelect:_,noWrap:v,codeFoldGutter:O,codeFoldExpandButton:A,codeFoldContentContainer:k,codeFold:re,emptyGutter:ce,emptyLine:ie,lineNumber:x,contentText:g,content:l,column:s({}),codeFoldContent:ee,stickyHeader:d,columnHeaders:p,titleBlock:b,allExpandButton:y},ue=Object.keys(i).reduce((e,t)=>({...e,[t]:s(i[t])}),{});return Object.keys(le).reduce((e,t)=>({...e,[t]:ue[t]?c(le[t],ue[t]):le[t]}),{})};function Roe(){return(0,P.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 16 16`,width:`16`,height:`16`,children:[(0,P.jsx)(`title`,{children:`fold`}),(0,P.jsx)(`path`,{d:`M10.896 2H8.75V.75a.75.75 0 0 0-1.5 0V2H5.104a.25.25 0 0 0-.177.427l2.896 2.896a.25.25 0 0 0 .354 0l2.896-2.896A.25.25 0 0 0 10.896 2ZM8.75 15.25a.75.75 0 0 1-1.5 0V14H5.104a.25.25 0 0 1-.177-.427l2.896-2.896a.25.25 0 0 1 .354 0l2.896 2.896a.25.25 0 0 1-.177.427H8.75v1.25Zm-6.5-6.5a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM6 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 6 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM12 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 12 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5Z`})]})}function zoe(e,t,n){let r=[],i=0;for(let e of t){let t=typeof e.value==`string`?e.value:``;t.length>0&&(r.push({start:i,end:i+t.length,type:e.type}),i+=t.length)}let a=[],o=0;for(;o<e.length;)if(e[o]===`<`){let t=e.indexOf(`>`,o);if(t===-1){a.push({type:`text`,content:e.slice(o)});break}a.push({type:`tag`,content:e.slice(o,t+1)}),o=t+1}else{let t=e.indexOf(`<`,o);t===-1&&(t=e.length),a.push({type:`text`,content:e.slice(o,t)}),o=t}function s(e){return e.replace(/&lt;/g,`<`).replace(/&gt;/g,`>`).replace(/&amp;/g,`&`).replace(/&quot;/g,`"`).replace(/&#39;/g,`'`).replace(/&nbsp;/g,`\xA0`)}function c(e){return e===Z8.ADDED?{open:`<ins class="${n.wordDiff} ${n.wordAdded}">`,close:`</ins>`}:e===Z8.REMOVED?{open:`<del class="${n.wordDiff} ${n.wordRemoved}">`,close:`</del>`}:{open:`<span class="${n.wordDiff}">`,close:`</span>`}}let l=0,u=``;for(let e of a)if(e.type===`tag`)u+=e.content;else{let t=e.content,n=s(t),i=0,a=0;for(;i<n.length;){let e=l+i,o=r.find(t=>e>=t.start&&e<t.end);if(!o){let e=t[a];u+=e,a++,i++;continue}let s=o.end-e,d=n.length-i,f=Math.min(s,d),p=a,m=0;for(;m<f&&p<t.length;){if(t[p]===`&`){let e=t.indexOf(`;`,p);e!==-1&&e-p<10?p=e+1:p++}else p++;m++}let h=t.slice(a,p),g=c(o.type);g?u+=g.open+h+g.close:u+=h,a=p,i+=f}l+=n.length}return u}var o5;(function(e){e.LEFT=`L`,e.RIGHT=`R`})(o5||={}),class e extends N.Component{styles;wordDiffCache=new Map;contentColumnRef=N.createRef();charMeasureRef=N.createRef();stickyHeaderRef=N.createRef();resizeObserver=null;static defaultProps={oldValue:``,newValue:``,splitView:!0,highlightLines:[],disableWordDiff:!1,compareMethod:t5.CHARS,styles:{},hideLineNumbers:!1,extraLinesSurroundingDiff:3,showDiffOnly:!0,useDarkTheme:!1,linesOffset:0,nonce:``};constructor(e){super(e),this.state={expandedBlocks:[],noSelect:void 0,scrollableContainerRef:N.createRef(),computedDiffResult:{},isLoading:!1,visibleStartRow:0,contentColumnWidth:null,charWidth:null,cumulativeOffsets:null}}getWordDiffValues=(e,t,n)=>{if(!e||!t)return{leftValue:e?.value,rightValue:t?.value};if(e.rawValue===void 0||t.rawValue===void 0)return{leftValue:e.value,rightValue:t.value};let r=`${n}-${e.rawValue}-${t.rawValue}`,i=this.wordDiffCache.get(r);if(!i){let n=this.props.compareMethod===t5.JSON||this.props.compareMethod===t5.YAML?t5.CHARS:this.props.compareMethod,a=r5(e.rawValue,t.rawValue,n);i={left:a.left,right:a.right},this.wordDiffCache.set(r,i)}return{leftValue:i.left,rightValue:i.right}};resetCodeBlocks=()=>this.state.expandedBlocks.length>0?(this.setState({expandedBlocks:[]}),!0):!1;onBlockExpand=e=>{let t=this.state.expandedBlocks.slice();t.push(e),this.setState({expandedBlocks:t},()=>this.recalculateOffsets())};getStickyHeaderHeight(){return this.stickyHeaderRef.current?.offsetHeight||0}measureCharWidth(){let e=this.charMeasureRef.current;return e&&e.getBoundingClientRect().width||7.2}measureContentColumnWidth(){let e=this.contentColumnRef.current;if(e&&e.clientWidth>0){let t=window.getComputedStyle(e),n=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),r=e.clientWidth-n;if(r>0)return r}let t=this.state.scrollableContainerRef.current;if(!t||t.clientWidth<=0)return null;let n=t.clientWidth,r=this.props.hideLineNumbers?0:50;this.props.splitView;let i=this.props.splitView?2:1,a=this.props.splitView?2:1,o=n-(2*r+i*28);return Math.max(100,o/a)}getTextLength(e){return e?typeof e==`string`?e.length:e.reduce((e,t)=>e+(typeof t.value==`string`?t.value.length:0),0):0}buildCumulativeOffsets(t,n,r,i,a,o,s,c){let l=[0],u=new Set;for(let d=0;d<t.length;d++){let f=t[d];if(a){let t=n[d];if(t!==void 0&&!i.includes(t)){let n=r[t].endLine===d;!u.has(t)&&n&&(u.add(t),l.push(l[l.length-1]+e.ESTIMATED_ROW_HEIGHT));continue}}let p=f.left?.value?this.getTextLength(f.left.value):0,m=f.right?.value?this.getTextLength(f.right.value):0,h=c?Math.max(p,m):p||m,g=Math.floor(s/o),_=g>0?Math.max(1,Math.ceil(h/g)):1;l.push(l[l.length-1]+_*e.ESTIMATED_ROW_HEIGHT)}return l}findLineAtOffset(e,t){let n=0,r=t.length-2;for(;n<r;){let i=Math.floor((n+r+1)/2);t[i]<=e?n=i:r=i-1}return n}recalculateOffsets=()=>{if(!this.props.infiniteLoading)return;let e=this.measureContentColumnWidth(),t=this.measureCharWidth();if(!e)return;let n=this.getMemoisedKey(),{lineInformation:r,lineBlocks:i,blocks:a}=this.state.computedDiffResult[n]??{};if(!r)return;let o=this.buildCumulativeOffsets(r,i,a,this.state.expandedBlocks,this.props.showDiffOnly,t,e,this.props.splitView);this.setState({cumulativeOffsets:o,contentColumnWidth:e,charWidth:t},()=>{this.onScroll()})};computeStyles=a3(Loe);onLineNumberClickProxy=e=>this.props.onLineNumberClick?t=>this.props.onLineNumberClick(e,t):()=>{};shouldHighlightWordDiff=()=>{let{compareMethod:e}=this.props;return e===t5.CHARS||e===t5.WORDS||e===t5.WORDS_WITH_SPACE||e===t5.JSON||e===t5.YAML};renderWordDiff=(e,t)=>{let n=this.shouldHighlightWordDiff(),r=e.map(e=>typeof e.value==`string`?e.value:``).join(``);if(r.length>500)return[(0,P.jsx)(`span`,{children:r},`long-line`)];if(t){let i=t(r),a=i?.props?.dangerouslySetInnerHTML?.__html;if(typeof a==`string`){let t=zoe(a,e,{wordDiff:this.styles.wordDiff,wordAdded:n?this.styles.wordAdded:``,wordRemoved:n?this.styles.wordRemoved:``});return[N.cloneElement(i,{key:`highlighted-diff`,dangerouslySetInnerHTML:{__html:t}})]}}return e.map((e,t)=>{let r;return r=typeof e.value==`string`?e.value:void 0,e.type===Z8.ADDED?(0,P.jsx)(`ins`,{className:(0,I.default)(this.styles.wordDiff,{[this.styles.wordAdded]:n}),children:r},t):e.type===Z8.REMOVED?(0,P.jsx)(`del`,{className:(0,I.default)(this.styles.wordDiff,{[this.styles.wordRemoved]:n}),children:r},t):(0,P.jsx)(`span`,{className:(0,I.default)(this.styles.wordDiff),children:r},t)})};renderLine=(e,t,n,r,i,a)=>{let o=`${n}-${e}`,s=`${a}-${i}`,c=this.props.highlightLines.includes(o)||this.props.highlightLines.includes(s),l=t===Z8.ADDED,u=t===Z8.REMOVED,d=t===Z8.CHANGED,f,p=Array.isArray(r);f=p?this.renderWordDiff(r,this.props.renderContent):this.props.renderContent?this.props.renderContent(r):r;let m=`div`;return l&&!p?m=`ins`:u&&!p&&(m=`del`),(0,P.jsxs)(P.Fragment,{children:[!this.props.hideLineNumbers&&(0,P.jsx)(`td`,{onClick:e&&this.onLineNumberClickProxy(o),className:(0,I.default)(this.styles.gutter,{[this.styles.emptyGutter]:!e,[this.styles.diffAdded]:l,[this.styles.diffRemoved]:u,[this.styles.diffChanged]:d,[this.styles.highlightedGutter]:c}),children:(0,P.jsx)(`pre`,{className:this.styles.lineNumber,children:e})}),!this.props.splitView&&!this.props.hideLineNumbers&&(0,P.jsx)(`td`,{onClick:i&&this.onLineNumberClickProxy(s),className:(0,I.default)(this.styles.gutter,{[this.styles.emptyGutter]:!i,[this.styles.diffAdded]:l,[this.styles.diffRemoved]:u,[this.styles.diffChanged]:d,[this.styles.highlightedGutter]:c}),children:(0,P.jsx)(`pre`,{className:this.styles.lineNumber,children:i})}),this.props.renderGutter?this.props.renderGutter({lineNumber:e,type:t,prefix:n,value:r,additionalLineNumber:i,additionalPrefix:a,styles:this.styles}):null,(0,P.jsx)(`td`,{className:(0,I.default)(this.styles.marker,{[this.styles.emptyLine]:!f,[this.styles.diffAdded]:l,[this.styles.diffRemoved]:u,[this.styles.diffChanged]:d,[this.styles.highlightedLine]:c}),children:(0,P.jsxs)(`pre`,{children:[l&&`+`,u&&`-`]})}),(0,P.jsx)(`td`,{ref:n===o5.LEFT&&!this.state.cumulativeOffsets?this.contentColumnRef:void 0,className:(0,I.default)(this.styles.content,{[this.styles.emptyLine]:!f,[this.styles.diffAdded]:l,[this.styles.diffRemoved]:u,[this.styles.diffChanged]:d,[this.styles.highlightedLine]:c,left:n===o5.LEFT,right:n===o5.RIGHT}),onMouseDown:()=>{let e=document.getElementsByClassName(n===o5.LEFT?`right`:`left`);for(let t=0;t<e.length;t++)e.item(t).classList.add(this.styles.noSelect)},title:l&&!p?`Added line`:u&&!p?`Removed line`:void 0,children:(0,P.jsx)(m,{className:this.styles.contentText,children:f})})]})};renderSplitView=({left:e,right:t},n)=>{let{leftValue:r,rightValue:i}=this.getWordDiffValues(e,t,n);return(0,P.jsxs)(`tr`,{className:this.styles.line,children:[this.renderLine(e.lineNumber,e.type,o5.LEFT,r),this.renderLine(t.lineNumber,t.type,o5.RIGHT,i)]},n)};renderInlineView=({left:e,right:t},n)=>{let{leftValue:r,rightValue:i}=this.getWordDiffValues(e,t,n),a;return e.type===Z8.REMOVED&&t.type===Z8.ADDED?(0,P.jsxs)(N.Fragment,{children:[(0,P.jsx)(`tr`,{className:this.styles.line,children:this.renderLine(e.lineNumber,e.type,o5.LEFT,r,null)}),(0,P.jsx)(`tr`,{className:this.styles.line,children:this.renderLine(null,t.type,o5.RIGHT,i,t.lineNumber,o5.RIGHT)})]},n):(e.type===Z8.REMOVED&&(a=this.renderLine(e.lineNumber,e.type,o5.LEFT,r,null)),e.type===Z8.DEFAULT&&(a=this.renderLine(e.lineNumber,e.type,o5.LEFT,r,t.lineNumber,o5.RIGHT)),t.type===Z8.ADDED&&(a=this.renderLine(null,t.type,o5.RIGHT,i,t.lineNumber)),(0,P.jsx)(`tr`,{className:this.styles.line,children:a},n))};onBlockClickProxy=e=>()=>this.onBlockExpand(e);renderSkippedLineIndicator=(e,t,n,r)=>{let{hideLineNumbers:i,splitView:a}=this.props,o=this.props.codeFoldMessageRenderer?this.props.codeFoldMessageRenderer(e,n,r):(0,P.jsxs)(`span`,{className:this.styles.codeFoldContent,children:[`@@ -`,n-e,`,`,e,` +`,r-e,`,`,e,` @@`]}),s=(0,P.jsx)(`td`,{className:this.styles.codeFoldContentContainer,children:(0,P.jsx)(`button`,{type:`button`,className:this.styles.codeFoldExpandButton,onClick:this.onBlockClickProxy(t),tabIndex:0,children:o})}),c=!a&&!i,l=(0,P.jsx)(`td`,{className:this.styles.codeFoldGutter,children:(0,P.jsx)(a5,{})});return(0,P.jsxs)(`tr`,{className:this.styles.codeFold,onClick:this.onBlockClickProxy(t),role:`button`,tabIndex:0,children:[!i&&l,this.props.renderGutter?(0,P.jsx)(`td`,{className:this.styles.codeFoldGutter}):null,(0,P.jsx)(`td`,{className:(0,I.default)({[this.styles.codeFoldGutter]:c})}),c?(0,P.jsxs)(N.Fragment,{children:[(0,P.jsx)(`td`,{}),s]}):(0,P.jsxs)(N.Fragment,{children:[s,this.props.renderGutter?(0,P.jsx)(`td`,{}):null,(0,P.jsx)(`td`,{}),(0,P.jsx)(`td`,{}),i?null:(0,P.jsx)(`td`,{})]})]},`${n}-${r}`)};getMemoisedKey=()=>{let{oldValue:e,newValue:t,disableWordDiff:n,compareMethod:r,linesOffset:i,alwaysShowLines:a,extraLinesSurroundingDiff:o}=this.props;return JSON.stringify({oldValue:e,newValue:t,disableWordDiff:n,compareMethod:r,linesOffset:i,alwaysShowLines:a,extraLinesSurroundingDiff:o})};memoisedCompute=async()=>{let{oldValue:e,newValue:t,disableWordDiff:n,compareMethod:r,linesOffset:i}=this.props,a=this.getMemoisedKey();if(this.state.computedDiffResult[a]){this.setState(e=>({...e,isLoading:!1}));return}let o=this.props.infiniteLoading?.containerHeight,s=o?typeof o==`number`?o:parseInt(o,10)||0:0,c=!n&&!!this.props.infiniteLoading&&s>0&&s<2e3,{lineInformation:l,diffLines:u}=await Ioe(e,t,n,r,i,this.props.alwaysShowLines,c),{lineBlocks:d,blocks:f}=o3(l,u,this.props.extraLinesSurroundingDiff<0?0:Math.round(this.props.extraLinesSurroundingDiff));this.state.computedDiffResult[a]={lineInformation:l,lineBlocks:d,blocks:f},this.setState(e=>({...e,computedDiffResult:this.state.computedDiffResult,isLoading:!1}),()=>{this.props.infiniteLoading&&requestAnimationFrame(()=>this.recalculateOffsets())})};static ESTIMATED_ROW_HEIGHT=19;onScroll=()=>{let t=this.state.scrollableContainerRef.current;if(!t||!this.props.infiniteLoading)return;let n=this.getStickyHeaderHeight(),r=Math.max(0,t.scrollTop-n),{cumulativeOffsets:i}=this.state,a=i?this.findLineAtOffset(r,i):Math.floor(r/e.ESTIMATED_ROW_HEIGHT);a!==this.state.visibleStartRow&&this.setState({visibleStartRow:a})};renderDiff=()=>{let{splitView:t,infiniteLoading:n,showDiffOnly:r}=this.props,{computedDiffResult:i,expandedBlocks:a,visibleStartRow:o,scrollableContainerRef:s,cumulativeOffsets:c}=this.state,{lineInformation:l=[],lineBlocks:u=[],blocks:d=[]}=i[this.getMemoisedKey()]??{},f=0,p=1/0;if(n&&s.current){let t=s.current,n=this.getStickyHeaderHeight(),r=Math.max(0,t.scrollTop-n);if(c){let n=c[c.length-1]||0,i=c.length-2;f=Math.max(0,this.findLineAtOffset(r,c)-5),p=this.findLineAtOffset(r+t.clientHeight,c)+5;let a=Math.ceil(t.clientHeight/e.ESTIMATED_ROW_HEIGHT);p=Math.max(p,f+a+5),r+t.clientHeight>=n-5*e.ESTIMATED_ROW_HEIGHT&&(p=i+5)}else{let n=Math.ceil(t.clientHeight/e.ESTIMATED_ROW_HEIGHT);f=Math.max(0,o-5),p=o+n+5}}let m=new Map,h=new Set,g=0;for(let e=0;e<l.length;e++){let t=u[e];if(r&&t!==void 0)if(a.includes(t))m.set(e,g),g++;else{let n=d[t].endLine===e;!h.has(t)&&n&&(h.add(t),m.set(e,g),g++)}else m.set(e,g),g++}let _=g,v=[],y=0,b=!1,x=-1;h.clear();for(let n=0;n<l.length;n++){let i=l[n],o=m.get(n);if(o!==void 0&&!(o<f)){if(o>p)break;if(b||=(y=c?c[o]||0:o*e.ESTIMATED_ROW_HEIGHT,!0),x=o,r){let e=u[n];if(e!==void 0){let t=d[e].endLine===n;if(!a.includes(e)&&t){v.push((0,P.jsx)(N.Fragment,{children:this.renderSkippedLineIndicator(d[e].lines,e,i.left.lineNumber,i.right.lineNumber)},n));continue}if(!a.includes(e))continue}}v.push(t?this.renderSplitView(i,n):this.renderInlineView(i,n))}}let S=c?c[c.length-1]||0:_*e.ESTIMATED_ROW_HEIGHT,C=c&&x>=0?S-(c[x+1]||S):0;return{diffNodes:v,blocks:d,lineInformation:l,totalRenderedRows:_,topPadding:y,bottomPadding:C,totalContentHeight:S,renderedCount:v.length,debug:{visibleRowStart:f,visibleRowEnd:p,totalRows:_,offsetsLength:c?.length??0,renderedCount:v.length,scrollTop:s.current?.scrollTop??0,headerHeight:this.getStickyHeaderHeight(),contentScrollTop:s.current?Math.max(0,s.current.scrollTop-this.getStickyHeaderHeight()):0,clientHeight:s.current?.clientHeight??0}}};componentDidUpdate(e){if(e.oldValue!==this.props.oldValue||e.newValue!==this.props.newValue||e.compareMethod!==this.props.compareMethod||e.disableWordDiff!==this.props.disableWordDiff||e.linesOffset!==this.props.linesOffset){this.wordDiffCache.clear();let e=this.state.scrollableContainerRef.current;e&&(e.scrollTop=0),this.setState(e=>({...e,isLoading:!0,visibleStartRow:0,cumulativeOffsets:null})),this.memoisedCompute()}}componentDidMount(){if(this.setState(e=>({...e,isLoading:!0})),this.memoisedCompute(),typeof ResizeObserver<`u`&&this.props.infiniteLoading){this.resizeObserver=new ResizeObserver(()=>{requestAnimationFrame(()=>this.recalculateOffsets())});let e=this.state.scrollableContainerRef.current;e&&this.resizeObserver.observe(e)}}componentWillUnmount(){this.resizeObserver?.disconnect()}render=()=>{let{oldValue:e,newValue:t,useDarkTheme:n,leftTitle:r,rightTitle:i,splitView:a,compareMethod:o,hideLineNumbers:s,nonce:c}=this.props;if(typeof o==`string`&&o!==t5.JSON&&(typeof e!=`string`||typeof t!=`string`))throw Error(`"oldValue" and "newValue" should be strings`);this.styles=this.computeStyles(this.props.styles,n,c);let l=this.renderDiff(),u=3,d=4;s&&(--u,--d),this.props.renderGutter&&(u+=1,d+=1);let f=0,p=0;for(let e of l.lineInformation)e.left.type===Z8.ADDED&&p++,e.right.type===Z8.ADDED&&p++,e.left.type===Z8.REMOVED&&f++,e.right.type===Z8.REMOVED&&f++;let m=f+p,h=Math.round(p/m*100),g=[];for(let e=0;e<5;e++)h>e*20?g.push((0,P.jsx)(`span`,{className:(0,I.default)(this.styles.block,this.styles.blockAddition)},e)):g.push((0,P.jsx)(`span`,{className:(0,I.default)(this.styles.block,this.styles.blockDeletion)},e));let _=this.state.expandedBlocks.length===l.blocks.length,v=this.props.loadingElement,y=this.props.infiniteLoading?{overflowY:`scroll`,overflowX:`hidden`,height:this.props.infiniteLoading.containerHeight}:{},b=!!this.props.infiniteLoading&&!this.state.cumulativeOffsets,x=(0,P.jsxs)(`table`,{className:(0,I.default)(this.styles.diffContainer,{[this.styles.splitView]:a,[this.styles.noWrap]:b}),onMouseUp:()=>{let e=document.getElementsByClassName(`right`);for(let t=0;t<e.length;t++)e.item(t).classList.remove(this.styles.noSelect);let t=document.getElementsByClassName(`left`);for(let e=0;e<t.length;e++)t.item(e).classList.remove(this.styles.noSelect)},children:[(0,P.jsxs)(`colgroup`,{children:[!this.props.hideLineNumbers&&(0,P.jsx)(`col`,{width:`50px`}),!a&&!this.props.hideLineNumbers&&(0,P.jsx)(`col`,{width:`50px`}),this.props.renderGutter&&(0,P.jsx)(`col`,{width:`50px`}),(0,P.jsx)(`col`,{width:`28px`}),(0,P.jsx)(`col`,{width:`auto`}),a&&(0,P.jsxs)(P.Fragment,{children:[!this.props.hideLineNumbers&&(0,P.jsx)(`col`,{width:`50px`}),this.props.renderGutter&&(0,P.jsx)(`col`,{width:`50px`}),(0,P.jsx)(`col`,{width:`28px`}),(0,P.jsx)(`col`,{width:`auto`})]})]}),(0,P.jsx)(`tbody`,{children:l.diffNodes})]});return(0,P.jsxs)(`div`,{style:{...y,position:`relative`},onScroll:this.onScroll,ref:this.state.scrollableContainerRef,children:[(!this.props.hideSummary||r||i)&&(0,P.jsxs)(`div`,{ref:this.stickyHeaderRef,className:this.styles.stickyHeader,children:[!this.props.hideSummary&&(0,P.jsxs)(`div`,{className:this.styles.summary,role:`banner`,children:[(0,P.jsx)(`button`,{type:`button`,className:this.styles.allExpandButton,onClick:()=>{this.setState({expandedBlocks:_?[]:l.blocks.map(e=>e.index)},()=>this.recalculateOffsets())},children:_?(0,P.jsx)(Roe,{}):(0,P.jsx)(a5,{})}),` `,m,(0,P.jsx)(`div`,{style:{display:`flex`,gap:`1px`},children:g}),this.props.summary?(0,P.jsx)(`span`,{children:this.props.summary}):null]}),(r||i)&&(0,P.jsxs)(`div`,{className:this.styles.columnHeaders,children:[(0,P.jsx)(`div`,{className:this.styles.titleBlock,children:r?(0,P.jsx)(`pre`,{className:this.styles.contentText,children:r}):null}),a&&(0,P.jsx)(`div`,{className:this.styles.titleBlock,children:i?(0,P.jsx)(`pre`,{className:this.styles.contentText,children:i}):null})]})]}),this.state.isLoading&&v&&(0,P.jsx)(v,{}),this.props.infiniteLoading?(0,P.jsx)(`div`,{style:{height:l.totalContentHeight,position:`relative`},children:(0,P.jsx)(`div`,{style:{position:`absolute`,top:l.topPadding,left:0,right:0},children:x})}):x,(0,P.jsx)(`span`,{ref:this.charMeasureRef,style:{position:`absolute`,top:0,left:`-9999px`,visibility:`hidden`,whiteSpace:`pre`,fontFamily:`monospace`,fontSize:12},"aria-hidden":`true`,children:`M`}),this.props.infiniteLoading&&this.props.showDebugInfo&&(0,P.jsxs)(`div`,{style:{position:`fixed`,top:10,right:10,background:`rgba(0,0,0,0.85)`,color:`#0f0`,padding:`10px`,fontFamily:`monospace`,fontSize:`11px`,zIndex:9999,borderRadius:`4px`,maxWidth:`300px`,lineHeight:1.4},children:[(0,P.jsx)(`div`,{style:{fontWeight:`bold`,marginBottom:`5px`,color:`#fff`},children:`Debug Info`}),(0,P.jsxs)(`div`,{children:[`scrollTop: `,l.debug.scrollTop]}),(0,P.jsxs)(`div`,{children:[`headerHeight: `,l.debug.headerHeight]}),(0,P.jsxs)(`div`,{children:[`contentScrollTop: `,l.debug.contentScrollTop]}),(0,P.jsxs)(`div`,{children:[`clientHeight: `,l.debug.clientHeight]}),(0,P.jsxs)(`div`,{style:{marginTop:`5px`,borderTop:`1px solid #444`,paddingTop:`5px`},children:[(0,P.jsxs)(`div`,{children:[`visibleRowStart: `,l.debug.visibleRowStart]}),(0,P.jsxs)(`div`,{children:[`visibleRowEnd: `,l.debug.visibleRowEnd]})]}),(0,P.jsxs)(`div`,{style:{marginTop:`5px`,borderTop:`1px solid #444`,paddingTop:`5px`},children:[(0,P.jsxs)(`div`,{children:[`totalRows: `,l.debug.totalRows]}),(0,P.jsxs)(`div`,{children:[`offsetsLength: `,l.debug.offsetsLength]}),(0,P.jsxs)(`div`,{children:[`renderedCount: `,l.debug.renderedCount]})]}),(0,P.jsxs)(`div`,{style:{marginTop:`5px`,borderTop:`1px solid #444`,paddingTop:`5px`},children:[(0,P.jsxs)(`div`,{children:[`topPadding: `,l.topPadding.toFixed(0)]}),(0,P.jsxs)(`div`,{children:[`bottomPadding: `,l.bottomPadding.toFixed(0)]}),(0,P.jsxs)(`div`,{children:[`totalContentHeight: `,l.totalContentHeight.toFixed(0)]})]}),(0,P.jsxs)(`div`,{style:{marginTop:`5px`,borderTop:`1px solid #444`,paddingTop:`5px`,color:`#ff0`},children:[(0,P.jsxs)(`div`,{children:[`cumulativeOffsets: `,this.state.cumulativeOffsets?`SET`:`NULL`]}),(0,P.jsxs)(`div`,{children:[`columnWidth: `,this.state.contentColumnWidth?.toFixed(0)??`N/A`,`px`]}),(0,P.jsxs)(`div`,{children:[`charWidth: `,this.state.charWidth?.toFixed(2)??`N/A`,`px`]}),(0,P.jsxs)(`div`,{children:[`charsPerRow: `,this.state.contentColumnWidth&&this.state.charWidth?Math.floor(this.state.contentColumnWidth/this.state.charWidth):`N/A`]})]}),this.state.cumulativeOffsets&&(0,P.jsxs)(`div`,{style:{marginTop:`5px`,borderTop:`1px solid #444`,paddingTop:`5px`,color:`#0ff`,fontSize:`10px`},children:[(0,P.jsxs)(`div`,{children:[`offsets[`,l.debug.visibleRowEnd,`]: `,this.state.cumulativeOffsets[l.debug.visibleRowEnd]?.toFixed(0)??`N/A`]}),(0,P.jsxs)(`div`,{children:[`offsets[`,l.debug.totalRows-1,`]: `,this.state.cumulativeOffsets[l.debug.totalRows-1]?.toFixed(0)??`N/A`]}),(0,P.jsxs)(`div`,{children:[`offsets[`,l.debug.totalRows,`]: `,this.state.cumulativeOffsets[l.debug.totalRows]?.toFixed(0)??`N/A`]}),(0,P.jsxs)(`div`,{style:{marginTop:`3px`},children:[`viewportEnd: `,(l.debug.contentScrollTop+l.debug.clientHeight).toFixed(0)]}),(0,P.jsxs)(`div`,{style:{marginTop:`3px`,color:`#f0f`},children:[`scrollHeight: `,this.state.scrollableContainerRef.current?.scrollHeight??`N/A`]}),(0,P.jsxs)(`div`,{children:[`maxScrollTop: `,(this.state.scrollableContainerRef.current?.scrollHeight??0)-l.debug.clientHeight]})]})]})]})}};var Boe=zm(),s5=i(lv(),1);jv(),Kne();var c5=function(e){return e.TEXT=`Text`,e.BUTTON=`Button`,e.DROP_DOWN_BUTTON=`DropDownButton`,e.COMPONENT=`Component`,e}({}),l5=function(e){return e.FIRST=`first`,e.MIDDLE=`middle`,e.LAST=`last`,e}({}),u5=function(e){return e.DANGER=`danger`,e.RED=`red`,e.WHITE=`white`,e.SUCCESS=`success`,e.GREEN=`green`,e.MUTED=`muted`,e}({}),d5=function(e){return e.LEFT=`left`,e.RIGHT=`right`,e.CENTER=`center`,e}({}),f5=function(e){return e.TOP=`top`,e.BOTTOM=`bottom`,e}({}),p5=function(e){return e.LIBRARY=`library`,e.ADD=`add`,e.DRAG=`drag`,e.HELP=`help`,e.NOTIFICATION=`notification`,e.MENU=`menu`,e.EDIT=`edit`,e.FAST_FORWARD=`fast forward`,e.INDENT=`indent`,e.STAR=`star`,e.LIST=`list`,e.SETTINGS=`settings`,e.CHECK=`check`,e.LOCK=`lock`,e.UNLOCK=`unlock`,e.CLOSE=`close`,e.SUCCESS=`success`,e.WARNING=`warning`,e.ERROR=`error`,e.INFO=`info`,e.LEFT=`left`,e.COLLAPSE=`collapse`,e.EXPAND=`expand`,e.SORT_ASCENDING=`sort ascending`,e.SORT_DESCENDING=`sort descending`,e.FAST_BACKWARD=`fast backward`,e.CHEVRON_DOWN=`chevron down`,e.CHEVRON_RIGHT=`chevron right`,e.CHEVRON_LEFT=`chevron left`,e.CHEVRON_DOUBLE_LEFT=`chevron double left`,e.CHEVRON_DOUBLE_RIGHT=`chevron double right`,e}({}),m5=function(e){return e.UPPERCASE=`uppercase`,e.LOWERCASE=`lowercase`,e.CAPITALIZE=`capitalize`,e.NONE=`none`,e}({}),Voe=function(e){return e.TEXT=`text`,e.RADIO=`radio`,e.CHECKBOX=`checkbox`,e}({}),h5=N.createContext(!1),g5={wrapper:`_wrapper_18jt2_1`,customSvg:`_customSvg_18jt2_8`,customPng:`_customPng_18jt2_11`,clickable:`_clickable_18jt2_16`},Hoe=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%20class='icon%20icon-tabler%20icons-tabler-outline%20icon-tabler-square-minus'%3e%3cpath%20stroke='none'%20d='M0%200h24v24H0z'%20fill='none'/%3e%3cpath%20d='M9%2012h6'%20/%3e%3cpath%20d='M3%205a2%202%200%200%201%202%20-2h14a2%202%200%200%201%202%202v14a2%202%200%200%201%20-2%202h-14a2%202%200%200%201%20-2%20-2v-14'%20/%3e%3c/svg%3e`,Uoe=`data:image/svg+xml,%3csvg%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%204H6C4.89543%204%204%204.89543%204%206V18C4%2019.1046%204.89543%2020%206%2020H18C19.1046%2020%2020%2019.1046%2020%2018V6C20%204.89543%2019.1046%204%2018%204Z'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,Woe=`data:image/svg+xml,%3csvg%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2012H20M12%204V12M18%2020H6C4.89543%2020%204%2019.1046%204%2018V6C4%204.8954%204.89543%204%206%204H18C19.1046%204%2020%204.8954%2020%206V18C20%2019.1046%2019.1046%2020%2018%2020Z'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,Goe=`data:image/svg+xml,%3csvg%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2012H20M12%2020V12M18%204H6C4.89543%204%204%204.89543%204%206V18C4%2019.1046%204.89543%2020%206%2020H18C19.1046%2020%2020%2019.1046%2020%2018V6C20%204.89543%2019.1046%204%2018%204Z'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,Koe=`data:image/svg+xml,%3csvg%20fill='none'%20height='1em'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m12%2020v-16m-8%208h8m8-6v12c0%201.1046-.8954%202-2%202h-12c-1.1046%200-2-.8954-2-2v-12c0-1.1046.8954-2%202-2h12c1.1046%200%202%20.8954%202%202z'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3c/svg%3e`,qoe=`data:image/svg+xml,%3csvg%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12%204L12%2020M20%2012H12M4%2018L4%206C4%204.89543%204.89543%204%206%204L18%204C19.1046%204%2020%204.89543%2020%206V18C20%2019.1046%2019.1046%2020%2018%2020H6C4.89543%2020%204%2019.1046%204%2018Z'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,Joe=`data:image/svg+xml,%3csvg%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6%204C4.89543%204%204%204.89543%204%206V18C4%2019.1046%204.89543%2020%206%2020H18C19.1046%2020%2020%2019.1046%2020%2018V6C20%204.89543%2019.1046%204%2018%204M6%204H18M6%204H12M18%204H12M4%2012H20M12%204V20'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,Yoe=({icon:e})=>{switch(e){case`add`:case`plus`:return(0,P.jsx)(nl,{});case`add above`:return(0,P.jsx)(cl,{});case`add below`:return(0,P.jsx)(sl,{});case`arrow down`:case`down`:return(0,P.jsx)(As,{});case`arrow left`:case`left`:return(0,P.jsx)(js,{});case`arrow right`:case`right`:return(0,P.jsx)(Ms,{});case`arrow up`:case`up`:return(0,P.jsx)(Ns,{});case`bold`:return(0,P.jsx)(Bs,{});case`book`:case`library`:return(0,P.jsx)(Hs,{});case`camera`:return(0,P.jsx)(Ws,{});case`close`:case`clear`:case`times`:return(0,P.jsx)(Tl,{});case`chart`:case`chart line`:return(0,P.jsx)(Ks,{});case`chart bar`:return(0,P.jsx)(Gs,{});case`chart pie`:return(0,P.jsx)(qs,{});case`chat`:return(0,P.jsx)(Uc,{});case`check`:case`checkmark`:return(0,P.jsx)(Js,{});case`chevron up`:return(0,P.jsx)(Qs,{});case`chevron down`:return(0,P.jsx)(Ys,{});case`chevron left`:return(0,P.jsx)(Xs,{});case`chevron right`:return(0,P.jsx)(Zs,{});case`chevron double left`:return(0,P.jsx)($s,{});case`chevron double right`:return(0,P.jsx)(ec,{});case`clock`:return(0,P.jsx)(ac,{});case`clone`:case`copy`:case`duplicate`:return(0,P.jsx)(sc,{});case`code`:return(0,P.jsx)(oc,{});case`collapse`:return(0,P.jsx)(hs,{src:Hoe});case`collapse all`:return(0,P.jsx)(Nc,{});case`company`:return(0,P.jsx)(Us,{});case`compare`:return(0,P.jsx)(ul,{});case`delete`:case`trash`:return(0,P.jsx)(xl,{});case`depth`:return(0,P.jsx)(ll,{style:{transform:`rotate(-90deg)`}});case`download`:case`import`:return(0,P.jsx)(fc,{});case`drag`:return(0,P.jsx)(Ec,{});case`edit`:case`pencil`:case`rename`:return(0,P.jsx)(Jc,{});case`electricity`:return(0,P.jsx)(Vs,{});case`error`:return(0,P.jsx)(nc,{});case`exclamation`:return(0,P.jsx)(mc,{});case`expand`:return(0,P.jsx)(gl,{});case`expand all`:return(0,P.jsx)(Pc,{});case`external`:return(0,P.jsx)(hc,{});case`fast forward`:return(0,P.jsx)(el,{});case`fast backward`:return(0,P.jsx)(tl,{});case`file`:return(0,P.jsx)(vc,{});case`filter`:return(0,P.jsx)(bc,{});case`focus`:return(0,P.jsx)(xc,{});case`folder`:return(0,P.jsx)(Cc,{});case`folder search`:return(0,P.jsx)(Sc,{});case`fork`:return(0,P.jsx)(Tc,{});case`gauge`:return(0,P.jsx)(wc,{});case`help`:return(0,P.jsx)(Dc,{});case`hide`:return(0,P.jsx)(gc,{});case`indent`:return(0,P.jsx)(cc,{});case`info`:return(0,P.jsx)(Oc,{});case`italic`:return(0,P.jsx)(kc,{});case`key`:return(0,P.jsx)(Ac,{});case`laptop`:return(0,P.jsx)(uc,{});case`layout columns`:case`columns`:return(0,P.jsx)(jc,{});case`layout grid`:case`grid`:return(0,P.jsx)(hs,{src:Joe});case`layout rows`:case`rows`:return(0,P.jsx)(Mc,{});case`layout single`:case`square`:return(0,P.jsx)(hs,{src:Uoe});case`layout 3 split top`:return(0,P.jsx)(hs,{src:Woe});case`layout 3 split bottom`:return(0,P.jsx)(hs,{src:Goe});case`layout 3 split left`:return(0,P.jsx)(hs,{src:Koe});case`layout 3 split right`:return(0,P.jsx)(hs,{src:qoe});case`link`:return(0,P.jsx)(Ic,{});case`list`:case`legend`:case`ul`:return(0,P.jsx)(Rc,{});case`list numbers`:case`ol`:return(0,P.jsx)(Lc,{});case`location`:return(0,P.jsx)(Hc,{});case`lock`:return(0,P.jsx)(Vc,{});case`maximize`:return(0,P.jsx)(Fs,{});case`menu`:return(0,P.jsx)(dc,{});case`minimize`:return(0,P.jsx)(Is,{});case`minus`:return(0,P.jsx)(Wc,{});case`moon`:return(0,P.jsx)(Gc,{});case`move`:return(0,P.jsx)(Ls,{});case`note`:return(0,P.jsx)(qc,{});case`notification`:case`bell`:return(0,P.jsx)(zs,{});case`paste`:return(0,P.jsx)(ic,{});case`pause`:return(0,P.jsx)(Yc,{});case`play`:return(0,P.jsx)(Xc,{});case`question`:return(0,P.jsx)(rl,{});case`redo`:case`rotate`:case`rotate right`:return(0,P.jsx)(al,{});case`refresh`:case`sync`:return(0,P.jsx)(il,{});case`save`:return(0,P.jsx)(lc,{});case`scale`:return(0,P.jsx)(Ps,{});case`search`:return(0,P.jsx)(dl,{});case`server`:return(0,P.jsx)(fl,{});case`settings`:return(0,P.jsx)(pl,{});case`show`:case`eye`:return(0,P.jsx)(_c,{});case`sort`:case`sort descending`:case`sort down`:case`sort amount down`:return(0,P.jsx)(hl,{});case`sort ascending`:case`sort up`:case`sort amount up`:return(0,P.jsx)(ml,{});case`spinner`:return(0,P.jsx)(zc,{});case`split`:return(0,P.jsx)(Rs,{});case`star`:return(0,P.jsx)(_l,{});case`step backward`:return(0,P.jsx)(Zc,{});case`step forward`:return(0,P.jsx)(Qc,{});case`stop`:return(0,P.jsx)($c,{});case`success`:return(0,P.jsx)(tc,{});case`sun`:return(0,P.jsx)(vl,{});case`table`:return(0,P.jsx)(yl,{});case`target`:return(0,P.jsx)(bl,{});case`undo`:case`rotate left`:return(0,P.jsx)(ol,{});case`unfilter`:return(0,P.jsx)(yc,{});case`unlink`:return(0,P.jsx)(Fc,{});case`unlock`:return(0,P.jsx)(Bc,{});case`upload`:case`export`:return(0,P.jsx)(Sl,{});case`user`:return(0,P.jsx)(Cl,{});case`users`:case`group`:return(0,P.jsx)(wl,{});case`video`:return(0,P.jsx)(Kc,{});case`warning`:case`alert`:return(0,P.jsx)(ks,{});case`water`:case`droplet`:return(0,P.jsx)(pc,{});case``:return null;default:return(0,P.jsx)(rc,{})}},_5=({icon:e,onClick:t,clickable:n=!1,color:r,size:i,testId:a})=>{let o=(0,N.useContext)(h5),s={color:r,fill:r,fontSize:i||`inherit`,width:i||`auto`,height:i||`auto`};return(0,P.jsx)(`div`,{className:(0,I.default)(g5.wrapper,(n||t)&&!o?g5.clickable:``),style:s,onClick:e=>t&&!o?t(e):void 0,"data-testid":a,children:(0,N.isValidElement)(e)?e:typeof e==`string`&&(e.includes(`.svg`)||e.includes(`image/svg`))?(0,P.jsx)(hs,{className:g5.customSvg,beforeInjection:e=>{i&&(e.setAttribute(`width`,String(i)),e.setAttribute(`height`,String(i)))},src:e}):typeof e==`string`&&(e.includes(`.png`)||e.includes(`image/png`))?(0,P.jsx)(`img`,{alt:`icon`,className:g5.customPng,src:e}):typeof e==`string`?(0,P.jsx)(Yoe,{icon:e}):null})},v5={collapse:`_collapse_1m1n2_5`,enter:`_enter_1m1n2_9`,enterActive:`_enterActive_1m1n2_12`,exit:`_exit_1m1n2_15`,exitActive:`_exitActive_1m1n2_18`,collapseInner:`_collapseInner_1m1n2_21`},y5=({children:e,expanded:t})=>{let n=(0,N.useRef)(null);return(0,P.jsx)(Ul,{nodeRef:n,in:t,timeout:100,classNames:{enter:v5.enter,enterActive:v5.enterActive,exit:v5.exit,exitActive:v5.exitActive},unmountOnExit:!0,children:(0,P.jsx)(`div`,{ref:n,className:v5.collapse,children:(0,P.jsx)(`div`,{className:v5.collapseInner,children:(0,P.jsx)(`div`,{children:t&&e})})})})},b5={checkbox:`_checkbox_oo4mp_1`,noLabel:`_noLabel_oo4mp_17`,small:`_small_oo4mp_20`,checkmark:`_checkmark_oo4mp_43`,disabled:`_disabled_oo4mp_82`,noMargin:`_noMargin_oo4mp_96`,isInTable:`_isInTable_oo4mp_99`,helpIconEnabled:`_helpIconEnabled_oo4mp_102`},x5={tooltip:`_tooltip_wli9z_1`,error:`_error_wli9z_15`,warning:`_warning_wli9z_19`},Xoe=({text:e=``,error:t=!1,warning:n=!1,maxWidth:r=`none`,fontSize:i=`inherit`,padding:a=`var(--padding-xxs) var(--padding-xs)`,layerProps:o={style:{position:`fixed`}},arrowProps:s={style:{top:`100%`,bottom:void 0,left:`50%`,right:void 0,position:`absolute`}}})=>(0,P.jsxs)(`div`,{className:(0,I.default)(x5.tooltip,t?x5.error:n?x5.warning:``),...o,children:[(0,P.jsx)(`div`,{style:{maxWidth:r,fontSize:i,padding:a},children:e}),(0,P.jsx)(id,{...s,size:6})]}),S5=({children:e,text:t=``,error:n=!1,placement:r=`top-center`,possiblePlacements:i=[`top-center`,`left-center`,`bottom-center`,`right-center`],enabled:a=!0,warning:o=!1,maxWidth:s=`40em`,triggerOffset:c=12,fontSize:l=`inherit`,padding:u=`var(--padding-xxs) var(--padding-xs)`,display:d=`inline`,flex:f=`none`,forceOpen:p=!1})=>{let m=a&&((0,N.isValidElement)(t)||typeof t==`string`&&t.length>0||typeof t==`number`),[h,g,_]=od({delayEnter:100,delayLeave:0}),v=m?p?!0:h:!1,{renderLayer:y,triggerProps:b,layerProps:x,arrowProps:S}=Gu({isOpen:v,overflowContainer:!0,ResizeObserver:nu,auto:!0,triggerOffset:c,placement:r,possiblePlacements:i,onParentClose:_});return(0,P.jsxs)(P.Fragment,{children:[v&&y((0,P.jsx)(Xoe,{text:t,error:n,warning:o,padding:u,maxWidth:s,fontSize:l,layerProps:x,arrowProps:S})),(0,P.jsx)(`span`,{...b,...g,style:{display:d,flex:f},onClick:()=>_(),children:e})]})},C5={helpIcon:`_helpIcon_hd0z2_1`,active:`_active_hd0z2_9`,clickable:`_clickable_hd0z2_12`},Zoe=({children:e,text:t,maxWidth:n})=>t?(0,P.jsx)(S5,{text:t,display:`inline-flex`,maxWidth:n,children:e}):(0,P.jsx)(P.Fragment,{children:e}),w5=({text:e,onClick:t,icon:n=`help`,active:r=!1,maxWidth:i=`300px`,testId:a})=>(0,P.jsx)(`div`,{className:(0,I.default)(C5.helpIcon,t?C5.clickable:``,r?C5.active:``),onClick:e=>{t&&(e.stopPropagation(),t())},"data-testid":a,children:(0,P.jsx)(Zoe,{text:e,maxWidth:i,children:(0,P.jsx)(_5,{icon:n})})}),T5=({noMargin:e=!1,dataix:t=0,isInTable:n=!1,tabIndex:r=0,checked:i=!1,indeterminate:a=!1,name:o,label:s=``,disabled:c=!1,small:l=!1,onChange:u,testId:d,value:f,helpText:p,onClickHelp:m,textTransform:h=m5.CAPITALIZE})=>{let g=(0,N.useContext)(h5),_=p||m,v=c||g,y=(0,N.useRef)(null);return(0,N.useEffect)(()=>{y.current&&(y.current.indeterminate=a)},[a]),(0,P.jsxs)(`div`,{className:(0,I.default)(b5.checkbox,e&&b5.noMargin,n&&b5.isInTable,v&&b5.disabled,l&&b5.small,!s&&b5.noLabel),"data-ix":t,onClick:e=>{if(!v){let t=e.target;t.name=o,t.checked=!i,u({...e,target:{...t,value:t.checked}})}},"data-testid":d,children:[(0,P.jsx)(`input`,{ref:y,type:`checkbox`,tabIndex:r,checked:i,name:o,onChange:()=>{},disabled:v,"data-indeterminate":a}),(0,P.jsxs)(`label`,{htmlFor:o,style:{textTransform:h},children:[(0,P.jsx)(`span`,{className:b5.checkmark,children:(0,P.jsx)(_5,{icon:p5.CHECK})}),s]}),_&&(0,P.jsx)(`div`,{className:b5.helpIconEnabled,onClick:m,children:(0,P.jsx)(w5,{text:p})})]})},E5={inputInTable:`_inputInTable_1vpoe_1`,inputHover:`_inputHover_1vpoe_13`,inputFocus:`_inputFocus_1vpoe_18`,inputError:`_inputError_1vpoe_25`,inputWarning:`_inputWarning_1vpoe_26`,inputDisabled:`_inputDisabled_1vpoe_61`,hideScrollbars:`_hideScrollbars_1vpoe_67`,button:`_button_1vpoe_100`,active:`_active_1vpoe_135`,green:`_green_1vpoe_135`,red:`_red_1vpoe_135`,orange:`_orange_1vpoe_135`,icon:`_icon_1vpoe_147`,iconOnly:`_iconOnly_1vpoe_153`,basic:`_basic_1vpoe_163`,muted:`_muted_1vpoe_169`,disabled:`_disabled_1vpoe_188`,small:`_small_1vpoe_197`,pill:`_pill_1vpoe_202`,round:`_round_1vpoe_203`,inverted:`_inverted_1vpoe_309`,groupOrderFirst:`_groupOrderFirst_1vpoe_339`,groupOrderMiddle:`_groupOrderMiddle_1vpoe_340`,groupOrderLast:`_groupOrderLast_1vpoe_341`},Qoe={spinner:`_spinner_156m4_1`},$oe=({small:e=!1,colored:t=!1,dark:n=!1,tiny:r=!1})=>{let i=t?`var(--color-text-primary)`:n?`var(--color-text-muted)`:`white`,a=e?`var(--font-size)`:r?`var(--font-size-xs)`:`var(--size)`;return(0,P.jsx)(`div`,{className:Qoe.spinner,style:{color:i,fontSize:a}})},D5=function(e){return e.SUBMIT=`submit`,e.BUTTON=`button`,e.RESET=`reset`,e}({}),ese=({children:e,tooltip:t=null})=>t?(0,P.jsx)(S5,{text:t,display:`inline-flex`,children:e}):(0,P.jsx)(P.Fragment,{children:e}),O5=({active:e=!1,basic:t=!1,colored:n=!1,disabled:r=!1,ignoreDisabledContext:i=!1,groupOrder:a,icon:o=null,label:s=``,loading:c=!1,name:l,pill:u=!1,round:d=!1,small:f=!1,styles:p=``,width:m=``,title:h=``,type:g=D5.BUTTON,onClick:_=()=>{},error:v,warning:y,testId:b,tooltip:x,inverted:S=!1,component:C=`button`,url:w,tabIndex:T})=>{let E=(0,N.useContext)(h5),D=(()=>{if(n)switch(n){case u5.DANGER:case u5.RED:return E5.red;case u5.SUCCESS:case u5.GREEN:return E5.green;case u5.MUTED:return E5.muted;default:return E5.orange}return``})(),O=(()=>{if(a)switch(a){case l5.FIRST:return E5.groupOrderFirst;case l5.LAST:return E5.groupOrderLast;default:return E5.groupOrderMiddle}return``})(),k=r||E&&!i;return(0,P.jsx)(ese,{tooltip:x,children:(0,P.jsxs)(C,{type:g===D5.SUBMIT?D5.SUBMIT:D5.BUTTON,className:(0,I.default)(E5.button,e?E5.active:``,t?E5.basic:``,D,k?E5.disabled:``,(o||c)&&!s?E5.iconOnly:``,S?E5.inverted:``,O,u?E5.pill:``,d?E5.round:``,f?E5.small:``,p),disabled:k,name:l??``,onClick:_,...h?{title:h}:{},style:{width:m},"data-error":v||null,"data-warning":y||null,"data-testid":b,to:w,tabIndex:T,children:[o&&(0,P.jsx)(`span`,{className:E5.icon,children:(0,P.jsx)(_5,{icon:o})}),c&&(0,P.jsx)(`span`,{className:E5.icon,children:(0,P.jsx)($oe,{small:!f,tiny:f,dark:!n&&!t,colored:t})}),s]})})},k5={actions:`_actions_1t7vd_1`,childComponent:`_childComponent_1t7vd_11`,actionComponentContainer:`_actionComponentContainer_1t7vd_14`,active:`_active_1t7vd_36`},A5={wrapper:`_wrapper_15ymr_1`,layer:`_layer_15ymr_5`,layerContainer:`_layerContainer_15ymr_8`,enter:`_enter_15ymr_24`,enterActive:`_enterActive_15ymr_28`,nested:`_nested_15ymr_33`,fileInput:`_fileInput_15ymr_54`,trigger:`_trigger_15ymr_59`,middleAlignedInline:`_middleAlignedInline_15ymr_68`,heading:`_heading_15ymr_74`,headingIcon:`_headingIcon_15ymr_80`,clickable:`_clickable_15ymr_87`,option:`_option_15ymr_91`,active:`_active_15ymr_110`,disabled:`_disabled_15ymr_115`,selected:`_selected_15ymr_119`,optionContent:`_optionContent_15ymr_126`,inline:`_inline_15ymr_130`,icon:`_icon_15ymr_135`,check:`_check_15ymr_136`,text:`_text_15ymr_162`,label:`_label_15ymr_167`,description:`_description_15ymr_178`,arrow:`_arrow_15ymr_182`,divider:`_divider_15ymr_186`,deprecatedSemanticIcon:`_deprecatedSemanticIcon_15ymr_190`,buttonLabel:`_buttonLabel_15ymr_198`,buttonCaret:`_buttonCaret_15ymr_204`,component:`_component_15ymr_208`,right:`_right_15ymr_214`,actions:`_actions_15ymr_219`},tse=({label:e,onClick:t,icon:n,testId:r})=>(0,P.jsxs)(`div`,{onClick:e=>e.stopPropagation(),className:A5.heading,"data-testid":r,children:[e,!!n&&(0,P.jsx)(`span`,{className:(0,I.default)(A5.headingIcon,t?A5.clickable:``),onClick:t,children:(0,P.jsx)(_5,{icon:n})})]}),nse=()=>(0,P.jsx)(`hr`,{className:A5.divider}),rse=({actions:e,label:t,url:n,onClick:r,description:i,icon:a,selected:o,closeOnOptionClick:s,close:c,disabled:l,inline:u,title:d,upload:f,uploadType:p,onChange:m=gd,testId:h,component:g=`a`})=>{let _=e=>{if(e.stopPropagation(),l){e.preventDefault();return}f||(s&&c?.(),r?.(e))},v=e=>{let{files:t}=e?.target??{};if(t){let n={...e,target:{...e.target,value:t,name:e.target.name,files:t}};m?.(n),c?.()}};return(0,P.jsxs)(g,{href:n,to:n,className:(0,I.default)(A5.option,l?A5.disabled:``,u?A5.inline:``,o?A5?.selected:``),onClick:_,"data-testid":h,children:[a?(0,P.jsx)(`span`,{className:A5.icon,children:(0,P.jsx)(_5,{icon:a})}):null,(0,P.jsxs)(`div`,{className:A5.optionContent,children:[f&&(0,P.jsx)(`input`,{type:`file`,accept:p,className:A5.fileInput,onChange:v}),(0,P.jsx)(`span`,{className:A5.label,title:`${d||t}`,children:t}),(0,P.jsx)(`span`,{className:A5.description,children:i})]}),(0,P.jsxs)(`div`,{className:A5.right,children:[o&&(0,P.jsx)(`span`,{className:A5.check,children:(0,P.jsx)(_5,{icon:p5.CHECK})}),!!e?.length&&(0,P.jsx)(`div`,{className:A5.actions,children:(0,P.jsx)(H5,{actions:e})})]})]})},j5=function(e){return e.HEADING=`Heading`,e.DIVIDER=`Divider`,e.OPTION=`Option`,e.MENU=`Menu`,e}({}),M5=function(e){return e.FALSE=`false`,e.RIGHT=`right`,e.DOWN=`down`,e}({}),ise=({section:e,closeOnOptionClick:t,close:n,tree:r,path:i,maxHeight:a})=>{let o=(0,N.useContext)(h5);switch(e.type){case j5.HEADING:return(0,P.jsx)(tse,{label:e?.label??``,onClick:e.onClick,icon:e.icon,testId:e.testId});case j5.DIVIDER:return(0,P.jsx)(nse,{});case j5.OPTION:return(0,P.jsx)(rse,{actions:e?.actions,label:e?.label??``,url:e?.url,onClick:e?.onClick,description:e?.description,icon:e?.icon,selected:e?.selected,closeOnOptionClick:t,close:n,disabled:e?.disabled||o,inline:e?.inline,title:e?.title,upload:e?.upload,uploadType:e?.uploadType,onChange:e?.onChange,testId:e?.testId,component:e?.component});case j5.MENU:let s=!!e?.menu?.sections?.find(e=>e?.selected);return(0,P.jsx)(B5,{menu:e.menu,selected:s,title:e.title,closeOnOptionClick:t,isNested:!0,closeParent:n,tree:r,path:i,maxHeight:a,testId:e.testId});default:return null}},ase=e=>e.includes(`[`)?e.substr(0,e.lastIndexOf(`[`)):e,ose=(e,t)=>`${e}.sections[${t}]`.replace(/^\./,``),sse=e=>`${e}.close`.replace(/^\./,``),cse=(e,t)=>Je(e,ase(t),[]),lse=(e,t,n)=>u(e,sse(t),n),N5=({sections:e,isNested:t,width:n,closeOnOptionClick:r,close:i=()=>{},tree:a,path:o,maxHeight:s,showAllButton:c,testId:l})=>{if((0,N.isValidElement)(e))return(0,P.jsx)(P.Fragment,{children:e});let[u,d]=(0,N.useState)(!c?.visible),f=e,p=c?.additionalSections?.map(e=>({...e,closeOnOptionClick:r,visible:!0}))??[],m=f.length>4?[{type:j5.OPTION,label:u?c?.showLessTitle||`Show less`:c?.showAllTitle||`Show all`,onClick:()=>d(!u),visible:!0,closeOnOptionClick:!1}]:[],h=c?.visible?f.map((e,t)=>u||t<=3?{...e,visible:!0,closeOnOptionClick:r}:e).concat(m,p).filter(e=>e?.visible):f.map(e=>({...e,closeOnOptionClick:r}));return(0,P.jsx)(`div`,{className:(0,I.default)(A5.layer,t?A5.nested:null),style:{maxWidth:n,maxHeight:s},"data-testid":l,children:(0,P.jsx)(`ul`,{children:h.map((e,t)=>(0,P.jsx)(`li`,{children:(0,P.jsx)(ise,{section:e,closeOnOptionClick:e.closeOnOptionClick,close:i,tree:a,path:ose(o,t),maxHeight:s})},t))})})},P5=(e,t=!1)=>({auto:!0,preferX:`right`,preferY:`bottom`,placement:e||(t?`right-start`:`bottom-start`)}),F5=e=>dd(e)||hd(e)||(0,N.isValidElement)(e),use=e=>Array.isArray(e)?`array`:typeof e,I5={wrapper:`_wrapper_nwprz_1`,badge:`_badge_nwprz_5`,label:`_label_nwprz_11`,dark:`_dark_nwprz_23`,light:`_light_nwprz_26`,small:`_small_nwprz_29`,dot:`_dot_nwprz_33`,hasChildren:`_hasChildren_nwprz_39`},dse=e=>{let t=e.substring(1),n=parseInt(t,16),r=n>>16&255,i=n>>8&255,a=n>>0&255;return .2126*r+.7152*i+.0722*a<128},L5=({children:e,color:t=``,title:n=null,dot:r=!1,margin:i=null,small:a=!1})=>{let o=!(n===null&&r===!1);return(0,P.jsxs)(`div`,{className:I5.wrapper,children:[o&&(0,P.jsx)(`sup`,{className:(0,I.default)(I5.badge,dse(t)?I5.dark:I5.light,n===null?I5.dot:I5.label,a?I5.small:``,e?I5.hasChildren:``),style:{background:t||void 0,margin:i||void 0},children:n}),e]})},fse=({trigger:e,label:t,colored:n,small:r,width:i,disabled:a,groupOrder:o,loading:s,error:c,warning:l,active:u,tabIndex:d})=>{let f=(0,N.useContext)(h5),p=e===c5.BUTTON?t:e===c5.DROP_DOWN_BUTTON?(0,P.jsxs)(`span`,{className:A5.middleAlignedInline,children:[(0,P.jsx)(`span`,{className:A5.buttonLabel,children:t}),(0,P.jsx)(`span`,{className:A5.buttonCaret,children:(0,P.jsx)(_5,{icon:p5.CHEVRON_DOWN})})]}):null;return(0,P.jsx)(`div`,{className:(0,I.default)(A5.trigger,a||f?A5.disabled:null),style:{width:i},children:(0,P.jsx)(O5,{label:p,colored:n,small:r,width:i,groupOrder:o,onClick:()=>{},loading:s,disabled:a,error:c,warning:l,active:u,tabIndex:d})})},pse=({label:e,title:t,carat:n,disabled:r,isOpen:i,selected:a})=>{let o;return t?o=t:(typeof e==`string`||typeof e==`number`)&&(o=String(e)),(0,P.jsxs)(`div`,{className:(0,I.default)(A5.trigger,r?A5.disabled:null,i?A5.active:null,a?A5?.selected:null),children:[(0,P.jsx)(`span`,{className:A5.label,title:o,children:e}),n&&n===M5.RIGHT?(0,P.jsx)(`span`,{className:A5.arrow,children:(0,P.jsx)(_5,{icon:p5.CHEVRON_RIGHT})}):n&&n===M5.DOWN?(0,P.jsx)(`span`,{className:A5.arrow,children:(0,P.jsx)(_5,{icon:p5.CHEVRON_DOWN})}):null]})},mse=({component:e,disabled:t,testId:n})=>(0,P.jsx)(`div`,{className:(0,I.default)(A5.component,t?A5.disabled:null),"data-testid":n,children:e}),hse=({tooltip:e,error:t,warning:n,children:r})=>!F5(e)&&!F5(t)&&!F5(n)?(0,P.jsx)(P.Fragment,{children:r}):(0,P.jsx)(S5,{error:!!t,warning:!!n,text:e||t||n,display:`inline-flex`,children:r}),R5=N.forwardRef(({active:e,isDisabled:t,badgeTitle:n,badgeDot:r,loading:i,width:a,trigger:o,label:s,title:c,onClickTrigger:l,colored:u,small:d,isNested:f,contextMenu:p,component:m,groupOrder:h,fullHeight:g,isOpen:_,error:v,warning:y,tooltip:b,testId:x,selected:S,tabIndex:C,...w},T)=>{let E=o===c5.BUTTON||o===c5.DROP_DOWN_BUTTON?(0,P.jsx)(fse,{trigger:o,label:s??``,colored:u,small:d,width:a,disabled:t,groupOrder:h,loading:i,error:v,warning:y,active:_||e,tabIndex:C}):o===c5.TEXT?(0,P.jsx)(pse,{label:s??``,title:c,disabled:t,carat:p?void 0:f?M5.RIGHT:M5.DOWN,isOpen:_,selected:S}):o===c5.COMPONENT?(0,P.jsx)(mse,{component:m,disabled:t}):null,D=!f&&(n||r)?(0,P.jsx)(L5,{title:n,dot:r,small:!r,children:E}):E;return(0,P.jsx)(`div`,{ref:T,className:A5.wrapper,style:a?{width:a}:{...g&&{height:`100%`,display:`flex`}},onClick:e=>{e.stopPropagation(),e.preventDefault(),l()},"data-error":v||null,"data-warning":y||null,"data-testid":x,children:(0,P.jsx)(hse,{tooltip:b,error:v,warning:y,children:D})})}),z5=e=>{let{sections:t}=e;return!(0,N.isValidElement)(t)&&(!Array.isArray(t)||t.every(e=>Ee(e)))},gse=({sections:e,width:t,placement:n,possiblePlacements:r,closeOnOptionClick:i,closeParent:a,tree:o,path:s,groupOrder:c,overflowContainer:l,maxHeight:u,testId:d})=>{let{hasMousePosition:f,resetMousePosition:p,handleMouseEvent:m,trigger:h}=Cte(),g=p,_=f,{layerProps:v,renderLayer:y}=Gu({isOpen:_,trigger:h,...P5(n),possiblePlacements:r,ResizeObserver:nu,onOutsideClick:g,overflowContainer:l});return[_&&y((0,P.jsx)(`div`,{...v,children:(0,P.jsx)(N5,{isNested:!1,width:t,sections:e,closeOnOptionClick:i,close:a||g,tree:o,path:s,maxHeight:u,testId:d&&`${d}-layer`})})),m]},_se=({menu:e,width:t,disabled:n=!1,closeOnOptionClick:r=!0,closeParent:i,tree:a,path:o,groupOrder:s,testId:c})=>{let l=(0,N.useContext)(h5),{label:u,trigger:d,fullHeightTrigger:f,colored:p,small:m,component:h,placement:g,possiblePlacements:_=[`bottom-start`,`top-start`]}=e,[v,y]=gse({sections:e.sections,width:t,placement:g,possiblePlacements:_,closeOnOptionClick:r,closeParent:i,tree:a,path:o,groupOrder:s,overflowContainer:!0,maxHeight:void 0,testId:c}),b=n||z5(e)||l;return(0,P.jsxs)(`div`,{onContextMenu:y,"data-testid":c,children:[(0,P.jsx)(R5,{width:t,fullHeight:f,isDisabled:b,trigger:d,label:u,onClickTrigger:()=>{},colored:p,small:m,isNested:!0,component:h,contextMenu:!0,groupOrder:s}),v]})},B5=({menu:e,width:t,disabled:n=!1,badgeTitle:r,badgeDot:i=!1,loading:a=!1,isNested:o=!1,closeOnOptionClick:s=!0,closeParent:c,tree:l,path:u,groupOrder:d,overflowContainer:f=!0,maxHeight:p,testId:m,open:h,setOpen:g,tooltip:_,error:v,warning:y,selected:b,tabIndex:x,active:S})=>{let C=(0,N.useContext)(h5),w=(0,N.useRef)(null),{label:T,title:E,trigger:D,fullHeightTrigger:O,colored:k,small:A,sections:ee,component:j,placement:te,showAllButton:ne,possiblePlacements:re=[`bottom-start`,`top-start`]}=e,[ie,ae]=vd(h)&&_d(g)?[h,g]:(0,N.useState)(!1),oe=()=>ae(!1),se=()=>ae(!0),{triggerProps:M,layerProps:ce,renderLayer:le}=Gu({isOpen:ie,...P5(te,o),possiblePlacements:re,ResizeObserver:nu,onOutsideClick:oe,overflowContainer:f,onParentClose:oe}),ue=n||z5(e)||C;return lse(l,u,oe),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(R5,{ref:M.ref,isDisabled:ue,badgeTitle:r,badgeDot:i,loading:a,width:t,fullHeight:O,trigger:D,label:T,title:E,onClickTrigger:()=>{if(!ue){if(ie){oe();return}cse(l,u).forEach(e=>{e.close&&e.close()}),se()}},colored:k,small:A,isNested:o,component:j,groupOrder:d,isOpen:ie,active:S,tooltip:_,error:v,warning:y,testId:m,selected:b,tabIndex:x}),(0,P.jsx)(Ul,{nodeRef:w,in:ie,timeout:100,classNames:{enter:A5.enter,enterActive:A5.enterActive},unmountOnExit:!0,children:(0,P.jsx)(P.Fragment,{children:ie&&le((0,P.jsx)(`div`,{...ce,ref:e=>{w.current=e,ce.ref(e)},className:A5.layerContainer,"data-testid":e.testId,onClick:e=>e.stopPropagation(),children:(0,P.jsx)(N5,{sections:ee,isNested:o,width:t,closeOnOptionClick:s,close:c||oe,tree:l,path:u,maxHeight:p,showAllButton:ne,testId:m&&`${m}-layer`})}))})})]})},V5=e=>e.contextMenu?(0,P.jsx)(_se,{...e,tree:{},path:``,testId:e.testId}):(0,P.jsx)(B5,{...e,tree:{},path:``,testId:e.testId}),vse=e=>{let{subActions:t,subMenuIcon:n,primary:r,testId:i,tooltip:a}=e,o=(0,P.jsx)(O5,{colored:r?!0:u5.MUTED,basic:!r,round:!0,small:!0,icon:n||p5.MENU,testId:i,tooltip:a});return t.length?(0,P.jsx)(V5,{menu:{trigger:c5.COMPONENT,component:o,sections:t.map(e=>({type:e.type??`Option`,label:e.label,icon:e.icon,testId:e.testId,disabled:e.disabled,menu:e.menu,onClick:t=>{t.stopPropagation(),t.preventDefault(),_d(e.onClick)&&e.onClick(t)}}))}}):null},H5=e=>{let t=(0,N.useContext)(h5),{actions:n=[],closeLayer:r}=e;return(0,P.jsx)(`div`,{className:(0,I.default)(k5.actions),children:n.map((e,n)=>{if(!(e?.hidden||!e||!Object.keys(e).length))return e.childComponent&&N.isValidElement(e.childComponent)?(0,P.jsx)(`div`,{"data-testid":e.testId,className:k5.childComponent,children:e.childComponent},n):e.subActions?(0,P.jsx)(vse,{subActions:e.subActions,primary:e.primary,subMenuIcon:e.icon,testId:e.testId,tooltip:e.tooltip},n):(0,P.jsx)(O5,{colored:e.primary?!0:`muted`,round:!0,basic:!e.primary,disabled:e.disabled,small:!0,name:String(e.label),icon:e.icon?e.icon:null,onClick:n=>{r&&r(),n.stopPropagation(),n.preventDefault(),!(e.disabled||t)&&_d(e.onClick)&&e.onClick(n)},testId:e.testId,tooltip:e.tooltip},n)})})},U5={label:`_label_iu2wi_1`,buttonGroup:`_buttonGroup_iu2wi_11`},yse=e=>{let{basic:t=!1,items:n=[],header:r=``,onSelected:i=()=>{},small:a=!1,value:o=``,testId:s=void 0,disabled:c}=e,l=(0,N.useContext)(h5),u=(e,t,n,r,a)=>{e.preventDefault(),e.stopPropagation(),!(c||a||l)&&i(t,n,r)},d=(e,t)=>t===`string`?e:t===`object`?e.label:t===`array`?e[1]:null,f=(e,t)=>t===`string`?e:t===`object`?e.value??``:t===`array`?e[0]??``:``,p=(e,t,n)=>t===`object`&&`key`in e?e.key:n,m=(e,t)=>t===`object`?e.hidden:!1,h=(e,t)=>t===`object`?e.icon:void 0,g=(e,t,n)=>e===`object`?String(t)===String(o):n===o,_=()=>{if(r)return(0,P.jsx)(`label`,{className:U5.label,children:r})},v=()=>n.map((e,r)=>{let i=use(e),o=r===0?l5.FIRST:r===n.length-1?l5.LAST:l5.MIDDLE,s=d(e,i),l=f(e,i),_=p(e,i,l),v=m(e,i),y=h(e,i),b=g(i,_,l),{error:x,maxTooltipWidth:S,testId:C,tooltip:w,warning:T}=e;return v?null:(0,P.jsx)(S5,{error:!!x,warning:!!T,text:w||x||T,maxWidth:S,display:`block`,enabled:w&&F5(w)||x&&F5(x)||T&&F5(T)||!1,children:(0,P.jsx)(O5,{active:b,basic:t,disabled:c||e.disabled,groupOrder:o,icon:y,label:s,onClick:t=>{u(t,_,l,typeof s==`string`?s:``,e.disabled||!1)},small:a,testId:C})},r)});return(0,P.jsx)(`div`,{children:(0,P.jsxs)(`div`,{children:[_(),(0,P.jsx)(`div`,{className:U5.buttonGroup,"data-testid":s,children:v()})]})})},bse=Sm`
246
- scrollbar-width: none;
247
- -ms-overflow-style: none;
248
- &::-webkit-scrollbar {
249
- display: none;
250
- }
251
- `;Tm.div`
252
- position: relative; // for react-laag
253
- display: flex;
254
- flex-direction: column;
255
- min-width: 0;
256
- flex-basis: ${e=>e.$width||`auto`};
257
- flex-grow: ${e=>!e.$width&&e.$flex?`1`:`0`};
258
- flex-shrink: ${e=>e.$width||!e.$flex?`0`:`1`};
259
- overflow: ${e=>e.$scroll?`auto`:`initial`};
260
- background: ${e=>e.$background};
261
- border-left: ${e=>e.$borderLeft===!0?`1px solid var(--color-border)`:e.$borderLeft};
262
- border-right: ${e=>e.$borderRight===!0?`1px solid var(--color-border)`:e.$borderRight};
263
- padding: ${e=>e.$spacing?`0 calc(${e.$spacing} / 2)`:`0`};
264
- ${e=>!e.$showScrollbar&&bse}
265
-
266
- @media (max-width: 992px) {
267
- ${e=>e.$widthTablet&&`flex-basis: ${e.$widthTablet};`}
268
- }
269
-
270
- @media (max-width: 575px) {
271
- ${e=>e.$widthMobile&&`flex-basis: ${e.$widthMobile};`}
272
- }
273
-
274
- > .inner {
275
- flex-basis: 100%;
276
- position: relative;
277
- z-index: 0;
278
- min-height: 0;
279
- display: ${e=>e.$flexbox&&!e.$scroll?`flex`:`block`};
280
- ${e=>e.$flexbox&&`flex-direction: column;`}
281
- padding: ${e=>e.$padding===!0?`var(--padding)`:e.$padding};
282
- }
283
- `;var W5={divider:`_divider_2bfzh_1`,alignLeft:`_alignLeft_2bfzh_12`,alignRight:`_alignRight_2bfzh_15`},G5={bold:`_bold_11ofj_1`,center:`_center_11ofj_4`,muted:`_muted_11ofj_7`,faint:`_faint_11ofj_10`,success:`_success_11ofj_13`,warning:`_warning_11ofj_16`,error:`_error_11ofj_19`,small:`_small_11ofj_22`,link:`_link_11ofj_25`},K5=({children:e,bold:t=!1,center:n=!1,error:r=!1,faint:i=!1,link:a=!1,muted:o=!1,onClick:s,small:c=!1,success:l=!1,warning:u=!1})=>(0,P.jsx)(`span`,{className:(0,I.default)(t&&G5.bold,n&&G5.center,r&&G5.error,i&&G5.faint,a&&G5.link,o&&G5.muted,s&&G5.clickable,c&&G5.small,l&&G5.success,u&&G5.warning),onClick:s,children:e}),xse=e=>{switch(e){case d5.LEFT:return W5.alignLeft;case d5.RIGHT:return W5.alignRight;default:return``}},Sse=({children:e,margin:t=`var(--padding)`,color:n=`var(--color-border)`,align:r=d5.CENTER})=>(0,P.jsx)(`div`,{className:`${W5.divider} ${xse(r)}`,style:{marginTop:t,marginBottom:t,"--color":n},children:typeof e==`string`?(0,P.jsx)(K5,{muted:!0,children:e}):e}),q5={heading:`_heading_yhdiy_1`,top:`_top_yhdiy_10`,icons:`_icons_yhdiy_20`},J5=({children:e,helpText:t,onClick:n,onClickHelp:r,onIconClick:i,icon:a,libraryIcon:o,marginBottom:s,top:c=!1,testId:l})=>{let u=!!t||!!r;return(0,P.jsxs)(`div`,{className:(0,I.default)(q5.heading,c?q5.top:``),style:{marginBottom:s},onClick:n,"data-testid":l,children:[e,(0,P.jsxs)(`div`,{className:q5.icons,children:[a&&(0,P.jsx)(w5,{onClick:i,icon:a}),u&&(0,P.jsx)(w5,{text:t,onClick:r}),o&&(0,P.jsx)(w5,{text:o?.tooltip??``,onClick:o.onClick,icon:p5.LIBRARY})]})]})},Y5={inputInTable:`_inputInTable_c4h57_1`,inputHover:`_inputHover_c4h57_13`,inputFocus:`_inputFocus_c4h57_18`,inputError:`_inputError_c4h57_25`,inputWarning:`_inputWarning_c4h57_26`,inputDisabled:`_inputDisabled_c4h57_61`,hideScrollbars:`_hideScrollbars_c4h57_67`,inline:`_inline_c4h57_90`,left:`_left_c4h57_93`,right:`_right_c4h57_96`,fixed:`_fixed_c4h57_99`,border:`_border_c4h57_111`,shadow:`_shadow_c4h57_117`,drawerContent:`_drawerContent_c4h57_120`,isResizing:`_isResizing_c4h57_134`,toggleButton:`_toggleButton_c4h57_145`,top:`_top_c4h57_158`,bottom:`_bottom_c4h57_161`,toggleButtonOpen:`_toggleButtonOpen_c4h57_164`,tabs:`_tabs_c4h57_167`,tab:`_tab_c4h57_167`,active:`_active_c4h57_199`,disabled:`_disabled_c4h57_224`,tabsContent:`_tabsContent_c4h57_231`,resizeHandle:`_resizeHandle_c4h57_237`},Cse=({badge:e,children:t})=>e?(0,P.jsx)(L5,{small:!0,margin:4,title:e.toString(),children:t}):(0,P.jsx)(P.Fragment,{children:t}),wse=({tabs:e,activeTab:t,open:n,background:r,handleTabClick:i,width:a,testId:o})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`div`,{className:Y5.tabs,children:e.map((e,a)=>we(e)||Ee(e)?null:(0,P.jsx)(`div`,{className:(0,I.default)(Y5.tab,t===a&&n?Y5.active:``,e.disabled?Y5.disabled:``),style:{background:r},onClick:e.disabled?void 0:()=>i(a),"data-testid":o&&`${o}-icon-${a}`,children:(0,P.jsx)(Cse,{badge:e.badge,children:e.icon})},a))}),e.map((e,r)=>{if(we(e)||Ee(e))return null;let i=t===r;return(0,P.jsx)(`div`,{style:{width:typeof a==`number`?`${a}px`:a,display:i?`block`:`none`},className:Y5.tabsContent,"data-testid":o&&`${o}-content-${r}`,children:i&&n&&e.content},r)})]}),Tse=(0,N.forwardRef)((e,t)=>{let{handleAxis:n,...r}=e;return(0,P.jsx)(`div`,{ref:t,className:Y5.resizeHandle,...r,children:(0,P.jsx)(_5,{icon:p5.DRAG})})}),Ese=Boe.Resizable,Dse=({children:e=null,width:t=400,right:n=!1,onResize:r,setOpen:i,maxOpenWidth:a})=>{let[o,s]=(0,N.useState)(!1),c=a??window.innerWidth/2;return r?(0,P.jsx)(Ese,{width:ld(t),height:100,minConstraints:[35,1/0],maxConstraints:[c,1/0],onResize:(e,{size:t})=>{r&&r(t.width)},handle:(0,P.jsx)(Tse,{}),resizeHandles:n?[`w`]:[`e`],axis:`x`,className:o?Y5.isResizing:``,onResizeStart:()=>{i&&i(!0),r&&r(t),s(!0)},onResizeStop:()=>{s(!1),typeof t==`number`&&t<85&&i&&i(!1)},children:e}):(0,P.jsx)(P.Fragment,{children:e})},X5=({background:e=`var(--color-background-raised)`,fixed:t=!1,open:n=!1,setOpen:r,right:i=!1,width:a=400,closedWidth:o=0,shadow:s=!1,top:c=0,button:l=null,buttonAnimate:u=!0,buttonPosition:d=f5.BOTTOM,border:f=!1,children:p=null,tabs:m,defaultTabIndex:h=0,activeTab:g,setActiveTab:_,testId:v,onResize:y,getActiveTab:b,onClose:x,onOpen:S,maxOpenWidth:C})=>{let w=l===!0,T=!w&&(0,N.isValidElement)(l),[E,D]=r?[n,r]:w||m?(0,N.useState)(n):[n,()=>{}],[O,k]=(0,N.useState)(h),A=r?n:E,ee=r||D,j=_===void 0?O:g,te=_||k,ne=Array.isArray(a)?a[j||0]:a,re=A?ne:m?35:o;return(0,P.jsx)(Dse,{width:re,onResize:y,setOpen:ee,right:i,maxOpenWidth:C,children:(0,P.jsxs)(`div`,{className:(0,I.default)(Y5.drawer,s?Y5.shadow:``,t?Y5.fixed:Y5.inline,i?Y5.right:Y5.left),style:{top:c},children:[(0,P.jsx)(`div`,{className:(0,I.default)(Y5.drawerContent,f&&Y5.border),style:{background:e,borderColor:typeof f==`string`?f:void 0,width:re},children:m?(0,P.jsx)(wse,{width:ne,testId:v,tabs:m,open:A,activeTab:j||0,background:e,handleTabClick:e=>{let t=t=>{m&&t&&t(m[e])};j===e&&A&&ee?(t(x),ee(!1)):!A&&ee&&(t(S),ee(!0),y&&(e=>{let t;if(t=Array.isArray(e)?e[j||0]:e,typeof t==`number`&&t<240)y(240);else if(typeof t==`string`){let e=parseInt(t,10);!isNaN(e)&&e<240&&y(240)}})(a)),te(e),t(b)}}):(0,P.jsx)(`div`,{style:{width:ne},children:p})}),l&&(0,P.jsx)(`span`,{className:(0,I.default)(Y5.toggleButton,E&&(w||T&&u)?Y5.toggleButtonOpen:``,d===`top`?Y5.top:Y5.bottom),children:T?l:(0,P.jsx)(O5,{onClick:ee?()=>ee(!A):void 0,round:!0,icon:i?p5.CHEVRON_RIGHT:p5.CHEVRON_LEFT})})]})})},Ose={inputGroup:`_inputGroup_biuoa_1`},kse=e=>(0,N.isValidElement)(e)&&typeof e.type==`string`,Z5=({children:e,small:t=!1,width:n=`100%`})=>{let r=Array.isArray(e)?e.filter(e=>(0,N.isValidElement)(e)):[e],i=r.map((e,n)=>{let i=kse(e),{groupOrder:a}=i?{groupOrder:null}:e.props,o=r.length,s=n===0,c=n===o-1,l=a||(!o||o===1?null:s?l5.FIRST:c?l5.LAST:l5.MIDDLE);return i?e:(0,P.jsx)(N.Fragment,{children:N.cloneElement(e,{groupOrder:l,small:t})},n)});return(0,P.jsx)(`div`,{className:(0,I.default)(Ose.inputGroup),style:{width:n},children:i})},Q5={inputInTable:`_inputInTable_1285q_1`,inputHover:`_inputHover_1285q_13`,inputFocus:`_inputFocus_1285q_18`,inputError:`_inputError_1285q_25`,inputWarning:`_inputWarning_1285q_26`,inputDisabled:`_inputDisabled_1285q_61`,hideScrollbars:`_hideScrollbars_1285q_67`,input:`_input_1285q_1`,isInTable:`_isInTable_1285q_100`,small:`_small_1285q_124`,right:`_right_1285q_170`,groupOrderFirst:`_groupOrderFirst_1285q_173`,groupOrderMiddle:`_groupOrderMiddle_1285q_174`,groupOrderLast:`_groupOrderLast_1285q_175`},$5=(0,N.forwardRef)(({error:e=null,tooltip:t=null,isInTable:n,width:r=void 0,small:i=!1,onChange:a=gd,placeholder:o=``,value:s=``,onKeyPress:c=()=>{},onFocus:l=()=>{},onBlur:u=()=>{},onPaste:d=()=>{},onKeyDown:f=()=>{},selectOnFocus:p=!0,name:m=void 0,type:h=`text`,tabIndex:g=0,disabled:_=!1,right:v=!1,warning:y=null,groupOrder:b=null,maxTooltipWidth:x=void 0,testId:S=void 0,size:C=null},w)=>{let T=(0,N.useContext)(h5),E=(()=>{if(b)switch(b){case l5.FIRST:return Q5.groupOrderFirst;case l5.LAST:return Q5.groupOrderLast;default:return Q5.groupOrderMiddle}return``})(),D=r||(C?`auto`:`100%`);return(0,P.jsx)(`div`,{style:{width:D},className:E,children:(0,P.jsx)(S5,{error:!!e,warning:!!y,text:t||e||y,enabled:t&&F5(t)||e&&F5(e)||y&&F5(y)||!1,maxWidth:x,display:`block`,children:(0,P.jsx)(`input`,{ref:w,type:h||`text`,size:C||20,placeholder:o??``,value:s??``,onChange:a,onKeyPress:c,onKeyDown:f,onFocus:e=>{l(e),p&&setTimeout(()=>{e.target===document.activeElement&&e.target.select()},0)},onBlur:u,onPaste:d,name:m,tabIndex:g,autoComplete:`off`,disabled:_||T,className:(0,I.default)(Q5.input,v?Q5.right:``,i?Q5.small:``,n?Q5.isInTable:``),style:{width:D},"data-error":e||null,"data-warning":y||null,"data-testid":S})})})}),Ase=({height:e=`var(--padding)`,width:t=null,flex:n=!1})=>(0,P.jsx)(`div`,{style:{height:e,width:t||`auto`,flexGrow:n?1:0,flexShrink:0,display:t?`inline-block`:`block`}}),jse=({id:e,children:t})=>{let n=document.querySelector(`#${e}`),[r,i]=(0,N.useState)(!1);return(0,N.useLayoutEffect)(()=>{r||i(!0)},[e]),n?(0,Nl.createPortal)(t,n):null},e7={inputInTable:`_inputInTable_1okhq_1`,inputHover:`_inputHover_1okhq_13`,inputFocus:`_inputFocus_1okhq_18`,inputError:`_inputError_1okhq_25`,inputWarning:`_inputWarning_1okhq_26`,inputDisabled:`_inputDisabled_1okhq_61`,hideScrollbars:`_hideScrollbars_1okhq_67`,container:`_container_1okhq_83`,block:`_block_1okhq_101`,info:`_info_1okhq_104`,success:`_success_1okhq_108`,warning:`_warning_1okhq_112`,error:`_error_1okhq_116`,content:`_content_1okhq_120`,heading:`_heading_1okhq_124`,icon:`_icon_1okhq_131`,dismiss:`_dismiss_1okhq_139`,absolute:`_absolute_1okhq_143`,legendToggle:`_legendToggle_1okhq_155`,detailsText:`_detailsText_1okhq_165`,footer:`_footer_1okhq_169`},t7=function(e){return e.INFO=`Info`,e.SUCCESS=`Success`,e.WARNING=`Warning`,e.ERROR=`Error`,e}({}),n7=function(e){return e.TOGGLE_DETAILS=`TOGGLE_DETAILS`,e}({}),Mse=({type:e,onClose:t,isInToast:n,testId:r})=>(0,P.jsx)(`div`,{className:(0,I.default)(e7.dismiss,n?e7.absolute:``,e===t7.INFO?e7.info:e===t7.SUCCESS?e7.success:e===t7.WARNING?e7.warning:e===t7.ERROR?e7.error:null),children:(0,P.jsx)(_5,{icon:p5.CLOSE,onClick:t,testId:r})}),Nse=(e,t)=>{switch(t.type){case n7.TOGGLE_DETAILS:return{...e,detailsVisible:!e.detailsVisible};default:return e}},Pse=({details:e,visible:t,dispatch:n})=>(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`div`,{className:(0,I.default)(e7.legendToggle),onClick:n,children:t?`Hide details`:`Show details`}),(0,P.jsx)(y5,{expanded:t,children:(0,P.jsx)(`div`,{className:e7.detailsText,children:e})})]}),Fse=({type:e})=>{switch(e){case t7.SUCCESS:return(0,P.jsx)(_5,{icon:p5.SUCCESS,size:16});case t7.WARNING:return(0,P.jsx)(_5,{icon:p5.WARNING,size:16});case t7.ERROR:return(0,P.jsx)(_5,{icon:p5.ERROR,size:16});default:return(0,P.jsx)(_5,{icon:p5.INFO,size:16})}},Ise=({message:e})=>{let{visible:t,type:n=t7.INFO,icon:r,heading:i,content:a,details:o,detailsVisible:s=!1,footer:c,withDismiss:l,onClose:u,width:d,maxHeight:f}=e,[p,m]=(0,N.useReducer)(Nse,{detailsVisible:s});return(0,P.jsx)(P.Fragment,{children:t?(0,P.jsxs)(`div`,{className:(0,I.default)(e7.container,d?e7.block:null,n===t7.SUCCESS?e7.success:n===t7.WARNING?e7.warning:n===t7.ERROR?e7.error:e7.info),style:{width:d,maxHeight:f},children:[(0,P.jsx)(`div`,{children:r?(0,P.jsx)(`div`,{className:e7.icon,children:(0,P.jsx)(Fse,{type:n})}):null}),(0,P.jsxs)(`div`,{className:e7.content,children:[i?(0,P.jsx)(`div`,{className:e7.heading,children:i}):null,(0,P.jsx)(`div`,{children:a}),o?(0,P.jsx)(Pse,{details:o,visible:p.detailsVisible,dispatch:()=>m({type:n7.TOGGLE_DETAILS})}):null,!!c&&(0,P.jsx)(`div`,{className:e7.footer,children:c})]}),l?(0,P.jsx)(Mse,{type:n,onClose:u}):null]}):null})},r7={inputInTable:`_inputInTable_1d3yn_1`,inputHover:`_inputHover_1d3yn_13`,inputFocus:`_inputFocus_1d3yn_18`,inputError:`_inputError_1d3yn_25`,inputWarning:`_inputWarning_1d3yn_26`,inputDisabled:`_inputDisabled_1d3yn_61`,hideScrollbars:`_hideScrollbars_1d3yn_67`,wrapper:`_wrapper_1d3yn_85`,bordered:`_bordered_1d3yn_93`,scroll:`_scroll_1d3yn_98`,table:`_table_1d3yn_109`,dragOverlay:`_dragOverlay_1d3yn_145`,virtualScroll:`_virtualScroll_1d3yn_180`,striped:`_striped_1d3yn_200`},Lse={title:`_title_zn5s7_1`},Rse=({name:e=null,actions:t=null,actionsRight:n=!1,testId:r})=>{let i=e!==null,a=t!==null;if(!i&&!a)return null;let o=()=>{if(!a)return null;let e=(0,P.jsx)(H5,{actions:t});return n?e:(0,P.jsx)(`div`,{children:e})};return(0,P.jsxs)(`div`,{className:Lse.title,children:[i?(0,P.jsx)(J5,{children:(0,P.jsx)(`span`,{"data-testid":r,children:e})}):null,o()]})},i7={footer:`_footer_4sumy_1`,section:`_section_4sumy_7`},a7={inputInTable:`_inputInTable_sl2b5_1`,inputHover:`_inputHover_sl2b5_13`,inputFocus:`_inputFocus_sl2b5_18`,inputError:`_inputError_sl2b5_25`,inputWarning:`_inputWarning_sl2b5_26`,inputDisabled:`_inputDisabled_sl2b5_61`,hideScrollbars:`_hideScrollbars_sl2b5_67`,select:`_select_sl2b5_77`,isInTable:`_isInTable_sl2b5_121`,unSelected:`_unSelected_sl2b5_133`,small:`_small_sl2b5_174`,right:`_right_sl2b5_182`,groupOrderFirst:`_groupOrderFirst_sl2b5_193`,groupOrderMiddle:`_groupOrderMiddle_sl2b5_194`,groupOrderLast:`_groupOrderLast_sl2b5_198`},zse=({disabled:e=!1,error:t=null,warning:n=null,tooltip:r=null,options:i,onChange:a=gd,onFocus:o=gd,onBlur:s=gd,right:c=!1,small:l=!1,tabIndex:u=0,selectedOption:d,width:f=null,groupOrder:p,testId:m,isInTable:h=!1,clearable:g,placeholder:_,hasNonExistentValue:v,maxTooltipWidth:y,borderRadius:b})=>{let x=(0,N.useContext)(h5),S=d===null||d?.value===null?`unselected`:d?.value,C=S===`unselected`,w=(S===`unselected`||g?[(0,P.jsx)(`option`,{value:`unselected`,disabled:!g,hidden:!g,children:_||`Select...`},`unselected`)]:[]).concat(v?[(0,P.jsx)(`option`,{value:d?.value,disabled:e||x,children:d?.label},`selectedNonExistentValue`)]:[]).concat(i.map((e,t)=>(0,P.jsx)(`option`,{value:e.value,"data-testid":e.testId,children:e.label},t))),T=(()=>{if(p)switch(p){case l5.FIRST:return a7.groupOrderFirst;case l5.LAST:return a7.groupOrderLast;default:return a7.groupOrderMiddle}return``})();return(0,P.jsx)(S5,{error:!!t,warning:!!n,text:r||t||n,enabled:r&&F5(r)||t&&F5(t)||n&&F5(n)||!1,maxWidth:y,children:(0,P.jsx)(`select`,{className:(0,I.default)(a7.select,C?a7.unSelected:``,c?a7.right:``,l?a7.small:``,h?a7.isInTable:``,T),style:{width:f||``,borderRadius:b||``},onChange:e=>{let{value:t}=e.target,n;n=t===`unselected`?{value:null}:i.find(e=>String(e.value)===String(t))||{value:null},a(e,n)},onFocus:o,onBlur:s,tabIndex:u,value:S,disabled:e||x,"data-error":t||null,"data-warning":n||null,"data-testid":m,children:w})})},o7=()=>{let e=(0,N.useRef)(null);return[e,()=>{e.current&&e.current.focus()}]},s7=()=>{let[e,t]=(0,N.useState)(!1),n=(0,N.useRef)(!0);return(0,N.useEffect)(()=>()=>{n.current=!1},[]),(0,N.useEffect)(()=>{(async()=>{document.fonts&&await document.fonts.ready.then(()=>{n.current&&t(!0)})})()},[]),e},c7={layerContainer:`_layerContainer_q5iac_1`,layer:`_layer_q5iac_1`,enter:`_enter_q5iac_14`,enterActive:`_enterActive_q5iac_18`,small:`_small_q5iac_32`,heading:`_heading_q5iac_35`,option:`_option_q5iac_36`,message:`_message_q5iac_37`,focused:`_focused_q5iac_76`,selected:`_selected_q5iac_80`,disabled:`_disabled_q5iac_83`,check:`_check_q5iac_87`,optionContent:`_optionContent_q5iac_104`,label:`_label_q5iac_109`,icon:`_icon_q5iac_116`,details:`_details_q5iac_121`},Bse=({label:e})=>(0,P.jsx)(`div`,{onClick:e=>e.stopPropagation(),className:c7.heading,children:e}),Vse=({details:e,label:t,icon:n,disabled:r=!1,selected:i=!1,focused:a=!1,onSelectOption:o,actions:s,closeLayer:c,testId:l})=>(0,P.jsxs)(`div`,{className:(0,I.default)(c7.option,r?c7.disabled:``,i?c7?.selected:``,a?c7.focused:``),onClick:!r&&o?o:void 0,"data-testid":l,children:[(0,P.jsx)(`div`,{className:c7.optionContent,children:(0,P.jsxs)(`span`,{className:c7.label,title:t,children:[t,n&&(0,P.jsx)(`span`,{className:c7.icon,children:n})]})}),e&&(0,P.jsx)(`div`,{className:(0,I.default)(c7.details),children:(0,P.jsx)(K5,{faint:!0,children:e})}),!!s?.length&&(0,P.jsx)(`div`,{className:(0,I.default)(c7.actions),children:(0,P.jsx)(H5,{actions:s,closeLayer:c})}),(0,P.jsx)(`span`,{className:c7.check,children:i?(0,P.jsx)(_5,{icon:p5.CHECK}):null})]}),Hse=({section:e,selected:t,focused:n,onSelectOption:r,closeLayer:i})=>{let a=(0,N.useContext)(h5);switch(e.type){case j5.HEADING:return(0,P.jsx)(Bse,{label:e.label});case j5.OPTION:default:return(0,P.jsx)(Vse,{closeLayer:i,actions:e.actions,label:e.label,details:e.details,icon:e.icon,disabled:e.disabled||a,selected:t,focused:n,onSelectOption:r,testId:e.testId})}},l7=(e,t)=>{let n=document.createElement(`canvas`).getContext(`2d`);return n?(n.font=t,n.measureText(e).width):0},u7=`13px`,d7=`12px`,Use=`Roobert`,Wse=`sans-serif`,f7=(e=!1,t=!1)=>`${e?d7:u7} ${t?Use:Wse}`,Gse=(e=!1,t=!1)=>(e?8:12)+(e?24:30)+(t?17:0),p7=(e,t,n,r)=>{let i=f7(t,n),a=r?l7(r,i):0;return Math.ceil(e.reduce((e,n)=>{let r=(n?.actions?.length??0)*24,a=n.icon?(t?parseInt(d7):parseInt(u7))+7:0,o=l7(`${n.label} ${n.details||``}`,i)+r+a;return e=o>e?o:e,e},a))+Gse(t,!0)},Kse=(e,t,n)=>{let r=f7(!0,n),i=l7(e.label,r),a=(t?3:5)*2+2+2;return Math.ceil(i+a)},qse=nh,Jse=({listRef:e,isMulti:t,sections:n,selectedOptions:r,onSelectOption:i,focusedOptionIndex:a,width:o,small:s,firstSelectedOptionIndex:c,closeLayer:l,testId:u})=>{(0,N.useEffect)(()=>{c!=null&&e.current!==null&&typeof e.current.scrollToItem==`function`&&e.current.scrollToItem(c,`start`)},[c,e]);let d=s?24:30;return(0,P.jsx)(`div`,{"data-testid":u,className:(0,I.default)(c7.layer,s&&c7.small),children:n.length?(0,P.jsx)(qse,{ref:e,height:n.length<10?d*n.length:d*10,itemCount:n.length,itemSize:d,width:o,children:({index:e,style:o})=>(0,P.jsx)(`div`,{style:o,children:(0,P.jsx)(Hse,{closeLayer:l,section:n[e],selected:t&&n[e].type!==j5.HEADING&&Array.isArray(r)?r?.some(t=>t&&t?.value===n?.[e]?.value):!Array.isArray(r)&&n?.[e]?.value===r?.value,focused:a===e,onSelectOption:t=>i(t,n[e])})})}):(0,P.jsx)(`ul`,{children:(0,P.jsx)(`li`,{children:(0,P.jsx)(`div`,{className:c7.message,style:{width:o},children:`No matches`})})})})},m7={inputInTable:`_inputInTable_7uwhv_1`,inputHover:`_inputHover_7uwhv_13`,inputFocus:`_inputFocus_7uwhv_18`,inputError:`_inputError_7uwhv_25`,inputWarning:`_inputWarning_7uwhv_26`,inputDisabled:`_inputDisabled_7uwhv_61`,hideScrollbars:`_hideScrollbars_7uwhv_67`,trigger:`_trigger_7uwhv_77`,isInTable:`_isInTable_7uwhv_93`,input:`_input_7uwhv_1`,isOpen:`_isOpen_7uwhv_114`,disabled:`_disabled_7uwhv_156`,icons:`_icons_7uwhv_162`,clearAll:`_clearAll_7uwhv_169`,iconOpen:`_iconOpen_7uwhv_170`,small:`_small_7uwhv_181`,triggerInputContainer:`_triggerInputContainer_7uwhv_189`,right:`_right_7uwhv_198`,multiOptions:`_multiOptions_7uwhv_211`,multiOption:`_multiOption_7uwhv_211`,label:`_label_7uwhv_239`,closeMultiOption:`_closeMultiOption_7uwhv_242`,focus:`_focus_7uwhv_253`,selectedSingleValue:`_selectedSingleValue_7uwhv_257`,placeHolder:`_placeHolder_7uwhv_258`,groupOrderFirst:`_groupOrderFirst_7uwhv_297`,groupOrderMiddle:`_groupOrderMiddle_7uwhv_298`,groupOrderLast:`_groupOrderLast_7uwhv_302`,detailedLabel:`_detailedLabel_7uwhv_307`},Yse=({selectedOptions:e,small:t,width:n,testId:r})=>{let i=s7(),[a,o]=(0,N.useState)([]),[s,c]=(0,N.useState)([]);return(0,N.useEffect)(()=>{let r=[],a=[],s=0;e.forEach((o,c)=>{s+=Kse(o,t,i),c===e.length-1&&s<n||s<n-24?r.push(o):a.push(o)}),o(r),c(a)},[e,i,n]),(0,P.jsxs)(`div`,{className:m7.multiOptions,"data-testid":r&&`${r}-value`,children:[a.filter(e=>e&&e.label).map((e,t)=>(0,P.jsx)(`span`,{className:m7.multiOption,onClick:e=>{e.stopPropagation()},children:e.label},t)),s.length>0&&(0,P.jsx)(S5,{text:s.map((e,t)=>(0,P.jsx)(`div`,{children:e.label},t)),display:`inline-flex`,children:(0,P.jsx)(`span`,{className:m7.multiOption,children:a.length?`+${s.length}`:`${s.length} items`})})]})},Xse=({selectedOptions:e,searchable:t=!1,searchValue:n,onChange:r=gd,inputRef:i,error:a,placeholder:o=`Select...`,small:s,testId:c})=>{let l=(0,N.useRef)(null),u=Array.isArray(e),d=u?e.length>0:!!e,f=n?n.length+1:1;return(0,P.jsxs)(`div`,{className:m7.triggerInputContainer,ref:l,children:[d?u?(0,P.jsx)(Yse,{selectedOptions:e,small:s,width:(l.current?.offsetWidth||0)-(i.current?.offsetWidth||0),testId:c}):(0,P.jsx)(`span`,{className:m7.selectedSingleValue,"data-testid":c&&`${c}-value`,children:n?.length?``:e?.label}):(0,P.jsx)(`span`,{className:m7.placeHolder,children:n?.length?``:o}),t?(0,P.jsx)(`input`,{tabIndex:-1,ref:i,size:f,className:m7.input,value:n,onChange:e=>r(e.target.value),"data-error":a||null,"data-testid":c&&`${c}-input`}):null]})},Zse=({selectedOptions:e,searchValue:t,searchable:n,clearable:r,onClickTrigger:i,element:a,error:o,warning:s,tooltip:c,small:l,isInTable:u,disabled:d,onChangeSearch:f,onClickDeselect:p,onClickClear:m,tabIndex:h,isOpen:g,triggerRef:_,clearAllIsFocused:v,focusedSelectedOptionIndex:y,onFocus:b,onBlur:x,groupOrder:S,maxTooltipWidth:C,placeholder:w,right:T,testId:E})=>{let[D,O]=o7(),k=Array.isArray(e)?e.length>0&&e[0]?.value:e?.value,A=r&&k,ee=(()=>{if(S)switch(S){case l5.FIRST:return m7.groupOrderFirst;case l5.LAST:return m7.groupOrderLast;default:return m7.groupOrderMiddle}return``})(),j=!Array.isArray(e)&&e?.details?{...e,label:(0,P.jsxs)(`div`,{className:(0,I.default)(m7.detailedLabel),children:[(0,P.jsx)(K5,{children:e.label}),(0,P.jsx)(K5,{muted:!0,children:e.details})]})}:e,te=(0,P.jsxs)(P.Fragment,{children:[a,(0,P.jsxs)(`div`,{ref:_,tabIndex:h,className:(0,I.default)(m7.trigger,g?m7.isOpen:``,d?m7.disabled:``,l?m7.small:``,u?m7.isInTable:``,T?m7.right:``,ee),onClick:e=>{e.stopPropagation(),requestAnimationFrame(()=>{i(e),typeof O==`function`&&O()})},onFocus:b,onBlur:x,"data-error":o||null,"data-warning":s||null,"data-testid":E,children:[(0,P.jsx)(Xse,{selectedOptions:j,placeholder:w,searchable:n,searchValue:t,inputRef:D,onChange:f,error:o,small:l,testId:E}),(0,P.jsx)(`span`,{className:m7.icons,children:A?(0,P.jsx)(`span`,{className:(0,I.default)(m7.clearAll,v?m7.focus:``),onClick:e=>{e.stopPropagation(),m&&m(e)},"data-testid":E&&`${E}-clear`,children:(0,P.jsx)(_5,{icon:p5.CLOSE})}):(0,P.jsx)(`span`,{className:(0,I.default)(m7.iconOpen),children:(0,P.jsx)(_5,{icon:`chevron down`})})})]})]});return(0,P.jsx)(P.Fragment,{children:(0,P.jsx)(S5,{error:!!o,warning:!!s,text:c||o||s,enabled:c&&F5(c)||o&&F5(o)||s&&F5(s)||!1,maxWidth:C,children:te})})},h7=function(e){return e.SET_VISIBLE_OPTIONS=`SET_VISIBLE_OPTIONS`,e.RESET_LAYER_FOCUS=`RESET_LAYER_FOCUS`,e.CLEAR_SEARCH=`CLEAR_SEARCH`,e.ON_CHANGE_SEARCH=`ON_CHANGE_SEARCH`,e.FOCUS_TRIGGER_INPUTS=`FOCUS_TRIGGER_INPUTS`,e.BLUR_TRIGGER_INPUTS=`BLUR_TRIGGER_INPUTS`,e.FOCUS_LAYER_OPTIONS=`FOCUS_LAYER_OPTIONS`,e.OPEN_LAYER=`OPEN_LAYER`,e.CLOSE_LAYER=`CLOSE_LAYER`,e}({}),g7={options:[`none`,`clearAll`],currentIndex:0,currentOption:!1,clearAll:!1},Qse=e=>e===null?0:e+1,_7=(e,t)=>{let n=[`none`,...e.map((e,t)=>e.type===j5.HEADING?null:t).filter(e=>e!==null)],r=Qse(t);return{options:n,currentIndex:r,current:n[r]}},$se=(e,t)=>{let n=e===`up`?-1:1,r=t.currentIndex+n,i=(r<0?t.options.length-1:r)%t.options.length,a=t.options[i];return{...t,currentIndex:i,current:a}},ece=(e,t,n)=>{let r=e===`left`?-1:1,i=t&&t.length?[`none`,...Array.from({length:t.length},(e,t)=>t),`clearAll`]:[`none`,`clearAll`],a=n.currentIndex+r,o=(a<0?i.length-1:a)%i.length,s=i[o];return{options:i,currentIndex:o,currentOption:s,clearAll:s===`clearAll`}},v7=()=>g7,y7=e=>({...e,currentIndex:0,current:`none`}),tce=(e,t)=>{switch(t.type){case h7.SET_VISIBLE_OPTIONS:return{...e,visibleOptions:t.options||[]};case h7.RESET_LAYER_FOCUS:return{...e,layerFocus:_7(t.options||[],t.firstSelectedOptionIndex||0)};case h7.CLEAR_SEARCH:return{...e,visibleOptions:t.options||[],searchValue:``};case h7.ON_CHANGE_SEARCH:{let n=[...(t.options||[]).filter(e=>(String(e.label)+(e.details?String(e.details):``)).toLowerCase().includes(String(t.value||``).toLowerCase()))];return t.createAble&&t.value&&t.value!==``&&n.push({label:`Create "${t.value}"`,value:t.value,createAble:!0}),{...e,searchValue:t.value,visibleOptions:n,layerFocus:y7(e.layerFocus)}}case h7.FOCUS_TRIGGER_INPUTS:return{...e,triggerFocus:ece(t.direction||`right`,t.selectedOptions||[],e.triggerFocus),layerFocus:y7(e.layerFocus)};case h7.BLUR_TRIGGER_INPUTS:return{...e,triggerFocus:v7()};case h7.FOCUS_LAYER_OPTIONS:return t.nextLayerFocus?{...e,layerFocus:t.nextLayerFocus,triggerFocus:v7()}:e;case h7.OPEN_LAYER:return{...e,isLayerOpen:!0};case h7.CLOSE_LAYER:return{...e,isLayerOpen:!1};default:return e}},nce={auto:!0,possiblePlacements:[`bottom-start`,`top-start`],placement:`bottom-start`,preferX:`right`,preferY:`bottom`},b7=function(e){return e.CLOSE_LAYER=`CLOSE_LAYER`,e.OPEN_LAYER=`OPEN_LAYER`,e.SET_VISIBLE_OPTIONS=`SET_VISIBLE_OPTIONS`,e.CLEAR_SEARCH=`CLEAR_SEARCH`,e.RESET_LAYER_FOCUS=`RESET_LAYER_FOCUS`,e.FOCUS_LAYER_OPTIONS=`FOCUS_LAYER_OPTIONS`,e.BLUR_TRIGGER_INPUTS=`BLUR_TRIGGER_INPUTS`,e.FOCUS_TRIGGER_INPUTS=`FOCUS_TRIGGER_INPUTS`,e.ON_CHANGE_SEARCH=`ON_CHANGE_SEARCH`,e}({}),x7=function(e){return e.RIGHT=`ArrowRight`,e.LEFT=`ArrowLeft`,e.UP=`ArrowUp`,e.DOWN=`ArrowDown`,e.ENTER=`Enter`,e.ESC=`Escape`,e.TAB=`Tab`,e}({}),rce=({state:e,dispatch:t,options:n,setTriggerFocus:r,disabled:i,disabledContext:a,onCreate:o,onChange:s,selectedOptions:c,width:l,small:u,isFontLoaded:d,placeholder:f,firstSelectedOptionIndex:p,createAble:m,listRef:h,autoLayerWidth:g})=>{let _=()=>{e.isLayerOpen&&t({type:b7.CLOSE_LAYER}),r()},v=()=>t({type:b7.OPEN_LAYER}),y=(0,N.useRef)(!0);(0,N.useEffect)(()=>{y.current?y.current=!1:t({type:b7.SET_VISIBLE_OPTIONS,options:n})},[n]);let b=(e,l,u)=>{if(!(i||a)){if(u&&u(),l){if(l.createAble&&o)o(l.value);else if(!l.disabled)if(Array.isArray(c)){let t=c.some(e=>String(e.value)===String(l.value))?c.filter(e=>String(e.value)!==String(l.value)):[...c,l];s&&s(e,t)}else s&&s(e,l)}t({type:b7.CLEAR_SEARCH,options:n}),r()}},x=(0,N.useCallback)(()=>l?l===`auto`?p7(n,u,d,f):l:`100%`,[n,d]),S=(0,N.useCallback)(e=>g?Math.max(p7(n,u,d,f),e?.width):e?.width,[n,d]),{renderLayer:C,layerProps:w,triggerProps:T,triggerBounds:E}=Gu({isOpen:e?.isLayerOpen??!1,overflowContainer:!0,...nce,ResizeObserver,onOutsideClick:_,onParentClose:_}),D=()=>{if(!(i||a)){if(e.isLayerOpen){_();return}r(),t({type:b7.RESET_LAYER_FOCUS,options:n,firstSelectedOptionIndex:p}),v()}},O=(0,N.useRef)(!0);(0,N.useEffect)(()=>{O.current?O.current=!1:e.isLayerOpen||t({type:b7.CLEAR_SEARCH,options:n})},[e.isLayerOpen]);let k=(e,t)=>{let n=c instanceof Array?c.filter(e=>e.value!==t.value):null;s&&s(e,n)},A=e=>{let t=c instanceof Array?[]:{value:null};s&&s(e,t)},ee=e=>t({type:b7.ON_CHANGE_SEARCH,options:n,value:e,createAble:m}),j=()=>{v(),t({type:b7.BLUR_TRIGGER_INPUTS})},te=e=>{h.current&&Number.isInteger(e)&&h.current.scrollToItem(e)},ne=n=>{let r=$se(n,e.layerFocus);t({type:b7.FOCUS_LAYER_OPTIONS,nextLayerFocus:r}),te(r.current)},re=e=>{t({type:b7.FOCUS_TRIGGER_INPUTS,ICustomSelectDirection:e,selectedOptions:c})},ie=e=>A(e),ae=c&&c[e.triggerFocus.currentOption],oe=t=>{k(t,c[e.triggerFocus.currentOption])},se=t=>{b(t,e?.visibleOptions?.[e.layerFocus.current],_)},M=e.triggerFocus.clearAll;return{getTriggerWidth:x,onKeyEvent:(n,r)=>{switch(n){case x7.UP:ne(`up`);break;case x7.DOWN:e.isLayerOpen?ne(`down`):j();break;case x7.LEFT:re(`left`);break;case x7.RIGHT:re(`right`);break;case x7.ENTER:M?ie(r):ae?oe(r):se(r);break;case x7.ESC:_();break;case x7.TAB:t({type:b7.CLOSE_LAYER});break;default:}},clearAllIsFocused:M,triggerProps:T,onClickTrigger:D,onChangeSearch:ee,onClickDeselectOption:k,onClickClearAll:A,renderLayer:C,layerProps:w,closeLayer:_,onSelectOption:b,getLayerWidth:S,triggerBounds:E}},ice=e=>{let{multi:t=!1,disabled:n=!1,error:r=null,warning:i=null,tooltip:a=null,options:o,selectedOptions:s,onCreate:c=null,placeholder:l=``,small:u=!1,tabIndex:d=0,onFocus:f=()=>{},onBlur:p=()=>{},searchable:m=!0,clearable:h=!1,maxTooltipWidth:g,closeOnOptionActionClick:_,isInTable:v=!1,groupOrder:y,firstSelectedOptionIndex:b=0,right:x=!1,testId:S=void 0}=e,C=(0,N.useContext)(h5),w=c!==null,T=(0,N.useRef)(null),E=(0,N.useRef)(null),[D,O]=o7(),k=s7(),[A,ee]=(0,N.useReducer)(tce,{options:o,firstSelectedOptionIndex:b},({options:e})=>({searchValue:``,visibleOptions:e,layerFocus:_7(e,b??0),triggerFocus:g7,isLayerOpen:!1})),{getTriggerWidth:j,onKeyEvent:te,clearAllIsFocused:ne,triggerProps:re,onClickTrigger:ie,onChangeSearch:ae,onClickDeselectOption:oe,onClickClearAll:se,renderLayer:M,layerProps:ce,closeLayer:le,onSelectOption:ue,getLayerWidth:de,triggerBounds:fe}=rce({...e,state:A,dispatch:ee,setTriggerFocus:O,disabledContext:C,isFontLoaded:k,createAble:w,listRef:T});return(0,P.jsxs)(`div`,{style:{width:j()},onKeyDown:e=>{Object.values(x7).includes(e.key)&&te(e.key,e)},children:[(0,P.jsx)(Zse,{selectedOptions:s,searchValue:A.searchValue,isOpen:A.isLayerOpen,focusedSelectedOptionIndex:A.triggerFocus.currentOption,clearAllIsFocused:ne,searchable:m,triggerRef:hu(D,re.ref),error:r,warning:i,tooltip:a,small:u,isInTable:v,disabled:n||C,clearable:h,tabIndex:d,onClickTrigger:ie,onChangeSearch:ae,onClickDeselect:oe,onClickClear:se,onFocus:f,onBlur:p,groupOrder:y,maxTooltipWidth:g,placeholder:l,right:x,testId:S}),(0,P.jsx)(Ul,{nodeRef:E,in:A.isLayerOpen,timeout:100,classNames:{enter:c7.enter,enterActive:c7.enterActive},unmountOnExit:!0,children:(0,P.jsx)(P.Fragment,{children:A.isLayerOpen&&M((0,P.jsx)(`div`,{...ce,ref:e=>{E.current=e,ce.ref(e)},className:c7.layerContainer,children:(0,P.jsx)(Jse,{listRef:T,isMulti:t,sections:A.visibleOptions,selectedOptions:s,onSelectOption:(e,n)=>{ue(e,n,t?void 0:le)},closeLayer:()=>{_&&le()},width:de(fe),small:u,focusedOptionIndex:A.layerFocus.current,firstSelectedOptionIndex:b??0,testId:S&&`${S}-layer`})}))})})]})},S7=e=>e==null||e===``,C7=e=>e instanceof Array,ace=(e,t)=>t&&Array.isArray(e)?e.map(e=>typeof e==`string`||typeof e==`number`?{label:e,value:e}:e):e,w7=(e,t)=>{if(typeof t==`object`&&t&&t.hasOwnProperty(`label`)&&t.hasOwnProperty(`value`))return t;{let n=typeof t==`object`&&t&&t.hasOwnProperty(`value`)?t.value:t;return(Array.isArray(e)?e.filter(e=>e.type!==j5.HEADING).find(e=>e.value==n):void 0)||(S7(n)?void 0:{value:n,label:n})}},oce=(e,t)=>C7(t)?t.map(t=>w7(e,t)).filter(e=>e!==void 0):t===null?void 0:w7(e,t),sce=e=>Array.isArray(e)&&e.some(e=>typeof e==`string`||typeof e==`number`),cce=(e,t)=>{let n=t instanceof Array?t.length?t[0]:null:t,r=n==null?null:typeof n==`string`||typeof n==`number`||typeof n==`boolean`?n:n.value,i=e.filter(e=>e.type!==j5.HEADING).findIndex(e=>typeof e==`string`||typeof e==`number`?e==r:e.value==r);return i===-1?null:i},lce=(e,t)=>!(C7(t)?t:S7(t)?[]:[t])?.every(t=>e?.find(e=>e?.value===t?.value)!==void 0),uce=(e,t,n,r)=>{let i=Array.isArray(e)?e:[],a=C7(t),o=sce(i),s=ace(i,o),c=n?cce(i,t):null,l=oce(s,t);return{options:s,selectedOptions:l,multi:a,simpleInputs:o,firstSelectedOptionIndex:c,hasNonExistentValue:r&&l!==void 0?lce(s,l):!1}},T7=e=>{let{name:t=``,options:n=[],value:r,native:i=!1,onChange:a=gd,deprecatedEventHandler:o=!1,autoScroll:s=!0,warning:c,error:l,checkNonExistentValues:u=!0,closeOnOptionActionClick:d=!0,testId:f,disabled:p}=e,{multi:m,simpleInputs:h,options:g,selectedOptions:_,firstSelectedOptionIndex:v,hasNonExistentValue:y}=uce(n,r,!i&&s===!0,u),b=!m,x=i&&b;i&&!b&&console.warn(`Native select does not support provided props (see stories)`);let S=`Value no longer available for re-selection`,C=y&&!p?c?(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`div`,{children:S}),(0,P.jsx)(`div`,{children:c})]}):S:c,w=y&&l&&!p?(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`div`,{children:S}),(0,P.jsx)(`div`,{children:l})]}):l,T=(e,n)=>{if(o){let e=m?n.map(e=>h?e.value:e):h?n.value:n;e&&a(e)}else{let r=!(e instanceof Event),i=m?n:n.value;r?(e.target.name=t,e.target.value=i,m||(e.target.label=n.label),a(e)):a({...e,target:{...e.target,name:t,value:i,label:m?void 0:n.label}})}};return x?(0,P.jsx)(zse,{...e,options:g,selectedOption:_,onChange:T,hasNonExistentValue:y,warning:C,error:w,testId:f}):(0,P.jsx)(ice,{...e,options:g,selectedOptions:_,onChange:T,multi:m,firstSelectedOptionIndex:v,warning:C,error:w,testId:f,closeOnOptionActionClick:d})},dce=(e,t)=>t||e&&e.reduce((e,t)=>t?.selected?Number(t?.value):e,10)||10,fce=(e,t)=>{if(!t||!e)return 10;let{options:n,value:r}=t,i=Number(r);return i===0?1:Math.ceil(e/dce(n,i))},E7=(e,t,n=`Selected page must be a positive whole number between 1 and`)=>{let r=`${n} ${t}`,i={valid:!0,error:null};return e===``?i:!e.match(/^\d+$/g)||parseInt(e)<=0||parseInt(e)>t?{valid:!1,error:r}:i},pce={paginationContainer:`_paginationContainer_1tmz4_1`},D7={addon:`_addon_b4w53_1`,small:`_small_b4w53_12`,groupOrderFirst:`_groupOrderFirst_b4w53_16`,groupOrderMiddle:`_groupOrderMiddle_b4w53_17`,groupOrderLast:`_groupOrderLast_b4w53_21`},O7=({children:e,groupOrder:t,small:n=!1})=>{let r=(()=>{if(t)switch(t){case l5.FIRST:return D7.groupOrderFirst;case l5.LAST:return D7.groupOrderLast;default:return D7.groupOrderMiddle}return``})();return(0,P.jsx)(`span`,{className:(0,I.default)(D7.addon,r,n?D7.small:``),children:e})},mce=({pagination:e})=>{let{rowCount:t,selectedPage:n,small:r,onSelectPage:i,rowsPerPage:a,errorMessageTemplate:o,testIds:s}=e,c=Number(a?.value)===0,l=fce(t,a),[u,d]=(0,N.useState)(String(n));(0,N.useEffect)(()=>{d(String(n))},[n]);let{error:f}=E7(u,l,o),p=e=>{let{valid:t}=E7(e,l,o);d(e),t&&e!==``&&i&&i(Number(e))};return(0,P.jsxs)(`div`,{className:pce.paginationContainer,children:[a&&(0,P.jsx)(`div`,{style:{flexShrink:0},children:(0,P.jsx)(T7,{onChange:e=>{a.onChange&&a.onChange(e),p(`1`)},options:a.options,native:!!a.options,small:r,width:`auto`,value:a.value})}),(0,P.jsx)(O5,{small:r,round:!0,basic:!0,icon:p5.CHEVRON_DOUBLE_LEFT,onClick:()=>p(`1`),disabled:c||n===1}),(0,P.jsx)(O5,{small:r,round:!0,basic:!0,icon:p5.CHEVRON_LEFT,onClick:()=>p(String(Number(n)-1)),disabled:c||n===1}),(0,P.jsxs)(Z5,{small:r,width:`auto`,children:[(0,P.jsx)($5,{right:!0,value:u,placeholder:String(n),onChange:e=>p(e.target.value),width:`50px`,disabled:c||l<=1,error:f}),(0,P.jsxs)(O7,{children:[`of `,l]})]}),(0,P.jsx)(O5,{small:r,round:!0,basic:!0,icon:p5.CHEVRON_RIGHT,onClick:()=>p(String(Number(n)+1)),disabled:c||n===l}),(0,P.jsx)(O5,{small:r,round:!0,basic:!0,icon:p5.CHEVRON_DOUBLE_RIGHT,onClick:()=>p(String(l)),disabled:c||n===l,testId:s?.doubleRightBtn})]})},hce=({colSpan:e,pagination:t,actions:n,content:r,testId:i})=>{let a=n&&n.length,o=r!=null,s=()=>{if(t){let{rowCount:e,rowsPerPage:n}=t;return e>Number(n?.options?.[0]?.value)}return!1};return a||o||s()?(0,P.jsxs)(`div`,{className:i7.footer,"data-testid":`${i??`pagination`}-footer`,children:[o?(0,P.jsx)(`div`,{className:i7.section,children:(0,P.jsx)(`div`,{children:r})}):null,a||s()?(0,P.jsxs)(`div`,{className:i7.section,children:[t&&s()?(0,P.jsx)(mce,{pagination:t}):(0,P.jsx)(`div`,{}),a&&(0,P.jsx)(`div`,{children:(0,P.jsx)(H5,{actions:n})})]}):null]}):null},k7=e=>{let t=Math.max(...e.reduce((e,t)=>{let n=t.cells.map(e=>e.colSpan?e.colSpan:1).reduce((e,t)=>e+t,0);return e.concat(n)},[]));return isNaN(t)?0:t},gce=(e,t)=>{let n=[k7(t),k7(e)];return Math.max(...n)},A7=e=>e.reduce((e,t)=>t.actions&&t.actions.length>0?1:e,0),_ce=(e,t)=>A7(t)>0||A7(e)>0,j7={clickableRow:`_clickableRow_g8hv8_1`,hoverableRow:`_hoverableRow_g8hv8_4`,rowActive:`_rowActive_g8hv8_4`,expandableRow:`_expandableRow_g8hv8_8`,flush:`_flush_g8hv8_8`,dragIconCell:`_dragIconCell_g8hv8_34`,dragIcon:`_dragIcon_g8hv8_34`,dragIconDisabled:`_dragIconDisabled_g8hv8_55`},M7=({colSpan:e,children:t,flush:n})=>(0,P.jsx)(`tr`,{children:(0,P.jsx)(`td`,{colSpan:e,className:(0,I.default)(j7.expandableRow,n?j7.flush:``),children:t})}),N7=(e,t={leftAligned:``,rightAligned:``,centerAligned:``},n=!1)=>{if(!e)return null;let{bodyAlignment:r,headerAlignment:i,isHeader:a}=e;switch(a&&i?i:r){case d5.LEFT:return n?d5.LEFT:t.leftAligned;case d5.RIGHT:return n?d5.RIGHT:t.rightAligned;case d5.CENTER:return n?d5.CENTER:t.centerAligned;default:return n?d5.LEFT:t.leftAligned}},vce=(e,t=!1,n=0)=>{if(!e||e.length===0)return[];let r=e.every(e=>Array.isArray(e)),i=e.every(e=>typeof e==`string`);return r&&t?e[n]||[]:i?e:(console.warn(`getHeaderAlignment: alignments array contains a mix of strings and arrays, returning an empty array.`),[])},P7={inputInTable:`_inputInTable_1b0yl_1`,inputHover:`_inputHover_1b0yl_13`,inputFocus:`_inputFocus_1b0yl_18`,inputError:`_inputError_1b0yl_25`,inputWarning:`_inputWarning_1b0yl_26`,inputDisabled:`_inputDisabled_1b0yl_61`,hideScrollbars:`_hideScrollbars_1b0yl_67`,cell:`_cell_1b0yl_77`,disabledLink:`_disabledLink_1b0yl_87`,inputWrapper:`_inputWrapper_1b0yl_91`,numberInputWrapper:`_numberInputWrapper_1b0yl_106`,breakWord:`_breakWord_1b0yl_113`,inputCell:`_inputCell_1b0yl_116`,sliderCell:`_sliderCell_1b0yl_119`,staticCell:`_staticCell_1b0yl_123`,staticCellContent:`_staticCellContent_1b0yl_126`,unit:`_unit_1b0yl_147`,sortingCell:`_sortingCell_1b0yl_150`,sortingCellIcon:`_sortingCellIcon_1b0yl_161`,icon:`_icon_1b0yl_172`,checkBoxCell:`_checkBoxCell_1b0yl_176`,iconCellWrapper:`_iconCellWrapper_1b0yl_180`,actionsCell:`_actionsCell_1b0yl_184`,rightAligned:`_rightAligned_1b0yl_192`,centerAligned:`_centerAligned_1b0yl_198`,leftAligned:`_leftAligned_1b0yl_204`,popover:`_popover_1b0yl_207`,disabledPointerEvents:`_disabledPointerEvents_1b0yl_210`},F7=({cell:e,columnAlignment:t,testId:n,type:r})=>(0,P.jsx)($5,{name:e.name,value:e.value,onChange:t=>e.onChange?.(t),onFocus:e.onFocus,onBlur:e.onBlur,onPaste:t=>e.onPaste?.(t),placeholder:e.placeholder,error:e.error,warning:e.warning,disabled:e.disabled,isInTable:!0,maxTooltipWidth:e.maxTooltipWidth,right:t===d5.RIGHT,selectOnFocus:e.selectOnFocus,testId:n,tabIndex:e.disabled?-1:0,tooltip:e.tooltip,type:r}),I7=e=>String(p(e)),yce=e=>ve(e)?e:I7(qe(te(e),14)),bce=e=>e?typeof e==`string`?e:md(e)?e[0]:e.fieldName:``,L7=({name:e,placeholder:t=``,disabled:n=!1,error:r=!1,left:i=!1,small:a=!1,width:o=`100%`,value:s=``,onChange:c=()=>{},onFocus:l=()=>{},onBlur:u=()=>{},selectOnFocus:d=!0,tabIndex:f=0,testId:p,tooltip:m=null,warning:h=!1,validationCallback:g=()=>{},allowEmpty:v=!1,isInTable:y,groupOrder:b,enableCosmeticRounding:x=!0,enableDisplayRounding:S=!1,roundDisplayValue:C,disableInternalErrorValidationMessages:w=!1,disableValidationOnFocus:T=!1})=>{let E=e=>{let n=_(e),r=t&&S7(e);return[1/0,-1/0].includes(Number(e))||r?{valid:!0,errors:[]}:v&&e===``||n.valid?{...n,valid:!0,errors:void 0}:n},D=e=>{let t=!!e?.endsWith(`0`);return I7(x&&e&&!t&&E(e)?.valid?yce(e):e)},O=(0,N.useRef)(null),[k,A]=(0,N.useState)(D(I7(s))),[ee,j]=(0,N.useState)(!1),ne=bce(e),{valid:re,errors:ie}=E(k),ae=ie&&ie.length&&!w?ie[0]:null;(0,N.useEffect)(()=>{let e=D(I7(s));te(k)!==te(e)&&A(e)},[s,x,S]),(0,N.useEffect)(()=>{(T||!ee)&&!re?g(ne,ae):g(ne,null)},[ee,re,r]);let oe=e=>{let n=`key`in e?k:e?.target?.value,r=Se(n.replaceAll(` `,``).replaceAll(`|`,``));A(r),(E(r)?.valid||t&&S7(n))&&c({...e,target:{...e.target,value:Ge(I7(r)),name:ne}})};return(0,N.useEffect)(()=>{if(O&&O?.current&&S&&ee){let e=O.current;e&&!d&&setTimeout(()=>{let{length:t}=I7(k);e.setSelectionRange(t,t)},0)}},[ee]),(0,P.jsx)($5,{type:`text`,name:ne,testId:p,disabled:n,placeholder:t,value:S&&!ee&&re?C?I7(C(k)):(e=>y?Ve(e,2):le(e,4))(s):k,onChange:oe,onFocus:e=>{j(!0),l(e)},onBlur:e=>{j(!1),u(e)},onKeyDown:e=>{e.key===x7.ENTER&&oe(e)},error:ae||r,warning:h,right:!i,small:a,width:o,isInTable:y,groupOrder:b,selectOnFocus:d,tabIndex:f,tooltip:m,ref:O},ne)},xce=({cell:e,columnAlignment:t,testId:n})=>(0,P.jsx)(L7,{name:e.name,value:e.value,onChange:t=>e.onChange?.(t),onFocus:e.onFocus,onBlur:e.onBlur,placeholder:e.placeholder,error:e.error,warning:e.warning,disabled:e.disabled,isInTable:!0,left:e.left??t===d5.LEFT,selectOnFocus:e.selectOnFocus,tabIndex:e.disabled?-1:0,testId:n,tooltip:e.tooltip,validationCallback:e.validationCallback,allowEmpty:e.allowEmpty,enableCosmeticRounding:e.enableCosmeticRounding,enableDisplayRounding:e.enableDisplayRounding,roundDisplayValue:e.roundDisplayValue,disableValidationOnFocus:e.disableValidationOnFocus}),Sce=({cell:e,columnAlignment:t,testId:n})=>(0,P.jsx)(T7,{name:e.name,borderRadius:0,options:e.options,onChange:t=>e.onChange?.(t),onCreate:e.onCreate?t=>e.onCreate&&e.onCreate(t):void 0,error:e.error,warning:e.warning,disabled:e.disabled,placeholder:e.placeholder,isInTable:!0,value:e.value,native:e.native,clearable:e.clearable,searchable:e.searchable,deprecatedEventHandler:e.deprecatedEventHandler,maxTooltipWidth:e.maxTooltipWidth,width:`100%`,autoLayerWidth:e.autoLayerWidth,multi:e.multi,right:t===d5.RIGHT,testId:n,tabIndex:e.disabled?-1:0}),Cce=({cell:e,columnAlignment:t,testId:n})=>(0,P.jsx)(`div`,{className:(0,I.default)(P7.inputWrapper,e.type===`NumberInput`?P7.numberInputWrapper:``),children:e.type===`Input`?(0,P.jsx)(F7,{cell:e,columnAlignment:t,testId:n}):e.type===`NumberInput`?(0,P.jsx)(xce,{cell:e,columnAlignment:t,testId:n}):e.type===`DateInput`?(0,P.jsx)(F7,{cell:e,testId:n,type:`date`}):e.type===`Select`?(0,P.jsx)(Sce,{cell:e,columnAlignment:t,testId:n}):null}),wce=({cell:e,testId:t})=>{let n=(0,N.useContext)(h5),{error:r,warning:i,tooltip:a,maxTooltipWidth:o}=e,s=e=>F5(e);return(0,P.jsx)(`div`,{className:P7.inputWrapper,children:(0,P.jsx)(S5,{error:!!r,warning:!!i,text:a||r||i,enabled:s(a)||s(r)||s(i)||!1,maxWidth:o,children:(0,P.jsx)(`div`,{className:P7.staticCellContent,"data-error":r||null,"data-warning":i||null,children:(0,P.jsx)(`a`,{className:(0,I.default)((e.disabled||n)&&P7.disabledLink),onClick:e.disabled||n?void 0:t=>{t.stopPropagation(),e.onClick?.(t)},"data-testid":t,children:e.value})})})})},Tce=({cell:e,testId:t})=>(0,P.jsx)(T5,{label:e.label,checked:e.checked,isInTable:!0,disabled:e.disabled,onChange:t=>e.onChange(t),testId:t,tabIndex:e.disabled?-1:0,indeterminate:e.indeterminate}),R7={container:`_container_1bhdk_1`,small:`_small_1bhdk_7`,vertical:`_vertical_1bhdk_10`,hasArrows:`_hasArrows_1bhdk_14`,button:`_button_1bhdk_18`,label:`_label_1bhdk_21`,dot:`_dot_1bhdk_29`},Ece=Wm(e=>e.reduce((e,{label:t,tooltip:n,value:r})=>(e[r]=(0,P.jsx)(S5,{text:(0,P.jsxs)(P.Fragment,{children:[n,n?`: `:``,t??r]}),children:(0,P.jsx)(`div`,{className:R7.dot})}),e),{}),s5.default),z7=({name:e,label:t,width:n=`100%`,labelWidth:r=`auto`,value:i,min:a,max:o,step:s=1,marks:c=[],showArrows:l=!1,showTooltip:u=!1,tooltipFormatter:d=e=>e,disabled:f=!1,range:p=!1,small:m=!1,vertical:h={enabled:!1,width:`100px`,height:`400px`},onChange:g=gd})=>{let _=(0,N.useContext)(h5),v=Ece(c),y=n=>{g({target:{name:e??``,value:n,label:typeof t==`string`?t:String(t)}})},b=()=>(0,P.jsx)(`div`,{className:R7.button,children:(0,P.jsx)(O5,{basic:!0,small:!0,round:!0,onClick:()=>y(p?[a,i?.[1]]:a),disabled:f||i===a||_,icon:p5.FAST_BACKWARD})}),x=()=>(0,P.jsx)(`div`,{className:R7.button,children:(0,P.jsx)(O5,{basic:!0,small:!0,round:!0,onClick:()=>y(p?[i?.[0],o]:o),disabled:f||i===o||_,icon:p5.FAST_FORWARD})});return(0,P.jsxs)(`div`,{className:(0,I.default)(R7.container,m?R7.small:``,h.enabled?R7.vertical:``),style:h.enabled?{width:h.width,height:h.height}:{width:n},children:[l&&(h.enabled?(0,P.jsx)(x,{}):(0,P.jsx)(b,{})),(0,P.jsx)(Wne,{range:p,allowCross:!1,className:(0,I.default)((f||_)&&R7.rcSliderDisabled,l&&R7.hasArrows),value:i,max:o,min:a,step:s,marks:v,onChange:e=>y(e),disabled:f||_,vertical:h.enabled,handleRender:(e,t)=>(0,P.jsxs)(`div`,{style:{position:`relative`},children:[e,u&&t.dragging&&(0,P.jsx)(S5,{display:`block`,text:d(i),forceOpen:!0,children:(0,P.jsx)(`div`,{style:{position:`absolute`,inset:0}})})]})}),l&&(h.enabled?(0,P.jsx)(b,{}):(0,P.jsx)(x,{})),t&&(0,P.jsx)(`label`,{className:R7.label,style:{width:r},children:t})]})},Dce=({cell:e})=>(0,P.jsx)(`div`,{className:P7.inputWrapper,children:(0,P.jsx)(z7,{label:e.label,value:e.value,min:e.min,max:e.max,step:e.step,marks:e.marks,onChange:t=>e.onChange(t),showArrows:e.showArrows,showTooltip:e.showTooltip,tooltipFormatter:e.tooltipFormatter,disabled:e.disabled})}),Oce=({cell:e})=>{let{tooltip:t,icon:n}=e;return(0,P.jsx)(`div`,{className:P7.iconCellWrapper,children:(0,P.jsx)(S5,{text:t,enabled:!!t&&F5(t),display:`flex`,placement:`top-center`,children:(0,P.jsx)(_5,{icon:n})})})},kce=({cell:e})=>(0,P.jsx)(H5,{actions:e.actions}),B7={toggleBox:`_toggleBox_rwod1_1`,enter:`_enter_rwod1_8`,enterActive:`_enterActive_rwod1_12`,fullWidthStyleFix:`_fullWidthStyleFix_rwod1_17`,dismiss:`_dismiss_rwod1_22`},V7=({children:e,content:t,placement:n=`top-center`,closeOnOutsideClick:r=!0,fullWidth:i=!1,showCloseButton:a=!1,testId:o,disabled:s=!1,overflowContainer:c=!1,isOpen:l,onToggle:u})=>{let d=(0,N.useContext)(h5),f=(0,N.useRef)(null),[p,m]=l===void 0?(0,N.useState)(!1):[l,u],h=()=>{!s&&!d&&m&&m(!1)},g=()=>{s||d||m&&m(!p)};(0,N.useEffect)(()=>{(s||d)&&h()},[s,d]);let{renderLayer:_,arrowProps:v,layerProps:y,triggerProps:b}=Gu({isOpen:p,placement:n,auto:!0,triggerOffset:6,onOutsideClick:r?h:void 0,ResizeObserver:nu,overflowContainer:c});return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`div`,{ref:b.ref,onClick:g,"data-testid":o,children:e}),(0,P.jsx)(Ul,{nodeRef:f,in:p,timeout:100,classNames:{enter:B7.enter,enterActive:B7.enterActive},unmountOnExit:!0,children:(0,P.jsx)(P.Fragment,{children:p&&_((0,P.jsxs)(`div`,{className:i?(0,I.default)(B7.toggleBox,B7.fullWidthStyleFix):(0,I.default)(B7.toggleBox),...y,ref:e=>{f.current=e,y.ref(e)},children:[(0,P.jsxs)(`div`,{children:[N.isValidElement(t)?N.cloneElement(t,{close:h}):t,a&&(0,P.jsx)(`div`,{className:B7.dismiss,children:(0,P.jsx)(O5,{small:!0,round:!0,onClick:h,icon:p5.CLOSE})})]}),(0,P.jsx)(id,{...v,backgroundColor:`var(--color-background-layer)`,borderColor:`var(--color-border)`,borderWidth:1,size:6})]}))})})]})},Ace=({cell:e})=>{let{helpIcon:t}=e;return t?(0,P.jsx)(`div`,{className:P7.icon,children:(0,P.jsx)(w5,{onClick:t.onClick,text:t.tooltip})}):null},jce=({cell:e})=>{let{libraryIcon:t}=e;return t?(0,P.jsx)(`div`,{className:P7.icon,children:(0,P.jsx)(w5,{onClick:t.onClick,text:t.tooltip,icon:p5.LIBRARY})}):null},Mce=({cell:e})=>{let{hasSort:t,sort:n,sortPriority:r}=e;return t?(0,P.jsxs)(`span`,{className:P7.sortingCellIcon,children:[n===`down`?(0,P.jsx)(K5,{link:!0,children:(0,P.jsx)(_5,{icon:p5.SORT_ASCENDING})}):n===`up`?(0,P.jsx)(K5,{link:!0,children:(0,P.jsx)(_5,{icon:p5.SORT_DESCENDING})}):(0,P.jsx)(K5,{faint:!0,children:(0,P.jsx)(_5,{icon:p5.SORT_DESCENDING})}),r&&n?(0,P.jsx)(`sup`,{children:r}):null]}):null},H7=({cell:e,isHeader:t,testId:n})=>{let{error:r,warning:i,tooltip:a,maxTooltipWidth:o,hasSort:s,onSort:c,type:l}=e,u=(0,P.jsxs)(`div`,{className:(0,I.default)(P7.staticCellContent,l===`Unit`?P7.unit:``),onClick:s?e=>c&&c(e):()=>{},"data-error":r||null,"data-warning":i||null,"data-testid":n,children:[e.value,t?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Ace,{cell:e}),(0,P.jsx)(jce,{cell:e}),(0,P.jsx)(Mce,{cell:e})]}):null]});return(0,P.jsx)(`div`,{className:P7.inputWrapper,children:(0,P.jsx)(S5,{error:!!r,warning:!!i,text:a||r||i,enabled:a&&F5(a)||r&&F5(r)||i&&F5(i)||!1,maxWidth:o,display:`block`,children:u})})},Nce=({cell:e,testId:t})=>{let{content:n,fullWidth:r,closeOnOutsideClick:i,disabled:a}=e;return(0,P.jsx)(V7,{content:n,fullWidth:r,closeOnOutsideClick:i,disabled:a,children:(0,P.jsx)(`div`,{className:P7.popover,children:(0,P.jsx)(H7,{cell:e,testId:t})})})},Pce=({cell:e,isHeader:t,columnAlignment:n,testId:r})=>{if(!e)return null;switch(e.type){case`Input`:case`NumberInput`:case`DateInput`:case`Select`:return(0,P.jsx)(Cce,{cell:e,columnAlignment:n,testId:r});case`Link`:return(0,P.jsx)(wce,{cell:e,testId:r});case`CheckBox`:return(0,P.jsx)(Tce,{cell:e,testId:r});case`Slider`:return(0,P.jsx)(Dce,{cell:e});case`Icon`:return(0,P.jsx)(Oce,{cell:e});case`Actions`:return(0,P.jsx)(kce,{cell:e});case`Popover`:return(0,P.jsx)(Nce,{cell:e});default:return(0,P.jsx)(H7,{cell:e,isHeader:t,testId:r})}},U7=function(e){return e.INPUT=`Input`,e.NUMBER_INPUT=`NumberInput`,e.SELECT=`Select`,e.POPOVER=`Popover`,e.SLIDER=`Slider`,e.CHECKBOX=`CheckBox`,e.ACTIONS=`Actions`,e.AUTO_UNIT=`AutoUnit`,e.UNIT=`Unit`,e.STATIC=`Static`,e}({}),W7=({cell:e,isHeader:t,columnHeaderAlignment:n,columnAlignment:r=d5.LEFT,width:i,testId:a})=>{if(!e)return null;let{style:o,colSpan:s,rowSpan:c,width:l}=e,u=(0,N.useRef)(null),d={bodyAlignment:r,headerAlignment:n,isHeader:t},f=N7(d,P7),p=N7(d,P7,!0),m=e.type===U7.INPUT||e.type===U7.NUMBER_INPUT||e.type===U7.SELECT||e.type===U7.POPOVER?P7.inputCell:e.type===U7.SLIDER?P7.sliderCell:e.type===U7.CHECKBOX?P7.checkBoxCell:e.type===U7.ACTIONS?P7.actionsCell:P7.staticCell,h=(0,I.default)(P7.cell,m,e.hasSort?P7.sortingCell:null,f,e.breakWord?P7.breakWord:``),g=l??i??void 0,_=e.type===U7.STATIC||!e.type,v={width:g,minWidth:g,textTransform:t&&_?m5.CAPITALIZE:void 0,...o};return(0,P.jsx)(t?`th`:`td`,{ref:u,className:h,style:v,colSpan:s,rowSpan:c,children:(0,P.jsx)(Pce,{cell:e,columnAlignment:p??d5.RIGHT,isHeader:t,testId:a})})},G7=({row:e,rowIndex:t,isHeader:n=!1,columnCount:r,colSpan:i,columnHeaderAlignments:a=[],columnAlignment:o=[],hasRowActions:s,draggableTable:c=!1,columnWidths:l,dropDisabled:u=!1,height:d,testId:f})=>{let p=vce(a,n,t),{onRowClick:m,onRowFocus:h,onRowMouseEnter:g,onRowMouseLeave:_,expandedContent:v,error:y,warning:b,active:x}=e,S=e.cells.map((e,r)=>{let i=`${n?0:1}_${t}_${r}`;return(0,P.jsx)(W7,{cell:e,isHeader:n,columnAlignment:o[r],columnHeaderAlignment:p[r],width:l?l[r]:void 0,testId:e.testId},i)}),C=s&&(0,P.jsx)(W7,{cell:{type:U7.ACTIONS,actions:e.actions},isHeader:n},r),{attributes:w,listeners:T,setNodeRef:E,transform:D,transition:O,isDragging:k}=F_({id:t.toString(),animateLayoutChanges:()=>!1}),A={transform:u?void 0:Oh.Translate.toString(D),height:d,transition:O,opacity:k?0:void 0},ee=()=>e.noDrag?(0,P.jsx)(`td`,{"aria-labelledby":`unique-label-id`}):(0,P.jsx)(`td`,{className:j7.dragIconCell,children:(0,P.jsx)(`div`,{className:(0,I.default)(j7.dragIcon,u?j7.dragIconDisabled:``),...w,...T,children:(0,P.jsx)(_5,{icon:p5.DRAG})})});return n?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`tr`,{onClick:m,onMouseEnter:g,onMouseLeave:_,onFocus:h,className:(0,I.default)(m?j7.clickableRow:null,g?j7.hoverableRow:null),children:[c?(0,P.jsx)(`th`,{}):null,S,C]},t),v&&v.content?(0,P.jsx)(M7,{colSpan:i,flush:v.flush===!0,children:v.content},`${t}_expanded_content`):null]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`tr`,{ref:e.noDrag?null:E,onClick:m,onMouseEnter:g,onMouseLeave:_,onFocus:h,className:(0,I.default)(m&&!m.noStyle?j7.clickableRow:null,g&&!g.noStyle?j7.hoverableRow:null,x?j7.rowActive:null),"data-active":x||null,"data-error":y||null,"data-warning":b||null,"data-index":t,"data-even":t%2==0,style:A,children:[c?ee():null,S,C]},t),v&&v.content?(0,P.jsx)(M7,{colSpan:i,flush:v.flush===!0,children:v.content},`${t}_expanded_content`):null]})},Fce=e=>{let{children:t,colSpan:n,columnAlignment:r,columnCount:i,draggable:a,onListReorder:o=()=>{},canListReorder:s=()=>!0,rowActions:c,rows:l=[],tbodyRef:u}=e,[d,f]=(0,N.useState)(null),[p,m]=(0,N.useState)(!1),h=(0,N.useMemo)(()=>l.map((e,t)=>t.toString()),[l]);return a?(0,P.jsxs)(zte,{collisionDetection:Yh,onDragStart:e=>{f(e.active.id)},onDragEnd:e=>{f(null),m(!1);let{active:t,over:n}=e;if(!t||!n||t.id===n.id)return;let r=Number(t.id),i=Number(n?.id);s({from:r,to:i})&&o({from:r,to:i})},onDragOver:e=>{let{active:t,over:n}=e,r=Number(t.id),i=Number(n?.id);m(r!==i&&!s({from:r,to:i}))},children:[(0,P.jsx)(cne,{items:h,strategy:one,children:t({dropDisabled:p})}),!!d&&(0,Nl.createPortal)((0,P.jsx)(nne,{dropAnimation:null,children:(0,P.jsx)(`table`,{className:(0,I.default)(r7.table,r7.dragOverlay),children:(0,P.jsx)(`tbody`,{children:(0,P.jsx)(G7,{rowIndex:Number(d),row:l[Number(d)],columnCount:i,columnWidths:(()=>{if(!u?.current)return[];let e=u.current.querySelectorAll(`tr`)[Number(d)]?.querySelectorAll(`td`);if(!e)return[];let t=Array.from(e).map(e=>`${e.getBoundingClientRect().width}px`);return t.shift(),t})(),colSpan:n,hasRowActions:c,columnAlignment:r,draggableTable:a,dropDisabled:p})})})}),document.body)]}):t({})},Ice=({table:e,children:t})=>{let n=(0,N.useRef)(null),r=Dv({count:e?.rowCount??e.rows?.length??0,getScrollElement:()=>n.current,estimateSize:()=>31,overscan:10});return(0,P.jsx)(`div`,{id:`scrollWrapper`,className:(0,I.default)(r7.scroll,r7.virtualScroll),ref:n,children:t({virtualizer:r,tableStyle:(()=>{let e=r.getVirtualItems(),t=e.length>0?e[0].start:0,n=e.length>0?r.getTotalSize()-e[e.length-1].end:0;return{"--virtualPaddingTop":t+`px`,"--virtualPaddingBottom":n+`px`}})()})})},K7=({activeIndex:e,triggerScrollToActiveRow:t,isVirtualized:n,virtualizer:r})=>((0,N.useEffect)(()=>{if(t&&!(e==null||e<0)){if(n&&r)r.scrollToIndex(e,{behavior:`auto`,align:`center`});else if(!n){let t=document.querySelector(`tr[data-index="${e}"]`);t&&t.scrollIntoView({behavior:`auto`,block:`center`})}}},[e,t,n,r]),null),Lce=({table:e,children:t})=>{let{infiniteScroll:n=!1,triggerScrollToActiveRow:r=!1,rows:i}=e,a=(0,N.useMemo)(()=>typeof e.activeRowIndex==`number`?e.activeRowIndex:Array.isArray(i)&&i.length?i.findIndex(e=>e&&e.active):-1,[i,e.activeRowIndex]);return n?(0,P.jsx)(Ice,{table:e,children:({virtualizer:e,tableStyle:n})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(K7,{isVirtualized:!0,virtualizer:e,activeIndex:a,triggerScrollToActiveRow:r}),t({virtualizer:e,tableStyle:n})]})}):(0,P.jsxs)(`div`,{id:`scrollWrapper`,className:r7.scroll,children:[(0,P.jsx)(K7,{isVirtualized:!1,activeIndex:a,triggerScrollToActiveRow:r}),t({})]})},Rce=e=>{let{onListReorder:t=()=>{},canListReorder:n=()=>!0,beforeRenderRow:r,table:i}=e,{columnWidths:a,footer:o,name:s,rows:c=[],actions:l,actionsRight:u,columnHeaderAlignments:d,columnAlignment:f,striped:p=!0,testId:m,draggable:h,defaultEmptyRow:g=null,onAddRow:_=null,bordered:v=!0,maxHeight:y,fixedWidth:b}=i,x=(0,N.useRef)(null),S=Je(e,`table.headers`,[]),C=gce(c,S),w=_ce(c,S),T=C+(w?1:0),E=o?o?.pagination?.rowsPerPage?.value===0||Number(o?.pagination?.selectedPage)>=Number(o?.pagination?.rowCount)/Number(o?.pagination?.rowsPerPage?.value):!0,D=g?.cells?.length&&_&&E,O={cells:D?g.cells.map((e,t)=>e?.type===`Input`?{...e,onChange:e=>{let n=e?.target?.value;_({newRow:{...g,cells:g.cells.map((e,r)=>({...e,value:r===t?n:e?.value}))}})}}:{...e,disabled:!0}):null,testId:m?`${m}-last-empty-row`:void 0},k=D?c.concat(O):c,A={...i,rows:k};return(0,P.jsxs)(`div`,{className:(0,I.default)(r7.wrapper,v?r7.bordered:``),style:{maxHeight:y,width:b,display:b===`auto`?`inline-flex`:`flex`},children:[(0,P.jsx)(Rse,{actions:l,actionsRight:u,name:s,testId:m&&`${m}-title`}),(0,P.jsx)(Fce,{colSpan:T,columnAlignment:f,columnCount:C,draggable:h,onListReorder:t,rowActions:w,rows:k,tbodyRef:x,canListReorder:n,children:({dropDisabled:e})=>(0,P.jsx)(Lce,{table:A,children:({virtualizer:t,tableStyle:n})=>(0,P.jsxs)(`table`,{className:(0,I.default)(r7.table,p?r7.striped:``),"data-testid":m,style:n,children:[(0,P.jsx)(`thead`,{children:S.map((e,t)=>(0,P.jsx)(G7,{rowIndex:t,isHeader:!0,row:e,columnCount:C,columnWidths:a,colSpan:T,hasRowActions:w,columnAlignment:f,columnHeaderAlignments:d,draggableTable:h},`0_${t}`))}),(0,P.jsx)(`tbody`,{ref:x,children:t?t.getVirtualItems().map(t=>{let n=t.index,i=k[n];return(0,P.jsx)(G7,{rowIndex:n,row:r?r({row:i,rowIndex:n}):i,columnCount:C,columnWidths:a,colSpan:T,hasRowActions:w,columnAlignment:f,draggableTable:h,height:t.size,dropDisabled:e},`1_${n}`)}):k.map((t,n)=>(0,P.jsx)(G7,{rowIndex:n,row:r?r({row:t,rowIndex:n}):t,columnCount:C,columnWidths:a,colSpan:T,hasRowActions:w,columnAlignment:f,draggableTable:h,dropDisabled:e},`1_${n}`))})]})})}),o&&(0,P.jsx)(hce,{pagination:o.pagination,actions:o.actions,content:o.content})]})},q7={toggle:`_toggle_1c9wf_9`,small:`_small_1c9wf_25`,disabled:`_disabled_1c9wf_102`,noMargin:`_noMargin_1c9wf_110`,helpIconEnabled:`_helpIconEnabled_1c9wf_113`},zce=({name:e,label:t,checked:n=!1,disabled:r,display:i,small:a=!1,onChange:o,noMargin:s=!1,testId:c,helpText:l,onClickHelp:u,textTransform:d=m5.CAPITALIZE})=>{let f=(0,N.useContext)(h5),p=l||u,m=r||f;return(0,P.jsxs)(`div`,{className:(0,I.default)(q7.toggle,m?q7.disabled:null,a?q7.small:null,s?q7.noMargin:null),style:{display:i},onClick:t=>{m||(t.target.name=e,t.target.checked=!n,t.target.value=!n,o(t))},"data-testid":c,children:[(0,P.jsx)(`input`,{type:Voe.CHECKBOX,name:e,value:n?.toString(),disabled:m,checked:n,onChange:()=>{}}),(0,P.jsx)(`label`,{style:{textTransform:d},children:t}),p&&(0,P.jsx)(`div`,{className:q7.helpIconEnabled,onClick:u,children:(0,P.jsx)(w5,{text:l})})]})},J7={label:`_label_18pfe_1`,labelLeft:`_labelLeft_18pfe_5`,icons:`_icons_18pfe_13`},Bce=({label:e=null,width:t=`auto`,helpText:n=``,helpTextMaxWidth:r=`300px`,onClickHelp:i=void 0,lock:a={visible:!1,active:!1,onClick:()=>{},tooltip:``,testId:void 0},info:o,libraryIcon:s,labelLeft:c=!1,textTransform:l=m5.CAPITALIZE})=>(0,P.jsx)(`div`,{className:(0,I.default)(J7.label,c?J7.labelLeft:``),children:(0,P.jsxs)(`label`,{style:{textTransform:l,width:t||``},children:[e,(0,P.jsxs)(`div`,{className:J7.icons,children:[(n||i)&&(0,P.jsx)(w5,{text:n,onClick:i,maxWidth:r}),o&&(0,P.jsx)(w5,{text:o,icon:p5.INFO}),a&&a.visible&&a.onClick&&(0,P.jsx)(w5,{onClick:a.onClick,icon:a.active?p5.LOCK:p5.UNLOCK,active:a.active,testId:a.testId}),s&&(0,P.jsx)(w5,{text:s?.tooltip??``,onClick:s.onClick,icon:p5.LIBRARY})]})]})}),Y7={field:`_field_1xoss_1`,labelLeft:`_labelLeft_1xoss_5`,fieldInput:`_fieldInput_1xoss_9`,formRow:`_formRow_1xoss_12`,"form-row":`_form-row_1xoss_13`,button:`_button_1xoss_22`},Vce=({label:e,labelLeft:t=!1,labelWidth:n=`auto`,children:r,helpText:i,helpTextMaxWidth:a=`300px`,onClickHelp:o,lock:s={visible:!1,active:!1,onClick:()=>{},tooltip:``,testId:void 0},info:c,libraryIcon:l,testId:u,textTransform:d=m5.CAPITALIZE})=>(0,P.jsxs)(`div`,{className:(0,I.default)(Y7.field,t?Y7.labelLeft:``),"data-testid":u,children:[(e||t)&&(0,P.jsx)(Bce,{label:e,width:n,helpText:i,helpTextMaxWidth:a,onClickHelp:o,lock:s,info:c,libraryIcon:l,labelLeft:t,textTransform:d}),(0,P.jsx)(`div`,{className:Y7.fieldInput,children:r})]}),Hce=({alignItems:e=`initial`,justifyContent:t=`initial`,direction:n=`initial`,height:r=`initial`,children:i=null,wrap:a=!0,gap:o=!1})=>(0,P.jsx)(`div`,{style:{display:`flex`,flexDirection:n,alignItems:e,justifyContent:t,height:typeof r==`number`?`${r}px`:r,flexWrap:a?`wrap`:`nowrap`,gap:o===!1?0:o===!0?`var(--padding)`:typeof o==`number`?`${o}px`:o},children:i}),Uce={formRow:`_formRow_odewu_1`},Wce=({children:e})=>(0,P.jsx)(`div`,{className:Uce.formRow,children:e}),Gce=e=>typeof e==`boolean`?e?`20px`:`0px`:typeof e==`number`?`${e}px`:e||`initial`,X7=e=>typeof e==`number`?`${e}px`:e||`initial`,Kce=Tm.div`
284
- display: grid;
285
- gap: ${e=>Gce(e.$gap)};
286
- grid-template-rows: ${e=>X7(e.$rows)};
287
- grid-template-columns: ${e=>X7(e.$columns)};
288
- height: ${e=>X7(e.$height)};
289
-
290
- @media (max-width: 992px) {
291
- ${e=>e.$columnsTablet&&`grid-template-columns: ${X7(e.$columnsTablet)};`}
292
- }
293
-
294
- @media (max-width: 575px) {
295
- ${e=>e.$columnsMobile&&`grid-template-columns: ${X7(e.$columnsMobile)};`}
296
- }
297
- `,qce=({rows:e=`initial`,columns:t=`initial`,columnsTablet:n=null,columnsMobile:r=null,gap:i=!1,height:a=`initial`,children:o})=>(0,P.jsx)(Kce,{$rows:e,$columns:t,$columnsTablet:n,$columnsMobile:r,$gap:i===!1?`0px`:i===!0?`var(--padding)`:i,$height:typeof a==`number`?`${a}px`:a,children:o}),Z7={inputInTable:`_inputInTable_1wss1_1`,inputHover:`_inputHover_1wss1_13`,inputFocus:`_inputFocus_1wss1_18`,inputError:`_inputError_1wss1_25`,inputWarning:`_inputWarning_1wss1_26`,inputDisabled:`_inputDisabled_1wss1_61`,hideScrollbars:`_hideScrollbars_1wss1_67`,list:`_list_1wss1_77`,bordered:`_bordered_1wss1_83`,virtualRow:`_virtualRow_1wss1_87`,item:`_item_1wss1_87`,header:`_header_1wss1_90`,headerTitle:`_headerTitle_1wss1_90`,heading:`_heading_1wss1_91`,itemHeader:`_itemHeader_1wss1_91`,narrow:`_narrow_1wss1_94`,stickyHeader:`_stickyHeader_1wss1_98`,title:`_title_1wss1_109`,name:`_name_1wss1_115`,iconTooltipMargin:`_iconTooltipMargin_1wss1_119`,bold:`_bold_1wss1_122`,toggleNarrow:`_toggleNarrow_1wss1_133`,drag:`_drag_1wss1_151`,dragOverlay:`_dragOverlay_1wss1_172`,listContent:`_listContent_1wss1_177`,action:`_action_1wss1_202`,active:`_active_1wss1_205`,indented:`_indented_1wss1_212`,disabled:`_disabled_1wss1_225`,label:`_label_1wss1_236`,details:`_details_1wss1_247`,metadata:`_metadata_1wss1_248`,itemContent:`_itemContent_1wss1_256`,indentIcon:`_indentIcon_1wss1_263`,expandIcon:`_expandIcon_1wss1_268`,expanded:`_expanded_1wss1_275`,right:`_right_1wss1_278`,actions:`_actions_1wss1_286`,scrollableList:`_scrollableList_1wss1_291`,hideScrollbar:`_hideScrollbar_1wss1_67`,noPointerEvents:`_noPointerEvents_1wss1_305`,virtualRows:`_virtualRows_1wss1_308`},Jce=({toggleNarrow:e,onClickToggleNarrow:t})=>e?(0,P.jsx)(`a`,{className:Z7.toggleNarrow,onClick:t,children:(0,P.jsx)(_5,{icon:p5.CHEVRON_LEFT})}):null;(0,N.forwardRef)(({name:e,actions:t=[],toggleNarrow:n=!1,onToggleNarrow:r=()=>{},stickyHeader:i},a)=>(0,P.jsxs)(`div`,{ref:a,className:(0,I.default)(Z7.header,i?Z7.stickyHeader:``),children:[(0,P.jsx)(Jce,{toggleNarrow:n,onClickToggleNarrow:r}),e&&(0,P.jsx)(`div`,{className:Z7.headerTitle,children:(0,P.jsx)(J5,{top:!0,marginBottom:0,children:e})}),(0,P.jsx)(`div`,{className:Z7.right,children:(0,P.jsx)(`div`,{className:Z7.actions,children:(0,P.jsx)(H5,{actions:t})})})]}));var Yce=({label:e})=>e?(0,P.jsx)(`span`,{className:Z7.label,children:(0,P.jsx)(L5,{color:e.color,title:e.value,small:e.small})}):null,Q7=({name:e,icon:t,testId:n})=>{let r=t&&(0,P.jsx)(_5,{icon:t.icon,color:t.color||`#db2828`});return(0,P.jsxs)(`span`,{className:(0,I.default)(Z7.name,Z7.bold),"data-testid":n,children:[e,t&&t.tooltip&&t.tooltip.text?(0,P.jsx)(`span`,{className:Z7.iconTooltipMargin,children:(0,P.jsx)(S5,{text:t.tooltip.text,maxWidth:`350px`,children:r})}):t&&t.icon&&(0,P.jsx)(`span`,{className:Z7.iconTooltipMargin,children:r})]})},Xce=({item:e})=>{let{name:t,icon:n,details:r,metadata:i,invalid:a,testId:o}=e,s=(0,P.jsx)(Q7,{name:t,icon:n,testId:o&&`${o}-name`});return a&&(s=(0,P.jsx)(L5,{small:!0,margin:`-2px`,title:`!`,children:s})),(0,P.jsxs)(`span`,{className:Z7.title,children:[s,r&&(0,P.jsx)(`span`,{className:Z7.details,"data-testid":o&&`${o}-details`,children:r}),i&&(0,P.jsx)(`span`,{className:Z7.metadata,"data-testid":o&&`${o}-metadata`,children:i})]})},$7=({item:e})=>e.metaCount===void 0?null:(0,P.jsx)(L5,{color:`rgba(0,0,0,0.25)`,title:e.metaCount}),Zce=({item:e,expanding:t})=>(0,P.jsx)(y5,{expanded:!!t&&!!e.active&&!!e.content,children:(0,P.jsx)(`div`,{className:Z7.itemContent,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:e.content})}),Qce=(0,N.forwardRef)(({item:e,index:t},n)=>{let r=(0,N.useContext)(h5),{actions:i,disabled:a,expanded:o,onClick:s,title:c,name:l,icon:u,testId:d}=e;return(0,P.jsx)(`div`,{ref:e=>{n&&`current`in n&&Array.isArray(n.current)&&t!==void 0&&(n.current[t]=e)},"data-testid":d??null,className:(0,I.default)(Z7.item,Z7.heading,a||r?Z7.disabled:``,s?Z7.action:``),onClick:e=>{s&&s(e)},title:c,children:(0,P.jsx)(`div`,{children:(0,P.jsxs)(`div`,{className:Z7.itemHeader,children:[typeof o==`boolean`&&(0,P.jsx)(`div`,{className:(0,I.default)(Z7.expandIcon,o&&Z7.expanded),children:(0,P.jsx)(_5,{icon:p5.CHEVRON_RIGHT})}),(0,P.jsx)(Q7,{name:l,icon:u}),(0,P.jsxs)(`div`,{className:Z7.right,children:[(0,P.jsx)($7,{item:e}),!(a||r)&&i&&(0,P.jsx)(`div`,{className:Z7.actions,children:(0,P.jsx)(H5,{actions:e.actions??[]})})]})]})})})});(0,N.forwardRef)(({item:e,index:t,expanding:n,invokeEditOnRowClick:r,draggable:i},a)=>{let o=(0,N.useContext)(h5),s=(e,t,s,c,l,u)=>{let d=t.actions&&t.actions.find(e=>e.label&&String(e.label)?.toLowerCase()===`edit`),f=!!(d||t.url||t.onClick),p=t.level&&t.level>1?(t.level-1)*20:0;return(0,P.jsx)(t.component||`a`,{href:t.url,to:t.url,ref:u,style:s,className:(0,I.default)(Z7.item,t.active?Z7.active:``,t.disabled||o?Z7.disabled:``,f?Z7.action:``),onClick:e=>{if(r&&d&&d.onClick&&d.onClick(e,t.id),t.onClick)return t.onClick(e)},"data-id":e,title:t.title,"data-testid":t.testId,children:(0,P.jsxs)(`div`,{ref:t=>{a&&`current`in a&&Array.isArray(a.current)&&e!==void 0&&(a.current[e]=t)},style:{paddingLeft:p},children:[(0,P.jsxs)(`div`,{className:Z7.itemHeader,children:[i&&(0,P.jsx)(`div`,{className:Z7.drag,...c,...l,children:(0,P.jsx)(_5,{icon:p5.DRAG})}),t.level&&t.level>0?(0,P.jsx)(`div`,{className:Z7.indentIcon,children:(0,P.jsx)(_5,{icon:p5.INDENT})}):null,(0,P.jsx)(Yce,{label:t.label}),(0,P.jsx)(Xce,{item:t}),(0,P.jsxs)(`div`,{className:Z7.right,children:[(0,P.jsx)($7,{item:t}),!(t.disabled||o)&&t.actions&&(0,P.jsx)(`div`,{className:Z7.actions,children:(0,P.jsx)(H5,{actions:t.actions})})]})]}),(0,P.jsx)(Zce,{item:t,expanding:n})]})},e)};return e.type===`Heading`?(0,P.jsx)(Qce,{ref:a,item:e,index:t},t):i?((e,t)=>{let{attributes:n,listeners:r,setNodeRef:i,transform:a,transition:o,isDragging:c}=F_({id:e.toString(),animateLayoutChanges:()=>!1});return s(e,t,{transform:Oh.Translate.toString(a),transition:o,opacity:c?0:1},n,r,i)})(t,e):s(t,e)});var e9={richTextToolbar:`_richTextToolbar_1gbkk_1`,richTextToolbarContainer:`_richTextToolbarContainer_1gbkk_5`},t9=function(e){return e.BOLD=`bold`,e.ITALIC=`italic`,e.CODE=`code`,e.UL=`ul`,e.OL=`ol`,e}({}),$ce=({disabled:e=!1,toolbarComponent:t=null})=>{let{focus:n,toggleBold:r,toggleBulletList:i,toggleCode:a,toggleItalic:o,toggleOrderedList:s}=LU(),c=IU(),l=[{icon:t9.BOLD,onClick:r,active:c.bold()},{icon:t9.ITALIC,onClick:o,active:c.italic()},{icon:t9.CODE,onClick:a,active:c.code()},{icon:t9.UL,onClick:i,active:c.bulletList()},{icon:t9.OL,onClick:s,active:c.orderedList()}];return(0,P.jsxs)(`div`,{className:e9.richTextToolbarContainer,children:[(0,P.jsx)(`div`,{className:e9.richTextToolbar,children:l.map((t,r)=>(0,P.jsx)(O5,{small:!0,round:!0,basic:!0,icon:t.icon,colored:u5.MUTED,onClick:()=>{t.onClick(),n()},active:t.active,disabled:e},r))}),t]})},ele={inputInTable:`_inputInTable_1fb4l_1`,inputHover:`_inputHover_1fb4l_13`,inputFocus:`_inputFocus_1fb4l_18`,inputError:`_inputError_1fb4l_25`,inputWarning:`_inputWarning_1fb4l_26`,inputDisabled:`_inputDisabled_1fb4l_61`,hideScrollbars:`_hideScrollbars_1fb4l_67`,richTextInput:`_richTextInput_1fb4l_77`};(0,N.forwardRef)(({placeholder:e,onChange:t,value:n,disabled:r,toolbarComponent:i},a)=>{let o=(0,N.useContext)(h5),s=r||o,{manager:c,state:l,setState:u,getContext:d}=YU({extensions:()=>[new PN({}),new zF({}),new VN,new QP,new LL({}),new BF,new qL({placeholder:e})],content:n,selection:`start`,stringHandler:`markdown`});return(0,N.useImperativeHandle)(a,()=>d(),[d]),(0,P.jsx)(`div`,{className:ele.richTextInput,children:(0,P.jsxs)(QU,{manager:c,state:l,placeholder:e,onChange:({helpers:e,state:n})=>{let r=e.getMarkdown(n);t&&t(r),u(n)},editable:!s,children:[(0,P.jsx)($ce,{disabled:s,toolbarComponent:i}),(0,P.jsx)(XU,{})]})})});var n9={inputInTable:`_inputInTable_1oy1z_1`,inputHover:`_inputHover_1oy1z_13`,inputFocus:`_inputFocus_1oy1z_18`,inputError:`_inputError_1oy1z_25`,inputWarning:`_inputWarning_1oy1z_26`,inputDisabled:`_inputDisabled_1oy1z_61`,hideScrollbars:`_hideScrollbars_1oy1z_67`,sidebar:`_sidebar_1oy1z_82`,inner:`_inner_1oy1z_93`,title:`_title_1oy1z_103`,subtitle:`_subtitle_1oy1z_104`,label:`_label_1oy1z_105`,collapsed:`_collapsed_1oy1z_109`,list:`_list_1oy1z_134`,item:`_item_1oy1z_140`,experimental:`_experimental_1oy1z_155`,active:`_active_1oy1z_159`,icon:`_icon_1oy1z_163`},tle=(0,N.memo)(({isOpen:e,label:t,icon:n,invalid:r})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(S5,{text:t,enabled:!e,placement:`right-center`,possiblePlacements:[`right-center`],fontSize:16,padding:`var(--padding-sm)`,display:`block`,children:(0,P.jsx)(`span`,{className:n9.icon,children:(0,P.jsx)(L5,{small:!0,title:r?`!`:void 0,margin:4,children:(0,P.jsx)(_5,{icon:n})})})}),(0,P.jsx)(`span`,{className:n9.label,children:t})]}),(e,t)=>(0,s5.default)(e,t)),nle=({isOpen:e,items:t,sectionIndex:n,onClick:r,testId:i})=>(0,P.jsx)(`div`,{className:n9.list,children:t.map((t,a)=>{let o=`${n}_${a}`;return(0,P.jsx)(`a`,{href:t.value,className:(0,I.default)(n9.item,t.isActive?n9.active:``,t.isExperimental?n9.experimental:``),onClick:e=>r(e,t.value,t.label,t.onClick),"data-testid":i,children:(0,P.jsx)(tle,{label:t.label,icon:t.icon,invalid:t.invalid,isOpen:e},o)},o)})}),rle=({isOpen:e,sections:t,onClick:n})=>(0,P.jsx)(P.Fragment,{children:t.map((t,r)=>(0,P.jsxs)(N.Fragment,{children:[(0,P.jsx)(`h5`,{className:n9.subtitle,children:t.heading.toUpperCase()}),(0,P.jsx)(nle,{isOpen:e,items:t.items,sectionIndex:r,onClick:n,testId:t.testId})]},r))});(0,N.memo)(({options:e,startOpen:t=!1,onShiftClickToggleOpen:n=()=>{},top:r})=>{let[i,a]=(0,N.useState)(t),o=(e,t,n,r)=>{e.preventDefault(),typeof r==`function`&&(e.currentTarget.value=t,e.currentTarget.label=n,r(e)),a(!1)},s=e.sections.length>0;return(0,P.jsx)(X5,{fixed:!0,open:i,top:r,background:`var(--color-background-sidebar)`,closedWidth:`var(--size-sidebar)`,buttonPosition:f5.BOTTOM,buttonAnimate:!0,button:s&&(0,P.jsx)(O5,{onClick:e=>{e.shiftKey&&n&&n(e),a(!i)},colored:!0,round:!0,icon:p5.LEFT}),children:(0,P.jsx)(`div`,{className:(0,I.default)(n9.sidebar,i?``:n9.collapsed),children:s&&(0,P.jsxs)(`div`,{className:n9.inner,children:[(0,P.jsx)(`h4`,{className:n9.title,children:e.title}),(0,P.jsx)(rle,{isOpen:i,sections:e.sections,onClick:o})]})})})},(e,t)=>(0,s5.default)(e,t)),(0,N.createContext)(null);var r9=Object.freeze({Translations:`translations`,LanguageKey:`languageKey`}),i9={unified:`Unified`,split:`Split`,changesTooLarge:`Changes are too large to be shown`,unitIsMissing:`Unit is missing`,companySetting:`Company setting`,companySettingDifferent:`Company setting is different`,allUsers:`All users`,adminOnly:`Admin only`,custom:`Custom`,created:`Created`,modified:`Modified`,using:`Using`,operation:`Operation`,date:`Date`,changes:`Changes`,change:`Change`,modifiedBy:`Modified by`,updatedBy:`Updated by {{userName}} ({{changes}})`,createdBy:`Created by {{userName}}`,clonedBy:`Created by {{username}} from {{operationMetaData}}`,revertedBy:`Reverted by {{userName}}`,importedBy:`Imported by {{userName}}`,singularChange:`change`,pluralChanges:`changes`,createdThroughApiBy:`Created through API by {{userName}}`,changedThroughApiBy:`Changed through API by {{userName}}`,showAll:`Show all`,rowsPerPage:`{{rows}} / page`,unknown:`Unknown`};r9.Translations,(e=>Object.keys(i9).reduce((t,n)=>({...t,[n]:e?.[n]||i9?.[n]}),{}))(),r9.LanguageKey;function ile(e){let t=/^\/(.*)\/([gimyu]*)$/.exec(e.toString());if(!t)throw Error(`Invalid RegExp`);return new RegExp(t[1]??``,t[2])}function a9(e){if(typeof e!=`object`)return e;if(e===null)return null;if(Array.isArray(e))return e.map(a9);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return ile(e);let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=a9(e[n]));return t}function ale(e,t){if(e.length===0)throw Error(t||`Expected a non-empty array`)}var ole=e=>e[e.length-1],o9=class{setResult(e){return this.result=e,this.hasResult=!0,this}exit(){return this.exiting=!0,this}push(e,t){return e.parent=this,t!==void 0&&(e.childName=t),e.root=this.root||this,e.options=e.options||this.options,this.children?(ale(this.children),ole(this.children).next=e,this.children.push(e)):(this.children=[e],this.nextAfterChildren=this.next||null,this.next=e),e.next=this,this}},s9=class extends o9{constructor(e,t){super(),this.left=e,this.right=t,this.pipe=`diff`}prepareDeltaResult(e){if(typeof e==`object`&&(this.options?.omitRemovedValues&&Array.isArray(e)&&e.length>1&&(e.length===2||e[2]===0||e[2]===3)&&(e[0]=0),this.options?.cloneDiffValues)){let t=typeof this.options?.cloneDiffValues==`function`?this.options?.cloneDiffValues:a9;typeof e[0]==`object`&&(e[0]=t(e[0])),typeof e[1]==`object`&&(e[1]=t(e[1]))}return e}setResult(e){return this.prepareDeltaResult(e),super.setResult(e)}},c9=class extends o9{constructor(e,t){super(),this.left=e,this.delta=t,this.pipe=`patch`}},l9=class extends o9{constructor(e){super(),this.delta=e,this.pipe=`reverse`}},u9=class{constructor(e){this.name=e,this.filters=[]}process(e){if(!this.processor)throw Error(`add this pipe to a processor before using it`);let t=this.debug,n=this.filters.length,r=e;for(let e=0;e<n;e++){let n=this.filters[e];if(n&&(t&&this.log(`filter: ${n.filterName}`),n(r),typeof r==`object`&&r.exiting)){r.exiting=!1;break}}!r.next&&this.resultCheck&&this.resultCheck(r)}log(e){console.log(`[jsondiffpatch] ${this.name} pipe, ${e}`)}append(...e){return this.filters.push(...e),this}prepend(...e){return this.filters.unshift(...e),this}indexOf(e){if(!e)throw Error(`a filter name is required`);for(let t=0;t<this.filters.length;t++)if(this.filters[t]?.filterName===e)return t;throw Error(`filter not found: ${e}`)}list(){return this.filters.map(e=>e.filterName)}after(e,...t){let n=this.indexOf(e);return this.filters.splice(n+1,0,...t),this}before(e,...t){let n=this.indexOf(e);return this.filters.splice(n,0,...t),this}replace(e,...t){let n=this.indexOf(e);return this.filters.splice(n,1,...t),this}remove(e){let t=this.indexOf(e);return this.filters.splice(t,1),this}clear(){return this.filters.length=0,this}shouldHaveResult(e){return e===!1?(this.resultCheck=null,this):(this.resultCheck||=e=>{if(!e.hasResult){console.log(e);let t=Error(`${this.name} failed`);throw t.noResult=!0,t}},this)}},sle=class{constructor(e){this.selfOptions=e||{},this.pipes={}}options(e){return e&&(this.selfOptions=e),this.selfOptions}pipe(e,t){let n=t;if(typeof e==`string`){if(n===void 0)return this.pipes[e];this.pipes[e]=n}if(e&&e.name){if(n=e,n.processor===this)return n;this.pipes[n.name]=n}if(!n)throw Error(`pipe is not defined: ${e}`);return n.processor=this,n}process(e,t){let n=e;n.options=this.options();let r=t||e.pipe||`default`,i;for(;r;)n.nextAfterChildren!==void 0&&(n.next=n.nextAfterChildren,n.nextAfterChildren=null),typeof r==`string`&&(r=this.pipe(r)),r.process(n),i=r,r=null,n&&n.next&&(n=n.next,r=n.pipe||i);return n.hasResult?n.result:void 0}},cle=(e,t,n,r)=>e[n]===t[r],lle=(e,t,n,r)=>{let i=e.length,a=t.length,o,s,c=Array(i+1);for(o=0;o<i+1;o++){let e=Array(a+1);for(s=0;s<a+1;s++)e[s]=0;c[o]=e}for(c.match=n,o=1;o<i+1;o++){let i=c[o];if(i===void 0)throw Error(`LCS matrix row is undefined`);let l=c[o-1];if(l===void 0)throw Error(`LCS matrix row is undefined`);for(s=1;s<a+1;s++)n(e,t,o-1,s-1,r)?i[s]=(l[s-1]??0)+1:i[s]=Math.max(l[s]??0,i[s-1]??0)}return c},ule=(e,t,n,r)=>{let i=t.length,a=n.length,o={sequence:[],indices1:[],indices2:[]};for(;i!==0&&a!==0;){if(e.match===void 0)throw Error(`LCS matrix match function is undefined`);if(e.match(t,n,i-1,a-1,r))o.sequence.unshift(t[i-1]),o.indices1.unshift(i-1),o.indices2.unshift(a-1),--i,--a;else{let t=e[i];if(t===void 0)throw Error(`LCS matrix row is undefined`);let n=t[a-1];if(n===void 0)throw Error(`LCS matrix value is undefined`);let r=e[i-1];if(r===void 0)throw Error(`LCS matrix row is undefined`);let o=r[a];if(o===void 0)throw Error(`LCS matrix value is undefined`);n>o?--a:--i}}return o},dle={get:(e,t,n,r)=>{let i=r||{};return ule(lle(e,t,n||cle,i),e,t,i)}};function fle(e,t,n,r){for(let i=0;i<n;i++){let n=e[i];for(let e=0;e<r;e++){let r=t[e];if(i!==e&&n===r)return!0}}return!1}function d9(e,t,n,r,i){let a=e[n],o=t[r];if(a===o)return!0;if(typeof a!=`object`||typeof o!=`object`)return!1;let s=i.objectHash;if(!s)return i.matchByPosition&&n===r;i.hashCache1=i.hashCache1||[];let c=i.hashCache1[n];if(c===void 0&&(i.hashCache1[n]=c=s(a,n)),c===void 0)return!1;i.hashCache2=i.hashCache2||[];let l=i.hashCache2[r];return l===void 0&&(i.hashCache2[r]=l=s(o,r)),l===void 0?!1:c===l}var f9=function(e){if(!e.leftIsArray)return;let t={objectHash:e.options?.objectHash,matchByPosition:e.options?.matchByPosition},n=0,r=0,i,a,o,s=e.left,c=e.right,l=s.length,u=c.length,d;for(l>0&&u>0&&!t.objectHash&&typeof t.matchByPosition!=`boolean`&&(t.matchByPosition=!fle(s,c,l,u));n<l&&n<u&&d9(s,c,n,n,t);)i=n,d=new s9(s[i],c[i]),e.push(d,i),n++;for(;r+n<l&&r+n<u&&d9(s,c,l-1-r,u-1-r,t);)a=l-1-r,o=u-1-r,d=new s9(s[a],c[o]),e.push(d,o),r++;let f;if(n+r===l){if(l===u){e.setResult(void 0).exit();return}for(f||={_t:`a`},i=n;i<u-r;i++)f[i]=[c[i]],e.prepareDeltaResult(f[i]);e.setResult(f).exit();return}if(n+r===u){for(f||={_t:`a`},i=n;i<l-r;i++){let t=`_${i}`;f[t]=[s[i],0,0],e.prepareDeltaResult(f[t])}e.setResult(f).exit();return}t.hashCache1=void 0,t.hashCache2=void 0;let p=s.slice(n,l-r),m=c.slice(n,u-r),h=dle.get(p,m,d9,t),g=[];for(f||={_t:`a`},i=n;i<l-r;i++)if(h.indices1.indexOf(i-n)<0){let t=`_${i}`;f[t]=[s[i],0,0],e.prepareDeltaResult(f[t]),g.push(i)}let _=!0;e.options?.arrays&&e.options.arrays.detectMove===!1&&(_=!1);let v=!1;e.options?.arrays?.includeValueOnMove&&(v=!0);let y=g.length;for(i=n;i<u-r;i++){let r=h.indices2.indexOf(i-n);if(r<0){let r=!1;if(_&&y>0)for(let l=0;l<y;l++){a=g[l];let u=a===void 0?void 0:f[`_${a}`];if(a!==void 0&&u&&d9(p,m,a-n,i-n,t)){u.splice(1,2,i,3),u.splice(1,2,i,3),v||(u[0]=``),o=i,d=new s9(s[a],c[o]),e.push(d,o),g.splice(l,1),r=!0;break}}r||(f[i]=[c[i]],e.prepareDeltaResult(f[i]))}else{if(h.indices1[r]===void 0)throw Error(`Invalid indexOnArray2: ${r}, seq.indices1: ${h.indices1}`);if(a=h.indices1[r]+n,h.indices2[r]===void 0)throw Error(`Invalid indexOnArray2: ${r}, seq.indices2: ${h.indices2}`);o=h.indices2[r]+n,d=new s9(s[a],c[o]),e.push(d,o)}}e.setResult(f).exit()};f9.filterName=`arrays`;var p9={numerically(e,t){return e-t},numericallyBy(e){return(t,n)=>t[e]-n[e]}},m9=function(e){if(!e.nested)return;let t=e.delta;if(t._t!==`a`)return;let n,r,i=t,a=e.left,o=[],s=[],c=[];for(n in i)if(n!==`_t`)if(n[0]===`_`){let e=n;if(i[e]!==void 0&&(i[e][2]===0||i[e][2]===3))o.push(Number.parseInt(n.slice(1),10));else throw Error(`only removal or move can be applied at original array indices, invalid diff type: ${i[e]?.[2]}`)}else{let e=n;i[e].length===1?s.push({index:Number.parseInt(e,10),value:i[e][0]}):c.push({index:Number.parseInt(e,10),delta:i[e]})}for(o=o.sort(p9.numerically),n=o.length-1;n>=0;n--){if(r=o[n],r===void 0)continue;let e=i[`_${r}`],t=a.splice(r,1)[0];e?.[2]===3&&s.push({index:e[1],value:t})}s=s.sort(p9.numericallyBy(`index`));let l=s.length;for(n=0;n<l;n++){let e=s[n];e!==void 0&&a.splice(e.index,0,e.value)}let u=c.length;if(u>0)for(n=0;n<u;n++){let t=c[n];if(t===void 0)continue;let r=new c9(a[t.index],t.delta);e.push(r,t.index)}if(!e.children){e.setResult(a).exit();return}e.exit()};m9.filterName=`arrays`;var h9=function(e){if(!e||!e.children||e.delta._t!==`a`)return;let t=e.left,n=e.children.length;for(let r=0;r<n;r++){let n=e.children[r];if(n===void 0)continue;let i=n.childName;t[i]=n.result}e.setResult(t).exit()};h9.filterName=`arraysCollectChildren`;var g9=function(e){if(!e.nested){let t=e.delta;if(t[2]===3){let n=t;e.newName=`_${n[1]}`,e.setResult([n[0],Number.parseInt(e.childName.substring(1),10),3]).exit()}return}let t=e.delta;if(t._t!==`a`)return;let n=t;for(let t in n){if(t===`_t`)continue;let r=new l9(n[t]);e.push(r,t)}e.exit()};g9.filterName=`arrays`;var ple=(e,t,n)=>{if(typeof t==`string`&&t[0]===`_`)return Number.parseInt(t.substring(1),10);if(Array.isArray(n)&&n[2]===0)return`_${t}`;let r=+t;for(let n in e){let i=e[n];if(Array.isArray(i))if(i[2]===3){let e=Number.parseInt(n.substring(1),10),a=i[1];if(a===+t)return e;e<=r&&a>r?r++:e>=r&&a<r&&r--}else i[2]===0?Number.parseInt(n.substring(1),10)<=r&&r++:i.length===1&&Number.parseInt(n,10)<=r&&r--}return r},_9=e=>{if(!e||!e.children)return;let t=e.delta;if(t._t!==`a`)return;let n=t,r=e.children.length,i={_t:`a`};for(let t=0;t<r;t++){let r=e.children[t];if(r===void 0)continue;let a=r.newName;if(a===void 0){if(r.childName===void 0)throw Error(`child.childName is undefined`);a=ple(n,r.childName,r.result)}i[a]!==r.result&&(i[a]=r.result)}e.setResult(i).exit()};_9.filterName=`arraysCollectChildren`;var v9=function(e){e.left instanceof Date?(e.right instanceof Date&&e.left.getTime()===e.right.getTime()?e.setResult(void 0):e.setResult([e.left,e.right]),e.exit()):e.right instanceof Date&&e.setResult([e.left,e.right]).exit()};v9.filterName=`dates`;var y9=e=>{if(!e||!e.children)return;let t=e.children.length,n=e.result;for(let r=0;r<t;r++){let t=e.children[r];if(t!==void 0&&t.result!==void 0){if(n||={},t.childName===void 0)throw Error(`diff child.childName is undefined`);n[t.childName]=t.result}}n&&e.leftIsArray&&(n._t=`a`),e.setResult(n).exit()};y9.filterName=`collectChildren`;var b9=e=>{if(e.leftIsArray||e.leftType!==`object`)return;let t=e.left,n=e.right,r=e.options?.propertyFilter;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||r&&!r(i,e))continue;let a=new s9(t[i],n[i]);e.push(a,i)}for(let i in n)if(!(!Object.prototype.hasOwnProperty.call(n,i)||r&&!r(i,e))&&t[i]===void 0){let t=new s9(void 0,n[i]);e.push(t,i)}if(!e.children||e.children.length===0){e.setResult(void 0).exit();return}e.exit()};b9.filterName=`objects`;var x9=function(e){if(!e.nested)return;let t=e.delta;if(t._t)return;let n=t;for(let t in n){let r=new c9(e.left[t],n[t]);e.push(r,t)}e.exit()};x9.filterName=`objects`;var S9=function(e){if(!e||!e.children||e.delta._t)return;let t=e.left,n=e.children.length;for(let r=0;r<n;r++){let n=e.children[r];if(n===void 0)continue;let i=n.childName;Object.prototype.hasOwnProperty.call(e.left,i)&&n.result===void 0?delete t[i]:t[i]!==n.result&&(t[i]=n.result)}e.setResult(t).exit()};S9.filterName=`collectChildren`;var C9=function(e){if(!e.nested||e.delta._t)return;let t=e.delta;for(let n in t){let r=new l9(t[n]);e.push(r,n)}e.exit()};C9.filterName=`objects`;var w9=e=>{if(!e||!e.children||e.delta._t)return;let t=e.children.length,n={};for(let r=0;r<t;r++){let t=e.children[r];if(t===void 0)continue;let i=t.childName;n[i]!==t.result&&(n[i]=t.result)}e.setResult(n).exit()};w9.filterName=`collectChildren`;var T9=null;function E9(e,t){if(!T9){let n;if(e?.textDiff?.diffMatchPatch)n=new e.textDiff.diffMatchPatch;else{if(!t)return null;let e=Error("The diff-match-patch library was not provided. Pass the library in through the options or use the `jsondiffpatch/with-text-diffs` entry-point.");throw e.diff_match_patch_not_found=!0,e}T9={diff:(e,t)=>n.patch_toText(n.patch_make(e,t)),patch:(e,t)=>{let r=n.patch_apply(n.patch_fromText(t),e);for(let e of r[1])if(!e){let e=Error(`text patch failed`);throw e.textPatchFailed=!0,e}return r[0]}}}return T9}var D9=function(e){if(e.leftType!==`string`)return;let t=e.left,n=e.right,r=e.options?.textDiff?.minLength||60;if(t.length<r||n.length<r){e.setResult([t,n]).exit();return}let i=E9(e.options);if(!i){e.setResult([t,n]).exit();return}let a=i.diff;e.setResult([a(t,n),0,2]).exit()};D9.filterName=`texts`;var O9=function(e){if(e.nested)return;let t=e.delta;if(t[2]!==2)return;let n=t,r=E9(e.options,!0).patch;e.setResult(r(e.left,n[0])).exit()};O9.filterName=`texts`;var mle=e=>{let t=/^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/,n=e.split(`
298
- `);for(let e=0;e<n.length;e++){let r=n[e];if(r===void 0)continue;let i=r.slice(0,1);if(i===`@`){let i=t.exec(r);if(i!==null){let t=e;n[t]=`@@ -${i[3]},${i[4]} +${i[1]},${i[2]} @@`}}else if(i===`+`){if(n[e]=`-${n[e]?.slice(1)}`,n[e-1]?.slice(0,1)===`+`){let t=n[e];n[e]=n[e-1],n[e-1]=t}}else i===`-`&&(n[e]=`+${n[e]?.slice(1)}`)}return n.join(`
299
- `)},k9=function(e){if(e.nested)return;let t=e.delta;if(t[2]!==2)return;let n=t;e.setResult([mle(n[0]),0,2]).exit()};k9.filterName=`texts`;var A9=function(e){if(e.left===e.right){e.setResult(void 0).exit();return}if(e.left===void 0){if(typeof e.right==`function`)throw Error(`functions are not supported`);e.setResult([e.right]).exit();return}if(e.right===void 0){e.setResult([e.left,0,0]).exit();return}if(typeof e.left==`function`||typeof e.right==`function`)throw Error(`functions are not supported`);if(e.leftType=e.left===null?`null`:typeof e.left,e.rightType=e.right===null?`null`:typeof e.right,e.leftType!==e.rightType){e.setResult([e.left,e.right]).exit();return}if(e.leftType===`boolean`||e.leftType===`number`){e.setResult([e.left,e.right]).exit();return}if(e.leftType===`object`&&(e.leftIsArray=Array.isArray(e.left)),e.rightType===`object`&&(e.rightIsArray=Array.isArray(e.right)),e.leftIsArray!==e.rightIsArray){e.setResult([e.left,e.right]).exit();return}e.left instanceof RegExp&&(e.right instanceof RegExp?e.setResult([e.left.toString(),e.right.toString()]).exit():e.setResult([e.left,e.right]).exit())};A9.filterName=`trivial`;var j9=function(e){if(e.delta===void 0){e.setResult(e.left).exit();return}if(e.nested=!Array.isArray(e.delta),e.nested)return;let t=e.delta;if(t.length===1){e.setResult(t[0]).exit();return}if(t.length===2){if(e.left instanceof RegExp){let n=/^\/(.*)\/([gimyu]+)$/.exec(t[1]);if(n?.[1]){e.setResult(new RegExp(n[1],n[2])).exit();return}}e.setResult(t[1]).exit();return}t.length===3&&t[2]===0&&e.setResult(void 0).exit()};j9.filterName=`trivial`;var M9=function(e){if(e.delta===void 0){e.setResult(e.delta).exit();return}if(e.nested=!Array.isArray(e.delta),e.nested)return;let t=e.delta;if(t.length===1){e.setResult([t[0],0,0]).exit();return}if(t.length===2){e.setResult([t[1],t[0]]).exit();return}t.length===3&&t[2]===0&&e.setResult([t[0]]).exit()};M9.filterName=`trivial`;var hle=class{constructor(e){this.processor=new sle(e),this.processor.pipe(new u9(`diff`).append(y9,A9,v9,D9,b9,f9).shouldHaveResult()),this.processor.pipe(new u9(`patch`).append(S9,h9,j9,O9,x9,m9).shouldHaveResult()),this.processor.pipe(new u9(`reverse`).append(w9,_9,M9,k9,C9,g9).shouldHaveResult())}options(e){return this.processor.options(e)}diff(e,t){return this.processor.process(new s9(e,t))}patch(e,t){return this.processor.process(new c9(e,t))}reverse(e){return this.processor.process(new l9(e))}unpatch(e,t){return this.patch(e,this.reverse(t))}clone(e){return a9(e)}};function gle(e){return new hle(e)}var $=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32};$.Diff=function(e,t){this[0]=e,this[1]=t},$.Diff.prototype.length=2,$.Diff.prototype.toString=function(){return this[0]+`,`+this[1]},$.Diff.prototype[Symbol.iterator]=function*(){yield this[0],yield this[1]},$.prototype.diff_main=function(e,t,n,r){r===void 0&&(r=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+this.Diff_Timeout*1e3);var i=r;if(e==null||t==null)throw Error(`Null input. (diff_main)`);if(e==t)return e?[new $.Diff(0,e)]:[];n===void 0&&(n=!0);var a=n,o=this.diff_commonPrefix(e,t),s=e.substring(0,o);e=e.substring(o),t=t.substring(o),o=this.diff_commonSuffix(e,t);var c=e.substring(e.length-o);e=e.substring(0,e.length-o),t=t.substring(0,t.length-o);var l=this.diff_compute_(e,t,a,i);return s&&l.unshift(new $.Diff(0,s)),c&&l.push(new $.Diff(0,c)),this.diff_cleanupMerge(l),l},$.prototype.diff_compute_=function(e,t,n,r){var i;if(!e)return[new $.Diff(1,t)];if(!t)return[new $.Diff(-1,e)];var a=e.length>t.length?e:t,o=e.length>t.length?t:e,s=a.indexOf(o);if(s!=-1)return i=[new $.Diff(1,a.substring(0,s)),new $.Diff(0,o),new $.Diff(1,a.substring(s+o.length))],e.length>t.length&&(i[0][0]=i[2][0]=-1),i;if(o.length==1)return[new $.Diff(-1,e),new $.Diff(1,t)];var c=this.diff_halfMatch_(e,t);if(c){var l=c[0],u=c[1],d=c[2],f=c[3],p=c[4],m=this.diff_main(l,d,n,r),h=this.diff_main(u,f,n,r);return m.concat([new $.Diff(0,p)],h)}return n&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,r):this.diff_bisect_(e,t,r)},$.prototype.diff_lineMode_=function(e,t,n){var r=this.diff_linesToChars_(e,t);e=r.chars1,t=r.chars2;var i=r.lineArray,a=this.diff_main(e,t,!1,n);this.diff_charsToLines_(a,i),this.diff_cleanupSemantic(a),a.push(new $.Diff(0,``));for(var o=0,s=0,c=0,l=``,u=``;o<a.length;){switch(a[o][0]){case 1:c++,u+=a[o][1];break;case-1:s++,l+=a[o][1];break;case 0:if(s>=1&&c>=1){a.splice(o-s-c,s+c),o=o-s-c;for(var d=this.diff_main(l,u,!1,n),f=d.length-1;f>=0;f--)a.splice(o,0,d[f]);o+=d.length}c=0,s=0,l=``,u=``;break}o++}return a.pop(),a},$.prototype.diff_bisect_=function(e,t,n){for(var r=e.length,i=t.length,a=Math.ceil((r+i)/2),o=a,s=2*a,c=Array(s),l=Array(s),u=0;u<s;u++)c[u]=-1,l[u]=-1;c[o+1]=0,l[o+1]=0;for(var d=r-i,f=d%2!=0,p=0,m=0,h=0,g=0,_=0;_<a&&!(new Date().getTime()>n);_++){for(var v=-_+p;v<=_-m;v+=2){for(var y=o+v,b=v==-_||v!=_&&c[y-1]<c[y+1]?c[y+1]:c[y-1]+1,x=b-v;b<r&&x<i&&e.charAt(b)==t.charAt(x);)b++,x++;if(c[y]=b,b>r)m+=2;else if(x>i)p+=2;else if(f){var S=o+d-v;if(S>=0&&S<s&&l[S]!=-1){var C=r-l[S];if(b>=C)return this.diff_bisectSplit_(e,t,b,x,n)}}}for(var w=-_+h;w<=_-g;w+=2){for(var S=o+w,C=w==-_||w!=_&&l[S-1]<l[S+1]?l[S+1]:l[S-1]+1,T=C-w;C<r&&T<i&&e.charAt(r-C-1)==t.charAt(i-T-1);)C++,T++;if(l[S]=C,C>r)g+=2;else if(T>i)h+=2;else if(!f){var y=o+d-w;if(y>=0&&y<s&&c[y]!=-1){var b=c[y],x=o+b-y;if(C=r-C,b>=C)return this.diff_bisectSplit_(e,t,b,x,n)}}}}return[new $.Diff(-1,e),new $.Diff(1,t)]},$.prototype.diff_bisectSplit_=function(e,t,n,r,i){var a=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=this.diff_main(a,o,!1,i),u=this.diff_main(s,c,!1,i);return l.concat(u)},$.prototype.diff_linesToChars_=function(e,t){var n=[],r={};n[0]=``;function i(e){for(var t=``,i=0,o=-1,s=n.length;o<e.length-1;){o=e.indexOf(`
300
- `,i),o==-1&&(o=e.length-1);var c=e.substring(i,o+1);(r.hasOwnProperty?r.hasOwnProperty(c):r[c]!==void 0)?t+=String.fromCharCode(r[c]):(s==a&&(c=e.substring(i),o=e.length),t+=String.fromCharCode(s),r[c]=s,n[s++]=c),i=o+1}return t}var a=4e4,o=i(e);return a=65535,{chars1:o,chars2:i(t),lineArray:n}},$.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],a=0;a<r.length;a++)i[a]=t[r.charCodeAt(a)];e[n][1]=i.join(``)}},$.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(a,i)==t.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i},$.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(e.length-i,e.length-a)==t.substring(t.length-i,t.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i},$.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var a=0,o=1;;){var s=e.substring(i-o),c=t.indexOf(s);if(c==-1)return a;o+=c,(c==0||e.substring(i-o)==t.substring(0,o))&&(a=o,o++)}},$.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;var i=this;function a(e,t,n){for(var r=e.substring(n,n+Math.floor(e.length/4)),a=-1,o=``,s,c,l,u;(a=t.indexOf(r,a+1))!=-1;){var d=i.diff_commonPrefix(e.substring(n),t.substring(a)),f=i.diff_commonSuffix(e.substring(0,n),t.substring(0,a));o.length<f+d&&(o=t.substring(a-f,a)+t.substring(a,a+d),s=e.substring(0,n-f),c=e.substring(n+d),l=t.substring(0,a-f),u=t.substring(a+d))}return o.length*2>=e.length?[s,c,l,u,o]:null}var o=a(n,r,Math.ceil(n.length/4)),s=a(n,r,Math.ceil(n.length/2)),c;if(!o&&!s)return null;c=s?o&&o[4].length>s[4].length?o:s:o;var l,u,d,f;e.length>t.length?(l=c[0],u=c[1],d=c[2],f=c[3]):(d=c[0],f=c[1],l=c[2],u=c[3]);var p=c[4];return[l,u,d,f,p]},$.prototype.diff_cleanupSemantic=function(e){for(var t=!1,n=[],r=0,i=null,a=0,o=0,s=0,c=0,l=0;a<e.length;)e[a][0]==0?(n[r++]=a,o=c,s=l,c=0,l=0,i=e[a][1]):(e[a][0]==1?c+=e[a][1].length:l+=e[a][1].length,i&&i.length<=Math.max(o,s)&&i.length<=Math.max(c,l)&&(e.splice(n[r-1],0,new $.Diff(-1,i)),e[n[r-1]+1][0]=1,r--,r--,a=r>0?n[r-1]:-1,o=0,s=0,c=0,l=0,i=null,t=!0)),a++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),a=1;a<e.length;){if(e[a-1][0]==-1&&e[a][0]==1){var u=e[a-1][1],d=e[a][1],f=this.diff_commonOverlap_(u,d),p=this.diff_commonOverlap_(d,u);f>=p?(f>=u.length/2||f>=d.length/2)&&(e.splice(a,0,new $.Diff(0,d.substring(0,f))),e[a-1][1]=u.substring(0,u.length-f),e[a+1][1]=d.substring(f),a++):(p>=u.length/2||p>=d.length/2)&&(e.splice(a,0,new $.Diff(0,u.substring(0,p))),e[a-1][0]=1,e[a-1][1]=d.substring(0,d.length-p),e[a+1][0]=-1,e[a+1][1]=u.substring(p),a++),a++}a++}},$.prototype.diff_cleanupSemanticLossless=function(e){function t(e,t){if(!e||!t)return 6;var n=e.charAt(e.length-1),r=t.charAt(0),i=n.match($.nonAlphaNumericRegex_),a=r.match($.nonAlphaNumericRegex_),o=i&&n.match($.whitespaceRegex_),s=a&&r.match($.whitespaceRegex_),c=o&&n.match($.linebreakRegex_),l=s&&r.match($.linebreakRegex_),u=c&&e.match($.blanklineEndRegex_),d=l&&t.match($.blanklineStartRegex_);return u||d?5:c||l?4:i&&!o&&s?3:o||s?2:i||a?1:0}for(var n=1;n<e.length-1;){if(e[n-1][0]==0&&e[n+1][0]==0){var r=e[n-1][1],i=e[n][1],a=e[n+1][1],o=this.diff_commonSuffix(r,i);if(o){var s=i.substring(i.length-o);r=r.substring(0,r.length-o),i=s+i.substring(0,i.length-o),a=s+a}for(var c=r,l=i,u=a,d=t(r,i)+t(i,a);i.charAt(0)===a.charAt(0);){r+=i.charAt(0),i=i.substring(1)+a.charAt(0),a=a.substring(1);var f=t(r,i)+t(i,a);f>=d&&(d=f,c=r,l=i,u=a)}e[n-1][1]!=c&&(c?e[n-1][1]=c:(e.splice(n-1,1),n--),e[n][1]=l,u?e[n+1][1]=u:(e.splice(n+1,1),n--))}n++}},$.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,$.whitespaceRegex_=/\s/,$.linebreakRegex_=/[\r\n]/,$.blanklineEndRegex_=/\n\r?\n$/,$.blanklineStartRegex_=/^\r?\n\r?\n/,$.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,n=[],r=0,i=null,a=0,o=!1,s=!1,c=!1,l=!1;a<e.length;)e[a][0]==0?(e[a][1].length<this.Diff_EditCost&&(c||l)?(n[r++]=a,o=c,s=l,i=e[a][1]):(r=0,i=null),c=l=!1):(e[a][0]==-1?l=!0:c=!0,i&&(o&&s&&c&&l||i.length<this.Diff_EditCost/2&&o+s+c+l==3)&&(e.splice(n[r-1],0,new $.Diff(-1,i)),e[n[r-1]+1][0]=1,r--,i=null,o&&s?(c=l=!0,r=0):(r--,a=r>0?n[r-1]:-1,c=l=!1),t=!0)),a++;t&&this.diff_cleanupMerge(e)},$.prototype.diff_cleanupMerge=function(e){e.push(new $.Diff(0,``));for(var t=0,n=0,r=0,i=``,a=``,o;t<e.length;)switch(e[t][0]){case 1:r++,a+=e[t][1],t++;break;case-1:n++,i+=e[t][1],t++;break;case 0:n+r>1?(n!==0&&r!==0&&(o=this.diff_commonPrefix(a,i),o!==0&&(t-n-r>0&&e[t-n-r-1][0]==0?e[t-n-r-1][1]+=a.substring(0,o):(e.splice(0,0,new $.Diff(0,a.substring(0,o))),t++),a=a.substring(o),i=i.substring(o)),o=this.diff_commonSuffix(a,i),o!==0&&(e[t][1]=a.substring(a.length-o)+e[t][1],a=a.substring(0,a.length-o),i=i.substring(0,i.length-o))),t-=n+r,e.splice(t,n+r),i.length&&(e.splice(t,0,new $.Diff(-1,i)),t++),a.length&&(e.splice(t,0,new $.Diff(1,a)),t++),t++):t!==0&&e[t-1][0]==0?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,i=``,a=``;break}e[e.length-1][1]===``&&e.pop();var s=!1;for(t=1;t<e.length-1;)e[t-1][0]==0&&e[t+1][0]==0&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)==e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),s=!0):e[t][1].substring(0,e[t+1][1].length)==e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),s=!0)),t++;s&&this.diff_cleanupMerge(e)},$.prototype.diff_cleanupSplitSurrogates=function(e){for(var t,n=0;n<e.length;n++){var r=e[n],i=r[1][0],a=r[1][r[1].length-1];if(r[1].length===0){e.splice(n--,1);continue}if(a&&this.isHighSurrogate(a)&&(t=a,r[1]=r[1].slice(0,-1)),t&&i&&this.isHighSurrogate(t)&&this.isLowSurrogate(i)&&(r[1]=t+r[1]),r[1].length===0){e.splice(n--,1);continue}}return e},$.prototype.isHighSurrogate=function(e){var t=e.charCodeAt(0);return t>=55296&&t<=56319},$.prototype.isLowSurrogate=function(e){var t=e.charCodeAt(0);return t>=56320&&t<=57343},$.prototype.digit16=function(e){switch(e){case`0`:return 0;case`1`:return 1;case`2`:return 2;case`3`:return 3;case`4`:return 4;case`5`:return 5;case`6`:return 6;case`7`:return 7;case`8`:return 8;case`9`:return 9;case`A`:case`a`:return 10;case`B`:case`b`:return 11;case`C`:case`c`:return 12;case`D`:case`d`:return 13;case`E`:case`e`:return 14;case`F`:case`f`:return 15;default:throw Error(`Invalid hex-code`)}},$.prototype.decodeURI=function(e){try{return decodeURI(e)}catch{for(var t=0,n=``;t<e.length;){if(e[t]!==`%`){n+=e[t++];continue}var r=(this.digit16(e[t+1])<<4)+this.digit16(e[t+2]);if(!(r&128)){n+=String.fromCharCode(r),t+=3;continue}if(e[t+3]!==`%`)throw URIError(`URI malformed`);var i=(this.digit16(e[t+4])<<4)+this.digit16(e[t+5]);if((i&192)!=128)throw URIError(`URI malformed`);if(i&=63,(r&224)==192){n+=String.fromCharCode((r&31)<<6|i),t+=6;continue}if(e[t+6]!==`%`)throw URIError(`URI malformed`);var a=(this.digit16(e[t+7])<<4)+this.digit16(e[t+8]);if((a&192)!=128)throw URIError(`URI malformed`);if(a&=63,(r&240)==224){n+=String.fromCharCode((r&15)<<12|i<<6|a),t+=9;continue}if(e[t+9]!==`%`)throw URIError(`URI malformed`);var o=(this.digit16(e[t+10])<<4)+this.digit16(e[t+11]);if((o&192)!=128)throw URIError(`URI malformed`);if(o&=63,(r&248)==240){var s=(r&7)<<18|i<<12|a<<6|o;if(s>=65536&&s<=1114111){n+=String.fromCharCode((s&65535)>>>10&1023|55296),n+=String.fromCharCode(56320|s&1023),t+=12;continue}}throw URIError(`URI malformed`)}return n}},$.prototype.diff_xIndex=function(e,t){var n=0,r=0,i=0,a=0,o;for(o=0;o<e.length&&(e[o][0]!==1&&(n+=e[o][1].length),e[o][0]!==-1&&(r+=e[o][1].length),!(n>t));o++)i=n,a=r;return e.length!=o&&e[o][0]===-1?a:a+(t-i)},$.prototype.diff_prettyHtml=function(e){e=this.diff_cleanupSplitSurrogates(e);for(var t=[],n=/&/g,r=/</g,i=/>/g,a=/\n/g,o=0;o<e.length;o++){var s=e[o][0],c=e[o][1].replace(n,`&amp;`).replace(r,`&lt;`).replace(i,`&gt;`).replace(a,`&para;<br>`);switch(s){case 1:t[o]=`<ins style="background:#e6ffe6;">`+c+`</ins>`;break;case-1:t[o]=`<del style="background:#ffe6e6;">`+c+`</del>`;break;case 0:t[o]=`<span>`+c+`</span>`;break}}return t.join(``)},$.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==1&&(t[n]=e[n][1]);return t.join(``)},$.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==-1&&(t[n]=e[n][1]);return t.join(``)},$.prototype.diff_levenshtein=function(e){for(var t=0,n=0,r=0,i=0;i<e.length;i++){var a=e[i][0],o=e[i][1];switch(a){case 1:n+=o.length;break;case-1:r+=o.length;break;case 0:t+=Math.max(n,r),n=0,r=0;break}}return t+=Math.max(n,r),t},$.prototype.diff_toDelta=function(e){e=this.diff_cleanupSplitSurrogates(e);for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case 1:t[n]=`+`+encodeURI(e[n][1]);break;case-1:t[n]=`-`+e[n][1].length;break;case 0:t[n]=`=`+e[n][1].length;break}return t.join(` `).replace(/%20/g,` `)},$.prototype.diff_fromDelta=function(e,t){for(var n=[],r=0,i=0,a=t.split(/\t/g),o=0;o<a.length;o++){var s=a[o].substring(1);switch(a[o].charAt(0)){case`+`:try{n[r++]=new $.Diff(1,this.decodeURI(s))}catch{throw Error(`Illegal escape in diff_fromDelta: `+s)}break;case`-`:case`=`:var c=parseInt(s,10);if(isNaN(c)||c<0)throw Error(`Invalid number in diff_fromDelta: `+s);var l=e.substring(i,i+=c);a[o].charAt(0)==`=`?n[r++]=new $.Diff(0,l):n[r++]=new $.Diff(-1,l);break;default:if(a[o])throw Error(`Invalid diff operation in diff_fromDelta: `+a[o])}}if(i!=e.length)throw Error(`Delta length (`+i+`) does not equal source text length (`+e.length+`).`);return n},$.prototype.match_main=function(e,t,n){if(e==null||t==null||n==null)throw Error(`Null input. (match_main)`);return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},$.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw Error(`Pattern too long for this browser.`);var r=this.match_alphabet_(t),i=this;function a(e,r){var a=e/t.length,o=Math.abs(n-r);return i.Match_Distance?a+o/i.Match_Distance:o?1:a}var o=this.Match_Threshold,s=e.indexOf(t,n);s!=-1&&(o=Math.min(a(0,s),o),s=e.lastIndexOf(t,n+t.length),s!=-1&&(o=Math.min(a(0,s),o)));var c=1<<t.length-1;s=-1;for(var l,u,d=t.length+e.length,f,p=0;p<t.length;p++){for(l=0,u=d;l<u;)a(p,n+u)<=o?l=u:d=u,u=Math.floor((d-l)/2+l);d=u;var m=Math.max(1,n-u+1),h=Math.min(n+u,e.length)+t.length,g=Array(h+2);g[h+1]=(1<<p)-1;for(var _=h;_>=m;_--){var v=r[e.charAt(_-1)];if(p===0?g[_]=(g[_+1]<<1|1)&v:g[_]=(g[_+1]<<1|1)&v|(f[_+1]|f[_])<<1|1|f[_+1],g[_]&c){var y=a(p,_-1);if(y<=o)if(o=y,s=_-1,s>n)m=Math.max(1,2*n-s);else break}}if(a(p+1,n)>o)break;f=g}return s},$.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(var n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},$.prototype.patch_addContext_=function(e,t){if(t.length!=0){if(e.start2===null)throw Error(`patch not initialized`);for(var n=t.substring(e.start2,e.start2+e.length1),r=0;t.indexOf(n)!=t.lastIndexOf(n)&&n.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)r+=this.Patch_Margin,n=t.substring(e.start2-r,e.start2+e.length1+r);r+=this.Patch_Margin,e.start2-r>0&&$.prototype.isLowSurrogate(t[e.start2-r])&&r++;var i=t.substring(e.start2-r,e.start2);i&&e.diffs.unshift(new $.Diff(0,i)),e.start2+e.length1+r<t.length&&$.prototype.isHighSurrogate(t[e.start2+e.length1+r])&&r++;var a=t.substring(e.start2+e.length1,e.start2+e.length1+r);a&&e.diffs.push(new $.Diff(0,a)),e.start1-=i.length,e.start2-=i.length,e.length1+=i.length+a.length,e.length2+=i.length+a.length}},$.prototype.patch_make=function(e,t,n){var r,i;if(typeof e==`string`&&typeof t==`string`&&n===void 0)r=e,i=this.diff_main(r,t,!0),i.length>2&&(this.diff_cleanupSemantic(i),this.diff_cleanupEfficiency(i));else if(e&&typeof e==`object`&&t===void 0&&n===void 0)i=e,r=this.diff_text1(i);else if(typeof e==`string`&&t&&typeof t==`object`&&n===void 0)r=e,i=t;else if(typeof e==`string`&&typeof t==`string`&&n&&typeof n==`object`)r=e,i=n;else throw Error(`Unknown call format to patch_make.`);if(i.length===0)return[];i=this.diff_cleanupSplitSurrogates(i);for(var a=[],o=new $.patch_obj,s=0,c=0,l=0,u=r,d=r,f=0;f<i.length;f++){var p=i[f][0],m=i[f][1];switch(!s&&p!==0&&(o.start1=c,o.start2=l),p){case 1:o.diffs[s++]=i[f],o.length2+=m.length,d=d.substring(0,l)+m+d.substring(l);break;case-1:o.length1+=m.length,o.diffs[s++]=i[f],d=d.substring(0,l)+d.substring(l+m.length);break;case 0:m.length<=2*this.Patch_Margin&&s&&i.length!=f+1?(o.diffs[s++]=i[f],o.length1+=m.length,o.length2+=m.length):m.length>=2*this.Patch_Margin&&s&&(this.patch_addContext_(o,u),a.push(o),o=new $.patch_obj,s=0,u=d,c=l);break}p!==1&&(c+=m.length),p!==-1&&(l+=m.length)}return s&&(this.patch_addContext_(o,u),a.push(o)),a},$.prototype.patch_deepCopy=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=new $.patch_obj;i.diffs=[];for(var a=0;a<r.diffs.length;a++)i.diffs[a]=new $.Diff(r.diffs[a][0],r.diffs[a][1]);i.start1=r.start1,i.start2=r.start2,i.length1=r.length1,i.length2=r.length2,t[n]=i}return t},$.prototype.patch_apply=function(e,t){if(e.length==0)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var r=0,i=[],a=0;a<e.length;a++){var o=e[a].start2+r,s=this.diff_text1(e[a].diffs),c,l=-1;if(s.length>this.Match_MaxBits?(c=this.match_main(t,s.substring(0,this.Match_MaxBits),o),c!=-1&&(l=this.match_main(t,s.substring(s.length-this.Match_MaxBits),o+s.length-this.Match_MaxBits),(l==-1||c>=l)&&(c=-1))):c=this.match_main(t,s,o),c==-1)i[a]=!1,r-=e[a].length2-e[a].length1;else{i[a]=!0,r=c-o;var u=l==-1?t.substring(c,c+s.length):t.substring(c,l+this.Match_MaxBits);if(s==u)t=t.substring(0,c)+this.diff_text2(e[a].diffs)+t.substring(c+s.length);else{var d=this.diff_main(s,u,!1);if(s.length>this.Match_MaxBits&&this.diff_levenshtein(d)/s.length>this.Patch_DeleteThreshold)i[a]=!1;else{this.diff_cleanupSemanticLossless(d);for(var f=0,p,m=0;m<e[a].diffs.length;m++){var h=e[a].diffs[m];h[0]!==0&&(p=this.diff_xIndex(d,f)),h[0]===1?t=t.substring(0,c+p)+h[1]+t.substring(c+p):h[0]===-1&&(t=t.substring(0,c+p)+t.substring(c+this.diff_xIndex(d,f+h[1].length))),h[0]!==-1&&(f+=h[1].length)}}}}}return t=t.substring(n.length,t.length-n.length),[t,i]},$.prototype.patch_addPadding=function(e){for(var t=this.Patch_Margin,n=``,r=1;r<=t;r++)n+=String.fromCharCode(r);for(var r=0;r<e.length;r++)e[r].start1+=t,e[r].start2+=t;var i=e[0],a=i.diffs;if(a.length==0||a[0][0]!=0)a.unshift(new $.Diff(0,n)),i.start1-=t,i.start2-=t,i.length1+=t,i.length2+=t;else if(t>a[0][1].length){var o=t-a[0][1].length;a[0][1]=n.substring(a[0][1].length)+a[0][1],i.start1-=o,i.start2-=o,i.length1+=o,i.length2+=o}if(i=e[e.length-1],a=i.diffs,a.length==0||a[a.length-1][0]!=0)a.push(new $.Diff(0,n)),i.length1+=t,i.length2+=t;else if(t>a[a.length-1][1].length){var o=t-a[a.length-1][1].length;a[a.length-1][1]+=n.substring(0,o),i.length1+=o,i.length2+=o}return n},$.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,n=0;n<e.length;n++)if(!(e[n].length1<=t)){var r=e[n];e.splice(n--,1);for(var i=r.start1,a=r.start2,o=``;r.diffs.length!==0;){var s=new $.patch_obj,c=!0;for(s.start1=i-o.length,s.start2=a-o.length,o!==``&&(s.length1=s.length2=o.length,s.diffs.push(new $.Diff(0,o)));r.diffs.length!==0&&s.length1<t-this.Patch_Margin;){var l=r.diffs[0][0],u=r.diffs[0][1];l===1?(s.length2+=u.length,a+=u.length,s.diffs.push(r.diffs.shift()),c=!1):l===-1&&s.diffs.length==1&&s.diffs[0][0]==0&&u.length>2*t?(s.length1+=u.length,i+=u.length,c=!1,s.diffs.push(new $.Diff(l,u)),r.diffs.shift()):(u=u.substring(0,t-s.length1-this.Patch_Margin),s.length1+=u.length,i+=u.length,l===0?(s.length2+=u.length,a+=u.length):c=!1,s.diffs.push(new $.Diff(l,u)),u==r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(u.length))}o=this.diff_text2(s.diffs),o=o.substring(o.length-this.Patch_Margin);var d=this.diff_text1(r.diffs).substring(0,this.Patch_Margin);d!==``&&(s.length1+=d.length,s.length2+=d.length,s.diffs.length!==0&&s.diffs[s.diffs.length-1][0]===0?s.diffs[s.diffs.length-1][1]+=d:s.diffs.push(new $.Diff(0,d))),c||e.splice(++n,0,s)}}},$.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join(``)},$.prototype.patch_fromText=function(e){var t=[];if(!e)return t;for(var n=e.split(`
301
- `),r=0,i=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;r<n.length;){var a=n[r].match(i);if(!a)throw Error(`Invalid patch string: `+n[r]);var o=new $.patch_obj;for(t.push(o),o.start1=parseInt(a[1],10),a[2]===``?(o.start1--,o.length1=1):a[2]==`0`?o.length1=0:(o.start1--,o.length1=parseInt(a[2],10)),o.start2=parseInt(a[3],10),a[4]===``?(o.start2--,o.length2=1):a[4]==`0`?o.length2=0:(o.start2--,o.length2=parseInt(a[4],10)),r++;r<n.length;){var s=n[r].charAt(0);try{var c=decodeURI(n[r].substring(1))}catch{throw Error(`Illegal escape in patch_fromText: `+c)}if(s==`-`)o.diffs.push(new $.Diff(-1,c));else if(s==`+`)o.diffs.push(new $.Diff(1,c));else if(s==` `)o.diffs.push(new $.Diff(0,c));else if(s==`@`)break;else if(s!==``)throw Error(`Invalid patch mode "`+s+`" in: `+c);r++}}return t},$.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},$.patch_obj.prototype.toString=function(){var e=this.length1===0?this.start1+`,0`:this.length1==1?this.start1+1:this.start1+1+`,`+this.length1,t=this.length2===0?this.start2+`,0`:this.length2==1?this.start2+1:this.start2+1+`,`+this.length2,n=[`@@ -`+e+` +`+t+` @@
302
- `],r;$.prototype.diff_cleanupSplitSurrogates(this.diffs);for(var i=0;i<this.diffs.length;i++){switch(this.diffs[i][0]){case 1:r=`+`;break;case-1:r=`-`;break;case 0:r=` `;break}n[i+1]=r+encodeURI(this.diffs[i][1])+`
303
- `}return n.join(``).replace(/%20/g,` `)},((e={})=>gle({...e,textDiff:{diffMatchPatch:$,minLength:120},cloneDiffValues:!0}))(),Object.freeze({summary:{label:`Summary`,value:`summary`},compare:{label:`Compare`,value:`compare`}});const _le=2,vle=5,yle=1,ble=`round`,xle=`transparent`,Sle=`rgba(0, 0, 0, 0.1)`,Cle=`dblclick`,wle={TRANSLATIONS:`translations`,LANGUAGE_KEY:`languageKey`},Tle=1e-4,Ele=1e7,N9=()=>{let e=(0,N.useContext)(Ie);if(e===void 0)throw Error(`useLegend must be used within a LegendProvider`);return e},P9=({chartRef:e,options:t})=>{let{state:n,dispatch:r}=N9()??{},{annotations:i,interactions:{onLegendClick:a},legend:{customLegend:o}}=t??{};(0,N.useEffect)(()=>{n?.datasets?.forEach((t,n)=>{let r=t?.hidden??!1;e?.current?.setDatasetVisibility(Number(n),!r),e?.current?.update(`none`)})},[n]);let s=(0,N.useCallback)((t,n)=>{let{datasetIndex:o=-1}=n??{},s=null,c=e?.current,l=c?.data?.datasets??[],u=l?.[o]??{};if(i?.controlAnnotation&&u?.isAnnotation&&(s=u?.annotationIndex??null),a){let e=n?.hidden??!1;a(n?.text,e)}r({type:me,payload:{chartInstance:c,dsConfig:{datasetIndex:o,datasets:l,dataset:u},annotationConfig:{annotationIndex:s}}}),c?.update()},[e,i,r]),c=(0,N.useMemo)(()=>M(t,s),[t,s]),l=(0,N.useMemo)(()=>({[oe]:o?.customLegendPlugin&&{containerID:o?.customLegendContainerID}}),[o]);return{legendClick:s,annotation:n?.annotation,legend:c,customLegendPlugin:l}},Dle=(e=[])=>{let t={};return e.length&&(t=e.reduce((e,t,n)=>{let r=t?.id??`annotation${n+1}`;return e[r]={...t,id:r},e},{})),{annotations:t}};var Ole=function(){},F9=typeof window<`u`,kle=F9?N.useLayoutEffect:N.useEffect,I9={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function Ale(){var e=(0,N.useState)(null),t=e[0],n=e[1],r=(0,N.useState)(I9),i=r[0],a=r[1],o=(0,N.useMemo)(function(){return new window.ResizeObserver(function(e){if(e[0]){var t=e[0].contentRect,n=t.x,r=t.y,i=t.width,o=t.height,s=t.top,c=t.left,l=t.bottom,u=t.right;a({x:n,y:r,width:i,height:o,top:s,left:c,bottom:l,right:u})}})},[]);return kle(function(){if(t)return o.observe(t),function(){o.disconnect()}},[t]),[n,i]}var L9=F9&&window.ResizeObserver!==void 0?Ale:(function(){return[Ole,I9]}),R9={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},z9=N.createContext&&N.createContext(R9),B9=function(){return B9=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},B9.apply(this,arguments)},jle=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function V9(e){return e&&e.map(function(e,t){return N.createElement(e.tag,B9({key:t},e.attr),V9(e.child))})}function H9(e){return function(t){return N.createElement(Mle,B9({attr:B9({},e.attr)},t),V9(e.child))}}function Mle(e){var t=function(t){var n=e.attr,r=e.size,i=e.title,a=jle(e,[`attr`,`size`,`title`]),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),N.createElement(`svg`,B9({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:B9(B9({color:e.color||t.color},t.style),e.style),height:o,width:o,xmlns:`http://www.w3.org/2000/svg`}),i&&N.createElement(`title`,null,i),e.children)};return z9===void 0?t(R9):N.createElement(z9.Consumer,null,function(e){return t(e)})}function Nle(e){return H9({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M18 9l3 3l-3 3`}},{tag:`path`,attr:{d:`M15 12h6`}},{tag:`path`,attr:{d:`M6 9l-3 3l3 3`}},{tag:`path`,attr:{d:`M3 12h6`}},{tag:`path`,attr:{d:`M9 18l3 3l3 -3`}},{tag:`path`,attr:{d:`M12 15v6`}},{tag:`path`,attr:{d:`M15 6l-3 -3l-3 3`}},{tag:`path`,attr:{d:`M12 3v6`}}]})(e)}function Ple(e){return H9({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`}},{tag:`path`,attr:{d:`M5.7 5.7l12.6 12.6`}}]})(e)}function Fle(e){return H9({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M7 3.34a10 10 0 1 1 -4.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 4.995 -8.336z`,strokeWidth:`0`,fill:`currentColor`}}]})(e)}function Ile(e){return H9({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5`}},{tag:`path`,attr:{d:`M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5`}},{tag:`path`,attr:{d:`M14 5.5a1.5 1.5 0 0 1 3 0v6.5`}},{tag:`path`,attr:{d:`M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47`}}]})(e)}function Lle(e){return H9({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M9 6l11 0`}},{tag:`path`,attr:{d:`M9 12l11 0`}},{tag:`path`,attr:{d:`M9 18l11 0`}},{tag:`path`,attr:{d:`M5 6l0 .01`}},{tag:`path`,attr:{d:`M5 12l0 .01`}},{tag:`path`,attr:{d:`M5 18l0 .01`}}]})(e)}function Rle(e){return H9({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M5 4h14a1 1 0 0 1 1 1v5a1 1 0 0 1 -1 1h-7a1 1 0 0 0 -1 1v7a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1`}},{tag:`path`,attr:{d:`M4 8l2 0`}},{tag:`path`,attr:{d:`M4 12l3 0`}},{tag:`path`,attr:{d:`M4 16l2 0`}},{tag:`path`,attr:{d:`M8 4l0 2`}},{tag:`path`,attr:{d:`M12 4l0 3`}},{tag:`path`,attr:{d:`M16 4l0 2`}}]})(e)}function zle(e){return H9({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M19 2h-14a3 3 0 0 0 -3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3 -3v-14a3 3 0 0 0 -3 -3z`,strokeWidth:`0`,fill:`currentColor`}}]})(e)}function Ble(e){return H9({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M18 6l-12 12`}},{tag:`path`,attr:{d:`M6 6l12 12`}}]})(e)}function Vle(e){return H9({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`}},{tag:`path`,attr:{d:`M7 10l6 0`}},{tag:`path`,attr:{d:`M10 7l0 6`}},{tag:`path`,attr:{d:`M21 21l-6 -6`}}]})(e)}var U9={legend:`_legend_wpro0_1`,isDragging:`_isDragging_wpro0_8`,legendItems:`_legendItems_wpro0_11`,isHidden:`_isHidden_wpro0_47`,legendToggle:`_legendToggle_wpro0_50`,legendItem:`_legendItem_wpro0_11`,legendItemSymbol:`_legendItemSymbol_wpro0_80`,legendItemBox:`_legendItemBox_wpro0_90`,legendItemLine:`_legendItemLine_wpro0_95`,legendItemPoint:`_legendItemPoint_wpro0_103`,legendItemText:`_legendItemText_wpro0_110`,scrollbars:`_scrollbars_wpro0_113`,dropzoneContainer:`_dropzoneContainer_wpro0_140`,dropzone:`_dropzone_wpro0_140`,left:`_left_wpro0_149`,right:`_right_wpro0_153`,top:`_top_wpro0_157`,bottom:`_bottom_wpro0_161`,dropzonePlaceholder:`_dropzonePlaceholder_wpro0_165`,isActive:`_isActive_wpro0_173`,resizeContainer:`_resizeContainer_wpro0_176`},W9=e=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,width:`1em`,height:`1em`,...e,children:(0,P.jsx)(`circle`,{cx:12,cy:12,r:12,fill:`currentColor`})});let G9=function(e){return e.LINE=`line`,e.BAR=`bar`,e.PIE=`pie`,e.SCATTER=`scatter`,e}({}),Hle=function(e){return e.VERTICAL=`vertical`,e.HORIZONTAL=`horizontal`,e}({});var Ule=e=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,width:`1em`,height:`1em`,...e,children:(0,P.jsx)(`rect`,{x:2,y:2,width:20,height:20,fill:`currentColor`})}),Wle=e=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,width:`1em`,height:`1em`,...e,children:(0,P.jsx)(`rect`,{x:3,y:3,width:18,height:18,fill:`currentColor`,transform:`rotate(45 12 12)`})}),Gle=e=>(0,P.jsx)(`svg`,{height:`1em`,viewBox:`0 0 24 24`,width:`1em`,xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,...e,children:(0,P.jsx)(`path`,{d:`m22.7998 22.0623h-21.5996c-.21066.0001-.417617-.0554-.600067-.1607-.182451-.1053-.333965-.2567-.439311-.4392-.1053464-.1824-.16081228-.3893-.160822-.6s.0554372-.4176.160767-.6l10.799833-18.70518c.1139-.17137.2684-.31191.4497-.40913.1814-.09722.3839-.14809.5897-.14809s.4083.05087.5897.14809c.1813.09722.3358.23776.4497.40913l10.7998 18.70518c.1054.1824.1608.3893.1608.6s-.0555.4176-.1608.6c-.1054.1825-.2569.3339-.4393.4392-.1825.1053-.3894.1608-.6001.1607z`,fill:`currentColor`})}),K9=16,q9=({dataset:e})=>{let{borderColor:t,borderDash:n,borderWidth:r}=e??{},[i,a]=n??[],o=i&&a?(K9-i)/2%(i+a)*-1:0,s=e?.borderDash?.join(` `)||``;return(0,P.jsx)(`span`,{className:U9.legendItemLine,children:(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 ${K9} ${K9}`,width:`100%`,height:`100%`,children:(0,P.jsx)(`line`,{x1:`0`,y1:`50%`,x2:`100%`,y2:`50%`,stroke:t,strokeWidth:r,strokeDasharray:s,strokeDashoffset:o})})})},Kle=({dataset:e})=>{let{pointBackgroundColor:t,pointRadius:n,pointStyle:r=``}=e??{};if(!n)return null;let i=n*2,a={circle:(0,P.jsx)(W9,{}),triangle:(0,P.jsx)(Gle,{}),rectRot:(0,P.jsx)(Wle,{}),rect:(0,P.jsx)(Ule,{})};return(0,P.jsx)(`span`,{className:U9.legendItemPoint,children:(0,P.jsx)(_5,{icon:a?.[r]??(0,P.jsx)(W9,{}),size:i,color:t})})},qle=({dataset:e})=>{let{backgroundColor:t}=e??{},n={backgroundColor:t};return(0,P.jsx)(`span`,{className:U9.legendItemBox,style:n})};const J9=({dataset:e})=>{let{annotationType:t,showLine:n}=e??{};switch(t){case ne.Box:case ne.Ellipse:return(0,P.jsx)(qle,{dataset:e});case ne.Line:return(0,P.jsx)(q9,{dataset:e});default:return(0,P.jsxs)(P.Fragment,{children:[n&&(0,P.jsx)(q9,{dataset:e}),(0,P.jsx)(Kle,{dataset:e})]})}};J9.__docgenInfo={description:``,methods:[],displayName:`LegendItemLine`};var Jle=16,Yle=(e,t,n)=>{switch(t){case G9.LINE:return(0,P.jsx)(J9,{dataset:e});case G9.BAR:{let{backgroundColor:t}=e??{},r=t instanceof Array?t?.[n]:t;return(0,P.jsx)(`span`,{className:U9.legendItemBox,children:(0,P.jsx)(zle,{color:r})})}case G9.PIE:return(0,P.jsx)(`span`,{className:U9.legendItemPoint,children:(0,P.jsx)(_5,{icon:(0,P.jsx)(W9,{})})});case G9.SCATTER:{let{backgroundColor:t,borderColor:r}=e??{},i=t instanceof Array?t?.[n]:t;return(0,P.jsx)(`span`,{className:U9.legendItemPoint,children:(0,P.jsx)(Fle,{color:i??r})})}default:return null}},Y9=({hidden:e,dataset:t,handleClick:n,chartType:r,index:i})=>(0,P.jsxs)(`div`,{className:(0,I.default)(U9?.legendItem,e&&U9?.isHidden),onClick:n,children:[(0,P.jsx)(`span`,{className:U9.legendItemSymbol,style:{width:Jle},children:Yle(t,r,i)}),(0,P.jsx)(`span`,{className:U9.legendItemText,children:t?.label})]}),Xle=Y9;Y9.__docgenInfo={description:``,methods:[],displayName:`LegendItem`,props:{hidden:{required:!0,tsType:{name:`boolean`},description:``},dataset:{required:!0,tsType:{name:`union`,raw:`| IGeneratedLineChartDataset
304
- | IGenerateBarChartDataset
305
- | IGeneratedPieChartDataset
306
- | IGeneratedScatterChartDataset`,elements:[{name:`IGeneratedLineChartDataset`},{name:`IGenerateBarChartDataset`},{name:`IGeneratedPieChartDataset`},{name:`IGeneratedScatterChartDataset`}]},description:``},handleClick:{required:!0,tsType:{name:`MouseEventHandler`,elements:[{name:`HTMLDivElement`}],raw:`MouseEventHandler<HTMLDivElement>`},description:``},chartType:{required:!0,tsType:{name:`ChartType`},description:``},index:{required:!0,tsType:{name:`number`},description:``}}};var Zle=e=>{let t=Je(e,`options.plugins.annotation.annotations`,null);return!t||!Object.keys(t).length?[]:Object.values(t)},Qle=e=>y(e?.options?.plugins?.legend?.labels?.generateLabels?.(e))??[];const $le=e=>{let t=Qle(e),n=Zle(e);return pd(t,e=>{let t=fd(n,t=>e.text===t?.label?.content);return t?{...e,hidden:!t?.display}:e})};var X9=n(((e,t)=>{(function(n){var r;typeof e==`object`?t.exports=n():typeof define==`function`&&define.amd?define(n):(typeof window<`u`?r=window:typeof global<`u`?r=global:typeof self<`u`&&(r=self),r.objectHash=n())})(function(){return function e(t,n,r){function i(s,c){if(!n[s]){if(!t[s]){var l=typeof a==`function`&&a;if(!c&&l)return l(s,!0);if(o)return o(s,!0);throw Error(`Cannot find module '`+s+`'`)}c=n[s]={exports:{}},t[s][0].call(c.exports,function(e){var n=t[s][1][e];return i(n||e)},c,c.exports,e,t,n,r)}return n[s].exports}for(var o=typeof a==`function`&&a,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){(function(r,i,a,o,s,c,l,u,d){var f=e(`crypto`);function p(e,t){t=g(e,t);var n;return(n=t.algorithm===`passthrough`?new y:f.createHash(t.algorithm)).write===void 0&&(n.write=n.update,n.end=n.update),v(t,n).dispatch(e),n.update||n.end(``),n.digest?n.digest(t.encoding===`buffer`?void 0:t.encoding):(e=n.read(),t.encoding===`buffer`?e:e.toString(t.encoding))}(n=t.exports=p).sha1=function(e){return p(e)},n.keys=function(e){return p(e,{excludeValues:!0,algorithm:`sha1`,encoding:`hex`})},n.MD5=function(e){return p(e,{algorithm:`md5`,encoding:`hex`})},n.keysMD5=function(e){return p(e,{algorithm:`md5`,encoding:`hex`,excludeValues:!0})};var m=f.getHashes?f.getHashes().slice():[`sha1`,`md5`],h=(m.push(`passthrough`),[`buffer`,`hex`,`binary`,`base64`]);function g(e,t){var n={};if(n.algorithm=(t||={}).algorithm||`sha1`,n.encoding=t.encoding||`hex`,n.excludeValues=!!t.excludeValues,n.algorithm=n.algorithm.toLowerCase(),n.encoding=n.encoding.toLowerCase(),n.ignoreUnknown=!0===t.ignoreUnknown,n.respectType=!1!==t.respectType,n.respectFunctionNames=!1!==t.respectFunctionNames,n.respectFunctionProperties=!1!==t.respectFunctionProperties,n.unorderedArrays=!0===t.unorderedArrays,n.unorderedSets=!1!==t.unorderedSets,n.unorderedObjects=!1!==t.unorderedObjects,n.replacer=t.replacer||void 0,n.excludeKeys=t.excludeKeys||void 0,e===void 0)throw Error(`Object argument required.`);for(var r=0;r<m.length;++r)m[r].toLowerCase()===n.algorithm.toLowerCase()&&(n.algorithm=m[r]);if(m.indexOf(n.algorithm)===-1)throw Error(`Algorithm "`+n.algorithm+`" not supported. supported values: `+m.join(`, `));if(h.indexOf(n.encoding)===-1&&n.algorithm!==`passthrough`)throw Error(`Encoding "`+n.encoding+`" not supported. supported values: `+h.join(`, `));return n}function _(e){if(typeof e==`function`)return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(e))!=null}function v(e,t,n){n||=[];function r(e){return t.update?t.update(e,`utf8`):t.write(e,`utf8`)}return{dispatch:function(t){return this[`_`+((t=e.replacer?e.replacer(t):t)===null?`null`:typeof t)](t)},_object:function(t){var i,o=Object.prototype.toString.call(t),s=/\[object (.*)\]/i.exec(o);if(s=(s=s?s[1]:`unknown:[`+o+`]`).toLowerCase(),0<=(o=n.indexOf(t)))return this.dispatch(`[CIRCULAR:`+o+`]`);if(n.push(t),a!==void 0&&a.isBuffer&&a.isBuffer(t))return r(`buffer:`),r(t);if(s===`object`||s===`function`||s===`asyncfunction`)return o=Object.keys(t),e.unorderedObjects&&(o=o.sort()),!1===e.respectType||_(t)||o.splice(0,0,`prototype`,`__proto__`,`constructor`),e.excludeKeys&&(o=o.filter(function(t){return!e.excludeKeys(t)})),r(`object:`+o.length+`:`),i=this,o.forEach(function(n){i.dispatch(n),r(`:`),e.excludeValues||i.dispatch(t[n]),r(`,`)});if(!this[`_`+s]){if(e.ignoreUnknown)return r(`[`+s+`]`);throw Error(`Unknown object type "`+s+`"`)}this[`_`+s](t)},_array:function(t,i){i=i===void 0?!1!==e.unorderedArrays:i;var a=this;if(r(`array:`+t.length+`:`),!i||t.length<=1)return t.forEach(function(e){return a.dispatch(e)});var o=[],i=t.map(function(t){var r=new y,i=n.slice();return v(e,r,i).dispatch(t),o=o.concat(i.slice(n.length)),r.read().toString()});return n=n.concat(o),i.sort(),this._array(i,!1)},_date:function(e){return r(`date:`+e.toJSON())},_symbol:function(e){return r(`symbol:`+e.toString())},_error:function(e){return r(`error:`+e.toString())},_boolean:function(e){return r(`bool:`+e.toString())},_string:function(e){r(`string:`+e.length+`:`),r(e.toString())},_function:function(t){r(`fn:`),_(t)?this.dispatch(`[native]`):this.dispatch(t.toString()),!1!==e.respectFunctionNames&&this.dispatch(`function-name:`+String(t.name)),e.respectFunctionProperties&&this._object(t)},_number:function(e){return r(`number:`+e.toString())},_xml:function(e){return r(`xml:`+e.toString())},_null:function(){return r(`Null`)},_undefined:function(){return r(`Undefined`)},_regexp:function(e){return r(`regex:`+e.toString())},_uint8array:function(e){return r(`uint8array:`),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return r(`uint8clampedarray:`),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return r(`int8array:`),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return r(`uint16array:`),this.dispatch(Array.prototype.slice.call(e))},_int16array:function(e){return r(`int16array:`),this.dispatch(Array.prototype.slice.call(e))},_uint32array:function(e){return r(`uint32array:`),this.dispatch(Array.prototype.slice.call(e))},_int32array:function(e){return r(`int32array:`),this.dispatch(Array.prototype.slice.call(e))},_float32array:function(e){return r(`float32array:`),this.dispatch(Array.prototype.slice.call(e))},_float64array:function(e){return r(`float64array:`),this.dispatch(Array.prototype.slice.call(e))},_arraybuffer:function(e){return r(`arraybuffer:`),this.dispatch(new Uint8Array(e))},_url:function(e){return r(`url:`+e.toString())},_map:function(t){return r(`map:`),t=Array.from(t),this._array(t,!1!==e.unorderedSets)},_set:function(t){return r(`set:`),t=Array.from(t),this._array(t,!1!==e.unorderedSets)},_file:function(e){return r(`file:`),this.dispatch([e.name,e.size,e.type,e.lastModfied])},_blob:function(){if(e.ignoreUnknown)return r(`[blob]`);throw Error(`Hashing Blob objects is currently not supported
307
- (see https://github.com/puleos/object-hash/issues/26)
308
- Use "options.replacer" or "options.ignoreUnknown"
309
- `)},_domwindow:function(){return r(`domwindow`)},_bigint:function(e){return r(`bigint:`+e.toString())},_process:function(){return r(`process`)},_timer:function(){return r(`timer`)},_pipe:function(){return r(`pipe`)},_tcp:function(){return r(`tcp`)},_udp:function(){return r(`udp`)},_tty:function(){return r(`tty`)},_statwatcher:function(){return r(`statwatcher`)},_securecontext:function(){return r(`securecontext`)},_connection:function(){return r(`connection`)},_zlib:function(){return r(`zlib`)},_context:function(){return r(`context`)},_nodescript:function(){return r(`nodescript`)},_httpparser:function(){return r(`httpparser`)},_dataview:function(){return r(`dataview`)},_signal:function(){return r(`signal`)},_fsevent:function(){return r(`fsevent`)},_tlswrap:function(){return r(`tlswrap`)}}}function y(){return{buf:``,write:function(e){this.buf+=e},end:function(e){this.buf+=e},read:function(){return this.buf}}}n.writeToStream=function(e,t,n){return n===void 0&&(n=t,t={}),v(t=g(e,t),n).dispatch(e)}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/fake_9a5aa49d.js`,`/`)},{buffer:3,crypto:5,lYpoI2:11}],2:[function(e,t,n){(function(e,t,r,i,a,o,s,c,l){(function(e){var t=typeof Uint8Array<`u`?Uint8Array:Array,n=43,r=47,i=48,a=97,o=65,s=45,c=95;function l(e){return e=e.charCodeAt(0),e===n||e===s?62:e===r||e===c?63:e<i?-1:e<i+10?e-i+26+26:e<o+26?e-o:e<a+26?e-a+26:void 0}e.toByteArray=function(e){var n,r;if(0<e.length%4)throw Error(`Invalid string. Length must be a multiple of 4`);var i=e.length,i=e.charAt(i-2)===`=`?2:e.charAt(i-1)===`=`?1:0,a=new t(3*e.length/4-i),o=0<i?e.length-4:e.length,s=0;function c(e){a[s++]=e}for(n=0;n<o;n+=4)c((16711680&(r=l(e.charAt(n))<<18|l(e.charAt(n+1))<<12|l(e.charAt(n+2))<<6|l(e.charAt(n+3))))>>16),c((65280&r)>>8),c(255&r);return i==2?c(255&(r=l(e.charAt(n))<<2|l(e.charAt(n+1))>>4)):i==1&&(c((r=l(e.charAt(n))<<10|l(e.charAt(n+1))<<4|l(e.charAt(n+2))>>2)>>8&255),c(255&r)),a},e.fromByteArray=function(e){var t,n,r,i,a=e.length%3,o=``;function s(e){return`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.charAt(e)}for(t=0,r=e.length-a;t<r;t+=3)n=(e[t]<<16)+(e[t+1]<<8)+e[t+2],o+=s((i=n)>>18&63)+s(i>>12&63)+s(i>>6&63)+s(63&i);switch(a){case 1:o=(o+=s((n=e[e.length-1])>>2))+s(n<<4&63)+`==`;break;case 2:o=(o=(o+=s((n=(e[e.length-2]<<8)+e[e.length-1])>>10))+s(n>>4&63))+s(n<<2&63)+`=`}return o}})(n===void 0?this.base64js={}:n)}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js`,`/node_modules/gulp-browserify/node_modules/base64-js/lib`)},{buffer:3,lYpoI2:11}],3:[function(e,t,n){(function(t,r,i,a,o,s,c,l,u){var d=e(`base64-js`),f=e(`ieee754`);function i(e,t,n){if(!(this instanceof i))return new i(e,t,n);var r,a,o,s,c=typeof e;if(t===`base64`&&c==`string`)for(e=(s=e).trim?s.trim():s.replace(/^\s+|\s+$/g,``);e.length%4!=0;)e+=`=`;if(c==`number`)r=A(e);else if(c==`string`)r=i.byteLength(e,t);else{if(c!=`object`)throw Error(`First argument needs to be a number, array or string.`);r=A(e.length)}if(i._useTypedArrays?a=i._augment(new Uint8Array(r)):((a=this).length=r,a._isBuffer=!0),i._useTypedArrays&&typeof e.byteLength==`number`)a._set(e);else if(ee(s=e)||i.isBuffer(s)||s&&typeof s==`object`&&typeof s.length==`number`)for(o=0;o<r;o++)i.isBuffer(e)?a[o]=e.readUInt8(o):a[o]=e[o];else if(c==`string`)a.write(e,0,t);else if(c==`number`&&!i._useTypedArrays&&!n)for(o=0;o<r;o++)a[o]=0;return a}function p(e,t,n,r){return i._charsWritten=re(function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function m(e,t,n,r){return i._charsWritten=re(function(e){for(var t,n,r=[],i=0;i<e.length;i++)n=e.charCodeAt(i),t=n>>8,n%=256,r.push(n),r.push(t);return r}(t),e,n,r)}function h(e,t,n){var r=``;n=Math.min(e.length,n);for(var i=t;i<n;i++)r+=String.fromCharCode(e[i]);return r}function g(e,t,n,r){r||(M(typeof n==`boolean`,`missing or invalid endian`),M(t!=null,`missing offset`),M(t+1<e.length,`Trying to read beyond buffer length`));var i,r=e.length;if(!(r<=t))return n?(i=e[t],t+1<r&&(i|=e[t+1]<<8)):(i=e[t]<<8,t+1<r&&(i|=e[t+1])),i}function _(e,t,n,r){r||(M(typeof n==`boolean`,`missing or invalid endian`),M(t!=null,`missing offset`),M(t+3<e.length,`Trying to read beyond buffer length`));var i,r=e.length;if(!(r<=t))return n?(t+2<r&&(i=e[t+2]<<16),t+1<r&&(i|=e[t+1]<<8),i|=e[t],t+3<r&&(i+=e[t+3]<<24>>>0)):(t+1<r&&(i=e[t+1]<<16),t+2<r&&(i|=e[t+2]<<8),t+3<r&&(i|=e[t+3]),i+=e[t]<<24>>>0),i}function v(e,t,n,r){if(r||(M(typeof n==`boolean`,`missing or invalid endian`),M(t!=null,`missing offset`),M(t+1<e.length,`Trying to read beyond buffer length`)),!(e.length<=t))return r=g(e,t,n,!0),32768&r?-1*(65535-r+1):r}function y(e,t,n,r){if(r||(M(typeof n==`boolean`,`missing or invalid endian`),M(t!=null,`missing offset`),M(t+3<e.length,`Trying to read beyond buffer length`)),!(e.length<=t))return r=_(e,t,n,!0),2147483648&r?-1*(4294967295-r+1):r}function b(e,t,n,r){return r||(M(typeof n==`boolean`,`missing or invalid endian`),M(t+3<e.length,`Trying to read beyond buffer length`)),f.read(e,t,n,23,4)}function x(e,t,n,r){return r||(M(typeof n==`boolean`,`missing or invalid endian`),M(t+7<e.length,`Trying to read beyond buffer length`)),f.read(e,t,n,52,8)}function S(e,t,n,r,i){if(i||(M(t!=null,`missing value`),M(typeof r==`boolean`,`missing or invalid endian`),M(n!=null,`missing offset`),M(n+1<e.length,`trying to write beyond buffer length`),ae(t,65535)),i=e.length,!(i<=n))for(var a=0,o=Math.min(i-n,2);a<o;a++)e[n+a]=(t&255<<8*(r?a:1-a))>>>8*(r?a:1-a)}function C(e,t,n,r,i){if(i||(M(t!=null,`missing value`),M(typeof r==`boolean`,`missing or invalid endian`),M(n!=null,`missing offset`),M(n+3<e.length,`trying to write beyond buffer length`),ae(t,4294967295)),i=e.length,!(i<=n))for(var a=0,o=Math.min(i-n,4);a<o;a++)e[n+a]=t>>>8*(r?a:3-a)&255}function w(e,t,n,r,i){i||(M(t!=null,`missing value`),M(typeof r==`boolean`,`missing or invalid endian`),M(n!=null,`missing offset`),M(n+1<e.length,`Trying to write beyond buffer length`),oe(t,32767,-32768)),e.length<=n||S(e,0<=t?t:65535+t+1,n,r,i)}function T(e,t,n,r,i){i||(M(t!=null,`missing value`),M(typeof r==`boolean`,`missing or invalid endian`),M(n!=null,`missing offset`),M(n+3<e.length,`Trying to write beyond buffer length`),oe(t,2147483647,-2147483648)),e.length<=n||C(e,0<=t?t:4294967295+t+1,n,r,i)}function E(e,t,n,r,i){i||(M(t!=null,`missing value`),M(typeof r==`boolean`,`missing or invalid endian`),M(n!=null,`missing offset`),M(n+3<e.length,`Trying to write beyond buffer length`),se(t,34028234663852886e22,-34028234663852886e22)),e.length<=n||f.write(e,t,n,r,23,4)}function D(e,t,n,r,i){i||(M(t!=null,`missing value`),M(typeof r==`boolean`,`missing or invalid endian`),M(n!=null,`missing offset`),M(n+7<e.length,`Trying to write beyond buffer length`),se(t,17976931348623157e292,-17976931348623157e292)),e.length<=n||f.write(e,t,n,r,52,8)}n.Buffer=i,n.SlowBuffer=i,n.INSPECT_MAX_BYTES=50,i.poolSize=8192,i._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},t.foo()===42&&typeof t.subarray==`function`}catch{return!1}}(),i.isEncoding=function(e){switch(String(e).toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`binary`:case`base64`:case`raw`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return!0;default:return!1}},i.isBuffer=function(e){return!(e==null||!e._isBuffer)},i.byteLength=function(e,t){var n;switch(e+=``,t||`utf8`){case`hex`:n=e.length/2;break;case`utf8`:case`utf-8`:n=te(e).length;break;case`ascii`:case`binary`:case`raw`:n=e.length;break;case`base64`:n=ne(e).length;break;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:n=2*e.length;break;default:throw Error(`Unknown encoding`)}return n},i.concat=function(e,t){if(M(ee(e),`Usage: Buffer.concat(list, [totalLength])
310
- list should be an Array.`),e.length===0)return new i(0);if(e.length===1)return e[0];if(typeof t!=`number`)for(a=t=0;a<e.length;a++)t+=e[a].length;for(var n=new i(t),r=0,a=0;a<e.length;a++){var o=e[a];o.copy(n,r),r+=o.length}return n},i.prototype.write=function(e,t,n,r){isFinite(t)?isFinite(n)||(r=n,n=void 0):(l=r,r=t,t=n,n=l),t=Number(t)||0;var a,o,s,c,l=this.length-t;switch((!n||l<(n=Number(n)))&&(n=l),r=String(r||`utf8`).toLowerCase()){case`hex`:a=function(e,t,n,r){n=Number(n)||0;var a=e.length-n;(!r||a<(r=Number(r)))&&(r=a),M((a=t.length)%2==0,`Invalid hex string`),a/2<r&&(r=a/2);for(var o=0;o<r;o++){var s=parseInt(t.substr(2*o,2),16);M(!isNaN(s),`Invalid hex string`),e[n+o]=s}return i._charsWritten=2*o,o}(this,e,t,n);break;case`utf8`:case`utf-8`:o=this,s=t,c=n,a=i._charsWritten=re(te(e),o,s,c);break;case`ascii`:case`binary`:a=p(this,e,t,n);break;case`base64`:o=this,s=t,c=n,a=i._charsWritten=re(ne(e),o,s,c);break;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:a=m(this,e,t,n);break;default:throw Error(`Unknown encoding`)}return a},i.prototype.toString=function(e,t,n){var r,i,a,o,s=this;if(e=String(e||`utf8`).toLowerCase(),t=Number(t)||0,(n=n===void 0?s.length:Number(n))===t)return``;switch(e){case`hex`:r=function(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||r<n)&&(n=r);for(var i=``,a=t;a<n;a++)i+=j(e[a]);return i}(s,t,n);break;case`utf8`:case`utf-8`:r=function(e,t,n){var r=``,i=``;n=Math.min(e.length,n);for(var a=t;a<n;a++)e[a]<=127?(r+=ie(i)+String.fromCharCode(e[a]),i=``):i+=`%`+e[a].toString(16);return r+ie(i)}(s,t,n);break;case`ascii`:case`binary`:r=h(s,t,n);break;case`base64`:i=s,o=n,r=(a=t)===0&&o===i.length?d.fromByteArray(i):d.fromByteArray(i.slice(a,o));break;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:r=function(e,t,n){for(var r=e.slice(t,n),i=``,a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}(s,t,n);break;default:throw Error(`Unknown encoding`)}return r},i.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}},i.prototype.copy=function(e,t,n,r){if(t||=0,(r=r||r===0?r:this.length)!==(n||=0)&&e.length!==0&&this.length!==0){M(n<=r,`sourceEnd < sourceStart`),M(0<=t&&t<e.length,`targetStart out of bounds`),M(0<=n&&n<this.length,`sourceStart out of bounds`),M(0<=r&&r<=this.length,`sourceEnd out of bounds`),r>this.length&&(r=this.length);var a=(r=e.length-t<r-n?e.length-t+n:r)-n;if(a<100||!i._useTypedArrays)for(var o=0;o<a;o++)e[o+t]=this[o+n];else e._set(this.subarray(n,n+a),t)}},i.prototype.slice=function(e,t){var n=this.length;if(e=k(e,n,0),t=k(t,n,n),i._useTypedArrays)return i._augment(this.subarray(e,t));for(var r=t-e,a=new i(r,void 0,!0),o=0;o<r;o++)a[o]=this[o+e];return a},i.prototype.get=function(e){return console.log(`.get() is deprecated. Access using array indexes instead.`),this.readUInt8(e)},i.prototype.set=function(e,t){return console.log(`.set() is deprecated. Access using array indexes instead.`),this.writeUInt8(e,t)},i.prototype.readUInt8=function(e,t){if(t||(M(e!=null,`missing offset`),M(e<this.length,`Trying to read beyond buffer length`)),!(e>=this.length))return this[e]},i.prototype.readUInt16LE=function(e,t){return g(this,e,!0,t)},i.prototype.readUInt16BE=function(e,t){return g(this,e,!1,t)},i.prototype.readUInt32LE=function(e,t){return _(this,e,!0,t)},i.prototype.readUInt32BE=function(e,t){return _(this,e,!1,t)},i.prototype.readInt8=function(e,t){if(t||(M(e!=null,`missing offset`),M(e<this.length,`Trying to read beyond buffer length`)),!(e>=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){return v(this,e,!0,t)},i.prototype.readInt16BE=function(e,t){return v(this,e,!1,t)},i.prototype.readInt32LE=function(e,t){return y(this,e,!0,t)},i.prototype.readInt32BE=function(e,t){return y(this,e,!1,t)},i.prototype.readFloatLE=function(e,t){return b(this,e,!0,t)},i.prototype.readFloatBE=function(e,t){return b(this,e,!1,t)},i.prototype.readDoubleLE=function(e,t){return x(this,e,!0,t)},i.prototype.readDoubleBE=function(e,t){return x(this,e,!1,t)},i.prototype.writeUInt8=function(e,t,n){n||(M(e!=null,`missing value`),M(t!=null,`missing offset`),M(t<this.length,`trying to write beyond buffer length`),ae(e,255)),t>=this.length||(this[t]=e)},i.prototype.writeUInt16LE=function(e,t,n){S(this,e,t,!0,n)},i.prototype.writeUInt16BE=function(e,t,n){S(this,e,t,!1,n)},i.prototype.writeUInt32LE=function(e,t,n){C(this,e,t,!0,n)},i.prototype.writeUInt32BE=function(e,t,n){C(this,e,t,!1,n)},i.prototype.writeInt8=function(e,t,n){n||(M(e!=null,`missing value`),M(t!=null,`missing offset`),M(t<this.length,`Trying to write beyond buffer length`),oe(e,127,-128)),t>=this.length||(0<=e?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n))},i.prototype.writeInt16LE=function(e,t,n){w(this,e,t,!0,n)},i.prototype.writeInt16BE=function(e,t,n){w(this,e,t,!1,n)},i.prototype.writeInt32LE=function(e,t,n){T(this,e,t,!0,n)},i.prototype.writeInt32BE=function(e,t,n){T(this,e,t,!1,n)},i.prototype.writeFloatLE=function(e,t,n){E(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){E(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){D(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){D(this,e,t,!1,n)},i.prototype.fill=function(e,t,n){if(t||=0,n||=this.length,M(typeof(e=typeof(e||=0)==`string`?e.charCodeAt(0):e)==`number`&&!isNaN(e),`value is not a number`),M(t<=n,`end < start`),n!==t&&this.length!==0){M(0<=t&&t<this.length,`start out of bounds`),M(0<=n&&n<=this.length,`end out of bounds`);for(var r=t;r<n;r++)this[r]=e}},i.prototype.inspect=function(){for(var e=[],t=this.length,r=0;r<t;r++)if(e[r]=j(this[r]),r===n.INSPECT_MAX_BYTES){e[r+1]=`...`;break}return`<Buffer `+e.join(` `)+`>`},i.prototype.toArrayBuffer=function(){if(typeof Uint8Array>`u`)throw Error(`Buffer.toArrayBuffer not supported in this browser`);if(i._useTypedArrays)return new i(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;t<n;t+=1)e[t]=this[t];return e.buffer};var O=i.prototype;function k(e,t,n){return typeof e==`number`?t<=(e=~~e)?t:0<=e||0<=(e+=t)?e:0:n}function A(e){return(e=~~Math.ceil(+e))<0?0:e}function ee(e){return(Array.isArray||function(e){return Object.prototype.toString.call(e)===`[object Array]`})(e)}function j(e){return e<16?`0`+e.toString(16):e.toString(16)}function te(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=127)t.push(e.charCodeAt(n));else for(var i=n,a=(55296<=r&&r<=57343&&n++,encodeURIComponent(e.slice(i,n+1)).substr(1).split(`%`)),o=0;o<a.length;o++)t.push(parseInt(a[o],16))}return t}function ne(e){return d.toByteArray(e)}function re(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);i++)t[i+n]=e[i];return i}function ie(e){try{return decodeURIComponent(e)}catch{return`�`}}function ae(e,t){M(typeof e==`number`,`cannot write a non-number as a number`),M(0<=e,`specified a negative value for writing an unsigned value`),M(e<=t,`value is larger than maximum value for type`),M(Math.floor(e)===e,`value has a fractional component`)}function oe(e,t,n){M(typeof e==`number`,`cannot write a non-number as a number`),M(e<=t,`value larger than maximum allowed value`),M(n<=e,`value smaller than minimum allowed value`),M(Math.floor(e)===e,`value has a fractional component`)}function se(e,t,n){M(typeof e==`number`,`cannot write a non-number as a number`),M(e<=t,`value larger than maximum allowed value`),M(n<=e,`value smaller than minimum allowed value`)}function M(e,t){if(!e)throw Error(t||`Failed assertion`)}i._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=O.get,e.set=O.set,e.write=O.write,e.toString=O.toString,e.toLocaleString=O.toString,e.toJSON=O.toJSON,e.copy=O.copy,e.slice=O.slice,e.readUInt8=O.readUInt8,e.readUInt16LE=O.readUInt16LE,e.readUInt16BE=O.readUInt16BE,e.readUInt32LE=O.readUInt32LE,e.readUInt32BE=O.readUInt32BE,e.readInt8=O.readInt8,e.readInt16LE=O.readInt16LE,e.readInt16BE=O.readInt16BE,e.readInt32LE=O.readInt32LE,e.readInt32BE=O.readInt32BE,e.readFloatLE=O.readFloatLE,e.readFloatBE=O.readFloatBE,e.readDoubleLE=O.readDoubleLE,e.readDoubleBE=O.readDoubleBE,e.writeUInt8=O.writeUInt8,e.writeUInt16LE=O.writeUInt16LE,e.writeUInt16BE=O.writeUInt16BE,e.writeUInt32LE=O.writeUInt32LE,e.writeUInt32BE=O.writeUInt32BE,e.writeInt8=O.writeInt8,e.writeInt16LE=O.writeInt16LE,e.writeInt16BE=O.writeInt16BE,e.writeInt32LE=O.writeInt32LE,e.writeInt32BE=O.writeInt32BE,e.writeFloatLE=O.writeFloatLE,e.writeFloatBE=O.writeFloatBE,e.writeDoubleLE=O.writeDoubleLE,e.writeDoubleBE=O.writeDoubleBE,e.fill=O.fill,e.inspect=O.inspect,e.toArrayBuffer=O.toArrayBuffer,e}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/buffer/index.js`,`/node_modules/gulp-browserify/node_modules/buffer`)},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(e,t,n){(function(n,r,i,a,o,s,c,l,u){var i=e(`buffer`).Buffer,d=4,f=new i(d);f.fill(0),t.exports={hash:function(e,t,n,r){for(var a=t(function(e,t){e.length%d!=0&&(n=e.length+(d-e.length%d),e=i.concat([e,f],n));for(var n,r=[],a=t?e.readInt32BE:e.readInt32LE,o=0;o<e.length;o+=d)r.push(a.call(e,o));return r}(e=i.isBuffer(e)?e:new i(e),r),8*e.length),t=r,o=new i(n),s=t?o.writeInt32BE:o.writeInt32LE,c=0;c<a.length;c++)s.call(o,a[c],4*c,!0);return o}}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js`,`/node_modules/gulp-browserify/node_modules/crypto-browserify`)},{buffer:3,lYpoI2:11}],5:[function(e,t,n){(function(t,r,i,a,o,s,c,l,u){var i=e(`buffer`).Buffer,d=e(`./sha`),f=e(`./sha256`),p=e(`./rng`),m={sha1:d,sha256:f,md5:e(`./md5`)},h=64,g=new i(h);function _(e,t){var n=m[e||=`sha1`],r=[];return n||v(`algorithm:`,e,`is not yet supported`),{update:function(e){return i.isBuffer(e)||(e=new i(e)),r.push(e),e.length,this},digest:function(e){var a=i.concat(r),a=t?function(e,t,n){i.isBuffer(t)||(t=new i(t)),i.isBuffer(n)||(n=new i(n)),t.length>h?t=e(t):t.length<h&&(t=i.concat([t,g],h));for(var r=new i(h),a=new i(h),o=0;o<h;o++)r[o]=54^t[o],a[o]=92^t[o];return n=e(i.concat([r,n])),e(i.concat([a,n]))}(n,t,a):n(a);return r=null,e?a.toString(e):a}}}function v(){var e=[].slice.call(arguments).join(` `);throw Error([e,`we accept pull requests`,`http://github.com/dominictarr/crypto-browserify`].join(`
311
- `))}g.fill(0),n.createHash=function(e){return _(e)},n.createHmac=_,n.randomBytes=function(e,t){if(!t||!t.call)return new i(p(e));try{t.call(this,void 0,new i(p(e)))}catch(e){t(e)}};var y,b=[`createCredentials`,`createCipher`,`createCipheriv`,`createDecipher`,`createDecipheriv`,`createSign`,`createVerify`,`createDiffieHellman`,`pbkdf2`],x=function(e){n[e]=function(){v(`sorry,`,e,`is not implemented yet`)}};for(y in b)x(b[y],y)}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js`,`/node_modules/gulp-browserify/node_modules/crypto-browserify`)},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(e,t,n){(function(n,r,i,a,o,s,c,l,u){var d=e(`./helpers`);function f(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var n=1732584193,r=-271733879,i=-1732584194,a=271733878,o=0;o<e.length;o+=16){var s=n,c=r,l=i,u=a,n=m(n,r,i,a,e[o+0],7,-680876936),a=m(a,n,r,i,e[o+1],12,-389564586),i=m(i,a,n,r,e[o+2],17,606105819),r=m(r,i,a,n,e[o+3],22,-1044525330);n=m(n,r,i,a,e[o+4],7,-176418897),a=m(a,n,r,i,e[o+5],12,1200080426),i=m(i,a,n,r,e[o+6],17,-1473231341),r=m(r,i,a,n,e[o+7],22,-45705983),n=m(n,r,i,a,e[o+8],7,1770035416),a=m(a,n,r,i,e[o+9],12,-1958414417),i=m(i,a,n,r,e[o+10],17,-42063),r=m(r,i,a,n,e[o+11],22,-1990404162),n=m(n,r,i,a,e[o+12],7,1804603682),a=m(a,n,r,i,e[o+13],12,-40341101),i=m(i,a,n,r,e[o+14],17,-1502002290),n=h(n,r=m(r,i,a,n,e[o+15],22,1236535329),i,a,e[o+1],5,-165796510),a=h(a,n,r,i,e[o+6],9,-1069501632),i=h(i,a,n,r,e[o+11],14,643717713),r=h(r,i,a,n,e[o+0],20,-373897302),n=h(n,r,i,a,e[o+5],5,-701558691),a=h(a,n,r,i,e[o+10],9,38016083),i=h(i,a,n,r,e[o+15],14,-660478335),r=h(r,i,a,n,e[o+4],20,-405537848),n=h(n,r,i,a,e[o+9],5,568446438),a=h(a,n,r,i,e[o+14],9,-1019803690),i=h(i,a,n,r,e[o+3],14,-187363961),r=h(r,i,a,n,e[o+8],20,1163531501),n=h(n,r,i,a,e[o+13],5,-1444681467),a=h(a,n,r,i,e[o+2],9,-51403784),i=h(i,a,n,r,e[o+7],14,1735328473),n=g(n,r=h(r,i,a,n,e[o+12],20,-1926607734),i,a,e[o+5],4,-378558),a=g(a,n,r,i,e[o+8],11,-2022574463),i=g(i,a,n,r,e[o+11],16,1839030562),r=g(r,i,a,n,e[o+14],23,-35309556),n=g(n,r,i,a,e[o+1],4,-1530992060),a=g(a,n,r,i,e[o+4],11,1272893353),i=g(i,a,n,r,e[o+7],16,-155497632),r=g(r,i,a,n,e[o+10],23,-1094730640),n=g(n,r,i,a,e[o+13],4,681279174),a=g(a,n,r,i,e[o+0],11,-358537222),i=g(i,a,n,r,e[o+3],16,-722521979),r=g(r,i,a,n,e[o+6],23,76029189),n=g(n,r,i,a,e[o+9],4,-640364487),a=g(a,n,r,i,e[o+12],11,-421815835),i=g(i,a,n,r,e[o+15],16,530742520),n=_(n,r=g(r,i,a,n,e[o+2],23,-995338651),i,a,e[o+0],6,-198630844),a=_(a,n,r,i,e[o+7],10,1126891415),i=_(i,a,n,r,e[o+14],15,-1416354905),r=_(r,i,a,n,e[o+5],21,-57434055),n=_(n,r,i,a,e[o+12],6,1700485571),a=_(a,n,r,i,e[o+3],10,-1894986606),i=_(i,a,n,r,e[o+10],15,-1051523),r=_(r,i,a,n,e[o+1],21,-2054922799),n=_(n,r,i,a,e[o+8],6,1873313359),a=_(a,n,r,i,e[o+15],10,-30611744),i=_(i,a,n,r,e[o+6],15,-1560198380),r=_(r,i,a,n,e[o+13],21,1309151649),n=_(n,r,i,a,e[o+4],6,-145523070),a=_(a,n,r,i,e[o+11],10,-1120210379),i=_(i,a,n,r,e[o+2],15,718787259),r=_(r,i,a,n,e[o+9],21,-343485551),n=v(n,s),r=v(r,c),i=v(i,l),a=v(a,u)}return[n,r,i,a]}function p(e,t,n,r,i,a){return v((t=v(v(t,e),v(r,a)))<<i|t>>>32-i,n)}function m(e,t,n,r,i,a,o){return p(t&n|~t&r,e,t,i,a,o)}function h(e,t,n,r,i,a,o){return p(t&r|n&~r,e,t,i,a,o)}function g(e,t,n,r,i,a,o){return p(t^n^r,e,t,i,a,o)}function _(e,t,n,r,i,a,o){return p(n^(t|~r),e,t,i,a,o)}function v(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}t.exports=function(e){return d.hash(e,f,16)}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js`,`/node_modules/gulp-browserify/node_modules/crypto-browserify`)},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(e,t,n){(function(e,n,r,i,a,o,s,c,l){var u;t.exports=u||function(e){for(var t,n=Array(e),r=0;r<e;r++)!(3&r)&&(t=4294967296*Math.random()),n[r]=t>>>((3&r)<<3)&255;return n}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js`,`/node_modules/gulp-browserify/node_modules/crypto-browserify`)},{buffer:3,lYpoI2:11}],8:[function(e,t,n){(function(n,r,i,a,o,s,c,l,u){var d=e(`./helpers`);function f(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var n,r,i,a=Array(80),o=1732584193,s=-271733879,c=-1732584194,l=271733878,u=-1009589776,d=0;d<e.length;d+=16){for(var f=o,h=s,g=c,_=l,v=u,y=0;y<80;y++){a[y]=y<16?e[d+y]:m(a[y-3]^a[y-8]^a[y-14]^a[y-16],1);var b=p(p(m(o,5),(b=s,r=c,i=l,(n=y)<20?b&r|~b&i:!(n<40)&&n<60?b&r|b&i|r&i:b^r^i)),p(p(u,a[y]),(n=y)<20?1518500249:n<40?1859775393:n<60?-1894007588:-899497514)),u=l,l=c,c=m(s,30),s=o,o=b}o=p(o,f),s=p(s,h),c=p(c,g),l=p(l,_),u=p(u,v)}return[o,s,c,l,u]}function p(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function m(e,t){return e<<t|e>>>32-t}t.exports=function(e){return d.hash(e,f,20,!0)}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js`,`/node_modules/gulp-browserify/node_modules/crypto-browserify`)},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(e,t,n){(function(n,r,i,a,o,s,c,l,u){function d(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function f(e,t){var n,r=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],i=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],a=Array(64);e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var o,s,c=0;c<e.length;c+=16){for(var l=i[0],u=i[1],f=i[2],p=i[3],g=i[4],_=i[5],v=i[6],y=i[7],b=0;b<64;b++)a[b]=b<16?e[b+c]:d(d(d((s=a[b-2],m(s,17)^m(s,19)^h(s,10)),a[b-7]),(s=a[b-15],m(s,7)^m(s,18)^h(s,3))),a[b-16]),n=d(d(d(d(y,m(s=g,6)^m(s,11)^m(s,25)),g&_^~g&v),r[b]),a[b]),o=d(m(o=l,2)^m(o,13)^m(o,22),l&u^l&f^u&f),y=v,v=_,_=g,g=d(p,n),p=f,f=u,u=l,l=d(n,o);i[0]=d(l,i[0]),i[1]=d(u,i[1]),i[2]=d(f,i[2]),i[3]=d(p,i[3]),i[4]=d(g,i[4]),i[5]=d(_,i[5]),i[6]=d(v,i[6]),i[7]=d(y,i[7])}return i}var p=e(`./helpers`),m=function(e,t){return e>>>t|e<<32-t},h=function(e,t){return e>>>t};t.exports=function(e){return p.hash(e,f,32,!0)}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js`,`/node_modules/gulp-browserify/node_modules/crypto-browserify`)},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(e,t,n){(function(e,t,r,i,a,o,s,c,l){n.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=n?-1:1,i=e[t+d];for(d+=f,a=i&(1<<-u)-1,i>>=-u,u+=s;0<u;a=256*a+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;0<u;o=256*o+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else{if(a===c)return o?NaN:1/0*(i?-1:1);o+=2**r,a-=l}return(i?-1:1)*o*2**(a-r)},n.write=function(e,t,n,r,i,a){var o,s,c=8*a-i-1,l=(1<<c)-1,u=l>>1,d=i===23?2**-24-2**-77:0,f=r?0:a-1,p=r?1:-1,a=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(r=2**-o)<1&&(o--,r*=2),2<=(t+=1<=o+u?d/r:d*2**(1-u))*r&&(o++,r/=2),l<=o+u?(s=0,o=l):1<=o+u?(s=(t*r-1)*2**i,o+=u):(s=t*2**(u-1)*2**i,o=0));8<=i;e[n+f]=255&s,f+=p,s/=256,i-=8);for(o=o<<i|s,c+=i;0<c;e[n+f]=255&o,f+=p,o/=256,c-=8);e[n+f-p]|=128*a}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/ieee754/index.js`,`/node_modules/gulp-browserify/node_modules/ieee754`)},{buffer:3,lYpoI2:11}],11:[function(e,t,n){(function(e,n,r,i,a,o,s,c,l){var u,d,f;function p(){}(e=t.exports={}).nextTick=(d=typeof window<`u`&&window.setImmediate,f=typeof window<`u`&&window.postMessage&&window.addEventListener,d?function(e){return window.setImmediate(e)}:f?(u=[],window.addEventListener(`message`,function(e){var t=e.source;t!==window&&t!==null||e.data!==`process-tick`||(e.stopPropagation(),0<u.length&&u.shift()())},!0),function(e){u.push(e),window.postMessage(`process-tick`,`*`)}):function(e){setTimeout(e,0)}),e.title=`browser`,e.browser=!0,e.env={},e.argv=[],e.on=p,e.addListener=p,e.once=p,e.off=p,e.removeListener=p,e.removeAllListeners=p,e.emit=p,e.binding=function(e){throw Error(`process.binding is not supported`)},e.cwd=function(){return`/`},e.chdir=function(e){throw Error(`process.chdir is not supported`)}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/process/browser.js`,`/node_modules/gulp-browserify/node_modules/process`)},{buffer:3,lYpoI2:11}]},{},[1])(1)})})),eue=i(X9(),1),tue=new Set([`data`,`_meta`,`_parsed`,`_chart`,`_ctx`]);const nue=(e,t)=>{let[n,r]=(0,N.useState)([]);return(0,N.useEffect)(()=>{let t=e?.current;t&&r($le(t))},[(0,N.useMemo)(()=>t?.length?(0,eue.default)(t,{excludeKeys:e=>tue.has(e),unorderedObjects:!0,unorderedArrays:!1,respectType:!1}):``,[t]),e]),n},rue=(e,t)=>{let{height:n=0,width:r=0,chartArea:i}=t??{},{top:a=0,left:o=0,bottom:s=0,right:c=0}=i??{};return{left:e?.includes(`left`)?o:void 0,right:e?.includes(`right`)?r-c:void 0,top:e?.includes(`top`)?a:void 0,bottom:e?.includes(`bottom`)?n-s:void 0,maxHeight:.5*(s-a-8),maxWidth:.9*(c-o-8),margin:4}};var iue=({items:e,legendState:t,datasets:n,legendClick:r,chartType:i})=>(0,P.jsx)(`div`,{className:U9.legendItems,children:e?.map((e,a)=>{if(n?.[e?.datasetIndex]?.hideLegend)return null;let o=t?.datasets?.[e?.datasetIndex]?.hidden;return(0,P.jsx)(Xle,{index:a,hidden:o??e?.hidden,dataset:n?.[e?.datasetIndex],handleClick:t=>r(t,e),chartType:i},`${e?.datasetIndex}-hidden-${e?.hidden}`)})}),Z9=(0,N.forwardRef)(({legendPosition:e,chartRef:t,isDragging:n,legendConfig:r},i)=>{let a=t?.current,{options:o,generatedDatasets:s,chartType:c}=r??{},l=a?.data?.datasets,{legend:u,legendClick:d}=P9({chartRef:t,options:o}),{state:f}=N9()??{},[p,m]=(0,N.useState)(u?.display??!0),h=nue(t,s),g=rue(e,a);return(0,P.jsxs)(`div`,{ref:i,className:(0,I.default)(U9.legend,!p&&U9.isHidden,n&&U9.isDragging),style:g,children:[(0,P.jsx)(`div`,{className:U9.legendToggle,children:(0,P.jsx)(O5,{onClick:()=>m(!p),small:!0,round:!0,icon:p?(0,P.jsx)(Ble,{}):(0,P.jsx)(Lle,{})})}),(0,P.jsx)(iue,{items:h,legendState:f,datasets:l,legendClick:d,chartType:c})]})}),aue=Z9;Z9.__docgenInfo={description:``,methods:[],displayName:`LegendPanel`,props:{chartRef:{required:!0,tsType:{name:`RefObject`,elements:[{name:`Chart`}],raw:`RefObject<Chart>`},description:``},legendConfig:{required:!0,tsType:{name:`ILegendConfig`},description:``},legendPosition:{required:!0,tsType:{name:`Position`},description:``},isDragging:{required:!0,tsType:{name:`boolean`},description:``}}};var oue=e=>{let{position:t=``,onDrop:n=gd,placeholderSize:r={}}=e??{},[{isOver:i,canDrop:a},o]=zo(()=>({accept:`legend`,drop:n,collect:e=>({isOver:e?.isOver(),canDrop:e?.canDrop()})})),s=i&&a;return(0,P.jsx)(`div`,{ref:o,className:(0,I.default)(U9.dropzone,s&&U9.isActive,t?.includes(`left`)&&U9.left,t?.includes(`right`)&&U9.right,t?.includes(`top`)&&U9.top,t?.includes(`bottom`)&&U9.bottom),children:(0,P.jsx)(`div`,{className:U9.dropzonePlaceholder,style:{...r,margin:4}})})},Q9=e=>{let{chartArea:t,setLegendPosition:n,isDragging:r,placeholderSize:i}=e??{},a=[k.TopLeft,k.TopRight,k.BottomLeft,k.BottomRight],{top:o,left:s,width:c,height:l}=t??{};return(0,P.jsx)(`div`,{className:U9.dropzoneContainer,style:{top:o,left:s,width:c,height:l,zIndex:r?0:-1},children:a?.map(e=>(0,P.jsx)(oue,{position:e,onDrop:()=>n(e),placeholderSize:i},e))})},sue=Q9;Q9.__docgenInfo={description:``,methods:[],displayName:`LegendDropZones`,props:{chartArea:{required:!1,tsType:{name:`ChartArea`},description:``},setLegendPosition:{required:!0,tsType:{name:`signature`,type:`function`,raw:`(position: Position) => void`,signature:{arguments:[{type:{name:`Position`},name:`position`}],return:{name:`void`}}},description:``},isDragging:{required:!0,tsType:{name:`boolean`},description:``},placeholderSize:{required:!1,tsType:{name:`signature`,type:`object`,raw:`{
312
- width?: number;
313
- height?: number;
314
- }`,signature:{properties:[{key:`width`,value:{name:`number`,required:!1}},{key:`height`,value:{name:`number`,required:!1}}]}},description:``}}};var $9=({chartRef:e,legendConfig:t})=>{let n=e?.current,[r,i]=(0,N.useState)(n?.chartArea),{options:{legend:a}}=t??{},[o,s]=L9(),c=o,l=(0,N.useRef)(null),[u,d]=(0,N.useState)(a?.position||k.BottomLeft),f=l?.current?l.current.getBoundingClientRect():null,p={width:f?.width,height:f?.height},[{isDragging:m=!1},h=gd]=Ao(()=>({type:`legend`,collect:e=>({isDragging:e.isDragging()})}));return(0,N.useEffect)(()=>{let e=setTimeout(()=>{i(n?.chartArea)},20);return()=>clearTimeout(e)},[s]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`div`,{ref:c,className:U9.resizeContainer}),(0,P.jsx)(aue,{chartRef:e,legendPosition:u,isDragging:m,ref:e=>{h(e),l.current=e},legendConfig:t}),(0,P.jsx)(sue,{chartArea:r,setLegendPosition:e=>d(e),isDragging:m,placeholderSize:p},s.width)]})},cue=$9;$9.__docgenInfo={description:``,methods:[],displayName:`Legend`,props:{chartRef:{required:!0,tsType:{name:`RefObject`,elements:[{name:`Chart`}],raw:`RefObject<Chart>`},description:``},legendConfig:{required:!0,tsType:{name:`ILegendConfig`},description:``}}};export{Ar as $,Hce as A,V7 as B,Sle as C,Sse as D,T5 as E,Z5 as F,Rce as G,T7 as H,O7 as I,S5 as J,K5 as K,V5 as L,qce as M,_5 as N,X5 as O,$5 as P,li as Q,Ise as R,Ele as S,yse as T,z7 as U,jse as V,Ase as W,sd as X,md as Y,Xa as Z,vle as _,Nle as a,wle as b,Rle as c,Dle as d,P9 as f,yle as g,xle as h,G9 as i,Wce as j,Vce as k,Vle as l,ble as m,X9 as n,Ple as o,N9 as p,zce as q,Hle as r,Ile as s,cue as t,L9 as u,_le as v,O5 as w,Tle as x,Cle as y,L7 as z};