@stlite/desktop 0.33.0 → 0.34.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.
- package/bin/dump_artifacts.js +1 -1
- package/build/asset-manifest.json +42 -41
- package/build/index.html +1 -1
- package/build/static/js/1318.57c335d2.chunk.js +1 -0
- package/build/static/js/{142.85e6074f.chunk.js → 142.2b0ffa81.chunk.js} +1 -1
- package/build/static/js/172.599dcb6e.chunk.js +5 -0
- package/build/static/js/2327.b8572a38.chunk.js +1 -0
- package/build/static/js/2775.c1ed54fa.chunk.js +5 -0
- package/build/static/js/291.aa03bc71.chunk.js +1 -0
- package/build/static/js/3580.e292972c.chunk.js +1 -0
- package/build/static/js/3603.c075eadf.chunk.js +2 -0
- package/build/static/js/3603.c075eadf.chunk.js.LICENSE.txt +135 -0
- package/build/static/js/3744.93bd4bad.chunk.js +2 -0
- package/build/static/js/4140.edb6c36a.chunk.js +1 -0
- package/build/static/js/4141.a101e33c.chunk.js +9 -0
- package/build/static/js/5093.304fcb1e.chunk.js +1 -0
- package/build/static/js/5099.c240313c.chunk.js +1 -0
- package/build/static/js/5177.3eb35171.chunk.js +2 -0
- package/build/static/js/5241.0326c97c.chunk.js +1 -0
- package/build/static/js/5440.c723be7c.chunk.js +1 -0
- package/build/static/js/5617.6141af30.chunk.js +1 -0
- package/build/static/js/{9735.0e70600f.chunk.js → 6557.fd2f35c8.chunk.js} +1 -1
- package/build/static/js/{6422.c2900a88.chunk.js → 6683.aab9fa01.chunk.js} +1 -1
- package/build/static/js/{7842.a98fbb15.chunk.js → 6756.2cb6963c.chunk.js} +1 -1
- package/build/static/js/{6242.5e6f91ac.chunk.js → 6862.886eab8e.chunk.js} +1 -1
- package/build/static/js/6913.094a45e2.chunk.js +17 -0
- package/build/static/js/6939.c09d92c1.chunk.js +1 -0
- package/build/static/js/787.30ab7f34.chunk.js +1 -0
- package/build/static/js/792.45efff32.chunk.js +1 -0
- package/build/static/js/8035.dc118cc9.chunk.js +1 -0
- package/build/static/js/{6097.56c4b02a.chunk.js → 8295.c3cd87de.chunk.js} +1 -1
- package/build/static/js/8418.aed275df.chunk.js +1 -0
- package/build/static/js/8486.e56533d6.chunk.js +1 -0
- package/build/static/js/865.5abdcdc2.chunk.js +1 -0
- package/build/static/js/9004.6a66722a.chunk.js +1 -0
- package/build/static/js/9042.a6fcbc74.chunk.js +5 -0
- package/build/static/js/9107.b49ea9ea.chunk.js +5 -0
- package/build/static/js/9130.8e10440e.chunk.js +1 -0
- package/build/static/js/9166.1a468fb9.chunk.js +2 -0
- package/build/static/js/{5678.729bced9.chunk.js → 9382.c417d448.chunk.js} +1 -1
- package/build/static/js/9615.82cf4bfb.chunk.js +1 -0
- package/build/static/js/{8355.b110abc9.chunk.js → 9915.fe11690a.chunk.js} +1 -1
- package/build/static/js/main.1313208f.js +28 -0
- package/package.json +4 -4
- package/build/static/js/1367.9dcea0bc.chunk.js +0 -9
- package/build/static/js/2116.fd3de825.chunk.js +0 -1
- package/build/static/js/2458.cfb63c88.chunk.js +0 -1
- package/build/static/js/2523.4761d79a.chunk.js +0 -5
- package/build/static/js/2632.de1769ff.chunk.js +0 -1
- package/build/static/js/277.d9ceff66.chunk.js +0 -1
- package/build/static/js/3376.d5aaecc4.chunk.js +0 -1
- package/build/static/js/3392.5ed3420d.chunk.js +0 -1
- package/build/static/js/3977.24eb5fb8.chunk.js +0 -1
- package/build/static/js/4210.945a5966.chunk.js +0 -1
- package/build/static/js/4514.7931bd64.chunk.js +0 -5
- package/build/static/js/464.7c22f33c.chunk.js +0 -1
- package/build/static/js/5070.1d0d565e.chunk.js +0 -1
- package/build/static/js/5608.b4074ab9.chunk.js +0 -1
- package/build/static/js/5752.d5d30939.chunk.js +0 -1
- package/build/static/js/5865.90a40692.chunk.js +0 -17
- package/build/static/js/6223.4bb0039e.chunk.js +0 -2
- package/build/static/js/6668.8cb69721.chunk.js +0 -2
- package/build/static/js/7496.0f941cac.chunk.js +0 -1
- package/build/static/js/761.ca3883de.chunk.js +0 -1
- package/build/static/js/7698.00f5ff0b.chunk.js +0 -1
- package/build/static/js/7858.e4a6aa6d.chunk.js +0 -5
- package/build/static/js/7937.4b1be66e.chunk.js +0 -1
- package/build/static/js/8461.85faefa1.chunk.js +0 -1
- package/build/static/js/8565.f27e3917.chunk.js +0 -1
- package/build/static/js/8910.e6dda87e.chunk.js +0 -2
- package/build/static/js/91.f23bbeac.chunk.js +0 -1
- package/build/static/js/9462.81f9c52a.chunk.js +0 -1
- package/build/static/js/9551.c45b17cf.chunk.js +0 -1
- package/build/static/js/main.e52277a4.js +0 -28
- /package/build/static/css/{3376.60b7ada4.chunk.css → 5099.60b7ada4.chunk.css} +0 -0
- /package/build/static/js/{6668.8cb69721.chunk.js.LICENSE.txt → 3744.93bd4bad.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{6223.4bb0039e.chunk.js.LICENSE.txt → 5177.3eb35171.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{8910.e6dda87e.chunk.js.LICENSE.txt → 9166.1a468fb9.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.e52277a4.js.LICENSE.txt → main.1313208f.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 3744.93bd4bad.chunk.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[3744],{34690:e=>{e.exports=function(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var l=e[o];t(r,l,n(l),e)}return r}},97247:(e,t,n)=>{var r=n(54305);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},89479:e=>{e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}},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}},60238:e=>{e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}},61350:(e,t,n)=>{var r=n(97541),o=n(40085);e.exports=function e(t,n,i,l,a){var s=-1,c=t.length;for(i||(i=o),a||(a=[]);++s<c;){var u=t[s];n>0&&i(u)?n>1?e(u,n-1,i,l,a):r(a,u):l||(a[a.length]=u)}return a}},44949:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},54305:(e,t,n)=>{var r=n(60238),o=n(24981),i=n(23481);e.exports=function(e,t,n){return t===t?i(e,t,n):r(e,o,n)}},24981:e=>{e.exports=function(e){return e!==e}},99980:e=>{var t=Math.ceil,n=Math.max;e.exports=function(e,r,o,i){for(var l=-1,a=n(t((r-e)/(o||1)),0),s=Array(a);a--;)s[i?a:++l]=e,e+=o;return s}},39594:(e,t,n)=>{var r=n(36418),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},43676:(e,t,n)=>{var r=n(98323),o=n(97247),i=n(89479),l=n(51565),a=n(87382),s=n(18766),c=200;e.exports=function(e,t,n){var u=-1,d=o,h=e.length,f=!0,p=[],g=p;if(n)f=!1,d=i;else if(h>=c){var m=t?null:a(e);if(m)return s(m);f=!1,d=l,g=new r}else g=t?[]:p;e:for(;++u<h;){var v=e[u],b=t?t(v):v;if(v=n||0!==v?v:0,f&&b===b){for(var y=g.length;y--;)if(g[y]===b)continue e;t&&g.push(b),p.push(v)}else d(g,b,n)||(g!==p&&g.push(b),p.push(v))}return p}},60022:(e,t,n)=>{var r=n(34690),o=n(74023),i=n(31104),l=n(44028);e.exports=function(e,t){return function(n,a){var s=l(n)?r:o,c=t?t():{};return s(n,e,i(a,2),c)}}},9186:(e,t,n)=>{var r=n(99980),o=n(27396),i=n(17046);e.exports=function(e){return function(t,n,l){return l&&"number"!=typeof l&&o(t,n,l)&&(n=l=void 0),t=i(t),void 0===n?(n=t,t=0):n=i(n),l=void 0===l?t<n?1:-1:i(l),r(t,n,l,e)}}},87382:(e,t,n)=>{var r=n(33242),o=n(92706),i=n(18766),l=r&&1/i(new r([,-0]))[1]==1/0?function(e){return new r(e)}:o;e.exports=l},40085:(e,t,n)=>{var r=n(50165),o=n(79689),i=n(44028),l=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(l&&e&&e[l])}},23481:e=>{e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}},36418:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},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),l="Expected a function",a=Math.max,s=Math.min;e.exports=function(e,t,n){var c,u,d,h,f,p,g=0,m=!1,v=!1,b=!0;if("function"!=typeof e)throw new TypeError(l);function y(t){var n=c,r=u;return c=u=void 0,g=t,h=e.apply(r,n)}function w(e){var n=e-p;return void 0===p||n>=t||n<0||v&&e-g>=d}function x(){var e=o();if(w(e))return k(e);f=setTimeout(x,function(e){var n=t-(e-p);return v?s(n,d-(e-g)):n}(e))}function k(e){return f=void 0,b&&c?y(e):(c=u=void 0,h)}function C(){var e=o(),n=w(e);if(c=arguments,u=this,p=e,n){if(void 0===f)return function(e){return g=e,f=setTimeout(x,t),m?y(e):h}(p);if(v)return clearTimeout(f),f=setTimeout(x,t),y(p)}return void 0===f&&(f=setTimeout(x,t)),h}return t=i(t)||0,r(n)&&(m=!!n.leading,d=(v="maxWait"in n)?a(i(n.maxWait)||0,t):d,b="trailing"in n?!!n.trailing:b),C.cancel=function(){void 0!==f&&clearTimeout(f),g=0,c=p=u=f=void 0},C.flush=function(){return void 0===f?h:k(o())},C}},79077:(e,t,n)=>{var r=n(61350);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},88417:(e,t,n)=>{var r=n(23447),o=n(60022),i=Object.prototype.hasOwnProperty,l=o((function(e,t,n){i.call(e,n)?e[n].push(t):r(e,n,[t])}));e.exports=l},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()}},66904:(e,t,n)=>{var r=n(9186)();e.exports=r},8406:(e,t,n)=>{var r=n(67047),o=n(26271),i="Expected a function";e.exports=function(e,t,n){var l=!0,a=!0;if("function"!=typeof e)throw new TypeError(i);return o(n)&&(l="leading"in n?!!n.leading:l,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:l,maxWait:t,trailing:a})}},17046:(e,t,n)=>{var r=n(81692),o=1/0,i=17976931348623157e292;e.exports=function(e){return e?(e=r(e))===o||e===-o?(e<0?-1:1)*i:e===e?e:0:0===e?e:0}},81692:(e,t,n)=>{var r=n(39594),o=n(26271),i=n(71490),l=NaN,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return l;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||c.test(e)?u(e.slice(2),n?2:8):a.test(e)?l:+e}},87384:(e,t,n)=>{var r=n(43676);e.exports=function(e){return e&&e.length?r(e):[]}},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 l=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 a(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,a(e,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]));return r.default.createElement(this.props.tagName,l({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},l=n(76126);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 s(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){c(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}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,a=r,c=o.Children.count(e.children)-1;if(e.infiniteLoop&&(r<0||r>c))return a<0?e.centerMode&&e.centerSlidePercentage&&"horizontal"===e.axis?n.itemListStyle=(0,l.setPosition)(-(c+2)*e.centerSlidePercentage-(100-e.centerSlidePercentage)/2,e.axis):n.itemListStyle=(0,l.setPosition)(100*-(c+2),e.axis):a>c&&(n.itemListStyle=(0,l.setPosition)(0,e.axis)),n;var u=(0,l.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={},a="horizontal"===t.axis,s=o.Children.count(t.children),c=(0,l.getPosition)(n.selectedItem,t),u=t.infiniteLoop?(0,l.getPosition)(s-1,t)-100:(0,l.getPosition)(s-1,t),d=a?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,l.setPosition)(f,t.axis)),p&&!n.cancelClick&&r({cancelClick:!0}),i};t.slideStopSwipingHandler=function(e,t){var n=(0,l.getPosition)(t.selectedItem,e);return{itemListStyle:(0,l.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)),l=d(n(72867)),a=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 b(e,t){return b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},b(e,t)}function y(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 w(e)}(this,n)}}function w(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&&b(e,t)}(f,e);var t,n,d,h=y(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(w(t=h.call(this,e)),"thumbsRef",void 0),k(w(t),"carouselWrapperRef",void 0),k(w(t),"listRef",void 0),k(w(t),"itemsRef",void 0),k(w(t),"timer",void 0),k(w(t),"animationHandler",void 0),k(w(t),"setThumbsRef",(function(e){t.thumbsRef=e})),k(w(t),"setCarouselWrapperRef",(function(e){t.carouselWrapperRef=e})),k(w(t),"setListRef",(function(e){t.listRef=e})),k(w(t),"setItemsRef",(function(e,n){t.itemsRef||(t.itemsRef=[]),t.itemsRef[n]=e})),k(w(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(w(t),"clearAutoPlay",(function(){t.timer&&clearTimeout(t.timer)})),k(w(t),"resetAutoPlay",(function(){t.clearAutoPlay(),t.autoPlay()})),k(w(t),"stopOnHover",(function(){t.setState({isMouseEntered:!0},t.clearAutoPlay)})),k(w(t),"startOnLeave",(function(){t.setState({isMouseEntered:!1},t.autoPlay)})),k(w(t),"isFocusWithinTheCarousel",(function(){return!!t.carouselWrapperRef&&!((0,a.default)().activeElement!==t.carouselWrapperRef&&!t.carouselWrapperRef.contains((0,a.default)().activeElement))})),k(w(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(w(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(w(t),"setMountState",(function(){t.setState({hasMount:!0}),t.updateSizes()})),k(w(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(w(t),"handleOnChange",(function(e,n){r.Children.count(t.props.children)<=1||t.props.onChange(e,n)})),k(w(t),"handleClickThumb",(function(e,n){t.props.onClickThumb(e,n),t.moveTo(e)})),k(w(t),"onSwipeStart",(function(e){t.setState({swiping:!0}),t.props.onSwipeStart(e)})),k(w(t),"onSwipeEnd",(function(e){t.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),t.props.onSwipeEnd(e),t.clearAutoPlay(),t.state.autoPlay&&t.autoPlay()})),k(w(t),"onSwipeMove",(function(e,n){t.props.onSwipeMove(n);var r=t.props.swipeAnimationHandler(e,t.props,t.state,t.setState.bind(w(t)));return t.setState(m({},r)),!!Object.keys(r).length})),k(w(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(w(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(w(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(w(t),"onClickNext",(function(){t.increment(1)})),k(w(t),"onClickPrev",(function(){t.decrement(1)})),k(w(t),"onSwipeForward",(function(){t.increment(1),t.props.emulateTouch&&t.setState({cancelClick:!0})})),k(w(t),"onSwipeBackwards",(function(){t.decrement(1),t.props.emulateTouch&&t.setState({cancelClick:!0})})),k(w(t),"changeItem",(function(e){return function(n){(0,c.isKeyboardEvent)(n)&&"Enter"!==n.key||t.moveTo(e)}})),k(w(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(w(t),"getInitialImage",(function(){var e=t.props.selectedItem,n=t.itemsRef&&t.itemsRef[e];return(n&&n.getElementsByTagName("img")||[])[0]})),k(w(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,a.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,a.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 l=o===t.state.selectedItem,a=o===t.state.previousItem,s=l&&t.state.selectedStyle||a&&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,l=t.children;return n?r.default.createElement("ul",{className:"control-dots"},r.Children.map(l,(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(l.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,l=this.props.showArrows&&r.Children.count(this.props.children)>1,a=l&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,s=l&&(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,a,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),l=c(n(69265)),a=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 b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){return e.hasOwnProperty("key")},w=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),b(m(t=u.call(this,e)),"itemsWrapperRef",void 0),b(m(t),"itemsListRef",void 0),b(m(t),"thumbsRef",void 0),b(m(t),"setItemsWrapperRef",(function(e){t.itemsWrapperRef=e})),b(m(t),"setItemsListRef",(function(e){t.itemsListRef=e})),b(m(t),"setThumbsRef",(function(e,n){t.thumbsRef||(t.thumbsRef=[]),t.thumbsRef[n]=e})),b(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]),l=Math.floor(n/o),a=l<e,s=a?e-l:0;t.setState((function(e,n){return{itemSize:o,visibleItems:l,firstItem:a?t.getFirstItem(n.selectedItem):0,lastPosition:s,showArrows:a}}))}})),b(m(t),"handleClickItem",(function(e,n,r){if(!y(r)||"Enter"===r.key){var o=t.props.onSelectItem;"function"===typeof o&&o(e,n)}})),b(m(t),"onSwipeStart",(function(){t.setState({swiping:!0})})),b(m(t),"onSwipeEnd",(function(){t.setState({swiping:!1})})),b(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 a=i+100/(t.itemsWrapperRef.clientWidth/n);return t.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach((function(e){t.itemsListRef.style[e]=(0,l.default)(a,"%",t.props.axis)})),!0})),b(m(t),"slideRight",(function(e){t.moveTo(t.state.firstItem-("number"===typeof e?e:1))})),b(m(t),"slideLeft",(function(e){t.moveTo(t.state.firstItem+("number"===typeof e?e:1))})),b(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),l={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({},l,{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,l.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(a.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=w,b(w,"displayName","Thumbs"),b(w,"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(5817))&&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=l(n(64810)),o=n(57834),i=l(n(72867));function l(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}},5817:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var l=o.apply(null,n);l&&e.push(l)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var a in n)r.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},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,l,a,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((a=e[r]).keys)for(n=t[f],l=0;l<a.keys.length;l++){if(void 0==n)throw new Error(i('[sprintf] Cannot access property "%s" of undefined value "%s"',a.keys[l],a.keys[l-1]));n=n[a.keys[l]]}else n=a.param_no?t[a.param_no]:t[f++];if(o.not_type.test(a.type)&&o.not_primitive.test(a.type)&&n instanceof Function&&(n=n()),o.numeric_arg.test(a.type)&&"number"!==typeof n&&isNaN(n))throw new TypeError(i("[sprintf] expecting number but found %T",n));switch(o.number.test(a.type)&&(d=n>=0),a.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,a.width?parseInt(a.width):0);break;case"e":n=a.precision?parseFloat(n).toExponential(a.precision):parseFloat(n).toExponential();break;case"f":n=a.precision?parseFloat(n).toFixed(a.precision):parseFloat(n);break;case"g":n=a.precision?String(Number(n.toPrecision(a.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=a.precision?n.substring(0,a.precision):n;break;case"t":n=String(!!n),n=a.precision?n.substring(0,a.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=a.precision?n.substring(0,a.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=a.precision?n.substring(0,a.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(a.type)?g+=n:(!o.number.test(a.type)||d&&!a.sign?h="":(h=d?"+":"-",n=n.toString().replace(o.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",u=a.width-(h+n).length,s=a.width&&u>0?c.repeat(u):"",g+=a.align?h+n+s:"0"===c?h+s+n:s+h+n)}return g}(function(e){if(a[e])return a[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 l=[],s=t[2],c=[];if(null===(c=o.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(l.push(c[1]);""!==(s=s.substring(c[0].length));)if(null!==(c=o.key_access.exec(s)))l.push(c[1]);else{if(null===(c=o.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");l.push(c[1])}t[2]=l}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 a[e]=r}(e),arguments)}function l(e,t){return i.apply(null,[e].concat(t||[]))}var a=Object.create(null);t.sprintf=i,t.vsprintf=l,"undefined"!==typeof window&&(window.sprintf=i,window.vsprintf=l,void 0===(r=function(){return{sprintf:i,vsprintf:l}}.call(t,n,t,e))||(e.exports=r))}()},27235:()=>{},49270:(e,t,n)=>{"use strict";n.d(t,{d:()=>u});var r=n(5057);var o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return o.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=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=>e.toUpperCase()===e,s=(e,t)=>{const n={};return Object.keys(e).filter((e=>t=>-1===e.indexOf(t))(t)).forEach((t=>{n[t]=e[t]})),n};var c=(e,t)=>{{if("string"===typeof e||"number"===typeof e&&isFinite(e))return;const n="object"===typeof e?JSON.stringify(e):String(e);console.warn(`An interpolation evaluated to '${n}' in the component '${t}', which is probably a mistake. You should explicitly cast or transform the value to a string.`)}};var u=new Proxy((function(e){return t=>{if(Array.isArray(t))throw new Error('Using the "styled" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly. See https://github.com/callstack/linaria#setup');const n=(n,o)=>{const{as:u=e,class:d}=n,h=function(e,t,n){const r=s(t,n);return"string"!==typeof e||-1!==e.indexOf("-")||a(e[0])||Object.keys(r).forEach((e=>{i(e)||delete r[e]})),r}(u,n,["as","class"]);h.ref=o,h.className=t.atomic?l(t.class,h.className||d):l(h.className||d,t.class);const{vars:f}=t;if(f){const e={};for(const i in f){const r=f[i],o=r[0],l=r[1]||"",a="function"===typeof o?o(n):o;c(a,t.name),e[`--${i}`]=`${a}${l}`}const r=h.style||{},o=Object.keys(r);o.length>0&&o.forEach((t=>{e[t]=r[t]})),h.style=e}return e.__linaria&&e!==u?(h.as=u,r.createElement(e,h)):r.createElement(u,h)},o=r.forwardRef?r.forwardRef(n):e=>{const t=s(e,["innerRef"]);return n(t,e.innerRef)};return o.displayName=t.name,o.__linaria={className:t.class,extends:e},o}}),{get:(e,t)=>e(t)})},55783:(e,t,n)=>{"use strict";n.d(t,{Bn:()=>Hr});var r=n(49270),o=n(66751),i=n(5057);function l(){return l=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},l.apply(this,arguments)}var a=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(r){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),s=Math.abs,c=String.fromCharCode,u=Object.assign;function d(e){return e.trim()}function h(e,t,n){return e.replace(t,n)}function f(e,t){return e.indexOf(t)}function p(e,t){return 0|e.charCodeAt(t)}function g(e,t,n){return e.slice(t,n)}function m(e){return e.length}function v(e){return e.length}function b(e,t){return t.push(e),e}var y=1,w=1,x=0,k=0,C=0,S="";function M(e,t,n,r,o,i,l){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:y,column:w,length:l,return:""}}function E(e,t){return u(M("",null,null,"",null,null,0),e,{length:-e.length},t)}function R(){return C=k>0?p(S,--k):0,w--,10===C&&(w=1,y--),C}function O(){return C=k<x?p(S,k++):0,w++,10===C&&(w=1,y++),C}function I(){return p(S,k)}function P(){return k}function T(e,t){return g(S,e,t)}function H(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function D(e){return y=w=1,x=m(S=e),k=0,[]}function L(e){return S="",e}function A(e){return d(T(k-1,$(91===e?e+2:40===e?e+1:e)))}function z(e){for(;(C=I())&&C<33;)O();return H(e)>2||H(C)>3?"":" "}function F(e,t){for(;--t&&O()&&!(C<48||C>102||C>57&&C<65||C>70&&C<97););return T(e,P()+(t<6&&32==I()&&32==O()))}function $(e){for(;O();)switch(C){case e:return k;case 34:case 39:34!==e&&39!==e&&$(C);break;case 40:41===e&&$(e);break;case 92:O()}return k}function _(e,t){for(;O()&&e+C!==57&&(e+C!==84||47!==I()););return"/*"+T(t,k-1)+"*"+c(47===e?e:O())}function N(e){for(;!H(I());)O();return T(e,k)}var V="-ms-",B="-moz-",j="-webkit-",W="comm",U="rule",X="decl",Y="@import",K="@keyframes";function G(e,t){for(var n="",r=v(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function q(e,t,n,r){switch(e.type){case Y:case X:return e.return=e.return||e.value;case W:return"";case K:return e.return=e.value+"{"+G(e.children,r)+"}";case U:e.value=e.props.join(",")}return m(n=G(e.children,r))?e.return=e.value+"{"+n+"}":""}function Z(e,t){switch(function(e,t){return(((t<<2^p(e,0))<<2^p(e,1))<<2^p(e,2))<<2^p(e,3)}(e,t)){case 5103:return j+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return j+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return j+e+B+e+V+e+e;case 6828:case 4268:return j+e+V+e+e;case 6165:return j+e+V+"flex-"+e+e;case 5187:return j+e+h(e,/(\w+).+(:[^]+)/,j+"box-$1$2"+V+"flex-$1$2")+e;case 5443:return j+e+V+"flex-item-"+h(e,/flex-|-self/,"")+e;case 4675:return j+e+V+"flex-line-pack"+h(e,/align-content|flex-|-self/,"")+e;case 5548:return j+e+V+h(e,"shrink","negative")+e;case 5292:return j+e+V+h(e,"basis","preferred-size")+e;case 6060:return j+"box-"+h(e,"-grow","")+j+e+V+h(e,"grow","positive")+e;case 4554:return j+h(e,/([^-])(transform)/g,"$1"+j+"$2")+e;case 6187:return h(h(h(e,/(zoom-|grab)/,j+"$1"),/(image-set)/,j+"$1"),e,"")+e;case 5495:case 3959:return h(e,/(image-set\([^]*)/,j+"$1$`$1");case 4968:return h(h(e,/(.+:)(flex-)?(.*)/,j+"box-pack:$3"+V+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+j+e+e;case 4095:case 3583:case 4068:case 2532:return h(e,/(.+)-inline(.+)/,j+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(m(e)-1-t>6)switch(p(e,t+1)){case 109:if(45!==p(e,t+4))break;case 102:return h(e,/(.+:)(.+)-([^]+)/,"$1"+j+"$2-$3$1"+B+(108==p(e,t+3)?"$3":"$2-$3"))+e;case 115:return~f(e,"stretch")?Z(h(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==p(e,t+1))break;case 6444:switch(p(e,m(e)-3-(~f(e,"!important")&&10))){case 107:return h(e,":",":"+j)+e;case 101:return h(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+j+(45===p(e,14)?"inline-":"")+"box$3$1"+j+"$2$3$1"+V+"$2box$3")+e}break;case 5936:switch(p(e,t+11)){case 114:return j+e+V+h(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return j+e+V+h(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return j+e+V+h(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return j+e+V+e+e}return e}function Q(e){return L(J("",null,null,null,[""],e=D(e),0,[0],e))}function J(e,t,n,r,o,i,l,a,s){for(var u=0,d=0,p=l,g=0,v=0,y=0,w=1,x=1,k=1,C=0,S="",M=o,E=i,T=r,H=S;x;)switch(y=C,C=O()){case 40:if(108!=y&&58==H.charCodeAt(p-1)){-1!=f(H+=h(A(C),"&","&\f"),"&\f")&&(k=-1);break}case 34:case 39:case 91:H+=A(C);break;case 9:case 10:case 13:case 32:H+=z(y);break;case 92:H+=F(P()-1,7);continue;case 47:switch(I()){case 42:case 47:b(te(_(O(),P()),t,n),s);break;default:H+="/"}break;case 123*w:a[u++]=m(H)*k;case 125*w:case 59:case 0:switch(C){case 0:case 125:x=0;case 59+d:v>0&&m(H)-p&&b(v>32?ne(H+";",r,n,p-1):ne(h(H," ","")+";",r,n,p-2),s);break;case 59:H+=";";default:if(b(T=ee(H,t,n,u,d,o,a,S,M=[],E=[],p),i),123===C)if(0===d)J(H,t,T,T,M,i,p,a,E);else switch(g){case 100:case 109:case 115:J(e,T,T,r&&b(ee(e,T,T,0,0,o,a,S,o,M=[],p),E),o,E,p,a,r?M:E);break;default:J(H,T,T,T,[""],E,0,a,E)}}u=d=v=0,w=k=1,S=H="",p=l;break;case 58:p=1+m(H),v=y;default:if(w<1)if(123==C)--w;else if(125==C&&0==w++&&125==R())continue;switch(H+=c(C),C*w){case 38:k=d>0?1:(H+="\f",-1);break;case 44:a[u++]=(m(H)-1)*k,k=1;break;case 64:45===I()&&(H+=A(O())),g=I(),d=p=m(S=H+=N(P())),C++;break;case 45:45===y&&2==m(H)&&(w=0)}}return i}function ee(e,t,n,r,o,i,l,a,c,u,f){for(var p=o-1,m=0===o?i:[""],b=v(m),y=0,w=0,x=0;y<r;++y)for(var k=0,C=g(e,p+1,p=s(w=l[y])),S=e;k<b;++k)(S=d(w>0?m[k]+" "+C:h(C,/&\f/g,m[k])))&&(c[x++]=S);return M(e,t,n,0===o?U:a,c,u,f)}function te(e,t,n){return M(e,t,n,W,c(C),g(e,2,-2),0)}function ne(e,t,n,r){return M(e,t,n,X,g(e,0,r),g(e,r+1,-1),r)}var re=function(e,t,n){for(var r=0,o=0;r=o,o=I(),38===r&&12===o&&(t[n]=1),!H(o);)O();return T(e,k)},oe=function(e,t){return L(function(e,t){var n=-1,r=44;do{switch(H(r)){case 0:38===r&&12===I()&&(t[n]=1),e[n]+=re(k-1,t,n);break;case 2:e[n]+=A(r);break;case 4:if(44===r){e[++n]=58===I()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=c(r)}}while(r=O());return e}(D(e),t))},ie=new WeakMap,le=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ie.get(n))&&!r){ie.set(e,!0);for(var o=[],i=oe(t,o),l=n.props,a=0,s=0;a<i.length;a++)for(var c=0;c<l.length;c++,s++)e.props[s]=o[a]?i[a].replace(/&\f/g,l[c]):l[c]+" "+i[a]}}},ae=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},se=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case X:e.return=Z(e.value,e.length);break;case K:return G([E(e,{value:h(e.value,"@","@"+j)})],r);case U:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return G([E(e,{props:[h(t,/:(read-\w+)/,":"+B+"$1")]})],r);case"::placeholder":return G([E(e,{props:[h(t,/:(plac\w+)/,":"+j+"input-$1")]}),E(e,{props:[h(t,/:(plac\w+)/,":"+B+"$1")]}),E(e,{props:[h(t,/:(plac\w+)/,V+"input-$1")]})],r)}return""}))}}];const ce=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||se;var o,i,l={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)l[t[n]]=!0;s.push(e)}));var c,u,d=[q,(u=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&u(e)})],h=function(e){var t=v(e);return function(n,r,o,i){for(var l="",a=0;a<t;a++)l+=e[a](n,r,o,i)||"";return l}}([le,ae].concat(r,d));i=function(e,t,n,r){c=n,G(Q(e?e+"{"+t.styles+"}":t.styles),h),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new a({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:l,registered:{},insert:i};return f.sheet.hydrate(s),f};var ue=n(26310),de=n(62666),he=n(70909),fe=n(16999),pe=/[A-Z]|^ms/g,ge=/_EMO_([^_]+?)_([^]*?)_EMO_/g,me=function(e){return 45===e.charCodeAt(1)},ve=function(e){return null!=e&&"boolean"!==typeof e},be=(0,fe.Z)((function(e){return me(e)?e:e.replace(pe,"-$&").toLowerCase()})),ye=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(ge,(function(e,t,n){return xe={name:t,styles:n,next:xe},t}))}return 1===he.Z[e]||me(e)||"number"!==typeof t||0===t?t:t+"px"};function we(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return xe={name:n.name,styles:n.styles,next:xe},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)xe={name:r.name,styles:r.styles,next:xe},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=we(e,t,n[o])+";";else for(var i in n){var l=n[i];if("object"!==typeof l)null!=t&&void 0!==t[l]?r+=i+"{"+t[l]+"}":ve(l)&&(r+=be(i)+":"+ye(i,l)+";");else if(!Array.isArray(l)||"string"!==typeof l[0]||null!=t&&void 0!==t[l[0]]){var a=we(e,t,l);switch(i){case"animation":case"animationName":r+=be(i)+":"+a+";";break;default:r+=i+"{"+a+"}"}}else for(var s=0;s<l.length;s++)ve(l[s])&&(r+=be(i)+":"+ye(i,l[s])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=xe,i=n(e);return xe=o,we(e,t,i)}}if(null==t)return n;var l=t[n];return void 0!==l?l:n}var xe,ke=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var Ce=function(e,t,n){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";xe=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=we(n,t,i)):o+=i[0];for(var l=1;l<e.length;l++)o+=we(n,t,e[l]),r&&(o+=i[l]);ke.lastIndex=0;for(var a,s="";null!==(a=ke.exec(o));)s+="-"+a[1];return{name:(0,de.Z)(o)+s,styles:o,next:xe}},Se=n(57178),Me={}.hasOwnProperty,Ee=(0,i.createContext)("undefined"!==typeof HTMLElement?ce({key:"css"}):null);var Re=Ee.Provider,Oe=function(e){return(0,i.forwardRef)((function(t,n){var r=(0,i.useContext)(Ee);return e(t,r,n)}))},Ie=(0,i.createContext)({});var Pe="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Te=function(e,t){var n={};for(var r in t)Me.call(t,r)&&(n[r]=t[r]);return n[Pe]=e,n},He=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;(0,ue.hC)(t,n,r);(0,Se.L)((function(){return(0,ue.My)(t,n,r)}));return null},De=Oe((function(e,t,n){var r=e.css;"string"===typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[Pe],l=[r],a="";"string"===typeof e.className?a=(0,ue.fp)(t.registered,l,e.className):null!=e.className&&(a=e.className+" ");var s=Ce(l,void 0,(0,i.useContext)(Ie));a+=t.key+"-"+s.name;var c={};for(var u in e)Me.call(e,u)&&"css"!==u&&u!==Pe&&(c[u]=e[u]);return c.ref=n,c.className=a,(0,i.createElement)(i.Fragment,null,(0,i.createElement)(He,{cache:t,serialized:s,isStringTag:"string"===typeof o}),(0,i.createElement)(o,c))}));n(56129);var Le=function(e,t){var n=arguments;if(null==t||!Me.call(t,"css"))return i.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=De,o[1]=Te(e,t);for(var l=2;l<r;l++)o[l]=n[l];return i.createElement.apply(null,o)};function Ae(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ce(t)}var ze=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var l=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))l=e(i);else for(var a in l="",i)i[a]&&a&&(l&&(l+=" "),l+=a);break;default:l=i}l&&(o&&(o+=" "),o+=l)}}return o};var Fe=function(e){var t=e.cache,n=e.serializedArr;(0,Se.L)((function(){for(var e=0;e<n.length;e++)(0,ue.My)(t,n[e],!1)}));return null},$e=Oe((function(e,t){var n=[],r=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var i=Ce(r,t.registered);return n.push(i),(0,ue.hC)(t,i,!1),t.key+"-"+i.name},o={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return function(e,t,n){var r=[],o=(0,ue.fp)(e,r,n);return r.length<2?n:o+t(r)}(t.registered,r,ze(n))},theme:(0,i.useContext)(Ie)},l=e.children(o);return!0,(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Fe,{cache:t,serializedArr:n}),l)}));function _e(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ve(e,t){if(e){if("string"===typeof e)return Ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ne(e,t):void 0}}function Be(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(s){a=!0,o=s}finally{try{l||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||Ve(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.")}()}function je(e){return je="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},je(e)}function We(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ue(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 Xe(e,t,n){return t&&Ue(e.prototype,t),n&&Ue(e,n),e}function Ye(e,t){return Ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ye(e,t)}function Ke(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&&Ye(e,t)}function Ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qe=n(53627);function Ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qe(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 Je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(n),!0).forEach((function(t){Ze(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function et(e){return et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},et(e)}function tt(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nt(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,r=et(e);if(t){var o=et(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tt(this,n)}}var rt=["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ot=function(){};function it(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function lt(e,t,n){var r=[n];if(t&&e)for(var o in t)t.hasOwnProperty(o)&&t[o]&&r.push("".concat(it(e,o)));return r.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var at=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===je(e)&&null!==e?[e]:[];var t},st=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,Je({},_e(e,rt))};function ct(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function ut(e){return ct(e)?window.pageYOffset:e.scrollTop}function dt(e,t){ct(e)?window.scrollTo(0,t):e.scrollTop=t}function ht(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ot,o=ut(e),i=t-o,l=10,a=0;!function t(){var s,c=i*((s=(s=a+=l)/n-1)*s*s+1)+o;dt(e,c),a<n?window.requestAnimationFrame(t):r(e)}()}function ft(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var pt=!1,gt={get passive(){return pt=!0}},mt="undefined"!==typeof window?window:{};mt.addEventListener&&mt.removeEventListener&&(mt.addEventListener("p",ot,gt),mt.removeEventListener("p",ot,!1));var vt=pt;function bt(e){return null!=e}function yt(e,t,n){return e?t:n}var wt=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=Be(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=Be(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})};function xt(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,l=e.isFixedPosition,a=e.theme.spacing,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=l?window.innerHeight:ct(u=s)?window.innerHeight:u.clientHeight,b=ut(s),y=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),x=m-w,k=v-g,C=x+b,S=d-b-g,M=f-v+b+y,E=b+g-w,R=160;switch(o){case"auto":case"bottom":if(k>=p)return{placement:"bottom",maxHeight:t};if(S>=p&&!l)return i&&ht(s,M,R),{placement:"bottom",maxHeight:t};if(!l&&S>=r||l&&k>=r)return i&&ht(s,M,R),{placement:"bottom",maxHeight:l?k-y:S-y};if("auto"===o||l){var O=t,I=l?x:C;return I>=r&&(O=Math.min(I-y-a.controlHeight,t)),{placement:"top",maxHeight:O}}if("bottom"===o)return i&&dt(s,M),{placement:"bottom",maxHeight:t};break;case"top":if(x>=p)return{placement:"top",maxHeight:t};if(C>=p&&!l)return i&&ht(s,E,R),{placement:"top",maxHeight:t};if(!l&&C>=r||l&&x>=r){var P=t;return(!l&&C>=r||l&&x>=r)&&(P=l?x-w:C-w),i&&ht(s,E,R),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var kt=function(e){return"auto"===e?"bottom":e},Ct=(0,i.createContext)({getPortalPlacement:null}),St=function(e){Ke(n,e);var t=nt(n);function n(){var e;We(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).state={maxHeight:e.props.maxMenuHeight,placement:null},e.context=void 0,e.getPlacement=function(t){var n=e.props,r=n.minMenuHeight,o=n.maxMenuHeight,i=n.menuPlacement,l=n.menuPosition,a=n.menuShouldScrollIntoView,s=n.theme;if(t){var c="fixed"===l,u=xt({maxHeight:o,menuEl:t,minHeight:r,placement:i,shouldScroll:a&&!c,isFixedPosition:c,theme:s}),d=e.context.getPortalPlacement;d&&d(u),e.setState(u)}},e.getUpdatedProps=function(){var t=e.props.menuPlacement,n=e.state.placement||kt(t);return Je(Je({},e.props),{},{placement:n,maxHeight:e.state.maxHeight})},e}return Xe(n,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),n}(i.Component);St.contextType=Ct;var Mt=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},Et=Mt,Rt=Mt,Ot=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return Le("div",l({css:o("noOptionsMessage",e),className:r({"menu-notice":!0,"menu-notice--no-options":!0},n)},i),t)};Ot.defaultProps={children:"No options"};var It=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return Le("div",l({css:o("loadingMessage",e),className:r({"menu-notice":!0,"menu-notice--loading":!0},n)},i),t)};It.defaultProps={children:"Loading..."};var Pt,Tt=function(e){Ke(n,e);var t=nt(n);function n(){var e;We(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).state={placement:null},e.getPortalPlacement=function(t){var n=t.placement;n!==kt(e.props.menuPlacement)&&e.setState({placement:n})},e}return Xe(n,[{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.className,o=e.controlElement,i=e.cx,a=e.innerProps,s=e.menuPlacement,c=e.menuPosition,u=e.getStyles,d="fixed"===c;if(!t&&!d||!o)return null;var h=this.state.placement||kt(s),f=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),p=d?0:window.pageYOffset,g=f[h]+p,m=Le("div",l({css:u("menuPortal",{offset:g,position:c,rect:f}),className:i({"menu-portal":!0},r)},a),n);return Le(Ct.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},t?(0,qe.createPortal)(m,t):m)}}]),n}(i.Component),Ht=["size"];var Dt,Lt,At={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},zt=function(e){var t=e.size,n=_e(e,Ht);return Le("svg",l({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:At},n))},Ft=function(e){return Le(zt,l({size:20},e),Le("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"}))},$t=function(e){return Le(zt,l({size:20},e),Le("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"}))},_t=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorContainer",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},Nt=_t,Vt=_t,Bt=function(){var e=Ae.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Pt||(Dt=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],Lt||(Lt=Dt.slice(0)),Pt=Object.freeze(Object.defineProperties(Dt,{raw:{value:Object.freeze(Lt)}})))),jt=function(e){var t=e.delay,n=e.offset;return Le("span",{css:Ae({animation:"".concat(Bt," 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"},"","","","")})},Wt=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,i=e.isRtl;return Le("div",l({css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)},o),Le(jt,{delay:0,offset:i}),Le(jt,{delay:160,offset:!0}),Le(jt,{delay:320,offset:!i}))};Wt.defaultProps={size:4};var Ut=["data"],Xt=["innerRef","isDisabled","isHidden","inputClassName"],Yt={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Kt={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Je({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Yt)},Gt=function(e){return Je({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Yt)},qt=function(e){var t=e.children,n=e.innerProps;return Le("div",n,t)};var Zt={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return Le("div",l({css:o("clearIndicator",e),className:r({indicator:!0,"clear-indicator":!0},n)},i),t||Le(Ft,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,i=e.isDisabled,a=e.isFocused,s=e.innerRef,c=e.innerProps,u=e.menuIsOpen;return Le("div",l({ref:s,css:r("control",e),className:n({control:!0,"control--is-disabled":i,"control--is-focused":a,"control--menu-is-open":u},o)},c),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return Le("div",l({css:o("dropdownIndicator",e),className:r({indicator:!0,"dropdown-indicator":!0},n)},i),t||Le($t,null))},DownChevron:$t,CrossIcon:Ft,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.Heading,a=e.headingProps,s=e.innerProps,c=e.label,u=e.theme,d=e.selectProps;return Le("div",l({css:o("group",e),className:r({group:!0},n)},s),Le(i,l({},a,{selectProps:d,theme:u,getStyles:o,cx:r}),c),Le("div",null,t))},GroupHeading:function(e){var t=e.getStyles,n=e.cx,r=e.className,o=st(e);o.data;var i=_e(o,Ut);return Le("div",l({css:t("groupHeading",e),className:n({"group-heading":!0},r)},i))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.innerProps,i=e.getStyles;return Le("div",l({css:i("indicatorsContainer",e),className:r({indicators:!0},n)},o),t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return Le("span",l({},o,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.value,i=st(e),a=i.innerRef,s=i.isDisabled,c=i.isHidden,u=i.inputClassName,d=_e(i,Xt);return Le("div",{className:n({"input-container":!0},t),css:r("input",e),"data-value":o||""},Le("input",l({className:n({input:!0},u),ref:a,style:Gt(c),disabled:s},d)))},LoadingIndicator:Wt,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerRef,a=e.innerProps;return Le("div",l({css:o("menu",e),className:r({menu:!0},n),ref:i},a),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.innerRef,s=e.isMulti;return Le("div",l({css:o("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":s},n),ref:a},i),t)},MenuPortal:Tt,LoadingMessage:It,NoOptionsMessage:Ot,MultiValue:function(e){var t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,l=e.getStyles,a=e.innerProps,s=e.isDisabled,c=e.removeProps,u=e.selectProps,d=r.Container,h=r.Label,f=r.Remove;return Le($e,null,(function(r){var p=r.css,g=r.cx;return Le(d,{data:i,innerProps:Je({className:g(p(l("multiValue",e)),o({"multi-value":!0,"multi-value--is-disabled":s},n))},a),selectProps:u},Le(h,{data:i,innerProps:{className:g(p(l("multiValueLabel",e)),o({"multi-value__label":!0},n))},selectProps:u},t),Le(f,{data:i,innerProps:Je({className:g(p(l("multiValueRemove",e)),o({"multi-value__remove":!0},n)),"aria-label":"Remove ".concat(t||"option")},c),selectProps:u}))}))},MultiValueContainer:qt,MultiValueLabel:qt,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Le("div",l({role:"button"},n),t||Le(Ft,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.isFocused,s=e.isSelected,c=e.innerRef,u=e.innerProps;return Le("div",l({css:o("option",e),className:r({option:!0,"option--is-disabled":i,"option--is-focused":a,"option--is-selected":s},n),ref:c,"aria-disabled":i},u),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return Le("div",l({css:o("placeholder",e),className:r({placeholder:!0},n)},i),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.isDisabled,s=e.isRtl;return Le("div",l({css:o("container",e),className:r({"--is-disabled":a,"--is-rtl":s},n)},i),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.innerProps;return Le("div",l({css:o("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":i},n)},a),t)},ValueContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.innerProps,i=e.isMulti,a=e.getStyles,s=e.hasValue;return Le("div",l({css:a("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":i,"value-container--has-value":s},n)},o),t)}},Qt=function(e){return Je(Je({},Zt),e.components)},Jt=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function en(e){return function(e){if(Array.isArray(e))return Ne(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ve(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tn=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function nn(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||tn(r)&&tn(o)))return!1;var r,o;return!0}const rn=function(e,t){var n;void 0===t&&(t=nn);var r,o=[],i=!1;return function(){for(var l=[],a=0;a<arguments.length;a++)l[a]=arguments[a];return i&&n===this&&t(l,o)||(r=e.apply(this,l),i=!0,n=this,o=l),r}};for(var on={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"},ln=function(e){return Le("span",l({css:on},e))},an={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.isDisabled,o=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(r?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return"".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,l=e.selectValue,a=e.isDisabled,s=e.isSelected,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&l)return"value ".concat(i," focused, ").concat(c(l,n),".");if("menu"===t){var u=a?" disabled":"",d="".concat(s?"selected":"focused").concat(u);return"option ".concat(i," ").concat(d,", ").concat(c(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},sn=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,l=e.isFocused,a=e.selectValue,s=e.selectProps,c=e.id,u=s.ariaLiveMessages,d=s.getOptionLabel,h=s.inputValue,f=s.isMulti,p=s.isOptionDisabled,g=s.isSearchable,m=s.menuIsOpen,v=s.options,b=s.screenReaderStatus,y=s.tabSelectsValue,w=s["aria-label"],x=s["aria-live"],k=(0,i.useMemo)((function(){return Je(Je({},an),u||{})}),[u]),C=(0,i.useMemo)((function(){var e,n="";if(t&&k.onChange){var r=t.option,o=t.options,i=t.removedValue,l=t.removedValues,s=t.value,c=i||r||(e=s,Array.isArray(e)?null:e),u=c?d(c):"",h=o||l||void 0,f=h?h.map(d):[],g=Je({isDisabled:c&&p(c,a),label:u,labels:f},t);n=k.onChange(g)}return n}),[t,k,p,a,d]),S=(0,i.useMemo)((function(){var e="",t=n||r,o=!!(n&&a&&a.includes(n));if(t&&k.onFocus){var i={focused:t,label:d(t),isDisabled:p(t,a),isSelected:o,options:v,context:t===n?"menu":"value",selectValue:a};e=k.onFocus(i)}return e}),[n,r,d,p,k,v,a]),M=(0,i.useMemo)((function(){var e="";if(m&&v.length&&k.onFilter){var t=b({count:o.length});e=k.onFilter({inputValue:h,resultsMessage:t})}return e}),[o,h,m,k,v,b]),E=(0,i.useMemo)((function(){var e="";if(k.guidance){var t=r?"value":m?"menu":"input";e=k.guidance({"aria-label":w,context:t,isDisabled:n&&p(n,a),isMulti:f,isSearchable:g,tabSelectsValue:y})}return e}),[w,n,r,f,p,g,m,k,a,y]),R="".concat(S," ").concat(M," ").concat(E),O=Le(i.Fragment,null,Le("span",{id:"aria-selection"},C),Le("span",{id:"aria-context"},R)),I="initial-input-focus"===(null===t||void 0===t?void 0:t.action);return Le(i.Fragment,null,Le(ln,{id:c},I&&O),Le(ln,{"aria-live":x,"aria-atomic":"false","aria-relevant":"additions text"},l&&!I&&O))},cn=[{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"}],un=new RegExp("["+cn.map((function(e){return e.letters})).join("")+"]","g"),dn={},hn=0;hn<cn.length;hn++)for(var fn=cn[hn],pn=0;pn<fn.letters.length;pn++)dn[fn.letters[pn]]=fn.base;var gn=function(e){return e.replace(un,(function(e){return dn[e]}))},mn=rn(gn),vn=function(e){return e.replace(/^\s+|\s+$/g,"")},bn=function(e){return"".concat(e.label," ").concat(e.value)},yn=["innerRef"];function wn(e){var t=e.innerRef,n=_e(e,yn),r=wt(n,"onExited","in","enter","exit","appear");return Le("input",l({ref:t},r,{css:Ae({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 xn=function(e){e.preventDefault(),e.stopPropagation()};var kn=["boxSizing","height","overflow","paddingRight","position"],Cn={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Sn(e){e.preventDefault()}function Mn(e){e.stopPropagation()}function En(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Rn(){return"ontouchstart"in window||navigator.maxTouchPoints}var On=!("undefined"===typeof window||!window.document||!window.document.createElement),In=0,Pn={capture:!1,passive:!1};var Tn=function(){return document.activeElement&&document.activeElement.blur()},Hn={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Dn(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,l=e.onTopLeave,a=(0,i.useRef)(!1),s=(0,i.useRef)(!1),c=(0,i.useRef)(0),u=(0,i.useRef)(null),d=(0,i.useCallback)((function(e,t){if(null!==u.current){var i=u.current,c=i.scrollTop,d=i.scrollHeight,h=i.clientHeight,f=u.current,p=t>0,g=d-h-c,m=!1;g>t&&a.current&&(r&&r(e),a.current=!1),p&&s.current&&(l&&l(e),s.current=!1),p&&t>g?(n&&!a.current&&n(e),f.scrollTop=d,m=!0,a.current=!0):!p&&-t>c&&(o&&!s.current&&o(e),f.scrollTop=0,m=!0,s.current=!0),m&&xn(e)}}),[n,r,o,l]),h=(0,i.useCallback)((function(e){d(e,e.deltaY)}),[d]),f=(0,i.useCallback)((function(e){c.current=e.changedTouches[0].clientY}),[]),p=(0,i.useCallback)((function(e){var t=c.current-e.changedTouches[0].clientY;d(e,t)}),[d]),g=(0,i.useCallback)((function(e){if(e){var t=!!vt&&{passive:!1};e.addEventListener("wheel",h,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",p,t)}}),[p,f,h]),m=(0,i.useCallback)((function(e){e&&(e.removeEventListener("wheel",h,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",p,!1))}),[p,f,h]);return(0,i.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===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),l=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=(0,i.useRef)({}),l=(0,i.useRef)(null),a=(0,i.useCallback)((function(e){if(On){var t=document.body,n=t&&t.style;if(r&&kn.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&In<1){var i=parseInt(o.current.paddingRight,10)||0,l=document.body?document.body.clientWidth:0,a=window.innerWidth-l+i||0;Object.keys(Cn).forEach((function(e){var t=Cn[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(a,"px"))}t&&Rn()&&(t.addEventListener("touchmove",Sn,Pn),e&&(e.addEventListener("touchstart",En,Pn),e.addEventListener("touchmove",Mn,Pn))),In+=1}}),[r]),s=(0,i.useCallback)((function(e){if(On){var t=document.body,n=t&&t.style;In=Math.max(In-1,0),r&&In<1&&kn.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&Rn()&&(t.removeEventListener("touchmove",Sn,Pn),e&&(e.removeEventListener("touchstart",En,Pn),e.removeEventListener("touchmove",Mn,Pn)))}}),[r]);return(0,i.useEffect)((function(){if(t){var e=l.current;return a(e),function(){s(e)}}}),[t,a,s]),function(e){l.current=e}}({isEnabled:n});return Le(i.Fragment,null,n&&Le("div",{onClick:Tn,css:Hn}),t((function(e){o(e),l(e)})))}var Ln={clearIndicator:Vt,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){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,l=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):void 0,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:Nt,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.value,r=e.theme,o=r.spacing,i=r.colors;return Je({margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,visibility:t?"hidden":"visible",color:i.neutral80,transform:n?"translateZ(0)":""},Kt)},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Rt,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,i=r.spacing,l=r.colors;return Ge(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),Ge(t,"backgroundColor",l.neutral0),Ge(t,"borderRadius",o),Ge(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Ge(t,"marginBottom",i.menuGutter),Ge(t,"marginTop",i.menuGutter),Ge(t,"position","absolute"),Ge(t,"width","100%"),Ge(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},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){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o||void 0===o?"ellipsis":void 0,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused?o.dangerLight:void 0,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Et,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,l=o.colors;return{label:"option",backgroundColor:r?l.primary:n?l.primary25:"transparent",color:t?l.neutral20:r?l.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:t?void 0:r?l.primary:l.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,gridArea:"1 / 1 / 2 / 3",marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,gridArea:"1 / 1 / 2 / 3",marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},valueContainer:function(e){var t=e.theme.spacing,n=e.isMulti,r=e.hasValue,o=e.selectProps.controlShouldRenderValue;return{alignItems:"center",display:n&&r&&o?"flex":"grid",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var An,zn={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}},Fn={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ft(),captureMenuScroll:!ft(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=Je({ignoreCase:!0,ignoreAccents:!0,stringify:bn,trim:!0,matchFrom:"any"},An),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,l=n.trim,a=n.matchFrom,s=l?vn(t):t,c=l?vn(i(e)):i(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=mn(s),c=gn(c)),"start"===a?c.substr(0,s.length)===s:c.indexOf(s)>-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};function $n(e,t,n,r){return{type:"option",data:t,isDisabled:Wn(e,t,n),isSelected:Un(e,t,n),label:Bn(e,t),value:jn(e,t),index:r}}function _n(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return $n(e,n,t,r)})).filter((function(t){return Vn(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=$n(e,n,t,r);return Vn(e,i)?i:void 0})).filter(bt)}function Nn(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,en(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Vn(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,l=t.label,a=t.value;return(!Yn(e)||!i)&&Xn(e,{label:l,value:a,data:o},r)}var Bn=function(e,t){return e.getOptionLabel(t)},jn=function(e,t){return e.getOptionValue(t)};function Wn(e,t,n){return"function"===typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Un(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"===typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=jn(e,t);return n.some((function(t){return jn(e,t)===r}))}function Xn(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Yn=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Kn=1,Gn=function(e){Ke(n,e);var t=nt(n);function n(e){var r;return We(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,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,l=o.isMulti,a=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:a}),i&&(r.setState({inputIsHiddenAfterUpdate:!l}),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,l=r.state.selectValue,a=o&&r.isOptionSelected(e,l),s=r.isOptionDisabled(e,l);if(a){var c=r.getOptionValue(e);r.setValue(l.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(en(l),[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})),l=yt(t,i,i[0]||null);r.onChange(l,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(yt(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=yt(e,o,o[0]||null);r.onChange(i,{action:"pop-value",removedValue:n})},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 lt.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return Bn(r.props,e)},r.getOptionValue=function(e){return jn(r.props,e)},r.getStyles=function(e,t){var n=Ln[e](t);n.boxSizing="border-box";var o=r.props.styles[e];return o?o(n,t):n},r.getElementId=function(e){return"".concat(r.instancePrefix,"-").concat(e)},r.getComponents=function(){return Qt(r.props)},r.buildCategorizedOptions=function(){return _n(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return Nn(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:Je({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&&ct(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){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){return Yn(r.props)},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,l=t.inputValue,a=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||l)return;r.focusValue("previous");break;case"ArrowRight":if(!n||l)return;r.focusValue("next");break;case"Delete":case"Backspace":if(l)return;if(g)r.removeValue(g);else{if(!o)return;n?r.popValue():a&&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:l}),r.onMenuClose()):a&&i&&r.clearValue();break;case" ":if(l)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.instancePrefix="react-select-"+(r.props.instanceId||++Kn),r.state.selectValue=at(e.value),r}return Xe(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()}},{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),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(!function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?dt(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&dt(e,Math.max(t.offsetTop-o,0))}(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(),l="first"===e?0:i.length-1;if(!this.props.isMulti){var a=i.indexOf(r[0]);a>-1&&(l=a)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[l]},(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,l=-1;if(n.length){switch(e){case"previous":l=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(l=o+1)}this.setState({inputIsHidden:-1!==l,focusedValue:n[l]})}}}},{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})}}},{key:"getTheme",value:function(){return this.props.theme?"function"===typeof this.props.theme?this.props.theme(zn):Je(Je({},zn),this.props.theme):zn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,o=this.selectOption,i=this.setValue,l=this.props,a=l.isMulti,s=l.isRtl,c=l.options;return{clearValue:e,cx:t,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:a,isRtl:s,options:c,selectOption:o,selectProps:l,setValue:i,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 Wn(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Un(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Xn(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,r=e.inputId,o=e.inputValue,a=e.tabIndex,s=e.form,c=e.menuIsOpen,u=this.getComponents().Input,d=this.state,h=d.inputIsHidden,f=d.ariaSelection,p=this.commonProps,g=r||this.getElementId("input"),m=Je(Je(Je({"aria-autocomplete":"list","aria-expanded":c,"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"],role:"combobox"},c&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null===f||void 0===f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?i.createElement(u,l({},p,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:g,innerRef:this.getInputRef,isDisabled:t,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:o},m)):i.createElement(wn,l({id:g,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ot,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:s,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,s=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,b=v.selectValue,y=v.focusedValue,w=v.isFocused;if(!this.hasValue()||!h)return g?null:i.createElement(c,l({},u,{key:"placeholder",isDisabled:f,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return b.map((function(t,s){var c=t===y,d="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return i.createElement(n,l({},u,{components:{Container:r,Label:o,Remove:a},isFocused:c,isDisabled:f,key:d,index:s,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=b[0];return i.createElement(s,l({},u,{data:x,isDisabled:f}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return i.createElement(e,l({},t,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!e||!o)return null;return i.createElement(e,l({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return i.createElement(n,l({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return i.createElement(e,l({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,s=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,b=p.loadingMessage,y=p.minMenuHeight,w=p.maxMenuHeight,x=p.menuIsOpen,k=p.menuPlacement,C=p.menuPosition,S=p.menuPortalTarget,M=p.menuShouldBlockScroll,E=p.menuShouldScrollIntoView,R=p.noOptionsMessage,O=p.onMenuScrollToTop,I=p.onMenuScrollToBottom;if(!x)return null;var P,T=function(t,n){var r=t.type,o=t.data,a=t.isDisabled,s=t.isSelected,c=t.label,u=t.value,p=f===o,g=a?void 0:function(){return e.onOptionHover(o)},m=a?void 0:function(){return e.selectOption(o)},v="".concat(e.getElementId("option"),"-").concat(n),b={id:v,onClick:m,onMouseMove:g,onMouseOver:g,tabIndex:-1};return i.createElement(d,l({},h,{innerProps:b,data:o,isDisabled:a,isSelected:s,key:v,label:c,type:r,value:u,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())P=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,a=t.options,s=t.index,c="".concat(e.getElementId("group"),"-").concat(s),u="".concat(c,"-heading");return i.createElement(n,l({},h,{key:c,data:o,options:a,Heading:r,headingProps:{id:u,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return T(e,"".concat(s,"-").concat(e.index))})))}if("option"===t.type)return T(t,"".concat(t.index))}));else if(v){var H=b({inputValue:m});if(null===H)return null;P=i.createElement(c,h,H)}else{var D=R({inputValue:m});if(null===D)return null;P=i.createElement(u,h,D)}var L={minMenuHeight:y,maxMenuHeight:w,menuPlacement:k,menuPosition:C,menuShouldScrollIntoView:E},A=i.createElement(St,l({},h,L),(function(t){var n=t.ref,r=t.placerProps,s=r.placement,c=r.maxHeight;return i.createElement(o,l({},h,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:v,placement:s}),i.createElement(Dn,{captureEnabled:g,onTopArrive:O,onBottomArrive:I,lockEnabled:M},(function(t){return i.createElement(a,l({},h,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:v,maxHeight:c,focusedOption:f}),P)})))}));return S||"fixed"===C?i.createElement(s,l({},h,{appendTo:S,controlElement:this.controlRef,menuPlacement:k,menuPosition:C}),A):A}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,l=t.name,a=this.state.selectValue;if(l&&!r){if(o){if(n){var s=a.map((function(t){return e.getOptionValue(t)})).join(n);return i.createElement("input",{name:l,type:"hidden",value:s})}var c=a.length>0?a.map((function(t,n){return i.createElement("input",{key:"i-".concat(n),name:l,type:"hidden",value:e.getOptionValue(t)})})):i.createElement("input",{name:l,type:"hidden"});return i.createElement("div",null,c)}var u=a[0]?this.getOptionValue(a[0]):"";return i.createElement("input",{name:l,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,a=t.isFocused,s=t.selectValue,c=this.getFocusableOptions();return i.createElement(sn,l({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:a,selectValue:s,focusableOptions:c}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,s=a.className,c=a.id,u=a.isDisabled,d=a.menuIsOpen,h=this.state.isFocused,f=this.commonProps=this.getCommonProps();return i.createElement(r,l({},f,{className:s,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:h}),this.renderLiveRegion(),i.createElement(t,l({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:h,menuIsOpen:d}),i.createElement(o,l({},f,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),i.createElement(n,l({},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,l=t.isFocused,a=t.prevWasFocused,s=e.options,c=e.value,u=e.menuIsOpen,d=e.inputValue,h=e.isMulti,f=at(c),p={};if(n&&(c!==n.value||s!==n.options||u!==n.menuIsOpen||d!==n.inputValue)){var g=u?function(e,t){return Nn(_n(e,t))}(e,f):[],m=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,f):null,v=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,g);p={selectValue:f,focusedOption:v,focusedValue:m,clearFocusValueOnUpdate:!1}}var b=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},y=i,w=l&&a;return l&&!w&&(y={value:yt(h,f,f[0]||null),options:f,action:"initial-input-focus"},w=!a),"initial-input-focus"===(null===i||void 0===i?void 0:i.action)&&(y=null),Je(Je(Je({},p),b),{},{prevProps:e,ariaSelection:y,prevWasFocused:w})}}]),n}(i.Component);Gn.defaultProps=Fn;var qn=(0,i.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,l=e.defaultValue,a=void 0===l?null:l,s=e.inputValue,c=e.menuIsOpen,u=e.onChange,d=e.onInputChange,h=e.onMenuClose,f=e.onMenuOpen,p=e.value,g=_e(e,Jt),m=Be((0,i.useState)(void 0!==s?s:n),2),v=m[0],b=m[1],y=Be((0,i.useState)(void 0!==c?c:o),2),w=y[0],x=y[1],k=Be((0,i.useState)(void 0!==p?p:a),2),C=k[0],S=k[1],M=(0,i.useCallback)((function(e,t){"function"===typeof u&&u(e,t),S(e)}),[u]),E=(0,i.useCallback)((function(e,t){var n;"function"===typeof d&&(n=d(e,t)),b(void 0!==n?n:e)}),[d]),R=(0,i.useCallback)((function(){"function"===typeof f&&f(),x(!0)}),[f]),O=(0,i.useCallback)((function(){"function"===typeof h&&h(),x(!1)}),[h]),I=void 0!==s?s:v,P=void 0!==c?c:w,T=void 0!==p?p:C;return Je(Je({},g),{},{inputValue:I,menuIsOpen:P,onChange:M,onInputChange:E,onMenuClose:O,onMenuOpen:R,value:T})}(e);return i.createElement(Gn,l({ref:t},n))}));i.Component;const Zn=qn;var Qn=[[50,5],[61.23,39.55],[97.55,39.55],[68.16,60.9],[79.39,95.45],[50,74.1],[20.61,95.45],[31.84,60.9],[2.45,39.55],[38.77,39.55]];function Jn(e,t,n){let r=!1;for(const o of Qn){const i=(o[0]-50)*(n/100)+t[0],l=(o[1]-50)*(n/100)+t[1];r?e.lineTo(i,l):(e.moveTo(i,l),r=!0)}e.closePath()}var er=()=>(0,i.createElement)("svg",{width:"100",height:"100",viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.createElement)("path",{d:"M47.1468 13.7811C48.0449 11.0172 51.9551 11.0172 52.8532 13.7812L60.5522 37.4762C60.9538 38.7123 62.1056 39.5491 63.4053 39.5491H88.3198C91.226 39.5491 92.4343 43.268 90.0831 44.9762L69.9269 59.6205C68.8755 60.3845 68.4355 61.7386 68.8371 62.9746L76.5361 86.6697C77.4342 89.4336 74.2707 91.732 71.9196 90.0238L51.7634 75.3794C50.7119 74.6155 49.2881 74.6155 48.2366 75.3795L28.0804 90.0238C25.7293 91.732 22.5659 89.4336 23.4639 86.6697L31.1629 62.9746C31.5645 61.7386 31.1245 60.3845 30.0731 59.6205L9.91686 44.9762C7.56572 43.268 8.77405 39.5491 11.6802 39.5491H36.5947C37.8944 39.5491 39.0462 38.7123 39.4478 37.4762L47.1468 13.7811Z",fill:"currentColor"})),tr=(0,r.d)("div")({name:"EditorWrap",class:"e17a8fyf"}),nr={kind:o.p6.Custom,isMatch:e=>"star-cell"===e.data.kind,needsHover:!0,draw:(e,t)=>{const{ctx:n,theme:r,rect:o,hoverAmount:i}=e,{rating:l}=t.data,a=r.cellHorizontalPadding;let s=o.x+a;const c=Math.min(5,Math.ceil(l));s+=8,n.beginPath();for(let u=0;u<c;u++)Jn(n,[s,o.y+o.height/2],16),s+=18;return n.fillStyle=r.textDark,n.globalAlpha=.6+.4*i,n.fill(),n.globalAlpha=1,!0},provideEditor:()=>e=>(0,i.createElement)(tr,null,[0,1,2,3,4].map((t=>(0,i.createElement)("div",{key:t,className:e.value.data.rating<t+1?"inactive":"active",onClick:()=>{e.onChange({...e.value,data:{...e.value.data,rating:t+1}})}},(0,i.createElement)(er,null))))),onPaste:(e,t)=>{const n=Number.parseInt(e);return{...t,rating:Number.isNaN(n)?0:n}}},rr=nr,or={kind:o.p6.Custom,isMatch:e=>"sparkline-cell"===e.data.kind,needsHover:!0,needsHoverPosition:!0,draw:(e,t)=>{var n;const{ctx:r,theme:i,rect:l,hoverAmount:a,hoverX:s}=e;let{values:c,yAxis:u,color:d,graphKind:h="line",displayValues:f}=t.data;const[p,g]=u;if(0===c.length)return!0;c=c.map((e=>Math.min(1,Math.max(0,(e-p)/(g-p)))));const m=i.cellHorizontalPadding,v=m+l.x,b=l.y+3,y=l.height-6,w=l.width-2*m,x=g<=0?b:p>=0?b+y:b+y*(g/(g-p));if(p<=0&&g>=0&&(r.beginPath(),r.moveTo(v,x),r.lineTo(v+w,x),r.globalAlpha=.4,r.lineWidth=1,r.strokeStyle=i.textLight,r.stroke(),r.globalAlpha=1),"bar"===h){r.beginPath();const e=2,o=(w-(c.length-1)*e)/c.length;let l=v;for(const t of c){const n=b+y-t*y;r.moveTo(l,x),r.lineTo(l+o,x),r.lineTo(l+o,n),r.lineTo(l,n),l+=o+e}r.fillStyle=null!=(n=t.data.color)?n:i.accentColor,r.fill()}else{1===c.length&&(c=[c[0],c[0]]),r.beginPath();const e=(l.width-16)/(c.length-1),t=c.map(((t,n)=>({x:v+e*n,y:b+y-t*y})));let n;for(r.moveTo(t[0].x,t[0].y),n=1;n<t.length-2;n++){const e=(t[n].x+t[n+1].x)/2,o=(t[n].y+t[n+1].y)/2;r.quadraticCurveTo(t[n].x,t[n].y,e,o)}r.quadraticCurveTo(t[n].x,t[n].y,t[n+1].x,t[n+1].y),r.strokeStyle=null!=d?d:i.accentColor,r.lineWidth=1+.5*a,r.stroke(),r.lineTo(l.x+l.width-m,x),r.lineTo(l.x+m,x),r.closePath(),r.globalAlpha=.2+.2*a;const u=r.createLinearGradient(0,b,0,b+1.4*y);u.addColorStop(0,null!=d?d:i.accentColor);const[p,g,w]=(0,o.dF)(null!=d?d:i.accentColor);if(u.addColorStop(1,`rgba(${p}, ${g}, ${w}, 0)`),r.fillStyle=u,r.fill(),r.globalAlpha=1,void 0!==s&&"line"===h&&void 0!==f){r.beginPath();const t=Math.min(c.length-1,Math.max(0,Math.round((s-m)/e)));r.moveTo(v+t*e,l.y),r.lineTo(v+t*e,l.y+l.height),r.lineWidth=1,r.strokeStyle=i.textLight,r.stroke(),r.save(),r.font=`8px ${i.fontFamily}`,r.fillStyle=i.textMedium,r.textBaseline="top",r.fillText(f[t],v,l.y+i.cellVerticalPadding),r.restore()}}return!0},provideEditor:()=>{},onPaste:(e,t)=>t},ir=or;function lr(e,t,n,r,o,i){0!==i?("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)},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)):e.rect(t,n,r,o)}var ar=20,sr=(0,r.d)("div")({name:"EditorWrap",class:"e43amum",vars:{"e43amum-0":[e=>e.tagHeight/2,"px"],"e43amum-1":[e=>e.tagHeight,"px"],"e43amum-2":[e=>e.innerPad,"px"]}}),cr={kind:o.p6.Custom,isMatch:e=>"tags-cell"===e.data.kind,draw:(e,t)=>{var n,r;const{ctx:i,theme:l,rect:a}=e,{possibleTags:s,tags:c}=t.data,u={x:a.x+l.cellHorizontalPadding,y:a.y+l.cellVerticalPadding,width:a.width-2*l.cellHorizontalPadding,height:a.height-2*l.cellVerticalPadding},d=Math.max(1,Math.floor(u.height/26));let h=u.x,f=1,p=u.y+(u.height-d*ar-6*(d-1))/2;for(const g of c){const e=null!=(r=null==(n=s.find((e=>e.tag===g)))?void 0:n.color)?r:l.bgBubble;i.font=`12px ${l.fontFamily}`;const t=(0,o.P7)(g,i).width+12,a=10;if(h!==u.x&&h+t>u.x+u.width&&f<d&&(f++,p+=26,h=u.x),i.fillStyle=e,i.beginPath(),lr(i,h,p,t,ar,10),i.fill(),i.fillStyle=l.textDark,i.fillText(g,h+6,p+a+(0,o.aX)(i,`12px ${l.fontFamily}`)),h+=t+8,h>u.x+u.width&&f>=d)break}return!0},provideEditor:()=>e=>{const{onChange:t,value:n}=e,{possibleTags:r,tags:o,readonly:l=!1}=n.data;return(0,i.createElement)(sr,{tagHeight:ar,innerPad:6,className:l?"readonly":""},r.map((r=>{const a=-1!==o.indexOf(r.tag);return(0,i.createElement)("label",{key:r.tag},!l&&(0,i.createElement)("input",{className:"gdg-input",type:"checkbox",checked:a,onChange:()=>{const i=a?o.filter((e=>e!==r.tag)):[...o,r.tag];t({...e.value,data:{...n.data,tags:i}})}}),(0,i.createElement)("div",{className:"pill "+(a?"selected":"unselected"),style:{backgroundColor:a?r.color:void 0}},r.tag))})))},onPaste:(e,t)=>({...t,tags:t.possibleTags.map((e=>e.tag)).filter((t=>e.split(",").map((e=>e.trim())).includes(t)))})},ur={kind:o.p6.Custom,isMatch:e=>"user-profile-cell"===e.data.kind,draw:(e,t)=>{const{ctx:n,rect:r,theme:i,imageLoader:l,col:a,row:s}=e,{image:c,name:u,initial:d,tint:h}=t.data,f=i.cellHorizontalPadding,p=Math.min(12,r.height/2-i.cellVerticalPadding),g=r.x+f,m=l.loadOrGetImage(c,a,s);n.save(),n.beginPath(),n.arc(g+p,r.y+r.height/2,p,0,2*Math.PI),n.globalAlpha=.2,n.fillStyle=h,n.fill(),n.globalAlpha=1,n.font=`600 16px ${i.fontFamily}`;const v=(0,o.P7)(d[0],n);return n.fillText(d[0],g+p-v.width/2,r.y+r.height/2+(0,o.aX)(n,`600 16px ${i.fontFamily}`)),void 0!==m&&(n.save(),n.beginPath(),n.arc(g+p,r.y+r.height/2,p,0,2*Math.PI),n.clip(),n.drawImage(m,g,r.y+r.height/2-p,2*p,2*p),n.restore()),void 0!==u&&(n.font=`${i.baseFontStyle} ${i.fontFamily}`,n.fillStyle=i.textDark,n.fillText(u,g+2*p+f,r.y+r.height/2+(0,o.aX)(n,i))),n.restore(),!0},provideEditor:()=>e=>{var t;const{isHighlighted:n,onChange:r,value:l}=e;return(0,i.createElement)(o.t5,{highlight:n,autoFocus:!0,value:null!=(t=l.data.name)?t:"",onChange:e=>r({...l,data:{...l.data,name:e.target.value}})})},onPaste:(e,t)=>({...t,name:e})},dr=e=>{const{Menu:t}=Zt,{children:n,...r}=e;return(0,i.createElement)(t,{...r},n)},hr=(0,r.d)("div")({name:"Wrap",class:"w13j932a"}),fr=(0,r.d)("div")({name:"PortalWrap",class:"p19663q2"}),pr=e=>{const{value:t,onFinishedEditing:n,initialValue:r}=e,{allowedValues:l,value:a}=t.data,[s,c]=(0,i.useState)(a),[u,d]=(0,i.useState)(null!=r?r:""),h=(0,o.Fg)(),f=(0,i.useMemo)((()=>l.map((e=>({value:e,label:e})))),[l]);return(0,i.createElement)(hr,null,(0,i.createElement)(Zn,{className:"glide-select",inputValue:u,onInputChange:d,menuPlacement:"auto",value:f.find((e=>e.value===s)),styles:{control:e=>({...e,border:0,boxShadow:"none"})},theme:e=>({...e,colors:{...e.colors,neutral0:h.bgCell,neutral5:h.bgCell,neutral10:h.bgCell,neutral20:h.bgCellMedium,neutral30:h.bgCellMedium,neutral40:h.bgCellMedium,neutral50:h.textLight,neutral60:h.textMedium,neutral70:h.textMedium,neutral80:h.textDark,neutral90:h.textDark,neutral100:h.textDark,primary:h.accentColor,primary75:h.accentColor,primary50:h.accentColor,primary25:h.accentLight}}),menuPortalTarget:document.getElementById("portal"),autoFocus:!0,openMenuOnFocus:!0,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Menu:e=>(0,i.createElement)(fr,null,(0,i.createElement)(dr,{className:"click-outside-ignore",...e}))},options:f,onChange:async e=>{null!==e&&(c(e.value),await new Promise((e=>window.requestAnimationFrame(e))),n({...t,data:{...t.data,value:e.value}}))}}))},gr={kind:o.p6.Custom,isMatch:e=>"dropdown-cell"===e.data.kind,draw:(e,t)=>{const{ctx:n,theme:r,rect:i}=e,{value:l}=t.data;return n.fillStyle=r.textDark,n.fillText(l,i.x+r.cellHorizontalPadding,i.y+i.height/2+(0,o.aX)(n,r)),!0},provideEditor:()=>({editor:pr,disablePadding:!0,deletedValue:e=>({...e,copyData:"",data:{...e.data,value:""}})}),onPaste:(e,t)=>({...t,value:t.allowedValues.includes(e)?e:t.value})},mr=(0,i.lazy)((async()=>await n.e(2961).then(n.bind(n,82961)))),vr={kind:o.p6.Custom,isMatch:e=>"article-cell"===e.data.kind,draw:(e,t)=>{const{ctx:n,theme:r,rect:i}=e,{markdown:l}=t.data;let a=l;a.includes("\n")&&(a=a.split(/\r?\n/)[0]);const s=i.width/4;return a.length>s&&(a=a.slice(0,s)),n.fillStyle=r.textDark,n.fillText(a,i.x+r.cellHorizontalPadding,i.y+i.height/2+(0,o.aX)(n,r)),!0},provideEditor:()=>({editor:e=>(0,i.createElement)(i.Suspense,{fallback:null},(0,i.createElement)(mr,{...e})),styleOverride:{position:"fixed",left:"12.5vw",top:"12.5vh",width:"75vw",borderRadius:"9px",maxWidth:"unset",maxHeight:"unset"},disablePadding:!0}),onPaste:(e,t)=>({...t,markdown:e})},br={marginRight:8},yr={display:"flex",alignItems:"center",flexGrow:1},wr={kind:o.p6.Custom,isMatch:e=>"range-cell"===e.data.kind,draw:(e,t)=>{const{ctx:n,theme:r,rect:i}=e,{min:l,max:a,value:s,label:c,measureLabel:u}=t.data,d=i.x+r.cellHorizontalPadding,h=i.y+i.height/2,f=(s-l)/(a-l);n.save();let p=0;void 0!==c&&(n.font=`12px ${r.fontFamily}`,p=(0,o.P7)(null!=u?u:c,n,`12px ${r.fontFamily}`).width+r.cellHorizontalPadding);const g=i.width-2*r.cellHorizontalPadding-p;if(g>=6){const e=n.createLinearGradient(d,h,d+g,h);e.addColorStop(0,r.accentColor),e.addColorStop(f,r.accentColor),e.addColorStop(f,r.bgBubble),e.addColorStop(1,r.bgBubble),n.beginPath(),n.fillStyle=e,lr(n,d,h-3,g,6,3),n.fill(),n.beginPath(),lr(n,d+.5,h-3+.5,g-1,5,2.5),n.strokeStyle=r.accentLight,n.lineWidth=1,n.stroke()}return void 0!==c&&(n.textAlign="right",n.fillStyle=r.textDark,n.fillText(c,i.x+i.width-r.cellHorizontalPadding,h+(0,o.aX)(n,`12px ${r.fontFamily}`))),n.restore(),!0},provideEditor:()=>e=>{const{data:t}=e.value,n=t.value.toString(),r=t.min.toString(),o=t.max.toString(),l=t.step.toString();return(0,i.createElement)("label",{style:yr},(0,i.createElement)("input",{style:br,type:"range",value:n,min:r,max:o,step:l,onChange:n=>{e.onChange({...e.value,data:{...t,value:Number(n.target.value)}})}}),n)},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}}},xr={kind:o.p6.Custom,isMatch:e=>"spinner-cell"===e.data.kind,draw:e=>{const{ctx:t,theme:n,rect:r,requestAnimationFrame:o}=e,i=window.performance.now()%1e3/1e3,l=r.x+r.width/2,a=r.y+r.height/2;return t.arc(l,a,Math.min(12,r.height/6),2*Math.PI*i,2*Math.PI*i+1.5*Math.PI),t.strokeStyle=n.textMedium,t.lineWidth=1.5,t.stroke(),t.lineWidth=1,o(),!0},provideEditor:()=>{}},kr={kind:o.p6.Custom,isMatch:e=>"date-picker-cell"===e.data.kind,draw:(e,t)=>{const{displayDate:n}=t.data;return(0,o.uN)(e,n,t.contentAlign),!0},provideEditor:()=>e=>{const t=e.value.data,{format:n,date:r}=t;let o="";return void 0!==r&&(o=r.toISOString(),o="date"===n?o.split("T")[0]:o.substring(0,23)),(0,i.createElement)("input",{style:{minHeight:26,border:"none",outline:"none"},type:n,autoFocus:!0,value:o,onChange:t=>{var n;e.onChange({...e.value,data:{...e.value.data,date:null!=(n=t.target.valueAsDate)?n:void 0}})}})},onPaste:(e,t)=>{let n;try{n=new Date(e)}catch(r){}return{...t,date:Number.isNaN(n)?void 0:n}}};function Cr(e){if("click"!==e.cell.data.navigateOn!==e.ctrlKey)return;const t=document.createElement("canvas").getContext("2d",{alpha:!1});if(null===t)return;const{posX:n,bounds:r,cell:i,theme:l}=e,a=`${l.baseFontStyle} ${l.fontFamily}`;t.font=a;const{links:s}=i.data,c=l.cellHorizontalPadding;let u=r.x+c;const d=r.x+n;for(const[h,f]of s.entries()){const e=h<s.length-1,n=(0,o.P7)(f.title,t),r=e?(0,o.P7)(f.title+",",t,a):n;if(d>u&&d<u+n.width)return f;u+=r.width+4}}var Sr={kind:o.p6.Custom,needsHover:!0,needsHoverPosition:!0,isMatch:e=>"links-cell"===e.data.kind,onSelect:e=>{void 0!==Cr(e)&&e.preventDefault()},onClick:e=>{var t;const n=Cr(e);void 0!==n&&(null==(t=n.onClick)||t.call(n),e.preventDefault())},draw:(e,t)=>{const{ctx:n,rect:r,theme:i,hoverX:l=-100,highlighted:a}=e,{links:s,underlineOffset:c=5}=t.data,u=i.cellHorizontalPadding;let d=r.x+u;const h=r.x+l,f=`${i.baseFontStyle} ${i.fontFamily}`,p=(0,o.aX)(n,f),g=r.y+r.height/2+p;for(const[m,v]of s.entries()){const e=m<s.length-1,t=(0,o.P7)(v.title,n,f),r=e?(0,o.P7)(v.title+",",n,f):t;h>d&&h<d+t.width&&(n.moveTo(d,Math.floor(g+c)+.5),n.lineTo(d+t.width,Math.floor(g+c)+.5),n.strokeStyle=i.textDark,n.stroke(),n.fillStyle=a?(0,o.NH)(i.accentLight,i.bgCell):i.bgCell,n.fillText(e?v.title+",":v.title,d-1,g),n.fillText(e?v.title+",":v.title,d+1,g),n.fillText(e?v.title+",":v.title,d-2,g),n.fillText(e?v.title+",":v.title,d+2,g)),n.fillStyle=i.textDark,n.fillText(e?v.title+",":v.title,d,g),d+=r.width+4}return!0},provideEditor:()=>e=>{const{value:t,onChange:n}=e,{links:r,maxLinks:o=Number.MAX_SAFE_INTEGER}=t.data;return(0,i.createElement)(Mr,{onKeyDown:Er},r.map(((e,o)=>{var l;return(0,i.createElement)(Rr,{key:o,link:null!=(l=e.href)?l:"",title:e.title,focus:0===o,onDelete:r.length>1?()=>{const e=[...r];e.splice(o,1),n({...t,data:{...t.data,links:e}})}:void 0,onChange:(e,i)=>{const l=[...r];l[o]={href:e,title:i},n({...t,data:{...t.data,links:l}})}})})),(0,i.createElement)("button",{disabled:r.length>=o,className:"add-link",onClick:()=>{const e=[...r,{title:""}];n({...t,data:{...t.data,links:e}})}},"Add link"))},onPaste:(e,t)=>{const n=e.split(",");if(!t.links.some(((e,t)=>n[t]!==e.title)))return{...t,links:n.map((e=>({title:e})))}}},Mr=(0,r.d)("div")({name:"LinksCellEditorStyle",class:"lneeve5"});function Er(e){"Tab"===e.key&&e.stopPropagation()}var Rr=e=>{const{link:t,onChange:n,title:r,onDelete:o,focus:l}=e;return(0,i.createElement)("div",{className:"gdg-link-title-editor"},(0,i.createElement)("input",{className:"gdg-title-input",value:r,placeholder:"Title",autoFocus:l,onChange:e=>{n(t,e.target.value)}}),(0,i.createElement)("input",{className:"gdg-link-input",value:t,placeholder:"URL",onChange:e=>{n(e.target.value,r)}}),void 0!==o&&(0,i.createElement)("button",{onClick:o},(0,i.createElement)("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",id:"icon-import",xmlns:"http://www.w3.org/2000/svg"},(0,i.createElement)("path",{d:"M3 6L5 6L21 6",stroke:"currentColor",strokeWidth:"1px",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.createElement)("path",{d:"M17.9019 6C18.491 6 18.9525 6.50676 18.8975 7.09334L17.67 20.1867C17.5736 21.2144 16.711 22 15.6787 22H8.32127C7.28902 22 6.42635 21.2144 6.33 20.1867L5.1025 7.09334C5.04751 6.50676 5.50898 6 6.09813 6H17.9019Z",stroke:"currentColor",strokeWidth:"1px",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.createElement)("path",{d:"M14.4499 10.211L13.9949 17",stroke:"currentColor",strokeWidth:"1px",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.createElement)("path",{d:"M9.55499 10.211L10.0049 17",stroke:"currentColor",strokeWidth:"1px",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.createElement)("path",{d:"M7.5 2.25H16.5",stroke:"currentColor",strokeWidth:"1px",strokeLinecap:"round",strokeLinejoin:"round"}))))},Or=Sr;function Ir(e,t,n){if("string"===typeof e)return void 0!==t[e]?t[e]:e;let[r,i]=e;return void 0!==t[r]&&(r=t[r]),void 0!==t[i]&&(i=t[i]),(0,o.Nz)(r,i,n)}var Pr={kind:o.p6.Custom,isMatch:e=>"button-cell"===e.data.kind,needsHover:!0,onSelect:e=>e.preventDefault(),onClick:e=>{var t,n;null==(n=(t=e.cell.data).onClick)||n.call(t)},drawPrep:e=>{const{ctx:t}=e;return t.textAlign="center",{deprep:e=>{e.ctx.textAlign="start"}}},draw:(e,t)=>{const{ctx:n,theme:r,rect:i,hoverAmount:l}=e,{title:a,backgroundColor:s,color:c,borderColor:u,borderRadius:d}=t.data,h=Math.floor(i.x+r.cellHorizontalPadding+1),f=Math.floor(i.y+r.cellVerticalPadding+1),p=Math.ceil(i.width-2*r.cellHorizontalPadding-1),g=Math.ceil(i.height-2*r.cellVerticalPadding-1);return void 0!==s&&(n.beginPath(),lr(n,h,f,p,g,null!=d?d:0),n.fillStyle=Ir(s,r,l),n.fill()),void 0!==u&&(n.beginPath(),lr(n,h+.5,f+.5,p-1,g-1,null!=d?d:0),n.strokeStyle=Ir(u,r,l),n.lineWidth=1,n.stroke()),n.fillStyle=Ir(null!=c?c:r.accentColor,r,l),n.fillText(a,h+p/2,f+g/2+(0,o.aX)(n,`${r.baseFontStyle} ${r.fontFamily}`)),!0},provideEditor:void 0},Tr=[rr,ir,cr,ur,gr,vr,xr,wr,kr,Or,Pr];function Hr(){return(0,o.R$)(Tr)}},33256:(e,t,n)=>{"use strict";n.d(t,{fF:()=>s});var r=n(66751),o=n(66904),i=n(5057);function l(e){var t,n,o,i,l;switch(e.kind){case r.p6.Number:return null!==(t=null===(n=e.data)||void 0===n?void 0:n.toString())&&void 0!==t?t:"";case r.p6.Boolean:return null!==(o=null===(i=e.data)||void 0===i?void 0:i.toString())&&void 0!==o?o:"";case r.p6.Markdown:case r.p6.RowID:case r.p6.Text:case r.p6.Uri:return null!==(l=e.data)&&void 0!==l?l:"";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 a(e){if("number"===typeof e)return e;if(e.length>0){const t=parseFloat(e);isNaN(t)||(e=t)}return e}function s(e){var t;const{sort:n,rows:r,getCellContent:s}=e;let c=void 0===n?void 0:e.columns.findIndex((e=>n.column===e||void 0!==e.id&&n.column.id===e.id));-1===c&&(c=void 0);const u=null!==(t=null===n||void 0===n?void 0:n.direction)&&void 0!==t?t:"asc",d=i.useMemo((()=>{if(void 0===c)return;const e=new Array(r),t=[c,0];for(let n=0;n<r;n++)t[1]=n,e[n]=l(s(t));let i;return i="raw"===(null===n||void 0===n?void 0:n.mode)?o(r).sort(((t,n)=>function(e,t){return e>t?1:e===t?0:-1}(e[t],e[n]))):"smart"===(null===n||void 0===n?void 0:n.mode)?o(r).sort(((t,n)=>function(e,t){return e=a(e),t=a(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(r).sort(((t,n)=>e[t].localeCompare(e[n]))),"desc"===u&&i.reverse(),i}),[s,r,null===n||void 0===n?void 0:n.mode,u,c]),h=i.useCallback((e=>void 0===d?e:d[e]),[d]),f=i.useCallback((e=>{let[t,n]=e;return void 0===d||(n=d[n]),s([t,n])}),[s,d]);return void 0===d?{getCellContent:e.getCellContent,getOriginalIndex:h}:{getOriginalIndex:h,getCellContent:f}}},65850:(e,t,n)=>{"use strict";n.d(t,{d:()=>u});var r=n(5057);var o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return o.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=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=>e.toUpperCase()===e,s=(e,t)=>{const n={};return Object.keys(e).filter((e=>t=>-1===e.indexOf(t))(t)).forEach((t=>{n[t]=e[t]})),n};var c=(e,t)=>{{if("string"===typeof e||"number"===typeof e&&isFinite(e))return;const n="object"===typeof e?JSON.stringify(e):String(e);console.warn(`An interpolation evaluated to '${n}' in the component '${t}', which is probably a mistake. You should explicitly cast or transform the value to a string.`)}};var u=new Proxy((function(e){return t=>{if(Array.isArray(t))throw new Error('Using the "styled" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly. See https://github.com/callstack/linaria#setup');const n=(n,o)=>{const{as:u=e,class:d}=n,h=function(e,t,n){const r=s(t,n);return"string"!==typeof e||-1!==e.indexOf("-")||a(e[0])||Object.keys(r).forEach((e=>{i(e)||delete r[e]})),r}(u,n,["as","class"]);h.ref=o,h.className=t.atomic?l(t.class,h.className||d):l(h.className||d,t.class);const{vars:f}=t;if(f){const e={};for(const i in f){const r=f[i],o=r[0],l=r[1]||"",a="function"===typeof o?o(n):o;c(a,t.name),e[`--${i}`]=`${a}${l}`}const r=h.style||{},o=Object.keys(r);o.length>0&&o.forEach((t=>{e[t]=r[t]})),h.style=e}return e.__linaria&&e!==u?(h.as=u,r.createElement(e,h)):r.createElement(u,h)},o=r.forwardRef?r.forwardRef(n):e=>{const t=s(e,["innerRef"]);return n(t,e.innerRef)};return o.displayName=t.name,o.__linaria={className:t.class,extends:e},o}}),{get:(e,t)=>e(t)})},66751:(e,t,n)=>{"use strict";n.d(t,{EV:()=>_e,Nd:()=>Mr,p6:()=>ge,t5:()=>ir,NH:()=>_t,uN:()=>xt,aX:()=>vt,Nz:()=>Nt,P7:()=>mt,dF:()=>Ft,R$:()=>Rr,Fg:()=>pe});var r=n(65850),o=n(5057),i=n(88341),l=n(87384),a=n(79077),s=n(66904),c=n(67047),u=n(53627),d=n(79530),h=n(8406),f=new Map,p=new Map,g=new Map;function m(e,t,n,r){var o,i;let l=p.get(n);if(r&&void 0!==l&&l.count>2e4){let r=g.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,l=(t/i+3)/4,a=r.keys();for(let s of a)r.set(s,(null!=(n=r.get(s))?n:i)*l);return r}(e,l.size),g.set(n,r)),l.count>5e5){let e=0;for(let n of t)e+=null!=(o=r.get(n))?o:l.size;return 1.01*e}let i=e.measureText(t);return function(e,t,n,r,o){var i,l,a;let s=0,c={};for(let d of e)s+=null!=(i=n.get(d))?i:o,c[d]=(null!=(l=c[d])?l:0)+1;let u=t-s;for(let d of Object.keys(c)){let e=c[d],t=null!=(a=n.get(d))?a:o,i=t+u*(t*e/s)*r/e;n.set(d,i)}}(t,i.width,r,Math.max(.05,1-l.count/2e5),l.size),p.set(n,{count:l.count+t.length,size:l.size}),i.width}let a=e.measureText(t),s=a.width/t.length;if((null!=(i=null==l?void 0:l.count)?i:0)>2e4)return a.width;if(void 0===l)p.set(n,{count:t.length,size:s});else{let e=s-l.size,r=t.length/(l.count+t.length),o=l.size+e*r;p.set(n,{count:l.count+t.length,size:o})}return a.width}function v(e,t,n,r,o,i,l,a){if(t.length<=1)return t.length;if(o<n)return-1;let s=Math.floor(n/o*i),c=m(e,t.slice(0,Math.max(0,s)),r,l),u=null==a?void 0:a(t);if(c!==n)if(c<n){for(;c<n;)s++,c=m(e,t.slice(0,Math.max(0,s)),r,l);s--}else for(;c>n;){let n=void 0!==u?0:t.lastIndexOf(" ",s-1);n>0?s=n:s--,c=m(e,t.slice(0,Math.max(0,s)),r,l)}if(" "!==t[s]){let e=0;if(void 0===u)e=t.lastIndexOf(" ",s);else for(let t of u){if(t>s)break;e=t}e>0&&(s=e)}return s}var b=n(88417),y=n(27261);function w(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let x={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const k=/[&<>"']/,C=new RegExp(k.source,"g"),S=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,M=new RegExp(S.source,"g"),E={"&":"&","<":"<",">":">",'"':""","'":"'"},R=e=>E[e];function O(e,t){if(t){if(k.test(e))return e.replace(C,R)}else if(S.test(e))return e.replace(M,R);return e}const I=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function P(e){return e.replace(I,((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 T=/(^|[^\[])\^/g;function H(e,t){e="string"===typeof e?e:e.source,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(T,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n}const D=/[^\w:]/g,L=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function A(e,t,n){if(e){let e;try{e=decodeURIComponent(P(n)).replace(D,"").toLowerCase()}catch(r){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!L.test(n)&&(n=function(e,t){z[" "+e]||(F.test(e)?z[" "+e]=e+"/":z[" "+e]=j(e,"/",!0));e=z[" "+e];const n=-1===e.indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace($,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(_,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(r){return null}return n}const z={},F=/^[^:]+:\/*[^/]*$/,$=/^([^:]+:)[\s\S]*$/,_=/^([^:]+:\/*[^/]*)[\s\S]*$/;const N={exec:function(){}};function V(e){let t,n,r=1;for(;r<arguments.length;r++)for(n in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function B(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 j(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 W(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function U(e,t){if(t<1)return"";let n="";for(;t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function X(e,t,n,r){const o=t.href,i=t.title?O(t.title):null,l=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:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:o,title:i,text:O(l)}}class Y{constructor(e){this.options=e||x}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:j(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=j(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,l,a,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),a=!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)}}(?:\`\`\`|~~~)`),l=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))&&!l.test(u)&&!t.test(u)&&!r.test(e);){if(u.search(/[^ ]/)>=i||!u.trim())h+="\n"+u.slice(i);else{if(a)break;if(c.search(/[^ ]/)>=4)break;if(o.test(c))break;if(l.test(c))break;if(r.test(c))break;h+="\n"+u}a||u.trim()||(a=!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 b=m.items.length;for(l=0;l<b;l++)if(this.lexer.state.top=!1,m.items[l].tokens=this.lexer.blockTokens(m.items[l].text,[]),!m.loose){const e=m.items[l].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(l=0;l<b;l++)m.items[l].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]):O(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:B(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,l=e.align.length;for(n=0;n<l;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(l=e.rows.length,n=0;n<l;n++)e.rows[n]=B(e.rows[n],e.header.length).map((e=>({text:e})));for(l=e.header.length,r=0;r<l;r++)e.header[r].tokens=this.lexer.inline(e.header[r].text);for(l=e.rows.length,r=0;r<l;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:O(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]):O(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=j(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)),X(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 X(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,l=n,a=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]){l+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){a+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l+a);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=O(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=O(this.options.mangle?t(n[1]):n[1]),r="mailto:"+e):(e=O(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=O(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=O(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]):O(n[0]):n[0]:O(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:e}}}}const K={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:N,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?'|\([^()]*\))/};K.def=H(K.def).replace("label",K._label).replace("title",K._title).getRegex(),K.bullet=/(?:[*+-]|\d{1,9}[.)])/,K.listItemStart=H(/^( *)(bull) */).replace("bull",K.bullet).getRegex(),K.list=H(K.list).replace(/bull/g,K.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+K.def.source+")").getRegex(),K._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",K._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,K.html=H(K.html,"i").replace("comment",K._comment).replace("tag",K._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),K.paragraph=H(K._paragraph).replace("hr",K.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",K._tag).getRegex(),K.blockquote=H(K.blockquote).replace("paragraph",K.paragraph).getRegex(),K.normal=V({},K),K.gfm=V({},K.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),K.gfm.table=H(K.gfm.table).replace("hr",K.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",K._tag).getRegex(),K.gfm.paragraph=H(K._paragraph).replace("hr",K.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",K.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",K._tag).getRegex(),K.pedantic=V({},K.normal,{html:H("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",K._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:N,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:H(K.normal._paragraph).replace("hr",K.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",K.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const G={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:N,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:N,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function q(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 Z(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}G._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",G.punctuation=H(G.punctuation).replace(/punctuation/g,G._punctuation).getRegex(),G.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,G.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,G._comment=H(K._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),G.emStrong.lDelim=H(G.emStrong.lDelim).replace(/punct/g,G._punctuation).getRegex(),G.emStrong.rDelimAst=H(G.emStrong.rDelimAst,"g").replace(/punct/g,G._punctuation).getRegex(),G.emStrong.rDelimUnd=H(G.emStrong.rDelimUnd,"g").replace(/punct/g,G._punctuation).getRegex(),G._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,G._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,G._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])?)+(?![-_])/,G.autolink=H(G.autolink).replace("scheme",G._scheme).replace("email",G._email).getRegex(),G._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,G.tag=H(G.tag).replace("comment",G._comment).replace("attribute",G._attribute).getRegex(),G._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,G._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,G._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,G.link=H(G.link).replace("label",G._label).replace("href",G._href).replace("title",G._title).getRegex(),G.reflink=H(G.reflink).replace("label",G._label).replace("ref",K._label).getRegex(),G.nolink=H(G.nolink).replace("ref",K._label).getRegex(),G.reflinkSearch=H(G.reflinkSearch,"g").replace("reflink",G.reflink).replace("nolink",G.nolink).getRegex(),G.normal=V({},G),G.pedantic=V({},G.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:H(/^!?\[(label)\]\((.*?)\)/).replace("label",G._label).getRegex(),reflink:H(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",G._label).getRegex()}),G.gfm=V({},G.normal,{escape:H(G.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),G.gfm.url=H(G.gfm.url,"i").replace("email",G.gfm._extended_email).getRegex(),G.breaks=V({},G.gfm,{br:H(G.br).replace("{2,}","*").getRegex(),text:H(G.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});class Q{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||x,this.options.tokenizer=this.options.tokenizer||new Y,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:K.normal,inline:G.normal};this.options.pedantic?(t.block=K.pedantic,t.inline=G.pedantic):this.options.gfm&&(t.block=K.gfm,this.options.breaks?t.inline=G.breaks:t.inline=G.gfm),this.tokenizer.rules=t}static get rules(){return{block:K,inline:G}}static lex(e,t){return new Q(t).lex(e)}static lexInline(e,t){return new Q(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,l,a,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)+"["+U("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)+"["+U("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(l||(a=""),l=!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,a))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,Z))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,Z))){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,q))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),l=!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 J{constructor(e){this.options=e||x}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+O(r)+'">'+(n?e:O(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:O(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=A(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=A(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 ee{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 te{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 ne{constructor(e){this.options=e||x,this.options.renderer=this.options.renderer||new J,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new te}static parse(e,t){return new ne(t).parse(e)}static parseInline(e,t){return new ne(t).parseInline(e)}parse(e,t=!0){let n,r,o,i,l,a,s,c,u,d,h,f,p,g,m,v,b,y,w,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]&&(w=this.options.extensions.renderers[d.type].call({parser:this},d),!1!==w||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)))x+=w||"";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,P(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(a=d.rows[r],s="",l=a.length,o=0;o<l;o++)s+=this.renderer.tablecell(this.parseInline(a[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,b=m.task,g="",m.task&&(y=this.renderer.checkbox(v),p?m.tokens.length>0&&"paragraph"===m.tokens[0].type?(m.tokens[0].text=y+" "+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=y+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:y}):g+=y),g+=this.parse(m.tokens,p),u+=this.renderer.listitem(g,b,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 l=e.length;for(n=0;n<l;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}}function re(e,t,n){if("undefined"===typeof e||null===e)throw new Error("marked(): input parameter is undefined or null");if("string"!==typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"===typeof t&&(n=t,t=null),W(t=V({},re.defaults,t||{})),n){const r=t.highlight;let i;try{i=Q.lex(e,t)}catch(o){return n(o)}const l=function(e){let l;if(!e)try{t.walkTokens&&re.walkTokens(i,t.walkTokens),l=ne.parse(i,t)}catch(o){e=o}return t.highlight=r,e?n(e):n(null,l)};if(!r||r.length<3)return l();if(delete t.highlight,!i.length)return l();let a=0;return re.walkTokens(i,(function(e){"code"===e.type&&(a++,setTimeout((()=>{r(e.text,e.lang,(function(t,n){if(t)return l(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),a--,0===a&&l()}))}),0))})),void(0===a&&l())}function r(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+O(e.message+"",!0)+"</pre>";throw e}try{const n=Q.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(re.walkTokens(n,t.walkTokens)).then((()=>ne.parse(n,t))).catch(r);re.walkTokens(n,t.walkTokens)}return ne.parse(n,t)}catch(o){r(o)}}re.options=re.setOptions=function(e){var t;return V(re.defaults,e),t=re.defaults,x=t,re},re.getDefaults=w,re.defaults=x,re.use=function(...e){const t=re.defaults.extensions||{renderers:{},childTokens:{}};e.forEach((e=>{const n=V({},e);if(n.async=re.defaults.async||n.async,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=re.defaults.renderer||new J;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=re.defaults.tokenizer||new Y;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.walkTokens){const t=re.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}}re.setOptions(n)}))},re.walkTokens=function(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(re,r)),r.type){case"table":for(const e of r.header)n=n.concat(re.walkTokens(e.tokens,t));for(const e of r.rows)for(const r of e)n=n.concat(re.walkTokens(r.tokens,t));break;case"list":n=n.concat(re.walkTokens(r.items,t));break;default:re.defaults.extensions&&re.defaults.extensions.childTokens&&re.defaults.extensions.childTokens[r.type]?re.defaults.extensions.childTokens[r.type].forEach((function(e){n=n.concat(re.walkTokens(r[e],t))})):r.tokens&&(n=n.concat(re.walkTokens(r.tokens,t)))}return n},re.parseInline=function(e,t){if("undefined"===typeof e||null===e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!==typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");W(t=V({},re.defaults,t||{}));try{const n=Q.lexInline(e,t);return t.walkTokens&&re.walkTokens(n,t.walkTokens),ne.parseInline(n,t)}catch(n){if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+O(n.message+"",!0)+"</pre>";throw n}},re.Parser=ne,re.parser=ne.parse,re.Renderer=J,re.TextRenderer=ee,re.Lexer=Q,re.lexer=Q.lex,re.Tokenizer=Y,re.Slugger=te,re.parse=re;re.options,re.setOptions,re.use,re.walkTokens,re.parseInline,ne.parse,Q.lex;function oe(e="This should not happen"){throw new Error(e)}function ie(e,t="Assertion failed"){if(!e)return oe(t)}function le(e){return oe("Hell froze over")}var ae=Object.prototype.hasOwnProperty;function se(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--&&se(e[r],t[r]););return-1===r}if(!n||"object"===typeof e){for(n in r=0,e){if(ae.call(e,n)&&++r&&!ae.call(t,n))return!1;if(!(n in t)||!se(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!==e&&t!==t}var ce=class extends o.PureComponent{constructor(){super(...arguments),this.wrapperRef=o.createRef(),this.clickOutside=e=>{if(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()}}}componentDidMount(){document.addEventListener("touchend",this.clickOutside,!0),document.addEventListener("mousedown",this.clickOutside,!0),document.addEventListener("contextmenu",this.clickOutside,!0)}componentWillUnmount(){document.addEventListener("touchend",this.clickOutside,!0),document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("contextmenu",this.clickOutside)}render(){const{onClickOutside:e,...t}=this.props;return o.createElement("div",{...t,ref:this.wrapperRef},this.props.children)}};function ue(e){var t,n;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":null!=(t=e.textGroupHeader)?t: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":null!=(n=e.horizontalBorderColor)?n: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-font-family":e.fontFamily,"--gdg-editor-font-size":e.editorFontSize}}var de={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:"#4F5DFF",cellHorizontalPadding:8,cellVerticalPadding:3,headerIconSize:18,headerFontStyle:"600 13px",baseFontStyle:"13px",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 he(){return de}var fe=o.createContext(de);function pe(){return o.useContext(fe)}var ge,me,ve,be,ye=null,we=void 0,xe="header",ke="group-header",Ce="out-of-bounds";(me=ge||(ge={})).Uri="uri",me.Text="text",me.Image="image",me.RowID="row-id",me.Number="number",me.Bubble="bubble",me.Boolean="boolean",me.Loading="loading",me.Markdown="markdown",me.Drilldown="drilldown",me.Protected="protected",me.Custom="custom",(be=ve||(ve={})).HeaderRowID="headerRowID",be.HeaderCode="headerCode",be.HeaderNumber="headerNumber",be.HeaderString="headerString",be.HeaderBoolean="headerBoolean",be.HeaderAudioUri="headerAudioUri",be.HeaderVideoUri="headerVideoUri",be.HeaderEmoji="headerEmoji",be.HeaderImage="headerImage",be.HeaderUri="headerUri",be.HeaderPhone="headerPhone",be.HeaderMarkdown="headerMarkdown",be.HeaderDate="headerDate",be.HeaderTime="headerTime",be.HeaderEmail="headerEmail",be.HeaderReference="headerReference",be.HeaderIfThenElse="headerIfThenElse",be.HeaderSingleValue="headerSingleValue",be.HeaderLookup="headerLookup",be.HeaderTextTemplate="headerTextTemplate",be.HeaderMath="headerMath",be.HeaderRollup="headerRollup",be.HeaderJoinStrings="headerJoinStrings",be.HeaderSplitString="headerSplitString",be.HeaderGeoDistance="headerGeoDistance",be.HeaderArray="headerArray",be.RowOwnerOverlay="rowOwnerOverlay",be.ProtectedColumnOverlay="protectedColumnOverlay";var Se,Me,Ee,Re="___gdg_header_cell_",Oe=Re+"checked",Ie=Re+"unchecked",Pe=Re+"indeterminate";function Te(e){return"width"in e&&"number"===typeof e.width}async function He(e){return"object"===typeof e?e:await e()}function De(e){return e.kind!==ge.Loading&&e.kind!==ge.Bubble&&e.kind!==ge.RowID&&e.kind!==ge.Protected&&e.kind!==ge.Drilldown}function Le(e){return e.kind===Se.Marker||e.kind===Se.NewRow}function Ae(e){return!(!De(e)||e.kind===ge.Image)&&(e.kind===ge.Text||e.kind===ge.Number||e.kind===ge.Markdown||e.kind===ge.Uri||e.kind===ge.Custom||e.kind===ge.Boolean?!0!==e.readonly:void le())}function ze(e){return d(e,"editor")}function Fe(e){var t;return!(null!=(t=e.readonly)&&t)}(Me=Se||(Se={})).NewRow="new-row",Me.Marker="marker";var $e=class{constructor(e){this.items=e,this.offset=e=>{if(0===e)return this;const t=this.items.map((t=>[t[0]+e,t[1]+e]));return new $e(t)},this.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 $e(n)},this.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,l]=i;if(e<=r&&n<=l){const i=[];e<n&&i.push([e,n]),r<l&&i.push([r,l]),t.splice(o,1,...i)}}return new $e(t)},this.first=()=>{if(0!==this.items.length)return this.items[0][0]},this.last=()=>{if(0!==this.items.length)return this.items.slice(-1)[0][1]-1},this.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},this.hasAll=e=>{for(let t=e[0];t<e[1];t++)if(!this.hasIndex(t))return!1;return!0},this.some=e=>{for(const t of this)if(e(t))return!0;return!1},this.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},this.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}},_e=$e;_e.empty=()=>null!=Ee?Ee:Ee=new $e([]),_e.fromSingleSelection=e=>$e.empty().add(e);var Ne=(0,r.d)("div")({name:"DataGridOverlayEditorStyle",class:"d1t1th9s",vars:{"d1t1th9s-0":[e=>e.targetY,"px"],"d1t1th9s-1":[e=>e.targetX-1,"px"],"d1t1th9s-2":[e=>e.targetY-1,"px"],"d1t1th9s-3":[e=>e.targetWidth+2,"px"],"d1t1th9s-4":[e=>e.targetHeight+2,"px"],"d1t1th9s-5":[e=>e.targetY+10,"px"],"d1t1th9s-6":[e=>Math.max(0,(e.targetHeight-28)/2),"px"]}});function Ve(){const[e,t]=function(){const[e,t]=o.useState();return[null!=e?e:void 0,t]}(),[n,r]=o.useState(0),[i,l]=o.useState(!0);o.useLayoutEffect((()=>{if(void 0===e)return;if(!("IntersectionObserver"in window))return;const t=new IntersectionObserver((e=>{0!==e.length&&l(e[0].isIntersecting)}),{threshold:1});return t.observe(e),()=>t.disconnect()}),[e]),o.useEffect((()=>{if(i||void 0===e)return;let t;const n=()=>{const{right:o}=e.getBoundingClientRect();r((e=>Math.min(e+window.innerWidth-o-10,0))),t=requestAnimationFrame(n)};return t=requestAnimationFrame(n),()=>{void 0!==t&&cancelAnimationFrame(t)}}),[e,i]);return{ref:t,style:o.useMemo((()=>({transform:`translateX(${n}px)`})),[n])}}var Be=e=>{const{target:t,content:n,onFinishEditing:r,forceEditMode:i,initialValue:l,imageEditorOverride:a,markdownDivCreateNode:s,highlight:c,className:d,theme:h,id:f,cell:p,validateCell:g,getCellRenderer:m,provideEditor:v}=e,[b,y]=o.useState(i?n:void 0),w=o.useRef(null!=b?b:n);w.current=null!=b?b:n;const[x,k]=o.useState((()=>void 0===g||!(De(n)&&!1===(null==g?void 0:g(p,n,w.current))))),C=o.useCallback(((e,t)=>{r(x?e:void 0,t)}),[x,r]),S=o.useCallback((e=>{if(void 0!==g&&void 0!==e&&De(e)){const t=g(p,e,w.current);!1===t?k(!1):"object"===typeof t?(e=t,k(!0)):k(!0)}y(e)}),[p,g]),M=o.useRef(!1),E=o.useRef(void 0),R=o.useCallback((()=>{C(b,[0,0]),M.current=!0}),[b,C]),O=o.useCallback((e=>{var t;C(e,null!=(t=E.current)?t:[0,0]),M.current=!0}),[C]),I=o.useCallback((async e=>{let t=!1;"Escape"===e.key?(e.stopPropagation(),e.preventDefault(),E.current=[0,0]):"Enter"!==e.key||e.shiftKey?"Tab"===e.key&&(e.stopPropagation(),e.preventDefault(),E.current=[e.shiftKey?-1:1,0],t=!0):(e.stopPropagation(),e.preventDefault(),E.current=[0,1],t=!0),window.setTimeout((()=>{M.current||void 0===E.current||(C(t?b:void 0,E.current),M.current=!0)}),0)}),[C,b]),P=null!=b?b:n,[T,H]=o.useMemo((()=>{var e,t;if(Le(n))return[];const r=null==v?void 0:v(n);return void 0!==r?[r,!1]:[null==(t=null==(e=m(n))?void 0:e.provideEditor)?void 0:t.call(e,n),!1]}),[n,m,v]),{ref:D,style:L}=Ve();let A,z,F=!0,$=!0;if(void 0!==T){F=!0!==T.disablePadding,$=!0!==T.disableStyling;const e=ze(T);e&&(z=T.styleOverride);const n=e?T.editor:T;A=o.createElement(n,{isHighlighted:c,onChange:S,value:P,initialValue:l,onFinishedEditing:O,validatedSelection:De(P)?P.selectionRange:void 0,forceEditMode:i,target:t,imageEditorOverride:a,markdownDivCreateNode:s,isValid:x})}z={...z,...L};const _=document.getElementById("portal");if(null===_)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let N=$?"gdg-style":"gdg-unstyle";return x||(N+=" invalid"),F&&(N+=" pad"),(0,u.createPortal)(o.createElement(fe.Provider,{value:h},o.createElement(ce,{style:ue(h),className:d,onClickOutside:R},o.createElement(Ne,{ref:D,id:f,className:N,style:z,as:!0===H?"label":void 0,targetX:t.x,targetY:t.y,targetWidth:t.width,targetHeight:t.height},o.createElement("div",{className:"clip-region",onKeyDown:I},A)))),_)},je=65536,We=[];function Ue(e,t){return t*je+e}function Xe(e){return e%je}function Ye(e,t){return(e-t)/je}function Ke(e){const t=Xe(e);return[t,Ye(e,t)]}var Ge=class{constructor(){this.imageLoaded=()=>{},this.loadedLocations=[],this.visibleWindow={x:0,y:0,width:0,height:0},this.freezeCols=0,this.isInWindow=e=>{const t=Xe(e),n=Ye(e,t),r=this.visibleWindow;return t<this.freezeCols&&n>=r.y&&n<=r.y+r.height||t>=r.x&&t<=r.x+r.width&&n>=r.y&&n<=r.y+r.height},this.cache={},this.sendLoaded=h((()=>{this.imageLoaded(this.loadedLocations),this.loadedLocations=[]}),20),this.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])}}}setCallback(e){this.imageLoaded=e}setWindow(e,t){this.visibleWindow.x===e.x&&this.visibleWindow.y===e.y&&this.visibleWindow.width===e.width&&this.visibleWindow.height===e.height&&this.freezeCols===t||(this.visibleWindow=e,this.freezeCols=t,this.clearOutOfWindow())}loadImage(e,t,n,r){var o;let i=!1;const l=null!=(o=We.pop())?o:new Image;let a=!1;const s={img:void 0,cells:[Ue(t,n)],url:e,cancel:()=>{a||(a=!0,We.length<12?We.unshift(l):i||(l.src=""))}},c=new Promise((e=>l.addEventListener("load",(()=>e(null)))));requestAnimationFrame((async()=>{try{l.src=e,await c,await l.decode();const t=this.cache[r];if(void 0!==t&&!a){t.img=l;for(const e of t.cells)this.loadedLocations.push(Ke(e));i=!0,this.sendLoaded()}}catch(t){s.cancel()}})),this.cache[r]=s}loadOrGetImage(e,t,n){const r=e,o=this.cache[r];if(void 0!==o){const e=Ue(t,n);return o.cells.includes(e)||o.cells.push(e),o.img}this.loadImage(e,t,n,r)}};function qe(e,t,n,r,i=!1){const l=o.useRef();l.current=t,o.useEffect((()=>{if(null===n||void 0===n.addEventListener)return;const t=n,o=e=>{var n;null==(n=l.current)||n.call(t,e)};return t.addEventListener(e,o,{passive:r,capture:i}),()=>{t.removeEventListener(e,o,{capture:i})}}),[e,n,r,i])}function Ze(e,t){return void 0===e?void 0:t}var Qe=Math.PI;function Je(e){return e*Qe/180}var et=e=>{var t;const n=null!=(t=e.fgColor)?t:"currentColor";return o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.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:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}),o.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:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}))},tt=e=>{var t;const n=null!=(t=e.fgColor)?t:"currentColor";return o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};var nt="\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc",rt="A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff",ot=new RegExp("^[^"+rt+"]*["+nt+"]"),it=new RegExp("^[^"+nt+"]*["+rt+"]");var lt=void 0;var at=Symbol();function st(e,t){return(null!=e?e:"")===(null!=t?t:"")}function ct(e,t,n){const r=n.x,o=n.x+n.width-1,i=n.y,l=n.y+n.height-1,[a,s]=e;if(s<i||s>l)return!1;if(void 0===t.span)return a>=r&&a<=o;const[c,u]=t.span;return c>=r&&c<=o||u>=r&&c<=o||c<r&&u>o}function ut(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 dt(e,t){let n=0;const r=ut(e,t);for(let o=0;o<r.length;o++){const e=r[o];if(!e.sticky)break;n+=e.width}return n}function ht(e,t,n,r,o){const i=ut(e,r),l=[];for(const c of i){if(!c.sticky)break;l.push(c)}if(l.length>0)for(const c of l)n-=c.width;let a=t,s=null!=o?o:0;for(;s<=n&&a<i.length;)s+=i[a].width,a++;for(let c=t;c<a;c++){const e=i[c];e.sticky||l.push(e)}return l}var ft=0,pt={},gt="undefined"===typeof window;function mt(e,t,n){const r=function(e,t,n,r){return`${e}_${null!=r?r:t.font}_${n}`}(e,t,"middle",n);let o=pt[r];return void 0===o&&(o=t.measureText(e),pt[r]=o,ft++),ft>1e4&&(pt={},ft=0),o}function vt(e,t){return"string"!==typeof t&&(t=`${t.baseFontStyle} ${t.fontFamily}`),function(e,t){for(const i of yt)if(i.key===t)return i.val;const n=bt(e,"alphabetic"),r=bt(e,"middle"),o=-(r.actualBoundingBoxDescent-n.actualBoundingBoxDescent)+n.actualBoundingBoxAscent/2;return yt.push({key:t,val:o}),o}(e,t)}function bt(e,t){e.save(),e.textBaseline=t;const n=e.measureText("ABCDEFGHIJKLMNOPQRSTUVWXYZ");return e.restore(),n}!async function(){var e;gt||void 0===(null==(e=null==document?void 0:document.fonts)?void 0:e.ready)||(await document.fonts.ready,ft=0,pt={},f.clear(),g.clear(),p.clear())}();var yt=[];function wt(e,t,n){const{ctx:r,theme:o}=e,i=null!=t?t:{},l=null!=n?n:o.textDark;return l!==i.fillStyle&&(r.fillStyle=l,i.fillStyle=l),i}function xt(e,t,n){const{rect:r,ctx:o,theme:i}=e;o.fillStyle=i.textDark,St({ctx:o,rect:r,theme:i},t,n)}function kt(e,t,n,r,o,i,l,a,s){"right"===s?e.fillText(t,n+o-(a.cellHorizontalPadding+.5),r+i/2+l):"center"===s?e.fillText(t,n+o/2,r+i/2+l):e.fillText(t,n+a.cellHorizontalPadding+.5,r+i/2+l)}function Ct(e,t){const n=mt("ABCi09jgqpy",e,t);return n.actualBoundingBoxAscent+n.actualBoundingBoxDescent}function St(e,t,n,r,o){const{ctx:i,rect:l,theme:a}=e,{x:s,y:c,width:u,height:d}=l;if(!(r=null!=r&&r)){t.includes("\n")&&(t=t.split(/\r?\n/)[0]);const e=u/4;t.length>e&&(t=t.slice(0,e))}const h=vt(i,a),g="rtl"===(b=t,ot.test(b)?"rtl":it.test(b)?"ltr":"neutral");var b;if(void 0===n&&g&&(n="right"),g&&(i.direction="rtl"),t.length>0){let e=!1;if("right"===n?(i.textAlign="right",e=!0):void 0!==n&&"left"!==n&&(i.textAlign=n,e=!0),r){const e=`${a.fontFamily} ${a.baseFontStyle}`,r=function(e,t,n,r,o,i){let l=`${t}_${n}_${r}px`,a=f.get(l);if(void 0!==a)return a;if(r<=0)return[];let s=[],c=t.split("\n"),u=p.get(n),d=void 0===u?t.length:r/u.size*1.5,h=o&&void 0!==u&&u.count>2e4;for(let f of c){let t=m(e,f.slice(0,Math.max(0,d)),n,h),o=Math.min(f.length,d);if(t<=r)s.push(f);else{for(;t>r;){let l=v(e,f,r,n,t,o,h,i),a=f.slice(0,Math.max(0,l));f=f.slice(a.length),s.push(a),t=m(e,f.slice(0,Math.max(0,d)),n,h),o=Math.min(f.length,d)}t>0&&s.push(f)}}return s=s.map(((e,t)=>0===t?e.trimEnd():e.trim())),f.set(l,s),f.size>500&&f.delete(f.keys().next().value),s}(i,t,e,u-2*a.cellHorizontalPadding,null!=o&&o),l=Ct(i,e),g=a.lineHeight*l,b=l+g*(r.length-1),y=b+a.cellVerticalPadding>d;y&&(i.save(),i.rect(s,c,u,d),i.clip());const w=c+d/2-b/2;let x=Math.max(c+a.cellVerticalPadding,w);for(const t of r)if(kt(i,t,s,x,u,l,h,a,n),x+=g,x>c+d)break;y&&i.restore()}else kt(i,t,s,c,u,d,h,a,n);e&&(i.textAlign="start"),g&&(i.direction="inherit")}}function Mt(e,t,n,r,o,i,l,a,s=-20,c=-20,u=32){const d=Math.floor(r+i/2),h=Math.floor(o+l/2),f=Math.min(u,l-2*t.cellVerticalPadding),p=f/2,g=Math.abs(s-i/2)<p&&Math.abs(c-l/2)<p,m=f/2;switch(n){case!0:e.beginPath(),Rt(e,d-f/2,h-f/2,f,f,4),e.fillStyle=a?t.accentColor:t.textMedium,e.fill(),e.beginPath(),e.moveTo(d-m+f/4.23,h-m+f/1.97),e.lineTo(d-m+f/2.42,h-m+f/1.44),e.lineTo(d-m+f/1.29,h-m+f/3.25),e.strokeStyle=t.bgCell,e.lineJoin="round",e.lineCap="round",e.lineWidth=1.9,e.stroke();break;case ye:case!1:e.beginPath(),Rt(e,d-f/2+.5,h-f/2+.5,f-1,f-1,4),e.lineWidth=1,e.strokeStyle=g?t.textDark:t.textMedium,e.stroke();break;case we:e.beginPath(),Rt(e,d-f/2,h-f/2,f,f,4),e.fillStyle=g?t.textMedium:t.textLight,e.fill(),e.beginPath(),e.moveTo(d-f/3,h),e.lineTo(d+f/3,h),e.strokeStyle=t.bgCell,e.lineCap="round",e.lineWidth=1.9,e.stroke();break;default:le()}}function Et(e){const{ctx:t}=e;t.textAlign="start"}function Rt(e,t,n,r,o,i){"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)},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)}var Ot=4;var It={};function Pt(e,t){const{rect:n,theme:r,ctx:o,imageLoader:i,col:l,row:a}=e,{x:s,width:c}=n,u=`${r.baseFontStyle} ${r.fontFamily}`,d=Ct(o,u),h=Math.min(n.height,Math.max(16,2*Math.ceil(d*r.lineHeight))),f=Math.floor(n.y+(n.height-h)/2),p=h-10,g=Ot;let m=s+r.cellHorizontalPadding;const v=function(e,t,n){const r=Math.ceil(window.devicePixelRatio),o=n-10,i=n*r,l=28*r,a=`${e},${t},${r},${n}`;if(void 0!==It[a])return{el:It[a],height:i,width:l,middleWidth:4*r,sideWidth:11*r,padding:5*r,dpr:r};const s=document.createElement("canvas"),c=s.getContext("2d");if(null===c)return null;s.width=l,s.height=i,c.scale(r,r),It[a]=s;const u=Math.min(6,9,o/2);return c.beginPath(),Rt(c,5,5,18,o,u),c.shadowColor="rgba(24, 25, 34, 0.4)",c.shadowBlur=1,c.fillStyle=e,c.fill(),c.shadowColor="rgba(24, 25, 34, 0.3)",c.shadowOffsetY=1,c.shadowBlur=5,c.fillStyle=e,c.fill(),c.shadowOffsetY=0,c.shadowBlur=0,c.shadowBlur=0,c.beginPath(),Rt(c,5.5,5.5,18,o,u),c.strokeStyle=t,c.lineWidth=1,c.stroke(),{el:s,height:i,width:l,sideWidth:11*r,middleWidth:6*r,padding:5*r,dpr:r}}(r.bgCell,r.drilldownBorder,h),b=[];for(const y of t){if(m>s+c)break;const e=mt(y.text,o,u).width;let t=0;if(void 0!==y.img){void 0!==i.loadOrGetImage(y.img,l,a)&&(t=p-8+4)}const n=e+t+16;b.push({x:m,width:n}),m+=n+g}if(null!==v){const{el:e,height:t,middleWidth:n,sideWidth:r,width:i,dpr:l,padding:a}=v,s=r/l,c=a/l;for(const u of b){const l=Math.floor(u.x),a=Math.floor(u.width);o.imageSmoothingEnabled=!1,o.drawImage(e,0,0,r,t,l-c,f,s,h),u.width>2*r&&o.drawImage(e,r,0,n,t,l+(s-c),f,a-2*(s-c),h),o.drawImage(e,i-r,0,r,t,l+a-(s-c),f,s,h),o.imageSmoothingEnabled=!0}}o.beginPath();for(const[y,w]of b.entries()){const e=t[y];let n=w.x+8;if(void 0!==e.img){const t=i.loadOrGetImage(e.img,l,a);if(void 0!==t){const e=p-8;let r=0,i=0,l=t.width,a=t.height;l>a?(r+=(l-a)/2,l=a):a>l&&(i+=(a-l)/2,a=l),o.beginPath(),Rt(o,n,f+h/2-e/2,e,e,3),o.save(),o.clip(),o.drawImage(t,r,i,l,a,n,f+h/2-e/2,e,e),o.restore(),n+=e+4}}o.beginPath(),o.fillStyle=r.textBubble,o.fillText(e.text,n,f+h/2+vt(o,r))}}function Tt(e,t,n,r,o,i,l,a,s,c,u,d,h,f,p){const g={x:0,y:i+c,width:0,height:0},m=i-o;if(e>=d){const t=l>e?-1:1,n=dt(f);g.x+=n+s;for(let r=l;r!==e;r+=t)g.x+=f[1===t?r:r-1].width*t}else for(let v=0;v<e;v++)g.x+=f[v].width;if(g.width=f[e].width+1,-1===t)g.y=o,g.height=m;else if(-2===t){g.y=0,g.height=o;let t=e;const r=f[e].group,i=f[e].sticky;for(;t>0&&st(f[t-1].group,r)&&f[t-1].sticky===i;){const e=f[t-1];g.x-=e.width,g.width+=e.width,t--}let l=e;for(;l+1<f.length&&st(f[l+1].group,r)&&f[l+1].sticky===i;){const e=f[l+1];g.width+=e.width,l++}if(!i){const e=dt(f),t=g.x-e;t<0&&(g.x-=t,g.width+=t),g.x+g.width>n&&(g.width=n-g.x)}}else if(h&&t===u-1){const e="number"===typeof p?p:p(t);g.y=r-e,g.height=e}else{const e=a>t?-1:1;if("number"===typeof p){const e=t-a;g.y+=e*p}else for(let n=a;n!==t;n+=e)g.y+=p(n)*e;g.height=("number"===typeof p?p:p(t))+1}return g}var Ht='<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">',Dt=e=>{const t=e.fgColor,n=e.bgColor;return`${Ht}\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 `},Lt={headerRowID:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${Ht}<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`${Ht}\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 ${Ht}<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`${Ht}\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`${Ht}\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:Dt,headerVideoUri:e=>{const t=e.fgColor,n=e.bgColor;return`${Ht}\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 ${Ht}\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`${Ht}\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:Dt,headerPhone:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${Ht}\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 ${Ht}\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`${Ht}\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 ${Ht}\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`${Ht}\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 ${Ht}\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`${Ht}\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 ${Ht}\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 ${Ht}\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`${Ht}\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`${Ht}\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 ${Ht}\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`${Ht}\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 ${Ht}\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`${Ht}\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`${Ht}\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`${Ht}\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 At={},zt=null;function Ft(e){const t=e.toLowerCase().trim();if(void 0!==At[t])return At[t];zt=zt||function(){const e=document.createElement("div");return e.style.opacity="0",e.style.pointerEvents="none",e.style.position="fixed",document.body.append(e),e}(),zt.style.color="#000",zt.style.color=t;const n=getComputedStyle(zt).color;zt.style.color="#fff",zt.style.color=t;const r=getComputedStyle(zt).color;if(r!==n)return[0,0,0,1];let o=r.replace(/[^\d.,]/g,"").split(",").map(Number.parseFloat);return o.length<4&&o.push(1),o=o.map((t=>{const n=Number.isNaN(t);return n&&console.warn("Could not parse color",e),n?0:t})),At[t]=o,o}function $t(e,t){const[n,r,o]=Ft(e);return`rgba(${n}, ${r}, ${o}, ${t})`}function _t(e,t){if(void 0===t)return e;const[n,r,o,i]=Ft(e);if(1===i)return e;const[l,a,s,c]=Ft(t),u=i+c*(1-i);return`rgba(${(i*n+c*l*(1-i))/u}, ${(i*r+c*a*(1-i))/u}, ${(i*o+c*s*(1-i))/u}, ${u})`}function Nt(e,t,n){if(n<=0)return e;if(n>=1)return t;const r=[...Ft(e)];r[0]=r[0]*r[3],r[1]=r[1]*r[3],r[2]=r[2]*r[3];const o=[...Ft(t)];o[0]=o[0]*o[3],o[1]=o[1]*o[3],o[2]=o[2]*o[3];const i=n,l=1-n,a=r[3]*l+o[3]*i;return`rgba(${Math.floor((r[0]*l+o[0]*i)/a)}, ${Math.floor((r[1]*l+o[1]*i)/a)}, ${Math.floor((r[2]*l+o[2]*i)/a)}, ${a})`}var Vt={kind:ge.Loading,allowOverlay:!1};function Bt(e,t,n,r,o,i,l,a,s,c,u,d,h,f,p,g,m,v,b,y){let w,x,k;void 0!==p&&p[0][0]===r&&p[0][1]===t&&(w=p[1][0],x=p[1][1]);const C={ctx:e,theme:c,col:r,row:t,cell:n,rect:{x:o,y:i,width:l,height:a},highlighted:s,hoverAmount:f,hoverX:w,hoverY:x,imageLoader:d,spriteManager:h,hyperWrapping:g,requestAnimationFrame:()=>{S=!0}};let S=!1;const M=function(e,t,n,r,o){const{ctx:i,rect:l,theme:a}=e;let s=Number.MAX_SAFE_INTEGER;if(void 0!==t&&(s=n-t,s<500)){const e=1-s/500;i.globalAlpha=e,i.fillStyle=a.bgSearchResult,i.fillRect(l.x,l.y,l.width,l.height),i.globalAlpha=1,void 0!==r&&(r.fillStyle=a.bgSearchResult)}return o(),s<500}(C,n.lastUpdated,m,v,(()=>{var e,t;if(!(!Le(n)&&!0===(null==u?void 0:u(C)))){const r=y(n);if(void 0!==r){(null==v?void 0:v.renderer)!==r&&(null==(e=null==v?void 0:v.deprep)||e.call(v,C),v=void 0);const o=null==(t=r.drawPrep)?void 0:t.call(r,C,v);r.draw(C,n),k={deprep:null==o?void 0:o.deprep,fillStyle:null==o?void 0:o.fillStyle,font:null==o?void 0:o.font,renderer:r}}}}));return(M||S)&&(null==b||b([r,t])),k}function jt(e,t,n,r,o,i,l,a,s,c,u,d,h,f,p,g,m,v=!1){var y,w,x;if(void 0!==s){e.beginPath(),e.save(),e.rect(0,0,i,l);for(const t of s)e.rect(t.x+1,t.y+1,t.width-1,t.height-1);e.clip("evenodd")}const k=null!=(y=m.horizontalBorderColor)?y:m.borderColor,C=m.borderColor;let S=0,M=i,E=0,R=l;if(void 0!==a&&a.length>0){S=Number.MAX_SAFE_INTEGER,E=Number.MAX_SAFE_INTEGER,M=Number.MIN_SAFE_INTEGER,R=Number.MIN_SAFE_INTEGER;for(const e of a)S=Math.min(S,e.x-1),M=Math.max(M,e.x+e.width+1),E=Math.min(E,e.y-1),R=Math.max(R,e.y+e.height+1)}const O=[];e.beginPath();let I=.5;for(let b=0;b<t.length;b++){const e=t[b];if(0===e.width)continue;I+=e.width;const n=e.sticky?I:I+r;n>=S&&n<=M&&f(b+1)&&O.push({x1:n,y1:Math.max(c,E),x2:n,y2:Math.min(l,R),color:C})}const P=d(g-1),T=l-P+.5,H="sticky"===p;if(H&&O.push({x1:S,y1:T,x2:M,y2:T,color:k}),!0!==v){let e=u+.5,t=n;const r=H?l-P:l;for(;e+o<=r;){const n=e+o;if(n>=E&&n<=R-1&&(!H||t!==g-1||Math.abs(n-T)>1)){const e=null==h?void 0:h(t);O.push({x1:S,y1:n,x2:M,y2:n,color:null!=(x=null!=(w=null==e?void 0:e.horizontalBorderColor)?w:null==e?void 0:e.borderColor)?x:k})}e+=d(t),t++}}const D=b(O,(e=>e.color));for(const b of Object.keys(D)){e.strokeStyle=b;for(const t of D[b])e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2);e.stroke(),e.beginPath()}void 0!==s&&e.restore()}function Wt(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 Ut(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}var Xt=30;function Yt(e,t,n,r){return{x:e+n-Xt,y:Math.max(t,t+r/2-Xt/2),width:Xt,height:Math.min(Xt,r)}}function Kt(e,t,n,r,o,i,l,a,s,c,u,d,h,f){const p=i.title.startsWith(Re),g=Yt(t,n,r,o);if(void 0!==h){let f=i;if(p&&(f={...i,title:""}),h({ctx:e,theme:a,rect:{x:t,y:n,width:r,height:o},column:f,columnIndex:f.sourceIndex,isSelected:l,hoverAmount:u,isHovered:s,hasSelectedCell:c,spriteManager:d,menuBounds:g}))return}if(p){let l;return i.title===Oe&&(l=!0),i.title===Ie&&(l=!1),!0!==l&&(e.globalAlpha=u),Mt(e,a,l,t,n,r,o,!1,void 0,void 0,18),void(!0!==l&&(e.globalAlpha=1))}const m=a.cellHorizontalPadding,v=l?a.textHeaderSelected:a.textHeader,b=!0===i.hasMenu&&(s||f&&l);let y=t+m;if(void 0!==i.icon){let t=l?"selected":"normal";"highlight"===i.style&&(t=l?"selected":"special");const r=a.headerIconSize;d.drawSprite(i.icon,t,e,y,n+(o-r)/2,r,a),void 0!==i.overlayIcon&&d.drawSprite(i.overlayIcon,l?"selected":"special",e,y+9,n+((o-18)/2+6),18,a),y+=Math.ceil(1.3*r)}if(b&&!0===i.hasMenu&&r>35){const n=35,o=(r-n)/r,i=(r-.7*n)/r,l=e.createLinearGradient(t,0,t+r,0),a=$t(v,0);l.addColorStop(0,v),l.addColorStop(o,v),l.addColorStop(i,a),l.addColorStop(1,a),e.fillStyle=l}else e.fillStyle=v;if(e.fillText(i.title,y,n+o/2+vt(e,`${a.headerFontStyle} ${a.fontFamily}`)),b&&!0===i.hasMenu){e.beginPath();const t=g.x+g.width/2-5.5,n=g.y+g.height/2-3;!function(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,l=r/o;return{x:n,y:t.y-e.y,len:o,nx:i,ny:l,ang:Math.atan2(l,i)}};let o;const i=t.length;let l=t[i-1];for(let a=0;a<i;a++){let s=t[a%i];const c=t[(a+1)%i],u=r(s,l),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 b,y=Math.abs(Math.cos(v)*o/Math.sin(v));y>Math.min(u.len/2,d.len/2)?(y=Math.min(u.len/2,d.len/2),b=Math.abs(y*Math.sin(v)/Math.cos(v))):b=o;let w=s.x+d.nx*y,x=s.y+d.ny*y;w+=-d.ny*b*g,x+=d.nx*b*g,e.arc(w,x,b,u.ang+Math.PI/2*g,d.ang-Math.PI/2*g,m),l=s,s=c}e.closePath()}(e,[{x:t,y:n},{x:t+11,y:n},{x:t+5.5,y:n+6}],1),e.fillStyle=v,e.fill()}}function Gt(e,t,n,r,o,i,l,a,s,c,u,d,h,f,p,g,m,v,b){var y;const w=l+a;if(w<=0)return;e.fillStyle=d.bgHeader,e.fillRect(0,0,o,w);const[x,k]=null!=(y=null==r?void 0:r[0])?y:[],C=`${d.headerFontStyle} ${d.fontFamily}`;e.font=C,rn(t,0,i,0,w,((t,r,o,i)=>{var p,y,w;if(void 0!==m&&!m.some((e=>-1===e[1]&&e[0]===t.sourceIndex)))return;const S=Math.max(0,i-r);e.save(),e.beginPath(),e.rect(r+S,a,t.width-S,l),e.clip();const M=g(null!=(p=t.group)?p:"").overrideTheme,E=void 0===t.themeOverride&&void 0===M?d:{...d,...M,...t.themeOverride};E.bgHeader!==d.bgHeader&&(e.fillStyle=E.bgHeader,e.fill());const R=`${E.headerFontStyle} ${E.fontFamily}`;C!==R&&(e.font=R);const O=u.columns.hasIndex(t.sourceIndex),I=void 0!==s||c,P=!I&&-1===k&&x===t.sourceIndex,T=I?0:null!=(w=null==(y=f.find((e=>e.item[0]===t.sourceIndex&&-1===e.item[1])))?void 0:y.hoverAmount)?w:0,H=void 0!==(null==u?void 0:u.current)&&u.current.cell[0]===t.sourceIndex,D=O?E.accentColor:H?E.bgHeaderHasFocus:E.bgHeader,L=n?a:0,A=0===t.sourceIndex?0:1;O?(e.fillStyle=D,e.fillRect(r+A,L,t.width-A,l)):(H||T>0)&&(e.beginPath(),e.rect(r+A,L,t.width-A,l),H&&(e.fillStyle=E.bgHeaderHasFocus,e.fill()),T>0&&(e.globalAlpha=T,e.fillStyle=E.bgHeaderHovered,e.fill(),e.globalAlpha=1)),Kt(e,r,L,t.width,l,t,O,E,P,H,T,h,v,b),e.restore()})),n&&function(e,t,n,r,o,i,l,a,s,c,u,d){var h;const[f,p]=null!=(h=null==i?void 0:i[0])?h:[];let g=0;on(t,n,r,o,((t,n,r,s,h,m)=>{var v,b;if(void 0!==d&&!d.some((e=>-2===e[1]&&e[0]>=t[0]&&e[0]<=t[1])))return;e.save(),e.beginPath(),e.rect(r,s,h,m),e.clip();const y=u(n),w=void 0===(null==y?void 0:y.overrideTheme)?l:{...l,...y.overrideTheme},x=-2===p&&void 0!==f&&f>=t[0]&&f<=t[1],k=x?w.bgHeaderHovered:w.bgHeader;if(k!==l.bgHeader&&(e.fillStyle=k,e.fill()),e.fillStyle=null!=(v=w.textGroupHeader)?v:w.textHeader,void 0!==y){let t=r;if(void 0!==y.icon&&(a.drawSprite(y.icon,"normal",e,t+8,(o-20)/2,20,w),t+=26),e.fillText(y.name,t+8,o/2+vt(e,`${l.headerFontStyle} ${l.fontFamily}`)),void 0!==y.actions&&x){const t=Wt({x:r,y:s,width:h,height:m},y.actions);e.beginPath();const n=t[0].x-10,l=r+h-n;e.rect(n,0,l,o);const c=e.createLinearGradient(n,0,n+l,0),u=$t(k,0);c.addColorStop(0,u),c.addColorStop(10/l,k),c.addColorStop(1,k),e.fillStyle=c,e.fill(),e.globalAlpha=.6;const[d,f]=null!=(b=null==i?void 0:i[1])?b:[-1,-1];for(let o=0;o<y.actions.length;o++){const n=y.actions[o],i=t[o],l=Ut(i,d+r,f);l&&(e.globalAlpha=1),a.drawSprite(n.icon,"normal",e,i.x+i.width/2-10,i.y+i.height/2-10,20,w),l&&(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=l.borderColor,e.lineWidth=1,e.stroke()),e.restore(),g=r+h})),e.beginPath(),e.moveTo(g+.5,0),e.lineTo(g+.5,o),e.moveTo(0,o+.5),e.lineTo(n,o+.5),e.strokeStyle=l.borderColor,e.lineWidth=1,e.stroke()}(e,t,o,i,a,r,d,h,0,p,g,m)}function qt(e,t,n,r,o,i,l,a){return e<=o+l&&o<=e+n&&t<=i+a&&i<=t+r}function Zt(e,t,n,r,o,i,l,a,s,c,u,d,h,f){if(void 0===h||0===h.length)return;const p="sticky"===d?u(c-1):0;e.beginPath(),on(t,n,l,o,((t,n,r,o,i,l)=>{for(let a=0;a<h.length;a++){const n=h[a];if(-2===n[1]&&n[0]>=t[0]&&n[0]<=t[1]){e.rect(r,o,i,l);break}}})),rn(t,s,l,a,i,((t,n,l,a,s)=>{const g=Math.max(0,a-n),m=n+g+1,v=t.width-g-1;for(let r=0;r<h.length;r++){const n=h[r];if(n[0]===t.sourceIndex&&(-1===n[1]||void 0===n[1])){e.rect(m,o,v,i-o);break}}f&&nn(s,l,r,c,u,d,((n,o,i,l)=>{let a=!1;for(let e=0;e<h.length;e++){const n=h[e];if(n[0]===t.sourceIndex&&n[1]===o){a=!0;break}}if(a){const t=n+1,o=(l?t+i-1:Math.min(t+i-1,r-p))-t;o>0&&e.rect(m,t,v,o)}}))})),e.clip()}function Qt(e,t,n,r,o,i,l){var a,s;const[c,u]=e;let d,h;const f=null!=(s=null==(a=l.find((e=>!e.sticky)))?void 0:a.sourceIndex)?s:0;if(u>f){const e=Math.max(c,f);let a=t,s=r;for(let t=i.sourceIndex-1;t>=e;t--)a-=l[t].width,s+=l[t].width;for(let t=i.sourceIndex+1;t<=u;t++)s+=l[t].width;h={x:a,y:n,width:s,height:o}}if(f>c){const e=Math.min(u,f-1);let a=t,s=r;for(let t=i.sourceIndex-1;t>=c;t--)a-=l[t].width,s+=l[t].width;for(let t=i.sourceIndex+1;t<=e;t++)s+=l[t].width;d={x:a,y:n,width:s,height:o}}return[d,h]}function Jt(e,t,n,r,o,i,l,a,s,c,u,d,h,f,p,g,m,v,b,y,w,x,k,C,S,M,E,R,O,I,P){var T;let H=null!=(T=null==b?void 0:b.length)?T:Number.MAX_SAFE_INTEGER;const D=performance.now();let L,A=`${O.baseFontStyle} ${O.fontFamily}`;e.font=A;const z=new Set;return rn(t,a,i,l,o,((t,i,l,a,T)=>{var F;const $=Math.max(0,a-i),_=i+$,N=o+1,V=t.width-$,B=r-o-1;if(v.length>0){let e=!1;for(let t=0;t<v.length;t++){const n=v[t];if(qt(_,N,V,B,n.x,n.y,n.width,n.height)){e=!0;break}}if(!e)return}const j=()=>{e.save(),e.beginPath(),e.rect(_,N,V,B),e.clip()},W=y.columns.hasIndex(t.sourceIndex),U=d(null!=(F=t.group)?F:"").overrideTheme,X=void 0===t.themeOverride&&void 0===U?O:{...O,...U,...t.themeOverride},Y=`${X.baseFontStyle} ${X.fontFamily}`;let K;return Y!==A&&(A=Y,e.font=Y),j(),nn(T,l,r,s,c,m,((r,o,l,c,d)=>{var m,T,F,$;if(o<0)return;if(void 0!==b){let e=!1;for(let n=0;n<b.length;n++){const r=b[n];if(r[0]===t.sourceIndex&&r[1]===o){e=!0;break}}if(!e)return}if(v.length>0){let e=!1;for(let n=0;n<v.length;n++){const o=v[n];if(qt(i,r,t.width,l,o.x,o.y,o.width,o.height)){e=!0;break}}if(!e)return}const _=y.rows.hasIndex(o),N=f.hasIndex(o),V=o<s?u([t.sourceIndex,o]):Vt;let B=i,U=t.width,G=!1,q=!1;if(void 0!==V.span){const[s,c]=V.span,u=`${o},${s},${c},${t.sticky}`;if(z.has(u))return void H--;{const o=Qt(V.span,i,r,t.width,l,t,n),s=t.sticky?o[0]:o[1];if(t.sticky||void 0===o[0]||(q=!0),void 0!==s){B=s.x,U=s.width,z.add(u),e.restore(),K=void 0,e.save(),e.beginPath();const t=Math.max(0,a-s.x);e.rect(s.x+t,r,s.width-t,l),void 0===L&&(L=[]),L.push({x:s.x+t,y:r,width:s.width-t,height:l}),e.clip(),G=!0}}}const Z=null==h?void 0:h(o),Q=d&&void 0!==(null==(m=t.trailingRowOptions)?void 0:m.themeOverride)?null==(T=t.trailingRowOptions)?void 0:T.themeOverride:void 0,J=void 0===V.themeOverride&&void 0===Z&&void 0===Q?X:{...X,...Z,...Q,...V.themeOverride};e.beginPath();const ee=[t.sourceIndex,o],te=function(e,t,n){if(void 0===(null==n?void 0:n.current))return!1;const[r,o]=n.current.cell,[i,l]=e;return l===o&&(void 0===t.span?r===i:r>=t.span[0]&&r<=t.span[1])}(ee,V,y);let ne=function(e,t,n){let r=0;if(void 0===n.current)return r;ct(e,t,n.current.range)&&r++;for(const o of n.current.rangeStack)ct(e,t,o)&&r++;return r}(ee,V,y);const re=void 0!==V.span&&y.columns.some((e=>void 0!==V.span&&e>=V.span[0]&&e<=V.span[1]));te&&!p&&g?ne=0:te&&(ne=Math.max(ne,1)),re&&ne++,te||(_&&ne++,W&&!c&&ne++);const oe=V.kind===ge.Protected?J.bgCellMedium:J.bgCell;let ie;if((c||oe!==O.bgCell)&&(ie=_t(oe,ie)),ne>0||N){N&&(ie=_t(J.bgHeader,ie));for(let e=0;e<ne;e++)ie=_t(J.accentLight,ie)}else!0===(null==w?void 0:w.some((e=>e[0]===t.sourceIndex&&e[1]===o)))&&(ie=_t(J.bgSearchResult,ie));if(void 0!==x)for(const e of x){const n=e.range;n.x<=t.sourceIndex&&t.sourceIndex<n.x+n.width&&n.y<=o&&o<n.y+n.height&&(ie=_t(e.color,ie))}void 0!==ie&&(e.fillStyle=ie,void 0!==K&&(K.fillStyle=ie),e.fillRect(B,r,U,l)),"faded"===V.style&&(e.globalAlpha=.6);const le=M.find((e=>e.item[0]===t.sourceIndex&&e.item[1]===o));if(U>10&&!q){const n=`${J.baseFontStyle} ${J.fontFamily}`;n!==A&&(e.font=n,A=n),K=Bt(e,o,V,t.sourceIndex,B,r,U,l,ne>0,J,k,C,S,null!=(F=null==le?void 0:le.hoverAmount)?F:0,E,R,D,K,I,P)}return"faded"===V.style&&(e.globalAlpha=1),H--,G&&(e.restore(),null==($=null==K?void 0:K.deprep)||$.call(K,{ctx:e}),K=void 0,j(),A=Y,e.font=Y),H<=0})),e.restore(),H<=0})),L}function en(e,t,n,r,o,i,l,a,s,c,u,d,h,f,p,g){var m;if(void 0===u.current||!l.some((e=>{var t;return e.sourceIndex===(null==(t=u.current)?void 0:t.cell[0])})))return;const[v,b]=u.current.cell,y=h(u.current.cell),w=null!=(m=y.span)?m:[v,v],x="sticky"!==f||"sticky"===f&&b===g-1?0:d(g-1)-1;let k;if(rn(l,r,o,i,c,((r,o,i,l,c)=>{if(!(r.sticky&&v>r.sourceIndex)&&!(r.sourceIndex<w[0]||r.sourceIndex>w[1]))return nn(c,i,n,g,d,f,((i,c,u)=>{if(c!==b)return;let d=o,h=r.width;if(void 0!==y.span){const e=Qt(y.span,o,i,r.width,u,r,a),t=r.sticky?e[0]:e[1];void 0!==t&&(d=t.x,h=t.width)}return k=()=>{var o,a,c,f;l>d&&!r.sticky&&(e.beginPath(),e.rect(l,0,t-l,n),e.clip()),e.beginPath(),e.rect(d+.5,i+.5,h,u),e.strokeStyle=null!=(a=null==(o=r.themeOverride)?void 0:o.accentColor)?a:s.accentColor,e.lineWidth=1,e.stroke(),p&&(e.beginPath(),e.rect(d+h-4,i+u-4,4,4),e.fillStyle=null!=(f=null==(c=r.themeOverride)?void 0:c.accentColor)?f:s.accentColor,e.fill())},!0})),!0})),void 0===k)return;const C=()=>{e.save(),e.beginPath(),e.rect(0,c,t,n-c-x),e.clip(),null==k||k(),e.restore()};return C(),C}function tn(e,t){var n,r;const{canvas:o,headerCanvas:i,width:l,height:a,cellXOffset:s,cellYOffset:c,translateX:u,translateY:d,mappedColumns:h,enableGroups:f,freezeColumns:p,dragAndDropState:g,theme:m,drawFocus:v,headerHeight:b,groupHeaderHeight:y,disabledRows:w,rowHeight:x,verticalBorder:k,isResizing:C,selection:S,fillHandle:M,lastRowSticky:E,rows:R,getCellContent:O,getGroupDetails:I,getRowThemeOverride:P,isFocused:T,drawCustomCell:H,drawHeaderCallback:D,prelightCells:L,highlightRegions:A,imageLoader:z,lastBlitData:F,hoverValues:$,hyperWrapping:_,hoverInfo:N,spriteManager:V,scrolling:B,touchMode:j,enqueue:W,getCellRenderer:U,renderStrategy:X,bufferA:Y,bufferB:K}=e;let{damage:G}=e;if(0===l||0===a)return;const q="double-buffer"===X,Z=B?1:Math.ceil(null!=(n=window.devicePixelRatio)?n:1),Q="direct"!==X&&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.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.scrolling!==t.scrolling)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 o=e.mappedColumns[r],i=t.mappedColumns[r];if(se(o,i))continue;if(void 0!==n)return!1;if(o.width===i.width)return!1;const{width:l,...a}=o,{width:s,...c}=i;if(!se(a,c))return!1;n=r}return void 0===n||n}return!0}(e,t);o.width===l*Z&&o.height===a*Z||(o.width=l*Z,o.height=a*Z,o.style.width=l+"px",o.style.height=a+"px");const J=i,ee=f?y+b:b,te=ee+1;J.width===l*Z&&J.height===te*Z||(J.width=l*Z,J.height=te*Z,J.style.width=l+"px",J.style.height=te+"px"),!q||Y.width===l*Z&&Y.height===a*Z||(Y.width=l*Z,Y.height=a*Z),!q||K.width===l*Z&&K.height===a*Z||(K.width=l*Z,K.height=a*Z);const ne=F.current;if(!0===Q&&s===(null==ne?void 0:ne.cellXOffset)&&c===(null==ne?void 0:ne.cellYOffset)&&u===(null==ne?void 0:ne.translateX)&&d===(null==ne?void 0:ne.translateY))return;let re=null;q&&(re=o.getContext("2d",{alpha:!1}));const oe=J.getContext("2d",{alpha:!1});let le;le=q?void 0!==G?"b"===(null==ne?void 0:ne.lastBuffer)?K:Y:"b"===(null==ne?void 0:ne.lastBuffer)?Y:K:o;const ae=le.getContext("2d",{alpha:!1}),ce=q?le===Y?K:Y:o;if(null===oe||null===ae)return;const ue="number"===typeof x?()=>x:x;oe.save(),oe.beginPath(),ae.save(),ae.beginPath(),oe.textBaseline="middle",ae.textBaseline="middle",1!==Z&&(oe.scale(Z,Z),ae.scale(Z,Z));const de=ht(h,s,l,g,u);let he=[];const fe=v&&(null==(r=S.current)?void 0:r.cell[1])===c&&0===d,pe=()=>{var e,t;Gt(oe,de,f,N,l,u,b,y,g,C,S,m,V,$,k,I,G,D,j),jt(oe,de,c,u,d,l,a,void 0,void 0,y,ee,ue,P,k,E,R,m,!0),oe.beginPath(),oe.moveTo(0,te-.5),oe.lineTo(l,te-.5),oe.strokeStyle=_t(null!=(t=null!=(e=m.headerBottomBorderColor)?e:m.horizontalBorderColor)?t:m.borderColor,m.bgHeader),oe.stroke(),fe&&en(oe,l,a,c,u,d,de,h,m,ee,S,ue,O,E,M,R)};if(void 0!==G){let e=!1;return G=G.filter((t=>(e=e||t[1]<0,t[1]<0||qt(s,c,de.length,300,t[0],t[1],1,1)||qt(0,c,p,300,t[0],t[1],1,1)||E&&qt(s,R-1,de.length,1,t[0],t[1],1,1)))),G.length>0&&(Zt(ae,de,l,a,y,ee,u,d,c,R,ue,E,G,!0),ae.fillStyle=m.bgCell,ae.fillRect(0,ee+1,l,a-ee-1),Jt(ae,de,h,a,ee,u,d,c,R,ue,O,I,P,w,T,v,E,he,G,S,L,A,H,z,V,$,N,_,m,W,U),M&&v&&void 0!==S.current&&G.some((e=>{var t,n;return e[0]===(null==(t=S.current)?void 0:t.cell[0])&&e[1]===(null==(n=S.current)?void 0:n.cell[1])}))&&en(ae,l,a,c,u,d,de,h,m,ee,S,ue,O,E,M,R)),e&&(Zt(oe,de,l,ee,y,ee,u,d,c,R,ue,E,G,!1),pe()),ae.restore(),oe.restore(),void(null!==re&&(re.fillStyle=m.bgCell,re.fillRect(0,0,l,a),re.drawImage(ae.canvas,0,0)))}if(!0===Q&&s===(null==ne?void 0:ne.cellXOffset)&&u===(null==ne?void 0:ne.translateX)&&fe===(null==ne?void 0:ne.mustDrawFocusOnHeader)||pe(),!0===Q){ie(void 0!==ce&&void 0!==ne);const{regions:e}=function(e,t,n,r,o,i,l,a,s,c,u,d,h,f,p,g,m){const v=[];let b=!1;e.imageSmoothingEnabled=!1;const y=Math.min(n.cellYOffset,o),w=Math.max(n.cellYOffset,o);let x=0;if("number"===typeof g)x+=(w-y)*g;else for(let I=y;I<w;I++)x+=g(I);o>n.cellYOffset&&(x=-x),x+=l-n.translateY;const k=Math.min(n.cellXOffset,r),C=Math.max(n.cellXOffset,r);let S=0;for(let I=k;I<C;I++)S+=f[I].width;r>n.cellXOffset&&(S=-S),S+=i-n.translateX;let M=dt(p);if(M>0&&M++,0!==S&&0!==x)return{regions:[],yOnly:!1};const E=a?"number"===typeof g?g:g(u-1):0,R=s-M-Math.abs(S),O=c-d-E-Math.abs(x)-1;if(R>150&&O>150){b=0===S;const n={sx:0,sy:0,sw:s*h,sh:c*h,dx:0,dy:0,dw:s*h,dh:c*h};x>0?(n.sy=(d+1)*h,n.sh=O*h,n.dy=(x+d+1)*h,n.dh=O*h,v.push({x:0,y:d,width:s,height:x+1})):x<0&&(n.sy=(-x+d+1)*h,n.sh=O*h,n.dy=(d+1)*h,n.dh=O*h,v.push({x:0,y:c+x-E,width:s,height:-x+E})),S>0?(n.sx=M*h,n.sw=R*h,n.dx=(S+M)*h,n.dw=R*h,v.push({x:M-1,y:0,width:S+2,height:c})):S<0&&(n.sx=(M-S)*h,n.sw=R*h,n.dx=M*h,n.dw=R*h,v.push({x:s+S,y:0,width:-S,height:c})),e.setTransform(1,0,0,1,0,0),M>0&&0!==S&&0===x&&m&&e.drawImage(t,0,0,M*h,c*h,0,0,M*h,c*h),e.drawImage(t,n.sx,n.sy,n.sw,n.sh,n.dx,n.dy,n.dw,n.dh),e.scale(h,h)}return e.imageSmoothingEnabled=!0,{regions:v,yOnly:b}}(ae,ce,ne,s,c,u,d,"sticky"===E,l,a,R,ee,Z,h,de,x,q);he=e}else if(!1!==Q){ie(void 0!==ne);he=function(e,t,n,r,o,i,l,a,s,c){const u=[];return t!==e.cellXOffset||n!==e.cellYOffset||r!==e.translateX||o!==e.translateY||rn(s,n,r,o,a,((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:l}),!0}})),u}(ne,s,c,u,d,l,a,ee,de,Q)}!function(e,t,n,r,o,i,l,a,s){var c;let u=!1;for(const p of t)if(!p.sticky){u=l(p.sourceIndex);break}const d=null!=(c=s.horizontalBorderColor)?c:s.borderColor,h=s.borderColor,f=u?dt(t):0;if(0!==f&&(e.beginPath(),e.moveTo(f+.5,0),e.lineTo(f+.5,r),e.strokeStyle=_t(h,s.bgCell),e.stroke()),o){const t=a(i-1);e.beginPath(),e.moveTo(0,r-t+.5),e.lineTo(n,r-t+.5),e.strokeStyle=_t(d,s.bgCell),e.stroke()}}(ae,de,l,a,"sticky"===E,R,k,ue,m);const ge=v?en(ae,l,a,c,u,d,de,h,m,ee,S,ue,O,E,M,R):void 0,me=function(e,t,n,r,o,i,l,a,s,c,u,d,h,f,p){const g=null==p?void 0:p.filter((e=>"no-outline"!==e.style));if(void 0===g||0===g.length)return;const m=g.map((e=>{var p,g,m,v,b;const y=e.range,w=Tt(y.x,y.y,t,n,u,c+u,r,o,i,l,f,s,h,a,d);if(1===y.width&&1===y.height)return y.x<s?[{color:e.color,style:null!=(p=e.style)?p:"dashed",rect:w},void 0]:[void 0,{color:e.color,style:null!=(g=e.style)?g:"dashed",rect:w}];const x=Tt(y.x+y.width-1,y.y+y.height-1,t,n,u,c+u,r,o,i,l,f,s,h,a,d);if(y.x<s&&y.x+y.width>=s){const p=Tt(s-1,y.y+y.height-1,t,n,u,c+u,r,o,i,l,f,s,h,a,d),g=Tt(s,y.y+y.height-1,t,n,u,c+u,r,o,i,l,f,s,h,a,d);return[{color:e.color,style:null!=(m=e.style)?m:"dashed",rect:{x:w.x,y:w.y,width:p.x+p.width-w.x,height:p.y+p.height-w.y}},{color:e.color,style:null!=(v=e.style)?v:"dashed",rect:{x:g.x,y:g.y,width:x.x+x.width-g.x,height:x.y+x.height-g.y}}]}return[void 0,{color:e.color,style:null!=(b=e.style)?b:"dashed",rect:{x:w.x,y:w.y,width:x.x+x.width-w.x,height:x.y+x.height-w.y}}]})),v=dt(a),b=()=>{e.beginPath(),e.save();let r=!1;const o=t=>{r!==t&&(e.setLineDash(t?[5,3]:[]),r=t)};e.lineWidth=1;for(const l of m){const[r]=l;void 0!==r&&qt(0,0,t,n,r.rect.x,r.rect.y,r.rect.width,r.rect.height)&&(o("dashed"===r.style),e.strokeStyle=$t(r.color,1),e.strokeRect(r.rect.x+1,r.rect.y+1,r.rect.width-2,r.rect.height-2))}let i=!1;for(const l of m){const[,r]=l;void 0!==r&&qt(0,0,t,n,r.rect.x,r.rect.y,r.rect.width,r.rect.height)&&(o("dashed"===r.style),!i&&r.rect.x<v&&(e.rect(v,0,t,n),e.clip(),i=!0),e.strokeStyle=$t(r.color,1),e.strokeRect(r.rect.x+1,r.rect.y+1,r.rect.width-2,r.rect.height-2))}e.restore()};return b(),b}(ae,l,a,s,c,u,d,h,p,b,y,x,"sticky"===E,R,A);if(ae.fillStyle=m.bgCell,he.length>0){ae.beginPath();for(const e of he)ae.rect(e.x,e.y,e.width,e.height);ae.clip(),ae.fill(),ae.beginPath()}else ae.fillRect(0,0,l,a);const ve=Jt(ae,de,h,a,ee,u,d,c,R,ue,O,I,P,w,T,v,E,he,G,S,L,A,H,z,V,$,N,_,m,W,U);!function(e,t,n,r,o,i,l,a,s,c,u,d,h,f,p,g,m,v){void 0===m&&t[t.length-1]===n[t.length-1]&&rn(t,s,l,a,i,((n,l,a,s,m)=>{if(n!==t[t.length-1])return;l+=n.width;const b=Math.max(l,s);b>r||(e.save(),e.beginPath(),e.rect(b,i+1,1e4,o-i-1),e.clip(),nn(m,a,o,c,u,p,((t,n,r,o)=>{if(!o&&g.length>0&&!g.some((e=>qt(l,t,1e4,r,e.x,e.y,e.width,e.height))))return;const i=h.hasIndex(n),a=f.hasIndex(n);e.beginPath();const s=null==d?void 0:d(n),c=void 0===s?v:{...v,...s};c.bgCell!==v.bgCell&&(e.fillStyle=c.bgCell,e.fillRect(l,t,1e4,r)),a&&(e.fillStyle=c.bgHeader,e.fillRect(l,t,1e4,r)),i&&(e.fillStyle=c.accentLight,e.fillRect(l,t,1e4,r))})),e.restore())}))}(ae,de,h,l,a,ee,u,d,c,R,ue,P,S.rows,w,E,he,G,m),jt(ae,de,c,u,d,l,a,he,ve,y,ee,ue,P,k,E,R,m),null==ge||ge(),null==me||me(),null!==re&&(re.fillStyle=m.bgCell,re.fillRect(0,0,l,a),re.drawImage(ae.canvas,0,0));const be=function(e,t,n,r,o,i,l,a,s){let c=0;return rn(e,i,r,o,n,((e,n,r,o,i)=>(nn(i,r,t,l,a,s,((e,t,n,r)=>{r||(c=Math.max(t,c))})),!0))),c}(de,a,ee,u,d,c,R,ue,E);null==z||z.setWindow({x:s,y:c,width:de.length,height:be-c},p),F.current={cellXOffset:s,cellYOffset:c,translateX:u,translateY:d,mustDrawFocusOnHeader:fe,lastBuffer:q?le===Y?"a":"b":void 0},ae.restore(),oe.restore()}function nn(e,t,n,r,o,i,l){let a=t,s=e,c="sticky"===i;for(;a<n||c;){const e=c&&a>=n;e&&(c=!1,s=r-1);const t=o(s);e&&(a=n-t);if(!(c&&s===r-1)&&!0===l(a,s,t,e,"none"!==i&&s===r-1))break;if(e)break;a+=t,s++}}function rn(e,t,n,r,o,i){let l=0,a=0;const s=o+r;for(const c of e){if(!0===i(c,c.sticky?a:l+n,s,a,t))break;l+=c.width,a+=c.sticky?c.width:0}}function on(e,t,n,r,o){var i;let l=0,a=0;for(let s=0;s<e.length;s++){const c=e[s];let u=s+1,d=c.width;for(c.sticky&&(a+=d);u<e.length&&st(e[u].group,c.group)&&e[u].sticky===e[s].sticky;){const t=e[u];d+=t.width,u++,s++,t.sticky&&(a+=t.width)}const h=l+(c.sticky?0:n),f=c.sticky?0:Math.max(0,a-h),p=Math.min(d-f,t-(h+f));o([c.sourceIndex,e[u-1].sourceIndex],null!=(i=c.group)?i:"",h+f,0,p,r),l+=d}}function ln(e){const t=e-1;return t*t*t+1}var an=class{constructor(e){this.fn=e}get value(){var e;return null!=(e=this.val)?e:this.val=this.fn()}};function sn(e){return new an(e)}var cn=sn((()=>window.navigator.userAgent.includes("Firefox"))),un=sn((()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome"))),dn=sn((()=>window.navigator.platform.toLowerCase().startsWith("mac")));var hn=o.memo(o.forwardRef(((e,t)=>{var n,r,l,a,u,d,h,f;const{width:p,height:g,accessibilityHeight:m,columns:v,cellXOffset:b,cellYOffset:y,headerHeight:w,fillHandle:x=!1,groupHeaderHeight:k,rowHeight:C,rows:S,getCellContent:M,getRowThemeOverride:E,onHeaderMenuClick:R,enableGroups:O,isFilling:I,onCanvasFocused:P,onCanvasBlur:T,isFocused:H,selection:D,freezeColumns:L,onContextMenu:A,trailingRowType:z,fixedShadowX:F=!0,fixedShadowY:$=!0,drawFocusRing:_=!0,onMouseDown:N,onMouseUp:V,onMouseMoveRaw:B,onMouseMove:j,onItemHovered:W,dragAndDropState:U,firstColAccessible:X,onKeyDown:Y,onKeyUp:K,highlightRegions:G,canvasRef:q,onDragStart:Z,onDragEnd:Q,eventTargetRef:J,isResizing:ee,isDragging:te,isDraggable:ne=!1,allowResize:re,disabledRows:oe,getGroupDetails:le,theme:ae,prelightCells:se,headerIcons:ce,verticalBorder:ue,drawHeader:de,drawCustomCell:he,onCellFocused:fe,onDragOverCell:pe,onDrop:me,onDragLeave:ve,imageWindowLoader:be,smoothScrollX:ye=!1,smoothScrollY:we=!1,experimental:Me,getCellRenderer:Ee}=e,Re=null!=(n=e.translateX)?n:0,Oe=null!=(r=e.translateY)?r:0,Ie=Math.max(L,Math.min(v.length-1,b)),Pe=o.useRef(null),Te=o.useMemo((()=>new Ge),[]),He=null!=be?be:Te,De=o.useRef(),[ze,$e]=o.useState(!1),Ne=o.useRef([]),Ve=o.useRef(),[Be,je]=o.useState(),[We,Ue]=o.useState(),Xe=o.useRef(null),[Ye,Ke]=o.useState(!1),Ze=o.useRef(Ye);Ze.current=Ye;const Qe=o.useMemo((()=>new class{constructor(e,t){this.onSettled=t,this.spriteMap=new Map,this.inFlight=0,this.headerIcons={...Lt,...e}}drawSprite(e,t,n,r,o,i,l,a=1){const[s,c]=function(e,t){return"normal"===e?[t.bgIconHeader,t.fgIconHeader]:"selected"===e?["white",t.accentColor]:[t.accentColor,t.bgHeader]}(t,l),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 a<1&&(n.globalAlpha=a),n.drawImage(h,0,0,u,u,r,o,i,i),a<1&&(n.globalAlpha=1)}}(ce,(()=>{ut.current=void 0,pt.current()}))),[ce]),Je=O?k+w:w,et=o.useRef(-1),tt=!0!==(null==Me?void 0:Me.enableFirefoxRescaling);o.useLayoutEffect((()=>{cn.value&&1!==window.devicePixelRatio&&!tt&&(-1!==et.current&&$e(!0),window.clearTimeout(et.current),et.current=window.setTimeout((()=>{$e(!1),et.current=-1}),200))}),[y,Ie,Re,Oe,tt]);const nt=function(e,t){return o.useMemo((()=>e.map(((e,n)=>({...e,sourceIndex:n,sticky:n<t})))),[e,t])}(v,L),rt=o.useCallback(((e,t,n)=>{const r=e.getBoundingClientRect();if(t>=nt.length||n>=S)return;const o=r.width/p,i=Tt(t,n,p,g,k,Je,Ie,y,Re,Oe,S,L,"sticky"===z,nt,C);return 1!==o&&(i.x*=o,i.y*=o,i.width*=o,i.height*=o),i.x+=r.x,i.y+=r.y,i}),[p,g,k,Je,Ie,y,Re,Oe,S,L,z,nt,C]),ot=o.useCallback(((e,t,n,r)=>{var o,i;const l=e.getBoundingClientRect(),a=l.width/p,s=(t-l.left)/a,c=(n-l.top)/a,u=ht(nt,Ie,p,void 0,Re);let d=0;r instanceof MouseEvent&&(d=r.button);const h=function(e,t,n){let r=0;for(const o of t){if(e<=(o.sticky?r:r+(null!=n?n:0))+o.width)return o.sourceIndex;r+=o.width}return-1}(s,u,Re),f=function(e,t,n,r,o,i,l,a,s,c){const u=r+o;if(n&&e<=o)return-2;if(e<=u)return-1;const d="number"===typeof l?l:l(i-1);if(c&&e>t-d)return i-1;const h=i-(c?1:0),f=e-(null!=s?s:0);if("number"===typeof l){const e=Math.floor((f-u)/l)+a;if(e>=h)return;return e}{let e=u;for(let t=a;t<h;t++){const n=l(t);if(f<=e+n)return t;e+=n}return}}(c,g,O,w,k,S,C,y,Oe,"sticky"===z),m=!0===(null==r?void 0:r.shiftKey),v=!0===(null==r?void 0:r.ctrlKey),b=!0===(null==r?void 0:r.metaKey),M=void 0!==r&&!(r instanceof MouseEvent)||"touch"===(null==r?void 0:r.pointerType),E=[Math.abs(s)<20?-1:Math.abs(l.width-s)<20?1:0,Math.abs(c)<20?-1:Math.abs(l.height-c)<20?1:0];let R;if(-1===h||c<0||s<0||void 0===f||s>p||c>g){const n=s>p?-1:s<0?1:0,r=c>g?1:c<0?-1:0;let o=!1;if(-1===h&&-1===f){const n=rt(e,nt.length-1,-1);ie(void 0!==n),o=t<n.x+n.width+5}R={kind:Ce,location:[-1!==h?h:s<0?0:nt.length-1,null!=f?f:S-1],direction:[n,r],shiftKey:m,ctrlKey:v,metaKey:b,isEdge:o,isTouch:M,button:d,scrollEdge:E}}else if(f<=-1){let r=rt(e,h,f);ie(void 0!==r);let l=void 0!==r&&r.x+r.width-t<=5;const a=h-1;t-r.x<=5&&a>=0?(l=!0,r=rt(e,a,f),ie(void 0!==r),R={kind:O&&-2===f?ke:xe,location:[a,f],bounds:r,group:null!=(o=nt[a].group)?o:"",isEdge:l,shiftKey:m,ctrlKey:v,metaKey:b,isTouch:M,localEventX:t-r.x,localEventY:n-r.y,button:d,scrollEdge:E}):R={kind:O&&-2===f?ke:xe,group:null!=(i=nt[h].group)?i:"",location:[h,f],bounds:r,isEdge:l,shiftKey:m,ctrlKey:v,metaKey:b,isTouch:M,localEventX:t-r.x,localEventY:n-r.y,button:d,scrollEdge:E}}else{const r=rt(e,h,f);ie(void 0!==r);R={kind:"cell",location:[h,f],bounds:r,isEdge:void 0!==r&&r.x+r.width-t<5,shiftKey:m,ctrlKey:v,isFillHandle:x&&void 0!==r&&r.x+r.width-t<6&&r.y+r.height-n<6,metaKey:b,isTouch:M,localEventX:t-r.x,localEventY:n-r.y,button:d,scrollEdge:E}}return R}),[nt,Ie,p,Re,g,O,w,k,S,C,y,Oe,z,rt,x]);const[it]=null!=Be?Be:[],lt=o.useRef((e=>{})),at=o.useRef(Be);at.current=Be;const[st,ct]=o.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,t]}),[]);o.useLayoutEffect((()=>(document.documentElement.append(st),document.documentElement.append(ct),()=>{st.remove(),ct.remove()})),[st,ct]);const ut=o.useRef(),ft=o.useCallback((()=>{var e,t;const n=Pe.current,r=Xe.current;if(null===n||null===r)return;const o=ut.current,i={canvas:n,bufferA:st,bufferB:ct,headerCanvas:r,width:p,height:g,cellXOffset:Ie,cellYOffset:y,translateX:Math.round(Re),translateY:Math.round(Oe),mappedColumns:nt,enableGroups:O,freezeColumns:L,dragAndDropState:U,theme:ae,headerHeight:w,groupHeaderHeight:k,disabledRows:null!=oe?oe:_e.empty(),rowHeight:C,verticalBorder:ue,isResizing:ee,isFocused:H,selection:D,fillHandle:x,lastRowSticky:z,rows:S,drawFocus:_,getCellContent:M,getGroupDetails:null!=le?le:e=>({name:e}),getRowThemeOverride:E,drawCustomCell:he,drawHeaderCallback:de,prelightCells:se,highlightRegions:G,imageLoader:He,lastBlitData:Ve,damage:De.current,hoverValues:Ne.current,hoverInfo:at.current,spriteManager:Qe,scrolling:ze,hyperWrapping:null!=(e=null==Me?void 0:Me.hyperWrapping)&&e,touchMode:Ye,enqueue:lt.current,renderStrategy:null!=(t=null==Me?void 0:Me.renderStrategy)?t:un.value?"double-buffer":"single-buffer",getCellRenderer:Ee};void 0===i.damage?(ut.current=i,tn(i,o)):tn(i,void 0)}),[st,ct,p,g,Ie,y,Re,Oe,nt,O,L,U,ae,w,k,oe,C,ue,ee,H,D,x,z,S,_,M,le,E,he,de,se,G,He,Qe,ze,null==Me?void 0:Me.hyperWrapping,null==Me?void 0:Me.renderStrategy,Ye,Ee]),pt=o.useRef(ft);o.useLayoutEffect((()=>{ft(),pt.current=ft}),[ft]),o.useLayoutEffect((()=>{(async()=>{var e;void 0!==(null==(e=null==document?void 0:document.fonts)?void 0:e.ready)&&(await document.fonts.ready,ut.current=void 0,pt.current())})()}),[]);const gt=o.useCallback((e=>{De.current=e,pt.current(),De.current=void 0}),[]),mt=function(e){const t=o.useRef([]),n=o.useRef(0),r=o.useRef(e);r.current=e;const i=o.useCallback((()=>{const e=()=>{const e=t.current;t.current=[],r.current(e),t.current.length>0?n.current++:n.current=0};window.requestAnimationFrame(n.current>600?()=>window.requestAnimationFrame(e):e)}),[]);return o.useCallback((e=>{(function(e,t){for(const n of e)if(n[0]===t[0]&&n[1]===t[1])return!0;return!1})(t.current,e)||(0===t.current.length&&i(),t.current.push(e))}),[i])}(gt);lt.current=mt;const vt=o.useCallback((e=>{gt(e.map((e=>e.cell)))}),[gt]);He.setCallback(gt);const[bt,yt]=o.useState(!1),[wt,xt]=null!=it?it:[],kt=void 0!==wt&&-1===xt,Ct=void 0!==wt&&-2===xt;let St,Mt=!1,Et=!1;if(void 0!==wt&&void 0!==xt&&xt>-1){const e=M([wt,xt],!0);Mt=e.kind===Se.NewRow||e.kind===Se.Marker&&"number"!==e.markerKind,Et=e.kind===ge.Boolean&&Fe(e),St=e.cursor}const Rt=te?"grabbing":null!=We&&We||ee?"col-resize":bt||I?"crosshair":void 0!==St?St:kt||Mt||Et||Ct?"pointer":"default",Ot=o.useMemo((()=>({contain:"strict",display:"block",cursor:Rt})),[Rt]),It=o.useRef("default"),Pt=null==J?void 0:J.current;null!==Pt&&void 0!==Pt&&It.current!==Ot.cursor&&(Pt.style.cursor=It.current=Ot.cursor);const Ht=o.useCallback(((e,t,n,r)=>{if(void 0===le)return;const o=le(e);if(void 0!==o.actions){const e=Wt(t,o.actions);for(const[i,l]of e.entries())if(Ut(l,n+t.x,r+l.y))return o.actions[i]}}),[le]),Dt=o.useCallback(((e,t,n,r)=>{const o=v[t];if(!te&&!ee&&!0===o.hasMenu&&(null==We||!We)){const o=rt(e,t,-1);ie(void 0!==o);const i=Yt(o.x,o.y,o.width,o.height);if(n>i.x&&n<i.x+i.width&&r>i.y&&r<i.y+i.height)return o}}),[v,rt,We,te,ee]),At=o.useRef(0),zt=o.useRef(),Ft=o.useCallback((e=>{const t=Pe.current,n=null==J?void 0:J.current;if(null===t||e.target!==t&&e.target!==n)return;let r,o;if(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.left+n.clientWidth)return;if(o>e.top+n.clientHeight)return}const i=ot(t,r,o,e);if(zt.current=i.location,i.isTouch&&(At.current=Date.now()),Ze.current!==i.isTouch&&Ke(i.isTouch),i.kind!==xe||void 0===Dt(t,i.location[0],r,o)){if(i.kind===ke){if(void 0!==Ht(i.group,i.bounds,i.localEventX,i.localEventY))return}null==N||N(i),i.isTouch||!0===ne||ne===i.kind||e.preventDefault()}}),[J,ne,ot,Ht,Dt,N]);qe("touchstart",Ft,window,!1),qe("mousedown",Ft,window,!1);const $t=o.useCallback((e=>{var t,n;const r=Pe.current;if(void 0===V||null===r)return;const o=null==J?void 0:J.current,i=e.target!==r&&e.target!==o;let l,a;if(e instanceof MouseEvent){if(l=e.clientX,a=e.clientY,"touch"===e.pointerType)return}else l=e.changedTouches[0].clientX,a=e.changedTouches[0].clientY;let s=ot(r,l,a,e);s.isTouch&&0!==At.current&&Date.now()-At.current>500&&(s={...s,isLongTouch:!0}),Ze.current!==s.isTouch&&Ke(s.isTouch),!i&&e.cancelable&&e.preventDefault();const[c]=s.location,u=Dt(r,c,l,a);if(s.kind!==xe||void 0===u){if(s.kind===ke){const e=Ht(s.group,s.bounds,s.localEventX,s.localEventY);if(void 0!==e)return void(0===s.button&&e.onClick(s))}V(s,i)}else 0===s.button&&(null==(t=zt.current)?void 0:t[0])===c&&-1===(null==(n=zt.current)?void 0:n[1])||V(s,!0)}),[V,J,ot,Dt,Ht]);qe("mouseup",$t,window,!1),qe("touchend",$t,window,!1);qe("click",o.useCallback((e=>{var t,n;const r=Pe.current;if(null===r)return;const o=null==J?void 0:J.current,i=e.target!==r&&e.target!==o;let l,a;e instanceof MouseEvent?(l=e.clientX,a=e.clientY):(l=e.changedTouches[0].clientX,a=e.changedTouches[0].clientY);const s=ot(r,l,a,e);Ze.current!==s.isTouch&&Ke(s.isTouch),!i&&e.cancelable&&e.preventDefault();const[c]=s.location,u=Dt(r,c,l,a);if(s.kind===xe&&void 0!==u)0===s.button&&(null==(t=zt.current)?void 0:t[0])===c&&-1===(null==(n=zt.current)?void 0:n[1])&&(null==R||R(c,u));else if(s.kind===ke){const e=Ht(s.group,s.bounds,s.localEventX,s.localEventY);void 0!==e&&0===s.button&&e.onClick(s)}}),[J,ot,Dt,R,Ht]),window,!1);qe("contextmenu",o.useCallback((e=>{const t=Pe.current;if(null===t||void 0===A)return;const n=ot(t,e.clientX,e.clientY,e);A(n,(()=>{e.cancelable&&e.preventDefault()}))}),[ot,A]),null!=(l=null==J?void 0:J.current)?l:null,!1);const _t=o.useCallback((e=>{De.current=e.map((e=>e.item)),Ne.current=e,pt.current(),De.current=void 0}),[]),Nt=o.useMemo((()=>new class{constructor(e){this.callback=e,this.currentHoveredItem=void 0,this.leavingItems=[],this.areSameItems=(e,t)=>(null==e?void 0:e[0])===(null==t?void 0:t[0])&&(null==e?void 0:e[1])===(null==t?void 0:t[1]),this.addToLeavingItems=e=>{this.leavingItems.some((t=>this.areSameItems(t.item,e.item)))||this.leavingItems.push(e)},this.removeFromLeavingItems=e=>{var t;const n=this.leavingItems.find((t=>this.areSameItems(t.item,e)));return this.leavingItems=this.leavingItems.filter((e=>e!==n)),null!=(t=null==n?void 0:n.hoverAmount)?t:0},this.cleanUpLeavingElements=()=>{this.leavingItems=this.leavingItems.filter((e=>e.hoverAmount>0))},this.shouldStep=()=>{const e=this.leavingItems.length>0,t=void 0!==this.currentHoveredItem&&this.currentHoveredItem.hoverAmount<1;return e||t},this.getAnimatingItems=()=>void 0!==this.currentHoveredItem?[...this.leavingItems,this.currentHoveredItem]:this.leavingItems.map((e=>({...e,hoverAmount:ln(e.hoverAmount)}))),this.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},this.setHovered=e=>{var t;if(!this.areSameItems(null==(t=this.currentHoveredItem)?void 0:t.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)}}}}(_t)),[_t]),Vt=o.useRef(Nt);Vt.current=Nt,o.useLayoutEffect((()=>{const e=Vt.current;if(void 0===it||it[1]<0)return void e.setHovered(it);const t=M(it),n=Ee(t);e.setHovered(void 0===n&&t.kind===ge.Custom||!0===(null==n?void 0:n.needsHover)?it:void 0)}),[M,Ee,it]);const jt=o.useRef();qe("mousemove",o.useCallback((e=>{var t;const n=Pe.current;if(null===n)return;const r=ot(n,e.clientX,e.clientY,e);if(o=r,i=jt.current,o===i||(null==o?void 0:o.kind)===(null==i?void 0:i.kind)&&(null==o?void 0:o.location[0])===(null==i?void 0:i.location[0])&&(null==o?void 0:o.location[1])===(null==i?void 0:i.location[1])){if("cell"===r.kind||r.kind===xe||r.kind===ke){const e=[r.location,[r.localEventX,r.localEventY]];if(je(e),at.current=e,"cell"===r.kind){const e=M(r.location);e.kind!==ge.Custom&&!0!==(null==(t=Ee(e))?void 0:t.needsHoverPosition)||gt([r.location])}else r.kind===ke&>([r.location])}}else null==W||W(r),je(r.kind===Ce?void 0:[r.location,[r.localEventX,r.localEventY]]),jt.current=r;var o,i;const l=r.location[0]>=(X?0:1);if(Ue(r.kind===xe&&r.isEdge&&l&&!0===re),x&&void 0!==D.current){const[t,r]=D.current.cell,o=rt(n,t,r),i=e.clientX,l=e.clientY;ie(void 0!==o),yt(i>=o.x+o.width-6&&i<=o.x+o.width&&l>=o.y+o.height-6&&l<=o.y+o.height)}else yt(!1);null==B||B(e),j(r)}),[ot,re,x,D,B,j,W,M,Ee,gt,rt,X]),window,!0);const Xt=o.useCallback((e=>{const t=Pe.current;if(null===t)return;let n;void 0!==D.current&&(n=rt(t,D.current.cell[0],D.current.cell[1])),null==Y||Y({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})}),[Y,D,rt]),Gt=o.useCallback((e=>{const t=Pe.current;if(null===t)return;let n;void 0!==D.current&&(n=rt(t,D.current.cell[0],D.current.cell[1])),null==K||K({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})}),[K,D,rt]),qt=o.useCallback((e=>{Pe.current=e,void 0!==q&&(q.current=e)}),[q]);qe("dragstart",o.useCallback((e=>{const t=Pe.current;if(null===t||!1===ne||ee)return void e.preventDefault();let n,r;const o=ot(t,e.clientX,e.clientY);if(!0!==ne&&o.kind!==ne)return void e.preventDefault();let i,l,a;let s=!1;if(null==Z||Z({...o,setData:(e,t)=>{n=e,r=t},setDragImage:(e,t,n)=>{i=e,l=t,a=n},preventDefault:()=>s=!0,defaultPrevented:()=>s}),s||void 0===n||void 0===r||null===e.dataTransfer)e.preventDefault();else if(e.dataTransfer.setData(n,r),e.dataTransfer.effectAllowed="copyLink",void 0!==i&&void 0!==l&&void 0!==a)e.dataTransfer.setDragImage(i,l,a);else{const[n,r]=o.location;if(void 0!==r){const o=document.createElement("canvas"),i=rt(t,n,r);ie(void 0!==i),o.width=i.width,o.height=i.height;const l=o.getContext("2d");null!==l&&(l.textBaseline="middle",-1===r?(l.font=`${ae.headerFontStyle} ${ae.fontFamily}`,l.fillStyle=ae.bgHeader,l.fillRect(0,0,o.width,o.height),Kt(l,0,0,i.width,i.height,nt[n],!1,ae,!1,!1,0,Qe,de,!1)):(l.font=`${ae.baseFontStyle} ${ae.fontFamily}`,l.fillStyle=ae.bgCell,l.fillRect(0,0,o.width,o.height),Bt(l,r,M([n,r]),0,0,0,i.width,i.height,!1,ae,he,He,Qe,1,void 0,!1,0,void 0,void 0,Ee))),o.style.left="-100%",o.style.position="absolute",document.body.append(o),e.dataTransfer.setDragImage(o,i.width/2,i.height/2),window.setTimeout((()=>{o.remove()}),0)}}}),[ne,ee,ot,Z,rt,ae,nt,Qe,de,M,he,He,Ee]),null!=(a=null==J?void 0:J.current)?a:null,!1,!1);const Zt=o.useRef();qe("dragover",o.useCallback((e=>{var t;const n=Pe.current;if(void 0!==me&&e.preventDefault(),null===n||void 0===pe)return;const r=ot(n,e.clientX,e.clientY),[o,i]=r.location,l=o-(X?0:1),[a,s]=null!=(t=Zt.current)?t:[];a===l&&s===i||(Zt.current=[l,i],pe([l,i],e.dataTransfer))}),[X,ot,pe,me]),null!=(u=null==J?void 0:J.current)?u:null,!1,!1);qe("dragend",o.useCallback((()=>{Zt.current=void 0,null==Q||Q()}),[Q]),null!=(d=null==J?void 0:J.current)?d:null,!1,!1);qe("drop",o.useCallback((e=>{const t=Pe.current;if(null===t||void 0===me)return;e.preventDefault();const n=ot(t,e.clientX,e.clientY),[r,o]=n.location;me([r-(X?0:1),o],e.dataTransfer)}),[X,ot,me]),null!=(h=null==J?void 0:J.current)?h:null,!1,!1);qe("dragleave",o.useCallback((()=>{null==ve||ve()}),[ve]),null!=(f=null==J?void 0:J.current)?f:null,!1,!1);const Qt=o.useRef(D);Qt.current=D;const Jt=o.useRef(null),en=o.useCallback((e=>{var t;null!==Pe.current&&Pe.current.contains(document.activeElement)&&(null===e&&void 0!==Qt.current.current?null==(t=null==q?void 0:q.current)||t.focus({preventScroll:!0}):null!==e&&e.focus({preventScroll:!0}),Jt.current=e)}),[q]);o.useImperativeHandle(t,(()=>({focus:()=>{var e;const t=Jt.current;null!==t&&document.contains(t)?t.focus({preventScroll:!0}):null==(e=null==q?void 0:q.current)||e.focus({preventScroll:!0})},getBounds:(e,t)=>{if(void 0!==q&&null!==q.current)return rt(q.current,e,null!=t?t:-1)},damage:vt})),[q,vt,rt]);const nn=o.useRef(),rn=function(e,t,n){const[r,i]=o.useState(e),l=o.useRef(!0);o.useEffect((()=>()=>{l.current=!1}),[]);const a=o.useRef(c((e=>{l.current&&i(e)}),n));return o.useLayoutEffect((()=>{l.current&&a.current((()=>e()))}),t),r}((()=>{var e,t,n,r;if(p<50)return null;let i=ht(nt,Ie,p,U,Re);const l=X?0:-1;X||0!==(null==(e=i[0])?void 0:e.sourceIndex)||(i=i.slice(1));const[a,c]=null!=(n=null==(t=D.current)?void 0:t.cell)?n:[],u=null==(r=D.current)?void 0:r.range,d=i.map((e=>e.sourceIndex)),h=s(y,Math.min(S,y+m));return void 0===a||void 0===c||d.includes(a)&&h.includes(c)||en(null),o.createElement("table",{key:"access-tree",role:"grid","aria-rowcount":S+1,"aria-multiselectable":"true","aria-colcount":nt.length+l},o.createElement("thead",{role:"rowgroup"},o.createElement("tr",{role:"row","aria-rowindex":1},i.map((e=>o.createElement("th",{role:"columnheader","aria-selected":D.columns.hasIndex(e.sourceIndex),"aria-colindex":e.sourceIndex+1+l,tabIndex:-1,onFocus:t=>{if(t.target!==Jt.current)return null==fe?void 0:fe([e.sourceIndex,-1])},key:e.sourceIndex},e.title))))),o.createElement("tbody",{role:"rowgroup"},h.map((e=>o.createElement("tr",{role:"row","aria-selected":D.rows.hasIndex(e),key:e,"aria-rowindex":e+2},i.map((t=>{const n=t.sourceIndex,r=`${n},${e}`,i=a===n&&c===e,s=void 0!==u&&n>=u.x&&n<u.x+u.width&&e>=u.y&&e<u.y+u.height,d=`glide-cell-${n}-${e}`,h=M([n,e],!0);return o.createElement("td",{key:r,role:"gridcell","aria-colindex":n+1+l,"aria-selected":s,"aria-readonly":Le(h)||!Ae(h),id:d,"data-testid":d,onClick:()=>{const t=null==q?void 0:q.current;if(null!==t&&void 0!==t)return null==Y?void 0:Y({bounds:rt(t,n,e),cancel:()=>{},preventDefault:()=>{},stopPropagation:()=>{},ctrlKey:!1,key:"Enter",keyCode:13,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0})},onFocusCapture:t=>{var r,o;if(t.target!==Jt.current&&((null==(r=nn.current)?void 0:r[0])!==n||(null==(o=nn.current)?void 0:o[1])!==e))return nn.current=[n,e],null==fe?void 0:fe([n,e])},ref:i?en:void 0,tabIndex:-1},((e,t)=>{var n;if(e.kind===ge.Custom)return e.copyData;const r=null==t?void 0:t(e);return null!=(n=null==r?void 0:r.getAccessibilityString(e))?n:""})(h,Ee))})))))))}),[p,nt,Ie,U,Re,S,y,m,D,en,M,q,Y,rt,fe],200),on=F?dt(nt,U):0,an=0!==L&&F?Ie>L?1:i(-Re/100,0,1):0,sn=$?i(-(32*-y+Oe)/100,0,1):0,dn=o.useMemo((()=>{if(!an&&!sn)return null;const e={position:"absolute",top:0,left:on,width:p-on,height:g,opacity:an,pointerEvents:"none",transition:ye?void 0:"opacity 0.2s",boxShadow:"inset 13px 0 10px -13px rgba(0, 0, 0, 0.2)"},t={position:"absolute",top:Je,left:0,width:p,height:g,opacity:sn,pointerEvents:"none",transition:we?void 0:"opacity 0.2s",boxShadow:"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)"};return o.createElement(o.Fragment,null,an>0&&o.createElement("div",{id:"shadow-x",style:e}),sn>0&&o.createElement("div",{id:"shadow-y",style:t}))}),[an,sn,on,p,ye,Je,g,we]),hn=o.useMemo((()=>({position:"absolute",top:0,left:0})),[]);return o.createElement(o.Fragment,null,o.createElement("canvas",{"data-testid":"data-grid-canvas",tabIndex:0,onKeyDown:Xt,onKeyUp:Gt,onFocus:P,onBlur:T,ref:qt,style:Ot},rn),o.createElement("canvas",{ref:Xe,style:hn}),dn)})));function fn(e,t,n,r){var o;return i(Math.round(t-(null!=(o=e.growOffset)?o:0)),Math.ceil(n),Math.floor(r))}var pn=e=>{var t;const[n,r]=o.useState(),[i,l]=o.useState(),[a,s]=o.useState(),[c,u]=o.useState(),[d,h]=o.useState(!1),[f,p]=o.useState(),[g,m]=o.useState(),[v,b]=o.useState(),[y,w]=o.useState(!1),[x,k]=o.useState(),{onHeaderMenuClick:C,getCellContent:S,onColumnMoved:M,onColumnResize:E,onColumnResizeStart:R,onColumnResizeEnd:O,gridRef:I,maxColumnWidth:P,minColumnWidth:T,onRowMoved:H,lockColumns:D,onMouseDown:L,onMouseUp:A,onItemHovered:z,onDragStart:F,canvasRef:$}=e,_=void 0!==(null!=(t=null!=E?E:O)?t:R),{columns:N,selection:V}=e,B=V.columns,j=o.useCallback((e=>{const[t,n]=e.location;void 0!==a&&c!==t&&t>=D?(h(!0),u(t)):void 0!==g&&void 0!==n?(w(!0),b(Math.max(0,n))):null==z||z(e)}),[a,g,c,z,D]),W=void 0!==M,U=o.useCallback((e=>{var t,n;if(0===e.button){const[o,i]=e.location;if("out-of-bounds"===e.kind&&e.isEdge&&_){const e=null==(t=null==I?void 0:I.current)?void 0:t.getBounds(N.length-1,-1);void 0!==e&&(r(e.x),l(N.length-1))}else if("header"===e.kind&&o>=D){const t=null==$?void 0:$.current;if(e.isEdge&&_&&t){r(e.bounds.x),l(o);const i=t.getBoundingClientRect().width/t.offsetWidth,a=e.bounds.width/i;null==R||R(N[o],a,o,a+(null!=(n=N[o].growOffset)?n:0))}else"header"===e.kind&&W&&(p(e.bounds.x),s(o))}else"cell"===e.kind&&D>0&&0===o&&void 0!==i&&void 0!==H&&(k(e.bounds.y),m(i))}null==L||L(e)}),[L,_,D,H,I,N,W,R,$]),X=o.useCallback(((e,t)=>{d||y||null==C||C(e,t)}),[d,y,C]),Y=o.useRef(-1),K=o.useCallback((()=>{Y.current=-1,m(void 0),b(void 0),k(void 0),w(!1),s(void 0),u(void 0),p(void 0),h(!1),l(void 0),r(void 0)}),[]),G=o.useCallback(((e,t)=>{var n,r,o;if(0===e.button){if(void 0!==i){if(!0===(null==B?void 0:B.hasIndex(i)))for(const t of B){if(t===i)continue;const e=N[t],r=fn(e,Y.current,T,P);null==E||E(e,r,t,r+(null!=(n=e.growOffset)?n:0))}const e=fn(N[i],Y.current,T,P);if(null==O||O(N[i],e,i,e+(null!=(r=N[i].growOffset)?r:0)),B.hasIndex(i))for(const t of B){if(t===i)continue;const e=N[t],n=fn(e,Y.current,T,P);null==O||O(e,n,t,n+(null!=(o=e.growOffset)?o:0))}}K(),void 0!==a&&void 0!==c&&(null==M||M(a,c)),void 0!==g&&void 0!==v&&(null==H||H(g,v))}null==A||A(e,t)}),[A,i,a,c,g,v,B,O,N,T,P,E,M,H,K]),q=o.useMemo((()=>{if(void 0!==a&&void 0!==c&&a!==c)return{src:a,dest:c}}),[a,c]),Z=o.useCallback((e=>{var t,r;const o=null==$?void 0:$.current;if(void 0!==a&&void 0!==f){Math.abs(e.clientX-f)>20&&h(!0)}else if(void 0!==g&&void 0!==x){Math.abs(e.clientY-x)>20&&w(!0)}else if(void 0!==i&&void 0!==n&&o){const l=o.getBoundingClientRect().width/o.offsetWidth,a=(e.clientX-n)/l,s=N[i],c=fn(s,a,T,P);if(null==E||E(s,c,i,c+(null!=(t=s.growOffset)?t:0)),Y.current=a,(null==B?void 0:B.first())===i)for(const e of B){if(e===i)continue;const t=N[e],n=fn(t,Y.current,T,P);null==E||E(t,n,e,n+(null!=(r=t.growOffset)?r:0))}}}),[a,f,g,x,i,n,N,T,P,E,B,$]),Q=o.useCallback(((e,t)=>{if(void 0===g||void 0===v)return S(e,t);let[n,r]=e;return r===v?r=g:(r>v&&(r-=1),r>=g&&(r+=1)),S([n,r],t)}),[g,v,S]),J=o.useCallback((e=>{null==F||F(e),e.defaultPrevented()||K()}),[K,F]);return o.createElement(hn,{accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,drawCustomCell:e.drawCustomCell,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,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,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,trailingRowType:e.trailingRowType,translateX:e.translateX,translateY:e.translateY,verticalBorder:e.verticalBorder,width:e.width,getCellContent:Q,isResizing:void 0!==i,onHeaderMenuClick:X,isDragging:d,onItemHovered:j,onDragStart:J,onMouseDown:U,allowResize:_,onMouseUp:G,dragAndDropState:q,onMouseMoveRaw:Z,ref:I})};var gn=(0,r.d)("div")({name:"ScrollRegionStyle",class:"s1jz82f8",vars:{"s1jz82f8-0":[e=>e.isSafari?"scroll":"auto"]}});function mn(e){e.stopPropagation()}var vn=e=>{var t,n,r,i;const{children:l,clientHeight:a,scrollHeight:s,scrollWidth:c,update:u,draggable:d,className:h,preventDiagonalScrolling:f=!1,paddingBottom:p=0,paddingRight:g=0,rightElement:m,rightElementProps:v,scrollRef:b,scrollToEnd:y,initialSize:w,minimap:x}=e,k=[],C=null!=(t=null==v?void 0:v.sticky)&&t,S=null!=(n=null==v?void 0:v.fill)&&n,M=o.useRef(0),E=o.useRef(0),R=o.useRef(null),O=window.devicePixelRatio;o.useEffect((()=>{const e=R.current;null!==e&&!0===y&&(e.scrollLeft=e.scrollWidth-e.clientWidth)}),[y]);const I=o.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),P=o.useRef(null),T=function(e){const[t,n]=o.useState(!1),r=o.useRef(0);return qe("touchstart",o.useCallback((()=>{window.clearTimeout(r.current),n(!0)}),[]),window,!0,!1),qe("touchend",o.useCallback((t=>{0===t.touches.length&&(r.current=window.setTimeout((()=>n(!1)),e))}),[e]),window,!0,!1),t}(200),[H,D]=o.useState(!0),L=o.useRef(0);o.useEffect((()=>{if(!H||T||void 0===I.current.lockDirection)return;const e=R.current;if(null===e)return;const[t,n]=I.current.lockDirection;void 0!==t?e.scrollLeft=t:void 0!==n&&(e.scrollTop=n),I.current.lockDirection=void 0}),[T,H]);const A=o.useCallback((()=>{var e,t,n,r;const o=R.current;if(null===o)return;let i=o.scrollTop,l=o.scrollLeft;const a=I.current.scrollTop,c=I.current.scrollLeft,d=l-c,h=i-a;T&&0!==d&&0!==h&&(Math.abs(d)>3||Math.abs(h)>3)&&f&&void 0===I.current.lockDirection&&(I.current.lockDirection=Math.abs(d)<Math.abs(h)?[c,void 0]:[void 0,a]);const m=I.current.lockDirection;l=null!=(e=null==m?void 0:m[0])?e:l,i=null!=(t=null==m?void 0:m[1])?t:i,I.current.scrollLeft=l,I.current.scrollTop=i;const v=i,b=E.current-v,y=o.scrollHeight-o.clientHeight;if(E.current=v,y>0&&(Math.abs(b)>2e3||0===v||v===y)&&s>o.scrollHeight+5){const e=v/y,t=(s-o.clientHeight)*e;M.current=t-v}void 0!==m&&(window.clearTimeout(L.current),D(!1),L.current=window.setTimeout((()=>D(!0)),200)),u({x:l,y:v+M.current,width:o.clientWidth-g,height:o.clientHeight-p,paddingRight:null!=(r=null==(n=P.current)?void 0:n.clientWidth)?r:0})}),[p,g,s,u,f,T]),z=o.useRef(A);z.current=A;const F=o.useRef(),$=o.useRef(!1);o.useEffect((()=>{$.current?A():$.current=!0}),[A,p,g]);const _=o.useCallback((e=>{R.current=e,void 0!==b&&(b.current=e)}),[b]);let N=0,V=0;for(k.push(o.createElement("div",{key:N++,style:{width:c,height:0}}));V<s;){const e=Math.min(5e6,s-V);k.push(o.createElement("div",{key:N++,style:{width:0,height:e}})),V+=e}const{ref:B,width:j,height:W}=function(e){const t=(0,o.useRef)(null),[n,r]=(0,o.useState)({width:null==e?void 0:e[0],height:null==e?void 0:e[1]});return(0,o.useLayoutEffect)((()=>{const e=new window.ResizeObserver((e=>{for(const t of e){const{width:e,height:n}=t&&t.contentRect||{};r((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}}(w);return(null==(r=F.current)?void 0:r.height)===W&&(null==(i=F.current)?void 0:i.width)===j||(window.setTimeout((()=>z.current()),0),F.current={width:j,height:W}),0===(null!=j?j:0)||0===(null!=W?W:0)?o.createElement("div",{ref:B}):o.createElement("div",{ref:B},o.createElement(gn,{isSafari:un.value},x,o.createElement("div",{className:"dvn-underlay"},l),o.createElement("div",{ref:_,style:F.current,draggable:d,onDragStart:e=>{d||(e.stopPropagation(),e.preventDefault())},className:"dvn-scroller "+(null!=h?h:""),onScroll:A},o.createElement("div",{className:"dvn-scroll-inner"+(void 0===m?" hidden":"")},o.createElement("div",{className:"dvn-stack"},k),void 0!==m&&o.createElement(o.Fragment,null,!S&&o.createElement("div",{className:"dvn-spacer"}),o.createElement("div",{ref:P,onMouseDown:mn,onMouseUp:mn,onMouseMove:mn,style:{height:W,maxHeight:a-Math.ceil(O%1),position:"sticky",top:0,paddingLeft:1,marginBottom:-40,marginRight:g,flexGrow:S?1:void 0,right:C?null!=g?g:0:void 0,pointerEvents:"auto"}},m))))))},bn=(0,r.d)("div")({name:"MinimapStyle",class:"m15w2ly5"}),yn=e=>{var t,n,r;const{columns:l,rows:a,rowHeight:s,headerHeight:c,groupHeaderHeight:u,enableGroups:d,freezeColumns:h,experimental:f,clientSize:p,className:g,onVisibleRegionChanged:m,scrollToEnd:v,scrollRef:b,preventDiagonalScrolling:y,rightElement:w,rightElementProps:x,overscrollX:k,overscrollY:C,showMinimap:S=!1,initialSize:M,smoothScrollX:E=!1,smoothScrollY:R=!1,isDraggable:O}=e,{paddingRight:I,paddingBottom:P}=null!=f?f:{},[T,H]=p,D=o.useRef(),L=o.useRef(),A=o.useRef(),z=o.useRef(),F=o.useMemo((()=>{let e=Math.max(0,null!=k?k:0);for(const t of l)e+=t.width;return e}),[l,k]);let $=d?c+u:c;if("number"===typeof s)$+=a*s;else for(let o=0;o<a;o++)$+=s(o);void 0!==C&&($+=C);const _=o.useRef(),N=o.useCallback((()=>{var e,t,n;if(void 0===_.current)return;const r={..._.current};let o=0,i=r.x<0?-r.x:0,c=0,u=0;r.x=r.x<0?0:r.x;let d=0;for(let a=0;a<h;a++)d+=l[a].width;for(const a of l){const e=o-d;if(r.x>=e+a.width)o+=a.width,u++,c++;else if(r.x>e)o+=a.width,E?i+=e-r.x:u++,c++;else{if(!(r.x+r.width>e))break;o+=a.width,c++}}let f=0,p=0,g=0;if("number"===typeof s)R?(p=Math.floor(r.y/s),f=p*s-r.y):p=Math.ceil(r.y/s),g=Math.ceil(r.height/s)+p,f<0&&g++;else{let e=0;for(let t=0;t<a;t++){const n=s(t),o=e+(R?0:n/2);if(r.y>=e+n)e+=n,p++,g++;else if(r.y>o)e+=n,R?f+=o-r.y:p++,g++;else{if(!(r.y+r.height>n/2+e))break;e+=n,g++}}}const v={x:u,y:p,width:c-u,height:g-p},b=D.current;void 0!==b&&b.y===v.y&&b.x===v.x&&b.height===v.height&&b.width===v.width&&L.current===i&&A.current===f&&r.width===(null==(e=z.current)?void 0:e[0])&&r.height===(null==(t=z.current)?void 0:t[1])||(null==m||m({x:u,y:p,width:c-u,height:g-p},r.width,r.height,null!=(n=r.paddingRight)?n:0,i,f),D.current=v,L.current=i,A.current=f,z.current=[r.width,r.height])}),[l,s,a,m,h,E,R]),V=o.useCallback((e=>{_.current=e,N()}),[N]);o.useEffect((()=>{N()}),[N]);const B=null!=(t=null==b?void 0:b.current)?t:void 0,j=i(F/$,2/3,1.5),W=200,U=j>1?W:Math.ceil(W*j),X=j>1?Math.ceil(W/j):W,Y=U/F,K=X/$,G=Math.min(T*Math.max(Y,.01),U),q=Math.min(H*Math.max(K,.01),X),Z=(null!=(n=null==B?void 0:B.scrollLeft)?n:0)/(F-T)*(U-G),Q=(null!=(r=null==B?void 0:B.scrollTop)?r:0)/($-H)*(X-q),J=o.useMemo((()=>{if(!S||0===G||0===q)return;const e=e=>{if(void 0===B)return;const t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.x-G/2,r=e.clientY-t.y-q/2,o=(F-B.clientWidth)*(n/(U-G)),i=($-B.clientHeight)*(r/(X-q));B.scrollTo({left:o,top:i,behavior:"mousemove"===e.type?"auto":"smooth"})};return o.createElement(bn,{style:{width:U,height:X},"data-testid":"minimap-container",onMouseMove:t=>{1===t.buttons&&e(t)},onClick:e},o.createElement("div",{className:"header"}),o.createElement("div",{className:"locationMarker",onDragStart:e=>e.preventDefault(),style:{left:Z,top:Q,width:G,height:q,borderRadius:Math.min(G,.2*q,9)}}))}),[X,$,Z,B,S,Q,q,G,U,F]);return o.createElement(vn,{scrollRef:b,minimap:J,className:g,preventDiagonalScrolling:y,draggable:!0===O||"string"===typeof O,scrollWidth:F+(null!=I?I:0),scrollHeight:$+(null!=P?P:0),clientHeight:H,rightElement:w,paddingBottom:P,paddingRight:I,rightElementProps:x,update:V,initialSize:M,scrollToEnd:v},o.createElement(pn,{eventTargetRef:b,width:T,height:H,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,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,theme:e.theme,trailingRowType:e.trailingRowType,translateX:e.translateX,translateY:e.translateY,verticalBorder:e.verticalBorder,drawCustomCell:e.drawCustomCell,drawFocusRing:e.drawFocusRing,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}))},wn=(0,r.d)("div")({name:"SearchWrapper",class:"sxep88s",vars:{"sxep88s-0":[e=>e.showSearch?0:400,"px"]}}),xn=o.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},o.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"})),kn=o.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},o.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 268l144 144 144-144M256 392V100"})),Cn=o.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},o.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144M368 144L144 368"})),Sn=e=>{const{canvasRef:t,cellYOffset:n,rows:r,columns:i,searchInputRef:l,getCellsForSelection:a,onSearchResultsChanged:s,showSearch:c=!1,onSearchClose:u}=e,[d]=o.useState((()=>"search-box-"+Math.round(1e3*Math.random()))),[h,f]=o.useState(""),[p,g]=o.useState(),m=o.useRef(p);m.current=p;const v=o.useRef(new AbortController),b=o.useRef(),[y,w]=o.useState([]),x=o.useCallback((()=>{void 0!==b.current&&(window.cancelAnimationFrame(b.current),b.current=void 0,v.current.abort())}),[]),k=o.useRef(n);k.current=n;const C=o.useCallback((e=>{const t=new RegExp(e.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i");let n=k.current,o=Math.min(10,r),l=0;g(void 0),w([]);const c=[],u=async()=>{var e,d;if(void 0===a)return;const h=performance.now(),f=r-l;let p=a({x:0,y:n,width:i.length,height:Math.min(o,f,r-n)},v.current.signal);"function"===typeof p&&(p=await p());let y=!1;for(const[r,o]of p.entries())for(const[e,i]of o.entries()){let o;switch(i.kind){case ge.Text:case ge.Number:o=i.displayData;break;case ge.Uri:case ge.Markdown:o=i.data;break;case ge.Boolean:o="boolean"===typeof i.data?i.data.toString():void 0;break;case ge.Image:case ge.Bubble:o=i.data.join("\ud83d\udc33");break;case ge.Custom:o=i.copyData}void 0!==o&&t.test(o)&&(c.push([e,r+n]),y=!0)}const x=performance.now();y&&w([...c]),l+=p.length,ie(l<=r);const k=null!=(d=null==(e=m.current)?void 0:e.selectedIndex)?d:-1;g({results:c.length,rowsSearched:l,selectedIndex:k}),null==s||s(c,k),n+o>=r?n=0:n+=o;const C=x-h,S=10/Math.max(C,1);o=Math.ceil(o*S),l<r&&c.length<1e3&&(b.current=window.requestAnimationFrame(u))};x(),b.current=window.requestAnimationFrame(u)}),[x,i.length,a,s,r]),S=o.useCallback((()=>{var e;null==u||u(),g(void 0),w([]),null==s||s([],-1),x(),null==(e=null==t?void 0:t.current)||e.focus()}),[x,t,u,s]),M=o.useCallback((e=>{f(e.target.value),""===e.target.value?(g(void 0),w([]),x()):C(e.target.value)}),[C,x]);o.useEffect((()=>{c&&null!==l.current&&(f(""),l.current.focus({preventScroll:!0}))}),[c,l]);const E=o.useCallback((e=>{var t;if(null==(t=null==e?void 0:e.stopPropagation)||t.call(e),void 0===p)return;const n=(p.selectedIndex+1)%p.results;g({...p,selectedIndex:n}),null==s||s(y,n)}),[p,s,y]),R=o.useCallback((e=>{var t;if(null==(t=null==e?void 0:e.stopPropagation)||t.call(e),void 0===p)return;let n=(p.selectedIndex-1)%p.results;n<0&&(n+=p.results),g({...p,selectedIndex:n}),null==s||s(y,n)}),[s,y,p]),O=o.useCallback((e=>{(e.ctrlKey||e.metaKey)&&"KeyF"===e.nativeEvent.code||"Escape"===e.key?(S(),e.stopPropagation(),e.preventDefault()):"Enter"===e.key&&(e.shiftKey?R():E())}),[S,E,R]);o.useEffect((()=>()=>{x()}),[x]);const I=o.useMemo((()=>{var e,t,n;let i;void 0!==p&&(i=p.results>=1e3?"over 1000":`${p.results} result${1!==p.results?"s":""}`,p.selectedIndex>=0&&(i=`${p.selectedIndex+1} of ${i}`));const a=e=>{e.stopPropagation()},s={width:`${Math.floor((null!=(e=null==p?void 0:p.rowsSearched)?e:0)/r*100)}%`};return o.createElement(wn,{showSearch:c,onMouseDown:a,onMouseMove:a,onMouseUp:a,onClick:a},o.createElement("div",{className:"search-bar-inner"},o.createElement("input",{id:d,"aria-hidden":!c,"data-testid":"search-input",ref:l,onChange:M,value:h,tabIndex:c?void 0:-1,onKeyDownCapture:O}),o.createElement("button",{"aria-label":"Previous Result","aria-hidden":!c,tabIndex:c?void 0:-1,onClick:R,disabled:0===(null!=(t=null==p?void 0:p.results)?t:0)},xn),o.createElement("button",{"aria-label":"Next Result","aria-hidden":!c,tabIndex:c?void 0:-1,onClick:E,disabled:0===(null!=(n=null==p?void 0:p.results)?n:0)},kn),void 0!==u&&o.createElement("button",{"aria-label":"Close Search","aria-hidden":!c,"data-testid":"search-close-button",tabIndex:c?void 0:-1,onClick:S},Cn)),void 0!==p?o.createElement(o.Fragment,null,o.createElement("div",{className:"search-status"},o.createElement("div",{"data-testid":"search-result-area"},i)),o.createElement("div",{className:"search-progress",style:s})):o.createElement("div",{className:"search-status"},o.createElement("label",{htmlFor:d},"Type to search")))}),[S,E,R,M,u,O,r,p,h,c,d,l]);return o.createElement(o.Fragment,null,o.createElement(yn,{prelightCells:y,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,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,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,showMinimap:e.showMinimap,theme:e.theme,trailingRowType:e.trailingRowType,translateX:e.translateX,translateY:e.translateY,verticalBorder:e.verticalBorder,drawCustomCell:e.drawCustomCell,drawFocusRing:e.drawFocusRing,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,scrollToEnd:e.scrollToEnd}),I)},Mn=(0,r.d)("input")({name:"RenameInput",class:"r1kzy40b",vars:{"r1kzy40b-0":[e=>Math.max(16,e.targetHeight-10),"px"]}}),En=e=>{const{bounds:t,group:n,onClose:r,canvasBounds:i,onFinish:l}=e,[a,s]=o.useState(n);return o.createElement(ce,{style:{position:"absolute",left:t.x-i.left+1,top:t.y-i.top,width:t.width-2,height:t.height},className:"c1sqdbw3",onClickOutside:r},o.createElement(Mn,{targetHeight:t.height,"data-testid":"group-rename-input",value:a,onBlur:r,onFocus:e=>e.target.setSelectionRange(0,a.length),onChange:e=>s(e.target.value),onKeyDown:e=>{"Enter"===e.key?l(a):"Escape"===e.key&&r()},autoFocus:!0}))},Rn=150;function On(e,t,n,r,o,i,l,a,s){let c=[];if(void 0!==o&&c.push(...o.map((e=>e[r])).map((n=>function(e,t,n,r){var o,i;if(t.kind===ge.Custom)return Rn;const l=r(t);return null!=(i=null==(o=null==l?void 0:l.measure)?void 0:o.call(l,e,t,n))?i:Rn}(e,n,t,s)))),c.length>5&&a){const e=c.reduce(((e,t)=>e+t))/c.length;c=c.filter((t=>t<2*e))}c.push(e.measureText(n.title).width+16+(void 0===n.icon?0:28));const u=Math.max(...c),d=Math.max(Math.ceil(i),Math.min(Math.floor(l),Math.ceil(u)));return{...n,width:d}}function In(e,t){if(0===e.length)return!1;let n=!1,r=!1,o=!1,i=!1;const l=e.split("+");if(!function(e,t){if(void 0===e)return!1;if(e.length>1&&e.startsWith("_")){if(Number.parseInt(e.slice(1))!==t.keyCode)return!1}else if(e!==t.key)return!1;return!0}(l.pop(),t))return!1;for(const a of l)switch(a){case"ctrl":n=!0;break;case"shift":r=!0;break;case"alt":o=!0;break;case"meta":i=!0;break;case"primary":dn.value?i=!0:n=!0}return t.altKey===o&&t.ctrlKey===n&&t.shiftKey===r&&t.metaKey===i}function Pn(e){return e.startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1).replace(/""/g,'"')),e}function Tn(e){var t,n;(n=t||(t={}))[n.None=0]="None",n[n.inString=1]="inString",n[n.inStringPostQuote=2]="inStringPostQuote";const r=[];let o=[],i=0,l=0;e=e.replace(/\r\n/g,"\n");let a=0;for(const s of e){switch(l){case 0:"\t"===s||"\n"===s?(o.push(e.slice(i,a)),i=a+1,"\n"===s&&(r.push(o),o=[])):'"'===s&&(l=1);break;case 1:'"'===s&&(l=2);break;case 2:'"'===s?l=1:"\t"===s||"\n"===s?(o.push(Pn(e.slice(i,a))),i=a+1,"\n"===s&&(r.push(o),o=[]),l=0):l=0}a++}return i<e.length&&o.push(Pn(e.slice(i,e.length))),r.push(o),r}function Hn(e){var t,n;const r=[e],o=[];let i;for(;r.length>0;){const e=r.pop();if(void 0===e)break;e instanceof HTMLTableElement||"TBODY"===e.nodeName?r.push(...[...e.children].reverse()):e instanceof HTMLTableRowElement?(void 0!==i&&o.push(i),i=[],r.push(...[...e.children].reverse())):e instanceof HTMLTableCellElement&&(null==i||i.push(null!=(n=null!=(t=e.innerText)?t:e.textContent)?n:""))}return void 0!==i&&o.push(i),o}function Dn(e){return/[\t\n",]/.test(e)&&(e=`"${e.replace(/"/g,'""')}"`),e}var Ln=e=>{switch(e){case!0:return"TRUE";case!1:return"FALSE";case we:return"INDETERMINATE";case ye:return"";default:le()}};function An(e,t,n,r){var o,i;const l=r[t];if(void 0!==e.span&&e.span[0]!==l)return"";if(void 0!==e.copyData)return Dn(e.copyData);switch(e.kind){case ge.Text:case ge.Number:return Dn(n?null!=(i=null==(o=e.data)?void 0:o.toString())?i:"":e.displayData);case ge.Markdown:case ge.RowID:case ge.Uri:return Dn(e.data);case ge.Image:case ge.Bubble:return 0===e.data.length?"":e.data.reduce(((e,t)=>`${Dn(e)},${Dn(t)}`));case ge.Boolean:return Ln(e.data);case ge.Loading:return n?"":"#LOADING";case ge.Protected:return n?"":"************";case ge.Drilldown:return 0===e.data.length?"":e.data.map((e=>e.text)).reduce(((e,t)=>`${Dn(e)},${Dn(t)}`));case ge.Custom:return Dn(e.copyData);default:le()}}function zn(e,t,n){var r,o,i,l;const a=function(e,t){return e.map((e=>e.map(((e,n)=>An(e,n,!1,t))).join("\t"))).join("\n")}(e,t);if(void 0!==(null==(r=window.navigator.clipboard)?void 0:r.write)||void 0!==n){const r=document.createElement("tbody");for(const n of e){const e=document.createElement("tr");for(const[r,o]of n.entries()){const n=document.createElement("td");if(o.kind===ge.Uri){const e=document.createElement("a");e.href=o.data,e.innerText=o.data,n.append(e)}else n.innerText=An(o,r,!0,t);e.append(n)}r.append(e)}if(void 0!==(null==(o=window.navigator.clipboard)?void 0:o.write))window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([a],{type:"text/plain"}),"text/html":new Blob([`<table>${r.outerHTML}</table>`],{type:"text/html"})})]);else if(void 0!==n&&null!==(null==n?void 0:n.clipboardData))try{n.clipboardData.setData("text/plain",a),n.clipboardData.setData("text/html",`<table>${r.outerHTML}</table>`)}catch(s){null==(i=window.navigator.clipboard)||i.writeText(a)}}else null==(l=window.navigator.clipboard)||l.writeText(a);null==n||n.preventDefault()}function Fn(e){return"string"===typeof e?e:`${e}px`}var $n=(0,r.d)("div")({name:"Wrapper",class:"wzg2m5k",vars:{"wzg2m5k-0":[e=>e.innerWidth],"wzg2m5k-1":[e=>e.innerHeight]}}),_n=e=>{const{inWidth:t,inHeight:n,children:r,...i}=e;return o.createElement($n,{innerHeight:Fn(n),innerWidth:Fn(t),...i},r)};function Nn(e){return!0!==e}var Vn={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:"false"},kind:ge.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:e=>{var t;return function(e,t,n,r){if(!n&&t===ye)return;const{ctx:o,hoverAmount:i,theme:l,rect:a,highlighted:s,hoverX:c,hoverY:u}=e,{x:d,y:h,width:f,height:p}=a;let g=n?.65+.35*i:.4;t===ye&&(g*=i),0!==g&&(o.globalAlpha=g,Mt(o,l,t,d,h,f,p,s,c,u,r),o.globalAlpha=1)}(e,e.cell.data,Fe(e.cell),null!=(t=e.cell.maxSize)?t:20)},onDelete:e=>({...e,data:!1}),onClick:e=>{var t;const{cell:n,posX:r,posY:o,bounds:i}=e,l=null!=(t=n.maxSize)?t:20;if(Fe(n)&&Math.abs(r-i.width/2)<=Math.min(l/2,i.height/3.4)&&Math.abs(o-i.height/2)<=Math.min(l/2,i.height/3.4))return{...n,data:Nn(n.data)}},onPaste:(e,t)=>{let n=ye;return"true"===e.toLowerCase()?n=!0:"false"===e.toLowerCase()?n=!1:"indeterminate"===e.toLowerCase()&&(n=we),n===t.data?void 0:{...t,data:n}}},Bn=2,jn=1300;var Wn=(0,r.d)("div")({name:"BubblesOverlayEditorStyle",class:"b1bqsp5z"}),Un=e=>{const{bubbles:t}=e;return o.createElement(Wn,null,t.map(((e,t)=>o.createElement("div",{key:t,className:"boe-bubble"},e))),o.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},Xn={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:ge.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:l,y:a,width:s,height:c}=n,u=Ot;let d=l+r.cellHorizontalPadding;const h=[];for(const f of t){if(d>l+s)break;const e=mt(f,o,`${r.baseFontStyle} ${r.fontFamily}`).width;h.push({x:d,width:e}),d+=e+16+u}o.beginPath();for(const f of h)Rt(o,f.x,a+(c-20)/2,f.width+16,20,10);o.fillStyle=i?r.bgBubbleSelected:r.bgBubble,o.fill();for(const[f,p]of h.entries())o.beginPath(),o.fillStyle=r.textBubble,o.fillText(t[f],p.x+8,a+c/2+vt(o,r))}(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return o.createElement(Un,{bubbles:t.data})},onPaste:()=>{}},Yn=(0,r.d)("div")({name:"DrilldownOverlayEditorStyle",class:"df2kt4a"}),Kn=e=>{const{drilldowns:t}=e;return o.createElement(Yn,null,t.map(((e,t)=>o.createElement("div",{key:t,className:"doe-bubble"},void 0!==e.img&&o.createElement("img",{src:e.img}),o.createElement("div",null,e.text)))))},Gn={getAccessibilityString:e=>e.data.map((e=>e.text)).join(", "),kind:ge.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=>Pt(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return o.createElement(Kn,{drilldowns:t.data})},onPaste:()=>{}},qn=(0,r.d)("div")({name:"ImageOverlayEditorStyle",class:"i1eozt10"}),Zn=e=>{const{urls:t,canWrite:n,onEditClick:r,renderImage:i}=e,l=t.filter((e=>""!==e));if(0===l.length)return null;const a=l.length>1;return o.createElement(qn,{"data-testid":"GDG-default-image-overlay-editor"},o.createElement(y.lr,{showArrows:a,showThumbs:!1,swipeable:a,emulateTouch:a,infiniteLoop:a},l.map((e=>{var t;const n=null!=(t=null==i?void 0:i(e))?t:o.createElement("img",{draggable:!1,src:e});return o.createElement("div",{className:"centering-container",key:e},n)}))),n&&r&&o.createElement("button",{className:"edit-icon",onClick:r},o.createElement(et,null)))},Qn={getAccessibilityString:e=>e.data.join(", "),kind:ge.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:e=>{var t;return function(e,t,n=4,r){const{rect:o,col:i,row:l,theme:a,ctx:s,imageLoader:c}=e,{x:u,y:d,height:h,width:f}=o,p=h-2*a.cellVerticalPadding,g=[];let m=0;for(let b=0;b<t.length;b++){const e=t[b];if(0===e.length)continue;const n=c.loadOrGetImage(e,i,l);void 0!==n&&(g[b]=n,m+=n.width*(p/n.height)+Ot)}if(0===m)return;m-=Ot;let v=u+a.cellHorizontalPadding;"right"===r?v=Math.floor(u+f-a.cellHorizontalPadding-m):"center"===r&&(v=Math.floor(u+f/2-m/2));for(const b of g){if(void 0===b)continue;const e=b.width*(p/b.height);n>0&&(Rt(s,v,d+a.cellVerticalPadding,e,p,n),s.save(),s.clip()),s.drawImage(b,v,d+a.cellVerticalPadding,e,p),n>0&&s.restore(),v+=e+Ot}}(e,null!=(t=e.cell.displayData)?t:e.cell.data,e.cell.rounding,e.cell.contentAlign)},measure:(e,t)=>50*t.data.length,onDelete:e=>({...e,data:[]}),provideEditor:()=>e=>{const{value:t,onFinishedEditing:n,imageEditorOverride:r}=e,i=null!=r?r:Zn;return o.createElement(i,{urls:t.data,canWrite:t.allowAdd,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(t){return}})).filter((e=>void 0!==e));if(n.length!==t.data.length||!n.every(((e,n)=>e===t.data[n])))return{...t,data:n}}},Jn={getAccessibilityString:()=>"",kind:ge.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,draw:()=>{},onPaste:()=>{}},er=(0,r.d)("div")({name:"MarkdownContainer",class:"mlbeo71"}),tr=class extends o.PureComponent{constructor(){super(...arguments),this.targetElement=null,this.containerRefHook=e=>{this.targetElement=e,this.renderMarkdownIntoDiv()}}renderMarkdownIntoDiv(){const{targetElement:e,props:t}=this;if(null===e)return;const{contents:n,createNode:r}=t,o=re(n),i=document.createRange();i.selectNodeContents(e),i.deleteContents();let l=null==r?void 0:r(o);if(void 0===l){const e=document.createElement("template");e.innerHTML=o,l=e.content}e.append(l);const a=e.getElementsByTagName("a");for(const s of a)s.target="_blank",s.rel="noreferrer noopener"}render(){return this.renderMarkdownIntoDiv(),o.createElement(er,{ref:this.containerRefHook})}},nr=(0,r.d)("textarea")({name:"InputBox",class:"ijuk0po"}),rr=(0,r.d)("div")({name:"ShadowBox",class:"saq3p5l"}),or=(0,r.d)("div")({name:"GrowingEntryStyle",class:"gf8vzix"}),ir=e=>{const{placeholder:t,value:n,onKeyDown:r,highlight:i,altNewline:l,validatedSelection:a,...s}=e,{onChange:c,className:u}=s,d=o.useRef(null),h=null!=n?n:"";ie(void 0!==c,"GrowingEntry must be a controlled input area"),o.useEffect((()=>{const e=d.current;if(null===e)return;if(e.disabled)return;const t=h.toString().length;e.focus(),e.setSelectionRange(i?0:t,t)}),[]),o.useLayoutEffect((()=>{var e;if(void 0!==a){const t="number"===typeof a?[a,null]:a;null==(e=d.current)||e.setSelectionRange(t[0],t[1])}}),[a]);const f=o.useCallback((e=>{"Enter"===e.key&&e.shiftKey&&!0===l||null==r||r(e)}),[l,r]);return o.createElement(or,{className:"gdg-growing-entry"},o.createElement(rr,{className:u},h+"\n"),o.createElement(nr,{...s,className:(null!=u?u:"")+" gdg-input",ref:d,onKeyDown:f,value:h,placeholder:t,dir:"auto"}))},lr=(0,r.d)("div")({name:"MarkdownOverlayEditorStyle",class:"mdwzdl1",vars:{"mdwzdl1-0":[e=>e.targetWidth,"px"]}}),ar=e=>{const{value:t,onChange:n,forceEditMode:r,createNode:i,targetRect:l,onFinish:a,validatedSelection:s}=e,c=t.data,u=!0===t.readonly,[d,h]=o.useState(""===c||r),f=o.useCallback((()=>{h((e=>!e))}),[]),p=c?"ml-6":"";return d?o.createElement(lr,{targetWidth:l.width-20},o.createElement(ir,{autoFocus:!0,highlight:!1,validatedSelection:s,value:c,onKeyDown:e=>{"Enter"===e.key&&e.stopPropagation()},onChange:n}),o.createElement("div",{className:`edit-icon checkmark-hover ${p}`,onClick:()=>a(t)},o.createElement(tt,null))):o.createElement(lr,{targetWidth:l.width},o.createElement(tr,{contents:c,createNode:i}),!u&&o.createElement(o.Fragment,null,o.createElement("div",{className:"spacer"}),o.createElement("div",{className:`edit-icon edit-hover ${p}`,onClick:f},o.createElement(et,null))),o.createElement("textarea",{className:"md-edit-textarea gdg-input",autoFocus:!0}))},sr={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:ge.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:wt,measure:(e,t,n)=>{const r=t.data.split("\n")[0];return e.measureText(r).width+2*n.cellHorizontalPadding},draw:e=>St(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{const{onChange:t,value:n,target:r,onFinishedEditing:i,markdownDivCreateNode:l,forceEditMode:a,validatedSelection:s}=e;return o.createElement(ar,{onFinish:i,targetRect:r,value:n,validatedSelection:s,onChange:e=>t({...n,data:e.target.value}),forceEditMode:a,createNode:l})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},cr={getAccessibilityString:e=>e.row.toString(),kind:Se.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:function(e,t){const{ctx:n,theme:r}=e,o=`9px ${r.fontFamily}`,i=null!=t?t:{};return(null==i?void 0:i.font)!==o&&(n.font=o,i.font=o),i.deprep=Et,n.textAlign="center",i},measure:()=>44,draw:e=>function(e,t,n,r,o){const{ctx:i,rect:l,hoverAmount:a,theme:s}=e,{x:c,y:u,width:d,height:h}=l,f=n?1:"checkbox-visible"===r?.6+.4*a:a;if("number"!==r&&f>0){i.globalAlpha=f;const e=7*(n?a:1);if(Mt(i,s,n,o?c+e:c,u,o?d-e:d,h,!0,void 0,void 0,18),o){i.globalAlpha=a,i.beginPath();for(const e of[3,6])for(const t of[-5,-1,3])i.rect(c+e,u+h/2+t,2,2);i.fillStyle=s.textLight,i.fill(),i.beginPath()}i.globalAlpha=1}if("number"===r||"both"===r&&!n){const e=t.toString(),n=c+d/2;"both"===r&&0!==a&&(i.globalAlpha=1-a),i.fillStyle=s.textLight,i.fillText(e,n,u+h/2+vt(i,`9px ${s.fontFamily}`)),0!==a&&(i.globalAlpha=1)}}(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle),onClick:e=>{const{bounds:t,cell:n,posX:r,posY:o}=e,{width:i,height:l}=t,a=n.drawHandle?7+(i-7)/2:i/2,s=l/2;if(Math.abs(r-a)<=10&&Math.abs(o-s)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}},ur={getAccessibilityString:()=>"",kind:Se.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>function(e,t,n){const{ctx:r,rect:o,hoverAmount:i,theme:l,spriteManager:a}=e,{x:s,y:c,width:u,height:d}=o;r.beginPath(),r.globalAlpha=i,r.rect(s,c,u,d),r.fillStyle=l.bgHeaderHovered,r.fill(),r.globalAlpha=1,r.beginPath();const h=""!==t;let f=0;if(void 0!==n){const e=8,t=d-e,o=s+e/2,u=c+e/2;a.drawSprite(n,"normal",r,o,u,t,l,h?1:i),f=t}else{f=24;const e=12,t=h?e:i*e,n=h?0:(1-i)*e*.5,o=l.cellHorizontalPadding+4;t>0&&(r.moveTo(s+o+n,c+d/2),r.lineTo(s+o+n+t,c+d/2),r.moveTo(s+o+n+.5*t,c+d/2-.5*t),r.lineTo(s+o+n+.5*t,c+d/2+.5*t),r.lineWidth=2,r.strokeStyle=l.bgIconHeader,r.lineCap="round",r.stroke())}r.fillStyle=l.textMedium,r.fillText(t,f+s+l.cellHorizontalPadding+.5,c+d/2+vt(r,l)),r.beginPath()}(e,e.cell.hint,e.cell.icon),onPaste:()=>{}},dr=o.lazy((async()=>await n.e(6756).then(n.bind(n,86756)))),hr={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:ge.Number,needsHover:!1,needsHoverPosition:!1,useLabel:!0,drawPrep:wt,draw:e=>St(e,e.cell.displayData,e.cell.contentAlign),measure:(e,t)=>e.measureText(t.displayData).width+16,onDelete:e=>({...e,data:void 0}),provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:r,validatedSelection:i}=e;return o.createElement(o.Suspense,{fallback:null},o.createElement(dr,{highlight:t,disabled:!0===r.readonly,value:r.data,fixedDecimals:r.fixedDecimals,allowNegative:r.allowNegative,validatedSelection:i,onChange:e=>{var t;return n({...r,data:Number.isNaN(null!=(t=e.floatValue)?t:0)?0:e.floatValue})}}))},onPaste:(e,t)=>{const n=Number.parseFloat(e);if(!Number.isNaN(n)&&t.data!==n)return{...t,data:n}}},fr={getAccessibilityString:()=>"",measure:()=>108,kind:ge.Protected,needsHover:!1,needsHoverPosition:!1,draw:function(e){const{ctx:t,theme:n,rect:r}=e,{x:o,y:i,height:l}=r;t.beginPath();const a=2.5;let s=o+n.cellHorizontalPadding+a;const c=i+l/2,u=Math.cos(Je(30))*a,d=Math.sin(Je(30))*a;for(let h=0;h<12;h++)t.moveTo(s,c-a),t.lineTo(s,c+a),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:()=>{}},pr={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:ge.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>wt(e,t,e.theme.textLight),draw:e=>St(e,e.cell.data,e.cell.contentAlign),measure:(e,t)=>e.measureText(t.data).width+16,provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:r,validatedSelection:i}=e;return o.createElement(ir,{highlight:t,autoFocus:!0!==r.readonly,disabled:!1!==r.readonly,value:r.data,validatedSelection:i,onChange:e=>n({...r,data:e.target.value})})},onPaste:()=>{}},gr={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:ge.Text,needsHover:!1,needsHoverPosition:!1,drawPrep:wt,useLabel:!0,draw:e=>(St(e,e.cell.displayData,e.cell.contentAlign,e.cell.allowWrapping,e.hyperWrapping),!0),measure:(e,t,n)=>{const r=t.displayData.split("\n").slice(0,!0===t.allowWrapping?void 0:1);return Math.max(...r.map((t=>e.measureText(t).width+2*n.cellHorizontalPadding)))},onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:r,validatedSelection:i}=e;return o.createElement(ir,{highlight:t,autoFocus:!0!==r.readonly,disabled:!0===r.readonly,altNewline:!0,value:r.data,validatedSelection:i,onChange:e=>n({...r,data:e.target.value})})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},mr=(0,r.d)("div")({name:"UriOverlayEditorStyle",class:"uf0sjo8"}),vr=e=>{const{uri:t,onChange:n,forceEditMode:r,readonly:i,validatedSelection:l,preview:a}=e,[s,c]=o.useState(""===t||r),u=o.useCallback((()=>{c(!0)}),[]);return s?o.createElement(ir,{validatedSelection:l,highlight:!0,autoFocus:!0,value:t,onChange:n}):o.createElement(mr,null,o.createElement("a",{className:"link-area",href:t,target:"_blank",rel:"noopener noreferrer"},a),!i&&o.createElement("div",{className:"edit-icon",onClick:u},o.createElement(et,null)),o.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},br={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:ge.Uri,needsHover:!1,needsHoverPosition:!1,useLabel:!0,drawPrep:wt,draw:e=>St(e,e.cell.data,e.cell.contentAlign),measure:(e,t,n)=>e.measureText(t.data).width+2*n.cellHorizontalPadding,onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{var t;const{onChange:n,value:r,forceEditMode:i,validatedSelection:l}=e;return o.createElement(vr,{forceEditMode:i,uri:r.data,preview:null!=(t=r.displayData)?t:r.data,validatedSelection:l,readonly:!0===r.readonly,onChange:e=>n({...r,data:e.target.value})})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},yr={[Se.Marker]:cr,[Se.NewRow]:ur,[ge.Boolean]:Vn,[ge.Bubble]:Xn,[ge.Drilldown]:Gn,[ge.Image]:Qn,[ge.Loading]:Jn,[ge.Markdown]:sr,[ge.Number]:hr,[ge.Protected]:fr,[ge.RowID]:pr,[ge.Text]:gr,[ge.Uri]:br},wr=0;function xr(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)}}var kr={selectAll:!0,selectRow:!0,selectColumn:!0,downFill:!1,rightFill:!1,pageUp:!1,pageDown:!1,clear:!0,copy:!0,paste:!0,search:!1,first:!0,last:!0},Cr={kind:ge.Loading,allowOverlay:!1},Sr={columns:_e.empty(),rows:_e.empty(),current:void 0},Mr=o.forwardRef(((e,t)=>{var n,r,u,d,h;const[f,p]=o.useState(Sr),[g,m]=o.useState(),v=o.useRef(null),b=o.useRef(null),[y,w]=o.useState(),x=o.useRef(null),k=o.useRef(),{rowMarkers:C="none",rowMarkerWidth:S,imageEditorOverride:M,getRowThemeOverride:E,markdownDivCreateNode:R,width:O,height:I,columns:P,rows:T,getCellContent:H,onCellClicked:D,onCellActivated:L,onFinishedEditing:A,coercePasteValue:z,drawHeader:F,onHeaderClicked:$,spanRangeBehavior:_="default",onGroupHeaderClicked:N,onCellContextMenu:V,className:B,onHeaderContextMenu:j,getCellsForSelection:W,onGroupHeaderContextMenu:U,onGroupHeaderRenamed:X,onCellEdited:Y,onCellsEdited:K,onKeyDown:G,onKeyUp:q,keybindings:Z,onRowAppended:Q,onColumnMoved:J,validateCell:ee,highlightRegions:te,drawCell:ne,rangeSelect:re="rect",columnSelect:oe="multi",rowSelect:ae="multi",rangeSelectionBlending:se="exclusive",columnSelectionBlending:ce="exclusive",rowSelectionBlending:de="exclusive",onDelete:pe,onDragStart:me,onMouseMove:ve,onPaste:be,copyHeaders:ye=!1,freezeColumns:we=0,rowSelectionMode:Me="auto",rowMarkerStartIndex:Ee=1,rowMarkerTheme:Re,onHeaderMenuClick:Fe,getGroupDetails:$e,onSearchClose:Ne,onItemHovered:Ve,onSelectionCleared:je,showSearch:We,onVisibleRegionChanged:Ue,gridSelection:Xe,onGridSelectionChange:Ye,minColumnWidth:Ke=50,maxColumnWidth:Ge=500,maxColumnAutoWidth:Qe,provideEditor:Je,trailingRowOptions:et,scrollOffsetX:tt,scrollOffsetY:nt,verticalBorder:rt,onDragOverCell:ot,onDrop:it,onColumnResize:ct,onColumnResizeEnd:ut,onColumnResizeStart:dt,customRenderers:ht,fillHandle:ft,drawFocusRing:pt,experimental:gt,fixedShadowX:mt,fixedShadowY:vt,headerIcons:bt,imageWindowLoader:yt,initialSize:wt,isDraggable:xt,onDragLeave:kt,onRowMoved:Ct,overscrollX:St,overscrollY:Mt,preventDiagonalScrolling:Et,rightElement:Rt,rightElementProps:Ot,showMinimap:It,smoothScrollX:Pt,smoothScrollY:Tt,scrollToEnd:Ht,scaleToRem:Dt=!1,rowHeight:Lt=34,headerHeight:At=36,groupHeaderHeight:zt=At,theme:Ft}=e,$t=Math.max(Ke,20),_t=Math.max(Ge,$t),Nt=Math.max(null!=Qe?Qe:_t,$t),Vt=o.useMemo((()=>"undefined"===typeof window?{fontSize:"16px"}:window.getComputedStyle(document.documentElement)),[]).fontSize,Bt=o.useMemo((()=>Number.parseFloat(Vt)),[Vt]),[jt,Wt,Ut,Xt,Yt,Kt]=o.useMemo((()=>{var e,t,n;if(!Dt||16===Bt)return[Lt,At,zt,Ft,St,Mt];const r=Bt/16,o=Lt,i=he();return["number"===typeof o?o*r:e=>Math.ceil(o(e)*r),Math.ceil(At*r),Math.ceil(zt*r),{...Ft,headerIconSize:(null!=(e=null==Ft?void 0:Ft.headerIconSize)?e:i.headerIconSize)*r,cellHorizontalPadding:(null!=(t=null==Ft?void 0:Ft.cellHorizontalPadding)?t:i.cellHorizontalPadding)*r,cellVerticalPadding:(null!=(n=null==Ft?void 0:Ft.cellVerticalPadding)?n:i.cellVerticalPadding)*r},Math.ceil((null!=St?St:0)*r),Math.ceil((null!=Mt?Mt:0)*r)]}),[zt,At,St,Mt,Bt,Lt,Dt,Ft]),Gt=o.useMemo((()=>void 0===Z?kr:{...kr,...Z}),[Z]),qt=null!=S?S:T>1e4?48:T>1e3?44:T>100?36:32,Zt="none"!==C,Qt=Zt?1:0,Jt=void 0!==Q,en=!0===(null==et?void 0:et.sticky),[tn,nn]=o.useState(!1),rn=null!=We?We:tn,on=o.useCallback((()=>{void 0!==Ne?Ne():nn(!1)}),[Ne]),ln=o.useMemo((()=>void 0===Xe?void 0:xr(Xe,Qt)),[Xe,Qt]),an=null!=ln?ln:f,sn=o.useRef(new AbortController);o.useEffect((()=>()=>{null==sn||sn.current.abort()}),[]);const[cn,un]=function(e,t,n,r,i){const l=o.useCallback((n=>{var o;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:ge.Loading,allowOverlay:!1}):o.push(t([e,r]));e.push(o)}return e}return null!=(o=null==e?void 0:e(n,r.signal))?o:[]}),[r.signal,t,e,i]),a=void 0!==e?l:void 0,s=o.useCallback((e=>{if(void 0===a)return[];const t={...e,x:e.x-n};if(t.x<0){t.x=0,t.width--;const e=a(t,r.signal);return"function"===typeof e?async()=>(await e()).map((e=>[{kind:ge.Loading,allowOverlay:!1},...e])):e.map((e=>[{kind:ge.Loading,allowOverlay:!1},...e]))}return a(t,r.signal)}),[r.signal,a,n]);return[void 0!==e?s:void 0,a]}(W,H,Qt,sn.current,T),hn=o.useCallback(((e,t,n)=>{if(void 0===ee)return!0;const r=[e[0]-Qt,e[1]];return null==ee?void 0:ee(r,t,n)}),[Qt,ee]),fn=o.useRef(Xe),pn=o.useCallback(((e,t)=>{t&&(e=function(e,t,n,r,o){var i,l;const a=e;if("allowPartial"===r||void 0===e.current)return e;if(void 0!==t){let r=!1;do{if(void 0===(null==e?void 0:e.current))break;const s=null==(i=e.current)?void 0:i.range,c=[];if(s.width>2){const e=t({x:s.x,y:s.y,width:1,height:s.height},o.signal);if("function"===typeof e)return a;c.push(...e);const n=t({x:s.x+s.width-1,y:s.y,width:1,height:s.height},o.signal);if("function"===typeof n)return a;c.push(...n)}else{const e=t({x:s.x,y:s.y,width:s.width,height:s.height},o.signal);if("function"===typeof e)return a;c.push(...e)}let u=s.x-n,d=s.x+s.width-1-n;for(const e of c)for(const t of e)void 0!==t.span&&(u=Math.min(t.span[0],u),d=Math.max(t.span[1],d));u===s.x-n&&d===s.x+s.width-1-n?r=!0:e={current:{cell:null!=(l=e.current.cell)?l:[0,0],range:{x:u+n,y:s.y,width:d-u+1,height:s.height},rangeStack:e.current.rangeStack},columns:e.columns,rows:e.rows}}while(!r)}return e}(e,cn,Qt,_,sn.current)),void 0!==Ye?(fn.current=xr(e,-Qt),Ye(fn.current)):p(e)}),[Ye,cn,Qt,_]),gn=Ze(ct,o.useCallback(((e,t,n,r)=>{null==ct||ct(P[n-Qt],t,n-Qt,r)}),[ct,Qt,P])),mn=Ze(ut,o.useCallback(((e,t,n,r)=>{null==ut||ut(P[n-Qt],t,n-Qt,r)}),[ut,Qt,P])),vn=Ze(dt,o.useCallback(((e,t,n,r)=>{null==dt||dt(P[n-Qt],t,n-Qt,r)}),[dt,Qt,P])),bn=Ze(F,o.useCallback((e=>{var t;return null!=(t=null==F?void 0:F({...e,columnIndex:e.columnIndex-Qt}))&&t}),[F,Qt])),yn=o.useCallback((e=>{if(void 0!==pe){const t=pe(xr(e,-Qt));return"boolean"===typeof t?t:xr(t,Qt)}return!0}),[pe,Qt]),[wn,xn,kn]=function(e,t,n,r,i,l){return[o.useCallback(((o,a,s,c)=>{var u,d;"cell"!==l&&"multi-cell"!==l||void 0===o||(o={...o,range:{x:o.cell[0],y:o.cell[1],width:1,height:1}});const h="mixed"===n&&(s||"drag"===c),f="mixed"===r&&h,p="mixed"===i&&h;let g={current:void 0===o?void 0:{...o,rangeStack:"drag"===c&&null!=(d=null==(u=e.current)?void 0:u.rangeStack)?d:[]},columns:f?e.columns:_e.empty(),rows:p?e.rows:_e.empty()};s&&("multi-rect"===l||"multi-cell"===l)&&void 0!==g.current&&void 0!==e.current&&(g={...g,current:{...g.current,rangeStack:[...e.current.rangeStack,e.current.range]}}),t(g,a)}),[r,e,n,l,i,t]),o.useCallback(((o,l,a)=>{let s;if(o=null!=o?o:e.rows,void 0!==l&&(o=o.add(l)),"exclusive"===i&&o.length>0)s={current:void 0,columns:_e.empty(),rows:o};else{const t=a&&"mixed"===r;s={current:a&&"mixed"===n?e.current:void 0,columns:t?e.columns:_e.empty(),rows:o}}t(s,!1)}),[r,e,n,i,t]),o.useCallback(((o,l,a)=>{let s;if(o=null!=o?o:e.columns,void 0!==l&&(o=o.add(l)),"exclusive"===r&&o.length>0)s={current:void 0,rows:_e.empty(),columns:o};else{const t=a&&"mixed"===i;s={current:a&&"mixed"===n?e.current:void 0,rows:t?e.rows:_e.empty(),columns:o}}t(s,!1)}),[r,e,n,i,t])]}(an,pn,se,ce,de,re),Cn=o.useMemo((()=>({...he(),...Xt})),[Xt]),[Mn,Pn]=o.useState([10,10,0]),Dn=o.useCallback((e=>e.kind!==ge.Custom?yr[e.kind]:null==ht?void 0:ht.find((t=>t.isMatch(e)))),[ht]),Ln=function(e,t,n,r,i,l,a,s,c){const u=o.useRef(t),d=o.useRef(n),h=o.useRef(a);u.current=t,d.current=n,h.current=a;const[f]=o.useState((()=>{if("undefined"===typeof window)return null;const e=document.createElement("canvas");return e.style.display="none",e.style.opacity="0",e.style.position="fixed",document.documentElement.append(e),e.getContext("2d",{alpha:!1})})),p=o.useRef({}),g=o.useRef(),[m,v]=o.useState();return o.useLayoutEffect((()=>{const t=d.current;if(void 0===t||e.every(Te))return;let n=Math.max(1,10-Math.floor(e.length/1e4)),r=0;n<u.current&&n>1&&(n--,r=1);const o={x:0,y:0,width:e.length,height:Math.min(u.current,n)},i={x:0,y:u.current-1,width:e.length,height:1};(async()=>{const n=t(o,c.signal),l=r>0?t(i,c.signal):void 0;let a;a="object"===typeof n?n:await He(n),void 0!==l&&(a="object"===typeof l?[...a,...l]:[...a,...await He(l)]),g.current=e,v(a)})()}),[c.signal,e]),o.useMemo((()=>{var t;let n=e.every(Te)?e:null===f?e.map((e=>Te(e)?e:{...e,width:Rn})):(f.font=`${h.current.baseFontStyle} ${h.current.fontFamily}`,e.map(((t,n)=>{if(Te(t))return t;if(void 0!==p.current[t.id])return{...t,width:p.current[t.id]};if(void 0===m||g.current!==e||void 0===t.id)return{...t,width:Rn};const r=On(f,a,t,n,m,i,l,!0,s);return p.current[t.id]=r.width,r}))),o=0,c=0;const u=[];for(const[e,r]of n.entries())o+=r.width,void 0!==r.grow&&r.grow>0&&(c+=r.grow,u.push(e));if(o<r&&u.length>0){const e=[...n],i=r-o;let l=i;for(let r=0;r<u.length;r++){const o=u[r],a=(null!=(t=n[o].grow)?t:0)/c,s=r===u.length-1?l:Math.min(l,Math.floor(i*a));e[o]={...n[o],growOffset:s,width:n[o].width+s},l-=s}n=e}return n}),[r,e,f,m,a,i,l,s])}(P,T,un,Mn[0]-(0===Qt?0:qt)-Mn[2],$t,Nt,Cn,Dn,sn.current),An=o.useMemo((()=>Ln.some((e=>void 0!==e.group))),[Ln]),Fn=An?Wt+Ut:Wt,$n=an.rows.length,Vn="none"===C?"":0===$n?Ie:$n===T?Oe:Pe,Wn=o.useMemo((()=>"none"===C?Ln:[{title:Vn,width:qt,icon:void 0,hasMenu:!1,style:"normal",themeOverride:Re},...Ln]),[Ln,qt,C,Vn,Re]),[Un,Xn]=o.useMemo((()=>[void 0!==nt&&"number"===typeof jt?Math.floor(nt/jt):0,void 0!==nt&&"number"===typeof jt?-nt%jt:0]),[nt,jt]),Yn=o.useRef({height:1,width:1,x:0,y:0}),Kn=o.useMemo((()=>{var e,t;return{x:Yn.current.x,y:Un,width:null!=(e=Yn.current.width)?e:1,height:null!=(t=Yn.current.height)?t:1,ty:Xn}}),[Xn,Un]),Gn=o.useRef(!1),[qn,Zn,Qn]=function(e){const t=o.useRef([at,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,r]=o.useState(e),[,i]=o.useState(),l=o.useCallback((e=>{const n=t.current[0];n!==at&&(e="function"===typeof e?e(n):e)===n||(n!==at&&i({}),r((t=>"function"===typeof e?e(n===at?t:n):e)),t.current[0]=at)}),[]),a=o.useCallback((()=>{t.current[0]=at,i({})}),[]);return[t.current[0]===at?n:t.current[0],l,a]}(Kn),Jn=(null!=(n=qn.height)?n:1)>1;o.useLayoutEffect((()=>{if(void 0!==nt&&null!==x.current&&Jn){if(x.current.scrollTop===nt)return;x.current.scrollTop=nt,x.current.scrollTop!==nt&&Qn(),Gn.current=!0}}),[nt,Jn,Qn]);const er=(null!=(r=qn.width)?r:1)>1;o.useLayoutEffect((()=>{if(void 0!==tt&&null!==x.current&&er){if(x.current.scrollLeft===tt)return;x.current.scrollLeft=tt,x.current.scrollLeft!==tt&&Qn(),Gn.current=!0}}),[tt,er,Qn]);const tr=qn.x+Qt,nr=qn.y,rr=o.useRef(null),or=o.useCallback((e=>{var t;!0===e?null==(t=rr.current)||t.focus():window.requestAnimationFrame((()=>{var e;null==(e=rr.current)||e.focus()}))}),[]),ir=Jt?T+1:T,lr=o.useCallback((e=>{const t=0===Qt?e:e.map((e=>({...e,location:[e.location[0]-Qt,e.location[1]]}))),n=null==K?void 0:K(t);if(!0!==n)for(const r of t)null==Y||Y(r.location,r.value);return n}),[Y,K,Qt]),ar=o.useMemo((()=>{if(void 0!==te)return 0===Qt?te:te.map((e=>{const t=Wn.length-e.range.x-Qt;if(!(t<=0))return{color:e.color,range:{...e.range,x:e.range.x+Qt,width:Math.min(t,e.range.width)},style:e.style}})).filter((e=>void 0!==e))}),[te,Wn.length,Qt]),sr=o.useRef(Wn);sr.current=Wn;const cr=o.useCallback((([e,t],n=!1)=>{var r,o,i,l,a,s,c,u,d,h;const f=Jt&&t===ir-1;if(0===e&&Zt)return f?Cr:{kind:Se.Marker,allowOverlay:!1,checked:!0===(null==an?void 0:an.rows.hasIndex(t)),markerKind:"clickable-number"===C?"number":C,row:Ee+t,drawHandle:void 0!==Ct};if(f){const t=e===Qt&&null!=(r=null==et?void 0:et.hint)?r:"",n=sr.current[e];if(!0===(null==(o=null==n?void 0:n.trailingRowOptions)?void 0:o.disabled))return Cr;{const e=null!=(l=null==(i=null==n?void 0:n.trailingRowOptions)?void 0:i.hint)?l:t,r=null!=(s=null==(a=null==n?void 0:n.trailingRowOptions)?void 0:a.addIcon)?s:null==et?void 0:et.addIcon;return{kind:Se.NewRow,hint:e,allowOverlay:!1,icon:r}}}{const r=e-Qt;if(n||!0===(null==gt?void 0:gt.strict)){const e=Yn.current,n=e.x>r||r>e.x+e.width||e.y>t||t>e.y+e.height,o=r===(null==(u=null==(c=e.extras)?void 0:c.selected)?void 0:u[0])&&t===(null==(d=e.extras)?void 0:d.selected[1]),i=void 0===(null==(h=e.extras)?void 0:h.freezeRegion)||e.extras.freezeRegion.x>r||r>e.extras.freezeRegion.x+e.extras.freezeRegion.width||e.extras.freezeRegion.y>t||t>e.extras.freezeRegion.y+e.extras.freezeRegion.height;if(n&&!o&&i)return{kind:ge.Loading,allowOverlay:!1}}let o=H([r,t]);return 0!==Qt&&void 0!==o.span&&(o={...o,span:[o.span[0]+Qt,o.span[1]+Qt]}),o}}),[Jt,ir,Zt,null==an?void 0:an.rows,Ct,C,Qt,null==et?void 0:et.hint,null==et?void 0:et.addIcon,null==gt?void 0:gt.strict,H,Ee]),ur=o.useCallback((e=>{var t,n;let r=null!=(t=null==$e?void 0:$e(e))?t:{name:e};return void 0!==X&&""!==e&&(r={icon:r.icon,name:r.name,overrideTheme:r.overrideTheme,actions:[...null!=(n=r.actions)?n:[],{title:"Rename",icon:"renameIcon",onClick:e=>Ar({group:r.name,bounds:e.bounds})}]}),r}),[$e,X]),dr=o.useCallback((e=>{var t;const[n,r]=e.cell,o=Wn[n],i=void 0!==(null==o?void 0:o.group)?null==(t=ur(o.group))?void 0:t.overrideTheme:void 0,l=null==o?void 0:o.themeOverride,a=null==E?void 0:E(r);m({...e,theme:{...Cn,...i,...l,...a,...e.content.themeOverride}})}),[E,Wn,ur,Cn]),hr=o.useCallback(((e,t,n)=>{var r;if(void 0===an.current)return;const[o,i]=an.current.cell,l=cr([o,i]);if(l.kind!==ge.Boolean&&l.allowOverlay){let t=l;if(void 0!==n)switch(t.kind){case ge.Number:{const e=function(e,t){try{return e()}catch(n){return t}}((()=>"-"===n?-0:Number.parseFloat(n)),0);t={...t,data:Number.isNaN(e)?0:e};break}case ge.Text:case ge.Markdown:case ge.Uri:t={...t,data:n}}dr({target:e,content:t,initialValue:n,cell:[o,i],highlight:void 0===n,forceEditMode:void 0!==n})}else l.kind===ge.Boolean&&t&&!0!==l.readonly&&(lr([{location:an.current.cell,value:{...l,data:Nn(l.data)}}]),null==(r=rr.current)||r.damage([{cell:an.current.cell}]))}),[cr,an,lr,dr]),fr=o.useCallback(((e,t)=>{var n;const r=null==(n=rr.current)?void 0:n.getBounds(e,t);if(void 0===r||null===x.current)return;const o=cr([e,t]);o.allowOverlay&&dr({target:r,content:o,initialValue:void 0,highlight:!0,cell:[e,t],forceEditMode:!0})}),[cr,dr]),pr=o.useCallback(((e,t,n="both",r=0,o=0,i)=>{var l;if(null!==x.current){const a=rr.current,s=b.current,c="number"!==typeof e?"cell"===e.unit?e.amount:void 0:e,u="number"!==typeof t?"cell"===t.unit?t.amount:void 0:t,d="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!==s){let t={x:0,y:0,width:0,height:0},f=0,p=0;if((void 0!==c||void 0!==u)&&(t=null!=(l=a.getBounds((null!=c?c:0)+Qt,null!=u?u:0))?l:t,0===t.width||0===t.height))return;const g=s.getBoundingClientRect(),m=g.width/s.offsetWidth;if(void 0!==d&&(t={...t,x:d-g.left-x.current.scrollLeft,width:1}),void 0!==h&&(t={...t,y:h+g.top-x.current.scrollTop,height:1}),void 0!==t){const l={x:t.x-r,y:t.y-o,width:t.width+2*r,height:t.height+2*o};let a=0;for(let e=0;e<we;e++)a+=Ln[e].width;let s=0;en&&(s="number"===typeof jt?jt:jt(T));let c=a*m+g.left+Qt*qt*m,u=g.right,d=g.top+Fn*m,h=g.bottom-s*m;const v=t.width+2*r;switch(null==i?void 0:i.hAlign){case"start":u=c+v;break;case"end":c=u-v;break;case"center":c=Math.floor((c+u)/2)-v/2,u=c+v}const b=t.height+2*o;switch(null==i?void 0:i.vAlign){case"start":h=d+b;break;case"end":d=h-b;break;case"center":d=Math.floor((d+h)/2)-b/2,h=d+b}c>l.x?f=l.x-c:u<l.x+l.width&&(f=l.x+l.width-u),d>l.y?p=l.y-d:h<l.y+l.height&&(p=l.y+l.height-h),"vertical"===n||e<we?f=0:"horizontal"===n&&(p=0),0===f&&0===p||(1!==m&&(f/=m,p/=m),x.current.scrollTo(f+x.current.scrollLeft,p+x.current.scrollTop))}}}}),[Qt,qt,Fn,en,we,Ln,jt,T]),gr=o.useRef(fr),mr=o.useRef(H),vr=o.useRef(T);gr.current=fr,mr.current=H,vr.current=T;const br=o.useCallback((async(e,t=!0)=>{var n;const r=Wn[e];if(!0===(null==(n=null==r?void 0:r.trailingRowOptions)?void 0:n.disabled))return;const o=null==Q?void 0:Q();let i,l=!0;void 0!==o&&(i=await o,"top"===i&&(l=!1),"number"===typeof i&&(l=!1));let a=0;const s=()=>{if(vr.current<=T)return a<500&&window.setTimeout(s,a),void(a=50+2*a);const n="number"===typeof i?i:l?T:0;pr(e-Qt,n),wn({cell:[e,n],range:{x:e,y:n,width:1,height:1}},!1,!1,"edit");const r=mr.current([e-Qt,n]);r.allowOverlay&&Ae(r)&&!0!==r.readonly&&t&&window.setTimeout((()=>{gr.current(e,n)}),0)};s()}),[Wn,Q,Qt,T,pr,wn]),Mr=o.useCallback((e=>{var t,n,r;const o=null!=(r=null==(n=null==(t=Ln[e])?void 0:t.trailingRowOptions)?void 0:n.targetColumn)?r:null==et?void 0:et.targetColumn;if("number"===typeof o){return o+(Zt?1:0)}if("object"===typeof o){const e=P.indexOf(o);if(e>=0){return e+(Zt?1:0)}}}),[Ln,P,Zt,null==et?void 0:et.targetColumn]),Er=o.useRef(),Rr=o.useRef(),Or=o.useCallback(((e,t)=>{var n;const[r,o]=t;return{...Cn,...null==(n=Wn[r])?void 0:n.themeOverride,...null==E?void 0:E(o),...e.themeOverride}}),[E,Wn,Cn]),Ir=o.useCallback((e=>{var t,n,r,o;const i=dn.value?e.metaKey:e.ctrlKey,l=i&&"multi"===ae,a=i&&"multi"===oe,[s,c]=e.location,u=an.columns,d=an.rows,[h,f]=null!=(n=null==(t=an.current)?void 0:t.cell)?n:[];if("cell"===e.kind){if(Rr.current=void 0,Pr.current=[s,c],0===s&&Zt){if(!0===Jt&&c===T||"number"===C||"none"===ae)return;const t=cr(e.location);if(t.kind!==Se.Marker)return;if(void 0!==Ct){const n=Dn(t);ie((null==n?void 0:n.kind)===Se.Marker);const o=null==(r=null==n?void 0:n.onClick)?void 0:r.call(n,{...e,cell:t,posX:e.localEventX,posY:e.localEventY,bounds:e.bounds,theme:Or(t,e.location),preventDefault:()=>{}});if(void 0===o||o.checked===t.checked)return}m(void 0),or();const n=d.hasIndex(c),o=Er.current;if("multi"===ae&&(e.shiftKey||!0===e.isLongTouch)&&void 0!==o&&d.hasIndex(o)){const e=[Math.min(o,c),Math.max(o,c)+1];l||"multi"===Me?xn(void 0,e,!0):xn(_e.fromSingleSelection(e),void 0,l)}else l||e.isTouch||"multi"===Me?n?xn(d.remove(c),void 0,!0):(xn(void 0,c,!0),Er.current=c):n&&1===d.length?xn(_e.empty(),void 0,i):(xn(_e.fromSingleSelection(c),void 0,i),Er.current=c)}else if(s>=Qt&&Jt&&c===T){const e=Mr(s);br(null!=e?e:s)}else if(h!==s||f!==c){const t=cr(e.location),n=Dn(t);if(void 0!==(null==n?void 0:n.onSelect)){let r=!1;if(n.onSelect({...e,cell:t,posX:e.localEventX,posY:e.localEventY,bounds:e.bounds,preventDefault:()=>r=!0,theme:Or(t,e.location)}),r)return}const r=en&&c===T,l=en&&void 0!==an&&(null==(o=an.current)?void 0:o.cell[1])===T;if(!e.shiftKey&&!0!==e.isLongTouch||void 0===h||void 0===f||void 0===an.current||l)wn({cell:[s,c],range:{x:s,y:c,width:1,height:1}},!0,i,"click"),Er.current=void 0,m(void 0),or();else{if(r)return;const e=Math.min(s,h),t=Math.max(s,h),n=Math.min(c,f),o=Math.max(c,f);wn({...an.current,range:{x:e,y:n,width:t-e+1,height:o-n+1}},!0,i,"click"),Er.current=void 0,or()}}}else if("header"===e.kind)if(Pr.current=[s,c],m(void 0),Zt&&0===s)Er.current=void 0,Rr.current=void 0,"multi"===ae&&(d.length!==T?xn(_e.fromSingleSelection([0,T]),void 0,i):xn(_e.empty(),void 0,i),or());else{const t=Rr.current;if("multi"===oe&&(e.shiftKey||!0===e.isLongTouch)&&void 0!==t&&u.hasIndex(t)){const e=[Math.min(t,s),Math.max(t,s)+1];a?kn(void 0,e,i):kn(_e.fromSingleSelection(e),void 0,i)}else a?(u.hasIndex(s)?kn(u.remove(s),void 0,i):kn(void 0,s,i),Rr.current=s):"none"!==oe&&(kn(_e.fromSingleSelection(s),void 0,i),Rr.current=s);Er.current=void 0,or()}else e.kind===ke?Pr.current=[s,c]:e.kind===Ce&&(pn(Sr,!1),m(void 0),or(),null==je||je(),Er.current=void 0,Rr.current=void 0)}),[br,oe,or,Dn,Mr,cr,an,Zt,en,je,Ct,Qt,C,ae,Me,T,wn,pn,kn,xn,Jt,Or]),Pr=o.useRef(),Tr=o.useRef(qn),Hr=o.useRef(),Dr=o.useCallback((e=>{var t,n;if($r.current=!1,Tr.current=Yn.current,0!==e.button)return void(Hr.current=void 0);const r=performance.now(),o=r-(null!=(n=null==(t=Hr.current)?void 0:t.time)?n:-1e3)<250;Hr.current={wasDoubleClick:o,time:r,location:e.location};const i="cell"===e.kind&&e.isFillHandle;!i&&"cell"!==e.kind&&e.isEdge||(w({previousSelection:an,fillHandle:i}),Pr.current=void 0,e.isTouch||Ir(e))}),[an,Ir]),[Lr,Ar]=o.useState(),zr=o.useCallback((e=>{if(e.kind!==ke||"multi"!==oe)return;const t=dn.value?e.metaKey:e.ctrlKey,[n]=e.location,r=an.columns;if(n<Qt)return;const o=Wn[n];let i=n,l=n;for(let a=n-1;a>=Qt&&st(o.group,Wn[a].group);a--)i--;for(let a=n+1;a<Wn.length&&st(o.group,Wn[a].group);a++)l++;if(or(),t)if(r.hasAll([i,l+1])){let e=r;for(let t=i;t<=l;t++)e=e.remove(t);kn(e,void 0,t)}else kn(void 0,[i,l+1],t);else kn(_e.fromSingleSelection([i,l+1]),void 0,t)}),[oe,or,an.columns,Wn,Qt,kn]),Fr=o.useCallback((e=>{var t;if(void 0===an.current)return;const n=[],r=an.current.range;for(let o=0;o<r.width;o++){const t=o+r.x,i=cr([t,e?r.y+r.height-1:r.y]);if(!Le(i)&&Ae(i))for(let o=1;o<r.height;o++){const l=[t,e?r.y+r.height-(o+1):o+r.y];n.push({location:l,value:{...i}})}}lr(n),null==(t=rr.current)||t.damage(n.map((e=>({cell:e.location}))))}),[cr,an,lr]),$r=o.useRef(!1),_r=o.useCallback((async(e,t=!1)=>{var n;if((!0===(null==(n=Hr.current)?void 0:n.wasDoubleClick)||t)&&void 0!==cn&&void 0!==gn){const t=Yn.current.y,n=Yn.current.height;let r=cn({x:e,y:t,width:1,height:Math.min(n,T-t)},sn.current.signal);"object"!==typeof r&&(r=await r());const o=Ln[e-Qt],i=document.createElement("canvas").getContext("2d",{alpha:!1});if(null!==i){i.font=`${Cn.baseFontStyle} ${Cn.fontFamily}`;const t=On(i,Cn,o,0,r,$t,_t,!1,Dn);null==gn||gn(o,t.width,e,t.width)}}}),[Ln,cn,_t,Cn,$t,gn,Qt,T,Dn]),[Nr,Vr]=o.useState(),Br=o.useCallback(((e,t)=>{var n,r,o;const i=y;if(w(void 0),Vr(void 0),t)return;if(!0===(null==i?void 0:i.fillHandle)&&void 0!==an.current)return void Fr(an.current.cell[1]!==an.current.range.y);const[l,a]=e.location,[s,c]=null!=(n=Pr.current)?n:[],u=()=>{$r.current=!0},d=t=>{var n,r,o;if((t.isTouch||s===l&&c===a)&&(null==D||D([l-Qt,a],{...t,preventDefault:u})),!$r.current){const s=cr(e.location),c=Dn(s);if(void 0!==c&&void 0!==c.onClick){const r=c.onClick({...t,cell:s,posX:t.localEventX,posY:t.localEventY,bounds:t.bounds,theme:Or(s,e.location),preventDefault:u});void 0!==r&&!Le(r)&&De(r)&&(lr([{location:t.location,value:r}]),null==(n=rr.current)||n.damage([{cell:t.location}]))}if(!$r.current&&void 0!==(null==(o=null==(r=null==i?void 0:i.previousSelection)?void 0:r.current)?void 0:o.cell)&&void 0!==an.current){const[e,n]=an.current.cell,[r,o]=i.previousSelection.current.cell;if(l===e&&l===r&&a===n&&a===o)return null==L||L([l-Qt,a]),hr(t.bounds,!1),!0}}return!1},h=e.location[0]-Qt;if(e.isTouch){const t=Yn.current,n=Tr.current;if(t.x!==n.x||t.y!==n.y)return;if(!0===e.isLongTouch){if("cell"===e.kind&&(null==(r=null==an?void 0:an.current)?void 0:r.cell[0])===l&&(null==(o=null==an?void 0:an.current)?void 0:o.cell[1])===a)return void(null==V||V([h,e.location[1]],{...e,preventDefault:u}));if("header"===e.kind&&an.columns.hasIndex(l))return void(null==j||j(h,{...e,preventDefault:u}));if(e.kind===ke){if(h<0)return;return void(null==U||U(h,{...e,preventDefault:u}))}}"cell"===e.kind?d(e)||Ir(e):e.kind===ke?null==N||N(h,{...e,preventDefault:u}):(e.kind===xe&&(null==$||$(h,{...e,preventDefault:u})),Ir(e))}else{if("header"===e.kind){if(h<0)return;e.isEdge?_r(l):0===e.button&&l===s&&a===c&&(null==$||$(h,{...e,preventDefault:u}))}if(e.kind===ke){if(h<0)return;0===e.button&&l===s&&a===c&&(null==N||N(h,{...e,preventDefault:u}),$r.current||zr(e))}"cell"===e.kind&&0===e.button&&d(e),Pr.current=void 0}}),[y,Qt,an,D,Fr,cr,Dn,Or,lr,L,hr,V,j,U,Ir,N,_r,$,zr]),jr=o.useCallback((e=>{const t={...e,location:[e.location[0]-Qt,e.location[1]]};null==ve||ve(t),Vr((t=>{var n,r;return e.scrollEdge[0]===(null==t?void 0:t[0])&&e.scrollEdge[1]===t[1]?t:void 0===y||(null!=(r=null==(n=Hr.current)?void 0:n.location[0])?r:0)<Qt?void 0:e.scrollEdge}))}),[y,ve,Qt]);!function(e,t){const n=o.useRef(0),[r,i]=null!=e?e:[0,0];o.useEffect((()=>{if(0===r&&0===i)return void(n.current=0);let e=0;const o=a=>{var s;if(0===e)e=a;else{const o=a-e;n.current=Math.min(1,n.current+o/jn);const l=n.current**1.618*o*Bn;null==(s=t.current)||s.scrollBy(r*l,i*l),e=a}l=window.requestAnimationFrame(o)};let l=window.requestAnimationFrame(o);return()=>window.cancelAnimationFrame(l)}),[t,r,i])}(Nr,x);const Wr=o.useCallback(((e,t)=>{null==Fe||Fe(e-Qt,t)}),[Fe,Qt]),Ur=null==(u=null==an?void 0:an.current)?void 0:u.cell,Xr=o.useCallback(((e,t,n,r,o,i)=>{Gn.current=!1;let l=Ur;void 0!==l&&(l=[l[0]-Qt,l[1]]);const a={x:e.x-Qt,y:e.y,width:e.width,height:Jt&&e.y+e.height>=T?e.height-1:e.height,tx:o,ty:i,extras:{selected:l,freezeRegion:0===we?void 0:{x:0,y:e.y,width:we,height:e.height}}};Yn.current=a,Zn(a),Pn([t,n,r]),null==Ue||Ue(a,a.tx,a.ty,a.extras)}),[Ur,Qt,Jt,T,we,Zn,Ue]),Yr=Ze(J,o.useCallback(((e,t)=>{null==J||J(e-Qt,t-Qt),"none"!==oe&&kn(_e.fromSingleSelection(t),void 0,!0)}),[oe,J,Qt,kn])),Kr=o.useRef(!1),Gr=o.useCallback((e=>{0===e.location[0]&&Qt>0?e.preventDefault():(null==me||me({...e,location:[e.location[0]-Qt,e.location[1]]}),e.defaultPrevented()||(Kr.current=!0),w(void 0))}),[me,Qt]),qr=o.useCallback((()=>{Kr.current=!1}),[]),Zr=o.useCallback((e=>{var t;if(void 0!==y&&0===(null==(t=Hr.current)?void 0:t.location[0])&&0===e.location[0]&&1===Qt&&"multi"===ae&&y.previousSelection&&!y.previousSelection.rows.hasIndex(Hr.current.location[1])&&an.rows.hasIndex(Hr.current.location[1])){const t=Math.min(Hr.current.location[1],e.location[1]),n=Math.max(Hr.current.location[1],e.location[1])+1;xn(_e.fromSingleSelection([t,n]),void 0,!1)}if(void 0!==y&&void 0!==an.current&&!Kr.current&&("rect"===re||"multi-rect"===re)){const[t,n]=an.current.cell;let[r,o]=e.location;o<0&&(o=Yn.current.y);if(en&&n===T)return;if(en&&o===T){if(e.kind!==Ce)return;o--}r=Math.max(r,Qt);const i=r-t,l=o-n,a={x:i>=0?t:r,y:l>=0?n:o,width:Math.abs(i)+1,height:Math.abs(l)+1};wn({...an.current,range:a},!0,!1,"drag")}null==Ve||Ve({...e,location:[e.location[0]-Qt,e.location[1]]})}),[y,Qt,ae,an,re,Ve,xn,en,T,wn]),Qr=o.useCallback((e=>{if(void 0===an.current)return;const[t,n]=e,[r,o]=an.current.cell,i=an.current.range;let c=i.x,u=i.x+i.width,d=i.y,h=i.y+i.height;if(0!==n)switch(n){case 2:h=T,d=o,pr(0,h,"vertical");break;case-2:d=0,h=o+1,pr(0,d,"vertical");break;case 1:d<o?(d++,pr(0,d,"vertical")):(h=Math.min(T,h+1),pr(0,h,"vertical"));break;case-1:h>o+1?(h--,pr(0,h,"vertical")):(d=Math.max(0,d-1),pr(0,d,"vertical"));break;default:le()}if(0!==t)if(2===t)u=Wn.length,c=r,pr(u-1-Qt,0,"horizontal");else if(-2===t)c=Qt,u=r+1,pr(c-Qt,0,"horizontal");else{let e=[];if(void 0!==cn){const t=cn({x:c,y:d,width:u-c-Qt,height:h-d},sn.current.signal);"object"===typeof t&&(e=function(e){return l(a(a(e).filter((e=>void 0!==e.span)).map((e=>{var t,n,r,o;return s((null!=(n=null==(t=e.span)?void 0:t[0])?n:0)+1,(null!=(o=null==(r=e.span)?void 0:r[1])?o:0)+1)}))))}(t))}if(1===t){let t=!1;if(c<r){if(e.length>0){const n=s(c+1,r+1).find((t=>!e.includes(t-Qt)));void 0!==n&&(c=n,t=!0)}else c++,t=!0;t&&pr(c,0,"horizontal")}t||(u=Math.min(Wn.length,u+1),pr(u-1-Qt,0,"horizontal"))}else if(-1===t){let t=!1;if(u>r+1){if(e.length>0){const n=s(u-1,r,-1).find((t=>!e.includes(t-Qt)));void 0!==n&&(u=n,t=!0)}else u--,t=!0;t&&pr(u-Qt,0,"horizontal")}t||(c=Math.max(Qt,c-1),pr(c-Qt,0,"horizontal"))}else le()}wn({cell:an.current.cell,range:{x:c,y:d,width:u-c,height:h-d}},!0,!1,"keyboard-select")}),[cn,an,Wn.length,Qt,T,pr,wn]),Jr=o.useCallback(((e,t,n,r)=>{const o=ir-(n?0:1);if(e=i(e,Qt,Ln.length-1+Qt),t=i(t,0,o),e===(null==Ur?void 0:Ur[0])&&t===(null==Ur?void 0:Ur[1]))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),pn({...an,current:{cell:[e,t],range:{x:e,y:t,width:1,height:1},rangeStack:n}},!0)}else wn({cell:[e,t],range:{x:e,y:t,width:1,height:1}},!0,!1,"keyboard-nav");return void 0!==k.current&&k.current[0]===e&&k.current[1]===t&&(k.current=void 0),pr(e-Qt,t),!0}),[ir,Qt,Ln.length,Ur,an,pr,pn,wn]),eo=o.useCallback(((e,t)=>{void 0!==(null==g?void 0:g.cell)&&void 0!==e&&De(e)&&(lr([{location:g.cell,value:e}]),window.requestAnimationFrame((()=>{var e;null==(e=rr.current)||e.damage([{cell:g.cell}])}))),or(!0),m(void 0);const[n,r]=t;if(void 0!==an.current&&(0!==n||0!==r)){const t=an.current.cell[1]===ir-1&&void 0!==e;Jr(i(an.current.cell[0]+n,0,Wn.length-1),i(an.current.cell[1]+r,0,ir-1),t,!1)}null==A||A(e,t)}),[null==g?void 0:g.cell,or,an,A,lr,ir,Jr,Wn.length]),to=o.useMemo((()=>"gdg-overlay-"+wr++),[]),no=o.useCallback((e=>{(async()=>{var t,n,r,o,i;let l=!1;if(void 0!==G&&G({...e,cancel:()=>{l=!0}}),l)return;const a=()=>{e.stopPropagation(),e.preventDefault()},s=void 0!==g,{altKey:c,shiftKey:u,metaKey:d,ctrlKey:h,key:f,bounds:p}=e,b=dn.value,y=b?d:h,w="Delete"===f||b&&"Backspace"===f,x=Yn.current,k=an.columns,C=an.rows;if("Escape"===f)return void(s?m(void 0):Gt.clear&&(pn(Sr,!1),null==je||je()));if(In("primary+a",e)&&Gt.selectAll){if(s){const e=document.getElementById(to);if(null!==e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),null==t||t.removeAllRanges(),null==t||t.addRange(n)}}else pn({columns:_e.empty(),rows:_e.empty(),current:{cell:null!=(n=null==(t=an.current)?void 0:t.cell)?n:[Qt,0],range:{x:Qt,y:0,width:P.length,height:T},rangeStack:[]}},!1);return void a()}function S(e){var t,n,r,o;or();const i=[];for(let l=e.x;l<e.x+e.width;l++)for(let o=e.y;o<e.y+e.height;o++){const e=H([l-Qt,o]);if(!e.allowOverlay&&e.kind!==ge.Boolean)continue;let a;if(e.kind===ge.Custom){const r=Dn(e),o=null==(t=null==r?void 0:r.provideEditor)?void 0:t.call(r,e);void 0!==(null==r?void 0:r.onDelete)?a=r.onDelete(e):ze(o)&&(a=null==(n=null==o?void 0:o.deletedValue)?void 0:n.call(o,e))}else if(De(e)&&e.allowOverlay||e.kind===ge.Boolean){const t=Dn(e);a=null==(r=null==t?void 0:t.onDelete)?void 0:r.call(t,e)}void 0!==a&&!Le(a)&&De(a)&&i.push({location:[l,o],value:a})}lr(i),null==(o=rr.current)||o.damage(i.map((e=>({cell:e.location}))))}if(In("primary+f",e)&&Gt.search&&(a(),null==(r=null==v?void 0:v.current)||r.focus({preventScroll:!0}),nn(!0)),w){const e=null==(o=null==yn?void 0:yn(an))||o;if(a(),!1!==e){const t=!0===e?an:e;if(void 0!==t.current){S(t.current.range);for(const e of t.current.rangeStack)S(e)}for(const e of t.rows)S({x:Qt,y:e,width:Wn.length-Qt,height:1});for(const e of t.columns)S({x:e,y:0,width:1,height:T})}return}if(void 0===an.current)return;let[M,E]=an.current.cell,R=!1;if(Gt.selectColumn&&In("ctrl+ ",e)&&"none"!==oe)k.hasIndex(M)?kn(k.remove(M),void 0,!0):"single"===oe?kn(_e.fromSingleSelection(M),void 0,!0):kn(void 0,M,!0);else if(Gt.selectRow&&In("shift+ ",e)&&"none"!==ae)C.hasIndex(E)?xn(C.remove(E),void 0,!0):"single"===ae?xn(_e.fromSingleSelection(E),void 0,!0):xn(void 0,E,!0);else if((In("Enter",e)||In(" ",e)||In("shift+Enter",e))&&void 0!==p)s?(m(void 0),In("Enter",e)?E++:In("shift+Enter",e)&&E--):E===T&&Jt?window.setTimeout((()=>{const e=Mr(M);br(null!=e?e:M)}),0):(null==L||L([M-Qt,E]),hr(p,!0),a());else if(Gt.downFill&&In("primary+_68",e)&&an.current.range.height>1)Fr(!1),a();else if(Gt.rightFill&&In("primary+_82",e)&&an.current.range.width>1){const e=[],t=an.current.range;for(let n=0;n<t.height;n++){const r=n+t.y,o=cr([t.x,r]);if(!Le(o)&&Ae(o))for(let n=1;n<t.width;n++){const i=[n+t.x,r];e.push({location:i,value:{...o}})}}lr(e),null==(i=rr.current)||i.damage(e.map((e=>({cell:e.location})))),a()}else if(Gt.pageDown&&In("PageDown",e))E+=Math.max(1,Yn.current.height-4),a();else if(Gt.pageUp&&In("PageUp",e))E-=Math.max(1,Yn.current.height-4),a();else if(Gt.first&&In("primary+Home",e))m(void 0),E=0,M=0;else if(Gt.last&&In("primary+End",e))m(void 0),E=Number.MAX_SAFE_INTEGER,M=Number.MAX_SAFE_INTEGER;else if(Gt.first&&In("primary+shift+Home",e))m(void 0),Qr([-2,-2]);else if(Gt.last&&In("primary+shift+End",e))m(void 0),Qr([2,2]);else if("ArrowDown"===f){if(h&&c)return;m(void 0),!u||"rect"!==re&&"multi-rect"!==re?(c&&!y&&(R=!0),y&&!c?E=T-1:E+=1):Qr([0,y&&!c?2:1])}else if("ArrowUp"===f||"Home"===f){const e="Home"===f||y;m(void 0),!u||"rect"!==re&&"multi-rect"!==re?(c&&!e&&(R=!0),E+=e&&!c?Number.MIN_SAFE_INTEGER:-1):Qr([0,e&&!c?-2:-1])}else if("ArrowRight"===f||"End"===f){const e="End"===f||y;m(void 0),!u||"rect"!==re&&"multi-rect"!==re?(c&&!e&&(R=!0),M+=e&&!c?Number.MAX_SAFE_INTEGER:1):Qr([e&&!c?2:1,0])}else if("ArrowLeft"===f)m(void 0),!u||"rect"!==re&&"multi-rect"!==re?(c&&!y&&(R=!0),M+=y&&!c?Number.MIN_SAFE_INTEGER:-1):Qr([y&&!c?-2:-1,0]);else if("Tab"===f)m(void 0),u?M--:M++;else if(!d&&!h&&void 0!==an.current&&1===f.length&&/[ -~]/g.test(f)&&void 0!==p&&Ae(H([M-Qt,Math.max(0,E-1)]))){if((!en||E!==T)&&(x.y>E||E>x.y+x.height||x.x>M||M>x.x+x.width))return;hr(p,!0,f),a()}Jr(M,E,!1,R)&&a()})()}),[G,g,an,Gt.selectAll,Gt.search,Gt.selectColumn,Gt.selectRow,Gt.downFill,Gt.rightFill,Gt.pageDown,Gt.pageUp,Gt.first,Gt.last,Gt.clear,oe,ae,H,Qt,Jr,pn,je,P.length,T,to,or,lr,Dn,yn,Wn.length,kn,xn,Jt,Mr,br,L,hr,Fr,cr,Qr,re,en]),ro=o.useCallback(((e,t)=>{const n=e.location[0]-Qt;if("header"===e.kind&&(null==j||j(n,{...e,preventDefault:t})),e.kind===ke){if(n<0)return;null==U||U(n,{...e,preventDefault:t})}if("cell"===e.kind){const[r,o]=e.location;null==V||V([n,o],{...e,preventDefault:t}),function(e,t){const[n,r]=t;if(e.columns.hasIndex(n)||e.rows.hasIndex(r))return!0;if(void 0!==e.current){if(e.current.cell[0]===n&&e.current.cell[1]===r)return!0;const t=[e.current.range,...e.current.rangeStack];for(const e of t)if(n>=e.x&&n<e.x+e.width&&r>=e.y&&r<e.y+e.height)return!0}return!1}(an,e.location)||Jr(r,o,!1,!1)}}),[an,V,U,j,Qt,Jr]),oo=o.useCallback((async e=>{var t,n,r,o,i,l,a;if(!Gt.paste)return;function s(e,t,n){var r,o;if(!Le(e)&&Ae(e)&&!0!==e.readonly){const i=null==z?void 0:z(n,e);if(void 0!==i&&De(i))return i.kind!==e.kind&&console.warn("Coercion should not change cell kind."),{location:t,value:i};const l=Dn(e);if(void 0===l)return;if(l.kind===ge.Custom){ie(e.kind===ge.Custom);const o=null==(r=l.onPaste)?void 0:r.call(l,n,e);if(void 0===o)return;return{location:t,value:{...e,data:o}}}{const r=null==(o=l.onPaste)?void 0:o.call(l,n,e);if(void 0===r)return;return ie(r.kind===e.kind),{location:t,value:r}}}}const c=an.columns,u=an.rows,d=!0===(null==(t=x.current)?void 0:t.contains(document.activeElement))||!0===(null==(n=b.current)?void 0:n.contains(document.activeElement));let h=null==(r=an.current)?void 0:r.cell;if(void 0===h&&1===c.length&&(h=[null!=(o=c.first())?o:0,0]),void 0===h&&1===u.length&&(h=[Qt,null!=(i=u.first())?i:0]),d&&void 0!==h){let t,n;const r="text/plain",o="text/html";if(void 0!==navigator.clipboard.read){const e=await navigator.clipboard.read();for(const i of e){if(i.types.includes(o)){const e=await i.getType(o),n=await e.text(),r=document.createElement("html");r.innerHTML=n;const l=r.querySelector("table");if(null!==l){t=Hn(l);break}}i.types.includes(r)&&(n=await(await i.getType(r)).text())}}else if(void 0!==navigator.clipboard.readText)n=await navigator.clipboard.readText();else{if(void 0===e||null===(null==e?void 0:e.clipboardData))return;if(e.clipboardData.types.includes(o)){const n=e.clipboardData.getData(o),r=document.createElement("html");r.innerHTML=n;const i=r.querySelector("table");null!==i&&(t=Hn(i))}void 0===t&&e.clipboardData.types.includes(r)&&(n=e.clipboardData.getData(r))}const[i,c]=h,u=[];do{if(void 0===be){const e=s(cr(h),h,null!=(l=null!=n?n:null==t?void 0:t.map((e=>e.join("\t"))).join("\t"))?l:"");void 0!==e&&u.push(e);break}if(void 0===t){if(void 0===n)return;t=Tn(n)}if(!1===be||"function"===typeof be&&!0!==(null==be?void 0:be([h[0]-Qt,h[1]],t)))return;for(const[e,n]of t.entries()){if(e+c>=T)break;for(const[t,r]of n.entries()){const n=[t+i,e+c],o=s(cr(n),n,r);void 0!==o&&u.push(o)}}}while(0);lr(u),null==(a=rr.current)||a.damage(u.map((e=>({cell:e.location}))))}}),[z,Dn,cr,an,Gt.paste,lr,be,Qt,T]);qe("paste",oo,window,!1,!0);const io=o.useCallback((async(e,t)=>{var n,r;if(!Gt.copy)return;const o=!0===t||!0===(null==(n=x.current)?void 0:n.contains(document.activeElement))||!0===(null==(r=b.current)?void 0:r.contains(document.activeElement)),i=an.columns,l=an.rows,a=(t,n)=>{if(ye){zn([n.map((e=>({kind:ge.Text,data:P[e].title,displayData:P[e].title,allowOverlay:!1}))),...t],n,e)}else zn(t,n,e)};if(o&&void 0!==cn)if(void 0!==an.current){let e=cn(an.current.range,sn.current.signal);"object"!==typeof e&&(e=await e()),a(e,s(an.current.range.x-Qt,an.current.range.x+an.current.range.width-Qt))}else if(void 0!==l&&l.length>0){const e=[...l].map((e=>{const t=cn({x:Qt,y:e,width:P.length-Qt,height:1},sn.current.signal);return"object"===typeof t?t[0]:t().then((e=>e[0]))}));if(e.some((e=>e instanceof Promise))){a(await Promise.all(e),s(P.length))}else a(e,s(P.length))}else if(i.length>0){const e=[],t=[];for(const n of i){let r=cn({x:n,y:0,width:1,height:T},sn.current.signal);"object"!==typeof r&&(r=await r()),e.push(r),t.push(n-Qt)}if(1===e.length)a(e[0],t);else{a(e.reduce(((e,t)=>e.map(((e,n)=>[...e,...t[n]])))),t)}}}),[P,cn,an,Gt.copy,Qt,T,ye]);qe("copy",io,window,!1,!1);const lo=o.useCallback(((e,t)=>{if(0===e.length||-1===t)return;const[n,r]=e[t];void 0!==k.current&&k.current[0]===n&&k.current[1]===r||(k.current=[n,r],Jr(n,r,!1,!1))}),[Jr]),[ao,so]=null!=(h=null==(d=null==Xe?void 0:Xe.current)?void 0:d.cell)?h:[],co=o.useRef(pr);co.current=pr,o.useLayoutEffect((()=>{var e,t,n,r;Gn.current||void 0===ao||void 0===so||ao===(null==(t=null==(e=fn.current)?void 0:e.current)?void 0:t.cell[0])&&so===(null==(r=null==(n=fn.current)?void 0:n.current)?void 0:r.cell[1])||co.current(ao,so),Gn.current=!1}),[ao,so]);const uo=void 0!==an.current&&(an.current.cell[0]>=Wn.length||an.current.cell[1]>=ir);o.useLayoutEffect((()=>{uo&&pn(Sr,!1)}),[uo,pn]);const ho=o.useMemo((()=>!0===Jt&&!0===(null==et?void 0:et.tint)?_e.fromSingleSelection(ir-1):_e.empty()),[ir,Jt,null==et?void 0:et.tint]),fo=o.useCallback((e=>{var t;return"boolean"===typeof rt?rt:null==(t=null==rt?void 0:rt(e-Qt))||t}),[Qt,rt]),po=o.useMemo((()=>{if(void 0===Lr||null===b.current)return null;const{bounds:e,group:t}=Lr,n=b.current.getBoundingClientRect();return o.createElement(En,{bounds:e,group:t,canvasBounds:n,onClose:()=>Ar(void 0),onFinish:e=>{Ar(void 0),null==X||X(t,e)}})}),[X,Lr]),go=Math.min(Wn.length,we+(Zt?1:0));o.useImperativeHandle(t,(()=>({appendRow:e=>br(e+Qt),updateCells:e=>{var t;return 0!==Qt&&(e=e.map((e=>({cell:[e.cell[0]+Qt,e.cell[1]]})))),null==(t=rr.current)?void 0:t.damage(e)},getBounds:(e,t)=>{var n;return null==(n=rr.current)?void 0:n.getBounds(e+Qt,t)},focus:()=>{var e;return null==(e=rr.current)?void 0:e.focus()},emit:async e=>{switch(e){case"delete":no({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!1,key:"Delete",keyCode:46,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0});break;case"fill-right":no({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"r",keyCode:82,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0});break;case"fill-down":no({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"d",keyCode:68,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0});break;case"copy":await io(void 0,!0);break;case"paste":await oo()}},scrollTo:pr,remeasureColumns:e=>{for(const t of e)_r(t+Qt,!0)}})),[br,_r,io,no,oo,Qt,pr]);const[mo,vo]=null!=Ur?Ur:[],bo=o.useCallback((e=>{const[t,n]=e;-1!==n?mo===t&&vo===n||(wn({cell:e,range:{x:t,y:n,width:1,height:1}},!0,!1,"keyboard-nav"),pr(t,n)):"none"!==oe&&(kn(_e.fromSingleSelection(t),void 0,!1),or())}),[oe,or,pr,mo,vo,wn,kn]),[yo,wo]=o.useState(!1),xo=o.useRef(c((e=>{wo(e)}),5)),ko=o.useCallback((()=>{xo.current(!0),void 0===an.current&&0===an.columns.length&&0===an.rows.length&&void 0===y&&wn({cell:[Qt,nr],range:{x:Qt,y:nr,width:1,height:1}},!0,!1,"keyboard-select")}),[nr,an,y,Qt,wn]),Co=o.useCallback((()=>{xo.current(!1)}),[]),[So,Mo]=o.useMemo((()=>{var e;let t;const n=null!=(e=null==gt?void 0:gt.scrollbarWidthOverride)?e:function(){if(void 0!==lt)return lt;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(),lt=n-r}(),r=T+(Jt?1:0);if("number"===typeof jt)t=Fn+r*jt;else{let e=0;const n=Math.min(r,10);for(let t=0;t<n;t++)e+=jt(t);e=Math.floor(e/n),t=Fn+r*e}t+=n;const o=Wn.reduce(((e,t)=>t.width+e),0)+n;return[`${Math.min(1e5,o)}px`,`${Math.min(1e5,t)}px`]}),[Wn,null==gt?void 0:gt.scrollbarWidthOverride,jt,T,Jt,Fn]);return o.createElement(fe.Provider,{value:Cn},o.createElement(_n,{style:ue(Cn),className:B,inWidth:null!=O?O:So,inHeight:null!=I?I:Mo},o.createElement(Sn,{fillHandle:ft,drawFocusRing:pt,experimental:gt,fixedShadowX:mt,fixedShadowY:vt,getRowThemeOverride:E,headerIcons:bt,imageWindowLoader:yt,initialSize:wt,isDraggable:xt,onDragLeave:kt,onRowMoved:Ct,overscrollX:Yt,overscrollY:Kt,preventDiagonalScrolling:Et,rightElement:Rt,rightElementProps:Ot,showMinimap:It,smoothScrollX:Pt,smoothScrollY:Tt,className:B,enableGroups:An,onCanvasFocused:ko,onCanvasBlur:Co,canvasRef:b,onContextMenu:ro,theme:Cn,cellXOffset:tr,cellYOffset:nr,accessibilityHeight:qn.height,onDragEnd:qr,columns:Wn,drawCustomCell:ne,drawHeader:bn,disabledRows:ho,freezeColumns:go,lockColumns:Qt,firstColAccessible:0===Qt,getCellContent:cr,minColumnWidth:$t,maxColumnWidth:_t,searchInputRef:v,showSearch:rn,onSearchClose:on,highlightRegions:ar,getCellsForSelection:cn,getGroupDetails:ur,headerHeight:Wt,isFocused:yo,groupHeaderHeight:An?Ut:0,trailingRowType:Jt?!0===(null==et?void 0:et.sticky)?"sticky":"appended":"none",onColumnResize:gn,onColumnResizeEnd:mn,onColumnResizeStart:vn,onCellFocused:bo,onColumnMoved:Yr,onDragStart:Gr,onHeaderMenuClick:Wr,onItemHovered:Zr,isFilling:!0===(null==y?void 0:y.fillHandle),onMouseMove:jr,onKeyDown:no,onKeyUp:q,onMouseDown:Dr,onMouseUp:Br,onDragOverCell:ot,onDrop:it,onSearchResultsChanged:lo,onVisibleRegionChanged:Xr,clientSize:[Mn[0],Mn[1]],rowHeight:jt,rows:ir,scrollRef:x,selection:an,translateX:qn.tx,translateY:qn.ty,verticalBorder:fo,gridRef:rr,getCellRenderer:Dn,scrollToEnd:Ht}),po,void 0!==g&&o.createElement(Be,{...g,validateCell:hn,id:to,getCellRenderer:Dn,className:!0===(null==gt?void 0:gt.isSubGrid)?"click-outside-ignore":void 0,provideEditor:Je,imageEditorOverride:M,onFinishEditing:eo,markdownDivCreateNode:R})))}));function Er(e){return{...e,kind:ge.Custom}}function Rr(e){return{customRenderers:o.useMemo((()=>e.map(Er)),[e])}}}}]);
|