@stlite/desktop 0.58.7 → 0.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/bin/dump_artifacts.js +1 -1
  2. package/build/asset-manifest.json +26 -26
  3. package/build/index.html +1 -1
  4. package/build/static/js/{1046.0d496f8d.chunk.js → 1046.3bed3c50.chunk.js} +1 -1
  5. package/build/static/js/1122.1fd3187d.chunk.js +1 -0
  6. package/build/static/js/144.546cefc4.chunk.js +1 -0
  7. package/build/static/js/{1740.9d03a50a.chunk.js → 1740.760a8d99.chunk.js} +1 -1
  8. package/build/static/js/188.d9018bc1.chunk.js +1 -0
  9. package/build/static/js/{2448.15f0d839.chunk.js → 2448.d1709ca6.chunk.js} +1 -1
  10. package/build/static/js/2664.219ef364.chunk.js +1 -0
  11. package/build/static/js/2940.a8dfa8f6.chunk.js +1 -0
  12. package/build/static/js/2967.cfd21d76.chunk.js +2 -0
  13. package/build/static/js/4021.50e4fad7.chunk.js +1 -0
  14. package/build/static/js/4494.280a2293.chunk.js +1 -0
  15. package/build/static/js/4563.d08f3466.chunk.js +1 -0
  16. package/build/static/js/4724.85ca8f57.chunk.js +1 -0
  17. package/build/static/js/{4785.0c41f474.chunk.js → 4785.23c48fdd.chunk.js} +1 -1
  18. package/build/static/js/4831.a2c2c8ad.chunk.js +1 -0
  19. package/build/static/js/{6134.38a4a22f.chunk.js → 6134.d4057528.chunk.js} +1 -1
  20. package/build/static/js/698.e345ddd0.chunk.js +1 -0
  21. package/build/static/js/7125.b89dc54f.chunk.js +1 -0
  22. package/build/static/js/8853.7b55e9e4.chunk.js +1 -0
  23. package/build/static/js/9005.36ad4e5c.chunk.js +1 -0
  24. package/build/static/js/9311.313a112a.chunk.js +1 -0
  25. package/build/static/js/{9813.a4400206.chunk.js → 9813.151e8692.chunk.js} +1 -1
  26. package/build/static/js/{1729.fd9f6660.chunk.js → 9846.e3403599.chunk.js} +1 -1
  27. package/build/static/js/main.c4408952.js +20 -0
  28. package/package.json +5 -5
  29. package/wheels/streamlit-1.36.0-cp312-none-any.whl +0 -0
  30. package/build/static/js/1122.61603faa.chunk.js +0 -1
  31. package/build/static/js/144.fa398340.chunk.js +0 -1
  32. package/build/static/js/188.50554cd3.chunk.js +0 -1
  33. package/build/static/js/2385.8a2ab0b8.chunk.js +0 -1
  34. package/build/static/js/2664.10df4c75.chunk.js +0 -1
  35. package/build/static/js/2940.71b23ca7.chunk.js +0 -1
  36. package/build/static/js/4021.c8cd6e91.chunk.js +0 -1
  37. package/build/static/js/4494.77735905.chunk.js +0 -1
  38. package/build/static/js/4724.c18f63ef.chunk.js +0 -1
  39. package/build/static/js/4831.09c05536.chunk.js +0 -1
  40. package/build/static/js/5800.a14e5838.chunk.js +0 -2
  41. package/build/static/js/698.13b8e23f.chunk.js +0 -1
  42. package/build/static/js/7125.5c972b3e.chunk.js +0 -1
  43. package/build/static/js/9005.50a6313c.chunk.js +0 -1
  44. package/build/static/js/9311.1687f2a8.chunk.js +0 -1
  45. package/build/static/js/9320.3ed3fc02.chunk.js +0 -1
  46. package/build/static/js/main.88651e09.js +0 -28
  47. package/wheels/streamlit-1.35.0-cp312-none-any.whl +0 -0
  48. /package/build/static/js/{5800.a14e5838.chunk.js.LICENSE.txt → 2967.cfd21d76.chunk.js.LICENSE.txt} +0 -0
  49. /package/build/static/js/{main.88651e09.js.LICENSE.txt → main.c4408952.js.LICENSE.txt} +0 -0
@@ -1,2 +0,0 @@
1
- /*! For license information please see 5800.a14e5838.chunk.js.LICENSE.txt */
2
- (self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[5800],{30383:(e,t,n)=>{"use strict";n.d(t,{m:()=>a});var r=n(7896),o=n(5057),i=n(63947),a=o.forwardRef((function(e,t){return o.createElement(i.D,(0,r.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}))}));a.displayName="Add"},23046:(e,t,n)=>{"use strict";n.d(t,{H:()=>a});var r=n(7896),o=n(5057),i=n(63947),a=o.forwardRef((function(e,t){return o.createElement(i.D,(0,r.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}))}));a.displayName="Delete"},61078:(e,t,n)=>{"use strict";n.d(t,{k:()=>a});var r=n(7896),o=n(5057),i=n(63947),a=o.forwardRef((function(e,t){return o.createElement(i.D,(0,r.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("rect",{width:24,height:24,fill:"none"}),o.createElement("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4l-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}))}));a.displayName="FileDownload"},18932:(e,t,n)=>{"use strict";n.d(t,{i:()=>a});var r=n(7896),o=n(5057),i=n(63947),a=o.forwardRef((function(e,t){return o.createElement(i.D,(0,r.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))}));a.displayName="Fullscreen"},93576:(e,t,n)=>{"use strict";n.d(t,{m:()=>a});var r=n(7896),o=n(5057),i=n(63947),a=o.forwardRef((function(e,t){return o.createElement(i.D,(0,r.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))}));a.displayName="FullscreenExit"},83221:(e,t,n)=>{"use strict";n.d(t,{o:()=>a});var r=n(7896),o=n(5057),i=n(63947),a=o.forwardRef((function(e,t){return o.createElement(i.D,(0,r.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}))}));a.displayName="Search"},53136:(e,t,n)=>{"use strict";n.d(t,{d:()=>a});var r=n(7896),o=n(5057),i=n(63947),a=o.forwardRef((function(e,t){return o.createElement(i.D,(0,r.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),o.createElement("path",{d:"M0 0v4l1.5-1.5L3 4l1-1-1.5-1.5L4 0H0zm5 4L4 5l1.5 1.5L4 8h4V4L6.5 5.5 5 4z"}))}));a.displayName="FullscreenEnter"},88916:(e,t,n)=>{"use strict";n.d(t,{m:()=>a});var r=n(7896),o=n(5057),i=n(63947),a=o.forwardRef((function(e,t){return o.createElement(i.D,(0,r.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),o.createElement("path",{d:"M1 0L0 1l1.5 1.5L0 4h4V0L2.5 1.5 1 0zm3 4v4l1.5-1.5L7 8l1-1-1.5-1.5L8 4H4z"}))}));a.displayName="FullscreenExit"},77650:(e,t,n)=>{"use strict";n.d(t,{z:()=>l});var r=n(69194),o=n(5057),i=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},n=[];e.forEach((e=>{(e?e.split(" "):[]).forEach((e=>{if(e.startsWith("atm_")){const[,n]=e.split("_");t[n]=e}else n.push(e)}))}));const r=[];for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&r.push(t[o]);return r.push(...n),r.join(" ")},a=(e,t)=>{const n={};return Object.keys(e).filter((e=>t=>-1===e.indexOf(t))(t)).forEach((t=>{n[t]=e[t]})),n};var l=function(e){let t="";return n=>{const l=(l,s)=>{const{as:c=e,class:u=t}=l;var d;const h=function(e,t,n){const o=a(t,n);if(!e){const e="function"===typeof r.Z?{default:r.Z}:r.Z;Object.keys(o).forEach((t=>{e.default(t)||delete o[t]}))}return o}(void 0===n.propsAsIs?!("string"===typeof c&&-1===c.indexOf("-")&&(d=c[0],d.toUpperCase()!==d)):n.propsAsIs,l,["as","class"]);h.ref=s,h.className=n.atomic?i(n.class,h.className||u):i(h.className||u,n.class);const{vars:f}=n;if(f){const e={};for(const o in f){const t=f[o],r=t[0],i=t[1]||"",a="function"===typeof r?r(l):r;n.name,e[`--${o}`]=`${a}${i}`}const t=h.style||{},r=Object.keys(t);r.length>0&&r.forEach((n=>{e[n]=t[n]})),h.style=e}return e.__linaria&&e!==c?(h.as=c,o.createElement(e,h)):o.createElement(c,h)},s=o.forwardRef?o.forwardRef(l):e=>{const t=a(e,["innerRef"]);return l(t,e.innerRef)};return s.displayName=n.name,s.__linaria={className:n.class||t,extends:e},s}}},34690:e=>{e.exports=function(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}},74023:(e,t,n)=>{var r=n(50377);e.exports=function(e,t,n,o){return r(e,(function(e,r,i){t(o,e,n(e),i)})),o}},14061:e=>{e.exports=function(e,t,n){return e===e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}},44949:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},43676:(e,t,n)=>{var r=n(98323),o=n(97247),i=n(89479),a=n(51565),l=n(87382),s=n(18766);e.exports=function(e,t,n){var c=-1,u=o,d=e.length,h=!0,f=[],p=f;if(n)h=!1,u=i;else if(d>=200){var g=t?null:l(e);if(g)return s(g);h=!1,u=a,p=new r}else p=t?[]:f;e:for(;++c<d;){var m=e[c],v=t?t(m):m;if(m=n||0!==m?m:0,h&&v===v){for(var w=p.length;w--;)if(p[w]===v)continue e;t&&p.push(v),f.push(m)}else u(p,v,n)||(p!==f&&p.push(v),f.push(m))}return f}},60022:(e,t,n)=>{var r=n(34690),o=n(74023),i=n(31104),a=n(44028);e.exports=function(e,t){return function(n,l){var s=a(n)?r:o,c=t?t():{};return s(n,e,i(l,2),c)}}},87382:(e,t,n)=>{var r=n(33242),o=n(92706),i=n(18766),a=r&&1/i(new r([,-0]))[1]==1/0?function(e){return new r(e)}:o;e.exports=a},88341:(e,t,n)=>{var r=n(14061),o=n(81692);e.exports=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=o(n))===n?n:0),void 0!==t&&(t=(t=o(t))===t?t:0),r(o(e),t,n)}},67047:(e,t,n)=>{var r=n(26271),o=n(72685),i=n(81692),a=Math.max,l=Math.min;e.exports=function(e,t,n){var s,c,u,d,h,f,p=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function w(t){var n=s,r=c;return s=c=void 0,p=t,d=e.apply(r,n)}function b(e){var n=e-f;return void 0===f||n>=t||n<0||m&&e-p>=u}function y(){var e=o();if(b(e))return x(e);h=setTimeout(y,function(e){var n=t-(e-f);return m?l(n,u-(e-p)):n}(e))}function x(e){return h=void 0,v&&s?w(e):(s=c=void 0,d)}function k(){var e=o(),n=b(e);if(s=arguments,c=this,f=e,n){if(void 0===h)return function(e){return p=e,h=setTimeout(y,t),g?w(e):d}(f);if(m)return clearTimeout(h),h=setTimeout(y,t),w(f)}return void 0===h&&(h=setTimeout(y,t)),d}return t=i(t)||0,r(n)&&(g=!!n.leading,u=(m="maxWait"in n)?a(i(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==h&&clearTimeout(h),p=0,s=f=c=h=void 0},k.flush=function(){return void 0===h?d:x(o())},k}},88417:(e,t,n)=>{var r=n(23447),o=n(60022),i=Object.prototype.hasOwnProperty,a=o((function(e,t,n){i.call(e,n)?e[n].push(t):r(e,n,[t])}));e.exports=a},79530:(e,t,n)=>{var r=n(44949),o=n(55462);e.exports=function(e,t){return null!=e&&o(e,t,r)}},92706:e=>{e.exports=function(){}},72685:(e,t,n)=>{var r=n(56164);e.exports=function(){return r.Date.now()}},8406:(e,t,n)=>{var r=n(67047),o=n(26271);e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:i,maxWait:t,trailing:a})}},87384:(e,t,n)=>{var r=n(43676);e.exports=function(e){return e&&e.length?r(e):[]}},56719:function(e,t,n){var r,o,i,a,l;a=this,l=function(e){var t=!1,n=!1,r=!1,o=!1,i="escape years months weeks days hours minutes seconds milliseconds general".split(" "),a=[{type:"seconds",targets:[{type:"minutes",value:60},{type:"hours",value:3600},{type:"days",value:86400},{type:"weeks",value:604800},{type:"months",value:2678400},{type:"years",value:31536e3}]},{type:"minutes",targets:[{type:"hours",value:60},{type:"days",value:1440},{type:"weeks",value:10080},{type:"months",value:44640},{type:"years",value:525600}]},{type:"hours",targets:[{type:"days",value:24},{type:"weeks",value:168},{type:"months",value:744},{type:"years",value:8760}]},{type:"days",targets:[{type:"weeks",value:7},{type:"months",value:31},{type:"years",value:365}]},{type:"months",targets:[{type:"years",value:12}]}];function l(e,t){return!(t.length>e.length)&&-1!==e.indexOf(t)}function s(e){for(var t="";e;)t+="0",e-=1;return t}function c(e,t){var n=e+"+"+v(S(t).sort(),(function(e){return e+":"+t[e]})).join(",");return c.cache[n]||(c.cache[n]=Intl.NumberFormat(e,t)),c.cache[n]}function u(e,t,i){var a,l,d,h=t.useToLocaleString,f=t.useGrouping,p=f&&t.grouping.slice(),g=t.maximumSignificantDigits,m=t.minimumIntegerDigits||1,v=t.fractionDigits||0,w=t.groupingSeparator,b=t.decimalSeparator;if(h&&i){var y,x={minimumIntegerDigits:m,useGrouping:f};return v&&(x.maximumFractionDigits=v,x.minimumFractionDigits=v),g&&e>0&&(x.maximumSignificantDigits=g),r?(o||((y=C({},t)).useGrouping=!1,y.decimalSeparator=".",e=parseFloat(u(e,y),10)),c(i,x).format(e)):(n||((y=C({},t)).useGrouping=!1,y.decimalSeparator=".",e=parseFloat(u(e,y),10)),e.toLocaleString(i,x))}var k=(g?e.toPrecision(g+1):e.toFixed(v+1)).split("e");d=k[1]||"",l=(k=k[0].split("."))[1]||"";var S=(a=k[0]||"").length,M=l.length,R=S+M,E=a+l;(g&&R===g+1||!g&&M===v+1)&&((E=function(e){for(var t=e.split("").reverse(),n=0,r=!0;r&&n<t.length;)n?"9"===t[n]?t[n]="0":(t[n]=(parseInt(t[n],10)+1).toString(),r=!1):(parseInt(t[n],10)<5&&(r=!1),t[n]="0"),n+=1;return r&&t.push("1"),t.reverse().join("")}(E)).length===R+1&&(S+=1),M&&(E=E.slice(0,-1)),a=E.slice(0,S),l=E.slice(S)),g&&(l=l.replace(/0*$/,""));var I=parseInt(d,10);I>0?l.length<=I?(a+=l+=s(I-l.length),l=""):(a+=l.slice(0,I),l=l.slice(I)):I<0&&(l=s(Math.abs(I)-a.length)+a+l,a="0"),g||((l=l.slice(0,v)).length<v&&(l+=s(v-l.length)),a.length<m&&(a=s(m-a.length)+a));var O,T="";if(f)for(k=a;k.length;)p.length&&(O=p.shift()),T&&(T=w+T),T=k.slice(-O)+T,k=k.slice(0,-O);else T=a;return l&&(T=T+b+l),T}function d(e,t){return e.label.length>t.label.length?-1:e.label.length<t.label.length?1:0}c.cache={};var h={durationLabelsStandard:{S:"millisecond",SS:"milliseconds",s:"second",ss:"seconds",m:"minute",mm:"minutes",h:"hour",hh:"hours",d:"day",dd:"days",w:"week",ww:"weeks",M:"month",MM:"months",y:"year",yy:"years"},durationLabelsShort:{S:"msec",SS:"msecs",s:"sec",ss:"secs",m:"min",mm:"mins",h:"hr",hh:"hrs",d:"dy",dd:"dys",w:"wk",ww:"wks",M:"mo",MM:"mos",y:"yr",yy:"yrs"},durationTimeTemplates:{HMS:"h:mm:ss",HM:"h:mm",MS:"m:ss"},durationLabelTypes:[{type:"standard",string:"__"},{type:"short",string:"_"}],durationPluralKey:function(e,t,n){return 1===t&&null===n?e:e+e}};function f(e){return"[object Array]"===Object.prototype.toString.call(e)}function p(e){return"[object Object]"===Object.prototype.toString.call(e)}function g(e,t){var n,r=0,o=e&&e.length||0;for("function"!==typeof t&&(n=t,t=function(e){return e===n});r<o;){if(t(e[r]))return e[r];r+=1}}function m(e,t){var n=0,r=e.length;if(e&&r)for(;n<r;){if(!1===t(e[n],n))return;n+=1}}function v(e,t){var n=0,r=e.length,o=[];if(!e||!r)return o;for(;n<r;)o[n]=t(e[n],n),n+=1;return o}function w(e,t){return v(e,(function(e){return e[t]}))}function b(e){var t=[];return m(e,(function(e){e&&t.push(e)})),t}function y(e){var t=[];return m(e,(function(e){g(t,e)||t.push(e)})),t}function x(e,t){var n=[];return m(e,(function(e){m(t,(function(t){e===t&&n.push(e)}))})),y(n)}function k(e,t){var n=[];return m(e,(function(r,o){if(!t(r))return n=e.slice(o),!1})),n}function C(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function S(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function M(e,t){var n=0,r=e.length;if(!e||!r)return!1;for(;n<r;){if(!0===t(e[n],n))return!0;n+=1}return!1}function R(e){return"3.6"===e(3.55,"en",{useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:1})}function E(e){var t=!0;return!!(t=(t=(t=t&&"1"===e(1,"en",{minimumIntegerDigits:1}))&&"01"===e(1,"en",{minimumIntegerDigits:2}))&&"001"===e(1,"en",{minimumIntegerDigits:3}))&&!!(t=(t=(t=(t=t&&"100"===e(99.99,"en",{maximumFractionDigits:0,minimumFractionDigits:0}))&&"100.0"===e(99.99,"en",{maximumFractionDigits:1,minimumFractionDigits:1}))&&"99.99"===e(99.99,"en",{maximumFractionDigits:2,minimumFractionDigits:2}))&&"99.990"===e(99.99,"en",{maximumFractionDigits:3,minimumFractionDigits:3}))&&!!(t=(t=(t=(t=(t=t&&"100"===e(99.99,"en",{maximumSignificantDigits:1}))&&"100"===e(99.99,"en",{maximumSignificantDigits:2}))&&"100"===e(99.99,"en",{maximumSignificantDigits:3}))&&"99.99"===e(99.99,"en",{maximumSignificantDigits:4}))&&"99.99"===e(99.99,"en",{maximumSignificantDigits:5}))&&!!(t=(t=t&&"1,000"===e(1e3,"en",{useGrouping:!0}))&&"1000"===e(1e3,"en",{useGrouping:!1}))}function I(){var e,t=[].slice.call(arguments),n={};if(m(t,(function(t,r){if(!r){if(!f(t))throw"Expected array as the first argument to durationsFormat.";e=t}"string"!==typeof t&&"function"!==typeof t?"number"!==typeof t?p(t)&&C(n,t):n.precision=t:n.template=t})),!e||!e.length)return[];n.returnMomentTypes=!0;var r=v(e,(function(e){return e.format(n)})),o=x(i,y(w(function(e){var t=[];return m(e,(function(e){t=t.concat(e)})),t}(r),"type"))),a=n.largest;return a&&(o=o.slice(0,a)),n.returnMomentTypes=!1,n.outputTypes=o,v(e,(function(e){return e.format(n)}))}function O(){var n=[].slice.call(arguments),o=C({},this.format.defaults),s=this.asMilliseconds(),c=this.asMonths();"function"===typeof this.isValid&&!1===this.isValid()&&(s=0,c=0);var R=s<0,E=e.duration(Math.abs(s),"milliseconds"),I=e.duration(Math.abs(c),"months");m(n,(function(e){"string"!==typeof e&&"function"!==typeof e?"number"!==typeof e?p(e)&&C(o,e):o.precision=e:o.template=e}));var O={years:"y",months:"M",weeks:"w",days:"d",hours:"h",minutes:"m",seconds:"s",milliseconds:"S"},T={escape:/\[(.+?)\]/,years:/\*?[Yy]+/,months:/\*?M+/,weeks:/\*?[Ww]+/,days:/\*?[Dd]+/,hours:/\*?[Hh]+/,minutes:/\*?m+/,seconds:/\*?s+/,milliseconds:/\*?S+/,general:/.+?/};o.types=i;var P=function(e){return g(i,(function(t){return T[t].test(e)}))},D=new RegExp(v(i,(function(e){return T[e].source})).join("|"),"g");o.duration=this;var H="function"===typeof o.template?o.template.apply(o):o.template,z=o.outputTypes,L=o.returnMomentTypes,F=o.largest,A=[];z||(f(o.stopTrim)&&(o.stopTrim=o.stopTrim.join("")),o.stopTrim&&m(o.stopTrim.match(D),(function(e){var t=P(e);"escape"!==t&&"general"!==t&&A.push(t)})));var V=e.localeData();V||(V={}),m(S(h),(function(e){"function"!==typeof h[e]?V["_"+e]||(V["_"+e]=h[e]):V[e]||(V[e]=h[e])})),m(S(V._durationTimeTemplates),(function(e){H=H.replace("_"+e+"_",V._durationTimeTemplates[e])}));var _=o.userLocale||e.locale(),N=o.useLeftUnits,$=o.usePlural,B=o.precision,W=o.forceLength,Z=o.useGrouping,j=o.trunc,U=o.useSignificantDigits&&B>0,X=U?o.precision:0,G=X,Y=o.minValue,K=!1,q=o.maxValue,Q=!1,J=o.useToLocaleString,ee=o.groupingSeparator,te=o.decimalSeparator,ne=o.grouping;J=J&&(t||r);var re=o.trim;f(re)&&(re=re.join(" ")),null===re&&(F||q||U)&&(re="all"),null!==re&&!0!==re&&"left"!==re&&"right"!==re||(re="large"),!1===re&&(re="");var oe=function(e){return e.test(re)},ie=/both/,ae=/^all|[^sm]all/,le=F>0||M([/large/,ie,ae],oe),se=M([/small/,ie,ae],oe),ce=M([/mid/,ae],oe),ue=M([/final/,ae],oe),de=v(H.match(D),(function(e,t){var n=P(e);return"*"===e.slice(0,1)&&(e=e.slice(1),"escape"!==n&&"general"!==n&&A.push(n)),{index:t,length:e.length,text:"",token:"escape"===n?e.replace(T.escape,"$1"):e,type:"escape"===n||"general"===n?null:n}})),he={index:0,length:0,token:"",text:"",type:null},fe=[];N&&de.reverse(),m(de,(function(e){if(e.type)return(he.type||he.text)&&fe.push(he),void(he=e);N?he.text=e.token+he.text:he.text+=e.token})),(he.type||he.text)&&fe.push(he),N&&fe.reverse();var pe=x(i,y(b(w(fe,"type"))));if(!pe.length)return w(fe,"text").join("");pe=v(pe,(function(e,t){var n,r=t+1===pe.length,i=!t;n="years"===e||"months"===e?I.as(e):E.as(e);var a=Math.floor(n),l=n-a,s=g(fe,(function(t){return e===t.type}));return i&&q&&n>q&&(Q=!0),r&&Y&&Math.abs(o.duration.as(e))<Y&&(K=!0),i&&null===W&&s.length>1&&(W=!0),E.subtract(a,e),I.subtract(a,e),{rawValue:n,wholeValue:a,decimalValue:r?l:0,isSmallest:r,isLargest:i,type:e,tokenLength:s.length}}));var ge,me=j?Math.floor:Math.round,ve=function(e,t){var n=Math.pow(10,t);return me(e*n)/n},we=!1,be=!1,ye=function(e,t){var n={useGrouping:Z,groupingSeparator:ee,decimalSeparator:te,grouping:ne,useToLocaleString:J};return U&&(X<=0?(e.rawValue=0,e.wholeValue=0,e.decimalValue=0):(n.maximumSignificantDigits=X,e.significantDigits=X)),Q&&!be&&(e.isLargest?(e.wholeValue=q,e.decimalValue=0):(e.wholeValue=0,e.decimalValue=0)),K&&!be&&(e.isSmallest?(e.wholeValue=Y,e.decimalValue=0):(e.wholeValue=0,e.decimalValue=0)),e.isSmallest||e.significantDigits&&e.significantDigits-e.wholeValue.toString().length<=0?B<0?e.value=ve(e.wholeValue,B):0===B?e.value=me(e.wholeValue+e.decimalValue):U?(e.value=j?ve(e.rawValue,X-e.wholeValue.toString().length):e.rawValue,e.wholeValue&&(X-=e.wholeValue.toString().length)):(n.fractionDigits=B,e.value=j?e.wholeValue+ve(e.decimalValue,B):e.wholeValue+e.decimalValue):U&&e.wholeValue?(e.value=Math.round(ve(e.wholeValue,e.significantDigits-e.wholeValue.toString().length)),X-=e.wholeValue.toString().length):e.value=e.wholeValue,e.tokenLength>1&&(W||we)&&(n.minimumIntegerDigits=e.tokenLength,be&&n.maximumSignificantDigits<e.tokenLength&&delete n.maximumSignificantDigits),!we&&(e.value>0||""===re||g(A,e.type)||g(z,e.type))&&(we=!0),e.formattedValue=u(e.value,n,_),n.useGrouping=!1,n.decimalSeparator=".",e.formattedValueEn=u(e.value,n,"en"),2===e.tokenLength&&"milliseconds"===e.type&&(e.formattedValueMS=u(e.value,{minimumIntegerDigits:3,useGrouping:!1},"en").slice(0,2)),e};if((pe=b(pe=v(pe,ye))).length>1){var xe=function(e){return g(pe,(function(t){return t.type===e}))};m(a,(function(e){var t=xe(e.type);t&&m(e.targets,(function(e){var n=xe(e.type);n&&parseInt(t.formattedValueEn,10)===e.value&&(t.rawValue=0,t.wholeValue=0,t.decimalValue=0,n.rawValue+=1,n.wholeValue+=1,n.decimalValue=0,n.formattedValueEn=n.wholeValue.toString(),be=!0)}))}))}return be&&(we=!1,X=G,pe=b(pe=v(pe,ye))),!z||Q&&!o.trim?(le&&(pe=k(pe,(function(e){return!e.isSmallest&&!e.wholeValue&&!g(A,e.type)}))),F&&pe.length&&(pe=pe.slice(0,F)),se&&pe.length>1&&(ge=function(e){return!e.wholeValue&&!g(A,e.type)&&!e.isLargest},pe=k(pe.slice().reverse(),ge).reverse()),ce&&(pe=b(pe=v(pe,(function(e,t){return t>0&&t<pe.length-1&&!e.wholeValue?null:e})))),!ue||1!==pe.length||pe[0].wholeValue||!j&&pe[0].isSmallest&&pe[0].rawValue<Y||(pe=[])):pe=b(pe=v(pe,(function(e){return g(z,(function(t){return e.type===t}))?e:null}))),L?pe:(m(fe,(function(e){var t=O[e.type],n=g(pe,(function(t){return t.type===e.type}));if(t&&n){var r=n.formattedValueEn.split(".");r[0]=parseInt(r[0],10),r[1]?r[1]=parseFloat("0."+r[1],10):r[1]=null;var o=V.durationPluralKey(t,r[0],r[1]),i=function(e,t){var n=[];return m(S(t),(function(r){if("_durationLabels"===r.slice(0,15)){var o=r.slice(15).toLowerCase();m(S(t[r]),(function(i){i.slice(0,1)===e&&n.push({type:o,key:i,label:t[r][i]})}))}})),n}(t,V),a=!1,s={};m(V._durationLabelTypes,(function(t){var n=g(i,(function(e){return e.type===t.type&&e.key===o}));n&&(s[n.type]=n.label,l(e.text,t.string)&&(e.text=e.text.replace(t.string,n.label),a=!0))})),$&&!a&&(i.sort(d),m(i,(function(t){return s[t.type]===t.label?!l(e.text,t.label)&&void 0:l(e.text,t.label)?(e.text=e.text.replace(t.label,s[t.type]),!1):void 0})))}})),(fe=v(fe,(function(e){if(!e.type)return e.text;var t=g(pe,(function(t){return t.type===e.type}));if(!t)return"";var n="";return N&&(n+=e.text),(R&&Q||!R&&K)&&(n+="< ",Q=!1,K=!1),(R&&K||!R&&Q)&&(n+="> ",Q=!1,K=!1),R&&(t.value>0||""===re||g(A,t.type)||g(z,t.type))&&(n+="-",R=!1),"milliseconds"===e.type&&t.formattedValueMS?n+=t.formattedValueMS:n+=t.formattedValue,N||(n+=e.text),n}))).join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function T(){var e=this.duration,t=function(t){return e._data[t]},n=g(this.types,t),r=function(e,t){for(var n=e.length;n-=1;)if(t(e[n]))return e[n]}(this.types,t);switch(n){case"milliseconds":return"S __";case"seconds":case"minutes":return"*_MS_";case"hours":return"_HMS_";case"days":if(n===r)return"d __";case"weeks":return n===r?"w __":(null===this.trim&&(this.trim="both"),"w __, d __, h __");case"months":if(n===r)return"M __";case"years":return n===r?"y __":(null===this.trim&&(this.trim="both"),"y __, M __, d __");default:return null===this.trim&&(this.trim="both"),"y __, d __, h __, m __, s __"}}function P(e){if(!e)throw"Moment Duration Format init cannot find moment instance.";e.duration.format=I,e.duration.fn.format=O,e.duration.fn.format.defaults={trim:null,stopTrim:null,largest:null,maxValue:null,minValue:null,precision:0,trunc:!1,forceLength:null,userLocale:null,usePlural:!0,useLeftUnits:!1,useGrouping:!0,useSignificantDigits:!1,template:T,useToLocaleString:!0,groupingSeparator:",",decimalSeparator:".",grouping:[3]},e.updateLocale("en",h)}var D=function(e,t,n){return e.toLocaleString(t,n)};t=function(){try{(0).toLocaleString("i")}catch(e){return"RangeError"===e.name}return!1}()&&E(D),n=t&&R(D);var H=function(e,t,n){if("undefined"!==typeof window&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(t,n).format(e)};return r=E(H),o=r&&R(H),P(e),P},o=[n(88084)],void 0===(i="function"===typeof(r=l)?r.apply(t,o):r)||(e.exports=i),a&&(a.momentDurationFormatSetup=a.moment?l(a.moment):l)},42608:function(e,t,n){var r,o,i;o=[t,n(2871)],r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(t);function r(e){return e&&e.__esModule?e:{default:e}}e.default=n.default},void 0===(i="function"===typeof r?r.apply(t,o):r)||(e.exports=i)},2871:function(e,t,n){var r,o,i;o=[t,n(5057),n(55898)],r=function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setHasSupportToCaptureOption=f;var r=i(t),o=i(n);function i(e){return e&&e.__esModule?e:{default:e}}var a=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};function l(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var c=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function d(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=!1;function f(e){h=e}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){f(!0)}}))}catch(v){}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{capture:!0};return h?e:e.capture}function g(e){if("touches"in e){var t=e.touches[0];return{x:t.pageX,y:t.pageY}}return{x:e.screenX,y:e.screenY}}var m=function(e){function t(){var e;s(this,t);for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r)));return i._handleSwipeStart=i._handleSwipeStart.bind(i),i._handleSwipeMove=i._handleSwipeMove.bind(i),i._handleSwipeEnd=i._handleSwipeEnd.bind(i),i._onMouseDown=i._onMouseDown.bind(i),i._onMouseMove=i._onMouseMove.bind(i),i._onMouseUp=i._onMouseUp.bind(i),i._setSwiperRef=i._setSwiperRef.bind(i),i}return d(t,e),c(t,[{key:"componentDidMount",value:function(){this.swiper&&this.swiper.addEventListener("touchmove",this._handleSwipeMove,p({capture:!0,passive:!1}))}},{key:"componentWillUnmount",value:function(){this.swiper&&this.swiper.removeEventListener("touchmove",this._handleSwipeMove,p({capture:!0,passive:!1}))}},{key:"_onMouseDown",value:function(e){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(e))}},{key:"_onMouseMove",value:function(e){this.mouseDown&&this._handleSwipeMove(e)}},{key:"_onMouseUp",value:function(e){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(e)}},{key:"_handleSwipeStart",value:function(e){var t=g(e),n=t.x,r=t.y;this.moveStart={x:n,y:r},this.props.onSwipeStart(e)}},{key:"_handleSwipeMove",value:function(e){if(this.moveStart){var t=g(e),n=t.x,r=t.y,o=n-this.moveStart.x,i=r-this.moveStart.y;this.moving=!0,this.props.onSwipeMove({x:o,y:i},e)&&e.cancelable&&e.preventDefault(),this.movePosition={deltaX:o,deltaY:i}}}},{key:"_handleSwipeEnd",value:function(e){this.props.onSwipeEnd(e);var t=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-t?this.props.onSwipeLeft(1,e):this.movePosition.deltaX>t&&this.props.onSwipeRight(1,e),this.movePosition.deltaY<-t?this.props.onSwipeUp(1,e):this.movePosition.deltaY>t&&this.props.onSwipeDown(1,e)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(e){this.swiper=e,this.props.innerRef(e)}},{key:"render",value:function(){var e=this.props,t=(e.tagName,e.className),n=e.style,o=e.children,i=(e.allowMouseEvents,e.onSwipeUp,e.onSwipeDown,e.onSwipeLeft,e.onSwipeRight,e.onSwipeStart,e.onSwipeMove,e.onSwipeEnd,e.innerRef,e.tolerance,l(e,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]));return r.default.createElement(this.props.tagName,a({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:t,style:n},i),o)}}]),t}(t.Component);m.displayName="ReactSwipe",m.propTypes={tagName:o.default.string,className:o.default.string,style:o.default.object,children:o.default.node,allowMouseEvents:o.default.bool,onSwipeUp:o.default.func,onSwipeDown:o.default.func,onSwipeLeft:o.default.func,onSwipeRight:o.default.func,onSwipeStart:o.default.func,onSwipeMove:o.default.func,onSwipeEnd:o.default.func,innerRef:o.default.func,tolerance:o.default.number.isRequired},m.defaultProps={tagName:"div",allowMouseEvents:!1,onSwipeUp:function(){},onSwipeDown:function(){},onSwipeLeft:function(){},onSwipeRight:function(){},onSwipeStart:function(){},onSwipeMove:function(){},onSwipeEnd:function(){},innerRef:function(){},tolerance:0},e.default=m},void 0===(i="function"===typeof r?r.apply(t,o):r)||(e.exports=i)},69265:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e,t,n){var r=0===e?e:e+t;return"translate3d"+("("+("horizontal"===n?[r,0,0]:[0,r,0]).join(",")+")")}},10083:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fadeAnimationHandler=t.slideStopSwipingHandler=t.slideSwipeAnimationHandler=t.slideAnimationHandler=void 0;var r,o=n(5057),i=(r=n(69265))&&r.__esModule?r:{default:r},a=n(76126);function l(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.slideAnimationHandler=function(e,t){var n={},r=t.selectedItem,l=r,c=o.Children.count(e.children)-1;if(e.infiniteLoop&&(r<0||r>c))return l<0?e.centerMode&&e.centerSlidePercentage&&"horizontal"===e.axis?n.itemListStyle=(0,a.setPosition)(-(c+2)*e.centerSlidePercentage-(100-e.centerSlidePercentage)/2,e.axis):n.itemListStyle=(0,a.setPosition)(100*-(c+2),e.axis):l>c&&(n.itemListStyle=(0,a.setPosition)(0,e.axis)),n;var u=(0,a.getPosition)(r,e),d=(0,i.default)(u,"%",e.axis),h=e.transitionTime+"ms";return n.itemListStyle={WebkitTransform:d,msTransform:d,OTransform:d,transform:d},t.swiping||(n.itemListStyle=s(s({},n.itemListStyle),{},{WebkitTransitionDuration:h,MozTransitionDuration:h,OTransitionDuration:h,transitionDuration:h,msTransitionDuration:h})),n};t.slideSwipeAnimationHandler=function(e,t,n,r){var i={},l="horizontal"===t.axis,s=o.Children.count(t.children),c=(0,a.getPosition)(n.selectedItem,t),u=t.infiniteLoop?(0,a.getPosition)(s-1,t)-100:(0,a.getPosition)(s-1,t),d=l?e.x:e.y,h=d;0===c&&d>0&&(h=0),c===u&&d<0&&(h=0);var f=c+100/(n.itemSize/h),p=Math.abs(d)>t.swipeScrollTolerance;return t.infiniteLoop&&p&&(0===n.selectedItem&&f>-100?f-=100*s:n.selectedItem===s-1&&f<100*-s&&(f+=100*s)),(!t.preventMovementUntilSwipeScrollTolerance||p||n.swipeMovementStarted)&&(n.swipeMovementStarted||r({swipeMovementStarted:!0}),i.itemListStyle=(0,a.setPosition)(f,t.axis)),p&&!n.cancelClick&&r({cancelClick:!0}),i};t.slideStopSwipingHandler=function(e,t){var n=(0,a.getPosition)(t.selectedItem,e);return{itemListStyle:(0,a.setPosition)(n,e.axis)}};t.fadeAnimationHandler=function(e,t){var n=e.transitionTime+"ms",r="ease-in-out",o={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:r,msTransitionTimingFunction:r,MozTransitionTimingFunction:r,WebkitTransitionTimingFunction:r,OTransitionTimingFunction:r};return t.swiping||(o=s(s({},o),{},{WebkitTransitionDuration:n,MozTransitionDuration:n,OTransitionDuration:n,transitionDuration:n,msTransitionDuration:n})),{slideStyle:o,selectedStyle:s(s({},o),{},{opacity:1,position:"relative"}),prevStyle:s({},o)}}},64810:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==f(e)&&"function"!==typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(5057)),o=d(n(42608)),i=d(n(3786)),a=d(n(72867)),l=d(n(9197)),s=d(n(37980)),c=n(76126),u=n(10083);function d(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function f(e){return f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(){return p=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},p.apply(this,arguments)}function g(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 m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(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 w(e,t){return w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},w(e,t)}function b(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=x(e);if(t){var o=x(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===f(t)||"function"===typeof t))return t;return y(e)}(this,n)}}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(f,e);var t,n,d,h=b(f);function f(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),k(y(t=h.call(this,e)),"thumbsRef",void 0),k(y(t),"carouselWrapperRef",void 0),k(y(t),"listRef",void 0),k(y(t),"itemsRef",void 0),k(y(t),"timer",void 0),k(y(t),"animationHandler",void 0),k(y(t),"setThumbsRef",(function(e){t.thumbsRef=e})),k(y(t),"setCarouselWrapperRef",(function(e){t.carouselWrapperRef=e})),k(y(t),"setListRef",(function(e){t.listRef=e})),k(y(t),"setItemsRef",(function(e,n){t.itemsRef||(t.itemsRef=[]),t.itemsRef[n]=e})),k(y(t),"autoPlay",(function(){r.Children.count(t.props.children)<=1||(t.clearAutoPlay(),t.props.autoPlay&&(t.timer=setTimeout((function(){t.increment()}),t.props.interval)))})),k(y(t),"clearAutoPlay",(function(){t.timer&&clearTimeout(t.timer)})),k(y(t),"resetAutoPlay",(function(){t.clearAutoPlay(),t.autoPlay()})),k(y(t),"stopOnHover",(function(){t.setState({isMouseEntered:!0},t.clearAutoPlay)})),k(y(t),"startOnLeave",(function(){t.setState({isMouseEntered:!1},t.autoPlay)})),k(y(t),"isFocusWithinTheCarousel",(function(){return!!t.carouselWrapperRef&&!((0,l.default)().activeElement!==t.carouselWrapperRef&&!t.carouselWrapperRef.contains((0,l.default)().activeElement))})),k(y(t),"navigateWithKeyboard",(function(e){if(t.isFocusWithinTheCarousel()){var n="horizontal"===t.props.axis,r=n?37:38;(n?39:40)===e.keyCode?t.increment():r===e.keyCode&&t.decrement()}})),k(y(t),"updateSizes",(function(){if(t.state.initialized&&t.itemsRef&&0!==t.itemsRef.length){var e="horizontal"===t.props.axis,n=t.itemsRef[0];if(n){var r=e?n.clientWidth:n.clientHeight;t.setState({itemSize:r}),t.thumbsRef&&t.thumbsRef.updateSizes()}}})),k(y(t),"setMountState",(function(){t.setState({hasMount:!0}),t.updateSizes()})),k(y(t),"handleClickItem",(function(e,n){0!==r.Children.count(t.props.children)&&(t.state.cancelClick?t.setState({cancelClick:!1}):(t.props.onClickItem(e,n),e!==t.state.selectedItem&&t.setState({selectedItem:e})))})),k(y(t),"handleOnChange",(function(e,n){r.Children.count(t.props.children)<=1||t.props.onChange(e,n)})),k(y(t),"handleClickThumb",(function(e,n){t.props.onClickThumb(e,n),t.moveTo(e)})),k(y(t),"onSwipeStart",(function(e){t.setState({swiping:!0}),t.props.onSwipeStart(e)})),k(y(t),"onSwipeEnd",(function(e){t.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),t.props.onSwipeEnd(e),t.clearAutoPlay(),t.state.autoPlay&&t.autoPlay()})),k(y(t),"onSwipeMove",(function(e,n){t.props.onSwipeMove(n);var r=t.props.swipeAnimationHandler(e,t.props,t.state,t.setState.bind(y(t)));return t.setState(m({},r)),!!Object.keys(r).length})),k(y(t),"decrement",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t.moveTo(t.state.selectedItem-("number"===typeof e?e:1))})),k(y(t),"increment",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t.moveTo(t.state.selectedItem+("number"===typeof e?e:1))})),k(y(t),"moveTo",(function(e){if("number"===typeof e){var n=r.Children.count(t.props.children)-1;e<0&&(e=t.props.infiniteLoop?n:0),e>n&&(e=t.props.infiniteLoop?0:n),t.selectItem({selectedItem:e}),t.state.autoPlay&&!1===t.state.isMouseEntered&&t.resetAutoPlay()}})),k(y(t),"onClickNext",(function(){t.increment(1)})),k(y(t),"onClickPrev",(function(){t.decrement(1)})),k(y(t),"onSwipeForward",(function(){t.increment(1),t.props.emulateTouch&&t.setState({cancelClick:!0})})),k(y(t),"onSwipeBackwards",(function(){t.decrement(1),t.props.emulateTouch&&t.setState({cancelClick:!0})})),k(y(t),"changeItem",(function(e){return function(n){(0,c.isKeyboardEvent)(n)&&"Enter"!==n.key||t.moveTo(e)}})),k(y(t),"selectItem",(function(e){t.setState(m({previousItem:t.state.selectedItem},e),(function(){t.setState(t.animationHandler(t.props,t.state))})),t.handleOnChange(e.selectedItem,r.Children.toArray(t.props.children)[e.selectedItem])})),k(y(t),"getInitialImage",(function(){var e=t.props.selectedItem,n=t.itemsRef&&t.itemsRef[e];return(n&&n.getElementsByTagName("img")||[])[0]})),k(y(t),"getVariableItemHeight",(function(e){var n=t.itemsRef&&t.itemsRef[e];if(t.state.hasMount&&n&&n.children.length){var r=n.children[0].getElementsByTagName("img")||[];if(r.length>0){var o=r[0];if(!o.complete){o.addEventListener("load",(function e(){t.forceUpdate(),o.removeEventListener("load",e)}))}}var i=(r[0]||n.children[0]).clientHeight;return i>0?i:null}return null}));var n={initialized:!1,previousItem:e.selectedItem,selectedItem:e.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:e.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return t.animationHandler="function"===typeof e.animationHandler&&e.animationHandler||"fade"===e.animationHandler&&u.fadeAnimationHandler||u.slideAnimationHandler,t.state=m(m({},n),t.animationHandler(e,n)),t}return t=f,(n=[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(e,t){e.children||!this.props.children||this.state.initialized||this.setupCarousel(),!e.autoFocus&&this.props.autoFocus&&this.forceFocus(),t.swiping&&!this.state.swiping&&this.setState(m({},this.props.stopSwipingHandler(this.props,this.state))),e.selectedItem===this.props.selectedItem&&e.centerMode===this.props.centerMode||(this.updateSizes(),this.moveTo(this.props.selectedItem)),e.autoPlay!==this.props.autoPlay&&(this.props.autoPlay?this.setupAutoPlay():this.destroyAutoPlay(),this.setState({autoPlay:this.props.autoPlay}))}},{key:"componentWillUnmount",value:function(){this.destroyCarousel()}},{key:"setupCarousel",value:function(){var e=this;this.bindEvents(),this.state.autoPlay&&r.Children.count(this.props.children)>1&&this.setupAutoPlay(),this.props.autoFocus&&this.forceFocus(),this.setState({initialized:!0},(function(){var t=e.getInitialImage();t&&!t.complete?t.addEventListener("load",e.setMountState):e.setMountState()}))}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var e=this.carouselWrapperRef;this.props.stopOnHover&&e&&(e.addEventListener("mouseenter",this.stopOnHover),e.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var e=this.carouselWrapperRef;this.props.stopOnHover&&e&&(e.removeEventListener("mouseenter",this.stopOnHover),e.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,s.default)().addEventListener("resize",this.updateSizes),(0,s.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,l.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,s.default)().removeEventListener("resize",this.updateSizes),(0,s.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var e=this.getInitialImage();e&&e.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,l.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var e;null===(e=this.carouselWrapperRef)||void 0===e||e.focus()}},{key:"renderItems",value:function(e){var t=this;return this.props.children?r.Children.map(this.props.children,(function(n,o){var a=o===t.state.selectedItem,l=o===t.state.previousItem,s=a&&t.state.selectedStyle||l&&t.state.prevStyle||t.state.slideStyle||{};t.props.centerMode&&"horizontal"===t.props.axis&&(s=m(m({},s),{},{minWidth:t.props.centerSlidePercentage+"%"})),t.state.swiping&&t.state.swipeMovementStarted&&(s=m(m({},s),{},{pointerEvents:"none"}));var c={ref:function(e){return t.setItemsRef(e,o)},key:"itemKey"+o+(e?"clone":""),className:i.default.ITEM(!0,o===t.state.selectedItem,o===t.state.previousItem),onClick:t.handleClickItem.bind(t,o,n),style:s};return r.default.createElement("li",c,t.props.renderItem(n,{isSelected:o===t.state.selectedItem,isPrevious:o===t.state.previousItem}))})):[]}},{key:"renderControls",value:function(){var e=this,t=this.props,n=t.showIndicators,o=t.labels,i=t.renderIndicator,a=t.children;return n?r.default.createElement("ul",{className:"control-dots"},r.Children.map(a,(function(t,n){return i&&i(e.changeItem(n),n===e.state.selectedItem,n,o.item)}))):null}},{key:"renderStatus",value:function(){return this.props.showStatus?r.default.createElement("p",{className:"carousel-status"},this.props.statusFormatter(this.state.selectedItem+1,r.Children.count(this.props.children))):null}},{key:"renderThumbs",value:function(){return this.props.showThumbs&&this.props.children&&0!==r.Children.count(this.props.children)?r.default.createElement(a.default,{ref:this.setThumbsRef,onSelectItem:this.handleClickThumb,selectedItem:this.state.selectedItem,transitionTime:this.props.transitionTime,thumbWidth:this.props.thumbWidth,labels:this.props.labels,emulateTouch:this.props.emulateTouch},this.props.renderThumbs(this.props.children)):null}},{key:"render",value:function(){var e=this;if(!this.props.children||0===r.Children.count(this.props.children))return null;var t=this.props.swipeable&&r.Children.count(this.props.children)>1,n="horizontal"===this.props.axis,a=this.props.showArrows&&r.Children.count(this.props.children)>1,l=a&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,s=a&&(this.state.selectedItem<r.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,c=this.renderItems(!0),u=c.shift(),d=c.pop(),h={className:i.default.SLIDER(!0,this.state.swiping),onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:this.state.itemListStyle,tolerance:this.props.swipeScrollTolerance},f={};if(n){if(h.onSwipeLeft=this.onSwipeForward,h.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var g=this.getVariableItemHeight(this.state.selectedItem);f.height=g||"auto"}}else h.onSwipeUp="natural"===this.props.verticalSwipe?this.onSwipeBackwards:this.onSwipeForward,h.onSwipeDown="natural"===this.props.verticalSwipe?this.onSwipeForward:this.onSwipeBackwards,h.style=m(m({},h.style),{},{height:this.state.itemSize}),f.height=this.state.itemSize;return r.default.createElement("div",{"aria-label":this.props.ariaLabel,className:i.default.ROOT(this.props.className),ref:this.setCarouselWrapperRef,tabIndex:this.props.useKeyboardArrows?0:void 0},r.default.createElement("div",{className:i.default.CAROUSEL(!0),style:{width:this.props.width}},this.renderControls(),this.props.renderArrowPrev(this.onClickPrev,l,this.props.labels.leftArrow),r.default.createElement("div",{className:i.default.WRAPPER(!0,this.props.axis),style:f},t?r.default.createElement(o.default,p({tagName:"ul",innerRef:this.setListRef},h,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&d,this.renderItems(),this.props.infiniteLoop&&u):r.default.createElement("ul",{className:i.default.SLIDER(!0,this.state.swiping),ref:function(t){return e.setListRef(t)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&d,this.renderItems(),this.props.infiniteLoop&&u)),this.props.renderArrowNext(this.onClickNext,s,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}])&&v(t.prototype,n),d&&v(t,d),f}(r.default.Component);t.default=C,k(C,"displayName","Carousel"),k(C,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:c.noop,onClickThumb:c.noop,onChange:c.noop,onSwipeStart:function(){},onSwipeEnd:function(){},onSwipeMove:function(){return!1},preventMovementUntilSwipeScrollTolerance:!1,renderArrowPrev:function(e,t,n){return r.default.createElement("button",{type:"button","aria-label":n,className:i.default.ARROW_PREV(!t),onClick:e})},renderArrowNext:function(e,t,n){return r.default.createElement("button",{type:"button","aria-label":n,className:i.default.ARROW_NEXT(!t),onClick:e})},renderIndicator:function(e,t,n,o){return r.default.createElement("li",{className:i.default.DOT(t),onClick:e,onKeyDown:e,value:n,key:n,role:"button",tabIndex:0,"aria-label":"".concat(o," ").concat(n+1)})},renderItem:function(e){return e},renderThumbs:function(e){var t=r.Children.map(e,(function(e){var t=e;if("img"!==e.type&&(t=r.Children.toArray(e.props.children).find((function(e){return"img"===e.type}))),t)return t}));return 0===t.filter((function(e){return e})).length?(console.warn("No images found! Can't build the thumb list without images. If you don't need thumbs, set showThumbs={false} in the Carousel. Note that it's not possible to get images rendered inside custom components. More info at https://github.com/leandrowd/react-responsive-carousel/blob/master/TROUBLESHOOTING.md"),[]):t},statusFormatter:c.defaultStatusFormatter,selectedItem:0,showArrows:!0,showIndicators:!0,showStatus:!0,showThumbs:!0,stopOnHover:!0,swipeScrollTolerance:5,swipeable:!0,transitionTime:350,verticalSwipe:"standard",width:"100%",animationHandler:"slide",swipeAnimationHandler:u.slideSwipeAnimationHandler,stopSwipingHandler:u.slideStopSwipingHandler})},57834:()=>{},76126:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setPosition=t.getPosition=t.isKeyboardEvent=t.defaultStatusFormatter=t.noop=void 0;var r,o=n(5057),i=(r=n(69265))&&r.__esModule?r:{default:r};t.noop=function(){};t.defaultStatusFormatter=function(e,t){return"".concat(e," of ").concat(t)};t.isKeyboardEvent=function(e){return!!e&&e.hasOwnProperty("key")};t.getPosition=function(e,t){if(t.infiniteLoop&&++e,0===e)return 0;var n=o.Children.count(t.children);if(t.centerMode&&"horizontal"===t.axis){var r=-e*t.centerSlidePercentage,i=n-1;return e&&(e!==i||t.infiniteLoop)?r+=(100-t.centerSlidePercentage)/2:e===i&&(r+=100-t.centerSlidePercentage),r}return 100*-e};t.setPosition=function(e,t){var n={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach((function(r){n[r]=(0,i.default)(e,"%",t)})),n}},72867:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==d(e)&&"function"!==typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(5057)),o=c(n(3786)),i=n(79979),a=c(n(69265)),l=c(n(42608)),s=c(n(37980));function c(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function d(e){return d="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(){return h=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},h.apply(this,arguments)}function f(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 p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function g(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===d(t)||"function"===typeof t))return t;return m(e)}(this,n)}}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(d,e);var t,n,c,u=g(d);function d(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),w(m(t=u.call(this,e)),"itemsWrapperRef",void 0),w(m(t),"itemsListRef",void 0),w(m(t),"thumbsRef",void 0),w(m(t),"setItemsWrapperRef",(function(e){t.itemsWrapperRef=e})),w(m(t),"setItemsListRef",(function(e){t.itemsListRef=e})),w(m(t),"setThumbsRef",(function(e,n){t.thumbsRef||(t.thumbsRef=[]),t.thumbsRef[n]=e})),w(m(t),"updateSizes",(function(){if(t.props.children&&t.itemsWrapperRef&&t.thumbsRef){var e=r.Children.count(t.props.children),n=t.itemsWrapperRef.clientWidth,o=t.props.thumbWidth?t.props.thumbWidth:(0,i.outerWidth)(t.thumbsRef[0]),a=Math.floor(n/o),l=a<e,s=l?e-a:0;t.setState((function(e,n){return{itemSize:o,visibleItems:a,firstItem:l?t.getFirstItem(n.selectedItem):0,lastPosition:s,showArrows:l}}))}})),w(m(t),"handleClickItem",(function(e,n,r){if(!function(e){return e.hasOwnProperty("key")}(r)||"Enter"===r.key){var o=t.props.onSelectItem;"function"===typeof o&&o(e,n)}})),w(m(t),"onSwipeStart",(function(){t.setState({swiping:!0})})),w(m(t),"onSwipeEnd",(function(){t.setState({swiping:!1})})),w(m(t),"onSwipeMove",(function(e){var n=e.x;if(!t.state.itemSize||!t.itemsWrapperRef||!t.state.visibleItems)return!1;var o=r.Children.count(t.props.children),i=-100*t.state.firstItem/t.state.visibleItems;0===i&&n>0&&(n=0),i===100*-Math.max(o-t.state.visibleItems,0)/t.state.visibleItems&&n<0&&(n=0);var l=i+100/(t.itemsWrapperRef.clientWidth/n);return t.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach((function(e){t.itemsListRef.style[e]=(0,a.default)(l,"%",t.props.axis)})),!0})),w(m(t),"slideRight",(function(e){t.moveTo(t.state.firstItem-("number"===typeof e?e:1))})),w(m(t),"slideLeft",(function(e){t.moveTo(t.state.firstItem+("number"===typeof e?e:1))})),w(m(t),"moveTo",(function(e){e=(e=e<0?0:e)>=t.state.lastPosition?t.state.lastPosition:e,t.setState({firstItem:e})})),t.state={selectedItem:e.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},t}return t=d,(n=[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(e){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==e.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,s.default)().addEventListener("resize",this.updateSizes),(0,s.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,s.default)().removeEventListener("resize",this.updateSizes),(0,s.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(e){var t=e;return e>=this.state.lastPosition&&(t=this.state.lastPosition),e<this.state.firstItem+this.state.visibleItems&&(t=this.state.firstItem),e<this.state.firstItem&&(t=e),t}},{key:"renderItems",value:function(){var e=this;return this.props.children.map((function(t,n){var i=o.default.ITEM(!1,n===e.state.selectedItem),a={key:n,ref:function(t){return e.setThumbsRef(t,n)},className:i,onClick:e.handleClickItem.bind(e,n,e.props.children[n]),onKeyDown:e.handleClickItem.bind(e,n,e.props.children[n]),"aria-label":"".concat(e.props.labels.item," ").concat(n+1),style:{width:e.props.thumbWidth}};return r.default.createElement("li",h({},a,{role:"button",tabIndex:0}),t)}))}},{key:"render",value:function(){var e=this;if(!this.props.children)return null;var t,n=r.Children.count(this.props.children)>1,i=this.state.showArrows&&this.state.firstItem>0,s=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,c=-this.state.firstItem*(this.state.itemSize||0),u=(0,a.default)(c,"px",this.props.axis),d=this.props.transitionTime+"ms";return t={WebkitTransform:u,MozTransform:u,MsTransform:u,OTransform:u,transform:u,msTransform:u,WebkitTransitionDuration:d,MozTransitionDuration:d,MsTransitionDuration:d,OTransitionDuration:d,transitionDuration:d,msTransitionDuration:d},r.default.createElement("div",{className:o.default.CAROUSEL(!1)},r.default.createElement("div",{className:o.default.WRAPPER(!1),ref:this.setItemsWrapperRef},r.default.createElement("button",{type:"button",className:o.default.ARROW_PREV(!i),onClick:function(){return e.slideRight()},"aria-label":this.props.labels.leftArrow}),n?r.default.createElement(l.default,{tagName:"ul",className:o.default.SLIDER(!1,this.state.swiping),onSwipeLeft:this.slideLeft,onSwipeRight:this.slideRight,onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:t,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):r.default.createElement("ul",{className:o.default.SLIDER(!1,this.state.swiping),ref:function(t){return e.setItemsListRef(t)},style:t},this.renderItems()),r.default.createElement("button",{type:"button",className:o.default.ARROW_NEXT(!s),onClick:function(){return e.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}])&&f(t.prototype,n),c&&f(t,c),d}(r.Component);t.default=b,w(b,"displayName","Thumbs"),w(b,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350})},3786:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(7742))&&r.__esModule?r:{default:r};var i={ROOT:function(e){return(0,o.default)(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({"carousel-root":!0},e||"",!!e))},CAROUSEL:function(e){return(0,o.default)({carousel:!0,"carousel-slider":e})},WRAPPER:function(e,t){return(0,o.default)({"thumbs-wrapper":!e,"slider-wrapper":e,"axis-horizontal":"horizontal"===t,"axis-vertical":"horizontal"!==t})},SLIDER:function(e,t){return(0,o.default)({thumbs:!e,slider:e,animated:!t})},ITEM:function(e,t,n){return(0,o.default)({thumb:!e,slide:e,selected:t,previous:n})},ARROW_PREV:function(e){return(0,o.default)({"control-arrow control-prev":!0,"control-disabled":e})},ARROW_NEXT:function(e){return(0,o.default)({"control-arrow control-next":!0,"control-disabled":e})},DOT:function(e){return(0,o.default)({dot:!0,selected:e})}};t.default=i},79979:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.outerWidth=void 0;t.outerWidth=function(e){var t=e.offsetWidth,n=getComputedStyle(e);return t+=parseInt(n.marginLeft)+parseInt(n.marginRight)}},27261:(e,t,n)=>{"use strict";Object.defineProperty(t,"lr",{enumerable:!0,get:function(){return r.default}});var r=a(n(64810)),o=n(57834),i=a(n(72867));function a(e){return e&&e.__esModule?e:{default:e}}},9197:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(){return document}},37980:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(){return window}},59500:(e,t,n)=>{var r;!function(){"use strict";var o={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function i(e){return function(e,t){var n,r,a,l,s,c,u,d,h,f=1,p=e.length,g="";for(r=0;r<p;r++)if("string"===typeof e[r])g+=e[r];else if("object"===typeof e[r]){if((l=e[r]).keys)for(n=t[f],a=0;a<l.keys.length;a++){if(void 0==n)throw new Error(i('[sprintf] Cannot access property "%s" of undefined value "%s"',l.keys[a],l.keys[a-1]));n=n[l.keys[a]]}else n=l.param_no?t[l.param_no]:t[f++];if(o.not_type.test(l.type)&&o.not_primitive.test(l.type)&&n instanceof Function&&(n=n()),o.numeric_arg.test(l.type)&&"number"!==typeof n&&isNaN(n))throw new TypeError(i("[sprintf] expecting number but found %T",n));switch(o.number.test(l.type)&&(d=n>=0),l.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,l.width?parseInt(l.width):0);break;case"e":n=l.precision?parseFloat(n).toExponential(l.precision):parseFloat(n).toExponential();break;case"f":n=l.precision?parseFloat(n).toFixed(l.precision):parseFloat(n);break;case"g":n=l.precision?String(Number(n.toPrecision(l.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=l.precision?n.substring(0,l.precision):n;break;case"t":n=String(!!n),n=l.precision?n.substring(0,l.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=l.precision?n.substring(0,l.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=l.precision?n.substring(0,l.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}o.json.test(l.type)?g+=n:(!o.number.test(l.type)||d&&!l.sign?h="":(h=d?"+":"-",n=n.toString().replace(o.sign,"")),c=l.pad_char?"0"===l.pad_char?"0":l.pad_char.charAt(1):" ",u=l.width-(h+n).length,s=l.width&&u>0?c.repeat(u):"",g+=l.align?h+n+s:"0"===c?h+s+n:s+h+n)}return g}(function(e){if(l[e])return l[e];var t,n=e,r=[],i=0;for(;n;){if(null!==(t=o.text.exec(n)))r.push(t[0]);else if(null!==(t=o.modulo.exec(n)))r.push("%");else{if(null===(t=o.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){i|=1;var a=[],s=t[2],c=[];if(null===(c=o.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(s=s.substring(c[0].length));)if(null!==(c=o.key_access.exec(s)))a.push(c[1]);else{if(null===(c=o.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}t[2]=a}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return l[e]=r}(e),arguments)}function a(e,t){return i.apply(null,[e].concat(t||[]))}var l=Object.create(null);t.sprintf=i,t.vsprintf=a,"undefined"!==typeof window&&(window.sprintf=i,window.vsprintf=a,void 0===(r=function(){return{sprintf:i,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},33091:()=>{},27235:()=>{},9249:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:()=>r})},87371:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(45850);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,r.Z)(o.key),o)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},75181:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(95058);var o=n(11987);function i(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=(0,r.Z)(e);if(t){var a=(0,r.Z)(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return(0,o.Z)(this,n)}}},95058:(e,t,n)=>{"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:()=>r})},45754:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(88960);function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.Z)(e,t)}},11987:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(86522),o=n(80753);function i(e,t){if(t&&("object"===(0,r.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}},2867:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(59147);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},23213:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>d});var r=n(5057),o=n(77650),i=n(42462),a=n(43128),l=n(40047);const s=(0,o.z)("input")({name:"StyledInputBox",class:"gdg-s1wtovjx",propsAsIs:!1}),c=(e,t)=>{if(void 0===t||null===t)return"";const n=t.toISOString();switch(e){case"date":return n.split("T")[0];case"datetime-local":return n.replace("Z","");case"time":return n.split("T")[1].replace("Z","");default:throw new Error(`Unknown date kind ${e}`)}},u=e=>{const t=e.value.data,{format:n,displayDate:o}=t,a=void 0===t.step||Number.isNaN(Number(t.step))?void 0:Number(t.step),l=t.min instanceof Date?c(n,t.min):t.min,u=t.max instanceof Date?c(n,t.max):t.max;let d=t.date;const h=t.timezoneOffset?60*t.timezoneOffset*1e3:0;h&&d&&(d=new Date(d.getTime()+h));const f=c(n,d);return e.value.readonly?r.createElement(i.K,{highlight:!0,autoFocus:!1,disabled:!0,value:o??"",onChange:()=>{}}):r.createElement(s,{"data-testid":"date-picker-cell",required:!0,type:n,defaultValue:f,min:l,max:u,step:a,autoFocus:!0,onChange:t=>{isNaN(t.target.valueAsNumber)?e.onChange({...e.value,data:{...e.value.data,date:void 0}}):e.onChange({...e.value,data:{...e.value.data,date:new Date(t.target.valueAsNumber-h)}})}})},d={kind:a.p6.Custom,isMatch:e=>"date-picker-cell"===e.data.kind,draw:(e,t)=>{const{displayDate:n}=t.data;return(0,l.L6)(e,n,t.contentAlign),!0},measure:(e,t,n)=>{const{displayDate:r}=t.data;return e.measureText(r).width+2*n.cellHorizontalPadding},provideEditor:()=>({editor:u}),onPaste:(e,t)=>{let n=NaN;return e&&(n=Number(e).valueOf(),Number.isNaN(n)&&(n=Date.parse(e),"time"===t.format&&Number.isNaN(n)&&(n=Date.parse(`1970-01-01T${e}Z`)))),{...t,date:Number.isNaN(n)?void 0:new Date(n)}}}},60353:(e,t,n)=>{"use strict";n.d(t,{Z:()=>on});var r=n(5057),o=n(77650),i=n(56666);function a(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 l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=n(7896),c=n(21371),u=n(2867),d=n(59740),h=n(86522);var f=n(53627);const p=Math.min,g=Math.max,m=Math.round,v=Math.floor,w=e=>({x:e,y:e});function b(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function y(e){return C(e)?(e.nodeName||"").toLowerCase():"#document"}function x(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function k(e){var t;return null==(t=(C(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function C(e){return e instanceof Node||e instanceof x(e).Node}function S(e){return e instanceof Element||e instanceof x(e).Element}function M(e){return e instanceof HTMLElement||e instanceof x(e).HTMLElement}function R(e){return"undefined"!==typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof x(e).ShadowRoot)}function E(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=T(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function I(){return!("undefined"===typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function O(e){return["html","body","#document"].includes(y(e))}function T(e){return x(e).getComputedStyle(e)}function P(e){if("html"===y(e))return e;const t=e.assignedSlot||e.parentNode||R(e)&&e.host||k(e);return R(t)?t.host:t}function D(e){const t=P(e);return O(t)?e.ownerDocument?e.ownerDocument.body:e.body:M(t)&&E(t)?t:D(t)}function H(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=D(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=x(o);return i?t.concat(a,a.visualViewport||[],E(o)?o:[],a.frameElement&&n?H(a.frameElement):[]):t.concat(o,H(o,[],n))}function z(e){const t=T(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=M(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=m(n)!==i||m(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function L(e){return S(e)?e:e.contextElement}function F(e){const t=L(e);if(!M(t))return w(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=z(t);let a=(i?m(n.width):n.width)/r,l=(i?m(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const A=w(0);function V(e){const t=x(e);return I()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:A}function _(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=L(e);let a=w(1);t&&(r?S(r)&&(a=F(r)):a=F(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==x(e))&&t}(i,n,r)?V(i):w(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=x(i),t=r&&S(r)?x(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=F(n),t=n.getBoundingClientRect(),r=T(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=o,c+=i,n=x(n).frameElement}}return b({width:u,height:d,x:s,y:c})}function N(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"===typeof ResizeObserver,layoutShift:l="function"===typeof IntersectionObserver,animationFrame:s=!1}=r,c=L(e),u=o||i?[...c?H(c):[],...H(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&l?function(e,t){let n,r=null;const o=k(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const{left:c,top:u,width:d,height:h}=e.getBoundingClientRect();if(l||t(),!d||!h)return;const f={rootMargin:-v(u)+"px "+-v(o.clientWidth-(c+d))+"px "+-v(o.clientHeight-(u+h))+"px "+-v(c)+"px",threshold:g(0,p(1,s))||1};let m=!0;function w(e){const t=e[0].intersectionRatio;if(t!==s){if(!m)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}m=!1}try{r=new IntersectionObserver(w,{...f,root:o.ownerDocument})}catch(b){r=new IntersectionObserver(w,f)}r.observe(e)}(!0),i}(c,n):null;let h,f=-1,m=null;a&&(m=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{m&&m.observe(t)}))),n()})),c&&!s&&m.observe(c),m.observe(t));let w=s?_(e):null;return s&&function t(){const r=_(e);!w||r.x===w.x&&r.y===w.y&&r.width===w.width&&r.height===w.height||n();w=r,h=requestAnimationFrame(t)}(),n(),()=>{u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),d&&d(),m&&m.disconnect(),m=null,s&&cancelAnimationFrame(h)}}const $=r.useLayoutEffect;var B=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],W=function(){};function Z(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function j(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(Z(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var U=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===(0,h.Z)(e)&&null!==e?[e]:[];var t},X=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,l({},(0,d.Z)(e,B))},G=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(null!==n&&void 0!==n?n:{},i(t,e),a)}};function Y(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function K(e){return Y(e)?window.pageYOffset:e.scrollTop}function q(e,t){Y(e)?window.scrollTo(0,t):e.scrollTop=t}function Q(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:W,o=K(e),i=t-o,a=0;!function t(){var l,s=i*((l=(l=a+=10)/n-1)*l*l+1)+o;q(e,s),a<n?window.requestAnimationFrame(t):r(e)}()}function J(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?q(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&q(e,Math.max(t.offsetTop-o,0))}function ee(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var te=!1,ne={get passive(){return te=!0}},re="undefined"!==typeof window?window:{};re.addEventListener&&re.removeEventListener&&(re.addEventListener("p",W,ne),re.removeEventListener("p",W,!1));var oe=te;function ie(e){return null!=e}function ae(e,t,n){return e?t:n}var le=["children","innerProps"],se=["children","innerProps"];function ce(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,l=e.controlHeight,s=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=s.getBoundingClientRect().height,h=n.getBoundingClientRect(),f=h.bottom,p=h.height,g=h.top,m=n.offsetParent.getBoundingClientRect().top,v=a?window.innerHeight:Y(u=s)?window.innerHeight:u.clientHeight,w=K(s),b=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),x=m-y,k=v-g,C=x+w,S=d-w-g,M=f-v+w+b,R=w+g-y,E=160;switch(o){case"auto":case"bottom":if(k>=p)return{placement:"bottom",maxHeight:t};if(S>=p&&!a)return i&&Q(s,M,E),{placement:"bottom",maxHeight:t};if(!a&&S>=r||a&&k>=r)return i&&Q(s,M,E),{placement:"bottom",maxHeight:a?k-b:S-b};if("auto"===o||a){var I=t,O=a?x:C;return O>=r&&(I=Math.min(O-b-l,t)),{placement:"top",maxHeight:I}}if("bottom"===o)return i&&q(s,M),{placement:"bottom",maxHeight:t};break;case"top":if(x>=p)return{placement:"top",maxHeight:t};if(C>=p&&!a)return i&&Q(s,R,E),{placement:"top",maxHeight:t};if(!a&&C>=r||a&&x>=r){var T=t;return(!a&&C>=r||a&&x>=r)&&(T=a?x-y:C-y),i&&Q(s,R,E),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var ue,de=function(e){return"auto"===e?"bottom":e},he=(0,r.createContext)(null),fe=function(e){var t=e.children,n=e.minMenuHeight,o=e.maxMenuHeight,i=e.menuPlacement,a=e.menuPosition,s=e.menuShouldScrollIntoView,c=e.theme,d=((0,r.useContext)(he)||{}).setPortalPlacement,h=(0,r.useRef)(null),f=(0,r.useState)(o),p=(0,u.Z)(f,2),g=p[0],m=p[1],v=(0,r.useState)(null),w=(0,u.Z)(v,2),b=w[0],y=w[1],x=c.spacing.controlHeight;return $((function(){var e=h.current;if(e){var t="fixed"===a,r=ce({maxHeight:o,menuEl:e,minHeight:n,placement:i,shouldScroll:s&&!t,isFixedPosition:t,controlHeight:x});m(r.maxHeight),y(r.placement),null===d||void 0===d||d(r.placement)}}),[o,i,a,s,n,d,x]),t({ref:h,placerProps:l(l({},e),{},{placement:b||de(i),maxHeight:g})})},pe=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return(0,c.tZ)("div",(0,s.Z)({},G(e,"menu",{menu:!0}),{ref:n},r),t)},ge=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return l({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},me=ge,ve=ge,we=["size"],be=["innerProps","isRtl","size"];var ye,xe,ke={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Ce=function(e){var t=e.size,n=(0,d.Z)(e,we);return(0,c.tZ)("svg",(0,s.Z)({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:ke},n))},Se=function(e){return(0,c.tZ)(Ce,(0,s.Z)({size:20},e),(0,c.tZ)("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Me=function(e){return(0,c.tZ)(Ce,(0,s.Z)({size:20},e),(0,c.tZ)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Re=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return l({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},Ee=Re,Ie=Re,Oe=(0,c.F4)(ue||(ye=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],xe||(xe=ye.slice(0)),ue=Object.freeze(Object.defineProperties(ye,{raw:{value:Object.freeze(xe)}})))),Te=function(e){var t=e.delay,n=e.offset;return(0,c.tZ)("span",{css:(0,c.iv)({animation:"".concat(Oe," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","","","")})},Pe=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return(0,c.tZ)("div",(0,s.Z)({ref:o},G(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},De=["data"],He=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,l=e.innerProps,u=e.label,d=e.theme,h=e.selectProps;return(0,c.tZ)("div",(0,s.Z)({},G(e,"group",{group:!0}),l),(0,c.tZ)(i,(0,s.Z)({},a,{selectProps:h,theme:d,getStyles:r,getClassNames:o,cx:n}),u),(0,c.tZ)("div",null,t))},ze=["innerRef","isDisabled","isHidden","inputClassName"],Le={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Fe={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":l({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Le)},Ae=function(e){return l({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Le)},Ve=function(e){var t=e.children,n=e.innerProps;return(0,c.tZ)("div",n,t)};var _e=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,u=n.Container,d=n.Label,h=n.Remove;return(0,c.tZ)(u,{data:r,innerProps:l(l({},G(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},(0,c.tZ)(d,{data:r,innerProps:l({},G(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),(0,c.tZ)(h,{data:r,innerProps:l(l({},G(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},Ne={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return(0,c.tZ)("div",(0,s.Z)({},G(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||(0,c.tZ)(Se,null))},Control:Pe,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return(0,c.tZ)("div",(0,s.Z)({},G(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||(0,c.tZ)(Me,null))},DownChevron:Me,CrossIcon:Se,Group:He,GroupHeading:function(e){var t=X(e);t.data;var n=(0,d.Z)(t,De);return(0,c.tZ)("div",(0,s.Z)({},G(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return(0,c.tZ)("div",(0,s.Z)({},G(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return(0,c.tZ)("span",(0,s.Z)({},t,G(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=X(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,l=r.inputClassName,u=(0,d.Z)(r,ze);return(0,c.tZ)("div",(0,s.Z)({},G(e,"input",{"input-container":!0}),{"data-value":n||""}),(0,c.tZ)("input",(0,s.Z)({className:t({input:!0},l),ref:o,style:Ae(a),disabled:i},u)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=(0,d.Z)(e,be);return(0,c.tZ)("div",(0,s.Z)({},G(l(l({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),(0,c.tZ)(Te,{delay:0,offset:n}),(0,c.tZ)(Te,{delay:160,offset:!0}),(0,c.tZ)(Te,{delay:320,offset:!n}))},Menu:pe,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return(0,c.tZ)("div",(0,s.Z)({},G(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,o=e.controlElement,i=e.innerProps,a=e.menuPlacement,d=e.menuPosition,h=(0,r.useRef)(null),p=(0,r.useRef)(null),g=(0,r.useState)(de(a)),m=(0,u.Z)(g,2),v=m[0],w=m[1],b=(0,r.useMemo)((function(){return{setPortalPlacement:w}}),[]),y=(0,r.useState)(null),x=(0,u.Z)(y,2),k=x[0],C=x[1],S=(0,r.useCallback)((function(){if(o){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(o),t="fixed"===d?0:window.pageYOffset,n=e[v]+t;n===(null===k||void 0===k?void 0:k.offset)&&e.left===(null===k||void 0===k?void 0:k.rect.left)&&e.width===(null===k||void 0===k?void 0:k.rect.width)||C({offset:n,rect:e})}}),[o,d,v,null===k||void 0===k?void 0:k.offset,null===k||void 0===k?void 0:k.rect.left,null===k||void 0===k?void 0:k.rect.width]);$((function(){S()}),[S]);var M=(0,r.useCallback)((function(){"function"===typeof p.current&&(p.current(),p.current=null),o&&h.current&&(p.current=N(o,h.current,S,{elementResize:"ResizeObserver"in window}))}),[o,S]);$((function(){M()}),[M]);var R=(0,r.useCallback)((function(e){h.current=e,M()}),[M]);if(!t&&"fixed"!==d||!k)return null;var E=(0,c.tZ)("div",(0,s.Z)({ref:R},G(l(l({},e),{},{offset:k.offset,position:d,rect:k.rect}),"menuPortal",{"menu-portal":!0}),i),n);return(0,c.tZ)(he.Provider,{value:b},t?(0,f.createPortal)(E,t):E)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=(0,d.Z)(e,se);return(0,c.tZ)("div",(0,s.Z)({},G(l(l({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=(0,d.Z)(e,le);return(0,c.tZ)("div",(0,s.Z)({},G(l(l({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:_e,MultiValueContainer:Ve,MultiValueLabel:Ve,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return(0,c.tZ)("div",(0,s.Z)({role:"button"},n),t||(0,c.tZ)(Se,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return(0,c.tZ)("div",(0,s.Z)({},G(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return(0,c.tZ)("div",(0,s.Z)({},G(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return(0,c.tZ)("div",(0,s.Z)({},G(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return(0,c.tZ)("div",(0,s.Z)({},G(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return(0,c.tZ)("div",(0,s.Z)({},G(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},$e=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];var Be=n(9249),We=n(87371),Ze=n(45754),je=n(75181),Ue=n(38777),Xe=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function Ge(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||Xe(r)&&Xe(o)))return!1;var r,o;return!0}for(var Ye={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Ke=function(e){return(0,c.tZ)("span",(0,s.Z)({css:Ye},e))},qe={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,l=e.isDisabled,s=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=l?" disabled":"",h="".concat(s?" selected":"").concat(d);return"".concat(i).concat(h,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Qe=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,i=e.focusableOptions,a=e.isFocused,s=e.selectValue,u=e.selectProps,d=e.id,h=e.isAppleDevice,f=u.ariaLiveMessages,p=u.getOptionLabel,g=u.inputValue,m=u.isMulti,v=u.isOptionDisabled,w=u.isSearchable,b=u.menuIsOpen,y=u.options,x=u.screenReaderStatus,k=u.tabSelectsValue,C=u.isLoading,S=u["aria-label"],M=u["aria-live"],R=(0,r.useMemo)((function(){return l(l({},qe),f||{})}),[f]),E=(0,r.useMemo)((function(){var e,n="";if(t&&R.onChange){var r=t.option,o=t.options,i=t.removedValue,a=t.removedValues,c=t.value,u=i||r||(e=c,Array.isArray(e)?null:e),d=u?p(u):"",h=o||a||void 0,f=h?h.map(p):[],g=l({isDisabled:u&&v(u,s),label:d,labels:f},t);n=R.onChange(g)}return n}),[t,R,v,s,p]),I=(0,r.useMemo)((function(){var e="",t=n||o,r=!!(n&&s&&s.includes(n));if(t&&R.onFocus){var a={focused:t,label:p(t),isDisabled:v(t,s),isSelected:r,options:i,context:t===n?"menu":"value",selectValue:s,isAppleDevice:h};e=R.onFocus(a)}return e}),[n,o,p,v,R,i,s,h]),O=(0,r.useMemo)((function(){var e="";if(b&&y.length&&!C&&R.onFilter){var t=x({count:i.length});e=R.onFilter({inputValue:g,resultsMessage:t})}return e}),[i,g,b,R,y,x,C]),T="initial-input-focus"===(null===t||void 0===t?void 0:t.action),P=(0,r.useMemo)((function(){var e="";if(R.guidance){var t=o?"value":b?"menu":"input";e=R.guidance({"aria-label":S,context:t,isDisabled:n&&v(n,s),isMulti:m,isSearchable:w,tabSelectsValue:k,isInitialFocus:T})}return e}),[S,n,o,m,v,w,b,R,s,k,T]),D=(0,c.tZ)(r.Fragment,null,(0,c.tZ)("span",{id:"aria-selection"},E),(0,c.tZ)("span",{id:"aria-focused"},I),(0,c.tZ)("span",{id:"aria-results"},O),(0,c.tZ)("span",{id:"aria-guidance"},P));return(0,c.tZ)(r.Fragment,null,(0,c.tZ)(Ke,{id:d},T&&D),(0,c.tZ)(Ke,{"aria-live":M,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!T&&D))},Je=[{base:"A",letters:"A\u24b6\uff21\xc0\xc1\xc2\u1ea6\u1ea4\u1eaa\u1ea8\xc3\u0100\u0102\u1eb0\u1eae\u1eb4\u1eb2\u0226\u01e0\xc4\u01de\u1ea2\xc5\u01fa\u01cd\u0200\u0202\u1ea0\u1eac\u1eb6\u1e00\u0104\u023a\u2c6f"},{base:"AA",letters:"\ua732"},{base:"AE",letters:"\xc6\u01fc\u01e2"},{base:"AO",letters:"\ua734"},{base:"AU",letters:"\ua736"},{base:"AV",letters:"\ua738\ua73a"},{base:"AY",letters:"\ua73c"},{base:"B",letters:"B\u24b7\uff22\u1e02\u1e04\u1e06\u0243\u0182\u0181"},{base:"C",letters:"C\u24b8\uff23\u0106\u0108\u010a\u010c\xc7\u1e08\u0187\u023b\ua73e"},{base:"D",letters:"D\u24b9\uff24\u1e0a\u010e\u1e0c\u1e10\u1e12\u1e0e\u0110\u018b\u018a\u0189\ua779"},{base:"DZ",letters:"\u01f1\u01c4"},{base:"Dz",letters:"\u01f2\u01c5"},{base:"E",letters:"E\u24ba\uff25\xc8\xc9\xca\u1ec0\u1ebe\u1ec4\u1ec2\u1ebc\u0112\u1e14\u1e16\u0114\u0116\xcb\u1eba\u011a\u0204\u0206\u1eb8\u1ec6\u0228\u1e1c\u0118\u1e18\u1e1a\u0190\u018e"},{base:"F",letters:"F\u24bb\uff26\u1e1e\u0191\ua77b"},{base:"G",letters:"G\u24bc\uff27\u01f4\u011c\u1e20\u011e\u0120\u01e6\u0122\u01e4\u0193\ua7a0\ua77d\ua77e"},{base:"H",letters:"H\u24bd\uff28\u0124\u1e22\u1e26\u021e\u1e24\u1e28\u1e2a\u0126\u2c67\u2c75\ua78d"},{base:"I",letters:"I\u24be\uff29\xcc\xcd\xce\u0128\u012a\u012c\u0130\xcf\u1e2e\u1ec8\u01cf\u0208\u020a\u1eca\u012e\u1e2c\u0197"},{base:"J",letters:"J\u24bf\uff2a\u0134\u0248"},{base:"K",letters:"K\u24c0\uff2b\u1e30\u01e8\u1e32\u0136\u1e34\u0198\u2c69\ua740\ua742\ua744\ua7a2"},{base:"L",letters:"L\u24c1\uff2c\u013f\u0139\u013d\u1e36\u1e38\u013b\u1e3c\u1e3a\u0141\u023d\u2c62\u2c60\ua748\ua746\ua780"},{base:"LJ",letters:"\u01c7"},{base:"Lj",letters:"\u01c8"},{base:"M",letters:"M\u24c2\uff2d\u1e3e\u1e40\u1e42\u2c6e\u019c"},{base:"N",letters:"N\u24c3\uff2e\u01f8\u0143\xd1\u1e44\u0147\u1e46\u0145\u1e4a\u1e48\u0220\u019d\ua790\ua7a4"},{base:"NJ",letters:"\u01ca"},{base:"Nj",letters:"\u01cb"},{base:"O",letters:"O\u24c4\uff2f\xd2\xd3\xd4\u1ed2\u1ed0\u1ed6\u1ed4\xd5\u1e4c\u022c\u1e4e\u014c\u1e50\u1e52\u014e\u022e\u0230\xd6\u022a\u1ece\u0150\u01d1\u020c\u020e\u01a0\u1edc\u1eda\u1ee0\u1ede\u1ee2\u1ecc\u1ed8\u01ea\u01ec\xd8\u01fe\u0186\u019f\ua74a\ua74c"},{base:"OI",letters:"\u01a2"},{base:"OO",letters:"\ua74e"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24c5\uff30\u1e54\u1e56\u01a4\u2c63\ua750\ua752\ua754"},{base:"Q",letters:"Q\u24c6\uff31\ua756\ua758\u024a"},{base:"R",letters:"R\u24c7\uff32\u0154\u1e58\u0158\u0210\u0212\u1e5a\u1e5c\u0156\u1e5e\u024c\u2c64\ua75a\ua7a6\ua782"},{base:"S",letters:"S\u24c8\uff33\u1e9e\u015a\u1e64\u015c\u1e60\u0160\u1e66\u1e62\u1e68\u0218\u015e\u2c7e\ua7a8\ua784"},{base:"T",letters:"T\u24c9\uff34\u1e6a\u0164\u1e6c\u021a\u0162\u1e70\u1e6e\u0166\u01ac\u01ae\u023e\ua786"},{base:"TZ",letters:"\ua728"},{base:"U",letters:"U\u24ca\uff35\xd9\xda\xdb\u0168\u1e78\u016a\u1e7a\u016c\xdc\u01db\u01d7\u01d5\u01d9\u1ee6\u016e\u0170\u01d3\u0214\u0216\u01af\u1eea\u1ee8\u1eee\u1eec\u1ef0\u1ee4\u1e72\u0172\u1e76\u1e74\u0244"},{base:"V",letters:"V\u24cb\uff36\u1e7c\u1e7e\u01b2\ua75e\u0245"},{base:"VY",letters:"\ua760"},{base:"W",letters:"W\u24cc\uff37\u1e80\u1e82\u0174\u1e86\u1e84\u1e88\u2c72"},{base:"X",letters:"X\u24cd\uff38\u1e8a\u1e8c"},{base:"Y",letters:"Y\u24ce\uff39\u1ef2\xdd\u0176\u1ef8\u0232\u1e8e\u0178\u1ef6\u1ef4\u01b3\u024e\u1efe"},{base:"Z",letters:"Z\u24cf\uff3a\u0179\u1e90\u017b\u017d\u1e92\u1e94\u01b5\u0224\u2c7f\u2c6b\ua762"},{base:"a",letters:"a\u24d0\uff41\u1e9a\xe0\xe1\xe2\u1ea7\u1ea5\u1eab\u1ea9\xe3\u0101\u0103\u1eb1\u1eaf\u1eb5\u1eb3\u0227\u01e1\xe4\u01df\u1ea3\xe5\u01fb\u01ce\u0201\u0203\u1ea1\u1ead\u1eb7\u1e01\u0105\u2c65\u0250"},{base:"aa",letters:"\ua733"},{base:"ae",letters:"\xe6\u01fd\u01e3"},{base:"ao",letters:"\ua735"},{base:"au",letters:"\ua737"},{base:"av",letters:"\ua739\ua73b"},{base:"ay",letters:"\ua73d"},{base:"b",letters:"b\u24d1\uff42\u1e03\u1e05\u1e07\u0180\u0183\u0253"},{base:"c",letters:"c\u24d2\uff43\u0107\u0109\u010b\u010d\xe7\u1e09\u0188\u023c\ua73f\u2184"},{base:"d",letters:"d\u24d3\uff44\u1e0b\u010f\u1e0d\u1e11\u1e13\u1e0f\u0111\u018c\u0256\u0257\ua77a"},{base:"dz",letters:"\u01f3\u01c6"},{base:"e",letters:"e\u24d4\uff45\xe8\xe9\xea\u1ec1\u1ebf\u1ec5\u1ec3\u1ebd\u0113\u1e15\u1e17\u0115\u0117\xeb\u1ebb\u011b\u0205\u0207\u1eb9\u1ec7\u0229\u1e1d\u0119\u1e19\u1e1b\u0247\u025b\u01dd"},{base:"f",letters:"f\u24d5\uff46\u1e1f\u0192\ua77c"},{base:"g",letters:"g\u24d6\uff47\u01f5\u011d\u1e21\u011f\u0121\u01e7\u0123\u01e5\u0260\ua7a1\u1d79\ua77f"},{base:"h",letters:"h\u24d7\uff48\u0125\u1e23\u1e27\u021f\u1e25\u1e29\u1e2b\u1e96\u0127\u2c68\u2c76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24d8\uff49\xec\xed\xee\u0129\u012b\u012d\xef\u1e2f\u1ec9\u01d0\u0209\u020b\u1ecb\u012f\u1e2d\u0268\u0131"},{base:"j",letters:"j\u24d9\uff4a\u0135\u01f0\u0249"},{base:"k",letters:"k\u24da\uff4b\u1e31\u01e9\u1e33\u0137\u1e35\u0199\u2c6a\ua741\ua743\ua745\ua7a3"},{base:"l",letters:"l\u24db\uff4c\u0140\u013a\u013e\u1e37\u1e39\u013c\u1e3d\u1e3b\u017f\u0142\u019a\u026b\u2c61\ua749\ua781\ua747"},{base:"lj",letters:"\u01c9"},{base:"m",letters:"m\u24dc\uff4d\u1e3f\u1e41\u1e43\u0271\u026f"},{base:"n",letters:"n\u24dd\uff4e\u01f9\u0144\xf1\u1e45\u0148\u1e47\u0146\u1e4b\u1e49\u019e\u0272\u0149\ua791\ua7a5"},{base:"nj",letters:"\u01cc"},{base:"o",letters:"o\u24de\uff4f\xf2\xf3\xf4\u1ed3\u1ed1\u1ed7\u1ed5\xf5\u1e4d\u022d\u1e4f\u014d\u1e51\u1e53\u014f\u022f\u0231\xf6\u022b\u1ecf\u0151\u01d2\u020d\u020f\u01a1\u1edd\u1edb\u1ee1\u1edf\u1ee3\u1ecd\u1ed9\u01eb\u01ed\xf8\u01ff\u0254\ua74b\ua74d\u0275"},{base:"oi",letters:"\u01a3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\ua74f"},{base:"p",letters:"p\u24df\uff50\u1e55\u1e57\u01a5\u1d7d\ua751\ua753\ua755"},{base:"q",letters:"q\u24e0\uff51\u024b\ua757\ua759"},{base:"r",letters:"r\u24e1\uff52\u0155\u1e59\u0159\u0211\u0213\u1e5b\u1e5d\u0157\u1e5f\u024d\u027d\ua75b\ua7a7\ua783"},{base:"s",letters:"s\u24e2\uff53\xdf\u015b\u1e65\u015d\u1e61\u0161\u1e67\u1e63\u1e69\u0219\u015f\u023f\ua7a9\ua785\u1e9b"},{base:"t",letters:"t\u24e3\uff54\u1e6b\u1e97\u0165\u1e6d\u021b\u0163\u1e71\u1e6f\u0167\u01ad\u0288\u2c66\ua787"},{base:"tz",letters:"\ua729"},{base:"u",letters:"u\u24e4\uff55\xf9\xfa\xfb\u0169\u1e79\u016b\u1e7b\u016d\xfc\u01dc\u01d8\u01d6\u01da\u1ee7\u016f\u0171\u01d4\u0215\u0217\u01b0\u1eeb\u1ee9\u1eef\u1eed\u1ef1\u1ee5\u1e73\u0173\u1e77\u1e75\u0289"},{base:"v",letters:"v\u24e5\uff56\u1e7d\u1e7f\u028b\ua75f\u028c"},{base:"vy",letters:"\ua761"},{base:"w",letters:"w\u24e6\uff57\u1e81\u1e83\u0175\u1e87\u1e85\u1e98\u1e89\u2c73"},{base:"x",letters:"x\u24e7\uff58\u1e8b\u1e8d"},{base:"y",letters:"y\u24e8\uff59\u1ef3\xfd\u0177\u1ef9\u0233\u1e8f\xff\u1ef7\u1e99\u1ef5\u01b4\u024f\u1eff"},{base:"z",letters:"z\u24e9\uff5a\u017a\u1e91\u017c\u017e\u1e93\u1e95\u01b6\u0225\u0240\u2c6c\ua763"}],et=new RegExp("["+Je.map((function(e){return e.letters})).join("")+"]","g"),tt={},nt=0;nt<Je.length;nt++)for(var rt=Je[nt],ot=0;ot<rt.letters.length;ot++)tt[rt.letters[ot]]=rt.base;var it=function(e){return e.replace(et,(function(e){return tt[e]}))},at=function(e,t){void 0===t&&(t=Ge);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(it),lt=function(e){return e.replace(/^\s+|\s+$/g,"")},st=function(e){return"".concat(e.label," ").concat(e.value)},ct=["innerRef"];function ut(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter((function(e){var t=(0,u.Z)(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=(0,u.Z)(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}((0,d.Z)(e,ct),"onExited","in","enter","exit","appear");return(0,c.tZ)("input",(0,s.Z)({ref:t},n,{css:(0,c.iv)({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","","","")}))}var dt=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};var ht=["boxSizing","height","overflow","paddingRight","position"],ft={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function pt(e){e.preventDefault()}function gt(e){e.stopPropagation()}function mt(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function vt(){return"ontouchstart"in window||navigator.maxTouchPoints}var wt=!("undefined"===typeof window||!window.document||!window.document.createElement),bt=0,yt={capture:!1,passive:!1};var xt=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},kt={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Ct(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,i=function(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,l=(0,r.useRef)(!1),s=(0,r.useRef)(!1),c=(0,r.useRef)(0),u=(0,r.useRef)(null),d=(0,r.useCallback)((function(e,t){if(null!==u.current){var r=u.current,c=r.scrollTop,d=r.scrollHeight,h=r.clientHeight,f=u.current,p=t>0,g=d-h-c,m=!1;g>t&&l.current&&(o&&o(e),l.current=!1),p&&s.current&&(a&&a(e),s.current=!1),p&&t>g?(n&&!l.current&&n(e),f.scrollTop=d,m=!0,l.current=!0):!p&&-t>c&&(i&&!s.current&&i(e),f.scrollTop=0,m=!0,s.current=!0),m&&dt(e)}}),[n,o,i,a]),h=(0,r.useCallback)((function(e){d(e,e.deltaY)}),[d]),f=(0,r.useCallback)((function(e){c.current=e.changedTouches[0].clientY}),[]),p=(0,r.useCallback)((function(e){var t=c.current-e.changedTouches[0].clientY;d(e,t)}),[d]),g=(0,r.useCallback)((function(e){if(e){var t=!!oe&&{passive:!1};e.addEventListener("wheel",h,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",p,t)}}),[p,f,h]),m=(0,r.useCallback)((function(e){e&&(e.removeEventListener("wheel",h,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",p,!1))}),[p,f,h]);return(0,r.useEffect)((function(){if(t){var e=u.current;return g(e),function(){m(e)}}}),[t,g,m]),function(e){u.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,i=(0,r.useRef)({}),a=(0,r.useRef)(null),l=(0,r.useCallback)((function(e){if(wt){var t=document.body,n=t&&t.style;if(o&&ht.forEach((function(e){var t=n&&n[e];i.current[e]=t})),o&&bt<1){var r=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,l=window.innerWidth-a+r||0;Object.keys(ft).forEach((function(e){var t=ft[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(l,"px"))}t&&vt()&&(t.addEventListener("touchmove",pt,yt),e&&(e.addEventListener("touchstart",mt,yt),e.addEventListener("touchmove",gt,yt))),bt+=1}}),[o]),s=(0,r.useCallback)((function(e){if(wt){var t=document.body,n=t&&t.style;bt=Math.max(bt-1,0),o&&bt<1&&ht.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&vt()&&(t.removeEventListener("touchmove",pt,yt),e&&(e.removeEventListener("touchstart",mt,yt),e.removeEventListener("touchmove",gt,yt)))}}),[o]);return(0,r.useEffect)((function(){if(t){var e=a.current;return l(e),function(){s(e)}}}),[t,l,s]),function(e){a.current=e}}({isEnabled:n});return(0,c.tZ)(r.Fragment,null,n&&(0,c.tZ)("div",{onClick:xt,css:kt}),t((function(e){i(e),a(e)})))}var St={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Mt=function(e){var t=e.name,n=e.onFocus;return(0,c.tZ)("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:St,value:"",onChange:function(){}})};function Rt(e){var t;return"undefined"!==typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Et(){return Rt(/^Mac/i)}function It(){return Rt(/^iPhone/i)||Rt(/^iPad/i)||Et()&&navigator.maxTouchPoints>1}var Ot={clearIndicator:Ie,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return l({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:Ee,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return l({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return l({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return l(l({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},Fe),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return l({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:ve,menu:function(e,t){var n,r=e.placement,o=e.theme,a=o.borderRadius,s=o.spacing,c=o.colors;return l((n={label:"menu"},(0,i.Z)(n,function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),(0,i.Z)(n,"position","absolute"),(0,i.Z)(n,"width","100%"),(0,i.Z)(n,"zIndex",1),n),t?{}:{backgroundColor:c.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return l({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return l({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return l({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return l({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:me,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return l({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return l({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return l({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return l({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}};var Tt,Pt={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Dt={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ee(),captureMenuScroll:!ee(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=l({ignoreCase:!0,ignoreAccents:!0,stringify:st,trim:!0,matchFrom:"any"},Tt),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,c=a?lt(t):t,u=a?lt(i(e)):i(e);return r&&(c=c.toLowerCase(),u=u.toLowerCase()),o&&(c=at(c),u=it(u)),"start"===s?u.substr(0,c.length)===c:u.indexOf(c)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Ht(e,t,n,r){return{type:"option",data:t,isDisabled:$t(e,t,n),isSelected:Bt(e,t,n),label:_t(e,t),value:Nt(e,t),index:r}}function zt(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return Ht(e,n,t,r)})).filter((function(t){return At(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=Ht(e,n,t,r);return At(e,i)?i:void 0})).filter(ie)}function Lt(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,(0,Ue.Z)(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Ft(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,(0,Ue.Z)(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function At(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,l=t.value;return(!Zt(e)||!i)&&Wt(e,{label:a,value:l,data:o},r)}var Vt=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},_t=function(e,t){return e.getOptionLabel(t)},Nt=function(e,t){return e.getOptionValue(t)};function $t(e,t,n){return"function"===typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Bt(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"===typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=Nt(e,t);return n.some((function(t){return Nt(e,t)===r}))}function Wt(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Zt=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},jt=1,Ut=function(e){(0,Ze.Z)(n,e);var t=(0,je.Z)(n);function n(e){var r;if((0,Be.Z)(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=Et()||It(),r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,l=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:l}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,l=o&&r.isOptionSelected(e,a),s=r.isOptionDisabled(e,a);if(l){var c=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(s)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat((0,Ue.Z)(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=ae(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(ae(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=ae(e,o,o[0]||null);r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return Vt(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return Ft(zt(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return j.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return _t(r.props,e)},r.getOptionValue=function(e){return Nt(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=Ot[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,l(l({},Ne),e.components);var e},r.buildCategorizedOptions=function(){return zt(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return Lt(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:l({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if((!e||"mousedown"!==e.type||0===e.button)&&!r.props.isDisabled){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"===typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Y(e.target)&&r.props.onMenuClose():"function"===typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return Zt(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,l=t.isClearable,s=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,h=t.openMenuOnFocus,f=r.state,p=f.focusedOption,g=f.focusedValue,m=f.selectValue;if(!s&&("function"!==typeof u||(u(e),!e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(g)r.removeValue(g);else{if(!o)return;n?r.popValue():l&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!p||h&&r.isOptionSelected(p,m))return;r.selectOption(p);break;case"Enter":if(229===e.keyCode)break;if(c){if(!p)return;if(r.isComposing)return;r.selectOption(p);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):l&&i&&r.clearValue();break;case" ":if(a)return;if(!c){r.openMenu("first");break}if(!p)return;r.selectOption(p);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++jt),r.state.selectValue=U(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=Vt(o,i[a])}return r}return(0,We.Z)(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&J(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(J(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var l=i.indexOf(r[0]);l>-1&&(a=l)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"===typeof this.props.theme?this.props.theme(Pt):l(l({},Pt),this.props.theme):Pt}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,l=this.props,s=l.isMulti,c=l.isRtl,u=l.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:s,isRtl:c,options:u,selectOption:i,selectProps:l,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return $t(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Bt(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Wt(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"===typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,i=e.inputValue,a=e.tabIndex,c=e.form,u=e.menuIsOpen,d=e.required,h=this.getComponents().Input,f=this.state,p=f.inputIsHidden,g=f.ariaSelection,m=this.commonProps,v=o||this.getElementId("input"),w=l(l(l({"aria-autocomplete":"list","aria-expanded":u,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":d,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},u&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null===g||void 0===g?void 0:g.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?r.createElement(h,(0,s.Z)({},m,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:v,innerRef:this.getInputRef,isDisabled:t,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:c,type:"text",value:i},w)):r.createElement(ut,(0,s.Z)({id:v,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:W,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:c,value:""},w))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,l=t.SingleValue,c=t.Placeholder,u=this.commonProps,d=this.props,h=d.controlShouldRenderValue,f=d.isDisabled,p=d.isMulti,g=d.inputValue,m=d.placeholder,v=this.state,w=v.selectValue,b=v.focusedValue,y=v.isFocused;if(!this.hasValue()||!h)return g?null:r.createElement(c,(0,s.Z)({},u,{key:"placeholder",isDisabled:f,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return w.map((function(t,l){var c=t===b,d="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return r.createElement(n,(0,s.Z)({},u,{components:{Container:o,Label:i,Remove:a},isFocused:c,isDisabled:f,key:d,index:l,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(g)return null;var x=w[0];return r.createElement(l,(0,s.Z)({},u,{data:x,isDisabled:f}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||i)return null;var l={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return r.createElement(e,(0,s.Z)({},t,{innerProps:l,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!e||!i)return null;return r.createElement(e,(0,s.Z)({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return r.createElement(n,(0,s.Z)({},o,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return r.createElement(e,(0,s.Z)({},t,{innerProps:i,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,i=t.Menu,a=t.MenuList,l=t.MenuPortal,c=t.LoadingMessage,u=t.NoOptionsMessage,d=t.Option,h=this.commonProps,f=this.state.focusedOption,p=this.props,g=p.captureMenuScroll,m=p.inputValue,v=p.isLoading,w=p.loadingMessage,b=p.minMenuHeight,y=p.maxMenuHeight,x=p.menuIsOpen,k=p.menuPlacement,C=p.menuPosition,S=p.menuPortalTarget,M=p.menuShouldBlockScroll,R=p.menuShouldScrollIntoView,E=p.noOptionsMessage,I=p.onMenuScrollToTop,O=p.onMenuScrollToBottom;if(!x)return null;var T,P=function(t,n){var o=t.type,i=t.data,a=t.isDisabled,l=t.isSelected,c=t.label,u=t.value,p=f===i,g=a?void 0:function(){return e.onOptionHover(i)},m=a?void 0:function(){return e.selectOption(i)},v="".concat(e.getElementId("option"),"-").concat(n),w={id:v,onClick:m,onMouseMove:g,onMouseOver:g,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:l};return r.createElement(d,(0,s.Z)({},h,{innerProps:w,data:i,isDisabled:a,isSelected:l,key:v,label:c,type:o,value:u,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())T=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,a=t.options,l=t.index,c="".concat(e.getElementId("group"),"-").concat(l),u="".concat(c,"-heading");return r.createElement(n,(0,s.Z)({},h,{key:c,data:i,options:a,Heading:o,headingProps:{id:u,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return P(e,"".concat(l,"-").concat(e.index))})))}if("option"===t.type)return P(t,"".concat(t.index))}));else if(v){var D=w({inputValue:m});if(null===D)return null;T=r.createElement(c,h,D)}else{var H=E({inputValue:m});if(null===H)return null;T=r.createElement(u,h,H)}var z={minMenuHeight:b,maxMenuHeight:y,menuPlacement:k,menuPosition:C,menuShouldScrollIntoView:R},L=r.createElement(fe,(0,s.Z)({},h,z),(function(t){var n=t.ref,o=t.placerProps,l=o.placement,c=o.maxHeight;return r.createElement(i,(0,s.Z)({},h,z,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:l}),r.createElement(Ct,{captureEnabled:g,onTopArrive:I,onBottomArrive:O,lockEnabled:M},(function(t){return r.createElement(a,(0,s.Z)({},h,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":h.isMulti,id:e.getElementId("listbox")},isLoading:v,maxHeight:c,focusedOption:f}),T)})))}));return S||"fixed"===C?r.createElement(l,(0,s.Z)({},h,{appendTo:S,controlElement:this.controlRef,menuPlacement:k,menuPosition:C}),L):L}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,i=t.isMulti,a=t.name,l=t.required,s=this.state.selectValue;if(l&&!this.hasValue()&&!o)return r.createElement(Mt,{name:a,onFocus:this.onValueInputFocus});if(a&&!o){if(i){if(n){var c=s.map((function(t){return e.getOptionValue(t)})).join(n);return r.createElement("input",{name:a,type:"hidden",value:c})}var u=s.length>0?s.map((function(t,n){return r.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):r.createElement("input",{name:a,type:"hidden",value:""});return r.createElement("div",null,u)}var d=s[0]?this.getOptionValue(s[0]):"";return r.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,i=t.focusedValue,a=t.isFocused,l=t.selectValue,c=this.getFocusableOptions();return r.createElement(Qe,(0,s.Z)({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:o,focusedValue:i,isFocused:a,selectValue:l,focusableOptions:c,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,i=e.ValueContainer,a=this.props,l=a.className,c=a.id,u=a.isDisabled,d=a.menuIsOpen,h=this.state.isFocused,f=this.commonProps=this.getCommonProps();return r.createElement(o,(0,s.Z)({},f,{className:l,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:h}),this.renderLiveRegion(),r.createElement(t,(0,s.Z)({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:h,menuIsOpen:d}),r.createElement(i,(0,s.Z)({},f,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),r.createElement(n,(0,s.Z)({},f,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,c=t.instancePrefix,u=e.options,d=e.value,h=e.menuIsOpen,f=e.inputValue,p=e.isMulti,g=U(d),m={};if(n&&(d!==n.value||u!==n.options||h!==n.menuIsOpen||f!==n.inputValue)){var v=h?function(e,t){return Lt(zt(e,t))}(e,g):[],w=h?Ft(zt(e,g),"".concat(c,"-option")):[],b=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,g):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,v);m={selectValue:g,focusedOption:y,focusedOptionId:Vt(w,y),focusableOptionsWithIds:w,focusedValue:b,clearFocusValueOnUpdate:!1}}var x=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},k=i,C=a&&s;return a&&!C&&(k={value:ae(p,g,g[0]||null),options:g,action:"initial-input-focus"},C=!s),"initial-input-focus"===(null===i||void 0===i?void 0:i.action)&&(k=null),l(l(l({},m),x),{},{prevProps:e,ariaSelection:k,prevWasFocused:C})}}]),n}(r.Component);Ut.defaultProps=Dt;n(49792);var Xt=(0,r.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,o=e.defaultMenuIsOpen,i=void 0!==o&&o,a=e.defaultValue,s=void 0===a?null:a,c=e.inputValue,h=e.menuIsOpen,f=e.onChange,p=e.onInputChange,g=e.onMenuClose,m=e.onMenuOpen,v=e.value,w=(0,d.Z)(e,$e),b=(0,r.useState)(void 0!==c?c:n),y=(0,u.Z)(b,2),x=y[0],k=y[1],C=(0,r.useState)(void 0!==h?h:i),S=(0,u.Z)(C,2),M=S[0],R=S[1],E=(0,r.useState)(void 0!==v?v:s),I=(0,u.Z)(E,2),O=I[0],T=I[1],P=(0,r.useCallback)((function(e,t){"function"===typeof f&&f(e,t),T(e)}),[f]),D=(0,r.useCallback)((function(e,t){var n;"function"===typeof p&&(n=p(e,t)),k(void 0!==n?n:e)}),[p]),H=(0,r.useCallback)((function(){"function"===typeof m&&m(),R(!0)}),[m]),z=(0,r.useCallback)((function(){"function"===typeof g&&g(),R(!1)}),[g]),L=void 0!==c?c:x,F=void 0!==h?h:M,A=void 0!==v?v:O;return l(l({},w),{},{inputValue:L,menuIsOpen:F,onChange:P,onInputChange:D,onMenuClose:z,onMenuOpen:H,value:A})}(e);return r.createElement(Ut,(0,s.Z)({ref:t},n))})),Gt=Xt,Yt=n(17468),Kt=n(42462),qt=n(43128),Qt=n(40047);const Jt=e=>{const{Menu:t}=Ne,{children:n,...o}=e;return r.createElement(t,{...o},n)},en=(0,o.z)("div")({name:"Wrap",class:"gdg-wghi2zc",propsAsIs:!1}),tn=(0,o.z)("div")({name:"PortalWrap",class:"gdg-p13nj8j0",propsAsIs:!1}),nn=(0,o.z)("div")({name:"ReadOnlyWrap",class:"gdg-r6sia3g",propsAsIs:!1}),rn=e=>{const{value:t,onFinishedEditing:n,initialValue:o}=e,{allowedValues:i,value:a}=t.data,[l,s]=r.useState(a),[c,u]=r.useState(o??""),d=(0,Yt.Fg)(),h=r.useMemo((()=>i.map((e=>"string"===typeof e||null===e||void 0===e?{value:e,label:e?.toString()??""}:e))),[i]);return t.readonly?r.createElement(nn,null,r.createElement(Kt.K,{highlight:!0,autoFocus:!1,disabled:!0,value:l??"",onChange:()=>{}})):r.createElement(en,null,r.createElement(Gt,{className:"glide-select",inputValue:c,onInputChange:u,menuPlacement:"auto",value:h.find((e=>e.value===l)),styles:{control:e=>({...e,border:0,boxShadow:"none"}),option:(e,{isFocused:t})=>({...e,fontSize:d.editorFontSize,fontFamily:d.fontFamily,cursor:t?"pointer":void 0,paddingLeft:d.cellHorizontalPadding,paddingRight:d.cellHorizontalPadding,":active":{...e[":active"],color:d.accentFg},":empty::after":{content:'"&nbsp;"',visibility:"hidden"}})},theme:e=>({...e,colors:{...e.colors,neutral0:d.bgCell,neutral5:d.bgCell,neutral10:d.bgCell,neutral20:d.bgCellMedium,neutral30:d.bgCellMedium,neutral40:d.bgCellMedium,neutral50:d.textLight,neutral60:d.textMedium,neutral70:d.textMedium,neutral80:d.textDark,neutral90:d.textDark,neutral100:d.textDark,primary:d.accentColor,primary75:d.accentColor,primary50:d.accentColor,primary25:d.accentLight}}),menuPortalTarget:document.getElementById("portal"),autoFocus:!0,openMenuOnFocus:!0,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Menu:e=>r.createElement(tn,null,r.createElement(Jt,{className:"click-outside-ignore",...e}))},options:h,onChange:async e=>{null!==e&&(s(e.value),await new Promise((e=>window.requestAnimationFrame(e))),n({...t,data:{...t.data,value:e.value}}))}}))},on={kind:qt.p6.Custom,isMatch:e=>"dropdown-cell"===e.data.kind,draw:(e,t)=>{const{ctx:n,theme:r,rect:o}=e,{value:i}=t.data,a=t.data.allowedValues.find((e=>"string"===typeof e||null===e||void 0===e?e===i:e.value===i)),l="string"===typeof a?a:a?.label??"";return l&&(n.fillStyle=r.textDark,n.fillText(l,o.x+r.cellHorizontalPadding,o.y+o.height/2+(0,Qt.aX)(n,r))),!0},measure:(e,t,n)=>{const{value:r}=t.data;return(r?e.measureText(r).width:0)+2*n.cellHorizontalPadding},provideEditor:()=>({editor:rn,disablePadding:!0,deletedValue:e=>({...e,copyData:"",data:{...e.data,value:""}})}),onPaste:(e,t)=>({...t,value:t.allowedValues.includes(e)?e:t.value})}},74625:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(43128),o=n(40047),i=n(5057);function a(e,t,n,r,o,i){r<=0||o<=0||("number"===typeof i&&i<=0?e.rect(t,n,r,o):("number"===typeof i&&(i={tl:i,tr:i,br:i,bl:i}),(i={tl:Math.min(i.tl,o/2,r/2),tr:Math.min(i.tr,o/2,r/2),bl:Math.min(i.bl,o/2,r/2),br:Math.min(i.br,o/2,r/2)}).tl=Math.max(0,i.tl),i.tr=Math.max(0,i.tr),i.br=Math.max(0,i.br),i.bl=Math.max(0,i.bl),e.moveTo(t+i.tl,n),e.arcTo(t+r,n,t+r,n+i.tr,i.tr),e.arcTo(t+r,n+o,t+r-i.br,n+o,i.br),e.arcTo(t,n+o,t,n+o-i.bl,i.bl),e.arcTo(t,n,t+i.tl,n,i.tl)))}const l={marginRight:8},s={display:"flex",alignItems:"center",flexGrow:1},c={kind:r.p6.Custom,isMatch:e=>"range-cell"===e.data.kind,draw:(e,t)=>{const{ctx:n,theme:r,rect:i}=e,{min:l,max:s,value:c,label:u,measureLabel:d}=t.data,h=i.x+r.cellHorizontalPadding,f=i.y+i.height/2,p=(c-l)/(s-l);n.save();let g=0;void 0!==u&&(n.font=`12px ${r.fontFamily}`,g=(0,o.P7)(d??u,n,`12px ${r.fontFamily}`).width+r.cellHorizontalPadding);const m=i.width-2*r.cellHorizontalPadding-g;if(m>=6){const e=n.createLinearGradient(h,f,h+m,f);e.addColorStop(0,r.accentColor),e.addColorStop(p,r.accentColor),e.addColorStop(p,r.bgBubble),e.addColorStop(1,r.bgBubble),n.beginPath(),n.fillStyle=e,a(n,h,f-3,m,6,3),n.fill(),n.beginPath(),a(n,h+.5,f-3+.5,m-1,5,2.5),n.strokeStyle=r.accentLight,n.lineWidth=1,n.stroke()}return void 0!==u&&(n.textAlign="right",n.fillStyle=r.textDark,n.fillText(u,i.x+i.width-r.cellHorizontalPadding,f+(0,o.aX)(n,`12px ${r.fontFamily}`))),n.restore(),!0},provideEditor:()=>e=>{const{data:t,readonly:n}=e.value,r=t.value.toString(),o=t.min.toString(),a=t.max.toString(),c=t.step.toString();return i.createElement("label",{style:s},i.createElement("input",{style:l,type:"range",value:r,min:o,max:a,step:c,onChange:n=>{e.onChange({...e.value,data:{...t,value:Number(n.target.value)}})},disabled:n}),r)},onPaste:(e,t)=>{let n=Number.parseFloat(e);return n=Number.isNaN(n)?t.value:Math.max(t.min,Math.min(t.max,n)),{...t,value:n}}}},35185:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(43128),o=n(21581);const i={kind:r.p6.Custom,isMatch:e=>"sparkline-cell"===e.data.kind,needsHover:!0,needsHoverPosition:!0,draw:(e,t)=>{const{ctx:n,theme:r,rect:i,hoverAmount:a,hoverX:l}=e;let{values:s,yAxis:c,color:u,graphKind:d="area",displayValues:h,hideAxis:f}=t.data;const[p,g]=c;if(0===s.length)return!0;s=s.map((e=>Math.min(1,Math.max(0,(e-p)/(g-p)))));const m=r.cellHorizontalPadding,v=m+i.x,w=i.y+3,b=i.height-6,y=i.width-2*m,x=g<=0?w:p>=0?w+b:w+b*(g/(g-p));if(!f&&p<=0&&g>=0&&(n.beginPath(),n.moveTo(v,x),n.lineTo(v+y,x),n.globalAlpha=.4,n.lineWidth=1,n.strokeStyle=r.textLight,n.stroke(),n.globalAlpha=1),"bar"===d){n.beginPath();const e=2,o=(y-(s.length-1)*e)/s.length;let i=v;for(const t of s){const r=w+b-t*b;n.moveTo(i,x),n.lineTo(i+o,x),n.lineTo(i+o,r),n.lineTo(i,r),i+=o+e}n.fillStyle=t.data.color??r.accentColor,n.fill()}else{1===s.length&&(s=[s[0],s[0]],h&&(h=[h[0],h[0]])),n.beginPath();const e=(i.width-16)/(s.length-1),t=s.map(((t,n)=>({x:v+e*n,y:w+b-t*b})));n.moveTo(t[0].x,t[0].y);let c=0;if(t.length>2)for(c=1;c<t.length-2;c++){const e=(t[c].x+t[c+1].x)/2,r=(t[c].y+t[c+1].y)/2;n.quadraticCurveTo(t[c].x,t[c].y,e,r)}if(n.quadraticCurveTo(t[c].x,t[c].y,t[c+1].x,t[c+1].y),n.strokeStyle=u??r.accentColor,n.lineWidth=1+.5*a,n.stroke(),n.lineTo(i.x+i.width-m,x),n.lineTo(i.x+m,x),n.closePath(),"area"===d){n.globalAlpha=.2+.2*a;const e=n.createLinearGradient(0,w,0,w+1.4*b);e.addColorStop(0,u??r.accentColor);const[t,i,l]=(0,o.dF)(u??r.accentColor);e.addColorStop(1,`rgba(${t}, ${i}, ${l}, 0)`),n.fillStyle=e,n.fill(),n.globalAlpha=1}if(void 0!==l&&("line"===d||"area"===d)&&void 0!==h){n.beginPath();const t=Math.min(s.length-1,Math.max(0,Math.round((l-m)/e)));n.moveTo(v+t*e,i.y+1),n.lineTo(v+t*e,i.y+i.height),n.lineWidth=1,n.strokeStyle=r.textLight,n.stroke(),n.save(),n.font=`8px ${r.fontFamily}`,n.fillStyle=r.textMedium,n.textBaseline="top",n.fillText(h[t],v,i.y+r.cellVerticalPadding),n.restore()}}return!0},provideEditor:()=>{},onPaste:(e,t)=>t}},71325:(e,t,n)=>{"use strict";n.d(t,{fF:()=>s});var r=n(43128),o=n(66904),i=n(5057);function a(e){switch(e.kind){case r.p6.Number:case r.p6.Boolean:return e.data?.toString()??"";case r.p6.Markdown:case r.p6.RowID:case r.p6.Text:case r.p6.Uri:return e.data??"";case r.p6.Bubble:case r.p6.Image:return e.data.join("");case r.p6.Drilldown:return e.data.map((e=>e.text)).join("");case r.p6.Protected:case r.p6.Loading:return"";case r.p6.Custom:return e.copyData}}function l(e){if("number"===typeof e)return e;if(e.length>0){const t=Number(e);isNaN(t)||(e=t)}return e}function s(e){const{sort:t,rows:n,getCellContent:r}=e;let s=void 0===t?void 0:e.columns.findIndex((e=>t.column===e||void 0!==e.id&&t.column.id===e.id));-1===s&&(s=void 0);const c=t?.direction??"asc",u=i.useMemo((()=>{if(void 0===s)return;const e=new Array(n),i=[s,0];for(let t=0;t<n;t++)i[1]=t,e[t]=a(r(i));let u;return u="raw"===t?.mode?o(n).sort(((t,n)=>function(e,t){return e>t?1:e===t?0:-1}(e[t],e[n]))):"smart"===t?.mode?o(n).sort(((t,n)=>function(e,t){return e=l(e),t=l(t),"string"===typeof e&&"string"===typeof t?e.localeCompare(t):"number"===typeof e&&"number"===typeof t?e===t?0:e>t?1:-1:e==t?0:e>t?1:-1}(e[t],e[n]))):o(n).sort(((t,n)=>e[t].localeCompare(e[n]))),"desc"===c&&u.reverse(),u}),[r,n,t?.mode,c,s]),d=i.useCallback((e=>void 0===u?e:u[e]),[u]),h=i.useCallback((([e,t])=>(void 0===u||(t=u[t]),r([e,t]))),[r,u]);return void 0===u?{getCellContent:e.getCellContent,getOriginalIndex:d}:{getOriginalIndex:d,getCellContent:h}}},17468:(e,t,n)=>{"use strict";n.d(t,{Fg:()=>c,Ni:()=>s,Zu:()=>l,be:()=>i,yR:()=>u});var r=n(5057),o=n(21581);function i(e){return{"--gdg-accent-color":e.accentColor,"--gdg-accent-fg":e.accentFg,"--gdg-accent-light":e.accentLight,"--gdg-text-dark":e.textDark,"--gdg-text-medium":e.textMedium,"--gdg-text-light":e.textLight,"--gdg-text-bubble":e.textBubble,"--gdg-bg-icon-header":e.bgIconHeader,"--gdg-fg-icon-header":e.fgIconHeader,"--gdg-text-header":e.textHeader,"--gdg-text-group-header":e.textGroupHeader??e.textHeader,"--gdg-text-header-selected":e.textHeaderSelected,"--gdg-bg-cell":e.bgCell,"--gdg-bg-cell-medium":e.bgCellMedium,"--gdg-bg-header":e.bgHeader,"--gdg-bg-header-has-focus":e.bgHeaderHasFocus,"--gdg-bg-header-hovered":e.bgHeaderHovered,"--gdg-bg-bubble":e.bgBubble,"--gdg-bg-bubble-selected":e.bgBubbleSelected,"--gdg-bg-search-result":e.bgSearchResult,"--gdg-border-color":e.borderColor,"--gdg-horizontal-border-color":e.horizontalBorderColor??e.borderColor,"--gdg-drilldown-border":e.drilldownBorder,"--gdg-link-color":e.linkColor,"--gdg-cell-horizontal-padding":`${e.cellHorizontalPadding}px`,"--gdg-cell-vertical-padding":`${e.cellVerticalPadding}px`,"--gdg-header-font-style":e.headerFontStyle,"--gdg-base-font-style":e.baseFontStyle,"--gdg-marker-font-style":e.markerFontStyle,"--gdg-font-family":e.fontFamily,"--gdg-editor-font-size":e.editorFontSize,...void 0===e.resizeIndicatorColor?{}:{"--gdg-resize-indicator-color":e.resizeIndicatorColor},...void 0===e.headerBottomBorderColor?{}:{"--gdg-header-bottom-border-color":e.headerBottomBorderColor},...void 0===e.roundingRadius?{}:{"--gdg-rounding-radius":`${e.roundingRadius}px`}}}const a={accentColor:"#4F5DFF",accentFg:"#FFFFFF",accentLight:"rgba(62, 116, 253, 0.1)",textDark:"#313139",textMedium:"#737383",textLight:"#B2B2C0",textBubble:"#313139",bgIconHeader:"#737383",fgIconHeader:"#FFFFFF",textHeader:"#313139",textGroupHeader:"#313139BB",textHeaderSelected:"#FFFFFF",bgCell:"#FFFFFF",bgCellMedium:"#FAFAFB",bgHeader:"#F7F7F8",bgHeaderHasFocus:"#E9E9EB",bgHeaderHovered:"#EFEFF1",bgBubble:"#EDEDF3",bgBubbleSelected:"#FFFFFF",bgSearchResult:"#fff9e3",borderColor:"rgba(115, 116, 131, 0.16)",drilldownBorder:"rgba(0, 0, 0, 0)",linkColor:"#353fb5",cellHorizontalPadding:8,cellVerticalPadding:3,headerIconSize:18,headerFontStyle:"600 13px",baseFontStyle:"13px",markerFontStyle:"9px",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",editorFontSize:"13px",lineHeight:1.4};function l(){return a}const s=r.createContext(a);function c(){return r.useContext(s)}function u(e,...t){const n={...e};for(const r of t)if(void 0!==r)for(const e in r)r.hasOwnProperty(e)&&(n[e]="bgCell"===e?(0,o.NH)(r[e],n[e]):r[e]);return void 0!==n.headerFontFull&&e.fontFamily===n.fontFamily&&e.headerFontStyle===n.headerFontStyle||(n.headerFontFull=`${n.headerFontStyle} ${n.fontFamily}`),void 0!==n.baseFontFull&&e.fontFamily===n.fontFamily&&e.baseFontStyle===n.baseFontStyle||(n.baseFontFull=`${n.baseFontStyle} ${n.fontFamily}`),void 0!==n.markerFontFull&&e.fontFamily===n.fontFamily&&e.markerFontStyle===n.markerFontStyle||(n.markerFontFull=`${n.markerFontStyle} ${n.fontFamily}`),n}},6573:(e,t,n)=>{"use strict";function r(e){}function o(e="This should not happen"){throw new Error(e)}function i(e,t="Assertion failed"){if(!e)return o(t)}function a(e,t){return o(t??"Hell froze over")}function l(e,t){try{return e()}catch{return t}}n.d(t,{NG:()=>r,hu:()=>i,vE:()=>a,vZ:()=>c,wY:()=>l});const s=Object.prototype.hasOwnProperty;function c(e,t){let n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&c(e[r],t[r]););return-1===r}if(!n||"object"===typeof e){for(n in r=0,e){if(s.call(e,n)&&++r&&!s.call(t,n))return!1;if(!(n in t)||!c(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!==e&&t!==t}},45310:(e,t,n)=>{"use strict";n.d(t,{Ht:()=>c,Iz:()=>y,MC:()=>g,OR:()=>a,Qo:()=>h,Qy:()=>m,Wy:()=>p,XC:()=>d,ig:()=>k,jM:()=>C,kq:()=>u,o7:()=>w,qJ:()=>l,qq:()=>f,vE:()=>S});var r=n(5057),o=n(67047),i=n(6573);function a(e,t,n,o,i=!1){const a=r.useRef();a.current=t,r.useEffect((()=>{if(null===n||void 0===n.addEventListener)return;const t=n,r=e=>{a.current?.call(t,e)};return t.addEventListener(e,r,{passive:o,capture:i}),()=>{t.removeEventListener(e,r,{capture:i})}}),[e,n,o,i])}function l(e,t){return void 0===e?void 0:t}const s=Math.PI;function c(e){return e*s/180}const u=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),d=(e,t,n,r,o)=>{switch(e){case"left":return Math.floor(t)+r+o/2;case"center":return Math.floor(t+n/2);case"right":return Math.floor(t+n)-r-o/2}},h=(e,t,n)=>Math.min(e,t-2*n),f=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,p=e=>{const t=e.fgColor??"currentColor";return r.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M12.7073 7.05029C7.87391 11.8837 10.4544 9.30322 6.03024 13.7273C5.77392 13.9836 5.58981 14.3071 5.50189 14.6587L4.52521 18.5655C4.38789 19.1148 4.88543 19.6123 5.43472 19.475L9.34146 18.4983C9.69313 18.4104 10.0143 18.2286 10.2706 17.9722L16.9499 11.2929",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}),r.createElement("path",{d:"M20.4854 4.92901L19.0712 3.5148C18.2901 2.73375 17.0238 2.73375 16.2428 3.5148L14.475 5.28257C15.5326 7.71912 16.4736 8.6278 18.7176 9.52521L20.4854 7.75744C21.2665 6.97639 21.2665 5.71006 20.4854 4.92901Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}))},g=e=>{const t=e.fgColor??"currentColor";return r.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};function m(e,t,n){const[i,a]=r.useState(e),l=r.useRef(!0);r.useEffect((()=>()=>{l.current=!1}),[]);const s=r.useRef(o((e=>{l.current&&a(e)}),n));return r.useLayoutEffect((()=>{l.current&&s.current((()=>e()))}),t),i}const v=new RegExp("^[^A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]");function w(e){return v.test(e)?"rtl":"not-rtl"}let b;function y(){if("undefined"===typeof document)return 0;if(void 0!==b)return b;const e=document.createElement("p");e.style.width="100%",e.style.height="200px";const t=document.createElement("div");t.id="testScrollbar",t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.append(e),document.body.append(t);const n=e.offsetWidth;t.style.overflow="scroll";let r=e.offsetWidth;return n===r&&(r=t.clientWidth),t.remove(),b=n-r,b}const x=Symbol();function k(e){const t=r.useRef([x,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,o]=r.useState(e),[,i]=r.useState(),a=r.useCallback((e=>{const n=t.current[0];n!==x&&(e="function"===typeof e?e(n):e)===n||(n!==x&&i({}),o((t=>"function"===typeof e?e(n===x?t:n):e)),t.current[0]=x)}),[]),l=r.useCallback((()=>{t.current[0]=x,i({})}),[]);return[t.current[0]===x?n:t.current[0],a,l]}function C(e){if(0===e.length)return"";let t=0,n=0;for(const r of e){if(n+=r.length,n>1e4)break;t++}return e.slice(0,t).join(", ")}function S(e){const t=r.useRef(e);return(0,i.vZ)(e,t.current)||(t.current=e),t.current}},6095:(e,t,n)=>{"use strict";n.d(t,{F:()=>Fn});var r=n(5057),o=n(6573),i=n(88341),a=n(87384),l=n(79077),s=n(66904),c=n(67047),u=n(43128),d=n(40047);const h=1<<21;function f(e,t){return(t+2)*h+e}function p(e){return e%h}function g(e){return Math.floor(e/h)-2}function m(e){return[p(e),g(e)]}class v{visibleWindow={x:0,y:0,width:0,height:0};freezeCols=0;freezeRows=[];isInWindow=e=>{const t=p(e),n=g(e),r=this.visibleWindow,o=t>=r.x&&t<=r.x+r.width||t<this.freezeCols,i=n>=r.y&&n<=r.y+r.height||this.freezeRows.includes(n);return o&&i};setWindow(e,t,n){this.visibleWindow.x===e.x&&this.visibleWindow.y===e.y&&this.visibleWindow.width===e.width&&this.visibleWindow.height===e.height&&this.freezeCols===t&&(0,o.vZ)(this.freezeRows,n)||(this.visibleWindow=e,this.freezeCols=t,this.freezeRows=n,this.clearOutOfWindow())}}class w extends v{cache=new Map;setValue=(e,t)=>{this.cache.set(f(e[0],e[1]),t)};getValue=e=>this.cache.get(f(e[0],e[1]));clearOutOfWindow=()=>{for(const[e]of this.cache.entries())this.isInWindow(e)||this.cache.delete(e)}}class b{cells;constructor(e=[]){this.cells=new Set(e.map((e=>f(e[0],e[1]))))}add(e){this.cells.add(f(e[0],e[1]))}has(e){return void 0!==e&&this.cells.has(f(e[0],e[1]))}remove(e){this.cells.delete(f(e[0],e[1]))}clear(){this.cells.clear()}get size(){return this.cells.size}hasHeader(){for(const e of this.cells){if(g(e)<0)return!0}return!1}hasItemInRectangle(e){for(let t=e.y;t<e.y+e.height;t++)for(let n=e.x;n<e.x+e.width;n++)if(this.cells.has(f(n,t)))return!0;return!1}hasItemInRegion(e){for(const t of e)if(this.hasItemInRectangle(t))return!0;return!1}*values(){for(const e of this.cells)yield m(e)}}class y{onSettled;spriteMap=new Map;headerIcons;inFlight=0;constructor(e,t){this.onSettled=t,this.headerIcons=e??{}}drawSprite(e,t,n,r,o,i,a,l=1){const[s,c]=function(e,t){return"normal"===e?[t.bgIconHeader,t.fgIconHeader]:"selected"===e?["white",t.accentColor]:[t.accentColor,t.bgHeader]}(t,a),u=i*Math.ceil(window.devicePixelRatio),d=`${s}_${c}_${u}_${e}`;let h=this.spriteMap.get(d);if(void 0===h){const t=this.headerIcons[e];if(void 0===t)return;h=document.createElement("canvas");const n=h.getContext("2d");if(null===n)return;const r=new Image;r.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t({fgColor:c,bgColor:s}))}`,this.spriteMap.set(d,h);const o=r.decode();if(void 0===o)return;this.inFlight++,o.then((()=>{n.drawImage(r,0,0,u,u)})).finally((()=>{this.inFlight--,0===this.inFlight&&this.onSettled()}))}else l<1&&(n.globalAlpha=l),n.drawImage(h,0,0,u,u,r,o,i,i),l<1&&(n.globalAlpha=1)}}var x=n(45310),k=n(21581);function C(e){if(0===e.length)return;let t;for(const n of e)t=Math.min(t??n.y,n.y)}function S(e,t,n,r,o,i,a,l,s){l=l??t;let c=t,u=e;const d=r-i;let h=!1;for(;c<n&&u<d;){const e=o(u);if(c+e>l&&!0===s(c,u,e,!1,a&&u===r-1)){h=!0;break}c+=e,u++}if(!h){c=n;for(let e=0;e<i;e++){u=r-1-e;const t=o(u);c-=t,s(c,u,t,!0,a&&u===r-1)}}}function M(e,t,n,r,o,i){let a=0,l=0;const s=o+r;for(const c of e){if(!0===i(c,c.sticky?l:a+n,s,c.sticky?0:l,t))break;a+=c.width,l+=c.sticky?c.width:0}}function R(e,t,n,r,o){let i=0,a=0;for(let l=0;l<e.length;l++){const s=e[l];let c=l+1,u=s.width;for(s.sticky&&(a+=u);c<e.length&&(0,d.PU)(e[c].group,s.group)&&e[c].sticky===e[l].sticky;){const t=e[c];u+=t.width,c++,l++,t.sticky&&(a+=t.width)}const h=i+(s.sticky?0:n),f=s.sticky?0:Math.max(0,a-h),p=Math.min(u-f,t-(h+f));o([s.sourceIndex,e[c-1].sourceIndex],s.group??"",h+f,0,p,r),i+=u}}function E(e,t,n,r,o,i,a){const[l,s]=e;let c,u;const d=a.find((e=>!e.sticky))?.sourceIndex??0;if(s>d){const e=Math.max(l,d);let c=t,h=r;for(let t=i.sourceIndex-1;t>=e;t--)c-=a[t].width,h+=a[t].width;for(let t=i.sourceIndex+1;t<=s;t++)h+=a[t].width;u={x:c,y:n,width:h,height:o}}if(d>l){const e=Math.min(s,d-1);let u=t,h=r;for(let t=i.sourceIndex-1;t>=l;t--)u-=a[t].width,h+=a[t].width;for(let t=i.sourceIndex+1;t<=e;t++)h+=a[t].width;c={x:u,y:n,width:h,height:o}}return[c,u]}var I=n(17468);function O(e,t,n,r,o,i,a,l){return e<=o+a&&o<=e+n&&t<=i+l&&i<=t+r}function T(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function P(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,width:Math.max(e.x+e.width,t.x+t.width)-n,height:Math.max(e.y+e.height,t.y+t.height)-r}}function D(e,t,n,r){if(e.x>t||e.y>n||e.x<0&&e.y<0&&e.x+e.width>t&&e.y+e.height>n)return;if(e.x>=0&&e.y>=0&&e.x+e.width<=t&&e.y+e.height<=n)return e;const o=t+4,i=n+4,a=-4-e.x,l=e.x+e.width-o,s=-4-e.y,c=e.y+e.height-i,u=a>0?e.x+Math.floor(a/r)*r:e.x,d=l>0?e.x+e.width-Math.floor(l/r)*r:e.x+e.width,h=s>0?e.y+Math.floor(s/r)*r:e.y;return{x:u,y:h,width:d-u,height:(c>0?e.y+e.height-Math.floor(c/r)*r:e.y+e.height)-h}}const H={kind:u.p6.Loading,allowOverlay:!1};function z(e,t,n,r,o,i,a,l,s,c,h,f,p,g,m,v,w,b,y,x,R,T,P,D,z,L,F,A,V,_,$,B,W,Z,j){let U=x?.size??Number.MAX_SAFE_INTEGER;const X=performance.now();let G=_.baseFontFull;e.font=G;const Y={ctx:e},K=[0,0],q=w>0?(0,d.YN)(s,w,c):0;let Q,J;const ee=C(y);return M(t,l,i,a,o,((t,i,a,l,C)=>{const M=Math.max(0,l-i),te=i+M,ne=o+1,re=t.width-M,oe=r-o-1;if(y.length>0){let e=!1;for(let t=0;t<y.length;t++){const n=y[t];if(O(te,ne,re,oe,n.x,n.y,n.width,n.height)){e=!0;break}}if(!e)return}const ie=()=>{e.save(),e.beginPath(),e.rect(te,ne,re,oe),e.clip()},ae=R.columns.hasIndex(t.sourceIndex),le=f(t.group??"").overrideTheme,se=void 0===t.themeOverride&&void 0===le?_:(0,I.yR)(_,le,t.themeOverride),ce=se.baseFontFull;let ue;return ce!==G&&(G=ce,e.font=ce),ie(),S(C,a,r,s,c,w,b,ee,((o,a,c,f,w)=>{if(a<0)return;if(K[0]=t.sourceIndex,K[1]=a,void 0!==x&&!x.has(K))return;if(y.length>0){let e=!1;for(let n=0;n<y.length;n++){const r=y[n];if(O(i,o,t.width,c,r.x,r.y,r.width,r.height)){e=!0;break}}if(!e)return}const b=R.rows.hasIndex(a),C=g.hasIndex(a),S=a<s?h(K):H;let M=i,ee=t.width,te=!1,ne=!1;if(void 0!==S.span){const[r,s]=S.span,u=`${a},${r},${s},${t.sticky}`;if(void 0===J&&(J=new Set),J.has(u))return void U--;{const r=E(S.span,i,o,t.width,c,t,n),a=t.sticky?r[0]:r[1];if(t.sticky||void 0===r[0]||(ne=!0),void 0!==a){M=a.x,ee=a.width,J.add(u),e.restore(),ue=void 0,e.save(),e.beginPath();const t=Math.max(0,l-a.x);e.rect(a.x+t,o,a.width-t,c),void 0===Q&&(Q=[]),Q.push({x:a.x+t,y:o,width:a.width-t,height:c}),e.clip(),te=!0}}}const re=p?.(a),oe=w&&void 0!==t.trailingRowOptions?.themeOverride?t.trailingRowOptions?.themeOverride:void 0,le=void 0===S.themeOverride&&void 0===re&&void 0===oe?se:(0,I.yR)(se,re,oe,S.themeOverride);e.beginPath();const de=(0,d.Sb)(K,S,R);let he=(0,d.H1)(K,S,R,v);const fe=void 0!==S.span&&R.columns.some((e=>void 0!==S.span&&e>=S.span[0]&&e<=S.span[1]));de&&!m&&v?he=0:de&&v&&(he=Math.max(he,1)),fe&&he++,de||(b&&he++,ae&&!w&&he++);const pe=S.kind===u.p6.Protected?le.bgCellMedium:le.bgCell;let ge;if((f||pe!==_.bgCell)&&(ge=(0,k.NH)(pe,ge)),he>0||C){C&&(ge=(0,k.NH)(le.bgHeader,ge));for(let e=0;e<he;e++)ge=(0,k.NH)(le.accentLight,ge)}else if(void 0!==T)for(const e of T)if(e[0]===t.sourceIndex&&e[1]===a){ge=(0,k.NH)(le.bgSearchResult,ge);break}if(void 0!==P)for(let e=0;e<P.length;e++){const n=P[e],r=n.range;"solid-outline"!==n.style&&r.x<=t.sourceIndex&&t.sourceIndex<r.x+r.width&&r.y<=a&&a<r.y+r.height&&(ge=(0,k.NH)(n.color,ge))}let me=!1;if(void 0!==x){const t=o+1,n=(f?t+c-1:Math.min(t+c-1,r-q))-t;(n!==c-1||M+1<=l)&&(me=!0,e.save(),e.beginPath(),e.rect(M+1,t,ee-1,n),e.clip()),ge=void 0===ge?le.bgCell:(0,k.NH)(ge,le.bgCell)}const ve=t.sourceIndex===n.length-1,we=a===s-1;let be;void 0!==ge&&(e.fillStyle=ge,void 0!==ue&&(ue.fillStyle=ge),void 0!==x?e.fillRect(M+1,o+1,ee-(ve?2:1),c-(we?2:1)):e.fillRect(M,o,ee,c)),"faded"===S.style&&(e.globalAlpha=.6);for(let e=0;e<L.length;e++){const n=L[e];if(n.item[0]===t.sourceIndex&&n.item[1]===a){be=n;break}}if(ee>j&&!ne){const n=le.baseFontFull;n!==G&&(e.font=n,G=n),ue=N(e,S,t.sourceIndex,a,ve,we,M,o,ee,c,he>0,le,ge??le.bgCell,D,z,be?.hoverAmount??0,F,V,X,A,ue,$,B,W,Z)}return me&&e.restore(),"faded"===S.style&&(e.globalAlpha=1),U--,te&&(e.restore(),ue?.deprep?.(Y),ue=void 0,ie(),G=ce,e.font=ce),U<=0})),e.restore(),U<=0})),Q}const L=[0,0],F={x:0,y:0,width:0,height:0},A=[void 0,()=>{}];let V=!1;function _(){V=!0}function N(e,t,n,r,o,i,a,l,s,c,h,f,p,g,m,v,w,b,y,x,k,C,S,M,R){let E,I,O;void 0!==w&&w[0][0]===n&&w[0][1]===r&&(E=w[1][0],I=w[1][1]),L[0]=n,L[1]=r,F.x=a,F.y=l,F.width=s,F.height=c,A[0]=S.getValue(L),A[1]=e=>S.setValue(L,e),V=!1;const T={ctx:e,theme:f,col:n,row:r,cell:t,rect:F,highlighted:h,cellFillColor:p,hoverAmount:v,frameTime:y,hoverX:E,drawState:A,hoverY:I,imageLoader:g,spriteManager:m,hyperWrapping:b,overrideCursor:void 0!==E?R:void 0,requestAnimationFrame:_},P=(0,d.vr)(T,t.lastUpdated,y,k,o,i),D=M(t);if(void 0!==D){k?.renderer!==D&&(k?.deprep?.(T),k=void 0);const e=D.drawPrep?.(T,k);void 0===x||(0,u.rs)(T.cell)?D.draw(T,t):x(T,(()=>D.draw(T,t))),O=void 0===e?void 0:{deprep:e?.deprep,fillStyle:e?.fillStyle,font:e?.font,renderer:D}}return(P||V)&&C?.(L),O}function $(e,t,n,r,i,a,l,s,c=-20,h=-20,f=32,p="center",g="square"){const m=Math.floor(i+l/2),v="circle"===g?1e4:t.roundingRadius??4;let w=(0,x.Qo)(f,l,t.cellVerticalPadding),b=w/2;const y=(0,x.XC)(p,r,a,t.cellHorizontalPadding,w),k=(0,x.kq)(y,m,w),C=(0,x.qq)(r+c,i+h,k);switch(n){case!0:e.beginPath(),(0,d.NK)(e,y-w/2,m-w/2,w,w,v),"circle"===g&&(b*=.8,w*=.8),e.fillStyle=s?t.accentColor:t.textMedium,e.fill(),e.beginPath(),e.moveTo(y-b+w/4.23,m-b+w/1.97),e.lineTo(y-b+w/2.42,m-b+w/1.44),e.lineTo(y-b+w/1.29,m-b+w/3.25),e.strokeStyle=t.bgCell,e.lineJoin="round",e.lineCap="round",e.lineWidth=1.9,e.stroke();break;case u.qF:case!1:e.beginPath(),(0,d.NK)(e,y-w/2+.5,m-w/2+.5,w-1,w-1,v),e.lineWidth=1,e.strokeStyle=C?t.textDark:t.textMedium,e.stroke();break;case u.sd:e.beginPath(),(0,d.NK)(e,y-w/2,m-w/2,w,w,v),e.fillStyle=C?t.textMedium:t.textLight,e.fill(),"circle"===g&&(b*=.8,w*=.8),e.beginPath(),e.moveTo(y-w/3,m),e.lineTo(y+w/3,m),e.strokeStyle=t.bgCell,e.lineCap="round",e.lineWidth=1.9,e.stroke();break;default:(0,o.vE)(n)}}function B(e,t,n,r,o,i,a,l,s,c,u,h,f,p,g,m,v,w,b){const y=a+l;if(y<=0)return;e.fillStyle=h.bgHeader,e.fillRect(0,0,o,y);const x=r?.[0]?.[0],C=r?.[0]?.[1],S=r?.[1]?.[0],E=r?.[1]?.[1],O=h.headerFontFull;e.font=O,M(t,0,i,0,y,((t,r,o,i)=>{if(void 0!==v&&!v.has([t.sourceIndex,-1]))return;const d=Math.max(0,i-r);e.save(),e.beginPath(),e.rect(r+d,l,t.width-d,a),e.clip();const g=m(t.group??"").overrideTheme,y=void 0===t.themeOverride&&void 0===g?h:(0,I.yR)(h,g,t.themeOverride);y.bgHeader!==h.bgHeader&&(e.fillStyle=y.bgHeader,e.fill()),y!==h&&(e.font=y.baseFontFull);const k=u.columns.hasIndex(t.sourceIndex),M=void 0!==s||c,R=!M&&-1===C&&x===t.sourceIndex,O=M?0:p.find((e=>e.item[0]===t.sourceIndex&&-1===e.item[1]))?.hoverAmount??0,T=void 0!==u?.current&&u.current.cell[0]===t.sourceIndex,P=k?y.accentColor:T?y.bgHeaderHasFocus:y.bgHeader,D=n?l:0,H=0===t.sourceIndex?0:1;k?(e.fillStyle=P,e.fillRect(r+H,D,t.width-H,a)):(T||O>0)&&(e.beginPath(),e.rect(r+H,D,t.width-H,a),T&&(e.fillStyle=y.bgHeaderHasFocus,e.fill()),O>0&&(e.globalAlpha=O,e.fillStyle=y.bgHeaderHovered,e.fill(),e.globalAlpha=1)),G(e,r,D,t.width,a,t,k,y,R,R?S:void 0,R?E:void 0,T,O,f,w,b),e.restore()})),n&&function(e,t,n,r,o,i,a,l,s,c,u,h){const f=8,[p,g]=i?.[0]??[];let m=0;R(t,n,r,o,((t,n,r,s,v,w)=>{if(void 0!==h&&!h.hasItemInRectangle({x:t[0],y:-2,width:t[1]-t[0]+1,height:1}))return;e.save(),e.beginPath(),e.rect(r,s,v,w),e.clip();const b=u(n),y=void 0===b?.overrideTheme?a:(0,I.yR)(a,b.overrideTheme),x=-2===g&&void 0!==p&&p>=t[0]&&p<=t[1],C=x?y.bgHeaderHovered:y.bgHeader;if(C!==a.bgHeader&&(e.fillStyle=C,e.fill()),e.fillStyle=y.textGroupHeader??y.textHeader,void 0!==b){let t=r;if(void 0!==b.icon&&(l.drawSprite(b.icon,"normal",e,t+f,(o-20)/2,20,y),t+=26),e.fillText(b.name,t+f,o/2+(0,d.aX)(e,a.headerFontFull)),void 0!==b.actions&&x){const t=Z({x:r,y:s,width:v,height:w},b.actions);e.beginPath();const n=t[0].x-10,a=r+v-n;e.rect(n,0,a,o);const c=e.createLinearGradient(n,0,n+a,0),u=(0,k.fG)(C,0);c.addColorStop(0,u),c.addColorStop(10/a,C),c.addColorStop(1,C),e.fillStyle=c,e.fill(),e.globalAlpha=.6;const[d,h]=i?.[1]??[-1,-1];for(let o=0;o<b.actions.length;o++){const n=b.actions[o],i=t[o],a=T(i,d+r,h);a&&(e.globalAlpha=1),l.drawSprite(n.icon,"normal",e,i.x+i.width/2-10,i.y+i.height/2-10,20,y),a&&(e.globalAlpha=.6)}e.globalAlpha=1}}0!==r&&c(t[0])&&(e.beginPath(),e.moveTo(r+.5,0),e.lineTo(r+.5,o),e.strokeStyle=a.borderColor,e.lineWidth=1,e.stroke()),e.restore(),m=r+v})),e.beginPath(),e.moveTo(m+.5,0),e.lineTo(m+.5,o),e.moveTo(0,o+.5),e.lineTo(n,o+.5),e.strokeStyle=a.borderColor,e.lineWidth=1,e.stroke()}(e,t,o,i,l,r,h,f,0,g,m,v)}const W=30;function Z(e,t){const n=[];let r=e.x+e.width-26*t.length;const o=e.y+e.height/2-13;for(let i=0;i<t.length;i++)n.push({x:r,y:o,width:26,height:26}),r+=26;return n}function j(e,t,n){return n&&void 0!==e?(e.x=t-(e.x-t)-e.width,e):e}function U(e,t,n,r,o,i,a,l){const s=a.cellHorizontalPadding,c=a.headerIconSize,u=function(e,t,n,r,o){return o?{x:e,y:t,width:W,height:Math.min(W,r)}:{x:e+n-W,y:Math.max(t,t+r/2-W/2),width:W,height:Math.min(W,r)}}(n,r,o,i,!1);let h=n+s;const f=void 0===t.icon?void 0:{x:h,y:r+(i-c)/2,width:c,height:c},p=void 0===f||void 0===t.overlayIcon?void 0:{x:f.x+9,y:f.y+6,width:18,height:18};void 0!==f&&(h+=Math.ceil(1.3*c));const g={x:h,y:r,width:o-h,height:i};let m;if(void 0!==t.indicatorIcon){const n=void 0===e?(0,d._y)(t.title,a.headerFontFull)?.width??0:(0,d.P7)(t.title,e,a.headerFontFull).width;g.width=n,h+=n+s,m={x:h,y:r+(i-c)/2,width:c,height:c}}const v=n+o/2;return{menuBounds:j(u,v,l),iconBounds:j(f,v,l),iconOverlayBounds:j(p,v,l),textBounds:j(g,v,l),indicatorIconBounds:j(m,v,l)}}function X(e,t,n,r,o,i,a,l,s,c,h,f,p,g,m,v){if(void 0!==i.rowMarker&&!0!==i.headerRowMarkerDisabled){const a=i.rowMarkerChecked;!0!==a&&!0!==i.headerRowMarkerAlwaysVisible&&(e.globalAlpha=f);return $(e,void 0!==i.headerRowMarkerTheme?(0,I.yR)(l,i.headerRowMarkerTheme):l,a,t,n,r,o,!1,void 0,void 0,18,"center",i.rowMarker),void(!0!==a&&!0!==i.headerRowMarkerAlwaysVisible&&(e.globalAlpha=1))}const w=a?l.textHeaderSelected:l.textHeader,b=!0===i.hasMenu&&(s||g&&a)&&void 0!==v.menuBounds;if(void 0!==i.icon&&void 0!==v.iconBounds){let t=a?"selected":"normal";"highlight"===i.style&&(t=a?"selected":"special"),p.drawSprite(i.icon,t,e,v.iconBounds.x,v.iconBounds.y,v.iconBounds.width,l),void 0!==i.overlayIcon&&void 0!==v.iconOverlayBounds&&p.drawSprite(i.overlayIcon,a?"selected":"special",e,v.iconOverlayBounds.x,v.iconOverlayBounds.y,v.iconOverlayBounds.width,l)}if(b&&r>35){const n=35,o=(m?n:r-n)/r,i=(m?.7*n:r-.7*n)/r,a=e.createLinearGradient(t,0,t+r,0),l=(0,k.fG)(w,0);a.addColorStop(m?1:0,w),a.addColorStop(o,w),a.addColorStop(i,l),a.addColorStop(m?0:1,l),e.fillStyle=a}else e.fillStyle=w;if(m&&(e.textAlign="right"),void 0!==v.textBounds&&e.fillText(i.title,m?v.textBounds.x+v.textBounds.width:v.textBounds.x,n+o/2+(0,d.aX)(e,l.headerFontFull)),m&&(e.textAlign="left"),void 0!==i.indicatorIcon&&void 0!==v.indicatorIconBounds&&(!b||!O(v.menuBounds.x,v.menuBounds.y,v.menuBounds.width,v.menuBounds.height,v.indicatorIconBounds.x,v.indicatorIconBounds.y,v.indicatorIconBounds.width,v.indicatorIconBounds.height))){let t=a?"selected":"normal";"highlight"===i.style&&(t=a?"selected":"special"),p.drawSprite(i.indicatorIcon,t,e,v.indicatorIconBounds.x,v.indicatorIconBounds.y,v.indicatorIconBounds.width,l)}if(b&&void 0!==v.menuBounds){const r=v.menuBounds,o=void 0!==c&&void 0!==h&&T(r,c+t,h+n);if(o||(e.globalAlpha=.7),void 0===i.menuIcon||i.menuIcon===u.pN.Triangle){e.beginPath();const t=r.x+r.width/2-5.5,n=r.y+r.height/2-3;(0,d.zu)(e,[{x:t,y:n},{x:t+11,y:n},{x:t+5.5,y:n+6}],1),e.fillStyle=w,e.fill()}else if(i.menuIcon===u.pN.Dots){e.beginPath();const t=r.x+r.width/2,n=r.y+r.height/2;(0,d.Ld)(e,t,n),e.fillStyle=w,e.fill()}else{const t=r.x+(r.width-l.headerIconSize)/2,n=r.y+(r.height-l.headerIconSize)/2;p.drawSprite(i.menuIcon,"normal",e,t,n,l.headerIconSize,l)}o||(e.globalAlpha=1)}}function G(e,t,n,r,o,i,a,l,s,c,u,d,h,f,p,g){const m="rtl"===(0,x.o7)(i.title),v=U(e,i,t,n,r,o,l,m);void 0!==p?p({ctx:e,theme:l,rect:{x:t,y:n,width:r,height:o},column:i,columnIndex:i.sourceIndex,isSelected:a,hoverAmount:h,isHovered:s,hasSelectedCell:d,spriteManager:f,menuBounds:v?.menuBounds??{x:0,y:0,height:0,width:0}},(()=>X(e,t,n,r,o,i,a,l,s,c,u,h,f,g,m,v))):X(e,t,n,r,o,i,a,l,s,c,u,h,f,g,m,v)}var Y=n(88417);const K=(e,t,n)=>{let r=0,o=t,i=0,a=n;if(void 0!==e&&e.length>0){r=Number.MAX_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;for(const t of e)r=Math.min(r,t.x-1),o=Math.max(o,t.x+t.width+1),i=Math.min(i,t.y-1),a=Math.max(a,t.y+t.height+1)}return{minX:r,maxX:o,minY:i,maxY:a}};function q(e,t,n,r,o,i,a,l,s,c,u,d,h,f,p,g,m,v=!1){if(void 0!==s){e.beginPath(),e.save(),e.rect(0,0,i,a);for(const t of s)e.rect(t.x+1,t.y+1,t.width-1,t.height-1);e.clip("evenodd")}const w=m.horizontalBorderColor??m.borderColor,b=m.borderColor,{minX:y,maxX:x,minY:k,maxY:C}=K(l,i,a),S=[];e.beginPath();let M=.5;for(let I=0;I<t.length;I++){const e=t[I];if(0===e.width)continue;M+=e.width;const n=e.sticky?M:M+r;n>=y&&n<=x&&f(I+1)&&S.push({x1:n,y1:Math.max(c,k),x2:n,y2:Math.min(a,C),color:b})}let R=a+.5;for(let I=g-p;I<g;I++){R-=d(I),S.push({x1:y,y1:R,x2:x,y2:R,color:w})}if(!0!==v){let e=u+.5,t=n;const r=R;for(;e+o<r;){const n=e+o;if(n>=k&&n<=C-1){const e=h?.(t);S.push({x1:y,y1:n,x2:x,y2:n,color:e?.horizontalBorderColor??e?.borderColor??w})}e+=d(t),t++}}const E=Y(S,(e=>e.color));for(const I of Object.keys(E)){e.strokeStyle=I;for(const t of E[I])e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2);e.stroke(),e.beginPath()}void 0!==s&&e.restore()}function Q(e,t,n,r,o,i,a,l,s,c,u,h,f,p,g,m){const v=g?.filter((e=>"no-outline"!==e.style));if(void 0===v||0===v.length)return;const w=(0,d.G6)(l),b=(0,d.YN)(p,f,h),y=[s,0,l.length,p-f],x=[w,0,t,n-b],C=v.map((e=>{const g=e.range,m=e.style??"dashed";return function(e,t,n,r,o){const[i,a,l,s]=t,[c,u,d,h]=o,{x:f,y:p,width:g,height:m}=e,v=[];if(g<=0||m<=0)return v;const w=f+g,b=p+m,y=f<i,x=p<a,k=f+g>l,C=p+m>s,S=f>=i&&f<l||w>i&&w<=l||f<i&&w>l,M=p>=a&&p<s||b>a&&b<=s||p<a&&b>s;if(S&&M){const e=Math.max(f,i),t=Math.max(p,a),n=Math.min(w,l),r=Math.min(b,s);v.push({rect:{x:e,y:t,width:n-e,height:r-t},clip:{x:c,y:u,width:d-c+1,height:h-u+1}})}if(y&&x){const e=f,t=p,n=Math.min(w,i),r=Math.min(b,a);v.push({rect:{x:e,y:t,width:n-e,height:r-t},clip:{x:0,y:0,width:c+1,height:u+1}})}if(x&&S){const e=Math.max(f,i),t=p,n=Math.min(w,l),r=Math.min(b,a);v.push({rect:{x:e,y:t,width:n-e,height:r-t},clip:{x:c,y:0,width:d-c+1,height:u+1}})}if(x&&k){const e=Math.max(f,l),t=p,r=w,o=Math.min(b,a);v.push({rect:{x:e,y:t,width:r-e,height:o-t},clip:{x:d,y:0,width:n-d+1,height:u+1}})}if(y&&M){const e=f,t=Math.max(p,a),n=Math.min(w,i),r=Math.min(b,s);v.push({rect:{x:e,y:t,width:n-e,height:r-t},clip:{x:0,y:u,width:c+1,height:h-u+1}})}if(k&&M){const e=Math.max(f,l),t=Math.max(p,a),r=w,o=Math.min(b,s);v.push({rect:{x:e,y:t,width:r-e,height:o-t},clip:{x:d,y:u,width:n-d+1,height:h-u+1}})}if(y&&C){const e=f,t=Math.max(p,s),n=Math.min(w,i),o=b;v.push({rect:{x:e,y:t,width:n-e,height:o-t},clip:{x:0,y:h,width:c+1,height:r-h+1}})}if(C&&S){const e=Math.max(f,i),t=Math.max(p,s),n=Math.min(w,l),o=b;v.push({rect:{x:e,y:t,width:n-e,height:o-t},clip:{x:c,y:h,width:d-c+1,height:r-h+1}})}if(k&&C){const e=Math.max(f,l),t=Math.max(p,s),o=w,i=b;v.push({rect:{x:e,y:t,width:o-e,height:i-t},clip:{x:d,y:h,width:n-d+1,height:r-h+1}})}return v}(g,y,t,n,x).map((g=>{const v=g.rect,w=(0,d.Ve)(v.x,v.y,t,n,u,c+u,r,o,i,a,p,s,f,l,h),b=1===v.width&&1===v.height?w:(0,d.Ve)(v.x+v.width-1,v.y+v.height-1,t,n,u,c+u,r,o,i,a,p,s,f,l,h);return v.x+v.width>=l.length&&(b.width-=1),v.y+v.height>=p&&(b.height-=1),{color:e.color,style:m,clip:g.clip,rect:D({x:w.x,y:w.y,width:b.x+b.width-w.x,height:b.y+b.height-w.y},t,n,8)}}))})),S=()=>{e.lineWidth=1;let r=!1;for(const a of C)for(const l of a)if(void 0!==l?.rect&&O(0,0,t,n,l.rect.x,l.rect.y,l.rect.width,l.rect.height)){const t=r,n=(o=l.clip,i=l.rect,!(o.x<=i.x&&o.y<=i.y&&o.x+o.width>=i.x+i.width&&o.y+o.height>=i.y+i.height));n&&(e.save(),e.rect(l.clip.x,l.clip.y,l.clip.width,l.clip.height),e.clip()),"dashed"!==l.style||r?"solid"!==l.style&&"solid-outline"!==l.style||!r||(e.setLineDash([]),r=!1):(e.setLineDash([5,3]),r=!0),e.strokeStyle="solid-outline"===l.style?(0,k.NH)((0,k.NH)(l.color,m.borderColor),m.bgCell):(0,k.fG)(l.color,1),e.strokeRect(l.rect.x+.5,l.rect.y+.5,l.rect.width-1,l.rect.height-1),n&&(e.restore(),r=t)}var o,i;r&&e.setLineDash([])};return S(),S}function J(e,t,n,r,o){e.beginPath(),e.moveTo(t,n),e.lineTo(t,r),e.lineWidth=2,e.strokeStyle=o,e.stroke(),e.globalAlpha=1}function ee(e,t,n,r,o,i,a,l,s,c,u,h,f,p,g,m,v){if(void 0===u.current)return;const w=u.current.range,b=u.current.cell,y=[w.x+w.width-1,w.y+w.height-1];if(b[1]>=v&&y[1]>=v)return;if(!a.some((e=>e.sourceIndex===b[0]||e.sourceIndex===y[0])))return;const[x,k]=u.current.cell,C=f(u.current.cell),R=C.span??[x,x],I=p>0&&!(k>=v-p)?(0,d.YN)(v,p,h)-1:0,O=y[1];let T;if(M(a,r,o,i,c,((r,o,i,a,c)=>{if(r.sticky&&x>r.sourceIndex)return;const u=r.sourceIndex<R[0],d=r.sourceIndex>R[1],f=r.sourceIndex===y[0];return f||!u&&!d?(S(c,i,n,v,h,p,g,void 0,((i,c,u)=>{if(c!==k&&c!==O)return;let d=o,h=r.width;if(void 0!==C.span){const e=E(C.span,o,i,r.width,u,r,l),t=r.sticky?e[0]:e[1];void 0!==t&&(d=t.x,h=t.width)}return c===O&&f&&m&&(T=()=>{a>d&&!r.sticky&&(e.beginPath(),e.rect(a,0,t-a,n),e.clip()),e.beginPath(),e.rect(d+h-4,i+u-4,4,4),e.fillStyle=r.themeOverride?.accentColor??s.accentColor,e.fill()}),void 0!==T})),void 0!==T):void 0})),void 0===T)return;const P=()=>{e.save(),e.beginPath(),e.rect(0,c,t,n-c-I),e.clip(),T?.(),e.restore()};return P(),P}function te(e,t){const{canvasCtx:n,headerCanvasCtx:r,width:i,height:a,cellXOffset:l,cellYOffset:s,translateX:c,translateY:u,mappedColumns:h,enableGroups:f,freezeColumns:p,dragAndDropState:g,theme:m,drawFocus:v,headerHeight:w,groupHeaderHeight:b,disabledRows:y,rowHeight:x,verticalBorder:E,overrideCursor:T,isResizing:P,selection:D,fillHandle:H,freezeTrailingRows:L,rows:F,getCellContent:A,getGroupDetails:V,getRowThemeOverride:_,isFocused:N,drawHeaderCallback:$,prelightCells:W,drawCellCallback:Z,highlightRegions:j,resizeCol:U,imageLoader:X,lastBlitData:G,hoverValues:Y,hyperWrapping:te,hoverInfo:ne,spriteManager:re,maxScaleFactor:oe,hasAppendRow:ie,touchMode:ae,enqueue:le,renderStateProvider:se,getCellRenderer:ce,renderStrategy:ue,bufferACtx:de,bufferBCtx:he,damage:fe,minimumCellWidth:pe,resizeIndicator:ge}=e;if(0===i||0===a)return;const me="double-buffer"===ue,ve=Math.min(oe,Math.ceil(window.devicePixelRatio??1)),we="direct"!==ue&&function(e,t){if(void 0===t)return!1;if(e.width!==t.width||e.height!==t.height||e.theme!==t.theme||e.headerHeight!==t.headerHeight||e.rowHeight!==t.rowHeight||e.rows!==t.rows||e.freezeColumns!==t.freezeColumns||e.getRowThemeOverride!==t.getRowThemeOverride||e.isFocused!==t.isFocused||e.isResizing!==t.isResizing||e.verticalBorder!==t.verticalBorder||e.getCellContent!==t.getCellContent||e.highlightRegions!==t.highlightRegions||e.selection!==t.selection||e.dragAndDropState!==t.dragAndDropState||e.prelightCells!==t.prelightCells||e.touchMode!==t.touchMode||e.maxScaleFactor!==t.maxScaleFactor)return!1;if(e.mappedColumns!==t.mappedColumns){if(e.mappedColumns.length>100||e.mappedColumns.length!==t.mappedColumns.length)return!1;let n;for(let r=0;r<e.mappedColumns.length;r++){const i=e.mappedColumns[r],a=t.mappedColumns[r];if((0,o.vZ)(i,a))continue;if(void 0!==n)return!1;if(i.width===a.width)return!1;const{width:l,...s}=i,{width:c,...u}=a;if(!(0,o.vZ)(s,u))return!1;n=r}return void 0===n||n}return!0}(e,t),be=n.canvas;be.width===i*ve&&be.height===a*ve||(be.width=i*ve,be.height=a*ve,be.style.width=i+"px",be.style.height=a+"px");const ye=r.canvas,xe=f?b+w:w,ke=xe+1;ye.width===i*ve&&ye.height===ke*ve||(ye.width=i*ve,ye.height=ke*ve,ye.style.width=i+"px",ye.style.height=ke+"px");const Ce=de.canvas,Se=he.canvas;!me||Ce.width===i*ve&&Ce.height===a*ve||(Ce.width=i*ve,Ce.height=a*ve,void 0!==G.current&&(G.current.aBufferScroll=void 0)),!me||Se.width===i*ve&&Se.height===a*ve||(Se.width=i*ve,Se.height=a*ve,void 0!==G.current&&(G.current.bBufferScroll=void 0));const Me=G.current;if(!0===we&&l===Me?.cellXOffset&&s===Me?.cellYOffset&&c===Me?.translateX&&u===Me?.translateY)return;let Re=null;me&&(Re=n);const Ee=r;let Ie;Ie=me?void 0!==fe?"b"===Me?.lastBuffer?he:de:"b"===Me?.lastBuffer?de:he:n;const Oe=Ie.canvas,Te=me?Oe===Ce?Se:Ce:be,Pe="number"===typeof x?()=>x:x;Ee.save(),Ie.save(),Ee.beginPath(),Ie.beginPath(),Ee.textBaseline="middle",Ie.textBaseline="middle",1!==ve&&(Ee.scale(ve,ve),Ie.scale(ve,ve));const De=(0,d.ih)(h,l,i,g,c);let He=[];const ze=v&&D.current?.cell[1]===s&&0===u;let Le=!1;if(void 0!==j)for(const o of j)if("no-outline"!==o.style&&o.range.y===s&&0===u){Le=!0;break}const Fe=()=>{B(Ee,De,f,ne,i,c,w,b,g,P,D,m,re,Y,E,V,fe,$,ae),q(Ee,De,s,c,u,i,a,void 0,void 0,b,xe,Pe,_,E,L,F,m,!0),Ee.beginPath(),Ee.moveTo(0,ke-.5),Ee.lineTo(i,ke-.5),Ee.strokeStyle=(0,k.NH)(m.headerBottomBorderColor??m.horizontalBorderColor??m.borderColor,m.bgHeader),Ee.stroke(),Le&&Q(Ee,i,a,l,s,c,u,h,p,w,b,x,L,F,j,m),ze&&ee(Ee,i,a,s,c,u,De,h,m,xe,D,Pe,A,L,ie,H,F)};if(void 0!==fe){const e=De[De.length-1].sourceIndex+1,t=e=>{z(e,De,h,a,xe,c,u,s,F,Pe,A,V,_,y,N,v,L,ie,He,fe,D,W,j,X,re,Y,ne,Z,te,m,le,se,ce,T,pe);const t=D.current;H&&v&&void 0!==t&&fe.has((0,d.zU)(t.range))&&ee(e,i,a,s,c,u,De,h,m,xe,D,Pe,A,L,ie,H,F)};if(fe.hasItemInRegion([{x:l,y:-2,width:e,height:2},{x:l,y:s,width:e,height:300},{x:0,y:s,width:p,height:300},{x:0,y:-2,width:p,height:2},{x:l,y:F-L,width:e,height:L,when:L>0}])){t(Ie),null!==Re&&(Re.save(),Re.scale(ve,ve),Re.textBaseline="middle",t(Re),Re.restore());fe.hasHeader()&&(!function(e,t,n,r,o,i,a,l,s){void 0!==s&&0!==s.size&&(e.beginPath(),R(t,n,i,r,((t,n,r,o,i,a)=>{s.hasItemInRectangle({x:t[0],y:-2,width:t[1]-t[0]+1,height:1})&&e.rect(r,o,i,a)})),M(t,l,i,a,o,((t,n,i,a)=>{const l=Math.max(0,a-n),c=n+l+1,u=t.width-l-1;s.has([t.sourceIndex,-1])&&e.rect(c,r,u,o-r)})),e.clip())}(Ee,De,i,b,xe,c,u,s,fe),Fe())}return Ie.restore(),void Ee.restore()}if(!0===we&&l===Me?.cellXOffset&&c===Me?.translateX&&ze===Me?.mustDrawFocusOnHeader&&Le===Me?.mustDrawHighlightRingsOnHeader||Fe(),!0===we){(0,o.hu)(void 0!==Te&&void 0!==Me);const{regions:e}=function(e,t,n,r,o,i,a,l,s,c,u,h,f,p,g,m,v,w,b){const y=[];e.imageSmoothingEnabled=!1;const x=Math.min(o.cellYOffset,a),k=Math.max(o.cellYOffset,a);let C=0;if("number"===typeof w)C+=(k-x)*w;else for(let d=x;d<k;d++)C+=w(d);a>o.cellYOffset&&(C=-C),C+=s-o.translateY;const S=Math.min(o.cellXOffset,i),M=Math.max(o.cellXOffset,i);let R=0;for(let d=S;d<M;d++)R+=m[d].width;i>o.cellXOffset&&(R=-R),R+=l-o.translateX;const E=(0,d.G6)(v);if(0!==R&&0!==C)return{regions:[]};const I=c>0?(0,d.YN)(f,c,w):0,O=u-E-Math.abs(R),T=h-p-I-Math.abs(C)-1;if(O>150&&T>150){const o={sx:0,sy:0,sw:u*g,sh:h*g,dx:0,dy:0,dw:u*g,dh:h*g};if(C>0?(o.sy=(p+1)*g,o.sh=T*g,o.dy=(C+p+1)*g,o.dh=T*g,y.push({x:0,y:p,width:u,height:C+1})):C<0&&(o.sy=(-C+p+1)*g,o.sh=T*g,o.dy=(p+1)*g,o.dh=T*g,y.push({x:0,y:h+C-I,width:u,height:-C+I})),R>0?(o.sx=E*g,o.sw=O*g,o.dx=(R+E)*g,o.dw=O*g,y.push({x:E-1,y:0,width:R+2,height:h})):R<0&&(o.sx=(E-R)*g,o.sw=O*g,o.dx=E*g,o.dw=O*g,y.push({x:u+R,y:0,width:-R,height:h})),e.setTransform(1,0,0,1,0,0),b){if(E>0&&0!==R&&0===C&&(void 0===r||!1!==n?.[1])){const n=E*g,r=h*g;e.drawImage(t,0,0,n,r,0,0,n,r)}if(I>0&&0===R&&0!==C&&(void 0===r||!1!==n?.[0])){const n=(h-I)*g,r=u*g,o=I*g;e.drawImage(t,0,n,r,o,0,n,r,o)}}e.drawImage(t,o.sx,o.sy,o.sw,o.sh,o.dx,o.dy,o.dw,o.dh),e.scale(g,g)}return e.imageSmoothingEnabled=!0,{regions:y}}(Ie,Te,Te===Ce?Me.aBufferScroll:Me.bBufferScroll,Te===Ce?Me.bBufferScroll:Me.aBufferScroll,Me,l,s,c,u,L,i,a,F,xe,ve,h,De,x,me);He=e}else if(!1!==we){(0,o.hu)(void 0!==Me);He=function(e,t,n,r,o,i,a,l,s,c){const u=[];return t!==e.cellXOffset||n!==e.cellYOffset||r!==e.translateX||o!==e.translateY||M(s,n,r,o,l,((e,t,n,r)=>{if(e.sourceIndex===c){const e=Math.max(t,r)+1;return u.push({x:e,y:0,width:i-e,height:a}),!0}})),u}(Me,l,s,c,u,i,a,xe,De,we)}!function(e,t,n,r,o,i,a,l,s){let c=!1;for(const d of t)if(!d.sticky){c=a(d.sourceIndex);break}const u=s.horizontalBorderColor??s.borderColor,h=s.borderColor,f=c?(0,d.G6)(t):0;let p;if(0!==f&&(p=(0,k.mv)(h,s.bgCell),e.beginPath(),e.moveTo(f+.5,0),e.lineTo(f+.5,r),e.strokeStyle=p,e.stroke()),o>0){const t=h===u&&void 0!==p?p:(0,k.mv)(u,s.bgCell),a=(0,d.YN)(i,o,l);e.beginPath(),e.moveTo(0,r-a+.5),e.lineTo(n,r-a+.5),e.strokeStyle=t,e.stroke()}}(Ie,De,i,a,L,F,E,Pe,m);const Ae=Q(Ie,i,a,l,s,c,u,h,p,w,b,x,L,F,j,m),Ve=v?ee(Ie,i,a,s,c,u,De,h,m,xe,D,Pe,A,L,ie,H,F):void 0;if(Ie.fillStyle=m.bgCell,He.length>0){Ie.beginPath();for(const e of He)Ie.rect(e.x,e.y,e.width,e.height);Ie.clip(),Ie.fill(),Ie.beginPath()}else Ie.fillRect(0,0,i,a);const _e=z(Ie,De,h,a,xe,c,u,s,F,Pe,A,V,_,y,N,v,L,ie,He,fe,D,W,j,X,re,Y,ne,Z,te,m,le,se,ce,T,pe);!function(e,t,n,r,o,i,a,l,s,c,u,d,h,f,p,g,m,v,w){if(void 0!==v||t[t.length-1]!==n[t.length-1])return;const b=C(m);M(t,s,a,l,i,((n,a,l,s,v)=>{if(n!==t[t.length-1])return;a+=n.width;const y=Math.max(a,s);y>r||(e.save(),e.beginPath(),e.rect(y,i+1,1e4,o-i-1),e.clip(),S(v,l,o,c,u,p,g,b,((t,n,r,o)=>{if(!o&&m.length>0&&!m.some((e=>O(a,t,1e4,r,e.x,e.y,e.width,e.height))))return;const i=h.hasIndex(n),l=f.hasIndex(n);e.beginPath();const s=d?.(n),c=void 0===s?w:(0,I.yR)(w,s);c.bgCell!==w.bgCell&&(e.fillStyle=c.bgCell,e.fillRect(a,t,1e4,r)),l&&(e.fillStyle=c.bgHeader,e.fillRect(a,t,1e4,r)),i&&(e.fillStyle=c.accentLight,e.fillRect(a,t,1e4,r))})),e.restore())}))}(Ie,De,h,i,a,xe,c,u,s,F,Pe,_,D.rows,y,L,ie,He,fe,m),function(e,t,n,r,o,i,a,l,s,c,u,h,f,p,g){const m=g.bgCell,{minX:v,maxX:w,minY:b,maxY:y}=K(l,i,a),x=[],k=a-(0,d.YN)(p,f,c);let C=s,S=n,M=0;for(;C+o<k;){const e=C+o,t=c(S);if(e>=b&&e<=y-1){const n=u?.(S),r=n?.bgCell;void 0!==r&&r!==m&&S>=p-f&&x.push({x:v,y:e,w:w-v,h:t,color:r})}C+=t,S<p-f&&(M=C),S++}let R=0;const E=Math.min(k,y)-M;if(E>0)for(let d=0;d<t.length;d++){const e=t[d];if(0===e.width)continue;const n=e.sticky?R:R+r,o=e.themeOverride?.bgCell;void 0!==o&&o!==m&&n>=v&&n<=w&&h(d+1)&&x.push({x:n,y:M,w:e.width,h:E,color:o}),R+=e.width}if(0===x.length)return;let I;e.beginPath();for(let d=x.length-1;d>=0;d--){const t=x[d];void 0===I?I=t.color:t.color!==I&&(e.fillStyle=I,e.fill(),e.beginPath(),I=t.color),e.rect(t.x,t.y,t.w,t.h)}void 0!==I&&(e.fillStyle=I,e.fill()),e.beginPath()}(Ie,De,s,c,u,i,a,He,xe,Pe,_,E,L,F,m),q(Ie,De,s,c,u,i,a,He,_e,b,xe,Pe,_,E,L,F,m),Ae?.(),Ve?.(),P&&"none"!==ge&&M(De,0,c,0,xe,((e,t)=>e.sourceIndex===U&&(J(Ee,t+e.width,0,xe+1,(0,k.NH)(m.resizeIndicatorColor??m.accentLight,m.bgHeader)),"full"===ge&&J(Ie,t+e.width,xe,a,(0,k.NH)(m.resizeIndicatorColor??m.accentLight,m.bgCell)),!0))),null!==Re&&(Re.fillStyle=m.bgCell,Re.fillRect(0,0,i,a),Re.drawImage(Ie.canvas,0,0));const Ne=function(e,t,n,r,o,i,a,l,s,c){let u=0;return M(e,i,r,o,n,((e,n,r,o,i)=>(S(i,r,t,a,l,s,c,void 0,((e,t,n,r)=>{r||(u=Math.max(t,u))})),!0))),u}(De,a,xe,c,u,s,F,Pe,L,ie);X?.setWindow({x:l,y:s,width:De.length,height:Ne-s},p,Array.from({length:L},((e,t)=>F-1-t)));const $e=void 0!==Me&&(l!==Me.cellXOffset||c!==Me.translateX),Be=void 0!==Me&&(s!==Me.cellYOffset||u!==Me.translateY);G.current={cellXOffset:l,cellYOffset:s,translateX:c,translateY:u,mustDrawFocusOnHeader:ze,mustDrawHighlightRingsOnHeader:Le,lastBuffer:me?Oe===Ce?"a":"b":void 0,aBufferScroll:Oe===Ce?[$e,Be]:Me?.aBufferScroll,bBufferScroll:Oe===Se?[$e,Be]:Me?.bBufferScroll},Ie.restore(),Ee.restore()}function ne(e){const t=e-1;return t*t*t+1}class re{callback;constructor(e){this.callback=e}currentHoveredItem=void 0;leavingItems=[];lastAnimationTime;addToLeavingItems=e=>{this.leavingItems.some((t=>(0,d.pU)(t.item,e.item)))||this.leavingItems.push(e)};removeFromLeavingItems=e=>{const t=this.leavingItems.find((t=>(0,d.pU)(t.item,e)));return this.leavingItems=this.leavingItems.filter((e=>e!==t)),t?.hoverAmount??0};cleanUpLeavingElements=()=>{this.leavingItems=this.leavingItems.filter((e=>e.hoverAmount>0))};shouldStep=()=>{const e=this.leavingItems.length>0,t=void 0!==this.currentHoveredItem&&this.currentHoveredItem.hoverAmount<1;return e||t};getAnimatingItems=()=>void 0!==this.currentHoveredItem?[...this.leavingItems,this.currentHoveredItem]:this.leavingItems.map((e=>({...e,hoverAmount:ne(e.hoverAmount)})));step=e=>{if(void 0===this.lastAnimationTime)this.lastAnimationTime=e;else{const t=(e-this.lastAnimationTime)/80;for(const e of this.leavingItems)e.hoverAmount=i(e.hoverAmount-t,0,1);void 0!==this.currentHoveredItem&&(this.currentHoveredItem.hoverAmount=i(this.currentHoveredItem.hoverAmount+t,0,1));const n=this.getAnimatingItems();this.callback(n),this.cleanUpLeavingElements()}this.shouldStep()?(this.lastAnimationTime=e,window.requestAnimationFrame(this.step)):this.lastAnimationTime=void 0};setHovered=e=>{if(!(0,d.pU)(this.currentHoveredItem?.item,e)){if(void 0!==this.currentHoveredItem&&this.addToLeavingItems(this.currentHoveredItem),void 0!==e){const t=this.removeFromLeavingItems(e);this.currentHoveredItem={item:e,hoverAmount:t}}else this.currentHoveredItem=void 0;void 0===this.lastAnimationTime&&window.requestAnimationFrame(this.step)}}}class oe{fn;val;constructor(e){this.fn=e}get value(){return this.val??(this.val=this.fn())}}function ie(e){return new oe(e)}const ae=ie((()=>window.navigator.userAgent.includes("Firefox"))),le=ie((()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome"))),se=ie((()=>window.navigator.platform.toLowerCase().startsWith("mac")));const ce="header",ue="group-header",de="out-of-bounds";var he;function fe(e,t){return e===t||("out-of-bounds"===e?.kind?e?.kind===t?.kind&&e?.location[0]===t?.location[0]&&e?.location[1]===t?.location[1]&&e?.region[0]===t?.region[0]&&e?.region[1]===t?.region[1]:e?.kind===t?.kind&&e?.location[0]===t?.location[0]&&e?.location[1]===t?.location[1])}!function(e){e[e.Start=-2]="Start",e[e.StartPadding=-1]="StartPadding",e[e.Center=0]="Center",e[e.EndPadding=1]="EndPadding",e[e.End=2]="End"}(he||(he={}));const pe=r.memo(r.forwardRef(((e,t)=>{const{width:n,height:a,accessibilityHeight:l,columns:c,cellXOffset:h,cellYOffset:p,headerHeight:g,fillHandle:v=!1,groupHeaderHeight:k,rowHeight:C,rows:S,getCellContent:M,getRowThemeOverride:R,onHeaderMenuClick:E,onHeaderIndicatorClick:I,enableGroups:O,isFilling:P,onCanvasFocused:D,onCanvasBlur:H,isFocused:z,selection:L,freezeColumns:F,onContextMenu:A,freezeTrailingRows:V,fixedShadowX:_=!0,fixedShadowY:$=!0,drawFocusRing:B,onMouseDown:W,onMouseUp:j,onMouseMoveRaw:X,onMouseMove:Y,onItemHovered:K,dragAndDropState:q,firstColAccessible:Q,onKeyDown:J,onKeyUp:ee,highlightRegions:ne,canvasRef:oe,onDragStart:ie,onDragEnd:se,eventTargetRef:pe,isResizing:ge,resizeColumn:me,isDragging:ve,isDraggable:we=!1,allowResize:be,disabledRows:ye,hasAppendRow:xe,getGroupDetails:ke,theme:Ce,prelightCells:Se,headerIcons:Me,verticalBorder:Re,drawCell:Ee,drawHeader:Ie,onCellFocused:Oe,onDragOverCell:Te,onDrop:Pe,onDragLeave:De,imageWindowLoader:He,smoothScrollX:ze=!1,smoothScrollY:Le=!1,experimental:Fe,getCellRenderer:Ae,resizeIndicator:Ve="full"}=e,_e=e.translateX??0,Ne=e.translateY??0,$e=Math.max(F,Math.min(c.length-1,h)),Be=r.useRef(null),We=r.useRef(window),Ze=We.current,je=He,Ue=r.useRef(),[Xe,Ge]=r.useState(!1),Ye=r.useRef([]),Ke=r.useRef(),[qe,Qe]=r.useState(),[Je,et]=r.useState(),tt=r.useRef(null),[nt,rt]=r.useState(),[ot,it]=r.useState(!1),at=r.useRef(ot);at.current=ot;const lt=r.useMemo((()=>new y(Me,(()=>{St.current=void 0,It.current()}))),[Me]),st=O?k+g:g,ct=r.useRef(-1),ut=(Fe?.enableFirefoxRescaling??!1)&&ae.value,dt=(Fe?.enableSafariRescaling??!1)&&le.value;r.useLayoutEffect((()=>{1!==window.devicePixelRatio&&(ut||dt)&&(-1!==ct.current&&Ge(!0),window.clearTimeout(ct.current),ct.current=window.setTimeout((()=>{Ge(!1),ct.current=-1}),200))}),[p,$e,_e,Ne,ut,dt]);const ht=(0,d.NZ)(c,F),ft=_?(0,d.G6)(ht,q):0,pt=r.useCallback(((e,t,r)=>{const o=e.getBoundingClientRect();if(t>=ht.length||r>=S)return;const i=o.width/n,l=(0,d.Ve)(t,r,n,a,k,st,$e,p,_e,Ne,S,F,V,ht,C);return 1!==i&&(l.x*=i,l.y*=i,l.width*=i,l.height*=i),l.x+=o.x,l.y+=o.y,l}),[n,a,k,st,$e,p,_e,Ne,S,F,V,ht,C]),gt=r.useCallback(((e,t,r,i)=>{const l=e.getBoundingClientRect(),s=l.width/n,c=(t-l.left)/s,u=(r-l.top)/s,h=(0,d.ih)(ht,$e,n,void 0,_e);let f=0,m=0;i instanceof MouseEvent&&(f=i.button,m=i.buttons);const w=(0,d.oK)(c,h,_e),b=(0,d.pV)(u,a,O,g,k,S,C,p,Ne,V),y=!0===i?.shiftKey,M=!0===i?.ctrlKey,R=!0===i?.metaKey,E=void 0!==i&&!(i instanceof MouseEvent)||"touch"===i?.pointerType,I=[c<0?-1:n<c?1:0,u<st?-1:a<u?1:0];let T;if(-1===w||u<0||c<0||void 0===b||c>n||u>a){const r=c>n?1:c<0?-1:0,i=u>a?1:u<0?-1:0;let l=2*r,s=2*i;0===r&&(l=-1===w?he.EndPadding:he.Center),0===i&&(s=void 0===b?he.EndPadding:he.Center);let d=!1;if(-1===w&&-1===b){const n=pt(e,ht.length-1,-1);(0,o.hu)(void 0!==n),d=t<n.x+n.width+5}const h=c>n&&c<n+(0,x.Iz)()||u>a&&u<a+(0,x.Iz)();T={kind:de,location:[-1!==w?w:c<0?0:ht.length-1,b??S-1],region:[l,s],shiftKey:y,ctrlKey:M,metaKey:R,isEdge:d,isTouch:E,button:f,buttons:m,scrollEdge:I,isMaybeScrollbar:h}}else if(b<=-1){let n=pt(e,w,b);(0,o.hu)(void 0!==n);let i=void 0!==n&&n.x+n.width-t<=5;const a=w-1;t-n.x<=5&&a>=0?(i=!0,n=pt(e,a,b),(0,o.hu)(void 0!==n),T={kind:O&&-2===b?ue:ce,location:[a,b],bounds:n,group:ht[a].group??"",isEdge:i,shiftKey:y,ctrlKey:M,metaKey:R,isTouch:E,localEventX:t-n.x,localEventY:r-n.y,button:f,buttons:m,scrollEdge:I}):T={kind:O&&-2===b?ue:ce,group:ht[w].group??"",location:[w,b],bounds:n,isEdge:i,shiftKey:y,ctrlKey:M,metaKey:R,isTouch:E,localEventX:t-n.x,localEventY:r-n.y,button:f,buttons:m,scrollEdge:I}}else{const n=pt(e,w,b);(0,o.hu)(void 0!==n);const i=void 0!==n&&n.x+n.width-t<5;let a=!1;if(v&&void 0!==L.current){const n=(0,d.zU)(L.current.range),o=pt(e,n[0],n[1]);if(void 0!==o){const e=o.x+o.width-2,n=o.y+o.height-2;a=Math.abs(e-t)<6&&Math.abs(n-r)<6}}T={kind:"cell",location:[w,b],bounds:n,isEdge:i,shiftKey:y,ctrlKey:M,isFillHandle:a,metaKey:R,isTouch:E,localEventX:t-n.x,localEventY:r-n.y,button:f,buttons:m,scrollEdge:I}}return T}),[n,ht,$e,_e,a,O,g,k,S,C,p,Ne,V,pt,v,L,st]),[mt]=qe??[],vt=r.useRef((()=>{})),wt=r.useRef(qe);wt.current=qe;const[bt,yt]=r.useMemo((()=>{const e=document.createElement("canvas"),t=document.createElement("canvas");return e.style.display="none",e.style.opacity="0",e.style.position="fixed",t.style.display="none",t.style.opacity="0",t.style.position="fixed",[e.getContext("2d",{alpha:!1}),t.getContext("2d",{alpha:!1})]}),[]);r.useLayoutEffect((()=>{if(null!==bt&&null!==yt)return document.documentElement.append(bt.canvas),document.documentElement.append(yt.canvas),()=>{bt.canvas.remove(),yt.canvas.remove()}}),[bt,yt]);const xt=r.useMemo((()=>new w),[]),kt=ut&&Xe?1:dt&&Xe?2:5,Ct=!0===Fe?.disableMinimumCellWidth?1:10,St=r.useRef(),Mt=r.useRef(null),Rt=r.useRef(null),Et=r.useCallback((()=>{const e=Be.current,t=tt.current;if(null===e||null===t)return;if(null===Mt.current&&(Mt.current=e.getContext("2d",{alpha:!1}),e.width=0,e.height=0),null===Rt.current&&(Rt.current=t.getContext("2d",{alpha:!1}),t.width=0,t.height=0),null===Mt.current||null===Rt.current||null===bt||null===yt)return;let r=!1;const o=St.current,i={headerCanvasCtx:Rt.current,canvasCtx:Mt.current,bufferACtx:bt,bufferBCtx:yt,width:n,height:a,cellXOffset:$e,cellYOffset:p,translateX:Math.round(_e),translateY:Math.round(Ne),mappedColumns:ht,enableGroups:O,freezeColumns:F,dragAndDropState:q,theme:Ce,headerHeight:g,groupHeaderHeight:k,disabledRows:ye??u.EV.empty(),rowHeight:C,verticalBorder:Re,isResizing:ge,resizeCol:me,isFocused:z,selection:L,fillHandle:v,drawCellCallback:Ee,hasAppendRow:xe,overrideCursor:e=>{r=!0,rt(e)},maxScaleFactor:kt,freezeTrailingRows:V,rows:S,drawFocus:B,getCellContent:M,getGroupDetails:ke??(e=>({name:e})),getRowThemeOverride:R,drawHeaderCallback:Ie,prelightCells:Se,highlightRegions:ne,imageLoader:je,lastBlitData:Ke,damage:Ue.current,hoverValues:Ye.current,hoverInfo:wt.current,spriteManager:lt,scrolling:Xe,hyperWrapping:Fe?.hyperWrapping??!1,touchMode:ot,enqueue:vt.current,renderStateProvider:xt,renderStrategy:Fe?.renderStrategy??(le.value?"double-buffer":"single-buffer"),getCellRenderer:Ae,minimumCellWidth:Ct,resizeIndicator:Ve};void 0===i.damage?(St.current=i,te(i,o)):te(i,void 0),r||void 0!==i.damage&&!i.damage.has(wt?.current?.[0])||rt(void 0)}),[bt,yt,n,a,$e,p,_e,Ne,ht,O,F,q,Ce,g,k,ye,C,Re,ge,xe,me,z,L,v,V,S,B,kt,M,ke,R,Ee,Ie,Se,ne,je,lt,Xe,Fe?.hyperWrapping,Fe?.renderStrategy,ot,xt,Ae,Ct,Ve]),It=r.useRef(Et);r.useLayoutEffect((()=>{Et(),It.current=Et}),[Et]),r.useLayoutEffect((()=>{(async()=>{void 0!==document?.fonts?.ready&&(await document.fonts.ready,St.current=void 0,It.current())})()}),[]);const Ot=r.useCallback((e=>{Ue.current=e,It.current(),Ue.current=void 0}),[]),Tt=function(e){const t=r.useRef([]),n=r.useRef(0),o=r.useRef(e);o.current=e;const i=r.useCallback((()=>{const e=()=>{const e=t.current.map(m);t.current=[],o.current(new b(e)),t.current.length>0?n.current++:n.current=0};window.requestAnimationFrame(n.current>600?()=>window.requestAnimationFrame(e):e)}),[]);return r.useCallback((e=>{0===t.current.length&&i();const n=f(e[0],e[1]);t.current.includes(n)||t.current.push(n)}),[i])}(Ot);vt.current=Tt;const Pt=r.useCallback((e=>{Ot(new b(e.map((e=>e.cell))))}),[Ot]);je.setCallback(Ot);const[Dt,Ht]=r.useState(!1),[zt,Lt]=mt??[],Ft=void 0!==zt&&-1===Lt,At=void 0!==zt&&-2===Lt;let Vt=!1,_t=!1,Nt=nt;if(void 0===Nt&&void 0!==zt&&void 0!==Lt&&Lt>-1&&Lt<S){const e=M([zt,Lt],!0);Vt=e.kind===u.$o.NewRow||e.kind===u.$o.Marker&&"number"!==e.markerKind,_t=e.kind===u.p6.Boolean&&(0,u.kf)(e),Nt=e.cursor}const $t=ve?"grabbing":(Je??!1)||ge?"col-resize":Dt||P?"crosshair":void 0!==Nt?Nt:Ft||Vt||_t||At?"pointer":"default",Bt=r.useMemo((()=>({contain:"strict",display:"block",cursor:$t})),[$t]),Wt=r.useRef("default"),Zt=pe?.current;null!==Zt&&void 0!==Zt&&Wt.current!==Bt.cursor&&(Zt.style.cursor=Wt.current=Bt.cursor);const jt=r.useCallback(((e,t,n,r)=>{if(void 0===ke)return;const o=ke(e);if(void 0!==o.actions){const e=Z(t,o.actions);for(const[i,a]of e.entries())if(T(a,n+t.x,r+a.y))return o.actions[i]}}),[ke]),Ut=r.useCallback(((e,t,n,r)=>{const i=ht[t];if(!ve&&!ge&&!Je){const a=pt(e,t,-1);(0,o.hu)(void 0!==a);const l=U(void 0,i,a.x,a.y,a.width,a.height,Ce,"rtl"===(0,x.o7)(i.title));if(!0===i.hasMenu&&void 0!==l.menuBounds&&T(l.menuBounds,n,r))return{area:"menu",bounds:l.menuBounds};if(void 0!==i.indicatorIcon&&void 0!==l.indicatorIconBounds&&T(l.indicatorIconBounds,n,r))return{area:"indicator",bounds:l.indicatorIconBounds}}}),[ht,pt,Je,ve,ge,Ce]),Xt=r.useRef(0),Gt=r.useRef(),Yt=r.useRef(!1),Kt=r.useCallback((e=>{const t=Be.current,n=pe?.current;if(null===t||e.target!==t&&e.target!==n)return;let r,o;if(Yt.current=!0,e instanceof MouseEvent?(r=e.clientX,o=e.clientY):(r=e.touches[0].clientX,o=e.touches[0].clientY),e.target===n&&null!==n){const e=n.getBoundingClientRect();if(r>e.right||o>e.bottom)return}const i=gt(t,r,o,e);if(Gt.current=i.location,i.isTouch&&(Xt.current=Date.now()),at.current!==i.isTouch&&it(i.isTouch),i.kind!==ce||void 0===Ut(t,i.location[0],r,o)){if(i.kind===ue){if(void 0!==jt(i.group,i.bounds,i.localEventX,i.localEventY))return}W?.(i),!i.isTouch&&!0!==we&&we!==i.kind&&i.button<3&&1!==i.button&&e.preventDefault()}}),[pe,we,gt,jt,Ut,W]);(0,x.OR)("touchstart",Kt,Ze,!1),(0,x.OR)("mousedown",Kt,Ze,!1);const qt=r.useRef(0),Qt=r.useCallback((e=>{const t=qt.current;qt.current=Date.now();const n=Be.current;if(Yt.current=!1,void 0===j||null===n)return;const r=pe?.current,o=e.target!==n&&e.target!==r;let i,a,l=!0;if(e instanceof MouseEvent){if(i=e.clientX,a=e.clientY,l=e.button<3,"touch"===e.pointerType)return}else i=e.changedTouches[0].clientX,a=e.changedTouches[0].clientY;let s=gt(n,i,a,e);s.isTouch&&0!==Xt.current&&Date.now()-Xt.current>500&&(s={...s,isLongTouch:!0}),0!==t&&Date.now()-t<(s.isTouch?1e3:500)&&(s={...s,isDoubleClick:!0}),at.current!==s.isTouch&&it(s.isTouch),!o&&e.cancelable&&l&&e.preventDefault();const[c]=s.location,u=Ut(n,c,i,a);if(s.kind!==ce||void 0===u){if(s.kind===ue){const e=jt(s.group,s.bounds,s.localEventX,s.localEventY);if(void 0!==e)return void(0===s.button&&e.onClick(s))}j(s,o)}else 0===s.button&&Gt.current?.[0]===c&&-1===Gt.current?.[1]||j(s,!0)}),[j,pe,gt,Ut,jt]);(0,x.OR)("mouseup",Qt,Ze,!1),(0,x.OR)("touchend",Qt,Ze,!1);const Jt=r.useCallback((e=>{const t=Be.current;if(null===t)return;const n=pe?.current,r=e.target!==t&&e.target!==n;let o,i,a=!0;e instanceof MouseEvent?(o=e.clientX,i=e.clientY,a=e.button<3):(o=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY);const l=gt(t,o,i,e);at.current!==l.isTouch&&it(l.isTouch),!r&&e.cancelable&&a&&e.preventDefault();const[s]=l.location;if(l.kind===ce){const e=Ut(t,s,o,i);void 0!==e&&0===l.button&&Gt.current?.[0]===s&&-1===Gt.current?.[1]&&("menu"===e.area?E?.(s,e.bounds):"indicator"===e.area&&I?.(s,e.bounds))}else if(l.kind===ue){const e=jt(l.group,l.bounds,l.localEventX,l.localEventY);void 0!==e&&0===l.button&&e.onClick(l)}}),[pe,gt,Ut,E,I,jt]);(0,x.OR)("click",Jt,Ze,!1);const en=r.useCallback((e=>{const t=Be.current,n=pe?.current;if(null===t||e.target!==t&&e.target!==n||void 0===A)return;const r=gt(t,e.clientX,e.clientY,e);A(r,(()=>{e.cancelable&&e.preventDefault()}))}),[pe,gt,A]);(0,x.OR)("contextmenu",en,pe?.current??null,!1);const tn=r.useCallback((e=>{Ue.current=new b(e.map((e=>e.item))),Ye.current=e,It.current(),Ue.current=void 0}),[]),nn=r.useMemo((()=>new re(tn)),[tn]),rn=r.useRef(nn);rn.current=nn,r.useLayoutEffect((()=>{const e=rn.current;if(void 0===mt||mt[1]<0)return void e.setHovered(mt);const t=M(mt,!0),n=Ae(t),r=void 0===n&&t.kind===u.p6.Custom||void 0!==n?.needsHover&&("boolean"===typeof n.needsHover?n.needsHover:n.needsHover(t));e.setHovered(r?mt:void 0)}),[M,Ae,mt]);const on=r.useRef(),an=r.useCallback((e=>{const t=Be.current;if(null===t)return;const n=pe?.current,r=e.target!==t&&e.target!==n,o=gt(t,e.clientX,e.clientY,e);if("out-of-bounds"!==o.kind&&r&&!Yt.current&&!o.isTouch)return;const i=(e,t)=>{Qe((n=>n===e?n:n?.[0][0]!==e?.[0][0]||n?.[0][1]!==e?.[0][1]||(n?.[1][0]!==e?.[1][0]||n?.[1][1]!==e?.[1][1])&&t?e:n))};if(fe(o,on.current)){if("cell"===o.kind||o.kind===ce||o.kind===ue){let e=!1,t=!0;if("cell"===o.kind){const n=M(o.location),r=Ae(n)?.needsHoverPosition;t=r??n.kind===u.p6.Custom,e=t}else e=!0;const n=[o.location,[o.localEventX,o.localEventY]];i(n,t),wt.current=n,e&&Ot(new b([o.location]))}}else rt(void 0),K?.(o),i(o.kind===de?void 0:[o.location,[o.localEventX,o.localEventY]],!0),on.current=o;const a=o.location[0]>=(Q?0:1);et(o.kind===ce&&o.isEdge&&a&&!0===be),Ht("cell"===o.kind&&o.isFillHandle),X?.(e),Y(o)}),[pe,gt,Q,be,X,Y,K,M,Ae,Ot]);(0,x.OR)("mousemove",an,Ze,!0);const ln=r.useCallback((e=>{const t=Be.current;if(null===t)return;let n,r;void 0!==L.current&&(n=pt(t,L.current.cell[0],L.current.cell[1]),r=L.current.cell),J?.({bounds:n,stopPropagation:()=>e.stopPropagation(),preventDefault:()=>e.preventDefault(),cancel:()=>{},ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,altKey:e.altKey,key:e.key,keyCode:e.keyCode,rawEvent:e,location:r})}),[J,L,pt]),sn=r.useCallback((e=>{const t=Be.current;if(null===t)return;let n,r;void 0!==L.current&&(n=pt(t,L.current.cell[0],L.current.cell[1]),r=L.current.cell),ee?.({bounds:n,stopPropagation:()=>e.stopPropagation(),preventDefault:()=>e.preventDefault(),cancel:()=>{},ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,altKey:e.altKey,key:e.key,keyCode:e.keyCode,rawEvent:e,location:r})}),[ee,L,pt]),cn=r.useCallback((e=>{if(Be.current=e,void 0!==oe&&(oe.current=e),null===e)We.current=window;else{const t=e.getRootNode();t===document&&(We.current=window),We.current=t}}),[oe]),un=r.useCallback((e=>{const t=Be.current;if(null===t||!1===we||ge)return void e.preventDefault();let n,r;const i=gt(t,e.clientX,e.clientY);if(!0!==we&&i.kind!==we)return void e.preventDefault();let a,l,s;let c=!1;if(ie?.({...i,setData:(e,t)=>{n=e,r=t},setDragImage:(e,t,n)=>{a=e,l=t,s=n},preventDefault:()=>c=!0,defaultPrevented:()=>c}),c||void 0===n||void 0===r||null===e.dataTransfer)e.preventDefault();else if(e.dataTransfer.setData(n,r),e.dataTransfer.effectAllowed="copyLink",void 0!==a&&void 0!==l&&void 0!==s)e.dataTransfer.setDragImage(a,l,s);else{const[n,r]=i.location;if(void 0!==r){const i=document.createElement("canvas"),a=pt(t,n,r);(0,o.hu)(void 0!==a);const l=Math.ceil(window.devicePixelRatio??1);i.width=a.width*l,i.height=a.height*l;const s=i.getContext("2d");null!==s&&(s.scale(l,l),s.textBaseline="middle",-1===r?(s.font=Ce.headerFontFull,s.fillStyle=Ce.bgHeader,s.fillRect(0,0,i.width,i.height),G(s,0,0,a.width,a.height,ht[n],!1,Ce,!1,void 0,void 0,!1,0,lt,Ie,!1)):(s.font=Ce.baseFontFull,s.fillStyle=Ce.bgCell,s.fillRect(0,0,i.width,i.height),N(s,M([n,r]),0,r,!1,!1,0,0,a.width,a.height,!1,Ce,Ce.bgCell,je,lt,1,void 0,!1,0,void 0,void 0,void 0,xt,Ae,(()=>{})))),i.style.left="-100%",i.style.position="absolute",i.style.width=`${a.width}px`,i.style.height=`${a.height}px`,document.body.append(i),e.dataTransfer.setDragImage(i,a.width/2,a.height/2),window.setTimeout((()=>{i.remove()}),0)}}}),[we,ge,gt,ie,pt,Ce,ht,lt,Ie,M,je,xt,Ae]);(0,x.OR)("dragstart",un,pe?.current??null,!1,!1);const dn=r.useRef(),hn=r.useCallback((e=>{const t=Be.current;if(void 0!==Pe&&e.preventDefault(),null===t||void 0===Te)return;const n=gt(t,e.clientX,e.clientY),[r,o]=n.location,i=r-(Q?0:1),[a,l]=dn.current??[];a===i&&l===o||(dn.current=[i,o],Te([i,o],e.dataTransfer))}),[Q,gt,Te,Pe]);(0,x.OR)("dragover",hn,pe?.current??null,!1,!1);const fn=r.useCallback((()=>{dn.current=void 0,se?.()}),[se]);(0,x.OR)("dragend",fn,pe?.current??null,!1,!1);const pn=r.useCallback((e=>{const t=Be.current;if(null===t||void 0===Pe)return;e.preventDefault();const n=gt(t,e.clientX,e.clientY),[r,o]=n.location;Pe([r-(Q?0:1),o],e.dataTransfer)}),[Q,gt,Pe]);(0,x.OR)("drop",pn,pe?.current??null,!1,!1);const gn=r.useCallback((()=>{De?.()}),[De]);(0,x.OR)("dragleave",gn,pe?.current??null,!1,!1);const mn=r.useRef(L);mn.current=L;const vn=r.useRef(null),wn=r.useCallback((e=>{null!==Be.current&&Be.current.contains(document.activeElement)&&(null===e&&void 0!==mn.current.current?oe?.current?.focus({preventScroll:!0}):null!==e&&e.focus({preventScroll:!0}),vn.current=e)}),[oe]);r.useImperativeHandle(t,(()=>({focus:()=>{const e=vn.current;null!==e&&document.contains(e)?e.focus({preventScroll:!0}):oe?.current?.focus({preventScroll:!0})},getBounds:(e,t)=>{if(void 0!==oe&&null!==oe.current)return pt(oe.current,e??0,t??-1)},damage:Pt})),[oe,Pt,pt]);const bn=r.useRef(),yn=(0,x.Qy)((()=>{if(n<50||!0===Fe?.disableAccessibilityTree)return null;let e=(0,d.ih)(ht,$e,n,q,_e);const t=Q?0:-1;Q||0!==e[0]?.sourceIndex||(e=e.slice(1));const[o,i]=L.current?.cell??[],a=L.current?.range,c=e.map((e=>e.sourceIndex)),h=s(p,Math.min(S,p+l));return void 0===o||void 0===i||c.includes(o)&&h.includes(i)||wn(null),r.createElement("table",{key:"access-tree",role:"grid","aria-rowcount":S+1,"aria-multiselectable":"true","aria-colcount":ht.length+t},r.createElement("thead",{role:"rowgroup"},r.createElement("tr",{role:"row","aria-rowindex":1},e.map((e=>r.createElement("th",{role:"columnheader","aria-selected":L.columns.hasIndex(e.sourceIndex),"aria-colindex":e.sourceIndex+1+t,tabIndex:-1,onFocus:t=>{if(t.target!==vn.current)return Oe?.([e.sourceIndex,-1])},key:e.sourceIndex},e.title))))),r.createElement("tbody",{role:"rowgroup"},h.map((n=>r.createElement("tr",{role:"row","aria-selected":L.rows.hasIndex(n),key:n,"aria-rowindex":n+2},e.map((e=>{const l=e.sourceIndex,s=f(l,n),c=o===l&&i===n,d=void 0!==a&&l>=a.x&&l<a.x+a.width&&n>=a.y&&n<a.y+a.height,h=`glide-cell-${l}-${n}`,p=[l,n],g=M(p,!0);return r.createElement("td",{key:s,role:"gridcell","aria-colindex":l+1+t,"aria-selected":d,"aria-readonly":(0,u.rs)(g)||!(0,u.Qo)(g),id:h,"data-testid":h,onClick:()=>{const e=oe?.current;if(null!==e&&void 0!==e)return J?.({bounds:pt(e,l,n),cancel:()=>{},preventDefault:()=>{},stopPropagation:()=>{},ctrlKey:!1,key:"Enter",keyCode:13,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:p})},onFocusCapture:e=>{if(e.target!==vn.current&&(bn.current?.[0]!==l||bn.current?.[1]!==n))return bn.current=p,Oe?.(p)},ref:c?wn:void 0,tabIndex:-1},((e,t)=>{if(e.kind===u.p6.Custom)return e.copyData;const n=t?.(e);return n?.getAccessibilityString(e)??""})(g,Ae))})))))))}),[n,ht,$e,q,_e,S,p,l,L,wn,M,oe,J,pt,Oe],200),xn=0!==F&&_?$e>F?1:i(-_e/100,0,1):0,kn=$?i(-(32*-p+Ne)/100,0,1):0,Cn=r.useMemo((()=>{if(!xn&&!kn)return null;const e={position:"absolute",top:0,left:ft,width:n-ft,height:a,opacity:xn,pointerEvents:"none",transition:ze?void 0:"opacity 0.2s",boxShadow:"inset 13px 0 10px -13px rgba(0, 0, 0, 0.2)"},t={position:"absolute",top:st,left:0,width:n,height:a,opacity:kn,pointerEvents:"none",transition:Le?void 0:"opacity 0.2s",boxShadow:"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)"};return r.createElement(r.Fragment,null,xn>0&&r.createElement("div",{id:"shadow-x",style:e}),kn>0&&r.createElement("div",{id:"shadow-y",style:t}))}),[xn,kn,ft,n,ze,st,a,Le]),Sn=r.useMemo((()=>({position:"absolute",top:0,left:0})),[]);return r.createElement(r.Fragment,null,r.createElement("canvas",{"data-testid":"data-grid-canvas",tabIndex:0,onKeyDown:ln,onKeyUp:sn,onFocus:D,onBlur:H,ref:cn,style:Bt},yn),r.createElement("canvas",{ref:tt,style:Sn}),Cn)})));function ge(e,t,n,r){return i(Math.round(t-(e.growOffset??0)),Math.ceil(n),Math.floor(r))}const me=e=>{const[t,n]=r.useState(),[o,i]=r.useState(),[a,l]=r.useState(),[s,c]=r.useState(),[u,d]=r.useState(!1),[h,f]=r.useState(),[p,g]=r.useState(),[m,v]=r.useState(),[w,b]=r.useState(!1),[y,x]=r.useState(),{onHeaderMenuClick:k,onHeaderIndicatorClick:C,getCellContent:S,onColumnMoved:M,onColumnResize:R,onColumnResizeStart:E,onColumnResizeEnd:I,gridRef:O,maxColumnWidth:T,minColumnWidth:P,onRowMoved:D,lockColumns:H,onColumnProposeMove:z,onMouseDown:L,onMouseUp:F,onItemHovered:A,onDragStart:V,canvasRef:_}=e,N=void 0!==(R??I??E),{columns:$,selection:B}=e,W=B.columns,Z=r.useCallback((e=>{const[t,n]=e.location;void 0!==a&&s!==t&&t>=H?(d(!0),c(t)):void 0!==p&&void 0!==n?(b(!0),v(Math.max(0,n))):void 0!==o||u||w||A?.(e)}),[a,p,s,A,H,o,u,w]),j=void 0!==M,U=r.useCallback((e=>{if(0===e.button){const[t,r]=e.location;if("out-of-bounds"===e.kind&&e.isEdge&&N){const e=O?.current?.getBounds($.length-1,-1);void 0!==e&&(n(e.x),i($.length-1))}else if("header"===e.kind&&t>=H){const r=_?.current;if(e.isEdge&&N&&r){n(e.bounds.x),i(t);const o=r.getBoundingClientRect().width/r.offsetWidth,a=e.bounds.width/o;E?.($[t],a,t,a+($[t].growOffset??0))}else"header"===e.kind&&j&&(f(e.bounds.x),l(t))}else"cell"===e.kind&&H>0&&0===t&&void 0!==r&&void 0!==D&&(x(e.bounds.y),g(r))}L?.(e)}),[L,N,H,D,O,$,j,E,_]),X=r.useCallback(((e,t)=>{u||w||k?.(e,t)}),[u,w,k]),G=r.useCallback(((e,t)=>{u||w||C?.(e,t)}),[u,w,C]),Y=r.useRef(-1),K=r.useCallback((()=>{Y.current=-1,g(void 0),v(void 0),x(void 0),b(!1),l(void 0),c(void 0),f(void 0),d(!1),i(void 0),n(void 0)}),[]),q=r.useCallback(((e,t)=>{if(0===e.button){if(void 0!==o){if(!0===W?.hasIndex(o))for(const t of W){if(t===o)continue;const e=$[t],n=ge(e,Y.current,P,T);R?.(e,n,t,n+(e.growOffset??0))}const e=ge($[o],Y.current,P,T);if(I?.($[o],e,o,e+($[o].growOffset??0)),W.hasIndex(o))for(const t of W){if(t===o)continue;const e=$[t],n=ge(e,Y.current,P,T);I?.(e,n,t,n+(e.growOffset??0))}}K(),void 0!==a&&void 0!==s&&M?.(a,s),void 0!==p&&void 0!==m&&D?.(p,m)}F?.(e,t)}),[F,o,a,s,p,m,W,I,$,P,T,R,M,D,K]),Q=r.useMemo((()=>{if(void 0!==a&&void 0!==s&&a!==s&&!1!==z?.(a,s))return{src:a,dest:s}}),[a,s,z]),J=r.useCallback((e=>{const n=_?.current;if(void 0!==a&&void 0!==h){Math.abs(e.clientX-h)>20&&d(!0)}else if(void 0!==p&&void 0!==y){Math.abs(e.clientY-y)>20&&b(!0)}else if(void 0!==o&&void 0!==t&&n){const r=n.getBoundingClientRect().width/n.offsetWidth,i=(e.clientX-t)/r,a=$[o],l=ge(a,i,P,T);if(R?.(a,l,o,l+(a.growOffset??0)),Y.current=i,W?.first()===o)for(const e of W){if(e===o)continue;const t=$[e],n=ge(t,Y.current,P,T);R?.(t,n,e,n+(t.growOffset??0))}}}),[a,h,p,y,o,t,$,P,T,R,W,_]),ee=r.useCallback(((e,t)=>{if(void 0===p||void 0===m)return S(e,t);let[n,r]=e;return r===m?r=p:(r>m&&(r-=1),r>=p&&(r+=1)),S([n,r],t)}),[p,m,S]),te=r.useCallback((e=>{V?.(e),e.defaultPrevented()||K()}),[K,V]);return r.createElement(pe,{accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,drawCell:e.drawCell,enableGroups:e.enableGroups,eventTargetRef:e.eventTargetRef,experimental:e.experimental,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,headerIcons:e.headerIcons,height:e.height,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,resizeColumn:o,isDraggable:e.isDraggable,isFilling:e.isFilling,isFocused:e.isFocused,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDrop:e.onDrop,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,resizeIndicator:e.resizeIndicator,verticalBorder:e.verticalBorder,width:e.width,getCellContent:ee,isResizing:void 0!==o,onHeaderMenuClick:X,onHeaderIndicatorClick:G,isDragging:u,onItemHovered:Z,onDragStart:te,onMouseDown:U,allowResize:N,onMouseUp:q,dragAndDropState:Q,onMouseMoveRaw:J,ref:O})};var ve=n(77650);const we=(e,t,n)=>{const o=(0,r.useRef)(null),i=(0,r.useRef)(null),a=(0,r.useRef)(null),l=(0,r.useRef)(0),s=(0,r.useRef)(t);s.current=t;const c=n.current;(0,r.useEffect)((()=>{const t=()=>{if(!1===i.current&&null!==c){const e=[c.scrollLeft,c.scrollTop];if(a.current?.[0]===e[0]&&a.current?.[1]===e[1]){if(l.current>10)return a.current=null,void(i.current=null);l.current++}else l.current=0,s.current(e[0],e[1]),a.current=e;o.current=window.setTimeout(t,1e3/120)}},n=()=>{i.current=!0,a.current=null,null!==o.current&&(window.clearTimeout(o.current),o.current=null)},r=e=>{0===e.touches.length&&(i.current=!1,l.current=0,o.current=window.setTimeout(t,1e3/120))};if(e&&null!==c){const e=c;return e.addEventListener("touchstart",n),e.addEventListener("touchend",r),()=>{e.removeEventListener("touchstart",n),e.removeEventListener("touchend",r),null!==o.current&&window.clearTimeout(o.current)}}}),[e,c])},be=(0,ve.z)("div")({name:"ScrollRegionStyle",class:"gdg-s1dgczr6",propsAsIs:!1,vars:{"s1dgczr6-0":[e=>e.isSafari?"scroll":"auto"]}});const ye=e=>{const{children:t,clientHeight:n,scrollHeight:o,scrollWidth:i,update:a,draggable:l,className:s,preventDiagonalScrolling:c=!1,paddingBottom:u=0,paddingRight:d=0,rightElement:h,rightElementProps:f,kineticScrollPerfHack:p=!1,scrollRef:g,initialSize:m}=e,v=[],w=f?.sticky??!1,b=f?.fill??!1,y=r.useRef(0),k=r.useRef(0),C=r.useRef(null),S="undefined"===typeof window?1:window.devicePixelRatio,M=r.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),R=r.useRef(null),E=function(e){const[t,n]=r.useState(!1),o="undefined"===typeof window?null:window,i=r.useRef(0);return(0,x.OR)("touchstart",r.useCallback((()=>{window.clearTimeout(i.current),n(!0)}),[]),o,!0,!1),(0,x.OR)("touchend",r.useCallback((t=>{0===t.touches.length&&(i.current=window.setTimeout((()=>n(!1)),e))}),[e]),o,!0,!1),t}(200),[I,O]=r.useState(!0),T=r.useRef(0);r.useLayoutEffect((()=>{if(!I||E||void 0===M.current.lockDirection)return;const e=C.current;if(null===e)return;const[t,n]=M.current.lockDirection;void 0!==t?e.scrollLeft=t:void 0!==n&&(e.scrollTop=n),M.current.lockDirection=void 0}),[E,I]);const P=r.useCallback(((e,t)=>{const n=C.current;if(null===n)return;t=t??n.scrollTop,e=e??n.scrollLeft;const r=M.current.scrollTop,i=M.current.scrollLeft,l=e-i,s=t-r;E&&0!==l&&0!==s&&(Math.abs(l)>3||Math.abs(s)>3)&&c&&void 0===M.current.lockDirection&&(M.current.lockDirection=Math.abs(l)<Math.abs(s)?[i,void 0]:[void 0,r]);const h=M.current.lockDirection;e=h?.[0]??e,t=h?.[1]??t,M.current.scrollLeft=e,M.current.scrollTop=t;const f=n.clientWidth,p=n.clientHeight,g=t,m=k.current-g,v=n.scrollHeight-p;if(k.current=g,v>0&&(Math.abs(m)>2e3||0===g||g===v)&&o>n.scrollHeight+5){const e=(o-p)*(g/v);y.current=e-g}void 0!==h&&(window.clearTimeout(T.current),O(!1),T.current=window.setTimeout((()=>O(!0)),200)),a({x:e,y:g+y.current,width:f-d,height:p-u,paddingRight:R.current?.clientWidth??0})}),[u,d,o,a,c,E]);we(p&&le.value,P,C);const D=r.useRef(P);D.current=P;const H=r.useRef(),z=r.useRef(!1);r.useLayoutEffect((()=>{z.current?P():z.current=!0}),[P,u,d]);const L=r.useCallback((e=>{C.current=e,void 0!==g&&(g.current=e)}),[g]);let F=0,A=0;for(v.push(r.createElement("div",{key:F++,style:{width:i,height:0}}));A<o;){const e=Math.min(5e6,o-A);v.push(r.createElement("div",{key:F++,style:{width:0,height:e}})),A+=e}const{ref:V,width:_,height:N}=function(e){const t=(0,r.useRef)(null),[n,o]=(0,r.useState)({width:e?.[0],height:e?.[1]});return(0,r.useLayoutEffect)((()=>{const e=new window.ResizeObserver((e=>{for(const t of e){const{width:e,height:n}=t&&t.contentRect||{};o((t=>t.width===e&&t.height===n?t:{width:e,height:n}))}}));return t.current&&e.observe(t.current,void 0),()=>{e.disconnect()}}),[t.current]),{ref:t,...n}}(m);return"undefined"===typeof window||H.current?.height===N&&H.current?.width===_||(window.setTimeout((()=>D.current()),0),H.current={width:_,height:N}),0===(_??0)||0===(N??0)?r.createElement("div",{ref:V}):r.createElement("div",{ref:V},r.createElement(be,{isSafari:le.value},r.createElement("div",{className:"dvn-underlay"},t),r.createElement("div",{ref:L,style:H.current,draggable:l,onDragStart:e=>{l||(e.stopPropagation(),e.preventDefault())},className:"dvn-scroller "+(s??""),onScroll:()=>P()},r.createElement("div",{className:"dvn-scroll-inner"+(void 0===h?" dvn-hidden":"")},r.createElement("div",{className:"dvn-stack"},v),void 0!==h&&r.createElement(r.Fragment,null,!b&&r.createElement("div",{className:"dvn-spacer"}),r.createElement("div",{ref:R,style:{height:N,maxHeight:n-Math.ceil(S%1),position:"sticky",top:0,paddingLeft:1,marginBottom:-40,marginRight:d,flexGrow:b?1:void 0,right:w?d??0:void 0,pointerEvents:"auto"}},h))))))},xe=e=>{const{columns:t,rows:n,rowHeight:o,headerHeight:i,groupHeaderHeight:a,enableGroups:l,freezeColumns:s,experimental:c,nonGrowWidth:u,clientSize:d,className:h,onVisibleRegionChanged:f,scrollRef:p,preventDiagonalScrolling:g,rightElement:m,rightElementProps:v,overscrollX:w,overscrollY:b,initialSize:y,smoothScrollX:x=!1,smoothScrollY:k=!1,isDraggable:C}=e,{paddingRight:S,paddingBottom:M}=c??{},[R,E]=d,I=r.useRef(),O=r.useRef(),T=r.useRef(),P=r.useRef(),D=u+Math.max(0,w??0);let H=l?i+a:i;if("number"===typeof o)H+=n*o;else for(let r=0;r<n;r++)H+=o(r);void 0!==b&&(H+=b);const z=r.useRef(),L=r.useCallback((()=>{if(void 0===z.current)return;const e={...z.current};let r=0,i=e.x<0?-e.x:0,a=0,l=0;e.x=e.x<0?0:e.x;let c=0;for(let n=0;n<s;n++)c+=t[n].width;for(const n of t){const t=r-c;if(e.x>=t+n.width)r+=n.width,l++,a++;else if(e.x>t)r+=n.width,x?i+=t-e.x:l++,a++;else{if(!(e.x+e.width>t))break;r+=n.width,a++}}let u=0,d=0,h=0;if("number"===typeof o)k?(d=Math.floor(e.y/o),u=d*o-e.y):d=Math.ceil(e.y/o),h=Math.ceil(e.height/o)+d,u<0&&h++;else{let t=0;for(let r=0;r<n;r++){const n=o(r),i=t+(k?0:n/2);if(e.y>=t+n)t+=n,d++,h++;else if(e.y>i)t+=n,k?u+=i-e.y:d++,h++;else{if(!(e.y+e.height>n/2+t))break;t+=n,h++}}}const p={x:l,y:d,width:a-l,height:h-d},g=I.current;void 0!==g&&g.y===p.y&&g.x===p.x&&g.height===p.height&&g.width===p.width&&O.current===i&&T.current===u&&e.width===P.current?.[0]&&e.height===P.current?.[1]||(f?.({x:l,y:d,width:a-l,height:h-d},e.width,e.height,e.paddingRight??0,i,u),I.current=p,O.current=i,T.current=u,P.current=[e.width,e.height])}),[t,o,n,f,s,x,k]),F=r.useCallback((e=>{z.current=e,L()}),[L]);return r.useEffect((()=>{L()}),[L]),r.createElement(ye,{scrollRef:p,className:h,kineticScrollPerfHack:c?.kineticScrollPerfHack,preventDiagonalScrolling:g,draggable:!0===C||"string"===typeof C,scrollWidth:D+(S??0),scrollHeight:H+(M??0),clientHeight:E,rightElement:m,paddingBottom:M,paddingRight:S,rightElementProps:v,update:F,initialSize:y},r.createElement(me,{eventTargetRef:p,width:R,height:E,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onHeaderIndicatorClick:e.onHeaderIndicatorClick,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,onColumnProposeMove:e.onColumnProposeMove,verticalBorder:e.verticalBorder,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,drawCell:e.drawCell,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,resizeIndicator:e.resizeIndicator}))},ke=(0,ve.z)("div")({name:"SearchWrapper",class:"gdg-seveqep",propsAsIs:!1}),Ce=r.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},r.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"})),Se=r.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},r.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 268l144 144 144-144M256 392V100"})),Me=r.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},r.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144M368 144L144 368"})),Re=e=>{const{canvasRef:t,cellYOffset:n,rows:i,columns:a,searchInputRef:l,searchValue:s,searchResults:c,onSearchValueChange:d,getCellsForSelection:h,onSearchResultsChanged:f,showSearch:p=!1,onSearchClose:g}=e,[m]=r.useState((()=>"search-box-"+Math.round(1e3*Math.random()))),[v,w]=r.useState(""),b=s??v,y=r.useCallback((e=>{w(e),d?.(e)}),[d]),[x,k]=r.useState(),C=r.useRef(x);C.current=x,r.useEffect((()=>{void 0!==c&&(c.length>0?k((e=>({rowsSearched:i,results:c.length,selectedIndex:e?.selectedIndex??-1}))):k(void 0))}),[i,c]);const S=r.useRef();void 0===S.current&&(S.current=new AbortController);const M=r.useRef(),[R,E]=r.useState([]),I=c??R,O=r.useCallback((()=>{void 0!==M.current&&(window.cancelAnimationFrame(M.current),M.current=void 0,S.current.abort())}),[]),T=r.useRef(n);T.current=n;const P=r.useCallback((e=>{const t=new RegExp(e.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i");let n=T.current,r=Math.min(10,i),l=0;k(void 0),E([]);const s=[],c=async()=>{if(void 0===h)return;const e=performance.now(),d=i-l;let p=h({x:0,y:n,width:a.length,height:Math.min(r,d,i-n)},S.current.signal);"function"===typeof p&&(p=await p());let g=!1;for(const[r,o]of p.entries())for(const[e,i]of o.entries()){let o;switch(i.kind){case u.p6.Text:case u.p6.Number:o=i.displayData;break;case u.p6.Uri:case u.p6.Markdown:o=i.data;break;case u.p6.Boolean:o="boolean"===typeof i.data?i.data.toString():void 0;break;case u.p6.Image:case u.p6.Bubble:o=i.data.join("\ud83d\udc33");break;case u.p6.Custom:o=i.copyData}void 0!==o&&t.test(o)&&(s.push([e,r+n]),g=!0)}const m=performance.now();g&&E([...s]),l+=p.length,(0,o.hu)(l<=i);const v=C.current?.selectedIndex??-1;k({results:s.length,rowsSearched:l,selectedIndex:v}),f?.(s,v),n+r>=i?n=0:n+=r;const w=m-e,b=10/Math.max(w,1);r=Math.ceil(r*b),l<i&&s.length<1e3&&(M.current=window.requestAnimationFrame(c))};O(),M.current=window.requestAnimationFrame(c)}),[O,a.length,h,f,i]),D=r.useCallback((()=>{g?.(),k(void 0),E([]),f?.([],-1),O(),t?.current?.focus()}),[O,t,g,f]),H=r.useCallback((e=>{y(e.target.value),void 0===c&&(""===e.target.value?(k(void 0),E([]),O()):P(e.target.value))}),[P,O,y,c]);r.useEffect((()=>{p&&null!==l.current&&(y(""),l.current.focus({preventScroll:!0}))}),[p,l,y]);const z=r.useCallback((e=>{if(e?.stopPropagation?.(),void 0===x)return;const t=(x.selectedIndex+1)%x.results;k({...x,selectedIndex:t}),f?.(I,t)}),[x,f,I]),L=r.useCallback((e=>{if(e?.stopPropagation?.(),void 0===x)return;let t=(x.selectedIndex-1)%x.results;t<0&&(t+=x.results),k({...x,selectedIndex:t}),f?.(I,t)}),[f,I,x]),F=r.useCallback((e=>{(e.ctrlKey||e.metaKey)&&"KeyF"===e.nativeEvent.code||"Escape"===e.key?(D(),e.stopPropagation(),e.preventDefault()):"Enter"===e.key&&(e.shiftKey?L():z())}),[D,z,L]);r.useEffect((()=>()=>{O()}),[O]);const[A,V]=r.useState(!1);r.useEffect((()=>{if(!p){const e=setTimeout((()=>V(!1)),150);return()=>clearTimeout(e)}V(!0)}),[p]);const _=r.useMemo((()=>{if(!p&&!A)return null;let e;void 0!==x&&(e=x.results>=1e3?"over 1000":`${x.results} result${1!==x.results?"s":""}`,x.selectedIndex>=0&&(e=`${x.selectedIndex+1} of ${e}`));const t=e=>{e.stopPropagation()},n={width:`${Math.floor((x?.rowsSearched??0)/i*100)}%`};return r.createElement(ke,{className:p?"":"out",onMouseDown:t,onMouseMove:t,onMouseUp:t,onClick:t},r.createElement("div",{className:"gdg-search-bar-inner"},r.createElement("input",{id:m,"aria-hidden":!p,"data-testid":"search-input",ref:l,onChange:H,value:b,tabIndex:p?void 0:-1,onKeyDownCapture:F}),r.createElement("button",{"aria-label":"Previous Result","aria-hidden":!p,tabIndex:p?void 0:-1,onClick:L,disabled:0===(x?.results??0)},Ce),r.createElement("button",{"aria-label":"Next Result","aria-hidden":!p,tabIndex:p?void 0:-1,onClick:z,disabled:0===(x?.results??0)},Se),void 0!==g&&r.createElement("button",{"aria-label":"Close Search","aria-hidden":!p,"data-testid":"search-close-button",tabIndex:p?void 0:-1,onClick:D},Me)),void 0!==x?r.createElement(r.Fragment,null,r.createElement("div",{className:"gdg-search-status"},r.createElement("div",{"data-testid":"search-result-area"},e)),r.createElement("div",{className:"gdg-search-progress",style:n})):r.createElement("div",{className:"gdg-search-status"},r.createElement("label",{htmlFor:m},"Type to search")))}),[p,A,x,i,m,l,H,b,F,L,z,g,D]);return r.createElement(r.Fragment,null,r.createElement(xe,{prelightCells:I,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,className:e.className,clientSize:e.clientSize,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,nonGrowWidth:e.nonGrowWidth,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,initialSize:e.initialSize,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onHeaderIndicatorClick:e.onHeaderIndicatorClick,onMouseMove:e.onMouseMove,onVisibleRegionChanged:e.onVisibleRegionChanged,overscrollX:e.overscrollX,overscrollY:e.overscrollY,preventDiagonalScrolling:e.preventDiagonalScrolling,rightElement:e.rightElement,rightElementProps:e.rightElementProps,rowHeight:e.rowHeight,rows:e.rows,scrollRef:e.scrollRef,selection:e.selection,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,verticalBorder:e.verticalBorder,onColumnProposeMove:e.onColumnProposeMove,drawFocusRing:e.drawFocusRing,drawCell:e.drawCell,drawHeader:e.drawHeader,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,resizeIndicator:e.resizeIndicator}),_)};var Ee=n(81726);const Ie=(0,ve.z)("input")({name:"RenameInput",class:"gdg-r17m35ur",propsAsIs:!1,vars:{"r17m35ur-0":[e=>Math.max(16,e.targetHeight-10),"px"]}}),Oe=e=>{const{bounds:t,group:n,onClose:o,canvasBounds:i,onFinish:a}=e,[l,s]=r.useState(n);return r.createElement(Ee.Z,{style:{position:"absolute",left:t.x-i.left+1,top:t.y-i.top,width:t.width-2,height:t.height},className:"gdg-c1tqibwd",onClickOutside:o},r.createElement(Ie,{targetHeight:t.height,"data-testid":"group-rename-input",value:l,onBlur:o,onFocus:e=>e.target.setSelectionRange(0,l.length),onChange:e=>s(e.target.value),onKeyDown:e=>{"Enter"===e.key?a(l):"Escape"===e.key&&o()},autoFocus:!0}))},Te=150;function Pe(e,t,n,r,o,i,a,l,s){let c=0;const u=void 0===o?[]:o.map((n=>{const o=function(e,t,n,r){const o=r(t);return o?.measure?.(e,t,n)??Te}(e,n[r],t,s);return c=Math.max(c,o),o}));if(u.length>5&&l){c=0;let e=0;for(const n of u)e+=n;const t=e/u.length;for(let n=0;n<u.length;n++)u[n]>=2*t?u[n]=0:c=Math.max(c,u[n])}c=Math.max(c,e.measureText(n.title).width+2*t.cellHorizontalPadding+(void 0===n.icon?0:28));const d=Math.max(Math.ceil(i),Math.min(Math.floor(a),Math.ceil(c)));return{...n,width:d}}function De(e,t,n){const r=He(e,t);return r&&(n.didMatch=!0),r}function He(e,t){if(0===e.length)return!1;if(e.includes("|")){const n=e.split("|");for(const e of n)if(He(e,t))return!0;return!1}let n=!1,r=!1,o=!1,i=!1;const a=e.split("+");if(!function(e,t){if(void 0===e)return!1;if(e.length>1&&e.startsWith("_"))return Number.parseInt(e.slice(1))===t.keyCode;return 1===e.length&&e>="a"&&e<="z"?e.toUpperCase().codePointAt(0)===t.keyCode:e===t.key}(a.pop(),t))return!1;if("any"===a[0])return!0;for(const l of a)switch(l){case"ctrl":n=!0;break;case"shift":r=!0;break;case"alt":o=!0;break;case"meta":i=!0;break;case"primary":se.value?i=!0:n=!0}return t.altKey===o&&t.ctrlKey===n&&t.shiftKey===r&&t.metaKey===i}function ze(e,t){return e.map(((e,n)=>{const r=t[n];return e.map((e=>void 0!==e.span&&e.span[0]!==r?{formatted:"",rawValue:"",format:"string"}:function(e){if(void 0!==e.copyData)return{formatted:e.copyData,rawValue:e.copyData,format:"string"};switch(e.kind){case u.p6.Boolean:return{formatted:!0===e.data?"TRUE":!1===e.data?"FALSE":e.data===u.sd?"INDETERMINATE":"",rawValue:e.data,format:"boolean"};case u.p6.Custom:return{formatted:e.copyData,rawValue:e.copyData,format:"string"};case u.p6.Image:case u.p6.Bubble:return{formatted:e.data,rawValue:e.data,format:"string-array"};case u.p6.Drilldown:return{formatted:e.data.map((e=>e.text)),rawValue:e.data.map((e=>e.text)),format:"string-array"};case u.p6.Text:return{formatted:e.displayData??e.data,rawValue:e.data,format:"string"};case u.p6.Uri:return{formatted:e.displayData??e.data,rawValue:e.data,format:"url"};case u.p6.Markdown:case u.p6.RowID:return{formatted:e.data,rawValue:e.data,format:"string"};case u.p6.Number:return{formatted:e.displayData,rawValue:e.data,format:"number"};case u.p6.Loading:return{formatted:"#LOADING",rawValue:"",format:"string"};case u.p6.Protected:return{formatted:"************",rawValue:"",format:"string"};default:(0,o.vE)(e)}}(e)))}))}function Le(e,t){return(t?/[\t\n",]/:/[\t\n"]/).test(e)&&(e=`"${e.replace(/"/g,'""')}"`),e}function Fe(e){return e.replace(/\t/g," ").replace(/ {2,}/g,(e=>"<span> </span>".repeat(e.length)))}function Ae(e){return'"'+e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")+'"'}function Ve(e,t){const n=ze(e,t),r=function(e){const t=[];for(const n of e){const e=[];for(const t of n)"url"===t.format?e.push(t.rawValue?.toString()??""):"string-array"===t.format?e.push(t.formatted.map((e=>Le(e,!0))).join(",")):e.push(Le(t.formatted,!1));t.push(e.join("\t"))}return t.join("\n")}(n),o=function(e){const t=[];t.push('<style type="text/css">\x3c!--br {mso-data-placement:same-cell;}--\x3e</style>',"<table><tbody>");for(const n of e){t.push("<tr>");for(const e of n){const n=`gdg-format="${e.format}"`;"url"===e.format?t.push(`<td ${n}><a href="${e.rawValue}">${Fe(e.formatted)}</a></td>`):"string-array"===e.format?t.push(`<td ${n}><ol>${e.formatted.map(((t,n)=>`<li gdg-raw-value=${Ae(e.rawValue[n])}>`+Fe(t)+"</li>")).join("")}</ol></td>`):t.push(`<td gdg-raw-value=${Ae(e.rawValue?.toString()??"")} ${n}>${Fe(e.formatted)}</td>`)}t.push("</tr>")}return t.push("</tbody></table>"),t.join("")}(n);return{textPlain:r,textHtml:o}}function _e(e){const t=document.createElement("html");t.innerHTML=e.replace(/&nbsp;/g," ");const n=t.querySelector("table");if(null===n)return;const r=[n],o=[];let i;for(;r.length>0;){const e=r.pop();if(void 0===e)break;if(e instanceof HTMLTableElement||"TBODY"===e.nodeName)r.push(...[...e.children].reverse());else if(e instanceof HTMLTableRowElement)void 0!==i&&o.push(i),i=[],r.push(...[...e.children].reverse());else if(e instanceof HTMLTableCellElement){const t=e.cloneNode(!0),n=1===t.children.length&&"P"===t.children[0].nodeName?t.children[0]:null,r=1===n?.children.length&&"FONT"===n.children[0].nodeName,o=t.querySelectorAll("br");for(const e of o)e.replaceWith("\n");const l=t.getAttribute("gdg-raw-value"),s=t.getAttribute("gdg-format")??"string";if(null!==t.querySelector("a"))i?.push({rawValue:t.querySelector("a")?.getAttribute("href")??"",formatted:t.textContent??"",format:s});else if(null!==t.querySelector("ol")){const e=t.querySelectorAll("li");i?.push({rawValue:[...e].map((e=>e.getAttribute("gdg-raw-value")??"")),formatted:[...e].map((e=>e.textContent??"")),format:"string-array"})}else if(null!==l)i?.push({rawValue:(a=l,a.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")),formatted:t.textContent??"",format:s});else{let e=t.textContent??"";r&&(e=e.replace(/\n(?!\n)/g,"")),i?.push({rawValue:e??"",formatted:e??"",format:s})}}}var a;return void 0!==i&&o.push(i),o}function Ne(e){return e.startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1).replace(/""/g,'"')),e}function $e(e){let t;!function(e){e[e.None=0]="None",e[e.inString=1]="inString",e[e.inStringPostQuote=2]="inStringPostQuote"}(t||(t={}));const n=[];let r=[],o=0,i=t.None;e=e.replace(/\r\n/g,"\n");let a=0;for(const l of e){switch(i){case t.None:"\t"===l||"\n"===l?(r.push(e.slice(o,a)),o=a+1,"\n"===l&&(n.push(r),r=[])):'"'===l&&(i=t.inString);break;case t.inString:'"'===l&&(i=t.inStringPostQuote);break;case t.inStringPostQuote:'"'===l?i=t.inString:"\t"===l||"\n"===l?(r.push(Ne(e.slice(o,a))),o=a+1,"\n"===l&&(n.push(r),r=[]),i=t.None):i=t.None}a++}return o<e.length&&r.push(Ne(e.slice(o,e.length))),n.push(r),n.map((e=>e.map((e=>({rawValue:e,formatted:e,format:"string"})))))}function Be(e,t,n){const r=Ve(e,t),o=e=>{window.navigator.clipboard?.writeText(e)},i=(e,t)=>{try{if(void 0===n||null===n.clipboardData)throw new Error("No clipboard data");n?.clipboardData?.setData("text/plain",e),n?.clipboardData?.setData("text/html",t)}catch{((e,t)=>void 0!==window.navigator.clipboard?.write&&(window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:"text/plain"}),"text/html":new Blob([t],{type:"text/html"})})]),!0))(e,t)||o(e)}};void 0!==window.navigator.clipboard?.write||void 0!==n?.clipboardData?i(r.textPlain,r.textHtml):o(r.textPlain),n?.preventDefault()}function We(e){return!0!==e}function Ze(e){return"string"===typeof e?e:`${e}px`}const je=(0,ve.z)("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[e=>e.innerWidth],"wmyidgi-1":[e=>e.innerHeight]}}),Ue=e=>{const{inWidth:t,inHeight:n,children:o,...i}=e;return r.createElement(je,{innerHeight:Ze(n),innerWidth:Ze(t),...i},o)};const Xe={downFill:!1,rightFill:!1,clear:!0,closeOverlay:!0,acceptOverlayDown:!0,acceptOverlayUp:!0,acceptOverlayLeft:!0,acceptOverlayRight:!0,copy:!0,paste:!0,cut:!0,search:!1,delete:!0,activateCell:!0,scrollToSelectedCell:!0,goToFirstCell:!0,goToFirstColumn:!0,goToFirstRow:!0,goToLastCell:!0,goToLastColumn:!0,goToLastRow:!0,goToNextPage:!0,goToPreviousPage:!0,selectToFirstCell:!0,selectToFirstColumn:!0,selectToFirstRow:!0,selectToLastCell:!0,selectToLastColumn:!0,selectToLastRow:!0,selectAll:!0,selectRow:!0,selectColumn:!0,goUpCell:!0,goRightCell:!0,goDownCell:!0,goLeftCell:!0,goUpCellRetainSelection:!0,goRightCellRetainSelection:!0,goDownCellRetainSelection:!0,goLeftCellRetainSelection:!0,selectGrowUp:!0,selectGrowRight:!0,selectGrowDown:!0,selectGrowLeft:!0};function Ge(e,t){return!0===e?t:!1===e?"":e}function Ye(e){const t=se.value;return{activateCell:Ge(e.activateCell," |Enter|shift+Enter"),clear:Ge(e.clear,"any+Escape"),closeOverlay:Ge(e.closeOverlay,"any+Escape"),acceptOverlayDown:Ge(e.acceptOverlayDown,"Enter"),acceptOverlayUp:Ge(e.acceptOverlayUp,"shift+Enter"),acceptOverlayLeft:Ge(e.acceptOverlayLeft,"shift+Tab"),acceptOverlayRight:Ge(e.acceptOverlayRight,"Tab"),copy:e.copy,cut:e.cut,delete:Ge(e.delete,t?"Backspace|Delete":"Delete"),downFill:Ge(e.downFill,"primary+_68"),scrollToSelectedCell:Ge(e.scrollToSelectedCell,"primary+Enter"),goDownCell:Ge(e.goDownCell,"ArrowDown"),goDownCellRetainSelection:Ge(e.goDownCellRetainSelection,"alt+ArrowDown"),goLeftCell:Ge(e.goLeftCell,"ArrowLeft|shift+Tab"),goLeftCellRetainSelection:Ge(e.goLeftCellRetainSelection,"alt+ArrowLeft"),goRightCell:Ge(e.goRightCell,"ArrowRight|Tab"),goRightCellRetainSelection:Ge(e.goRightCellRetainSelection,"alt+ArrowRight"),goUpCell:Ge(e.goUpCell,"ArrowUp"),goUpCellRetainSelection:Ge(e.goUpCellRetainSelection,"alt+ArrowUp"),goToFirstCell:Ge(e.goToFirstCell,"primary+Home"),goToFirstColumn:Ge(e.goToFirstColumn,"Home|primary+ArrowLeft"),goToFirstRow:Ge(e.goToFirstRow,"primary+ArrowUp"),goToLastCell:Ge(e.goToLastCell,"primary+End"),goToLastColumn:Ge(e.goToLastColumn,"End|primary+ArrowRight"),goToLastRow:Ge(e.goToLastRow,"primary+ArrowDown"),goToNextPage:Ge(e.goToNextPage,"PageDown"),goToPreviousPage:Ge(e.goToPreviousPage,"PageUp"),paste:e.paste,rightFill:Ge(e.rightFill,"primary+_82"),search:Ge(e.search,"primary+f"),selectAll:Ge(e.selectAll,"primary+a"),selectColumn:Ge(e.selectColumn,"ctrl+ "),selectGrowDown:Ge(e.selectGrowDown,"shift+ArrowDown"),selectGrowLeft:Ge(e.selectGrowLeft,"shift+ArrowLeft"),selectGrowRight:Ge(e.selectGrowRight,"shift+ArrowRight"),selectGrowUp:Ge(e.selectGrowUp,"shift+ArrowUp"),selectRow:Ge(e.selectRow,"shift+ "),selectToFirstCell:Ge(e.selectToFirstCell,"primary+shift+Home"),selectToFirstColumn:Ge(e.selectToFirstColumn,"primary+shift+ArrowLeft"),selectToFirstRow:Ge(e.selectToFirstRow,"primary+shift+ArrowUp"),selectToLastCell:Ge(e.selectToLastCell,"primary+shift+End"),selectToLastColumn:Ge(e.selectToLastColumn,"primary+shift+ArrowRight"),selectToLastRow:Ge(e.selectToLastRow,"primary+shift+ArrowDown")}}function Ke(e){function t(e,n,r){if("number"===typeof e)return{headerIndex:e,isCollapsed:!1,depth:n,path:r};const o={headerIndex:e.headerIndex,isCollapsed:e.isCollapsed,depth:n,path:r};return void 0!==e.subGroups&&(o.subGroups=e.subGroups.map(((e,o)=>t(e,n+1,[...r,o]))).sort(((e,t)=>e.headerIndex-t.headerIndex))),o}return e.map(((e,n)=>t(e,0,[n]))).sort(((e,t)=>e.headerIndex-t.headerIndex))}function qe(e,t){const n=[];function r(e,o,i=!1){let a=null!==o?o-e.headerIndex:t-e.headerIndex;if(void 0!==e.subGroups&&(a=e.subGroups[0].headerIndex-e.headerIndex),a--,n.push({headerIndex:e.headerIndex,contentIndex:-1,skip:i,isCollapsed:e.isCollapsed,depth:e.depth,path:e.path,rows:a}),e.subGroups)for(let t=0;t<e.subGroups.length;t++){const n=t<e.subGroups.length-1?e.subGroups[t+1].headerIndex:o;r(e.subGroups[t],n,i||e.isCollapsed)}}const o=Ke(e.groups);for(let a=0;a<o.length;a++){const e=a<o.length-1?o[a+1].headerIndex:null;r(o[a],e)}let i=0;for(const a of n)a.contentIndex=i,i+=a.rows;return n.filter((e=>!1===e.skip)).map((e=>{const{skip:t,...n}=e;return n}))}function Qe(e,t){if(void 0===t||0===qe.length)return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1};let n=e;for(const r of t){if(0===n)return{path:[...r.path,-1],originalIndex:r.headerIndex,isGroupHeader:!0,groupIndex:-1,contentIndex:-1,groupRows:r.rows};if(n--,!r.isCollapsed){if(n<r.rows)return{path:[...r.path,n],originalIndex:r.headerIndex+n,isGroupHeader:!1,groupIndex:n,contentIndex:r.contentIndex+n,groupRows:r.rows};n-=r.rows}}return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1}}function Je(e,t,n){const[r,...o]=t;return-1===o[0]?e.map(((e,t)=>t===r?{...e,...n}:e)):e.map(((e,t)=>t===r?{...e,subGroups:Je(e.subGroups??[],o,n)}:e))}function et(e,t){const[n,...r]=t;return-1===r[0]?e[n]:et(e[n].subGroups??[],r)}function tt(e,t,n,o,i){const[a,l]=r.useMemo((()=>[void 0!==t&&"number"===typeof n?Math.floor(t/n):0,void 0!==t&&"number"===typeof n?-t%n:0]),[t,n]),s=r.useMemo((()=>({x:o.current.x,y:a,width:o.current.width??1,height:o.current.height??1,ty:l})),[o,l,a]),[c,u,d]=(0,x.ig)(s),h=r.useRef(i);h.current=i;const f=function(e,t){const[n]=r.useState((()=>({value:e,callback:t,facade:{get current(){return n.value},set current(e){const t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}})));return n.callback=t,n.facade}(null,(n=>{null!==n&&void 0!==t?n.scrollTop=t:null!==n&&void 0!==e&&(n.scrollLeft=e)})),p=(c.height??1)>1;r.useLayoutEffect((()=>{if(void 0!==t&&null!==f.current&&p){if(f.current.scrollTop===t)return;f.current.scrollTop=t,f.current.scrollTop!==t&&d(),h.current()}}),[t,p,d,f]);const g=(c.width??1)>1;return r.useLayoutEffect((()=>{if(void 0!==e&&null!==f.current&&g){if(f.current.scrollLeft===e)return;f.current.scrollLeft=e,f.current.scrollLeft!==e&&d(),h.current()}}),[e,g,d,f]),{visibleRegion:c,setVisibleRegion:u,scrollRef:f}}const nt=r.lazy((async()=>await n.e(4004).then(n.bind(n,74004))));let rt=0;function ot(e,t){return void 0===e||0===t||0===e.columns.length&&void 0===e.current?e:{current:void 0===e.current?void 0:{cell:[e.current.cell[0]+t,e.current.cell[1]],range:{...e.current.range,x:e.current.range.x+t},rangeStack:e.current.rangeStack.map((e=>({...e,x:e.x+t})))},rows:e.rows,columns:e.columns.offset(t)}}const it={kind:u.p6.Loading,allowOverlay:!1},at={columns:u.EV.empty(),rows:u.EV.empty(),current:void 0},lt=r.forwardRef(((e,t)=>{const[n,h]=r.useState(at),[f,p]=r.useState(),g=r.useRef(null),m=r.useRef(null),[v,w]=r.useState(),b=r.useRef(),y="undefined"===typeof window?null:window,{imageEditorOverride:C,getRowThemeOverride:S,markdownDivCreateNode:M,width:R,height:E,columns:O,rows:D,getCellContent:H,onCellClicked:z,onCellActivated:L,onFillPattern:F,onFinishedEditing:A,coercePasteValue:V,drawHeader:_,drawCell:N,editorBloom:$,onHeaderClicked:B,onColumnProposeMove:W,rangeSelectionColumnSpanning:Z=!0,spanRangeBehavior:j="default",onGroupHeaderClicked:U,onCellContextMenu:X,className:G,onHeaderContextMenu:Y,getCellsForSelection:K,onGroupHeaderContextMenu:q,onGroupHeaderRenamed:Q,onCellEdited:J,onCellsEdited:ee,onSearchResultsChanged:te,searchResults:ne,onSearchValueChange:re,searchValue:oe,onKeyDown:ie,onKeyUp:ae,keybindings:le,editOnType:he=!0,onRowAppended:pe,onColumnMoved:ge,validateCell:me,highlightRegions:ve,rangeSelect:we="rect",columnSelect:be="multi",rowSelect:ye="multi",rangeSelectionBlending:xe="exclusive",columnSelectionBlending:ke="exclusive",rowSelectionBlending:Ce="exclusive",onDelete:Se,onDragStart:Me,onMouseMove:Ee,onPaste:Ie,copyHeaders:He=!1,freezeColumns:ze=0,cellActivationBehavior:Le="second-click",rowSelectionMode:Fe="auto",onHeaderMenuClick:Ae,onHeaderIndicatorClick:Ve,getGroupDetails:Ne,rowGrouping:Ze,onSearchClose:je,onItemHovered:Ge,onSelectionCleared:Ke,showSearch:lt,onVisibleRegionChanged:st,gridSelection:ct,onGridSelectionChange:ut,minColumnWidth:dt=50,maxColumnWidth:ht=500,maxColumnAutoWidth:ft,provideEditor:pt,trailingRowOptions:gt,freezeTrailingRows:mt=0,allowedFillDirections:vt="orthogonal",scrollOffsetX:wt,scrollOffsetY:bt,verticalBorder:yt,onDragOverCell:xt,onDrop:kt,onColumnResize:Ct,onColumnResizeEnd:St,onColumnResizeStart:Mt,customRenderers:Rt,fillHandle:Et,experimental:It,fixedShadowX:Ot,fixedShadowY:Tt,headerIcons:Pt,imageWindowLoader:Dt,initialSize:Ht,isDraggable:zt,onDragLeave:Lt,onRowMoved:Ft,overscrollX:At,overscrollY:Vt,preventDiagonalScrolling:_t,rightElement:Nt,rightElementProps:$t,trapFocus:Bt=!1,smoothScrollX:Wt,smoothScrollY:Zt,scaleToRem:jt=!1,rowHeight:Ut=34,headerHeight:Xt=36,groupHeaderHeight:Gt=Xt,theme:Yt,isOutsideClick:Kt,renderers:qt,resizeIndicator:Qt,scrollToActiveCell:Jt=!0,drawFocusRing:en=!0}=e,tn="no-editor"===en?void 0===f:en,nn="string"===typeof e.rowMarkers?void 0:e.rowMarkers,rn=nn?.kind??e.rowMarkers??"none",on=nn?.width??e.rowMarkerWidth,an=nn?.startIndex??e.rowMarkerStartIndex??1,ln=nn?.theme??e.rowMarkerTheme,sn=nn?.headerTheme,cn=nn?.headerAlwaysVisible,un="multi"!==ye,dn=nn?.checkboxStyle??"square",hn=Math.max(dt,20),fn=Math.max(ht,hn),pn=Math.max(ft??fn,hn),gn=r.useMemo((()=>"undefined"===typeof window?{fontSize:"16px"}:window.getComputedStyle(document.documentElement)),[]),{rows:mn,rowNumberMapper:vn,rowHeight:wn,getRowThemeOverride:bn}=function(e,t,n,o){const i=r.useMemo((()=>void 0===e?void 0:qe(e,t)),[e,t]),a=r.useMemo((()=>void 0===i?t:i.reduce(((e,t)=>e+(t.isCollapsed?1:t.rows+1)),0)),[i,t]),l=r.useMemo((()=>void 0===e||"number"===typeof n&&e.height===n?n:t=>{const{isGroupHeader:r}=Qe(t,i);return r?e.height:"number"===typeof n?n:n(t)}),[i,e,n]),s=r.useCallback((e=>{if(void 0===i)return e;let t=e;for(const n of i){if(0===t)return;if(t--,!n.isCollapsed){if(t<n.rows)return n.contentIndex+t;t-=n.rows}}return e}),[i]),c=(0,x.qJ)(o??e?.themeOverride,r.useCallback((t=>{if(void 0===e)return o?.(t,t,t);if(void 0===o&&void 0===e?.themeOverride)return;const{isGroupHeader:n,contentIndex:r,groupIndex:a}=Qe(t,i);return n?e.themeOverride:o?.(t,a,r)}),[i,o,e]));return void 0===e?{rowHeight:l,rows:t,rowNumberMapper:s,getRowThemeOverride:c}:{rowHeight:l,rows:a,rowNumberMapper:s,getRowThemeOverride:c}}(Ze,D,Ut,S),yn=r.useMemo((()=>Number.parseFloat(gn.fontSize)),[gn]),{rowHeight:xn,headerHeight:kn,groupHeaderHeight:Cn,theme:Sn,overscrollX:Mn,overscrollY:Rn}=function({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:o,overscrollX:i,overscrollY:a,scaleToRem:l,remSize:s}){const[c,u,d,h,f,p]=r.useMemo((()=>{if(!l||16===s)return[e,t,n,o,i,a];const r=s/16,c=e,u=(0,I.Zu)();return["number"===typeof c?c*r:e=>Math.ceil(c(e)*r),Math.ceil(t*r),Math.ceil(n*r),{...o,headerIconSize:(o?.headerIconSize??u.headerIconSize)*r,cellHorizontalPadding:(o?.cellHorizontalPadding??u.cellHorizontalPadding)*r,cellVerticalPadding:(o?.cellVerticalPadding??u.cellVerticalPadding)*r},Math.ceil((i??0)*r),Math.ceil((a??0)*r)]}),[n,t,i,a,s,e,l,o]);return{rowHeight:c,headerHeight:u,groupHeaderHeight:d,theme:h,overscrollX:f,overscrollY:p}}({groupHeaderHeight:Gt,headerHeight:Xt,overscrollX:At,overscrollY:Vt,remSize:yn,rowHeight:wn,scaleToRem:jt,theme:Yt}),En=function(e){const t=(0,x.vE)(e);return r.useMemo((()=>{if(void 0===t)return Ye(Xe);const e={...t,goToNextPage:t?.goToNextPage??t?.pageDown??Xe.goToNextPage,goToPreviousPage:t?.goToPreviousPage??t?.pageUp??Xe.goToPreviousPage,goToFirstCell:t?.goToFirstCell??t?.first??Xe.goToFirstCell,goToLastCell:t?.goToLastCell??t?.last??Xe.goToLastCell,selectToFirstCell:t?.selectToFirstCell??t?.first??Xe.selectToFirstCell,selectToLastCell:t?.selectToLastCell??t?.last??Xe.selectToLastCell};return Ye({...Xe,...e})}),[t])}(le),In=on??(D>1e4?48:D>1e3?44:D>100?36:32),On="none"!==rn,Tn=On?1:0,Pn=void 0!==pe,Dn=!0===gt?.sticky,[Hn,zn]=r.useState(!1),Ln=lt??Hn,Fn=r.useCallback((()=>{void 0!==je?je():zn(!1)}),[je]),An=r.useMemo((()=>void 0===ct?void 0:ot(ct,Tn)),[ct,Tn])??n,Vn=r.useRef();void 0===Vn.current&&(Vn.current=new AbortController),r.useEffect((()=>()=>Vn?.current.abort()),[]);const[_n,Nn]=function(e,t,n,o,i){const a=r.useCallback((n=>{if(!0===e){const e=[];for(let r=n.y;r<n.y+n.height;r++){const o=[];for(let e=n.x;e<n.x+n.width;e++)e<0||r>=i?o.push({kind:u.p6.Loading,allowOverlay:!1}):o.push(t([e,r]));e.push(o)}return e}return e?.(n,o.signal)??[]}),[o.signal,t,e,i]),l=void 0!==e?a:void 0,s=r.useCallback((e=>{if(void 0===l)return[];const t={...e,x:e.x-n};if(t.x<0){t.x=0,t.width--;const e=l(t,o.signal);return"function"===typeof e?async()=>(await e()).map((e=>[{kind:u.p6.Loading,allowOverlay:!1},...e])):e.map((e=>[{kind:u.p6.Loading,allowOverlay:!1},...e]))}return l(t,o.signal)}),[o.signal,l,n]);return[void 0!==e?s:void 0,l]}(K,H,Tn,Vn.current,mn),$n=r.useCallback(((e,t,n)=>{if(void 0===me)return!0;const r=[e[0]-Tn,e[1]];return me?.(r,t,n)}),[Tn,me]),Bn=r.useRef(ct),Wn=r.useCallback(((e,t)=>{t&&(e=function(e,t,n,r,o){const i=e;if("allowPartial"===r||void 0===e.current||void 0===t)return e;let a=!1;do{if(void 0===e?.current)break;const r=e.current?.range,l=[];if(r.width>2){const e=t({x:r.x,y:r.y,width:1,height:r.height},o.signal);if("function"===typeof e)return i;l.push(...e);const n=t({x:r.x+r.width-1,y:r.y,width:1,height:r.height},o.signal);if("function"===typeof n)return i;l.push(...n)}else{const e=t({x:r.x,y:r.y,width:r.width,height:r.height},o.signal);if("function"===typeof e)return i;l.push(...e)}let s=r.x-n,c=r.x+r.width-1-n;for(const e of l)for(const t of e)void 0!==t.span&&(s=Math.min(t.span[0],s),c=Math.max(t.span[1],c));s===r.x-n&&c===r.x+r.width-1-n?a=!0:e={current:{cell:e.current.cell??[0,0],range:{x:s+n,y:r.y,width:c-s+1,height:r.height},rangeStack:e.current.rangeStack},columns:e.columns,rows:e.rows}}while(!a);return e}(e,_n,Tn,j,Vn.current)),void 0!==ut?(Bn.current=ot(e,-Tn),ut(Bn.current)):h(e)}),[ut,_n,Tn,j]),Zn=(0,x.qJ)(Ct,r.useCallback(((e,t,n,r)=>{Ct?.(O[n-Tn],t,n-Tn,r)}),[Ct,Tn,O])),jn=(0,x.qJ)(St,r.useCallback(((e,t,n,r)=>{St?.(O[n-Tn],t,n-Tn,r)}),[St,Tn,O])),Un=(0,x.qJ)(Mt,r.useCallback(((e,t,n,r)=>{Mt?.(O[n-Tn],t,n-Tn,r)}),[Mt,Tn,O])),Xn=(0,x.qJ)(_,r.useCallback(((e,t)=>_?.({...e,columnIndex:e.columnIndex-Tn},t)??!1),[_,Tn])),Gn=(0,x.qJ)(N,r.useCallback(((e,t)=>N?.({...e,col:e.col-Tn},t)??!1),[N,Tn])),Yn=r.useCallback((e=>{if(void 0!==Se){const t=Se(ot(e,-Tn));return"boolean"===typeof t?t:ot(t,Tn)}return!0}),[Se,Tn]),[Kn,qn,Qn]=function(e,t,n,o,i,a,l){return[r.useCallback(((r,s,c,d)=>{"cell"!==a&&"multi-cell"!==a||void 0===r||(r={...r,range:{x:r.cell[0],y:r.cell[1],width:1,height:1}}),!l&&void 0!==r&&r.range.width>1&&(r={...r,range:{...r.range,width:1,x:r.cell[0]}});const h="mixed"===n&&(c||"drag"===d),f="mixed"===o&&h,p="mixed"===i&&h;let g={current:void 0===r?void 0:{...r,rangeStack:"drag"===d?e.current?.rangeStack??[]:[]},columns:f?e.columns:u.EV.empty(),rows:p?e.rows:u.EV.empty()};c&&("multi-rect"===a||"multi-cell"===a)&&void 0!==g.current&&void 0!==e.current&&(g={...g,current:{...g.current,rangeStack:[...e.current.rangeStack,e.current.range]}}),t(g,s)}),[o,e,n,a,l,i,t]),r.useCallback(((r,a,l)=>{let s;if(r=r??e.rows,void 0!==a&&(r=r.add(a)),"exclusive"===i&&r.length>0)s={current:void 0,columns:u.EV.empty(),rows:r};else{const t=l&&"mixed"===o;s={current:l&&"mixed"===n?e.current:void 0,columns:t?e.columns:u.EV.empty(),rows:r}}t(s,!1)}),[o,e,n,i,t]),r.useCallback(((r,a,l)=>{let s;if(r=r??e.columns,void 0!==a&&(r=r.add(a)),"exclusive"===o&&r.length>0)s={current:void 0,rows:u.EV.empty(),columns:r};else{const t=l&&"mixed"===i;s={current:l&&"mixed"===n?e.current:void 0,rows:t?e.rows:u.EV.empty(),columns:r}}t(s,!1)}),[o,e,n,i,t])]}(An,Wn,xe,ke,Ce,we,Z),Jn=r.useMemo((()=>(0,I.yR)((0,I.Zu)(),Sn)),[Sn]),[er,tr]=r.useState([0,0,0]),nr=r.useMemo((()=>{if(void 0===qt)return{};const e={};for(const t of qt)e[t.kind]=t;return e}),[qt]),rr=r.useCallback((e=>e.kind!==u.p6.Custom?nr[e.kind]:Rt?.find((t=>t.isMatch(e)))),[Rt,nr]);let{sizedColumns:or,nonGrowWidth:ir}=function(e,t,n,o,i,a,l,s,c){const d=r.useRef(t),h=r.useRef(n),f=r.useRef(l);d.current=t,h.current=n,f.current=l;const[p,g]=r.useMemo((()=>{if("undefined"===typeof window)return[null,null];const e=document.createElement("canvas");return e.style.display="none",e.style.opacity="0",e.style.position="fixed",[e,e.getContext("2d",{alpha:!1})]}),[]);r.useLayoutEffect((()=>(p&&document.documentElement.append(p),()=>{p?.remove()})),[p]);const m=r.useRef({}),v=r.useRef(),[w,b]=r.useState();return r.useLayoutEffect((()=>{const t=h.current;if(void 0===t||e.every(u.Sq))return;let n=Math.max(1,10-Math.floor(e.length/1e4)),r=0;n<d.current&&n>1&&(n--,r=1);const o={x:0,y:0,width:e.length,height:Math.min(d.current,n)},i={x:0,y:d.current-1,width:e.length,height:1};(async()=>{const n=t(o,c.signal),a=r>0?t(i,c.signal):void 0;let l;l="object"===typeof n?n:await(0,u.rL)(n),void 0!==a&&(l="object"===typeof a?[...l,...a]:[...l,...await(0,u.rL)(a)]),v.current=e,b(l)})()}),[c.signal,e]),r.useMemo((()=>{let t=e.every(u.Sq)?e:null===g?e.map((e=>(0,u.Sq)(e)?e:{...e,width:Te})):(g.font=f.current.baseFontFull,e.map(((t,n)=>{if((0,u.Sq)(t))return t;if(void 0!==m.current[t.id])return{...t,width:m.current[t.id]};if(void 0===w||v.current!==e||void 0===t.id)return{...t,width:Te};const r=Pe(g,l,t,n,w,i,a,!0,s);return m.current[t.id]=r.width,r}))),n=0,r=0;const c=[];for(const[e,o]of t.entries())n+=o.width,void 0!==o.grow&&o.grow>0&&(r+=o.grow,c.push(e));if(n<o&&c.length>0){const e=[...t],i=o-n;let a=i;for(let n=0;n<c.length;n++){const o=c[n],l=(t[o].grow??0)/r,s=n===c.length-1?a:Math.min(a,Math.floor(i*l));e[o]={...t[o],growOffset:s,width:t[o].width+s},a-=s}t=e}return{sizedColumns:t,nonGrowWidth:n}}),[o,e,g,w,l,i,a,s])}(O,mn,Nn,er[0]-(0===Tn?0:In)-er[2],hn,pn,Jn,rr,Vn.current);"none"!==rn&&(ir+=In);const ar=r.useMemo((()=>or.some((e=>void 0!==e.group))),[or]),lr=ar?kn+Cn:kn,sr=An.rows.length,cr="none"===rn?void 0:0!==sr&&(sr===mn||void 0),ur=r.useMemo((()=>"none"===rn?or:[{title:"",width:In,icon:void 0,hasMenu:!1,style:"normal",themeOverride:ln,rowMarker:dn,rowMarkerChecked:cr,headerRowMarkerTheme:sn,headerRowMarkerAlwaysVisible:cn,headerRowMarkerDisabled:un},...or]),[rn,or,In,ln,dn,cr,sn,cn,un]),dr=r.useRef({height:1,width:1,x:0,y:0}),hr=r.useRef(!1),{setVisibleRegion:fr,visibleRegion:pr,scrollRef:gr}=tt(wt,bt,xn,dr,(()=>hr.current=!0));dr.current=pr;const mr=pr.x+Tn,vr=pr.y,wr=r.useRef(null),br=r.useCallback((e=>{!0===e?wr.current?.focus():window.requestAnimationFrame((()=>{wr.current?.focus()}))}),[]),yr=Pn?mn+1:mn,xr=r.useCallback((e=>{const t=0===Tn?e:e.map((e=>({...e,location:[e.location[0]-Tn,e.location[1]]}))),n=ee?.(t);if(!0!==n)for(const r of t)J?.(r.location,r.value);return n}),[J,ee,Tn]),[kr,Cr]=r.useState(),Sr=void 0!==An.current&&An.current.range.width*An.current.range.height>1?An.current.range:void 0,Mr=tn?An.current?.cell:void 0,Rr=Mr?.[0],Er=Mr?.[1],Ir=r.useMemo((()=>{if((void 0===ve||0===ve.length)&&void 0===(Sr??Rr??Er??kr))return;const e=[];if(void 0!==ve)for(const t of ve){const n=ur.length-t.range.x-Tn;n>0&&e.push({color:t.color,range:{...t.range,x:t.range.x+Tn,width:Math.min(n,t.range.width)},style:t.style})}return void 0!==kr&&e.push({color:(0,k.fG)(Jn.accentColor,0),range:kr,style:"dashed"}),void 0!==Sr&&e.push({color:(0,k.fG)(Jn.accentColor,.5),range:Sr,style:"solid-outline"}),void 0!==Rr&&void 0!==Er&&e.push({color:Jn.accentColor,range:{x:Rr,y:Er,width:1,height:1},style:"solid-outline"}),e.length>0?e:void 0}),[kr,Sr,Rr,Er,ve,ur.length,Jn.accentColor,Tn]),Or=r.useRef(ur);Or.current=ur;const Tr=r.useCallback((([e,t],n=!1)=>{const r=Pn&&t===yr-1;if(0===e&&On){if(r)return it;const e=vn(t);return void 0===e?it:{kind:u.$o.Marker,allowOverlay:!1,checkboxStyle:dn,checked:!0===An?.rows.hasIndex(t),markerKind:"clickable-number"===rn?"number":rn,row:an+e,drawHandle:void 0!==Ft,cursor:"clickable-number"===rn?"pointer":void 0}}if(r){const t=e===Tn?gt?.hint??"":"",n=Or.current[e];if(!0===n?.trailingRowOptions?.disabled)return it;{const e=n?.trailingRowOptions?.hint??t,r=n?.trailingRowOptions?.addIcon??gt?.addIcon;return{kind:u.$o.NewRow,hint:e,allowOverlay:!1,icon:r}}}{const r=e-Tn;if(n||!0===It?.strict){const e=dr.current,n=e.x>r||r>e.x+e.width||e.y>t||t>e.y+e.height||t>=Vr.current,o=r===e.extras?.selected?.[0]&&t===e.extras?.selected[1];let i=!1;if(void 0!==e.extras?.freezeRegions)for(const a of e.extras.freezeRegions)if(T(a,r,t)){i=!0;break}if(n&&!o&&!i)return it}let o=H([r,t]);return 0!==Tn&&void 0!==o.span&&(o={...o,span:[o.span[0]+Tn,o.span[1]+Tn]}),o}}),[Pn,yr,On,vn,dn,An?.rows,rn,an,Ft,Tn,gt?.hint,gt?.addIcon,It?.strict,H]),Pr=r.useCallback((e=>{let t=Ne?.(e)??{name:e};return void 0!==Q&&""!==e&&(t={icon:t.icon,name:t.name,overrideTheme:t.overrideTheme,actions:[...t.actions??[],{title:"Rename",icon:"renameIcon",onClick:e=>Jr({group:t.name,bounds:e.bounds})}]}),t}),[Ne,Q]),Dr=r.useCallback((e=>{const[t,n]=e.cell,r=ur[t],o=void 0!==r?.group?Pr(r.group)?.overrideTheme:void 0,i=r?.themeOverride,a=bn?.(n);p({...e,theme:(0,I.yR)(Jn,o,i,a,e.content.themeOverride)})}),[bn,ur,Pr,Jn]),Hr=r.useCallback(((e,t,n)=>{if(void 0===An.current)return;const[r,i]=An.current.cell,a=Tr([r,i]);if(a.kind!==u.p6.Boolean&&a.allowOverlay){let t=a;if(void 0!==n)switch(t.kind){case u.p6.Number:{const e=(0,o.wY)((()=>"-"===n?-0:Number.parseFloat(n)),0);t={...t,data:Number.isNaN(e)?0:e};break}case u.p6.Text:case u.p6.Markdown:case u.p6.Uri:t={...t,data:n}}Dr({target:e,content:t,initialValue:n,cell:[r,i],highlight:void 0===n,forceEditMode:void 0!==n})}else a.kind===u.p6.Boolean&&t&&!0!==a.readonly&&(xr([{location:An.current.cell,value:{...a,data:We(a.data)}}]),wr.current?.damage([{cell:An.current.cell}]))}),[Tr,An,xr,Dr]),zr=r.useCallback(((e,t)=>{const n=wr.current?.getBounds(e,t);if(void 0===n||null===gr.current)return;const r=Tr([e,t]);r.allowOverlay&&Dr({target:n,content:r,initialValue:void 0,highlight:!0,cell:[e,t],forceEditMode:!0})}),[Tr,gr,Dr]),Lr=r.useCallback(((e,t,n="both",r=0,o=0,i=void 0)=>{if(null!==gr.current){const a=wr.current,l=m.current,s="number"!==typeof e?"cell"===e.unit?e.amount:void 0:e,c="number"!==typeof t?"cell"===t.unit?t.amount:void 0:t,u="number"!==typeof e&&"px"===e.unit?e.amount:void 0,h="number"!==typeof t&&"px"===t.unit?t.amount:void 0;if(null!==a&&null!==l){let f={x:0,y:0,width:0,height:0},p=0,g=0;if((void 0!==s||void 0!==c)&&(f=a.getBounds((s??0)+Tn,c??0)??f,0===f.width||0===f.height))return;const m=l.getBoundingClientRect(),v=m.width/l.offsetWidth;if(void 0!==u&&(f={...f,x:u-m.left-gr.current.scrollLeft,width:1}),void 0!==h&&(f={...f,y:h+m.top-gr.current.scrollTop,height:1}),void 0!==f){const a={x:f.x-r,y:f.y-o,width:f.width+2*r,height:f.height+2*o};let l=0;for(let e=0;e<ze;e++)l+=or[e].width;let s=0;const c=mt+(Dn?1:0);c>0&&(s=(0,d.YN)(yr,c,xn));let u=l*v+m.left+Tn*In*v,h=m.right,w=m.top+lr*v,b=m.bottom-s*v;const y=f.width+2*r;switch(i?.hAlign){case"start":h=u+y;break;case"end":u=h-y;break;case"center":u=Math.floor((u+h)/2)-y/2,h=u+y}const x=f.height+2*o;switch(i?.vAlign){case"start":b=w+x;break;case"end":w=b-x;break;case"center":w=Math.floor((w+b)/2)-x/2,b=w+x}u>a.x?p=a.x-u:h<a.x+a.width&&(p=a.x+a.width-h),w>a.y?g=a.y-w:b<a.y+a.height&&(g=a.y+a.height-b),"vertical"===n||"number"===typeof e&&e<ze?p=0:("horizontal"===n||"number"===typeof t&&t>=yr-c)&&(g=0),0===p&&0===g||(1!==v&&(p/=v,g/=v),gr.current.scrollTo(p+gr.current.scrollLeft,g+gr.current.scrollTop))}}}}),[Tn,mt,In,gr,lr,ze,or,yr,Dn,xn]),Fr=r.useRef(zr),Ar=r.useRef(H),Vr=r.useRef(mn);Fr.current=zr,Ar.current=H,Vr.current=mn;const _r=r.useCallback((async(e,t=!0)=>{const n=ur[e];if(!0===n?.trailingRowOptions?.disabled)return;const r=pe?.();let o,i=!0;void 0!==r&&(o=await r,"top"===o&&(i=!1),"number"===typeof o&&(i=!1));let a=0;const l=()=>{if(Vr.current<=mn)return a<500&&window.setTimeout(l,a),void(a=50+2*a);const n="number"===typeof o?o:i?mn:0;No.current(e-Tn,n),Kn({cell:[e,n],range:{x:e,y:n,width:1,height:1}},!1,!1,"edit");const r=Ar.current([e-Tn,n]);r.allowOverlay&&(0,u.Qo)(r)&&!0!==r.readonly&&t&&window.setTimeout((()=>{Fr.current(e,n)}),0)};l()}),[ur,pe,Tn,mn,Kn]),Nr=r.useCallback((e=>{const t=or[e]?.trailingRowOptions?.targetColumn??gt?.targetColumn;if("number"===typeof t){return t+(On?1:0)}if("object"===typeof t){const e=O.indexOf(t);if(e>=0){return e+(On?1:0)}}}),[or,O,On,gt?.targetColumn]),$r=r.useRef(),Br=r.useRef(),Wr=r.useCallback(((e,t)=>{const[n,r]=t;return(0,I.yR)(Jn,ur[n]?.themeOverride,bn?.(r),e.themeOverride)}),[bn,ur,Jn]),{mapper:Zr}=function(e,t){const n=r.useMemo((()=>void 0===e?void 0:qe(e,t)),[e,t]);return{getRowGroupingForPath:et,updateRowGroupingByPath:Je,mapper:r.useCallback((e=>{if("number"===typeof e)return Qe(e,n);const t=Qe(e[1],n);return{...t,originalIndex:[e[0],t.originalIndex]}}),[n])}}(Ze,D),jr=Ze?.navigationBehavior,Ur=r.useCallback((e=>{const t=se.value?e.metaKey:e.ctrlKey,n=t&&"multi"===ye,r=t&&"multi"===be,[i,a]=e.location,l=An.columns,s=An.rows,[c,d]=An.current?.cell??[];if("cell"===e.kind){if(Br.current=void 0,Gr.current=[i,a],0===i&&On){if(!0===Pn&&a===mn||"number"===rn||"none"===ye)return;const r=Tr(e.location);if(r.kind!==u.$o.Marker)return;if(void 0!==Ft){const t=rr(r);(0,o.hu)(t?.kind===u.$o.Marker);const n=t?.onClick?.({...e,cell:r,posX:e.localEventX,posY:e.localEventY,bounds:e.bounds,theme:Wr(r,e.location),preventDefault:()=>{}});if(void 0===n||n.checked===r.checked)return}p(void 0),br();const i=s.hasIndex(a),l=$r.current;if("multi"===ye&&(e.shiftKey||!0===e.isLongTouch)&&void 0!==l&&s.hasIndex(l)){const e=[Math.min(l,a),Math.max(l,a)+1];n||"multi"===Fe?qn(void 0,e,!0):qn(u.EV.fromSingleSelection(e),void 0,n)}else"multi"===ye&&(n||e.isTouch||"multi"===Fe)?i?qn(s.remove(a),void 0,!0):(qn(void 0,a,!0),$r.current=a):i&&1===s.length?qn(u.EV.empty(),void 0,t):(qn(u.EV.fromSingleSelection(a),void 0,t),$r.current=a)}else if(i>=Tn&&Pn&&a===mn){const e=Nr(i);_r(e??i)}else if(c!==i||d!==a){const n=Tr(e.location),r=rr(n);if(void 0!==r?.onSelect){let t=!1;if(r.onSelect({...e,cell:n,posX:e.localEventX,posY:e.localEventY,bounds:e.bounds,preventDefault:()=>t=!0,theme:Wr(n,e.location)}),t)return}if("block"===jr&&Zr(a).isGroupHeader)return;const o=Dn&&a===mn,l=Dn&&void 0!==An&&An.current?.cell[1]===mn;if(!e.shiftKey&&!0!==e.isLongTouch||void 0===c||void 0===d||void 0===An.current||l)Kn({cell:[i,a],range:{x:i,y:a,width:1,height:1}},!0,t,"click"),$r.current=void 0,p(void 0),br();else{if(o)return;const e=Math.min(i,c),n=Math.max(i,c),r=Math.min(a,d),l=Math.max(a,d);Kn({...An.current,range:{x:e,y:r,width:n-e+1,height:l-r+1}},!0,t,"click"),$r.current=void 0,br()}}}else if("header"===e.kind)if(Gr.current=[i,a],p(void 0),On&&0===i)$r.current=void 0,Br.current=void 0,"multi"===ye&&(s.length!==mn?qn(u.EV.fromSingleSelection([0,mn]),void 0,t):qn(u.EV.empty(),void 0,t),br());else{const n=Br.current;if("multi"===be&&(e.shiftKey||!0===e.isLongTouch)&&void 0!==n&&l.hasIndex(n)){const e=[Math.min(n,i),Math.max(n,i)+1];r?Qn(void 0,e,t):Qn(u.EV.fromSingleSelection(e),void 0,t)}else r?(l.hasIndex(i)?Qn(l.remove(i),void 0,t):Qn(void 0,i,t),Br.current=i):"none"!==be&&(Qn(u.EV.fromSingleSelection(i),void 0,t),Br.current=i);$r.current=void 0,br()}else e.kind===ue?Gr.current=[i,a]:e.kind!==de||e.isMaybeScrollbar||(Wn(at,!1),p(void 0),br(),Ke?.(),$r.current=void 0,Br.current=void 0)}),[ye,be,An,On,Tn,Pn,mn,rn,Tr,Ft,br,Fe,rr,Wr,qn,Nr,_r,jr,Zr,Dn,Kn,Qn,Wn,Ke]),Xr=r.useRef(!1),Gr=r.useRef(),Yr=r.useRef(pr),Kr=r.useRef(),qr=r.useCallback((e=>{if(to.current=!1,Yr.current=dr.current,0!==e.button&&1!==e.button)return void(Kr.current=void 0);const t=performance.now();Kr.current={button:e.button,time:t,location:e.location},"header"===e?.kind&&(Xr.current=!0);const n="cell"===e.kind&&e.isFillHandle;!n&&"cell"!==e.kind&&e.isEdge||(w({previousSelection:An,fillHandle:n}),Gr.current=void 0,e.isTouch||0!==e.button||n?e.isTouch||1!==e.button||(Gr.current=e.location):Ur(e))}),[An,Ur]),[Qr,Jr]=r.useState(),eo=r.useCallback((e=>{if(e.kind!==ue||"multi"!==be)return;const t=se.value?e.metaKey:e.ctrlKey,[n]=e.location,r=An.columns;if(n<Tn)return;const o=ur[n];let i=n,a=n;for(let l=n-1;l>=Tn&&(0,d.PU)(o.group,ur[l].group);l--)i--;for(let l=n+1;l<ur.length&&(0,d.PU)(o.group,ur[l].group);l++)a++;if(br(),t)if(r.hasAll([i,a+1])){let e=r;for(let t=i;t<=a;t++)e=e.remove(t);Qn(e,void 0,t)}else Qn(void 0,[i,a+1],t);else Qn(u.EV.fromSingleSelection([i,a+1]),void 0,t)}),[be,br,An.columns,ur,Tn,Qn]),to=r.useRef(!1),no=r.useCallback((async e=>{if(void 0!==_n&&void 0!==Zn){const t=dr.current.y,n=dr.current.height;let r=_n({x:e,y:t,width:1,height:Math.min(n,mn-t)},Vn.current.signal);"object"!==typeof r&&(r=await r());const o=or[e-Tn],i=document.createElement("canvas").getContext("2d",{alpha:!1});if(null!==i){i.font=Jn.baseFontFull;const t=Pe(i,Jn,o,0,r,hn,fn,!1,rr);Zn?.(o,t.width,e,t.width)}}}),[or,_n,fn,Jn,hn,Zn,Tn,mn,rr]),[ro,oo]=r.useState(),io=r.useCallback((async(e,t)=>{const n=e.current?.range;if(void 0===n||void 0===_n||void 0===t.current)return;const r=t.current.range;if(void 0!==F){let e=!1;if(F({fillDestination:{...r,x:r.x-Tn},patternSource:{...n,x:n.x-Tn},preventDefault:()=>e=!0}),e)return}let o=_n(n,Vn.current.signal);"object"!==typeof o&&(o=await o());const i=o,a=[];for(let l=0;l<r.width;l++)for(let e=0;e<r.height;e++){const t=[r.x+l,r.y+e];if((0,d.X4)(t,n))continue;const o=i[e%n.height][l%n.width];!(0,u.rs)(o)&&(0,u.Qo)(o)&&a.push({location:t,value:{...o}})}xr(a),wr.current?.damage(a.map((e=>({cell:e.location}))))}),[_n,xr,F,Tn]),ao=r.useCallback((()=>{if(void 0===An.current||An.current.range.width<=1)return;const e={...An,current:{...An.current,range:{...An.current.range,width:1}}};io(e,An)}),[io,An]),lo=r.useCallback((()=>{if(void 0===An.current||An.current.range.height<=1)return;const e={...An,current:{...An.current,range:{...An.current.range,height:1}}};io(e,An)}),[io,An]),so=r.useCallback(((e,t)=>{const n=v;if(w(void 0),Cr(void 0),oo(void 0),Xr.current=!1,t)return;if(!0===n?.fillHandle&&void 0!==An.current&&void 0!==n.previousSelection?.current){if(void 0===kr)return;const e={...An,current:{...An.current,range:P(n.previousSelection.current.range,kr)}};return io(n.previousSelection,e),void Wn(e,!0)}const[r,o]=e.location,[i,a]=Gr.current??[],l=()=>{to.current=!0},s=t=>{const s=t.isTouch||i===r&&a===o;if(s&&z?.([r-Tn,o],{...t,preventDefault:l}),1===t.button)return!to.current;if(!to.current){const i=Tr(e.location),a=rr(i);if(void 0!==a&&void 0!==a.onClick&&s){const n=a.onClick({...t,cell:i,posX:t.localEventX,posY:t.localEventY,bounds:t.bounds,theme:Wr(i,e.location),preventDefault:l});void 0!==n&&!(0,u.rs)(n)&&(0,u.T9)(n)&&(xr([{location:t.location,value:n}]),wr.current?.damage([{cell:t.location}]))}if(to.current||void 0===An.current)return!1;let c=!1;switch(i.activationBehaviorOverride??Le){case"double-click":case"second-click":{if(void 0===n?.previousSelection?.current?.cell)break;const[e,i]=An.current.cell,[a,l]=n.previousSelection.current.cell;c=r===e&&r===a&&o===i&&o===l&&(!0===t.isDoubleClick||"second-click"===Le);break}case"single-click":c=!0}if(c)return L?.([r-Tn,o]),Hr(t.bounds,!1),!0}return!1},c=e.location[0]-Tn;if(e.isTouch){const t=dr.current,n=Yr.current;if(t.x!==n.x||t.y!==n.y)return;if(!0===e.isLongTouch){if("cell"===e.kind&&(0,d.pU)(An.current?.cell,e.location))return void X?.([c,e.location[1]],{...e,preventDefault:l});if("header"===e.kind&&An.columns.hasIndex(r))return void Y?.(c,{...e,preventDefault:l});if(e.kind===ue){if(c<0)return;return void q?.(c,{...e,preventDefault:l})}}"cell"===e.kind?s(e)||Ur(e):e.kind===ue?U?.(c,{...e,preventDefault:l}):(e.kind===ce&&B?.(c,{...e,preventDefault:l}),Ur(e))}else{if("header"===e.kind){if(c<0)return;e.isEdge?!0===e.isDoubleClick&&no(r):0===e.button&&r===i&&o===a&&B?.(c,{...e,preventDefault:l})}if(e.kind===ue){if(c<0)return;0===e.button&&r===i&&o===a&&(U?.(c,{...e,preventDefault:l}),to.current||eo(e))}"cell"!==e.kind||0!==e.button&&1!==e.button||s(e),Gr.current=void 0}}),[v,An,Tn,kr,io,Wn,z,Tr,rr,Le,Wr,xr,L,Hr,X,Y,q,Ur,U,B,no,eo]),co=r.useCallback((e=>{const t={...e,location:[e.location[0]-Tn,e.location[1]]};Ee?.(t),void 0!==v&&0===e.buttons&&(w(void 0),Cr(void 0),oo(void 0),Xr.current=!1),oo((t=>Xr.current?[e.scrollEdge[0],0]:e.scrollEdge[0]===t?.[0]&&e.scrollEdge[1]===t[1]?t:void 0===v||(Kr.current?.location[0]??0)<Tn?void 0:e.scrollEdge))}),[v,Ee,Tn]),uo=r.useCallback(((e,t)=>{Ae?.(e-Tn,t)}),[Ae,Tn]),ho=r.useCallback(((e,t)=>{Ve?.(e-Tn,t)}),[Ve,Tn]),fo=An?.current?.cell,po=r.useCallback(((e,t,n,r,o,i)=>{hr.current=!1;let a=fo;void 0!==a&&(a=[a[0]-Tn,a[1]]);const l=0===ze?void 0:{x:0,y:e.y,width:ze,height:e.height},s=[];void 0!==l&&s.push(l),mt>0&&(s.push({x:e.x-Tn,y:mn-mt,width:e.width,height:mt}),ze>0&&s.push({x:0,y:mn-mt,width:ze,height:mt}));const c={x:e.x-Tn,y:e.y,width:e.width,height:Pn&&e.y+e.height>=mn?e.height-1:e.height,tx:o,ty:i,extras:{selected:a,freezeRegion:l,freezeRegions:s}};dr.current=c,fr(c),tr([t,n,r]),st?.(c,c.tx,c.ty,c.extras)}),[fo,Tn,Pn,mn,ze,mt,fr,st]),go=(0,x.qJ)(ge,r.useCallback(((e,t)=>{ge?.(e-Tn,t-Tn),"none"!==be&&Qn(u.EV.fromSingleSelection(t),void 0,!0)}),[be,ge,Tn,Qn])),mo=r.useRef(!1),vo=r.useCallback((e=>{0===e.location[0]&&Tn>0?e.preventDefault():(Me?.({...e,location:[e.location[0]-Tn,e.location[1]]}),e.defaultPrevented()||(mo.current=!0),w(void 0))}),[Me,Tn]),wo=r.useCallback((()=>{mo.current=!1}),[]),bo=Ze?.selectionBehavior,yo=r.useCallback((e=>{if("block-spanning"!==bo)return;const{isGroupHeader:t,path:n,groupRows:r}=Zr(e);if(t)return[e,e];const o=n[n.length-1];return[e-o,e+r-o-1]}),[Zr,bo]),xo=r.useRef(),ko=r.useCallback((e=>{if(!fe(e,xo.current)&&(xo.current=e,!(void 0!==Kr?.current?.button&&Kr.current.button>=1))){if(0!==e.buttons&&void 0!==v&&0===Kr.current?.location[0]&&0===e.location[0]&&1===Tn&&"multi"===ye&&v.previousSelection&&!v.previousSelection.rows.hasIndex(Kr.current.location[1])&&An.rows.hasIndex(Kr.current.location[1])){const t=Math.min(Kr.current.location[1],e.location[1]),n=Math.max(Kr.current.location[1],e.location[1])+1;qn(u.EV.fromSingleSelection([t,n]),void 0,!1)}if(0!==e.buttons&&void 0!==v&&void 0!==An.current&&!mo.current&&!Xr.current&&("rect"===we||"multi-rect"===we)){const[t,n]=An.current.cell;let[r,o]=e.location;if(o<0&&(o=dr.current.y),!0===v.fillHandle&&void 0!==v.previousSelection?.current){const e=v.previousSelection.current.range;o=Math.min(o,Pn?mn-1:mn);const t=function(e,t,n,r){if("any"===r)return P(e,{x:t,y:n,width:1,height:1});if("vertical"===r&&(t=e.x),"horizontal"===r&&(n=e.y),(0,d.X4)([t,n],e))return;const o=t-e.x,i=e.x+e.width-t,a=n-e.y+1,l=e.y+e.height-n,s=Math.min("vertical"===r?Number.MAX_SAFE_INTEGER:o,"vertical"===r?Number.MAX_SAFE_INTEGER:i,"horizontal"===r?Number.MAX_SAFE_INTEGER:a,"horizontal"===r?Number.MAX_SAFE_INTEGER:l);return s===l?{x:e.x,y:e.y+e.height,width:e.width,height:n-e.y-e.height+1}:s===a?{x:e.x,y:n,width:e.width,height:e.y-n}:s===i?{x:e.x+e.width,y:e.y,width:t-e.x-e.width+1,height:e.height}:{x:t,y:e.y,width:e.x-t,height:e.height}}(e,r,o,vt);Cr(t)}else{if(Pn&&n===mn)return;if(Pn&&o===mn){if(e.kind!==de)return;o--}r=Math.max(r,Tn);const a=yo(n);o=void 0===a?o:i(o,a[0],a[1]);const l=r-t,s=o-n,c={x:l>=0?t:r,y:s>=0?n:o,width:Math.abs(l)+1,height:Math.abs(s)+1};Kn({...An.current,range:c},!0,!1,"drag")}}Ge?.({...e,location:[e.location[0]-Tn,e.location[1]]})}}),[v,Tn,ye,An,we,Ge,qn,Pn,mn,vt,yo,Kn]),Co=r.useCallback((()=>{const e=xo.current;if(void 0===e)return;const[t,n]=e.scrollEdge;let[r,o]=e.location;const a=dr.current;-1===t?r=a.extras?.freezeRegion?.x??a.x:1===t&&(r=a.x+a.width),-1===n?o=Math.max(0,a.y):1===n&&(o=Math.min(mn-1,a.y+a.height)),r=i(r,0,ur.length-1),o=i(o,0,mn-1),ko({...e,location:[r,o]})}),[ur.length,ko,mn]);!function(e,t,n){const o=r.useRef(0),[i,a]=e??[0,0];r.useEffect((()=>{if(0===i&&0===a)return void(o.current=0);let e=!1,r=0;const l=s=>{if(!e){if(0===r)r=s;else{const e=s-r;o.current=Math.min(1,o.current+e/1300);const l=o.current**1.618*e*2;t.current?.scrollBy(i*l,a*l),r=s,n?.()}window.requestAnimationFrame(l)}};return window.requestAnimationFrame(l),()=>{e=!0}}),[t,i,a,n])}(ro,gr,Co);const So=r.useCallback((e=>{if(void 0===An.current)return;const[t,n]=e,[r,i]=An.current.cell,c=An.current.range;let u=c.x,d=c.x+c.width,h=c.y,f=c.y+c.height;const[p,g]=yo(i)??[0,mn-1],m=g+1;if(0!==n)switch(n){case 2:f=m,h=i,Lr(0,f,"vertical");break;case-2:h=p,f=i+1,Lr(0,h,"vertical");break;case 1:h<i?(h++,Lr(0,h,"vertical")):(f=Math.min(m,f+1),Lr(0,f,"vertical"));break;case-1:f>i+1?(f--,Lr(0,f,"vertical")):(h=Math.max(p,h-1),Lr(0,h,"vertical"));break;default:(0,o.vE)(n)}if(0!==t)if(2===t)d=ur.length,u=r,Lr(d-1-Tn,0,"horizontal");else if(-2===t)u=Tn,d=r+1,Lr(u-Tn,0,"horizontal");else{let e=[];if(void 0!==_n){const t=_n({x:u,y:h,width:d-u-Tn,height:f-h},Vn.current.signal);"object"===typeof t&&(e=function(e){return a(l(l(e).filter((e=>void 0!==e.span)).map((e=>s((e.span?.[0]??0)+1,(e.span?.[1]??0)+1)))))}(t))}if(1===t){let t=!1;if(u<r){if(e.length>0){const n=s(u+1,r+1).find((t=>!e.includes(t-Tn)));void 0!==n&&(u=n,t=!0)}else u++,t=!0;t&&Lr(u,0,"horizontal")}t||(d=Math.min(ur.length,d+1),Lr(d-1-Tn,0,"horizontal"))}else if(-1===t){let t=!1;if(d>r+1){if(e.length>0){const n=s(d-1,r,-1).find((t=>!e.includes(t-Tn)));void 0!==n&&(d=n,t=!0)}else d--,t=!0;t&&Lr(d-Tn,0,"horizontal")}t||(u=Math.max(Tn,u-1),Lr(u-Tn,0,"horizontal"))}else(0,o.vE)(t)}Kn({cell:An.current.cell,range:{x:u,y:h,width:d-u,height:f-h}},!0,!1,"keyboard-select")}),[_n,yo,An,ur.length,Tn,mn,Lr,Kn]),Mo=r.useRef(Jt);Mo.current=Jt;const Ro=r.useCallback(((e,t,n,r)=>{const o=yr-(n?0:1);e=i(e,Tn,or.length-1+Tn),t=i(t,0,o);const a=fo?.[0],l=fo?.[1];if(e===a&&t===l)return!1;if(r&&void 0!==An.current){const n=[...An.current.rangeStack];(An.current.range.width>1||An.current.range.height>1)&&n.push(An.current.range),Wn({...An,current:{cell:[e,t],range:{x:e,y:t,width:1,height:1},rangeStack:n}},!0)}else Kn({cell:[e,t],range:{x:e,y:t,width:1,height:1}},!0,!1,"keyboard-nav");return void 0!==b.current&&b.current[0]===e&&b.current[1]===t&&(b.current=void 0),Mo.current&&Lr(e-Tn,t),!0}),[yr,Tn,or.length,fo,An,Lr,Wn,Kn]),Eo=r.useCallback(((e,t)=>{void 0!==f?.cell&&void 0!==e&&(0,u.T9)(e)&&(xr([{location:f.cell,value:e}]),window.requestAnimationFrame((()=>{wr.current?.damage([{cell:f.cell}])}))),br(!0),p(void 0);const[n,r]=t;if(void 0!==An.current&&(0!==n||0!==r)){const t=An.current.cell[1]===yr-1&&void 0!==e;Ro(i(An.current.cell[0]+n,0,ur.length-1),i(An.current.cell[1]+r,0,yr-1),t,!1)}A?.(e,t)}),[f?.cell,br,An,A,xr,yr,Ro,ur.length]),Io=r.useMemo((()=>"gdg-overlay-"+rt++),[]),Oo=r.useCallback((e=>{br();const t=[];for(let n=e.x;n<e.x+e.width;n++)for(let r=e.y;r<e.y+e.height;r++){const e=H([n-Tn,r]);if(!e.allowOverlay&&e.kind!==u.p6.Boolean)continue;let o;if(e.kind===u.p6.Custom){const t=rr(e),n=t?.provideEditor?.(e);void 0!==t?.onDelete?o=t.onDelete(e):(0,u.DP)(n)&&(o=n?.deletedValue?.(e))}else if((0,u.T9)(e)&&e.allowOverlay||e.kind===u.p6.Boolean){const t=rr(e);o=t?.onDelete?.(e)}void 0!==o&&!(0,u.rs)(o)&&(0,u.T9)(o)&&t.push({location:[n,r],value:o})}xr(t),wr.current?.damage(t.map((e=>({cell:e.location}))))}),[br,H,rr,xr,Tn]),To=void 0!==f,Po=r.useCallback((e=>{const t=()=>{e.stopPropagation(),e.preventDefault()},n={didMatch:!1},{bounds:r}=e,o=An.columns,i=An.rows,a=En;if(!To&&De(a.clear,e,n))Wn(at,!1),Ke?.();else if(!To&&De(a.selectAll,e,n))Wn({columns:u.EV.empty(),rows:u.EV.empty(),current:{cell:An.current?.cell??[Tn,0],range:{x:Tn,y:0,width:O.length,height:mn},rangeStack:[]}},!1);else if(De(a.search,e,n))g?.current?.focus({preventScroll:!0}),zn(!0);else if(De(a.delete,e,n)){const e=Yn?.(An)??!0;if(!1!==e){const t=!0===e?An:e;if(void 0!==t.current){Oo(t.current.range);for(const e of t.current.rangeStack)Oo(e)}for(const e of t.rows)Oo({x:Tn,y:e,width:O.length,height:1});for(const e of t.columns)Oo({x:e,y:0,width:1,height:mn})}}if(n.didMatch)return t(),!0;if(void 0===An.current)return!1;let[l,s]=An.current.cell;const[,c]=An.current.cell;let d=!1,h=!1;De(a.scrollToSelectedCell,e,n)?No.current(l-Tn,s):"none"!==be&&De(a.selectColumn,e,n)?o.hasIndex(l)?Qn(o.remove(l),void 0,!0):"single"===be?Qn(u.EV.fromSingleSelection(l),void 0,!0):Qn(void 0,l,!0):"none"!==ye&&De(a.selectRow,e,n)?i.hasIndex(s)?qn(i.remove(s),void 0,!0):"single"===ye?qn(u.EV.fromSingleSelection(s),void 0,!0):qn(void 0,s,!0):!To&&void 0!==r&&De(a.activateCell,e,n)?s===mn&&Pn?window.setTimeout((()=>{const e=Nr(l);_r(e??l)}),0):(L?.([l-Tn,s]),Hr(r,!0)):An.current.range.height>1&&De(a.downFill,e,n)?lo():An.current.range.width>1&&De(a.rightFill,e,n)?ao():De(a.goToNextPage,e,n)?s+=Math.max(1,dr.current.height-4):De(a.goToPreviousPage,e,n)?s-=Math.max(1,dr.current.height-4):De(a.goToFirstCell,e,n)?(p(void 0),s=0,l=0):De(a.goToLastCell,e,n)?(p(void 0),s=Number.MAX_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER):De(a.selectToFirstCell,e,n)?(p(void 0),So([-2,-2])):De(a.selectToLastCell,e,n)?(p(void 0),So([2,2])):To?(De(a.closeOverlay,e,n)&&p(void 0),De(a.acceptOverlayDown,e,n)&&(p(void 0),s++),De(a.acceptOverlayUp,e,n)&&(p(void 0),s--),De(a.acceptOverlayLeft,e,n)&&(p(void 0),l--),De(a.acceptOverlayRight,e,n)&&(p(void 0),l++)):(De(a.goDownCell,e,n)?s+=1:De(a.goUpCell,e,n)?s-=1:De(a.goRightCell,e,n)?l+=1:De(a.goLeftCell,e,n)?l-=1:De(a.goDownCellRetainSelection,e,n)?(s+=1,d=!0):De(a.goUpCellRetainSelection,e,n)?(s-=1,d=!0):De(a.goRightCellRetainSelection,e,n)?(l+=1,d=!0):De(a.goLeftCellRetainSelection,e,n)?(l-=1,d=!0):De(a.goToLastRow,e,n)?s=mn-1:De(a.goToFirstRow,e,n)?s=Number.MIN_SAFE_INTEGER:De(a.goToLastColumn,e,n)?l=Number.MAX_SAFE_INTEGER:De(a.goToFirstColumn,e,n)?l=Number.MIN_SAFE_INTEGER:"rect"!==we&&"multi-rect"!==we||(De(a.selectGrowDown,e,n)?So([0,1]):De(a.selectGrowUp,e,n)?So([0,-1]):De(a.selectGrowRight,e,n)?So([1,0]):De(a.selectGrowLeft,e,n)?So([-1,0]):De(a.selectToLastRow,e,n)?So([0,2]):De(a.selectToFirstRow,e,n)?So([0,-2]):De(a.selectToLastColumn,e,n)?So([2,0]):De(a.selectToFirstColumn,e,n)&&So([-2,0])),h=n.didMatch);if(void 0!==jr&&"normal"!==jr&&s!==c){const e="skip-down"===jr||"skip"===jr||"block"===jr,t=s<c;if(t&&("skip-up"===jr||"skip"===jr||"block"===jr)){for(;s>=0&&Zr(s).isGroupHeader;)s--;s<0&&(s=c)}else if(!t&&e){for(;s<mn&&Zr(s).isGroupHeader;)s++;s>=mn&&(s=c)}}const f=Ro(l,s,!1,d),m=n.didMatch;return m&&(f||!h||Bt)&&t(),m}),[jr,To,An,En,be,ye,we,Tn,Zr,mn,Ro,Wn,Ke,O.length,Yn,Bt,Oo,Qn,qn,Pn,Nr,_r,L,Hr,lo,ao,So]),Do=r.useCallback((e=>{let t=!1;if(void 0!==ie&&ie({...e,cancel:()=>{t=!0}}),t)return;if(Po(e))return;if(void 0===An.current)return;const[n,r]=An.current.cell,o=dr.current;if(he&&!e.metaKey&&!e.ctrlKey&&void 0!==An.current&&1===e.key.length&&/[ -~]/g.test(e.key)&&void 0!==e.bounds&&(0,u.Qo)(H([n-Tn,Math.max(0,Math.min(r,mn-1))]))){if((!Pn||r!==mn)&&(o.y>r||r>o.y+o.height||o.x>n||n>o.x+o.width))return;Hr(e.bounds,!0,e.key),e.stopPropagation(),e.preventDefault()}}),[he,ie,Po,An,H,Tn,mn,Pn,Hr]),Ho=r.useCallback(((e,t)=>{const n=e.location[0]-Tn;if("header"===e.kind&&Y?.(n,{...e,preventDefault:t}),e.kind===ue){if(n<0)return;q?.(n,{...e,preventDefault:t})}if("cell"===e.kind){const[r,o]=e.location;X?.([n,o],{...e,preventDefault:t}),(0,d.pZ)(An,e.location)||Ro(r,o,!1,!1)}}),[An,X,q,Y,Tn,Ro]),zo=r.useCallback((async e=>{if(!En.paste)return;function t(e,t,n,r){const i="object"===typeof n?n?.join("\n")??"":n?.toString()??"";if(!(0,u.rs)(e)&&(0,u.Qo)(e)&&!0!==e.readonly){const a=V?.(i,e);if(void 0!==a&&(0,u.T9)(a))return{location:t,value:a};const l=rr(e);if(void 0===l)return;if(l.kind===u.p6.Custom){(0,o.hu)(e.kind===u.p6.Custom);const n=l.onPaste?.(i,e.data);if(void 0===n)return;return{location:t,value:{...e,data:n}}}{const a=l.onPaste?.(i,e,{formatted:r,formattedString:"string"===typeof r?r:r?.join("\n"),rawValue:n});if(void 0===a)return;return(0,o.hu)(a.kind===e.kind),{location:t,value:a}}}}const n=An.columns,r=An.rows,i=!0===gr.current?.contains(document.activeElement)||!0===m.current?.contains(document.activeElement);let a;if(void 0!==An.current?a=[An.current.range.x,An.current.range.y]:1===n.length?a=[n.first()??0,0]:1===r.length&&(a=[Tn,r.first()??0]),i&&void 0!==a){let n,r;const o="text/plain",i="text/html";if(void 0!==navigator.clipboard.read){const e=await navigator.clipboard.read();for(const t of e){if(t.types.includes(i)){const e=await t.getType(i),r=_e(await e.text());if(void 0!==r){n=r;break}}t.types.includes(o)&&(r=await(await t.getType(o)).text())}}else if(void 0!==navigator.clipboard.readText)r=await navigator.clipboard.readText();else{if(void 0===e||null===e?.clipboardData)return;if(e.clipboardData.types.includes(i)){n=_e(e.clipboardData.getData(i))}void 0===n&&e.clipboardData.types.includes(o)&&(r=e.clipboardData.getData(o))}const[l,s]=a,c=[];do{if(void 0===Ie){const e=t(Tr(a),a,r??n?.map((e=>e.map((e=>e.rawValue)).join("\t"))).join("\t")??"",void 0);void 0!==e&&c.push(e);break}if(void 0===n){if(void 0===r)return;n=$e(r)}if(!1===Ie||"function"===typeof Ie&&!0!==Ie?.([a[0]-Tn,a[1]],n.map((e=>e.map((e=>e.rawValue?.toString()??""))))))return;for(const[e,r]of n.entries()){if(e+s>=mn)break;for(const[n,o]of r.entries()){const r=[n+l,e+s],[i,a]=r;if(i>=ur.length)continue;if(a>=yr)continue;const u=t(Tr(r),r,o.rawValue,o.formatted);void 0!==u&&c.push(u)}}}while(0);xr(c),wr.current?.damage(c.map((e=>({cell:e.location}))))}}),[V,rr,Tr,An,En.paste,gr,ur.length,xr,yr,Ie,Tn,mn]);(0,x.OR)("paste",zo,y,!1,!0);const Lo=r.useCallback((async(e,t)=>{if(!En.copy)return;const n=!0===t||!0===gr.current?.contains(document.activeElement)||!0===m.current?.contains(document.activeElement),r=An.columns,o=An.rows,i=(t,n)=>{if(He){Be([n.map((e=>({kind:u.p6.Text,data:O[e].title,displayData:O[e].title,allowOverlay:!1}))),...t],n,e)}else Be(t,n,e)};if(n&&void 0!==_n)if(void 0!==An.current){let e=_n(An.current.range,Vn.current.signal);"object"!==typeof e&&(e=await e()),i(e,s(An.current.range.x-Tn,An.current.range.x+An.current.range.width-Tn))}else if(void 0!==o&&o.length>0){const e=[...o].map((e=>{const t=_n({x:Tn,y:e,width:O.length,height:1},Vn.current.signal);return"object"===typeof t?t[0]:t().then((e=>e[0]))}));if(e.some((e=>e instanceof Promise))){i(await Promise.all(e),s(O.length))}else i(e,s(O.length))}else if(r.length>0){const e=[],t=[];for(const n of r){let r=_n({x:n,y:0,width:1,height:mn},Vn.current.signal);"object"!==typeof r&&(r=await r()),e.push(r),t.push(n-Tn)}if(1===e.length)i(e[0],t);else{i(e.reduce(((e,t)=>e.map(((e,n)=>[...e,...t[n]])))),t)}}}),[O,_n,An,En.copy,Tn,gr,mn,He]);(0,x.OR)("copy",Lo,y,!1,!1);const Fo=r.useCallback((async e=>{if(!En.cut)return;if((!0===gr.current?.contains(document.activeElement)||!0===m.current?.contains(document.activeElement))&&(await Lo(e),void 0!==An.current)){let e={current:{cell:An.current.cell,range:An.current.range,rangeStack:[]},rows:u.EV.empty(),columns:u.EV.empty()};const t=Yn?.(e);if(!1===t)return;if(e=!0===t?e:t,void 0===e.current)return;Oo(e.current.range)}}),[Oo,An,En.cut,Lo,gr,Yn]);(0,x.OR)("cut",Fo,y,!1,!1);const Ao=r.useCallback(((e,t)=>{if(void 0!==te)return 0!==Tn&&(e=e.map((e=>[e[0]-Tn,e[1]]))),void te(e,t);if(0===e.length||-1===t)return;const[n,r]=e[t];void 0!==b.current&&b.current[0]===n&&b.current[1]===r||(b.current=[n,r],Ro(n,r,!1,!1))}),[te,Tn,Ro]),[Vo,_o]=ct?.current?.cell??[],No=r.useRef(Lr);No.current=Lr,r.useLayoutEffect((()=>{!Mo.current||hr.current||void 0===Vo||void 0===_o||Vo===Bn.current?.current?.cell[0]&&_o===Bn.current?.current?.cell[1]||No.current(Vo,_o),hr.current=!1}),[Vo,_o]);const $o=void 0!==An.current&&(An.current.cell[0]>=ur.length||An.current.cell[1]>=yr);r.useLayoutEffect((()=>{$o&&Wn(at,!1)}),[$o,Wn]);const Bo=r.useMemo((()=>!0===Pn&&!0===gt?.tint?u.EV.fromSingleSelection(yr-1):u.EV.empty()),[yr,Pn,gt?.tint]),Wo=r.useCallback((e=>"boolean"===typeof yt?yt:yt?.(e-Tn)??!0),[Tn,yt]),Zo=r.useMemo((()=>{if(void 0===Qr||null===m.current)return null;const{bounds:e,group:t}=Qr,n=m.current.getBoundingClientRect();return r.createElement(Oe,{bounds:e,group:t,canvasBounds:n,onClose:()=>Jr(void 0),onFinish:e=>{Jr(void 0),Q?.(t,e)}})}),[Q,Qr]),jo=Math.min(ur.length,ze+(On?1:0));r.useImperativeHandle(t,(()=>({appendRow:(e,t)=>_r(e+Tn,t),updateCells:e=>(0!==Tn&&(e=e.map((e=>({cell:[e.cell[0]+Tn,e.cell[1]]})))),wr.current?.damage(e)),getBounds:(e,t)=>{if(null!==m?.current&&null!==gr?.current){if(void 0===e&&void 0===t){const e=m.current.getBoundingClientRect(),t=e.width/gr.current.clientWidth;return{x:e.x-gr.current.scrollLeft*t,y:e.y-gr.current.scrollTop*t,width:gr.current.scrollWidth*t,height:gr.current.scrollHeight*t}}return wr.current?.getBounds((e??0)+Tn,t)}},focus:()=>wr.current?.focus(),emit:async e=>{switch(e){case"delete":Do({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!1,key:"Delete",keyCode:46,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-right":Do({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"r",keyCode:82,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-down":Do({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"d",keyCode:68,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"copy":await Lo(void 0,!0);break;case"paste":await zo()}},scrollTo:Lr,remeasureColumns:e=>{for(const t of e)no(t+Tn)}})),[_r,no,gr,Lo,Do,zo,Tn,Lr]);const[Uo,Xo]=fo??[],Go=r.useCallback((e=>{const[t,n]=e;-1!==n?Uo===t&&Xo===n||(Kn({cell:e,range:{x:t,y:n,width:1,height:1}},!0,!1,"keyboard-nav"),Lr(t,n)):"none"!==be&&(Qn(u.EV.fromSingleSelection(t),void 0,!1),br())}),[be,br,Lr,Uo,Xo,Kn,Qn]),[Yo,Ko]=r.useState(!1),qo=r.useRef(c((e=>{Ko(e)}),5)),Qo=r.useCallback((()=>{qo.current(!0),void 0===An.current&&0===An.columns.length&&0===An.rows.length&&void 0===v&&Kn({cell:[Tn,vr],range:{x:Tn,y:vr,width:1,height:1}},!0,!1,"keyboard-select")}),[vr,An,v,Tn,Kn]),Jo=r.useCallback((()=>{qo.current(!1)}),[]),[ei,ti]=r.useMemo((()=>{let e;const t=It?.scrollbarWidthOverride??(0,x.Iz)(),n=mn+(Pn?1:0);if("number"===typeof xn)e=lr+n*xn;else{let t=0;const r=Math.min(n,10);for(let e=0;e<r;e++)t+=xn(e);t=Math.floor(t/r),e=lr+n*t}e+=t;const r=ur.reduce(((e,t)=>t.width+e),0)+t;return[`${Math.min(1e5,r)}px`,`${Math.min(1e5,e)}px`]}),[ur,It?.scrollbarWidthOverride,xn,mn,Pn,lr]),ni=r.useMemo((()=>(0,I.be)(Jn)),[Jn]);return r.createElement(I.Ni.Provider,{value:Jn},r.createElement(Ue,{style:ni,className:G,inWidth:R??ei,inHeight:E??ti},r.createElement(Re,{fillHandle:Et,drawFocusRing:tn,experimental:It,fixedShadowX:Ot,fixedShadowY:Tt,getRowThemeOverride:bn,headerIcons:Pt,imageWindowLoader:Dt,initialSize:Ht,isDraggable:zt,onDragLeave:Lt,onRowMoved:Ft,overscrollX:Mn,overscrollY:Rn,preventDiagonalScrolling:_t,rightElement:Nt,rightElementProps:$t,smoothScrollX:Wt,smoothScrollY:Zt,className:G,enableGroups:ar,onCanvasFocused:Qo,onCanvasBlur:Jo,canvasRef:m,onContextMenu:Ho,theme:Jn,cellXOffset:mr,cellYOffset:vr,accessibilityHeight:pr.height,onDragEnd:wo,columns:ur,nonGrowWidth:ir,drawHeader:Xn,onColumnProposeMove:W,drawCell:Gn,disabledRows:Bo,freezeColumns:jo,lockColumns:Tn,firstColAccessible:0===Tn,getCellContent:Tr,minColumnWidth:hn,maxColumnWidth:fn,searchInputRef:g,showSearch:Ln,onSearchClose:Fn,highlightRegions:Ir,getCellsForSelection:_n,getGroupDetails:Pr,headerHeight:kn,isFocused:Yo,groupHeaderHeight:ar?Cn:0,freezeTrailingRows:mt+(Pn&&!0===gt?.sticky?1:0),hasAppendRow:Pn,onColumnResize:Zn,onColumnResizeEnd:jn,onColumnResizeStart:Un,onCellFocused:Go,onColumnMoved:go,onDragStart:vo,onHeaderMenuClick:uo,onHeaderIndicatorClick:ho,onItemHovered:ko,isFilling:!0===v?.fillHandle,onMouseMove:co,onKeyDown:Do,onKeyUp:ae,onMouseDown:qr,onMouseUp:so,onDragOverCell:xt,onDrop:kt,onSearchResultsChanged:Ao,onVisibleRegionChanged:po,clientSize:er,rowHeight:xn,searchResults:ne,searchValue:oe,onSearchValueChange:re,rows:yr,scrollRef:gr,selection:An,translateX:pr.tx,translateY:pr.ty,verticalBorder:Wo,gridRef:wr,getCellRenderer:rr,resizeIndicator:Qt}),Zo,void 0!==f&&r.createElement(r.Suspense,{fallback:null},r.createElement(nt,{...f,validateCell:$n,bloom:$,id:Io,getCellRenderer:rr,className:!0===It?.isSubGrid?"click-outside-ignore":void 0,provideEditor:pt,imageEditorOverride:C,onFinishEditing:Eo,markdownDivCreateNode:M,isOutsideClick:Kt}))))}));function st(e){const{cell:t,posX:n,posY:r,bounds:o,theme:i}=e,{width:a,height:l,x:s,y:c}=o,d=t.maxSize??20,h=Math.floor(o.y+l/2),f=(0,x.Qo)(d,l,i.cellVerticalPadding),p=(0,x.XC)(t.contentAlign??"center",s,a,i.cellHorizontalPadding,f),g=(0,x.kq)(p,h,f),m=(0,x.qq)(s+n,c+r,g);return(0,u.kf)(t)&&m}const ct={getAccessibilityString:e=>e.data?.toString()??"false",kind:u.p6.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:e=>function(e,t,n,r,o){if(!n&&t===u.qF)return;const{ctx:i,hoverAmount:a,theme:l,rect:s,highlighted:c,hoverX:d,hoverY:h,cell:{contentAlign:f}}=e,{x:p,y:g,width:m,height:v}=s;let w=!1;if(o>0){let e=n?1-o+o*a:.4;if(t===u.qF&&(e*=a),0===e)return;e<1&&(w=!0,i.globalAlpha=e)}$(i,l,t,p,g,m,v,c,d,h,r,f),w&&(i.globalAlpha=1)}(e,e.cell.data,(0,u.kf)(e.cell),e.cell.maxSize??20,e.cell.hoverEffectIntensity??.35),onDelete:e=>({...e,data:!1}),onSelect:e=>{st(e)&&e.preventDefault()},onClick:e=>{if(st(e))return{...e.cell,data:We(e.cell.data)}},onPaste:(e,t)=>{let n=u.qF;return"true"===e.toLowerCase()?n=!0:"false"===e.toLowerCase()?n=!1:"indeterminate"===e.toLowerCase()&&(n=u.sd),n===t.data?void 0:{...t,data:n}}};const ut=(0,ve.z)("div")({name:"BubblesOverlayEditorStyle",class:"gdg-b1ygi5by",propsAsIs:!1}),dt=e=>{const{bubbles:t}=e;return r.createElement(ut,null,t.map(((e,t)=>r.createElement("div",{key:t,className:"boe-bubble"},e))),r.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},ht={getAccessibilityString:e=>(0,x.jM)(e.data),kind:u.p6.Bubble,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce(((t,n)=>e.measureText(n).width+t+20),0)+2*n.cellHorizontalPadding-4,draw:e=>function(e,t){const{rect:n,theme:r,ctx:o,highlighted:i}=e,{x:a,y:l,width:s,height:c}=n,u=20,h=8,f=ft;let p=a+r.cellHorizontalPadding;const g=[];for(const m of t){if(p>a+s)break;const e=(0,d.P7)(m,o,r.baseFontFull).width;g.push({x:p,width:e}),p+=e+2*h+f}o.beginPath();for(const m of g)(0,d.NK)(o,m.x,l+(c-u)/2,m.width+2*h,u,r.roundingRadius??u/2);o.fillStyle=i?r.bgBubbleSelected:r.bgBubble,o.fill();for(const[m,v]of g.entries())o.beginPath(),o.fillStyle=r.textBubble,o.fillText(t[m],v.x+h,l+c/2+(0,d.aX)(o,r))}(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return r.createElement(dt,{bubbles:t.data})},onPaste:()=>{}},ft=4;const pt=(0,ve.z)("div")({name:"DrilldownOverlayEditorStyle",class:"gdg-d4zsq0x",propsAsIs:!1}),gt=e=>{const{drilldowns:t}=e;return r.createElement(pt,null,t.map(((e,t)=>r.createElement("div",{key:t,className:"doe-bubble"},void 0!==e.img&&r.createElement("img",{src:e.img}),r.createElement("div",null,e.text)))))},mt={getAccessibilityString:e=>(0,x.jM)(e.data.map((e=>e.text))),kind:u.p6.Drilldown,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce(((t,n)=>e.measureText(n.text).width+t+20+(void 0!==n.img?18:0)),0)+2*n.cellHorizontalPadding-4,draw:e=>function(e,t){const{rect:n,theme:r,ctx:o,imageLoader:i,col:a,row:l}=e,{x:s,width:c}=n,u=r.baseFontFull,h=(0,d.WA)(o,u),f=Math.min(n.height,Math.max(16,2*Math.ceil(h*r.lineHeight))),p=Math.floor(n.y+(n.height-f)/2),g=f-10,m=8,v=vt;let w=s+r.cellHorizontalPadding;const b=r.roundingRadius??6,y=function(e,t,n,r){const o=Math.ceil(window.devicePixelRatio),i=5,a=n-2*i,l=4,s=n*o,c=r+i,u=3*r,h=(u+2*i)*o,f=`${e},${t},${o},${n}`;if(void 0!==wt[f])return{el:wt[f],height:s,width:h,middleWidth:l*o,sideWidth:c*o,padding:i*o,dpr:o};const p=document.createElement("canvas"),g=p.getContext("2d");return null===g?null:(p.width=h,p.height=s,g.scale(o,o),wt[f]=p,g.beginPath(),(0,d.NK)(g,i,i,u,a,r),g.shadowColor="rgba(24, 25, 34, 0.4)",g.shadowBlur=1,g.fillStyle=e,g.fill(),g.shadowColor="rgba(24, 25, 34, 0.3)",g.shadowOffsetY=1,g.shadowBlur=5,g.fillStyle=e,g.fill(),g.shadowOffsetY=0,g.shadowBlur=0,g.shadowBlur=0,g.beginPath(),(0,d.NK)(g,i+.5,i+.5,u,a,r),g.strokeStyle=t,g.lineWidth=1,g.stroke(),{el:p,height:s,width:h,sideWidth:c*o,middleWidth:r*o,padding:i*o,dpr:o})}(r.bgCell,r.drilldownBorder,f,b),x=[];for(const k of t){if(w>s+c)break;const e=(0,d.P7)(k.text,o,u).width;let t=0;if(void 0!==k.img){void 0!==i.loadOrGetImage(k.img,a,l)&&(t=g-8+4)}const n=e+t+2*m;x.push({x:w,width:n}),w+=n+v}if(null!==y){const{el:e,height:t,middleWidth:n,sideWidth:r,width:i,dpr:a,padding:l}=y,s=r/a,c=l/a;for(const u of x){const a=Math.floor(u.x),l=Math.floor(u.width),d=l-2*(s-c);o.imageSmoothingEnabled=!1,o.drawImage(e,0,0,r,t,a-c,p,s,f),d>0&&o.drawImage(e,r,0,n,t,a+(s-c),p,d,f),o.drawImage(e,i-r,0,r,t,a+l-(s-c),p,s,f),o.imageSmoothingEnabled=!0}}o.beginPath();for(const[k,C]of x.entries()){const e=t[k];let n=C.x+m;if(void 0!==e.img){const t=i.loadOrGetImage(e.img,a,l);if(void 0!==t){const e=g-8;let i=0,a=0,l=t.width,s=t.height;l>s?(i+=(l-s)/2,l=s):s>l&&(a+=(s-l)/2,s=l),o.beginPath(),(0,d.NK)(o,n,p+f/2-e/2,e,e,r.roundingRadius??3),o.save(),o.clip(),o.drawImage(t,i,a,l,s,n,p+f/2-e/2,e,e),o.restore(),n+=e+4}}o.beginPath(),o.fillStyle=r.textBubble,o.fillText(e.text,n,p+f/2+(0,d.aX)(o,r))}}(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return r.createElement(gt,{drilldowns:t.data})},onPaste:()=>{}},vt=4,wt={};const bt=(0,ve.z)("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});var yt=n(27261);const xt=e=>{const{urls:t,canWrite:n,onEditClick:o,renderImage:i}=e,a=t.filter((e=>""!==e));if(0===a.length)return null;const l=a.length>1;return r.createElement(bt,{"data-testid":"GDG-default-image-overlay-editor"},r.createElement(yt.lr,{showArrows:l,showThumbs:!1,swipeable:l,emulateTouch:l,infiniteLoop:l},a.map((e=>{const t=i?.(e)??r.createElement("img",{draggable:!1,src:e});return r.createElement("div",{className:"gdg-centering-container",key:e},t)}))),n&&o&&r.createElement("button",{className:"gdg-edit-icon",onClick:o},r.createElement(x.Wy,null)))},kt={getAccessibilityString:e=>e.data.join(", "),kind:u.p6.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:e=>function(e,t,n,r){const{rect:o,col:i,row:a,theme:l,ctx:s,imageLoader:c}=e,{x:u,y:h,height:f,width:p}=o,g=f-2*l.cellVerticalPadding,m=[];let v=0;for(let d=0;d<t.length;d++){const e=t[d];if(0===e.length)continue;const n=c.loadOrGetImage(e,i,a);if(void 0!==n){m[d]=n;v+=n.width*(g/n.height)+Ct}}if(0===v)return;v-=Ct;let w=u+l.cellHorizontalPadding;"right"===r?w=Math.floor(u+p-l.cellHorizontalPadding-v):"center"===r&&(w=Math.floor(u+p/2-v/2));for(const b of m){if(void 0===b)continue;const e=b.width*(g/b.height);n>0&&(s.beginPath(),(0,d.NK)(s,w,h+l.cellVerticalPadding,e,g,n),s.save(),s.clip()),s.drawImage(b,w,h+l.cellVerticalPadding,e,g),n>0&&s.restore(),w+=e+Ct}}(e,e.cell.displayData??e.cell.data,e.cell.rounding??e.theme.roundingRadius??4,e.cell.contentAlign),measure:(e,t)=>50*t.data.length,onDelete:e=>({...e,data:[]}),provideEditor:()=>e=>{const{value:t,onFinishedEditing:n,imageEditorOverride:o}=e,i=o??xt;return r.createElement(i,{urls:t.data,canWrite:!0!==t.readonly,onCancel:n,onChange:e=>{n({...t,data:[e]})}})},onPaste:(e,t)=>{const n=(e=e.trim()).split(",").map((e=>{try{return new URL(e),e}catch{return}})).filter((e=>void 0!==e));if(n.length!==t.data.length||!n.every(((e,n)=>e===t.data[n])))return{...t,data:n}}},Ct=4;const St={getAccessibilityString:()=>"",kind:u.p6.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,draw:e=>{const{cell:t,col:n,row:r,ctx:o,rect:i,theme:a}=e;if(void 0===t.skeletonWidth||0===t.skeletonWidth)return;let l=t.skeletonWidth;void 0!==t.skeletonWidthVariability&&t.skeletonWidthVariability>0&&(l+=Math.round(function(e,t){let n=49632*e+325176*t;return n^=n<<13,n^=n>>17,n^=n<<5,n/4294967295*2}(n,r)*t.skeletonWidthVariability));const s=a.cellHorizontalPadding;l+2*s>=i.width&&(l=i.width-2*s-1);const c=t.skeletonHeight??Math.min(18,i.height-2*a.cellVerticalPadding);(0,d.NK)(o,i.x+s,i.y+(i.height-c)/2,l,c,a.roundingRadius??3),o.fillStyle=(0,k.fG)(a.textDark,.1),o.fill()},onPaste:()=>{}};function Mt(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let Rt={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const Et=/[&<>"']/,It=new RegExp(Et.source,"g"),Ot=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Tt=new RegExp(Ot.source,"g"),Pt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Dt=e=>Pt[e];function Ht(e,t){if(t){if(Et.test(e))return e.replace(It,Dt)}else if(Ot.test(e))return e.replace(Tt,Dt);return e}const zt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Lt(e){return e.replace(zt,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const Ft=/(^|[^\[])\^/g;function At(e,t){e="string"===typeof e?e:e.source,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(Ft,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n}const Vt=/[^\w:]/g,_t=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Nt(e,t,n){if(e){let e;try{e=decodeURIComponent(Lt(n)).replace(Vt,"").toLowerCase()}catch(r){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!_t.test(n)&&(n=function(e,t){$t[" "+e]||(Bt.test(e)?$t[" "+e]=e+"/":$t[" "+e]=Xt(e,"/",!0));e=$t[" "+e];const n=-1===e.indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(Wt,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(Zt,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(r){return null}return n}const $t={},Bt=/^[^:]+:\/*[^/]*$/,Wt=/^([^:]+:)[\s\S]*$/,Zt=/^([^:]+:\/*[^/]*)[\s\S]*$/;const jt={exec:function(){}};function Ut(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function Xt(e,t,n){const r=e.length;if(0===r)return"";let o=0;for(;o<r;){const i=e.charAt(r-o-1);if(i!==t||n){if(i===t||!n)break;o++}else o++}return e.slice(0,r-o)}function Gt(e,t){if(t<1)return"";let n="";for(;t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function Yt(e,t,n,r){const o=t.href,i=t.title?Ht(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:o,title:i,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:o,title:i,text:Ht(a)}}class Kt{constructor(e){this.options=e||Rt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Xt(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=Xt(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *>[ \t]?/gm,""),n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,r,o,i,a,l,s,c,u,d,h,f,p=t[1].trim();const g=p.length>1,m={type:"list",raw:"",ordered:g,start:g?+p.slice(0,-1):"",loose:!1,items:[]};p=g?`\\d{1,9}\\${p.slice(-1)}`:`\\${p}`,this.options.pedantic&&(p=g?p:"[*+-]");const v=new RegExp(`^( {0,3}${p})((?:[\t ][^\\n]*)?(?:\\n|$))`);for(;e&&(f=!1,t=v.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),u=e.split("\n",1)[0],this.options.pedantic?(i=2,h=c.trimLeft()):(i=t[2].search(/[^ ]/),i=i>4?1:i,h=c.slice(i),i+=t[1].length),l=!1,!c&&/^ *$/.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),f=!0),!f){const t=new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),a=new RegExp(`^ {0,${Math.min(3,i-1)}}#`);for(;e&&(d=e.split("\n",1)[0],u=d,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!o.test(u))&&!a.test(u)&&!t.test(u)&&!r.test(e);){if(u.search(/[^ ]/)>=i||!u.trim())h+="\n"+u.slice(i);else{if(l)break;if(c.search(/[^ ]/)>=4)break;if(o.test(c))break;if(a.test(c))break;if(r.test(c))break;h+="\n"+u}l||u.trim()||(l=!0),n+=d+"\n",e=e.substring(d.length+1),c=u.slice(i)}}m.loose||(s?m.loose=!0:/\n *\n *$/.test(n)&&(s=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(h),r&&(o="[ ] "!==r[0],h=h.replace(/^\[[ xX]\] +/,""))),m.items.push({type:"list_item",raw:n,task:!!r,checked:o,loose:!1,text:h}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=h.trimRight(),m.raw=m.raw.trimRight();const w=m.items.length;for(a=0;a<w;a++)if(this.lexer.state.top=!1,m.items[a].tokens=this.lexer.blockTokens(m.items[a].text,[]),!m.loose){const e=m.items[a].tokens.filter((e=>"space"===e.type)),t=e.length>0&&e.some((e=>/\n.*\n/.test(e.raw)));m.loose=t}if(m.loose)for(a=0;a<w;a++)m.items[a].loose=!0;return m}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){const n=this.options.sanitizer?this.options.sanitizer(t[0]):Ht(t[0]);e.type="paragraph",e.text=n,e.tokens=this.lexer.inline(n)}return e}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:Ut(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,r,o,i,a=e.align.length;for(n=0;n<a;n++)/^ *-+: *$/.test(e.align[n])?e.align[n]="right":/^ *:-+: *$/.test(e.align[n])?e.align[n]="center":/^ *:-+ *$/.test(e.align[n])?e.align[n]="left":e.align[n]=null;for(a=e.rows.length,n=0;n<a;n++)e.rows[n]=Ut(e.rows[n],e.header.length).map((e=>({text:e})));for(a=e.header.length,r=0;r<a;r++)e.header[r].tokens=this.lexer.inline(e.header[r].text);for(a=e.rows.length,r=0;r<a;r++)for(i=e.rows[r],o=0;o<i.length;o++)i[o].tokens=this.lexer.inline(i[o].text);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Ht(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Ht(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=Xt(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,o=0;for(;o<n;o++)if("\\"===e[o])o++;else if(e[o]===t[0])r++;else if(e[o]===t[1]&&(r--,r<0))return o;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),Yt(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return Yt(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrong.lDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;const o=r[1]||r[2]||"";if(!o||o&&(""===n||this.rules.inline.punctuation.exec(n))){const n=r[0].length-1;let o,i,a=n,l=0;const s="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=s.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(i=o.length,r[3]||r[4]){a+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){l+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+l);const t=e.slice(0,n+r.index+(r[0].length-o.length)+i);if(Math.min(n,i)%2){const e=t.slice(1,-1);return{type:"em",raw:t,text:e,tokens:this.lexer.inlineTokens(e)}}const s=t.slice(2,-2);return{type:"strong",raw:t,text:s,tokens:this.lexer.inlineTokens(s)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=Ht(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,r;return"@"===n[2]?(e=Ht(this.options.mangle?t(n[1]):n[1]),r="mailto:"+e):(e=Ht(n[1]),r=e),{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=Ht(this.options.mangle?t(n[0]):n[0]),r="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=Ht(n[0]),r="www."===n[1]?"http://"+n[0]:n[0]}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):Ht(n[0]):n[0]:Ht(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:e}}}}const qt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:jt,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};qt.def=At(qt.def).replace("label",qt._label).replace("title",qt._title).getRegex(),qt.bullet=/(?:[*+-]|\d{1,9}[.)])/,qt.listItemStart=At(/^( *)(bull) */).replace("bull",qt.bullet).getRegex(),qt.list=At(qt.list).replace(/bull/g,qt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+qt.def.source+")").getRegex(),qt._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",qt._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,qt.html=At(qt.html,"i").replace("comment",qt._comment).replace("tag",qt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),qt.paragraph=At(qt._paragraph).replace("hr",qt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",qt._tag).getRegex(),qt.blockquote=At(qt.blockquote).replace("paragraph",qt.paragraph).getRegex(),qt.normal={...qt},qt.gfm={...qt.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},qt.gfm.table=At(qt.gfm.table).replace("hr",qt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",qt._tag).getRegex(),qt.gfm.paragraph=At(qt._paragraph).replace("hr",qt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",qt.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",qt._tag).getRegex(),qt.pedantic={...qt.normal,html:At("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",qt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:jt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:At(qt.normal._paragraph).replace("hr",qt.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",qt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Qt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:jt,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:jt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function Jt(e){return e.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201c").replace(/"/g,"\u201d").replace(/\.{3}/g,"\u2026")}function en(e){let t,n,r="";const o=e.length;for(t=0;t<o;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}Qt._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Qt.punctuation=At(Qt.punctuation).replace(/punctuation/g,Qt._punctuation).getRegex(),Qt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Qt.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,Qt._comment=At(qt._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Qt.emStrong.lDelim=At(Qt.emStrong.lDelim).replace(/punct/g,Qt._punctuation).getRegex(),Qt.emStrong.rDelimAst=At(Qt.emStrong.rDelimAst,"g").replace(/punct/g,Qt._punctuation).getRegex(),Qt.emStrong.rDelimUnd=At(Qt.emStrong.rDelimUnd,"g").replace(/punct/g,Qt._punctuation).getRegex(),Qt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Qt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Qt._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Qt.autolink=At(Qt.autolink).replace("scheme",Qt._scheme).replace("email",Qt._email).getRegex(),Qt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Qt.tag=At(Qt.tag).replace("comment",Qt._comment).replace("attribute",Qt._attribute).getRegex(),Qt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Qt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Qt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Qt.link=At(Qt.link).replace("label",Qt._label).replace("href",Qt._href).replace("title",Qt._title).getRegex(),Qt.reflink=At(Qt.reflink).replace("label",Qt._label).replace("ref",qt._label).getRegex(),Qt.nolink=At(Qt.nolink).replace("ref",qt._label).getRegex(),Qt.reflinkSearch=At(Qt.reflinkSearch,"g").replace("reflink",Qt.reflink).replace("nolink",Qt.nolink).getRegex(),Qt.normal={...Qt},Qt.pedantic={...Qt.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:At(/^!?\[(label)\]\((.*?)\)/).replace("label",Qt._label).getRegex(),reflink:At(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Qt._label).getRegex()},Qt.gfm={...Qt.normal,escape:At(Qt.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Qt.gfm.url=At(Qt.gfm.url,"i").replace("email",Qt.gfm._extended_email).getRegex(),Qt.breaks={...Qt.gfm,br:At(Qt.br).replace("{2,}","*").getRegex(),text:At(Qt.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class tn{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Rt,this.options.tokenizer=this.options.tokenizer||new Kt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:qt.normal,inline:Qt.normal};this.options.pedantic?(t.block=qt.pedantic,t.inline=Qt.pedantic):this.options.gfm&&(t.block=qt.gfm,this.options.breaks?t.inline=Qt.breaks:t.inline=Qt.gfm),this.tokenizer.rules=t}static get rules(){return{block:qt,inline:Qt}}static lex(e,t){return new tn(t).lex(e)}static lexInline(e,t){return new tn(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let n,r,o,i;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,n)=>t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((function(e){r=e.call({lexer:this},n),"number"===typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o)))r=t[t.length-1],i&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),i=o.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,o,i,a,l,s=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(s));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,i.index)+"["+Gt("a",i[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,i.index)+"["+Gt("a",i[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(s));)s=s.slice(0,i.index+i[0].length-2)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(a||(l=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,s,l))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,en))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,en))){if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((function(e){r=e.call({lexer:this},n),"number"===typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(o,Jt))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(l=n.raw.slice(-1)),a=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class nn{constructor(e){this.options=e||Rt}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="'+this.options.langPrefix+Ht(r)+'">'+(n?e:Ht(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:Ht(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e){return e}heading(e,t,n,r){if(this.options.headerIds){return`<h${t} id="${this.options.headerPrefix+r.slug(n)}">${e}</h${t}>\n`}return`<h${t}>${e}</h${t}>\n`}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){if(null===(e=Nt(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<a href="'+e+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image(e,t,n){if(null===(e=Nt(this.options.sanitize,this.options.baseUrl,e)))return n;let r=`<img src="${e}" alt="${n}"`;return t&&(r+=` title="${t}"`),r+=this.options.xhtml?"/>":">",r}text(e){return e}}class rn{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class on{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{r++,n=e+"-"+r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class an{constructor(e){this.options=e||Rt,this.options.renderer=this.options.renderer||new nn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new rn,this.slugger=new on}static parse(e,t){return new an(t).parse(e)}static parseInline(e,t){return new an(t).parseInline(e)}parse(e,t=!0){let n,r,o,i,a,l,s,c,u,d,h,f,p,g,m,v,w,b,y,x="";const k=e.length;for(n=0;n<k;n++)if(d=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[d.type]&&(y=this.options.extensions.renderers[d.type].call({parser:this},d),!1!==y||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)))x+=y||"";else switch(d.type){case"space":continue;case"hr":x+=this.renderer.hr();continue;case"heading":x+=this.renderer.heading(this.parseInline(d.tokens),d.depth,Lt(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":x+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(c="",s="",i=d.header.length,r=0;r<i;r++)s+=this.renderer.tablecell(this.parseInline(d.header[r].tokens),{header:!0,align:d.align[r]});for(c+=this.renderer.tablerow(s),u="",i=d.rows.length,r=0;r<i;r++){for(l=d.rows[r],s="",a=l.length,o=0;o<a;o++)s+=this.renderer.tablecell(this.parseInline(l[o].tokens),{header:!1,align:d.align[o]});u+=this.renderer.tablerow(s)}x+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(d.tokens),x+=this.renderer.blockquote(u);continue;case"list":for(h=d.ordered,f=d.start,p=d.loose,i=d.items.length,u="",r=0;r<i;r++)m=d.items[r],v=m.checked,w=m.task,g="",m.task&&(b=this.renderer.checkbox(v),p?m.tokens.length>0&&"paragraph"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(m.tokens,p),u+=this.renderer.listitem(g,w,v);x+=this.renderer.list(u,h,f);continue;case"html":x+=this.renderer.html(d.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;n+1<k&&"text"===e[n+1].type;)d=e[++n],u+="\n"+(d.tokens?this.parseInline(d.tokens):d.text);x+=t?this.renderer.paragraph(u):u;continue;default:{const e='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return x}parseInline(e,t){t=t||this.renderer;let n,r,o,i="";const a=e.length;for(n=0;n<a;n++)if(r=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]&&(o=this.options.extensions.renderers[r.type].call({parser:this},r),!1!==o||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)))i+=o||"";else switch(r.type){case"escape":case"text":i+=t.text(r.text);break;case"html":i+=t.html(r.text);break;case"link":i+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break;case"image":i+=t.image(r.href,r.title,r.text);break;case"strong":i+=t.strong(this.parseInline(r.tokens,t));break;case"em":i+=t.em(this.parseInline(r.tokens,t));break;case"codespan":i+=t.codespan(r.text);break;case"br":i+=t.br();break;case"del":i+=t.del(this.parseInline(r.tokens,t));break;default:{const e='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return i}}class ln{constructor(e){this.options=e||Rt}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(e){return e}postprocess(e){return e}}function sn(e,t){return(n,r,o)=>{"function"===typeof r&&(o=r,r=null);const i={...r},a=function(e,t,n){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+Ht(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):n?void n(null,e):e}if(t)return Promise.reject(r);if(!n)throw r;n(r)}}((r={...cn.defaults,...i}).silent,r.async,o);if("undefined"===typeof n||null===n)return a(new Error("marked(): input parameter is undefined or null"));if("string"!==typeof n)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}(r),r.hooks&&(r.hooks.options=r),o){const i=r.highlight;let s;try{r.hooks&&(n=r.hooks.preprocess(n)),s=e(n,r)}catch(l){return a(l)}const c=function(e){let n;if(!e)try{r.walkTokens&&cn.walkTokens(s,r.walkTokens),n=t(s,r),r.hooks&&(n=r.hooks.postprocess(n))}catch(l){e=l}return r.highlight=i,e?a(e):o(null,n)};if(!i||i.length<3)return c();if(delete r.highlight,!s.length)return c();let u=0;return cn.walkTokens(s,(function(e){"code"===e.type&&(u++,setTimeout((()=>{i(e.text,e.lang,(function(t,n){if(t)return c(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),u--,0===u&&c()}))}),0))})),void(0===u&&c())}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then((t=>e(t,r))).then((e=>r.walkTokens?Promise.all(cn.walkTokens(e,r.walkTokens)).then((()=>e)):e)).then((e=>t(e,r))).then((e=>r.hooks?r.hooks.postprocess(e):e)).catch(a);try{r.hooks&&(n=r.hooks.preprocess(n));const o=e(n,r);r.walkTokens&&cn.walkTokens(o,r.walkTokens);let i=t(o,r);return r.hooks&&(i=r.hooks.postprocess(i)),i}catch(l){return a(l)}}}function cn(e,t,n){return sn(tn.lex,an.parse)(e,t,n)}cn.options=cn.setOptions=function(e){var t;return cn.defaults={...cn.defaults,...e},t=cn.defaults,Rt=t,cn},cn.getDefaults=Mt,cn.defaults=Rt,cn.use=function(...e){const t=cn.defaults.extensions||{renderers:{},childTokens:{}};e.forEach((e=>{const n={...e};if(n.async=cn.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");t[e.level]?t[e.level].unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=cn.defaults.renderer||new nn;for(const n in e.renderer){const r=t[n];t[n]=(...o)=>{let i=e.renderer[n].apply(t,o);return!1===i&&(i=r.apply(t,o)),i}}n.renderer=t}if(e.tokenizer){const t=cn.defaults.tokenizer||new Kt;for(const n in e.tokenizer){const r=t[n];t[n]=(...o)=>{let i=e.tokenizer[n].apply(t,o);return!1===i&&(i=r.apply(t,o)),i}}n.tokenizer=t}if(e.hooks){const t=cn.defaults.hooks||new ln;for(const n in e.hooks){const r=t[n];ln.passThroughHooks.has(n)?t[n]=o=>{if(cn.defaults.async)return Promise.resolve(e.hooks[n].call(t,o)).then((e=>r.call(t,e)));const i=e.hooks[n].call(t,o);return r.call(t,i)}:t[n]=(...o)=>{let i=e.hooks[n].apply(t,o);return!1===i&&(i=r.apply(t,o)),i}}n.hooks=t}if(e.walkTokens){const t=cn.defaults.walkTokens;n.walkTokens=function(n){let r=[];return r.push(e.walkTokens.call(this,n)),t&&(r=r.concat(t.call(this,n))),r}}cn.setOptions(n)}))},cn.walkTokens=function(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(cn,r)),r.type){case"table":for(const e of r.header)n=n.concat(cn.walkTokens(e.tokens,t));for(const e of r.rows)for(const r of e)n=n.concat(cn.walkTokens(r.tokens,t));break;case"list":n=n.concat(cn.walkTokens(r.items,t));break;default:cn.defaults.extensions&&cn.defaults.extensions.childTokens&&cn.defaults.extensions.childTokens[r.type]?cn.defaults.extensions.childTokens[r.type].forEach((function(e){n=n.concat(cn.walkTokens(r[e],t))})):r.tokens&&(n=n.concat(cn.walkTokens(r.tokens,t)))}return n},cn.parseInline=sn(tn.lexInline,an.parseInline),cn.Parser=an,cn.parser=an.parse,cn.Renderer=nn,cn.TextRenderer=rn,cn.Lexer=tn,cn.lexer=tn.lex,cn.Tokenizer=Kt,cn.Slugger=on,cn.Hooks=ln,cn.parse=cn;cn.options,cn.setOptions,cn.use,cn.walkTokens,cn.parseInline,an.parse,tn.lex;const un=(0,ve.z)("div")({name:"MarkdownContainer",class:"gdg-mnuv029",propsAsIs:!1});class dn extends r.PureComponent{targetElement=null;renderMarkdownIntoDiv(){const{targetElement:e,props:t}=this;if(null===e)return;const{contents:n,createNode:r}=t,o=cn(n),i=document.createRange();i.selectNodeContents(e),i.deleteContents();let a=r?.(o);if(void 0===a){const e=document.createElement("template");e.innerHTML=o,a=e.content}e.append(a);const l=e.getElementsByTagName("a");for(const s of l)s.target="_blank",s.rel="noreferrer noopener"}containerRefHook=e=>{this.targetElement=e,this.renderMarkdownIntoDiv()};render(){return this.renderMarkdownIntoDiv(),r.createElement(un,{ref:this.containerRefHook})}}var hn=n(42462);const fn=(0,ve.z)("div")({name:"MarkdownOverlayEditorStyle",class:"gdg-m1pnx84e",propsAsIs:!1,vars:{"m1pnx84e-0":[e=>e.targetWidth,"px"]}}),pn=e=>{const{value:t,onChange:n,forceEditMode:o,createNode:i,targetRect:a,onFinish:l,validatedSelection:s}=e,c=t.data,u=!0===t.readonly,[d,h]=r.useState(""===c||o),f=r.useCallback((()=>{h((e=>!e))}),[]),p=c?"gdg-ml-6":"";return d?r.createElement(fn,{targetWidth:a.width-20},r.createElement(hn.K,{autoFocus:!0,highlight:!1,validatedSelection:s,value:c,onKeyDown:e=>{"Enter"===e.key&&e.stopPropagation()},onChange:n}),r.createElement("div",{className:`gdg-edit-icon gdg-checkmark-hover ${p}`,onClick:()=>l(t)},r.createElement(x.MC,null))):r.createElement(fn,{targetWidth:a.width},r.createElement(dn,{contents:c,createNode:i}),!u&&r.createElement(r.Fragment,null,r.createElement("div",{className:"spacer"}),r.createElement("div",{className:`gdg-edit-icon gdg-edit-hover ${p}`,onClick:f},r.createElement(x.Wy,null))),r.createElement("textarea",{className:"gdg-md-edit-textarea gdg-input",autoFocus:!0}))},gn={getAccessibilityString:e=>e.data?.toString()??"",kind:u.p6.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:d.k0,measure:(e,t,n)=>{const r=t.data.split("\n")[0];return e.measureText(r).width+2*n.cellHorizontalPadding},draw:e=>(0,d.uN)(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{const{onChange:t,value:n,target:o,onFinishedEditing:i,markdownDivCreateNode:a,forceEditMode:l,validatedSelection:s}=e;return r.createElement(pn,{onFinish:i,targetRect:o,value:n,validatedSelection:s,onChange:e=>t({...n,data:e.target.value}),forceEditMode:l,createNode:a})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},mn={getAccessibilityString:e=>e.row.toString(),kind:u.$o.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:function(e,t){const{ctx:n,theme:r}=e,o=r.markerFontFull,i=t??{};i?.font!==o&&(n.font=o,i.font=o);return i.deprep=vn,n.textAlign="center",i},measure:()=>44,draw:e=>function(e,t,n,r,o,i){const{ctx:a,rect:l,hoverAmount:s,theme:c}=e,{x:u,y:h,width:f,height:p}=l,g=n?1:"checkbox-visible"===r?.6+.4*s:s;if("number"!==r&&g>0){a.globalAlpha=g;const e=7*(n?s:1);if($(a,c,n,o?u+e:u,h,o?f-e:f,p,!0,void 0,void 0,18,"center",i),o){a.globalAlpha=s,a.beginPath();for(const e of[3,6])for(const t of[-5,-1,3])a.rect(u+e,h+p/2+t,2,2);a.fillStyle=c.textLight,a.fill(),a.beginPath()}a.globalAlpha=1}if("number"===r||"both"===r&&!n){const e=t.toString(),n=c.markerFontFull,o=u+f/2;"both"===r&&0!==s&&(a.globalAlpha=1-s),a.fillStyle=c.textLight,a.font=n,a.fillText(e,o,h+p/2+(0,d.aX)(a,n)),0!==s&&(a.globalAlpha=1)}}(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle,e.cell.checkboxStyle),onClick:e=>{const{bounds:t,cell:n,posX:r,posY:o}=e,{width:i,height:a}=t,l=n.drawHandle?7+(i-7)/2:i/2,s=a/2;if(Math.abs(r-l)<=10&&Math.abs(o-s)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}};function vn(e){const{ctx:t}=e;t.textAlign="start"}const wn={getAccessibilityString:()=>"",kind:u.$o.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>function(e,t,n){const{ctx:r,rect:o,hoverAmount:i,theme:a,spriteManager:l}=e,{x:s,y:c,width:u,height:h}=o;r.beginPath(),r.globalAlpha=i,r.rect(s+1,c+1,u,h-2),r.fillStyle=a.bgHeaderHovered,r.fill(),r.globalAlpha=1,r.beginPath();const f=""!==t;let p=0;if(void 0!==n){const e=8,t=h-e,o=s+e/2,u=c+e/2;l.drawSprite(n,"normal",r,o,u,t,a,f?1:i),p=t}else{p=24;const e=12,t=f?e:i*e,n=f?0:(1-i)*e*.5,o=a.cellHorizontalPadding+4;t>0&&(r.moveTo(s+o+n,c+h/2),r.lineTo(s+o+n+t,c+h/2),r.moveTo(s+o+n+.5*t,c+h/2-.5*t),r.lineTo(s+o+n+.5*t,c+h/2+.5*t),r.lineWidth=2,r.strokeStyle=a.bgIconHeader,r.lineCap="round",r.stroke())}r.fillStyle=a.textMedium,r.fillText(t,p+s+a.cellHorizontalPadding+.5,c+h/2+(0,d.aX)(r,a)),r.beginPath()}(e,e.cell.hint,e.cell.icon),onPaste:()=>{}};function bn(e,t,n,r,o,i,a){e.textBaseline="alphabetic";const l=function(e,t,n,r,o){const i=r.cellHorizontalPadding,a=r.cellVerticalPadding;if(o)return{x:t.x+i/2,y:t.y+a/2+1,width:t.width-i,height:t.height-a-1};const l=(0,d.P7)(n,e,r.baseFontFull,"alphabetic"),s=t.height-a,c=Math.min(s,2.5*l.actualBoundingBoxAscent);return{x:t.x+i/2,y:t.y+(t.height-c)/2+1,width:l.width+3*i,height:c-1}}(e,o,r,t,n?.fullSize??!1);e.beginPath(),(0,d.NK)(e,l.x,l.y,l.width,l.height,t.roundingRadius??4),e.globalAlpha=i,e.fillStyle=n?.bgColor??(0,k.fG)(t.textDark,.1),e.fill(),e.globalAlpha=1,e.fillStyle=t.textDark,e.textBaseline="middle",a?.("text")}const yn=r.lazy((async()=>await n.e(5783).then(n.bind(n,15783)))),xn={getAccessibilityString:e=>e.data?.toString()??"",kind:u.p6.Number,needsHover:e=>!0===e.hoverEffect,needsHoverPosition:!1,useLabel:!0,drawPrep:d.k0,draw:e=>{const{hoverAmount:t,cell:n,ctx:r,theme:o,rect:i,overrideCursor:a}=e,{hoverEffect:l,displayData:s,hoverEffectTheme:c}=n;!0===l&&t>0&&bn(r,o,c,s,i,t,a),(0,d.uN)(e,e.cell.displayData,e.cell.contentAlign)},measure:(e,t,n)=>e.measureText(t.displayData).width+2*n.cellHorizontalPadding,onDelete:e=>({...e,data:void 0}),provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:o,validatedSelection:i}=e;return r.createElement(r.Suspense,{fallback:null},r.createElement(yn,{highlight:t,disabled:!0===o.readonly,value:o.data,fixedDecimals:o.fixedDecimals,allowNegative:o.allowNegative,thousandSeparator:o.thousandSeparator,decimalSeparator:o.decimalSeparator,validatedSelection:i,onChange:e=>n({...o,data:Number.isNaN(e.floatValue??0)?0:e.floatValue})}))},onPaste:(e,t,n)=>{const r="number"===typeof n.rawValue?n.rawValue:Number.parseFloat("string"===typeof n.rawValue?n.rawValue:e);if(!Number.isNaN(r)&&t.data!==r)return{...t,data:r,displayData:n.formattedString??t.displayData}}},kn={getAccessibilityString:()=>"",measure:()=>108,kind:u.p6.Protected,needsHover:!1,needsHoverPosition:!1,draw:function(e){const{ctx:t,theme:n,rect:r}=e,{x:o,y:i,height:a}=r;t.beginPath();const l=2.5;let s=o+n.cellHorizontalPadding+l;const c=i+a/2,u=Math.cos((0,x.Ht)(30))*l,d=Math.sin((0,x.Ht)(30))*l;for(let h=0;h<12;h++)t.moveTo(s,c-l),t.lineTo(s,c+l),t.moveTo(s+u,c-d),t.lineTo(s-u,c+d),t.moveTo(s-u,c-d),t.lineTo(s+u,c+d),s+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()},onPaste:()=>{}};const Cn={getAccessibilityString:e=>e.data?.toString()??"",kind:u.p6.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>(0,d.k0)(e,t,e.theme.textLight),draw:e=>(0,d.uN)(e,e.cell.data,e.cell.contentAlign),measure:(e,t,n)=>e.measureText(t.data).width+2*n.cellHorizontalPadding,provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:o,validatedSelection:i}=e;return r.createElement(hn.K,{highlight:t,autoFocus:!0!==o.readonly,disabled:!1!==o.readonly,value:o.data,validatedSelection:i,onChange:e=>n({...o,data:e.target.value})})},onPaste:()=>{}},Sn={getAccessibilityString:e=>e.data?.toString()??"",kind:u.p6.Text,needsHover:e=>!0===e.hoverEffect,needsHoverPosition:!1,drawPrep:d.k0,useLabel:!0,draw:e=>{const{cell:t,hoverAmount:n,hyperWrapping:r,ctx:o,rect:i,theme:a,overrideCursor:l}=e,{displayData:s,contentAlign:c,hoverEffect:u,allowWrapping:h,hoverEffectTheme:f}=t;!0===u&&n>0&&bn(o,a,f,s,i,n,l),(0,d.uN)(e,s,c,h,r)},measure:(e,t,n)=>{const r=t.displayData.split("\n",!0===t.allowWrapping?void 0:1);let o=0;for(const i of r)o=Math.max(o,e.measureText(i).width);return o+2*n.cellHorizontalPadding},onDelete:e=>({...e,data:""}),provideEditor:e=>({disablePadding:!0===e.allowWrapping,editor:t=>{const{isHighlighted:n,onChange:o,value:i,validatedSelection:a}=t;return r.createElement(hn.K,{style:!0===e.allowWrapping?{padding:"3px 8.5px"}:void 0,highlight:n,autoFocus:!0!==i.readonly,disabled:!0===i.readonly,altNewline:!0,value:i.data,validatedSelection:a,onChange:e=>o({...i,data:e.target.value})})}}),onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},Mn=(0,ve.z)("div")({name:"UriOverlayEditorStyle",class:"gdg-u1rrojo",propsAsIs:!1}),Rn=e=>{const{uri:t,onChange:n,forceEditMode:o,readonly:i,validatedSelection:a,preview:l}=e,[s,c]=r.useState(!i&&(""===t||o)),u=r.useCallback((()=>{c(!0)}),[]);return s?r.createElement(hn.K,{validatedSelection:a,highlight:!0,autoFocus:!0,value:t,onChange:n}):r.createElement(Mn,null,r.createElement("a",{className:"gdg-link-area",href:t,target:"_blank",rel:"noopener noreferrer"},l),!i&&r.createElement("div",{className:"gdg-edit-icon",onClick:u},r.createElement(x.Wy,null)),r.createElement("textarea",{className:"gdg-input",autoFocus:!0}))};function En(e,t,n,r){let o=n.cellHorizontalPadding;const i=t.height/2-e.actualBoundingBoxAscent/2,a=e.width,l=e.actualBoundingBoxAscent;return"right"===r?o=t.width-a-n.cellHorizontalPadding:"center"===r&&(o=t.width/2-a/2),{x:o,y:i,width:a,height:l}}function In(e){const{cell:t,bounds:n,posX:r,posY:o,theme:i}=e,a=t.displayData??t.data;if(!0!==t.hoverEffect||void 0===t.onClickUri)return!1;const l=(0,d._y)(a,i.baseFontFull);if(void 0===l)return!1;const s=En(l,n,i,t.contentAlign);return T({x:s.x-4,y:s.y-4,width:s.width+8,height:s.height+8},r,o)}const On=[mn,wn,ct,ht,mt,kt,St,gn,xn,kn,Cn,Sn,{getAccessibilityString:e=>e.data?.toString()??"",kind:u.p6.Uri,needsHover:e=>!0===e.hoverEffect,needsHoverPosition:!0,useLabel:!0,drawPrep:d.k0,draw:e=>{const{cell:t,theme:n,overrideCursor:r,hoverX:o,hoverY:i,rect:a,ctx:l}=e,s=t.displayData??t.data,c=!0===t.hoverEffect;if(void 0!==r&&c&&void 0!==o&&void 0!==i){const c=En((0,d.P7)(s,l,n.baseFontFull),a,n,t.contentAlign),{x:u,y:h,width:f,height:p}=c;if(o>=u-4&&o<=u-4+f+8&&i>=h-4&&i<=h-4+p+8){const o=(0,d.aX)(l,n.baseFontFull);r("pointer");const i=5,c=h-o;l.beginPath(),l.moveTo(a.x+u,Math.floor(a.y+c+p+i)+.5),l.lineTo(a.x+u+f,Math.floor(a.y+c+p+i)+.5),l.strokeStyle=n.linkColor,l.stroke(),l.save(),l.fillStyle=e.cellFillColor,(0,d.uN)({...e,rect:{...a,x:a.x-1}},s,t.contentAlign),(0,d.uN)({...e,rect:{...a,x:a.x-2}},s,t.contentAlign),(0,d.uN)({...e,rect:{...a,x:a.x+1}},s,t.contentAlign),(0,d.uN)({...e,rect:{...a,x:a.x+2}},s,t.contentAlign),l.restore()}}l.fillStyle=c?n.linkColor:n.textDark,(0,d.uN)(e,s,t.contentAlign)},onSelect:e=>{In(e)&&e.preventDefault()},onClick:e=>{const{cell:t}=e;In(e)&&t.onClickUri?.(e)},measure:(e,t,n)=>e.measureText(t.displayData??t.data).width+2*n.cellHorizontalPadding,onDelete:e=>({...e,data:""}),provideEditor:e=>t=>{const{onChange:n,value:o,forceEditMode:i,validatedSelection:a}=t;return r.createElement(Rn,{forceEditMode:!0!==o.readonly&&(i||!0===e.hoverEffect&&void 0!==e.onClickUri),uri:o.data,preview:o.displayData??o.data,validatedSelection:a,readonly:!0===o.readonly,onChange:e=>n({...o,data:e.target.value})})},onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}}],Tn='<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">',Pn=e=>{const t=e.fgColor,n=e.bgColor;return`${Tn}\n<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.29 4.947a3.368 3.368 0 014.723.04 3.375 3.375 0 01.041 4.729l-.009.009-1.596 1.597a3.367 3.367 0 01-5.081-.364.71.71 0 011.136-.85 1.95 1.95 0 002.942.21l1.591-1.593a1.954 1.954 0 00-.027-2.733 1.95 1.95 0 00-2.732-.027l-.91.907a.709.709 0 11-1.001-1.007l.915-.911.007-.007z" fill="${t}"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M6.55 8.678a3.368 3.368 0 015.082.364.71.71 0 01-1.136.85 1.95 1.95 0 00-2.942-.21l-1.591 1.593a1.954 1.954 0 00.027 2.733 1.95 1.95 0 002.73.028l.906-.906a.709.709 0 111.003 1.004l-.91.91-.008.01a3.368 3.368 0 01-4.724-.042 3.375 3.375 0 01-.041-4.728l.009-.009L6.55 8.678z" fill="${t}"/>\n</svg>\n `},Dn={headerRowID:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${Tn}<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/><path d="M15.75 4h-1.5a.25.25 0 0 0-.177.074L9.308 8.838a3.75 3.75 0 1 0 1.854 1.854l1.155-1.157.967.322a.5.5 0 0 0 .65-.55l-.18-1.208.363-.363.727.331a.5.5 0 0 0 .69-.59l-.254-.904.647-.647A.25.25 0 0 0 16 5.75v-1.5a.25.25 0 0 0-.25-.25zM7.5 13.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0z" fill="${t}"/></svg>`},headerNumber:e=>{const t=e.fgColor,n=e.bgColor;return`${Tn}\n <path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>\n <path d="M6.52 12.78H5.51V8.74l-1.33.47v-.87l2.29-.83h.05v5.27zm5.2 0H8.15v-.69l1.7-1.83a6.38 6.38 0 0 0 .34-.4c.09-.11.16-.22.22-.32s.1-.19.12-.27a.9.9 0 0 0 0-.56.63.63 0 0 0-.15-.23.58.58 0 0 0-.22-.15.75.75 0 0 0-.29-.05c-.27 0-.48.08-.62.23a.95.95 0 0 0-.2.65H8.03c0-.24.04-.46.13-.67a1.67 1.67 0 0 1 .97-.91c.23-.1.49-.14.77-.14.26 0 .5.04.7.11.21.08.38.18.52.32.14.13.25.3.32.48a1.74 1.74 0 0 1 .03 1.13 2.05 2.05 0 0 1-.24.47 4.16 4.16 0 0 1-.35.47l-.47.5-1 1.05h2.32v.8zm1.8-3.08h.55c.28 0 .48-.06.61-.2a.76.76 0 0 0 .2-.55.8.8 0 0 0-.05-.28.56.56 0 0 0-.13-.22.6.6 0 0 0-.23-.15.93.93 0 0 0-.32-.05.92.92 0 0 0-.29.05.72.72 0 0 0-.23.12.57.57 0 0 0-.21.46H12.4a1.3 1.3 0 0 1 .5-1.04c.15-.13.33-.23.54-.3a2.48 2.48 0 0 1 1.4 0c.2.06.4.15.55.28.15.13.27.28.36.47.08.19.13.4.13.65a1.15 1.15 0 0 1-.2.65 1.36 1.36 0 0 1-.58.49c.15.05.28.12.38.2a1.14 1.14 0 0 1 .43.62c.03.13.05.26.05.4 0 .25-.05.47-.14.66a1.42 1.42 0 0 1-.4.49c-.16.13-.35.23-.58.3a2.51 2.51 0 0 1-.73.1c-.22 0-.44-.03-.65-.09a1.8 1.8 0 0 1-.57-.28 1.43 1.43 0 0 1-.4-.47 1.41 1.41 0 0 1-.15-.66h1a.66.66 0 0 0 .22.5.87.87 0 0 0 .58.2c.25 0 .45-.07.6-.2a.71.71 0 0 0 .21-.56.97.97 0 0 0-.06-.36.61.61 0 0 0-.18-.25.74.74 0 0 0-.28-.15 1.33 1.33 0 0 0-.37-.04h-.55V9.7z" fill="${t}"/>\n </svg>`},headerCode:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${Tn}<rect x="2" y="2" width="16" height="16" rx="4" fill="${n}"/><path d="m12.223 13.314 3.052-2.826a.65.65 0 0 0 0-.984l-3.052-2.822c-.27-.25-.634-.242-.865.022-.232.263-.206.636.056.882l2.601 2.41-2.601 2.41c-.262.245-.288.619-.056.882.231.263.595.277.865.026Zm-4.444.005c.266.25.634.241.866-.027.231-.263.206-.636-.06-.882L5.983 10l2.602-2.405c.266-.25.291-.62.06-.887-.232-.263-.596-.272-.866-.022L4.723 9.51a.653.653 0 0 0 0 .983l3.056 2.827Z" fill="${t}"/></svg>`},headerString:e=>{const t=e.fgColor,n=e.bgColor;return`${Tn}\n <path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>\n <path d="M8.182 12.4h3.636l.655 1.6H14l-3.454-8H9.455L6 14h1.527l.655-1.6zM10 7.44l1.36 3.651H8.64L10 7.441z" fill="${t}"/>\n</svg>`},headerBoolean:e=>{const t=e.fgColor,n=e.bgColor;return`${Tn}\n <path\n d="M16.2222 2H3.77778C2.8 2 2 2.8 2 3.77778V16.2222C2 17.2 2.8 18 3.77778 18H16.2222C17.2 18 17.9911 17.2 17.9911 16.2222L18 3.77778C18 2.8 17.2 2 16.2222 2Z"\n fill="${n}"\n />\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M7.66667 6.66669C5.73368 6.66669 4.16667 8.15907 4.16667 10C4.16667 11.841 5.73368 13.3334 7.66667 13.3334H12.3333C14.2663 13.3334 15.8333 11.841 15.8333 10C15.8333 8.15907 14.2663 6.66669 12.3333 6.66669H7.66667ZM12.5 12.5C13.8807 12.5 15 11.3807 15 10C15 8.61931 13.8807 7.50002 12.5 7.50002C11.1193 7.50002 10 8.61931 10 10C10 11.3807 11.1193 12.5 12.5 12.5Z"\n fill="${t}"\n />\n</svg>`},headerAudioUri:Pn,headerVideoUri:e=>{const t=e.fgColor,n=e.bgColor;return`${Tn}\n <path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7 13.138a.5.5 0 00.748.434l5.492-3.138a.5.5 0 000-.868L7.748 6.427A.5.5 0 007 6.862v6.276z" fill="${t}"/>\n</svg>`},headerEmoji:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${Tn}\n <path d="M10 5a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm0 9.17A4.17 4.17 0 0 1 5.83 10 4.17 4.17 0 0 1 10 5.83 4.17 4.17 0 0 1 14.17 10 4.17 4.17 0 0 1 10 14.17z" fill="${t}"/>\n <path d="M8.33 8.21a.83.83 0 1 0-.03 1.67.83.83 0 0 0 .03-1.67zm3.34 0a.83.83 0 1 0-.04 1.67.83.83 0 0 0 .04-1.67z" fill="${t}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.53 13.9a2.82 2.82 0 0 1-5.06 0l.77-.38a1.97 1.97 0 0 0 3.52 0l.77.39z" fill="${t}"/>\n <path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>\n <path d="M10 4a6 6 0 1 0 0 12 6 6 0 0 0 0-12zm0 11a5 5 0 1 1 .01-10.01A5 5 0 0 1 10 15z" fill="${t}"/>\n <path d="M8 7.86a1 1 0 1 0-.04 2 1 1 0 0 0 .04-2zm4 0a1 1 0 1 0-.04 2 1 1 0 0 0 .04-2z" fill="${t}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M12.53 11.9a2.82 2.82 0 0 1-5.06 0l.77-.38a1.97 1.97 0 0 0 3.52 0l.77.39z" fill="${t}"/>\n </svg>`},headerImage:e=>{const t=e.fgColor,n=e.bgColor;return`${Tn}\n <path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>\n <path opacity=".5" fill-rule="evenodd" clip-rule="evenodd" d="M12.499 10.801a.5.5 0 01.835 0l2.698 4.098a.5.5 0 01-.418.775H10.22a.5.5 0 01-.417-.775l2.697-4.098z" fill="${t}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M8.07 8.934a.5.5 0 01.824 0l4.08 5.958a.5.5 0 01-.412.782h-8.16a.5.5 0 01-.413-.782l4.08-5.958zM13.75 8.333a2.083 2.083 0 100-4.166 2.083 2.083 0 000 4.166z" fill="${t}"/>\n</svg>`},headerUri:Pn,headerPhone:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${Tn}\n <path fill="${t}" d="M3 3h14v14H3z"/>\n <path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2zm-7.24 9.78h1.23c.15 0 .27.06.36.18l.98 1.28a.43.43 0 0 1-.05.58l-1.2 1.21a.45.45 0 0 1-.6.04A6.72 6.72 0 0 1 7.33 10c0-.61.1-1.2.25-1.78a6.68 6.68 0 0 1 2.12-3.3.44.44 0 0 1 .6.04l1.2 1.2c.16.17.18.42.05.59l-.98 1.29a.43.43 0 0 1-.36.17H8.98A5.38 5.38 0 0 0 8.67 10c0 .62.11 1.23.3 1.79z" fill="${n}"/>\n </svg>`},headerMarkdown:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${Tn}\n <path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>\n <path d="m13.49 13.15-2.32-3.27h1.4V7h1.86v2.88h1.4l-2.34 3.27zM11 13H9v-3l-1.5 1.92L6 10v3H4V7h2l1.5 2L9 7h2v6z" fill="${t}"/>\n </svg>`},headerDate:e=>{const t=e.fgColor,n=e.bgColor;return`${Tn}\n <path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>\n <path d="M14.8 4.182h-.6V3H13v1.182H7V3H5.8v1.182h-.6c-.66 0-1.2.532-1.2 1.182v9.454C4 15.468 4.54 16 5.2 16h9.6c.66 0 1.2-.532 1.2-1.182V5.364c0-.65-.54-1.182-1.2-1.182zm0 10.636H5.2V7.136h9.6v7.682z" fill="${t}"/>\n</svg>`},headerTime:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${Tn}\n <path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>\n <path d="M10 4a6 6 0 0 0-6 6 6 6 0 0 0 6 6 6 6 0 0 0 6-6 6 6 0 0 0-6-6zm0 10.8A4.8 4.8 0 0 1 5.2 10a4.8 4.8 0 1 1 4.8 4.8z" fill="${t}"/>\n <path d="M10 7H9v3.93L12.5 13l.5-.8-3-1.76V7z" fill="${t}"/>\n </svg>`},headerEmail:e=>{const t=e.fgColor,n=e.bgColor;return`${Tn}\n <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M10 8.643a1.357 1.357 0 100 2.714 1.357 1.357 0 000-2.714zM7.357 10a2.643 2.643 0 115.286 0 2.643 2.643 0 01-5.286 0z" fill="${t}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.589 4.898A5.643 5.643 0 0115.643 10v.5a2.143 2.143 0 01-4.286 0V8a.643.643 0 011.286 0v2.5a.857.857 0 001.714 0V10a4.357 4.357 0 10-1.708 3.46.643.643 0 01.782 1.02 5.643 5.643 0 11-5.842-9.582z" fill="${t}"/>\n</svg>`},headerReference:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${Tn}\n <rect x="2" y="8" width="10" height="8" rx="2" fill="${n}"/>\n <rect x="8" y="4" width="10" height="8" rx="2" fill="${n}"/>\n <path d="M10.68 7.73V6l2.97 3.02-2.97 3.02v-1.77c-2.13 0-3.62.7-4.68 2.2.43-2.15 1.7-4.31 4.68-4.74z" fill="${t}"/>\n </svg>`},headerIfThenElse:e=>{const t=e.fgColor,n=e.bgColor;return`${Tn}\n <path fill="${t}" d="M4 3h12v14H4z"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.6 2A1.6 1.6 0 002 3.6v12.8A1.6 1.6 0 003.6 18h12.8a1.6 1.6 0 001.6-1.6V3.6A1.6 1.6 0 0016.4 2H3.6zm11.3 10.8a.7.7 0 01.7.7v1.4a.7.7 0 01-.7.7h-1.4a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.6-.693.117.117 0 00.1-.115V10.35a.117.117 0 00-.117-.116h-2.8a.117.117 0 00-.117.116v2.333c0 .064.053.117.117.117h.117a.7.7 0 01.7.7v1.4a.7.7 0 01-.7.7H9.3a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.7-.7h.117a.117.117 0 00.117-.117V10.35a.117.117 0 00-.117-.117h-2.8a.117.117 0 00-.117.117v2.342c0 .058.042.106.1.115a.7.7 0 01.6.693v1.4a.7.7 0 01-.7.7H5.1a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.7-.7h.35a.116.116 0 00.116-.117v-2.45c0-.515.418-.933.934-.933h2.917a.117.117 0 00.117-.117V6.85a.117.117 0 00-.117-.116h-2.45a.7.7 0 01-.7-.7V5.1a.7.7 0 01.7-.7h6.067a.7.7 0 01.7.7v.934a.7.7 0 01-.7.7h-2.45a.117.117 0 00-.118.116v2.333c0 .064.053.117.117.117H13.5c.516 0 .934.418.934.934v2.45c0 .063.052.116.116.116h.35z" fill="${n}"/>\n</svg>`},headerSingleValue:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${Tn}\n <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>\n <path d="M9.98 13.33c.45 0 .74-.3.73-.75l-.01-.1-.16-1.67 1.45 1.05a.81.81 0 0 0 .5.18c.37 0 .72-.32.72-.76 0-.3-.17-.54-.49-.68l-1.63-.77 1.63-.77c.32-.14.49-.37.49-.67 0-.45-.34-.76-.71-.76a.81.81 0 0 0-.5.18l-1.47 1.03.16-1.74.01-.08c.01-.46-.27-.76-.72-.76-.46 0-.76.32-.75.76l.01.08.16 1.74-1.47-1.03a.77.77 0 0 0-.5-.18.74.74 0 0 0-.72.76c0 .3.17.53.49.67l1.63.77-1.62.77c-.32.14-.5.37-.5.68 0 .44.35.75.72.75a.78.78 0 0 0 .5-.17L9.4 10.8l-.16 1.68v.09c-.02.44.28.75.74.75z" fill="${t}"/>\n </svg>`},headerLookup:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${Tn}\n <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>\n <path d="M8 5.83H5.83a.83.83 0 0 0 0 1.67h1.69A4.55 4.55 0 0 1 8 5.83zm-.33 3.34H5.83a.83.83 0 0 0 0 1.66h2.72a4.57 4.57 0 0 1-.88-1.66zM5.83 12.5a.83.83 0 0 0 0 1.67h7.5a.83.83 0 1 0 0-1.67h-7.5zm8.8-2.9a3.02 3.02 0 0 0 .46-1.6c0-1.66-1.32-3-2.94-3C10.52 5 9.2 6.34 9.2 8s1.31 3 2.93 3c.58 0 1.11-.17 1.56-.47l2.04 2.08.93-.94-2.04-2.08zm-2.48.07c-.9 0-1.63-.75-1.63-1.67s.73-1.67 1.63-1.67c.9 0 1.63.75 1.63 1.67s-.73 1.67-1.63 1.67z" fill="${t}"/>\n </svg>`},headerTextTemplate:e=>{const t=e.fgColor,n=e.bgColor;return`${Tn}\n <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>\n <path d="M7.676 4.726V3l2.976 3.021-2.976 3.022v-1.77c-2.125 0-3.613.69-4.676 2.201.425-2.158 1.7-4.316 4.676-4.748zM10.182 14.4h3.636l.655 1.6H16l-3.454-8h-1.091L8 16h1.527l.655-1.6zM12 9.44l1.36 3.65h-2.72L12 9.44z" fill="${t}"/>\n</svg>`},headerMath:e=>{const t=e.fgColor,n=e.bgColor;return`${Tn}\n <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M4.167 5.417a.833.833 0 100 1.666h4.166a.833.833 0 100-1.666H4.167z" fill="${t}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.083 4.167a.833.833 0 10-1.666 0v4.166a.833.833 0 101.666 0V4.167zM11.667 5.417a.833.833 0 100 1.666h4.166a.833.833 0 100-1.666h-4.166zM5.367 11.688a.833.833 0 00-1.179 1.179l2.947 2.946a.833.833 0 001.178-1.178l-2.946-2.947z" fill="${t}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M8.313 12.867a.833.833 0 10-1.178-1.179l-2.947 2.947a.833.833 0 101.179 1.178l2.946-2.946z" fill="${t}"/>\n <path d="M10.833 12.5c0-.46.373-.833.834-.833h4.166a.833.833 0 110 1.666h-4.166a.833.833 0 01-.834-.833zM10.833 15c0-.46.373-.833.834-.833h4.166a.833.833 0 110 1.666h-4.166a.833.833 0 01-.834-.833z" fill="${t}"/>\n</svg>`},headerRollup:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${Tn}\n <path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>\n <path d="M10 8.84a1.16 1.16 0 1 0 0 2.32 1.16 1.16 0 0 0 0-2.32zm3.02 3.61a3.92 3.92 0 0 0 .78-3.28.49.49 0 1 0-.95.2c.19.87-.02 1.78-.58 2.47a2.92 2.92 0 1 1-4.13-4.08 2.94 2.94 0 0 1 2.43-.62.49.49 0 1 0 .17-.96 3.89 3.89 0 1 0 2.28 6.27zM10 4.17a5.84 5.84 0 0 0-5.44 7.93.49.49 0 1 0 .9-.35 4.86 4.86 0 1 1 2.5 2.67.49.49 0 1 0-.4.88c.76.35 1.6.54 2.44.53a5.83 5.83 0 0 0 0-11.66zm3.02 3.5a.7.7 0 1 0-1.4 0 .7.7 0 0 0 1.4 0zm-6.97 5.35a.7.7 0 1 1 0 1.4.7.7 0 0 1 0-1.4z" fill="${t}"/>\n </svg>`},headerJoinStrings:e=>{const t=e.fgColor,n=e.bgColor;return`${Tn}\n <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>\n <path d="M12.4 13.565c1.865-.545 3.645-2.083 3.645-4.396 0-1.514-.787-2.604-2.071-2.604C12.69 6.565 12 7.63 12 8.939c1.114.072 1.865.726 1.865 1.683 0 .933-.8 1.647-1.84 2.023l.375.92zM4 5h6v2H4zM4 9h5v2H4zM4 13h4v2H4z" fill="${t}"/>\n</svg>`},headerSplitString:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${Tn}\n <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>\n <path d="M12.4 13.56c1.86-.54 3.65-2.08 3.65-4.4 0-1.5-.8-2.6-2.08-2.6S12 7.64 12 8.95c1.11.07 1.86.73 1.86 1.68 0 .94-.8 1.65-1.83 2.03l.37.91zM4 5h6v2H4zm0 4h5v2H4zm0 4h4v2H4z" fill="${t}"/>\n </svg>`},headerGeoDistance:e=>{const t=e.fgColor,n=e.bgColor;return`${Tn}\n <path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>\n <path d="M10 7a1 1 0 100-2v2zm0 6a1 1 0 100 2v-2zm0-8H7v2h3V5zm-3 6h5V9H7v2zm5 2h-2v2h2v-2zm1-1a1 1 0 01-1 1v2a3 3 0 003-3h-2zm-1-1a1 1 0 011 1h2a3 3 0 00-3-3v2zM4 8a3 3 0 003 3V9a1 1 0 01-1-1H4zm3-3a3 3 0 00-3 3h2a1 1 0 011-1V5z" fill="${t}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M4.856 12.014a.5.5 0 00-.712.702L5.409 14l-1.265 1.284a.5.5 0 00.712.702l1.255-1.274 1.255 1.274a.5.5 0 00.712-.702L6.813 14l1.265-1.284a.5.5 0 00-.712-.702L6.11 13.288l-1.255-1.274zM12.856 4.014a.5.5 0 00-.712.702L13.409 6l-1.265 1.284a.5.5 0 10.712.702l1.255-1.274 1.255 1.274a.5.5 0 10.712-.702L14.813 6l1.265-1.284a.5.5 0 00-.712-.702L14.11 5.288l-1.255-1.274z" fill="${t}"/>\n</svg>`},headerArray:e=>{const t=e.fgColor,n=e.bgColor;return`${Tn}\n <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.25 7.25a.75.75 0 000-1.5h-6.5a.75.75 0 100 1.5h6.5zM15 10a.75.75 0 01-.75.75h-6.5a.75.75 0 010-1.5h6.5A.75.75 0 0115 10zm-.75 4.25a.75.75 0 000-1.5h-6.5a.75.75 0 000 1.5h6.5zm-8.987-7a.75.75 0 100-1.5.75.75 0 000 1.5zm.75 2.75a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm-.75 4.25a.75.75 0 100-1.5.75.75 0 000 1.5z" fill="${t}"/>\n</svg>`},rowOwnerOverlay:e=>{const t=e.fgColor;return`\n <svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M2 15v1h14v-2.5c0-.87-.44-1.55-.98-2.04a6.19 6.19 0 0 0-1.9-1.14 12.1 12.1 0 0 0-2.48-.67A4 4 0 1 0 5 6a4 4 0 0 0 2.36 3.65c-.82.13-1.7.36-2.48.67-.69.28-1.37.65-1.9 1.13A2.8 2.8 0 0 0 2 13.5V15z" fill="${e.bgColor}" stroke="${t}" stroke-width="2"/>\n </svg>`},protectedColumnOverlay:e=>{const t=e.fgColor;return`\n <svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M12.43 6.04v-.18a3.86 3.86 0 0 0-7.72 0v.18A2.15 2.15 0 0 0 3 8.14v5.72C3 15.04 3.96 16 5.14 16H12c1.18 0 2.14-.96 2.14-2.14V8.14c0-1.03-.73-1.9-1.71-2.1zM7.86 6v-.14a.71.71 0 1 1 1.43 0V6H7.86z" fill="${e.bgColor}" stroke="${t}" stroke-width="2"/>\n </svg>\n`},renameIcon:e=>{const t=e.bgColor;return`${Tn}\n <path stroke="${t}" stroke-width="2" d="M12 3v14"/>\n <path stroke="${t}" stroke-width="2" stroke-linecap="round" d="M10 4h4m-4 12h4"/>\n <path d="M11 14h4a3 3 0 0 0 3-3V9a3 3 0 0 0-3-3h-4v2h4a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-4v2ZM9.5 8H5a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h4.5v2H5a3 3 0 0 1-3-3V9a3 3 0 0 1 3-3h4.5v2Z" fill="${t}"/>\n </svg>\n`}};var Hn=n(8406);const zn=[];const Ln=class extends v{imageLoaded=()=>{};loadedLocations=[];cache={};setCallback(e){this.imageLoaded=e}sendLoaded=Hn((()=>{this.imageLoaded(new b(this.loadedLocations)),this.loadedLocations=[]}),20);clearOutOfWindow=()=>{const e=Object.keys(this.cache);for(const t of e){const e=this.cache[t];let n=!1;for(let t=0;t<e.cells.length;t++){const r=e.cells[t];if(this.isInWindow(r)){n=!0;break}}n?e.cells=e.cells.filter(this.isInWindow):(e.cancel(),delete this.cache[t])}};loadImage(e,t,n,r){let o=!1;const i=zn.pop()??new Image;let a=!1;const l={img:void 0,cells:[f(t,n)],url:e,cancel:()=>{a||(a=!0,zn.length<12?zn.unshift(i):o||(i.src=""))}},s=new Promise((e=>i.addEventListener("load",(()=>e(null)))));requestAnimationFrame((async()=>{try{i.src=e,await s,await i.decode();const t=this.cache[r];if(void 0!==t&&!a){t.img=i;for(const e of t.cells)this.loadedLocations.push(m(e));o=!0,this.sendLoaded()}}catch{l.cancel()}})),this.cache[r]=l}loadOrGetImage(e,t,n){const r=e,o=this.cache[r];if(void 0!==o){const e=f(t,n);return o.cells.includes(e)||o.cells.push(e),o.img}this.loadImage(e,t,n,r)}},Fn=r.forwardRef(((e,t)=>{const n=r.useMemo((()=>({...Dn,...e.headerIcons})),[e.headerIcons]),o=r.useMemo((()=>e.imageWindowLoader??new Ln),[e.imageWindowLoader]);return r.createElement(lt,{...e,renderers:On,headerIcons:n,ref:t,imageWindowLoader:o})}))},81726:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5057);class o extends r.PureComponent{wrapperRef=r.createRef();componentDidMount(){document.addEventListener("touchend",this.clickOutside,!0),document.addEventListener("mousedown",this.clickOutside,!0),document.addEventListener("contextmenu",this.clickOutside,!0)}componentWillUnmount(){document.removeEventListener("touchend",this.clickOutside,!0),document.removeEventListener("mousedown",this.clickOutside,!0),document.removeEventListener("contextmenu",this.clickOutside,!0)}clickOutside=e=>{if((!this.props.isOutsideClick||this.props.isOutsideClick(e))&&null!==this.wrapperRef.current&&!this.wrapperRef.current.contains(e.target)){let t=e.target;for(;null!==t;){if(t.classList.contains("click-outside-ignore"))return;t=t.parentElement}this.props.onClickOutside()}};render(){const{onClickOutside:e,isOutsideClick:t,...n}=this.props;return r.createElement("div",{...n,ref:this.wrapperRef},this.props.children)}}},21581:(e,t,n)=>{"use strict";n.d(t,{NH:()=>c,dF:()=>i,fG:()=>a,mv:()=>s});const r={};let o=null;function i(e){const t=e.toLowerCase().trim();if(void 0!==r[t])return r[t];o=o||function(){const e=document.createElement("div");return e.style.opacity="0",e.style.pointerEvents="none",e.style.position="fixed",document.body.append(e),e}(),o.style.color="#000",o.style.color=t;const n=getComputedStyle(o).color;o.style.color="#fff",o.style.color=t;const i=getComputedStyle(o).color;if(i!==n)return[0,0,0,1];let a=i.replace(/[^\d.,]/g,"").split(",").map(Number.parseFloat);return a.length<4&&a.push(1),a=a.map((e=>Number.isNaN(e)?0:e)),r[t]=a,a}function a(e,t){const[n,r,o]=i(e);return`rgba(${n}, ${r}, ${o}, ${t})`}const l=new Map;function s(e,t){const n=`${e}-${t}`,r=l.get(n);if(void 0!==r)return r;const o=c(e,t);return l.set(n,o),o}function c(e,t){if(void 0===t)return e;const[n,r,o,a]=i(e);if(1===a)return e;const[l,s,c,u]=i(t),d=a+u*(1-a);return`rgba(${(a*n+u*l*(1-a))/d}, ${(a*r+u*s*(1-a))/d}, ${(a*o+u*c*(1-a))/d}, ${d})`}},43128:(e,t,n)=>{"use strict";n.d(t,{$o:()=>u,DP:()=>m,EV:()=>b,Qo:()=>g,Sq:()=>d,T9:()=>f,kf:()=>v,p6:()=>l,pN:()=>c,qF:()=>i,rL:()=>h,rs:()=>p,sd:()=>a});var r=n(6573),o=n(79530);const i=null,a=void 0;var l,s,c,u;function d(e){return"width"in e&&"number"===typeof e.width}async function h(e){return"object"===typeof e?e:await e()}function f(e){return e.kind!==l.Loading&&e.kind!==l.Bubble&&e.kind!==l.RowID&&e.kind!==l.Protected&&e.kind!==l.Drilldown&&((0,r.NG)(e),!0)}function p(e){return e.kind===u.Marker||e.kind===u.NewRow}function g(e){return!(!f(e)||e.kind===l.Image)&&(e.kind===l.Text||e.kind===l.Number||e.kind===l.Markdown||e.kind===l.Uri||e.kind===l.Custom||e.kind===l.Boolean?!0!==e.readonly:void(0,r.vE)(e,"A cell was passed with an invalid kind"))}function m(e){return o(e,"editor")}function v(e){return!e.readonly}let w;!function(e){e.Uri="uri",e.Text="text",e.Image="image",e.RowID="row-id",e.Number="number",e.Bubble="bubble",e.Boolean="boolean",e.Loading="loading",e.Markdown="markdown",e.Drilldown="drilldown",e.Protected="protected",e.Custom="custom"}(l||(l={})),function(e){e.HeaderRowID="headerRowID",e.HeaderCode="headerCode",e.HeaderNumber="headerNumber",e.HeaderString="headerString",e.HeaderBoolean="headerBoolean",e.HeaderAudioUri="headerAudioUri",e.HeaderVideoUri="headerVideoUri",e.HeaderEmoji="headerEmoji",e.HeaderImage="headerImage",e.HeaderUri="headerUri",e.HeaderPhone="headerPhone",e.HeaderMarkdown="headerMarkdown",e.HeaderDate="headerDate",e.HeaderTime="headerTime",e.HeaderEmail="headerEmail",e.HeaderReference="headerReference",e.HeaderIfThenElse="headerIfThenElse",e.HeaderSingleValue="headerSingleValue",e.HeaderLookup="headerLookup",e.HeaderTextTemplate="headerTextTemplate",e.HeaderMath="headerMath",e.HeaderRollup="headerRollup",e.HeaderJoinStrings="headerJoinStrings",e.HeaderSplitString="headerSplitString",e.HeaderGeoDistance="headerGeoDistance",e.HeaderArray="headerArray",e.RowOwnerOverlay="rowOwnerOverlay",e.ProtectedColumnOverlay="protectedColumnOverlay"}(s||(s={})),function(e){e.Triangle="triangle",e.Dots="dots"}(c||(c={})),function(e){e.NewRow="new-row",e.Marker="marker"}(u||(u={}));class b{items;constructor(e){this.items=e}static empty=()=>w??(w=new b([]));static fromSingleSelection=e=>b.empty().add(e);offset(e){if(0===e)return this;const t=this.items.map((t=>[t[0]+e,t[1]+e]));return new b(t)}add(e){const t="number"===typeof e?[e,e+1]:e,n=function(e){if(0===e.length)return[];const t=[...e],n=[];t.sort((function(e,t){return e[0]-t[0]})),n.push([...t[0]]);for(const r of t.slice(1)){const e=n[n.length-1];e[1]<r[0]?n.push([...r]):e[1]<r[1]&&(e[1]=r[1])}return n}([...this.items,t]);return new b(n)}remove(e){const t=[...this.items],n="number"===typeof e?e:e[0],r="number"===typeof e?e+1:e[1];for(const[o,i]of t.entries()){const[e,a]=i;if(e<=r&&n<=a){const i=[];e<n&&i.push([e,n]),r<a&&i.push([r,a]),t.splice(o,1,...i)}}return new b(t)}first(){if(0!==this.items.length)return this.items[0][0]}last(){if(0!==this.items.length)return this.items.slice(-1)[0][1]-1}hasIndex(e){for(let t=0;t<this.items.length;t++){const[n,r]=this.items[t];if(e>=n&&e<r)return!0}return!1}hasAll(e){for(let t=e[0];t<e[1];t++)if(!this.hasIndex(t))return!1;return!0}some(e){for(const t of this)if(e(t))return!0;return!1}equals(e){if(e===this)return!0;if(e.items.length!==this.items.length)return!1;for(let t=0;t<this.items.length;t++){const n=e.items[t],r=this.items[t];if(n[0]!==r[0]||n[1]!==r[1])return!1}return!0}toArray(){const e=[];for(const[t,n]of this.items)for(let r=t;r<n;r++)e.push(r);return e}get length(){let e=0;for(const[t,n]of this.items)e+=n-t;return e}*[Symbol.iterator](){for(const[e,t]of this.items)for(let n=e;n<t;n++)yield n}}},40047:(e,t,n)=>{"use strict";n.d(t,{H1:()=>w,Sb:()=>f,Ve:()=>Z,vr:()=>z,Ld:()=>B,uN:()=>N,L6:()=>F,oK:()=>C,ih:()=>k,WA:()=>V,YN:()=>x,_y:()=>T,aX:()=>P,pV:()=>S,G6:()=>y,pZ:()=>d,PU:()=>h,X4:()=>p,pU:()=>g,P7:()=>O,k0:()=>L,zU:()=>m,zu:()=>W,NK:()=>$,NZ:()=>u});var r=n(45310),o=n(5057),i=new Map,a=new Map,l=new Map;function s(e,t,n,r){var o,i;let s=a.get(n);if(r&&void 0!==s&&s.count>2e4){let r=l.get(n);if(void 0===r&&(r=function(e,t){var n;let r=new Map,o=0;for(let s of"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890,.-+=?"){let t=e.measureText(s).width;r.set(s,t),o+=t}let i=o/r.size,a=(t/i+3)/4,l=r.keys();for(let s of l)r.set(s,(null!=(n=r.get(s))?n:i)*a);return r}(e,s.size),l.set(n,r)),s.count>5e5){let e=0;for(let n of t)e+=null!=(o=r.get(n))?o:s.size;return 1.01*e}let i=e.measureText(t);return function(e,t,n,r,o){var i,a,l;let s=0,c={};for(let d of e)s+=null!=(i=n.get(d))?i:o,c[d]=(null!=(a=c[d])?a:0)+1;let u=t-s;for(let d of Object.keys(c)){let e=c[d],t=null!=(l=n.get(d))?l:o,i=t+u*(t*e/s)*r/e;n.set(d,i)}}(t,i.width,r,Math.max(.05,1-s.count/2e5),s.size),a.set(n,{count:s.count+t.length,size:s.size}),i.width}let c=e.measureText(t),u=c.width/t.length;if((null!=(i=null==s?void 0:s.count)?i:0)>2e4)return c.width;if(void 0===s)a.set(n,{count:t.length,size:u});else{let e=u-s.size,r=t.length/(s.count+t.length),o=s.size+e*r;a.set(n,{count:s.count+t.length,size:o})}return c.width}function c(e,t,n,r,o,i,a,l){if(t.length<=1)return t.length;if(o<n)return-1;let c=Math.floor(n/o*i),u=s(e,t.slice(0,Math.max(0,c)),r,a),d=null==l?void 0:l(t);if(u!==n)if(u<n){for(;u<n;)c++,u=s(e,t.slice(0,Math.max(0,c)),r,a);c--}else for(;u>n;){let n=void 0!==d?0:t.lastIndexOf(" ",c-1);n>0?c=n:c--,u=s(e,t.slice(0,Math.max(0,c)),r,a)}if(" "!==t[c]){let e=0;if(void 0===d)e=t.lastIndexOf(" ",c);else for(let t of d){if(t>c)break;e=t}e>0&&(c=e)}return c}function u(e,t){return o.useMemo((()=>e.map(((e,n)=>({group:e.group,grow:e.grow,hasMenu:e.hasMenu,icon:e.icon,id:e.id,menuIcon:e.menuIcon,overlayIcon:e.overlayIcon,sourceIndex:n,sticky:n<t,indicatorIcon:e.indicatorIcon,style:e.style,themeOverride:e.themeOverride,title:e.title,trailingRowOptions:e.trailingRowOptions,width:e.width,growOffset:e.growOffset,rowMarker:e.rowMarker,rowMarkerChecked:e.rowMarkerChecked,headerRowMarkerTheme:e.headerRowMarkerTheme,headerRowMarkerAlwaysVisible:e.headerRowMarkerAlwaysVisible,headerRowMarkerDisabled:e.headerRowMarkerDisabled})))),[e,t])}function d(e,t){const[n,r]=t;if(e.columns.hasIndex(n)||e.rows.hasIndex(r))return!0;if(void 0!==e.current){if(g(e.current.cell,t))return!0;const o=[e.current.range,...e.current.rangeStack];for(const e of o)if(n>=e.x&&n<e.x+e.width&&r>=e.y&&r<e.y+e.height)return!0}return!1}function h(e,t){return(e??"")===(t??"")}function f(e,t,n){return void 0!==n.current&&(e[1]===n.current.cell[1]&&(void 0===t.span?n.current.cell[0]===e[0]:n.current.cell[0]>=t.span[0]&&n.current.cell[0]<=t.span[1]))}function p(e,t){const[n,r]=e;return n>=t.x&&n<t.x+t.width&&r>=t.y&&r<t.y+t.height}function g(e,t){return e?.[0]===t?.[0]&&e?.[1]===t?.[1]}function m(e){return[e.x+e.width-1,e.y+e.height-1]}function v(e,t,n){const r=n.x,o=n.x+n.width-1,i=n.y,a=n.y+n.height-1,[l,s]=e;if(s<i||s>a)return!1;if(void 0===t.span)return l>=r&&l<=o;const[c,u]=t.span;return c>=r&&c<=o||u>=r&&c<=o||c<r&&u>o}function w(e,t,n,r){let o=0;if(void 0===n.current)return o;const i=n.current.range;(r||i.height*i.width>1)&&v(e,t,i)&&o++;for(const a of n.current.rangeStack)v(e,t,a)&&o++;return o}function b(e,t){let n=e;if(void 0!==t){let r=[...e];const o=n[t.src];t.src>t.dest?(r.splice(t.src,1),r.splice(t.dest,0,o)):(r.splice(t.dest+1,0,o),r.splice(t.src,1)),r=r.map(((t,n)=>({...t,sticky:e[n].sticky}))),n=r}return n}function y(e,t){let n=0;const r=b(e,t);for(let o=0;o<r.length;o++){const e=r[o];if(!e.sticky)break;n+=e.width}return n}function x(e,t,n){if("number"===typeof n)return t*n;{let r=0;for(let o=e-t;o<e;o++)r+=n(o);return r}}function k(e,t,n,r,o){const i=b(e,r),a=[];for(const c of i){if(!c.sticky)break;a.push(c)}if(a.length>0)for(const c of a)n-=c.width;let l=t,s=o??0;for(;s<=n&&l<i.length;)s+=i[l].width,l++;for(let c=t;c<l;c++){const e=i[c];e.sticky||a.push(e)}return a}function C(e,t,n){let r=0;for(const o of t){if(e<=(o.sticky?r:r+(n??0))+o.width)return o.sourceIndex;r+=o.width}return-1}function S(e,t,n,r,o,i,a,l,s,c){const u=r+o;if(n&&e<=o)return-2;if(e<=u)return-1;let d=t;for(let p=0;p<c;p++){const t=i-1-p;if(d-="number"===typeof a?a:a(t),e>=d)return t}const h=i-c,f=e-(s??0);if("number"===typeof a){const e=Math.floor((f-u)/a)+l;if(e>=h)return;return e}{let e=u;for(let t=l;t<h;t++){const n=a(t);if(f<=e+n)return t;e+=n}return}}let M=0,R={};const E="undefined"===typeof window;function I(e,t,n,r){return`${e}_${r??t?.font}_${n}`}function O(e,t,n,r="middle"){const o=I(e,t,r,n);let i=R[o];return void 0===i&&(i=t.measureText(e),R[o]=i,M++),M>1e4&&(R={},M=0),i}function T(e,t){const n=I(e,void 0,"middle",t);return R[n]}function P(e,t){return"string"!==typeof t&&(t=t.baseFontFull),function(e,t){for(const i of H)if(i.key===t)return i.val;const n=D(e,"alphabetic"),r=D(e,"middle"),o=-(r.actualBoundingBoxDescent-n.actualBoundingBoxDescent)+n.actualBoundingBoxAscent/2;return H.push({key:t,val:o}),o}(e,t)}function D(e,t){e.save(),e.textBaseline=t;const n=e.measureText("ABCDEFGHIJKLMNOPQRSTUVWXYZ");return e.restore(),n}!async function(){E||void 0===document?.fonts?.ready||(await document.fonts.ready,M=0,R={},i.clear(),l.clear(),a.clear())}();const H=[];function z(e,t,n,r,o,i){const{ctx:a,rect:l,theme:s}=e;let c=Number.MAX_SAFE_INTEGER;if(void 0!==t&&(c=n-t,c<500)){const e=1-c/500;a.globalAlpha=e,a.fillStyle=s.bgSearchResult,a.fillRect(l.x+1,l.y+1,l.width-(o?2:1),l.height-(i?2:1)),a.globalAlpha=1,void 0!==r&&(r.fillStyle=s.bgSearchResult)}return c<500}function L(e,t,n){const{ctx:r,theme:o}=e,i=t??{},a=n??o.textDark;return a!==i.fillStyle&&(r.fillStyle=a,i.fillStyle=a),i}function F(e,t,n){const{rect:r,ctx:o,theme:i}=e;o.fillStyle=i.textDark,N({ctx:o,rect:r,theme:i},t,n)}function A(e,t,n,r,o,i,a,l,s){"right"===s?e.fillText(t,n+o-(l.cellHorizontalPadding+.5),r+i/2+a):"center"===s?e.fillText(t,n+o/2,r+i/2+a):e.fillText(t,n+l.cellHorizontalPadding+.5,r+i/2+a)}function V(e,t){const n=O("ABCi09jgqpy",e,t);return n.actualBoundingBoxAscent+n.actualBoundingBoxDescent}function _(e,t,n,r,o,l,u,d,h,f){const p=d.baseFontFull,g=function(e,t,n,r,o,l){let u=`${t}_${n}_${r}px`,d=i.get(u);if(void 0!==d)return d;if(r<=0)return[];let h=[],f=t.split("\n"),p=a.get(n),g=void 0===p?t.length:r/p.size*1.5,m=o&&void 0!==p&&p.count>2e4;for(let i of f){let t=s(e,i.slice(0,Math.max(0,g)),n,m),o=Math.min(i.length,g);if(t<=r)h.push(i);else{for(;t>r;){let a=c(e,i,r,n,t,o,m,l),u=i.slice(0,Math.max(0,a));i=i.slice(u.length),h.push(u),t=s(e,i.slice(0,Math.max(0,g)),n,m),o=Math.min(i.length,g)}t>0&&h.push(i)}}return h=h.map(((e,t)=>0===t?e.trimEnd():e.trim())),i.set(u,h),i.size>500&&i.delete(i.keys().next().value),h}(e,t,p,o-2*d.cellHorizontalPadding,f??!1),m=V(e,p),v=d.lineHeight*m,w=m+v*(g.length-1),b=w+d.cellVerticalPadding>l;b&&(e.save(),e.rect(n,r,o,l),e.clip());const y=r+l/2-w/2;let x=Math.max(r+d.cellVerticalPadding,y);for(const i of g)if(A(e,i,n,x,o,m,u,d,h),x+=v,x>r+l)break;b&&e.restore()}function N(e,t,n,o,i){const{ctx:a,rect:l,theme:s}=e,{x:c,y:u,width:d,height:h}=l;(o=o??!1)||(t=function(e,t){e.includes("\n")&&(e=e.split(/\r?\n/,1)[0]);const n=t/4;return e.length>n&&(e=e.slice(0,n)),e}(t,d));const f=P(a,s),p="rtl"===(0,r.o7)(t);if(void 0===n&&p&&(n="right"),p&&(a.direction="rtl"),t.length>0){let e=!1;"right"===n?(a.textAlign="right",e=!0):void 0!==n&&"left"!==n&&(a.textAlign=n,e=!0),o?_(a,t,c,u,d,h,f,s,n,i):A(a,t,c,u,d,h,f,s,n),e&&(a.textAlign="start"),p&&(a.direction="inherit")}}function $(e,t,n,r,o,i){"number"===typeof i&&(i={tl:i,tr:i,br:i,bl:i}),i={tl:Math.max(0,Math.min(i.tl,o/2,r/2)),tr:Math.max(0,Math.min(i.tr,o/2,r/2)),bl:Math.max(0,Math.min(i.bl,o/2,r/2)),br:Math.max(0,Math.min(i.br,o/2,r/2))},e.moveTo(t+i.tl,n),e.arcTo(t+r,n,t+r,n+i.tr,i.tr),e.arcTo(t+r,n+o,t+r-i.br,n+o,i.br),e.arcTo(t,n+o,t,n+o-i.bl,i.bl),e.arcTo(t,n,t+i.tl,n,i.tl)}function B(e,t,n){const r=1.25;e.arc(t,n-4.375,r,0,2*Math.PI,!1),e.arc(t,n,r,0,2*Math.PI,!1),e.arc(t,n+4.375,r,0,2*Math.PI,!1)}function W(e,t,n){const r=function(e,t){const n=t.x-e.x,r=t.y-e.y,o=Math.sqrt(n*n+r*r),i=n/o,a=r/o;return{x:n,y:t.y-e.y,len:o,nx:i,ny:a,ang:Math.atan2(a,i)}};let o;const i=t.length;let a=t[i-1];for(let l=0;l<i;l++){let s=t[l%i];const c=t[(l+1)%i],u=r(s,a),d=r(s,c),h=u.nx*d.ny-u.ny*d.nx,f=u.nx*d.nx-u.ny*-d.ny;let p=Math.asin(h<-1?-1:h>1?1:h),g=1,m=!1;f<0?p<0?p=Math.PI+p:(p=Math.PI-p,g=-1,m=!0):p>0&&(g=-1,m=!0),o=void 0!==s.radius?s.radius:n;const v=p/2;let w,b=Math.abs(Math.cos(v)*o/Math.sin(v));b>Math.min(u.len/2,d.len/2)?(b=Math.min(u.len/2,d.len/2),w=Math.abs(b*Math.sin(v)/Math.cos(v))):w=o;let y=s.x+d.nx*b,x=s.y+d.ny*b;y+=-d.ny*w*g,x+=d.nx*w*g,e.arc(y,x,w,u.ang+Math.PI/2*g,d.ang-Math.PI/2*g,m),a=s,s=c}e.closePath()}function Z(e,t,n,r,o,i,a,l,s,c,u,d,f,p,g){const m={x:0,y:i+c,width:0,height:0};if(e>=p.length||t>=u||t<-2||e<0)return m;const v=i-o;if(e>=d){const t=a>e?-1:1,n=y(p);m.x+=n+s;for(let r=a;r!==e;r+=t)m.x+=p[1===t?r:r-1].width*t}else for(let h=0;h<e;h++)m.x+=p[h].width;if(m.width=p[e].width+1,-1===t)m.y=o,m.height=v;else if(-2===t){m.y=0,m.height=o;let t=e;const r=p[e].group,i=p[e].sticky;for(;t>0&&h(p[t-1].group,r)&&p[t-1].sticky===i;){const e=p[t-1];m.x-=e.width,m.width+=e.width,t--}let a=e;for(;a+1<p.length&&h(p[a+1].group,r)&&p[a+1].sticky===i;){const e=p[a+1];m.width+=e.width,a++}if(!i){const e=y(p),t=m.x-e;t<0&&(m.x-=t,m.width+=t),m.x+m.width>n&&(m.width=n-m.x)}}else if(t>=u-f){let e=u-t;for(m.y=r;e>0;){const n=t+e-1;m.height="number"===typeof g?g:g(n),m.y-=m.height,e--}m.height+=1}else{const e=l>t?-1:1;if("number"===typeof g){const e=t-l;m.y+=e*g}else for(let n=l;n!==t;n+=e)m.y+=g(n)*e;m.height=("number"===typeof g?g:g(t))+1}return m}},42462:(e,t,n)=>{"use strict";n.d(t,{K:()=>u});var r=n(5057),o=n(77650);const i=(0,o.z)("textarea")({name:"InputBox",class:"gdg-izpuzkl",propsAsIs:!1}),a=(0,o.z)("div")({name:"ShadowBox",class:"gdg-s69h75o",propsAsIs:!1}),l=(0,o.z)("div")({name:"GrowingEntryStyle",class:"gdg-g1y0xocz",propsAsIs:!1});var s=n(6573);let c=0;const u=e=>{const{placeholder:t,value:n,onKeyDown:o,highlight:u,altNewline:d,validatedSelection:h,...f}=e,{onChange:p,className:g}=f,m=r.useRef(null),v=n??"";(0,s.hu)(void 0!==p,"GrowingEntry must be a controlled input area");const[w]=r.useState((()=>"input-box-"+(c=(c+1)%1e7)));r.useEffect((()=>{const e=m.current;if(null===e)return;if(e.disabled)return;const t=v.toString().length;e.focus(),e.setSelectionRange(u?0:t,t)}),[]),r.useLayoutEffect((()=>{if(void 0!==h){const e="number"===typeof h?[h,null]:h;m.current?.setSelectionRange(e[0],e[1])}}),[h]);const b=r.useCallback((e=>{"Enter"===e.key&&e.shiftKey&&!0===d||o?.(e)}),[d,o]);return r.createElement(l,{className:"gdg-growing-entry"},r.createElement(a,{className:g},v+"\n"),r.createElement(i,{...f,className:(g??"")+" gdg-input",id:w,ref:m,onKeyDown:b,value:v,placeholder:t,dir:"auto"}))}}}]);