@oliasoft-open-source/charts-library 5.7.1 → 5.7.2-beta-1

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 (45) hide show
  1. package/dist/assets/Color-6BZIO3FS-D_-B3AP0.js +1 -0
  2. package/dist/assets/DocsRenderer-LL677BLK-B5JDzNnk.js +41 -0
  3. package/dist/assets/WithTooltip-65CFNBJE-8EEBhQo3.js +9 -0
  4. package/dist/assets/bar-chart.stories-CyxR49e_.js +138 -0
  5. package/dist/assets/chunk-242VQQM5-DegdISsM.js +1 -0
  6. package/dist/assets/chunk-CYSK6WYR-BpIZnq_i.js +1 -0
  7. package/dist/assets/chunk-YKABRMAI-DMt5fhxa.js +18 -0
  8. package/dist/assets/components-BI9LhTRX.js +92 -0
  9. package/dist/assets/formatter-EIJCOSYU-CsgSjfB2.js +1 -0
  10. package/dist/assets/get-draggableData-Bkm-vwbc.js +2 -0
  11. package/dist/assets/iframe-tFAZUsBl.js +1228 -0
  12. package/dist/assets/jsx-runtime-B8tE-sQF.js +1 -0
  13. package/dist/assets/{legend-Cr-ixvvn.js → legend-CRQJe1eg.js} +15 -15
  14. package/dist/assets/{legend-context-bgD9JX7p.js → legend-context-3AYFKhyL.js} +2 -2
  15. package/dist/assets/line-chart-DKhU9zGy.js +1 -0
  16. package/dist/assets/line-chart.stories-PuUcD0iZ.js +1207 -0
  17. package/dist/assets/{line-chart.test-case.stories-DFLUWQxt.js → line-chart.test-case.stories-DbsDVuff.js} +1 -1
  18. package/dist/assets/pie-chart.stories-g4__kC97.js +45 -0
  19. package/dist/assets/react-18-DdL6lJLC.js +1 -0
  20. package/dist/assets/{react-RY0obRf3.js → react-BAWznt4_.js} +1 -1
  21. package/dist/assets/react-dom-BYNB9LbF.js +8 -0
  22. package/dist/assets/scatter-chart.stories-CgscIZkm.js +41 -0
  23. package/dist/assets/syntaxhighlighter-ED5Y7EFY-DP_lnjjd.js +6 -0
  24. package/dist/assets/{theming-DgjcY9r7.js → theming-Nni-mLA6.js} +1 -1
  25. package/dist/iframe.html +2 -5
  26. package/dist/project.json +1 -1
  27. package/dist/vite-inject-mocker-entry.js +1 -1
  28. package/package.json +1 -1
  29. package/dist/assets/Color-6BZIO3FS-s0pybgGT.js +0 -1
  30. package/dist/assets/DocsRenderer-LL677BLK-IiQab3mR.js +0 -2
  31. package/dist/assets/WithTooltip-65CFNBJE-CLKwlfWd.js +0 -9
  32. package/dist/assets/bar-chart.stories-Sq6kGcCe.js +0 -138
  33. package/dist/assets/components-BJbtgP_z.js +0 -250
  34. package/dist/assets/formatter-EIJCOSYU-C_ABwEuZ.js +0 -1
  35. package/dist/assets/get-draggableData-CHqgKQpf.js +0 -2
  36. package/dist/assets/iframe-BDie4XE6.js +0 -1133
  37. package/dist/assets/line-chart-Cc_EvRxN.js +0 -1
  38. package/dist/assets/line-chart.stories-DVnjeEYv.js +0 -1207
  39. package/dist/assets/pie-chart.stories-BZ8-Flt7.js +0 -45
  40. package/dist/assets/react-18-BP1-1NuC.js +0 -1
  41. package/dist/assets/scatter-chart.stories--7xp7w4K.js +0 -41
  42. package/dist/assets/syntaxhighlighter-ED5Y7EFY-Y-Tk5YPV.js +0 -6
  43. /package/dist/assets/{bar-chart-const-BdWUR8Vo.js → bar-chart-const-Dmo8UTJN.js} +0 -0
  44. /package/dist/assets/{get-custom-legend-plugin-example-BMz6NyH9.js → get-custom-legend-plugin-example-Decjgf1l.js} +0 -0
  45. /package/dist/assets/{preload-helper-MHdlos90.js → preload-helper-Bhb7V-Yo.js} +0 -0
@@ -1,5 +1,5 @@
1
- import{C as e,S as t,T as n,b as r,l as i,m as a,u as o,w as s,x as c}from"./iframe-BDie4XE6.js";import{$ as l,At as u,Cn as d,Ct as f,Dn as p,Dt as m,En as h,Et as g,Ft as _,It as v,Jt as y,Lt as b,Mt as x,Nt as S,On as C,P as w,Pt as T,Q as E,Sn as D,St as O,T as k,Tn as A,Tt as ee,U as j,Wt as te,X as ne,Xt as re,Y as ie,Yt as ae,Z as oe,_ as se,_n as M,_t as ce,an as le,bn as ue,bt as de,cn as fe,ct as pe,d as me,dn as he,dt as ge,et as _e,fn as ve,ft as ye,gn as be,gt as xe,hn as Se,ht as Ce,it as we,jt as Te,kn as Ee,kt as De,ln as Oe,lt as ke,mn as Ae,mt as je,nt as Me,on as Ne,ot as Pe,pn as Fe,pt as Ie,rt as Le,sn as Re,st as ze,t as Be,un as Ve,vn as He,vt as Ue,wn as We,wt as Ge,xn as Ke,xt as qe,yn as Je}from"./legend-context-bgD9JX7p.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=be(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,h(-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}),eee={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 gt(e,t){return t===`start`?0:t===`end`?e:ft(t)?mt(t)*e:e/2}function _t(e,t,n=!0){return typeof t==`number`?t:ft(t)?(n?mt(t):pt(t))*e:e}function tee(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 vt(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=yt(r),d=Ct(e.x,c,i,u.x),f=Ct(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 yt(e,t=`center`){return D(e)?{x:Ee(e.x,t),y:Ee(e.y,t)}:(e=Ee(e,t),{x:e,y:e})}var bt=(e,t)=>e&&e.autoFit&&t<1;function xt(e,t){let n=e.font,r=He(n)?n:[n];return bt(e,t)?r.map(function(e){let n=We(e);return n.size=Math.floor(e.size*t),n.lineHeight=e.lineHeight,We(n)}):r.map(e=>We(e))}function St(e){return e&&(Se(e.xValue)||Se(e.yValue))}function Ct(e,t,n=0,r){return e-gt(t,r)+n}function wt(e,t,n){let r=n.init;if(r)return r===!0?Et(t,n):Dt(e,t,n)}function Tt(e,t,n){let r=!1;return t.forEach(t=>{Je(e[t])?(r=!0,n[t]=e[t]):Se(n[t])&&delete n[t]}),r}function Et(e,t){return eee[t.type||`line`](e)}function Dt(e,t,n){let r=ve(n.init,[{chart:e,properties:t,options:n}]);if(r===!0)return Et(t,n);if(D(r))return r}var Ot=new Map,kt=e=>isNaN(e)||e<=0,At=e=>e.reduce(function(e,t){return e+=t.string,e},``);function jt(e){if(e&&typeof e==`object`){let t=e.toString();return t===`[object HTMLImageElement]`||t===`[object HTMLCanvasElement]`}}function Mt(e,{x:t,y:n},r){r&&(e.translate(t,n),e.rotate(h(r)),e.translate(-t,-n))}function Nt(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 Pt(e,t){e.shadowColor=t.backgroundShadowColor,e.shadowBlur=t.shadowBlur,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY}function Ft(e,t){let n=t.content;if(jt(n))return{width:_t(n.width,t.width),height:_t(n.height,t.height)};let r=xt(t),i=t.textStrokeWidth,a=He(n)?n:[n],o=a.join()+At(r)+i+(e._measureText?`-spriting`:``);return Ot.has(o)||Ot.set(o,Vt(e,a,r,i)),Ot.get(o)}function It(e,t,n){let{x:r,y:i,width:a,height:o}=t;e.save(),Pt(e,n);let s=Nt(e,n);e.fillStyle=n.backgroundColor,e.beginPath(),he(e,{x:r,y:i,w:a,h:o,radius:ot(p(n.borderRadius),0,Math.min(a,o)/2)}),e.closePath(),e.fill(),s&&(e.shadowColor=n.borderShadowColor,e.stroke()),e.restore()}function Lt(e,t,n,r){let i=n.content;if(jt(i)){e.save(),e.globalAlpha=Wt(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=xt(n,r),s=n.color,c=He(s)?s:[s],l=tee(t,n),u=t.y+n.textStrokeWidth/2;e.save(),e.textBaseline=`middle`,e.textAlign=n.textAlign,Rt(e,n)&&Ht(e,{x:l,y:u},a,o),Ut(e,{x:l,y:u},a,{fonts:o,colors:c}),e.restore()}function Rt(e,t){if(t.textStrokeWidth>0)return e.lineJoin=`round`,e.miterLimit=2,e.lineWidth=t.textStrokeWidth,e.strokeStyle=t.textStrokeColor,!0}function zt(e,t,n,r){let{radius:i,options:a}=t,o=a.pointStyle,s=a.rotation,c=(s||0)*fe;if(jt(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}kt(i)||Bt(e,{x:n,y:r,radius:i,rotation:s,style:o,rad:c})}function Bt(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,Oe),e.closePath();break;case`triangle`:e.moveTo(t+Math.sin(o)*r,n-Math.cos(o)*r),o+=Ve,e.lineTo(t+Math.sin(o)*r,n-Math.cos(o)*r),o+=Ve,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+Re)*l,c=Math.sin(o+Re)*l,e.arc(t-s,n-c,u,o-Ne,o-le),e.arc(t+c,n-s,u,o-le,o),e.arc(t+s,n+c,u,o,o+le),e.arc(t-c,n+s,u,o+le,o+Ne),e.closePath();break;case`rect`:if(!i){l=Math.SQRT1_2*r,e.rect(t-l,n-l,2*l,2*l);break}o+=Re;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+=Re;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+=Re,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 Vt(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 Ht(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 Ut(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 Wt(e,t){let n=ue(e)?e:t;return ue(n)?it(n,0,1):1}var Gt=[`left`,`bottom`,`top`,`right`];function Kt(e,t){let{pointX:n,pointY:r,options:i}=t,a=i.callout,o=a&&a.display&&Zt(t,a);if(!o||$t(t,a,o))return;if(e.save(),e.beginPath(),!Nt(e,a))return e.restore();let{separatorStart:s,separatorEnd:c}=qt(t,o),{sideStart:l,sideEnd:u}=Yt(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(),h(-t.rotation));e.lineTo(d.x,d.y),e.stroke(),e.restore()}function qt(e,t){let{x:n,y:r,x2:i,y2:a}=e,o=Jt(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 Jt(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 Yt(e,t,n){let{y:r,width:i,height:a,options:o}=e,s=o.callout.start,c=Xt(t,o.callout),l,u;return t===`left`||t===`right`?(l={x:n.x,y:r+_t(a,s)},u={x:l.x+c,y:l.y}):(l={x:n.x+_t(i,s),y:n.y},u={x:l.x,y:l.y+c}),{sideStart:l,sideEnd:u}}function Xt(e,t){let n=t.side;return e===`left`||e===`top`?-n:n}function Zt(e,t){let n=t.position;return Gt.includes(n)?n:Qt(e,t)}function Qt(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,g=_t(o,m),_=_t(s,m),v=[n,n+g,n+g,i],y=[r+_,a,r,a],b=[];for(let e=0;e<4;e++){let t=tt({x:v[e],y:y[e]},p,h(f));b.push({position:Gt[e],distance:be(t,{x:c,y:l})})}return b.sort((e,t)=>e.distance-t.distance)[0].position}function $t(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 en={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 tn(e,t,n){return t=typeof t==`number`?t:e.parse(t),Ke(t)?e.getPixelForValue(t):n}function nn(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 rn(e,t){if(e){let n=e.options.reverse;return{start:tn(e,t.min,n?t.end:t.start),end:tn(e,t.max,n?t.start:t.end)}}}function an(e,t){let{chartArea:n,scales:r}=e,i=r[nn(r,t,`xScaleID`)],a=r[nn(r,t,`yScaleID`)],o=n.width/2,s=n.height/2;return i&&(o=tn(i,t.xValue,i.left+i.width/2)),a&&(s=tn(a,t.yValue,a.top+a.height/2)),{x:o,y:s}}function on(e,t){let n=e.scales,r=n[nn(n,t,`xScaleID`)],i=n[nn(n,t,`yScaleID`)];if(!r&&!i)return{};let{left:a,right:o}=r||e.chartArea,{top:s,bottom:c}=i||e.chartArea,l=dn(r,{min:t.xMin,max:t.xMax,start:a,end:o});a=l.start,o=l.end;let u=dn(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 sn(e,t){if(!St(t)){let n=on(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 un(e,t)}function cn(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?fn(i,a,t):pn(n,a,t),a}function ln(e,t){let n=on(e,t);return n.initProperties=wt(e,n,t),n.elements=[{type:`label`,optionScope:`label`,properties:ree(e,n,t),initProperties:n.initProperties}],n}function un(e,t){let n=an(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 dn(e,t){let n=rn(e,t)||t;return{start:Math.min(n.start,n.end),end:Math.max(n.start,n.end)}}function fn(e,t,n){let r=tn(e,n.value,NaN),i=tn(e,n.endValue,r);e.isHorizontal()?(t.x=r,t.x2=i):(t.y=r,t.y2=i)}function pn(e,t,n){for(let r of Object.keys(en)){let i=e[nn(e,n,r)];if(i){let{min:e,max:a,start:o,end:s,startProp:c,endProp:l}=en[r],u=rn(i,{min:n[e],max:n[a],start:i[o],end:i[s]});t[c]=u.start,t[l]=u.end}}}function mn({properties:e,options:t},n,r,i){let{x:a,x2:o,width:s}=e;return hn({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 nee({properties:e,options:t},n,r,i){let{y:a,y2:o,height:s}=e;return hn({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 hn(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+gt(l,a)}function ree(e,t,n){let r=n.label;r.backgroundColor=`transparent`,r.callout.display=!1;let i=yt(r.position),a=A(r.padding),o=Ft(e.ctx,r),s=mn({properties:t,options:n},o,i,a),c=nee({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 gn=[`enter`,`leave`],_n=gn.concat(`click`);function vn(e,t,n){t.listened=Tt(n,_n,t.listeners),t.moveListened=!1,gn.forEach(e=>{Je(n[e])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(e=>{!t.listened&&Je(e.click)&&(t.listened=!0),t.moveListened||gn.forEach(n=>{Je(e[n])&&(t.listened=!0,t.moveListened=!0)})})}function yn(e,t,n){if(e.listened)switch(t.type){case`mousemove`:case`mouseout`:return bn(e,t,n);case`click`:return iee(e,t,n)}}function bn(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=xn(a,`leave`,i,r);return xn(a,`enter`,r,i)||o}function xn({state:e,event:t},n,r,i){let a;for(let o of r)i.indexOf(o)<0&&(a=Sn(o.options[n]||e.listeners[n],o,t)||a);return a}function iee(e,t,n){let r=e.listeners,i=Xe(e.visibleElements,t,n.interaction),a;for(let e of i)a=Sn(e.options.click||r.click,e,t)||a;return a}function Sn(e,t,n){return ve(e,[t.$context,n])===!0}var Cn=[`afterDraw`,`beforeDraw`];function wn(e,t,n){let r=t.visibleElements;t.hooked=Tt(n,Cn,t.hooks),t.hooked||r.forEach(e=>{t.hooked||Cn.forEach(n=>{Je(e.options[n])&&(t.hooked=!0)})})}function Tn(e,t,n){if(e.hooked)return ve(t.options[n]||e.hooks[n],[t.$context])}function En(e,t,n){let r=Mn(e.scales,t,n),i=On(t,r,`min`,`suggestedMin`);i=On(t,r,`max`,`suggestedMax`)||i,i&&Je(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function Dn(e,t){for(let n of e)An(n,t)}function On(e,t,n,r){if(Ke(t[n])&&!kn(e.options,n,r)){let r=e[n]!==t[n];return e[n]=t[n],r}}function kn(e,t,n){return Se(e[t])||Se(e[n])}function An(e,t){for(let n of[`scaleID`,`xScaleID`,`yScaleID`]){let r=nn(t,e,n);r&&!t[r]&&jn(e,n)&&console.warn(`No scale found with id '${r}' for annotation '${e.id}'`)}}function jn(e,t){if(t===`scaleID`)return!0;let n=t.charAt(0);for(let t of[`Min`,`Max`,`Value`])if(Se(e[n+t]))return!0;return!1}function Mn(e,t,n){let r=t.axis,i=t.id,a=r+`ScaleID`,o={min:Ee(t.min,-1/0),max:Ee(t.max,1/0)};for(let s of n)s.scaleID===i?Nn(s,t,[`value`,`endValue`],o):nn(e,s,a)===i&&Nn(s,t,[r+`Min`,r+`Max`,r+`Value`],o);return o}function Nn(e,t,n,r){for(let i of n){let n=e[i];if(Se(n)){let e=t.parse(n);r.min=Math.min(r.min,e),r.max=Math.max(r.max,e)}}}var Pn=class extends re{inRange(e,t,n,r){let{x:i,y:a}=tt({x:e,y:t},this.getCenterPoint(r),h(-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(),Mt(e,this.getCenterPoint(),this.options.rotation),It(e,this,this.options),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,t){return ln(e,t)}};Pn.id=`boxAnnotation`,Pn.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},Pn.defaultRoutes={borderColor:`color`,backgroundColor:`color`},Pn.descriptors={label:{_fallback:!0}};var Fn=class extends re{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||(cee(e,this),e.save(),Mt(e,this.getCenterPoint(),this.rotation),Lt(e,this,t,this._fitRatio),e.restore())}resolveElementProperties(e,t){let n=In(e,t);if(!n)return{};let{controllerMeta:r,point:i,radius:a}=aee(e,t,n),o=Ft(e.ctx,t),s=oee(o,a);bt(t,s)&&(o={width:o.width*s,height:o.height*s});let{position:c,xAdjust:l,yAdjust:u}=t,d=vt(i,o,{borderWidth:0,position:c,xAdjust:l,yAdjust:u});return{initProperties:wt(e,d,t),...d,...r,rotation:t.rotation,_fitRatio:s}}};Fn.id=`doughnutLabelAnnotation`,Fn.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},Fn.defaultRoutes={};function In(e,t){return e.getSortedVisibleDatasetMetas().reduce(function(n,r){let i=r.controller;return i instanceof ae&&Ln(e,t,r.data)&&(!n||i.innerRadius<n.controller.innerRadius)&&i.options.circumference>=90?r:n},void 0)}function Ln(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 aee({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,...see(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 oee({width:e,height:t},n){let r=Math.sqrt(e**2+t**2);return n*2/r}function see(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:Oe};let l=(-o-Math.sqrt(c))/2,u=(-o+Math.sqrt(c))/2;return{_startAngle:M({x:t,y:n},{x:l,y:e}).angle,_endAngle:M({x:t,y:n},{x:u,y:e}).angle}}function cee(e,t){let{_centerX:n,_centerY:r,_radius:i,_startAngle:a,_endAngle:o,_counterclockwise:s,options:c}=t;e.save();let l=Nt(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 Rn=class extends re{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=!Se(this._visible)||this._visible;!t.display||!t.content||!n||(e.save(),Mt(e,this.getCenterPoint(),this.rotation),Kt(e,this),It(e,this,t),Lt(e,lee(this),t),e.restore())}resolveElementProperties(e,t){let n;if(St(t))n=an(e,t);else{let{centerX:r,centerY:i}=on(e,t);n={x:r,y:i}}let r=A(t.padding),i=Ft(e.ctx,t),a=vt(n,i,t,r);return{initProperties:wt(e,a,t),pointX:n.x,pointY:n.y,...a,rotation:t.rotation}}};Rn.id=`labelAnnotation`,Rn.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},Rn.defaultRoutes={borderColor:`color`};function lee({x:e,y:t,width:n,height:r,options:i}){let a=i.borderWidth/2,o=A(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,Un=(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},Wn=(e,t,n,r)=>(1-r)*(1-r)*e+2*(1-r)*r*t+r*r*n,Gn=(e,t,n,r)=>({x:Wn(e.x,t.x,n.x,r),y:Wn(e.y,t.y,n.y,r)}),Kn=(e,t,n,r)=>2*(1-r)*(t-e)+2*r*(n-t),qn=(e,t,n,r)=>-Math.atan2(Kn(e.x,t.x,n.x,r),Kn(e.y,t.y,n.y,r))+.5*Ne,Jn=class extends re{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){Nt(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)||Zn(this,n,r);return o.restore(),l}let s=Hn(i);return pee(this,n,s,r)||Zn(this,n,r)}return uee(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(),!Nt(e,o))return e.restore();Pt(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}=er(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(),nr(e,0,u,c),nr(e,s,-d,l),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,t){let n=cn(e,t),{x:r,y:i,x2:a,y2:o}=n,s=dee(n,e.chartArea),c=s?fee({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=wt(e,c,t),t.curve&&(c.cp=bee(c,t,be({x:c.x,y:c.y},{x:c.x2,y:c.y2})));let l=mee(e,c,t.label);return l._visible=s,c.elements=[{type:`label`,optionScope:`label`,properties:l,initProperties:c.initProperties}],c}};Jn.id=`lineAnnotation`;var Yn={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};Jn.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Yn),fill:!1,length:12,start:Object.assign({},Yn),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({},Rn.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},Jn.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},Jn.defaultRoutes={borderColor:`color`};function uee(e,{mouseX:t,mouseY:n},r,{hitSize:i,useFinalPosition:a}){return at(Un(t,n,e.getProps([`x`,`y`,`x2`,`y2`],a),r),i)||Zn(e,{mouseX:t,mouseY:n},a,r)}function dee({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 Xn({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 fee(e,t,n){let{x:r,y:i}=Xn(e,t,n),{x:a,y:o}=Xn(t,e,n);return{x:r,y:i,x2:a,y2:o,width:Math.abs(a-r),height:Math.abs(o-i)}}function pee(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 Zn(e,{mouseX:t,mouseY:n},r,i){let a=e.label;return a.options.display&&a.inRange(t,n,i,r)}function mee(e,t,n){let r=n.borderWidth,i=A(n.padding),a=Ft(e.ctx,n);return gee(t,n,{width:a.width+i.width+r,height:a.height+i.height+r,padding:i},e.chartArea)}function hee(e){let{x:t,y:n,x2:r,y2:i}=e,a=Math.atan2(i-n,r-t);return a>Ne/2?a-Ne:a<Ne/-2?a+Ne:a}function gee(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},f=t.rotation===`auto`?hee(e):h(t.rotation),p=_ee(i,a,f),m=vee(e,t,{labelSize:p,padding:o},r),g=e.cp?Gn(l,e.cp,u,m):zn(l,u,m),_={size:p.w,min:r.left,max:r.right,padding:o.left},v={size:p.h,min:r.top,max:r.bottom,padding:o.top},y=$n(g.x,_)+s,b=$n(g.y,v)+c;return{x:y-i/2,y:b-a/2,x2:y+i/2,y2:b+a/2,centerX:y,centerY:b,pointX:g.x,pointY:g.y,width:i,height:a,rotation:d(f)}}function _ee(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 vee(e,t,n,r){let i,a=yee(e,r);return i=t.position===`start`?Qn({w:e.x2-e.x,h:e.y2-e.y},n,t,a):t.position===`end`?1-Qn({w:e.x-e.x2,h:e.y-e.y2},n,t,a):gt(1,t.position),i}function Qn(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 yee(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 $n(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 er(e){let t=e.options,n=t.arrowHeads&&t.arrowHeads.start,r=t.arrowHeads&&t.arrowHeads.end;return{startOpts:n,endOpts:r,startAdjust:tr(e,n),endAdjust:tr(e,r)}}function tr(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 nr(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(),Pt(e,r),Nt(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 bee(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=yt(t.controlPoint,0);return tt({x:s+_t(n,u.x,!1),y:c+_t(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),nr(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}=er(t),p={x:i,y:a},m={x:o,y:s},h=qn(p,n,m,0),g=qn(p,n,m,1)-Ne,_=Gn(p,n,m,d/r),v=Gn(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 re{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),h(-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(),Mt(e,this.getCenterPoint(),a.rotation),Pt(e,this.options),e.beginPath(),e.fillStyle=a.backgroundColor;let o=Nt(e,a);e.ellipse(r,i,n/2,t/2,Ne/2,0,2*Ne),e.fill(),o&&(e.shadowColor=a.borderShadowColor,e.stroke()),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,t){return ln(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({},Pn.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=h(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 re{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,Pt(e,t);let r=Nt(e,t);zt(e,this,this.centerX,this.centerY),r&&!jt(t.pointStyle)&&(e.shadowColor=t.borderShadowColor,e.stroke()),e.restore(),t.borderWidth=n}resolveElementProperties(e,t){let n=sn(e,t);return n.initProperties=wt(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 re{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),h(-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,Pt(e,n);let r=Nt(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=sn(e,t),{sides:r,rotation:i}=t,a=[],o=2*Ne/r,s=i*fe;for(let i=0;i<r;i++,s+=o){let r=lr(n,t,s);r.initProperties=wt(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:Pn,doughnutLabel:Fn,ellipse:ar,label:Rn,line:Jn,point:sr,polygon:cr};Object.keys(dr).forEach(e=>{Ae.describe(`elements.${dr[e].id}`,{_fallback:`plugins.annotation.common`})});var fr={update:Object.assign},pr=_n.concat(Cn),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),Se(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 te(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=_n.concat(Cn),Ar={id:`annotation`,version:Er,beforeRegister(){dt(`chart.js`,`4.0`,y.version)},afterRegister(){y.register(dr)},afterUnregister(){y.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),Dn(i.filter(Or),e.scales)},afterDataLimits(e,t){let n=Dr.get(e);En(e,t.scale,n.annotations.filter(Or).filter(e=>e.display&&e.adjustScaleRange))},afterUpdate(e,t,n){let r=Dr.get(e);vn(e,r,n),_r(e,r,n,t.mode),r.visibleElements=r.elements.filter(e=>!e.skip&&e.options.display),wn(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){yn(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&&Fe(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&&C(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?(Tn(n,i,`beforeDraw`),i.draw(e,t),Tn(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=t({FILE:()=>Br,HTML:()=>Ur,TEXT:()=>Hr,URL:()=>Vr});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=n(a(),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,wa=new Sa(Ca.registerPendingError);function Ta(e){Ca.enqueueTask(wa.create(e))}const Ea=`dnd-core/ADD_SOURCE`,Da=`dnd-core/ADD_TARGET`,Oa=`dnd-core/REMOVE_SOURCE`,ka=`dnd-core/REMOVE_TARGET`;function xee(e){return{type:Ea,payload:{sourceId:e}}}function See(e){return{type:Da,payload:{targetId:e}}}function Cee(e){return{type:Oa,payload:{sourceId:e}}}function wee(e){return{type:ka,payload:{targetId:e}}}function Tee(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 Eee(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 Aa(e,t){if(t&&Array.isArray(e)){e.forEach(e=>Aa(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 ja;(function(e){e.SOURCE=`SOURCE`,e.TARGET=`TARGET`})(ja||={});var Dee=0;function Oee(){return Dee++}function kee(e){let t=Oee().toString();switch(e){case ja.SOURCE:return`S${t}`;case ja.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function Ma(e){switch(e[0]){case`S`:return ja.SOURCE;case`T`:return ja.TARGET;default:throw Error(`Cannot parse handler ID: ${e}`)}}function Na(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 Aee=class{addSource(e,t){Aa(e),Tee(t);let n=this.addHandler(ja.SOURCE,e,t);return this.store.dispatch(xee(n)),n}addTarget(e,t){Aa(e,!0),Eee(t);let n=this.addHandler(ja.TARGET,e,t);return this.store.dispatch(See(n)),n}containsHandler(e){return Na(this.dragSources,e)||Na(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 Ma(e)===ja.SOURCE}isTargetId(e){return Ma(e)===ja.TARGET}removeSource(e){Ci(this.getSource(e),`Expected an existing source.`),this.store.dispatch(Cee(e)),Ta(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){Ci(this.getTarget(e),`Expected an existing target.`),this.store.dispatch(wee(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=kee(e);return this.types.set(r,t),e===ja.SOURCE?this.dragSources.set(r,n):e===ja.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 jee=(e,t)=>e===t;function Mee(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function Nee(e,t,n=jee){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 Pee(e=da,t){switch(t.type){case Ni:break;case Ea:case Da:case ka:case Oa: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||!Nee(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 Pa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fa(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){Pa(e,t,n[t])})}return e}var Ia={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function La(e=Ia,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 Mee(e.clientOffset,n.clientOffset)?e:Fa({},e,{clientOffset:n.clientOffset});case Fi:case Pi:return Ia;default:return e}}function Ra(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function za(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){Ra(e,t,n[t])})}return e}var Ba={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Va(e=Ba,t){let{payload:n}=t;switch(t.type){case ji:return za({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Mi:return za({},e,{isSourcePublic:!0});case Ni:return za({},e,{targetIds:n.targetIds});case ka:return e.targetIds.indexOf(n.targetId)===-1?e:za({},e,{targetIds:Ei(e.targetIds,n.targetId)});case Pi:return za({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Fi:return za({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Ha(e=0,t){switch(t.type){case Ea:case Da:return e+1;case Oa:case ka:return e-1;default:return e}}function Fee(e=0){return e+1}function Ua(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wa(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){Ua(e,t,n[t])})}return e}function Ga(e={},t){return{dirtyHandlerIds:Pee(e.dirtyHandlerIds,{type:t.type,payload:Wa({},t.payload,{prevTargetIds:Ti(e,`dragOperation.targetIds`,[])})}),dragOffset:La(e.dragOffset,t),refCount:Ha(e.refCount,t),dragOperation:Va(e.dragOperation,t),stateId:Fee(e.stateId)}}function Ka(e,t=void 0,n={},r=!1){let i=qa(r),a=new oa(i,new ma(i,new Aee(i))),o=e(a,t,n);return a.receiveBackend(o),a}function qa(e){let t=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__;return Si(Ga,e&&t&&t({name:`dnd-core`,instanceId:`dnd-core`}))}var P=i();function Ja(e,t){if(e==null)return{};var n=Ya(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 Ya(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 Xa=0,Za=Symbol.for(`__REACT_DND_CONTEXT_INSTANCE__`),Qa=(0,N.memo)(function(e){var{children:t}=e;let[n,r]=$a(Ja(e,[`children`]));return(0,N.useEffect)(()=>{if(r){let e=to();return++Xa,()=>{--Xa===0&&(e[Za]=null)}}},[]),(0,P.jsx)(ui.Provider,{value:n,children:t})});function $a(e){return`manager`in e?[{dragDropManager:e.manager},!1]:[eo(e.backend,e.context,e.options,e.debugMode),!e.context]}function eo(e,t=to(),n,r){let i=t;return i[Za]||(i[Za]={dragDropManager:Ka(e,t,n,r)}),i[Za]}function to(){return typeof global<`u`?global:window}const no=typeof window<`u`?N.useLayoutEffect:N.useEffect;var ro=n(b(),1);function io(e,t,n){let[r,i]=(0,N.useState)(()=>t(e)),a=(0,N.useCallback)(()=>{let a=t(e);(0,ro.default)(r,a)||(i(a),n&&n())},[r,e,n]);return no(a),[r,a]}function ao(e,t,n){let[r,i]=io(e,t,n);return no(function(){let t=e.getHandlerId();if(t!=null)return e.subscribeToStateChange(i,{handlerIds:[t]})},[e,i]),r}function oo(e,t,n){return ao(t,e||(()=>({})),()=>n.reconnect())}function so(e,t){let n=[...t||[]];return t==null&&typeof e!=`function`&&n.push(e),(0,N.useMemo)(()=>typeof e==`function`?e():e,n)}function Iee(e){return(0,N.useMemo)(()=>e.hooks.dragSource(),[e])}function Lee(e){return(0,N.useMemo)(()=>e.hooks.dragPreview(),[e])}var co=!1,lo=!1,Ree=class{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){Ci(!co,`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 co=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{co=!1}}isDragging(){if(!this.sourceId)return!1;Ci(!lo,`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 lo=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{lo=!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()}},uo=!1,fo=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(!uo,`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 uo=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{uo=!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 po(e,t,n){let r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}function mo(e,t,n){let r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}function ho(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 go(e){return typeof e==`object`&&!!e&&Object.prototype.hasOwnProperty.call(e,`current`)}function _o(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 vo(e){return(t=null,n=null)=>{if(!(0,N.isValidElement)(t)){let r=t;return e(r,n),r}let r=t;return _o(r),xo(r,n?t=>e(t,n):e)}}function yo(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];if(n.endsWith(`Ref`))t[n]=e[n];else{let e=vo(r);t[n]=()=>e}}),t}function bo(e,t){typeof e==`function`?e(t):e.current=t}function xo(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=>{bo(n,e),bo(t,e)}}):(0,N.cloneElement)(e,{ref:t})}var So=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!ho(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!ho(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=yo({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,go(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,go(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}},Co=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!ho(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=yo({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,go(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 wo(){let{dragDropManager:e}=(0,N.useContext)(ui);return Ci(e!=null,`Expected drag drop context`),e}function To(e,t){let n=wo(),r=(0,N.useMemo)(()=>new So(n.getBackend()),[n]);return no(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),no(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function Eo(){let e=wo();return(0,N.useMemo)(()=>new Ree(e),[e])}var Do=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 Oo(e,t,n){let r=(0,N.useMemo)(()=>new Do(e,t,n),[t,n]);return(0,N.useEffect)(()=>{r.spec=e},[e]),r}function ko(e){return(0,N.useMemo)(()=>{let t=e.type;return Ci(t!=null,`spec.type must be defined`),t},[e])}function Ao(e,t,n){let r=wo(),i=Oo(e,t,n),a=ko(e);no(function(){if(a!=null){let[e,o]=mo(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o}},[r,t,n,i,a])}function jo(e,t){let n=so(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=Eo(),i=To(n.options,n.previewOptions);return Ao(n,r,i),[oo(n.collect,r,i),Iee(i),Lee(i)]}function Mo(e){let t=wo().getMonitor(),[n,r]=io(t,e);return(0,N.useEffect)(()=>t.subscribeToOffsetChange(r)),(0,N.useEffect)(()=>t.subscribeToStateChange(r)),n}function No(e){return(0,N.useMemo)(()=>e.hooks.dropTarget(),[e])}function Po(e){let t=wo(),n=(0,N.useMemo)(()=>new Co(t.getBackend()),[t]);return no(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function Fo(){let e=wo();return(0,N.useMemo)(()=>new fo(e),[e])}function Io(e){let{accept:t}=e;return(0,N.useMemo)(()=>(Ci(e.accept!=null,`accept must be defined`),Array.isArray(t)?t:[t]),[t])}var Lo=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 Ro(e,t){let n=(0,N.useMemo)(()=>new Lo(e,t),[t]);return(0,N.useEffect)(()=>{n.spec=e},[e]),n}function zo(e,t,n){let r=wo(),i=Ro(e,t),a=Io(e);no(function(){let[e,o]=po(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o},[r,t,i,n,a.map(e=>e.toString()).join(`|`)])}function Bo(e,t){let n=so(e,t),r=Fo(),i=Po(n.options);return zo(n,r,i),[oo(n.collect,r,i),No(i)]}function Vo(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 Ho=c((()=>{}));function Uo(){return Uo=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},Uo.apply(null,arguments)}var Wo=c((()=>{}));function Go(e,t){return Go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Go(e,t)}function Ko(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Go(e,t)}function qo(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 Jo,Yo=c((()=>{Jo=function(){return Jo=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},Jo.apply(this,arguments)}})),Xo=r((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}}));Yo();var Zo=Xo(),Qo=new Map,$o=function(e){return e.cloneNode(!0)},es=function(){return window.location.protocol===`file:`},ts=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,Zo.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(es()?`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||es()&&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()},ns={},rs=function(e,t){ns[e]=ns[e]||[],ns[e].push(t)},is=function(e){for(var t=function(t,n){setTimeout(function(){if(Array.isArray(ns[e])){var n=Qo.get(e),r=ns[e][t];n instanceof SVGSVGElement&&r(null,$o(n)),n instanceof Error&&r(n),t===ns[e].length-1&&delete ns[e]}},0)},n=0,r=ns[e].length;n<r;n++)t(n)},as=function(e,t,n){if(Qo.has(e)){var r=Qo.get(e);if(r===void 0){rs(e,n);return}if(r instanceof SVGSVGElement){n(null,$o(r));return}}Qo.set(e,void 0),rs(e,n),ts(e,t,function(t,n){t?Qo.set(e,t):n.responseXML?.documentElement instanceof SVGSVGElement&&Qo.set(e,n.responseXML.documentElement),is(e)})},ss=function(e,t,n){ts(e,t,function(e,t){e?n(e):t.responseXML?.documentElement instanceof SVGSVGElement&&n(null,t.responseXML.documentElement)})},zee=0,Bee=function(){return++zee},cs=[],ls={},Vee=`http://www.w3.org/2000/svg`,us=`http://www.w3.org/1999/xlink`,ds=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(cs.indexOf(e)!==-1){cs.splice(cs.indexOf(e),1),e=null;return}cs.push(e),e.setAttribute(`src`,``),(r?as:ss)(s,i,function(r,i){if(!i){cs.splice(cs.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(qo(qo(qo([],(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+`-`+Bee();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(us,`href`);c&&c.toString()===`#`+_[e].id&&a.push(r[o])}for(var l=0,u=a.length;l<u;l++)a[l].setAttributeNS(us,`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`&&!ls[s])){for(var D=0,O=S.length;D<O;D++)Function(S[D])(window);ls[s]=!0}var k=i.querySelectorAll(`style`);if(Array.prototype.forEach.call(k,function(e){e.textContent+=``}),i.setAttribute(`xmlns`,Vee),i.setAttribute(`xmlns:xlink`,us),a(i),!e.parentNode){cs.splice(cs.indexOf(e),1),e=null,o(Error(`Parent node is null`));return}e.parentNode.replaceChild(i,e),cs.splice(cs.indexOf(e),1),e=null,o(null,i)})},Hee=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++)ds(e[v],f,g,u,m,c,function(t,n){o(t,n),e&&`length`in e&&e.length===++_&&i(_)});else e?ds(e,f,g,u,m,c,function(t,n){o(t,n),i(1),e=null}):i(0)},Uee=r(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),Wee=r(((e,t)=>{var n=Uee();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}})),fs=r(((e,t)=>{t.exports=Wee()()}));Ho(),Wo();var ps=n(fs()),Gee=function(e){return(e?.ownerDocument||document).defaultView||window},Kee=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},qee=[`afterInjection`,`beforeInjection`,`desc`,`evalScripts`,`fallback`,`httpRequestWithCredentials`,`loading`,`renumerateIRIElements`,`src`,`title`,`useRequestCache`,`wrapper`],ms=`http://www.w3.org/2000/svg`,hs=`http://www.w3.org/1999/xlink`,gs=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}Ko(t,e);var n=t.prototype;return n.renderSVG=function(){var e=this;if(this.reactWrapper instanceof Gee(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(ms,f),p.setAttribute(`xmlns`,ms),p.setAttribute(`xmlns:xlink`,hs),m=document.createElementNS(ms,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)})};Hee(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;Kee(Uo({},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=Vo(e,qee),a=r;return N.createElement(a,Uo({},i,{ref:this.refCallback},r===`svg`?{xmlns:ms,xmlnsXlink:hs}:{}),this.state.isLoading&&n&&N.createElement(n,null),this.state.hasError&&t&&N.createElement(t,null))},t}(N.Component);gs.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:``,evalScripts:`never`,fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:``,useRequestCache:!0,wrapper:`div`},gs.propTypes={afterInjection:ps.func,beforeInjection:ps.func,desc:ps.string,evalScripts:ps.oneOf([`always`,`once`,`never`]),fallback:ps.oneOfType([ps.func,ps.object,ps.string]),httpRequestWithCredentials:ps.bool,loading:ps.oneOfType([ps.func,ps.object,ps.string]),onError:ps.func,renumerateIRIElements:ps.bool,src:ps.string.isRequired,title:ps.string,useRequestCache:ps.bool,wrapper:ps.oneOf([`div`,`span`,`svg`])};var _s={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},vs=N.createContext&&N.createContext(_s),ys=[`attr`,`size`,`title`];function bs(e,t){if(e==null)return{};var n=xs(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 xs(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 Ss(){return Ss=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},Ss.apply(this,arguments)}function Cs(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 ws(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Cs(Object(n),!0).forEach(function(t){Ts(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ts(e,t,n){return t=Es(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Es(e){var t=Ds(e,`string`);return typeof t==`symbol`?t:t+``}function Ds(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 Os(e){return e&&e.map((e,t)=>N.createElement(e.tag,ws({key:t},e.attr),Os(e.child)))}function F(e){return t=>N.createElement(ks,Ss({attr:ws({},e.attr)},t),Os(e.child))}function ks(e){var t=t=>{var{attr:n,size:r,title:i}=e,a=bs(e,ys),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),N.createElement(`svg`,Ss({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:ws(ws({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 vs===void 0?t(_s):N.createElement(vs.Consumer,null,e=>t(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 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 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:`M12 5l0 14`},child:[]},{tag:`path`,attr:{d:`M18 13l-6 6`},child:[]},{tag:`path`,attr:{d:`M6 13l6 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:`M5 12l6 6`},child:[]},{tag:`path`,attr:{d:`M5 12l6 -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:`M5 12l14 0`},child:[]},{tag:`path`,attr:{d:`M13 18l6 -6`},child:[]},{tag:`path`,attr:{d:`M13 6l6 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:`M12 5l0 14`},child:[]},{tag:`path`,attr:{d:`M18 11l-6 -6`},child:[]},{tag:`path`,attr:{d:`M6 11l6 -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:[]}]})(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:`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 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:`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 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:`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 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:`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 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:`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 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:`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 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:`M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11`},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:`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 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:`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 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:`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 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:`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 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:`M4 19l16 0`},child:[]},{tag:`path`,attr:{d:`M4 15l4 -6l4 2l4 -5l4 4`},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:`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 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:`M5 12l5 5l10 -10`},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:`M6 9l6 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:`M15 6l-6 6l6 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:`M9 6l6 6l-6 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:`M6 15l6 -6l6 6`},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:`M11 7l-5 5l5 5`},child:[]},{tag:`path`,attr:{d:`M17 7l-5 5l5 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:`M7 7l5 5l-5 5`},child:[]},{tag:`path`,attr:{d:`M13 7l5 5l-5 5`},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:`M9 12l2 2l4 -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:[]},{tag:`path`,attr:{d:`M10 10l4 4m0 -4l-4 4`},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:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`},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:`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 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 7v5l3 3`},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 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 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:`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 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 6v6a3 3 0 0 0 3 3h10l-4 -4m0 8l4 -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:`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 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:`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 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:`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 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:`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 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:`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 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 19v.01`},child:[]},{tag:`path`,attr:{d:`M12 15v-10`},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 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 _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.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 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:`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 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:`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 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:`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 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:`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 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:`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 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:`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 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 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 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:`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 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:`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 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:`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 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:`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 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:`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 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:`M11 5l6 0`},child:[]},{tag:`path`,attr:{d:`M7 19l6 0`},child:[]},{tag:`path`,attr:{d:`M14 5l-4 14`},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:`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 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:`M12 4l0 16`},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:`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 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:[]}]})(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:`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 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 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 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:`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 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:`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 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:`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 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:`M12 3a9 9 0 1 0 9 9`},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 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 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:`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 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:`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 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:`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 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:`M5 12l14 0`},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:`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 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 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 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:`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 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:`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 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:`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 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:`M7 4v16l13 -8z`},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:`M20 5v14l-12 -7z`},child:[]},{tag:`path`,attr:{d:`M4 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:`M4 5v14l12 -7z`},child:[]},{tag:`path`,attr:{d:`M20 5l0 14`},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:`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 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:`M3 5v14l8 -7z`},child:[]},{tag:`path`,attr:{d:`M14 5v14l8 -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:`M21 5v14l-8 -7z`},child:[]},{tag:`path`,attr:{d:`M10 5v14l-8 -7z`},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:`M12 5l0 14`},child:[]},{tag:`path`,attr:{d:`M5 12l14 0`},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:`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 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:`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 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.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 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:`M19.95 11a8 8 0 1 0 -.5 4m.5 5v-5h-5`},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:`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 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:`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 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:`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 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:`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 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:`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 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:`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 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:`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 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 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 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:`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 _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:`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 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 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 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:`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 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:`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 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:`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 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 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 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 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 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:`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 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:`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 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:`M18 6l-12 12`},child:[]},{tag:`path`,attr:{d:`M6 6l12 12`},child:[]}]})(e)}function Dl(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function Ol(e,t){e.classList?e.classList.add(t):Dl(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function kl(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function Al(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=kl(e.className,t):e.setAttribute(`class`,kl(e.className&&e.className.baseVal||``,t))}var jl={disabled:!1},Ml=N.createContext(null),Nl=function(e){return e.scrollTop};Ho();var Pl=n(o()),Fl=`unmounted`,Il=`exited`,Ll=`entering`,Rl=`entered`,zl=`exiting`,Bl=function(e){Ko(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=Il,r.appearStatus=Ll):o=Rl:o=t.unmountOnExit||t.mountOnEnter?Fl:Il,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:Il}: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=Ll):(n===`entering`||n===`entered`)&&(t=zl)}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:Pl.findDOMNode(this);n&&Nl(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:Fl})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Pl.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||jl.disabled){this.safeSetState({status:Rl},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:Ll},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:Rl},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:Pl.findDOMNode(this);if(!t||jl.disabled){this.safeSetState({status:Il},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:zl},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Il},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:Pl.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=Vo(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return N.createElement(Ml.Provider,{value:null},typeof n==`function`?n(e,r):N.cloneElement(N.Children.only(n),r))},t}(N.Component);Bl.contextType=Ml,Bl.propTypes={};function Vl(){}Bl.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Vl,onEntering:Vl,onEntered:Vl,onExit:Vl,onExiting:Vl,onExited:Vl},Bl.UNMOUNTED=Fl,Bl.EXITED=Il,Bl.ENTERING=Ll,Bl.ENTERED=Rl,Bl.EXITING=zl,Wo(),Ho();var Jee=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Ol(e,t)})},Hl=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Al(e,t)})},Ul=function(e){Ko(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&&Nl(e),r&&(this.appliedClasses[t][n]=r,Jee(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&&Hl(e,r),i&&Hl(e,i),a&&Hl(e,a)},n.render=function(){var e=this.props;e.classNames;var t=Vo(e,[`classNames`]);return N.createElement(Bl,Uo({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(N.Component);Ul.defaultProps={classNames:``},Ul.propTypes={};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`)()})(),Yee=(function(){return typeof requestAnimationFrame==`function`?requestAnimationFrame.bind(ql):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),Xee=2;function Zee(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&s()}function o(){Yee(a)}function s(){var e=Date.now();if(n){if(e-i<Xee)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return s}var Qee=20,$ee=[`top`,`right`,`bottom`,`left`,`width`,`height`,`size`,`weight`],ete=typeof MutationObserver<`u`,tte=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Zee(this.refresh.bind(this),Qee)}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),ete?(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;$ee.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 nte(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 rte(e){var t=e.getBBox();return $l(0,0,t.width,t.height)}function ite(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Xl;var r=Yl(e).getComputedStyle(e),i=nte(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)),!ote(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 ate=(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 ote(e){return e===Yl(e).document.documentElement}function ste(e){return Kl?ate(e)?rte(e):ite(e):Xl}function cte(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 lte=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=ste(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}(),ute=function(){function e(e,t){var n=cte(t);Jl(this,{target:e,contentRect:n})}return e}(),dte=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 lte(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 ute(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 dte(t,tte.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})(),fte=!0;function pte(e,t){if(!fte){if(e)return;var n=`Warning: `+t;typeof console<`u`&&console.warn(n);try{throw Error(n)}catch{}}}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 mte(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 hte(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 gte(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=gte(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.
1
+ import{A as e,D as t,E as n,O as r,T as i,i as a,k as o}from"./iframe-tFAZUsBl.js";import{t as s}from"./react-dom-BYNB9LbF.js";import{t as c}from"./jsx-runtime-B8tE-sQF.js";import{$ as l,At as u,Cn as d,Ct as f,Dn as p,Dt as m,En as h,Et as g,Ft as _,It as v,Jt as y,Lt as b,Mt as x,Nt as S,On as C,P as w,Pt as T,Q as E,Sn as D,St as O,T as k,Tn as A,Tt as ee,U as j,Wt as te,X as ne,Xt as re,Y as ie,Yt as ae,Z as oe,_ as se,_n as M,_t as ce,an as le,bn as ue,bt as de,cn as fe,ct as pe,d as me,dn as he,dt as ge,et as _e,fn as ve,ft as ye,gn as be,gt as xe,hn as Se,ht as Ce,it as we,jt as Te,kn as Ee,kt as De,ln as Oe,lt as ke,mn as Ae,mt as je,nt as Me,on as Ne,ot as Pe,pn as Fe,pt as Ie,rt as Le,sn as Re,st as ze,t as Be,un as Ve,vn as He,vt as Ue,wn as We,wt as Ge,xn as Ke,xt as qe,yn as Je}from"./legend-context-3AYFKhyL.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=be(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,h(-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}),eee={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 gt(e,t){return t===`start`?0:t===`end`?e:ft(t)?mt(t)*e:e/2}function _t(e,t,n=!0){return typeof t==`number`?t:ft(t)?(n?mt(t):pt(t))*e:e}function tee(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 vt(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=yt(r),d=Ct(e.x,c,i,u.x),f=Ct(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 yt(e,t=`center`){return D(e)?{x:Ee(e.x,t),y:Ee(e.y,t)}:(e=Ee(e,t),{x:e,y:e})}var bt=(e,t)=>e&&e.autoFit&&t<1;function xt(e,t){let n=e.font,r=He(n)?n:[n];return bt(e,t)?r.map(function(e){let n=We(e);return n.size=Math.floor(e.size*t),n.lineHeight=e.lineHeight,We(n)}):r.map(e=>We(e))}function St(e){return e&&(Se(e.xValue)||Se(e.yValue))}function Ct(e,t,n=0,r){return e-gt(t,r)+n}function wt(e,t,n){let r=n.init;if(r)return r===!0?Et(t,n):Dt(e,t,n)}function Tt(e,t,n){let r=!1;return t.forEach(t=>{Je(e[t])?(r=!0,n[t]=e[t]):Se(n[t])&&delete n[t]}),r}function Et(e,t){return eee[t.type||`line`](e)}function Dt(e,t,n){let r=ve(n.init,[{chart:e,properties:t,options:n}]);if(r===!0)return Et(t,n);if(D(r))return r}var Ot=new Map,kt=e=>isNaN(e)||e<=0,At=e=>e.reduce(function(e,t){return e+=t.string,e},``);function jt(e){if(e&&typeof e==`object`){let t=e.toString();return t===`[object HTMLImageElement]`||t===`[object HTMLCanvasElement]`}}function Mt(e,{x:t,y:n},r){r&&(e.translate(t,n),e.rotate(h(r)),e.translate(-t,-n))}function Nt(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 Pt(e,t){e.shadowColor=t.backgroundShadowColor,e.shadowBlur=t.shadowBlur,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY}function Ft(e,t){let n=t.content;if(jt(n))return{width:_t(n.width,t.width),height:_t(n.height,t.height)};let r=xt(t),i=t.textStrokeWidth,a=He(n)?n:[n],o=a.join()+At(r)+i+(e._measureText?`-spriting`:``);return Ot.has(o)||Ot.set(o,Vt(e,a,r,i)),Ot.get(o)}function It(e,t,n){let{x:r,y:i,width:a,height:o}=t;e.save(),Pt(e,n);let s=Nt(e,n);e.fillStyle=n.backgroundColor,e.beginPath(),he(e,{x:r,y:i,w:a,h:o,radius:ot(p(n.borderRadius),0,Math.min(a,o)/2)}),e.closePath(),e.fill(),s&&(e.shadowColor=n.borderShadowColor,e.stroke()),e.restore()}function Lt(e,t,n,r){let i=n.content;if(jt(i)){e.save(),e.globalAlpha=Wt(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=xt(n,r),s=n.color,c=He(s)?s:[s],l=tee(t,n),u=t.y+n.textStrokeWidth/2;e.save(),e.textBaseline=`middle`,e.textAlign=n.textAlign,Rt(e,n)&&Ht(e,{x:l,y:u},a,o),Ut(e,{x:l,y:u},a,{fonts:o,colors:c}),e.restore()}function Rt(e,t){if(t.textStrokeWidth>0)return e.lineJoin=`round`,e.miterLimit=2,e.lineWidth=t.textStrokeWidth,e.strokeStyle=t.textStrokeColor,!0}function zt(e,t,n,r){let{radius:i,options:a}=t,o=a.pointStyle,s=a.rotation,c=(s||0)*fe;if(jt(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}kt(i)||Bt(e,{x:n,y:r,radius:i,rotation:s,style:o,rad:c})}function Bt(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,Oe),e.closePath();break;case`triangle`:e.moveTo(t+Math.sin(o)*r,n-Math.cos(o)*r),o+=Ve,e.lineTo(t+Math.sin(o)*r,n-Math.cos(o)*r),o+=Ve,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+Re)*l,c=Math.sin(o+Re)*l,e.arc(t-s,n-c,u,o-Ne,o-le),e.arc(t+c,n-s,u,o-le,o),e.arc(t+s,n+c,u,o,o+le),e.arc(t-c,n+s,u,o+le,o+Ne),e.closePath();break;case`rect`:if(!i){l=Math.SQRT1_2*r,e.rect(t-l,n-l,2*l,2*l);break}o+=Re;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+=Re;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+=Re,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 Vt(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 Ht(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 Ut(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 Wt(e,t){let n=ue(e)?e:t;return ue(n)?it(n,0,1):1}var Gt=[`left`,`bottom`,`top`,`right`];function Kt(e,t){let{pointX:n,pointY:r,options:i}=t,a=i.callout,o=a&&a.display&&Zt(t,a);if(!o||$t(t,a,o))return;if(e.save(),e.beginPath(),!Nt(e,a))return e.restore();let{separatorStart:s,separatorEnd:c}=qt(t,o),{sideStart:l,sideEnd:u}=Yt(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(),h(-t.rotation));e.lineTo(d.x,d.y),e.stroke(),e.restore()}function qt(e,t){let{x:n,y:r,x2:i,y2:a}=e,o=Jt(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 Jt(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 Yt(e,t,n){let{y:r,width:i,height:a,options:o}=e,s=o.callout.start,c=Xt(t,o.callout),l,u;return t===`left`||t===`right`?(l={x:n.x,y:r+_t(a,s)},u={x:l.x+c,y:l.y}):(l={x:n.x+_t(i,s),y:n.y},u={x:l.x,y:l.y+c}),{sideStart:l,sideEnd:u}}function Xt(e,t){let n=t.side;return e===`left`||e===`top`?-n:n}function Zt(e,t){let n=t.position;return Gt.includes(n)?n:Qt(e,t)}function Qt(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,g=_t(o,m),_=_t(s,m),v=[n,n+g,n+g,i],y=[r+_,a,r,a],b=[];for(let e=0;e<4;e++){let t=tt({x:v[e],y:y[e]},p,h(f));b.push({position:Gt[e],distance:be(t,{x:c,y:l})})}return b.sort((e,t)=>e.distance-t.distance)[0].position}function $t(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 en={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 tn(e,t,n){return t=typeof t==`number`?t:e.parse(t),Ke(t)?e.getPixelForValue(t):n}function nn(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 rn(e,t){if(e){let n=e.options.reverse;return{start:tn(e,t.min,n?t.end:t.start),end:tn(e,t.max,n?t.start:t.end)}}}function an(e,t){let{chartArea:n,scales:r}=e,i=r[nn(r,t,`xScaleID`)],a=r[nn(r,t,`yScaleID`)],o=n.width/2,s=n.height/2;return i&&(o=tn(i,t.xValue,i.left+i.width/2)),a&&(s=tn(a,t.yValue,a.top+a.height/2)),{x:o,y:s}}function on(e,t){let n=e.scales,r=n[nn(n,t,`xScaleID`)],i=n[nn(n,t,`yScaleID`)];if(!r&&!i)return{};let{left:a,right:o}=r||e.chartArea,{top:s,bottom:c}=i||e.chartArea,l=dn(r,{min:t.xMin,max:t.xMax,start:a,end:o});a=l.start,o=l.end;let u=dn(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 sn(e,t){if(!St(t)){let n=on(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 un(e,t)}function cn(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?fn(i,a,t):pn(n,a,t),a}function ln(e,t){let n=on(e,t);return n.initProperties=wt(e,n,t),n.elements=[{type:`label`,optionScope:`label`,properties:ree(e,n,t),initProperties:n.initProperties}],n}function un(e,t){let n=an(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 dn(e,t){let n=rn(e,t)||t;return{start:Math.min(n.start,n.end),end:Math.max(n.start,n.end)}}function fn(e,t,n){let r=tn(e,n.value,NaN),i=tn(e,n.endValue,r);e.isHorizontal()?(t.x=r,t.x2=i):(t.y=r,t.y2=i)}function pn(e,t,n){for(let r of Object.keys(en)){let i=e[nn(e,n,r)];if(i){let{min:e,max:a,start:o,end:s,startProp:c,endProp:l}=en[r],u=rn(i,{min:n[e],max:n[a],start:i[o],end:i[s]});t[c]=u.start,t[l]=u.end}}}function mn({properties:e,options:t},n,r,i){let{x:a,x2:o,width:s}=e;return hn({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 nee({properties:e,options:t},n,r,i){let{y:a,y2:o,height:s}=e;return hn({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 hn(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+gt(l,a)}function ree(e,t,n){let r=n.label;r.backgroundColor=`transparent`,r.callout.display=!1;let i=yt(r.position),a=A(r.padding),o=Ft(e.ctx,r),s=mn({properties:t,options:n},o,i,a),c=nee({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 gn=[`enter`,`leave`],_n=gn.concat(`click`);function vn(e,t,n){t.listened=Tt(n,_n,t.listeners),t.moveListened=!1,gn.forEach(e=>{Je(n[e])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(e=>{!t.listened&&Je(e.click)&&(t.listened=!0),t.moveListened||gn.forEach(n=>{Je(e[n])&&(t.listened=!0,t.moveListened=!0)})})}function yn(e,t,n){if(e.listened)switch(t.type){case`mousemove`:case`mouseout`:return bn(e,t,n);case`click`:return iee(e,t,n)}}function bn(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=xn(a,`leave`,i,r);return xn(a,`enter`,r,i)||o}function xn({state:e,event:t},n,r,i){let a;for(let o of r)i.indexOf(o)<0&&(a=Sn(o.options[n]||e.listeners[n],o,t)||a);return a}function iee(e,t,n){let r=e.listeners,i=Xe(e.visibleElements,t,n.interaction),a;for(let e of i)a=Sn(e.options.click||r.click,e,t)||a;return a}function Sn(e,t,n){return ve(e,[t.$context,n])===!0}var Cn=[`afterDraw`,`beforeDraw`];function wn(e,t,n){let r=t.visibleElements;t.hooked=Tt(n,Cn,t.hooks),t.hooked||r.forEach(e=>{t.hooked||Cn.forEach(n=>{Je(e.options[n])&&(t.hooked=!0)})})}function Tn(e,t,n){if(e.hooked)return ve(t.options[n]||e.hooks[n],[t.$context])}function En(e,t,n){let r=Mn(e.scales,t,n),i=On(t,r,`min`,`suggestedMin`);i=On(t,r,`max`,`suggestedMax`)||i,i&&Je(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function Dn(e,t){for(let n of e)An(n,t)}function On(e,t,n,r){if(Ke(t[n])&&!kn(e.options,n,r)){let r=e[n]!==t[n];return e[n]=t[n],r}}function kn(e,t,n){return Se(e[t])||Se(e[n])}function An(e,t){for(let n of[`scaleID`,`xScaleID`,`yScaleID`]){let r=nn(t,e,n);r&&!t[r]&&jn(e,n)&&console.warn(`No scale found with id '${r}' for annotation '${e.id}'`)}}function jn(e,t){if(t===`scaleID`)return!0;let n=t.charAt(0);for(let t of[`Min`,`Max`,`Value`])if(Se(e[n+t]))return!0;return!1}function Mn(e,t,n){let r=t.axis,i=t.id,a=r+`ScaleID`,o={min:Ee(t.min,-1/0),max:Ee(t.max,1/0)};for(let s of n)s.scaleID===i?Nn(s,t,[`value`,`endValue`],o):nn(e,s,a)===i&&Nn(s,t,[r+`Min`,r+`Max`,r+`Value`],o);return o}function Nn(e,t,n,r){for(let i of n){let n=e[i];if(Se(n)){let e=t.parse(n);r.min=Math.min(r.min,e),r.max=Math.max(r.max,e)}}}var Pn=class extends re{inRange(e,t,n,r){let{x:i,y:a}=tt({x:e,y:t},this.getCenterPoint(r),h(-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(),Mt(e,this.getCenterPoint(),this.options.rotation),It(e,this,this.options),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,t){return ln(e,t)}};Pn.id=`boxAnnotation`,Pn.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},Pn.defaultRoutes={borderColor:`color`,backgroundColor:`color`},Pn.descriptors={label:{_fallback:!0}};var Fn=class extends re{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||(cee(e,this),e.save(),Mt(e,this.getCenterPoint(),this.rotation),Lt(e,this,t,this._fitRatio),e.restore())}resolveElementProperties(e,t){let n=In(e,t);if(!n)return{};let{controllerMeta:r,point:i,radius:a}=aee(e,t,n),o=Ft(e.ctx,t),s=oee(o,a);bt(t,s)&&(o={width:o.width*s,height:o.height*s});let{position:c,xAdjust:l,yAdjust:u}=t,d=vt(i,o,{borderWidth:0,position:c,xAdjust:l,yAdjust:u});return{initProperties:wt(e,d,t),...d,...r,rotation:t.rotation,_fitRatio:s}}};Fn.id=`doughnutLabelAnnotation`,Fn.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},Fn.defaultRoutes={};function In(e,t){return e.getSortedVisibleDatasetMetas().reduce(function(n,r){let i=r.controller;return i instanceof ae&&Ln(e,t,r.data)&&(!n||i.innerRadius<n.controller.innerRadius)&&i.options.circumference>=90?r:n},void 0)}function Ln(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 aee({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,...see(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 oee({width:e,height:t},n){let r=Math.sqrt(e**2+t**2);return n*2/r}function see(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:Oe};let l=(-o-Math.sqrt(c))/2,u=(-o+Math.sqrt(c))/2;return{_startAngle:M({x:t,y:n},{x:l,y:e}).angle,_endAngle:M({x:t,y:n},{x:u,y:e}).angle}}function cee(e,t){let{_centerX:n,_centerY:r,_radius:i,_startAngle:a,_endAngle:o,_counterclockwise:s,options:c}=t;e.save();let l=Nt(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 Rn=class extends re{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=!Se(this._visible)||this._visible;!t.display||!t.content||!n||(e.save(),Mt(e,this.getCenterPoint(),this.rotation),Kt(e,this),It(e,this,t),Lt(e,lee(this),t),e.restore())}resolveElementProperties(e,t){let n;if(St(t))n=an(e,t);else{let{centerX:r,centerY:i}=on(e,t);n={x:r,y:i}}let r=A(t.padding),i=Ft(e.ctx,t),a=vt(n,i,t,r);return{initProperties:wt(e,a,t),pointX:n.x,pointY:n.y,...a,rotation:t.rotation}}};Rn.id=`labelAnnotation`,Rn.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},Rn.defaultRoutes={borderColor:`color`};function lee({x:e,y:t,width:n,height:r,options:i}){let a=i.borderWidth/2,o=A(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,Un=(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},Wn=(e,t,n,r)=>(1-r)*(1-r)*e+2*(1-r)*r*t+r*r*n,Gn=(e,t,n,r)=>({x:Wn(e.x,t.x,n.x,r),y:Wn(e.y,t.y,n.y,r)}),Kn=(e,t,n,r)=>2*(1-r)*(t-e)+2*r*(n-t),qn=(e,t,n,r)=>-Math.atan2(Kn(e.x,t.x,n.x,r),Kn(e.y,t.y,n.y,r))+.5*Ne,Jn=class extends re{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){Nt(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)||Zn(this,n,r);return o.restore(),l}let s=Hn(i);return pee(this,n,s,r)||Zn(this,n,r)}return uee(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(),!Nt(e,o))return e.restore();Pt(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}=er(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(),nr(e,0,u,c),nr(e,s,-d,l),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,t){let n=cn(e,t),{x:r,y:i,x2:a,y2:o}=n,s=dee(n,e.chartArea),c=s?fee({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=wt(e,c,t),t.curve&&(c.cp=bee(c,t,be({x:c.x,y:c.y},{x:c.x2,y:c.y2})));let l=mee(e,c,t.label);return l._visible=s,c.elements=[{type:`label`,optionScope:`label`,properties:l,initProperties:c.initProperties}],c}};Jn.id=`lineAnnotation`;var Yn={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};Jn.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Yn),fill:!1,length:12,start:Object.assign({},Yn),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({},Rn.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},Jn.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},Jn.defaultRoutes={borderColor:`color`};function uee(e,{mouseX:t,mouseY:n},r,{hitSize:i,useFinalPosition:a}){return at(Un(t,n,e.getProps([`x`,`y`,`x2`,`y2`],a),r),i)||Zn(e,{mouseX:t,mouseY:n},a,r)}function dee({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 Xn({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 fee(e,t,n){let{x:r,y:i}=Xn(e,t,n),{x:a,y:o}=Xn(t,e,n);return{x:r,y:i,x2:a,y2:o,width:Math.abs(a-r),height:Math.abs(o-i)}}function pee(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 Zn(e,{mouseX:t,mouseY:n},r,i){let a=e.label;return a.options.display&&a.inRange(t,n,i,r)}function mee(e,t,n){let r=n.borderWidth,i=A(n.padding),a=Ft(e.ctx,n);return gee(t,n,{width:a.width+i.width+r,height:a.height+i.height+r,padding:i},e.chartArea)}function hee(e){let{x:t,y:n,x2:r,y2:i}=e,a=Math.atan2(i-n,r-t);return a>Ne/2?a-Ne:a<Ne/-2?a+Ne:a}function gee(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},f=t.rotation===`auto`?hee(e):h(t.rotation),p=_ee(i,a,f),m=vee(e,t,{labelSize:p,padding:o},r),g=e.cp?Gn(l,e.cp,u,m):zn(l,u,m),_={size:p.w,min:r.left,max:r.right,padding:o.left},v={size:p.h,min:r.top,max:r.bottom,padding:o.top},y=$n(g.x,_)+s,b=$n(g.y,v)+c;return{x:y-i/2,y:b-a/2,x2:y+i/2,y2:b+a/2,centerX:y,centerY:b,pointX:g.x,pointY:g.y,width:i,height:a,rotation:d(f)}}function _ee(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 vee(e,t,n,r){let i,a=yee(e,r);return i=t.position===`start`?Qn({w:e.x2-e.x,h:e.y2-e.y},n,t,a):t.position===`end`?1-Qn({w:e.x-e.x2,h:e.y-e.y2},n,t,a):gt(1,t.position),i}function Qn(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 yee(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 $n(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 er(e){let t=e.options,n=t.arrowHeads&&t.arrowHeads.start,r=t.arrowHeads&&t.arrowHeads.end;return{startOpts:n,endOpts:r,startAdjust:tr(e,n),endAdjust:tr(e,r)}}function tr(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 nr(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(),Pt(e,r),Nt(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 bee(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=yt(t.controlPoint,0);return tt({x:s+_t(n,u.x,!1),y:c+_t(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),nr(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}=er(t),p={x:i,y:a},m={x:o,y:s},h=qn(p,n,m,0),g=qn(p,n,m,1)-Ne,_=Gn(p,n,m,d/r),v=Gn(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 re{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),h(-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(),Mt(e,this.getCenterPoint(),a.rotation),Pt(e,this.options),e.beginPath(),e.fillStyle=a.backgroundColor;let o=Nt(e,a);e.ellipse(r,i,n/2,t/2,Ne/2,0,2*Ne),e.fill(),o&&(e.shadowColor=a.borderShadowColor,e.stroke()),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,t){return ln(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({},Pn.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=h(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 re{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,Pt(e,t);let r=Nt(e,t);zt(e,this,this.centerX,this.centerY),r&&!jt(t.pointStyle)&&(e.shadowColor=t.borderShadowColor,e.stroke()),e.restore(),t.borderWidth=n}resolveElementProperties(e,t){let n=sn(e,t);return n.initProperties=wt(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 re{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),h(-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,Pt(e,n);let r=Nt(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=sn(e,t),{sides:r,rotation:i}=t,a=[],o=2*Ne/r,s=i*fe;for(let i=0;i<r;i++,s+=o){let r=lr(n,t,s);r.initProperties=wt(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:Pn,doughnutLabel:Fn,ellipse:ar,label:Rn,line:Jn,point:sr,polygon:cr};Object.keys(dr).forEach(e=>{Ae.describe(`elements.${dr[e].id}`,{_fallback:`plugins.annotation.common`})});var fr={update:Object.assign},pr=_n.concat(Cn),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),Se(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 te(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=_n.concat(Cn),Ar={id:`annotation`,version:Er,beforeRegister(){dt(`chart.js`,`4.0`,y.version)},afterRegister(){y.register(dr)},afterUnregister(){y.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),Dn(i.filter(Or),e.scales)},afterDataLimits(e,t){let n=Dr.get(e);En(e,t.scale,n.annotations.filter(Or).filter(e=>e.display&&e.adjustScaleRange))},afterUpdate(e,t,n){let r=Dr.get(e);vn(e,r,n),_r(e,r,n,t.mode),r.visibleElements=r.elements.filter(e=>!e.skip&&e.options.display),wn(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){yn(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&&Fe(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&&C(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?(Tn(n,i,`beforeDraw`),i.draw(e,t),Tn(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=t({FILE:()=>Br,HTML:()=>Ur,TEXT:()=>Hr,URL:()=>Vr});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=e(a(),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,wa=new Sa(Ca.registerPendingError);function Ta(e){Ca.enqueueTask(wa.create(e))}const Ea=`dnd-core/ADD_SOURCE`,Da=`dnd-core/ADD_TARGET`,Oa=`dnd-core/REMOVE_SOURCE`,ka=`dnd-core/REMOVE_TARGET`;function xee(e){return{type:Ea,payload:{sourceId:e}}}function See(e){return{type:Da,payload:{targetId:e}}}function Cee(e){return{type:Oa,payload:{sourceId:e}}}function wee(e){return{type:ka,payload:{targetId:e}}}function Tee(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 Eee(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 Aa(e,t){if(t&&Array.isArray(e)){e.forEach(e=>Aa(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 ja;(function(e){e.SOURCE=`SOURCE`,e.TARGET=`TARGET`})(ja||={});var Dee=0;function Oee(){return Dee++}function kee(e){let t=Oee().toString();switch(e){case ja.SOURCE:return`S${t}`;case ja.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function Ma(e){switch(e[0]){case`S`:return ja.SOURCE;case`T`:return ja.TARGET;default:throw Error(`Cannot parse handler ID: ${e}`)}}function Na(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 Aee=class{addSource(e,t){Aa(e),Tee(t);let n=this.addHandler(ja.SOURCE,e,t);return this.store.dispatch(xee(n)),n}addTarget(e,t){Aa(e,!0),Eee(t);let n=this.addHandler(ja.TARGET,e,t);return this.store.dispatch(See(n)),n}containsHandler(e){return Na(this.dragSources,e)||Na(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 Ma(e)===ja.SOURCE}isTargetId(e){return Ma(e)===ja.TARGET}removeSource(e){Ci(this.getSource(e),`Expected an existing source.`),this.store.dispatch(Cee(e)),Ta(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){Ci(this.getTarget(e),`Expected an existing target.`),this.store.dispatch(wee(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=kee(e);return this.types.set(r,t),e===ja.SOURCE?this.dragSources.set(r,n):e===ja.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 jee=(e,t)=>e===t;function Mee(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function Nee(e,t,n=jee){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 Pee(e=da,t){switch(t.type){case Ni:break;case Ea:case Da:case ka:case Oa: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||!Nee(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 Pa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fa(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){Pa(e,t,n[t])})}return e}var Ia={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function La(e=Ia,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 Mee(e.clientOffset,n.clientOffset)?e:Fa({},e,{clientOffset:n.clientOffset});case Fi:case Pi:return Ia;default:return e}}function Ra(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function za(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){Ra(e,t,n[t])})}return e}var Ba={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Va(e=Ba,t){let{payload:n}=t;switch(t.type){case ji:return za({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Mi:return za({},e,{isSourcePublic:!0});case Ni:return za({},e,{targetIds:n.targetIds});case ka:return e.targetIds.indexOf(n.targetId)===-1?e:za({},e,{targetIds:Ei(e.targetIds,n.targetId)});case Pi:return za({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Fi:return za({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Ha(e=0,t){switch(t.type){case Ea:case Da:return e+1;case Oa:case ka:return e-1;default:return e}}function Fee(e=0){return e+1}function Ua(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wa(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){Ua(e,t,n[t])})}return e}function Ga(e={},t){return{dirtyHandlerIds:Pee(e.dirtyHandlerIds,{type:t.type,payload:Wa({},t.payload,{prevTargetIds:Ti(e,`dragOperation.targetIds`,[])})}),dragOffset:La(e.dragOffset,t),refCount:Ha(e.refCount,t),dragOperation:Va(e.dragOperation,t),stateId:Fee(e.stateId)}}function Ka(e,t=void 0,n={},r=!1){let i=qa(r),a=new oa(i,new ma(i,new Aee(i))),o=e(a,t,n);return a.receiveBackend(o),a}function qa(e){let t=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__;return Si(Ga,e&&t&&t({name:`dnd-core`,instanceId:`dnd-core`}))}var P=c();function Ja(e,t){if(e==null)return{};var n=Ya(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 Ya(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 Xa=0,Za=Symbol.for(`__REACT_DND_CONTEXT_INSTANCE__`),Qa=(0,N.memo)(function(e){var{children:t}=e;let[n,r]=$a(Ja(e,[`children`]));return(0,N.useEffect)(()=>{if(r){let e=to();return++Xa,()=>{--Xa===0&&(e[Za]=null)}}},[]),(0,P.jsx)(ui.Provider,{value:n,children:t})});function $a(e){return`manager`in e?[{dragDropManager:e.manager},!1]:[eo(e.backend,e.context,e.options,e.debugMode),!e.context]}function eo(e,t=to(),n,r){let i=t;return i[Za]||(i[Za]={dragDropManager:Ka(e,t,n,r)}),i[Za]}function to(){return typeof global<`u`?global:window}const no=typeof window<`u`?N.useLayoutEffect:N.useEffect;var ro=e(b(),1);function io(e,t,n){let[r,i]=(0,N.useState)(()=>t(e)),a=(0,N.useCallback)(()=>{let a=t(e);(0,ro.default)(r,a)||(i(a),n&&n())},[r,e,n]);return no(a),[r,a]}function ao(e,t,n){let[r,i]=io(e,t,n);return no(function(){let t=e.getHandlerId();if(t!=null)return e.subscribeToStateChange(i,{handlerIds:[t]})},[e,i]),r}function oo(e,t,n){return ao(t,e||(()=>({})),()=>n.reconnect())}function so(e,t){let n=[...t||[]];return t==null&&typeof e!=`function`&&n.push(e),(0,N.useMemo)(()=>typeof e==`function`?e():e,n)}function Iee(e){return(0,N.useMemo)(()=>e.hooks.dragSource(),[e])}function Lee(e){return(0,N.useMemo)(()=>e.hooks.dragPreview(),[e])}var co=!1,lo=!1,Ree=class{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){Ci(!co,`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 co=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{co=!1}}isDragging(){if(!this.sourceId)return!1;Ci(!lo,`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 lo=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{lo=!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()}},uo=!1,fo=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(!uo,`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 uo=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{uo=!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 po(e,t,n){let r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}function mo(e,t,n){let r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}function ho(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 go(e){return typeof e==`object`&&!!e&&Object.prototype.hasOwnProperty.call(e,`current`)}function _o(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 vo(e){return(t=null,n=null)=>{if(!(0,N.isValidElement)(t)){let r=t;return e(r,n),r}let r=t;return _o(r),xo(r,n?t=>e(t,n):e)}}function yo(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];if(n.endsWith(`Ref`))t[n]=e[n];else{let e=vo(r);t[n]=()=>e}}),t}function bo(e,t){typeof e==`function`?e(t):e.current=t}function xo(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=>{bo(n,e),bo(t,e)}}):(0,N.cloneElement)(e,{ref:t})}var So=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!ho(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!ho(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=yo({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,go(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,go(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}},Co=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!ho(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=yo({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,go(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 wo(){let{dragDropManager:e}=(0,N.useContext)(ui);return Ci(e!=null,`Expected drag drop context`),e}function To(e,t){let n=wo(),r=(0,N.useMemo)(()=>new So(n.getBackend()),[n]);return no(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),no(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function Eo(){let e=wo();return(0,N.useMemo)(()=>new Ree(e),[e])}var Do=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 Oo(e,t,n){let r=(0,N.useMemo)(()=>new Do(e,t,n),[t,n]);return(0,N.useEffect)(()=>{r.spec=e},[e]),r}function ko(e){return(0,N.useMemo)(()=>{let t=e.type;return Ci(t!=null,`spec.type must be defined`),t},[e])}function Ao(e,t,n){let r=wo(),i=Oo(e,t,n),a=ko(e);no(function(){if(a!=null){let[e,o]=mo(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o}},[r,t,n,i,a])}function jo(e,t){let n=so(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=Eo(),i=To(n.options,n.previewOptions);return Ao(n,r,i),[oo(n.collect,r,i),Iee(i),Lee(i)]}function Mo(e){let t=wo().getMonitor(),[n,r]=io(t,e);return(0,N.useEffect)(()=>t.subscribeToOffsetChange(r)),(0,N.useEffect)(()=>t.subscribeToStateChange(r)),n}function No(e){return(0,N.useMemo)(()=>e.hooks.dropTarget(),[e])}function Po(e){let t=wo(),n=(0,N.useMemo)(()=>new Co(t.getBackend()),[t]);return no(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function Fo(){let e=wo();return(0,N.useMemo)(()=>new fo(e),[e])}function Io(e){let{accept:t}=e;return(0,N.useMemo)(()=>(Ci(e.accept!=null,`accept must be defined`),Array.isArray(t)?t:[t]),[t])}var Lo=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 Ro(e,t){let n=(0,N.useMemo)(()=>new Lo(e,t),[t]);return(0,N.useEffect)(()=>{n.spec=e},[e]),n}function zo(e,t,n){let r=wo(),i=Ro(e,t),a=Io(e);no(function(){let[e,o]=po(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o},[r,t,i,n,a.map(e=>e.toString()).join(`|`)])}function Bo(e,t){let n=so(e,t),r=Fo(),i=Po(n.options);return zo(n,r,i),[oo(n.collect,r,i),No(i)]}function Vo(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 Ho=n((()=>{}));function Uo(){return Uo=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},Uo.apply(null,arguments)}var Wo=n((()=>{}));function Go(e,t){return Go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Go(e,t)}function Ko(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Go(e,t)}function qo(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 Jo,Yo=n((()=>{Jo=function(){return Jo=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},Jo.apply(this,arguments)}})),Xo=i((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}}));Yo();var Zo=Xo(),Qo=new Map,$o=function(e){return e.cloneNode(!0)},es=function(){return window.location.protocol===`file:`},ts=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,Zo.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(es()?`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||es()&&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()},ns={},rs=function(e,t){ns[e]=ns[e]||[],ns[e].push(t)},is=function(e){for(var t=function(t,n){setTimeout(function(){if(Array.isArray(ns[e])){var n=Qo.get(e),r=ns[e][t];n instanceof SVGSVGElement&&r(null,$o(n)),n instanceof Error&&r(n),t===ns[e].length-1&&delete ns[e]}},0)},n=0,r=ns[e].length;n<r;n++)t(n)},as=function(e,t,n){if(Qo.has(e)){var r=Qo.get(e);if(r===void 0){rs(e,n);return}if(r instanceof SVGSVGElement){n(null,$o(r));return}}Qo.set(e,void 0),rs(e,n),ts(e,t,function(t,n){t?Qo.set(e,t):n.responseXML?.documentElement instanceof SVGSVGElement&&Qo.set(e,n.responseXML.documentElement),is(e)})},ss=function(e,t,n){ts(e,t,function(e,t){e?n(e):t.responseXML?.documentElement instanceof SVGSVGElement&&n(null,t.responseXML.documentElement)})},zee=0,Bee=function(){return++zee},cs=[],ls={},Vee=`http://www.w3.org/2000/svg`,us=`http://www.w3.org/1999/xlink`,ds=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(cs.indexOf(e)!==-1){cs.splice(cs.indexOf(e),1),e=null;return}cs.push(e),e.setAttribute(`src`,``),(r?as:ss)(s,i,function(r,i){if(!i){cs.splice(cs.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(qo(qo(qo([],(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+`-`+Bee();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(us,`href`);c&&c.toString()===`#`+_[e].id&&a.push(r[o])}for(var l=0,u=a.length;l<u;l++)a[l].setAttributeNS(us,`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`&&!ls[s])){for(var D=0,O=S.length;D<O;D++)Function(S[D])(window);ls[s]=!0}var k=i.querySelectorAll(`style`);if(Array.prototype.forEach.call(k,function(e){e.textContent+=``}),i.setAttribute(`xmlns`,Vee),i.setAttribute(`xmlns:xlink`,us),a(i),!e.parentNode){cs.splice(cs.indexOf(e),1),e=null,o(Error(`Parent node is null`));return}e.parentNode.replaceChild(i,e),cs.splice(cs.indexOf(e),1),e=null,o(null,i)})},Hee=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++)ds(e[v],f,g,u,m,c,function(t,n){o(t,n),e&&`length`in e&&e.length===++_&&i(_)});else e?ds(e,f,g,u,m,c,function(t,n){o(t,n),i(1),e=null}):i(0)},Uee=i(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),Wee=i(((e,t)=>{var n=Uee();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}})),fs=i(((e,t)=>{t.exports=Wee()()}));Ho(),Wo();var ps=e(fs()),Gee=function(e){return(e?.ownerDocument||document).defaultView||window},Kee=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},qee=[`afterInjection`,`beforeInjection`,`desc`,`evalScripts`,`fallback`,`httpRequestWithCredentials`,`loading`,`renumerateIRIElements`,`src`,`title`,`useRequestCache`,`wrapper`],ms=`http://www.w3.org/2000/svg`,hs=`http://www.w3.org/1999/xlink`,gs=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}Ko(t,e);var n=t.prototype;return n.renderSVG=function(){var e=this;if(this.reactWrapper instanceof Gee(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(ms,f),p.setAttribute(`xmlns`,ms),p.setAttribute(`xmlns:xlink`,hs),m=document.createElementNS(ms,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)})};Hee(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;Kee(Uo({},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=Vo(e,qee),a=r;return N.createElement(a,Uo({},i,{ref:this.refCallback},r===`svg`?{xmlns:ms,xmlnsXlink:hs}:{}),this.state.isLoading&&n&&N.createElement(n,null),this.state.hasError&&t&&N.createElement(t,null))},t}(N.Component);gs.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:``,evalScripts:`never`,fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:``,useRequestCache:!0,wrapper:`div`},gs.propTypes={afterInjection:ps.func,beforeInjection:ps.func,desc:ps.string,evalScripts:ps.oneOf([`always`,`once`,`never`]),fallback:ps.oneOfType([ps.func,ps.object,ps.string]),httpRequestWithCredentials:ps.bool,loading:ps.oneOfType([ps.func,ps.object,ps.string]),onError:ps.func,renumerateIRIElements:ps.bool,src:ps.string.isRequired,title:ps.string,useRequestCache:ps.bool,wrapper:ps.oneOf([`div`,`span`,`svg`])};var _s={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},vs=N.createContext&&N.createContext(_s),ys=[`attr`,`size`,`title`];function bs(e,t){if(e==null)return{};var n=xs(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 xs(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 Ss(){return Ss=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},Ss.apply(this,arguments)}function Cs(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 ws(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Cs(Object(n),!0).forEach(function(t){Ts(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ts(e,t,n){return t=Es(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Es(e){var t=Ds(e,`string`);return typeof t==`symbol`?t:t+``}function Ds(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 Os(e){return e&&e.map((e,t)=>N.createElement(e.tag,ws({key:t},e.attr),Os(e.child)))}function F(e){return t=>N.createElement(ks,Ss({attr:ws({},e.attr)},t),Os(e.child))}function ks(e){var t=t=>{var{attr:n,size:r,title:i}=e,a=bs(e,ys),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),N.createElement(`svg`,Ss({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:ws(ws({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 vs===void 0?t(_s):N.createElement(vs.Consumer,null,e=>t(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 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 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:`M12 5l0 14`},child:[]},{tag:`path`,attr:{d:`M18 13l-6 6`},child:[]},{tag:`path`,attr:{d:`M6 13l6 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:`M5 12l6 6`},child:[]},{tag:`path`,attr:{d:`M5 12l6 -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:`M5 12l14 0`},child:[]},{tag:`path`,attr:{d:`M13 18l6 -6`},child:[]},{tag:`path`,attr:{d:`M13 6l6 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:`M12 5l0 14`},child:[]},{tag:`path`,attr:{d:`M18 11l-6 -6`},child:[]},{tag:`path`,attr:{d:`M6 11l6 -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:[]}]})(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:`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 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:`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 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:`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 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:`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 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:`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 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:`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 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:`M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11`},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:`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 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:`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 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:`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 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:`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 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:`M4 19l16 0`},child:[]},{tag:`path`,attr:{d:`M4 15l4 -6l4 2l4 -5l4 4`},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:`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 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:`M5 12l5 5l10 -10`},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:`M6 9l6 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:`M15 6l-6 6l6 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:`M9 6l6 6l-6 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:`M6 15l6 -6l6 6`},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:`M11 7l-5 5l5 5`},child:[]},{tag:`path`,attr:{d:`M17 7l-5 5l5 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:`M7 7l5 5l-5 5`},child:[]},{tag:`path`,attr:{d:`M13 7l5 5l-5 5`},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:`M9 12l2 2l4 -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:[]},{tag:`path`,attr:{d:`M10 10l4 4m0 -4l-4 4`},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:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`},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:`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 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 7v5l3 3`},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 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 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:`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 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 6v6a3 3 0 0 0 3 3h10l-4 -4m0 8l4 -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:`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 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:`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 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:`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 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:`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 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:`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 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 19v.01`},child:[]},{tag:`path`,attr:{d:`M12 15v-10`},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 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 _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.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 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:`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 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:`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 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:`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 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:`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 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:`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 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:`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 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 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 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:`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 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:`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 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:`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 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:`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 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:`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 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:`M11 5l6 0`},child:[]},{tag:`path`,attr:{d:`M7 19l6 0`},child:[]},{tag:`path`,attr:{d:`M14 5l-4 14`},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:`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 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:`M12 4l0 16`},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:`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 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:[]}]})(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:`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 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 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 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:`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 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:`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 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:`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 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:`M12 3a9 9 0 1 0 9 9`},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 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 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:`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 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:`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 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:`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 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:`M5 12l14 0`},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:`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 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 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 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:`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 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:`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 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:`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 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:`M7 4v16l13 -8z`},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:`M20 5v14l-12 -7z`},child:[]},{tag:`path`,attr:{d:`M4 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:`M4 5v14l12 -7z`},child:[]},{tag:`path`,attr:{d:`M20 5l0 14`},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:`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 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:`M3 5v14l8 -7z`},child:[]},{tag:`path`,attr:{d:`M14 5v14l8 -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:`M21 5v14l-8 -7z`},child:[]},{tag:`path`,attr:{d:`M10 5v14l-8 -7z`},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:`M12 5l0 14`},child:[]},{tag:`path`,attr:{d:`M5 12l14 0`},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:`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 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:`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 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.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 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:`M19.95 11a8 8 0 1 0 -.5 4m.5 5v-5h-5`},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:`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 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:`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 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:`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 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:`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 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:`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 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:`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 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:`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 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 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 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:`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 _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:`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 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 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 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:`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 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:`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 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:`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 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 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 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 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 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:`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 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:`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 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:`M18 6l-12 12`},child:[]},{tag:`path`,attr:{d:`M6 6l12 12`},child:[]}]})(e)}function Dl(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function Ol(e,t){e.classList?e.classList.add(t):Dl(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function kl(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function Al(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=kl(e.className,t):e.setAttribute(`class`,kl(e.className&&e.className.baseVal||``,t))}var jl={disabled:!1},Ml=N.createContext(null),Nl=function(e){return e.scrollTop};Ho();var Pl=e(s()),Fl=`unmounted`,Il=`exited`,Ll=`entering`,Rl=`entered`,zl=`exiting`,Bl=function(e){Ko(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=Il,r.appearStatus=Ll):o=Rl:o=t.unmountOnExit||t.mountOnEnter?Fl:Il,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:Il}: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=Ll):(n===`entering`||n===`entered`)&&(t=zl)}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:Pl.findDOMNode(this);n&&Nl(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:Fl})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Pl.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||jl.disabled){this.safeSetState({status:Rl},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:Ll},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:Rl},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:Pl.findDOMNode(this);if(!t||jl.disabled){this.safeSetState({status:Il},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:zl},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Il},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:Pl.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=Vo(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return N.createElement(Ml.Provider,{value:null},typeof n==`function`?n(e,r):N.cloneElement(N.Children.only(n),r))},t}(N.Component);Bl.contextType=Ml,Bl.propTypes={};function Vl(){}Bl.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Vl,onEntering:Vl,onEntered:Vl,onExit:Vl,onExiting:Vl,onExited:Vl},Bl.UNMOUNTED=Fl,Bl.EXITED=Il,Bl.ENTERING=Ll,Bl.ENTERED=Rl,Bl.EXITING=zl,Wo(),Ho();var Jee=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Ol(e,t)})},Hl=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Al(e,t)})},Ul=function(e){Ko(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&&Nl(e),r&&(this.appliedClasses[t][n]=r,Jee(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&&Hl(e,r),i&&Hl(e,i),a&&Hl(e,a)},n.render=function(){var e=this.props;e.classNames;var t=Vo(e,[`classNames`]);return N.createElement(Bl,Uo({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(N.Component);Ul.defaultProps={classNames:``},Ul.propTypes={};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`)()})(),Yee=(function(){return typeof requestAnimationFrame==`function`?requestAnimationFrame.bind(ql):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),Xee=2;function Zee(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&s()}function o(){Yee(a)}function s(){var e=Date.now();if(n){if(e-i<Xee)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return s}var Qee=20,$ee=[`top`,`right`,`bottom`,`left`,`width`,`height`,`size`,`weight`],ete=typeof MutationObserver<`u`,tte=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Zee(this.refresh.bind(this),Qee)}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),ete?(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;$ee.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 nte(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 rte(e){var t=e.getBBox();return $l(0,0,t.width,t.height)}function ite(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Xl;var r=Yl(e).getComputedStyle(e),i=nte(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)),!ote(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 ate=(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 ote(e){return e===Yl(e).document.documentElement}function ste(e){return Kl?ate(e)?rte(e):ite(e):Xl}function cte(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 lte=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=ste(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}(),ute=function(){function e(e,t){var n=cte(t);Jl(this,{target:e,contentRect:n})}return e}(),dte=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 lte(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 ute(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 dte(t,tte.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})(),fte=!0;function pte(e,t){if(!fte){if(e)return;var n=`Warning: `+t;typeof console<`u`&&console.warn(n);try{throw Error(n)}catch{}}}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 mte(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 hte(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 gte(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=gte(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
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 _te(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 vte(){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 yte(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 bte(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 xte(e,t){if(e!==void 0)return t||e.ResizeObserver}function gu(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,gu(e.parentElement,t))}function _u(e){return`react-laag: Could not find a valid reference for the `+e+` element. There might be 2 causes:
4
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
5
  - Make sure that you are actually rendering the `+e+` when the isOpen prop is set to true`}function Ste(e){var t=e.enabled,n=e.onChange,r=e.environment,i=e.ResizeObserverPolyfill,a=e.overflowContainer,o=e.triggerOption,s=xte(r,i);(0,N.useEffect)(function(){},[s]);var c=(0,N.useRef)(null),l=!!o,u=_te({scrollContainers:[],trigger:null,layer:null}),d=u[0],f=u[1],p=vte(),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(_u(`layer`));if(!i&&!l)throw Error(_u(`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(_u(`layer`));if(!t&&!l)throw Error(_u(`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=gu(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 vu=(0,N.createContext)({});function Cte(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)(vu.Provider,{value:r},t)}function yu(e,t){for(var n=cu(e),r;!(r=n()).done;){var i=r.value.shouldCloseWhenClickedOutside;if(!i(t))return!1}return!0}function bu(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)(vu),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=yu(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 xu=[`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`],Su={top:`bottom`,left:`right`,bottom:`top`,right:`left`,center:`center`},Cu=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 wu(e,t){t===void 0&&(t=!0);var n=[`left`,`right`].includes(e);return new Cu(e,t?wu(Su[e],!1):null,n,n?`width`:`height`,n?`height`:`width`,n?`left`:`top`,n?`top`:`left`,e===`center`,![`right`,`bottom`].includes(e))}var Tu={top:wu(`top`),bottom:wu(`bottom`),left:wu(`left`),right:wu(`right`)},Eu=au({},Tu,{center:wu(`center`)}),Du=[`top`,`left`,`bottom`,`right`],Ou=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(Du.map(function(e){return[e,n[e]]})),a=cu(r),o;!(o=a()).done;)for(var s=o.value,c=cu(Du),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 Du.every(function(t){return e[t]>=0})}},{key:`negativeSides`,get:function(){var e=this;return Object.fromEntries(Du.filter(function(t){return e[t]<0}).map(function(t){return[t,e[t]]}))}}]),e}();function ku(){return[...arguments].reduce(function(e,t){return e+(t?fu(t):0)},0)}function Au(e){return{top:e.top,left:e.left,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}var ju={top:0,left:0,right:0,bottom:0,width:0,height:0},Mu=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(Au(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):ku(f,h,g,y,b),w=m===`border-box`?fu(p):ku(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,ju,e)}var t=e.prototype;return t.toObject=function(){return Au(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 Tu){var l=Tu[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 Ou({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(Tu),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}(),Nu=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=Mu.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?Tu.top:Tu.left).prop,_=(s?Tu.bottom:Tu.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=Mu.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=Ou.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[Tu[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}(),Pu=function(e){mte(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=Mu.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}(Nu);function Fu(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 Iu={position:`absolute`,willChange:`top, left`,left:null,right:null,top:null,bottom:null};function Lu(e,t,n){var r;if(t.primary.isCenter)return Iu;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=Fu(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({},Iu,(r={},r[f]=`100%`,r[p]=pu(m,l,u),r))}var Ru=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=Tu[n];return[i,r===`center`?Eu.center:i.isHorizontal?r===`start`?Eu.top:Eu.bottom:r===`start`?Eu.left:Eu.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=Tu[o.isHorizontal?n.preferY:n.preferX],l=!o.isHorizontal&&t.triggerHasBiggerWidth||o.isHorizontal&&t.triggerHasBiggerHeight;function u(e,i){return new Nu(e,i,t,n.layerDimensions,r)}var d=[];return d[0]=u(o,s),d[1]=u(o,s.isCenter?c:Eu.center),d[2]=u(o,Eu[(s.opposite.isCenter?c.opposite:s.opposite).prop]),d[3]=u(c,l?o:Eu[o.opposite.prop]),d[4]=u(c,Eu.center),d[5]=u(c,l?Eu[o.opposite.prop]:o),d[6]=u(Tu[c.opposite.prop],l?o:Eu[o.opposite.prop]),d[7]=u(Tu[c.opposite.prop],Eu.center),d[8]=u(Tu[c.opposite.prop],l?Eu[o.opposite.prop]:o),d[9]=u(Tu[o.opposite.prop],s),d[10]=u(Tu[o.opposite.prop],s.isCenter?c:Eu.center),d[11]=u(Tu[o.opposite.prop],Eu[(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 Pu(Eu.center,Eu.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 Pu)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===Eu.left||[Eu.top,Eu.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:Lu(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=Ou.mergeSmallestSides(this.subjectsBounds.offsetsToScrollContainers(t,!0));return Object.entries(n.negativeSides).some(function(e){var n=e[0];return e[1]<=-t[Tu[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}(),zu=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=Mu.fromWindow(t);return new e({layer:Mu.fromElement(n,{environment:t,withTransform:!1}),trigger:c?Mu.create(Au(c())):Mu.fromElement(r),arrow:a?Mu.fromElement(a):Mu.empty(),parent:i?Mu.fromElement(i):l,window:l,scrollContainers:[l].concat(o.map(function(e){return Mu.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}(),Bu=null,Vu={auto:!1,arrowOffset:0,containerOffset:10,triggerOffset:0,overflowContainer:!0,placement:`top-center`,possiblePlacements:xu,preferX:`right`,preferY:`bottom`,snap:!1,container:void 0,trigger:void 0};function Hu(e){var t=e.isOpen,n=t===void 0?!1:t,r=e.overflowContainer,i=r===void 0?Vu.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?Vu.placement:c,u=e.possiblePlacements,d=u===void 0?Vu.possiblePlacements:u,f=e.preferX,p=f===void 0?Vu.preferX:f,m=e.preferY,h=m===void 0?Vu.preferY:m,g=e.auto,_=g===void 0?Vu.auto:g,v=e.snap,y=v===void 0?Vu.snap:v,b=e.triggerOffset,x=b===void 0?Vu.triggerOffset:b,S=e.containerOffset,C=S===void 0?Vu.containerOffset:S,w=e.arrowOffset,T=w===void 0?Vu.arrowOffset:w,E=e.container,D=E===void 0?Vu.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`:Ru.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=yte(re,n),se=(0,N.useRef)({cancelled:!1});(0,N.useEffect)(function(){return function(){se.current.cancelled=!0}},[]);var M=Ste({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=zu.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=Ru.create(f,m).result(t,n),v=g.hasDisappeared,b={layerSide:g.layerSide,styles:g.styles};if(!oe.current||Uu(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=bu({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,Pl.createPortal)((0,N.createElement)(Cte,{registrations:me,children:e}),i||!de?Gu(D):de):null}}}function Uu(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 Wu=`layers`;function Gu(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(Bu instanceof HTMLElement)return Bu;else t=document.getElementById(Wu),t||(t=document.createElement(`div`),t.id=Wu,t.style.cssText=`
@@ -7,19 +7,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7
7
  top: 0px;
8
8
  left: 0px;
9
9
  right: 0px;
10
- `,document.body.appendChild(t));return t}var Ku=[`size`,`angle`,`borderWidth`,`borderColor`,`roundness`,`backgroundColor`,`layerSide`,`style`],qu=`left`,Ju=`top`,Yu=`bottom`,Xu=`right`;function Zu(e,t){return Math.tan(e*(Math.PI/180))*t}function Qu(e,t,n,r){var i;return(i={},i[Yu]=`0 `+-r+` `+t+` `+e,i[Ju]=`0 0 `+t+` `+(e+r),i[Xu]=-r+` 0 `+e+` `+t,i[qu]=`0 0 `+(e+r)+` `+t,i)[n.prop]}function $u(e,t,n,r,i){var a,o,s,c=r/10*e*2,l=(a={},a[Yu]=[0,e],a[Ju]=[0,0],a[Xu]=[e,t],a[qu]=[0,t],a)[n.prop].join(` `),u=n.isHorizontal?`V 0`:`H `+t,d=t/2,f=t/2+Zu(i,e/8),p=e/8,m=(o={},o[Yu]=[`C`,f,p,d+c,0,d,0],o[Ju]=[`C`,f,e-p,d+c,e,d,e],o[Xu]=[`C`,p,t-f,0,d-c,0,d],o[qu]=[`C`,e-p,t-f,e,d-c,e,d],o)[n.prop].join(` `),h=t/2-Zu(i,e/8),g=e/8;return[`M`,l,u,m,(s={},s[Yu]=[`C`,d-c,0,h,g,l],s[Ju]=[`C`,d-c,e,h,e-g,l],s[Xu]=[`C`,0,d+c,g,t-h,l],s[qu]=[`C`,e,d+c,e-g,t-h,l],s)[n.prop].join(` `)].join(` `)}function ed(e,t,n,r,i){var a=Zu(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 td=(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=hte(e,Ku);if(h===`center`)return null;var y=Tu[h],b=r,x=Zu(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:Qu(b,x,y,s)}),(0,N.createElement)(`path`,{fill:p,strokeWidth:s,stroke:l,d:$u(b,x,y,d,a)}),(0,N.createElement)(`path`,{fill:p,d:ed(b,x,s,y,a)}))}),nd;(function(e){e[e.ENTERING=0]=`ENTERING`,e[e.LEAVING=1]=`LEAVING`,e[e.IDLE=2]=`IDLE`})(nd||={});function rd(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)(nd.IDLE),p=(0,N.useRef)(!1),m=(0,N.useCallback)(function(){clearTimeout(d.current),d.current=null,f.current=nd.IDLE},[]);function h(){f.current===nd.LEAVING&&d.current&&m(),!l&&(f.current=nd.ENTERING,d.current=window.setTimeout(function(){u(!0),d.current=null,f.current=nd.IDLE},r))}function g(e,t){if(f.current===nd.ENTERING&&d.current&&m(),l){if(t){u(!1),d.current=null,f.current=nd.IDLE;return}f.current=nd.LEAVING,d.current=window.setTimeout(function(){u(!1),d.current=null,f.current=nd.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 id(e){return e}function ad(e){if(e==null)return id;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?m(e[0],e[1]):u(e);case`string`:case`symbol`:case`number`:return x(e)}}function od(e){return g(e)?NaN:Number(e)}function sd(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 cd(e){return typeof e==`string`||e instanceof String}function ld(e,t=id,n=0){if(!e)return;n<0&&(n=Math.max(e.length+n,0));let r=ad(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 ud(e,t){if(!e)return[];let n=_(e)||Array.isArray(e)?sd(0,e.length):Object.keys(e),r=ad(t??id),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 dd(e){return Array.isArray(e)}function fd(e){return typeof e==`number`||e instanceof Number}function pd(...e){}function md(e){return typeof e==`function`}function hd(e){return typeof e==`boolean`||e instanceof Boolean}function gd(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var _d=c((()=>{})),vd=t({default:()=>bd}),yd,bd,xd=c((()=>{_d(),yd=/^((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)-.*))$/,bd=gd(function(e){return yd.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91})})),Sd=`-ms-`,Cd=`-moz-`,wd=`-webkit-`,Td=`comm`,Ed=`rule`,Dd=`decl`,Od=`@import`,kd=`@namespace`,Ad=`@keyframes`,jd=`@layer`,Md=Math.abs,Nd=String.fromCharCode,Pd=Object.assign;function Fd(e,t){return Bd(e,0)^45?(((t<<2^Bd(e,0))<<2^Bd(e,1))<<2^Bd(e,2))<<2^Bd(e,3):0}function Id(e){return e.trim()}function Ld(e,t){return(e=t.exec(e))?e[0]:e}function Rd(e,t,n){return e.replace(t,n)}function zd(e,t,n){return e.indexOf(t,n)}function Bd(e,t){return e.charCodeAt(t)|0}function Vd(e,t,n){return e.slice(t,n)}function Hd(e){return e.length}function Ud(e){return e.length}function Wd(e,t){return t.push(e),e}function Gd(e,t){return e.map(t).join(``)}function Kd(e,t){return e.filter(function(e){return!Ld(e,t)})}var qd=1,Jd=1,Yd=0,Xd=0,Zd=0,Qd=``;function $d(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:qd,column:Jd,length:o,return:``,siblings:s}}function ef(e,t){return Pd($d(``,null,null,``,null,null,0,e.siblings),e,{length:-e.length},t)}function tf(e){for(;e.root;)e=ef(e.root,{children:[e]});Wd(e,e.siblings)}function nf(){return Zd}function rf(){return Zd=Xd>0?Bd(Qd,--Xd):0,Jd--,Zd===10&&(Jd=1,qd--),Zd}function af(){return Zd=Xd<Yd?Bd(Qd,Xd++):0,Jd++,Zd===10&&(Jd=1,qd++),Zd}function of(){return Bd(Qd,Xd)}function sf(){return Xd}function cf(e,t){return Vd(Qd,e,t)}function lf(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 uf(e){return qd=Jd=1,Yd=Hd(Qd=e),Xd=0,[]}function df(e){return Qd=``,e}function ff(e){return Id(cf(Xd-1,hf(e===91?e+2:e===40?e+1:e)))}function pf(e){for(;(Zd=of())&&Zd<33;)af();return lf(e)>2||lf(Zd)>3?``:` `}function mf(e,t){for(;--t&&af()&&!(Zd<48||Zd>102||Zd>57&&Zd<65||Zd>70&&Zd<97););return cf(e,sf()+(t<6&&of()==32&&af()==32))}function hf(e){for(;af();)switch(Zd){case e:return Xd;case 34:case 39:e!==34&&e!==39&&hf(Zd);break;case 40:e===41&&hf(e);break;case 92:af();break}return Xd}function gf(e,t){for(;af()&&e+Zd!==57&&!(e+Zd===84&&of()===47););return`/*`+cf(t,Xd-1)+`*`+Nd(e===47?e:af())}function _f(e){for(;!lf(of());)af();return cf(e,Xd)}function vf(e){return df(yf(``,null,null,null,[``],e=uf(e),0,[0],e))}function yf(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=af()){case 40:if(m!=108&&Bd(C,d-1)==58){zd(C+=Rd(ff(v),`&`,`&\f`),`&\f`,Md(l?s[l-1]:0))!=-1&&(_=-1);break}case 34:case 39:case 91:C+=ff(v);break;case 9:case 10:case 13:case 32:C+=pf(m);break;case 92:C+=mf(sf()-1,7);continue;case 47:switch(of()){case 42:case 47:Wd(xf(gf(af(),sf()),t,n,c),c),(lf(m||1)==5||lf(of()||1)==5)&&Hd(C)&&Vd(C,-1,void 0)!==` `&&(C+=` `);break;default:C+=`/`}break;case 123*h:s[l++]=Hd(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=Rd(C,/\f/g,``)),p>0&&(Hd(C)-d||h===0&&m===47)&&Wd(p>32?Sf(C+`;`,r,n,d-1,c):Sf(Rd(C,` `,``)+`;`,r,n,d-2,c),c);break;case 59:C+=`;`;default:if(Wd(S=bf(C,t,n,l,u,i,s,y,b=[],x=[],d,a),a),v===123)if(u===0)yf(C,t,S,S,b,a,d,s,x);else{switch(f){case 99:if(Bd(C,3)===110)break;case 108:if(Bd(C,2)===97)break;default:u=0;case 100:case 109:case 115:}u?yf(e,S,S,r&&Wd(bf(e,S,S,0,0,i,s,y,i,b=[],d,x),x),i,x,d,s,r?b:x):yf(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+Hd(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&rf()==125)continue}switch(C+=Nd(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(Hd(C)-1)*_,_=1;break;case 64:of()===45&&(C+=ff(af())),f=of(),u=d=Hd(y=C+=_f(sf())),v++;break;case 45:m===45&&Hd(C)==2&&(h=0)}}return a}function bf(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=Ud(p),h=0,g=0,_=0;h<r;++h)for(var v=0,y=Vd(e,f+1,f=Md(g=o[h])),b=e;v<m;++v)(b=Id(g>0?p[v]+` `+y:Rd(y,/&\f/g,p[v])))&&(c[_++]=b);return $d(e,t,n,i===0?Ed:s,c,l,u,d)}function xf(e,t,n,r){return $d(e,t,n,Td,Nd(nf()),Vd(e,2,-2),0,r)}function Sf(e,t,n,r,i){return $d(e,t,n,Dd,Vd(e,0,r),Vd(e,r+1,-1),r,i)}function Cf(e,t,n){switch(Fd(e,t)){case 5103:return wd+`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 wd+e+e;case 4855:return wd+e.replace(`add`,`source-over`).replace(`substract`,`source-out`).replace(`intersect`,`source-in`).replace(`exclude`,`xor`)+e;case 4789:return Cd+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return wd+e+Cd+e+Sd+e+e;case 5936:switch(Bd(e,t+11)){case 114:return wd+e+Sd+Rd(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return wd+e+Sd+Rd(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return wd+e+Sd+Rd(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}case 6828:case 4268:case 2903:return wd+e+Sd+e+e;case 6165:return wd+e+Sd+`flex-`+e+e;case 5187:return wd+e+Rd(e,/(\w+).+(:[^]+)/,wd+`box-$1$2`+Sd+`flex-$1$2`)+e;case 5443:return wd+e+Sd+`flex-item-`+Rd(e,/flex-|-self/g,``)+(Ld(e,/flex-|baseline/)?``:Sd+`grid-row-`+Rd(e,/flex-|-self/g,``))+e;case 4675:return wd+e+Sd+`flex-line-pack`+Rd(e,/align-content|flex-|-self/g,``)+e;case 5548:return wd+e+Sd+Rd(e,`shrink`,`negative`)+e;case 5292:return wd+e+Sd+Rd(e,`basis`,`preferred-size`)+e;case 6060:return wd+`box-`+Rd(e,`-grow`,``)+wd+e+Sd+Rd(e,`grow`,`positive`)+e;case 4554:return wd+Rd(e,/([^-])(transform)/g,`$1`+wd+`$2`)+e;case 6187:return Rd(Rd(Rd(e,/(zoom-|grab)/,wd+`$1`),/(image-set)/,wd+`$1`),e,``)+e;case 5495:case 3959:return Rd(e,/(image-set\([^]*)/,wd+"$1$`$1");case 4968:return Rd(Rd(e,/(.+:)(flex-)?(.*)/,wd+`box-pack:$3`+Sd+`flex-pack:$3`),/space-between/,`justify`)+wd+e+e;case 4200:if(!Ld(e,/flex-|baseline/))return Sd+`grid-column-align`+Vd(e,t)+e;break;case 2592:case 3360:return Sd+Rd(e,`template-`,``)+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,Ld(e.props,/grid-\w+-end/)})?~zd(e+(n=n[t].value),`span`,0)?e:Sd+Rd(e,`-start`,``)+e+Sd+`grid-row-span:`+(~zd(n,`span`,0)?Ld(n,/\d+/):Ld(n,/\d+/)-+Ld(e,/\d+/))+`;`:Sd+Rd(e,`-start`,``)+e;case 4896:case 4128:return n&&n.some(function(e){return Ld(e.props,/grid-\w+-start/)})?e:Sd+Rd(Rd(e,`-end`,`-span`),`span `,``)+e;case 4095:case 3583:case 4068:case 2532:return Rd(e,/(.+)-inline(.+)/,wd+`$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(Hd(e)-1-t>6)switch(Bd(e,t+1)){case 109:if(Bd(e,t+4)!==45)break;case 102:return Rd(e,/(.+:)(.+)-([^]+)/,`$1`+wd+`$2-$3$1`+Cd+(Bd(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~zd(e,`stretch`,0)?Cf(Rd(e,`stretch`,`fill-available`),t,n)+e:e}break;case 5152:case 5920:return Rd(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,i,a,o,s){return Sd+n+`:`+r+s+(i?Sd+n+`-span:`+(a?o:o-+r)+s:``)+e});case 4949:if(Bd(e,t+6)===121)return Rd(e,`:`,`:`+wd)+e;break;case 6444:switch(Bd(e,Bd(e,14)===45?18:11)){case 120:return Rd(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,`$1`+wd+(Bd(e,14)===45?`inline-`:``)+`box$3$1`+wd+`$2$3$1`+Sd+`$2box$3`)+e;case 100:return Rd(e,`:`,`:`+Sd)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Rd(e,`scroll-`,`scroll-snap-`)+e}return e}function wf(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}function Tf(e,t,n,r){switch(e.type){case jd:if(e.children.length)break;case Od:case kd:case Dd:return e.return=e.return||e.value;case Td:return``;case Ad:return e.return=e.value+`{`+wf(e.children,r)+`}`;case Ed:if(!Hd(e.value=e.props.join(`,`)))return``}return Hd(n=wf(e.children,r))?e.return=e.value+`{`+n+`}`:``}function Ef(e){var t=Ud(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 Df(e){return function(t){t.root||(t=t.return)&&e(t)}}function Of(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Dd:e.return=Cf(e.value,e.length,n);return;case Ad:return wf([ef(e,{value:Rd(e.value,`@`,`@`+wd)})],r);case Ed:if(e.length)return Gd(n=e.props,function(t){switch(Ld(t,r=/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:tf(ef(e,{props:[Rd(t,/:(read-\w+)/,`:`+Cd+`$1`)]})),tf(ef(e,{props:[t]})),Pd(e,{props:Kd(n,r)});break;case`::placeholder`:tf(ef(e,{props:[Rd(t,/:(plac\w+)/,`:`+wd+`input-$1`)]})),tf(ef(e,{props:[Rd(t,/:(plac\w+)/,`:`+Cd+`$1`)]})),tf(ef(e,{props:[Rd(t,/:(plac\w+)/,Sd+`input-$1`)]})),tf(ef(e,{props:[t]})),Pd(e,{props:Kd(n,r)});break}return``})}}var kf,Af=c((()=>{kf={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}}));Yo(),Af();var jf=typeof process<`u`&&({}.REACT_APP_SC_ATTR||{}.SC_ATTR)||`data-styled`,Mf=`active`,Nf=`data-styled-version`,Pf=`6.3.9`,Ff=`/*!sc*/
11
- `,If=typeof window<`u`&&typeof document<`u`,Lf=N.createContext===void 0,Rf=!!(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),zf=Object.freeze([]),Bf=Object.freeze({});function Vf(e,t,n){return n===void 0&&(n=Bf),e.theme!==n.theme&&e.theme||t||n.theme}var Hf=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(`.`)),Uf=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Wf=/(^-|-$)/g;function Gf(e){return e.replace(Uf,`-`).replace(Wf,``)}var Kf=/(a)(d)/gi,qf=function(e){return String.fromCharCode(e+(e>25?39:97))};function Jf(e){var t,n=``;for(t=Math.abs(e);t>52;t=t/52|0)n=qf(t%52)+n;return(qf(t%52)+n).replace(Kf,`$1-$2`)}var Yf,Xf=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Zf=function(e){return Xf(5381,e)};function Qf(e){return Jf(Zf(e)>>>0)}function $f(e){return e.displayName||e.name||`Component`}function ep(e){return typeof e==`string`&&!0}var tp=typeof Symbol==`function`&&Symbol.for,np=tp?Symbol.for(`react.memo`):60115,rp=tp?Symbol.for(`react.forward_ref`):60112,ip={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ap={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},op={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},sp=((Yf={})[rp]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Yf[np]=op,Yf);function cp(e){return(`type`in(t=e)&&t.type.$$typeof)===np?op:`$$typeof`in e?sp[e.$$typeof]:ip;var t}var lp=Object.defineProperty,up=Object.getOwnPropertyNames,dp=Object.getOwnPropertySymbols,fp=Object.getOwnPropertyDescriptor,pp=Object.getPrototypeOf,mp=Object.prototype;function hp(e,t,n){if(typeof t!=`string`){if(mp){var r=pp(t);r&&r!==mp&&hp(e,r,n)}var i=up(t);dp&&(i=i.concat(dp(t)));for(var a=cp(e),o=cp(t),s=0;s<i.length;++s){var c=i[s];if(!(c in ap||n&&n[c]||o&&c in o||a&&c in a)){var l=fp(t,c);try{lp(e,c,l)}catch{}}}}return e}function gp(e){return typeof e==`function`}function _p(e){return typeof e==`object`&&`styledComponentId`in e}function vp(e,t){return e&&t?`${e} ${t}`:e||t||``}function yp(e,t){return e.join(t||``)}function bp(e){return typeof e==`object`&&!!e&&e.constructor.name===Object.name&&!(`props`in e&&e.$$typeof)}function xp(e,t,n){if(n===void 0&&(n=!1),!n&&!bp(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=xp(e[r],t[r]);else if(bp(t))for(var r in t)e[r]=xp(e[r],t[r]);return e}function Sp(e,t){Object.defineProperty(e,`toString`,{value:t})}function Cp(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 wp=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 Cp(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)+Ff;return t},e}(),Tp=new Map,Ep=new Map,Dp=1,Op=function(e){if(Tp.has(e))return Tp.get(e);for(;Ep.has(Dp);)Dp++;var t=Dp++;return Tp.set(e,t),Ep.set(t,e),t},kp=function(e,t){Dp=t+1,Tp.set(e,t),Ep.set(t,e)},Ap=`style[${jf}][${Nf}="${Pf}"]`,jp=RegExp(`^${jf}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),Mp=function(e){return typeof ShadowRoot<`u`&&e instanceof ShadowRoot||`host`in e&&e.nodeType===11},Np=function(e){if(!e)return document;if(Mp(e))return e;if(`getRootNode`in e){var t=e.getRootNode();if(Mp(t))return t}return document},Pp=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)},Fp=function(e,t){for(var n=(t.textContent??``).split(Ff),r=[],i=0,a=n.length;i<a;i++){var o=n[i].trim();if(o){var s=o.match(jp);if(s){var c=0|parseInt(s[1],10),l=s[2];c!==0&&(kp(l,c),Pp(e,l,s[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(o)}}},Ip=function(e){for(var t=Np(e.options.target).querySelectorAll(Ap),n=0,r=t.length;n<r;n++){var i=t[n];i&&i.getAttribute(jf)!==Mf&&(Fp(e,i),i.parentNode&&i.parentNode.removeChild(i))}};function Lp(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:null}var Rp=function(e){var t=document.head,n=e||t,r=document.createElement(`style`),i=function(e){var t=Array.from(e.querySelectorAll(`style[${jf}]`));return t[t.length-1]}(n),a=i===void 0?null:i.nextSibling;r.setAttribute(jf,Mf),r.setAttribute(Nf,Pf);var o=Lp();return o&&r.setAttribute(`nonce`,o),n.insertBefore(r,a),r},zp=function(){function e(e){this.element=Rp(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 Cp(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}(),Bp=function(){function e(e){this.element=Rp(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}(),Vp=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}(),Hp=If,Up={isServer:!If,useCSSOMInjection:!Rf},Wp=function(){function e(e,t,n){e===void 0&&(e=Bf),t===void 0&&(t={});var r=this;this.options=Jo(Jo({},Up),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&If&&Hp&&(Hp=!1,Ip(this)),Sp(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r=``,i=function(n){var i=function(e){return Ep.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=jf+`.g`+n+`[id="`+i+`"]`,c=``;a.forEach(function(e){e.length>0&&(c+=e+`,`)}),r+=o+s+`{content:"`+c+`"}`+Ff},a=0;a<n;a++)i(a);return r}(r)})}return e.registerId=function(e){return Op(e)},e.prototype.rehydrate=function(){!this.server&&If&&Ip(this)},e.prototype.reconstructWithOptions=function(t,n){n===void 0&&(n=!0);var r=new e(Jo(Jo({},this.options),t),this.gs,n&&this.names||void 0);return!this.server&&If&&t.target!==this.options.target&&Np(this.options.target)!==Np(t.target)&&Ip(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 Vp(n):t?new zp(n):new Bp(n)}(this.options),new wp(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){Op(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(Op(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(Op(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),Gp=/&/g,Kp=47,qp=42;function Jp(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!==Kp||e.charCodeAt(a+1)!==qp)if(i)o===qp&&e.charCodeAt(a+1)===Kp&&(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 Yp(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=Yp(e.children,t)),e})}function Xp(e){var t,n,r,i=e===void 0?Bf:e,a=i.options,o=a===void 0?Bf:a,s=i.plugins,c=s===void 0?zf: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(Gp,n).replace(r,l))}),o.prefix&&u.push(Of),u.push(Tf);var d=[],f=Ef(u.concat(Df(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(!Jp(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!==Kp||e.charCodeAt(s+1)!==qp)if(o)c===qp&&e.charCodeAt(s+1)===Kp&&(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);Jp(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===Kp&&i+1<t&&e.charCodeAt(i+1)===qp){for(i+=2;i+1<t&&(e.charCodeAt(i)!==qp||e.charCodeAt(i+1)!==Kp);)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===qp&&i+1<t&&e.charCodeAt(i+1)===Kp)i>r&&n.push(e.substring(r,i)),r=i+=2;else if(s===Kp&&i+1<t&&e.charCodeAt(i+1)===Kp){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=vf(a||i?`${a} ${i} { ${c} }`:c);return o.namespace&&(l=Yp(l,o.namespace)),d=[],wf(l,f),d};return p.hash=c.length?c.reduce(function(e,t){return t.name||Cp(15),Xf(e,t.name)},5381).toString():``,p}var Zp=new Wp,Qp=Xp(),$p={shouldForwardProp:void 0,styleSheet:Zp,stylis:Qp},em=Lf?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)($p)}}:N.createContext($p);em.Consumer;var tm=Lf?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(void 0)}}:N.createContext(void 0);function nm(){return Lf?$p:N.useContext(em)}function rm(e){if(Lf||!N.useMemo)return e.children;var t=nm().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 Xp({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(em.Provider,{value:i},N.createElement(tm.Provider,{value:r},e.children))}var im=function(){function e(e,t){var n=this;this.inject=function(e,t){t===void 0&&(t=Qp);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,Sp(this,function(){throw Cp(12,String(n.name))})}return e.prototype.getName=function(e){return e===void 0&&(e=Qp),this.name+e.hash},e}();function am(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t!=`number`||t===0||e in kf||e.startsWith(`--`)?String(t).trim():`${t}px`}var om=function(e){return e>=`A`&&e<=`Z`};function sm(e){for(var t=``,n=0;n<e.length;n++){var r=e[n];if(n===1&&r===`-`&&e[0]===`-`)return e;om(r)?t+=`-`+r.toLowerCase():t+=r}return t.startsWith(`ms-`)?`-`+t:t}var cm=function(e){return e==null||!1===e||e===``},lm=function(e){var t=[];for(var n in e){var r=e[n];e.hasOwnProperty(n)&&!cm(r)&&(Array.isArray(r)&&r.isCss||gp(r)?t.push(`${sm(n)}:`,r,`;`):bp(r)?t.push.apply(t,qo(qo([`${n} {`],lm(r),!1),[`}`],!1)):t.push(`${sm(n)}: ${am(n,r)};`))}return t};function um(e,t,n,r,i){if(i===void 0&&(i=[]),typeof e==`string`)return e&&i.push(e),i;if(cm(e))return i;if(_p(e))return i.push(`.${e.styledComponentId}`),i;if(gp(e))return!gp(a=e)||a.prototype&&a.prototype.isReactComponent||!t?(i.push(e),i):um(e(t),t,n,r,i);var a;if(e instanceof im)return n?(e.inject(n,r),i.push(e.getName(r))):i.push(e),i;if(bp(e)){for(var o=lm(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++)um(e[s],t,n,r,i);return i}function dm(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(gp(n)&&!_p(n))return!1}return!0}var fm=Zf(Pf),pm=function(){function e(e,t,n){this.rules=e,this.staticRulesId=``,this.isStatic=(n===void 0||n.isStatic)&&dm(e),this.componentId=t,this.baseHash=Xf(fm,t),this.baseStyle=n,Wp.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=vp(r,this.staticRulesId);else{var i=yp(um(this.rules,e,t,n)),a=Jf(Xf(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=vp(r,a),this.staticRulesId=a}else{for(var s=Xf(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=yp(um(u,e,t,n));s=Xf(Xf(s,String(l)),d),c+=d}}if(c){var f=Jf(s>>>0);if(!t.hasNameForId(this.componentId,f)){var p=n(c,`.${f}`,void 0,this.componentId);t.insertRules(this.componentId,f,p)}r=vp(r,f)}}return{className:r,css:typeof window>`u`?t.getTag().getGroup(Op(this.componentId)):``}},e}(),mm=Lf?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(void 0)}}:N.createContext(void 0);mm.Consumer;var hm={};function gm(e,t,n){var r=_p(e),i=e,a=!ep(e),o=t.attrs,s=o===void 0?zf:o,c=t.componentId,l=c===void 0?function(e,t){var n=typeof e==`string`?Gf(e):`sc`;hm[n]=(hm[n]||0)+1;var r=`${n}-${Qf(Pf+n+hm[n])}`;return t?`${t}-${r}`:r}(t.displayName,t.parentComponentId):c,u=t.displayName,d=u===void 0?function(e){return ep(e)?`styled.${e}`:`Styled(${$f(e)})`}(e):u,f=t.displayName&&t.componentId?`${Gf(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 pm(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=Lf?void 0:N.useContext(mm),u=nm(),d=e.shouldForwardProp||u.shouldForwardProp,f=Vf(t,l,a)||(Lf?void 0:Bf),p=function(e,t,n){for(var r,i=Jo(Jo({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var o=gp(r=e[a])?r(i):r;for(var s in o)s===`className`?i.className=vp(i.className,o[s]):s===`style`?i.style=Jo(Jo({},i.style),o[s]):i[s]=o[s]}return`className`in t&&typeof t.className==`string`&&(i.className=vp(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=nm();return e.generateAndInjectStyles(t,n.styleSheet,n.stylis)}(i,p),v=_.className,y=_.css,b=vp(o,s);v&&(b+=` `+v),p.className&&(b+=` `+p.className),h[ep(m)&&!Hf.has(m)?`class`:`className`]=b,n&&(h.ref=n);var x=(0,N.createElement)(m,h);return Lf&&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?vp(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++)xp(e,r[n],!0);return e}({},i.defaultProps,e):e}}),Sp(y,function(){return`.${y.styledComponentId}`}),a&&hp(y,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),y}function _m(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 vm=function(e){return Object.assign(e,{isCss:!0})};function ym(e){var t=[...arguments].slice(1);if(gp(e)||bp(e))return vm(um(_m(zf,qo([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]==`string`?um(n):vm(um(_m(n,t)))}function bm(e,t,n){if(n===void 0&&(n=Bf),!t)throw Cp(1,t);var r=function(r){var i=[...arguments].slice(1);return e(t,n,ym.apply(void 0,qo([r],i,!1)))};return r.attrs=function(r){return bm(e,t,Jo(Jo({},n),{attrs:Array.prototype.concat(n.attrs,r).filter(Boolean)}))},r.withConfig=function(r){return bm(e,t,Jo(Jo({},n),r))},r}var xm=function(e){return bm(gm,e)},Sm=xm;Hf.forEach(function(e){Sm[e]=xm(e)}),function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=dm(e),Wp.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var i=r(yp(um(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&&Wp.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=Lp();return`<style ${yp([n&&`nonce="${n}"`,`${jf}="true"`,`${Nf}="${Pf}"`].filter(Boolean),` `)}>${t}</style>`},this.getStyleTags=function(){if(e.sealed)throw Cp(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw Cp(2);var n=e.instance.toString();if(!n)return[];var r=((t={})[jf]=``,t[Nf]=Pf,t.dangerouslySetInnerHTML={__html:n},t),i=Lp();return i&&(r.nonce=i),[N.createElement(`style`,Jo({},r,{key:`sc-0-0`}))]},this.seal=function(){e.sealed=!0},this.instance=new Wp({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw Cp(2);return N.createElement(rm,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw Cp(3)},e}(),`${jf}`;var Cm=r(((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})),wm=r((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.`)}})),Tm=r((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()})),Em=r((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=wm(),n=r(Tm());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;}
10
+ `,document.body.appendChild(t));return t}var Ku=[`size`,`angle`,`borderWidth`,`borderColor`,`roundness`,`backgroundColor`,`layerSide`,`style`],qu=`left`,Ju=`top`,Yu=`bottom`,Xu=`right`;function Zu(e,t){return Math.tan(e*(Math.PI/180))*t}function Qu(e,t,n,r){var i;return(i={},i[Yu]=`0 `+-r+` `+t+` `+e,i[Ju]=`0 0 `+t+` `+(e+r),i[Xu]=-r+` 0 `+e+` `+t,i[qu]=`0 0 `+(e+r)+` `+t,i)[n.prop]}function $u(e,t,n,r,i){var a,o,s,c=r/10*e*2,l=(a={},a[Yu]=[0,e],a[Ju]=[0,0],a[Xu]=[e,t],a[qu]=[0,t],a)[n.prop].join(` `),u=n.isHorizontal?`V 0`:`H `+t,d=t/2,f=t/2+Zu(i,e/8),p=e/8,m=(o={},o[Yu]=[`C`,f,p,d+c,0,d,0],o[Ju]=[`C`,f,e-p,d+c,e,d,e],o[Xu]=[`C`,p,t-f,0,d-c,0,d],o[qu]=[`C`,e-p,t-f,e,d-c,e,d],o)[n.prop].join(` `),h=t/2-Zu(i,e/8),g=e/8;return[`M`,l,u,m,(s={},s[Yu]=[`C`,d-c,0,h,g,l],s[Ju]=[`C`,d-c,e,h,e-g,l],s[Xu]=[`C`,0,d+c,g,t-h,l],s[qu]=[`C`,e,d+c,e-g,t-h,l],s)[n.prop].join(` `)].join(` `)}function ed(e,t,n,r,i){var a=Zu(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 td=(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=hte(e,Ku);if(h===`center`)return null;var y=Tu[h],b=r,x=Zu(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:Qu(b,x,y,s)}),(0,N.createElement)(`path`,{fill:p,strokeWidth:s,stroke:l,d:$u(b,x,y,d,a)}),(0,N.createElement)(`path`,{fill:p,d:ed(b,x,s,y,a)}))}),nd;(function(e){e[e.ENTERING=0]=`ENTERING`,e[e.LEAVING=1]=`LEAVING`,e[e.IDLE=2]=`IDLE`})(nd||={});function rd(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)(nd.IDLE),p=(0,N.useRef)(!1),m=(0,N.useCallback)(function(){clearTimeout(d.current),d.current=null,f.current=nd.IDLE},[]);function h(){f.current===nd.LEAVING&&d.current&&m(),!l&&(f.current=nd.ENTERING,d.current=window.setTimeout(function(){u(!0),d.current=null,f.current=nd.IDLE},r))}function g(e,t){if(f.current===nd.ENTERING&&d.current&&m(),l){if(t){u(!1),d.current=null,f.current=nd.IDLE;return}f.current=nd.LEAVING,d.current=window.setTimeout(function(){u(!1),d.current=null,f.current=nd.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 id(e){return e}function ad(e){if(e==null)return id;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?m(e[0],e[1]):u(e);case`string`:case`symbol`:case`number`:return x(e)}}function od(e){return g(e)?NaN:Number(e)}function sd(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 cd(e){return typeof e==`string`||e instanceof String}function ld(e,t=id,n=0){if(!e)return;n<0&&(n=Math.max(e.length+n,0));let r=ad(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 ud(e,t){if(!e)return[];let n=_(e)||Array.isArray(e)?sd(0,e.length):Object.keys(e),r=ad(t??id),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 dd(e){return Array.isArray(e)}function fd(e){return typeof e==`number`||e instanceof Number}function pd(...e){}function md(e){return typeof e==`function`}function hd(e){return typeof e==`boolean`||e instanceof Boolean}function gd(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var _d=n((()=>{})),vd=t({default:()=>bd}),yd,bd,xd=n((()=>{_d(),yd=/^((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)-.*))$/,bd=gd(function(e){return yd.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91})})),Sd=`-ms-`,Cd=`-moz-`,wd=`-webkit-`,Td=`comm`,Ed=`rule`,Dd=`decl`,Od=`@import`,kd=`@namespace`,Ad=`@keyframes`,jd=`@layer`,Md=Math.abs,Nd=String.fromCharCode,Pd=Object.assign;function Fd(e,t){return Bd(e,0)^45?(((t<<2^Bd(e,0))<<2^Bd(e,1))<<2^Bd(e,2))<<2^Bd(e,3):0}function Id(e){return e.trim()}function Ld(e,t){return(e=t.exec(e))?e[0]:e}function Rd(e,t,n){return e.replace(t,n)}function zd(e,t,n){return e.indexOf(t,n)}function Bd(e,t){return e.charCodeAt(t)|0}function Vd(e,t,n){return e.slice(t,n)}function Hd(e){return e.length}function Ud(e){return e.length}function Wd(e,t){return t.push(e),e}function Gd(e,t){return e.map(t).join(``)}function Kd(e,t){return e.filter(function(e){return!Ld(e,t)})}var qd=1,Jd=1,Yd=0,Xd=0,Zd=0,Qd=``;function $d(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:qd,column:Jd,length:o,return:``,siblings:s}}function ef(e,t){return Pd($d(``,null,null,``,null,null,0,e.siblings),e,{length:-e.length},t)}function tf(e){for(;e.root;)e=ef(e.root,{children:[e]});Wd(e,e.siblings)}function nf(){return Zd}function rf(){return Zd=Xd>0?Bd(Qd,--Xd):0,Jd--,Zd===10&&(Jd=1,qd--),Zd}function af(){return Zd=Xd<Yd?Bd(Qd,Xd++):0,Jd++,Zd===10&&(Jd=1,qd++),Zd}function of(){return Bd(Qd,Xd)}function sf(){return Xd}function cf(e,t){return Vd(Qd,e,t)}function lf(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 uf(e){return qd=Jd=1,Yd=Hd(Qd=e),Xd=0,[]}function df(e){return Qd=``,e}function ff(e){return Id(cf(Xd-1,hf(e===91?e+2:e===40?e+1:e)))}function pf(e){for(;(Zd=of())&&Zd<33;)af();return lf(e)>2||lf(Zd)>3?``:` `}function mf(e,t){for(;--t&&af()&&!(Zd<48||Zd>102||Zd>57&&Zd<65||Zd>70&&Zd<97););return cf(e,sf()+(t<6&&of()==32&&af()==32))}function hf(e){for(;af();)switch(Zd){case e:return Xd;case 34:case 39:e!==34&&e!==39&&hf(Zd);break;case 40:e===41&&hf(e);break;case 92:af();break}return Xd}function gf(e,t){for(;af()&&e+Zd!==57&&!(e+Zd===84&&of()===47););return`/*`+cf(t,Xd-1)+`*`+Nd(e===47?e:af())}function _f(e){for(;!lf(of());)af();return cf(e,Xd)}function vf(e){return df(yf(``,null,null,null,[``],e=uf(e),0,[0],e))}function yf(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=af()){case 40:if(m!=108&&Bd(C,d-1)==58){zd(C+=Rd(ff(v),`&`,`&\f`),`&\f`,Md(l?s[l-1]:0))!=-1&&(_=-1);break}case 34:case 39:case 91:C+=ff(v);break;case 9:case 10:case 13:case 32:C+=pf(m);break;case 92:C+=mf(sf()-1,7);continue;case 47:switch(of()){case 42:case 47:Wd(xf(gf(af(),sf()),t,n,c),c),(lf(m||1)==5||lf(of()||1)==5)&&Hd(C)&&Vd(C,-1,void 0)!==` `&&(C+=` `);break;default:C+=`/`}break;case 123*h:s[l++]=Hd(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=Rd(C,/\f/g,``)),p>0&&(Hd(C)-d||h===0&&m===47)&&Wd(p>32?Sf(C+`;`,r,n,d-1,c):Sf(Rd(C,` `,``)+`;`,r,n,d-2,c),c);break;case 59:C+=`;`;default:if(Wd(S=bf(C,t,n,l,u,i,s,y,b=[],x=[],d,a),a),v===123)if(u===0)yf(C,t,S,S,b,a,d,s,x);else{switch(f){case 99:if(Bd(C,3)===110)break;case 108:if(Bd(C,2)===97)break;default:u=0;case 100:case 109:case 115:}u?yf(e,S,S,r&&Wd(bf(e,S,S,0,0,i,s,y,i,b=[],d,x),x),i,x,d,s,r?b:x):yf(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+Hd(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&rf()==125)continue}switch(C+=Nd(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(Hd(C)-1)*_,_=1;break;case 64:of()===45&&(C+=ff(af())),f=of(),u=d=Hd(y=C+=_f(sf())),v++;break;case 45:m===45&&Hd(C)==2&&(h=0)}}return a}function bf(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=Ud(p),h=0,g=0,_=0;h<r;++h)for(var v=0,y=Vd(e,f+1,f=Md(g=o[h])),b=e;v<m;++v)(b=Id(g>0?p[v]+` `+y:Rd(y,/&\f/g,p[v])))&&(c[_++]=b);return $d(e,t,n,i===0?Ed:s,c,l,u,d)}function xf(e,t,n,r){return $d(e,t,n,Td,Nd(nf()),Vd(e,2,-2),0,r)}function Sf(e,t,n,r,i){return $d(e,t,n,Dd,Vd(e,0,r),Vd(e,r+1,-1),r,i)}function Cf(e,t,n){switch(Fd(e,t)){case 5103:return wd+`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 wd+e+e;case 4855:return wd+e.replace(`add`,`source-over`).replace(`substract`,`source-out`).replace(`intersect`,`source-in`).replace(`exclude`,`xor`)+e;case 4789:return Cd+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return wd+e+Cd+e+Sd+e+e;case 5936:switch(Bd(e,t+11)){case 114:return wd+e+Sd+Rd(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return wd+e+Sd+Rd(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return wd+e+Sd+Rd(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}case 6828:case 4268:case 2903:return wd+e+Sd+e+e;case 6165:return wd+e+Sd+`flex-`+e+e;case 5187:return wd+e+Rd(e,/(\w+).+(:[^]+)/,wd+`box-$1$2`+Sd+`flex-$1$2`)+e;case 5443:return wd+e+Sd+`flex-item-`+Rd(e,/flex-|-self/g,``)+(Ld(e,/flex-|baseline/)?``:Sd+`grid-row-`+Rd(e,/flex-|-self/g,``))+e;case 4675:return wd+e+Sd+`flex-line-pack`+Rd(e,/align-content|flex-|-self/g,``)+e;case 5548:return wd+e+Sd+Rd(e,`shrink`,`negative`)+e;case 5292:return wd+e+Sd+Rd(e,`basis`,`preferred-size`)+e;case 6060:return wd+`box-`+Rd(e,`-grow`,``)+wd+e+Sd+Rd(e,`grow`,`positive`)+e;case 4554:return wd+Rd(e,/([^-])(transform)/g,`$1`+wd+`$2`)+e;case 6187:return Rd(Rd(Rd(e,/(zoom-|grab)/,wd+`$1`),/(image-set)/,wd+`$1`),e,``)+e;case 5495:case 3959:return Rd(e,/(image-set\([^]*)/,wd+"$1$`$1");case 4968:return Rd(Rd(e,/(.+:)(flex-)?(.*)/,wd+`box-pack:$3`+Sd+`flex-pack:$3`),/space-between/,`justify`)+wd+e+e;case 4200:if(!Ld(e,/flex-|baseline/))return Sd+`grid-column-align`+Vd(e,t)+e;break;case 2592:case 3360:return Sd+Rd(e,`template-`,``)+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,Ld(e.props,/grid-\w+-end/)})?~zd(e+(n=n[t].value),`span`,0)?e:Sd+Rd(e,`-start`,``)+e+Sd+`grid-row-span:`+(~zd(n,`span`,0)?Ld(n,/\d+/):Ld(n,/\d+/)-+Ld(e,/\d+/))+`;`:Sd+Rd(e,`-start`,``)+e;case 4896:case 4128:return n&&n.some(function(e){return Ld(e.props,/grid-\w+-start/)})?e:Sd+Rd(Rd(e,`-end`,`-span`),`span `,``)+e;case 4095:case 3583:case 4068:case 2532:return Rd(e,/(.+)-inline(.+)/,wd+`$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(Hd(e)-1-t>6)switch(Bd(e,t+1)){case 109:if(Bd(e,t+4)!==45)break;case 102:return Rd(e,/(.+:)(.+)-([^]+)/,`$1`+wd+`$2-$3$1`+Cd+(Bd(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~zd(e,`stretch`,0)?Cf(Rd(e,`stretch`,`fill-available`),t,n)+e:e}break;case 5152:case 5920:return Rd(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,i,a,o,s){return Sd+n+`:`+r+s+(i?Sd+n+`-span:`+(a?o:o-+r)+s:``)+e});case 4949:if(Bd(e,t+6)===121)return Rd(e,`:`,`:`+wd)+e;break;case 6444:switch(Bd(e,Bd(e,14)===45?18:11)){case 120:return Rd(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,`$1`+wd+(Bd(e,14)===45?`inline-`:``)+`box$3$1`+wd+`$2$3$1`+Sd+`$2box$3`)+e;case 100:return Rd(e,`:`,`:`+Sd)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Rd(e,`scroll-`,`scroll-snap-`)+e}return e}function wf(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}function Tf(e,t,n,r){switch(e.type){case jd:if(e.children.length)break;case Od:case kd:case Dd:return e.return=e.return||e.value;case Td:return``;case Ad:return e.return=e.value+`{`+wf(e.children,r)+`}`;case Ed:if(!Hd(e.value=e.props.join(`,`)))return``}return Hd(n=wf(e.children,r))?e.return=e.value+`{`+n+`}`:``}function Ef(e){var t=Ud(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 Df(e){return function(t){t.root||(t=t.return)&&e(t)}}function Of(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Dd:e.return=Cf(e.value,e.length,n);return;case Ad:return wf([ef(e,{value:Rd(e.value,`@`,`@`+wd)})],r);case Ed:if(e.length)return Gd(n=e.props,function(t){switch(Ld(t,r=/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:tf(ef(e,{props:[Rd(t,/:(read-\w+)/,`:`+Cd+`$1`)]})),tf(ef(e,{props:[t]})),Pd(e,{props:Kd(n,r)});break;case`::placeholder`:tf(ef(e,{props:[Rd(t,/:(plac\w+)/,`:`+wd+`input-$1`)]})),tf(ef(e,{props:[Rd(t,/:(plac\w+)/,`:`+Cd+`$1`)]})),tf(ef(e,{props:[Rd(t,/:(plac\w+)/,Sd+`input-$1`)]})),tf(ef(e,{props:[t]})),Pd(e,{props:Kd(n,r)});break}return``})}}var kf,Af=n((()=>{kf={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}}));Yo(),Af();var jf=typeof process<`u`&&({}.REACT_APP_SC_ATTR||{}.SC_ATTR)||`data-styled`,Mf=`active`,Nf=`data-styled-version`,Pf=`6.3.9`,Ff=`/*!sc*/
11
+ `,If=typeof window<`u`&&typeof document<`u`,Lf=N.createContext===void 0,Rf=!!(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),zf=Object.freeze([]),Bf=Object.freeze({});function Vf(e,t,n){return n===void 0&&(n=Bf),e.theme!==n.theme&&e.theme||t||n.theme}var Hf=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(`.`)),Uf=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Wf=/(^-|-$)/g;function Gf(e){return e.replace(Uf,`-`).replace(Wf,``)}var Kf=/(a)(d)/gi,qf=function(e){return String.fromCharCode(e+(e>25?39:97))};function Jf(e){var t,n=``;for(t=Math.abs(e);t>52;t=t/52|0)n=qf(t%52)+n;return(qf(t%52)+n).replace(Kf,`$1-$2`)}var Yf,Xf=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Zf=function(e){return Xf(5381,e)};function Qf(e){return Jf(Zf(e)>>>0)}function $f(e){return e.displayName||e.name||`Component`}function ep(e){return typeof e==`string`&&!0}var tp=typeof Symbol==`function`&&Symbol.for,np=tp?Symbol.for(`react.memo`):60115,rp=tp?Symbol.for(`react.forward_ref`):60112,ip={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ap={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},op={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},sp=((Yf={})[rp]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Yf[np]=op,Yf);function cp(e){return(`type`in(t=e)&&t.type.$$typeof)===np?op:`$$typeof`in e?sp[e.$$typeof]:ip;var t}var lp=Object.defineProperty,up=Object.getOwnPropertyNames,dp=Object.getOwnPropertySymbols,fp=Object.getOwnPropertyDescriptor,pp=Object.getPrototypeOf,mp=Object.prototype;function hp(e,t,n){if(typeof t!=`string`){if(mp){var r=pp(t);r&&r!==mp&&hp(e,r,n)}var i=up(t);dp&&(i=i.concat(dp(t)));for(var a=cp(e),o=cp(t),s=0;s<i.length;++s){var c=i[s];if(!(c in ap||n&&n[c]||o&&c in o||a&&c in a)){var l=fp(t,c);try{lp(e,c,l)}catch{}}}}return e}function gp(e){return typeof e==`function`}function _p(e){return typeof e==`object`&&`styledComponentId`in e}function vp(e,t){return e&&t?`${e} ${t}`:e||t||``}function yp(e,t){return e.join(t||``)}function bp(e){return typeof e==`object`&&!!e&&e.constructor.name===Object.name&&!(`props`in e&&e.$$typeof)}function xp(e,t,n){if(n===void 0&&(n=!1),!n&&!bp(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=xp(e[r],t[r]);else if(bp(t))for(var r in t)e[r]=xp(e[r],t[r]);return e}function Sp(e,t){Object.defineProperty(e,`toString`,{value:t})}function Cp(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 wp=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 Cp(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)+Ff;return t},e}(),Tp=new Map,Ep=new Map,Dp=1,Op=function(e){if(Tp.has(e))return Tp.get(e);for(;Ep.has(Dp);)Dp++;var t=Dp++;return Tp.set(e,t),Ep.set(t,e),t},kp=function(e,t){Dp=t+1,Tp.set(e,t),Ep.set(t,e)},Ap=`style[${jf}][${Nf}="${Pf}"]`,jp=RegExp(`^${jf}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),Mp=function(e){return typeof ShadowRoot<`u`&&e instanceof ShadowRoot||`host`in e&&e.nodeType===11},Np=function(e){if(!e)return document;if(Mp(e))return e;if(`getRootNode`in e){var t=e.getRootNode();if(Mp(t))return t}return document},Pp=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)},Fp=function(e,t){for(var n=(t.textContent??``).split(Ff),r=[],i=0,a=n.length;i<a;i++){var o=n[i].trim();if(o){var s=o.match(jp);if(s){var c=0|parseInt(s[1],10),l=s[2];c!==0&&(kp(l,c),Pp(e,l,s[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(o)}}},Ip=function(e){for(var t=Np(e.options.target).querySelectorAll(Ap),n=0,r=t.length;n<r;n++){var i=t[n];i&&i.getAttribute(jf)!==Mf&&(Fp(e,i),i.parentNode&&i.parentNode.removeChild(i))}};function Lp(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:null}var Rp=function(e){var t=document.head,n=e||t,r=document.createElement(`style`),i=function(e){var t=Array.from(e.querySelectorAll(`style[${jf}]`));return t[t.length-1]}(n),a=i===void 0?null:i.nextSibling;r.setAttribute(jf,Mf),r.setAttribute(Nf,Pf);var o=Lp();return o&&r.setAttribute(`nonce`,o),n.insertBefore(r,a),r},zp=function(){function e(e){this.element=Rp(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 Cp(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}(),Bp=function(){function e(e){this.element=Rp(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}(),Vp=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}(),Hp=If,Up={isServer:!If,useCSSOMInjection:!Rf},Wp=function(){function e(e,t,n){e===void 0&&(e=Bf),t===void 0&&(t={});var r=this;this.options=Jo(Jo({},Up),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&If&&Hp&&(Hp=!1,Ip(this)),Sp(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r=``,i=function(n){var i=function(e){return Ep.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=jf+`.g`+n+`[id="`+i+`"]`,c=``;a.forEach(function(e){e.length>0&&(c+=e+`,`)}),r+=o+s+`{content:"`+c+`"}`+Ff},a=0;a<n;a++)i(a);return r}(r)})}return e.registerId=function(e){return Op(e)},e.prototype.rehydrate=function(){!this.server&&If&&Ip(this)},e.prototype.reconstructWithOptions=function(t,n){n===void 0&&(n=!0);var r=new e(Jo(Jo({},this.options),t),this.gs,n&&this.names||void 0);return!this.server&&If&&t.target!==this.options.target&&Np(this.options.target)!==Np(t.target)&&Ip(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 Vp(n):t?new zp(n):new Bp(n)}(this.options),new wp(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){Op(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(Op(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(Op(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),Gp=/&/g,Kp=47,qp=42;function Jp(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!==Kp||e.charCodeAt(a+1)!==qp)if(i)o===qp&&e.charCodeAt(a+1)===Kp&&(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 Yp(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=Yp(e.children,t)),e})}function Xp(e){var t,n,r,i=e===void 0?Bf:e,a=i.options,o=a===void 0?Bf:a,s=i.plugins,c=s===void 0?zf: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(Gp,n).replace(r,l))}),o.prefix&&u.push(Of),u.push(Tf);var d=[],f=Ef(u.concat(Df(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(!Jp(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!==Kp||e.charCodeAt(s+1)!==qp)if(o)c===qp&&e.charCodeAt(s+1)===Kp&&(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);Jp(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===Kp&&i+1<t&&e.charCodeAt(i+1)===qp){for(i+=2;i+1<t&&(e.charCodeAt(i)!==qp||e.charCodeAt(i+1)!==Kp);)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===qp&&i+1<t&&e.charCodeAt(i+1)===Kp)i>r&&n.push(e.substring(r,i)),r=i+=2;else if(s===Kp&&i+1<t&&e.charCodeAt(i+1)===Kp){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=vf(a||i?`${a} ${i} { ${c} }`:c);return o.namespace&&(l=Yp(l,o.namespace)),d=[],wf(l,f),d};return p.hash=c.length?c.reduce(function(e,t){return t.name||Cp(15),Xf(e,t.name)},5381).toString():``,p}var Zp=new Wp,Qp=Xp(),$p={shouldForwardProp:void 0,styleSheet:Zp,stylis:Qp},em=Lf?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)($p)}}:N.createContext($p);em.Consumer;var tm=Lf?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(void 0)}}:N.createContext(void 0);function nm(){return Lf?$p:N.useContext(em)}function rm(e){if(Lf||!N.useMemo)return e.children;var t=nm().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 Xp({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(em.Provider,{value:i},N.createElement(tm.Provider,{value:r},e.children))}var im=function(){function e(e,t){var n=this;this.inject=function(e,t){t===void 0&&(t=Qp);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,Sp(this,function(){throw Cp(12,String(n.name))})}return e.prototype.getName=function(e){return e===void 0&&(e=Qp),this.name+e.hash},e}();function am(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t!=`number`||t===0||e in kf||e.startsWith(`--`)?String(t).trim():`${t}px`}var om=function(e){return e>=`A`&&e<=`Z`};function sm(e){for(var t=``,n=0;n<e.length;n++){var r=e[n];if(n===1&&r===`-`&&e[0]===`-`)return e;om(r)?t+=`-`+r.toLowerCase():t+=r}return t.startsWith(`ms-`)?`-`+t:t}var cm=function(e){return e==null||!1===e||e===``},lm=function(e){var t=[];for(var n in e){var r=e[n];e.hasOwnProperty(n)&&!cm(r)&&(Array.isArray(r)&&r.isCss||gp(r)?t.push(`${sm(n)}:`,r,`;`):bp(r)?t.push.apply(t,qo(qo([`${n} {`],lm(r),!1),[`}`],!1)):t.push(`${sm(n)}: ${am(n,r)};`))}return t};function um(e,t,n,r,i){if(i===void 0&&(i=[]),typeof e==`string`)return e&&i.push(e),i;if(cm(e))return i;if(_p(e))return i.push(`.${e.styledComponentId}`),i;if(gp(e))return!gp(a=e)||a.prototype&&a.prototype.isReactComponent||!t?(i.push(e),i):um(e(t),t,n,r,i);var a;if(e instanceof im)return n?(e.inject(n,r),i.push(e.getName(r))):i.push(e),i;if(bp(e)){for(var o=lm(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++)um(e[s],t,n,r,i);return i}function dm(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(gp(n)&&!_p(n))return!1}return!0}var fm=Zf(Pf),pm=function(){function e(e,t,n){this.rules=e,this.staticRulesId=``,this.isStatic=(n===void 0||n.isStatic)&&dm(e),this.componentId=t,this.baseHash=Xf(fm,t),this.baseStyle=n,Wp.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=vp(r,this.staticRulesId);else{var i=yp(um(this.rules,e,t,n)),a=Jf(Xf(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=vp(r,a),this.staticRulesId=a}else{for(var s=Xf(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=yp(um(u,e,t,n));s=Xf(Xf(s,String(l)),d),c+=d}}if(c){var f=Jf(s>>>0);if(!t.hasNameForId(this.componentId,f)){var p=n(c,`.${f}`,void 0,this.componentId);t.insertRules(this.componentId,f,p)}r=vp(r,f)}}return{className:r,css:typeof window>`u`?t.getTag().getGroup(Op(this.componentId)):``}},e}(),mm=Lf?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(void 0)}}:N.createContext(void 0);mm.Consumer;var hm={};function gm(e,t,n){var r=_p(e),i=e,a=!ep(e),o=t.attrs,s=o===void 0?zf:o,c=t.componentId,l=c===void 0?function(e,t){var n=typeof e==`string`?Gf(e):`sc`;hm[n]=(hm[n]||0)+1;var r=`${n}-${Qf(Pf+n+hm[n])}`;return t?`${t}-${r}`:r}(t.displayName,t.parentComponentId):c,u=t.displayName,d=u===void 0?function(e){return ep(e)?`styled.${e}`:`Styled(${$f(e)})`}(e):u,f=t.displayName&&t.componentId?`${Gf(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 pm(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=Lf?void 0:N.useContext(mm),u=nm(),d=e.shouldForwardProp||u.shouldForwardProp,f=Vf(t,l,a)||(Lf?void 0:Bf),p=function(e,t,n){for(var r,i=Jo(Jo({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var o=gp(r=e[a])?r(i):r;for(var s in o)s===`className`?i.className=vp(i.className,o[s]):s===`style`?i.style=Jo(Jo({},i.style),o[s]):i[s]=o[s]}return`className`in t&&typeof t.className==`string`&&(i.className=vp(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=nm();return e.generateAndInjectStyles(t,n.styleSheet,n.stylis)}(i,p),v=_.className,y=_.css,b=vp(o,s);v&&(b+=` `+v),p.className&&(b+=` `+p.className),h[ep(m)&&!Hf.has(m)?`class`:`className`]=b,n&&(h.ref=n);var x=(0,N.createElement)(m,h);return Lf&&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?vp(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++)xp(e,r[n],!0);return e}({},i.defaultProps,e):e}}),Sp(y,function(){return`.${y.styledComponentId}`}),a&&hp(y,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),y}function _m(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 vm=function(e){return Object.assign(e,{isCss:!0})};function ym(e){var t=[...arguments].slice(1);if(gp(e)||bp(e))return vm(um(_m(zf,qo([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]==`string`?um(n):vm(um(_m(n,t)))}function bm(e,t,n){if(n===void 0&&(n=Bf),!t)throw Cp(1,t);var r=function(r){var i=[...arguments].slice(1);return e(t,n,ym.apply(void 0,qo([r],i,!1)))};return r.attrs=function(r){return bm(e,t,Jo(Jo({},n),{attrs:Array.prototype.concat(n.attrs,r).filter(Boolean)}))},r.withConfig=function(r){return bm(e,t,Jo(Jo({},n),r))},r}var xm=function(e){return bm(gm,e)},Sm=xm;Hf.forEach(function(e){Sm[e]=xm(e)}),function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=dm(e),Wp.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var i=r(yp(um(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&&Wp.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=Lp();return`<style ${yp([n&&`nonce="${n}"`,`${jf}="true"`,`${Nf}="${Pf}"`].filter(Boolean),` `)}>${t}</style>`},this.getStyleTags=function(){if(e.sealed)throw Cp(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw Cp(2);var n=e.instance.toString();if(!n)return[];var r=((t={})[jf]=``,t[Nf]=Pf,t.dangerouslySetInnerHTML={__html:n},t),i=Lp();return i&&(r.nonce=i),[N.createElement(`style`,Jo({},r,{key:`sc-0-0`}))]},this.seal=function(){e.sealed=!0},this.instance=new Wp({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw Cp(2);return N.createElement(rm,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw Cp(3)},e}(),`${jf}`;var Cm=i(((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})),wm=i((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.`)}})),Tm=i((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()})),Em=i((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=wm(),n=r(Tm());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
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`),``)}})),Dm=r((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=wm(),n=Em();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}})),Om=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=t;function t(){}})),km=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=d(a()),n=u(fs()),r=u(o()),i=Em(),s=Dm(),c=wm(),l=u(Om());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 a=(0,s.getControlPosition)(e,r,this);if(a==null)return;let{x:o,y:c}=a,u=(0,s.createCoreData)(this,o,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=o,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,s.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,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=(0,s.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,s.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,s.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let a=(0,s.createCoreData)(this,n,r);if(this.props.onStop(e,a)===!1||this.mounted===!1)return!1;let o=this.findDOMNode();o&&this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(o.ownerDocument),(0,l.default)(`DraggableCore: handleDragStop: %j`,a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,o&&((0,l.default)(`DraggableCore: Removing handlers`),(0,i.removeEvent)(o.ownerDocument,g.move,this.handleDrag),(0,i.removeEvent)(o.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:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe}),f(_,`defaultProps`,{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})})),Am=r((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(a()),n=f(fs()),r=f(o()),i=Cm(),s=Em(),c=Dm(),l=wm(),u=f(km()),d=f(Om());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,c.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,c.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,c.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,c.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:a,defaultClassName:o,defaultClassNameDragging:l,defaultClassNameDragged:d,position:f,positionOffset:p,scale:h,...g}=this.props,_={},v=null,y=!f||this.state.dragging,b=f||a,x={x:(0,c.canDragX)(this)&&y?this.state.x:b.x,y:(0,c.canDragY)(this)&&y?this.state.y:b.y};this.state.isElementSVG?v=(0,s.createSVGTransform)(x,p):_=(0,s.createCSSTransform)(x,p);let S=(0,i.clsx)(r.props.className||``,o,{[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})})),jm=r(((e,t)=>{var{default:n,DraggableCore:r}=Am();t.exports=n,t.exports.default=n,t.exports.DraggableCore=r})),Mm=r((e=>{e.__esModule=!0,e.cloneElement=l;var t=n(a());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){o(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 o(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){var t=c(e,`string`);return typeof t==`symbol`?t:t+``}function c(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)}})),Nm=r((e=>{e.__esModule=!0,e.resizableProps=void 0;var t=n(fs());jm();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)}}})),Pm=r((e=>{e.__esModule=!0,e.default=void 0;var t=s(a()),n=jm(),r=Mm(),i=Nm(),o=[`children`,`className`,`draggableOpts`,`width`,`height`,`handle`,`handleSize`,`lockAspectRatio`,`axis`,`minConstraints`,`maxConstraints`,`onResize`,`onResizeStop`,`onResizeStart`,`resizeHandles`,`transformScale`];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 c(){return c=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},c.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:a,draggableOpts:s,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,o);return(0,r.cloneElement)(i,f(f({},w),{},{className:`${a?`${a} `:``}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,c({},s,{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}})),Fm=r((e=>{e.__esModule=!0,e.default=void 0;var t=c(a()),n=s(fs()),r=s(Pm()),i=Nm(),o=[`handle`,`handleSize`,`onResize`,`onResizeStart`,`onResizeStop`,`draggableOpts`,`minConstraints`,`maxConstraints`,`lockAspectRatio`,`axis`,`width`,`height`,`resizeHandles`,`style`,`transformScale`];function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(c=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:a,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,o);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})})),Im=r(((e,t)=>{t.exports=function(){throw Error(`Don't instantiate Resizable directly! Use require('react-resizable').Resizable`)},t.exports.Resizable=Pm().default,t.exports.ResizableBox=Fm().default})),Lm=Number.isNaN||function(e){return typeof e==`number`&&e!==e};function Rm(e,t){return!!(e===t||Lm(e)&&Lm(t))}function zm(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Rm(e[n],t[n]))return!1;return!0}function Bm(e,t){t===void 0&&(t=zm);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}Wo();var Vm=typeof performance==`object`&&typeof performance.now==`function`?function(){return performance.now()}:function(){return Date.now()};function Hm(e){cancelAnimationFrame(e.id)}function Um(e,t){var n=Vm();function r(){Vm()-n>=t?e.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var Wm=-1;function Gm(e){if(e===void 0&&(e=!1),Wm===-1||e){var t=document.createElement(`div`),n=t.style;n.width=`50px`,n.height=`50px`,n.overflow=`scroll`,document.body.appendChild(t),Wm=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Wm}var Km=null;function qm(e){if(e===void 0&&(e=!1),Km===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?Km=`positive-descending`:(t.scrollLeft=1,Km=t.scrollLeft===0?`negative`:`positive-ascending`),document.body.removeChild(t),Km}return Km}var Jm=150,Ym=function(e,t){return e};function Xm(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){Ko(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=Bm(function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})}),r._callOnScroll=void 0,r._callOnScroll=Bm(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=Bm(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(qm()){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&&Hm(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=Um(r._resetIsScrolling,Jm)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}t.getDerivedStateFromProps=function(e,t){return Zm(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?Gm():0:c.scrollHeight>c.clientHeight?Gm():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(qm()){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&&Hm(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?Ym: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:Uo({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 Zm=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Qm=Xm({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;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 $m(){var e=[...arguments];return(0,N.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var eh=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function th(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function nh(e){return`nodeType`in e}function rh(e){return e?th(e)?e:nh(e)?e.ownerDocument?.defaultView??window:window:window}function ih(e){let{Document:t}=rh(e);return e instanceof t}function ah(e){return th(e)?!1:e instanceof rh(e).HTMLElement}function oh(e){return e instanceof rh(e).SVGElement}function sh(e){return e?th(e)?e.document:nh(e)?ih(e)?e:ah(e)||oh(e)?e.ownerDocument:document:document:document}var ch=eh?N.useLayoutEffect:N.useEffect;function lh(e){let t=(0,N.useRef)(e);return ch(()=>{t.current=e}),(0,N.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function uh(){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 dh(e,t){t===void 0&&(t=[e]);let n=(0,N.useRef)(e);return ch(()=>{n.current!==e&&(n.current=e)},t),n}function fh(e,t){let n=(0,N.useRef)();return(0,N.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function ph(e){let t=lh(e),n=(0,N.useRef)(null);return[n,(0,N.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function mh(e){let t=(0,N.useRef)();return(0,N.useEffect)(()=>{t.current=e},[e]),t.current}var hh={};function gh(e,t){return(0,N.useMemo)(()=>{if(t)return t;let n=hh[e]==null?0:hh[e]+1;return hh[e]=n,e+`-`+n},[e,t])}function _h(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 vh=_h(1),yh=_h(-1);function bh(e){return`clientX`in e&&`clientY`in e}function xh(e){if(!e)return!1;let{KeyboardEvent:t}=rh(e.target);return t&&e instanceof t}function Sh(e){if(!e)return!1;let{TouchEvent:t}=rh(e.target);return t&&e instanceof t}function Ch(e){if(Sh(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 bh(e)?{x:e.clientX,y:e.clientY}:null}var wh=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[wh.Translate.toString(e),wh.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),Th=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function Eh(e){return e.matches(Th)?e:e.querySelector(Th)}var Dh={display:`none`};function Oh(e){let{id:t,value:n}=e;return N.createElement(`div`,{id:t,style:Dh},n)}function kh(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 Ah(){let[e,t]=(0,N.useState)(``);return{announce:(0,N.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var jh=(0,N.createContext)(null);function Mh(e){let t=(0,N.useContext)(jh);(0,N.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function Nh(){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 Ph={draggable:`
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`),``)}})),Dm=i((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=wm(),n=Em();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}})),Om=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=t;function t(){}})),km=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=d(a()),n=u(fs()),r=u(s()),i=Em(),o=Dm(),c=wm(),l=u(Om());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 a=(0,o.getControlPosition)(e,r,this);if(a==null)return;let{x:s,y:c}=a,u=(0,o.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,o.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,o.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=(0,o.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,o.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,o.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let a=(0,o.createCoreData)(this,n,r);if(this.props.onStop(e,a)===!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`,a),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:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe}),f(_,`defaultProps`,{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})})),Am=i((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(a()),n=f(fs()),r=f(s()),i=Cm(),o=Em(),c=Dm(),l=wm(),u=f(km()),d=f(Om());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,c.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,c.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,c.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,c.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:a,defaultClassName:s,defaultClassNameDragging:l,defaultClassNameDragged:d,position:f,positionOffset:p,scale:h,...g}=this.props,_={},v=null,y=!f||this.state.dragging,b=f||a,x={x:(0,c.canDragX)(this)&&y?this.state.x:b.x,y:(0,c.canDragY)(this)&&y?this.state.y:b.y};this.state.isElementSVG?v=(0,o.createSVGTransform)(x,p):_=(0,o.createCSSTransform)(x,p);let S=(0,i.clsx)(r.props.className||``,s,{[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})})),jm=i(((e,t)=>{var{default:n,DraggableCore:r}=Am();t.exports=n,t.exports.default=n,t.exports.DraggableCore=r})),Mm=i((e=>{e.__esModule=!0,e.cloneElement=l;var t=n(a());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){o(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 o(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){var t=c(e,`string`);return typeof t==`symbol`?t:t+``}function c(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)}})),Nm=i((e=>{e.__esModule=!0,e.resizableProps=void 0;var t=n(fs());jm();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)}}})),Pm=i((e=>{e.__esModule=!0,e.default=void 0;var t=s(a()),n=jm(),r=Mm(),i=Nm(),o=[`children`,`className`,`draggableOpts`,`width`,`height`,`handle`,`handleSize`,`lockAspectRatio`,`axis`,`minConstraints`,`maxConstraints`,`onResize`,`onResizeStop`,`onResizeStart`,`resizeHandles`,`transformScale`];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 c(){return c=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},c.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:a,draggableOpts:s,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,o);return(0,r.cloneElement)(i,f(f({},w),{},{className:`${a?`${a} `:``}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,c({},s,{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}})),Fm=i((e=>{e.__esModule=!0,e.default=void 0;var t=c(a()),n=s(fs()),r=s(Pm()),i=Nm(),o=[`handle`,`handleSize`,`onResize`,`onResizeStart`,`onResizeStop`,`draggableOpts`,`minConstraints`,`maxConstraints`,`lockAspectRatio`,`axis`,`width`,`height`,`resizeHandles`,`style`,`transformScale`];function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(c=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:a,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,o);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})})),Im=i(((e,t)=>{t.exports=function(){throw Error(`Don't instantiate Resizable directly! Use require('react-resizable').Resizable`)},t.exports.Resizable=Pm().default,t.exports.ResizableBox=Fm().default})),Lm=Number.isNaN||function(e){return typeof e==`number`&&e!==e};function Rm(e,t){return!!(e===t||Lm(e)&&Lm(t))}function zm(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Rm(e[n],t[n]))return!1;return!0}function Bm(e,t){t===void 0&&(t=zm);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}Wo();var Vm=typeof performance==`object`&&typeof performance.now==`function`?function(){return performance.now()}:function(){return Date.now()};function Hm(e){cancelAnimationFrame(e.id)}function Um(e,t){var n=Vm();function r(){Vm()-n>=t?e.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var Wm=-1;function Gm(e){if(e===void 0&&(e=!1),Wm===-1||e){var t=document.createElement(`div`),n=t.style;n.width=`50px`,n.height=`50px`,n.overflow=`scroll`,document.body.appendChild(t),Wm=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Wm}var Km=null;function qm(e){if(e===void 0&&(e=!1),Km===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?Km=`positive-descending`:(t.scrollLeft=1,Km=t.scrollLeft===0?`negative`:`positive-ascending`),document.body.removeChild(t),Km}return Km}var Jm=150,Ym=function(e,t){return e};function Xm(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){Ko(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=Bm(function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})}),r._callOnScroll=void 0,r._callOnScroll=Bm(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=Bm(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(qm()){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&&Hm(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=Um(r._resetIsScrolling,Jm)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}t.getDerivedStateFromProps=function(e,t){return Zm(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?Gm():0:c.scrollHeight>c.clientHeight?Gm():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(qm()){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&&Hm(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?Ym: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:Uo({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 Zm=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Qm=Xm({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;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 $m(){var e=[...arguments];return(0,N.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var eh=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function th(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function nh(e){return`nodeType`in e}function rh(e){return e?th(e)?e:nh(e)?e.ownerDocument?.defaultView??window:window:window}function ih(e){let{Document:t}=rh(e);return e instanceof t}function ah(e){return th(e)?!1:e instanceof rh(e).HTMLElement}function oh(e){return e instanceof rh(e).SVGElement}function sh(e){return e?th(e)?e.document:nh(e)?ih(e)?e:ah(e)||oh(e)?e.ownerDocument:document:document:document}var ch=eh?N.useLayoutEffect:N.useEffect;function lh(e){let t=(0,N.useRef)(e);return ch(()=>{t.current=e}),(0,N.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function uh(){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 dh(e,t){t===void 0&&(t=[e]);let n=(0,N.useRef)(e);return ch(()=>{n.current!==e&&(n.current=e)},t),n}function fh(e,t){let n=(0,N.useRef)();return(0,N.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function ph(e){let t=lh(e),n=(0,N.useRef)(null);return[n,(0,N.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function mh(e){let t=(0,N.useRef)();return(0,N.useEffect)(()=>{t.current=e},[e]),t.current}var hh={};function gh(e,t){return(0,N.useMemo)(()=>{if(t)return t;let n=hh[e]==null?0:hh[e]+1;return hh[e]=n,e+`-`+n},[e,t])}function _h(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 vh=_h(1),yh=_h(-1);function bh(e){return`clientX`in e&&`clientY`in e}function xh(e){if(!e)return!1;let{KeyboardEvent:t}=rh(e.target);return t&&e instanceof t}function Sh(e){if(!e)return!1;let{TouchEvent:t}=rh(e.target);return t&&e instanceof t}function Ch(e){if(Sh(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 bh(e)?{x:e.clientX,y:e.clientY}:null}var wh=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[wh.Translate.toString(e),wh.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),Th=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function Eh(e){return e.matches(Th)?e:e.querySelector(Th)}var Dh={display:`none`};function Oh(e){let{id:t,value:n}=e;return N.createElement(`div`,{id:t,style:Dh},n)}function kh(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 Ah(){let[e,t]=(0,N.useState)(``);return{announce:(0,N.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var jh=(0,N.createContext)(null);function Mh(e){let t=(0,N.useContext)(jh);(0,N.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function Nh(){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 Ph={draggable:`
14
14
  To pick up a draggable item, press the space bar.
15
15
  While dragging, use the arrow keys to move the item.
16
16
  Press space again to drop the item in its new position, or press escape to cancel.
17
17
  `},Fh={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 Ih(e){let{announcements:t=Fh,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Ph}=e,{announce:a,announcement:o}=Ah(),s=gh(`DndLiveRegion`),[c,l]=(0,N.useState)(!1);if((0,N.useEffect)(()=>{l(!0)},[]),Mh((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(Oh,{id:r,value:i.draggable}),N.createElement(kh,{id:s,announcement:o}));return n?(0,Pl.createPortal)(u,n):u}var Lh;(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`})(Lh||={});function Rh(){}var zh=Object.freeze({x:0,y:0});function Bh(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function Vh(e,t){let n=Ch(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 Hh(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Uh(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Wh(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function Gh(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 Kh=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=Gh(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=Bh(Gh(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(Hh)};function wte(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 qh=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=wte(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(Uh)};function Jh(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Yh(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:zh}function Xh(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 Zh=Xh(1);function Qh(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 $h(e,t,n){let r=Qh(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 eg={ignoreTransform:!1};function tg(e,t){t===void 0&&(t=eg);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=rh(e).getComputedStyle(e);t&&(n=$h(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 ng(e){return tg(e,{ignoreTransform:!0})}function rg(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function ig(e,t){return t===void 0&&(t=rh(e).getComputedStyle(e)),t.position===`fixed`}function ag(e,t){t===void 0&&(t=rh(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 og(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(ih(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!ah(i)||oh(i)||n.includes(i))return n;let a=rh(e).getComputedStyle(i);return i!==e&&ag(i,a)&&n.push(i),ig(i,a)?n:r(i.parentNode)}return e?r(e):n}function sg(e){let[t]=og(e,1);return t??null}function cg(e){return!eh||!e?null:th(e)?e:nh(e)?ih(e)||e===sh(e).scrollingElement?window:ah(e)?e:null:null}function lg(e){return th(e)?e.scrollX:e.scrollLeft}function ug(e){return th(e)?e.scrollY:e.scrollTop}function dg(e){return{x:lg(e),y:ug(e)}}var fg;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(fg||={});function pg(e){return!eh||!e?!1:e===document.scrollingElement}function mg(e){let t={x:0,y:0},n=pg(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 hg={x:.2,y:.2};function gg(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=hg);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=mg(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=fg.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=fg.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=fg.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=fg.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function _g(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 vg(e){return e.reduce((e,t)=>vh(e,dg(t)),zh)}function yg(e){return e.reduce((e,t)=>e+lg(t),0)}function bg(e){return e.reduce((e,t)=>e+ug(t),0)}function xg(e,t){if(t===void 0&&(t=tg),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);sg(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var Sg=[[`x`,[`left`,`right`],yg],[`y`,[`top`,`bottom`],bg]],Cg=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=og(t),r=vg(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of Sg)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})}},wg=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 Tg(e){let{EventTarget:t}=rh(e);return e instanceof t?e:sh(e)}function Eg(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 Dg;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(Dg||={});function Og(e){e.preventDefault()}function kg(e){e.stopPropagation()}var Ag;(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`})(Ag||={});var jg={start:[Ag.Space,Ag.Enter],cancel:[Ag.Esc],end:[Ag.Space,Ag.Enter,Ag.Tab]},Mg=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ag.Right:return{...n,x:n.x+25};case Ag.Left:return{...n,x:n.x-25};case Ag.Down:return{...n,y:n.y+25};case Ag.Up:return{...n,y:n.y-25}}},Ng=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 wg(sh(t)),this.windowListeners=new wg(rh(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Dg.Resize,this.handleCancel),this.windowListeners.add(Dg.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Dg.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&xg(n),t(zh)}handleKeyDown(e){if(xh(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=jg,coordinateGetter:a=Mg,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}:zh;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=yh(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}=mg(n),p=_g(n),m={x:Math.min(i===Ag.Right?p.right-p.width/2:p.right,Math.max(i===Ag.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===Ag.Down?p.bottom-p.height/2:p.bottom,Math.max(i===Ag.Down?p.top:p.top+p.height/2,u.y))},h=i===Ag.Right&&!s||i===Ag.Left&&!c,g=i===Ag.Down&&!l||i===Ag.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===Ag.Right&&e<=d.x||i===Ag.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===Ag.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===Ag.Down&&e<=d.y||i===Ag.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===Ag.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,vh(yh(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()}};Ng.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=jg,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 Pg(e){return!!(e&&`distance`in e)}function Fg(e){return!!(e&&`delay`in e)}var Ig=class{constructor(e,t,n){n===void 0&&(n=Tg(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=sh(i),this.documentListeners=new wg(this.document),this.listeners=new wg(n),this.windowListeners=new wg(rh(i)),this.initialCoordinates=Ch(r)??zh,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(Dg.Resize,this.handleCancel),this.windowListeners.add(Dg.DragStart,Og),this.windowListeners.add(Dg.VisibilityChange,this.handleCancel),this.windowListeners.add(Dg.ContextMenu,Og),this.documentListeners.add(Dg.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Fg(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Pg(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(Dg.Click,kg,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Dg.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=Ch(e)??zh,s=yh(n,o);if(!t&&a){if(Pg(a)){if(a.tolerance!=null&&Eg(s,a.tolerance))return this.handleCancel();if(Eg(s,a.distance))return this.handleStart()}if(Fg(a)&&Eg(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===Ag.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},Lg={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},Rg=class extends Ig{constructor(e){let{event:t}=e,n=sh(t.target);super(e,Lg,n)}};Rg.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 zg={move:{name:`mousemove`},end:{name:`mouseup`}},Bg;(function(e){e[e.RightClick=2]=`RightClick`})(Bg||={});var Vg=class extends Ig{constructor(e){super(e,zg,sh(e.event.target))}};Vg.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Bg.RightClick?!1:(r?.({event:n}),!0)}}];var Hg={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},Ug=class extends Ig{constructor(e){super(e,Hg)}static setup(){return window.addEventListener(Hg.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Hg.move.name,e)};function e(){}}};Ug.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 Wg;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(Wg||={});var Gg;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(Gg||={});function Kg(e){let{acceleration:t,activator:n=Wg.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=Gg.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=Jg({delta:d,disabled:!a}),[m,h]=uh(),g=(0,N.useRef)({x:0,y:0}),_=(0,N.useRef)({x:0,y:0}),v=(0,N.useMemo)(()=>{switch(n){case Wg.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Wg.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===Gg.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}=gg(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 qg={x:{[fg.Backward]:!1,[fg.Forward]:!1},y:{[fg.Backward]:!1,[fg.Forward]:!1}};function Jg(e){let{delta:t,disabled:n}=e,r=mh(t);return fh(e=>{if(n||!r||!e)return qg;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[fg.Backward]:e.x[fg.Backward]||i.x===-1,[fg.Forward]:e.x[fg.Forward]||i.x===1},y:{[fg.Backward]:e.y[fg.Backward]||i.y===-1,[fg.Forward]:e.y[fg.Forward]||i.y===1}}},[n,t,r])}function Yg(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return fh(e=>t==null?null:r??e??null,[r,t])}function Xg(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 Zg;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(Zg||={});var Qg;(function(e){e.Optimized=`optimized`})(Qg||={});var $g=new Map;function e_(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=dh(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=fh(t=>{if(d&&!n)return $g;if(!t||t===$g||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 Cg(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 Zg.Always:return!1;case Zg.BeforeDragging:return n;default:return!n}}}function t_(e,t){return fh(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function n_(e,t){return t_(e,t)}function r_(e){let{callback:t,disabled:n}=e,r=lh(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 i_(e){let{callback:t,disabled:n}=e,r=lh(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 a_(e){return new Cg(tg(e),e)}function o_(e,t,n){t===void 0&&(t=a_);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=r_({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=i_({callback:a});return ch(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function s_(e){return Yh(e,t_(e))}var c_=[];function l_(e){let t=(0,N.useRef)(e),n=fh(n=>e?n&&n!==c_&&e&&t.current&&e.parentNode===t.current.parentNode?n:og(e):c_,[e]);return(0,N.useEffect)(()=>{t.current=e},[e]),n}function u_(e){let[t,n]=(0,N.useState)(null),r=(0,N.useRef)(e),i=(0,N.useCallback)(e=>{let t=cg(e.target);t&&n(e=>e?(e.set(t,dg(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=cg(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,dg(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=>{cg(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,N.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>vh(e,t),zh):vg(e):zh,[e,t])}function d_(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!==zh;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?yh(e,n.current):zh}function f_(e){(0,N.useEffect)(()=>{if(!eh)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 p_(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?rg(e):null,[e])}var h_=[];function Tte(e,t){t===void 0&&(t=tg);let[n]=e,r=m_(n?rh(n):null),[i,a]=(0,N.useState)(h_);function o(){a(()=>e.length?e.map(e=>pg(e)?r:new Cg(t(e),e)):h_)}let s=i_({callback:o});return ch(()=>{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 ah(t)?t:e}function Ete(e){let{measure:t}=e,[n,r]=(0,N.useState)(null),i=i_({callback:(0,N.useCallback)(e=>{for(let{target:n}of e)if(ah(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=ph((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 Dte=[{sensor:Rg,options:{}},{sensor:Ng,options:{}}],Ote={current:{}},__={draggable:{measure:ng},droppable:{measure:ng,strategy:Zg.WhileDragging,frequency:Qg.Optimized},dragOverlay:{measure:tg}},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}},kte={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:Rh},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:__,measureDroppableContainers:Rh,windowRect:null,measuringScheduled:!1},y_={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:Rh,draggableNodes:new Map,over:null,measureDroppableContainers:Rh},b_=(0,N.createContext)(y_),x_=(0,N.createContext)(kte);function Ate(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new v_}}}function jte(e,t){switch(t.type){case Lh.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Lh.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 Lh.DragEnd:case Lh.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Lh.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 Lh.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 Lh.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 Mte(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,N.useContext)(b_),a=mh(r),o=mh(n?.id);return(0,N.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!xh(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=Eh(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 Nte(e){return(0,N.useMemo)(()=>({draggable:{...__.draggable,...e?.draggable},droppable:{...__.droppable,...e?.droppable},dragOverlay:{...__.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Pte(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;ch(()=>{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=Yh(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=sg(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var C_=(0,N.createContext)({...zh,scaleX:1,scaleY:1}),w_;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(w_||={});var Fte=(0,N.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=Dte,collisionDetection:o=qh,measuring:s,modifiers:c,...l}=e,[u,d]=(0,N.useReducer)(jte,void 0,Ate),[f,p]=Nh(),[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??Ote,rect:S},[_,x]),w=(0,N.useRef)(null),[T,E]=(0,N.useState)(null),[D,O]=(0,N.useState)(null),k=dh(l,Object.values(l)),A=gh(`DndDescribedBy`,t),ee=(0,N.useMemo)(()=>b.getEnabled(),[b]),j=Nte(s),{droppableRects:te,measureDroppableContainers:ne,measuringScheduled:re}=e_(ee,{dragging:g,dependencies:[y.x,y.y],config:j.droppable}),ie=Yg(v,_),ae=(0,N.useMemo)(()=>D?Ch(D):null,[D]),oe=Ie(),se=n_(ie,j.draggable.measure);Pte({activeNode:_==null?null:v.get(_),config:oe.layoutShiftCompensation,initialRect:se,measure:j.draggable.measure});let M=o_(ie,j.draggable.measure,se),ce=o_(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=Ete({measure:j.dragOverlay.measure}),fe=de.nodeRef.current??ie,pe=g?de.rect??M:null,me=!!(de.nodeRef.current&&de.rect),he=s_(me?null:M),ge=m_(fe?rh(fe):null),_e=l_(g?ue??ie:null),ve=Tte(_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?vh(ae,y):null,xe=u_(_e),Se=d_(xe),Ce=d_(xe,[M]),we=vh(ye,Se),Te=pe?Zh(pe,ye):null,Ee=C&&Te?o({active:C,collisionRect:Te,droppableRects:te,droppableContainers:ee,pointerCoordinates:be}):null,De=Wh(Ee,`id`),[Oe,ke]=(0,N.useState)(null),Ae=Jh(me?ye:vh(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,Pl.unstable_batchedUpdates)(()=>{r?.(i),h(w_.Initializing),d({type:Lh.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),E(je.current),O(a)})},onMove(e){d({type:Lh.DragMove,coordinates:e})},onEnd:o(Lh.DragEnd),onCancel:o(Lh.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===Lh.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=Lh.DragCancel)}w.current=null,(0,Pl.unstable_batchedUpdates)(()=>{d({type:e}),h(w_.Uninitialized),ke(null),E(null),O(null),je.current=null;let t=e===Lh.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=k.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),Ne=Xg(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]));f_(a),ch(()=>{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,Pl.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,Pl.unstable_batchedUpdates)(()=>{ke(s),a?.(c),f({type:`onDragOver`,event:c})})},[De]),ch(()=>{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]),Kg({...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(jh.Provider,{value:p},N.createElement(b_.Provider,{value:Fe},N.createElement(x_.Provider,{value:Pe},N.createElement(C_.Provider,{value:Ae},i)),N.createElement(Mte,{disabled:n?.restoreFocus===!1})),N.createElement(Ih,{...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}}}),Ite=(0,N.createContext)(null),T_=`button`,Lte=`Draggable`;function Rte(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=gh(Lte),{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_:Ite),[v,y]=ph(),[b,x]=ph(),S=p_(o,t),C=dh(n);return ch(()=>(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 zte=`Droppable`,Bte={timeout:25};function Vte(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=gh(zte),{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}={...Bte,...i},_=dh(h??r),v=i_({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]=ph((0,N.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=dh(t);return(0,N.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,N.useEffect)(()=>(s({type:Lh.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:Lh.UnregisterDroppable,key:a,id:r})),[r]),(0,N.useEffect)(()=>{n!==u.current.disabled&&(s({type:Lh.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 Hte(e){let{animation:t,children:n}=e,[r,i]=(0,N.useState)(null),[a,o]=(0,N.useState)(null),s=mh(n);return!n&&!r&&s&&i(s),ch(()=>{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 Ute={x:0,y:0,scaleX:1,scaleY:1};function Wte(e){let{children:t}=e;return N.createElement(b_.Provider,{value:y_},N.createElement(C_.Provider,{value:Ute},t))}var Gte={position:`fixed`,touchAction:`none`},Kte=e=>xh(e)?`transform 250ms ease`:void 0,qte=(0,N.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=Kte}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...Gte,width:s.width,height:s.height,top:s.top,left:s.left,transform:wh.Transform.toString(d),transformOrigin:i&&r?Vh(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return N.createElement(n,{className:o,style:f,ref:t},a)}),Jte={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:wh.Transform.toString(t)},{transform:wh.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 Yte(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return lh((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}=rh(a).getComputedStyle(a),u=Qh(l);if(!u)return;let d=typeof t==`function`?t:Xte(t);return xg(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 Xte(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...Jte,...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 Zte(e){return(0,N.useMemo)(()=>{if(e!=null)return D_++,D_},[e])}var Qte=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=Zte(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=t_(f),E=Yte({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),D=T?g.setRef:void 0;return N.createElement(Wte,null,N.createElement(Hte,{animation:E},d&&C?N.createElement(qte,{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 $te(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 ene(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 tne(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},nne=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=rne(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 rne(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 ine(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=gh(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=!ene(p,_.current),y=g!==-1&&h===-1||v,b=tne(a);ch(()=>{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:$te(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 ane=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return O_(n,r,i).indexOf(t)},one=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},sne={duration:200,easing:`ease`},P_=`transform`,cne=wh.Transition.toString({property:P_,duration:0,easing:`linear`}),lne={roleDescription:`sortable`};function une(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,N.useState)(null),s=(0,N.useRef)(n);return ch(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=tg(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=one,attributes:n,disabled:r,data:i,getNewIndex:a=ane,id:o,strategy:s,resizeObserverConfig:c,transition:l=sne}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,N.useContext)(N_),y=dne(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}=Vte({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}=Rte({id:o,data:x,attributes:{...lne,...n},disabled:y.draggable}),ae=$m(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=une({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 cne;if(!(M&&!xh(O)||!l)&&(oe||pe))return wh.Transition.toString({...l,property:P_})}}function dne(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}Ag.Down,Ag.Right,Ag.Up,Ag.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 fne(e){if(Array.isArray(e))return I_(e)}function pne(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 mne(){throw TypeError(`Invalid attempt to spread non-iterable instance.
18
18
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R_(e){return fne(e)||pne(e)||L_(e)||mne()}function hne(e){if(Array.isArray(e))return e}function gne(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 _ne(){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 hne(e)||gne(e,t)||L_(e,t)||_ne()}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 vne(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}var V_=vne()?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)};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 yne(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_={},bne=[],xne=function(e){bne.push(e)};function Sne(e,t){}function Cne(e,t){}function wne(){K_={}}function q_(e,t,n){!t&&!K_[n]&&(e(!1,n),K_[n]=!0)}function J_(e,t){q_(Sne,e,t)}function Tne(e,t){q_(Cne,e,t)}J_.preMessage=xne,J_.resetWarned=wne,J_.noteOnce=Tne;function Ene(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(J_(!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)}Ho();function Y_(e,t){if(e==null)return{};var n,r,i=Vo(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 X_(e,t,n){return(e-t)/(n-t)}function Z_(e,t,n,r){var i=X_(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 Q_(e,t){return Array.isArray(e)?e[t]:e}var I={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>=I.F1&&t<=I.F12)return!1;switch(t){case I.ALT:case I.CAPS_LOCK:case I.CONTEXT_MENU:case I.CTRL:case I.DOWN:case I.END:case I.ESC:case I.HOME:case I.INSERT:case I.LEFT:case I.MAC_FF_META:case I.META:case I.NUMLOCK:case I.NUM_CENTER:case I.PAGE_DOWN:case I.PAGE_UP:case I.PAUSE:case I.PRINT_SCREEN:case I.RIGHT:case I.SHIFT:case I.UP:case I.WIN_KEY:case I.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=I.ZERO&&e<=I.NINE||e>=I.NUM_ZERO&&e<=I.NUM_MULTIPLY||e>=I.A&&e<=I.Z||window.navigator.userAgent.indexOf(`WebKit`)!==-1&&e===0)return!0;switch(e){case I.SPACE:case I.QUESTION_MARK:case I.NUM_PLUS:case I.NUM_MINUS:case I.NUM_PERIOD:case I.NUM_DIVISION:case I.SEMICOLON:case I.DASH:case I.EQUALS:case I.COMMA:case I.PERIOD:case I.SLASH:case I.APOSTROPHE:case I.SINGLE_QUOTE:case I.OPEN_SQUARE_BRACKET:case I.BACKSLASH:case I.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},$_=N.createContext({min:0,max:0,direction:`ltr`,step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),Dne=N.createContext({});Wo();var L=n(v()),One=[`prefixCls`,`value`,`valueIndex`,`onStartMove`,`onDelete`,`style`,`render`,`dragging`,`draggingDelete`,`onOffsetChange`,`onChangeComplete`,`onFocus`,`onMouseEnter`],ev=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=Y_(e,One),g=N.useContext($_),_=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 I.LEFT:t=y===`ltr`||y===`btt`?-1:1;break;case I.RIGHT:t=y===`ltr`||y===`btt`?1:-1;break;case I.UP:t=y===`ttb`?-1:1;break;case I.DOWN:t=y===`ttb`?1:-1;break;case I.HOME:t=`min`;break;case I.END:t=`max`;break;case I.PAGE_UP:t=2;break;case I.PAGE_DOWN:t=-2;break;case I.BACKSPACE:case I.DELETE:o?.(i);break}t!==null&&(e.preventDefault(),d(t,i))}},re=function(e){switch(e.which||e.keyCode){case I.LEFT:case I.RIGHT:case I.UP:case I.DOWN:case I.HOME:case I.END:case I.PAGE_UP:case I.PAGE_DOWN:f?.();break}},ie=Z_(y,r,_,v),ae={};i!==null&&(ae={tabIndex:b?null:Q_(C,i),role:`slider`,"aria-valuemin":_,"aria-valuemax":v,"aria-valuenow":r,"aria-disabled":b,"aria-label":Q_(w,i),"aria-labelledby":Q_(T,i),"aria-required":Q_(E,i),"aria-valuetext":Q_(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`,Uo({ref:t,className:(0,L.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});Wo();var kne=[`prefixCls`,`style`,`onStartMove`,`onOffsetChange`,`values`,`handleRender`,`activeHandleRender`,`draggingIndex`,`draggingDelete`,`onFocus`],Ane=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=Y_(e,kne),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,Pl.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(ev,Uo({ref:function(e){e?p.current[t]=e:delete p.current[t]},dragging:n,draggingDelete:n&&u,style:Q_(r,t),key:t,value:e,valueIndex:t},C))}),c&&h&&N.createElement(ev,Uo({key:`a11y`},C,{value:o[v],valueIndex:null,dragging:l!==-1,draggingDelete:u,render:c,style:{pointerEvents:`none`},tabIndex:null,"aria-hidden":!0})))}),jne=function(e){var t=e.prefixCls,n=e.style,r=e.children,i=e.value,a=e.onClick,o=N.useContext($_),s=o.min,c=o.max,l=o.direction,u=o.includedStart,d=o.includedEnd,f=o.included,p=`${t}-text`,m=Z_(l,i,s,c);return N.createElement(`span`,{className:(0,L.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)},Mne=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(jne,{key:t,prefixCls:i,style:n,value:t,onClick:r},a)})):null},Nne=function(e){var t=e.prefixCls,n=e.value,r=e.style,i=e.activeStyle,a=N.useContext($_),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({},Z_(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,L.default)(f,mi({},`${f}-active`,p)),style:m})},Pne=function(e){var t=e.prefixCls,n=e.marks,r=e.dots,i=e.style,a=e.activeStyle,o=N.useContext($_),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(Nne,{prefixCls:t,key:e,value:e,style:i,activeStyle:a})}))},tv=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($_),l=c.direction,u=c.min,d=c.max,f=c.disabled,p=c.range,m=c.classNames,h=`${t}-track`,g=X_(r,u,d),_=X_(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,L.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})},Fne=function(e){var t=e.prefixCls,n=e.style,r=e.values,i=e.startPoint,a=e.onStartMove,o=N.useContext($_),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(tv,{index:null,prefixCls:t,start:f[0].start,end:f[f.length-1].end,replaceCls:(0,L.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(tv,{index:r,prefixCls:t,style:gi(gi({},Q_(n,r)),u.track),start:i,end:o,key:r,onStartMove:a})}))},Ine=130;function nv(e){var t=`targetTouches`in e?e.targetTouches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function Lne(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(Dne),A=k.onDragStart,ee=k.onDragChange;H_(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=nv(r),f=d.pageX,m=d.pageY,h=!1;A&&A({rawValues:o,draggingIndex:i,draggingValue:c});var _=function(n){n.preventDefault();var r=nv(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)>Ine&&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}]}function Rne(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 zne(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 Bne=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_(zne(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_(Rne(je,Me,Ne,Fe,ee,Pe),2),Le=Ie[0],Re=Ie[1],ze=z_(yne(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&&!Ene(t,He,!0)&&E(Ue(t)),Ve(t)}),Ge=B_(function(e){e&&Se.current.hideHelp();var t=Ue(He);O?.(t),J_(!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_(Lne(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),J_(!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($_.Provider,{value:ft},N.createElement(`div`,{ref:Ce,className:(0,L.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,L.default)(`${r}-rail`,o?.rail),style:gi(gi({},ce),s?.rail)}),he!==!1&&N.createElement(Fne,{prefixCls:r,style:se,values:He,startPoint:oe,onStartMove:at?ot:void 0}),N.createElement(Pne,{prefixCls:r,marks:Fe,dots:fe,style:le,activeStyle:ue}),N.createElement(Ane,{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(Mne,{prefixCls:r,marks:Fe,onClick:$e})))}),Vne=r(((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 rv(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`,`
19
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z_(e,t){return hne(e)||gne(e,t)||L_(e,t)||_ne()}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 vne(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}var V_=vne()?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)};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 yne(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_={},bne=[],xne=function(e){bne.push(e)};function Sne(e,t){}function Cne(e,t){}function wne(){K_={}}function q_(e,t,n){!t&&!K_[n]&&(e(!1,n),K_[n]=!0)}function J_(e,t){q_(Sne,e,t)}function Tne(e,t){q_(Cne,e,t)}J_.preMessage=xne,J_.resetWarned=wne,J_.noteOnce=Tne;function Ene(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(J_(!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)}Ho();function Y_(e,t){if(e==null)return{};var n,r,i=Vo(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 X_(e,t,n){return(e-t)/(n-t)}function Z_(e,t,n,r){var i=X_(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 Q_(e,t){return Array.isArray(e)?e[t]:e}var I={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>=I.F1&&t<=I.F12)return!1;switch(t){case I.ALT:case I.CAPS_LOCK:case I.CONTEXT_MENU:case I.CTRL:case I.DOWN:case I.END:case I.ESC:case I.HOME:case I.INSERT:case I.LEFT:case I.MAC_FF_META:case I.META:case I.NUMLOCK:case I.NUM_CENTER:case I.PAGE_DOWN:case I.PAGE_UP:case I.PAUSE:case I.PRINT_SCREEN:case I.RIGHT:case I.SHIFT:case I.UP:case I.WIN_KEY:case I.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=I.ZERO&&e<=I.NINE||e>=I.NUM_ZERO&&e<=I.NUM_MULTIPLY||e>=I.A&&e<=I.Z||window.navigator.userAgent.indexOf(`WebKit`)!==-1&&e===0)return!0;switch(e){case I.SPACE:case I.QUESTION_MARK:case I.NUM_PLUS:case I.NUM_MINUS:case I.NUM_PERIOD:case I.NUM_DIVISION:case I.SEMICOLON:case I.DASH:case I.EQUALS:case I.COMMA:case I.PERIOD:case I.SLASH:case I.APOSTROPHE:case I.SINGLE_QUOTE:case I.OPEN_SQUARE_BRACKET:case I.BACKSLASH:case I.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},$_=N.createContext({min:0,max:0,direction:`ltr`,step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),Dne=N.createContext({});Wo();var L=e(v()),One=[`prefixCls`,`value`,`valueIndex`,`onStartMove`,`onDelete`,`style`,`render`,`dragging`,`draggingDelete`,`onOffsetChange`,`onChangeComplete`,`onFocus`,`onMouseEnter`],ev=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=Y_(e,One),g=N.useContext($_),_=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 I.LEFT:t=y===`ltr`||y===`btt`?-1:1;break;case I.RIGHT:t=y===`ltr`||y===`btt`?1:-1;break;case I.UP:t=y===`ttb`?-1:1;break;case I.DOWN:t=y===`ttb`?1:-1;break;case I.HOME:t=`min`;break;case I.END:t=`max`;break;case I.PAGE_UP:t=2;break;case I.PAGE_DOWN:t=-2;break;case I.BACKSPACE:case I.DELETE:o?.(i);break}t!==null&&(e.preventDefault(),d(t,i))}},re=function(e){switch(e.which||e.keyCode){case I.LEFT:case I.RIGHT:case I.UP:case I.DOWN:case I.HOME:case I.END:case I.PAGE_UP:case I.PAGE_DOWN:f?.();break}},ie=Z_(y,r,_,v),ae={};i!==null&&(ae={tabIndex:b?null:Q_(C,i),role:`slider`,"aria-valuemin":_,"aria-valuemax":v,"aria-valuenow":r,"aria-disabled":b,"aria-label":Q_(w,i),"aria-labelledby":Q_(T,i),"aria-required":Q_(E,i),"aria-valuetext":Q_(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`,Uo({ref:t,className:(0,L.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});Wo();var kne=[`prefixCls`,`style`,`onStartMove`,`onOffsetChange`,`values`,`handleRender`,`activeHandleRender`,`draggingIndex`,`draggingDelete`,`onFocus`],Ane=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=Y_(e,kne),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,Pl.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(ev,Uo({ref:function(e){e?p.current[t]=e:delete p.current[t]},dragging:n,draggingDelete:n&&u,style:Q_(r,t),key:t,value:e,valueIndex:t},C))}),c&&h&&N.createElement(ev,Uo({key:`a11y`},C,{value:o[v],valueIndex:null,dragging:l!==-1,draggingDelete:u,render:c,style:{pointerEvents:`none`},tabIndex:null,"aria-hidden":!0})))}),jne=function(e){var t=e.prefixCls,n=e.style,r=e.children,i=e.value,a=e.onClick,o=N.useContext($_),s=o.min,c=o.max,l=o.direction,u=o.includedStart,d=o.includedEnd,f=o.included,p=`${t}-text`,m=Z_(l,i,s,c);return N.createElement(`span`,{className:(0,L.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)},Mne=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(jne,{key:t,prefixCls:i,style:n,value:t,onClick:r},a)})):null},Nne=function(e){var t=e.prefixCls,n=e.value,r=e.style,i=e.activeStyle,a=N.useContext($_),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({},Z_(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,L.default)(f,mi({},`${f}-active`,p)),style:m})},Pne=function(e){var t=e.prefixCls,n=e.marks,r=e.dots,i=e.style,a=e.activeStyle,o=N.useContext($_),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(Nne,{prefixCls:t,key:e,value:e,style:i,activeStyle:a})}))},tv=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($_),l=c.direction,u=c.min,d=c.max,f=c.disabled,p=c.range,m=c.classNames,h=`${t}-track`,g=X_(r,u,d),_=X_(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,L.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})},Fne=function(e){var t=e.prefixCls,n=e.style,r=e.values,i=e.startPoint,a=e.onStartMove,o=N.useContext($_),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(tv,{index:null,prefixCls:t,start:f[0].start,end:f[f.length-1].end,replaceCls:(0,L.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(tv,{index:r,prefixCls:t,style:gi(gi({},Q_(n,r)),u.track),start:i,end:o,key:r,onStartMove:a})}))},Ine=130;function nv(e){var t=`targetTouches`in e?e.targetTouches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function Lne(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(Dne),A=k.onDragStart,ee=k.onDragChange;H_(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=nv(r),f=d.pageX,m=d.pageY,h=!1;A&&A({rawValues:o,draggingIndex:i,draggingValue:c});var _=function(n){n.preventDefault();var r=nv(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)>Ine&&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}]}function Rne(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 zne(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 Bne=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_(zne(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_(Rne(je,Me,Ne,Fe,ee,Pe),2),Le=Ie[0],Re=Ie[1],ze=z_(yne(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&&!Ene(t,He,!0)&&E(Ue(t)),Ve(t)}),Ge=B_(function(e){e&&Se.current.hideHelp();var t=Ue(He);O?.(t),J_(!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_(Lne(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),J_(!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($_.Provider,{value:ft},N.createElement(`div`,{ref:Ce,className:(0,L.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,L.default)(`${r}-rail`,o?.rail),style:gi(gi({},ce),s?.rail)}),he!==!1&&N.createElement(Fne,{prefixCls:r,style:se,values:He,startPoint:oe,onStartMove:at?ot:void 0}),N.createElement(Pne,{prefixCls:r,marks:Fe,dots:fe,style:le,activeStyle:ue}),N.createElement(Ane,{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(Mne,{prefixCls:r,marks:Fe,onClick:$e})))}),Vne=i(((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 rv(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
20
  font-size: .6rem;
21
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 iv(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var Hne=(e,t)=>Math.abs(e-t)<1.01,Une=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},av=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},ov=e=>e,sv=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},Wne=(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(av(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(av(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},cv={passive:!0},lv=typeof window>`u`?!0:`onscrollend`in window,uv=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&lv?()=>void 0:Une(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,cv);let l=e.options.useScrollendEvent&&lv;return l&&n.addEventListener(`scrollend`,c,cv),()=>{n.removeEventListener(`scroll`,s),l&&n.removeEventListener(`scrollend`,c)}},dv=(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`]},fv=(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})},pv=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:ov,rangeExtractor:sv,onChange:()=>{},measureElement:dv,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=rv(()=>(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=rv(()=>[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=rv(()=>[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=rv(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?Gne({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=rv(()=>{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=rv(()=>[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 iv(t[mv(0,t.length-1,e=>iv(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}Hne(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)}},mv=(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 Gne({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=mv(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 hv=typeof document<`u`?N.useLayoutEffect:N.useEffect;function gv({useFlushSync:e=!0,...t}){let n=N.useReducer(()=>({}),{})[1],r={...t,onChange:(r,i)=>{var a;e&&i?(0,Pl.flushSync)(n):n(),(a=t.onChange)==null||a.call(t,r,i)}},[i]=N.useState(()=>new pv(r));return i.setOptions(r),hv(()=>i._didMount(),[]),hv(()=>i._willUpdate()),i}function _v(e){return gv({observeElementRect:Wne,observeElementOffset:uv,scrollToFn:fv,...e})}var vv=r((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})),yv=r((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})),bv=r((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})),xv=r((e=>{e.__esModule=!0,e.SimplifyAP=vv().SimplifyAP,e.SimplifyLL=yv().SimplifyLL,e.Simplify=bv().Simplify})),Sv=r(((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(`
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 iv(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var Hne=(e,t)=>Math.abs(e-t)<1.01,Une=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},av=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},ov=e=>e,sv=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},Wne=(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(av(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(av(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},cv={passive:!0},lv=typeof window>`u`?!0:`onscrollend`in window,uv=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&lv?()=>void 0:Une(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,cv);let l=e.options.useScrollendEvent&&lv;return l&&n.addEventListener(`scrollend`,c,cv),()=>{n.removeEventListener(`scroll`,s),l&&n.removeEventListener(`scrollend`,c)}},dv=(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`]},fv=(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})},pv=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:ov,rangeExtractor:sv,onChange:()=>{},measureElement:dv,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=rv(()=>(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=rv(()=>[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=rv(()=>[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=rv(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?Gne({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=rv(()=>{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=rv(()=>[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 iv(t[mv(0,t.length-1,e=>iv(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}Hne(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)}},mv=(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 Gne({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=mv(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 hv=typeof document<`u`?N.useLayoutEffect:N.useEffect;function gv({useFlushSync:e=!0,...t}){let n=N.useReducer(()=>({}),{})[1],r={...t,onChange:(r,i)=>{var a;e&&i?(0,Pl.flushSync)(n):n(),(a=t.onChange)==null||a.call(t,r,i)}},[i]=N.useState(()=>new pv(r));return i.setOptions(r),hv(()=>i._didMount(),[]),hv(()=>i._willUpdate()),i}function _v(e){return gv({observeElementRect:Wne,observeElementOffset:uv,scrollToFn:fv,...e})}var vv=i((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})),yv=i((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})),bv=i((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})),xv=i((e=>{e.__esModule=!0,e.SimplifyAP=vv().SimplifyAP,e.SimplifyLL=yv().SimplifyLL,e.Simplify=bv().Simplify})),Sv=i(((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
23
  `),e=1<t.length&&t[0].length<n[0].length;if(n.length===1||e)return`
24
24
  `;for(var r=0,i=0;i<n.length;i++)n[i][0]===`
25
25
  `&&r++;return r>=n.length/2?`\r
@@ -28,7 +28,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
28
28
  `&&(n=`
29
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
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 Cv(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=Cv(e[t]))&&(r&&(r+=` `),r+=n);else for(t in e)e[t]&&(r&&(r+=` `),r+=t);return r}function wv(){for(var e,t,n=0,r=``;n<arguments.length;)(e=arguments[n++])&&(t=Cv(e))&&(r&&(r+=` `),r+=t);return r}var Tv=e=>typeof e==`number`&&!isNaN(e),Ev=e=>typeof e==`string`,Dv=e=>typeof e==`function`,Ov=e=>Ev(e)||Dv(e)?e:null,kv=e=>(0,N.isValidElement)(e)||Ev(e)||Dv(e)||Tv(e);function Av(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 jv(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?Av(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 Mv(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 Nv={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)})}},Pv=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})},Fv={info:function(e){return N.createElement(Pv,{...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(Pv,{...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(Pv,{...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(Pv,{...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 Kne(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(!kv(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:Ov(c.className||h.toastClassName),bodyClassName:Ov(c.bodyClassName||h.bodyClassName),progressClassName:Ov(c.progressClassName||h.progressClassName),autoClose:!c.isLoading&&(y=c.autoClose,b=h.autoClose,!1===y||Tv(y)&&y>0?y:b),deleteToast(){let e=Mv(a.get(d),`removed`);a.delete(d),Nv.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||(Dv(i)?a=i(o):(0,N.isValidElement)(i)?a=(0,N.cloneElement)(i,o):Ev(i)||Tv(i)?a=i:r?a=Fv.spinner():(e=>e in Fv)(n)&&(a=Fv[n](o))),a}(v),Dv(c.onOpen)&&(v.onOpen=c.onOpen),Dv(c.onClose)&&(v.onClose=c.onClose),v.closeButton=h.closeButton,!1===c.closeButton||kv(c.closeButton)?v.closeButton=c.closeButton:!0===c.closeButton&&(v.closeButton=!kv(h.closeButton)||h.closeButton);let x=e;(0,N.isValidElement)(e)&&!Ev(e.type)?x=(0,N.cloneElement)(e,{closeToast:g,toastProps:v,data:m}):Dv(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}):Tv(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)),Nv.emit(4,Mv(o,o.props.updateId==null?`added`:`updated`))}return(0,N.useEffect)(()=>(s.containerId=e.containerId,Nv.cancelEmit(3).on(0,d).on(1,e=>i.current&&l(e)).on(5,c).emit(2,s),()=>{a.clear(),Nv.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 Iv(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function Lv(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function Rv(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=Iv(t.nativeEvent),o.y=Lv(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=Iv(n),o.y=Lv(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}),Dv(e.onOpen)&&e.onOpen((0,N.isValidElement)(e.children)&&e.children.props),()=>{let e=s.current;Dv(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 zv(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 Bv(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=wv(`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=Dv(o)?o({rtl:u,type:i,defaultClassName:h}):wv(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 Vv=e=>{let{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:i}=Rv(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=wv(`Toastify__toast`,`Toastify__toast-theme--${A}`,`Toastify__toast--${l}`,{"Toastify__toast--rtl":C},{"Toastify__toast--close-on-click":k}),j=Dv(m)?m({rtl:C,position:p,type:l,defaultClassName:ee}):wv(ee,m),te=!!S||!s,ne={closeToast:d,type:l,theme:A},re=null;return!1===a||(re=Dv(a)?a(ne):(0,N.isValidElement)(a)?(0,N.cloneElement)(a,ne):zv(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:Dv(g)?g({type:l}):wv(`Toastify__toast-body`,g),style:_},O!=null&&N.createElement(`div`,{className:wv(`Toastify__toast-icon`,{"Toastify--animate-icon Toastify__zoom-enter":!D})},O),N.createElement(`div`,null,o)),re,N.createElement(Bv,{...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})))},Hv=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},Uv=jv(Hv(`bounce`,!0));jv(Hv(`slide`,!0)),jv(Hv(`zoom`)),jv(Hv(`flip`));var Wv=(0,N.forwardRef)((e,t)=>{let{getToastToRender:n,containerRef:r,isToastActive:i}=Kne(e),{className:a,style:o,rtl:s,containerId:c}=e;function l(e){let t=wv(`Toastify__toast-container`,`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":s});return Dv(a)?a({position:e,rtl:s,defaultClassName:t}):wv(t,Ov(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(Vv,{...a,isIn:i(a.toastId),style:{...a.style,"--nth":n+1,"--len":t.length},key:`toast-${a.key}`},r)}))}))});Wv.displayName=`ToastContainer`,Wv.defaultProps={position:`top-right`,transition:Uv,autoClose:5e3,closeButton:zv,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:`x`,role:`alert`,theme:`light`};var Gv,Kv=new Map,qv=[],Jv=1;function Yv(){return``+ Jv++}function Xv(e){return e&&(Ev(e.toastId)||Tv(e.toastId))?e.toastId:Yv()}function Zv(e,t){return Kv.size>0?Nv.emit(0,e,t):qv.push({content:e,options:t}),t.toastId}function Qv(e,t){return{...t,type:t&&t.type||e,toastId:Xv(t)}}function $v(e){return(t,n)=>Zv(t,Qv(e,n))}function ey(e,t){return Zv(e,Qv(`default`,t))}ey.loading=(e,t)=>Zv(e,Qv(`default`,{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ey.promise=function(e,t,n){let r,{pending:i,error:a,success:o}=t;i&&(r=Ev(i)?ey.loading(i,n):ey.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 ey.dismiss(r);let a={type:e,...s,...n,data:i},o=Ev(t)?{render:t}:t;return r?ey.update(r,{...a,...o}):ey(o.render,{...a,...o}),i},l=Dv(e)?e():e;return l.then(e=>c(`success`,o,e)).catch(e=>c(`error`,a,e)),l},ey.success=$v(`success`),ey.info=$v(`info`),ey.error=$v(`error`),ey.warning=$v(`warning`),ey.warn=ey.warning,ey.dark=(e,t)=>Zv(e,Qv(`default`,{theme:`dark`,...t})),ey.dismiss=e=>{Kv.size>0?Nv.emit(1,e):qv=qv.filter(t=>e!=null&&t.options.toastId!==e)},ey.clearWaitingQueue=function(e){return e===void 0&&(e={}),Nv.emit(5,e)},ey.isActive=e=>{let t=!1;return Kv.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},ey.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{let n=function(e,t){let{containerId:n}=t,r=Kv.get(n||Gv);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:Yv()};a.toastId!==e&&(a.staleId=e);let o=a.render||i;delete a.render,Zv(o,a)}},0)},ey.done=e=>{ey.update(e,{progress:1})},ey.onChange=e=>(Nv.on(4,e),()=>{Nv.off(4,e)}),ey.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`},ey.TYPE={INFO:`info`,SUCCESS:`success`,WARNING:`warning`,ERROR:`error`,DEFAULT:`default`},Nv.on(2,e=>{Gv=e.containerId||e,Kv.set(Gv,e),qv.forEach(e=>{Nv.emit(0,e.content,e.options)}),qv=[]}).on(3,e=>{Kv.delete(e.containerId||e),Kv.size===0&&Nv.off(0).off(1).off(5)});var ty=r(((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})),ny=`ProseMirror-selectednode`;`${ny}`;var ry=`__state_override__`,iy={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`},ay=Symbol.for(`__remirror__`),oy=(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))(oy||{}),sy=(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))(sy||{}),cy=(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))(cy||{}),R=(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))(R||{}),z=(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))(z||{}),ly=r(((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})),uy=r(((e,t)=>{t.exports=function(e){return typeof e==`object`&&!!e&&Array.isArray(e)===!1}})),dy=r(((e,t)=>{var n=uy();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)}})),fy=r(((e,t)=>{var n=dy();t.exports=function(e){return n(e)||typeof e==`function`||Array.isArray(e)}})),py=r(((e,t)=>{var n=fy();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}})),my=r(((e,t)=>{var n=uy();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}})),hy=/^[a-zà-öø-ÿ]+|[A-ZÀ-ÖØ-ß][a-zà-öø-ÿ]+|[a-zà-öø-ÿ]+|[0-9]+|[A-ZÀ-ÖØ-ß]+(?![a-zà-öø-ÿ])/g,gy=/\S+/g;function _y(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 vy(e,t){let{keepSpecialCharacters:n=!1,keep:r,prefix:i=``}=t||{},a=e.trim().normalize(`NFC`),o=a.includes(` `),s=_y(a,o?gy:hy);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 yy(e){let t=e.matchAll(hy).next().value,n=t?t.index:0;return e.slice(0,n+1).toUpperCase()+e.slice(n+1).toLowerCase()}function by(e,t){return vy(e,t).reduce((e,t)=>e+yy(t),``)}function xy(e,t){return vy(e,{...t,prefix:`-`}).join(``).toLowerCase()}function Sy(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 Cy(e,t,n){return n===void 0?Sy(e,t,!1):Sy(e,n,t!==!1)}var wy=ty(),Ty=n(ly(),1),Ey=n(py(),1),Dy=n(my(),1);function Oy(e){return e}function ky(e,t,n){let r=e[t];return Ay(!By(r),n),r}function Ay(e,t){if(!e)throw new jy(t)}var jy=class extends wy.BaseError{constructor(){super(...arguments),this.name=`AssertionError`}};function My(e){return Object.entries(e)}function Ny(e){return Object.keys(e)}function Py(e){return Object.values(e)}function Fy(e,t,n){return e.includes(t,n)}function B(e){return Object.assign(Object.create(null),e)}function Iy(e){return Object.prototype.toString.call(e)}function Ly(e){return Iy(e).slice(8,-1)}function Ry(e,t){return n=>typeof n===e?t?t(n):!0:!1}function zy(e){return t=>Ly(t)===e}var By=Ry(`undefined`),Vy=Ry(`string`),Hy=Ry(`number`,e=>!Number.isNaN(e)),Uy=Ry(`function`);function Wy(e){return e===null}function Gy(e){return e===!0||e===!1}function Ky(e){if(Ly(e)!==`Object`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})}function qy(e){return e==null||/^[bns]/.test(typeof e)}function Jy(e){return Wy(e)||By(e)}function Yy(e){return!Jy(e)&&(Uy(e)||Ry(`object`)(e))}var Xy=zy(`RegExp`);function Zy(e){return zy(`Map`)(e)}function Qy(e){return zy(`Set`)(e)}function $y(e){return Yy(e)&&!Zy(e)&&!Qy(e)&&Object.keys(e).length===0}var eb=Array.isArray;function tb(e){return eb(e)&&e.length===0}function nb(e){return eb(e)&&e.length>0}function rb(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 ib(){let e=Date.now(),t=ib.last||e;return ib.last=e>t?e:t+1}ib.last=0;function ab(e=``){return`${e}${ib().toString(36)}`}function ob(e){return(0,Ey.default)(e,e=>!By(e))}function sb(e){if(!Ky(e))throw Error(`An invalid value was passed into this clone utility. Expected a plain object`);return{...e}}function cb(e,t=!1){let n=t?[...e].reverse():e,r=new Set(n);return t?[...r].reverse():[...r]}function lb(){}function ub(...e){return Ty.default.all(e,{isMergeableObject:Ky})}function db({min:e,max:t,value:n}){return n<e?e:n>t?t:n}function fb(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 pb(e,t,n){try{if(Vy(t)&&t in e)return e[t];eb(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 mb(e,t){let n=sb(t),r=n;for(let[t,i]of e.entries()){let a=t>=e.length-1,o=r[i];if(a){if(eb(r)){let e=Number.parseInt(i.toString(),10);Hy(e)&&r.splice(e,1)}else Reflect.deleteProperty(r,i);return n}if(qy(o))return n;o=eb(o)?[...o]:{...o},r[i]=o,r=o}return n}function hb(e){return t=>pb(t,e)}function gb(e,t,n=!1){let r=[],i=new Set,a=Uy(t)?t:hb(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 _b(e,t){let n=eb(e)?e[0]:e;return Hy(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 vb(e,...t){let n=t.filter(Hy);return e>=Math.min(...n)&&e<=Math.max(...n)}function yb(e){return Uy(e)?e():e}var bb=`https://remirror.io/docs/errors`,xb={[z.UNKNOWN]:`An error occurred but we're not quite sure why. 🧐`,[z.INVALID_COMMAND_ARGUMENTS]:`The arguments passed to the command method were invalid.`,[z.CUSTOM]:`This is a custom error, possibly thrown by an external library.`,[z.CORE_HELPERS]:"An error occurred in a function called from the `@remirror/core-helpers` library.",[z.MUTATION]:`Mutation of immutable value detected.`,[z.INTERNAL]:`This is an error which should not occur and is internal to the remirror codebase.`,[z.MISSING_REQUIRED_EXTENSION]:`Your editor is missing a required extension.`,[z.MANAGER_PHASE_ERROR]:`This occurs when accessing a method or property before it is available.`,[z.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.",[z.INVALID_MANAGER_ARGUMENTS]:"Invalid value(s) passed into `Manager` constructor. Only `Presets` and `Extensions` are supported.",[z.SCHEMA]:`There is a problem with the schema or you are trying to access a node / mark that doesn't exists.`,[z.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).",[z.INVALID_MANAGER_EXTENSION]:`You requested an invalid extension from the manager.`,[z.DUPLICATE_COMMAND_NAMES]:`Command method names must be unique within the editor.`,[z.DUPLICATE_HELPER_NAMES]:`Helper method names must be unique within the editor.`,[z.NON_CHAINABLE_COMMAND]:`Attempted to chain a non chainable command.`,[z.INVALID_EXTENSION]:`The provided extension is invalid.`,[z.INVALID_CONTENT]:`The content provided to the editor is not supported.`,[z.INVALID_NAME]:`An invalid name was used for the extension.`,[z.EXTENSION]:`An error occurred within an extension. More details should be made available.`,[z.EXTENSION_SPEC]:"The spec was defined without calling the `defaults`, `parse` or `dom` methods.",[z.EXTENSION_EXTRA_ATTRIBUTES]:`Extra attributes must either be a string or an object.`,[z.INVALID_SET_EXTENSION_OPTIONS]:"A call to `extension.setOptions` was made with invalid keys.",[z.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 />`.",[z.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.",[z.REACT_EDITOR_VIEW]:`A problem occurred adding the editor view to the dom.`,[z.REACT_CONTROLLED]:`There is a problem with your controlled editor setup.`,[z.REACT_NODE_VIEW]:`Something went wrong with your custom ReactNodeView Component.`,[z.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.",[z.REACT_COMPONENTS]:`An error occurred within a remirror component.`,[z.REACT_HOOKS]:`An error occurred within a remirror hook.`,[z.I18N_CONTEXT]:"You called `useI18n()` outside of an `I18nProvider` context."};function Sb(e){return Vy(e)&&Fy(Py(z),e)}function Cb(e,t){let n=xb[e];return`${n?`${n}
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 Cv(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=Cv(e[t]))&&(r&&(r+=` `),r+=n);else for(t in e)e[t]&&(r&&(r+=` `),r+=t);return r}function wv(){for(var e,t,n=0,r=``;n<arguments.length;)(e=arguments[n++])&&(t=Cv(e))&&(r&&(r+=` `),r+=t);return r}var Tv=e=>typeof e==`number`&&!isNaN(e),Ev=e=>typeof e==`string`,Dv=e=>typeof e==`function`,Ov=e=>Ev(e)||Dv(e)?e:null,kv=e=>(0,N.isValidElement)(e)||Ev(e)||Dv(e)||Tv(e);function Av(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 jv(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?Av(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 Mv(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 Nv={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)})}},Pv=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})},Fv={info:function(e){return N.createElement(Pv,{...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(Pv,{...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(Pv,{...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(Pv,{...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 Kne(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(!kv(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:Ov(c.className||h.toastClassName),bodyClassName:Ov(c.bodyClassName||h.bodyClassName),progressClassName:Ov(c.progressClassName||h.progressClassName),autoClose:!c.isLoading&&(y=c.autoClose,b=h.autoClose,!1===y||Tv(y)&&y>0?y:b),deleteToast(){let e=Mv(a.get(d),`removed`);a.delete(d),Nv.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||(Dv(i)?a=i(o):(0,N.isValidElement)(i)?a=(0,N.cloneElement)(i,o):Ev(i)||Tv(i)?a=i:r?a=Fv.spinner():(e=>e in Fv)(n)&&(a=Fv[n](o))),a}(v),Dv(c.onOpen)&&(v.onOpen=c.onOpen),Dv(c.onClose)&&(v.onClose=c.onClose),v.closeButton=h.closeButton,!1===c.closeButton||kv(c.closeButton)?v.closeButton=c.closeButton:!0===c.closeButton&&(v.closeButton=!kv(h.closeButton)||h.closeButton);let x=e;(0,N.isValidElement)(e)&&!Ev(e.type)?x=(0,N.cloneElement)(e,{closeToast:g,toastProps:v,data:m}):Dv(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}):Tv(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)),Nv.emit(4,Mv(o,o.props.updateId==null?`added`:`updated`))}return(0,N.useEffect)(()=>(s.containerId=e.containerId,Nv.cancelEmit(3).on(0,d).on(1,e=>i.current&&l(e)).on(5,c).emit(2,s),()=>{a.clear(),Nv.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 Iv(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function Lv(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function Rv(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=Iv(t.nativeEvent),o.y=Lv(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=Iv(n),o.y=Lv(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}),Dv(e.onOpen)&&e.onOpen((0,N.isValidElement)(e.children)&&e.children.props),()=>{let e=s.current;Dv(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 zv(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 Bv(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=wv(`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=Dv(o)?o({rtl:u,type:i,defaultClassName:h}):wv(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 Vv=e=>{let{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:i}=Rv(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=wv(`Toastify__toast`,`Toastify__toast-theme--${A}`,`Toastify__toast--${l}`,{"Toastify__toast--rtl":C},{"Toastify__toast--close-on-click":k}),j=Dv(m)?m({rtl:C,position:p,type:l,defaultClassName:ee}):wv(ee,m),te=!!S||!s,ne={closeToast:d,type:l,theme:A},re=null;return!1===a||(re=Dv(a)?a(ne):(0,N.isValidElement)(a)?(0,N.cloneElement)(a,ne):zv(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:Dv(g)?g({type:l}):wv(`Toastify__toast-body`,g),style:_},O!=null&&N.createElement(`div`,{className:wv(`Toastify__toast-icon`,{"Toastify--animate-icon Toastify__zoom-enter":!D})},O),N.createElement(`div`,null,o)),re,N.createElement(Bv,{...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})))},Hv=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},Uv=jv(Hv(`bounce`,!0));jv(Hv(`slide`,!0)),jv(Hv(`zoom`)),jv(Hv(`flip`));var Wv=(0,N.forwardRef)((e,t)=>{let{getToastToRender:n,containerRef:r,isToastActive:i}=Kne(e),{className:a,style:o,rtl:s,containerId:c}=e;function l(e){let t=wv(`Toastify__toast-container`,`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":s});return Dv(a)?a({position:e,rtl:s,defaultClassName:t}):wv(t,Ov(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(Vv,{...a,isIn:i(a.toastId),style:{...a.style,"--nth":n+1,"--len":t.length},key:`toast-${a.key}`},r)}))}))});Wv.displayName=`ToastContainer`,Wv.defaultProps={position:`top-right`,transition:Uv,autoClose:5e3,closeButton:zv,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:`x`,role:`alert`,theme:`light`};var Gv,Kv=new Map,qv=[],Jv=1;function Yv(){return``+ Jv++}function Xv(e){return e&&(Ev(e.toastId)||Tv(e.toastId))?e.toastId:Yv()}function Zv(e,t){return Kv.size>0?Nv.emit(0,e,t):qv.push({content:e,options:t}),t.toastId}function Qv(e,t){return{...t,type:t&&t.type||e,toastId:Xv(t)}}function $v(e){return(t,n)=>Zv(t,Qv(e,n))}function ey(e,t){return Zv(e,Qv(`default`,t))}ey.loading=(e,t)=>Zv(e,Qv(`default`,{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ey.promise=function(e,t,n){let r,{pending:i,error:a,success:o}=t;i&&(r=Ev(i)?ey.loading(i,n):ey.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 ey.dismiss(r);let a={type:e,...s,...n,data:i},o=Ev(t)?{render:t}:t;return r?ey.update(r,{...a,...o}):ey(o.render,{...a,...o}),i},l=Dv(e)?e():e;return l.then(e=>c(`success`,o,e)).catch(e=>c(`error`,a,e)),l},ey.success=$v(`success`),ey.info=$v(`info`),ey.error=$v(`error`),ey.warning=$v(`warning`),ey.warn=ey.warning,ey.dark=(e,t)=>Zv(e,Qv(`default`,{theme:`dark`,...t})),ey.dismiss=e=>{Kv.size>0?Nv.emit(1,e):qv=qv.filter(t=>e!=null&&t.options.toastId!==e)},ey.clearWaitingQueue=function(e){return e===void 0&&(e={}),Nv.emit(5,e)},ey.isActive=e=>{let t=!1;return Kv.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},ey.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{let n=function(e,t){let{containerId:n}=t,r=Kv.get(n||Gv);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:Yv()};a.toastId!==e&&(a.staleId=e);let o=a.render||i;delete a.render,Zv(o,a)}},0)},ey.done=e=>{ey.update(e,{progress:1})},ey.onChange=e=>(Nv.on(4,e),()=>{Nv.off(4,e)}),ey.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`},ey.TYPE={INFO:`info`,SUCCESS:`success`,WARNING:`warning`,ERROR:`error`,DEFAULT:`default`},Nv.on(2,e=>{Gv=e.containerId||e,Kv.set(Gv,e),qv.forEach(e=>{Nv.emit(0,e.content,e.options)}),qv=[]}).on(3,e=>{Kv.delete(e.containerId||e),Kv.size===0&&Nv.off(0).off(1).off(5)});var ty=i(((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})),ny=`ProseMirror-selectednode`;`${ny}`;var ry=`__state_override__`,iy={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`},ay=Symbol.for(`__remirror__`),oy=(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))(oy||{}),sy=(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))(sy||{}),cy=(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))(cy||{}),R=(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))(R||{}),z=(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))(z||{}),ly=i(((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})),uy=i(((e,t)=>{t.exports=function(e){return typeof e==`object`&&!!e&&Array.isArray(e)===!1}})),dy=i(((e,t)=>{var n=uy();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)}})),fy=i(((e,t)=>{var n=dy();t.exports=function(e){return n(e)||typeof e==`function`||Array.isArray(e)}})),py=i(((e,t)=>{var n=fy();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}})),my=i(((e,t)=>{var n=uy();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}})),hy=/^[a-zà-öø-ÿ]+|[A-ZÀ-ÖØ-ß][a-zà-öø-ÿ]+|[a-zà-öø-ÿ]+|[0-9]+|[A-ZÀ-ÖØ-ß]+(?![a-zà-öø-ÿ])/g,gy=/\S+/g;function _y(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 vy(e,t){let{keepSpecialCharacters:n=!1,keep:r,prefix:i=``}=t||{},a=e.trim().normalize(`NFC`),o=a.includes(` `),s=_y(a,o?gy:hy);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 yy(e){let t=e.matchAll(hy).next().value,n=t?t.index:0;return e.slice(0,n+1).toUpperCase()+e.slice(n+1).toLowerCase()}function by(e,t){return vy(e,t).reduce((e,t)=>e+yy(t),``)}function xy(e,t){return vy(e,{...t,prefix:`-`}).join(``).toLowerCase()}function Sy(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 Cy(e,t,n){return n===void 0?Sy(e,t,!1):Sy(e,n,t!==!1)}var wy=ty(),Ty=e(ly(),1),Ey=e(py(),1),Dy=e(my(),1);function Oy(e){return e}function ky(e,t,n){let r=e[t];return Ay(!By(r),n),r}function Ay(e,t){if(!e)throw new jy(t)}var jy=class extends wy.BaseError{constructor(){super(...arguments),this.name=`AssertionError`}};function My(e){return Object.entries(e)}function Ny(e){return Object.keys(e)}function Py(e){return Object.values(e)}function Fy(e,t,n){return e.includes(t,n)}function B(e){return Object.assign(Object.create(null),e)}function Iy(e){return Object.prototype.toString.call(e)}function Ly(e){return Iy(e).slice(8,-1)}function Ry(e,t){return n=>typeof n===e?t?t(n):!0:!1}function zy(e){return t=>Ly(t)===e}var By=Ry(`undefined`),Vy=Ry(`string`),Hy=Ry(`number`,e=>!Number.isNaN(e)),Uy=Ry(`function`);function Wy(e){return e===null}function Gy(e){return e===!0||e===!1}function Ky(e){if(Ly(e)!==`Object`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})}function qy(e){return e==null||/^[bns]/.test(typeof e)}function Jy(e){return Wy(e)||By(e)}function Yy(e){return!Jy(e)&&(Uy(e)||Ry(`object`)(e))}var Xy=zy(`RegExp`);function Zy(e){return zy(`Map`)(e)}function Qy(e){return zy(`Set`)(e)}function $y(e){return Yy(e)&&!Zy(e)&&!Qy(e)&&Object.keys(e).length===0}var eb=Array.isArray;function tb(e){return eb(e)&&e.length===0}function nb(e){return eb(e)&&e.length>0}function rb(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 ib(){let e=Date.now(),t=ib.last||e;return ib.last=e>t?e:t+1}ib.last=0;function ab(e=``){return`${e}${ib().toString(36)}`}function ob(e){return(0,Ey.default)(e,e=>!By(e))}function sb(e){if(!Ky(e))throw Error(`An invalid value was passed into this clone utility. Expected a plain object`);return{...e}}function cb(e,t=!1){let n=t?[...e].reverse():e,r=new Set(n);return t?[...r].reverse():[...r]}function lb(){}function ub(...e){return Ty.default.all(e,{isMergeableObject:Ky})}function db({min:e,max:t,value:n}){return n<e?e:n>t?t:n}function fb(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 pb(e,t,n){try{if(Vy(t)&&t in e)return e[t];eb(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 mb(e,t){let n=sb(t),r=n;for(let[t,i]of e.entries()){let a=t>=e.length-1,o=r[i];if(a){if(eb(r)){let e=Number.parseInt(i.toString(),10);Hy(e)&&r.splice(e,1)}else Reflect.deleteProperty(r,i);return n}if(qy(o))return n;o=eb(o)?[...o]:{...o},r[i]=o,r=o}return n}function hb(e){return t=>pb(t,e)}function gb(e,t,n=!1){let r=[],i=new Set,a=Uy(t)?t:hb(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 _b(e,t){let n=eb(e)?e[0]:e;return Hy(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 vb(e,...t){let n=t.filter(Hy);return e>=Math.min(...n)&&e<=Math.max(...n)}function yb(e){return Uy(e)?e():e}var bb=`https://remirror.io/docs/errors`,xb={[z.UNKNOWN]:`An error occurred but we're not quite sure why. 🧐`,[z.INVALID_COMMAND_ARGUMENTS]:`The arguments passed to the command method were invalid.`,[z.CUSTOM]:`This is a custom error, possibly thrown by an external library.`,[z.CORE_HELPERS]:"An error occurred in a function called from the `@remirror/core-helpers` library.",[z.MUTATION]:`Mutation of immutable value detected.`,[z.INTERNAL]:`This is an error which should not occur and is internal to the remirror codebase.`,[z.MISSING_REQUIRED_EXTENSION]:`Your editor is missing a required extension.`,[z.MANAGER_PHASE_ERROR]:`This occurs when accessing a method or property before it is available.`,[z.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.",[z.INVALID_MANAGER_ARGUMENTS]:"Invalid value(s) passed into `Manager` constructor. Only `Presets` and `Extensions` are supported.",[z.SCHEMA]:`There is a problem with the schema or you are trying to access a node / mark that doesn't exists.`,[z.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).",[z.INVALID_MANAGER_EXTENSION]:`You requested an invalid extension from the manager.`,[z.DUPLICATE_COMMAND_NAMES]:`Command method names must be unique within the editor.`,[z.DUPLICATE_HELPER_NAMES]:`Helper method names must be unique within the editor.`,[z.NON_CHAINABLE_COMMAND]:`Attempted to chain a non chainable command.`,[z.INVALID_EXTENSION]:`The provided extension is invalid.`,[z.INVALID_CONTENT]:`The content provided to the editor is not supported.`,[z.INVALID_NAME]:`An invalid name was used for the extension.`,[z.EXTENSION]:`An error occurred within an extension. More details should be made available.`,[z.EXTENSION_SPEC]:"The spec was defined without calling the `defaults`, `parse` or `dom` methods.",[z.EXTENSION_EXTRA_ATTRIBUTES]:`Extra attributes must either be a string or an object.`,[z.INVALID_SET_EXTENSION_OPTIONS]:"A call to `extension.setOptions` was made with invalid keys.",[z.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 />`.",[z.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.",[z.REACT_EDITOR_VIEW]:`A problem occurred adding the editor view to the dom.`,[z.REACT_CONTROLLED]:`There is a problem with your controlled editor setup.`,[z.REACT_NODE_VIEW]:`Something went wrong with your custom ReactNodeView Component.`,[z.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.",[z.REACT_COMPONENTS]:`An error occurred within a remirror component.`,[z.REACT_HOOKS]:`An error occurred within a remirror hook.`,[z.I18N_CONTEXT]:"You called `useI18n()` outside of an `I18nProvider` context."};function Sb(e){return Vy(e)&&Fy(Py(z),e)}function Cb(e,t){let n=xb[e];return`${n?`${n}
32
32
 
33
33
  `:``}${t?`${t}
34
34
 
@@ -36,11 +36,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
36
36
  `)}};nx.empty=new nx(!0);var rx=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 ix(e){let t=[];do t.push(ax(e));while(e.eat(`|`));return t.length==1?t[0]:{type:`choice`,exprs:t}}function ax(e){let t=[];do t.push(ox(e));while(e.next&&e.next!=`)`&&e.next!=`|`);return t.length==1?t[0]:{type:`seq`,exprs:t}}function ox(e){let t=ux(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=cx(e,t);else break;return t}function sx(e){/\D/.test(e.next)&&e.err(`Expected number, got '`+e.next+`'`);let t=Number(e.next);return e.pos++,t}function cx(e,t){let n=sx(e),r=n;return e.eat(`,`)&&(r=e.next==`}`?-1:sx(e)),e.eat(`}`)||e.err(`Unclosed braced range`),{type:`range`,min:n,max:r,expr:t}}function lx(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 ux(e){if(e.eat(`(`)){let t=ix(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=lx(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 dx(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 fx(e,t){return t-e}function px(e,t){let n=[];return r(t),n.sort(fx);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 mx(e){let t=Object.create(null);return n(px(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]);px(e,n).forEach(e=>{r||i.push([t,r=[]]),r.indexOf(e)==-1&&r.push(e)})})});let a=t[r.join(`,`)]=new nx(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort(fx);a.next.push({type:i[e][0],next:t[r.join(`,`)]||n(r)})}return a}}function hx(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 gx(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 _x(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 vx(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 yx(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new Sx(e,r,t[r]);return n}var bx=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=yx(e,n.attrs),this.defaultAttrs=gx(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==nx.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:_x(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error(`NodeType.create can't construct text nodes`);return new $b(this,this.computeAttrs(e),H.from(t),Nb.setFrom(n))}createChecked(e=null,t,n){return t=H.from(t),this.checkContent(t),new $b(this,this.computeAttrs(e),t,Nb.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=H.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(H.empty,!0);return i?new $b(this,e,t.append(i),Nb.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){vx(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:Nb.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 xx(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 Sx=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,`default`),this.default=n.default,this.validate=typeof n.validate==`string`?xx(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}},Cx=class e{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=yx(e,r.attrs),this.excluded=null;let i=gx(this.attrs);this.instance=i?new Nb(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Nb(this,_x(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){vx(this.attrs,e,`mark`,this.name)}excludes(e){return this.excluded.indexOf(e)>-1}},wx=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=Db.from(e.nodes),t.marks=Db.from(e.marks||{}),this.nodes=bx.compile(this.spec.nodes,this),this.marks=Cx.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]=nx.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?Tx(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==``?[]:Tx(this,n.split(` `))}this.nodeFromJSON=e=>$b.fromJSON(this,e),this.markFromJSON=e=>Nb.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 bx))throw RangeError(`Invalid node type: `+e);else if(e.schema!=this)throw RangeError(`Node type from different schema used (`+e.name+`)`);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new ex(n,n.defaultAttrs,e,Nb.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 Tx(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 Ex(e){return e.tag!=null}function Dx(e){return e.style!=null}var Ox=class e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(Ex(e))this.tags.push(e);else if(Dx(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 Lx(this,t,!1);return n.addAll(e,Nb.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Lx(this,t,!0);return n.addAll(e,Nb.none,t.from,t.to),U.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(zx(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=Bx(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=Bx(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)))}},kx={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},Ax={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},jx={ol:!0,ul:!0},Mx=1,Nx=2,Px=4;function Fx(e,t,n){return t==null?e&&e.whitespace==`pre`?Mx|Nx:n&~Px:(t?Mx:0)|(t===`full`?Nx:0)}var Ix=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=Nb.none,this.match=i||(a&Px?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(H.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&Mx)){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=H.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(H.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&&!kx.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},Lx=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=Fx(null,t.preserveWhitespace,0)|(n?Px:0);i=r?new Ix(r.type,r.attrs,Nb.none,!0,t.topMatch||r.type.contentMatch,a):n?new Ix(null,null,Nb.none,!0,null,a):new Ix(e.schema.topNodeType,null,Nb.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&Nx?`full`:this.localPreserveWS||(r.options&Mx)>0,{schema:a}=this.parser;if(i===`full`||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(!i){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))}}else if(i===`full`)n=n.replace(/\r\n?/g,`
37
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,` `);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;jx.hasOwnProperty(a)&&this.parser.normalizeLists&&Rx(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));out:if(s?s.ignore:Ax.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(kx.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
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=Nb.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):Vx(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=Fx(e,i,a.options);a.options&Px&&a.content.length==0&&(o|=Px);let s=Nb.none;return n=n.filter(t=>(a.type?a.type.allowsMarkType(t.type):Vx(t.type,e))?(s=t.addToSet(s),!1):!0),this.nodes.push(new Ix(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|=Mx);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 Rx(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=t.nodeType==1?t.nodeName.toLowerCase():null;e&&jx.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):e==`li`?n=t:e&&(n=null)}}function zx(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Bx(e){let t={};for(let n in e)t[n]=e[n];return t}function Vx(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 Hx=class e{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||=Wx(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}=Jx(Wx(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&&Jx(Wx(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return Jx(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=Ux(e.nodes);return t.text||=e=>e.text,t}static marksFromSchema(e){return Ux(e.marks)}};function Ux(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Wx(e){return e.document||window.document}var Gx=new WeakMap;function Kx(e){let t=Gx.get(e);return t===void 0&&Gx.set(e,t=qx(e)),t}function qx(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 Jx(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=Kx(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)){u=2;for(let e in 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}=Jx(e,a,n,r);if(c.appendChild(t),i){if(s)throw RangeError(`Multiple content holes`);s=i}}}return{dom:c,contentDOM:s}}var Yx=65535,Xx=2**16;function Zx(e,t){return e+t*Xx}function Qx(e){return e&Yx}function $x(e){return(e-(e&Yx))/Xx}var eS=1,tS=2,nS=4,rS=8,iS=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&rS)>0}get deletedBefore(){return(this.delInfo&(eS|nS))>0}get deletedAfter(){return(this.delInfo&(tS|nS))>0}get deletedAcross(){return(this.delInfo&nS)>0}},aS=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=Qx(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+$x(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:Zx(o/3,e-s),f=e==s?tS:e==u?eS:nS;return(t<0?e!=s:e!=u)&&(f|=rS),new iS(a,f,d)}r+=l-c}return n?e+r:new iS(e+r,0,null)}touches(e,t){let n=0,r=Qx(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])}};aS.empty=new aS([]);var oS=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 iS(e,r,null)}},sS=Object.create(null),cS=class{getMap(){return aS.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError(`Invalid input for Step.fromJSON`);let n=sS[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in sS)throw RangeError(`Duplicate use of step JSON ID `+e);return sS[e]=t,t.prototype.jsonID=e,t}},lS=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 Pb)return e.fail(t.message);throw t}}};function uS(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let a=e.child(i);a.content.size&&(a=a.copy(uS(a.content,t,a))),a.isInline&&(a=t(a,n,i)),r.push(a)}return H.fromArray(r)}var dS=class e extends cS{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 U(uS(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 lS.fromReplace(e,this.from,this.to,i)}invert(){return new fS(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))}};cS.jsonID(`addMark`,dS);var fS=class e extends cS{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 U(uS(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return lS.fromReplace(e,this.from,this.to,n)}invert(){return new dS(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))}};cS.jsonID(`removeMark`,fS);var pS=class e extends cS{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return lS.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return lS.fromReplace(e,this.pos,this.pos+1,new U(H.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 mS(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))}};cS.jsonID(`addNodeMark`,pS);var mS=class e extends cS{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return lS.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return lS.fromReplace(e,this.pos,this.pos+1,new U(H.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new pS(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))}};cS.jsonID(`removeNodeMark`,mS);var hS=class e extends cS{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&_S(e,this.from,this.to)?lS.fail(`Structure replace would overwrite content`):lS.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new aS([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?U.empty:new U(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?U.empty:new U(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,U.fromJSON(t,n.slice),!!n.structure)}};cS.jsonID(`replace`,hS);var gS=class e extends cS{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&&(_S(e,this.from,this.gapFrom)||_S(e,this.gapTo,this.to)))return lS.fail(`Structure gap-replace would overwrite content`);let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return lS.fail(`Gap is not a flat range`);let n=this.slice.insertAt(this.insert,t.content);return n?lS.fromReplace(e,this.from,this.to,n):lS.fail(`Content does not fit in gap`)}getMap(){return new aS([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,U.fromJSON(t,n.slice),n.insert,!!n.structure)}};cS.jsonID(`replaceAround`,gS);function _S(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 qne(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 fS(l,d,u[e])));s&&s.to==l?s.to=d:a.push(s=new dS(l,d,r))}}),i.forEach(t=>e.step(t)),a.forEach(t=>e.step(t))}function Jne(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 Cx){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 fS(t.from,t.to,t.style)))}function vS(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 hS(s,l,U.empty));else{r=u;for(let t=0;t<c.marks.length;t++)n.allowsMarkType(c.marks[t].type)||e.step(new fS(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 U(H.from(n.schema.text(` `,n.allowedMarks(c.marks))),0,0),o.push(new hS(s+e.index,s+e.index+e[0].length,r))}}s=l}if(!r.validEnd){let t=r.fillBefore(H.empty,!0);e.replace(s,s,new U(t,0,0))}for(let t=o.length-1;t>=0;t--)e.step(o[t])}function Yne(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function yS(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||!Yne(a,o,s))break;o&&(r=1),s<a.childCount&&(i=1)}return null}function Xne(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=H.empty,d=0;for(let e=a,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,u=H.from(r.node(e).copy(u)),d++):c--;let f=H.empty,p=0;for(let e=a,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,f=H.from(i.node(e).copy(f)),p++):l++;e.step(new gS(c,l,o,s,new U(u.append(f),d,p),u.size-d,!0))}function bS(e,t,n=null,r=e){let i=Zne(e,t),a=i&&Qne(r,t);return a?i.map(xS).concat({type:t,attrs:n}).concat(a.map(xS)):null}function xS(e){return{type:e,attrs:null}}function Zne(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 Qne(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 $ne(e,t,n){let r=H.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=H.from(n[e].type.create(n[e].attrs,r))}let i=t.start,a=t.end;e.step(new gS(i,a,i,a,new U(r,0,0),n.length,!0))}function ere(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)&&tre(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&&CS(e,t,n,a),vS(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 gS(c,l,c+1,l-1,new U(H.from(r.create(o,null,t.marks)),0,0),1,!0)),i===!0&&SS(e,t,n,a),!1}})}function SS(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 CS(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 tre(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function nre(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 gS(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new U(H.from(o),0,0),1,!0))}function wS(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 rre(e,t,n=1,r){let i=e.doc.resolve(t),a=H.empty,o=H.empty;for(let e=i.depth,t=i.depth-n,s=n-1;e>t;e--,s--){a=H.from(i.node(e).copy(a));let t=r&&r[s];o=H.from(t?t.type.create(t.attrs,o):i.node(e).copy(o))}e.step(new hS(t,t,new U(a.append(o),n,n),!0))}function TS(e,t){let n=e.resolve(t),r=n.index();return are(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function ire(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 are(e,t){return!!(e&&t&&!e.isLeaf&&ire(e,t))}function ore(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);CS(e,r.node(),r.before(),s)}o.inlineContent&&vS(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 hS(l,c.map(t+n,-1),U.empty,!0)),r===!0){let t=e.doc.resolve(l);SS(e,t.node(),t.before(),e.steps.length)}return e}function sre(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 cre(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 ES(e,t,n=t,r=U.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),a=e.resolve(n);return DS(i,a,r)?new hS(t,n,r):new lre(i,a,r).fit()}function DS(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var lre=class{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=H.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=H.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 U(i,a,o);return e>-1?new gS(n.pos,e,this.$to.pos,this.$to.end(),s,t):s.size||n.pos!=this.$to.pos?new hS(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=AS(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(H.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=AS(e,t);return!r.childCount||r.firstChild.isLeaf?!1:(this.unplaced=new U(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=AS(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new U(OS(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new U(OS(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(jS(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=kS(this.placed,t,H.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?U.empty:new U(OS(a.content,e-1,1),e-1,f<0?a.openEnd:e-1):new U(OS(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||!MS(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=MS(e,t,r,n,i);if(a){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=MS(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=kS(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=kS(this.placed,this.depth,H.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(H.empty,!0);e.childCount&&(this.placed=kS(this.placed,this.frontier.length,e))}};function OS(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(OS(e.firstChild.content,t-1,n)))}function kS(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(kS(e.lastChild.content,t-1,n)))}function AS(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function jS(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,jS(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(H.empty,!0)))),e.copy(r)}function MS(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&&!NS(n,a.content,o)?s:null}function NS(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function PS(e){return e.spec.defining||e.spec.definingForContent}function FS(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),a=e.doc.resolve(n);if(DS(i,a,r))return e.step(new hS(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=PS(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 U(IS(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 IS(e,t,n,r,i){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy(IS(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(H.empty,!0))}return e}function LS(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=sre(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new U(H.from(r),0,0))}function RS(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 BS=class e extends cS{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 lS.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 lS.fromReplace(e,this.pos,this.pos+1,new U(H.from(r),0,t.isLeaf?0:1))}getMap(){return aS.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)}};cS.jsonID(`attr`,BS);var VS=class e extends cS{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 lS.ok(n)}getMap(){return aS.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)}};cS.jsonID(`docAttr`,VS);var HS=class extends Error{};HS=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},HS.prototype=Object.create(Error.prototype),HS.prototype.constructor=HS,HS.prototype.name=`TransformError`;var US=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new oS}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new HS(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=U.empty){let r=ES(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new U(H.from(n),0,0))}delete(e,t){return this.replace(e,t,U.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return FS(this,e,t,n),this}replaceRangeWith(e,t,n){return LS(this,e,t,n),this}deleteRange(e,t){return RS(this,e,t),this}lift(e,t){return Xne(this,e,t),this}join(e,t=1){return ore(this,e,t),this}wrap(e,t){return $ne(this,e,t),this}setBlockType(e,t=e,n,r=null){return ere(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return nre(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new BS(e,t,n)),this}setDocAttribute(e,t){return this.step(new VS(e,t)),this}addNodeMark(e,t){return this.step(new pS(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError(`No node at position `+e);if(t instanceof Nb)t.isInSet(n.marks)&&this.step(new mS(e,t));else{let r=n.marks,i,a=[];for(;i=t.isInSet(r);)a.push(new mS(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 rre(this,e,t,n),this}addMark(e,t,n){return qne(this,e,t,n),this}removeMark(e,t,n){return Jne(this,e,t,n),this}clearIncompatible(e,t,n){return vS(this,e,t,n),this}},WS=Object.create(null),GS=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new KS(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=U.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?U.empty:t),o==0&&nC(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),nC(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new YS(e):tC(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?tC(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):tC(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 $S(e.node(0))}static atStart(e){return tC(e,e,0,0,1)||new $S(e)}static atEnd(e){return tC(e,e,e.content.size,e.childCount,-1)||new $S(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError(`Invalid input for Selection.fromJSON`);let n=WS[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in WS)throw RangeError(`Duplicate use of selection JSON ID `+e);return WS[e]=t,t.prototype.jsonID=e,t}getBookmark(){return YS.between(this.$anchor,this.$head).getBookmark()}};GS.prototype.visible=!0;var KS=class{constructor(e,t){this.$from=e,this.$to=t}},qS=!1;function JS(e){!qS&&!e.parent.inlineContent&&(qS=!0,console.warn(`TextSelection endpoint not pointing into a node with inline content (`+e.parent.type.name+`)`))}var YS=class e extends GS{constructor(e,t=e){JS(e),JS(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 GS.near(r);let i=t.resolve(n.map(this.anchor));return new e(i.parent.inlineContent?i:r,r)}replace(e,t=U.empty){if(super.replace(e,t),t==U.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 XS(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=GS.findFrom(n,r,!0)||GS.findFrom(n,-r,!0);if(e)n=e.$head;else return GS.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(GS.findFrom(t,-r,!0)||GS.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new e(t,n)}};GS.jsonID(`text`,YS);var XS=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 YS.between(e.resolve(this.anchor),e.resolve(this.head))}},ZS=class e extends GS{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?GS.near(a):new e(a)}content(){return new U(H.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 QS(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}};ZS.prototype.visible=!1,GS.jsonID(`node`,ZS);var QS=class e{constructor(e){this.anchor=e}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new XS(r,r):new e(r)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&ZS.isSelectable(n)?new ZS(t):GS.near(t)}},$S=class e extends GS{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=U.empty){if(t==U.empty){e.delete(0,e.doc.content.size);let t=GS.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 eC}};GS.jsonID(`all`,$S);var eC={map(){return this},resolve(e){return new $S(e)}};function tC(e,t,n,r,i,a=!1){if(t.inlineContent)return YS.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){let t=tC(e,r,n+i,i<0?r.childCount:0,i,a);if(t)return t}else if(!a&&ZS.isSelectable(r))return ZS.create(e,n-(i<0?r.nodeSize:0));n+=r.nodeSize*i}return null}function nC(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof hS||i instanceof gS))return;let a=e.mapping.maps[r],o;a.forEach((e,t,n,r)=>{o??=r}),e.setSelection(GS.near(e.doc.resolve(o),n))}var rC=1,iC=2,aC=4,oC=class extends US{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|rC)&~iC,this.storedMarks=null,this}get selectionSet(){return(this.updated&rC)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=iC,this}ensureMarks(e){return Nb.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&iC)>0}addStep(e,t){super.addStep(e,t),this.updated&=~iC,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)||Nb.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(GS.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|=aC,this}get scrolledIntoView(){return(this.updated&aC)>0}};function sC(e,t){return!t||!e?e:e.bind(t)}var cC=class{constructor(e,t,n){this.name=e,this.init=sC(t.init,n),this.apply=sC(t.apply,n)}},lC=[new cC(`doc`,{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new cC(`selection`,{init(e,t){return e.selection||GS.atStart(t.doc)},apply(e){return e.selection}}),new cC(`storedMarks`,{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new cC(`scrollToSelection`,{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],uC=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=lC.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 cC(e.key,e.spec.state,e))})}},dC=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 oC(this)}static create(t){let n=new uC(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 uC(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 uC(t.schema,t.plugins),a=new e(i);return i.fields.forEach(e=>{if(e.name==`doc`)a.doc=$b.fromJSON(t.schema,n.doc);else if(e.name==`selection`)a.selection=GS.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 fC(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r==`handleDOMEvents`&&(i=fC(i,t,{})),n[r]=i}return n}var pC=class{constructor(e){this.spec=e,this.props={},e.props&&fC(e.props,this,this.props),this.key=e.key?e.key.key:hC(`plugin`)}getState(e){return e[this.key]}},mC=Object.create(null);function hC(e){return e in mC?e+`$`+ ++mC[e]:(mC[e]=0,e+`$`)}var gC=class{constructor(e=`key`){this.key=hC(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}};function _C(){return typeof document<`u`?document:null}var vC=r(((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})),yC=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.`}}),bC=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.`}}),xC=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.`}}),SC=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.`}}),CC=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.`}}),wC=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.`}}),TC=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.`}}),EC=class{constructor(e,t,n={}){this.match=e,this.match=e,this.handler=typeof t==`string`?DC(t):t,this.undoable=n.undoable!==!1,this.inCode=n.inCode||!1,this.inCodeMark=n.inCodeMark!==!1}};function DC(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 OC=500;function kC({rules:e}){let t=new pC({state:{init(){return null},apply(e,t){return e.getMeta(this)||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput(n,r,i,a){return AC(n,r,i,a,e,t)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&AC(n,r.pos,r.pos,``,e,t)})}}},isInputRules:!0});return t}function AC(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-OC),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 jC=(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 EC(/--$/,`—`,{inCodeMark:!1}),new EC(/\.\.\.$/,`…`,{inCodeMark:!1}),new EC(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,`“`,{inCodeMark:!1}),new EC(/"$/,`”`,{inCodeMark:!1}),new EC(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,`‘`,{inCodeMark:!1}),new EC(/'$/,`’`,{inCodeMark:!1});function MC(e,t,n=null,r){return new EC(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&&bS(l,t,s);if(!u)return null;c.wrap(l,u);let d=c.doc.resolve(a-1).nodeBefore;return d&&d.type==t&&TS(c.doc,a-1)&&(!r||r(i,d))&&c.join(a-1),c})}var NC=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},PC=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},FC=null,IC=function(e,t,n){let r=FC||=document.createRange();return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},LC=function(){FC=null},RC=function(e,t,n,r){return n&&(BC(e,t,n,r,-1)||BC(e,t,n,r,1))},zC=/^(img|br|input|textarea|hr)$/i;function BC(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:VC(e))){let n=e.parentNode;if(!n||n.nodeType!=1||GC(e)||zC.test(e.nodeName)||e.contentEditable==`false`)return!1;t=NC(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?VC(e):0}else return!1}}function VC(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function HC(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=VC(e)}else if(e.parentNode&&!GC(e))t=NC(e),e=e.parentNode;else return null}}function UC(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&&!GC(e))t=NC(e)+1,e=e.parentNode;else return null}}function WC(e,t,n){for(let r=t==0,i=t==VC(e);r||i;){if(e==n)return!0;let t=NC(e);if(e=e.parentNode,!e)return!1;r&&=t==0,i&&=t==VC(e)}}function GC(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 KC=function(e){return e.focusNode&&RC(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function qC(e,t){let n=document.createEvent(`Event`);return n.initEvent(`keydown`,!0,!0),n.keyCode=e,n.key=n.code=t,n}function JC(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function YC(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(VC(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(VC(r.startContainer),r.startOffset)}}}var XC=typeof navigator<`u`?navigator:null,ZC=typeof document<`u`?document:null,QC=XC&&XC.userAgent||``,$C=/Edge\/(\d+)/.exec(QC),ew=/MSIE \d/.exec(QC),tw=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(QC),nw=!!(ew||tw||$C),rw=ew?document.documentMode:tw?+tw[1]:$C?+$C[1]:0,iw=!nw&&/gecko\/(\d+)/i.test(QC);iw&&+(/Firefox\/(\d+)/.exec(QC)||[0,0])[1];var aw=!nw&&/Chrome\/(\d+)/.exec(QC),ow=!!aw,sw=aw?+aw[1]:0,cw=!nw&&!!XC&&/Apple Computer/.test(XC.vendor),lw=cw&&(/Mobile\/\w+/.test(QC)||!!XC&&XC.maxTouchPoints>2),uw=lw||(XC?/Mac/.test(XC.platform):!1),dw=XC?/Win/.test(XC.platform):!1,fw=/Android \d/.test(QC),pw=!!ZC&&`webkitFontSmoothing`in ZC.documentElement.style,mw=pw?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function hw(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 gw(e,t){return typeof e==`number`?e:e[t]}function _w(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 vw(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=PC(o);continue}let e=o,n=e==a.body,s=n?hw(a):_w(e),c=0,l=0;if(t.top<s.top+gw(r,`top`)?l=-(s.top-t.top+gw(i,`top`)):t.bottom>s.bottom-gw(r,`bottom`)&&(l=t.bottom-t.top>s.bottom-s.top?t.top+gw(i,`top`)-s.top:t.bottom-s.bottom+gw(i,`bottom`)),t.left<s.left+gw(r,`left`)?c=-(s.left-t.left+gw(i,`left`)):t.right>s.right-gw(r,`right`)&&(c=t.right-s.right+gw(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:PC(o)}}function yw(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:bw(e.dom)}}function bw(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=PC(r));return t}function xw({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;Sw(n,r==0?0:r-t)}function Sw(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 Cw=null;function ww(e){if(e.setActive)return e.setActive();if(Cw)return e.focus(Cw);let t=bw(e);e.focus(Cw==null?{get preventScroll(){return Cw={preventScroll:!0},!0}}:void 0),Cw||(Cw=!1,Sw(t,0))}function Tw(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=IC(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?Ew(n,i):!n||r&&n.nodeType==1?{node:e,offset:a}:Tw(n,i)}function Ew(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=Pw(r,1);if(n.top!=n.bottom&&Dw(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 Dw(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Ow(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function kw(e,t,n){let{node:r,offset:i}=Tw(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 Aw(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 jw(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(Dw(t,i))return jw(n,t,i)}}if((a=(a+1)%r)==i)break}return e}function Mw(e,t){let n=e.dom.ownerDocument,r,i=0,a=YC(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(!Dw(t,n)||(o=jw(e.dom,t,n),!o))return null}if(cw)for(let e=o;r&&e;e=PC(e))e.draggable&&(r=void 0);if(o=Ow(o,t),r){if(iw&&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;pw&&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=Aw(e,r,i,t))}s??=kw(e,o,t);let c=e.docView.nearestDesc(o,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function Nw(e){return e.top<e.bottom||e.left<e.right}function Pw(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(Nw(e))return e}return Array.prototype.find.call(n,Nw)||e.getBoundingClientRect()}var Fw=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Iw(e,t,n){let{node:r,offset:i,atom:a}=e.docView.domFromPos(t,n<0?-1:1),o=pw||iw;if(r.nodeType==3)if(o&&(Fw.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let e=Pw(IC(r,i,i),n);if(iw&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=Pw(IC(r,i-1,i-1),-1);if(t.top==e.top){let n=Pw(IC(r,i,i+1),-1);if(n.top!=e.top)return Lw(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++,Lw(Pw(IC(r,e,t),a),a<0)}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(a==null&&i&&(n<0||i==VC(r))){let e=r.childNodes[i-1];if(e.nodeType==1)return Rw(e.getBoundingClientRect(),!1)}if(a==null&&i<VC(r)){let e=r.childNodes[i];if(e.nodeType==1)return Rw(e.getBoundingClientRect(),!0)}return Rw(r.getBoundingClientRect(),n>=0)}if(a==null&&i&&(n<0||i==VC(r))){let e=r.childNodes[i-1],t=e.nodeType==3?IC(e,VC(e)-(o?0:1)):e.nodeType==1&&(e.nodeName!=`BR`||!e.nextSibling)?e:null;if(t)return Lw(Pw(t,1),!1)}if(a==null&&i<VC(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?e.nodeType==3?IC(e,0,o?0:1):e.nodeType==1?e:null:null;if(t)return Lw(Pw(t,-1),!0)}return Lw(Pw(r.nodeType==3?IC(r):r,-n),n>=0)}function Lw(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 Rw(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 Bw(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=Iw(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=IC(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 Vw=/[\u0590-\u08ac]/;function Hw(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?!Vw.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 Uw=null,Ww=null,Gw=!1;function Kw(e,t,n){return Uw==t&&Ww==n?Gw:(Uw=t,Ww=n,Gw=n==`up`||n==`down`?Bw(e,t,n):Hw(e,t,n))}var qw=0,Jw=1,Yw=2,Xw=3,Zw=class{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=qw,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>NC(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 iT){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 Qw&&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?NC(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?NC(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=NC(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=NC(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((iw||cw)&&e==t){let{node:e,offset:t}=o;if(e.nodeType==3){if(u=!!(t&&e.nodeValue[t-1]==`
39
+ `))}})}function tre(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function nre(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 gS(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new U(H.from(o),0,0),1,!0))}function wS(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 rre(e,t,n=1,r){let i=e.doc.resolve(t),a=H.empty,o=H.empty;for(let e=i.depth,t=i.depth-n,s=n-1;e>t;e--,s--){a=H.from(i.node(e).copy(a));let t=r&&r[s];o=H.from(t?t.type.create(t.attrs,o):i.node(e).copy(o))}e.step(new hS(t,t,new U(a.append(o),n,n),!0))}function TS(e,t){let n=e.resolve(t),r=n.index();return are(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function ire(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 are(e,t){return!!(e&&t&&!e.isLeaf&&ire(e,t))}function ore(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);CS(e,r.node(),r.before(),s)}o.inlineContent&&vS(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 hS(l,c.map(t+n,-1),U.empty,!0)),r===!0){let t=e.doc.resolve(l);SS(e,t.node(),t.before(),e.steps.length)}return e}function sre(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 cre(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 ES(e,t,n=t,r=U.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),a=e.resolve(n);return DS(i,a,r)?new hS(t,n,r):new lre(i,a,r).fit()}function DS(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var lre=class{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=H.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=H.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 U(i,a,o);return e>-1?new gS(n.pos,e,this.$to.pos,this.$to.end(),s,t):s.size||n.pos!=this.$to.pos?new hS(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=AS(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(H.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=AS(e,t);return!r.childCount||r.firstChild.isLeaf?!1:(this.unplaced=new U(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=AS(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new U(OS(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new U(OS(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(jS(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=kS(this.placed,t,H.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?U.empty:new U(OS(a.content,e-1,1),e-1,f<0?a.openEnd:e-1):new U(OS(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||!MS(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=MS(e,t,r,n,i);if(a){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=MS(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=kS(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=kS(this.placed,this.depth,H.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(H.empty,!0);e.childCount&&(this.placed=kS(this.placed,this.frontier.length,e))}};function OS(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(OS(e.firstChild.content,t-1,n)))}function kS(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(kS(e.lastChild.content,t-1,n)))}function AS(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function jS(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,jS(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(H.empty,!0)))),e.copy(r)}function MS(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&&!NS(n,a.content,o)?s:null}function NS(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function PS(e){return e.spec.defining||e.spec.definingForContent}function FS(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),a=e.doc.resolve(n);if(DS(i,a,r))return e.step(new hS(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=PS(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 U(IS(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 IS(e,t,n,r,i){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy(IS(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(H.empty,!0))}return e}function LS(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=sre(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new U(H.from(r),0,0))}function RS(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 BS=class e extends cS{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 lS.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 lS.fromReplace(e,this.pos,this.pos+1,new U(H.from(r),0,t.isLeaf?0:1))}getMap(){return aS.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)}};cS.jsonID(`attr`,BS);var VS=class e extends cS{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 lS.ok(n)}getMap(){return aS.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)}};cS.jsonID(`docAttr`,VS);var HS=class extends Error{};HS=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},HS.prototype=Object.create(Error.prototype),HS.prototype.constructor=HS,HS.prototype.name=`TransformError`;var US=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new oS}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new HS(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=U.empty){let r=ES(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new U(H.from(n),0,0))}delete(e,t){return this.replace(e,t,U.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return FS(this,e,t,n),this}replaceRangeWith(e,t,n){return LS(this,e,t,n),this}deleteRange(e,t){return RS(this,e,t),this}lift(e,t){return Xne(this,e,t),this}join(e,t=1){return ore(this,e,t),this}wrap(e,t){return $ne(this,e,t),this}setBlockType(e,t=e,n,r=null){return ere(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return nre(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new BS(e,t,n)),this}setDocAttribute(e,t){return this.step(new VS(e,t)),this}addNodeMark(e,t){return this.step(new pS(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError(`No node at position `+e);if(t instanceof Nb)t.isInSet(n.marks)&&this.step(new mS(e,t));else{let r=n.marks,i,a=[];for(;i=t.isInSet(r);)a.push(new mS(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 rre(this,e,t,n),this}addMark(e,t,n){return qne(this,e,t,n),this}removeMark(e,t,n){return Jne(this,e,t,n),this}clearIncompatible(e,t,n){return vS(this,e,t,n),this}},WS=Object.create(null),GS=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new KS(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=U.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?U.empty:t),o==0&&nC(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),nC(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new YS(e):tC(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?tC(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):tC(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 $S(e.node(0))}static atStart(e){return tC(e,e,0,0,1)||new $S(e)}static atEnd(e){return tC(e,e,e.content.size,e.childCount,-1)||new $S(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError(`Invalid input for Selection.fromJSON`);let n=WS[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in WS)throw RangeError(`Duplicate use of selection JSON ID `+e);return WS[e]=t,t.prototype.jsonID=e,t}getBookmark(){return YS.between(this.$anchor,this.$head).getBookmark()}};GS.prototype.visible=!0;var KS=class{constructor(e,t){this.$from=e,this.$to=t}},qS=!1;function JS(e){!qS&&!e.parent.inlineContent&&(qS=!0,console.warn(`TextSelection endpoint not pointing into a node with inline content (`+e.parent.type.name+`)`))}var YS=class e extends GS{constructor(e,t=e){JS(e),JS(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 GS.near(r);let i=t.resolve(n.map(this.anchor));return new e(i.parent.inlineContent?i:r,r)}replace(e,t=U.empty){if(super.replace(e,t),t==U.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 XS(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=GS.findFrom(n,r,!0)||GS.findFrom(n,-r,!0);if(e)n=e.$head;else return GS.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(GS.findFrom(t,-r,!0)||GS.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new e(t,n)}};GS.jsonID(`text`,YS);var XS=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 YS.between(e.resolve(this.anchor),e.resolve(this.head))}},ZS=class e extends GS{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?GS.near(a):new e(a)}content(){return new U(H.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 QS(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}};ZS.prototype.visible=!1,GS.jsonID(`node`,ZS);var QS=class e{constructor(e){this.anchor=e}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new XS(r,r):new e(r)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&ZS.isSelectable(n)?new ZS(t):GS.near(t)}},$S=class e extends GS{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=U.empty){if(t==U.empty){e.delete(0,e.doc.content.size);let t=GS.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 eC}};GS.jsonID(`all`,$S);var eC={map(){return this},resolve(e){return new $S(e)}};function tC(e,t,n,r,i,a=!1){if(t.inlineContent)return YS.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){let t=tC(e,r,n+i,i<0?r.childCount:0,i,a);if(t)return t}else if(!a&&ZS.isSelectable(r))return ZS.create(e,n-(i<0?r.nodeSize:0));n+=r.nodeSize*i}return null}function nC(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof hS||i instanceof gS))return;let a=e.mapping.maps[r],o;a.forEach((e,t,n,r)=>{o??=r}),e.setSelection(GS.near(e.doc.resolve(o),n))}var rC=1,iC=2,aC=4,oC=class extends US{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|rC)&~iC,this.storedMarks=null,this}get selectionSet(){return(this.updated&rC)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=iC,this}ensureMarks(e){return Nb.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&iC)>0}addStep(e,t){super.addStep(e,t),this.updated&=~iC,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)||Nb.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(GS.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|=aC,this}get scrolledIntoView(){return(this.updated&aC)>0}};function sC(e,t){return!t||!e?e:e.bind(t)}var cC=class{constructor(e,t,n){this.name=e,this.init=sC(t.init,n),this.apply=sC(t.apply,n)}},lC=[new cC(`doc`,{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new cC(`selection`,{init(e,t){return e.selection||GS.atStart(t.doc)},apply(e){return e.selection}}),new cC(`storedMarks`,{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new cC(`scrollToSelection`,{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],uC=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=lC.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 cC(e.key,e.spec.state,e))})}},dC=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 oC(this)}static create(t){let n=new uC(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 uC(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 uC(t.schema,t.plugins),a=new e(i);return i.fields.forEach(e=>{if(e.name==`doc`)a.doc=$b.fromJSON(t.schema,n.doc);else if(e.name==`selection`)a.selection=GS.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 fC(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r==`handleDOMEvents`&&(i=fC(i,t,{})),n[r]=i}return n}var pC=class{constructor(e){this.spec=e,this.props={},e.props&&fC(e.props,this,this.props),this.key=e.key?e.key.key:hC(`plugin`)}getState(e){return e[this.key]}},mC=Object.create(null);function hC(e){return e in mC?e+`$`+ ++mC[e]:(mC[e]=0,e+`$`)}var gC=class{constructor(e=`key`){this.key=hC(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}};function _C(){return typeof document<`u`?document:null}var vC=i(((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})),yC=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.`}}),bC=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.`}}),xC=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.`}}),SC=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.`}}),CC=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.`}}),wC=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.`}}),TC=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.`}}),EC=class{constructor(e,t,n={}){this.match=e,this.match=e,this.handler=typeof t==`string`?DC(t):t,this.undoable=n.undoable!==!1,this.inCode=n.inCode||!1,this.inCodeMark=n.inCodeMark!==!1}};function DC(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 OC=500;function kC({rules:e}){let t=new pC({state:{init(){return null},apply(e,t){return e.getMeta(this)||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput(n,r,i,a){return AC(n,r,i,a,e,t)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&AC(n,r.pos,r.pos,``,e,t)})}}},isInputRules:!0});return t}function AC(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-OC),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 jC=(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 EC(/--$/,`—`,{inCodeMark:!1}),new EC(/\.\.\.$/,`…`,{inCodeMark:!1}),new EC(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,`“`,{inCodeMark:!1}),new EC(/"$/,`”`,{inCodeMark:!1}),new EC(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,`‘`,{inCodeMark:!1}),new EC(/'$/,`’`,{inCodeMark:!1});function MC(e,t,n=null,r){return new EC(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&&bS(l,t,s);if(!u)return null;c.wrap(l,u);let d=c.doc.resolve(a-1).nodeBefore;return d&&d.type==t&&TS(c.doc,a-1)&&(!r||r(i,d))&&c.join(a-1),c})}var NC=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},PC=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},FC=null,IC=function(e,t,n){let r=FC||=document.createRange();return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},LC=function(){FC=null},RC=function(e,t,n,r){return n&&(BC(e,t,n,r,-1)||BC(e,t,n,r,1))},zC=/^(img|br|input|textarea|hr)$/i;function BC(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:VC(e))){let n=e.parentNode;if(!n||n.nodeType!=1||GC(e)||zC.test(e.nodeName)||e.contentEditable==`false`)return!1;t=NC(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?VC(e):0}else return!1}}function VC(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function HC(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=VC(e)}else if(e.parentNode&&!GC(e))t=NC(e),e=e.parentNode;else return null}}function UC(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&&!GC(e))t=NC(e)+1,e=e.parentNode;else return null}}function WC(e,t,n){for(let r=t==0,i=t==VC(e);r||i;){if(e==n)return!0;let t=NC(e);if(e=e.parentNode,!e)return!1;r&&=t==0,i&&=t==VC(e)}}function GC(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 KC=function(e){return e.focusNode&&RC(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function qC(e,t){let n=document.createEvent(`Event`);return n.initEvent(`keydown`,!0,!0),n.keyCode=e,n.key=n.code=t,n}function JC(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function YC(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(VC(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(VC(r.startContainer),r.startOffset)}}}var XC=typeof navigator<`u`?navigator:null,ZC=typeof document<`u`?document:null,QC=XC&&XC.userAgent||``,$C=/Edge\/(\d+)/.exec(QC),ew=/MSIE \d/.exec(QC),tw=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(QC),nw=!!(ew||tw||$C),rw=ew?document.documentMode:tw?+tw[1]:$C?+$C[1]:0,iw=!nw&&/gecko\/(\d+)/i.test(QC);iw&&+(/Firefox\/(\d+)/.exec(QC)||[0,0])[1];var aw=!nw&&/Chrome\/(\d+)/.exec(QC),ow=!!aw,sw=aw?+aw[1]:0,cw=!nw&&!!XC&&/Apple Computer/.test(XC.vendor),lw=cw&&(/Mobile\/\w+/.test(QC)||!!XC&&XC.maxTouchPoints>2),uw=lw||(XC?/Mac/.test(XC.platform):!1),dw=XC?/Win/.test(XC.platform):!1,fw=/Android \d/.test(QC),pw=!!ZC&&`webkitFontSmoothing`in ZC.documentElement.style,mw=pw?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function hw(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 gw(e,t){return typeof e==`number`?e:e[t]}function _w(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 vw(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=PC(o);continue}let e=o,n=e==a.body,s=n?hw(a):_w(e),c=0,l=0;if(t.top<s.top+gw(r,`top`)?l=-(s.top-t.top+gw(i,`top`)):t.bottom>s.bottom-gw(r,`bottom`)&&(l=t.bottom-t.top>s.bottom-s.top?t.top+gw(i,`top`)-s.top:t.bottom-s.bottom+gw(i,`bottom`)),t.left<s.left+gw(r,`left`)?c=-(s.left-t.left+gw(i,`left`)):t.right>s.right-gw(r,`right`)&&(c=t.right-s.right+gw(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:PC(o)}}function yw(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:bw(e.dom)}}function bw(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=PC(r));return t}function xw({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;Sw(n,r==0?0:r-t)}function Sw(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 Cw=null;function ww(e){if(e.setActive)return e.setActive();if(Cw)return e.focus(Cw);let t=bw(e);e.focus(Cw==null?{get preventScroll(){return Cw={preventScroll:!0},!0}}:void 0),Cw||(Cw=!1,Sw(t,0))}function Tw(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=IC(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?Ew(n,i):!n||r&&n.nodeType==1?{node:e,offset:a}:Tw(n,i)}function Ew(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=Pw(r,1);if(n.top!=n.bottom&&Dw(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 Dw(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Ow(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function kw(e,t,n){let{node:r,offset:i}=Tw(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 Aw(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 jw(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(Dw(t,i))return jw(n,t,i)}}if((a=(a+1)%r)==i)break}return e}function Mw(e,t){let n=e.dom.ownerDocument,r,i=0,a=YC(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(!Dw(t,n)||(o=jw(e.dom,t,n),!o))return null}if(cw)for(let e=o;r&&e;e=PC(e))e.draggable&&(r=void 0);if(o=Ow(o,t),r){if(iw&&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;pw&&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=Aw(e,r,i,t))}s??=kw(e,o,t);let c=e.docView.nearestDesc(o,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function Nw(e){return e.top<e.bottom||e.left<e.right}function Pw(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(Nw(e))return e}return Array.prototype.find.call(n,Nw)||e.getBoundingClientRect()}var Fw=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Iw(e,t,n){let{node:r,offset:i,atom:a}=e.docView.domFromPos(t,n<0?-1:1),o=pw||iw;if(r.nodeType==3)if(o&&(Fw.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let e=Pw(IC(r,i,i),n);if(iw&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=Pw(IC(r,i-1,i-1),-1);if(t.top==e.top){let n=Pw(IC(r,i,i+1),-1);if(n.top!=e.top)return Lw(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++,Lw(Pw(IC(r,e,t),a),a<0)}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(a==null&&i&&(n<0||i==VC(r))){let e=r.childNodes[i-1];if(e.nodeType==1)return Rw(e.getBoundingClientRect(),!1)}if(a==null&&i<VC(r)){let e=r.childNodes[i];if(e.nodeType==1)return Rw(e.getBoundingClientRect(),!0)}return Rw(r.getBoundingClientRect(),n>=0)}if(a==null&&i&&(n<0||i==VC(r))){let e=r.childNodes[i-1],t=e.nodeType==3?IC(e,VC(e)-(o?0:1)):e.nodeType==1&&(e.nodeName!=`BR`||!e.nextSibling)?e:null;if(t)return Lw(Pw(t,1),!1)}if(a==null&&i<VC(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?e.nodeType==3?IC(e,0,o?0:1):e.nodeType==1?e:null:null;if(t)return Lw(Pw(t,-1),!0)}return Lw(Pw(r.nodeType==3?IC(r):r,-n),n>=0)}function Lw(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 Rw(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 Bw(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=Iw(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=IC(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 Vw=/[\u0590-\u08ac]/;function Hw(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?!Vw.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 Uw=null,Ww=null,Gw=!1;function Kw(e,t,n){return Uw==t&&Ww==n?Gw:(Uw=t,Ww=n,Gw=n==`up`||n==`down`?Bw(e,t,n):Hw(e,t,n))}var qw=0,Jw=1,Yw=2,Xw=3,Zw=class{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=qw,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>NC(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 iT){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 Qw&&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?NC(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?NC(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=NC(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=NC(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((iw||cw)&&e==t){let{node:e,offset:t}=o;if(e.nodeType==3){if(u=!!(t&&e.nodeValue[t-1]==`
40
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:NC(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(iw&&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&&cw)&&RC(o.node,o.offset,l.anchorNode,l.anchorOffset)&&RC(s.node,s.offset,l.focusNode,l.focusOffset))return;let d=!1;if((c.extend||e==t)&&!(u&&iw)){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?Yw:Jw,e==r&&t==o&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Xw:i.markDirty(e-r,t-r);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Yw:Xw}n=a}this.dirty=Yw}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?Yw:Jw;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}},Qw=class extends Zw{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==qw&&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}},$w=class extends Zw{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}},eT=class e extends Zw{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=Hx.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&Xw||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Xw&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=qw){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=qw}}slice(t,n,r){let i=e.create(this.parent,this.mark,!0,r),a=this.children,o=this.size;n<o&&(a=xT(a,n,o,r)),t>0&&(a=xT(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()}},tT=class e extends Zw{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=Hx.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=fT(u,r,n),l?c=new aT(t,n,r,i,u,d||null,f,l,a,o+1):n.isText?new rT(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=()=>H.empty)}return e}matchesNode(e,t,n){return this.dirty==qw&&e.eq(this.node)&&pT(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 hT(this,a&&a.node,e);vT(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?Nb.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==Yw)&&(a&&this.protectLocalComposition(e,a),oT(this.contentDOM,this.children,e),lw&&yT(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof YS)||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=bT(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 $w(this,i,t,r);e.input.compositionNodes.push(a),this.children=xT(this.children,n,n+r.length,e,a)}update(e,t,n,r){return this.dirty==Xw||!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=qw}updateOuterDeco(e){if(pT(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=uT(this.dom,this.nodeDOM,lT(this.outerDeco,this.node,t),lT(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 nT(e,t,n,r,i){fT(r,t,e);let a=new tT(void 0,e,t,n,r,r,r,i,0);return a.contentDOM&&a.updateChildren(i,0),a}var rT=class e extends tT{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==Xw||this.dirty!=qw&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=qw||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=qw,!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=Xw)}get domAtom(){return!1}isText(e){return this.node.text==e}},iT=class extends Zw{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==qw&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName==`IMG`}},aT=class extends tT{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==Xw)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 oT(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=mT(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(s,r);if(o instanceof eT){let t=r?r.previousSibling:e.lastChild;oT(o.contentDOM,o.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=mT(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}var sT=function(e){e&&(this.nodeName=e)};sT.prototype=Object.create(null);var cT=[new sT];function lT(e,t,n){if(e.length==0)return cT;let r=n?cT[0]:new sT,i=[r];for(let a=0;a<e.length;a++){let o=e[a].type.attrs;if(o){o.nodeName&&i.push(r=new sT(o.nodeName));for(let e in o){let a=o[e];a!=null&&(n&&i.length==1&&i.push(r=new sT(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 uT(e,t,n,r){if(n==cT&&r==cT)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=cT[0],i=t)}dT(i,o||cT[0],a)}return i}function dT(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 fT(e,t,n){return uT(e,e,cT,lT(t,n,e.nodeType!=1))}function pT(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 mT(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var hT=class{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=gT(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=qw,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=eT.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==Xw&&a.dom==a.contentDOM&&(a.dirty=Yw),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 tT){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!=Xw&&pT(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=Yw,u.updateChildren(r,a+1),u.dirty=qw),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)||!pT(n,e.outerDeco)||!r.eq(e.innerDeco))return null;let o=tT.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=tT.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 Qw(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 eT;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof rT)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((cw||ow)&&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 iT(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 gT(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 eT)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 _T(e,t){return e.type.side-t.type.side}function vT(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(_T);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 yT(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 bT(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 xT(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 ST(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(KC(n)){for(c=o;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&ZS.isSelectable(e)&&i.parent&&!(e.isInline&&WC(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new ZS(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=NT(e,u,s,n)}return l}function CT(e){return e.editable?e.hasFocus():FT(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function wT(e,t=!1){let n=e.state.selection;if(jT(e,n),CT(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&ow){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&RC(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)AT(e);else{let{anchor:r,head:i}=n,a,o;TT&&!(n instanceof YS)&&(n.$from.parent.inlineContent||(a=ET(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=ET(e,n.to))),e.docView.setSelection(r,i,e,t),TT&&(a&&OT(a),o&&OT(o)),n.visible?e.dom.classList.remove(`ProseMirror-hideselection`):(e.dom.classList.add(`ProseMirror-hideselection`),`onselectionchange`in document&&kT(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var TT=cw||ow&&sw<63;function ET(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(cw&&i&&i.contentEditable==`false`)return DT(i);if((!i||i.contentEditable==`false`)&&(!a||a.contentEditable==`false`)){if(i)return DT(i);if(a)return DT(a)}}function DT(e){return e.contentEditable=`true`,cw&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function OT(e){e.contentEditable=`false`,e.wasDraggable&&=(e.draggable=!0,null)}function kT(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(()=>{(!CT(e)||e.state.selection.visible)&&e.dom.classList.remove(`ProseMirror-hideselection`)},20))})}function AT(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName==`IMG`;r?t.collapse(n.parentNode,NC(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&nw&&rw<=11&&(n.disabled=!0,n.disabled=!1)}function jT(e,t){if(t instanceof ZS){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(MT(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else MT(e)}function MT(e){e.lastSelectedViewDesc&&=(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),void 0)}function NT(e,t,n,r){return e.someProp(`createSelectionBetween`,r=>r(e,t,n))||YS.between(t,n,r)}function PT(e){return e.editable&&!e.hasFocus()?!1:FT(e)}function FT(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 IT(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return RC(t.node,t.offset,n.anchorNode,n.anchorOffset)}function LT(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&&GS.findFrom(a,t)}function RT(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 YS){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 RT(e,new YS(r.$anchor,a))}else if(!r.empty)return!1;else if(e.endOfTextblock(t>0?`forward`:`backward`)){let n=LT(e.state,t);return n&&n instanceof ZS?RT(e,n):!1}else if(!(uw&&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?ZS.isSelectable(i)?RT(e,new ZS(t<0?e.state.doc.resolve(n.pos-i.nodeSize):n)):pw?RT(e,new YS(e.state.doc.resolve(t<0?o:o+i.nodeSize))):!1:!1}}else if(r instanceof ZS&&r.node.isInline)return RT(e,new YS(t>0?r.$to:r.$from));else{let n=LT(e.state,t);return n?RT(e,n):!1}}function BT(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function VT(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!=`BR`)}function HT(e,t){return t<0?UT(e):WT(e)}function UT(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,a,o=!1;for(iw&&n.nodeType==1&&r<BT(n)&&VT(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(n.nodeType!=1)break;{let e=n.childNodes[r-1];if(VT(e,-1))i=n,a=--r;else if(e.nodeType==3)n=e,r=n.nodeValue.length;else break}}else if(GT(n))break;else{let t=n.previousSibling;for(;t&&VT(t,-1);)i=n.parentNode,a=NC(t),t=t.previousSibling;if(t)n=t,r=BT(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}o?JT(e,n,r):i&&JT(e,i,a)}function WT(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=BT(n),a,o;for(;;)if(r<i){if(n.nodeType!=1)break;let e=n.childNodes[r];if(VT(e,1))a=n,o=++r;else break}else if(GT(n))break;else{let t=n.nextSibling;for(;t&&VT(t,1);)a=t.parentNode,o=NC(t)+1,t=t.nextSibling;if(t)n=t,r=0,i=BT(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}a&&JT(e,a,o)}function GT(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function KT(e,t){for(;e&&t==e.childNodes.length&&!GC(e);)t=NC(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 qT(e,t){for(;e&&!t&&!GC(e);)t=NC(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 JT(e,t,n){if(t.nodeType!=3){let e,r;(r=KT(t,n))?(t=r,n=0):(e=qT(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection();if(!r)return;if(KC(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&&wT(e)},50)}function YT(e,t){let n=e.state.doc.resolve(t);if(!(ow||dw)&&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 XT(e,t,n){let r=e.state.selection;if(r instanceof YS&&!r.empty||n.indexOf(`s`)>-1||uw&&n.indexOf(`m`)>-1)return!1;let{$from:i,$to:a}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?`up`:`down`)){let n=LT(e.state,t);if(n&&n instanceof ZS)return RT(e,n)}if(!i.parent.inlineContent){let n=t<0?i:a,o=r instanceof $S?GS.near(n,t):GS.findFrom(n,t);return o?RT(e,o):!1}return!1}function ZT(e,t){if(!(e.state.selection instanceof YS))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 QT(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function $T(e){if(!cw||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;QT(e,n,`true`),setTimeout(()=>QT(e,n,`false`),20)}return!1}function eE(e){let t=``;return e.ctrlKey&&(t+=`c`),e.metaKey&&(t+=`m`),e.altKey&&(t+=`a`),e.shiftKey&&(t+=`s`),t}function tE(e,t){let n=t.keyCode,r=eE(t);if(n==8||uw&&n==72&&r==`c`)return ZT(e,-1)||HT(e,-1);if(n==46&&!t.shiftKey||uw&&n==68&&r==`c`)return ZT(e,1)||HT(e,1);if(n==13||n==27)return!0;if(n==37||uw&&n==66&&r==`c`){let t=n==37?YT(e,e.state.selection.from)==`ltr`?-1:1:-1;return zT(e,t,r)||HT(e,t)}else if(n==39||uw&&n==70&&r==`c`){let t=n==39?YT(e,e.state.selection.from)==`ltr`?1:-1:1;return zT(e,t,r)||HT(e,t)}else if(n==38||uw&&n==80&&r==`c`)return XT(e,-1,r)||HT(e,-1);else if(n==40||uw&&n==78&&r==`c`)return $T(e)||XT(e,1,r)||HT(e,1);else if(r==(uw?`m`:`c`)&&(n==66||n==73||n==89||n==90))return!0;return!1}function nE(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`)||Hx.fromSchema(e.state.schema),s=pE(),c=s.createElement(`div`);c.appendChild(o.serializeFragment(r,{document:s}));let l=c.firstChild,u,d=0;for(;l&&l.nodeType==1&&(u=dE[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
41
 
42
42
  `),slice:t}}function rE(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 U(H.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=Hx.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=gE(n),pw&&_E(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`)||Ox.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(c||u),context:i,ruleFromNode(e){return e.nodeName==`BR`&&!e.nextSibling&&e.parentNode&&!iE.test(e.parentNode.nodeName)?{ignore:!0}:null}}),u)s=vE(uE(s,+u[1],+u[2]),u[4]);else if(s=U.maxOpen(aE(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=uE(s,e,t)}return e.someProp(`transformPasted`,t=>{s=t(s,e,c)}),s}var iE=/^(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 aE(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&&sE(t,i,e,a[a.length-1],0))a[a.length-1]=n;else{a.length&&(a[a.length-1]=cE(a[a.length-1],i.length));let n=oE(e,t);a.push(n),r=r.matchType(n.type),i=t}}),a)return H.from(a)}return e}function oE(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,H.from(e));return e}function sE(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let a=sE(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(H.from(oE(n,e,i+1))))}}function cE(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,cE(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(H.empty,!0);return e.copy(n.append(r))}function lE(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=lE(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(H.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(s))}function uE(e,t,n){return t<e.openStart&&(e=new U(lE(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new U(lE(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var dE={thead:[`table`],tbody:[`table`],tfoot:[`table`],caption:[`table`],colgroup:[`table`],col:[`table`,`colgroup`],tr:[`table`,`tbody`],td:[`table`,`tbody`,`tr`],th:[`table`,`tbody`,`tr`]},fE=null;function pE(){return fE||=document.implementation.createHTMLDocument(`title`)}var mE=null;function hE(e){let t=window.trustedTypes;return t?(mE||=t.defaultPolicy||t.createPolicy(`ProseMirrorClipboard`,{createHTML:e=>e}),mE.createHTML(e)):e}function gE(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=pE().createElement(`div`),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&dE[r[1].toLowerCase()])&&(e=i.map(e=>`<`+e+`>`).join(``)+e+i.map(e=>`</`+e+`>`).reverse().join(``)),n.innerHTML=hE(e),i)for(let e=0;e<i.length;e++)n=n.querySelector(i[e])||n;return n}function _E(e){let t=e.querySelectorAll(ow?`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 vE(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=H.from(t.create(r[e+1],i)),a++,o++}return new U(i,a,o)}var yE={},bE={},xE={touchstart:!0,touchmove:!0},SE=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 CE(e){for(let t in yE){let n=yE[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{OE(e,t)&&!DE(e,t)&&(e.editable||!(t.type in bE))&&n(e,t)},xE[t]?{passive:!0}:void 0)}cw&&e.dom.addEventListener(`input`,()=>null),EE(e)}function wE(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function TE(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function EE(e){e.someProp(`handleDOMEvents`,t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>DE(e,t))})}function DE(e,t){return e.someProp(`handleDOMEvents`,n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function OE(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 kE(e,t){!DE(e,t)&&yE[t.type]&&(e.editable||!(t.type in bE))&&yE[t.type](e,t)}bE.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!UE(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(fw&&ow&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),lw&&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,qC(13,`Enter`))),e.input.lastIOSEnter=0)},200)}else e.someProp(`handleKeyDown`,t=>t(e,n))||tE(e,n)?n.preventDefault():wE(e,`key`)},bE.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},bE.keypress=(e,t)=>{let n=t;if(UE(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||uw&&n.metaKey)return;if(e.someProp(`handleKeyPress`,t=>t(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof YS)||!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 AE(e){return{left:e.clientX,top:e.clientY}}function jE(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function ME(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 NE(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 PE(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&ZS.isSelectable(r)?(NE(e,new ZS(n),`pointer`),!0):!1}function FE(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof ZS&&(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(ZS.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:(NE(e,ZS.create(e.state.doc,i),`pointer`),!0)}function IE(e,t,n,r,i){return ME(e,`handleClickOn`,t,n,r)||e.someProp(`handleClick`,n=>n(e,t,r))||(i?FE(e,n):PE(e,n))}function LE(e,t,n,r){return ME(e,`handleDoubleClickOn`,t,n,r)||e.someProp(`handleDoubleClick`,n=>n(e,t,r))}function RE(e,t,n,r){return ME(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?(NE(e,YS.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)NE(e,YS.create(r,a+1,a+1+n.content.size),`pointer`);else if(ZS.isSelectable(n))NE(e,ZS.create(r,a),`pointer`);else continue;return!0}}function BE(e){return XE(e)}var VE=uw?`metaKey`:`ctrlKey`;yE.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=BE(e),i=Date.now(),a=`singleClick`;i-e.input.lastClick.time<500&&jE(n,e.input.lastClick)&&!n[VE]&&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(AE(n));o&&(a==`singleClick`?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new HE(e,o,n,!!r)):(a==`doubleClick`?LE:RE)(e,o.pos,o.inside,n)?n.preventDefault():wE(e,`pointer`))};var HE=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[VE],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 ZS&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&iw&&!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)),wE(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(()=>wT(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(AE(e))),this.updateAllowDefault(e),this.allowDefault||!t?wE(this.view,`pointer`):IE(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||cw&&this.mightDrag&&!this.mightDrag.node.isAtom||ow&&!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)?(NE(this.view,GS.near(this.view.state.doc.resolve(t.pos)),`pointer`),e.preventDefault()):wE(this.view,`pointer`)}move(e){this.updateAllowDefault(e),wE(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)}};yE.touchstart=e=>{e.input.lastTouch=Date.now(),BE(e),wE(e,`pointer`)},yE.touchmove=e=>{e.input.lastTouch=Date.now(),wE(e,`pointer`)},yE.contextmenu=e=>BE(e);function UE(e,t){return e.composing?!0:cw&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var WE=fw?5e3:-1;bE.compositionstart=bE.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof YS&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>e.type.spec.inclusive===!1)||ow&&dw&&GE(e)))e.markCursor=e.state.storedMarks||n.marks(),XE(e,!0),e.markCursor=null;else if(XE(e,!t.selection.empty),iw&&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}KE(e,WE)};function GE(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`}bE.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++,KE(e,20))};function KE(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>XE(e),t))}function qE(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=YE());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function JE(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=HC(t.focusNode,t.focusOffset),r=UC(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 YE(){let e=document.createEvent(`Event`);return e.initEvent(`event`,!0,!0),e.timeStamp}function XE(e,t=!1){if(!(fw&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),qE(e),t||e.docView&&e.docView.dirty){let n=ST(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 ZE(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 QE=nw&&rw<15||lw&&mw<604;yE.copy=bE.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type==`cut`;if(r.empty)return;let a=QE?null:n.clipboardData,{dom:o,text:s}=nE(e,r.content());a?(n.preventDefault(),a.clearData(),a.setData(`text/html`,o.innerHTML),a.setData(`text/plain`,s)):ZE(e,o),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta(`uiEvent`,`cut`))};function $E(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function eD(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?tD(e,r.value,null,i,t):tD(e,r.textContent,r.innerHTML,i,t)},50)}function tD(e,t,n,r,i){let a=rE(e,t,n,r,e.state.selection.$from);if(e.someProp(`handlePaste`,t=>t(e,i,a||U.empty)))return!0;if(!a)return!1;let o=$E(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 nD(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,` `):``}bE.paste=(e,t)=>{let n=t;if(e.composing&&!fw)return;let r=QE?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&tD(e,nD(r),r.getData(`text/html`),i,n)?n.preventDefault():eD(e,n)};var rD=class{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}},iD=uw?`altKey`:`ctrlKey`;function aD(e,t){return e.someProp(`dragCopies`,e=>!e(t))??!t[iD]}yE.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(AE(n)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof ZS?i.to-1:i.to))){if(r&&r.mightDrag)o=ZS.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=ZS.create(e.state.doc,t.posBefore))}}let{dom:s,text:c,slice:l}=nE(e,(o||e.state.selection).content());(!n.dataTransfer.files.length||!ow||sw>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(QE?`Text`:`text/html`,s.innerHTML),n.dataTransfer.effectAllowed=`copyMove`,QE||n.dataTransfer.setData(`text/plain`,c),e.dragging=new rD(l,aD(e,n),o)},yE.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},bE.dragover=bE.dragenter=(e,t)=>t.preventDefault(),bE.drop=(e,t)=>{try{oD(e,t,e.dragging)}finally{e.dragging=null}};function oD(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(AE(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=rE(e,nD(t.dataTransfer),QE?null:t.dataTransfer.getData(`text/html`),!1,i);let o=!!(n&&aD(e,t));if(e.someProp(`handleDrop`,n=>n(e,t,a||U.empty,o))){t.preventDefault();return}if(!a)return;t.preventDefault();let s=a?cre(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&&ZS.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new ZS(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(NT(e,f,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta(`uiEvent`,`drop`))}yE.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())&&wT(e)},20))},yE.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)},yE.beforeinput=(e,t)=>{if(ow&&fw&&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,qC(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)}};for(let e in bE)yE[e]=bE[e];function sD(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 cD=class e{constructor(e,t){this.toDOM=e,this.spec=t||pD,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 dD(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&&sD(this.spec,t.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},lD=class e{constructor(e,t){this.attrs=e,this.spec=t||pD}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 dD(i,a,this)}valid(e,t){return t.from<t.to}eq(t){return this==t||t instanceof e&&sD(this.attrs,t.attrs)&&sD(this.spec,t.spec)}static is(t){return t.type instanceof e}destroy(){}},uD=class e{constructor(e,t){this.attrs=e,this.spec=t||pD}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 dD(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&&sD(this.attrs,t.attrs)&&sD(this.spec,t.spec)}destroy(){}},dD=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 cD(n,r))}static inline(t,n,r,i){return new e(t,n,new lD(r,i))}static node(t,n,r,i){return new e(t,n,new uD(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof lD}get widget(){return this.type instanceof cD}},fD=[],pD={},mD=class e{constructor(e,t){this.local=e.length?e:fD,this.children=t.length?t:fD}static create(e,t){return t.length?SD(t,e,0,pD):hD}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==hD||e.maps.length==0?this:this.mapInner(e,t,0,0,n||pD)}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?_D(this.children,o||[],t,n,r,i,a):o?new e(o.sort(CD),fD):hD}add(t,n){return n.length?this==hD?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=bD(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,SD(s,e,o+1,pD)),a+=3}});let o=vD(a?xD(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(CD):this.local,i||this.children)}remove(e){return e.length==0||this==hD?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==hD?(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):hD}forChild(t,n){if(this==hD)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 lD){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(CD),fD);return r?new gD([t,r]):t}return r||hD}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 wD(this.localsInner(e))}localsInner(e){if(this==hD)return fD;if(e.inlineContent||!this.local.some(lD.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof lD||t.push(this.local[e]);return t}forEachSet(e){e(this)}};mD.empty=new mD([],[]),mD.removeOverlap=wD;var hD=mD.empty,gD=class e{constructor(e){this.members=e}map(t,n){let r=this.members.map(e=>e.map(t,n,pD));return e.from(r)}forChild(t,n){if(n.isLeaf)return mD.empty;let r=[];for(let i=0;i<this.members.length;i++){let a=this.members[i].forChild(t,n);a!=hD&&(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?wD(n?t:t.sort(CD)):fD}static from(t){switch(t.length){case 0:return hD;case 1:return t[0];default:return new e(t.every(e=>e instanceof mD)?t:t.reduce((e,t)=>e.concat(t instanceof mD?t:t.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}};function _D(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==hD?(s[t+1]=-2,c=!0):(s[t]=u,s[t+1]=d,s[t+2]=r)}else c=!0}if(c){let c=SD(yD(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 mD(t.sort(CD),s)}function vD(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 dD(i.from+t,i.to+t,i.type))}return n}function yD(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 bD(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 xD(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function SD(e,t,n,r){let i=[],a=!1;t.forEach((t,o)=>{let s=bD(e,t,o+n);if(s){a=!0;let e=SD(s,t,n+o+1,r);e!=hD&&i.push(o,o+t.nodeSize,e)}});let o=vD(a?xD(e):e,-n).sort(CD);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 mD(o,i):hD}function CD(e,t){return e.from-t.from||e.to-t.to}function wD(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),TD(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),TD(t,i,r.copy(a.from,r.to)));break}}}return t}function TD(e,t,n){for(;t<e.length&&CD(n,e[t])>0;)t++;e.splice(t,0,n)}function ED(e){let t=[];return e.someProp(`decorations`,n=>{let r=n(e.state);r&&r!=hD&&t.push(r)}),e.cursorWrapper&&t.push(mD.create(e.state.doc,[e.cursorWrapper.deco])),gD.from(t)}var DD={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},OD=nw&&rw<=11,kD=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}},AD=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new kD,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]);nw&&rw<=11&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():cw&&e.composing&&t.some(e=>e.type==`childList`&&e.target.nodeName==`TR`)?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),OD&&(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,DD)),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(PT(this.view)){if(this.suppressingSelectionUpdates)return wT(this.view);if(nw&&rw<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&RC(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=PC(n))t.add(n);for(let r=e.anchorNode;r;r=PC(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)&&PT(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(iw&&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||ID(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&&KC(n)&&(c=ST(e))&&c.eq(GS.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,wT(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||r)&&(i>-1&&(e.docView.markDirty(i,a),ND(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,LD(e,s)),this.handleDOMChange(i,a,o,s),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||wT(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(nw&&rw<=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?NC(r)+1:0,o=n.localPosFromDOM(e.target,a,-1),s=i&&i.parentNode==e.target?NC(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}}},jD=new WeakMap,MD=!1;function ND(e){if(!jD.has(e)&&(jD.set(e,null),[`normal`,`nowrap`,`pre-line`].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=iw,MD)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.`),MD=!0}}function PD(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.domAtPos(e.state.selection.anchor);return RC(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function FD(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return PD(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?PD(e,n):null}function ID(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 LD(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 RD(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}],KC(c)||l.push({node:c.focusNode,offset:c.focusOffset})),ow&&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`)||Ox.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(cw&&/^(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||cw&&/^(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 BD=/^(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 VD(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=ST(e,t);if(n&&!e.state.selection.eq(n)){if(ow&&fw&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp(`handleKeyDown`,t=>t(e,qC(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=RD(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=KD(d.content,l.doc.content,l.from,f,p);if(m&&e.input.domChangeCount++,(lw&&e.input.lastIOSEnter>Date.now()-225||fw)&&i.some(e=>e.nodeType==1&&!BD.test(e.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp(`handleKeyDown`,t=>t(e,qC(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(!m)if(r&&c instanceof YS&&!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=HD(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 YS&&(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)),nw&&rw<=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((lw&&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,qC(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&WD(u,m.start,m.endA,h,g)&&e.someProp(`handleKeyDown`,t=>t(e,qC(8,`Backspace`)))){fw&&ow&&e.domObserver.suppressSelectionUpdates();return}ow&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),fw&&!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,qC(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=HD(e,n.doc,l.sel);t&&!(ow&&e.composing&&t.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==y||t.head==n.mapping.map(b)-1)||nw&&t.empty&&t.head==y)&&n.setSelection(t)}return a&&n.setMeta(`composition`,a),n.scrollIntoView()},S;if(v)if(h.pos==g.pos){nw&&rw<=11&&h.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>wT(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=UD(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 HD(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:NT(e,t.resolve(n.anchor),t.resolve(n.head))}function UD(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(H.from(l).eq(e))return{mark:s,type:o}}function WD(e,t,n,r,i){if(n-t<=i.pos-r.pos||GD(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(GD(a,!0,!0));return!o.parent.isTextblock||o.pos>n||GD(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function GD(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 KD(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&&qD(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&&qD(e.textBetween(a-1,a+1))&&(a+=t?1:-1),o=a+(o-s),s=a}return{start:a,endA:o,endB:s}}function qD(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 JD=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 SE,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(tO),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=ZD(this),XD(this),this.nodeViews=$D(this),this.docView=nT(this.state.doc,YD(this),ED(this),this.dom,this),this.domObserver=new AD(this,(e,t,n,r)=>VD(this,e,t,n,r)),this.domObserver.start(),CE(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&EE(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(tO),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in 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&&(qE(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=$D(this);eO(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(a||t.handleDOMEvents!=this._props.handleDOMEvents)&&EE(this),this.editable=ZD(this),XD(this);let o=ED(this),s=YD(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&&yw(this);if(i){this.domObserver.stop();let t=l&&(nw||ow)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&QD(n.selection,e.selection);if(l){let n=ow?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=JE(this)),(r||!this.docView.update(e.doc,s,o,this))&&(this.docView.updateOuterDeco(s),this.docView.destroy(),this.docView=nT(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())&&IT(this))?wT(this,t):(jT(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&&xw(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 ZS){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&vw(this,t.getBoundingClientRect(),e)}else vw(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 rD(e.slice,e.move,r<0?void 0:ZS.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(nw){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&&ww(this.dom),wT(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 Mw(this,e)}coordsAtPos(e,t=1){return Iw(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 Kw(this,t||this.state,e)}pasteHTML(e,t){return tD(this,``,e,!1,t||new ClipboardEvent(`paste`))}pasteText(e,t){return tD(this,e,null,!0,t||new ClipboardEvent(`paste`))}serializeForClipboard(e){return nE(this,e)}destroy(){this.docView&&(TE(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ED(this),this),this.dom.textContent=``):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,LC())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return kE(this,e)}domSelectionRange(){let e=this.domSelection();return e?cw&&this.root.nodeType===11&&JC(this.dom.ownerDocument)==this.dom&&FD(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};JD.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function YD(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`,[dD.node(0,e.state.doc.content.size,t)]}function XD(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:dD.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function ZD(e){return!e.someProp(`editable`,t=>t(e.state)===!1)}function QD(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 $D(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 eO(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 tO(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 nO=n(r(((e,t)=>{t.exports=e=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}}))(),1);function rO(e){return!!(e.prev&&e.next&&e.prev.text.full!==e.next.text.full)}function iO(e){return!!(e.prev&&e.next&&e.prev.range.cursor!==e.next.range.cursor)}function aO(e){return!!(!e.prev&&e.next)}function oO(e){return!!(e.prev&&!e.next)}function sO(e){return!!(e.prev&&e.next&&e.prev.range.from!==e.next.range.from)}function cO(e){return e===`invalid-exit-split`}var lO=[`jump-backward-exit`,`jump-forward-exit`],uO=[`jump-backward-change`,`jump-forward-change`];function dO(e){return Fy(lO,e.exit?.exitReason)||Fy(uO,e.change?.changeReason)}function fO(e){return!!(e&&e.query.full.length>=e.suggester.matchOffset)}function pO(e){return Yy(e)&&e instanceof YS}function mO(e){let{match:t,changeReason:n,exitReason:r}=e;return{...t,changeReason:n,exitReason:r}}function hO(e,t){let{invalidPrefixCharacters:n,validPrefixCharacters:r}=t;return n?!new RegExp(kO(n)).test(e):new RegExp(kO(r)).test(e)}function gO(e){let{text:t,regexp:n,$pos:r,suggester:i}=e,a=r.start(),o;return rb(t,n).forEach(e=>{if(hO(e.input.slice(Math.max(0,e.index-1),e.index),i)){let t=e.index+a,n=e[0],s=e[1];if(!Vy(n)||!Vy(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 _O(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=NO({char:r,matchOffset:s,startOfLine:a,supportedCharacters:o,multiline:c,caseInsensitive:l,unicode:u});return gO({suggester:n,text:t.doc.textBetween(t.before(),t.end(),`\0`,`\0`),regexp:d,$pos:t,char:r,name:i})}function vO(e){let{state:t,match:n}=e;try{return _O({$pos:t.doc.resolve(n.range.cursor),suggester:n.suggester})}catch{return}}function yO(e){let{prev:t,next:n,state:r}=e;return!n&&t.range.from>=r.doc.nodeSize?{exit:mO({match:t,exitReason:`delete`})}:!n||!t.query.partial?{exit:mO({match:t,exitReason:`invalid-exit-split`})}:t.range.to===n.range.cursor?{exit:mO({match:n,exitReason:`exit-end`})}:t.query.partial?{exit:mO({match:n,exitReason:`exit-split`})}:{}}function bO(e){let{prev:t,next:n,state:r}=e,i=B(),a=vO({state:r,match:t}),{exit:o}=a&&a.query.full!==t.query.full?yO({prev:t,next:a,state:r}):i;return t.range.from<n.range.from?{exit:o??mO({match:t,exitReason:`jump-forward-exit`}),change:mO({match:n,changeReason:`jump-forward-change`})}:{exit:o??mO({match:t,exitReason:`jump-backward-exit`}),change:mO({match:n,changeReason:`jump-backward-change`})}}function xO(e){let{match:t,state:n,$pos:r}=e,{selection:i}=n,a=vO({match:t,state:n});return!a||a.text.full!==t.text.full?yO({prev:t,next:a,state:n}):!i.empty&&(i.from<=t.range.from||i.to>=t.range.to)?{exit:mO({match:t,exitReason:`selection-outside`})}:r.pos>t.range.to?{exit:mO({match:t,exitReason:`move-end`})}:r.pos<=t.range.from?{exit:mO({match:t,exitReason:`move-start`})}:{}}function SO(e){let{prev:t,next:n,state:r,$pos:i}=e,a=B();if(!t&&!n)return a;let o={prev:t,next:n};return sO(o)?bO({prev:o.prev,next:o.next,state:r}):aO(o)?{change:mO({match:o.next,changeReason:`start`})}:oO(o)?xO({$pos:i,match:o.prev,state:r}):rO(o)?{change:mO({match:o.next,changeReason:`change-character`})}:iO(o)?{change:mO({match:o.next,changeReason:r.selection.empty?`move`:`selection-inside`})}:a}function CO(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 wO(e,t){let{$from:n,$to:r}=e;return TO(e,t)?!0:_b(n.pos,r.pos).some(e=>EO(n.doc.resolve(e),t))}function TO(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 EO(e,t){let n=new Set(e.marks().map(e=>e.type.name));return t.some(e=>n.has(e))}function DO(e,t){let{$cursor:n}=t,{validMarks:r,validNodes:i,invalidMarks:a,invalidNodes:o}=e;return!r&&!i&&tb(a)&&tb(o)?!0:!(r&&!TO(t,r)||i&&!CO(n,i)||!r&&wO(t,a)||!i&&CO(n,o))}function OO(e){let{suggesters:t,$pos:n,selectionEmpty:r}=e;for(let e of t)if(!(e.emptySelectionsOnly&&!r))try{let t=_O({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(DO(e,r)&&e.isValidPosition(r,t))return t}catch{}}function kO(e){return Xy(e)?e.source:e}function AO(e){return e?`^`:``}function jO(e,t){return`(?:${kO(e)}){${t},}`}function MO(e){return Vy(e)?new RegExp((0,nO.default)(e)):e}function NO(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=MO(t).source;return a&&(u=`(${u})`),RegExp(`${AO(r)}${u}${jO(i,n)}`,l)}var PO={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},FO=`__ignore_prosemirror_suggest_update__`,IO=class e{static create(t){return new e(t)}#e=!1;#t=!1;#n;#r;#i;#a=B();view;#o=mD.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=LO();this.#n=e.map(t),this.#n=fb(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=GS.findFrom(r,1,!0);if(pO(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||!fO(i))return;let a=t===r?.suggester.appendTransaction&&this.shouldRunExit(),o=t===n?.suggester.appendTransaction;if(!(!a&&!o)){if(n&&r&&dO({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,cO(r.exitReason)&&(this.#a=B()))}}mapIgnoredDecorations(e){let t=this.#o.map(e.mapping,e.doc),n=t.find().filter(({from:e,to:t,spec:n})=>{let r=Vy(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+(Vy(r.char)?r.char.length:1),a=r.ignoredClassName?{class:r.ignoredClassName}:{},o=dD.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=Vy(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=mD.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=B(),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=pO(n.selection)?OO({suggesters:i,$pos:t,docChanged:r,selectionEmpty:a}):void 0;this.#r=o&&this.shouldIgnoreMatch(o)?void 0:o,this.#a=SO({next:this.#r,prev:this.#i,state:n,$pos:t})}findMatchAtPosition=(e,t)=>OO({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=LO();return t?this.#n=this.#n.map(r=>r===t?n(e):r):this.#n=fb([...this.#n,n(e)],(e,t)=>t.priority-e.priority),()=>this.removeSuggester(e.name)}removeSuggester(e){let t=Vy(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(!fO(t))return this.#o;let{disableDecorations:n}=t.suggester;if(Uy(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,[dD.inline(c,l,{nodeName:o,class:a?`${s} suggest-${a}`:s},{name:a})])}setLastChangeFromAppend=()=>{this.#c=!0}};function LO(){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={...PO,...t};return e.add(t.name),n}}var RO=new gC(`suggest`);function zO(e){return RO.getState(e)}function BO(e,t){return zO(e).addSuggester(t)}function VO(e){e.setMeta(FO,!0)}function HO(e,t){return zO(e).removeSuggester(t)}function UO(...e){let t=IO.create(e);return new pC({key:RO,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 WO(e,t){let n=Object.getPrototypeOf(t),r=e.selection,i=e.doc,a=e.storedMarks,o=B();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 GO(e){return({state:t,dispatch:n,view:r,tr:i})=>e(WO(i,t),n,r)}function KO(e){return t=>(V(t.dispatch===void 0||t.dispatch===t.view?.dispatch,{code:z.NON_CHAINABLE_COMMAND}),e(t))}vC();var qO={get isBrowser(){return!!(typeof window<`u`&&window.document!==void 0&&window.navigator&&window.navigator.userAgent)},get isJSDOM(){return qO.isBrowser&&window.navigator.userAgent.includes(`jsdom`)},get isNode(){return typeof process<`u`&&process.versions!=null&&process.versions.node!=null},get isIos(){return qO.isBrowser&&/iPod|iPhone|iPad/.test(navigator.platform)},get isMac(){return qO.isBrowser&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)},get isApple(){return qO.isNode?process.platform===`darwin`:qO.isBrowser?/Mac|iPod|iPhone|iPad/.test(window.navigator.platform):!1},get isDevelopment(){return!1},get isTest(){return!1},get isProduction(){return!0}};function JO(e,t){return(Gk(e)?.getComputedStyle(e))?.getPropertyValue(t)??``}function YO(e){return Yy(e)&&Hy(e.nodeType)&&Vy(e.nodeName)}function XO(e){return YO(e)&&e.nodeType===1}function ZO(e){let{types:t,node:n}=e;if(!n)return!1;let r=e=>e===n.type||e===n.type.name;return eb(t)?t.some(r):r(t)}function QO(e){let{predicate:t,selection:n}=e,r=yk(n)?n.selection.$from:xk(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 $O(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 ek(e){let{types:t,selection:n}=e;return QO({predicate:e=>ZO({types:t,node:e}),selection:n})}function tk(e){let{types:t,selection:n}=e;if(!(!wk(n)||!ZO({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 nk(e){return xk(e)?e.empty:e.selection.empty}function rk(e){return e.docChanged||e.selectionSet}function ik(e){return!!ak(e)}function ak(e){let{state:t,type:n,attrs:r}=e,{selection:i,doc:a}=t,o=Vy(n)?a.type.schema.nodes[n]:n;V(o,{code:z.SCHEMA,message:`No node exists for ${n}`});let s=tk({selection:i,types:n})??QO({predicate:e=>e.type===o,selection:i});return!r||$y(r)||!s||s.node.hasMarkup(o,{...s.node.attrs,...r})?s:void 0}function ok(...e){return t=>{if(!nb(e))return!1;let[n,...r]=e,i=!1,a=(...e)=>()=>{if(!nb(e))return!1;i=!0;let[,...n]=e;return ok(...e)({...t,next:a(...n)})},o=a(...r),s=n({...t,next:o});return i||s?s:o()}}function sk(e,t){let n=new Map,r=B();for(let i of e)for(let[e,a]of My(i)){let i=[...n.get(e)??[],a],o=ok(...i);n.set(e,i),r[e]=t(o)}return r}function ck(e){return sk(e,e=>(t,n,r)=>e({state:t,dispatch:n,view:r,tr:t.tr,next:()=>!1}))}function lk(e,t){let n=e.attrs??{};return Object.entries(t).every(([e,t])=>n[e]===t)}function uk(e){return Yy(e)}function dk(e,t){return eb(t)?Fy(t,e[ay]):t===e[ay]}function fk(e){return Yy(e)&&e instanceof bx}function pk(e,t){return Vy(e)?ky(t.nodes,e):e}function mk(e){return Yy(e)&&e instanceof Cx}function hk(e,t){return Vy(e)?ky(t.marks,e):e}function gk(e){return Yy(e)&&e instanceof $b}function _k(e){return Yy(e)&&e instanceof H}function vk(e){return Yy(e)&&e instanceof Nb}function yk(e){return Yy(e)&&e instanceof dC}function bk(e){return Yy(e)&&e instanceof YS}function xk(e){return Yy(e)&&e instanceof GS}function Sk(e){return Yy(e)&&e instanceof qb}function Ck(e){let{trState:t,from:n,to:r,type:i,attrs:a={}}=e,{doc:o}=t,s=hk(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?lk(e,a):!1),!c)),c}function wk(e){return Yy(e)&&e instanceof ZS}function Tk(e){let{trState:t,type:n,attrs:r={},from:i,to:a}=e,{selection:o,doc:s,storedMarks:c}=t;if(V(Vy(n)?s.type.schema.marks[n]:n,{code:z.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}),i&&a)try{return Math.max(i,a)<s.nodeSize&&Ck({...e,from:i,to:a})}catch{return!1}return o.empty?(c??o.$from.marks()).some(e=>e.type===n?lk(e,r??{}):!1):Ck({...e,from:o.from,to:o.to})}function Ek(e,t={}){let n=Ok(e.type.schema);if(!n)return!1;let{ignoreAttributes:r,ignoreDocAttributes:i}=t;return r?Dk(n,e):i?n.content.eq(e.content):n.eq(e)}function Dk(e,t){if(e===t)return!0;let n=e.type===t.type&&Nb.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||!Dk(t,n))return!1}return!0}return n&&r()}function Ok(e){return e.nodes.doc?.createAndFill()??void 0}function kk(e){for(let t of Object.values(e.nodes))if(t.name!==`doc`&&(t.isBlock||t.isTextblock))return t;V(!1,{code:z.SCHEMA,message:`No default block node found for the provided schema.`})}function Ak(e){return e.type===kk(e.type.schema)}function jk(e){return!!e&&e.type.isBlock&&!e.textContent&&!e.childCount}function Mk(e,t,n){let r=e.parent.childAfter(e.parentOffset);if(!r.node)return;let i=Vy(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?Mk(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,``,`
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=Hx.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=gE(n),pw&&_E(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`)||Ox.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(c||u),context:i,ruleFromNode(e){return e.nodeName==`BR`&&!e.nextSibling&&e.parentNode&&!iE.test(e.parentNode.nodeName)?{ignore:!0}:null}}),u)s=vE(uE(s,+u[1],+u[2]),u[4]);else if(s=U.maxOpen(aE(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=uE(s,e,t)}return e.someProp(`transformPasted`,t=>{s=t(s,e,c)}),s}var iE=/^(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 aE(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&&sE(t,i,e,a[a.length-1],0))a[a.length-1]=n;else{a.length&&(a[a.length-1]=cE(a[a.length-1],i.length));let n=oE(e,t);a.push(n),r=r.matchType(n.type),i=t}}),a)return H.from(a)}return e}function oE(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,H.from(e));return e}function sE(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let a=sE(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(H.from(oE(n,e,i+1))))}}function cE(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,cE(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(H.empty,!0);return e.copy(n.append(r))}function lE(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=lE(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(H.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(s))}function uE(e,t,n){return t<e.openStart&&(e=new U(lE(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new U(lE(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var dE={thead:[`table`],tbody:[`table`],tfoot:[`table`],caption:[`table`],colgroup:[`table`],col:[`table`,`colgroup`],tr:[`table`,`tbody`],td:[`table`,`tbody`,`tr`],th:[`table`,`tbody`,`tr`]},fE=null;function pE(){return fE||=document.implementation.createHTMLDocument(`title`)}var mE=null;function hE(e){let t=window.trustedTypes;return t?(mE||=t.defaultPolicy||t.createPolicy(`ProseMirrorClipboard`,{createHTML:e=>e}),mE.createHTML(e)):e}function gE(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=pE().createElement(`div`),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&dE[r[1].toLowerCase()])&&(e=i.map(e=>`<`+e+`>`).join(``)+e+i.map(e=>`</`+e+`>`).reverse().join(``)),n.innerHTML=hE(e),i)for(let e=0;e<i.length;e++)n=n.querySelector(i[e])||n;return n}function _E(e){let t=e.querySelectorAll(ow?`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 vE(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=H.from(t.create(r[e+1],i)),a++,o++}return new U(i,a,o)}var yE={},bE={},xE={touchstart:!0,touchmove:!0},SE=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 CE(e){for(let t in yE){let n=yE[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{OE(e,t)&&!DE(e,t)&&(e.editable||!(t.type in bE))&&n(e,t)},xE[t]?{passive:!0}:void 0)}cw&&e.dom.addEventListener(`input`,()=>null),EE(e)}function wE(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function TE(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function EE(e){e.someProp(`handleDOMEvents`,t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>DE(e,t))})}function DE(e,t){return e.someProp(`handleDOMEvents`,n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function OE(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 kE(e,t){!DE(e,t)&&yE[t.type]&&(e.editable||!(t.type in bE))&&yE[t.type](e,t)}bE.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!UE(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(fw&&ow&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),lw&&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,qC(13,`Enter`))),e.input.lastIOSEnter=0)},200)}else e.someProp(`handleKeyDown`,t=>t(e,n))||tE(e,n)?n.preventDefault():wE(e,`key`)},bE.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},bE.keypress=(e,t)=>{let n=t;if(UE(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||uw&&n.metaKey)return;if(e.someProp(`handleKeyPress`,t=>t(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof YS)||!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 AE(e){return{left:e.clientX,top:e.clientY}}function jE(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function ME(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 NE(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 PE(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&ZS.isSelectable(r)?(NE(e,new ZS(n),`pointer`),!0):!1}function FE(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof ZS&&(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(ZS.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:(NE(e,ZS.create(e.state.doc,i),`pointer`),!0)}function IE(e,t,n,r,i){return ME(e,`handleClickOn`,t,n,r)||e.someProp(`handleClick`,n=>n(e,t,r))||(i?FE(e,n):PE(e,n))}function LE(e,t,n,r){return ME(e,`handleDoubleClickOn`,t,n,r)||e.someProp(`handleDoubleClick`,n=>n(e,t,r))}function RE(e,t,n,r){return ME(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?(NE(e,YS.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)NE(e,YS.create(r,a+1,a+1+n.content.size),`pointer`);else if(ZS.isSelectable(n))NE(e,ZS.create(r,a),`pointer`);else continue;return!0}}function BE(e){return XE(e)}var VE=uw?`metaKey`:`ctrlKey`;yE.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=BE(e),i=Date.now(),a=`singleClick`;i-e.input.lastClick.time<500&&jE(n,e.input.lastClick)&&!n[VE]&&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(AE(n));o&&(a==`singleClick`?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new HE(e,o,n,!!r)):(a==`doubleClick`?LE:RE)(e,o.pos,o.inside,n)?n.preventDefault():wE(e,`pointer`))};var HE=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[VE],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 ZS&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&iw&&!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)),wE(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(()=>wT(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(AE(e))),this.updateAllowDefault(e),this.allowDefault||!t?wE(this.view,`pointer`):IE(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||cw&&this.mightDrag&&!this.mightDrag.node.isAtom||ow&&!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)?(NE(this.view,GS.near(this.view.state.doc.resolve(t.pos)),`pointer`),e.preventDefault()):wE(this.view,`pointer`)}move(e){this.updateAllowDefault(e),wE(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)}};yE.touchstart=e=>{e.input.lastTouch=Date.now(),BE(e),wE(e,`pointer`)},yE.touchmove=e=>{e.input.lastTouch=Date.now(),wE(e,`pointer`)},yE.contextmenu=e=>BE(e);function UE(e,t){return e.composing?!0:cw&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var WE=fw?5e3:-1;bE.compositionstart=bE.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof YS&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>e.type.spec.inclusive===!1)||ow&&dw&&GE(e)))e.markCursor=e.state.storedMarks||n.marks(),XE(e,!0),e.markCursor=null;else if(XE(e,!t.selection.empty),iw&&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}KE(e,WE)};function GE(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`}bE.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++,KE(e,20))};function KE(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>XE(e),t))}function qE(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=YE());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function JE(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=HC(t.focusNode,t.focusOffset),r=UC(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 YE(){let e=document.createEvent(`Event`);return e.initEvent(`event`,!0,!0),e.timeStamp}function XE(e,t=!1){if(!(fw&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),qE(e),t||e.docView&&e.docView.dirty){let n=ST(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 ZE(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 QE=nw&&rw<15||lw&&mw<604;yE.copy=bE.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type==`cut`;if(r.empty)return;let a=QE?null:n.clipboardData,{dom:o,text:s}=nE(e,r.content());a?(n.preventDefault(),a.clearData(),a.setData(`text/html`,o.innerHTML),a.setData(`text/plain`,s)):ZE(e,o),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta(`uiEvent`,`cut`))};function $E(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function eD(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?tD(e,r.value,null,i,t):tD(e,r.textContent,r.innerHTML,i,t)},50)}function tD(e,t,n,r,i){let a=rE(e,t,n,r,e.state.selection.$from);if(e.someProp(`handlePaste`,t=>t(e,i,a||U.empty)))return!0;if(!a)return!1;let o=$E(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 nD(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,` `):``}bE.paste=(e,t)=>{let n=t;if(e.composing&&!fw)return;let r=QE?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&tD(e,nD(r),r.getData(`text/html`),i,n)?n.preventDefault():eD(e,n)};var rD=class{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}},iD=uw?`altKey`:`ctrlKey`;function aD(e,t){return e.someProp(`dragCopies`,e=>!e(t))??!t[iD]}yE.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(AE(n)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof ZS?i.to-1:i.to))){if(r&&r.mightDrag)o=ZS.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=ZS.create(e.state.doc,t.posBefore))}}let{dom:s,text:c,slice:l}=nE(e,(o||e.state.selection).content());(!n.dataTransfer.files.length||!ow||sw>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(QE?`Text`:`text/html`,s.innerHTML),n.dataTransfer.effectAllowed=`copyMove`,QE||n.dataTransfer.setData(`text/plain`,c),e.dragging=new rD(l,aD(e,n),o)},yE.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},bE.dragover=bE.dragenter=(e,t)=>t.preventDefault(),bE.drop=(e,t)=>{try{oD(e,t,e.dragging)}finally{e.dragging=null}};function oD(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(AE(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=rE(e,nD(t.dataTransfer),QE?null:t.dataTransfer.getData(`text/html`),!1,i);let o=!!(n&&aD(e,t));if(e.someProp(`handleDrop`,n=>n(e,t,a||U.empty,o))){t.preventDefault();return}if(!a)return;t.preventDefault();let s=a?cre(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&&ZS.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new ZS(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(NT(e,f,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta(`uiEvent`,`drop`))}yE.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())&&wT(e)},20))},yE.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)},yE.beforeinput=(e,t)=>{if(ow&&fw&&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,qC(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)}};for(let e in bE)yE[e]=bE[e];function sD(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 cD=class e{constructor(e,t){this.toDOM=e,this.spec=t||pD,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 dD(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&&sD(this.spec,t.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},lD=class e{constructor(e,t){this.attrs=e,this.spec=t||pD}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 dD(i,a,this)}valid(e,t){return t.from<t.to}eq(t){return this==t||t instanceof e&&sD(this.attrs,t.attrs)&&sD(this.spec,t.spec)}static is(t){return t.type instanceof e}destroy(){}},uD=class e{constructor(e,t){this.attrs=e,this.spec=t||pD}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 dD(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&&sD(this.attrs,t.attrs)&&sD(this.spec,t.spec)}destroy(){}},dD=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 cD(n,r))}static inline(t,n,r,i){return new e(t,n,new lD(r,i))}static node(t,n,r,i){return new e(t,n,new uD(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof lD}get widget(){return this.type instanceof cD}},fD=[],pD={},mD=class e{constructor(e,t){this.local=e.length?e:fD,this.children=t.length?t:fD}static create(e,t){return t.length?SD(t,e,0,pD):hD}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==hD||e.maps.length==0?this:this.mapInner(e,t,0,0,n||pD)}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?_D(this.children,o||[],t,n,r,i,a):o?new e(o.sort(CD),fD):hD}add(t,n){return n.length?this==hD?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=bD(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,SD(s,e,o+1,pD)),a+=3}});let o=vD(a?xD(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(CD):this.local,i||this.children)}remove(e){return e.length==0||this==hD?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==hD?(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):hD}forChild(t,n){if(this==hD)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 lD){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(CD),fD);return r?new gD([t,r]):t}return r||hD}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 wD(this.localsInner(e))}localsInner(e){if(this==hD)return fD;if(e.inlineContent||!this.local.some(lD.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof lD||t.push(this.local[e]);return t}forEachSet(e){e(this)}};mD.empty=new mD([],[]),mD.removeOverlap=wD;var hD=mD.empty,gD=class e{constructor(e){this.members=e}map(t,n){let r=this.members.map(e=>e.map(t,n,pD));return e.from(r)}forChild(t,n){if(n.isLeaf)return mD.empty;let r=[];for(let i=0;i<this.members.length;i++){let a=this.members[i].forChild(t,n);a!=hD&&(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?wD(n?t:t.sort(CD)):fD}static from(t){switch(t.length){case 0:return hD;case 1:return t[0];default:return new e(t.every(e=>e instanceof mD)?t:t.reduce((e,t)=>e.concat(t instanceof mD?t:t.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}};function _D(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==hD?(s[t+1]=-2,c=!0):(s[t]=u,s[t+1]=d,s[t+2]=r)}else c=!0}if(c){let c=SD(yD(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 mD(t.sort(CD),s)}function vD(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 dD(i.from+t,i.to+t,i.type))}return n}function yD(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 bD(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 xD(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function SD(e,t,n,r){let i=[],a=!1;t.forEach((t,o)=>{let s=bD(e,t,o+n);if(s){a=!0;let e=SD(s,t,n+o+1,r);e!=hD&&i.push(o,o+t.nodeSize,e)}});let o=vD(a?xD(e):e,-n).sort(CD);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 mD(o,i):hD}function CD(e,t){return e.from-t.from||e.to-t.to}function wD(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),TD(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),TD(t,i,r.copy(a.from,r.to)));break}}}return t}function TD(e,t,n){for(;t<e.length&&CD(n,e[t])>0;)t++;e.splice(t,0,n)}function ED(e){let t=[];return e.someProp(`decorations`,n=>{let r=n(e.state);r&&r!=hD&&t.push(r)}),e.cursorWrapper&&t.push(mD.create(e.state.doc,[e.cursorWrapper.deco])),gD.from(t)}var DD={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},OD=nw&&rw<=11,kD=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}},AD=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new kD,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]);nw&&rw<=11&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():cw&&e.composing&&t.some(e=>e.type==`childList`&&e.target.nodeName==`TR`)?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),OD&&(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,DD)),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(PT(this.view)){if(this.suppressingSelectionUpdates)return wT(this.view);if(nw&&rw<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&RC(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=PC(n))t.add(n);for(let r=e.anchorNode;r;r=PC(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)&&PT(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(iw&&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||ID(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&&KC(n)&&(c=ST(e))&&c.eq(GS.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,wT(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||r)&&(i>-1&&(e.docView.markDirty(i,a),ND(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,LD(e,s)),this.handleDOMChange(i,a,o,s),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||wT(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(nw&&rw<=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?NC(r)+1:0,o=n.localPosFromDOM(e.target,a,-1),s=i&&i.parentNode==e.target?NC(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}}},jD=new WeakMap,MD=!1;function ND(e){if(!jD.has(e)&&(jD.set(e,null),[`normal`,`nowrap`,`pre-line`].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=iw,MD)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.`),MD=!0}}function PD(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.domAtPos(e.state.selection.anchor);return RC(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function FD(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return PD(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?PD(e,n):null}function ID(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 LD(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 RD(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}],KC(c)||l.push({node:c.focusNode,offset:c.focusOffset})),ow&&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`)||Ox.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(cw&&/^(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||cw&&/^(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 BD=/^(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 VD(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=ST(e,t);if(n&&!e.state.selection.eq(n)){if(ow&&fw&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp(`handleKeyDown`,t=>t(e,qC(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=RD(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=KD(d.content,l.doc.content,l.from,f,p);if(m&&e.input.domChangeCount++,(lw&&e.input.lastIOSEnter>Date.now()-225||fw)&&i.some(e=>e.nodeType==1&&!BD.test(e.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp(`handleKeyDown`,t=>t(e,qC(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(!m)if(r&&c instanceof YS&&!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=HD(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 YS&&(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)),nw&&rw<=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((lw&&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,qC(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&WD(u,m.start,m.endA,h,g)&&e.someProp(`handleKeyDown`,t=>t(e,qC(8,`Backspace`)))){fw&&ow&&e.domObserver.suppressSelectionUpdates();return}ow&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),fw&&!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,qC(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=HD(e,n.doc,l.sel);t&&!(ow&&e.composing&&t.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==y||t.head==n.mapping.map(b)-1)||nw&&t.empty&&t.head==y)&&n.setSelection(t)}return a&&n.setMeta(`composition`,a),n.scrollIntoView()},S;if(v)if(h.pos==g.pos){nw&&rw<=11&&h.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>wT(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=UD(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 HD(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:NT(e,t.resolve(n.anchor),t.resolve(n.head))}function UD(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(H.from(l).eq(e))return{mark:s,type:o}}function WD(e,t,n,r,i){if(n-t<=i.pos-r.pos||GD(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(GD(a,!0,!0));return!o.parent.isTextblock||o.pos>n||GD(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function GD(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 KD(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&&qD(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&&qD(e.textBetween(a-1,a+1))&&(a+=t?1:-1),o=a+(o-s),s=a}return{start:a,endA:o,endB:s}}function qD(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 JD=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 SE,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(tO),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=ZD(this),XD(this),this.nodeViews=$D(this),this.docView=nT(this.state.doc,YD(this),ED(this),this.dom,this),this.domObserver=new AD(this,(e,t,n,r)=>VD(this,e,t,n,r)),this.domObserver.start(),CE(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&EE(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(tO),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in 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&&(qE(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=$D(this);eO(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(a||t.handleDOMEvents!=this._props.handleDOMEvents)&&EE(this),this.editable=ZD(this),XD(this);let o=ED(this),s=YD(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&&yw(this);if(i){this.domObserver.stop();let t=l&&(nw||ow)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&QD(n.selection,e.selection);if(l){let n=ow?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=JE(this)),(r||!this.docView.update(e.doc,s,o,this))&&(this.docView.updateOuterDeco(s),this.docView.destroy(),this.docView=nT(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())&&IT(this))?wT(this,t):(jT(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&&xw(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 ZS){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&vw(this,t.getBoundingClientRect(),e)}else vw(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 rD(e.slice,e.move,r<0?void 0:ZS.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(nw){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&&ww(this.dom),wT(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 Mw(this,e)}coordsAtPos(e,t=1){return Iw(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 Kw(this,t||this.state,e)}pasteHTML(e,t){return tD(this,``,e,!1,t||new ClipboardEvent(`paste`))}pasteText(e,t){return tD(this,e,null,!0,t||new ClipboardEvent(`paste`))}serializeForClipboard(e){return nE(this,e)}destroy(){this.docView&&(TE(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ED(this),this),this.dom.textContent=``):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,LC())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return kE(this,e)}domSelectionRange(){let e=this.domSelection();return e?cw&&this.root.nodeType===11&&JC(this.dom.ownerDocument)==this.dom&&FD(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};JD.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function YD(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`,[dD.node(0,e.state.doc.content.size,t)]}function XD(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:dD.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function ZD(e){return!e.someProp(`editable`,t=>t(e.state)===!1)}function QD(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 $D(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 eO(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 tO(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 nO=e(i(((e,t)=>{t.exports=e=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}}))(),1);function rO(e){return!!(e.prev&&e.next&&e.prev.text.full!==e.next.text.full)}function iO(e){return!!(e.prev&&e.next&&e.prev.range.cursor!==e.next.range.cursor)}function aO(e){return!!(!e.prev&&e.next)}function oO(e){return!!(e.prev&&!e.next)}function sO(e){return!!(e.prev&&e.next&&e.prev.range.from!==e.next.range.from)}function cO(e){return e===`invalid-exit-split`}var lO=[`jump-backward-exit`,`jump-forward-exit`],uO=[`jump-backward-change`,`jump-forward-change`];function dO(e){return Fy(lO,e.exit?.exitReason)||Fy(uO,e.change?.changeReason)}function fO(e){return!!(e&&e.query.full.length>=e.suggester.matchOffset)}function pO(e){return Yy(e)&&e instanceof YS}function mO(e){let{match:t,changeReason:n,exitReason:r}=e;return{...t,changeReason:n,exitReason:r}}function hO(e,t){let{invalidPrefixCharacters:n,validPrefixCharacters:r}=t;return n?!new RegExp(kO(n)).test(e):new RegExp(kO(r)).test(e)}function gO(e){let{text:t,regexp:n,$pos:r,suggester:i}=e,a=r.start(),o;return rb(t,n).forEach(e=>{if(hO(e.input.slice(Math.max(0,e.index-1),e.index),i)){let t=e.index+a,n=e[0],s=e[1];if(!Vy(n)||!Vy(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 _O(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=NO({char:r,matchOffset:s,startOfLine:a,supportedCharacters:o,multiline:c,caseInsensitive:l,unicode:u});return gO({suggester:n,text:t.doc.textBetween(t.before(),t.end(),`\0`,`\0`),regexp:d,$pos:t,char:r,name:i})}function vO(e){let{state:t,match:n}=e;try{return _O({$pos:t.doc.resolve(n.range.cursor),suggester:n.suggester})}catch{return}}function yO(e){let{prev:t,next:n,state:r}=e;return!n&&t.range.from>=r.doc.nodeSize?{exit:mO({match:t,exitReason:`delete`})}:!n||!t.query.partial?{exit:mO({match:t,exitReason:`invalid-exit-split`})}:t.range.to===n.range.cursor?{exit:mO({match:n,exitReason:`exit-end`})}:t.query.partial?{exit:mO({match:n,exitReason:`exit-split`})}:{}}function bO(e){let{prev:t,next:n,state:r}=e,i=B(),a=vO({state:r,match:t}),{exit:o}=a&&a.query.full!==t.query.full?yO({prev:t,next:a,state:r}):i;return t.range.from<n.range.from?{exit:o??mO({match:t,exitReason:`jump-forward-exit`}),change:mO({match:n,changeReason:`jump-forward-change`})}:{exit:o??mO({match:t,exitReason:`jump-backward-exit`}),change:mO({match:n,changeReason:`jump-backward-change`})}}function xO(e){let{match:t,state:n,$pos:r}=e,{selection:i}=n,a=vO({match:t,state:n});return!a||a.text.full!==t.text.full?yO({prev:t,next:a,state:n}):!i.empty&&(i.from<=t.range.from||i.to>=t.range.to)?{exit:mO({match:t,exitReason:`selection-outside`})}:r.pos>t.range.to?{exit:mO({match:t,exitReason:`move-end`})}:r.pos<=t.range.from?{exit:mO({match:t,exitReason:`move-start`})}:{}}function SO(e){let{prev:t,next:n,state:r,$pos:i}=e,a=B();if(!t&&!n)return a;let o={prev:t,next:n};return sO(o)?bO({prev:o.prev,next:o.next,state:r}):aO(o)?{change:mO({match:o.next,changeReason:`start`})}:oO(o)?xO({$pos:i,match:o.prev,state:r}):rO(o)?{change:mO({match:o.next,changeReason:`change-character`})}:iO(o)?{change:mO({match:o.next,changeReason:r.selection.empty?`move`:`selection-inside`})}:a}function CO(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 wO(e,t){let{$from:n,$to:r}=e;return TO(e,t)?!0:_b(n.pos,r.pos).some(e=>EO(n.doc.resolve(e),t))}function TO(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 EO(e,t){let n=new Set(e.marks().map(e=>e.type.name));return t.some(e=>n.has(e))}function DO(e,t){let{$cursor:n}=t,{validMarks:r,validNodes:i,invalidMarks:a,invalidNodes:o}=e;return!r&&!i&&tb(a)&&tb(o)?!0:!(r&&!TO(t,r)||i&&!CO(n,i)||!r&&wO(t,a)||!i&&CO(n,o))}function OO(e){let{suggesters:t,$pos:n,selectionEmpty:r}=e;for(let e of t)if(!(e.emptySelectionsOnly&&!r))try{let t=_O({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(DO(e,r)&&e.isValidPosition(r,t))return t}catch{}}function kO(e){return Xy(e)?e.source:e}function AO(e){return e?`^`:``}function jO(e,t){return`(?:${kO(e)}){${t},}`}function MO(e){return Vy(e)?new RegExp((0,nO.default)(e)):e}function NO(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=MO(t).source;return a&&(u=`(${u})`),RegExp(`${AO(r)}${u}${jO(i,n)}`,l)}var PO={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},FO=`__ignore_prosemirror_suggest_update__`,IO=class e{static create(t){return new e(t)}#e=!1;#t=!1;#n;#r;#i;#a=B();view;#o=mD.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=LO();this.#n=e.map(t),this.#n=fb(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=GS.findFrom(r,1,!0);if(pO(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||!fO(i))return;let a=t===r?.suggester.appendTransaction&&this.shouldRunExit(),o=t===n?.suggester.appendTransaction;if(!(!a&&!o)){if(n&&r&&dO({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,cO(r.exitReason)&&(this.#a=B()))}}mapIgnoredDecorations(e){let t=this.#o.map(e.mapping,e.doc),n=t.find().filter(({from:e,to:t,spec:n})=>{let r=Vy(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+(Vy(r.char)?r.char.length:1),a=r.ignoredClassName?{class:r.ignoredClassName}:{},o=dD.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=Vy(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=mD.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=B(),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=pO(n.selection)?OO({suggesters:i,$pos:t,docChanged:r,selectionEmpty:a}):void 0;this.#r=o&&this.shouldIgnoreMatch(o)?void 0:o,this.#a=SO({next:this.#r,prev:this.#i,state:n,$pos:t})}findMatchAtPosition=(e,t)=>OO({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=LO();return t?this.#n=this.#n.map(r=>r===t?n(e):r):this.#n=fb([...this.#n,n(e)],(e,t)=>t.priority-e.priority),()=>this.removeSuggester(e.name)}removeSuggester(e){let t=Vy(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(!fO(t))return this.#o;let{disableDecorations:n}=t.suggester;if(Uy(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,[dD.inline(c,l,{nodeName:o,class:a?`${s} suggest-${a}`:s},{name:a})])}setLastChangeFromAppend=()=>{this.#c=!0}};function LO(){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={...PO,...t};return e.add(t.name),n}}var RO=new gC(`suggest`);function zO(e){return RO.getState(e)}function BO(e,t){return zO(e).addSuggester(t)}function VO(e){e.setMeta(FO,!0)}function HO(e,t){return zO(e).removeSuggester(t)}function UO(...e){let t=IO.create(e);return new pC({key:RO,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 WO(e,t){let n=Object.getPrototypeOf(t),r=e.selection,i=e.doc,a=e.storedMarks,o=B();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 GO(e){return({state:t,dispatch:n,view:r,tr:i})=>e(WO(i,t),n,r)}function KO(e){return t=>(V(t.dispatch===void 0||t.dispatch===t.view?.dispatch,{code:z.NON_CHAINABLE_COMMAND}),e(t))}vC();var qO={get isBrowser(){return!!(typeof window<`u`&&window.document!==void 0&&window.navigator&&window.navigator.userAgent)},get isJSDOM(){return qO.isBrowser&&window.navigator.userAgent.includes(`jsdom`)},get isNode(){return typeof process<`u`&&process.versions!=null&&process.versions.node!=null},get isIos(){return qO.isBrowser&&/iPod|iPhone|iPad/.test(navigator.platform)},get isMac(){return qO.isBrowser&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)},get isApple(){return qO.isNode?process.platform===`darwin`:qO.isBrowser?/Mac|iPod|iPhone|iPad/.test(window.navigator.platform):!1},get isDevelopment(){return!1},get isTest(){return!1},get isProduction(){return!0}};function JO(e,t){return(Gk(e)?.getComputedStyle(e))?.getPropertyValue(t)??``}function YO(e){return Yy(e)&&Hy(e.nodeType)&&Vy(e.nodeName)}function XO(e){return YO(e)&&e.nodeType===1}function ZO(e){let{types:t,node:n}=e;if(!n)return!1;let r=e=>e===n.type||e===n.type.name;return eb(t)?t.some(r):r(t)}function QO(e){let{predicate:t,selection:n}=e,r=yk(n)?n.selection.$from:xk(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 $O(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 ek(e){let{types:t,selection:n}=e;return QO({predicate:e=>ZO({types:t,node:e}),selection:n})}function tk(e){let{types:t,selection:n}=e;if(!(!wk(n)||!ZO({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 nk(e){return xk(e)?e.empty:e.selection.empty}function rk(e){return e.docChanged||e.selectionSet}function ik(e){return!!ak(e)}function ak(e){let{state:t,type:n,attrs:r}=e,{selection:i,doc:a}=t,o=Vy(n)?a.type.schema.nodes[n]:n;V(o,{code:z.SCHEMA,message:`No node exists for ${n}`});let s=tk({selection:i,types:n})??QO({predicate:e=>e.type===o,selection:i});return!r||$y(r)||!s||s.node.hasMarkup(o,{...s.node.attrs,...r})?s:void 0}function ok(...e){return t=>{if(!nb(e))return!1;let[n,...r]=e,i=!1,a=(...e)=>()=>{if(!nb(e))return!1;i=!0;let[,...n]=e;return ok(...e)({...t,next:a(...n)})},o=a(...r),s=n({...t,next:o});return i||s?s:o()}}function sk(e,t){let n=new Map,r=B();for(let i of e)for(let[e,a]of My(i)){let i=[...n.get(e)??[],a],o=ok(...i);n.set(e,i),r[e]=t(o)}return r}function ck(e){return sk(e,e=>(t,n,r)=>e({state:t,dispatch:n,view:r,tr:t.tr,next:()=>!1}))}function lk(e,t){let n=e.attrs??{};return Object.entries(t).every(([e,t])=>n[e]===t)}function uk(e){return Yy(e)}function dk(e,t){return eb(t)?Fy(t,e[ay]):t===e[ay]}function fk(e){return Yy(e)&&e instanceof bx}function pk(e,t){return Vy(e)?ky(t.nodes,e):e}function mk(e){return Yy(e)&&e instanceof Cx}function hk(e,t){return Vy(e)?ky(t.marks,e):e}function gk(e){return Yy(e)&&e instanceof $b}function _k(e){return Yy(e)&&e instanceof H}function vk(e){return Yy(e)&&e instanceof Nb}function yk(e){return Yy(e)&&e instanceof dC}function bk(e){return Yy(e)&&e instanceof YS}function xk(e){return Yy(e)&&e instanceof GS}function Sk(e){return Yy(e)&&e instanceof qb}function Ck(e){let{trState:t,from:n,to:r,type:i,attrs:a={}}=e,{doc:o}=t,s=hk(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?lk(e,a):!1),!c)),c}function wk(e){return Yy(e)&&e instanceof ZS}function Tk(e){let{trState:t,type:n,attrs:r={},from:i,to:a}=e,{selection:o,doc:s,storedMarks:c}=t;if(V(Vy(n)?s.type.schema.marks[n]:n,{code:z.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}),i&&a)try{return Math.max(i,a)<s.nodeSize&&Ck({...e,from:i,to:a})}catch{return!1}return o.empty?(c??o.$from.marks()).some(e=>e.type===n?lk(e,r??{}):!1):Ck({...e,from:o.from,to:o.to})}function Ek(e,t={}){let n=Ok(e.type.schema);if(!n)return!1;let{ignoreAttributes:r,ignoreDocAttributes:i}=t;return r?Dk(n,e):i?n.content.eq(e.content):n.eq(e)}function Dk(e,t){if(e===t)return!0;let n=e.type===t.type&&Nb.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||!Dk(t,n))return!1}return!0}return n&&r()}function Ok(e){return e.nodes.doc?.createAndFill()??void 0}function kk(e){for(let t of Object.values(e.nodes))if(t.name!==`doc`&&(t.isBlock||t.isTextblock))return t;V(!1,{code:z.SCHEMA,message:`No default block node found for the provided schema.`})}function Ak(e){return e.type===kk(e.type.schema)}function jk(e){return!!e&&e.type.isBlock&&!e.textContent&&!e.childCount}function Mk(e,t,n){let r=e.parent.childAfter(e.parentOffset);if(!r.node)return;let i=Vy(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?Mk(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
44
 
45
45
  `);return{from:s,to:l,text:u,mark:a}}function Nk(e){return e.content.firstChild?.textContent??``}function Pk(e,t){if(!bk(e.selection))return;let{from:n,to:r}=e.selection,i=(t,n)=>Nk(YS.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
46
 
@@ -173,8 +173,8 @@ ${e}</ul>
173
173
  `},listitem(e,t,n){return t?`<li data-task-list-item ${n?`data-checked`:``}>${e}</li>
174
174
  `:`<li>${e}</li>
175
175
  `}}});function TL(e,t){let n=Y(e,{gfm:!0,smartLists:!0,xhtml:!0});return t?t(n):n}var EL=class extends uj{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=Hx.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}};hL([K()],EL.prototype,`insertMarkdown`,1),hL([vj()],EL.prototype,`getMarkdown`,1),hL([K()],EL.prototype,`toggleBoldMarkdown`,1),EL=hL([_j({defaultOptions:{htmlToMarkdown:_L,markdownToHtml:TL,htmlSanitizer:void 0,activeNodes:[iy.Code],copyAsMarkdown:!1},staticKeys:[`htmlToMarkdown`,`markdownToHtml`,`htmlSanitizer`]})],EL);var DL=Object.defineProperty,OL=Object.getOwnPropertyDescriptor,kL=(e,t,n,r)=>{for(var i=r>1?void 0:r?OL(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&&DL(t,n,i),i},AL={icon:`paragraph`,label:({t:e})=>e(TC.INSERT_LABEL),description:({t:e})=>e(TC.INSERT_DESCRIPTION)},jL={icon:`paragraph`,label:({t:e})=>e(TC.CONVERT_LABEL),description:({t:e})=>e(TC.CONVERT_DESCRIPTION)},ML=class extends fj{get name(){return`paragraph`}createTags(){return[iy.LastNodeCompatible,iy.TextBlock,iy.Block,iy.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)}};kL([K(jL)],ML.prototype,`convertParagraph`,1),kL([K(AL)],ML.prototype,`insertParagraph`,1),kL([yj({shortcut:R.Paragraph,command:`convertParagraph`})],ML.prototype,`shortcut`,1),ML=kL([_j({defaultPriority:sy.Medium})],ML);var NL=Object.defineProperty,PL=Object.getOwnPropertyDescriptor,FL=(e,t,n,r)=>{for(var i=r>1?void 0:r?PL(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&&NL(t,n,i),i},IL=class extends uj{get name(){return`placeholder`}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(e,t)=>({...this.options,empty:Ek(t.doc,{ignoreAttributes:!0})}),apply:(e,t,n,r)=>LL({pluginState:t,tr:e,extension:this,state:r})},props:{decorations:e=>RL({state:e,extension:this})}}}onSetOptions(e){let{changes:t}=e;t.placeholder.changed&&this.store.phase>=cy.EditorView&&this.store.updateAttributes()}};IL=FL([_j({defaultOptions:{emptyNodeClass:OM.IS_EMPTY,placeholder:``}})],IL);function LL(e){let{pluginState:t,extension:n,tr:r,state:i}=e;return r.docChanged?{...n.options,empty:Ek(i.doc)}:t}function RL(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=dD.node(t,t+e.nodeSize,{class:i,"data-placeholder":a});o.push(n)}),mD.create(n.doc,o)}var zL=Object.defineProperty,BL=Object.getOwnPropertyDescriptor,VL=(e,t,n,r)=>{for(var i=r>1?void 0:r?BL(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&&zL(t,n,i),i},HL=class extends fj{get name(){return`text`}createTags(){return[iy.InlineNode]}createNodeSpec(){return{}}};HL=VL([_j({disableExtraAttributes:!0,defaultPriority:sy.Medium})],HL);var UL={...cP.defaultOptions,...ML.defaultOptions,...LP.defaultOptions,excludeExtensions:[]};function WL(e={}){e={...UL,...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 LP({depth:n,getDispatch:r,getState:i,newGroupDelay:a});c.push(e)}return s.doc||c.push(new cP({content:t})),s.text||c.push(new HL),s.paragraph||c.push(new ML),s.positioner||c.push(new bN),s.gapCursor||c.push(new NP),s.events||c.push(new _P),c}var GL=Object.defineProperty,KL=Object.getOwnPropertyDescriptor,qL=(e,t,n,r)=>{for(var i=r>1?void 0:r?KL(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&&GL(t,n,i),i},JL=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},X=(e,t,n)=>(JL(e,t,`read from private field`),n?n.call(e):t.get(e)),YL=(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)},XL=(e,t,n,r)=>(JL(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),ZL,QL=class{constructor(){this.portals=new Map,YL(this,ZL,ej()),this.on=e=>X(this,ZL).on(`update`,e),this.once=e=>{let t=X(this,ZL).on(`update`,n=>{t(),e(n)});return t}}update(){X(this,ZL).emit(`update`,this.portals)}render({Component:e,container:t}){let n=this.portals.get(t);this.portals.set(t,{Component:e,key:n?.key??ab()}),this.update()}forceUpdate(){for(let[e,{Component:t}]of this.portals)this.portals.set(e,{Component:t,key:ab()})}remove(e){this.portals.delete(e),this.update()}};ZL=new WeakMap;var $L=e=>{let{portals:t}=e;return N.createElement(N.Fragment,null,t.map(([e,{Component:t,key:n}])=>(0,Pl.createPortal)(N.createElement(t,null),e,n)))};function eR(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 tR,nR,rR,iR,aR,oR,sR,cR,lR,uR,dR,fR,pR=class{constructor({getPosition:e,node:t,portalContainer:n,view:r,ReactComponent:i,options:a}){YL(this,tR,void 0),YL(this,nR,[]),YL(this,rR,void 0),YL(this,iR,void 0),YL(this,aR,void 0),YL(this,oR,void 0),YL(this,sR,void 0),YL(this,cR,!1),YL(this,lR,void 0),YL(this,uR,void 0),YL(this,dR,void 0),YL(this,fR,e=>{e&&(V(X(this,uR),{code:z.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${X(this,tR).type.name}' which doesn't support content.`}),e.append(X(this,uR)))}),this.Component=()=>{let e=X(this,aR);return V(e,{code:z.REACT_NODE_VIEW,message:`The custom react node view provided for ${X(this,tR).type.name} doesn't have a valid ReactComponent`}),N.createElement(e,{updateAttributes:this.updateAttributes,selected:this.selected,view:X(this,rR),getPosition:X(this,oR),node:X(this,tR),forwardRef:X(this,fR),decorations:X(this,nR)})},this.updateAttributes=e=>{if(!X(this,rR).editable)return;let t=X(this,oR).call(this);if(t==null)return;let n=X(this,rR).state.tr.setNodeMarkup(t,void 0,{...X(this,tR).attrs,...e});X(this,rR).dispatch(n)},V(Uy(e),{message:`You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration.`}),XL(this,tR,t),XL(this,rR,r),XL(this,iR,n),XL(this,aR,i),XL(this,oR,e),XL(this,sR,a),XL(this,dR,this.createDom());let{contentDOM:o,wrapper:s}=this.createContentDom()??{};XL(this,lR,o??void 0),XL(this,uR,s),X(this,uR)&&X(this,dR).append(X(this,uR)),this.setDomAttributes(X(this,tR),X(this,dR)),this.Component.displayName=by(`${X(this,tR).type.name}NodeView`),this.renderComponent()}static create(e){let{portalContainer:t,ReactComponent:n,options:r}=e;return(e,i,a)=>new pR({options:r,node:e,view:i,getPosition:a,portalContainer:t,ReactComponent:n})}get selected(){return X(this,cR)}get contentDOM(){return X(this,lR)}get dom(){return X(this,dR)}renderComponent(){X(this,iR).render({Component:this.Component,container:X(this,dR)})}createDom(){let{defaultBlockNode:e,defaultInlineNode:t}=X(this,sR),n=X(this,tR).isInline?document.createElement(t):document.createElement(e);return n.classList.add(`${xy(X(this,tR).type.name)}-node-view-wrapper`),n}createContentDom(){var e;if(X(this,tR).isLeaf)return;let t=(e=X(this,tR).type.spec).toDOM?.call(e,X(this,tR));if(!t)return;let{contentDOM:n,dom:r}=Hx.renderSpec(document,t),i;if(XO(r))return i=r,r===n&&(i=document.createElement(`span`),i.classList.add(`${xy(X(this,tR).type.name)}-node-view-content-wrapper`),i.append(n)),XO(n),{wrapper:i,contentDOM:n}}update(e,t){return ZO({types:X(this,tR).type,node:e})?X(this,tR)===e&&X(this,nR)===t?!0:(X(this,tR).sameMarkup(e)||this.setDomAttributes(e,X(this,dR)),XL(this,tR,e),XL(this,nR,t),this.renderComponent(),!0):!1}setDomAttributes(e,t){let{toDOM:n}=X(this,tR).type.spec,r=e.attrs;if(n){let t=n(e);if(Vy(t)||hR(t))return;Ky(t[1])&&(r=t[1])}for(let[e,n]of My(r))t.setAttribute(e,n)}selectNode(){XL(this,cR,!0),X(this,dR)&&X(this,dR).classList.add(ny),this.renderComponent()}deselectNode(){XL(this,cR,!1),X(this,dR)&&X(this,dR).classList.remove(ny),this.renderComponent()}destroy(){X(this,iR).remove(X(this,dR))}ignoreMutation(e){return e.type===`selection`?!X(this,tR).type.spec.selectable:X(this,uR)?!X(this,uR).contains(e.target):!0}stopEvent(e){if(!X(this,dR))return!1;if(Uy(X(this,sR).stopEvent))return X(this,sR).stopEvent({event:e});let t=e.target;if(!(X(this,dR).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=!!X(this,tR).type.spec.draggable,i=ZS.isSelectable(X(this,tR)),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)}},mR=pR;tR=new WeakMap,nR=new WeakMap,rR=new WeakMap,iR=new WeakMap,aR=new WeakMap,oR=new WeakMap,sR=new WeakMap,cR=new WeakMap,lR=new WeakMap,uR=new WeakMap,dR=new WeakMap,fR=new WeakMap;function hR(e){return YO(e)||Ky(e)&&YO(e.dom)}var gR=class extends uj{constructor(){super(...arguments),this.portalContainer=new QL}get name(){return`reactComponent`}onCreate(){this.store.setStoreKey(`portalContainer`,this.portalContainer)}createNodeViews(){let e=B(),t=this.store.managerSettings.nodeViewComponents??{};for(let t of this.store.extensions)!t.ReactComponent||!hj(t)||t.reactComponentEnvironment===`ssr`||(e[t.name]=mR.create({options:this.options,ReactComponent:t.ReactComponent,portalContainer:this.portalContainer}));let n=My({...this.options.nodeViewComponents,...t});for(let[t,r]of n)e[t]=mR.create({options:this.options,ReactComponent:r,portalContainer:this.portalContainer});return e}};gR=qL([_j({defaultOptions:{defaultBlockNode:`div`,defaultInlineNode:`span`,defaultContentNode:`span`,defaultEnvironment:`both`,nodeViewComponents:{},stopEvent:null},staticKeys:[`defaultBlockNode`,`defaultInlineNode`,`defaultContentNode`,`defaultEnvironment`]})],gR);var _R=Object.defineProperty,vR=Object.getOwnPropertySymbols,yR=Object.prototype.hasOwnProperty,bR=Object.prototype.propertyIsEnumerable,xR=(e,t,n)=>t in e?_R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SR=(e,t)=>{for(var n in t||={})yR.call(t,n)&&xR(e,n,t[n]);if(vR)for(var n of vR(t))bR.call(t,n)&&xR(e,n,t[n]);return e};function CR(e){let t=(0,N.createContext)(null);return[n=>{let r=e(n);return N.createElement(t.Provider,{value:r},n.children)},wR(t),t]}function wR(e){return(t,n)=>{let r=(0,N.useContext)(e),i=TR(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 TR(e){let t=(0,N.useRef)();return ER(()=>{t.current=e}),t.current}var ER=typeof document<`u`?N.useLayoutEffect:N.useEffect;function DR(e,t){return CR(n=>{let r=(0,N.useRef)(null),i=(0,N.useRef)(),a=t?.(n),[o,s]=(0,N.useState)(()=>e({get:OR(r),set:kR(i),previousContext:void 0,props:n,state:a})),c=[...Object.values(n),a];return(0,N.useEffect)(()=>{c.length!==0&&s(t=>e({get:OR(r),set:kR(i),previousContext:t,props:n,state:a}))},c),r.current=o,i.current=s,o})}function OR(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 kR(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=>SR(SR({},e),typeof t==`function`?t(e):t))}}var AR=r((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`]])})),jR=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.unraw=e.errorMessages=e.ErrorType=void 0;var t=AR();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}))(),MR=e=>typeof e==`string`,NR=e=>typeof e==`function`,PR=new Map,FR=`en`;function IR(e){return[...Array.isArray(e)?e:[e],FR]}function LR(e,t,n){let r=IR(e);return BR(()=>VR(`date`,r,n),()=>new Intl.DateTimeFormat(r,n)).format(MR(t)?new Date(t):t)}function RR(e,t,n){let r=IR(e);return BR(()=>VR(`number`,r,n),()=>new Intl.NumberFormat(r,n)).format(t)}function zR(e,t,n,{offset:r=0,...i}){let a=IR(e),o=t?BR(()=>VR(`plural-ordinal`,a),()=>new Intl.PluralRules(a,{type:`ordinal`})):BR(()=>VR(`plural-cardinal`,a),()=>new Intl.PluralRules(a,{type:`cardinal`}));return i[n]??i[o.select(n-r)]??i.other}function BR(e,t){let n=e(),r=PR.get(n);return r||(r=t(),PR.set(n,r)),r}function VR(e,t,n){return`${e}-${t.join(`-`)}-${JSON.stringify(n)}`}var HR=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,UR=`%__lingui_octothorpe__%`,WR=(e,t,n={})=>{let r=t||e,i=e=>typeof e==`object`?e:n[e]||{style:e},a=(e,t)=>{let a=RR(r,e,Object.keys(n).length?i(`number`):void 0);return t.replace(new RegExp(UR,`g`),a)};return{plural:(e,t)=>{let{offset:n=0}=t,i=zR(r,!1,e,t);return a(e-n,i)},selectordinal:(e,t)=>{let{offset:n=0}=t,i=zR(r,!0,e,t);return a(e-n,i)},select:GR,number:(e,t)=>RR(r,e,i(t)),date:(e,t)=>LR(r,e,i(t))}},GR=(e,t)=>t[e]??t.other;function KR(e,t,n){return(r={},i)=>{let a=WR(t,n,i),o=(e,t=!1)=>Array.isArray(e)?e.reduce((e,n)=>{if(n===`#`&&t)return e+UR;if(MR(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 MR(s)&&HR.test(s)?(0,jR.unraw)(s.trim()):MR(s)?s.trim():s?String(s):``}}var qR=Object.defineProperty,JR=(e,t,n)=>t in e?qR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,YR=(e,t,n)=>(JR(e,typeof t==`symbol`?t:t+``,n),n),XR=class{constructor(){YR(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}},ZR=Object.defineProperty,QR=(e,t,n)=>t in e?ZR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$R=(e,t,n)=>(QR(e,typeof t==`symbol`?t:t+``,n),n),ez=class extends XR{constructor(e){super(),$R(this,`_locale`,``),$R(this,`_locales`),$R(this,`_localeData`,{}),$R(this,`_messages`,{}),$R(this,`_missing`),$R(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??FR,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||=``,MR(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 NR(o)?o(this._locale,e):o;a&&this.emit(`missing`,{id:e,locale:this._locale});let s=i||r||e;return MR(s)&&HR.test(s)?JSON.parse(`"${s}"`):MR(s)?s:KR(s,this._locale,this._locales)(t,n?.formats)}date(e,t){return LR(this._locales||this._locale,e,t)}number(e,t){return RR(this._locales||this._locale,e,t)}};function tz(e={}){return new ez(e)}var nz=tz(),rz=t({_in:()=>cz,af:()=>lz,ak:()=>uz,am:()=>dz,an:()=>fz,ar:()=>pz,ars:()=>mz,as:()=>hz,asa:()=>gz,ast:()=>_z,az:()=>vz,be:()=>yz,bem:()=>bz,bez:()=>xz,bg:()=>Sz,bho:()=>Cz,bm:()=>wz,bn:()=>Tz,bo:()=>Ez,br:()=>Dz,brx:()=>Oz,bs:()=>kz,ca:()=>Az,ce:()=>jz,ceb:()=>Mz,cgg:()=>Nz,chr:()=>Pz,ckb:()=>Fz,cs:()=>Iz,cy:()=>Lz,da:()=>Rz,de:()=>zz,dsb:()=>Bz,dv:()=>Vz,dz:()=>Hz,ee:()=>Uz,el:()=>Wz,en:()=>Gz,eo:()=>Kz,es:()=>qz,et:()=>Jz,eu:()=>Yz,fa:()=>Xz,ff:()=>Zz,fi:()=>Qz,fil:()=>$z,fo:()=>eB,fr:()=>tB,fur:()=>nB,fy:()=>rB,ga:()=>iB,gd:()=>aB,gl:()=>oB,gsw:()=>sB,gu:()=>cB,guw:()=>lB,gv:()=>uB,ha:()=>dB,haw:()=>fB,he:()=>pB,hi:()=>mB,hr:()=>hB,hsb:()=>gB,hu:()=>_B,hy:()=>vB,ia:()=>yB,id:()=>bB,ig:()=>xB,ii:()=>SB,io:()=>CB,is:()=>wB,it:()=>TB,iu:()=>EB,iw:()=>DB,ja:()=>OB,jbo:()=>kB,jgo:()=>AB,ji:()=>jB,jmc:()=>MB,jv:()=>NB,jw:()=>PB,ka:()=>FB,kab:()=>IB,kaj:()=>LB,kcg:()=>RB,kde:()=>zB,kea:()=>BB,kk:()=>VB,kkj:()=>HB,kl:()=>UB,km:()=>WB,kn:()=>GB,ko:()=>KB,ks:()=>qB,ksb:()=>JB,ksh:()=>YB,ku:()=>XB,kw:()=>ZB,ky:()=>QB,lag:()=>$B,lb:()=>eV,lg:()=>tV,lkt:()=>nV,ln:()=>rV,lo:()=>iV,lt:()=>aV,lv:()=>oV,mas:()=>sV,mg:()=>cV,mgo:()=>lV,mk:()=>uV,ml:()=>dV,mn:()=>fV,mo:()=>pV,mr:()=>mV,ms:()=>hV,mt:()=>gV,my:()=>_V,nah:()=>vV,naq:()=>yV,nb:()=>bV,nd:()=>xV,ne:()=>SV,nl:()=>CV,nn:()=>wV,nnh:()=>TV,no:()=>EV,nqo:()=>DV,nr:()=>OV,nso:()=>kV,ny:()=>AV,nyn:()=>jV,om:()=>MV,or:()=>NV,os:()=>PV,osa:()=>FV,pa:()=>IV,pap:()=>LV,pl:()=>RV,prg:()=>zV,ps:()=>BV,pt:()=>VV,pt_PT:()=>HV,rm:()=>UV,ro:()=>WV,rof:()=>GV,root:()=>KV,ru:()=>qV,rwk:()=>JV,sah:()=>YV,saq:()=>XV,sc:()=>ZV,scn:()=>QV,sd:()=>$V,sdh:()=>eH,se:()=>tH,seh:()=>nH,ses:()=>rH,sg:()=>iH,sh:()=>aH,shi:()=>oH,si:()=>sH,sk:()=>cH,sl:()=>lH,sma:()=>uH,smi:()=>dH,smj:()=>fH,smn:()=>pH,sms:()=>mH,sn:()=>hH,so:()=>gH,sq:()=>_H,sr:()=>vH,ss:()=>yH,ssy:()=>bH,st:()=>xH,su:()=>SH,sv:()=>CH,sw:()=>wH,syr:()=>TH,ta:()=>EH,te:()=>DH,teo:()=>OH,th:()=>kH,ti:()=>AH,tig:()=>jH,tk:()=>MH,tl:()=>NH,tn:()=>PH,to:()=>FH,tr:()=>IH,ts:()=>LH,tzm:()=>RH,ug:()=>zH,uk:()=>BH,ur:()=>VH,uz:()=>HH,ve:()=>UH,vi:()=>WH,vo:()=>GH,vun:()=>KH,wa:()=>qH,wae:()=>JH,wo:()=>YH,xh:()=>XH,xog:()=>ZH,yi:()=>QH,yo:()=>$H,yue:()=>eU,zh:()=>tU,zu:()=>nU});function Z(e,t){return t?`other`:e==1?`one`:`other`}function iz(e,t){return t?`other`:e==0||e==1?`one`:`other`}function az(e,t){var n=!String(e).split(`.`)[1];return t?`other`:e==1&&n?`one`:`other`}function oz(e,t){return`other`}function sz(e,t){return t?`other`:e==1?`one`:e==2?`two`:`other`}const cz=oz,lz=Z,uz=iz;function dz(e,t){return t?`other`:e>=0&&e<=1?`one`:`other`}const fz=Z;function pz(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 mz(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 hz(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 gz=Z,_z=az;function vz(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 yz(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 bz=Z,xz=Z,Sz=Z,Cz=iz,wz=oz;function Tz(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 Ez=oz;function Dz(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 Oz=Z;function kz(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 Az(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 jz=Z;function Mz(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 Nz=Z,Pz=Z,Fz=Z;function Iz(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 Lz(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 Rz(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 zz=az;function Bz(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 Vz=Z,Hz=oz,Uz=Z,Wz=Z;function Gz(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 Kz=Z,qz=Z,Jz=az,Yz=Z;function Xz(e,t){return t?`other`:e>=0&&e<=1?`one`:`other`}function Zz(e,t){return t?`other`:e>=0&&e<2?`one`:`other`}const Qz=az;function $z(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 eB=Z;function tB(e,t){return t?e==1?`one`:`other`:e>=0&&e<2?`one`:`other`}const nB=Z,rB=az;function iB(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 aB(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 oB=az,sB=Z;function cB(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 lB=iz;function uB(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 dB=Z,fB=Z;function pB(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 mB(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 hB(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 gB(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 _B(e,t){return t?e==1||e==5?`one`:`other`:e==1?`one`:`other`}function vB(e,t){return t?e==1?`one`:`other`:e>=0&&e<2?`one`:`other`}const yB=az,bB=oz,xB=oz,SB=oz,CB=az;function wB(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 TB(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 EB=sz;function DB(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 OB=oz,kB=oz,AB=Z,jB=az,MB=Z,NB=oz,PB=oz;function FB(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 IB(e,t){return t?`other`:e>=0&&e<2?`one`:`other`}const LB=Z,RB=Z,zB=oz,BB=oz;function VB(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 HB=Z,UB=Z,WB=oz;function GB(e,t){return t?`other`:e>=0&&e<=1?`one`:`other`}const KB=oz,qB=Z,JB=Z;function YB(e,t){return t?`other`:e==0?`zero`:e==1?`one`:`other`}const XB=Z;function ZB(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 QB=Z;function $B(e,t){var n=String(e).split(`.`)[0];return t?`other`:e==0?`zero`:(n==0||n==1)&&e!=0?`one`:`other`}const eV=Z,tV=Z,nV=oz,rV=iz;function iV(e,t){return t&&e==1?`one`:`other`}function aV(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 oV(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 sV=Z,cV=iz,lV=Z;function uV(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 dV=Z,fV=Z;function pV(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 mV(e,t){return t?e==1?`one`:e==2||e==3?`two`:e==4?`few`:`other`:e==1?`one`:`other`}function hV(e,t){return t&&e==1?`one`:`other`}function gV(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 _V=oz,vV=Z,yV=sz,bV=Z,xV=Z;function SV(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 CV=az,wV=Z,TV=Z,EV=Z,DV=oz,OV=Z,kV=iz,AV=Z,jV=Z,MV=Z;function NV(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 PV=Z,FV=oz,IV=iz,LV=Z;function RV(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 zV(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 BV=Z;function VV(e,t){var n=String(e).split(`.`)[0];return t?`other`:n==0||n==1?`one`:`other`}const HV=az,UV=Z;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`}const GV=Z,KV=oz;function qV(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 JV=Z,YV=oz,XV=Z;function ZV(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 QV(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 $V=Z,eH=Z,tH=sz,nH=Z,rH=oz,iH=oz;function aH(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 oH(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 sH(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 cH(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 lH(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 uH=sz,dH=sz,fH=sz,pH=sz,mH=sz,hH=Z,gH=Z;function _H(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 vH(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 yH=Z,bH=Z,xH=Z,SH=oz;function CH(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 wH=az,TH=Z,EH=Z,DH=Z,OH=Z,kH=oz,AH=iz,jH=Z;function MH(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 NH(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 PH=Z,FH=oz,IH=Z,LH=Z;function RH(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 zH=Z;function BH(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 VH=az,HH=Z,UH=Z;function WH(e,t){return t&&e==1?`one`:`other`}const GH=Z,KH=Z,qH=iz,JH=Z,YH=oz,XH=Z,ZH=Z,QH=az,$H=oz,eU=oz,tU=oz;function nU(e,t){return t?`other`:e>=0&&e<=1?`one`:`other`}var rU=Object.defineProperty,iU=Object.getOwnPropertyDescriptor,aU=Object.getOwnPropertyNames,oU=Object.prototype.hasOwnProperty,sU=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of aU(t))!oU.call(e,i)&&i!==n&&rU(e,i,{get:()=>t[i],enumerable:!(r=iU(t,i))||r.enumerable});return e},cU=(e,t,n)=>(sU(e,t,`default`),n&&sU(n,t,`default`)),lU=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"]]}`),uU={};cU(uU,rz),nz.loadLocaleData(`en`,{plurals:uU.en}),nz.load(`en`,lU),nz.activate(`en`);var dU=Object.defineProperty,fU=Object.getOwnPropertyDescriptor,pU=(e,t,n,r)=>{for(var i=r>1?void 0:r?fU(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&&dU(t,n,i),i},mU={...IL.defaultOptions,...gR.defaultOptions},hU=[...IL.staticKeys,...gR.staticKeys],gU=class extends uj{get name(){return`react`}onSetOptions(e){let{pickChanged:t}=e;this.getExtension(IL).setOptions(t([`placeholder`]))}createExtensions(){let{emptyNodeClass:e,placeholder:t,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:i,defaultInlineNode:a,nodeViewComponents:o}=this.options;return[new IL({emptyNodeClass:e,placeholder:t,priority:sy.Low}),new gR({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:i,defaultInlineNode:a,nodeViewComponents:o})]}};gU=pU([_j({defaultOptions:mU,staticKeys:hU})],gU);var _U=n(r((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),vU=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},yU=(e,t,n)=>(vU(e,t,`read from private field`),n?n.call(e):t.get(e)),bU=(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)},xU=(e,t,n,r)=>(vU(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n);function SU(){let[,e]=(0,N.useState)(B());return(0,N.useCallback)(()=>{e(B())},[])}var CU=(0,N.createContext)(null);function wU(e){let t=(0,N.useContext)(CU),n=(0,N.useRef)(SU());V(t,{code:z.REACT_PROVIDER_CONTEXT});let{addHandler:r}=t;return(0,N.useEffect)(()=>{let t=e;if(t){if(Ky(t)){let{autoUpdate:e}=t;t=e?()=>n.current():void 0}if(Uy(t))return r(`updated`,t)}},[r,e]),t}function TU(e=!0){return wU({autoUpdate:e}).active}function EU(){return wU().commands}var[DU,wie]=DR(({props:e})=>{let t=e.locale??`en`,n=e.i18n??nz;return{locale:t,i18n:n,supportedLocales:e.supportedLocales??[t],t:n._.bind(n)}});function OU(e,t={}){let{core:n,react:r,...i}=t;return xie(e)?e:bie.create(()=>[...yb(e),new gU(r),...WL(n)],i)}function kU(e,t={}){let n=(0,N.useRef)(e),r=(0,N.useRef)(t),[i,a]=(0,N.useState)(()=>OU(e,t));return n.current=e,r.current=t,(0,N.useEffect)(()=>i.addHandler(`destroy`,()=>{a(()=>OU(n.current,r.current))}),[i]),i}var AU=typeof _U.default==`object`&&_U.default.__esModule&&_U.default.default?_U.default.default:_U.default,jU,MU=class extends hie{constructor(e){if(super(e),bU(this,jU,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??B();return{[n]:AU(r,this.onRef),key:this.uid,...i,children:t}},this.onRef=e=>{e&&(this.rootPropsConfig.count+=1,V(this.rootPropsConfig.count<=1,{code:z.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),xU(this,jU,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(IL).setOptions({placeholder:this.props.placeholder??``})}get name(){return`react`}update(e){return super.update(e),this}createView(e){return new JD(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;V(t,{code:z.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),V(n,{code:z.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(ry,{}))),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(ry,{})),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(){V(yU(this,jU),{code:z.REACT_EDITOR_VIEW,message:`Something went wrong when initializing the text editor. Please check your setup.`});let{autoFocus:e}=this.props;this.addProsemirrorViewToDom(yU(this,jU),this.view.dom),e&&this.focus(e),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&yU(this,jU)&&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}};jU=new WeakMap;var NU=typeof document<`u`?N.useLayoutEffect:N.useEffect;function PU(e){let t=(0,N.useRef)();return NU(()=>{t.current=e}),t.current}function FU(e){let{manager:t,state:n}=e,{placeholder:r,editable:i}=e;(0,N.useRef)(!0).current&&!Jy(r)&&t.getExtension(gU).setOptions({placeholder:r}),(0,N.useEffect)(()=>{r!=null&&t.getExtension(gU).setOptions({placeholder:r})},[r,t]);let[a]=(0,N.useState)(()=>{if(n)return n;let r=t.createEmptyDoc(),[i,a]=eb(e.initialContent)?e.initialContent:[e.initialContent??r];return t.createState({content:i,selection:a})}),o=IU({initialEditorState:a,getProps:()=>e});return(0,N.useEffect)(()=>()=>{o.destroy()},[o]),(0,N.useEffect)(()=>{o.onUpdate()},[i,o]),LU(o),o.frameworkOutput}function IU(e){let t=(0,N.useRef)(e);t.current=e;let n=(0,N.useMemo)(()=>new MU(t.current),[]);return n.update(e),n}function LU(e){let{state:t}=e.props,n=(0,N.useRef)(!!t),r=PU(t);NU(()=>{V(t?n.current===!0:n.current===!1,{code:z.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 RU(e={}){let{content:t,document:n,selection:r,extensions:i,...a}=e,o=kU(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 zU=()=>N.createElement(`div`,{className:EM.EDITOR_WRAPPER,...wU().getRootProps()}),BU=e=>(e.hook(),null);function VU(e){let{children:t,autoRender:n,i18n:r,locale:i,supportedLocales:a,hooks:o=[],...s}=e,c=FU(s),l=eR(c.portalContainer),u=n===`start`||n===!0||!t&&Jy(n),d=n===`end`;return N.createElement(DU,{i18n:r,locale:i,supportedLocales:a},N.createElement(CU.Provider,{value:c},N.createElement($L,{portals:l}),o.map((e,t)=>N.createElement(BU,{hook:e,key:t})),u&&N.createElement(zU,null),t,d&&N.createElement(zU,null)))}function HU(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 UU(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 WU,GU,KU=c((()=>{WU=!1,GU=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?!WU: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(UU(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=HU(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}()})),qU,JU,YU,XU,ZU,QU,$U,eW,tW,nW=c((()=>{qU=`-ms-`,JU=`-moz-`,YU=`-webkit-`,XU=`comm`,ZU=`rule`,QU=`decl`,$U=`@import`,eW=`@keyframes`,tW=`@layer`}));function rW(e,t){return cW(e,0)^45?(((t<<2^cW(e,0))<<2^cW(e,1))<<2^cW(e,2))<<2^cW(e,3):0}function iW(e){return e.trim()}function aW(e,t){return(e=t.exec(e))?e[0]:e}function oW(e,t,n){return e.replace(t,n)}function sW(e,t){return e.indexOf(t)}function cW(e,t){return e.charCodeAt(t)|0}function lW(e,t,n){return e.slice(t,n)}function uW(e){return e.length}function dW(e){return e.length}function fW(e,t){return t.push(e),e}function pW(e,t){return e.map(t).join(``)}var mW,hW,gW,_W=c((()=>{mW=Math.abs,hW=String.fromCharCode,gW=Object.assign}));function vW(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:FW,column:IW,length:o,return:``}}function yW(e,t){return gW(vW(``,null,null,``,null,null,0),e,{length:-e.length},t)}function bW(){return zW}function xW(){return zW=RW>0?cW(BW,--RW):0,IW--,zW===10&&(IW=1,FW--),zW}function SW(){return zW=RW<LW?cW(BW,RW++):0,IW++,zW===10&&(IW=1,FW++),zW}function CW(){return cW(BW,RW)}function wW(){return RW}function TW(e,t){return lW(BW,e,t)}function EW(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 DW(e){return FW=IW=1,LW=uW(BW=e),RW=0,[]}function OW(e){return BW=``,e}function kW(e){return iW(TW(RW-1,MW(e===91?e+2:e===40?e+1:e)))}function AW(e){for(;(zW=CW())&&zW<33;)SW();return EW(e)>2||EW(zW)>3?``:` `}function jW(e,t){for(;--t&&SW()&&!(zW<48||zW>102||zW>57&&zW<65||zW>70&&zW<97););return TW(e,wW()+(t<6&&CW()==32&&SW()==32))}function MW(e){for(;SW();)switch(zW){case e:return RW;case 34:case 39:e!==34&&e!==39&&MW(zW);break;case 40:e===41&&MW(e);break;case 92:SW();break}return RW}function NW(e,t){for(;SW()&&e+zW!==57&&!(e+zW===84&&CW()===47););return`/*`+TW(t,RW-1)+`*`+hW(e===47?e:SW())}function PW(e){for(;!EW(CW());)SW();return TW(e,RW)}var FW,IW,LW,RW,zW,BW,VW=c((()=>{_W(),FW=1,IW=1,LW=0,RW=0,zW=0,BW=``}));function HW(e){return OW(UW(``,null,null,null,[``],e=DW(e),0,[0],e))}function UW(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=SW()){case 40:if(m!=108&&cW(C,d-1)==58){sW(C+=oW(kW(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=kW(v);break;case 9:case 10:case 13:case 32:C+=AW(m);break;case 92:C+=jW(wW()-1,7);continue;case 47:switch(CW()){case 42:case 47:fW(GW(NW(SW(),wW()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=uW(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=oW(C,/\f/g,``)),p>0&&uW(C)-d&&fW(p>32?KW(C+`;`,r,n,d-1):KW(oW(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(fW(S=WW(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123)if(u===0)UW(C,t,S,S,b,a,d,s,x);else switch(f===99&&cW(C,3)===110?100:f){case 100:case 108:case 109:case 115:UW(e,S,S,r&&fW(WW(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:UW(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+uW(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&xW()==125)continue}switch(C+=hW(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(uW(C)-1)*_,_=1;break;case 64:CW()===45&&(C+=kW(SW())),f=CW(),u=d=uW(y=C+=PW(wW())),v++;break;case 45:m===45&&uW(C)==2&&(h=0)}}return a}function WW(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=dW(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=lW(e,d+1,d=mW(h=o[m])),y=e;_<p;++_)(y=iW(h>0?f[_]+` `+v:oW(v,/&\f/g,f[_])))&&(c[g++]=y);return vW(e,t,n,i===0?ZU:s,c,l,u)}function GW(e,t,n){return vW(e,t,n,XU,hW(bW()),lW(e,2,-2),0)}function KW(e,t,n,r){return vW(e,t,n,QU,lW(e,0,r),lW(e,r+1,-1),r)}var qW=c((()=>{nW(),_W(),VW()})),JW=c((()=>{}));function YW(e,t){for(var n=``,r=dW(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function XW(e,t,n,r){switch(e.type){case tW:if(e.children.length)break;case $U:case QU:return e.return=e.return||e.value;case XU:return``;case eW:return e.return=e.value+`{`+YW(e.children,r)+`}`;case ZU:e.value=e.props.join(`,`)}return uW(n=YW(e.children,r))?e.return=e.value+`{`+n+`}`:``}var ZW=c((()=>{nW(),_W()}));function QW(e){var t=dW(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 $W(e){return function(t){t.root||(t=t.return)&&e(t)}}var eG=c((()=>{_W()})),tG=c((()=>{nW(),_W(),qW(),JW(),VW(),ZW(),eG()}));function nG(e,t){switch(rW(e,t)){case 5103:return YU+`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 YU+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return YU+e+JU+e+qU+e+e;case 6828:case 4268:return YU+e+qU+e+e;case 6165:return YU+e+qU+`flex-`+e+e;case 5187:return YU+e+oW(e,/(\w+).+(:[^]+)/,YU+`box-$1$2`+qU+`flex-$1$2`)+e;case 5443:return YU+e+qU+`flex-item-`+oW(e,/flex-|-self/,``)+e;case 4675:return YU+e+qU+`flex-line-pack`+oW(e,/align-content|flex-|-self/,``)+e;case 5548:return YU+e+qU+oW(e,`shrink`,`negative`)+e;case 5292:return YU+e+qU+oW(e,`basis`,`preferred-size`)+e;case 6060:return YU+`box-`+oW(e,`-grow`,``)+YU+e+qU+oW(e,`grow`,`positive`)+e;case 4554:return YU+oW(e,/([^-])(transform)/g,`$1`+YU+`$2`)+e;case 6187:return oW(oW(oW(e,/(zoom-|grab)/,YU+`$1`),/(image-set)/,YU+`$1`),e,``)+e;case 5495:case 3959:return oW(e,/(image-set\([^]*)/,YU+"$1$`$1");case 4968:return oW(oW(e,/(.+:)(flex-)?(.*)/,YU+`box-pack:$3`+qU+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+YU+e+e;case 4095:case 3583:case 4068:case 2532:return oW(e,/(.+)-inline(.+)/,YU+`$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(uW(e)-1-t>6)switch(cW(e,t+1)){case 109:if(cW(e,t+4)!==45)break;case 102:return oW(e,/(.+:)(.+)-([^]+)/,`$1`+YU+`$2-$3$1`+JU+(cW(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~sW(e,`stretch`)?nG(oW(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(cW(e,t+1)!==115)break;case 6444:switch(cW(e,uW(e)-3-(~sW(e,`!important`)&&10))){case 107:return oW(e,`:`,`:`+YU)+e;case 101:return oW(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+YU+(cW(e,14)===45?`inline-`:``)+`box$3$1`+YU+`$2$3$1`+qU+`$2box$3`)+e}break;case 5936:switch(cW(e,t+11)){case 114:return YU+e+qU+oW(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return YU+e+qU+oW(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return YU+e+qU+oW(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return YU+e+qU+e+e}return e}var rG,iG,aG,oG,sG,cG,lG,uG,dG=c((()=>{KU(),tG(),rG=function(e,t,n){for(var r=0,i=0;r=i,i=CW(),r===38&&i===12&&(t[n]=1),!EW(i);)SW();return TW(e,RW)},iG=function(e,t){var n=-1,r=44;do switch(EW(r)){case 0:r===38&&CW()===12&&(t[n]=1),e[n]+=rG(RW-1,t,n);break;case 2:e[n]+=kW(r);break;case 4:if(r===44){e[++n]=CW()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=hW(r)}while(r=SW());return e},aG=function(e,t){return OW(iG(DW(e),t))},oG=new WeakMap,sG=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&&!oG.get(n))&&!r){oG.set(e,!0);for(var i=[],a=aG(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]}}},cG=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}},lG=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case QU:e.return=nG(e.value,e.length);break;case eW:return YW([yW(e,{value:oW(e.value,`@`,`@`+YU)})],r);case ZU:if(e.length)return pW(e.props,function(t){switch(aW(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return YW([yW(e,{props:[oW(t,/:(read-\w+)/,`:`+JU+`$1`)]})],r);case`::placeholder`:return YW([yW(e,{props:[oW(t,/:(plac\w+)/,`:`+YU+`input-$1`)]}),yW(e,{props:[oW(t,/:(plac\w+)/,`:`+JU+`$1`)]}),yW(e,{props:[oW(t,/:(plac\w+)/,qU+`input-$1`)]})],r)}return``})}}],uG=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||lG,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=[sG,cG],l,u=[XW,$W(function(e){l.insert(e)})],d=QW(c.concat(r,u)),f=function(e){return YW(HW(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 GU({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 fG(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var pG,mG,hG,gG=c((()=>{pG=!0,mG=function(e,t,n){var r=e.key+`-`+t.name;(n===!1||pG===!1)&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},hG=function(e,t,n){mG(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 _G(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 vG=c((()=>{}));function yG(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 jG={name:i.name,styles:i.styles,next:jG},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)jG={name:o.name,styles:o.styles,next:jG},o=o.next;return a.styles+`;`}return bG(e,t,n);case`function`:if(e!==void 0){var s=jG,c=n(e);return jG=s,yG(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function bG(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=yG(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]+`}`:EG(s)&&(r+=DG(a)+`:`+OG(a,s)+`;`)}else{if(a===`NO_COMPONENT_SELECTOR`&&SG)throw Error(kG);if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)EG(o[c])&&(r+=DG(a)+`:`+OG(a,o[c])+`;`);else{var l=yG(e,t,o);switch(a){case`animation`:case`animationName`:r+=DG(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}}return r}function xG(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=``;jG=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=yG(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=yG(n,t,e[o]),r&&(i+=a[o]);AG.lastIndex=0;for(var s=``,c;(c=AG.exec(i))!==null;)s+=`-`+c[1];return{name:_G(i)+s,styles:i,next:jG}}var SG,CG,wG,TG,EG,DG,OG,kG,AG,jG,MG=c((()=>{vG(),Af(),_d(),SG=!1,CG=/[A-Z]|^ms/g,wG=/_EMO_([^_]+?)_([^]*?)_EMO_/g,TG=function(e){return e.charCodeAt(1)===45},EG=function(e){return e!=null&&typeof e!=`boolean`},DG=gd(function(e){return TG(e)?e:e.replace(CG,`-$&`).toLowerCase()}),OG=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(wG,function(e,t,n){return jG={name:t,styles:n,next:jG},t})}return kf[e]!==1&&!TG(e)&&typeof t==`number`&&t!==0?t+`px`:t},kG=`Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.`,AG=/label:\s*([^\s;{]+)\s*(;|$)/g}));dG(),MG(),gG();function NG(e,t){if(e.inserted[t.name]===void 0)return e.insert(``,t,e.sheet,!0)}function PG(e,t,n){var r=[],i=fG(e,r,n);return r.length<2?n:i+t(r)}var FG=function(e){var t=uG(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){var e=xG([...arguments],t.registered,void 0);return hG(t,e,!1),t.key+`-`+e.name};return{css:n,cx:function(){var e=[...arguments];return PG(t.registered,n,IG(e))},injectGlobal:function(){NG(t,xG([...arguments],t.registered))},keyframes:function(){var e=xG([...arguments],t.registered),n=`animation-`+e.name;return NG(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:fG.bind(null,t.registered),merge:PG.bind(null,t.registered,n)}},IG=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},LG=[],RG=function(){return LG.some(function(e){return e.activeTargets.length>0})},zG=function(){return LG.some(function(e){return e.skippedTargets.length>0})},BG=`ResizeObserver loop completed with undelivered notifications.`,VG=function(){var e;typeof ErrorEvent==`function`?e=new ErrorEvent(`error`,{message:BG}):(e=document.createEvent(`Event`),e.initEvent(`error`,!1,!1),e.message=BG),window.dispatchEvent(e)},HG;(function(e){e.BORDER_BOX=`border-box`,e.CONTENT_BOX=`content-box`,e.DEVICE_PIXEL_CONTENT_BOX=`device-pixel-content-box`})(HG||={});var UG=function(e){return Object.freeze(e)},WG=function(){function e(e,t){this.inlineSize=e,this.blockSize=t,UG(this)}return e}(),GG=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,UG(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}(),KG=function(e){return e instanceof SVGElement&&`getBBox`in e},qG=function(e){if(KG(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)},JG=function(e){if(e instanceof Element)return!0;var t=e?.ownerDocument?.defaultView;return!!(t&&e instanceof t.Element)},YG=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},XG=typeof window<`u`?window:{},ZG=new WeakMap,QG=/auto|scroll/,$G=/^tb|vertical/,eK=/msie|trident/i.test(XG.navigator&&XG.navigator.userAgent),tK=function(e){return parseFloat(e||`0`)},nK=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new WG((n?t:e)||0,(n?e:t)||0)},rK=UG({devicePixelContentBoxSize:nK(),borderBoxSize:nK(),contentBoxSize:nK(),contentRect:new GG(0,0,0,0)}),iK=function(e,t){if(t===void 0&&(t=!1),ZG.has(e)&&!t)return ZG.get(e);if(qG(e))return ZG.set(e,rK),rK;var n=getComputedStyle(e),r=KG(e)&&e.ownerSVGElement&&e.getBBox(),i=!eK&&n.boxSizing===`border-box`,a=$G.test(n.writingMode||``),o=!r&&QG.test(n.overflowY||``),s=!r&&QG.test(n.overflowX||``),c=r?0:tK(n.paddingTop),l=r?0:tK(n.paddingRight),u=r?0:tK(n.paddingBottom),d=r?0:tK(n.paddingLeft),f=r?0:tK(n.borderTopWidth),p=r?0:tK(n.borderRightWidth),m=r?0:tK(n.borderBottomWidth),h=r?0:tK(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:tK(n.width)-S-x,T=r?r.height:tK(n.height)-C-b,E=w+g+x+v,D=T+_+b+y,O=UG({devicePixelContentBoxSize:nK(Math.round(w*devicePixelRatio),Math.round(T*devicePixelRatio),a),borderBoxSize:nK(E,D,a),contentBoxSize:nK(w,T,a),contentRect:new GG(d,c,w,T)});return ZG.set(e,O),O},aK=function(e,t,n){var r=iK(e,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case HG.DEVICE_PIXEL_CONTENT_BOX:return o;case HG.BORDER_BOX:return i;default:return a}},oK=function(){function e(e){var t=iK(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=UG([t.borderBoxSize]),this.contentBoxSize=UG([t.contentBoxSize]),this.devicePixelContentBoxSize=UG([t.devicePixelContentBoxSize])}return e}(),sK=function(e){if(qG(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},cK=function(){var e=1/0,t=[];LG.forEach(function(n){if(n.activeTargets.length!==0){var r=[];n.activeTargets.forEach(function(t){var n=new oK(t.target),i=sK(t.target);r.push(n),t.lastReportedSize=aK(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},lK=function(e){LG.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(sK(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},uK=function(){var e=0;for(lK(e);RG();)e=cK(),lK(e);return zG()&&VG(),e>0},dK,fK=[],pK=function(){return fK.splice(0).forEach(function(e){return e()})},mK=function(e){if(!dK){var t=0,n=document.createTextNode(``);new MutationObserver(function(){return pK()}).observe(n,{characterData:!0}),dK=function(){n.textContent=`${t?t--:t++}`}}fK.push(e),dK()},hK=function(e){mK(function(){requestAnimationFrame(e)})},gK=0,_K=function(){return!!gK},vK=250,yK={attributes:!0,characterData:!0,childList:!0,subtree:!0},bK=[`resize`,`load`,`transitionend`,`animationend`,`animationstart`,`animationiteration`,`keyup`,`keydown`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`blur`,`focus`],xK=function(e){return e===void 0&&(e=0),Date.now()+e},SK=!1,CK=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=vK),!SK){SK=!0;var n=xK(e);hK(function(){var r=!1;try{r=uK()}finally{if(SK=!1,e=n-xK(),!_K())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,yK)};document.body?t():XG.addEventListener(`DOMContentLoaded`,t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),bK.forEach(function(t){return XG.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||=(this.observer&&this.observer.disconnect(),bK.forEach(function(t){return XG.removeEventListener(t,e.listener,!0)}),!0)},e}()),wK=function(e){!gK&&e>0&&CK.start(),gK+=e,!gK&&CK.stop()},TK=function(e){return!KG(e)&&!YG(e)&&getComputedStyle(e).display===`inline`},EK=function(){function e(e,t){this.target=e,this.observedBox=t||HG.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=aK(this.target,this.observedBox,!0);return TK(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),DK=function(){function e(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return e}(),OK=new WeakMap,kK=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},AK=function(){function e(){}return e.connect=function(e,t){var n=new DK(e,t);OK.set(e,n)},e.observe=function(e,t,n){var r=OK.get(e),i=r.observationTargets.length===0;kK(r.observationTargets,t)<0&&(i&&LG.push(r),r.observationTargets.push(new EK(t,n&&n.box)),wK(1),CK.schedule())},e.unobserve=function(e,t){var n=OK.get(e),r=kK(n.observationTargets,t),i=n.observationTargets.length===1;r>=0&&(i&&LG.splice(LG.indexOf(n),1),n.observationTargets.splice(r,1),wK(-1))},e.disconnect=function(e){var t=this,n=OK.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),jK=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.`);AK.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(!JG(e))throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element`);AK.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(!JG(e))throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element`);AK.unobserve(this,e)},e.prototype.disconnect=function(){AK.disconnect(this)},e.toString=function(){return`function ResizeObserver () { [polyfill code] }`},e}(),MK=(0,N.createContext)({});function NK(e){let t=(0,N.useRef)(null);return t.current===null&&(t.current=e()),t.current}var PK=(0,N.createContext)(null),FK=(0,N.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function IK(e=!0){let t=(0,N.useContext)(PK);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 LK=typeof window<`u`,RK=LK?N.useLayoutEffect:N.useEffect,zK=e=>e,BK=zK,VK=zK;function HK(e){let t;return()=>(t===void 0&&(t=e()),t)}var UK=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},WK=e=>e*1e3,GK=e=>e/1e3,KK={skipAnimations:!1,useManualTiming:!1};function qK(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 JK=[`read`,`resolveKeyframes`,`update`,`preRender`,`render`,`postRender`],YK=40;function XK(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=JK.reduce((e,t)=>(e[t]=qK(a),e),{}),{read:s,resolveKeyframes:c,update:l,preRender:u,render:d,postRender:f}=o,p=()=>{let a=KK.useManualTiming?i.timestamp:performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,YK),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:JK.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<JK.length;t++)o[JK[t]].cancel(e)},state:i,steps:o}}var{schedule:ZK,cancel:QK,state:$K,steps:eq}=XK(typeof requestAnimationFrame<`u`?requestAnimationFrame:zK,!0),tq=(0,N.createContext)({strict:!1}),nq={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`]},rq={};for(let e in nq)rq[e]={isEnabled:t=>nq[e].some(e=>!!t[e])};function iq(e){for(let t in e)rq[t]={...rq[t],...e[t]}}var aq=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 oq(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||aq.has(e)}var sq=e=>!oq(e);function cq(e){e&&(sq=t=>t.startsWith(`on`)?!oq(t):e(t))}try{cq((xd(),s(vd)).default)}catch{}function lq(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||(sq(i)||n===!0&&oq(i)||!t&&!oq(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}function uq(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 dq=(0,N.createContext)({});function fq(e){return typeof e==`string`||Array.isArray(e)}function pq(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}var mq=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],hq=[`initial`,...mq];function gq(e){return pq(e.animate)||hq.some(t=>fq(e[t]))}function _q(e){return!!(gq(e)||e.variants)}function vq(e,t){if(gq(e)){let{initial:t,animate:n}=e;return{initial:t===!1||fq(t)?t:void 0,animate:fq(n)?n:void 0}}return e.inherit===!1?{}:t}function yq(e){let{initial:t,animate:n}=vq(e,(0,N.useContext)(dq));return(0,N.useMemo)(()=>({initial:t,animate:n}),[bq(t),bq(n)])}function bq(e){return Array.isArray(e)?e.join(` `):e}var xq=Symbol.for(`motionComponentSymbol`);function Sq(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Cq(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):Sq(n)&&(n.current=r))},[t])}var wq=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),Tq=`data-`+wq(`framerAppearId`),{schedule:Eq,cancel:Tie}=XK(queueMicrotask,!1),Dq=(0,N.createContext)({});function Oq(e,t,n,r,i){let{visualElement:a}=(0,N.useContext)(dq),o=(0,N.useContext)(tq),s=(0,N.useContext)(PK),c=(0,N.useContext)(FK).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)(Dq);u&&!u.projection&&i&&(u.type===`html`||u.type===`svg`)&&kq(l.current,n,i,d);let f=(0,N.useRef)(!1);(0,N.useInsertionEffect)(()=>{u&&f.current&&u.update(n,s)});let p=n[Tq],m=(0,N.useRef)(!!p&&!window.MotionHandoffIsComplete?.call(window,p)&&window.MotionHasOptimisedAnimation?.call(window,p));return RK(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),Eq.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 kq(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:Aq(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Sq(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,layoutScroll:c,layoutRoot:l})}function Aq(e){if(e)return e.options.allowProjection===!1?Aq(e.parent):e.projection}function jq({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&iq(e);function a(a,o){let s,c={...(0,N.useContext)(FK),...a,layoutId:Mq(a)},{isStatic:l}=c,u=yq(a),d=r(a,l);if(!l&&LK){Nq(c,e);let n=Pq(c);s=n.MeasureLayout,u.visualElement=Oq(i,d,c,t,n.ProjectionNode)}return(0,P.jsxs)(dq.Provider,{value:u,children:[s&&u.visualElement?(0,P.jsx)(s,{visualElement:u.visualElement,...c}):null,n(i,a,Cq(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[xq]=i,o}function Mq({layoutId:e}){let t=(0,N.useContext)(MK).id;return t&&e!==void 0?t+`-`+e:e}function Nq(e,t){(0,N.useContext)(tq).strict}function Pq(e){let{drag:t,layout:n}=rq;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}var Fq=[`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 Iq(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Fq.indexOf(e)>-1||/[A-Z]/u.test(e))}function Lq(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Rq(e,t,n,r){if(typeof t==`function`){let[i,a]=Lq(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]=Lq(r);t=t(n===void 0?e.custom:n,i,a)}return t}var zq=e=>Array.isArray(e),Bq=e=>!!(e&&typeof e==`object`&&e.mix&&e.toValue),Vq=e=>zq(e)?e[e.length-1]||0:e,Hq=e=>!!(e&&e.getVelocity);function Uq(e){let t=Hq(e)?e.get():e;return Bq(t)?t.toValue():t}function Wq({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,a){let o={latestValues:Kq(r,i,a,e),renderState:t()};return n&&(o.onMount=e=>n({props:r,current:e,...o}),o.onUpdate=e=>n(e)),o}var Gq=e=>(t,n)=>{let r=(0,N.useContext)(dq),i=(0,N.useContext)(PK),a=()=>Wq(e,t,r,i);return n?a():NK(a)};function Kq(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Uq(a[e]);let{initial:o,animate:s}=e,c=gq(e),l=_q(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`&&!pq(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Rq(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 qq=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Jq=new Set(qq),Yq=e=>t=>typeof t==`string`&&t.startsWith(e),Xq=Yq(`--`),Zq=Yq(`var(--`),Qq=e=>Zq(e)?$q.test(e.split(`/*`)[0].trim()):!1,$q=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,eJ=(e,t)=>t&&typeof e==`number`?t.transform(e):e,tJ=(e,t,n)=>n>t?t:n<e?e:n,nJ={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},rJ={...nJ,transform:e=>tJ(0,1,e)},iJ={...nJ,default:1},aJ=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),oJ=aJ(`deg`),sJ=aJ(`%`),cJ=aJ(`px`),lJ=aJ(`vh`),uJ=aJ(`vw`),dJ={...sJ,parse:e=>sJ.parse(e)/100,transform:e=>sJ.transform(e*100)},fJ={borderWidth:cJ,borderTopWidth:cJ,borderRightWidth:cJ,borderBottomWidth:cJ,borderLeftWidth:cJ,borderRadius:cJ,radius:cJ,borderTopLeftRadius:cJ,borderTopRightRadius:cJ,borderBottomRightRadius:cJ,borderBottomLeftRadius:cJ,width:cJ,maxWidth:cJ,height:cJ,maxHeight:cJ,top:cJ,right:cJ,bottom:cJ,left:cJ,padding:cJ,paddingTop:cJ,paddingRight:cJ,paddingBottom:cJ,paddingLeft:cJ,margin:cJ,marginTop:cJ,marginRight:cJ,marginBottom:cJ,marginLeft:cJ,backgroundPositionX:cJ,backgroundPositionY:cJ},pJ={rotate:oJ,rotateX:oJ,rotateY:oJ,rotateZ:oJ,scale:iJ,scaleX:iJ,scaleY:iJ,scaleZ:iJ,skew:oJ,skewX:oJ,skewY:oJ,distance:cJ,translateX:cJ,translateY:cJ,translateZ:cJ,x:cJ,y:cJ,z:cJ,perspective:cJ,transformPerspective:cJ,opacity:rJ,originX:dJ,originY:dJ,originZ:cJ},mJ={...nJ,transform:Math.round},hJ={...fJ,...pJ,zIndex:mJ,size:cJ,fillOpacity:rJ,strokeOpacity:rJ,numOctaves:mJ},gJ={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},_J=qq.length;function vJ(e,t,n){let r=``,i=!0;for(let a=0;a<_J;a++){let o=qq[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=eJ(s,hJ[o]);if(!c){i=!1;let t=gJ[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function yJ(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(Jq.has(e)){o=!0;continue}else if(Xq(e)){i[e]=n;continue}else{let t=eJ(n,hJ[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=vJ(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 bJ={offset:`stroke-dashoffset`,array:`stroke-dasharray`},xJ={offset:`strokeDashoffset`,array:`strokeDasharray`};function SJ(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?bJ:xJ;e[a.offset]=cJ.transform(-r);let o=cJ.transform(t),s=cJ.transform(n);e[a.array]=`${o} ${s}`}function CJ(e,t,n){return typeof e==`string`?e:cJ.transform(t+n*e)}function wJ(e,t,n){return`${CJ(t,e.x,e.width)} ${CJ(n,e.y,e.height)}`}function TJ(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:c=0,...l},u,d){if(yJ(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=wJ(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&&SJ(f,o,s,c,!1)}var EJ=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),DJ=()=>({...EJ(),attrs:{}}),OJ=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function kJ(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(let t in n)e.style.setProperty(t,n[t])}var AJ=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 jJ(e,t,n,r){kJ(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(AJ.has(n)?n:wq(n),t.attrs[n])}var MJ={};function NJ(e){Object.assign(MJ,e)}function PJ(e,{layout:t,layoutId:n}){return Jq.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!MJ[e]||e===`opacity`)}function FJ(e,t,n){let{style:r}=e,i={};for(let a in r)(Hq(r[a])||t.style&&Hq(t.style[a])||PJ(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function IJ(e,t,n){let r=FJ(e,t,n);for(let n in e)if(Hq(e[n])||Hq(t[n])){let t=qq.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}function LJ(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 RJ=[`x`,`y`,`width`,`height`,`cx`,`cy`,`r`],zJ={useVisualState:Gq({scrapeMotionValuesFromProps:IJ,createRenderState:DJ,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(Jq.has(e)){a=!0;break}}if(!a)return;let o=!t;if(t)for(let n=0;n<RJ.length;n++){let r=RJ[n];e[r]!==t[r]&&(o=!0)}o&&ZK.read(()=>{LJ(n,r),ZK.render(()=>{TJ(r,i,OJ(n.tagName),e.transformTemplate),jJ(n,r)})})}})},BJ={useVisualState:Gq({scrapeMotionValuesFromProps:FJ,createRenderState:EJ})};function VJ(e,t,n){for(let r in t)!Hq(t[r])&&!PJ(r,n)&&(e[r]=t[r])}function HJ({transformTemplate:e},t){return(0,N.useMemo)(()=>{let n=EJ();return yJ(n,t,e),Object.assign({},n.vars,n.style)},[t])}function UJ(e,t){let n=e.style||{},r={};return VJ(r,n,e),Object.assign(r,HJ(e,t)),r}function WJ(e,t){let n={},r=UJ(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 GJ(e,t,n,r){let i=(0,N.useMemo)(()=>{let n=DJ();return TJ(n,t,OJ(r),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};VJ(t,e.style,e),i.style={...t,...i.style}}return i}function KJ(e=!1){return(t,n,r,{latestValues:i},a)=>{let o=(Iq(t)?GJ:WJ)(n,i,a,t),s=lq(n,typeof t==`string`,e),c=t===N.Fragment?{}:{...s,...o,ref:r},{children:l}=n,u=(0,N.useMemo)(()=>Hq(l)?l.get():l,[l]);return(0,N.createElement)(t,{...c,children:u})}}function qJ(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return jq({...Iq(n)?zJ:BJ,preloadedFeatures:e,useRender:KJ(r),createVisualElement:t,Component:n})}}function JJ(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 YJ(e,t,n){let r=e.getProps();return Rq(r,t,n===void 0?r.custom:n,e)}var XJ=HK(()=>window.ScrollTimeline!==void 0),ZJ=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(XJ()&&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`)}},QJ=class extends ZJ{then(e,t){return Promise.all(this.animations).then(e).catch(t)}};function $J(e,t){return e?e[t]||e.default||e:void 0}var eY=2e4;function tY(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 nY(e){return typeof e==`function`}function rY(e,t){e.timeline=t,e.onfinish=null}var iY=e=>Array.isArray(e)&&typeof e[0]==`number`,aY={linearEasing:void 0};function oY(e,t){let n=HK(e);return()=>aY[t]??n()}var sY=oY(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),cY=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=e(UK(0,i-1,t))+`, `;return`linear(${r.substring(0,r.length-2)})`};function lY(e){return!!(typeof e==`function`&&sY()||!e||typeof e==`string`&&(e in dY||sY())||iY(e)||Array.isArray(e)&&e.every(lY))}var uY=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,dY={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:uY([0,.65,.55,1]),circOut:uY([.55,0,1,.45]),backIn:uY([.31,.01,.66,-.59]),backOut:uY([.33,1.53,.69,.99])};function fY(e,t){if(e)return typeof e==`function`&&sY()?cY(e,t):iY(e)?uY(e):Array.isArray(e)?e.map(e=>fY(e,t)||dY.easeOut):dY[e]}var pY={x:!1,y:!1};function mY(){return pY.x||pY.y}function hY(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 gY(e,t){let n=hY(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function _Y(e){return t=>{t.pointerType===`touch`||mY()||e(t)}}function vY(e,t,n={}){let[r,i,a]=gY(e,n),o=_Y(e=>{let{target:n}=e,r=t(e);if(typeof r!=`function`||!n)return;let a=_Y(e=>{r(e),n.removeEventListener(`pointerleave`,a)});n.addEventListener(`pointerleave`,a,i)});return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}var yY=(e,t)=>t?e===t?!0:yY(e,t.parentElement):!1,bY=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,xY=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function SY(e){return xY.has(e.tagName)||e.tabIndex!==-1}var CY=new WeakSet;function wY(e){return t=>{t.key===`Enter`&&e(t)}}function TY(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var EY=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=wY(()=>{if(CY.has(n))return;TY(n,`down`);let e=wY(()=>{TY(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>TY(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function DY(e){return bY(e)&&!mY()}function OY(e,t,n={}){let[r,i,a]=gY(e,n),o=e=>{let r=e.currentTarget;if(!DY(e)||CY.has(r))return;CY.add(r);let a=t(e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),!(!DY(e)||!CY.has(r))&&(CY.delete(r),typeof a==`function`&&a(e,{success:t}))},s=e=>{o(e,n.useGlobalTarget||yY(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{!SY(e)&&e.getAttribute(`tabindex`)===null&&(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),e.addEventListener(`focus`,e=>EY(e,i),i)}),a}function kY(e){return e===`x`||e===`y`?pY[e]?null:(pY[e]=!0,()=>{pY[e]=!1}):pY.x||pY.y?null:(pY.x=pY.y=!0,()=>{pY.x=pY.y=!1})}var AY=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...qq]),jY;function MY(){jY=void 0}var NY={now:()=>(jY===void 0&&NY.set($K.isProcessing||KK.useManualTiming?$K.timestamp:performance.now()),jY),set:e=>{jY=e,queueMicrotask(MY)}};function PY(e,t){e.indexOf(t)===-1&&e.push(t)}function FY(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var IY=class{constructor(){this.subscriptions=[]}add(e){return PY(this.subscriptions,e),()=>FY(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 LY(e,t){return t?1e3/t*e:0}var RY=30,zY=e=>!isNaN(parseFloat(e)),BY={current:void 0},VY=class{constructor(e,t={}){this.version=`11.18.2`,this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let n=NY.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=NY.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=zY(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 IY);let n=this.events[e].add(t);return e===`change`?()=>{n(),ZK.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 BY.current&&BY.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=NY.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>RY)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,RY);return LY(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 HY(e,t){return new VY(e,t)}function UY(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,HY(n))}function WY(e,t){let{transitionEnd:n={},transition:r={},...i}=YJ(e,t)||{};i={...i,...n};for(let t in i)UY(e,t,Vq(i[t]))}function GY(e){return!!(Hq(e)&&e.add)}function KY(e,t){let n=e.getValue(`willChange`);if(GY(n))return n.add(t)}function qY(e){return e.props[Tq]}var JY={current:!1},YY=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,XY=1e-7,ZY=12;function QY(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=YY(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>XY&&++s<ZY);return o}function $Y(e,t,n,r){if(e===t&&n===r)return zK;let i=t=>QY(t,0,1,e,n);return e=>e===0||e===1?e:YY(i(e),t,r)}var eX=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,tX=e=>t=>1-e(1-t),nX=$Y(.33,1.53,.69,.99),rX=tX(nX),iX=eX(rX),aX=e=>(e*=2)<1?.5*rX(e):.5*(2-2**(-10*(e-1))),oX=e=>1-Math.sin(Math.acos(e)),sX=tX(oX),cX=eX(oX),lX=e=>/^0[^.\s]+$/u.test(e);function uX(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||lX(e)}var dX=e=>Math.round(e*1e5)/1e5,fX=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function pX(e){return e==null}var mX=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,hX=(e,t)=>n=>!!(typeof n==`string`&&mX.test(n)&&n.startsWith(e)||t&&!pX(n)&&Object.prototype.hasOwnProperty.call(n,t)),gX=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(fX);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},_X=e=>tJ(0,255,e),vX={...nJ,transform:e=>Math.round(_X(e))},yX={test:hX(`rgb`,`red`),parse:gX(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+vX.transform(e)+`, `+vX.transform(t)+`, `+vX.transform(n)+`, `+dX(rJ.transform(r))+`)`};function bX(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 xX={test:hX(`#`),parse:bX,transform:yX.transform},SX={test:hX(`hsl`,`hue`),parse:gX(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+sJ.transform(dX(t))+`, `+sJ.transform(dX(n))+`, `+dX(rJ.transform(r))+`)`},CX={test:e=>yX.test(e)||xX.test(e)||SX.test(e),parse:e=>yX.test(e)?yX.parse(e):SX.test(e)?SX.parse(e):xX.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?yX.transform(e):SX.transform(e)},wX=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function TX(e){return isNaN(e)&&typeof e==`string`&&(e.match(fX)?.length||0)+(e.match(wX)?.length||0)>0}var EX=`number`,DX=`color`,OX=`var`,kX=`var(`,AX="${}",jX=/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 MX(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(jX,e=>(CX.test(e)?(r.color.push(a),i.push(DX),n.push(CX.parse(e))):e.startsWith(kX)?(r.var.push(a),i.push(OX),n.push(e)):(r.number.push(a),i.push(EX),n.push(parseFloat(e))),++a,AX)).split(AX),indexes:r,types:i}}function NX(e){return MX(e).values}function PX(e){let{split:t,types:n}=MX(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===EX?i+=dX(e[a]):t===DX?i+=CX.transform(e[a]):i+=e[a]}return i}}var FX=e=>typeof e==`number`?0:e;function IX(e){let t=NX(e);return PX(e)(t.map(FX))}var LX={test:TX,parse:NX,createTransformer:PX,getAnimatableNone:IX},RX=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function zX(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(fX)||[];if(!r)return e;let i=n.replace(r,``),a=RX.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}var BX=/\b([a-z-]*)\(.*?\)/gu,VX={...LX,getAnimatableNone:e=>{let t=e.match(BX);return t?t.map(zX).join(` `):e}},HX={...hJ,color:CX,backgroundColor:CX,outlineColor:CX,fill:CX,stroke:CX,borderColor:CX,borderTopColor:CX,borderRightColor:CX,borderBottomColor:CX,borderLeftColor:CX,filter:VX,WebkitFilter:VX},UX=e=>HX[e];function WX(e,t){let n=UX(e);return n!==VX&&(n=LX),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var GX=new Set([`auto`,`none`,`0`]);function KX(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!GX.has(t)&&MX(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=WX(n,i)}var qX=e=>e===nJ||e===cJ,JX=(e,t)=>parseFloat(e.split(`, `)[t]),YX=(e,t)=>(n,{transform:r})=>{if(r===`none`||!r)return 0;let i=r.match(/^matrix3d\((.+)\)$/u);if(i)return JX(i[1],t);{let t=r.match(/^matrix\((.+)\)$/u);return t?JX(t[1],e):0}},XX=new Set([`x`,`y`,`z`]),ZX=qq.filter(e=>!XX.has(e));function QX(e){let t=[];return ZX.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}var $X={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:YX(4,13),y:YX(5,14)};$X.translateX=$X.x,$X.translateY=$X.y;var eZ=new Set,tZ=!1,nZ=!1;function rZ(){if(nZ){let e=Array.from(eZ).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=QX(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)})}nZ=!1,tZ=!1,eZ.forEach(e=>e.complete()),eZ.clear()}function iZ(){eZ.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(nZ=!0)})}function aZ(){iZ(),rZ()}var oZ=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?(eZ.add(this),tZ||(tZ=!0,ZK.read(iZ),ZK.resolveKeyframes(rZ))):(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),eZ.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,eZ.delete(this))}resume(){this.isComplete||this.scheduleResolve()}},sZ=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),cZ=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function lZ(e){let t=cZ.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var uZ=4;function dZ(e,t,n=1){VK(n<=uZ,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[r,i]=lZ(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return sZ(e)?parseFloat(e):e}return Qq(i)?dZ(i,t,n+1):i}var fZ=e=>t=>t.test(e),pZ=[nJ,cJ,sJ,oJ,uJ,lJ,{test:e=>e===`auto`,parse:e=>e}],mZ=e=>pZ.find(fZ(e)),hZ=class extends oZ{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(),Qq(r))){let i=dZ(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!AY.has(n)||e.length!==2)return;let[r,i]=e,a=mZ(r),o=mZ(i);if(a!==o)if(qX(a)&&qX(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++)uX(e[t])&&n.push(t);n.length&&KX(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=$X[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]=$X[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()}},gZ=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(LX.test(e)||e===`0`)&&!e.startsWith(`url(`));function _Z(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 vZ(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=gZ(i,t),s=gZ(a,t);return BK(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:_Z(e)||(n===`spring`||nY(n))&&r}var yZ=e=>e!==null;function bZ(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(yZ),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}var xZ=40,SZ=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=NY.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>xZ?this.resolvedAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&aZ(),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=NY.now(),this.hasAttemptedResolve=!0;let{name:n,type:r,velocity:i,delay:a,onComplete:o,onUpdate:s,isGenerator:c}=this.options;if(!c&&!vZ(e,n,r,i))if(JY.current||!a){s&&s(bZ(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})}},CZ=(e,t,n)=>e+(t-e)*n;function wZ(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 TZ({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=wZ(s,r,e+1/3),a=wZ(s,r,e),o=wZ(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function EZ(e,t){return n=>n>0?t:e}var DZ=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},OZ=[xX,yX,SX],kZ=e=>OZ.find(t=>t.test(e));function AZ(e){let t=kZ(e);if(BK(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===SX&&(n=TZ(n)),n}var jZ=(e,t)=>{let n=AZ(e),r=AZ(t);if(!n||!r)return EZ(e,t);let i={...n};return e=>(i.red=DZ(n.red,r.red,e),i.green=DZ(n.green,r.green,e),i.blue=DZ(n.blue,r.blue,e),i.alpha=CZ(n.alpha,r.alpha,e),yX.transform(i))},MZ=(e,t)=>n=>t(e(n)),NZ=(...e)=>e.reduce(MZ),PZ=new Set([`none`,`hidden`]);function FZ(e,t){return PZ.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function IZ(e,t){return n=>CZ(e,t,n)}function LZ(e){return typeof e==`number`?IZ:typeof e==`string`?Qq(e)?EZ:CX.test(e)?jZ:VZ:Array.isArray(e)?RZ:typeof e==`object`?CX.test(e)?jZ:zZ:EZ}function RZ(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>LZ(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function zZ(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=LZ(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function BZ(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 VZ=(e,t)=>{let n=LX.createTransformer(t),r=MX(e),i=MX(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?PZ.has(e)&&!i.values.length||PZ.has(t)&&!r.values.length?FZ(e,t):NZ(RZ(BZ(r,i),i.values),n):(BK(!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.`),EZ(e,t))};function HZ(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?CZ(e,t,n):LZ(e)(e,t)}var UZ=5;function WZ(e,t,n){let r=Math.max(t-UZ,0);return LY(n-e(r),t-r)}var GZ={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},KZ=.001;function qZ({duration:e=GZ.duration,bounce:t=GZ.bounce,velocity:n=GZ.velocity,mass:r=GZ.mass}){let i,a;BK(e<=WK(GZ.maxDuration),`Spring duration must be 10 seconds or less`);let o=1-t;o=tJ(GZ.minDamping,GZ.maxDamping,o),e=tJ(GZ.minDuration,GZ.maxDuration,GK(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=XZ(t,o),c=Math.exp(-i);return KZ-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=XZ(t**2,o);return(-i(t)+KZ>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-KZ+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=YZ(i,a,s);if(e=WK(e),isNaN(c))return{stiffness:GZ.stiffness,damping:GZ.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var JZ=12;function YZ(e,t,n){let r=n;for(let n=1;n<JZ;n++)r-=e(r)/t(r);return r}function XZ(e,t){return e*Math.sqrt(1-t*t)}var ZZ=[`duration`,`bounce`],QZ=[`stiffness`,`damping`,`mass`];function $Z(e,t){return t.some(t=>e[t]!==void 0)}function eQ(e){let t={velocity:GZ.velocity,stiffness:GZ.stiffness,damping:GZ.damping,mass:GZ.mass,isResolvedFromDuration:!1,...e};if(!$Z(e,QZ)&&$Z(e,ZZ))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*tJ(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:GZ.mass,stiffness:i,damping:a}}else{let n=qZ(e);t={...t,...n,mass:GZ.mass},t.isResolvedFromDuration=!0}return t}function tQ(e=GZ.visualDuration,t=GZ.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}=eQ({...n,velocity:-GK(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=GK(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?GZ.restSpeed.granular:GZ.restSpeed.default,i||=v?GZ.restDelta.granular:GZ.restDelta.default;let y;if(h<1){let e=XZ(_,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?WK(m):WZ(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(tY(b),eY),t=cY(t=>b.next(e*t).value,e,30);return e+`ms `+t}};return b}function nQ({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=tQ({keyframes:[f.value,m(f.value)],velocity:WZ(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 rQ=$Y(.42,0,1,1),iQ=$Y(0,0,.58,1),aQ=$Y(.42,0,.58,1),oQ=e=>Array.isArray(e)&&typeof e[0]!=`number`,sQ={linear:zK,easeIn:rQ,easeInOut:aQ,easeOut:iQ,circIn:oX,circInOut:cX,circOut:sX,backIn:rX,backInOut:iX,backOut:nX,anticipate:aX},cQ=e=>{if(iY(e)){VK(e.length===4,`Cubic bezier arrays must contain four numerical values.`);let[t,n,r,i]=e;return $Y(t,n,r,i)}else if(typeof e==`string`)return VK(sQ[e]!==void 0,`Invalid easing type '${e}'`),sQ[e];return e};function lQ(e,t,n){let r=[],i=n||HZ,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=NZ(Array.isArray(t)?t[n]||zK:t,a)),r.push(a)}return r}function uQ(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(VK(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=lQ(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=UK(e[r],e[r+1],n);return s[r](i)};return n?t=>l(tJ(e[0],e[a-1],t)):l}function dQ(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=UK(0,t,r);e.push(CZ(n,1,i))}}function fQ(e){let t=[0];return dQ(t,e.length-1),t}function pQ(e,t){return e.map(e=>e*t)}function mQ(e,t){return e.map(()=>t||aQ).splice(0,e.length-1)}function hQ({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=oQ(r)?r.map(cQ):cQ(r),a={done:!1,value:t[0]},o=uQ(pQ(n&&n.length===t.length?n:fQ(t),e),t,{ease:Array.isArray(i)?i:mQ(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var gQ=e=>{let t=({timestamp:t})=>e(t);return{start:()=>ZK.update(t,!0),stop:()=>QK(t),now:()=>$K.isProcessing?$K.timestamp:NY.now()}},_Q={decay:nQ,inertia:nQ,tween:hQ,keyframes:hQ,spring:tQ},vQ=e=>e/100,yQ=class extends SZ{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||oZ)(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=nY(t)?t:_Q[t]||hQ,s,c;o!==hQ&&typeof e[0]!=`number`&&(s=NZ(vQ,HZ(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=tY(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=tJ(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=bZ(s,this.options,r)),h&&h(b.value),S&&this.finish(),b}get duration(){let{resolved:e}=this;return e?GK(e.calculatedDuration):0}get time(){return GK(this.currentTime)}set time(e){e=WK(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=GK(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState=`running`;return}if(this.isStopped)return;let{driver:e=gQ,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)}},bQ=new Set([`opacity`,`clipPath`,`filter`,`transform`]);function xQ(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=fY(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 SQ=HK(()=>Object.hasOwnProperty.call(Element.prototype,`animate`)),CQ=10,wQ=2e4;function TQ(e){return nY(e.type)||e.type===`spring`||!lY(e.ease)}function EQ(e,t){let n=new yQ({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),r={done:!1,value:e[0]},i=[],a=0;for(;!r.done&&a<wQ;)r=n.sample(a),i.push(r.value),a+=CQ;return{times:void 0,keyframes:i,duration:a-CQ,ease:`linear`}}var DQ={anticipate:aX,backInOut:iX,circInOut:cX};function OQ(e){return e in DQ}var kQ=class extends SZ{constructor(e){super(e);let{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new hZ(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`&&sY()&&OQ(i)&&(i=DQ[i]),TQ(this.options)){let{onComplete:t,onUpdate:o,motionValue:s,element:c,...l}=this.options,u=EQ(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=xQ(o.owner.current,s,e,{...this.options,duration:n,times:r,ease:i});return l.startTime=c??this.calcStartTime(),this.pendingTimeline?(rY(l,this.pendingTimeline),this.pendingTimeline=void 0):l.onfinish=()=>{let{onComplete:n}=this.options;o.set(bZ(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 GK(t)}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return GK(t.currentTime||0)}set time(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.currentTime=WK(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 zK;let{animation:n}=t;rY(n,e)}return zK}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 yQ({...l,keyframes:n,duration:r,type:i,ease:a,times:o,isGenerator:!0}),d=WK(this.time);e.setWithVelocity(u.sample(d-CQ).value,u.sample(d).value,CQ)}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 SQ()&&n&&bQ.has(n)&&!s&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}},AQ={type:`spring`,stiffness:500,damping:25,restSpeed:10},jQ=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),MQ={type:`keyframes`,duration:.8},NQ={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},PQ=(e,{keyframes:t})=>t.length>2?MQ:Jq.has(e)?e.startsWith(`scale`)?jQ(t[1]):AQ:NQ;function FQ({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 IQ=(e,t,n,r={},i,a)=>o=>{let s=$J(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=WK(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};FQ(s)||(u={...u,...PQ(e,u)}),u.duration&&=WK(u.duration),u.repeatDelay&&=WK(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)),(JY.current||KK.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),d&&!a&&t.get()!==void 0){let e=bZ(u.keyframes,s);if(e!==void 0)return ZK.update(()=>{u.onUpdate(e),u.onComplete()}),new QJ([])}return!a&&kQ.supports(u)?new kQ(u):new yQ(u)};function LQ({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function RQ(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&&LQ(l,t))continue;let o={delay:n,...$J(a||{},t)},u=!1;if(window.MotionHandoffAnimation){let n=qY(e);if(n){let e=window.MotionHandoffAnimation(n,t,ZK);e!==null&&(o.startTime=e,u=!0)}}KY(e,t),r.start(IQ(t,r,i,e.shouldReduceMotion&&AY.has(t)?{type:!1}:o,e,u));let d=r.animation;d&&c.push(d)}return o&&Promise.all(c).then(()=>{ZK.update(()=>{o&&WY(e,o)})}),c}function zQ(e,t,n={}){let r=YJ(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(RQ(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return BQ(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 BQ(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(VQ).forEach((e,r)=>{e.notify(`AnimationStart`,t),o.push(zQ(e,t,{...a,delay:n+c(r)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(o)}function VQ(e,t){return e.sortNodePosition(t)}function HQ(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>zQ(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=zQ(e,t,n);else{let i=typeof t==`function`?YJ(e,t,n.custom):t;r=Promise.all(RQ(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var UQ=hq.length;function WQ(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&WQ(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<UQ;n++){let r=hq[n],i=e.props[r];(fq(i)||i===!1)&&(t[r]=i)}return t}var GQ=[...mq].reverse(),KQ=mq.length;function qQ(e){return t=>Promise.all(t.map(({animation:t,options:n})=>HQ(e,t,n)))}function JQ(e){let t=qQ(e),n=ZQ(),r=!0,i=t=>(n,r)=>{let i=YJ(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=WQ(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<KQ;t++){let f=GQ[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=fq(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||pq(m)||typeof m==`boolean`)continue;let v=YQ(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=zq(t)&&zq(n)?!JJ(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=ZQ(),r=!0}}}function YQ(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!JJ(t,e):!1}function XQ(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ZQ(){return{animate:XQ(!0),whileInView:XQ(),whileHover:XQ(),whileTap:XQ(),whileDrag:XQ(),whileFocus:XQ(),exit:XQ()}}var QQ=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},$Q=class extends QQ{constructor(e){super(e),e.animationState||=JQ(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();pq(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)}},e$=0,t$={animation:{Feature:$Q},exit:{Feature:class extends QQ{constructor(){super(...arguments),this.id=e$++}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 n$(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function r$(e){return{point:{x:e.pageX,y:e.pageY}}}var i$=e=>t=>bY(t)&&e(t,r$(t));function a$(e,t,n,r){return n$(e,t,i$(n),r)}var o$=(e,t)=>Math.abs(e-t);function s$(e,t){let n=o$(e.x,t.x),r=o$(e.y,t.y);return Math.sqrt(n**2+r**2)}var c$=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=d$(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=s$(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=$K;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=l$(t,this.transformPagePoint),ZK.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=d$(e.type===`pointercancel`?this.lastMoveEventInfo:l$(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!bY(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;let a=l$(r$(e),this.transformPagePoint),{point:o}=a,{timestamp:s}=$K;this.history=[{...o,timestamp:s}];let{onSessionStart:c}=t;c&&c(e,d$(a,this.history)),this.removeListeners=NZ(a$(this.contextWindow,`pointermove`,this.handlePointerMove),a$(this.contextWindow,`pointerup`,this.handlePointerUp),a$(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),QK(this.updatePoint)}};function l$(e,t){return t?{point:t(e.point)}:e}function u$(e,t){return{x:e.x-t.x,y:e.y-t.y}}function d$({point:e},t){return{point:e,delta:u$(e,p$(t)),offset:u$(e,f$(t)),velocity:m$(t,.1)}}function f$(e){return e[0]}function p$(e){return e[e.length-1]}function m$(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=p$(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>WK(t)));)n--;if(!r)return{x:0,y:0};let a=GK(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 h$=1e-4,g$=1-h$,_$=1+h$,v$=.01,y$=0-v$,b$=0+v$;function x$(e){return e.max-e.min}function S$(e,t,n){return Math.abs(e-t)<=n}function C$(e,t,n,r=.5){e.origin=r,e.originPoint=CZ(t.min,t.max,e.origin),e.scale=x$(n)/x$(t),e.translate=CZ(n.min,n.max,e.origin)-e.originPoint,(e.scale>=g$&&e.scale<=_$||isNaN(e.scale))&&(e.scale=1),(e.translate>=y$&&e.translate<=b$||isNaN(e.translate))&&(e.translate=0)}function w$(e,t,n,r){C$(e.x,t.x,n.x,r?r.originX:void 0),C$(e.y,t.y,n.y,r?r.originY:void 0)}function T$(e,t,n){e.min=n.min+t.min,e.max=e.min+x$(t)}function E$(e,t,n){T$(e.x,t.x,n.x),T$(e.y,t.y,n.y)}function D$(e,t,n){e.min=t.min-n.min,e.max=e.min+x$(t)}function O$(e,t,n){D$(e.x,t.x,n.x),D$(e.y,t.y,n.y)}function k$(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?CZ(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?CZ(n,e,r.max):Math.min(e,n)),e}function A$(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 j$(e,{top:t,left:n,bottom:r,right:i}){return{x:A$(e.x,n,i),y:A$(e.y,t,r)}}function M$(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 N$(e,t){return{x:M$(e.x,t.x),y:M$(e.y,t.y)}}function P$(e,t){let n=.5,r=x$(e),i=x$(t);return i>r?n=UK(t.min,t.max-r,e.min):r>i&&(n=UK(e.min,e.max-i,t.min)),tJ(0,1,n)}function F$(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 I$=.35;function L$(e=I$){return e===!1?e=0:e===!0&&(e=I$),{x:R$(e,`left`,`right`),y:R$(e,`top`,`bottom`)}}function R$(e,t,n){return{min:z$(e,t),max:z$(e,n)}}function z$(e,t){return typeof e==`number`?e:e[t]||0}var B$=()=>({translate:0,scale:1,origin:0,originPoint:0}),V$=()=>({x:B$(),y:B$()}),H$=()=>({min:0,max:0}),U$=()=>({x:H$(),y:H$()});function W$(e){return[e(`x`),e(`y`)]}function G$({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function K$({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function q$(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 J$(e){return e===void 0||e===1}function Y$({scale:e,scaleX:t,scaleY:n}){return!J$(e)||!J$(t)||!J$(n)}function X$(e){return Y$(e)||Z$(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Z$(e){return Q$(e.x)||Q$(e.y)}function Q$(e){return e&&e!==`0%`}function $$(e,t,n){return n+t*(e-n)}function e1(e,t,n,r,i){return i!==void 0&&(e=$$(e,i,r)),$$(e,n,r)+t}function t1(e,t=0,n=1,r,i){e.min=e1(e.min,t,n,r,i),e.max=e1(e.max,t,n,r,i)}function n1(e,{x:t,y:n}){t1(e.x,t.translate,t.scale,t.originPoint),t1(e.y,n.translate,n.scale,n.originPoint)}var r1=.999999999999,i1=1.0000000000001;function a1(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&&c1(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,n1(e,o)),r&&X$(a.latestValues)&&c1(e,a.latestValues))}t.x<i1&&t.x>r1&&(t.x=1),t.y<i1&&t.y>r1&&(t.y=1)}function o1(e,t){e.min+=t,e.max+=t}function s1(e,t,n,r,i=.5){t1(e,t,n,CZ(e.min,e.max,i),r)}function c1(e,t){s1(e.x,t.x,t.scaleX,t.scale,t.originX),s1(e.y,t.y,t.scaleY,t.scale,t.originY)}function l1(e,t){return G$(q$(e.getBoundingClientRect(),t))}function u1(e,t,n){let r=l1(e,n),{scroll:i}=t;return i&&(o1(r.x,i.offset.x),o1(r.y,i.offset.y)),r}var d1=({current:e})=>e?e.ownerDocument.defaultView:null,f1=new WeakMap,p1=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=U$(),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(r$(e).point)},i=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=kY(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),W$(e=>{let t=this.getAxisMotionValue(e).get()||0;if(sJ.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=x$(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&ZK.postRender(()=>i(e,t)),KY(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=h1(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=()=>W$(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new c$(e,{onSessionStart:r,onStart:i,onMove:a,onSessionEnd:o,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:d1(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&&ZK.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||!m1(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=k$(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&&Sq(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=j$(n.layoutBox,e):this.constraints=!1,this.elastic=L$(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&W$(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=F$(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Sq(e))return!1;let n=e.current;VK(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=u1(n,r.root,this.visualElement.getTransformPagePoint()),a=N$(r.layout.layoutBox,i);if(t){let e=t(K$(a));this.hasMutatedConstraints=!!e,e&&(a=G$(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=W$(o=>{if(!m1(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 KY(this.visualElement,e),n.start(IQ(e,n,0,t,this.visualElement,!1))}stopAnimation(){W$(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){W$(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){W$(t=>{let{drag:n}=this.getProps();if(!m1(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]-CZ(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Sq(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};W$(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=P$({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(),W$(t=>{if(!m1(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(CZ(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;f1.set(this.visualElement,this);let e=this.visualElement.current,t=a$(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();Sq(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()),ZK.read(n);let a=n$(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(W$(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=I$,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function m1(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function h1(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var g1=class extends QQ{constructor(e){super(e),this.removeGroupControls=zK,this.removeListeners=zK,this.controls=new p1(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||zK}unmount(){this.removeGroupControls(),this.removeListeners()}},_1=e=>(t,n)=>{e&&ZK.postRender(()=>e(t,n))},v1=class extends QQ{constructor(){super(...arguments),this.removePointerDownListener=zK}onPointerDown(e){this.session=new c$(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:d1(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:_1(e),onStart:_1(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&ZK.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=a$(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},y1={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function b1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var x1={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(cJ.test(e))e=parseFloat(e);else return e;return`${b1(e,t.target.x)}% ${b1(e,t.target.y)}%`}},S1={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=LX.parse(e);if(i.length>5)return r;let a=LX.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=CZ(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},C1=class extends N.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;NJ(T1),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()})),y1.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()||ZK.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Eq.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 w1(e){let[t,n]=IK(),r=(0,N.useContext)(MK);return(0,P.jsx)(C1,{...e,layoutGroup:r,switchLayoutGroup:(0,N.useContext)(Dq),isPresent:t,safeToRemove:n})}var T1={borderRadius:{...x1,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:x1,borderTopRightRadius:x1,borderBottomLeftRadius:x1,borderBottomRightRadius:x1,boxShadow:S1};function E1(e,t,n){let r=Hq(e)?e:HY(e);return r.start(IQ(``,r,t,n)),r.animation}function D1(e){return e instanceof SVGElement&&e.tagName!==`svg`}var O1=(e,t)=>e.depth-t.depth,k1=class{constructor(){this.children=[],this.isDirty=!1}add(e){PY(this.children,e),this.isDirty=!0}remove(e){FY(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(O1),this.isDirty=!1,this.children.forEach(e)}};function A1(e,t){let n=NY.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(QK(r),e(a-t))};return ZK.read(r,!0),()=>QK(r)}var j1=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],M1=j1.length,N1=e=>typeof e==`string`?parseFloat(e):e,P1=e=>typeof e==`number`||cJ.test(e);function F1(e,t,n,r,i,a){i?(e.opacity=CZ(0,n.opacity===void 0?1:n.opacity,L1(r)),e.opacityExit=CZ(t.opacity===void 0?1:t.opacity,0,R1(r))):a&&(e.opacity=CZ(t.opacity===void 0?1:t.opacity,n.opacity===void 0?1:n.opacity,r));for(let i=0;i<M1;i++){let a=`border${j1[i]}Radius`,o=I1(t,a),s=I1(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||P1(o)===P1(s)?(e[a]=Math.max(CZ(N1(o),N1(s),r),0),(sJ.test(s)||sJ.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=CZ(t.rotate||0,n.rotate||0,r))}function I1(e,t){return e[t]===void 0?e.borderRadius:e[t]}var L1=z1(0,.5,sX),R1=z1(.5,.95,zK);function z1(e,t,n){return r=>r<e?0:r>t?1:n(UK(e,t,r))}function B1(e,t){e.min=t.min,e.max=t.max}function V1(e,t){B1(e.x,t.x),B1(e.y,t.y)}function H1(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function U1(e,t,n,r,i){return e-=t,e=$$(e,1/n,r),i!==void 0&&(e=$$(e,1/i,r)),e}function W1(e,t=0,n=1,r=.5,i,a=e,o=e){if(sJ.test(t)&&(t=parseFloat(t),t=CZ(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=CZ(a.min,a.max,r);e===a&&(s-=t),e.min=U1(e.min,t,n,s,i),e.max=U1(e.max,t,n,s,i)}function G1(e,t,[n,r,i],a,o){W1(e,t[n],t[r],t[i],t.scale,a,o)}var K1=[`x`,`scaleX`,`originX`],q1=[`y`,`scaleY`,`originY`];function J1(e,t,n,r){G1(e.x,t,K1,n?n.x:void 0,r?r.x:void 0),G1(e.y,t,q1,n?n.y:void 0,r?r.y:void 0)}function Y1(e){return e.translate===0&&e.scale===1}function X1(e){return Y1(e.x)&&Y1(e.y)}function Z1(e,t){return e.min===t.min&&e.max===t.max}function Q1(e,t){return Z1(e.x,t.x)&&Z1(e.y,t.y)}function $1(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function e0(e,t){return $1(e.x,t.x)&&$1(e.y,t.y)}function t0(e){return x$(e.x)/x$(e.y)}function n0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var r0=class{constructor(){this.members=[]}add(e){PY(this.members,e),e.scheduleRender()}remove(e){if(FY(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 i0(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 a0={type:`projectionFrame`,totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},o0=typeof window<`u`&&window.MotionDebug!==void 0,s0=[``,`X`,`Y`,`Z`],c0={visibility:`hidden`},l0=1e3,u0=0;function d0(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function f0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=qY(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,ZK,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&f0(r)}function p0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=u0++,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,o0&&(a0.totalNodes=a0.resolvedTargetDeltas=a0.recalculatedProjection=0),this.nodes.forEach(g0),this.nodes.forEach(C0),this.nodes.forEach(w0),this.nodes.forEach(_0),o0&&window.MotionDebug.record(a0)},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 k1)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new IY),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=D1(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=A1(r,250),y1.hasAnimatedSinceResize&&(y1.hasAnimatedSinceResize=!1,this.nodes.forEach(S0))})}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()||j0,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=a.getProps(),c=!this.targetLayout||!e0(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={...$J(i,`layout`),onPlay:o,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||S0(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,QK(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(T0),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&&f0(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(y0);return}this.isUpdating||this.nodes.forEach(b0),this.isUpdating=!1,this.nodes.forEach(x0),this.nodes.forEach(m0),this.nodes.forEach(h0),this.clearAllSnapshots();let e=NY.now();$K.delta=tJ(0,1e3/60,e-$K.timestamp),$K.timestamp=e,$K.isProcessing=!0,eq.update.process($K),eq.preRender.process($K),eq.render.process($K),$K.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Eq.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(v0),this.sharedNodes.forEach(E0)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ZK.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ZK.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=U$(),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&&!X1(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&(t||X$(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)),F0(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return U$();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(L0))){let{scroll:e}=this.root;e&&(o1(t.x,e.offset.x),o1(t.y,e.offset.y))}return t}removeElementScroll(e){let t=U$();if(V1(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&&V1(t,e),o1(t.x,i.offset.x),o1(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=U$();V1(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&&c1(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),X$(r.latestValues)&&c1(n,r.latestValues)}return X$(this.latestValues)&&c1(n,this.latestValues),n}removeTransform(e){let t=U$();V1(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!X$(n.latestValues))continue;Y$(n.latestValues)&&n.updateSnapshot();let r=U$();V1(r,n.measurePageBox()),J1(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return X$(this.latestValues)&&J1(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!==$K.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=$K.timestamp,!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout&&this.animationProgress!==1?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=U$(),this.relativeTargetOrigin=U$(),O$(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),V1(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=U$(),this.targetWithTransforms=U$()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),E$(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):V1(this.target,this.layout.layoutBox),n1(this.target,this.targetDelta)):V1(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=U$(),this.relativeTargetOrigin=U$(),O$(this.relativeTargetOrigin,this.target,e.target),V1(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}o0&&a0.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Y$(this.parent.latestValues)||Z$(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===$K.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;V1(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;a1(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=U$());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(H1(this.prevProjectionDelta.x,this.projectionDelta.x),H1(this.prevProjectionDelta.y,this.projectionDelta.y)),w$(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!n0(this.projectionDelta.x,this.prevProjectionDelta.x)||!n0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),o0&&a0.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=V$(),this.projectionDelta=V$(),this.projectionDeltaWithTransform=V$()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=V$();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=U$(),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(A0));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;D0(a.x,e.x,n),D0(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(O$(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),k0(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&Q1(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=U$(),V1(d,this.relativeTarget)),s&&(this.animationValues=i,F1(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&&=(QK(this.pendingAnimation),void 0),this.pendingAnimation=ZK.update(()=>{y1.hasAnimatedSinceResize=!0,this.currentAnimation=E1(0,l0,{...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(l0),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&&I0(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||U$();let t=x$(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=x$(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}V1(t,n),c1(t,i),w$(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new r0),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&&d0(`z`,e,r,this.animationValues);for(let t=0;t<s0.length;t++)d0(`rotate${s0[t]}`,e,r,this.animationValues),d0(`skew${s0[t]}`,e,r,this.animationValues);e.render();for(let t in 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 c0;let t={visibility:``},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.opacity=``,t.pointerEvents=Uq(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=Uq(e?.pointerEvents)||``),this.hasProjected&&!X$(this.latestValues)&&(t.transform=n?n({},``):`none`,this.hasProjected=!1),t}let i=r.animationValues||r.latestValues;this.applyTransformsToTarget(),t.transform=i0(this.projectionDeltaWithTransform,this.treeScale,i),n&&(t.transform=n(i,t.transform));let{x:a,y:o}=this.projectionDelta;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;for(let e in MJ){if(i[e]===void 0)continue;let{correct:n,applyTo:a}=MJ[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?Uq(e?.pointerEvents)||``:`none`),t}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(y0),this.root.sharedNodes.clear()}}}function m0(e){e.updateLayout()}function h0(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`?W$(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=x$(r);r.min=n[e].min,r.max=r.min+i}):I0(i,t.layoutBox,n)&&W$(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=x$(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=V$();w$(o,n,t.layoutBox);let s=V$();a?w$(s,e.applyTransform(r,!0),t.measuredBox):w$(s,n,t.layoutBox);let c=!X1(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=U$();O$(o,t.layoutBox,i.layoutBox);let s=U$();O$(s,n,a.layoutBox),e0(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 g0(e){o0&&a0.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 _0(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function v0(e){e.clearSnapshot()}function y0(e){e.clearMeasurements()}function b0(e){e.isLayoutDirty=!1}function x0(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function S0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function C0(e){e.resolveTargetDelta()}function w0(e){e.calcProjection()}function T0(e){e.resetSkewAndRotation()}function E0(e){e.removeLeadSnapshot()}function D0(e,t,n){e.translate=CZ(t.translate,0,n),e.scale=CZ(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function O0(e,t,n,r){e.min=CZ(t.min,n.min,r),e.max=CZ(t.max,n.max,r)}function k0(e,t,n,r){O0(e.x,t.x,n.x,r),O0(e.y,t.y,n.y,r)}function A0(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var j0={duration:.45,ease:[.4,0,.1,1]},M0=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),N0=M0(`applewebkit/`)&&!M0(`chrome/`)?Math.round:zK;function P0(e){e.min=N0(e.min),e.max=N0(e.max)}function F0(e){P0(e.x),P0(e.y)}function I0(e,t,n){return e===`position`||e===`preserve-aspect`&&!S$(t0(t),t0(n),.2)}function L0(e){return e!==e.root&&e.scroll?.wasRoot}var R0=p0({attachResizeListener:(e,t)=>n$(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),z0={current:void 0},B0=p0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!z0.current){let e=new R0({});e.mount(window),e.setOptions({layoutScroll:!0}),z0.current=e}return z0.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),V0={pan:{Feature:v1},drag:{Feature:g1,ProjectionNode:B0,MeasureLayout:w1}};function H0(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&ZK.postRender(()=>i(t,r$(t)))}var U0=class extends QQ{mount(){let{current:e}=this.node;e&&(this.unmount=vY(e,e=>(H0(this.node,e,`Start`),e=>H0(this.node,e,`End`))))}unmount(){}},W0=class extends QQ{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=NZ(n$(this.node.current,`focus`,()=>this.onFocus()),n$(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function G0(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&&ZK.postRender(()=>i(t,r$(t)))}var K0=class extends QQ{mount(){let{current:e}=this.node;e&&(this.unmount=OY(e,e=>(G0(this.node,e,`Start`),(e,{success:t})=>G0(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},q0=new WeakMap,J0=new WeakMap,Y0=e=>{let t=q0.get(e.target);t&&t(e)},X0=e=>{e.forEach(Y0)};function Z0({root:e,...t}){let n=e||document;J0.has(n)||J0.set(n,{});let r=J0.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(X0,{root:e,...t})),r[i]}function Q0(e,t,n){let r=Z0(t);return q0.set(e,n),r.observe(e),()=>{q0.delete(e),r.unobserve(e)}}var $0={some:0,all:1},e2=class extends QQ{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:$0[r]};return Q0(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(t2(e,t))&&this.startObserver()}unmount(){}};function t2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var n2={inView:{Feature:e2},tap:{Feature:K0},focus:{Feature:W0},hover:{Feature:U0}},r2={layout:{ProjectionNode:B0,MeasureLayout:w1}},i2={current:null},a2={current:!1};function o2(){if(a2.current=!0,LK)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>i2.current=e.matches;e.addListener(t),t()}else i2.current=!1}var s2=[...pZ,CX,LX],c2=e=>s2.find(fZ(e)),l2=new WeakMap;function u2(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Hq(i))e.addValue(r,i);else if(Hq(a))e.addValue(r,HY(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,HY(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var d2=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],f2=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=oZ,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=NY.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ZK.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=gq(t),this.isVariantNode=_q(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&&Hq(t)&&t.set(s[e],!1)}}mount(e){this.current=e,l2.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)),a2.current||o2(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:i2.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){l2.delete(this.current),this.projection&&this.projection.unmount(),QK(this.notifyUpdate),QK(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(let e in 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=Jq.has(e),r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&ZK.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 rq){let t=rq[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):U$()}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<d2.length;t++){let n=d2[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=u2(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=HY(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`&&(sZ(n)||lX(n))?n=parseFloat(n):!c2(n)&&LX.test(t)&&(n=WX(e,t)),this.setBaseTarget(e,Hq(n)?n.get():n)),Hq(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=Rq(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&&!Hq(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 IY),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}},p2=class extends f2{constructor(){super(...arguments),this.KeyframeResolver=hZ}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;Hq(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function m2(e){return window.getComputedStyle(e)}var h2=class extends p2{constructor(){super(...arguments),this.type=`html`,this.renderInstance=kJ}readValueFromInstance(e,t){if(Jq.has(t)){let e=UX(t);return e&&e.default||0}else{let n=m2(e),r=(Xq(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return l1(e,t)}build(e,t,n){yJ(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return FJ(e,t,n)}},g2=class extends p2{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=U$}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Jq.has(t)){let e=UX(t);return e&&e.default||0}return t=AJ.has(t)?t:wq(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return IJ(e,t,n)}build(e,t,n){TJ(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){jJ(e,t,n,r)}mount(e){this.isSVGTag=OJ(e.tagName),super.mount(e)}},_2=(e,t)=>Iq(e)?new g2(t):new h2(t,{allowProjection:e!==N.Fragment}),v2=uq(qJ({...t$,...n2,...V0,...r2},_2));function y2(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function b2({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&&!T2(s.current.lastBounds,f)&&o(s.current.lastBounds=f)};return[e,l?y2(e,l):e,c?y2(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 S2(p,!!t),x2(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=C2(e),h())},a,d]}function x2(e){(0,N.useEffect)(()=>{let t=e;return window.addEventListener(`resize`,t),()=>void window.removeEventListener(`resize`,t)},[e])}function S2(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 C2(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,...C2(e.parentElement)]}var w2=[`x`,`y`,`top`,`bottom`,`left`,`right`,`width`,`height`],T2=(e,t)=>w2.every(n=>e[n]===t[n]),E2=e=>{throw TypeError(e)},D2=(e,t,n)=>t.has(e)||E2(`Cannot `+n),O2=(e,t,n)=>(D2(e,t,`read from private field`),n?n.call(e):t.get(e)),k2=(e,t,n)=>t.has(e)?E2(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),A2=(e,t,n,r)=>(D2(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),j2,M2=class{constructor(){k2(this,j2),this.register=e=>{O2(this,j2).push(e)},this.unregister=e=>{for(;O2(this,j2).indexOf(e)!==-1;)O2(this,j2).splice(O2(this,j2).indexOf(e),1)},this.backendChanged=e=>{for(let t of O2(this,j2))t.backendChanged(e)},A2(this,j2,[])}};j2=new WeakMap;var N2,P2,F2,I2,L2,R2,z2,B2,V2,H2,U2,W2=class e{constructor(t,n,r){if(k2(this,N2),k2(this,P2),k2(this,F2),k2(this,I2),k2(this,L2),k2(this,R2,(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)}
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}};hL([K()],EL.prototype,`insertMarkdown`,1),hL([vj()],EL.prototype,`getMarkdown`,1),hL([K()],EL.prototype,`toggleBoldMarkdown`,1),EL=hL([_j({defaultOptions:{htmlToMarkdown:_L,markdownToHtml:TL,htmlSanitizer:void 0,activeNodes:[iy.Code],copyAsMarkdown:!1},staticKeys:[`htmlToMarkdown`,`markdownToHtml`,`htmlSanitizer`]})],EL);var DL=Object.defineProperty,OL=Object.getOwnPropertyDescriptor,kL=(e,t,n,r)=>{for(var i=r>1?void 0:r?OL(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&&DL(t,n,i),i},AL={icon:`paragraph`,label:({t:e})=>e(TC.INSERT_LABEL),description:({t:e})=>e(TC.INSERT_DESCRIPTION)},jL={icon:`paragraph`,label:({t:e})=>e(TC.CONVERT_LABEL),description:({t:e})=>e(TC.CONVERT_DESCRIPTION)},ML=class extends fj{get name(){return`paragraph`}createTags(){return[iy.LastNodeCompatible,iy.TextBlock,iy.Block,iy.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)}};kL([K(jL)],ML.prototype,`convertParagraph`,1),kL([K(AL)],ML.prototype,`insertParagraph`,1),kL([yj({shortcut:R.Paragraph,command:`convertParagraph`})],ML.prototype,`shortcut`,1),ML=kL([_j({defaultPriority:sy.Medium})],ML);var NL=Object.defineProperty,PL=Object.getOwnPropertyDescriptor,FL=(e,t,n,r)=>{for(var i=r>1?void 0:r?PL(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&&NL(t,n,i),i},IL=class extends uj{get name(){return`placeholder`}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(e,t)=>({...this.options,empty:Ek(t.doc,{ignoreAttributes:!0})}),apply:(e,t,n,r)=>LL({pluginState:t,tr:e,extension:this,state:r})},props:{decorations:e=>RL({state:e,extension:this})}}}onSetOptions(e){let{changes:t}=e;t.placeholder.changed&&this.store.phase>=cy.EditorView&&this.store.updateAttributes()}};IL=FL([_j({defaultOptions:{emptyNodeClass:OM.IS_EMPTY,placeholder:``}})],IL);function LL(e){let{pluginState:t,extension:n,tr:r,state:i}=e;return r.docChanged?{...n.options,empty:Ek(i.doc)}:t}function RL(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=dD.node(t,t+e.nodeSize,{class:i,"data-placeholder":a});o.push(n)}),mD.create(n.doc,o)}var zL=Object.defineProperty,BL=Object.getOwnPropertyDescriptor,VL=(e,t,n,r)=>{for(var i=r>1?void 0:r?BL(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&&zL(t,n,i),i},HL=class extends fj{get name(){return`text`}createTags(){return[iy.InlineNode]}createNodeSpec(){return{}}};HL=VL([_j({disableExtraAttributes:!0,defaultPriority:sy.Medium})],HL);var UL={...cP.defaultOptions,...ML.defaultOptions,...LP.defaultOptions,excludeExtensions:[]};function WL(e={}){e={...UL,...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 LP({depth:n,getDispatch:r,getState:i,newGroupDelay:a});c.push(e)}return s.doc||c.push(new cP({content:t})),s.text||c.push(new HL),s.paragraph||c.push(new ML),s.positioner||c.push(new bN),s.gapCursor||c.push(new NP),s.events||c.push(new _P),c}var GL=Object.defineProperty,KL=Object.getOwnPropertyDescriptor,qL=(e,t,n,r)=>{for(var i=r>1?void 0:r?KL(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&&GL(t,n,i),i},JL=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},X=(e,t,n)=>(JL(e,t,`read from private field`),n?n.call(e):t.get(e)),YL=(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)},XL=(e,t,n,r)=>(JL(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),ZL,QL=class{constructor(){this.portals=new Map,YL(this,ZL,ej()),this.on=e=>X(this,ZL).on(`update`,e),this.once=e=>{let t=X(this,ZL).on(`update`,n=>{t(),e(n)});return t}}update(){X(this,ZL).emit(`update`,this.portals)}render({Component:e,container:t}){let n=this.portals.get(t);this.portals.set(t,{Component:e,key:n?.key??ab()}),this.update()}forceUpdate(){for(let[e,{Component:t}]of this.portals)this.portals.set(e,{Component:t,key:ab()})}remove(e){this.portals.delete(e),this.update()}};ZL=new WeakMap;var $L=e=>{let{portals:t}=e;return N.createElement(N.Fragment,null,t.map(([e,{Component:t,key:n}])=>(0,Pl.createPortal)(N.createElement(t,null),e,n)))};function eR(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 tR,nR,rR,iR,aR,oR,sR,cR,lR,uR,dR,fR,pR=class{constructor({getPosition:e,node:t,portalContainer:n,view:r,ReactComponent:i,options:a}){YL(this,tR,void 0),YL(this,nR,[]),YL(this,rR,void 0),YL(this,iR,void 0),YL(this,aR,void 0),YL(this,oR,void 0),YL(this,sR,void 0),YL(this,cR,!1),YL(this,lR,void 0),YL(this,uR,void 0),YL(this,dR,void 0),YL(this,fR,e=>{e&&(V(X(this,uR),{code:z.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${X(this,tR).type.name}' which doesn't support content.`}),e.append(X(this,uR)))}),this.Component=()=>{let e=X(this,aR);return V(e,{code:z.REACT_NODE_VIEW,message:`The custom react node view provided for ${X(this,tR).type.name} doesn't have a valid ReactComponent`}),N.createElement(e,{updateAttributes:this.updateAttributes,selected:this.selected,view:X(this,rR),getPosition:X(this,oR),node:X(this,tR),forwardRef:X(this,fR),decorations:X(this,nR)})},this.updateAttributes=e=>{if(!X(this,rR).editable)return;let t=X(this,oR).call(this);if(t==null)return;let n=X(this,rR).state.tr.setNodeMarkup(t,void 0,{...X(this,tR).attrs,...e});X(this,rR).dispatch(n)},V(Uy(e),{message:`You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration.`}),XL(this,tR,t),XL(this,rR,r),XL(this,iR,n),XL(this,aR,i),XL(this,oR,e),XL(this,sR,a),XL(this,dR,this.createDom());let{contentDOM:o,wrapper:s}=this.createContentDom()??{};XL(this,lR,o??void 0),XL(this,uR,s),X(this,uR)&&X(this,dR).append(X(this,uR)),this.setDomAttributes(X(this,tR),X(this,dR)),this.Component.displayName=by(`${X(this,tR).type.name}NodeView`),this.renderComponent()}static create(e){let{portalContainer:t,ReactComponent:n,options:r}=e;return(e,i,a)=>new pR({options:r,node:e,view:i,getPosition:a,portalContainer:t,ReactComponent:n})}get selected(){return X(this,cR)}get contentDOM(){return X(this,lR)}get dom(){return X(this,dR)}renderComponent(){X(this,iR).render({Component:this.Component,container:X(this,dR)})}createDom(){let{defaultBlockNode:e,defaultInlineNode:t}=X(this,sR),n=X(this,tR).isInline?document.createElement(t):document.createElement(e);return n.classList.add(`${xy(X(this,tR).type.name)}-node-view-wrapper`),n}createContentDom(){var e;if(X(this,tR).isLeaf)return;let t=(e=X(this,tR).type.spec).toDOM?.call(e,X(this,tR));if(!t)return;let{contentDOM:n,dom:r}=Hx.renderSpec(document,t),i;if(XO(r))return i=r,r===n&&(i=document.createElement(`span`),i.classList.add(`${xy(X(this,tR).type.name)}-node-view-content-wrapper`),i.append(n)),XO(n),{wrapper:i,contentDOM:n}}update(e,t){return ZO({types:X(this,tR).type,node:e})?X(this,tR)===e&&X(this,nR)===t?!0:(X(this,tR).sameMarkup(e)||this.setDomAttributes(e,X(this,dR)),XL(this,tR,e),XL(this,nR,t),this.renderComponent(),!0):!1}setDomAttributes(e,t){let{toDOM:n}=X(this,tR).type.spec,r=e.attrs;if(n){let t=n(e);if(Vy(t)||hR(t))return;Ky(t[1])&&(r=t[1])}for(let[e,n]of My(r))t.setAttribute(e,n)}selectNode(){XL(this,cR,!0),X(this,dR)&&X(this,dR).classList.add(ny),this.renderComponent()}deselectNode(){XL(this,cR,!1),X(this,dR)&&X(this,dR).classList.remove(ny),this.renderComponent()}destroy(){X(this,iR).remove(X(this,dR))}ignoreMutation(e){return e.type===`selection`?!X(this,tR).type.spec.selectable:X(this,uR)?!X(this,uR).contains(e.target):!0}stopEvent(e){if(!X(this,dR))return!1;if(Uy(X(this,sR).stopEvent))return X(this,sR).stopEvent({event:e});let t=e.target;if(!(X(this,dR).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=!!X(this,tR).type.spec.draggable,i=ZS.isSelectable(X(this,tR)),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)}},mR=pR;tR=new WeakMap,nR=new WeakMap,rR=new WeakMap,iR=new WeakMap,aR=new WeakMap,oR=new WeakMap,sR=new WeakMap,cR=new WeakMap,lR=new WeakMap,uR=new WeakMap,dR=new WeakMap,fR=new WeakMap;function hR(e){return YO(e)||Ky(e)&&YO(e.dom)}var gR=class extends uj{constructor(){super(...arguments),this.portalContainer=new QL}get name(){return`reactComponent`}onCreate(){this.store.setStoreKey(`portalContainer`,this.portalContainer)}createNodeViews(){let e=B(),t=this.store.managerSettings.nodeViewComponents??{};for(let t of this.store.extensions)!t.ReactComponent||!hj(t)||t.reactComponentEnvironment===`ssr`||(e[t.name]=mR.create({options:this.options,ReactComponent:t.ReactComponent,portalContainer:this.portalContainer}));let n=My({...this.options.nodeViewComponents,...t});for(let[t,r]of n)e[t]=mR.create({options:this.options,ReactComponent:r,portalContainer:this.portalContainer});return e}};gR=qL([_j({defaultOptions:{defaultBlockNode:`div`,defaultInlineNode:`span`,defaultContentNode:`span`,defaultEnvironment:`both`,nodeViewComponents:{},stopEvent:null},staticKeys:[`defaultBlockNode`,`defaultInlineNode`,`defaultContentNode`,`defaultEnvironment`]})],gR);var _R=Object.defineProperty,vR=Object.getOwnPropertySymbols,yR=Object.prototype.hasOwnProperty,bR=Object.prototype.propertyIsEnumerable,xR=(e,t,n)=>t in e?_R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SR=(e,t)=>{for(var n in t||={})yR.call(t,n)&&xR(e,n,t[n]);if(vR)for(var n of vR(t))bR.call(t,n)&&xR(e,n,t[n]);return e};function CR(e){let t=(0,N.createContext)(null);return[n=>{let r=e(n);return N.createElement(t.Provider,{value:r},n.children)},wR(t),t]}function wR(e){return(t,n)=>{let r=(0,N.useContext)(e),i=TR(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 TR(e){let t=(0,N.useRef)();return ER(()=>{t.current=e}),t.current}var ER=typeof document<`u`?N.useLayoutEffect:N.useEffect;function DR(e,t){return CR(n=>{let r=(0,N.useRef)(null),i=(0,N.useRef)(),a=t?.(n),[o,s]=(0,N.useState)(()=>e({get:OR(r),set:kR(i),previousContext:void 0,props:n,state:a})),c=[...Object.values(n),a];return(0,N.useEffect)(()=>{c.length!==0&&s(t=>e({get:OR(r),set:kR(i),previousContext:t,props:n,state:a}))},c),r.current=o,i.current=s,o})}function OR(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 kR(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=>SR(SR({},e),typeof t==`function`?t(e):t))}}var AR=i((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`]])})),jR=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.unraw=e.errorMessages=e.ErrorType=void 0;var t=AR();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}))(),MR=e=>typeof e==`string`,NR=e=>typeof e==`function`,PR=new Map,FR=`en`;function IR(e){return[...Array.isArray(e)?e:[e],FR]}function LR(e,t,n){let r=IR(e);return BR(()=>VR(`date`,r,n),()=>new Intl.DateTimeFormat(r,n)).format(MR(t)?new Date(t):t)}function RR(e,t,n){let r=IR(e);return BR(()=>VR(`number`,r,n),()=>new Intl.NumberFormat(r,n)).format(t)}function zR(e,t,n,{offset:r=0,...i}){let a=IR(e),o=t?BR(()=>VR(`plural-ordinal`,a),()=>new Intl.PluralRules(a,{type:`ordinal`})):BR(()=>VR(`plural-cardinal`,a),()=>new Intl.PluralRules(a,{type:`cardinal`}));return i[n]??i[o.select(n-r)]??i.other}function BR(e,t){let n=e(),r=PR.get(n);return r||(r=t(),PR.set(n,r)),r}function VR(e,t,n){return`${e}-${t.join(`-`)}-${JSON.stringify(n)}`}var HR=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,UR=`%__lingui_octothorpe__%`,WR=(e,t,n={})=>{let r=t||e,i=e=>typeof e==`object`?e:n[e]||{style:e},a=(e,t)=>{let a=RR(r,e,Object.keys(n).length?i(`number`):void 0);return t.replace(new RegExp(UR,`g`),a)};return{plural:(e,t)=>{let{offset:n=0}=t,i=zR(r,!1,e,t);return a(e-n,i)},selectordinal:(e,t)=>{let{offset:n=0}=t,i=zR(r,!0,e,t);return a(e-n,i)},select:GR,number:(e,t)=>RR(r,e,i(t)),date:(e,t)=>LR(r,e,i(t))}},GR=(e,t)=>t[e]??t.other;function KR(e,t,n){return(r={},i)=>{let a=WR(t,n,i),o=(e,t=!1)=>Array.isArray(e)?e.reduce((e,n)=>{if(n===`#`&&t)return e+UR;if(MR(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 MR(s)&&HR.test(s)?(0,jR.unraw)(s.trim()):MR(s)?s.trim():s?String(s):``}}var qR=Object.defineProperty,JR=(e,t,n)=>t in e?qR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,YR=(e,t,n)=>(JR(e,typeof t==`symbol`?t:t+``,n),n),XR=class{constructor(){YR(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}},ZR=Object.defineProperty,QR=(e,t,n)=>t in e?ZR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$R=(e,t,n)=>(QR(e,typeof t==`symbol`?t:t+``,n),n),ez=class extends XR{constructor(e){super(),$R(this,`_locale`,``),$R(this,`_locales`),$R(this,`_localeData`,{}),$R(this,`_messages`,{}),$R(this,`_missing`),$R(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??FR,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||=``,MR(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 NR(o)?o(this._locale,e):o;a&&this.emit(`missing`,{id:e,locale:this._locale});let s=i||r||e;return MR(s)&&HR.test(s)?JSON.parse(`"${s}"`):MR(s)?s:KR(s,this._locale,this._locales)(t,n?.formats)}date(e,t){return LR(this._locales||this._locale,e,t)}number(e,t){return RR(this._locales||this._locale,e,t)}};function tz(e={}){return new ez(e)}var nz=tz(),rz=t({_in:()=>cz,af:()=>lz,ak:()=>uz,am:()=>dz,an:()=>fz,ar:()=>pz,ars:()=>mz,as:()=>hz,asa:()=>gz,ast:()=>_z,az:()=>vz,be:()=>yz,bem:()=>bz,bez:()=>xz,bg:()=>Sz,bho:()=>Cz,bm:()=>wz,bn:()=>Tz,bo:()=>Ez,br:()=>Dz,brx:()=>Oz,bs:()=>kz,ca:()=>Az,ce:()=>jz,ceb:()=>Mz,cgg:()=>Nz,chr:()=>Pz,ckb:()=>Fz,cs:()=>Iz,cy:()=>Lz,da:()=>Rz,de:()=>zz,dsb:()=>Bz,dv:()=>Vz,dz:()=>Hz,ee:()=>Uz,el:()=>Wz,en:()=>Gz,eo:()=>Kz,es:()=>qz,et:()=>Jz,eu:()=>Yz,fa:()=>Xz,ff:()=>Zz,fi:()=>Qz,fil:()=>$z,fo:()=>eB,fr:()=>tB,fur:()=>nB,fy:()=>rB,ga:()=>iB,gd:()=>aB,gl:()=>oB,gsw:()=>sB,gu:()=>cB,guw:()=>lB,gv:()=>uB,ha:()=>dB,haw:()=>fB,he:()=>pB,hi:()=>mB,hr:()=>hB,hsb:()=>gB,hu:()=>_B,hy:()=>vB,ia:()=>yB,id:()=>bB,ig:()=>xB,ii:()=>SB,io:()=>CB,is:()=>wB,it:()=>TB,iu:()=>EB,iw:()=>DB,ja:()=>OB,jbo:()=>kB,jgo:()=>AB,ji:()=>jB,jmc:()=>MB,jv:()=>NB,jw:()=>PB,ka:()=>FB,kab:()=>IB,kaj:()=>LB,kcg:()=>RB,kde:()=>zB,kea:()=>BB,kk:()=>VB,kkj:()=>HB,kl:()=>UB,km:()=>WB,kn:()=>GB,ko:()=>KB,ks:()=>qB,ksb:()=>JB,ksh:()=>YB,ku:()=>XB,kw:()=>ZB,ky:()=>QB,lag:()=>$B,lb:()=>eV,lg:()=>tV,lkt:()=>nV,ln:()=>rV,lo:()=>iV,lt:()=>aV,lv:()=>oV,mas:()=>sV,mg:()=>cV,mgo:()=>lV,mk:()=>uV,ml:()=>dV,mn:()=>fV,mo:()=>pV,mr:()=>mV,ms:()=>hV,mt:()=>gV,my:()=>_V,nah:()=>vV,naq:()=>yV,nb:()=>bV,nd:()=>xV,ne:()=>SV,nl:()=>CV,nn:()=>wV,nnh:()=>TV,no:()=>EV,nqo:()=>DV,nr:()=>OV,nso:()=>kV,ny:()=>AV,nyn:()=>jV,om:()=>MV,or:()=>NV,os:()=>PV,osa:()=>FV,pa:()=>IV,pap:()=>LV,pl:()=>RV,prg:()=>zV,ps:()=>BV,pt:()=>VV,pt_PT:()=>HV,rm:()=>UV,ro:()=>WV,rof:()=>GV,root:()=>KV,ru:()=>qV,rwk:()=>JV,sah:()=>YV,saq:()=>XV,sc:()=>ZV,scn:()=>QV,sd:()=>$V,sdh:()=>eH,se:()=>tH,seh:()=>nH,ses:()=>rH,sg:()=>iH,sh:()=>aH,shi:()=>oH,si:()=>sH,sk:()=>cH,sl:()=>lH,sma:()=>uH,smi:()=>dH,smj:()=>fH,smn:()=>pH,sms:()=>mH,sn:()=>hH,so:()=>gH,sq:()=>_H,sr:()=>vH,ss:()=>yH,ssy:()=>bH,st:()=>xH,su:()=>SH,sv:()=>CH,sw:()=>wH,syr:()=>TH,ta:()=>EH,te:()=>DH,teo:()=>OH,th:()=>kH,ti:()=>AH,tig:()=>jH,tk:()=>MH,tl:()=>NH,tn:()=>PH,to:()=>FH,tr:()=>IH,ts:()=>LH,tzm:()=>RH,ug:()=>zH,uk:()=>BH,ur:()=>VH,uz:()=>HH,ve:()=>UH,vi:()=>WH,vo:()=>GH,vun:()=>KH,wa:()=>qH,wae:()=>JH,wo:()=>YH,xh:()=>XH,xog:()=>ZH,yi:()=>QH,yo:()=>$H,yue:()=>eU,zh:()=>tU,zu:()=>nU});function Z(e,t){return t?`other`:e==1?`one`:`other`}function iz(e,t){return t?`other`:e==0||e==1?`one`:`other`}function az(e,t){var n=!String(e).split(`.`)[1];return t?`other`:e==1&&n?`one`:`other`}function oz(e,t){return`other`}function sz(e,t){return t?`other`:e==1?`one`:e==2?`two`:`other`}const cz=oz,lz=Z,uz=iz;function dz(e,t){return t?`other`:e>=0&&e<=1?`one`:`other`}const fz=Z;function pz(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 mz(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 hz(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 gz=Z,_z=az;function vz(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 yz(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 bz=Z,xz=Z,Sz=Z,Cz=iz,wz=oz;function Tz(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 Ez=oz;function Dz(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 Oz=Z;function kz(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 Az(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 jz=Z;function Mz(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 Nz=Z,Pz=Z,Fz=Z;function Iz(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 Lz(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 Rz(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 zz=az;function Bz(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 Vz=Z,Hz=oz,Uz=Z,Wz=Z;function Gz(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 Kz=Z,qz=Z,Jz=az,Yz=Z;function Xz(e,t){return t?`other`:e>=0&&e<=1?`one`:`other`}function Zz(e,t){return t?`other`:e>=0&&e<2?`one`:`other`}const Qz=az;function $z(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 eB=Z;function tB(e,t){return t?e==1?`one`:`other`:e>=0&&e<2?`one`:`other`}const nB=Z,rB=az;function iB(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 aB(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 oB=az,sB=Z;function cB(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 lB=iz;function uB(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 dB=Z,fB=Z;function pB(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 mB(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 hB(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 gB(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 _B(e,t){return t?e==1||e==5?`one`:`other`:e==1?`one`:`other`}function vB(e,t){return t?e==1?`one`:`other`:e>=0&&e<2?`one`:`other`}const yB=az,bB=oz,xB=oz,SB=oz,CB=az;function wB(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 TB(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 EB=sz;function DB(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 OB=oz,kB=oz,AB=Z,jB=az,MB=Z,NB=oz,PB=oz;function FB(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 IB(e,t){return t?`other`:e>=0&&e<2?`one`:`other`}const LB=Z,RB=Z,zB=oz,BB=oz;function VB(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 HB=Z,UB=Z,WB=oz;function GB(e,t){return t?`other`:e>=0&&e<=1?`one`:`other`}const KB=oz,qB=Z,JB=Z;function YB(e,t){return t?`other`:e==0?`zero`:e==1?`one`:`other`}const XB=Z;function ZB(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 QB=Z;function $B(e,t){var n=String(e).split(`.`)[0];return t?`other`:e==0?`zero`:(n==0||n==1)&&e!=0?`one`:`other`}const eV=Z,tV=Z,nV=oz,rV=iz;function iV(e,t){return t&&e==1?`one`:`other`}function aV(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 oV(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 sV=Z,cV=iz,lV=Z;function uV(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 dV=Z,fV=Z;function pV(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 mV(e,t){return t?e==1?`one`:e==2||e==3?`two`:e==4?`few`:`other`:e==1?`one`:`other`}function hV(e,t){return t&&e==1?`one`:`other`}function gV(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 _V=oz,vV=Z,yV=sz,bV=Z,xV=Z;function SV(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 CV=az,wV=Z,TV=Z,EV=Z,DV=oz,OV=Z,kV=iz,AV=Z,jV=Z,MV=Z;function NV(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 PV=Z,FV=oz,IV=iz,LV=Z;function RV(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 zV(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 BV=Z;function VV(e,t){var n=String(e).split(`.`)[0];return t?`other`:n==0||n==1?`one`:`other`}const HV=az,UV=Z;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`}const GV=Z,KV=oz;function qV(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 JV=Z,YV=oz,XV=Z;function ZV(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 QV(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 $V=Z,eH=Z,tH=sz,nH=Z,rH=oz,iH=oz;function aH(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 oH(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 sH(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 cH(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 lH(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 uH=sz,dH=sz,fH=sz,pH=sz,mH=sz,hH=Z,gH=Z;function _H(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 vH(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 yH=Z,bH=Z,xH=Z,SH=oz;function CH(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 wH=az,TH=Z,EH=Z,DH=Z,OH=Z,kH=oz,AH=iz,jH=Z;function MH(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 NH(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 PH=Z,FH=oz,IH=Z,LH=Z;function RH(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 zH=Z;function BH(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 VH=az,HH=Z,UH=Z;function WH(e,t){return t&&e==1?`one`:`other`}const GH=Z,KH=Z,qH=iz,JH=Z,YH=oz,XH=Z,ZH=Z,QH=az,$H=oz,eU=oz,tU=oz;function nU(e,t){return t?`other`:e>=0&&e<=1?`one`:`other`}var rU=Object.defineProperty,iU=Object.getOwnPropertyDescriptor,aU=Object.getOwnPropertyNames,oU=Object.prototype.hasOwnProperty,sU=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of aU(t))!oU.call(e,i)&&i!==n&&rU(e,i,{get:()=>t[i],enumerable:!(r=iU(t,i))||r.enumerable});return e},cU=(e,t,n)=>(sU(e,t,`default`),n&&sU(n,t,`default`)),lU=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"]]}`),uU={};cU(uU,rz),nz.loadLocaleData(`en`,{plurals:uU.en}),nz.load(`en`,lU),nz.activate(`en`);var dU=Object.defineProperty,fU=Object.getOwnPropertyDescriptor,pU=(e,t,n,r)=>{for(var i=r>1?void 0:r?fU(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&&dU(t,n,i),i},mU={...IL.defaultOptions,...gR.defaultOptions},hU=[...IL.staticKeys,...gR.staticKeys],gU=class extends uj{get name(){return`react`}onSetOptions(e){let{pickChanged:t}=e;this.getExtension(IL).setOptions(t([`placeholder`]))}createExtensions(){let{emptyNodeClass:e,placeholder:t,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:i,defaultInlineNode:a,nodeViewComponents:o}=this.options;return[new IL({emptyNodeClass:e,placeholder:t,priority:sy.Low}),new gR({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:i,defaultInlineNode:a,nodeViewComponents:o})]}};gU=pU([_j({defaultOptions:mU,staticKeys:hU})],gU);var _U=e(i((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),vU=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},yU=(e,t,n)=>(vU(e,t,`read from private field`),n?n.call(e):t.get(e)),bU=(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)},xU=(e,t,n,r)=>(vU(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n);function SU(){let[,e]=(0,N.useState)(B());return(0,N.useCallback)(()=>{e(B())},[])}var CU=(0,N.createContext)(null);function wU(e){let t=(0,N.useContext)(CU),n=(0,N.useRef)(SU());V(t,{code:z.REACT_PROVIDER_CONTEXT});let{addHandler:r}=t;return(0,N.useEffect)(()=>{let t=e;if(t){if(Ky(t)){let{autoUpdate:e}=t;t=e?()=>n.current():void 0}if(Uy(t))return r(`updated`,t)}},[r,e]),t}function TU(e=!0){return wU({autoUpdate:e}).active}function EU(){return wU().commands}var[DU,wie]=DR(({props:e})=>{let t=e.locale??`en`,n=e.i18n??nz;return{locale:t,i18n:n,supportedLocales:e.supportedLocales??[t],t:n._.bind(n)}});function OU(e,t={}){let{core:n,react:r,...i}=t;return xie(e)?e:bie.create(()=>[...yb(e),new gU(r),...WL(n)],i)}function kU(e,t={}){let n=(0,N.useRef)(e),r=(0,N.useRef)(t),[i,a]=(0,N.useState)(()=>OU(e,t));return n.current=e,r.current=t,(0,N.useEffect)(()=>i.addHandler(`destroy`,()=>{a(()=>OU(n.current,r.current))}),[i]),i}var AU=typeof _U.default==`object`&&_U.default.__esModule&&_U.default.default?_U.default.default:_U.default,jU,MU=class extends hie{constructor(e){if(super(e),bU(this,jU,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??B();return{[n]:AU(r,this.onRef),key:this.uid,...i,children:t}},this.onRef=e=>{e&&(this.rootPropsConfig.count+=1,V(this.rootPropsConfig.count<=1,{code:z.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),xU(this,jU,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(IL).setOptions({placeholder:this.props.placeholder??``})}get name(){return`react`}update(e){return super.update(e),this}createView(e){return new JD(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;V(t,{code:z.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),V(n,{code:z.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(ry,{}))),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(ry,{})),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(){V(yU(this,jU),{code:z.REACT_EDITOR_VIEW,message:`Something went wrong when initializing the text editor. Please check your setup.`});let{autoFocus:e}=this.props;this.addProsemirrorViewToDom(yU(this,jU),this.view.dom),e&&this.focus(e),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&yU(this,jU)&&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}};jU=new WeakMap;var NU=typeof document<`u`?N.useLayoutEffect:N.useEffect;function PU(e){let t=(0,N.useRef)();return NU(()=>{t.current=e}),t.current}function FU(e){let{manager:t,state:n}=e,{placeholder:r,editable:i}=e;(0,N.useRef)(!0).current&&!Jy(r)&&t.getExtension(gU).setOptions({placeholder:r}),(0,N.useEffect)(()=>{r!=null&&t.getExtension(gU).setOptions({placeholder:r})},[r,t]);let[a]=(0,N.useState)(()=>{if(n)return n;let r=t.createEmptyDoc(),[i,a]=eb(e.initialContent)?e.initialContent:[e.initialContent??r];return t.createState({content:i,selection:a})}),o=IU({initialEditorState:a,getProps:()=>e});return(0,N.useEffect)(()=>()=>{o.destroy()},[o]),(0,N.useEffect)(()=>{o.onUpdate()},[i,o]),LU(o),o.frameworkOutput}function IU(e){let t=(0,N.useRef)(e);t.current=e;let n=(0,N.useMemo)(()=>new MU(t.current),[]);return n.update(e),n}function LU(e){let{state:t}=e.props,n=(0,N.useRef)(!!t),r=PU(t);NU(()=>{V(t?n.current===!0:n.current===!1,{code:z.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 RU(e={}){let{content:t,document:n,selection:r,extensions:i,...a}=e,o=kU(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 zU=()=>N.createElement(`div`,{className:EM.EDITOR_WRAPPER,...wU().getRootProps()}),BU=e=>(e.hook(),null);function VU(e){let{children:t,autoRender:n,i18n:r,locale:i,supportedLocales:a,hooks:o=[],...s}=e,c=FU(s),l=eR(c.portalContainer),u=n===`start`||n===!0||!t&&Jy(n),d=n===`end`;return N.createElement(DU,{i18n:r,locale:i,supportedLocales:a},N.createElement(CU.Provider,{value:c},N.createElement($L,{portals:l}),o.map((e,t)=>N.createElement(BU,{hook:e,key:t})),u&&N.createElement(zU,null),t,d&&N.createElement(zU,null)))}function HU(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 UU(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 WU,GU,KU=n((()=>{WU=!1,GU=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?!WU: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(UU(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=HU(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}()})),qU,JU,YU,XU,ZU,QU,$U,eW,tW,nW=n((()=>{qU=`-ms-`,JU=`-moz-`,YU=`-webkit-`,XU=`comm`,ZU=`rule`,QU=`decl`,$U=`@import`,eW=`@keyframes`,tW=`@layer`}));function rW(e,t){return cW(e,0)^45?(((t<<2^cW(e,0))<<2^cW(e,1))<<2^cW(e,2))<<2^cW(e,3):0}function iW(e){return e.trim()}function aW(e,t){return(e=t.exec(e))?e[0]:e}function oW(e,t,n){return e.replace(t,n)}function sW(e,t){return e.indexOf(t)}function cW(e,t){return e.charCodeAt(t)|0}function lW(e,t,n){return e.slice(t,n)}function uW(e){return e.length}function dW(e){return e.length}function fW(e,t){return t.push(e),e}function pW(e,t){return e.map(t).join(``)}var mW,hW,gW,_W=n((()=>{mW=Math.abs,hW=String.fromCharCode,gW=Object.assign}));function vW(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:FW,column:IW,length:o,return:``}}function yW(e,t){return gW(vW(``,null,null,``,null,null,0),e,{length:-e.length},t)}function bW(){return zW}function xW(){return zW=RW>0?cW(BW,--RW):0,IW--,zW===10&&(IW=1,FW--),zW}function SW(){return zW=RW<LW?cW(BW,RW++):0,IW++,zW===10&&(IW=1,FW++),zW}function CW(){return cW(BW,RW)}function wW(){return RW}function TW(e,t){return lW(BW,e,t)}function EW(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 DW(e){return FW=IW=1,LW=uW(BW=e),RW=0,[]}function OW(e){return BW=``,e}function kW(e){return iW(TW(RW-1,MW(e===91?e+2:e===40?e+1:e)))}function AW(e){for(;(zW=CW())&&zW<33;)SW();return EW(e)>2||EW(zW)>3?``:` `}function jW(e,t){for(;--t&&SW()&&!(zW<48||zW>102||zW>57&&zW<65||zW>70&&zW<97););return TW(e,wW()+(t<6&&CW()==32&&SW()==32))}function MW(e){for(;SW();)switch(zW){case e:return RW;case 34:case 39:e!==34&&e!==39&&MW(zW);break;case 40:e===41&&MW(e);break;case 92:SW();break}return RW}function NW(e,t){for(;SW()&&e+zW!==57&&!(e+zW===84&&CW()===47););return`/*`+TW(t,RW-1)+`*`+hW(e===47?e:SW())}function PW(e){for(;!EW(CW());)SW();return TW(e,RW)}var FW,IW,LW,RW,zW,BW,VW=n((()=>{_W(),FW=1,IW=1,LW=0,RW=0,zW=0,BW=``}));function HW(e){return OW(UW(``,null,null,null,[``],e=DW(e),0,[0],e))}function UW(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=SW()){case 40:if(m!=108&&cW(C,d-1)==58){sW(C+=oW(kW(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=kW(v);break;case 9:case 10:case 13:case 32:C+=AW(m);break;case 92:C+=jW(wW()-1,7);continue;case 47:switch(CW()){case 42:case 47:fW(GW(NW(SW(),wW()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=uW(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=oW(C,/\f/g,``)),p>0&&uW(C)-d&&fW(p>32?KW(C+`;`,r,n,d-1):KW(oW(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(fW(S=WW(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123)if(u===0)UW(C,t,S,S,b,a,d,s,x);else switch(f===99&&cW(C,3)===110?100:f){case 100:case 108:case 109:case 115:UW(e,S,S,r&&fW(WW(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:UW(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+uW(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&xW()==125)continue}switch(C+=hW(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(uW(C)-1)*_,_=1;break;case 64:CW()===45&&(C+=kW(SW())),f=CW(),u=d=uW(y=C+=PW(wW())),v++;break;case 45:m===45&&uW(C)==2&&(h=0)}}return a}function WW(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=dW(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=lW(e,d+1,d=mW(h=o[m])),y=e;_<p;++_)(y=iW(h>0?f[_]+` `+v:oW(v,/&\f/g,f[_])))&&(c[g++]=y);return vW(e,t,n,i===0?ZU:s,c,l,u)}function GW(e,t,n){return vW(e,t,n,XU,hW(bW()),lW(e,2,-2),0)}function KW(e,t,n,r){return vW(e,t,n,QU,lW(e,0,r),lW(e,r+1,-1),r)}var qW=n((()=>{nW(),_W(),VW()})),JW=n((()=>{}));function YW(e,t){for(var n=``,r=dW(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function XW(e,t,n,r){switch(e.type){case tW:if(e.children.length)break;case $U:case QU:return e.return=e.return||e.value;case XU:return``;case eW:return e.return=e.value+`{`+YW(e.children,r)+`}`;case ZU:e.value=e.props.join(`,`)}return uW(n=YW(e.children,r))?e.return=e.value+`{`+n+`}`:``}var ZW=n((()=>{nW(),_W()}));function QW(e){var t=dW(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 $W(e){return function(t){t.root||(t=t.return)&&e(t)}}var eG=n((()=>{_W()})),tG=n((()=>{nW(),_W(),qW(),JW(),VW(),ZW(),eG()}));function nG(e,t){switch(rW(e,t)){case 5103:return YU+`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 YU+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return YU+e+JU+e+qU+e+e;case 6828:case 4268:return YU+e+qU+e+e;case 6165:return YU+e+qU+`flex-`+e+e;case 5187:return YU+e+oW(e,/(\w+).+(:[^]+)/,YU+`box-$1$2`+qU+`flex-$1$2`)+e;case 5443:return YU+e+qU+`flex-item-`+oW(e,/flex-|-self/,``)+e;case 4675:return YU+e+qU+`flex-line-pack`+oW(e,/align-content|flex-|-self/,``)+e;case 5548:return YU+e+qU+oW(e,`shrink`,`negative`)+e;case 5292:return YU+e+qU+oW(e,`basis`,`preferred-size`)+e;case 6060:return YU+`box-`+oW(e,`-grow`,``)+YU+e+qU+oW(e,`grow`,`positive`)+e;case 4554:return YU+oW(e,/([^-])(transform)/g,`$1`+YU+`$2`)+e;case 6187:return oW(oW(oW(e,/(zoom-|grab)/,YU+`$1`),/(image-set)/,YU+`$1`),e,``)+e;case 5495:case 3959:return oW(e,/(image-set\([^]*)/,YU+"$1$`$1");case 4968:return oW(oW(e,/(.+:)(flex-)?(.*)/,YU+`box-pack:$3`+qU+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+YU+e+e;case 4095:case 3583:case 4068:case 2532:return oW(e,/(.+)-inline(.+)/,YU+`$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(uW(e)-1-t>6)switch(cW(e,t+1)){case 109:if(cW(e,t+4)!==45)break;case 102:return oW(e,/(.+:)(.+)-([^]+)/,`$1`+YU+`$2-$3$1`+JU+(cW(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~sW(e,`stretch`)?nG(oW(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(cW(e,t+1)!==115)break;case 6444:switch(cW(e,uW(e)-3-(~sW(e,`!important`)&&10))){case 107:return oW(e,`:`,`:`+YU)+e;case 101:return oW(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+YU+(cW(e,14)===45?`inline-`:``)+`box$3$1`+YU+`$2$3$1`+qU+`$2box$3`)+e}break;case 5936:switch(cW(e,t+11)){case 114:return YU+e+qU+oW(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return YU+e+qU+oW(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return YU+e+qU+oW(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return YU+e+qU+e+e}return e}var rG,iG,aG,oG,sG,cG,lG,uG,dG=n((()=>{KU(),tG(),rG=function(e,t,n){for(var r=0,i=0;r=i,i=CW(),r===38&&i===12&&(t[n]=1),!EW(i);)SW();return TW(e,RW)},iG=function(e,t){var n=-1,r=44;do switch(EW(r)){case 0:r===38&&CW()===12&&(t[n]=1),e[n]+=rG(RW-1,t,n);break;case 2:e[n]+=kW(r);break;case 4:if(r===44){e[++n]=CW()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=hW(r)}while(r=SW());return e},aG=function(e,t){return OW(iG(DW(e),t))},oG=new WeakMap,sG=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&&!oG.get(n))&&!r){oG.set(e,!0);for(var i=[],a=aG(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]}}},cG=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}},lG=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case QU:e.return=nG(e.value,e.length);break;case eW:return YW([yW(e,{value:oW(e.value,`@`,`@`+YU)})],r);case ZU:if(e.length)return pW(e.props,function(t){switch(aW(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return YW([yW(e,{props:[oW(t,/:(read-\w+)/,`:`+JU+`$1`)]})],r);case`::placeholder`:return YW([yW(e,{props:[oW(t,/:(plac\w+)/,`:`+YU+`input-$1`)]}),yW(e,{props:[oW(t,/:(plac\w+)/,`:`+JU+`$1`)]}),yW(e,{props:[oW(t,/:(plac\w+)/,qU+`input-$1`)]})],r)}return``})}}],uG=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||lG,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=[sG,cG],l,u=[XW,$W(function(e){l.insert(e)})],d=QW(c.concat(r,u)),f=function(e){return YW(HW(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 GU({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 fG(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var pG,mG,hG,gG=n((()=>{pG=!0,mG=function(e,t,n){var r=e.key+`-`+t.name;(n===!1||pG===!1)&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},hG=function(e,t,n){mG(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 _G(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 vG=n((()=>{}));function yG(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 jG={name:i.name,styles:i.styles,next:jG},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)jG={name:o.name,styles:o.styles,next:jG},o=o.next;return a.styles+`;`}return bG(e,t,n);case`function`:if(e!==void 0){var s=jG,c=n(e);return jG=s,yG(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function bG(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=yG(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]+`}`:EG(s)&&(r+=DG(a)+`:`+OG(a,s)+`;`)}else{if(a===`NO_COMPONENT_SELECTOR`&&SG)throw Error(kG);if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)EG(o[c])&&(r+=DG(a)+`:`+OG(a,o[c])+`;`);else{var l=yG(e,t,o);switch(a){case`animation`:case`animationName`:r+=DG(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}}return r}function xG(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=``;jG=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=yG(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=yG(n,t,e[o]),r&&(i+=a[o]);AG.lastIndex=0;for(var s=``,c;(c=AG.exec(i))!==null;)s+=`-`+c[1];return{name:_G(i)+s,styles:i,next:jG}}var SG,CG,wG,TG,EG,DG,OG,kG,AG,jG,MG=n((()=>{vG(),Af(),_d(),SG=!1,CG=/[A-Z]|^ms/g,wG=/_EMO_([^_]+?)_([^]*?)_EMO_/g,TG=function(e){return e.charCodeAt(1)===45},EG=function(e){return e!=null&&typeof e!=`boolean`},DG=gd(function(e){return TG(e)?e:e.replace(CG,`-$&`).toLowerCase()}),OG=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(wG,function(e,t,n){return jG={name:t,styles:n,next:jG},t})}return kf[e]!==1&&!TG(e)&&typeof t==`number`&&t!==0?t+`px`:t},kG=`Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.`,AG=/label:\s*([^\s;{]+)\s*(;|$)/g}));dG(),MG(),gG();function NG(e,t){if(e.inserted[t.name]===void 0)return e.insert(``,t,e.sheet,!0)}function PG(e,t,n){var r=[],i=fG(e,r,n);return r.length<2?n:i+t(r)}var FG=function(e){var t=uG(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){var e=xG([...arguments],t.registered,void 0);return hG(t,e,!1),t.key+`-`+e.name};return{css:n,cx:function(){var e=[...arguments];return PG(t.registered,n,IG(e))},injectGlobal:function(){NG(t,xG([...arguments],t.registered))},keyframes:function(){var e=xG([...arguments],t.registered),n=`animation-`+e.name;return NG(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:fG.bind(null,t.registered),merge:PG.bind(null,t.registered,n)}},IG=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},LG=[],RG=function(){return LG.some(function(e){return e.activeTargets.length>0})},zG=function(){return LG.some(function(e){return e.skippedTargets.length>0})},BG=`ResizeObserver loop completed with undelivered notifications.`,VG=function(){var e;typeof ErrorEvent==`function`?e=new ErrorEvent(`error`,{message:BG}):(e=document.createEvent(`Event`),e.initEvent(`error`,!1,!1),e.message=BG),window.dispatchEvent(e)},HG;(function(e){e.BORDER_BOX=`border-box`,e.CONTENT_BOX=`content-box`,e.DEVICE_PIXEL_CONTENT_BOX=`device-pixel-content-box`})(HG||={});var UG=function(e){return Object.freeze(e)},WG=function(){function e(e,t){this.inlineSize=e,this.blockSize=t,UG(this)}return e}(),GG=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,UG(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}(),KG=function(e){return e instanceof SVGElement&&`getBBox`in e},qG=function(e){if(KG(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)},JG=function(e){if(e instanceof Element)return!0;var t=e?.ownerDocument?.defaultView;return!!(t&&e instanceof t.Element)},YG=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},XG=typeof window<`u`?window:{},ZG=new WeakMap,QG=/auto|scroll/,$G=/^tb|vertical/,eK=/msie|trident/i.test(XG.navigator&&XG.navigator.userAgent),tK=function(e){return parseFloat(e||`0`)},nK=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new WG((n?t:e)||0,(n?e:t)||0)},rK=UG({devicePixelContentBoxSize:nK(),borderBoxSize:nK(),contentBoxSize:nK(),contentRect:new GG(0,0,0,0)}),iK=function(e,t){if(t===void 0&&(t=!1),ZG.has(e)&&!t)return ZG.get(e);if(qG(e))return ZG.set(e,rK),rK;var n=getComputedStyle(e),r=KG(e)&&e.ownerSVGElement&&e.getBBox(),i=!eK&&n.boxSizing===`border-box`,a=$G.test(n.writingMode||``),o=!r&&QG.test(n.overflowY||``),s=!r&&QG.test(n.overflowX||``),c=r?0:tK(n.paddingTop),l=r?0:tK(n.paddingRight),u=r?0:tK(n.paddingBottom),d=r?0:tK(n.paddingLeft),f=r?0:tK(n.borderTopWidth),p=r?0:tK(n.borderRightWidth),m=r?0:tK(n.borderBottomWidth),h=r?0:tK(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:tK(n.width)-S-x,T=r?r.height:tK(n.height)-C-b,E=w+g+x+v,D=T+_+b+y,O=UG({devicePixelContentBoxSize:nK(Math.round(w*devicePixelRatio),Math.round(T*devicePixelRatio),a),borderBoxSize:nK(E,D,a),contentBoxSize:nK(w,T,a),contentRect:new GG(d,c,w,T)});return ZG.set(e,O),O},aK=function(e,t,n){var r=iK(e,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case HG.DEVICE_PIXEL_CONTENT_BOX:return o;case HG.BORDER_BOX:return i;default:return a}},oK=function(){function e(e){var t=iK(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=UG([t.borderBoxSize]),this.contentBoxSize=UG([t.contentBoxSize]),this.devicePixelContentBoxSize=UG([t.devicePixelContentBoxSize])}return e}(),sK=function(e){if(qG(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},cK=function(){var e=1/0,t=[];LG.forEach(function(n){if(n.activeTargets.length!==0){var r=[];n.activeTargets.forEach(function(t){var n=new oK(t.target),i=sK(t.target);r.push(n),t.lastReportedSize=aK(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},lK=function(e){LG.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(sK(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},uK=function(){var e=0;for(lK(e);RG();)e=cK(),lK(e);return zG()&&VG(),e>0},dK,fK=[],pK=function(){return fK.splice(0).forEach(function(e){return e()})},mK=function(e){if(!dK){var t=0,n=document.createTextNode(``);new MutationObserver(function(){return pK()}).observe(n,{characterData:!0}),dK=function(){n.textContent=`${t?t--:t++}`}}fK.push(e),dK()},hK=function(e){mK(function(){requestAnimationFrame(e)})},gK=0,_K=function(){return!!gK},vK=250,yK={attributes:!0,characterData:!0,childList:!0,subtree:!0},bK=[`resize`,`load`,`transitionend`,`animationend`,`animationstart`,`animationiteration`,`keyup`,`keydown`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`blur`,`focus`],xK=function(e){return e===void 0&&(e=0),Date.now()+e},SK=!1,CK=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=vK),!SK){SK=!0;var n=xK(e);hK(function(){var r=!1;try{r=uK()}finally{if(SK=!1,e=n-xK(),!_K())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,yK)};document.body?t():XG.addEventListener(`DOMContentLoaded`,t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),bK.forEach(function(t){return XG.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||=(this.observer&&this.observer.disconnect(),bK.forEach(function(t){return XG.removeEventListener(t,e.listener,!0)}),!0)},e}()),wK=function(e){!gK&&e>0&&CK.start(),gK+=e,!gK&&CK.stop()},TK=function(e){return!KG(e)&&!YG(e)&&getComputedStyle(e).display===`inline`},EK=function(){function e(e,t){this.target=e,this.observedBox=t||HG.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=aK(this.target,this.observedBox,!0);return TK(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),DK=function(){function e(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return e}(),OK=new WeakMap,kK=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},AK=function(){function e(){}return e.connect=function(e,t){var n=new DK(e,t);OK.set(e,n)},e.observe=function(e,t,n){var r=OK.get(e),i=r.observationTargets.length===0;kK(r.observationTargets,t)<0&&(i&&LG.push(r),r.observationTargets.push(new EK(t,n&&n.box)),wK(1),CK.schedule())},e.unobserve=function(e,t){var n=OK.get(e),r=kK(n.observationTargets,t),i=n.observationTargets.length===1;r>=0&&(i&&LG.splice(LG.indexOf(n),1),n.observationTargets.splice(r,1),wK(-1))},e.disconnect=function(e){var t=this,n=OK.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),jK=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.`);AK.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(!JG(e))throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element`);AK.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(!JG(e))throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element`);AK.unobserve(this,e)},e.prototype.disconnect=function(){AK.disconnect(this)},e.toString=function(){return`function ResizeObserver () { [polyfill code] }`},e}(),MK=(0,N.createContext)({});function NK(e){let t=(0,N.useRef)(null);return t.current===null&&(t.current=e()),t.current}var PK=(0,N.createContext)(null),FK=(0,N.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function IK(e=!0){let t=(0,N.useContext)(PK);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 LK=typeof window<`u`,RK=LK?N.useLayoutEffect:N.useEffect,zK=e=>e,BK=zK,VK=zK;function HK(e){let t;return()=>(t===void 0&&(t=e()),t)}var UK=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},WK=e=>e*1e3,GK=e=>e/1e3,KK={skipAnimations:!1,useManualTiming:!1};function qK(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 JK=[`read`,`resolveKeyframes`,`update`,`preRender`,`render`,`postRender`],YK=40;function XK(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=JK.reduce((e,t)=>(e[t]=qK(a),e),{}),{read:s,resolveKeyframes:c,update:l,preRender:u,render:d,postRender:f}=o,p=()=>{let a=KK.useManualTiming?i.timestamp:performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,YK),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:JK.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<JK.length;t++)o[JK[t]].cancel(e)},state:i,steps:o}}var{schedule:ZK,cancel:QK,state:$K,steps:eq}=XK(typeof requestAnimationFrame<`u`?requestAnimationFrame:zK,!0),tq=(0,N.createContext)({strict:!1}),nq={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`]},rq={};for(let e in nq)rq[e]={isEnabled:t=>nq[e].some(e=>!!t[e])};function iq(e){for(let t in e)rq[t]={...rq[t],...e[t]}}var aq=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 oq(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||aq.has(e)}var sq=e=>!oq(e);function cq(e){e&&(sq=t=>t.startsWith(`on`)?!oq(t):e(t))}try{cq((xd(),o(vd)).default)}catch{}function lq(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||(sq(i)||n===!0&&oq(i)||!t&&!oq(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}function uq(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 dq=(0,N.createContext)({});function fq(e){return typeof e==`string`||Array.isArray(e)}function pq(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}var mq=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],hq=[`initial`,...mq];function gq(e){return pq(e.animate)||hq.some(t=>fq(e[t]))}function _q(e){return!!(gq(e)||e.variants)}function vq(e,t){if(gq(e)){let{initial:t,animate:n}=e;return{initial:t===!1||fq(t)?t:void 0,animate:fq(n)?n:void 0}}return e.inherit===!1?{}:t}function yq(e){let{initial:t,animate:n}=vq(e,(0,N.useContext)(dq));return(0,N.useMemo)(()=>({initial:t,animate:n}),[bq(t),bq(n)])}function bq(e){return Array.isArray(e)?e.join(` `):e}var xq=Symbol.for(`motionComponentSymbol`);function Sq(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Cq(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):Sq(n)&&(n.current=r))},[t])}var wq=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),Tq=`data-`+wq(`framerAppearId`),{schedule:Eq,cancel:Tie}=XK(queueMicrotask,!1),Dq=(0,N.createContext)({});function Oq(e,t,n,r,i){let{visualElement:a}=(0,N.useContext)(dq),o=(0,N.useContext)(tq),s=(0,N.useContext)(PK),c=(0,N.useContext)(FK).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)(Dq);u&&!u.projection&&i&&(u.type===`html`||u.type===`svg`)&&kq(l.current,n,i,d);let f=(0,N.useRef)(!1);(0,N.useInsertionEffect)(()=>{u&&f.current&&u.update(n,s)});let p=n[Tq],m=(0,N.useRef)(!!p&&!window.MotionHandoffIsComplete?.call(window,p)&&window.MotionHasOptimisedAnimation?.call(window,p));return RK(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),Eq.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 kq(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:Aq(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Sq(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,layoutScroll:c,layoutRoot:l})}function Aq(e){if(e)return e.options.allowProjection===!1?Aq(e.parent):e.projection}function jq({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&iq(e);function a(a,o){let s,c={...(0,N.useContext)(FK),...a,layoutId:Mq(a)},{isStatic:l}=c,u=yq(a),d=r(a,l);if(!l&&LK){Nq(c,e);let n=Pq(c);s=n.MeasureLayout,u.visualElement=Oq(i,d,c,t,n.ProjectionNode)}return(0,P.jsxs)(dq.Provider,{value:u,children:[s&&u.visualElement?(0,P.jsx)(s,{visualElement:u.visualElement,...c}):null,n(i,a,Cq(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[xq]=i,o}function Mq({layoutId:e}){let t=(0,N.useContext)(MK).id;return t&&e!==void 0?t+`-`+e:e}function Nq(e,t){(0,N.useContext)(tq).strict}function Pq(e){let{drag:t,layout:n}=rq;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}var Fq=[`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 Iq(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Fq.indexOf(e)>-1||/[A-Z]/u.test(e))}function Lq(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Rq(e,t,n,r){if(typeof t==`function`){let[i,a]=Lq(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]=Lq(r);t=t(n===void 0?e.custom:n,i,a)}return t}var zq=e=>Array.isArray(e),Bq=e=>!!(e&&typeof e==`object`&&e.mix&&e.toValue),Vq=e=>zq(e)?e[e.length-1]||0:e,Hq=e=>!!(e&&e.getVelocity);function Uq(e){let t=Hq(e)?e.get():e;return Bq(t)?t.toValue():t}function Wq({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,a){let o={latestValues:Kq(r,i,a,e),renderState:t()};return n&&(o.onMount=e=>n({props:r,current:e,...o}),o.onUpdate=e=>n(e)),o}var Gq=e=>(t,n)=>{let r=(0,N.useContext)(dq),i=(0,N.useContext)(PK),a=()=>Wq(e,t,r,i);return n?a():NK(a)};function Kq(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Uq(a[e]);let{initial:o,animate:s}=e,c=gq(e),l=_q(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`&&!pq(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Rq(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 qq=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Jq=new Set(qq),Yq=e=>t=>typeof t==`string`&&t.startsWith(e),Xq=Yq(`--`),Zq=Yq(`var(--`),Qq=e=>Zq(e)?$q.test(e.split(`/*`)[0].trim()):!1,$q=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,eJ=(e,t)=>t&&typeof e==`number`?t.transform(e):e,tJ=(e,t,n)=>n>t?t:n<e?e:n,nJ={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},rJ={...nJ,transform:e=>tJ(0,1,e)},iJ={...nJ,default:1},aJ=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),oJ=aJ(`deg`),sJ=aJ(`%`),cJ=aJ(`px`),lJ=aJ(`vh`),uJ=aJ(`vw`),dJ={...sJ,parse:e=>sJ.parse(e)/100,transform:e=>sJ.transform(e*100)},fJ={borderWidth:cJ,borderTopWidth:cJ,borderRightWidth:cJ,borderBottomWidth:cJ,borderLeftWidth:cJ,borderRadius:cJ,radius:cJ,borderTopLeftRadius:cJ,borderTopRightRadius:cJ,borderBottomRightRadius:cJ,borderBottomLeftRadius:cJ,width:cJ,maxWidth:cJ,height:cJ,maxHeight:cJ,top:cJ,right:cJ,bottom:cJ,left:cJ,padding:cJ,paddingTop:cJ,paddingRight:cJ,paddingBottom:cJ,paddingLeft:cJ,margin:cJ,marginTop:cJ,marginRight:cJ,marginBottom:cJ,marginLeft:cJ,backgroundPositionX:cJ,backgroundPositionY:cJ},pJ={rotate:oJ,rotateX:oJ,rotateY:oJ,rotateZ:oJ,scale:iJ,scaleX:iJ,scaleY:iJ,scaleZ:iJ,skew:oJ,skewX:oJ,skewY:oJ,distance:cJ,translateX:cJ,translateY:cJ,translateZ:cJ,x:cJ,y:cJ,z:cJ,perspective:cJ,transformPerspective:cJ,opacity:rJ,originX:dJ,originY:dJ,originZ:cJ},mJ={...nJ,transform:Math.round},hJ={...fJ,...pJ,zIndex:mJ,size:cJ,fillOpacity:rJ,strokeOpacity:rJ,numOctaves:mJ},gJ={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},_J=qq.length;function vJ(e,t,n){let r=``,i=!0;for(let a=0;a<_J;a++){let o=qq[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=eJ(s,hJ[o]);if(!c){i=!1;let t=gJ[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function yJ(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(Jq.has(e)){o=!0;continue}else if(Xq(e)){i[e]=n;continue}else{let t=eJ(n,hJ[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=vJ(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 bJ={offset:`stroke-dashoffset`,array:`stroke-dasharray`},xJ={offset:`strokeDashoffset`,array:`strokeDasharray`};function SJ(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?bJ:xJ;e[a.offset]=cJ.transform(-r);let o=cJ.transform(t),s=cJ.transform(n);e[a.array]=`${o} ${s}`}function CJ(e,t,n){return typeof e==`string`?e:cJ.transform(t+n*e)}function wJ(e,t,n){return`${CJ(t,e.x,e.width)} ${CJ(n,e.y,e.height)}`}function TJ(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:c=0,...l},u,d){if(yJ(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=wJ(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&&SJ(f,o,s,c,!1)}var EJ=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),DJ=()=>({...EJ(),attrs:{}}),OJ=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function kJ(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(let t in n)e.style.setProperty(t,n[t])}var AJ=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 jJ(e,t,n,r){kJ(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(AJ.has(n)?n:wq(n),t.attrs[n])}var MJ={};function NJ(e){Object.assign(MJ,e)}function PJ(e,{layout:t,layoutId:n}){return Jq.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!MJ[e]||e===`opacity`)}function FJ(e,t,n){let{style:r}=e,i={};for(let a in r)(Hq(r[a])||t.style&&Hq(t.style[a])||PJ(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function IJ(e,t,n){let r=FJ(e,t,n);for(let n in e)if(Hq(e[n])||Hq(t[n])){let t=qq.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}function LJ(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 RJ=[`x`,`y`,`width`,`height`,`cx`,`cy`,`r`],zJ={useVisualState:Gq({scrapeMotionValuesFromProps:IJ,createRenderState:DJ,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(Jq.has(e)){a=!0;break}}if(!a)return;let o=!t;if(t)for(let n=0;n<RJ.length;n++){let r=RJ[n];e[r]!==t[r]&&(o=!0)}o&&ZK.read(()=>{LJ(n,r),ZK.render(()=>{TJ(r,i,OJ(n.tagName),e.transformTemplate),jJ(n,r)})})}})},BJ={useVisualState:Gq({scrapeMotionValuesFromProps:FJ,createRenderState:EJ})};function VJ(e,t,n){for(let r in t)!Hq(t[r])&&!PJ(r,n)&&(e[r]=t[r])}function HJ({transformTemplate:e},t){return(0,N.useMemo)(()=>{let n=EJ();return yJ(n,t,e),Object.assign({},n.vars,n.style)},[t])}function UJ(e,t){let n=e.style||{},r={};return VJ(r,n,e),Object.assign(r,HJ(e,t)),r}function WJ(e,t){let n={},r=UJ(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 GJ(e,t,n,r){let i=(0,N.useMemo)(()=>{let n=DJ();return TJ(n,t,OJ(r),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};VJ(t,e.style,e),i.style={...t,...i.style}}return i}function KJ(e=!1){return(t,n,r,{latestValues:i},a)=>{let o=(Iq(t)?GJ:WJ)(n,i,a,t),s=lq(n,typeof t==`string`,e),c=t===N.Fragment?{}:{...s,...o,ref:r},{children:l}=n,u=(0,N.useMemo)(()=>Hq(l)?l.get():l,[l]);return(0,N.createElement)(t,{...c,children:u})}}function qJ(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return jq({...Iq(n)?zJ:BJ,preloadedFeatures:e,useRender:KJ(r),createVisualElement:t,Component:n})}}function JJ(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 YJ(e,t,n){let r=e.getProps();return Rq(r,t,n===void 0?r.custom:n,e)}var XJ=HK(()=>window.ScrollTimeline!==void 0),ZJ=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(XJ()&&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`)}},QJ=class extends ZJ{then(e,t){return Promise.all(this.animations).then(e).catch(t)}};function $J(e,t){return e?e[t]||e.default||e:void 0}var eY=2e4;function tY(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 nY(e){return typeof e==`function`}function rY(e,t){e.timeline=t,e.onfinish=null}var iY=e=>Array.isArray(e)&&typeof e[0]==`number`,aY={linearEasing:void 0};function oY(e,t){let n=HK(e);return()=>aY[t]??n()}var sY=oY(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),cY=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=e(UK(0,i-1,t))+`, `;return`linear(${r.substring(0,r.length-2)})`};function lY(e){return!!(typeof e==`function`&&sY()||!e||typeof e==`string`&&(e in dY||sY())||iY(e)||Array.isArray(e)&&e.every(lY))}var uY=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,dY={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:uY([0,.65,.55,1]),circOut:uY([.55,0,1,.45]),backIn:uY([.31,.01,.66,-.59]),backOut:uY([.33,1.53,.69,.99])};function fY(e,t){if(e)return typeof e==`function`&&sY()?cY(e,t):iY(e)?uY(e):Array.isArray(e)?e.map(e=>fY(e,t)||dY.easeOut):dY[e]}var pY={x:!1,y:!1};function mY(){return pY.x||pY.y}function hY(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 gY(e,t){let n=hY(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function _Y(e){return t=>{t.pointerType===`touch`||mY()||e(t)}}function vY(e,t,n={}){let[r,i,a]=gY(e,n),o=_Y(e=>{let{target:n}=e,r=t(e);if(typeof r!=`function`||!n)return;let a=_Y(e=>{r(e),n.removeEventListener(`pointerleave`,a)});n.addEventListener(`pointerleave`,a,i)});return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}var yY=(e,t)=>t?e===t?!0:yY(e,t.parentElement):!1,bY=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,xY=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function SY(e){return xY.has(e.tagName)||e.tabIndex!==-1}var CY=new WeakSet;function wY(e){return t=>{t.key===`Enter`&&e(t)}}function TY(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var EY=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=wY(()=>{if(CY.has(n))return;TY(n,`down`);let e=wY(()=>{TY(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>TY(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function DY(e){return bY(e)&&!mY()}function OY(e,t,n={}){let[r,i,a]=gY(e,n),o=e=>{let r=e.currentTarget;if(!DY(e)||CY.has(r))return;CY.add(r);let a=t(e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),!(!DY(e)||!CY.has(r))&&(CY.delete(r),typeof a==`function`&&a(e,{success:t}))},s=e=>{o(e,n.useGlobalTarget||yY(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{!SY(e)&&e.getAttribute(`tabindex`)===null&&(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),e.addEventListener(`focus`,e=>EY(e,i),i)}),a}function kY(e){return e===`x`||e===`y`?pY[e]?null:(pY[e]=!0,()=>{pY[e]=!1}):pY.x||pY.y?null:(pY.x=pY.y=!0,()=>{pY.x=pY.y=!1})}var AY=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...qq]),jY;function MY(){jY=void 0}var NY={now:()=>(jY===void 0&&NY.set($K.isProcessing||KK.useManualTiming?$K.timestamp:performance.now()),jY),set:e=>{jY=e,queueMicrotask(MY)}};function PY(e,t){e.indexOf(t)===-1&&e.push(t)}function FY(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var IY=class{constructor(){this.subscriptions=[]}add(e){return PY(this.subscriptions,e),()=>FY(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 LY(e,t){return t?1e3/t*e:0}var RY=30,zY=e=>!isNaN(parseFloat(e)),BY={current:void 0},VY=class{constructor(e,t={}){this.version=`11.18.2`,this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let n=NY.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=NY.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=zY(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 IY);let n=this.events[e].add(t);return e===`change`?()=>{n(),ZK.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 BY.current&&BY.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=NY.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>RY)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,RY);return LY(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 HY(e,t){return new VY(e,t)}function UY(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,HY(n))}function WY(e,t){let{transitionEnd:n={},transition:r={},...i}=YJ(e,t)||{};i={...i,...n};for(let t in i)UY(e,t,Vq(i[t]))}function GY(e){return!!(Hq(e)&&e.add)}function KY(e,t){let n=e.getValue(`willChange`);if(GY(n))return n.add(t)}function qY(e){return e.props[Tq]}var JY={current:!1},YY=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,XY=1e-7,ZY=12;function QY(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=YY(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>XY&&++s<ZY);return o}function $Y(e,t,n,r){if(e===t&&n===r)return zK;let i=t=>QY(t,0,1,e,n);return e=>e===0||e===1?e:YY(i(e),t,r)}var eX=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,tX=e=>t=>1-e(1-t),nX=$Y(.33,1.53,.69,.99),rX=tX(nX),iX=eX(rX),aX=e=>(e*=2)<1?.5*rX(e):.5*(2-2**(-10*(e-1))),oX=e=>1-Math.sin(Math.acos(e)),sX=tX(oX),cX=eX(oX),lX=e=>/^0[^.\s]+$/u.test(e);function uX(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||lX(e)}var dX=e=>Math.round(e*1e5)/1e5,fX=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function pX(e){return e==null}var mX=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,hX=(e,t)=>n=>!!(typeof n==`string`&&mX.test(n)&&n.startsWith(e)||t&&!pX(n)&&Object.prototype.hasOwnProperty.call(n,t)),gX=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(fX);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},_X=e=>tJ(0,255,e),vX={...nJ,transform:e=>Math.round(_X(e))},yX={test:hX(`rgb`,`red`),parse:gX(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+vX.transform(e)+`, `+vX.transform(t)+`, `+vX.transform(n)+`, `+dX(rJ.transform(r))+`)`};function bX(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 xX={test:hX(`#`),parse:bX,transform:yX.transform},SX={test:hX(`hsl`,`hue`),parse:gX(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+sJ.transform(dX(t))+`, `+sJ.transform(dX(n))+`, `+dX(rJ.transform(r))+`)`},CX={test:e=>yX.test(e)||xX.test(e)||SX.test(e),parse:e=>yX.test(e)?yX.parse(e):SX.test(e)?SX.parse(e):xX.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?yX.transform(e):SX.transform(e)},wX=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function TX(e){return isNaN(e)&&typeof e==`string`&&(e.match(fX)?.length||0)+(e.match(wX)?.length||0)>0}var EX=`number`,DX=`color`,OX=`var`,kX=`var(`,AX="${}",jX=/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 MX(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(jX,e=>(CX.test(e)?(r.color.push(a),i.push(DX),n.push(CX.parse(e))):e.startsWith(kX)?(r.var.push(a),i.push(OX),n.push(e)):(r.number.push(a),i.push(EX),n.push(parseFloat(e))),++a,AX)).split(AX),indexes:r,types:i}}function NX(e){return MX(e).values}function PX(e){let{split:t,types:n}=MX(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===EX?i+=dX(e[a]):t===DX?i+=CX.transform(e[a]):i+=e[a]}return i}}var FX=e=>typeof e==`number`?0:e;function IX(e){let t=NX(e);return PX(e)(t.map(FX))}var LX={test:TX,parse:NX,createTransformer:PX,getAnimatableNone:IX},RX=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function zX(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(fX)||[];if(!r)return e;let i=n.replace(r,``),a=RX.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}var BX=/\b([a-z-]*)\(.*?\)/gu,VX={...LX,getAnimatableNone:e=>{let t=e.match(BX);return t?t.map(zX).join(` `):e}},HX={...hJ,color:CX,backgroundColor:CX,outlineColor:CX,fill:CX,stroke:CX,borderColor:CX,borderTopColor:CX,borderRightColor:CX,borderBottomColor:CX,borderLeftColor:CX,filter:VX,WebkitFilter:VX},UX=e=>HX[e];function WX(e,t){let n=UX(e);return n!==VX&&(n=LX),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var GX=new Set([`auto`,`none`,`0`]);function KX(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!GX.has(t)&&MX(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=WX(n,i)}var qX=e=>e===nJ||e===cJ,JX=(e,t)=>parseFloat(e.split(`, `)[t]),YX=(e,t)=>(n,{transform:r})=>{if(r===`none`||!r)return 0;let i=r.match(/^matrix3d\((.+)\)$/u);if(i)return JX(i[1],t);{let t=r.match(/^matrix\((.+)\)$/u);return t?JX(t[1],e):0}},XX=new Set([`x`,`y`,`z`]),ZX=qq.filter(e=>!XX.has(e));function QX(e){let t=[];return ZX.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}var $X={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:YX(4,13),y:YX(5,14)};$X.translateX=$X.x,$X.translateY=$X.y;var eZ=new Set,tZ=!1,nZ=!1;function rZ(){if(nZ){let e=Array.from(eZ).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=QX(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)})}nZ=!1,tZ=!1,eZ.forEach(e=>e.complete()),eZ.clear()}function iZ(){eZ.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(nZ=!0)})}function aZ(){iZ(),rZ()}var oZ=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?(eZ.add(this),tZ||(tZ=!0,ZK.read(iZ),ZK.resolveKeyframes(rZ))):(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),eZ.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,eZ.delete(this))}resume(){this.isComplete||this.scheduleResolve()}},sZ=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),cZ=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function lZ(e){let t=cZ.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var uZ=4;function dZ(e,t,n=1){VK(n<=uZ,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[r,i]=lZ(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return sZ(e)?parseFloat(e):e}return Qq(i)?dZ(i,t,n+1):i}var fZ=e=>t=>t.test(e),pZ=[nJ,cJ,sJ,oJ,uJ,lJ,{test:e=>e===`auto`,parse:e=>e}],mZ=e=>pZ.find(fZ(e)),hZ=class extends oZ{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(),Qq(r))){let i=dZ(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!AY.has(n)||e.length!==2)return;let[r,i]=e,a=mZ(r),o=mZ(i);if(a!==o)if(qX(a)&&qX(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++)uX(e[t])&&n.push(t);n.length&&KX(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=$X[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]=$X[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()}},gZ=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(LX.test(e)||e===`0`)&&!e.startsWith(`url(`));function _Z(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 vZ(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=gZ(i,t),s=gZ(a,t);return BK(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:_Z(e)||(n===`spring`||nY(n))&&r}var yZ=e=>e!==null;function bZ(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(yZ),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}var xZ=40,SZ=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=NY.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>xZ?this.resolvedAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&aZ(),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=NY.now(),this.hasAttemptedResolve=!0;let{name:n,type:r,velocity:i,delay:a,onComplete:o,onUpdate:s,isGenerator:c}=this.options;if(!c&&!vZ(e,n,r,i))if(JY.current||!a){s&&s(bZ(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})}},CZ=(e,t,n)=>e+(t-e)*n;function wZ(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 TZ({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=wZ(s,r,e+1/3),a=wZ(s,r,e),o=wZ(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function EZ(e,t){return n=>n>0?t:e}var DZ=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},OZ=[xX,yX,SX],kZ=e=>OZ.find(t=>t.test(e));function AZ(e){let t=kZ(e);if(BK(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===SX&&(n=TZ(n)),n}var jZ=(e,t)=>{let n=AZ(e),r=AZ(t);if(!n||!r)return EZ(e,t);let i={...n};return e=>(i.red=DZ(n.red,r.red,e),i.green=DZ(n.green,r.green,e),i.blue=DZ(n.blue,r.blue,e),i.alpha=CZ(n.alpha,r.alpha,e),yX.transform(i))},MZ=(e,t)=>n=>t(e(n)),NZ=(...e)=>e.reduce(MZ),PZ=new Set([`none`,`hidden`]);function FZ(e,t){return PZ.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function IZ(e,t){return n=>CZ(e,t,n)}function LZ(e){return typeof e==`number`?IZ:typeof e==`string`?Qq(e)?EZ:CX.test(e)?jZ:VZ:Array.isArray(e)?RZ:typeof e==`object`?CX.test(e)?jZ:zZ:EZ}function RZ(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>LZ(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function zZ(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=LZ(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function BZ(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 VZ=(e,t)=>{let n=LX.createTransformer(t),r=MX(e),i=MX(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?PZ.has(e)&&!i.values.length||PZ.has(t)&&!r.values.length?FZ(e,t):NZ(RZ(BZ(r,i),i.values),n):(BK(!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.`),EZ(e,t))};function HZ(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?CZ(e,t,n):LZ(e)(e,t)}var UZ=5;function WZ(e,t,n){let r=Math.max(t-UZ,0);return LY(n-e(r),t-r)}var GZ={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},KZ=.001;function qZ({duration:e=GZ.duration,bounce:t=GZ.bounce,velocity:n=GZ.velocity,mass:r=GZ.mass}){let i,a;BK(e<=WK(GZ.maxDuration),`Spring duration must be 10 seconds or less`);let o=1-t;o=tJ(GZ.minDamping,GZ.maxDamping,o),e=tJ(GZ.minDuration,GZ.maxDuration,GK(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=XZ(t,o),c=Math.exp(-i);return KZ-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=XZ(t**2,o);return(-i(t)+KZ>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-KZ+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=YZ(i,a,s);if(e=WK(e),isNaN(c))return{stiffness:GZ.stiffness,damping:GZ.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var JZ=12;function YZ(e,t,n){let r=n;for(let n=1;n<JZ;n++)r-=e(r)/t(r);return r}function XZ(e,t){return e*Math.sqrt(1-t*t)}var ZZ=[`duration`,`bounce`],QZ=[`stiffness`,`damping`,`mass`];function $Z(e,t){return t.some(t=>e[t]!==void 0)}function eQ(e){let t={velocity:GZ.velocity,stiffness:GZ.stiffness,damping:GZ.damping,mass:GZ.mass,isResolvedFromDuration:!1,...e};if(!$Z(e,QZ)&&$Z(e,ZZ))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*tJ(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:GZ.mass,stiffness:i,damping:a}}else{let n=qZ(e);t={...t,...n,mass:GZ.mass},t.isResolvedFromDuration=!0}return t}function tQ(e=GZ.visualDuration,t=GZ.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}=eQ({...n,velocity:-GK(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=GK(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?GZ.restSpeed.granular:GZ.restSpeed.default,i||=v?GZ.restDelta.granular:GZ.restDelta.default;let y;if(h<1){let e=XZ(_,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?WK(m):WZ(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(tY(b),eY),t=cY(t=>b.next(e*t).value,e,30);return e+`ms `+t}};return b}function nQ({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=tQ({keyframes:[f.value,m(f.value)],velocity:WZ(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 rQ=$Y(.42,0,1,1),iQ=$Y(0,0,.58,1),aQ=$Y(.42,0,.58,1),oQ=e=>Array.isArray(e)&&typeof e[0]!=`number`,sQ={linear:zK,easeIn:rQ,easeInOut:aQ,easeOut:iQ,circIn:oX,circInOut:cX,circOut:sX,backIn:rX,backInOut:iX,backOut:nX,anticipate:aX},cQ=e=>{if(iY(e)){VK(e.length===4,`Cubic bezier arrays must contain four numerical values.`);let[t,n,r,i]=e;return $Y(t,n,r,i)}else if(typeof e==`string`)return VK(sQ[e]!==void 0,`Invalid easing type '${e}'`),sQ[e];return e};function lQ(e,t,n){let r=[],i=n||HZ,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=NZ(Array.isArray(t)?t[n]||zK:t,a)),r.push(a)}return r}function uQ(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(VK(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=lQ(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=UK(e[r],e[r+1],n);return s[r](i)};return n?t=>l(tJ(e[0],e[a-1],t)):l}function dQ(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=UK(0,t,r);e.push(CZ(n,1,i))}}function fQ(e){let t=[0];return dQ(t,e.length-1),t}function pQ(e,t){return e.map(e=>e*t)}function mQ(e,t){return e.map(()=>t||aQ).splice(0,e.length-1)}function hQ({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=oQ(r)?r.map(cQ):cQ(r),a={done:!1,value:t[0]},o=uQ(pQ(n&&n.length===t.length?n:fQ(t),e),t,{ease:Array.isArray(i)?i:mQ(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var gQ=e=>{let t=({timestamp:t})=>e(t);return{start:()=>ZK.update(t,!0),stop:()=>QK(t),now:()=>$K.isProcessing?$K.timestamp:NY.now()}},_Q={decay:nQ,inertia:nQ,tween:hQ,keyframes:hQ,spring:tQ},vQ=e=>e/100,yQ=class extends SZ{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||oZ)(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=nY(t)?t:_Q[t]||hQ,s,c;o!==hQ&&typeof e[0]!=`number`&&(s=NZ(vQ,HZ(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=tY(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=tJ(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=bZ(s,this.options,r)),h&&h(b.value),S&&this.finish(),b}get duration(){let{resolved:e}=this;return e?GK(e.calculatedDuration):0}get time(){return GK(this.currentTime)}set time(e){e=WK(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=GK(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState=`running`;return}if(this.isStopped)return;let{driver:e=gQ,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)}},bQ=new Set([`opacity`,`clipPath`,`filter`,`transform`]);function xQ(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=fY(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 SQ=HK(()=>Object.hasOwnProperty.call(Element.prototype,`animate`)),CQ=10,wQ=2e4;function TQ(e){return nY(e.type)||e.type===`spring`||!lY(e.ease)}function EQ(e,t){let n=new yQ({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),r={done:!1,value:e[0]},i=[],a=0;for(;!r.done&&a<wQ;)r=n.sample(a),i.push(r.value),a+=CQ;return{times:void 0,keyframes:i,duration:a-CQ,ease:`linear`}}var DQ={anticipate:aX,backInOut:iX,circInOut:cX};function OQ(e){return e in DQ}var kQ=class extends SZ{constructor(e){super(e);let{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new hZ(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`&&sY()&&OQ(i)&&(i=DQ[i]),TQ(this.options)){let{onComplete:t,onUpdate:o,motionValue:s,element:c,...l}=this.options,u=EQ(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=xQ(o.owner.current,s,e,{...this.options,duration:n,times:r,ease:i});return l.startTime=c??this.calcStartTime(),this.pendingTimeline?(rY(l,this.pendingTimeline),this.pendingTimeline=void 0):l.onfinish=()=>{let{onComplete:n}=this.options;o.set(bZ(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 GK(t)}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return GK(t.currentTime||0)}set time(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.currentTime=WK(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 zK;let{animation:n}=t;rY(n,e)}return zK}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 yQ({...l,keyframes:n,duration:r,type:i,ease:a,times:o,isGenerator:!0}),d=WK(this.time);e.setWithVelocity(u.sample(d-CQ).value,u.sample(d).value,CQ)}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 SQ()&&n&&bQ.has(n)&&!s&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}},AQ={type:`spring`,stiffness:500,damping:25,restSpeed:10},jQ=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),MQ={type:`keyframes`,duration:.8},NQ={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},PQ=(e,{keyframes:t})=>t.length>2?MQ:Jq.has(e)?e.startsWith(`scale`)?jQ(t[1]):AQ:NQ;function FQ({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 IQ=(e,t,n,r={},i,a)=>o=>{let s=$J(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=WK(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};FQ(s)||(u={...u,...PQ(e,u)}),u.duration&&=WK(u.duration),u.repeatDelay&&=WK(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)),(JY.current||KK.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),d&&!a&&t.get()!==void 0){let e=bZ(u.keyframes,s);if(e!==void 0)return ZK.update(()=>{u.onUpdate(e),u.onComplete()}),new QJ([])}return!a&&kQ.supports(u)?new kQ(u):new yQ(u)};function LQ({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function RQ(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&&LQ(l,t))continue;let o={delay:n,...$J(a||{},t)},u=!1;if(window.MotionHandoffAnimation){let n=qY(e);if(n){let e=window.MotionHandoffAnimation(n,t,ZK);e!==null&&(o.startTime=e,u=!0)}}KY(e,t),r.start(IQ(t,r,i,e.shouldReduceMotion&&AY.has(t)?{type:!1}:o,e,u));let d=r.animation;d&&c.push(d)}return o&&Promise.all(c).then(()=>{ZK.update(()=>{o&&WY(e,o)})}),c}function zQ(e,t,n={}){let r=YJ(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(RQ(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return BQ(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 BQ(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(VQ).forEach((e,r)=>{e.notify(`AnimationStart`,t),o.push(zQ(e,t,{...a,delay:n+c(r)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(o)}function VQ(e,t){return e.sortNodePosition(t)}function HQ(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>zQ(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=zQ(e,t,n);else{let i=typeof t==`function`?YJ(e,t,n.custom):t;r=Promise.all(RQ(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var UQ=hq.length;function WQ(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&WQ(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<UQ;n++){let r=hq[n],i=e.props[r];(fq(i)||i===!1)&&(t[r]=i)}return t}var GQ=[...mq].reverse(),KQ=mq.length;function qQ(e){return t=>Promise.all(t.map(({animation:t,options:n})=>HQ(e,t,n)))}function JQ(e){let t=qQ(e),n=ZQ(),r=!0,i=t=>(n,r)=>{let i=YJ(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=WQ(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<KQ;t++){let f=GQ[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=fq(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||pq(m)||typeof m==`boolean`)continue;let v=YQ(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=zq(t)&&zq(n)?!JJ(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=ZQ(),r=!0}}}function YQ(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!JJ(t,e):!1}function XQ(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ZQ(){return{animate:XQ(!0),whileInView:XQ(),whileHover:XQ(),whileTap:XQ(),whileDrag:XQ(),whileFocus:XQ(),exit:XQ()}}var QQ=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},$Q=class extends QQ{constructor(e){super(e),e.animationState||=JQ(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();pq(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)}},e$=0,t$={animation:{Feature:$Q},exit:{Feature:class extends QQ{constructor(){super(...arguments),this.id=e$++}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 n$(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function r$(e){return{point:{x:e.pageX,y:e.pageY}}}var i$=e=>t=>bY(t)&&e(t,r$(t));function a$(e,t,n,r){return n$(e,t,i$(n),r)}var o$=(e,t)=>Math.abs(e-t);function s$(e,t){let n=o$(e.x,t.x),r=o$(e.y,t.y);return Math.sqrt(n**2+r**2)}var c$=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=d$(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=s$(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=$K;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=l$(t,this.transformPagePoint),ZK.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=d$(e.type===`pointercancel`?this.lastMoveEventInfo:l$(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!bY(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;let a=l$(r$(e),this.transformPagePoint),{point:o}=a,{timestamp:s}=$K;this.history=[{...o,timestamp:s}];let{onSessionStart:c}=t;c&&c(e,d$(a,this.history)),this.removeListeners=NZ(a$(this.contextWindow,`pointermove`,this.handlePointerMove),a$(this.contextWindow,`pointerup`,this.handlePointerUp),a$(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),QK(this.updatePoint)}};function l$(e,t){return t?{point:t(e.point)}:e}function u$(e,t){return{x:e.x-t.x,y:e.y-t.y}}function d$({point:e},t){return{point:e,delta:u$(e,p$(t)),offset:u$(e,f$(t)),velocity:m$(t,.1)}}function f$(e){return e[0]}function p$(e){return e[e.length-1]}function m$(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=p$(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>WK(t)));)n--;if(!r)return{x:0,y:0};let a=GK(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 h$=1e-4,g$=1-h$,_$=1+h$,v$=.01,y$=0-v$,b$=0+v$;function x$(e){return e.max-e.min}function S$(e,t,n){return Math.abs(e-t)<=n}function C$(e,t,n,r=.5){e.origin=r,e.originPoint=CZ(t.min,t.max,e.origin),e.scale=x$(n)/x$(t),e.translate=CZ(n.min,n.max,e.origin)-e.originPoint,(e.scale>=g$&&e.scale<=_$||isNaN(e.scale))&&(e.scale=1),(e.translate>=y$&&e.translate<=b$||isNaN(e.translate))&&(e.translate=0)}function w$(e,t,n,r){C$(e.x,t.x,n.x,r?r.originX:void 0),C$(e.y,t.y,n.y,r?r.originY:void 0)}function T$(e,t,n){e.min=n.min+t.min,e.max=e.min+x$(t)}function E$(e,t,n){T$(e.x,t.x,n.x),T$(e.y,t.y,n.y)}function D$(e,t,n){e.min=t.min-n.min,e.max=e.min+x$(t)}function O$(e,t,n){D$(e.x,t.x,n.x),D$(e.y,t.y,n.y)}function k$(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?CZ(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?CZ(n,e,r.max):Math.min(e,n)),e}function A$(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 j$(e,{top:t,left:n,bottom:r,right:i}){return{x:A$(e.x,n,i),y:A$(e.y,t,r)}}function M$(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 N$(e,t){return{x:M$(e.x,t.x),y:M$(e.y,t.y)}}function P$(e,t){let n=.5,r=x$(e),i=x$(t);return i>r?n=UK(t.min,t.max-r,e.min):r>i&&(n=UK(e.min,e.max-i,t.min)),tJ(0,1,n)}function F$(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 I$=.35;function L$(e=I$){return e===!1?e=0:e===!0&&(e=I$),{x:R$(e,`left`,`right`),y:R$(e,`top`,`bottom`)}}function R$(e,t,n){return{min:z$(e,t),max:z$(e,n)}}function z$(e,t){return typeof e==`number`?e:e[t]||0}var B$=()=>({translate:0,scale:1,origin:0,originPoint:0}),V$=()=>({x:B$(),y:B$()}),H$=()=>({min:0,max:0}),U$=()=>({x:H$(),y:H$()});function W$(e){return[e(`x`),e(`y`)]}function G$({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function K$({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function q$(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 J$(e){return e===void 0||e===1}function Y$({scale:e,scaleX:t,scaleY:n}){return!J$(e)||!J$(t)||!J$(n)}function X$(e){return Y$(e)||Z$(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Z$(e){return Q$(e.x)||Q$(e.y)}function Q$(e){return e&&e!==`0%`}function $$(e,t,n){return n+t*(e-n)}function e1(e,t,n,r,i){return i!==void 0&&(e=$$(e,i,r)),$$(e,n,r)+t}function t1(e,t=0,n=1,r,i){e.min=e1(e.min,t,n,r,i),e.max=e1(e.max,t,n,r,i)}function n1(e,{x:t,y:n}){t1(e.x,t.translate,t.scale,t.originPoint),t1(e.y,n.translate,n.scale,n.originPoint)}var r1=.999999999999,i1=1.0000000000001;function a1(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&&c1(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,n1(e,o)),r&&X$(a.latestValues)&&c1(e,a.latestValues))}t.x<i1&&t.x>r1&&(t.x=1),t.y<i1&&t.y>r1&&(t.y=1)}function o1(e,t){e.min+=t,e.max+=t}function s1(e,t,n,r,i=.5){t1(e,t,n,CZ(e.min,e.max,i),r)}function c1(e,t){s1(e.x,t.x,t.scaleX,t.scale,t.originX),s1(e.y,t.y,t.scaleY,t.scale,t.originY)}function l1(e,t){return G$(q$(e.getBoundingClientRect(),t))}function u1(e,t,n){let r=l1(e,n),{scroll:i}=t;return i&&(o1(r.x,i.offset.x),o1(r.y,i.offset.y)),r}var d1=({current:e})=>e?e.ownerDocument.defaultView:null,f1=new WeakMap,p1=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=U$(),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(r$(e).point)},i=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=kY(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),W$(e=>{let t=this.getAxisMotionValue(e).get()||0;if(sJ.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=x$(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&ZK.postRender(()=>i(e,t)),KY(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=h1(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=()=>W$(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new c$(e,{onSessionStart:r,onStart:i,onMove:a,onSessionEnd:o,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:d1(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&&ZK.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||!m1(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=k$(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&&Sq(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=j$(n.layoutBox,e):this.constraints=!1,this.elastic=L$(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&W$(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=F$(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Sq(e))return!1;let n=e.current;VK(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=u1(n,r.root,this.visualElement.getTransformPagePoint()),a=N$(r.layout.layoutBox,i);if(t){let e=t(K$(a));this.hasMutatedConstraints=!!e,e&&(a=G$(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=W$(o=>{if(!m1(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 KY(this.visualElement,e),n.start(IQ(e,n,0,t,this.visualElement,!1))}stopAnimation(){W$(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){W$(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){W$(t=>{let{drag:n}=this.getProps();if(!m1(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]-CZ(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Sq(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};W$(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=P$({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(),W$(t=>{if(!m1(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(CZ(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;f1.set(this.visualElement,this);let e=this.visualElement.current,t=a$(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();Sq(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()),ZK.read(n);let a=n$(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(W$(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=I$,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function m1(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function h1(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var g1=class extends QQ{constructor(e){super(e),this.removeGroupControls=zK,this.removeListeners=zK,this.controls=new p1(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||zK}unmount(){this.removeGroupControls(),this.removeListeners()}},_1=e=>(t,n)=>{e&&ZK.postRender(()=>e(t,n))},v1=class extends QQ{constructor(){super(...arguments),this.removePointerDownListener=zK}onPointerDown(e){this.session=new c$(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:d1(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:_1(e),onStart:_1(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&ZK.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=a$(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},y1={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function b1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var x1={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(cJ.test(e))e=parseFloat(e);else return e;return`${b1(e,t.target.x)}% ${b1(e,t.target.y)}%`}},S1={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=LX.parse(e);if(i.length>5)return r;let a=LX.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=CZ(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},C1=class extends N.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;NJ(T1),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()})),y1.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()||ZK.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Eq.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 w1(e){let[t,n]=IK(),r=(0,N.useContext)(MK);return(0,P.jsx)(C1,{...e,layoutGroup:r,switchLayoutGroup:(0,N.useContext)(Dq),isPresent:t,safeToRemove:n})}var T1={borderRadius:{...x1,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:x1,borderTopRightRadius:x1,borderBottomLeftRadius:x1,borderBottomRightRadius:x1,boxShadow:S1};function E1(e,t,n){let r=Hq(e)?e:HY(e);return r.start(IQ(``,r,t,n)),r.animation}function D1(e){return e instanceof SVGElement&&e.tagName!==`svg`}var O1=(e,t)=>e.depth-t.depth,k1=class{constructor(){this.children=[],this.isDirty=!1}add(e){PY(this.children,e),this.isDirty=!0}remove(e){FY(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(O1),this.isDirty=!1,this.children.forEach(e)}};function A1(e,t){let n=NY.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(QK(r),e(a-t))};return ZK.read(r,!0),()=>QK(r)}var j1=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],M1=j1.length,N1=e=>typeof e==`string`?parseFloat(e):e,P1=e=>typeof e==`number`||cJ.test(e);function F1(e,t,n,r,i,a){i?(e.opacity=CZ(0,n.opacity===void 0?1:n.opacity,L1(r)),e.opacityExit=CZ(t.opacity===void 0?1:t.opacity,0,R1(r))):a&&(e.opacity=CZ(t.opacity===void 0?1:t.opacity,n.opacity===void 0?1:n.opacity,r));for(let i=0;i<M1;i++){let a=`border${j1[i]}Radius`,o=I1(t,a),s=I1(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||P1(o)===P1(s)?(e[a]=Math.max(CZ(N1(o),N1(s),r),0),(sJ.test(s)||sJ.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=CZ(t.rotate||0,n.rotate||0,r))}function I1(e,t){return e[t]===void 0?e.borderRadius:e[t]}var L1=z1(0,.5,sX),R1=z1(.5,.95,zK);function z1(e,t,n){return r=>r<e?0:r>t?1:n(UK(e,t,r))}function B1(e,t){e.min=t.min,e.max=t.max}function V1(e,t){B1(e.x,t.x),B1(e.y,t.y)}function H1(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function U1(e,t,n,r,i){return e-=t,e=$$(e,1/n,r),i!==void 0&&(e=$$(e,1/i,r)),e}function W1(e,t=0,n=1,r=.5,i,a=e,o=e){if(sJ.test(t)&&(t=parseFloat(t),t=CZ(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=CZ(a.min,a.max,r);e===a&&(s-=t),e.min=U1(e.min,t,n,s,i),e.max=U1(e.max,t,n,s,i)}function G1(e,t,[n,r,i],a,o){W1(e,t[n],t[r],t[i],t.scale,a,o)}var K1=[`x`,`scaleX`,`originX`],q1=[`y`,`scaleY`,`originY`];function J1(e,t,n,r){G1(e.x,t,K1,n?n.x:void 0,r?r.x:void 0),G1(e.y,t,q1,n?n.y:void 0,r?r.y:void 0)}function Y1(e){return e.translate===0&&e.scale===1}function X1(e){return Y1(e.x)&&Y1(e.y)}function Z1(e,t){return e.min===t.min&&e.max===t.max}function Q1(e,t){return Z1(e.x,t.x)&&Z1(e.y,t.y)}function $1(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function e0(e,t){return $1(e.x,t.x)&&$1(e.y,t.y)}function t0(e){return x$(e.x)/x$(e.y)}function n0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var r0=class{constructor(){this.members=[]}add(e){PY(this.members,e),e.scheduleRender()}remove(e){if(FY(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 i0(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 a0={type:`projectionFrame`,totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},o0=typeof window<`u`&&window.MotionDebug!==void 0,s0=[``,`X`,`Y`,`Z`],c0={visibility:`hidden`},l0=1e3,u0=0;function d0(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function f0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=qY(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,ZK,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&f0(r)}function p0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=u0++,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,o0&&(a0.totalNodes=a0.resolvedTargetDeltas=a0.recalculatedProjection=0),this.nodes.forEach(g0),this.nodes.forEach(C0),this.nodes.forEach(w0),this.nodes.forEach(_0),o0&&window.MotionDebug.record(a0)},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 k1)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new IY),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=D1(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=A1(r,250),y1.hasAnimatedSinceResize&&(y1.hasAnimatedSinceResize=!1,this.nodes.forEach(S0))})}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()||j0,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=a.getProps(),c=!this.targetLayout||!e0(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={...$J(i,`layout`),onPlay:o,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||S0(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,QK(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(T0),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&&f0(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(y0);return}this.isUpdating||this.nodes.forEach(b0),this.isUpdating=!1,this.nodes.forEach(x0),this.nodes.forEach(m0),this.nodes.forEach(h0),this.clearAllSnapshots();let e=NY.now();$K.delta=tJ(0,1e3/60,e-$K.timestamp),$K.timestamp=e,$K.isProcessing=!0,eq.update.process($K),eq.preRender.process($K),eq.render.process($K),$K.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Eq.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(v0),this.sharedNodes.forEach(E0)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ZK.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ZK.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=U$(),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&&!X1(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&(t||X$(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)),F0(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return U$();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(L0))){let{scroll:e}=this.root;e&&(o1(t.x,e.offset.x),o1(t.y,e.offset.y))}return t}removeElementScroll(e){let t=U$();if(V1(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&&V1(t,e),o1(t.x,i.offset.x),o1(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=U$();V1(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&&c1(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),X$(r.latestValues)&&c1(n,r.latestValues)}return X$(this.latestValues)&&c1(n,this.latestValues),n}removeTransform(e){let t=U$();V1(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!X$(n.latestValues))continue;Y$(n.latestValues)&&n.updateSnapshot();let r=U$();V1(r,n.measurePageBox()),J1(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return X$(this.latestValues)&&J1(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!==$K.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=$K.timestamp,!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout&&this.animationProgress!==1?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=U$(),this.relativeTargetOrigin=U$(),O$(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),V1(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=U$(),this.targetWithTransforms=U$()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),E$(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):V1(this.target,this.layout.layoutBox),n1(this.target,this.targetDelta)):V1(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=U$(),this.relativeTargetOrigin=U$(),O$(this.relativeTargetOrigin,this.target,e.target),V1(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}o0&&a0.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Y$(this.parent.latestValues)||Z$(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===$K.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;V1(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;a1(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=U$());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(H1(this.prevProjectionDelta.x,this.projectionDelta.x),H1(this.prevProjectionDelta.y,this.projectionDelta.y)),w$(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!n0(this.projectionDelta.x,this.prevProjectionDelta.x)||!n0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),o0&&a0.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=V$(),this.projectionDelta=V$(),this.projectionDeltaWithTransform=V$()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=V$();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=U$(),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(A0));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;D0(a.x,e.x,n),D0(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(O$(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),k0(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&Q1(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=U$(),V1(d,this.relativeTarget)),s&&(this.animationValues=i,F1(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&&=(QK(this.pendingAnimation),void 0),this.pendingAnimation=ZK.update(()=>{y1.hasAnimatedSinceResize=!0,this.currentAnimation=E1(0,l0,{...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(l0),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&&I0(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||U$();let t=x$(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=x$(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}V1(t,n),c1(t,i),w$(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new r0),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&&d0(`z`,e,r,this.animationValues);for(let t=0;t<s0.length;t++)d0(`rotate${s0[t]}`,e,r,this.animationValues),d0(`skew${s0[t]}`,e,r,this.animationValues);e.render();for(let t in 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 c0;let t={visibility:``},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.opacity=``,t.pointerEvents=Uq(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=Uq(e?.pointerEvents)||``),this.hasProjected&&!X$(this.latestValues)&&(t.transform=n?n({},``):`none`,this.hasProjected=!1),t}let i=r.animationValues||r.latestValues;this.applyTransformsToTarget(),t.transform=i0(this.projectionDeltaWithTransform,this.treeScale,i),n&&(t.transform=n(i,t.transform));let{x:a,y:o}=this.projectionDelta;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;for(let e in MJ){if(i[e]===void 0)continue;let{correct:n,applyTo:a}=MJ[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?Uq(e?.pointerEvents)||``:`none`),t}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(y0),this.root.sharedNodes.clear()}}}function m0(e){e.updateLayout()}function h0(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`?W$(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=x$(r);r.min=n[e].min,r.max=r.min+i}):I0(i,t.layoutBox,n)&&W$(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=x$(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=V$();w$(o,n,t.layoutBox);let s=V$();a?w$(s,e.applyTransform(r,!0),t.measuredBox):w$(s,n,t.layoutBox);let c=!X1(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=U$();O$(o,t.layoutBox,i.layoutBox);let s=U$();O$(s,n,a.layoutBox),e0(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 g0(e){o0&&a0.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 _0(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function v0(e){e.clearSnapshot()}function y0(e){e.clearMeasurements()}function b0(e){e.isLayoutDirty=!1}function x0(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function S0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function C0(e){e.resolveTargetDelta()}function w0(e){e.calcProjection()}function T0(e){e.resetSkewAndRotation()}function E0(e){e.removeLeadSnapshot()}function D0(e,t,n){e.translate=CZ(t.translate,0,n),e.scale=CZ(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function O0(e,t,n,r){e.min=CZ(t.min,n.min,r),e.max=CZ(t.max,n.max,r)}function k0(e,t,n,r){O0(e.x,t.x,n.x,r),O0(e.y,t.y,n.y,r)}function A0(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var j0={duration:.45,ease:[.4,0,.1,1]},M0=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),N0=M0(`applewebkit/`)&&!M0(`chrome/`)?Math.round:zK;function P0(e){e.min=N0(e.min),e.max=N0(e.max)}function F0(e){P0(e.x),P0(e.y)}function I0(e,t,n){return e===`position`||e===`preserve-aspect`&&!S$(t0(t),t0(n),.2)}function L0(e){return e!==e.root&&e.scroll?.wasRoot}var R0=p0({attachResizeListener:(e,t)=>n$(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),z0={current:void 0},B0=p0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!z0.current){let e=new R0({});e.mount(window),e.setOptions({layoutScroll:!0}),z0.current=e}return z0.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),V0={pan:{Feature:v1},drag:{Feature:g1,ProjectionNode:B0,MeasureLayout:w1}};function H0(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&ZK.postRender(()=>i(t,r$(t)))}var U0=class extends QQ{mount(){let{current:e}=this.node;e&&(this.unmount=vY(e,e=>(H0(this.node,e,`Start`),e=>H0(this.node,e,`End`))))}unmount(){}},W0=class extends QQ{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=NZ(n$(this.node.current,`focus`,()=>this.onFocus()),n$(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function G0(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&&ZK.postRender(()=>i(t,r$(t)))}var K0=class extends QQ{mount(){let{current:e}=this.node;e&&(this.unmount=OY(e,e=>(G0(this.node,e,`Start`),(e,{success:t})=>G0(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},q0=new WeakMap,J0=new WeakMap,Y0=e=>{let t=q0.get(e.target);t&&t(e)},X0=e=>{e.forEach(Y0)};function Z0({root:e,...t}){let n=e||document;J0.has(n)||J0.set(n,{});let r=J0.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(X0,{root:e,...t})),r[i]}function Q0(e,t,n){let r=Z0(t);return q0.set(e,n),r.observe(e),()=>{q0.delete(e),r.unobserve(e)}}var $0={some:0,all:1},e2=class extends QQ{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:$0[r]};return Q0(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(t2(e,t))&&this.startObserver()}unmount(){}};function t2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var n2={inView:{Feature:e2},tap:{Feature:K0},focus:{Feature:W0},hover:{Feature:U0}},r2={layout:{ProjectionNode:B0,MeasureLayout:w1}},i2={current:null},a2={current:!1};function o2(){if(a2.current=!0,LK)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>i2.current=e.matches;e.addListener(t),t()}else i2.current=!1}var s2=[...pZ,CX,LX],c2=e=>s2.find(fZ(e)),l2=new WeakMap;function u2(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Hq(i))e.addValue(r,i);else if(Hq(a))e.addValue(r,HY(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,HY(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var d2=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],f2=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=oZ,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=NY.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ZK.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=gq(t),this.isVariantNode=_q(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&&Hq(t)&&t.set(s[e],!1)}}mount(e){this.current=e,l2.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)),a2.current||o2(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:i2.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){l2.delete(this.current),this.projection&&this.projection.unmount(),QK(this.notifyUpdate),QK(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(let e in 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=Jq.has(e),r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&ZK.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 rq){let t=rq[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):U$()}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<d2.length;t++){let n=d2[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=u2(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=HY(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`&&(sZ(n)||lX(n))?n=parseFloat(n):!c2(n)&&LX.test(t)&&(n=WX(e,t)),this.setBaseTarget(e,Hq(n)?n.get():n)),Hq(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=Rq(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&&!Hq(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 IY),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}},p2=class extends f2{constructor(){super(...arguments),this.KeyframeResolver=hZ}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;Hq(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function m2(e){return window.getComputedStyle(e)}var h2=class extends p2{constructor(){super(...arguments),this.type=`html`,this.renderInstance=kJ}readValueFromInstance(e,t){if(Jq.has(t)){let e=UX(t);return e&&e.default||0}else{let n=m2(e),r=(Xq(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return l1(e,t)}build(e,t,n){yJ(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return FJ(e,t,n)}},g2=class extends p2{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=U$}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Jq.has(t)){let e=UX(t);return e&&e.default||0}return t=AJ.has(t)?t:wq(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return IJ(e,t,n)}build(e,t,n){TJ(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){jJ(e,t,n,r)}mount(e){this.isSVGTag=OJ(e.tagName),super.mount(e)}},_2=(e,t)=>Iq(e)?new g2(t):new h2(t,{allowProjection:e!==N.Fragment}),v2=uq(qJ({...t$,...n2,...V0,...r2},_2));function y2(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function b2({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&&!T2(s.current.lastBounds,f)&&o(s.current.lastBounds=f)};return[e,l?y2(e,l):e,c?y2(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 S2(p,!!t),x2(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=C2(e),h())},a,d]}function x2(e){(0,N.useEffect)(()=>{let t=e;return window.addEventListener(`resize`,t),()=>void window.removeEventListener(`resize`,t)},[e])}function S2(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 C2(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,...C2(e.parentElement)]}var w2=[`x`,`y`,`top`,`bottom`,`left`,`right`,`width`,`height`],T2=(e,t)=>w2.every(n=>e[n]===t[n]),E2=e=>{throw TypeError(e)},D2=(e,t,n)=>t.has(e)||E2(`Cannot `+n),O2=(e,t,n)=>(D2(e,t,`read from private field`),n?n.call(e):t.get(e)),k2=(e,t,n)=>t.has(e)?E2(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),A2=(e,t,n,r)=>(D2(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),j2,M2=class{constructor(){k2(this,j2),this.register=e=>{O2(this,j2).push(e)},this.unregister=e=>{for(;O2(this,j2).indexOf(e)!==-1;)O2(this,j2).splice(O2(this,j2).indexOf(e),1)},this.backendChanged=e=>{for(let t of O2(this,j2))t.backendChanged(e)},A2(this,j2,[])}};j2=new WeakMap;var N2,P2,F2,I2,L2,R2,z2,B2,V2,H2,U2,W2=class e{constructor(t,n,r){if(k2(this,N2),k2(this,P2),k2(this,F2),k2(this,I2),k2(this,L2),k2(this,R2,(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
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
179
  This might be unsupported in the future, please specify 'id' explicitely for every backend.`),O2(this,F2)[i])throw Error(`You must specify a unique 'id' property in your Backend entry:
180
180
  ${JSON.stringify(n)} (conflicts with: ${JSON.stringify(O2(this,F2)[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,O2(this,z2).call(this,window),O2(this,F2)[O2(this,N2)].instance.setup()}},this.teardown=()=>{typeof window>`u`||(e.isSetUp=!1,O2(this,B2).call(this,window),O2(this,F2)[O2(this,N2)].instance.teardown())},this.connectDragSource=(e,t,n)=>O2(this,U2).call(this,`connectDragSource`,e,t,n),this.connectDragPreview=(e,t,n)=>O2(this,U2).call(this,`connectDragPreview`,e,t,n),this.connectDropTarget=(e,t,n)=>O2(this,U2).call(this,`connectDropTarget`,e,t,n),this.profile=()=>O2(this,F2)[O2(this,N2)].instance.profile(),this.previewEnabled=()=>O2(this,F2)[O2(this,N2)].preview,this.previewsList=()=>O2(this,P2),this.backendsList=()=>O2(this,I2),k2(this,z2,e=>{for(let t of O2(this,I2))t.transition&&e.addEventListener(t.transition.event,O2(this,V2))}),k2(this,B2,e=>{for(let t of O2(this,I2))t.transition&&e.removeEventListener(t.transition.event,O2(this,V2))}),k2(this,V2,e=>{let t=O2(this,N2);if(O2(this,I2).some(t=>t.id!==O2(this,N2)&&t.transition&&t.transition.check(e)?(A2(this,N2,t.id),!0):!1),O2(this,N2)!==t){O2(this,F2)[t].instance.teardown();for(let[e,t]of Object.entries(O2(this,L2)))t.unsubscribe(),t.unsubscribe=O2(this,H2).call(this,t.func,...t.args);O2(this,P2).backendChanged(this);let n=O2(this,F2)[O2(this,N2)];if(n.instance.setup(),n.skipDispatchOnTransition)return;let r=e.constructor,i=new r(e.type,e);e.target?.dispatchEvent(i)}}),k2(this,H2,(e,t,n,r)=>O2(this,F2)[O2(this,N2)].instance[e](t,n,r)),k2(this,U2,(e,t,n,r)=>{let i=`${e}_${t}`,a=O2(this,H2).call(this,e,t,n,r);return O2(this,L2)[i]={func:e,args:[t,n,r],unsubscribe:a},()=>{O2(this,L2)[i].unsubscribe(),delete O2(this,L2)[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)
@@ -242,7 +242,7 @@ ${e}</ul>
242
242
  `}),i}function boe(e,t,n,r=`json`){return x3(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
243
  `).map((e,t)=>t===0?e:r+e).join(`
244
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`?poe[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},xoe=(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=goe(e,t);else if(r===t5.YAML)try{s=_oe(e,t)}catch{s=x3(e,t,{newlineIsToken:!1})}else s=x3(e,t,{newlineIsToken:!1});else s=hoe(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,Soe=()=>{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},Coe=(e,t,n=!1,r=t5.CHARS,i=0,a=[],o=!1)=>{let s=()=>xoe(e,t,n,r,i,a,o),c=Soe();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 woe=(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}=FG({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 Toe(){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 Eoe(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=Y4(woe);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=Eoe(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,L.default)(this.styles.wordDiff,{[this.styles.wordAdded]:n}),children:r},t):e.type===Z8.REMOVED?(0,P.jsx)(`del`,{className:(0,L.default)(this.styles.wordDiff,{[this.styles.wordRemoved]:n}),children:r},t):(0,P.jsx)(`span`,{className:(0,L.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,L.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,L.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,L.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,L.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,L.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 Coe(e,t,n,r,i,this.props.alwaysShowLines,c),{lineBlocks:d,blocks:f}=X4(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,L.default)(this.styles.block,this.styles.blockAddition)},e)):g.push((0,P.jsx)(`span`,{className:(0,L.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,L.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)(Toe,{}):(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 Doe=Im(),s5=n(Vne(),1);xv(),Sv();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}({}),Ooe=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`},koe=`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`,Aoe=`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`,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='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`,Moe=`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`,Noe=`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`,Poe=`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`,Foe=`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`,Ioe=({icon:e})=>{switch(e){case`add`:case`plus`:return(0,P.jsx)(rl,{});case`add above`:return(0,P.jsx)(ll,{});case`add below`:return(0,P.jsx)(cl,{});case`arrow down`:case`down`:return(0,P.jsx)(js,{});case`arrow left`:case`left`:return(0,P.jsx)(Ms,{});case`arrow right`:case`right`:return(0,P.jsx)(Ns,{});case`arrow up`:case`up`:return(0,P.jsx)(Ps,{});case`bold`:return(0,P.jsx)(Vs,{});case`book`:case`library`:return(0,P.jsx)(Us,{});case`camera`:return(0,P.jsx)(Gs,{});case`close`:case`clear`:case`times`:return(0,P.jsx)(El,{});case`chart`:case`chart line`:return(0,P.jsx)(qs,{});case`chart bar`:return(0,P.jsx)(Ks,{});case`chart pie`:return(0,P.jsx)(Js,{});case`chat`:return(0,P.jsx)(Wc,{});case`check`:case`checkmark`:return(0,P.jsx)(Ys,{});case`chevron up`:return(0,P.jsx)($s,{});case`chevron down`:return(0,P.jsx)(Xs,{});case`chevron left`:return(0,P.jsx)(Zs,{});case`chevron right`:return(0,P.jsx)(Qs,{});case`chevron double left`:return(0,P.jsx)(ec,{});case`chevron double right`:return(0,P.jsx)(tc,{});case`clock`:return(0,P.jsx)(oc,{});case`clone`:case`copy`:case`duplicate`:return(0,P.jsx)(cc,{});case`code`:return(0,P.jsx)(sc,{});case`collapse`:return(0,P.jsx)(gs,{src:koe});case`collapse all`:return(0,P.jsx)(Pc,{});case`company`:return(0,P.jsx)(Ws,{});case`compare`:return(0,P.jsx)(dl,{});case`delete`:case`trash`:return(0,P.jsx)(Sl,{});case`depth`:return(0,P.jsx)(ul,{style:{transform:`rotate(-90deg)`}});case`download`:case`import`:return(0,P.jsx)(pc,{});case`drag`:return(0,P.jsx)(Dc,{});case`edit`:case`pencil`:case`rename`:return(0,P.jsx)(Yc,{});case`electricity`:return(0,P.jsx)(Hs,{});case`error`:return(0,P.jsx)(rc,{});case`exclamation`:return(0,P.jsx)(hc,{});case`expand`:return(0,P.jsx)(_l,{});case`expand all`:return(0,P.jsx)(Fc,{});case`external`:return(0,P.jsx)(gc,{});case`fast forward`:return(0,P.jsx)(tl,{});case`fast backward`:return(0,P.jsx)(nl,{});case`file`:return(0,P.jsx)(yc,{});case`filter`:return(0,P.jsx)(xc,{});case`focus`:return(0,P.jsx)(Sc,{});case`folder`:return(0,P.jsx)(wc,{});case`folder search`:return(0,P.jsx)(Cc,{});case`fork`:return(0,P.jsx)(Ec,{});case`gauge`:return(0,P.jsx)(Tc,{});case`help`:return(0,P.jsx)(Oc,{});case`hide`:return(0,P.jsx)(_c,{});case`indent`:return(0,P.jsx)(lc,{});case`info`:return(0,P.jsx)(kc,{});case`italic`:return(0,P.jsx)(Ac,{});case`key`:return(0,P.jsx)(jc,{});case`laptop`:return(0,P.jsx)(dc,{});case`layout columns`:case`columns`:return(0,P.jsx)(Mc,{});case`layout grid`:case`grid`:return(0,P.jsx)(gs,{src:Foe});case`layout rows`:case`rows`:return(0,P.jsx)(Nc,{});case`layout single`:case`square`:return(0,P.jsx)(gs,{src:Aoe});case`layout 3 split top`:return(0,P.jsx)(gs,{src:joe});case`layout 3 split bottom`:return(0,P.jsx)(gs,{src:Moe});case`layout 3 split left`:return(0,P.jsx)(gs,{src:Noe});case`layout 3 split right`:return(0,P.jsx)(gs,{src:Poe});case`link`:return(0,P.jsx)(Lc,{});case`list`:case`legend`:case`ul`:return(0,P.jsx)(zc,{});case`list numbers`:case`ol`:return(0,P.jsx)(Rc,{});case`location`:return(0,P.jsx)(Uc,{});case`lock`:return(0,P.jsx)(Hc,{});case`maximize`:return(0,P.jsx)(Is,{});case`menu`:return(0,P.jsx)(fc,{});case`minimize`:return(0,P.jsx)(Ls,{});case`minus`:return(0,P.jsx)(Gc,{});case`moon`:return(0,P.jsx)(Kc,{});case`move`:return(0,P.jsx)(Rs,{});case`note`:return(0,P.jsx)(Jc,{});case`notification`:case`bell`:return(0,P.jsx)(Bs,{});case`paste`:return(0,P.jsx)(ac,{});case`pause`:return(0,P.jsx)(Xc,{});case`play`:return(0,P.jsx)(Zc,{});case`question`:return(0,P.jsx)(il,{});case`redo`:case`rotate`:case`rotate right`:return(0,P.jsx)(ol,{});case`refresh`:case`sync`:return(0,P.jsx)(al,{});case`save`:return(0,P.jsx)(uc,{});case`scale`:return(0,P.jsx)(Fs,{});case`search`:return(0,P.jsx)(fl,{});case`server`:return(0,P.jsx)(pl,{});case`settings`:return(0,P.jsx)(ml,{});case`show`:case`eye`:return(0,P.jsx)(vc,{});case`sort`:case`sort descending`:case`sort down`:case`sort amount down`:return(0,P.jsx)(gl,{});case`sort ascending`:case`sort up`:case`sort amount up`:return(0,P.jsx)(hl,{});case`spinner`:return(0,P.jsx)(Bc,{});case`split`:return(0,P.jsx)(zs,{});case`star`:return(0,P.jsx)(vl,{});case`step backward`:return(0,P.jsx)(Qc,{});case`step forward`:return(0,P.jsx)($c,{});case`stop`:return(0,P.jsx)(el,{});case`success`:return(0,P.jsx)(nc,{});case`sun`:return(0,P.jsx)(yl,{});case`table`:return(0,P.jsx)(bl,{});case`target`:return(0,P.jsx)(xl,{});case`undo`:case`rotate left`:return(0,P.jsx)(sl,{});case`unfilter`:return(0,P.jsx)(bc,{});case`unlink`:return(0,P.jsx)(Ic,{});case`unlock`:return(0,P.jsx)(Vc,{});case`upload`:case`export`:return(0,P.jsx)(Cl,{});case`user`:return(0,P.jsx)(wl,{});case`users`:case`group`:return(0,P.jsx)(Tl,{});case`video`:return(0,P.jsx)(qc,{});case`warning`:case`alert`:return(0,P.jsx)(As,{});case`water`:case`droplet`:return(0,P.jsx)(mc,{});case``:return null;default:return(0,P.jsx)(ic,{})}},_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,L.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)(gs,{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)(Ioe,{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`},Loe=({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,L.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)(td,{...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,_]=rd({delayEnter:100,delayLeave:0}),v=m?p?!0:h:!1,{renderLayer:y,triggerProps:b,layerProps:x,arrowProps:S}=Hu({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)(Loe,{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`},Roe=({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,L.default)(C5.helpIcon,t?C5.clickable:``,r?C5.active:``),onClick:e=>{t&&(e.stopPropagation(),t())},"data-testid":a,children:(0,P.jsx)(Roe,{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,L.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`},zoe={spinner:`_spinner_156m4_1`},Boe=({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:zoe.spinner,style:{color:i,fontSize:a}})},D5=function(e){return e.SUBMIT=`submit`,e.BUTTON=`button`,e.RESET=`reset`,e}({}),Voe=({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)(Voe,{tooltip:x,children:(0,P.jsxs)(C,{type:g===D5.SUBMIT?D5.SUBMIT:D5.BUTTON,className:(0,L.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)(Boe,{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`},Hoe=({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,L.default)(A5.headingIcon,t?A5.clickable:``),onClick:t,children:(0,P.jsx)(_5,{icon:n})})]}),Uoe=()=>(0,P.jsx)(`hr`,{className:A5.divider}),Woe=({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=pd,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,L.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}({}),Goe=({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)(Hoe,{label:e?.label??``,onClick:e.onClick,icon:e.icon,testId:e.testId});case j5.DIVIDER:return(0,P.jsx)(Uoe,{});case j5.OPTION:return(0,P.jsx)(Woe,{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}},Koe=e=>e.includes(`[`)?e.substr(0,e.lastIndexOf(`[`)):e,qoe=(e,t)=>`${e}.sections[${t}]`.replace(/^\./,``),Joe=e=>`${e}.close`.replace(/^\./,``),Yoe=(e,t)=>S(e,Koe(t),[]),Xoe=(e,t,n)=>Ge(e,Joe(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,L.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)(Goe,{section:e,closeOnOptionClick:e.closeOnOptionClick,close:i,tree:a,path:qoe(o,t),maxHeight:s})},t))})})},P5=(e,t=!1)=>({auto:!0,preferX:`right`,preferY:`bottom`,placement:e||(t?`right-start`:`bottom-start`)}),F5=e=>cd(e)||fd(e)||(0,N.isValidElement)(e),Zoe=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`},Qoe=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,L.default)(I5.badge,Qoe(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]})},$oe=({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,L.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})})},ese=({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,L.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]})},tse=({component:e,disabled:t,testId:n})=>(0,P.jsx)(`div`,{className:(0,L.default)(A5.component,t?A5.disabled:null),"data-testid":n,children:e}),nse=({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)($oe,{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)(ese,{label:s??``,title:c,disabled:t,carat:p?void 0:f?M5.RIGHT:M5.DOWN,isOpen:_,selected:S}):o===c5.COMPONENT?(0,P.jsx)(tse,{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)(nse,{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=>f(e)))},rse=({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}=bte(),g=p,_=f,{layerProps:v,renderLayer:y}=Hu({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]},ise=({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]=rse({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]=hd(h)&&md(g)?[h,g]:(0,N.useState)(!1),oe=()=>ae(!1),se=()=>ae(!0),{triggerProps:M,layerProps:ce,renderLayer:le}=Hu({isOpen:ie,...P5(te,o),possiblePlacements:re,ResizeObserver:nu,onOutsideClick:oe,overflowContainer:f,onParentClose:oe}),ue=n||z5(e)||C;return Xoe(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}Yoe(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)(ise,{...e,tree:{},path:``,testId:e.testId}):(0,P.jsx)(B5,{...e,tree:{},path:``,testId:e.testId}),ase=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(),md(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,L.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)(ase,{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)&&md(e.onClick)&&e.onClick(n)},testId:e.testId,tooltip:e.tooltip},n)})})},U5={label:`_label_iu2wi_1`,buttonGroup:`_buttonGroup_iu2wi_11`},ose=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=Zoe(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()})]})})},sse=ym`
245
+ `),r5=(e,t,n=t5.CHARS)=>{let r=(typeof n==`string`?poe[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},xoe=(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=goe(e,t);else if(r===t5.YAML)try{s=_oe(e,t)}catch{s=x3(e,t,{newlineIsToken:!1})}else s=x3(e,t,{newlineIsToken:!1});else s=hoe(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,Soe=()=>{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},Coe=(e,t,n=!1,r=t5.CHARS,i=0,a=[],o=!1)=>{let s=()=>xoe(e,t,n,r,i,a,o),c=Soe();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 woe=(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}=FG({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 Toe(){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 Eoe(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=Y4(woe);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=Eoe(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,L.default)(this.styles.wordDiff,{[this.styles.wordAdded]:n}),children:r},t):e.type===Z8.REMOVED?(0,P.jsx)(`del`,{className:(0,L.default)(this.styles.wordDiff,{[this.styles.wordRemoved]:n}),children:r},t):(0,P.jsx)(`span`,{className:(0,L.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,L.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,L.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,L.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,L.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,L.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 Coe(e,t,n,r,i,this.props.alwaysShowLines,c),{lineBlocks:d,blocks:f}=X4(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,L.default)(this.styles.block,this.styles.blockAddition)},e)):g.push((0,P.jsx)(`span`,{className:(0,L.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,L.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)(Toe,{}):(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 Doe=Im(),s5=e(Vne(),1);xv(),Sv();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}({}),Ooe=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`},koe=`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`,Aoe=`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`,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='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`,Moe=`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`,Noe=`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`,Poe=`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`,Foe=`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`,Ioe=({icon:e})=>{switch(e){case`add`:case`plus`:return(0,P.jsx)(rl,{});case`add above`:return(0,P.jsx)(ll,{});case`add below`:return(0,P.jsx)(cl,{});case`arrow down`:case`down`:return(0,P.jsx)(js,{});case`arrow left`:case`left`:return(0,P.jsx)(Ms,{});case`arrow right`:case`right`:return(0,P.jsx)(Ns,{});case`arrow up`:case`up`:return(0,P.jsx)(Ps,{});case`bold`:return(0,P.jsx)(Vs,{});case`book`:case`library`:return(0,P.jsx)(Us,{});case`camera`:return(0,P.jsx)(Gs,{});case`close`:case`clear`:case`times`:return(0,P.jsx)(El,{});case`chart`:case`chart line`:return(0,P.jsx)(qs,{});case`chart bar`:return(0,P.jsx)(Ks,{});case`chart pie`:return(0,P.jsx)(Js,{});case`chat`:return(0,P.jsx)(Wc,{});case`check`:case`checkmark`:return(0,P.jsx)(Ys,{});case`chevron up`:return(0,P.jsx)($s,{});case`chevron down`:return(0,P.jsx)(Xs,{});case`chevron left`:return(0,P.jsx)(Zs,{});case`chevron right`:return(0,P.jsx)(Qs,{});case`chevron double left`:return(0,P.jsx)(ec,{});case`chevron double right`:return(0,P.jsx)(tc,{});case`clock`:return(0,P.jsx)(oc,{});case`clone`:case`copy`:case`duplicate`:return(0,P.jsx)(cc,{});case`code`:return(0,P.jsx)(sc,{});case`collapse`:return(0,P.jsx)(gs,{src:koe});case`collapse all`:return(0,P.jsx)(Pc,{});case`company`:return(0,P.jsx)(Ws,{});case`compare`:return(0,P.jsx)(dl,{});case`delete`:case`trash`:return(0,P.jsx)(Sl,{});case`depth`:return(0,P.jsx)(ul,{style:{transform:`rotate(-90deg)`}});case`download`:case`import`:return(0,P.jsx)(pc,{});case`drag`:return(0,P.jsx)(Dc,{});case`edit`:case`pencil`:case`rename`:return(0,P.jsx)(Yc,{});case`electricity`:return(0,P.jsx)(Hs,{});case`error`:return(0,P.jsx)(rc,{});case`exclamation`:return(0,P.jsx)(hc,{});case`expand`:return(0,P.jsx)(_l,{});case`expand all`:return(0,P.jsx)(Fc,{});case`external`:return(0,P.jsx)(gc,{});case`fast forward`:return(0,P.jsx)(tl,{});case`fast backward`:return(0,P.jsx)(nl,{});case`file`:return(0,P.jsx)(yc,{});case`filter`:return(0,P.jsx)(xc,{});case`focus`:return(0,P.jsx)(Sc,{});case`folder`:return(0,P.jsx)(wc,{});case`folder search`:return(0,P.jsx)(Cc,{});case`fork`:return(0,P.jsx)(Ec,{});case`gauge`:return(0,P.jsx)(Tc,{});case`help`:return(0,P.jsx)(Oc,{});case`hide`:return(0,P.jsx)(_c,{});case`indent`:return(0,P.jsx)(lc,{});case`info`:return(0,P.jsx)(kc,{});case`italic`:return(0,P.jsx)(Ac,{});case`key`:return(0,P.jsx)(jc,{});case`laptop`:return(0,P.jsx)(dc,{});case`layout columns`:case`columns`:return(0,P.jsx)(Mc,{});case`layout grid`:case`grid`:return(0,P.jsx)(gs,{src:Foe});case`layout rows`:case`rows`:return(0,P.jsx)(Nc,{});case`layout single`:case`square`:return(0,P.jsx)(gs,{src:Aoe});case`layout 3 split top`:return(0,P.jsx)(gs,{src:joe});case`layout 3 split bottom`:return(0,P.jsx)(gs,{src:Moe});case`layout 3 split left`:return(0,P.jsx)(gs,{src:Noe});case`layout 3 split right`:return(0,P.jsx)(gs,{src:Poe});case`link`:return(0,P.jsx)(Lc,{});case`list`:case`legend`:case`ul`:return(0,P.jsx)(zc,{});case`list numbers`:case`ol`:return(0,P.jsx)(Rc,{});case`location`:return(0,P.jsx)(Uc,{});case`lock`:return(0,P.jsx)(Hc,{});case`maximize`:return(0,P.jsx)(Is,{});case`menu`:return(0,P.jsx)(fc,{});case`minimize`:return(0,P.jsx)(Ls,{});case`minus`:return(0,P.jsx)(Gc,{});case`moon`:return(0,P.jsx)(Kc,{});case`move`:return(0,P.jsx)(Rs,{});case`note`:return(0,P.jsx)(Jc,{});case`notification`:case`bell`:return(0,P.jsx)(Bs,{});case`paste`:return(0,P.jsx)(ac,{});case`pause`:return(0,P.jsx)(Xc,{});case`play`:return(0,P.jsx)(Zc,{});case`question`:return(0,P.jsx)(il,{});case`redo`:case`rotate`:case`rotate right`:return(0,P.jsx)(ol,{});case`refresh`:case`sync`:return(0,P.jsx)(al,{});case`save`:return(0,P.jsx)(uc,{});case`scale`:return(0,P.jsx)(Fs,{});case`search`:return(0,P.jsx)(fl,{});case`server`:return(0,P.jsx)(pl,{});case`settings`:return(0,P.jsx)(ml,{});case`show`:case`eye`:return(0,P.jsx)(vc,{});case`sort`:case`sort descending`:case`sort down`:case`sort amount down`:return(0,P.jsx)(gl,{});case`sort ascending`:case`sort up`:case`sort amount up`:return(0,P.jsx)(hl,{});case`spinner`:return(0,P.jsx)(Bc,{});case`split`:return(0,P.jsx)(zs,{});case`star`:return(0,P.jsx)(vl,{});case`step backward`:return(0,P.jsx)(Qc,{});case`step forward`:return(0,P.jsx)($c,{});case`stop`:return(0,P.jsx)(el,{});case`success`:return(0,P.jsx)(nc,{});case`sun`:return(0,P.jsx)(yl,{});case`table`:return(0,P.jsx)(bl,{});case`target`:return(0,P.jsx)(xl,{});case`undo`:case`rotate left`:return(0,P.jsx)(sl,{});case`unfilter`:return(0,P.jsx)(bc,{});case`unlink`:return(0,P.jsx)(Ic,{});case`unlock`:return(0,P.jsx)(Vc,{});case`upload`:case`export`:return(0,P.jsx)(Cl,{});case`user`:return(0,P.jsx)(wl,{});case`users`:case`group`:return(0,P.jsx)(Tl,{});case`video`:return(0,P.jsx)(qc,{});case`warning`:case`alert`:return(0,P.jsx)(As,{});case`water`:case`droplet`:return(0,P.jsx)(mc,{});case``:return null;default:return(0,P.jsx)(ic,{})}},_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,L.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)(gs,{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)(Ioe,{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`},Loe=({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,L.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)(td,{...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,_]=rd({delayEnter:100,delayLeave:0}),v=m?p?!0:h:!1,{renderLayer:y,triggerProps:b,layerProps:x,arrowProps:S}=Hu({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)(Loe,{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`},Roe=({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,L.default)(C5.helpIcon,t?C5.clickable:``,r?C5.active:``),onClick:e=>{t&&(e.stopPropagation(),t())},"data-testid":a,children:(0,P.jsx)(Roe,{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,L.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`},zoe={spinner:`_spinner_156m4_1`},Boe=({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:zoe.spinner,style:{color:i,fontSize:a}})},D5=function(e){return e.SUBMIT=`submit`,e.BUTTON=`button`,e.RESET=`reset`,e}({}),Voe=({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)(Voe,{tooltip:x,children:(0,P.jsxs)(C,{type:g===D5.SUBMIT?D5.SUBMIT:D5.BUTTON,className:(0,L.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)(Boe,{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`},Hoe=({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,L.default)(A5.headingIcon,t?A5.clickable:``),onClick:t,children:(0,P.jsx)(_5,{icon:n})})]}),Uoe=()=>(0,P.jsx)(`hr`,{className:A5.divider}),Woe=({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=pd,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,L.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}({}),Goe=({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)(Hoe,{label:e?.label??``,onClick:e.onClick,icon:e.icon,testId:e.testId});case j5.DIVIDER:return(0,P.jsx)(Uoe,{});case j5.OPTION:return(0,P.jsx)(Woe,{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}},Koe=e=>e.includes(`[`)?e.substr(0,e.lastIndexOf(`[`)):e,qoe=(e,t)=>`${e}.sections[${t}]`.replace(/^\./,``),Joe=e=>`${e}.close`.replace(/^\./,``),Yoe=(e,t)=>S(e,Koe(t),[]),Xoe=(e,t,n)=>Ge(e,Joe(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,L.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)(Goe,{section:e,closeOnOptionClick:e.closeOnOptionClick,close:i,tree:a,path:qoe(o,t),maxHeight:s})},t))})})},P5=(e,t=!1)=>({auto:!0,preferX:`right`,preferY:`bottom`,placement:e||(t?`right-start`:`bottom-start`)}),F5=e=>cd(e)||fd(e)||(0,N.isValidElement)(e),Zoe=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`},Qoe=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,L.default)(I5.badge,Qoe(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]})},$oe=({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,L.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})})},ese=({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,L.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]})},tse=({component:e,disabled:t,testId:n})=>(0,P.jsx)(`div`,{className:(0,L.default)(A5.component,t?A5.disabled:null),"data-testid":n,children:e}),nse=({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)($oe,{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)(ese,{label:s??``,title:c,disabled:t,carat:p?void 0:f?M5.RIGHT:M5.DOWN,isOpen:_,selected:S}):o===c5.COMPONENT?(0,P.jsx)(tse,{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)(nse,{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=>f(e)))},rse=({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}=bte(),g=p,_=f,{layerProps:v,renderLayer:y}=Hu({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]},ise=({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]=rse({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]=hd(h)&&md(g)?[h,g]:(0,N.useState)(!1),oe=()=>ae(!1),se=()=>ae(!0),{triggerProps:M,layerProps:ce,renderLayer:le}=Hu({isOpen:ie,...P5(te,o),possiblePlacements:re,ResizeObserver:nu,onOutsideClick:oe,overflowContainer:f,onParentClose:oe}),ue=n||z5(e)||C;return Xoe(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}Yoe(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)(ise,{...e,tree:{},path:``,testId:e.testId}):(0,P.jsx)(B5,{...e,tree:{},path:``,testId:e.testId}),ase=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(),md(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,L.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)(ase,{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)&&md(e.onClick)&&e.onClick(n)},testId:e.testId,tooltip:e.tooltip},n)})})},U5={label:`_label_iu2wi_1`,buttonGroup:`_buttonGroup_iu2wi_11`},ose=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=Zoe(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()})]})})},sse=ym`
246
246
  scrollbar-width: none;
247
247
  -ms-overflow-style: none;
248
248
  &::-webkit-scrollbar {
@@ -303,12 +303,12 @@ ${e}</ul>
303
303
  `}return n.join(``).replace(/%20/g,` `)},((e={})=>rle({...e,textDiff:{diffMatchPatch:$,minLength:120},cloneDiffValues:!0}))(),Object.freeze({summary:{label:`Summary`,value:`summary`},compare:{label:`Compare`,value:`compare`}});const ile=`round`,ale=`transparent`,ole=`rgba(0, 0, 0, 0.1)`,sle=`dblclick`,cle={TRANSLATIONS:`translations`,LANGUAGE_KEY:`languageKey`},lle=1e-4,ule=1e7,N9=()=>{let e=(0,N.useContext)(Be);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)(()=>se(t,s),[t,s]),l=(0,N.useMemo)(()=>({[j]: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 fle=function(){},F9=typeof window<`u`,ple=F9?N.useLayoutEffect:N.useEffect,I9={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function mle(){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 ple(function(){if(t)return o.observe(t),function(){o.disconnect()}},[t]),[n,i]}var L9=F9&&window.ResizeObserver!==void 0?mle:(function(){return[fle,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)},hle=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(gle,B9({attr:B9({},e.attr)},t),V9(e.child))}}function gle(e){var t=function(t){var n=e.attr,r=e.size,i=e.title,a=hle(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 _le(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 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:`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 yle(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 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:`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 xle(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 Sle(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 Cle(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 wle(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 Tle(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}({}),Ele=function(e){return e.VERTICAL=`vertical`,e.HORIZONTAL=`horizontal`,e}({});var Dle=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`})}),Ole=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)`})}),kle=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})})})},Ale=({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)(kle,{}),rectRot:(0,P.jsx)(Ole,{}),rect:(0,P.jsx)(Dle,{})};return(0,P.jsx)(`span`,{className:U9.legendItemPoint,children:(0,P.jsx)(_5,{icon:a?.[r]??(0,P.jsx)(W9,{}),size:i,color:t})})},jle=({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 k.Box:case k.Ellipse:return(0,P.jsx)(jle,{dataset:e});case k.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)(Ale,{dataset:e})]})}};J9.__docgenInfo={description:``,methods:[],displayName:`LegendItemLine`};var Mle=16,Nle=(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)(Cle,{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)(yle,{color:i??r})})}default:return null}},Y9=({hidden:e,dataset:t,handleClick:n,chartType:r,index:i})=>(0,P.jsxs)(`div`,{className:(0,L.default)(U9?.legendItem,e&&U9?.isHidden),onClick:n,children:[(0,P.jsx)(`span`,{className:U9.legendItemSymbol,style:{width:Mle},children:Nle(t,r,i)}),(0,P.jsx)(`span`,{className:U9.legendItemText,children:t?.label})]});Y9.__docgenInfo={description:``,methods:[],displayName:`LegendItem`,props:{hidden:{required:!0,tsType:{name:`boolean`},description:``},dataset:{required:!0,tsType:{name:`union`,raw:`| IGeneratedLineChartDataset
304
304
  | IGenerateBarChartDataset
305
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 Ple=e=>{let t=S(e,`options.plugins.annotation.annotations`,null);return!t||!Object.keys(t).length?[]:Object.values(t)},Fle=e=>De(e?.options?.plugins?.legend?.labels?.generateLabels?.(e))??[];const Ile=e=>{let t=Fle(e),n=Ple(e);return ud(t,e=>{let t=ld(n,t=>e.text===t?.label?.content);return t?{...e,hidden:!t?.display}:e})};var X9=r(((t,n)=>{(function(e){var r;typeof t==`object`?n.exports=e():typeof define==`function`&&define.amd?define(e):(typeof window<`u`?r=window:typeof global<`u`?r=global:typeof self<`u`&&(r=self),r.objectHash=e())})(function(){return function t(n,r,i){function a(s,c){if(!r[s]){if(!n[s]){var l=typeof e==`function`&&e;if(!c&&l)return l(s,!0);if(o)return o(s,!0);throw Error(`Cannot find module '`+s+`'`)}c=r[s]={exports:{}},n[s][0].call(c.exports,function(e){var t=n[s][1][e];return a(t||e)},c,c.exports,t,n,r,i)}return r[s].exports}for(var o=typeof e==`function`&&e,s=0;s<i.length;s++)a(i[s]);return a}({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
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 Ple=e=>{let t=S(e,`options.plugins.annotation.annotations`,null);return!t||!Object.keys(t).length?[]:Object.values(t)},Fle=e=>De(e?.options?.plugins?.legend?.labels?.generateLabels?.(e))??[];const Ile=e=>{let t=Fle(e),n=Ple(e);return ud(t,e=>{let t=ld(n,t=>e.text===t?.label?.content);return t?{...e,hidden:!t?.display}:e})};var X9=i(((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,i){function a(s,c){if(!n[s]){if(!t[s]){var l=typeof r==`function`&&r;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 a(n||e)},c,c.exports,e,t,n,i)}return n[s].exports}for(var o=typeof r==`function`&&r,s=0;s<i.length;s++)a(i[s]);return a}({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
307
  (see https://github.com/puleos/object-hash/issues/26)
308
308
  Use "options.replacer" or "options.ignoreUnknown"
309
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
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)})})),Lle=n(X9(),1),Rle=new Set([`data`,`_meta`,`_parsed`,`_chart`,`_ctx`]);const zle=(e,t)=>{let[n,r]=(0,N.useState)([]);return(0,N.useEffect)(()=>{let t=e?.current;t&&r(Ile(t))},[(0,N.useMemo)(()=>t?.length?(0,Lle.default)(t,{excludeKeys:e=>Rle.has(e),unorderedObjects:!0,unorderedArrays:!1,respectType:!1}):``,[t]),e]),n},Ble=(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 Vle=({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)(Y9,{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=zle(t,s),g=Ble(e,a);return(0,P.jsxs)(`div`,{ref:i,className:(0,L.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)(wle,{}):(0,P.jsx)(xle,{})})}),(0,P.jsx)(Vle,{items:h,legendState:f,datasets:l,legendClick:d,chartType:c})]})});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 Hle=e=>{let{position:t=``,onDrop:n=pd,placeholderSize:r={}}=e??{},[{isOver:i,canDrop:a},o]=Bo(()=>({accept:`legend`,drop:n,collect:e=>({isOver:e?.isOver(),canDrop:e?.canDrop()})})),s=i&&a;return(0,P.jsx)(`div`,{ref:o,className:(0,L.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=[w.TopLeft,w.TopRight,w.BottomLeft,w.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)(Hle,{position:e,onDrop:()=>n(e),placeholderSize:i},e))})};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:`{
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)})})),Lle=e(X9(),1),Rle=new Set([`data`,`_meta`,`_parsed`,`_chart`,`_ctx`]);const zle=(e,t)=>{let[n,r]=(0,N.useState)([]);return(0,N.useEffect)(()=>{let t=e?.current;t&&r(Ile(t))},[(0,N.useMemo)(()=>t?.length?(0,Lle.default)(t,{excludeKeys:e=>Rle.has(e),unorderedObjects:!0,unorderedArrays:!1,respectType:!1}):``,[t]),e]),n},Ble=(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 Vle=({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)(Y9,{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=zle(t,s),g=Ble(e,a);return(0,P.jsxs)(`div`,{ref:i,className:(0,L.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)(wle,{}):(0,P.jsx)(xle,{})})}),(0,P.jsx)(Vle,{items:h,legendState:f,datasets:l,legendClick:d,chartType:c})]})});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 Hle=e=>{let{position:t=``,onDrop:n=pd,placeholderSize:r={}}=e??{},[{isOver:i,canDrop:a},o]=Bo(()=>({accept:`legend`,drop:n,collect:e=>({isOver:e?.isOver(),canDrop:e?.canDrop()})})),s=i&&a;return(0,P.jsx)(`div`,{ref:o,className:(0,L.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=[w.TopLeft,w.TopRight,w.BottomLeft,w.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)(Hle,{position:e,onDrop:()=>n(e),placeholderSize:i},e))})};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
312
  width?: number;
313
313
  height?: number;
314
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||w.BottomLeft),f=l?.current?l.current.getBoundingClientRect():null,p={width:f?.width,height:f?.height},[{isDragging:m=!1},h=pd]=jo(()=>({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)(Z9,{chartRef:e,legendPosition:u,isDragging:m,ref:e=>{h(e),l.current=e},legendConfig:t}),(0,P.jsx)(Q9,{chartArea:r,setLegendPosition:e=>d(e),isDragging:m,placeholderSize:p},s.width)]})};$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{_5 as A,z7 as B,T5 as C,kce as D,Oce as E,Cse as F,S5 as G,Tce as H,L7 as I,Qa as J,dd as K,V7 as L,Z5 as M,O7 as N,jce as O,V5 as P,vse as R,ose as S,X5 as T,K5 as U,_se as V,Ece as W,Ar as X,li as Y,cle as _,_le as a,ole as b,Sle as c,dle as d,P9 as f,sle as g,ale as h,G9 as i,$5 as j,Pce as k,Tle as l,ile as m,X9 as n,vle as o,N9 as p,id as q,Ele as r,ble as s,$9 as t,L9 as u,lle as v,lse as w,O5 as x,ule as y,T7 as z};